aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 15:54:16 +0000
committerandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 15:54:16 +0000
commit7a8f426c0120cf9c92726ce9b5ba73a65cad8147 (patch)
tree9741dd1fced71957a68fe436062558d2b9906c2d
parentb144c6993c2d4bb6f3cab878b10413fb53ffe89c (diff)
merge from trunk revisions 127002-132392, 3/N
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/st/cli-be@146434 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5659
-rw-r--r--libstdc++-v3/ChangeLog-20078243
-rw-r--r--libstdc++-v3/Makefile.am39
-rw-r--r--libstdc++-v3/Makefile.in44
-rw-r--r--libstdc++-v3/README92
-rw-r--r--libstdc++-v3/acinclude.m4378
-rw-r--r--libstdc++-v3/aclocal.m41
-rw-r--r--libstdc++-v3/config.h.in48
-rw-r--r--libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver49
-rw-r--r--libstdc++-v3/config/abi/pre/gnu.ver99
-rw-r--r--libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h8
-rw-r--r--libstdc++-v3/config/cpu/cris/atomicity.h15
-rw-r--r--libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h5
-rw-r--r--libstdc++-v3/config/io/basic_file_stdio.cc38
-rw-r--r--libstdc++-v3/config/os/aix/os_defines.h7
-rw-r--r--libstdc++-v3/config/os/generic/error_constants.h177
-rw-r--r--libstdc++-v3/config/os/mingw32/error_constants.h133
-rwxr-xr-xlibstdc++-v3/configure23873
-rw-r--r--libstdc++-v3/configure.ac15
-rw-r--r--libstdc++-v3/configure.host21
-rw-r--r--libstdc++-v3/crossconfig.m447
-rw-r--r--libstdc++-v3/doc/Makefile.am243
-rw-r--r--libstdc++-v3/doc/Makefile.in653
-rw-r--r--libstdc++-v3/doc/doxygen/Intro.3132
-rw-r--r--libstdc++-v3/doc/doxygen/TODO (renamed from libstdc++-v3/docs/doxygen/TODO)0
-rw-r--r--libstdc++-v3/doc/doxygen/doxygroups.cc238
-rw-r--r--libstdc++-v3/doc/doxygen/mainpage.html98
-rw-r--r--libstdc++-v3/doc/doxygen/stdheader.cc (renamed from libstdc++-v3/docs/doxygen/stdheader.cc)0
-rw-r--r--libstdc++-v3/doc/doxygen/style.css (renamed from libstdc++-v3/docs/doxygen/style.css)0
-rw-r--r--libstdc++-v3/doc/doxygen/tables.html (renamed from libstdc++-v3/docs/doxygen/tables.html)0
-rw-r--r--libstdc++-v3/doc/doxygen/user.cfg.in1490
-rw-r--r--libstdc++-v3/doc/html/README3
-rw-r--r--libstdc++-v3/doc/html/api.html48
-rw-r--r--libstdc++-v3/doc/html/bk02.html3
-rw-r--r--libstdc++-v3/doc/html/bk03.html3
-rw-r--r--libstdc++-v3/doc/html/ext/lwg-active.html14696
-rw-r--r--libstdc++-v3/doc/html/ext/lwg-closed.html10627
-rw-r--r--libstdc++-v3/doc/html/ext/lwg-defects.html24284
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/PythonPoweredSmall.gif (renamed from libstdc++-v3/docs/html/ext/pb_ds/PythonPoweredSmall.gif)bin361 -> 361 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/acks.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/acks.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.png)bin21668 -> 21668 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.svg (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.svg)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_container_traits.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_container_traits.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_design.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_design.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_examples.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_examples.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_performance_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_performance_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_regression_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_regression_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/assoc_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/assoc_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/associative_container_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/associative_container_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/balls_and_bins.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/balls_and_bins.png)bin10139 -> 10139 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_hash_table.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_hash_table.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_hash_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_hash_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_invalidation_guarantee.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_invalidation_guarantee.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_tree.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_tree.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/basic_tree_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/basic_tree_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/binary_heap_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/binary_heap_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png)bin5357 -> 5357 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png)bin6710 -> 6710 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png)bin5373 -> 5373 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/binomial_heap_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/binomial_heap_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png)bin7074 -> 7074 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png)bin8534 -> 8534 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png)bin7235 -> 7235 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png)bin6811 -> 6811 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png)bin8445 -> 8445 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png)bin7230 -> 7230 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png)bin7636 -> 7636 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png)bin9396 -> 9396 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png)bin6840 -> 6840 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_table.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_table.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/cc_hash_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/cc_hash_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png)bin7355 -> 7355 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png)bin9557 -> 9557 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png)bin7572 -> 7572 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/checked_by_tidy.gif (renamed from libstdc++-v3/docs/html/ext/pb_ds/checked_by_tidy.gif)bin1367 -> 1367 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/concepts.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/concepts.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/contact.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/contact.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/container_base.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/container_base.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/container_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/container_cd.png)bin11884 -> 11884 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/container_cd.svg (renamed from libstdc++-v3/docs/html/ext/pb_ds/container_cd.svg)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/container_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/container_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/counter_lu_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/counter_lu_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/design.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/design.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/different_underlying_dss.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/different_underlying_dss.png)bin31858 -> 31858 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/direct_mask_range_hashing.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/direct_mask_range_hashing.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/direct_mod_range_hashing.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/direct_mod_range_hashing.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/disclaimer.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/disclaimer.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/ds_gen.html344
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_1.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_1.png)bin16350 -> 16350 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_2.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_2.png)bin18206 -> 18206 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_3.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_3.png)bin5612 -> 5612 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/examples.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/examples.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/exceptions.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/exceptions.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png)bin6194 -> 6194 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png)bin7916 -> 7916 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png)bin6140 -> 6140 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png)bin6110 -> 6110 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png)bin7570 -> 7570 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png)bin6314 -> 6314 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png)bin6763 -> 6763 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png)bin8499 -> 8499 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png)bin6721 -> 6721 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_table.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_table.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/gp_hash_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/gp_hash_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_based_containers.html835
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_exponential_size_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_exponential_size_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_load_check_resize_trigger.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_load_check_resize_trigger.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_policy_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_policy_cd.png)bin25302 -> 25302 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_prime_size_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_prime_size_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png)bin6356 -> 6356 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png)bin7405 -> 7405 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png)bin6401 -> 6401 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram.png)bin12962 -> 12962 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png)bin8918 -> 8918 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png)bin19773 -> 19773 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_standard_resize_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_standard_resize_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_text_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_text_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png)bin6910 -> 6910 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png)bin8436 -> 8436 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png)bin7204 -> 7204 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/index.html146
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/insert_error.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/insert_error.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram1.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram1.png)bin25834 -> 25834 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram2.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram2.png)bin25522 -> 25522 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram3.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram3.png)bin24542 -> 24542 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/interface.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/interface.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/introduction.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/introduction.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_cd.png)bin8331 -> 8331 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_erase.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_erase.png)bin25884 -> 25884 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/join_error.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/join_error.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/linear_probe_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/linear_probe_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/list_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/list_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/list_update_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/list_update_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/lu.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/lu.png)bin20987 -> 20987 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/lu_based_containers.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/lu_based_containers.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/misc.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/misc.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/motivation.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/motivation.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/move_to_front_lu_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/move_to_front_lu_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large.html215
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png)bin6323 -> 6323 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png)bin7299 -> 7299 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png)bin6490 -> 6490 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png)bin6284 -> 6284 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png)bin6706 -> 6706 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png)bin6204 -> 6204 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small.html215
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png)bin6237 -> 6237 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png)bin6732 -> 6732 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png)bin6268 -> 6268 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png)bin6064 -> 6064 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png)bin6396 -> 6396 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png)bin6012 -> 6012 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html210
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png)bin6835 -> 6835 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png)bin7275 -> 7275 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png)bin6588 -> 6588 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png)bin6778 -> 6778 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png)bin7191 -> 7191 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png)bin6535 -> 6535 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html212
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png)bin6449 -> 6449 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png)bin6845 -> 6845 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png)bin6570 -> 6570 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png)bin6419 -> 6419 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png)bin6925 -> 6925 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png)bin6569 -> 6569 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large.html212
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png)bin6380 -> 6380 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png)bin7000 -> 7000 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png)bin6460 -> 6460 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png)bin6204 -> 6204 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png)bin6764 -> 6764 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png)bin6357 -> 6357 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small.html217
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png)bin6456 -> 6456 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png)bin7035 -> 7035 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png)bin6547 -> 6547 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png)bin6111 -> 6111 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png)bin6853 -> 6853 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png)bin6430 -> 6430 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/node_invariant_invalidations.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/node_invariant_invalidations.png)bin32276 -> 32276 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/node_invariants.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/node_invariants.png)bin16553 -> 16553 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_hash_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_hash_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_lu_metadata.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_lu_metadata.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_mapped_type.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_mapped_type.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_probe_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_probe_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_tree_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_tree_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/null_trie_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/null_trie_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/ov_tree_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/ov_tree_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_heap_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_heap_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png)bin5395 -> 5395 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png)bin6892 -> 6892 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png)bin5514 -> 5514 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png)bin5678 -> 5678 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png)bin6760 -> 6760 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png)bin5878 -> 5878 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pat_trie.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pat_trie.png)bin26182 -> 26182 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pat_trie_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pat_trie_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/point_invalidation_guarantee.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/point_invalidation_guarantee.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/point_iterators_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/point_iterators_cd.png)bin20307 -> 20307 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_1.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_1.png)bin14206 -> 14206 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_2.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_2.png)bin12876 -> 12876 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_container_traits.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_container_traits.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_design.html381
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_different_underlying_dss.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_different_underlying_dss.png)bin15660 -> 15660 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_examples.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_examples.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_performance_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_performance_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_regression_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_regression_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/pq_tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/pq_tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/prerequisites.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/prerequisites.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png)bin7350 -> 7350 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png)bin9275 -> 9275 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png)bin7065 -> 7065 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png)bin7021 -> 7021 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png)bin8986 -> 8986 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png)bin7100 -> 7100 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.png)bin10845 -> 10845 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.svg (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.svg)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png)bin6458 -> 6458 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png)bin7989 -> 7989 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png)bin6461 -> 6461 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png)bin6788 -> 6788 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png)bin7633 -> 7633 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png)bin6956 -> 6956 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png)bin5007 -> 5007 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png)bin5878 -> 5878 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png)bin4996 -> 4996 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png)bin6950 -> 6950 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png)bin7748 -> 7748 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png)bin6983 -> 6983 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png)bin4867 -> 4867 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png)bin6105 -> 6105 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png)bin5216 -> 5216 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png)bin6582 -> 6582 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png)bin7424 -> 7424 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png)bin6849 -> 6849 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png)bin7072 -> 7072 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png)bin9006 -> 9006 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png)bin7289 -> 7289 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png)bin6832 -> 6832 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png)bin8477 -> 8477 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png)bin7266 -> 7266 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/quadratic_probe_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/quadratic_probe_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png)bin5960 -> 5960 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png)bin7377 -> 7377 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png)bin5636 -> 5636 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/range_invalidation_guarantee.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/range_invalidation_guarantee.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/rationale_null_node_updator.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/rationale_null_node_updator.png)bin25097 -> 25097 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/rb_tree_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/rb_tree_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/rc_binomial_heap_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/rc_binomial_heap_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/references.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/references.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/resize_error.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/resize_error.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/resize_policy_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/resize_policy_cd.png)bin20806 -> 20806 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/restoring_node_invariants.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/restoring_node_invariants.png)bin14432 -> 14432 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_probe_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_probe_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_range_hashing.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_range_hashing.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_hash_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_hash_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_probe_fn.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_probe_fn.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_resize_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_resize_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_resize_trigger.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_resize_trigger.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_size_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_size_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_tree_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_tree_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_trie_e_access_traits.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_trie_e_access_traits.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_trie_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_trie_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/sample_update_policy.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/sample_update_policy.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/simple_list.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/simple_list.png)bin4299 -> 4299 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/splay_tree_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/splay_tree_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/string_trie_e_access_traits.html400
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tests.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tests.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_gcc.png)bin7013 -> 7013 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_local.png)bin9361 -> 9361 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_msvc.png)bin6932 -> 6932 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png)bin6207 -> 6207 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_local.png)bin7650 -> 7650 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png)bin6059 -> 6059 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/thin_heap_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/thin_heap_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_based_containers.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_based_containers.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_node_iterator.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_node_iterator.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_node_updator_policy_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_node_updator_policy_cd.png)bin9236 -> 9236 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png)bin5698 -> 5698 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_local.png)bin6739 -> 6739 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png)bin5684 -> 5684 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_random_int_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_random_int_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_gcc.png)bin5649 -> 5649 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_local.png)bin6734 -> 6734 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_msvc.png)bin5675 -> 5675 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png)bin5373 -> 5373 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png)bin6690 -> 6690 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png)bin5212 -> 5212 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png)bin4895 -> 4895 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png)bin6011 -> 6011 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png)bin4881 -> 4881 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png)bin5140 -> 5140 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png)bin6270 -> 6270 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png)bin5131 -> 5131 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png)bin6162 -> 6162 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png)bin7796 -> 7796 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png)bin5831 -> 5831 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_based_containers.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_based_containers.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_const_node_iterator.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_const_node_iterator.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_node_iterator.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_node_iterator.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_node_updator_policy_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_node_updator_policy_cd.png)bin12126 -> 12126 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_order_statistics_node_update.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_order_statistics_node_update.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_prefix_search_node_update.html628
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trie_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trie_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/trivial_iterator_tag.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/trivial_iterator_tag.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/tutorial.html (renamed from libstdc++-v3/docs/html/ext/pb_ds/tutorial.html)0
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/update_policy_cd.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/update_policy_cd.png)bin8570 -> 8570 bytes
-rw-r--r--libstdc++-v3/doc/html/ext/pb_ds/update_seq_diagram.png (renamed from libstdc++-v3/docs/html/ext/pb_ds/update_seq_diagram.png)bin10789 -> 10789 bytes
-rw-r--r--libstdc++-v3/doc/html/faq.html873
-rw-r--r--libstdc++-v3/doc/html/index.html43
-rw-r--r--libstdc++-v3/doc/html/manual/abi.html493
-rw-r--r--libstdc++-v3/doc/html/manual/algorithms.html3
-rw-r--r--libstdc++-v3/doc/html/manual/api.html151
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_contributing.html107
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_free.html116
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_porting.html224
-rw-r--r--libstdc++-v3/doc/html/manual/auto_ptr.html90
-rw-r--r--libstdc++-v3/doc/html/manual/backwards.html926
-rw-r--r--libstdc++-v3/doc/html/manual/bitmap_allocator.html340
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas02.html96
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas03.html582
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas04.html263
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas05.html857
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apd.html41
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apds02.html129
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apds03.html32
-rw-r--r--libstdc++-v3/doc/html/manual/bk01ape.html393
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01.html6131
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html40
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html287
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch02.html181
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html99
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html61
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html70
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html219
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html3
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04.html40
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html49
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html29
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch05.html66
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch06.html45
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html76
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02pr01.html11
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07.html16
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html20
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch08.html39
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch09.html9
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch10.html39
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch11.html346
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch12.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13.html89
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html40
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html57
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html85
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html15
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html91
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt06ch14.html422
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt06ch15.html74
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch16.html37
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html16
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch17.html84
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html105
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch18.html60
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt08ch19.html30
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html83
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt09ch20.html13
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt09pr02.html35
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch21.html19
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch22.html26
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch23.html18
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html16
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch24.html113
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch25.html57
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html77
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch26.html34
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27.html49
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html95
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html22
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch28.html8
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html46
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch29.html37
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html55
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html24
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html409
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html9
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html26
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html97
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html26
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32.html394
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33.html6
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html43
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html50
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch34.html38
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch35.html20
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch36.html17
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch37.html11
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch38.html48
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch39.html71
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html38
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html34
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12pr03.html21
-rw-r--r--libstdc++-v3/doc/html/manual/build.html95
-rw-r--r--libstdc++-v3/doc/html/manual/codecvt.html379
-rw-r--r--libstdc++-v3/doc/html/manual/concurrency.html88
-rw-r--r--libstdc++-v3/doc/html/manual/containers.html3
-rw-r--r--libstdc++-v3/doc/html/manual/debug.html148
-rw-r--r--libstdc++-v3/doc/html/manual/debug_mode.html34
-rw-r--r--libstdc++-v3/doc/html/manual/diagnostics.html3
-rw-r--r--libstdc++-v3/doc/html/manual/extensions.html3
-rw-r--r--libstdc++-v3/doc/html/manual/internals.html368
-rw-r--r--libstdc++-v3/doc/html/manual/intro.html3
-rw-r--r--libstdc++-v3/doc/html/manual/io.html3
-rw-r--r--libstdc++-v3/doc/html/manual/iterators.html3
-rw-r--r--libstdc++-v3/doc/html/manual/localization.html3
-rw-r--r--libstdc++-v3/doc/html/manual/messages.html281
-rw-r--r--libstdc++-v3/doc/html/manual/numerics.html3
-rw-r--r--libstdc++-v3/doc/html/manual/parallel_mode.html22
-rw-r--r--libstdc++-v3/doc/html/manual/shared_ptr.html304
-rw-r--r--libstdc++-v3/doc/html/manual/spine.html7
-rw-r--r--libstdc++-v3/doc/html/manual/strings.html3
-rw-r--r--libstdc++-v3/doc/html/manual/support.html3
-rw-r--r--libstdc++-v3/doc/html/manual/test.html504
-rw-r--r--libstdc++-v3/doc/html/manual/using.html41
-rw-r--r--libstdc++-v3/doc/html/manual/utilities.html3
-rw-r--r--libstdc++-v3/doc/html/spine.html5
-rw-r--r--libstdc++-v3/doc/xml/api.xml94
-rw-r--r--libstdc++-v3/doc/xml/authors.xml174
-rw-r--r--libstdc++-v3/doc/xml/book.txml33
-rw-r--r--libstdc++-v3/doc/xml/chapter.txml54
-rw-r--r--libstdc++-v3/doc/xml/class.txml154
-rw-r--r--libstdc++-v3/doc/xml/faq.xml1254
-rw-r--r--libstdc++-v3/doc/xml/gnu/fdl-1.2.xml502
-rw-r--r--libstdc++-v3/doc/xml/gnu/gpl-2.0.xml366
-rw-r--r--libstdc++-v3/doc/xml/gnu/gpl-3.0.xml836
-rw-r--r--libstdc++-v3/doc/xml/images/confdeps.dot (renamed from libstdc++-v3/docs/html/17_intro/confdeps.dot)0
-rw-r--r--libstdc++-v3/doc/xml/images/confdeps.png (renamed from libstdc++-v3/docs/html/17_intro/confdeps.png)bin3486 -> 3486 bytes
-rw-r--r--libstdc++-v3/doc/xml/manual/abi.xml1130
-rw-r--r--libstdc++-v3/doc/xml/manual/algorithms.xml104
-rw-r--r--libstdc++-v3/doc/xml/manual/allocator.xml659
-rw-r--r--libstdc++-v3/doc/xml/manual/appendix_contributing.xml2146
-rw-r--r--libstdc++-v3/doc/xml/manual/appendix_free.xml176
-rw-r--r--libstdc++-v3/doc/xml/manual/appendix_porting.xml47
-rw-r--r--libstdc++-v3/doc/xml/manual/auto_ptr.xml133
-rw-r--r--libstdc++-v3/doc/xml/manual/backwards_compatibility.xml1315
-rw-r--r--libstdc++-v3/doc/xml/manual/bitmap_allocator.xml559
-rw-r--r--libstdc++-v3/doc/xml/manual/build.xml182
-rw-r--r--libstdc++-v3/doc/xml/manual/build_hacking.xml354
-rw-r--r--libstdc++-v3/doc/xml/manual/codecvt.xml730
-rw-r--r--libstdc++-v3/doc/xml/manual/concurrency.xml334
-rw-r--r--libstdc++-v3/doc/xml/manual/configure.xml318
-rw-r--r--libstdc++-v3/doc/xml/manual/containers.xml441
-rw-r--r--libstdc++-v3/doc/xml/manual/ctype.xml259
-rw-r--r--libstdc++-v3/doc/xml/manual/debug.xml245
-rw-r--r--libstdc++-v3/doc/xml/manual/debug_mode.xml888
-rw-r--r--libstdc++-v3/doc/xml/manual/diagnostics.xml126
-rw-r--r--libstdc++-v3/doc/xml/manual/evolution.xml452
-rw-r--r--libstdc++-v3/doc/xml/manual/extensions.xml577
-rw-r--r--libstdc++-v3/doc/xml/manual/internals.xml548
-rw-r--r--libstdc++-v3/doc/xml/manual/intro.xml664
-rw-r--r--libstdc++-v3/doc/xml/manual/io.xml665
-rw-r--r--libstdc++-v3/doc/xml/manual/iterators.xml177
-rw-r--r--libstdc++-v3/doc/xml/manual/locale.xml653
-rw-r--r--libstdc++-v3/doc/xml/manual/localization.xml54
-rw-r--r--libstdc++-v3/doc/xml/manual/messages.xml604
-rw-r--r--libstdc++-v3/doc/xml/manual/mt_allocator.xml554
-rw-r--r--libstdc++-v3/doc/xml/manual/numerics.xml143
-rw-r--r--libstdc++-v3/doc/xml/manual/parallel_mode.xml674
-rw-r--r--libstdc++-v3/doc/xml/manual/shared_ptr.xml580
-rw-r--r--libstdc++-v3/doc/xml/manual/spine.xml111
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxx1998.xml6153
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxx200x.xml2241
-rw-r--r--libstdc++-v3/doc/xml/manual/status_cxxtr1.xml2273
-rw-r--r--libstdc++-v3/doc/xml/manual/strings.xml495
-rw-r--r--libstdc++-v3/doc/xml/manual/support.xml448
-rw-r--r--libstdc++-v3/doc/xml/manual/test.xml823
-rw-r--r--libstdc++-v3/doc/xml/manual/using.xml1024
-rw-r--r--libstdc++-v3/doc/xml/manual/utilities.xml125
-rw-r--r--libstdc++-v3/doc/xml/spine.xml47
-rw-r--r--libstdc++-v3/docs/doxygen/Intro.3141
-rw-r--r--libstdc++-v3/docs/doxygen/doxygroups.cc238
-rw-r--r--libstdc++-v3/docs/doxygen/guide.html112
-rw-r--r--libstdc++-v3/docs/doxygen/mainpage.html101
-rw-r--r--libstdc++-v3/docs/doxygen/run_doxygen328
-rw-r--r--libstdc++-v3/docs/doxygen/user.cfg.in1414
-rw-r--r--libstdc++-v3/docs/html/17_intro/BADNAMES182
-rw-r--r--libstdc++-v3/docs/html/17_intro/BUGS28
-rw-r--r--libstdc++-v3/docs/html/17_intro/C++STYLE386
-rw-r--r--libstdc++-v3/docs/html/17_intro/CHECKLIST6002
-rw-r--r--libstdc++-v3/docs/html/17_intro/COPYING340
-rw-r--r--libstdc++-v3/docs/html/17_intro/COPYING.DOC355
-rw-r--r--libstdc++-v3/docs/html/17_intro/DESIGN859
-rw-r--r--libstdc++-v3/docs/html/17_intro/HEADER_POLICY164
-rw-r--r--libstdc++-v3/docs/html/17_intro/PROBLEMS8
-rw-r--r--libstdc++-v3/docs/html/17_intro/RELEASE-NOTES83
-rw-r--r--libstdc++-v3/docs/html/17_intro/TODO164
-rw-r--r--libstdc++-v3/docs/html/17_intro/concept_check.diff382
-rw-r--r--libstdc++-v3/docs/html/17_intro/configury.html289
-rw-r--r--libstdc++-v3/docs/html/17_intro/contribute.html132
-rw-r--r--libstdc++-v3/docs/html/17_intro/headers_cc.txt83
-rw-r--r--libstdc++-v3/docs/html/17_intro/howto.html385
-rw-r--r--libstdc++-v3/docs/html/17_intro/license.html119
-rw-r--r--libstdc++-v3/docs/html/17_intro/porting-howto.html744
-rw-r--r--libstdc++-v3/docs/html/17_intro/porting.html992
-rw-r--r--libstdc++-v3/docs/html/17_intro/porting.texi570
-rw-r--r--libstdc++-v3/docs/html/18_support/howto.html433
-rw-r--r--libstdc++-v3/docs/html/19_diagnostics/howto.html137
-rw-r--r--libstdc++-v3/docs/html/20_util/allocator.html528
-rw-r--r--libstdc++-v3/docs/html/20_util/howto.html242
-rw-r--r--libstdc++-v3/docs/html/21_strings/gotw29a.txt159
-rw-r--r--libstdc++-v3/docs/html/21_strings/howto.html478
-rw-r--r--libstdc++-v3/docs/html/21_strings/stringtok_h.txt102
-rw-r--r--libstdc++-v3/docs/html/21_strings/stringtok_std_h.txt39
-rw-r--r--libstdc++-v3/docs/html/22_locale/codecvt.html595
-rw-r--r--libstdc++-v3/docs/html/22_locale/ctype.html166
-rw-r--r--libstdc++-v3/docs/html/22_locale/howto.html240
-rw-r--r--libstdc++-v3/docs/html/22_locale/locale.html543
-rw-r--r--libstdc++-v3/docs/html/22_locale/messages.html461
-rw-r--r--libstdc++-v3/docs/html/23_containers/howto.html459
-rw-r--r--libstdc++-v3/docs/html/23_containers/wrappers_h.txt48
-rw-r--r--libstdc++-v3/docs/html/24_iterators/howto.html200
-rw-r--r--libstdc++-v3/docs/html/25_algorithms/howto.html116
-rw-r--r--libstdc++-v3/docs/html/26_numerics/howto.html179
-rw-r--r--libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt51
-rw-r--r--libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt89
-rw-r--r--libstdc++-v3/docs/html/27_io/howto.html779
-rw-r--r--libstdc++-v3/docs/html/Makefile41
-rw-r--r--libstdc++-v3/docs/html/abi.html991
-rw-r--r--libstdc++-v3/docs/html/configopts.html343
-rw-r--r--libstdc++-v3/docs/html/debug.html450
-rw-r--r--libstdc++-v3/docs/html/debug_mode.html578
-rw-r--r--libstdc++-v3/docs/html/documentation.html273
-rw-r--r--libstdc++-v3/docs/html/explanations.html86
-rw-r--r--libstdc++-v3/docs/html/ext/ballocator_doc.html426
-rw-r--r--libstdc++-v3/docs/html/ext/howto.html652
-rw-r--r--libstdc++-v3/docs/html/ext/lwg-active.html8287
-rw-r--r--libstdc++-v3/docs/html/ext/lwg-closed.html5669
-rw-r--r--libstdc++-v3/docs/html/ext/lwg-defects.html15124
-rw-r--r--libstdc++-v3/docs/html/ext/mt_allocator.html558
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/ds_gen.html344
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html835
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/index.html146
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large.html215
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small.html215
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html210
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html212
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large.html212
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small.html217
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/pq_design.html381
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/string_trie_e_access_traits.html400
-rw-r--r--libstdc++-v3/docs/html/ext/pb_ds/trie_prefix_search_node_update.html628
-rw-r--r--libstdc++-v3/docs/html/ext/sgiexts.html253
-rw-r--r--libstdc++-v3/docs/html/ext/tr1.html2322
-rw-r--r--libstdc++-v3/docs/html/faq/index.html1210
-rw-r--r--libstdc++-v3/docs/html/faq/index.txt1118
-rw-r--r--libstdc++-v3/docs/html/install.html241
-rw-r--r--libstdc++-v3/docs/html/lib3styles.css6
-rw-r--r--libstdc++-v3/docs/html/makedoc.awk69
-rw-r--r--libstdc++-v3/docs/html/test.html719
-rw-r--r--libstdc++-v3/include/Makefile.am161
-rw-r--r--libstdc++-v3/include/Makefile.in164
-rw-r--r--libstdc++-v3/include/backward/algo.h145
-rw-r--r--libstdc++-v3/include/backward/algobase.h91
-rw-r--r--libstdc++-v3/include/backward/alloc.h52
-rw-r--r--libstdc++-v3/include/backward/auto_ptr.h297
-rw-r--r--libstdc++-v3/include/backward/backward_warning.h33
-rw-r--r--libstdc++-v3/include/backward/binders.h171
-rw-r--r--libstdc++-v3/include/backward/bvector.h64
-rw-r--r--libstdc++-v3/include/backward/complex.h39
-rw-r--r--libstdc++-v3/include/backward/defalloc.h117
-rw-r--r--libstdc++-v3/include/backward/deque.h66
-rw-r--r--libstdc++-v3/include/backward/fstream.h48
-rw-r--r--libstdc++-v3/include/backward/function.h126
-rw-r--r--libstdc++-v3/include/backward/hash_fun.h172
-rw-r--r--libstdc++-v3/include/backward/hash_map595
-rw-r--r--libstdc++-v3/include/backward/hash_map.h68
-rw-r--r--libstdc++-v3/include/backward/hash_set563
-rw-r--r--libstdc++-v3/include/backward/hash_set.h69
-rw-r--r--libstdc++-v3/include/backward/hashtable.h1086
-rw-r--r--libstdc++-v3/include/backward/heap.h67
-rw-r--r--libstdc++-v3/include/backward/iomanip.h66
-rw-r--r--libstdc++-v3/include/backward/iostream.h56
-rw-r--r--libstdc++-v3/include/backward/istream.h34
-rw-r--r--libstdc++-v3/include/backward/iterator.h187
-rw-r--r--libstdc++-v3/include/backward/list.h66
-rw-r--r--libstdc++-v3/include/backward/map.h65
-rw-r--r--libstdc++-v3/include/backward/multimap.h65
-rw-r--r--libstdc++-v3/include/backward/multiset.h65
-rw-r--r--libstdc++-v3/include/backward/new.h42
-rw-r--r--libstdc++-v3/include/backward/ostream.h34
-rw-r--r--libstdc++-v3/include/backward/pair.h66
-rw-r--r--libstdc++-v3/include/backward/queue.h37
-rw-r--r--libstdc++-v3/include/backward/rope.h56
-rw-r--r--libstdc++-v3/include/backward/set.h65
-rw-r--r--libstdc++-v3/include/backward/slist.h52
-rw-r--r--libstdc++-v3/include/backward/stack.h68
-rw-r--r--libstdc++-v3/include/backward/stream.h34
-rw-r--r--libstdc++-v3/include/backward/streambuf.h36
-rw-r--r--libstdc++-v3/include/backward/strstream6
-rw-r--r--libstdc++-v3/include/backward/tempbuf.h74
-rw-r--r--libstdc++-v3/include/backward/tree.h52
-rw-r--r--libstdc++-v3/include/backward/vector.h66
-rw-r--r--libstdc++-v3/include/bits/algorithmfwd.h653
-rw-r--r--libstdc++-v3/include/bits/allocator.h27
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h8
-rw-r--r--libstdc++-v3/include/bits/basic_string.h30
-rw-r--r--libstdc++-v3/include/bits/boost_concept_check.h143
-rw-r--r--libstdc++-v3/include/bits/boost_sp_shared_count.h378
-rw-r--r--libstdc++-v3/include/bits/c++config202
-rw-r--r--libstdc++-v3/include/bits/char_traits.h8
-rw-r--r--libstdc++-v3/include/bits/codecvt.h4
-rw-r--r--libstdc++-v3/include/bits/cpp_type_traits.h50
-rw-r--r--libstdc++-v3/include/bits/deque.tcc237
-rw-r--r--libstdc++-v3/include/bits/fstream.tcc2
-rw-r--r--libstdc++-v3/include/bits/functional_hash.h12
-rw-r--r--libstdc++-v3/include/bits/gslice.h2
-rw-r--r--libstdc++-v3/include/bits/hashtable.h2
-rw-r--r--libstdc++-v3/include/bits/ios_base.h12
-rw-r--r--libstdc++-v3/include/bits/istream.tcc2
-rw-r--r--libstdc++-v3/include/bits/list.tcc23
-rw-r--r--libstdc++-v3/include/bits/locale_classes.h24
-rw-r--r--libstdc++-v3/include/bits/locale_classes.tcc43
-rw-r--r--libstdc++-v3/include/bits/locale_facets.h12
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc34
-rw-r--r--libstdc++-v3/include/bits/locale_facets_nonio.tcc2
-rw-r--r--libstdc++-v3/include/bits/postypes.h18
-rw-r--r--libstdc++-v3/include/bits/sstream.tcc2
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h3934
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h744
-rw-r--r--libstdc++-v3/include/bits/stl_auto_ptr.h301
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h89
-rw-r--r--libstdc++-v3/include/bits/stl_construct.h25
-rw-r--r--libstdc++-v3/include/bits/stl_deque.h259
-rw-r--r--libstdc++-v3/include/bits/stl_function.h297
-rw-r--r--libstdc++-v3/include/bits/stl_heap.h207
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h209
-rw-r--r--libstdc++-v3/include/bits/stl_iterator_base_types.h6
-rw-r--r--libstdc++-v3/include/bits/stl_list.h269
-rw-r--r--libstdc++-v3/include/bits/stl_map.h163
-rw-r--r--libstdc++-v3/include/bits/stl_move.h92
-rw-r--r--libstdc++-v3/include/bits/stl_multimap.h155
-rw-r--r--libstdc++-v3/include/bits/stl_multiset.h180
-rw-r--r--libstdc++-v3/include/bits/stl_numeric.h12
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h116
-rw-r--r--libstdc++-v3/include/bits/stl_queue.h145
-rw-r--r--libstdc++-v3/include/bits/stl_relops.h4
-rw-r--r--libstdc++-v3/include/bits/stl_set.h181
-rw-r--r--libstdc++-v3/include/bits/stl_stack.h41
-rw-r--r--libstdc++-v3/include/bits/stl_tempbuf.h47
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h93
-rw-r--r--libstdc++-v3/include/bits/stl_uninitialized.h74
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h205
-rw-r--r--libstdc++-v3/include/bits/streambuf_iterator.h27
-rw-r--r--libstdc++-v3/include/bits/valarray_array.h2
-rw-r--r--libstdc++-v3/include/bits/vector.tcc130
-rw-r--r--libstdc++-v3/include/c_global/cmath163
-rw-r--r--libstdc++-v3/include/c_std/cmath154
-rw-r--r--libstdc++-v3/include/debug/bitset8
-rw-r--r--libstdc++-v3/include/debug/debug.h33
-rw-r--r--libstdc++-v3/include/debug/deque111
-rw-r--r--libstdc++-v3/include/debug/functions.h125
-rw-r--r--libstdc++-v3/include/debug/hash_map42
-rw-r--r--libstdc++-v3/include/debug/hash_map.h284
-rw-r--r--libstdc++-v3/include/debug/hash_multimap.h268
-rw-r--r--libstdc++-v3/include/debug/hash_multiset.h243
-rw-r--r--libstdc++-v3/include/debug/hash_set42
-rw-r--r--libstdc++-v3/include/debug/hash_set.h259
-rw-r--r--libstdc++-v3/include/debug/list136
-rw-r--r--libstdc++-v3/include/debug/macros.h63
-rw-r--r--libstdc++-v3/include/debug/map.h122
-rw-r--r--libstdc++-v3/include/debug/multimap.h125
-rw-r--r--libstdc++-v3/include/debug/multiset.h99
-rw-r--r--libstdc++-v3/include/debug/safe_association.h210
-rw-r--r--libstdc++-v3/include/debug/safe_base.h2
-rw-r--r--libstdc++-v3/include/debug/safe_iterator.tcc10
-rw-r--r--libstdc++-v3/include/debug/set.h99
-rw-r--r--libstdc++-v3/include/debug/unordered_map254
-rw-r--r--libstdc++-v3/include/debug/unordered_set249
-rw-r--r--libstdc++-v3/include/debug/vector108
-rw-r--r--libstdc++-v3/include/ext/algorithm5
-rw-r--r--libstdc++-v3/include/ext/array_allocator.h12
-rw-r--r--libstdc++-v3/include/ext/atomicity.h2
-rw-r--r--libstdc++-v3/include/ext/bitmap_allocator.h17
-rw-r--r--libstdc++-v3/include/ext/codecvt_specializations.h10
-rw-r--r--libstdc++-v3/include/ext/concurrence.h106
-rw-r--r--libstdc++-v3/include/ext/hash_fun.h172
-rw-r--r--libstdc++-v3/include/ext/hash_map605
-rw-r--r--libstdc++-v3/include/ext/hash_set574
-rw-r--r--libstdc++-v3/include/ext/hashtable.h1130
-rw-r--r--libstdc++-v3/include/ext/malloc_allocator.h12
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h14
-rw-r--r--libstdc++-v3/include/ext/new_allocator.h10
-rw-r--r--libstdc++-v3/include/ext/numeric_traits.h4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/assoc_container.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/basic_types.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp16
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp38
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/cond_dealtor.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp365
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp38
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp10
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp16
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp357
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp32
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp12
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/head.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp8
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp16
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp12
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/node.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp2
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/node.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/traits.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/standard_policies.hpp81
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/tree_trace_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp13
-rw-r--r--libstdc++-v3/include/ext/pb_ds/exception.hpp6
-rw-r--r--libstdc++-v3/include/ext/pb_ds/hash_policy.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/priority_queue.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp9
-rw-r--r--libstdc++-v3/include/ext/pb_ds/tree_policy.hpp4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/trie_policy.hpp4
-rw-r--r--libstdc++-v3/include/ext/pool_allocator.h15
-rw-r--r--libstdc++-v3/include/ext/rc_string_base.h15
-rw-r--r--libstdc++-v3/include/ext/rope35
-rw-r--r--libstdc++-v3/include/ext/slist4
-rw-r--r--libstdc++-v3/include/ext/sso_string_base.h30
-rw-r--r--libstdc++-v3/include/ext/throw_allocator.h25
-rw-r--r--libstdc++-v3/include/ext/vstring.h145
-rw-r--r--libstdc++-v3/include/ext/vstring_util.h6
-rw-r--r--libstdc++-v3/include/parallel/algo.h2156
-rw-r--r--libstdc++-v3/include/parallel/algobase.h287
-rw-r--r--libstdc++-v3/include/parallel/algorithm45
-rw-r--r--libstdc++-v3/include/parallel/algorithmfwd.h895
-rw-r--r--libstdc++-v3/include/parallel/balanced_quicksort.h483
-rw-r--r--libstdc++-v3/include/parallel/base.h490
-rw-r--r--libstdc++-v3/include/parallel/basic_iterator.h48
-rw-r--r--libstdc++-v3/include/parallel/checkers.h160
-rw-r--r--libstdc++-v3/include/parallel/compatibility.h356
-rw-r--r--libstdc++-v3/include/parallel/compiletime_settings.h89
-rw-r--r--libstdc++-v3/include/parallel/equally_split.h93
-rw-r--r--libstdc++-v3/include/parallel/features.h170
-rw-r--r--libstdc++-v3/include/parallel/find.h407
-rw-r--r--libstdc++-v3/include/parallel/find_selectors.h198
-rw-r--r--libstdc++-v3/include/parallel/for_each.h103
-rw-r--r--libstdc++-v3/include/parallel/for_each_selectors.h366
-rw-r--r--libstdc++-v3/include/parallel/iterator.h205
-rw-r--r--libstdc++-v3/include/parallel/list_partition.h182
-rw-r--r--libstdc++-v3/include/parallel/losertree.h1100
-rw-r--r--libstdc++-v3/include/parallel/merge.h260
-rw-r--r--libstdc++-v3/include/parallel/multiseq_selection.h632
-rw-r--r--libstdc++-v3/include/parallel/multiway_merge.h1830
-rw-r--r--libstdc++-v3/include/parallel/multiway_mergesort.h423
-rw-r--r--libstdc++-v3/include/parallel/numeric506
-rw-r--r--libstdc++-v3/include/parallel/numericfwd.h206
-rw-r--r--libstdc++-v3/include/parallel/omp_loop.h124
-rw-r--r--libstdc++-v3/include/parallel/omp_loop_static.h123
-rw-r--r--libstdc++-v3/include/parallel/par_loop.h131
-rw-r--r--libstdc++-v3/include/parallel/parallel.h48
-rw-r--r--libstdc++-v3/include/parallel/partial_sum.h226
-rw-r--r--libstdc++-v3/include/parallel/partition.h435
-rw-r--r--libstdc++-v3/include/parallel/queue.h155
-rw-r--r--libstdc++-v3/include/parallel/quicksort.h190
-rw-r--r--libstdc++-v3/include/parallel/random_number.h130
-rw-r--r--libstdc++-v3/include/parallel/random_shuffle.h521
-rw-r--r--libstdc++-v3/include/parallel/search.h178
-rw-r--r--libstdc++-v3/include/parallel/set_operations.h544
-rw-r--r--libstdc++-v3/include/parallel/settings.h287
-rw-r--r--libstdc++-v3/include/parallel/sort.h104
-rw-r--r--libstdc++-v3/include/parallel/tags.h82
-rw-r--r--libstdc++-v3/include/parallel/types.h166
-rw-r--r--libstdc++-v3/include/parallel/unique_copy.h198
-rw-r--r--libstdc++-v3/include/parallel/workstealing.h312
-rw-r--r--libstdc++-v3/include/precompiled/extc++.h2
-rw-r--r--libstdc++-v3/include/precompiled/stdc++.h24
-rw-r--r--libstdc++-v3/include/std/algorithm4
-rw-r--r--libstdc++-v3/include/std/bitset100
-rw-r--r--libstdc++-v3/include/std/complex16
-rw-r--r--libstdc++-v3/include/std/fstream45
-rw-r--r--libstdc++-v3/include/std/functional6
-rw-r--r--libstdc++-v3/include/std/istream28
-rw-r--r--libstdc++-v3/include/std/limits20
-rw-r--r--libstdc++-v3/include/std/memory11
-rw-r--r--libstdc++-v3/include/std/numeric4
-rw-r--r--libstdc++-v3/include/std/ostream23
-rw-r--r--libstdc++-v3/include/std/sstream22
-rw-r--r--libstdc++-v3/include/std/stdexcept2
-rw-r--r--libstdc++-v3/include/std/streambuf43
-rw-r--r--libstdc++-v3/include/std/string4
-rw-r--r--libstdc++-v3/include/std/system_error157
-rw-r--r--libstdc++-v3/include/std/tuple617
-rw-r--r--libstdc++-v3/include/std/type_traits30
-rw-r--r--libstdc++-v3/include/std/unordered_map15
-rw-r--r--libstdc++-v3/include/std/unordered_set19
-rw-r--r--libstdc++-v3/include/std/utility24
-rw-r--r--libstdc++-v3/include/std/valarray6
-rw-r--r--libstdc++-v3/include/tr1/bessel_function.tcc10
-rw-r--r--libstdc++-v3/include/tr1/boost_sp_shared_count.h214
-rw-r--r--libstdc++-v3/include/tr1/cmath12
-rw-r--r--libstdc++-v3/include/tr1/cstdbool2
-rw-r--r--libstdc++-v3/include/tr1/ell_integral.tcc6
-rw-r--r--libstdc++-v3/include/tr1/exp_integral.tcc2
-rw-r--r--libstdc++-v3/include/tr1/functional6
-rw-r--r--libstdc++-v3/include/tr1/gamma.tcc4
-rw-r--r--libstdc++-v3/include/tr1/hypergeometric.tcc6
-rw-r--r--libstdc++-v3/include/tr1/legendre_function.tcc2
-rw-r--r--libstdc++-v3/include/tr1/memory4
-rw-r--r--libstdc++-v3/include/tr1/poly_laguerre.tcc4
-rw-r--r--libstdc++-v3/include/tr1/tuple401
-rw-r--r--libstdc++-v3/include/tr1/type_traits58
-rw-r--r--libstdc++-v3/include/tr1/unordered_map5
-rw-r--r--libstdc++-v3/include/tr1/unordered_set5
-rw-r--r--libstdc++-v3/include/tr1_impl/array45
-rw-r--r--libstdc++-v3/include/tr1_impl/boost_shared_ptr.h608
-rw-r--r--libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h244
-rw-r--r--libstdc++-v3/include/tr1_impl/cfenv2
-rw-r--r--libstdc++-v3/include/tr1_impl/cinttypes2
-rw-r--r--libstdc++-v3/include/tr1_impl/complex9
-rw-r--r--libstdc++-v3/include/tr1_impl/cstdint2
-rw-r--r--libstdc++-v3/include/tr1_impl/functional359
-rw-r--r--libstdc++-v3/include/tr1_impl/functional_hash.h185
-rw-r--r--libstdc++-v3/include/tr1_impl/hashtable60
-rw-r--r--libstdc++-v3/include/tr1_impl/hashtable_policy.h184
-rw-r--r--libstdc++-v3/include/tr1_impl/random96
-rw-r--r--libstdc++-v3/include/tr1_impl/random.tcc34
-rw-r--r--libstdc++-v3/include/tr1_impl/regex52
-rw-r--r--libstdc++-v3/include/tr1_impl/tuple430
-rw-r--r--libstdc++-v3/include/tr1_impl/type_traits100
-rw-r--r--libstdc++-v3/include/tr1_impl/type_traitsfwd.h178
-rw-r--r--libstdc++-v3/include/tr1_impl/unordered_map76
-rw-r--r--libstdc++-v3/include/tr1_impl/unordered_set76
-rw-r--r--libstdc++-v3/libmath/Makefile.in5
-rw-r--r--libstdc++-v3/libsupc++/Makefile.in5
-rw-r--r--libstdc++-v3/libsupc++/eh_personality.cc4
-rw-r--r--libstdc++-v3/libsupc++/guard.cc303
-rw-r--r--libstdc++-v3/libsupc++/typeinfo14
-rw-r--r--libstdc++-v3/linkage.m43
-rw-r--r--libstdc++-v3/po/Makefile.in5
-rwxr-xr-xlibstdc++-v3/scripts/check_compile3
-rwxr-xr-xlibstdc++-v3/scripts/check_performance6
-rwxr-xr-xlibstdc++-v3/scripts/make_graphs.py4
-rw-r--r--libstdc++-v3/scripts/run_doxygen346
-rwxr-xr-xlibstdc++-v3/scripts/testsuite_flags.in14
-rw-r--r--libstdc++-v3/src/Makefile.am53
-rw-r--r--libstdc++-v3/src/Makefile.in107
-rw-r--r--libstdc++-v3/src/globals_io.cc2
-rw-r--r--libstdc++-v3/src/hash.cc106
-rw-r--r--libstdc++-v3/src/hash_c++0x.cc42
-rw-r--r--libstdc++-v3/src/hashtable.cc111
-rw-r--r--libstdc++-v3/src/hashtable_c++0x.cc30
-rw-r--r--libstdc++-v3/src/ios_init.cc2
-rw-r--r--libstdc++-v3/src/list.cc6
-rw-r--r--libstdc++-v3/src/locale_facets.cc28
-rw-r--r--libstdc++-v3/src/parallel_list.cc30
-rw-r--r--libstdc++-v3/src/parallel_settings.cc47
-rw-r--r--libstdc++-v3/src/system_error.cc71
-rw-r--r--libstdc++-v3/src/valarray-inst.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/all.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc144
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc4
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc8
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc5
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc8
-rw-r--r--libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc5
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc56
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc61
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc62
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc62
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc63
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc45
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc34
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc58
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc58
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc29
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc26
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc154
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc47
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc31
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc59
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc51
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc69
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc45
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/aligned_storage/value.cc68
-rw-r--r--libstdc++-v3/testsuite/20_util/allocator/33807.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc7
-rw-r--r--libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc (renamed from libstdc++-v3/testsuite/20_util/function_objects/bad_function_call/cons_virtual_derivation.cc)0
-rw-r--r--libstdc++-v3/testsuite/20_util/decay/requirements/typedefs.cc3
-rw-r--r--libstdc++-v3/testsuite/20_util/function_objects/dr660.cc42
-rw-r--r--libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc55
-rw-r--r--libstdc++-v3/testsuite/20_util/hash/requirements/explicit_instantiation.cc48
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/moveable.cc72
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/swap.cc59
-rw-r--r--libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc73
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc86
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc51
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc50
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/dr541.cc31
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc119
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc97
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc53
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/casts/1.cc46
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc85
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc108
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc104
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc50
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc137
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc47
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc165
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc81
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc52
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc63
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc111
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc98
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc135
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc41
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc53
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc52
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/24805.cc31
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc90
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc64
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc48
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc52
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc49
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc82
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc82
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc82
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc81
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc24
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc32
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc35
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc195
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc197
-rw-r--r--libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc67
-rw-r--r--libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc (renamed from libstdc++-v3/testsuite/20_util/specialized_algorithms/32158.cc)0
-rw-r--r--libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/16505.cc (renamed from libstdc++-v3/testsuite/20_util/specialized_algorithms/16505.cc)0
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc50
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc53
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc105
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc65
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc46
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc38
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc43
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc39
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc45
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/moveable.cc51
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/moveable2.cc73
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc38
-rw-r--r--libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc39
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/lock/1.cc37
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc24
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc32
-rw-r--r--libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc36
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc9
-rw-r--r--libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/typedefs.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc109
-rw-r--r--libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc3
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc7
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype/dr695.cc36
-rw-r--r--libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc81
-rw-r--r--libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc105
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/char/12.cc64
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/12.cc64
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc8
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/23_containers/bitset/all/1.cc81
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc81
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/cons/moveable.cc64
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc26
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc18
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/moveable.cc71
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/moveable.cc143
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/moveable.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/hash/requirements/explicit_instantiation.cc24
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/moveable.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/requirements/citerators.cc54
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/requirements/citerators.cc55
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/requirements/citerators.cc54
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/priority_queue/moveable.cc56
-rw-r--r--libstdc++-v3/testsuite/23_containers/queue/moveable.cc56
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/requirements/citerators.cc54
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/citerators.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc39
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/citerators.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc29
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/citerators.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc27
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/moveable.cc52
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/citerators.cc51
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc26
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc17
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc36
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/capacity/reserve/moveable.cc56
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/cons/moveable.cc64
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/moveable.cc71
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/modifiers/moveable.cc146
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/moveable.cc71
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc1
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc84
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/zero_sized_allocations.cc77
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/binary_search.cc183
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/binary_search/2.cc64
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/34595.cc55
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc66
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc68
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal/no_operator_ne.cc (renamed from libstdc++-v3/testsuite/25_algorithms/equal/equal.cc)0
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal_range/2.cc90
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc51
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc2
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/algorithm_parallel_mode.cc23
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc23
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed1.cc37
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc42
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc861
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/1.cc (renamed from libstdc++-v3/testsuite/25_algorithms/heap/heap.cc)0
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc141
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc52
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc52
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc52
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc52
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lower_bound/2.cc81
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lower_bound/33613.cc36
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc (renamed from libstdc++-v3/testsuite/25_algorithms/lower_bound/lower_bound.cc)0
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max/1.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max/2.cc78
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min/1.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min/2.cc87
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/min_max.cc152
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax/1.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax_element/1.cc139
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax_element/check_type.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move/1.cc64
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc66
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/1.cc3
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc20
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/3.cc87
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/moveable.cc76
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort/2.cc85
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort/moveable.cc69
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/2.cc92
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/1.cc58
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc89
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/partition.cc73
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove/moveable.cc67
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_if/moveable.cc67
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate/moveable.cc78
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search/1.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search/check_type.cc37
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc13
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc51
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_intersection/34730.cc51
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc51
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc51
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc50
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort.cc171
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/1.cc86
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/34095.cc33
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/34636.cc33
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/moveable.cc64
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort/vectorbool.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc56
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_sort/2.cc89
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc49
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique/moveable.cc73
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc47
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc46
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/upper_bound/2.cc81
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/upper_bound/33613.cc36
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc48
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc47
-rw-r--r--libstdc++-v3/testsuite/26_numerics/accumulate/1.cc54
-rw-r--r--libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc41
-rw-r--r--libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc41
-rw-r--r--libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc46
-rw-r--r--libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc45
-rw-r--r--libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc45
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc47
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc3
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc23
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric.cc23
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc38
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc43
-rw-r--r--libstdc++-v3/testsuite/26_numerics/inner_product/1.cc56
-rw-r--r--libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc43
-rw-r--r--libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc43
-rw-r--r--libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc49
-rw-r--r--libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc46
-rw-r--r--libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc44
-rw-r--r--libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc44
-rw-r--r--libstdc++-v3/testsuite/26_numerics/slice/1.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/slice_array/array_assignment.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/array_assignment.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/slice_array/requirements/explicit_instantiation.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/explicit_instantiation.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/slice_array/requirements/typedefs.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/27867.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/27867.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/28277.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/28277.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/30416.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/30416.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/33084.cc48
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/algo.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/algo.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/binary_closure.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/binary_closure.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/const_bracket.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/const_bracket.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/dr543.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/name_lookup.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/name_lookup.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/operators.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/operators.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/requirements/explicit_instantiation.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/explicit_instantiation.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/requirements/typedefs.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/typedefs.cc)0
-rw-r--r--libstdc++-v3/testsuite/26_numerics/valarray/subset_assignment.cc (renamed from libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/subset_assignment.cc)0
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/4.cc28
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C42
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc10
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc74
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc75
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/fpos/14320-1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc9
-rw-r--r--libstdc++-v3/testsuite/27_io/objects/char/9.cc2
-rw-r--r--libstdc++-v3/testsuite/Makefile.am47
-rw-r--r--libstdc++-v3/testsuite/Makefile.in68
-rw-r--r--libstdc++-v3/testsuite/abi/demangle/cxx0x/rref.cc32
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/1.cc106
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/14648.cc41
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/23528.cc44
-rw-r--r--libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc35
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/1.cc41
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc93
-rw-r--r--libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc35
-rw-r--r--libstdc++-v3/testsuite/backward/header_deque_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_hash_map_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_hash_set_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_hashtable_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_iterator_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_rope_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_slist_h.cc31
-rw-r--r--libstdc++-v3/testsuite/backward/header_tempbuf_h.cc31
-rw-r--r--libstdc++-v3/testsuite/config/default.exp3
-rw-r--r--libstdc++-v3/testsuite/ext/array_allocator/1.cc10
-rw-r--r--libstdc++-v3/testsuite/ext/array_allocator/2.cc8
-rw-r--r--libstdc++-v3/testsuite/ext/array_allocator/3.cc8
-rw-r--r--libstdc++-v3/testsuite/ext/array_allocator/variadic_construct.cc50
-rw-r--r--libstdc++-v3/testsuite/ext/bitmap_allocator/variadic_construct.cc46
-rw-r--r--libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc7
-rw-r--r--libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/hash_map/1.cc104
-rw-r--r--libstdc++-v3/testsuite/ext/hash_map/14648.cc39
-rw-r--r--libstdc++-v3/testsuite/ext/hash_map/23528.cc43
-rw-r--r--libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc34
-rw-r--r--libstdc++-v3/testsuite/ext/hash_set/1.cc39
-rw-r--r--libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc91
-rw-r--r--libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc34
-rw-r--r--libstdc++-v3/testsuite/ext/headers.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/malloc_allocator/variadic_construct.cc46
-rw-r--r--libstdc++-v3/testsuite/ext/mt_allocator/variadic_construct.cc46
-rw-r--r--libstdc++-v3/testsuite/ext/new_allocator/variadic_construct.cc46
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/basic_map.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/basic_multimap.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/basic_multiset.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/basic_priority_queue.cc13
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/basic_set.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/erase_if.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_mod.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_container_traits.cc13
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc9
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_erase_if.cc5
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_split_join.cc7
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc9
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/ranged_hash.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/store_hash.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/tree_intervals.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/tree_join.cc15
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc12
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/trie_dna.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/trie_split.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/associative_containers.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc24
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/pool_allocator/variadic_construct.cc46
-rw-r--r--libstdc++-v3/testsuite/ext/stdio_sync_filebuf/char/35209.cc40
-rw-r--r--libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/35209.cc40
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/check_allocate_max_size.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/check_deallocate_null.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/check_delete.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/check_new.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/deallocate_global.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/deallocate_local.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/throw_allocator/variadic_construct.cc48
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/element_access/char/front_back.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/element_access/wchar_t/front_back.cc44
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/moveable.cc71
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/requirements/citerators.cc53
-rw-r--r--libstdc++-v3/testsuite/lib/dg-options.exp18
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp193
-rw-r--r--libstdc++-v3/testsuite/performance/25_algorithms/lexicographical_compare.cc55
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc4
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.hpp2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_timing.hpp2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_join_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_modify_timing.hpp2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc4
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/tree_split_join_timing.cc4
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc2
-rw-r--r--libstdc++-v3/testsuite/thread/guard.cc66
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/requirements/explicit_instantiation/2.cc34
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/weak_ptr/requirements/explicit_instantiation/2.cc35
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/gen1.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc22
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/gen1.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/gen1.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/cons/gen1.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc43
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/compile.cc14
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc9
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc9
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc1
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc8
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc8
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc8
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc10
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc6
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/hash/operators/size_t.cc76
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc19
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc7
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc7
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie2.cc37
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc4
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc2
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/common_type.hpp180
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp18
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/native_set.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/string_form.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/common_type/assoc/template_policy.hpp34
-rw-r--r--libstdc++-v3/testsuite/util/common_type/priority_queue/common_type.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/common_type/priority_queue/detail/ds_string_form.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/common_type/priority_queue/string_form.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/hash_fn/dna_str_limit.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/hash_fn/limit_string_hash_fn.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/hash_fn/string_hash_fn.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/hash_fn/string_ranged_hash_fn.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/hash_fn/string_ranged_probe_fn.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/io/illegal_input_error.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/io/prog_bar.cc4
-rw-r--r--libstdc++-v3/testsuite/util/io/prog_bar.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/io/text_populate.hpp12
-rw-r--r--libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc4
-rw-r--r--libstdc++-v3/testsuite/util/io/verified_cmd_line_input.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/io/xml.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/io/xml_test_formatter.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_hash_map.hpp35
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp35
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_hash_set.hpp35
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_hash_tag.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_map.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_set.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/native_type/assoc/native_tree_tag.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/native_type/priority_queue/native_priority_queue.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/multimap_common_type.hpp22
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/common_type.hpp20
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/find_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/insert_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_find_test.hpp17
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_insert_test.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_find_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_insert_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/tree_order_statistics_test.hpp16
-rw-r--r--libstdc++-v3/testsuite/util/performance/assoc/timing/tree_split_join_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/io/xml_formatter.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/timing/join_test.hpp12
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/timing/modify_test.hpp14
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_pop_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_test.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc4
-rw-r--r--libstdc++-v3/testsuite/util/performance/time/elapsed_timer.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/performance/time/timing_test_base.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/assoc/common_type.hpp16
-rw-r--r--libstdc++-v3/testsuite/util/regression/basic_type.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/priority_queue/common_type.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp108
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/cmp_fn_imps.hpp48
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/constructor_destructor_fn_imps.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp24
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp16
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_load_fn_imps.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_loads_fn_imps.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp2
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/it_conversion_fn_imps.hpp12
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/policy_access_fn_imps.hpp16
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/resize_fn_imps.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/split_join_fn_imps.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/detail/subscript_fn_imps.hpp10
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/io/assoc/xml_formatter.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/io/priority_queue/xml_formatter.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/io/xml_formatter.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/split_join_fn_imps.hpp2
-rw-r--r--libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_load_trait.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_loads_trait.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/native_type_trait.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/node_update_trait.hpp12
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/resize_trait.hpp8
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/to_string.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/erase_if_fn.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/regression/trait/priority_queue/trait.hpp6
-rw-r--r--libstdc++-v3/testsuite/util/rng/twister_rand_gen.cc4
-rw-r--r--libstdc++-v3/testsuite/util/rng/twister_rand_gen.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/statistic/result_recorder.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/statistic/sample_mean.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/statistic/sample_mean_confidence_checker.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/statistic/sample_variance.hpp4
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_abi.cc4
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_abi.h21
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_allocator.cc2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_allocator.h28
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_api.h61
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_character.h27
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_common_types.h59
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_hooks.cc22
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_hooks.h18
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_io.h2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_iterators.h52
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_performance.h2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_rvalref.h197
1755 files changed, 198132 insertions, 85398 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index b0ab719c065..68ca46a0397 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5003 +1,465 @@
-2007-07-27 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/32907
- * include/bits/basic_string.h (operator==(const basic_string<_CharT>&,
- const basic_string<_CharT>&)): Add.
- (operator!=): Forward to operator==.
- * include/ext/vstring.h(operator==(const __versa_string<_CharT,
- std::char_traits<_CharT>, std::allocator<_CharT>, _Base>&,
- const __versa_string<_CharT, std::char_traits<_CharT>,
- std::allocator<_CharT>, _Base>&)): Add.
- (operator!=): Forward to operator==.
-
- * include/ext/sso_string_base.h (_M_compare): Remove.
-
-2007-07-25 Stephen M. Webb <stephenw@xandros.com>
-
- Fixed abi_check for missing symbol size changes.
- * testsuite/util/testsuite_abi.cc: Changed local variable name to
- prevent member variable hiding.
-
-2007-07-25 John Davind Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- PR libstdc++/31836
- * config/locale/generic/c_locale.cc (__convert_to_v): Don't use
- strtold if _GLIBCXX_HAVE_BROKEN_STRTOLD is defined.
- * config/os/hpux/os_defines.h (_GLIBCXX_HAVE_BROKEN_STRTOLD): Define
- if __hppa__ is defined.
-
-2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- PR bootstrap/3456
- * testsuite/22_locale/locale/cons/12658_thread-1.cc: Enable on
- mips-sgi-irix6*.
- * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
- * testsuite/thread/18185.cc: Likewise.
- * testsuite/thread/pthread1.cc: Likewise.
- * testsuite/thread/pthread2.cc: Likewise.
- * testsuite/thread/pthread3.cc: Likewise.
- * testsuite/thread/pthread4.cc: Likewise.
- * testsuite/thread/pthread5.cc: Likewise.
- * testsuite/thread/pthread6.cc: Likewise.
- * testsuite/thread/pthread7-rope.cc: Likewise.
- * testsuite/tr1/2_general_utilities/shared_ptr/thread/
- default_weaktoshared.cc: Likewise.
- * testsuite/tr1/2_general_utilities/shared_ptr/thread/
- mutex_weaktoshared.cc: Likewise.
-
-2007-07-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * config/os/mingw32/ctype_base.h: Use the generic libstdc++ masks
- rather than MSVCRT defines.
- * config/os/mingw32/ctype_noninline.h (classic_table): Construct
- and return a static classic table based on generic libstdc++ masks.
-
-2007-07-12 Douglas Gregor <doug.gregor@gmail.com>
-
- * testsuite/tr1/3_function_objects/bind/all_bound.cc: Disambiguate
- uses of TR1/C++0x facilities.
- * testsuite/tr1/3_function_objects/bind/nested.cc: Ditto.
- * testsuite/tr1/3_function_objects/bind/placeholders.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_multimap/requirements/
- explicit_instantiation.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_multimap/swap/1.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_multimap/swap/2.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_set/requirements/
- explicit_instantiation.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_set/swap/1.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_set/swap/2.cc: Ditto.
- * testsuite/tr1/6_containers/utility/pair.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_map/requirements/
- explicit_instantiation.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_map/24064.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_map/swap/1.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_map/swap/2.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/cons/assignment.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/tuple_element.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/tuple_size.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/comparison_operators/
- comparisons.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/element_access/get.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/creation_functions/23978.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: Ditto.
- * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
- Ditto.
- * testsuite/tr1/6_containers/unordered_multiset/requirements/
- explicit_instantiation.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_multiset/swap/1.cc: Ditto.
- * testsuite/tr1/6_containers/unordered_multiset/swap/2.cc: Ditto.
-
-2007-07-10 Bob Wilson <bob.wilson@acm.org>
-
- * configure.ac: Check if $atomicity_dir is cpu/generic/atomicity_mutex
- instead of the non-existent cpu/generic/atomic_mutex.
- * configure: Regenerate.
-
-2007-07-10 Paolo Carlini <pcarlini@suse.de>
-
- * include/std/utility (identity, move, forward): Add.
- * testsuite/20_util/move/requirements/explicit_instantiation.cc: New.
- * testsuite/20_util/move/1.cc: New.
- * testsuite/20_util/identity/value.cc: New.
- * testsuite/20_util/identity/requirements/typedefs.cc: New.
- * testsuite/20_util/identity/requirements/explicit_instantiation.cc:
- New.
- * testsuite/20_util/forward/requirements/explicit_instantiation.cc:
- New.
- * testsuite/20_util/forward/1.cc: New.
- * testsuite/20_util/forward/1_neg.cc: New.
+2008-02-18 Pedro Lamarao <pedro.lamarao@mndfck.org>
+
+ * include/std/tuple: Fixes for moveable, non-copyable types.
+ * testsuite/20_util/tuple/moveable2.cc: New.
+
+2008-02-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/tuple (operator+(tuple<>&&, tuple<>&&): Remove.
+
+2008-02-17 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ * include/tr1/poly_laguerre.tcc: Doxygen fixes.
+ * include/tr1/exp_integral.tcc: Same.
+ * include/tr1/gamma.tcc: Same.
+ * include/tr1/hypergeometric.tcc: Same.
+
+2008-02-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/34797
+ * include/parallel/settings.h (_Settings): Reconstruct Settings class
+ here, uglify, remove anonymous namespace and static
+ members. Convert to datum.
+ * include/parallel/types.h: Move Settings:: enumerations here, uglify.
+ * src/parallel_settings.cc: New, definition for _Settings member
+ functions.
+ * include/parallel/multiway_merge.h: Same.
+ * include/parallel/for_each.h: Same.
+ * include/parallel/workstealing.h: Same.
+ * include/parallel/base.h: Same.
+ * include/parallel/numeric
+ * include/parallel/features.h: Same.
+ * include/parallel/quicksort.h: Same.
+ * include/parallel/equally_split.h: Same.
+ * include/parallel/algorithmfwd.h: Same.
+ * include/parallel/omp_loop_static.h: Same.
+ * include/parallel/random_shuffle.h: Same.
+ * include/parallel/balanced_quicksort.h: Same.
+ * include/parallel/tags.h: Same.
+ * include/parallel/multiway_mergesort.h: Same.
+ * include/parallel/numericfwd.h: Same.
+ * include/parallel/partition.h: Same.
+ * include/parallel/partial_sum.h: Same.
+ * include/parallel/find.h: Same.
+ * include/parallel/algo.h: Same.
+ * include/parallel/omp_loop.h: Same.
+ * include/parallel/sort.h: Same.
+
+ * src/Makefile.am (parallel_sources): Add parallel_settings.cc.
+ * src/Makefile.in: Regenerate.
-2007-07-09 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/27_io/ios_base/failure/what-1.cc: Include <stdexcept>.
-
-2007-07-09 Jim Xochellis <jimxoch@yahoo.gr>
- Paolo Carlini <pcarlini@suse.de>
+ * config/abi/pre/gnu.ver: Export _Settings::get and _Settings::set.
- * include/bits/stl_algo.h (search(_ForwardIterator1,
- _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)): Tidy.
- (search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
- _ForwardIterator2, _BinaryPredicate)): Likewise.
+2008-02-17 Paolo Carlini <pcarlini@suse.de>
-2007-07-06 Hans-Peter Nilsson <hp@axis.com>
+ PR libstdc++/35221
+ * include/parallel/types.h: Reinstate integer types typedefs.
+ * include/parallel/multiseq_selection.h: Adjust.
+ * include/parallel/compatibility.h: Likewise.
+ * include/parallel/random_shuffle.h: Likewise.
+ * include/parallel/random_number.h: Likewise.
+ * include/parallel/base.h: Likewise.
- * testsuite/lib/libstdc++.exp (v3-build_support): Use env(AR)
- and env(RANLIB), not env(AR_FOR_TARGET) and env(RANLIB_FOR_TARGET).
+2008-02-17 Paolo Carlini <pcarlini@suse.de>
-2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de>
-
- PR libstdc++/31957
- * include/Makefile.am: Work around an AIX sed oddity.
- * include/Makefile.in: Regenerate.
+ PR libstdc++/35209
+ * config/abi/pre/gnu.ver: Export stdio_sync_filebuf symbols.
+ * testsuite/ext/stdio_sync_filebuf/char/35209.cc: New.
+ * testsuite/ext/stdio_sync_filebuf/wchar_t/35209.cc: Likewise.
-2007-07-04 Jim Xochellis <jimxoch@yahoo.gr>
+2008-02-16 Benjamin Kosnik <bkoz@redhat.com>
- * include/bits/stl_algo.h (search(_ForwardIterator1,
- _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)): Simplify
- general case loop to a for(;;).
- (search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
- _ForwardIterator2, _BinaryPredicate)): Likewise; remove redundant
- inner loop.
+ * include/parallel/random_number.h: Use TR1's mersenne_twister.
+ (random_number::genrand_bits()): Remove.
+ (random_number::set_seed): Remove.
-2007-07-03 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31518
- * include/debug/formatter.h (_Error_formatter::_M_get_max_length): New.
- (_Error_formatter::_Error_formatter): Use it.
- * src/debug.cc: Define.
- (_Error_formatter::_M_error): Tweak.
- * configure.ac: Adjust version to 6:10:0.
- * config/abi/pre/gnu.ver: Export _Error_formatter::_M_get_max_length
- at GLIBCXX_3.4.10.
- * testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.10.
- * docs/html/debug.html: Document.
- * configure: Regenerate.
-
-2007-07-02 Douglas Gregor <doug.gregor@gmail.com>
-
- * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
- Tweak line numbers.
- * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
- Ditto.
- * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
- Don't try to create an unsigned wchar_t.
- * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
- Don't try to create an unsigned wchar_t.
- * testsuite/util/testsuite_hooks.h: Remove a stray semicolon.
-
-2007-07-01 Douglas Gregor <doug.gregor@gmail.com>
-
- * include/std/type_traits (__make_unsigned): Remove invalid
- wchar_t specialization.
- (__make_signed): Remove invalid wchar_t specialization.
+2008-02-15 Benjamin Kosnik <bkoz@redhat.com>
-2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
-
- * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Force
- C++98 mode.
- * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Ditto.
- * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Ditto.
- * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Ditto.
- * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Ditto.
- * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
- Ditto.
- * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
- Ditto.
- * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Ditto.
- * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Ditto.
- * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Ditto.
- * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Ditto.
- * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Ditto.
- * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Ditto.
-
-2007-06-28 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/32509
- * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks
- involving the de_DE locale only if an auto locale config is
- used for a target suitable for the gnu locale model.
- * docs/html/install.html: Update.
- * configure: Regenerated.
-
-2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/util/testsuite_api.h: New.
- * testsuite/27_io/ios_base/failure: Add.
- * testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: New.
- * testsuite/27_io/ios_base/failure/what-1.cc: Same.
- * testsuite/27_io/ios_base/failure/what-2.cc: Same.
- * testsuite/27_io/ios_base/failure/what-big.cc: Same.
- * testsuite/27_io/ios_base/failure/what-3.cc: Same.
- * testsuite/19_diagnostics/logic_error/
- cons_virtual_derivation.cc: Same.
- * testsuite/19_diagnostics/runtime_error/
- cons_virtual_derivation.cc: Same.
- * testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Same.
- * testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Same.
- * testsuite/18_support/bad_exception/cons_virtual_derivation.cc: Same.
- * testsuite/18_support/bad_typeid/cons_virtual_derivation.cc: Same.
- * testsuite/ext/concurrence_lock_error: New.
- * testsuite/ext/concurrence_lock_error/
- cons_virtual_derivation.cc: Same.
- * testsuite/ext/forced_exception_error: New.
- * testsuite/ext/forced_exception_error/
- cons_virtual_derivation.cc: Same.
- * testsuite/ext/concurrence_unlock_error: New.
- * testsuite/ext/concurrence_unlock_error/
- cons_virtual_derivation.cc: Same.
- * testsuite/20_util/function_objects/bad_function_call: New.
- * testsuite/20_util/function_objects/bad_function_call/
- cons_virtual_derivation.cc: Same.
+ * include/parallel/types.h: Remove enum parallelism.
-2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/ext/throw_allocator.h: Fixes for -fno-exceptions.
- * testsuite/util/testsuite_shared.cc: Same.
- * testsuite/util/io/illegal_input_error.hpp: Same.
- * testsuite/util/io/verified_cmd_line_input.cc: Same.
-
- * libsupc++/typeinfo (type_info): Correct comment formatting,
- clarify member access and public interface.
- * libsupc++/exception: Less compressed comments.
- * libsupc++/new: Same.
-
-2007-06-18 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_list.h: Rename guard macro consistently with
- file name.
- * include/bits/stl_algobase.h: Likewise.
- * include/bits/stl_map.h: Likewise.
- * include/bits/stl_queue.h: Likewise.
- * include/bits/stl_set.h: Likewise.
- * include/bits/stl_stack.h: Likewise.
- * include/bits/stl_iterator_base_types.h: Likewise.
- * include/bits/stl_multimap.h: Likewise.
- * include/bits/stl_pair.h: Likewise.
- * include/bits/stl_vector.h: Likewise.
- * include/bits/stl_deque.h: Likewise.
- * include/bits/stl_multiset.h: Likewise.
- * include/bits/stl_iterator_base_funcs.h: Likewise.
- * include/bits/stl_algo.h: Likewise.
- * include/bits/stl_iterator.h: Likewise.
- * include/bits/stl_tempbuf.h: Likewise.
- * include/bits/stl_bvector.h: Likewise.
- * include/bits/stl_function.h: Likewise.
- * include/bits/stl_tree.h: Likewise.
-
-2007-06-17 Nathan Sidwell <nathan@codesourcery.com>
-
- * config/cpu/m68k/atomicity.h: Use __mcfisaa__, __mcfisaaplus__,
- __mcfisab__ & __mcfisac__ instead of obsolete cpu #defines.
-
-2007-06-13 Richard Earnshaw <rearnsha@arm.com>
-
- * libsupc++/eh_arm.cc (__cxa_type_match): Handle foreign
- exceptions.
- * libsubpc++/eh_personality.cc: Don't try to set up foreign or
- forced unwind types here when using the ARM EABI unwinder.
-
-2007-06-13 Paolo Carlini <pcarlini@suse.de>
-
- * include/c_global/cmath: Tweak includes.
- * include/std/memory: Likewise.
- * include/std/complex: Likewise.
- * include/tr1/memory: Likewise.
- * include/tr1/complex: Likewise.
- * include/tr1/cmath: Likewise; do not wrap special functions
- in #ifndef __GXX_EXPERIMENTAL_CXX0X__.
-
-2007-06-10 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/util/testsuite_performance.h: Add cstring include for
- memset.
-
-2007-06-08 Paolo Carlini <pcarlini@suse.de>
-
- * docs/html/install.html: Adjust consistently with libstdc++/31717.
-
-2007-06-08 Francesco Palagi <palagi@arcetri.astro.it>
-
- * include/std/fstream: Add Table 92 in comment.
-
-2007-06-06 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/32233
- * include/bits/stl_vector.h (_M_fill_initialize): Fix return type.
- * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
- Adjust dg-error line.
- * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
- Likewise.
-
-2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
- Frank Mori Hess <frank.hess@nist.gov>
-
- * docs/html/debug.html: Correct link.
-
-2007-06-02 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1_impl/type_traits (is_reference, add_reference,
- remove_reference): Remove.
- * include/tr1/type_traits (is_reference, add_reference,
- remove_reference): Add.
- * include/std/type_traits (is_lvalue_reference, is_rvalue_reference,
- is_reference, remove_reference, add_lvalue_reference,
- add_rvalue_reference): Add.
- * include/tr1_impl/boost_shared_ptr.h (operator*): Adjust.
- * testsuite/20_util/add_lvalue_reference/requirements/
- explicit_instantiation.cc: New.
- * testsuite/20_util/add_lvalue_reference/value.cc: Likewise.
- * testsuite/20_util/add_rvalue_reference/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/20_util/add_rvalue_reference/value.cc: Likewise.
- * testsuite/20_util/is_lvalue_reference/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/20_util/is_lvalue_reference/requirements/
- typedefs.cc: Likewise.
- * testsuite/20_util/is_lvalue_reference/value.cc: Likewise.
- * testsuite/20_util/is_rvalue_reference/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/20_util/is_rvalue_reference/requirements/
- typedefs.cc: Likewise.
- * testsuite/20_util/is_rvalue_reference/value.cc: Likewise.
- * testsuite/20_util/is_reference/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/20_util/is_reference/requirements/typedefs.cc: Likewise.
- * testsuite/20_util/is_reference/value.cc: Likewise.
- * testsuite/20_util/remove_reference/requirements/
- explicit_instantiation.cc: New.
- * testsuite/20_util/remove_reference/value.cc: Likewise.
-
- * testsuite/tr1/4_metaprogramming/add_const/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/add_const/value.cc: ... here.
- * testsuite/tr1/4_metaprogramming/add_cv/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/add_cv/value.cc: ... here.
- * testsuite/tr1/4_metaprogramming/add_pointer/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/add_pointer/value.cc: ... here.
- * testsuite/tr1/4_metaprogramming/add_reference/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/add_reference/value.cc: ... here.
- * testsuite/tr1/4_metaprogramming/add_volatile/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/add_volatile/value.cc: ... here.
- * testsuite/tr1/4_metaprogramming/aligned_storage/requirements/
- typedefs.cc: Move...
- * testsuite/tr1/4_metaprogramming/aligned_storage/value.cc: ... here.
-
-2007-06-02 Paolo Bonzini <bonzini@gnu.org>
-
- * configure: Regenerate.
-
-2007-06-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/19_diagnostics/logic_error/what-big.cc: New.
- * testsuite/19_diagnostics/logic_error/what-3.cc: Same.
- * testsuite/19_diagnostics/runtime_error/what-big.cc: Same.
- * testsuite/19_diagnostics/runtime_error/what-3.cc: Same.
-
- * testsuite/18_support/14493.cc: Break into...
- * testsuite/18_support/exception/what.cc: ...this.
- * testsuite/18_support/bad_cast/what.cc: ...this.
- * testsuite/18_support/bad_alloc/what.cc: ...this.
- * testsuite/18_support/bad_typeid/what.cc: ...this.
- * testsuite/18_support/bad_exception/what.cc: ...this.
-
- * testsuite/19_diagnostics/bad_exception/23591_thread-1.c: Move...
- * testsuite/18_support/bad_exception/23591_thread-1.c: ...here.
-
- * testsuite/18_support/14026.cc: Move...
- * testsuite/18_support/uncaught_exception/14026.cc: ...here.
-
-2007-06-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/ext/throw_allocator.h (__throw_allocator::allocate):
- Throw bad_alloc for out of memory conditions.
- * testsuite/ext/throw_allocator/deallocate_global.cc: New.
- * testsuite/ext/throw_allocator/check_delete.cc: Same.
- * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same.
- * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same.
- * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same.
- * testsuite/ext/throw_allocator/check_new.cc: Same.
- * testsuite/ext/throw_allocator/deallocate_local.cc: Same.
+2008-02-15 Benjamin Kosnik <bkoz@redhat.com>
-2007-05-31 Paolo Carlini <pcarlini@suse.de>
+ * include/parallel/types.h: Move enum parallelism here. Use
+ tr1/cstdint's int16_t, uint16_t, int32_t, uint32_t, int64_t,
+ uint64_t.
+ * include/parallel/multiseq_selection.h: Adjust for cstdint.
+ * include/parallel/compatibility.h: Same.
+ * include/parallel/tags.h: Just compile-time tags.
+ * include/parallel/base.h: Put namespace bits here.
- PR libstdc++/31426
- * include/bits/c++config: Remove namespace association bits
- from tr1 to std.
-
- * include/ext/type_traits.h (__promote, __promote2,
- __promote3, __promote4): Add.
-
- * include/bits/hashtable.h: New.
- * include/bits/functional_hash.h: Likewise.
- * include/tr1/hashtable.h: Likewise.
-
- * include/tr1_impl/random: New.
- * include/tr1_impl/cinttypes: Likewise.
- * include/tr1_impl/cstdlib: Likewise.
- * include/tr1_impl/unordered_map: Likewise.
- * include/tr1_impl/cstdio: Likewise.
- * include/tr1_impl/boost_shared_ptr.h: Likewise.
- * include/tr1_impl/cctype: Likewise.
- * include/tr1_impl/random.tcc: Likewise.
- * include/tr1_impl/tuple: Likewise.
- * include/tr1_impl/functional_hash.h: Likewise.
- * include/tr1_impl/hashtable: Likewise.
- * include/tr1_impl/cmath: Likewise.
- * include/tr1_impl/type_traitsfwd.h: Likewise.
- * include/tr1_impl/hashtable_policy.h: Likewise.
- * include/tr1_impl/cfenv: Likewise.
- * include/tr1_impl/unordered_set: Likewise.
- * include/tr1_impl/functional: Likewise.
- * include/tr1_impl/utility: Likewise.
- * include/tr1_impl/complex: Likewise.
- * include/tr1_impl/type_traits: Likewise.
- * include/tr1_impl/cwchar: Likewise.
- * include/tr1_impl/cstdint: Likewise.
- * include/tr1_impl/regex: Likewise.
- * include/tr1_impl/array: Likewise.
- * include/tr1_impl/cwctype: Likewise.
-
- * include/tr1/type_traitsfwd.h: Remove.
- * include/tr1/boost_shared_ptr.h: Likewise.
- * include/tr1/common.h: Likewise.
- * include/tr1/hashtable: Likewise.
- * include/tr1/hashtable_policy.h: Likewise.
- * include/tr1/random.tcc: Likewise.
-
- * include/c_global/cinttypes: Include tr1_impl/cinttypes.
- * include/c_global/cstdlib: Likewise for cstdlib.
- * include/c_global/cstdio: Likewise for cstdio.
- * include/c_global/cctype: Likewise for cctype.
- * include/c_global/cmath: Likewise for cmath.
- * include/c_global/cfenv: Likewise for cfenv.
- * include/c_global/cwchar: Likewise for cwchar.
- * include/c_global/cstdint: Likewise for cstdint.
- * include/c_global/cwctype: Likewise for cwctype.
- * include/tr1/cinttypes: Likewise for cinttypes.
- * include/tr1/cstdlib: Likewise for cstdlib.
- * include/tr1/cstdio: Likewise for cstdio.
- * include/tr1/cctype: Likewise for cctype.
- * include/tr1/cmath: Likewise for cmath.
- * include/tr1/cfenv: Likewise for cfenv.
- * include/tr1/cwchar: Likewise for cwchar.
- * include/tr1/cstdint: Likewise for cstdint.
- * include/tr1/cwctype: Likewise for cwctype.
- * include/tr1/functional_hash.h: Likewise for functional_hash.
-
- * include/std/tuple: Include tr1_impl/tuple.
- * include/std/utility: Likewise for utility.
- * include/std/type_traits: Likewise for type_traits.
- (is_pod): Just forward to __is_pod.
- (has_trivial_default_constructor): Just forward to
- __has_trivial_constructor.
- (has_trivial_copy_constructor): Just forward to __has_trivial_copy.
- (has_trivial_assign): Just forward to __has_trivial_assign.
- (has_trivial_destructor): Just forward to __has_trivial_destructor.
- (has_nothrow_default_constructor): Just forward to
- __has_nothrow_constructor.
- (has_nothrow_copy_constructor): Just forward to __has_nothrow_copy.
- (has_nothrow_assign): Just forward to __has_nothrow_assign.
- (is_base_of): Just forward to __is_base_of.
- (is_signed, is_unsigned): Implement according to the C++0x
- specifications.
- * include/std/memory: Likewise for memory.
- * include/std/regex: Likewise for regex.
- * include/std/random: Likewise for random.
- * include/std/unordered_map: Likewise for unordered_map.
- * include/std/unordered_set: Likewise for unordered_set.
- * include/std/functional: Likewise for functional.
- * include/std/complex: Likewise for complex.
- * include/std/array: Likewise for array.
- * include/tr1/tuple: Likewise for tuple.
- * include/tr1/utility: Likewise for utility.
- * include/tr1/type_traits: Likewise for type_traits
- * include/tr1/memory: Likewise for memory.
- * include/tr1/regex: Likewise for regex.
- * include/tr1/random: Likewise for random.
- * include/tr1/unordered_map: Likewise for unordered_map.
- * include/tr1/unordered_set: Likewise for unordered_set.
- * include/tr1/functional: Likewise for functional.
- * include/tr1/complex: Likewise for complex.
- * include/tr1/array: Likewise for array.
-
- * include/c_global/ctgmath: Tweak.
- * include/c_global/cstdarg: Likewise.
- * include/c_global/ctime: Likewise.
- * include/c_global/climits: Likewise.
- * include/c_global/cfloat: Likewise.
- * include/c_global/ccomplex: Likewise.
- * include/c_global/cstdbool: Likewise.
-
- * include/tr1/poly_laguerre.tcc: Tweak, don't use _GLIBCXX_TR1.
- * include/tr1/riemann_zeta.tcc: Likewise.
- * include/tr1/beta_function.tcc: Likewise.
- * include/tr1/exp_integral.tcc: Likewise.
- * include/tr1/hypergeometric.tcc: Likewise.
- * include/tr1/modified_bessel_func.tcc: Likewise.
- * include/tr1/legendre_function.tcc: Likewise.
- * include/tr1/special_function_util.h: Likewise.
- * include/tr1/bessel_function.tcc: Likewise.
- * include/tr1/poly_hermite.tcc: Likewise.
- * include/tr1/ell_integral.tcc: Likewise.
- * include/tr1/gamma.tcc: Likewise.
- * include/tr1/stdlib.h: Likewise.
- * include/tr1/math.h: Likewise.
-
- * include/tr1/complex.h: Minor tweaks.
- * include/tr1/wctype.h: Likewise.
- * include/tr1/wchar.h: Likewise.
- * include/tr1/inttypes.h: Likewise.
- * include/tr1/tgmath.h: Likewise.
- * include/tr1/cstdbool: Likewise.
- * include/tr1/cfloat: Likewise.
- * include/tr1/ccomplex: Likewise.
- * include/tr1/ctime: Likewise.
- * include/tr1/climits: Likewise.
- * include/tr1/ctgmath: Likewise.
- * include/tr1/cstdarg: Likewise.
-
- * testsuite/tr1/headers.cc: Move...
- * testsuite/tr1/headers/all.cc: ... here.
- * testsuite/tr1/using_namespace_std_tr1.cc: Move...
- * testsuite/tr1/headers/c++200x/using_namespace_std_tr1.cc: ... here.
- * testsuite/tr1/headers/using_namespace_std_tr1.cc ... here.
- * testsuite/tr1/headers/c++200x/using_namespace_std_tr1.cc: New.
-
- * testsuite/20_util/tuple/requirements/explicit_instantiation.cc:
- Adjust namespace.
- * testsuite/20_util/has_nothrow_copy_constructor/value.cc: Adjust to
- the C++0x requirements.
- * testsuite/20_util/has_nothrow_default_constructor/value.cc: Likewise.
- * testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
- * testsuite/20_util/has_trivial_default_constructor/value.cc: Likewise.
-
- * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
- dg-error lines.
- * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
- Likewise.
- * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
- Un-xfail.
-
- * testsuite/20_util/is_signed/value.cc: New.
- * testsuite/20_util/is_signed/requirements/typedefs.cc: Likewise.
- * testsuite/20_util/is_signed/requirements/explicit_instantiation.cc:
- Likewise.
- * testsuite/20_util/is_unsigned/value.cc: Likewise..
- * testsuite/20_util/is_unsigned/requirements/typedefs.cc: Likewise.
- * testsuite/20_util/is_unsigned/requirements/explicit_instantiation.cc:
- Likewise.
+ * src/Makefile.am (PARALLEL_FLAGS): Use it.
+ * src/Makefile.in: Regenerate.
- * include/Makefile.am: Adjust.
- * include/Makefile.in: Regenerate.
+ * testsuite/25_algorithms/nth_element/1.cc: Add test variable.
-2007-05-31 Paolo Carlini <pcarlini@suse.de>
+2008-02-15 Hans-Peter Nilsson <hp@axis.com>
- PR c++/32158 (libstdc++ bits)
- * include/bits/stl_uninitialized.h (__uninitialized_copy_aux,
- __uninitialized_fill_aux, __uninitialized_fill_n_aux):
- Remove.
- (struct __uninitialized_copy, struct __uninitialized_fill,
- struct __uninitialized_fill_n): Add.
- (uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
- Adjust.
- * testsuite/20_util/specialized_algorithms/32158.cc: New.
+ * testsuite/config/default.exp: Load gcc dejapatches.exp.
- * include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator,
- _InputIterator, _ForwardIterator)): Robustify vs non-POD input.
+2008-02-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * include/bits/stl_vector.h (_M_fill_initialize): New.
- (vector(size_type, const value_type&, const allocator_type&),
- _M_initialize_dispatch(_Integer, _Integer, __true_type)): Use it.
- * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
- Adjust dg-error line.
- * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
- Likewise.
- * testsuite/23_containers/vector/requirements/dr438/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/vector/requirements/dr438/
- constructor_2_neg.cc: Likewise.
+ * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and
+ remove XFAIL.
-2007-05-29 Paolo Carlini <pcarlini@suse.de>
+2008-02-14 Benjamin Kosnik <bkoz@redhat.com>
+ * config/os/generic/error_constants.h (posix_errno): Guard
+ not_supported use of ENOTSUP.
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add check for ENOTSUP
+ for OpenBSD.
* aclocal.m4: Regenerate.
+ * configure: Rengerate.
+ * config.h.in: Same.
- * testsuite/17_intro/headers/c++1998/c++_for_c.tar: Remove.
- * testsuite/17_intro/headers/c++1998/c++.tar: Likewise.
-
-2007-05-28 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/31717
- * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check
- gnu locale model requests to make sure it will work for the requested
- target. Add checks for strxfrm_l, strerror_l when in gnu locale,
- and strerror_r everywhere.
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
- * config.h.in: Regenerated.
-
-2007-05-27 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/boost_shared_ptr.h
- (_Sp_counted_base<_S_mutex>::_M_add_ref_lock()): Do not wrap in
- #ifdef __GTHREADS.
-
-2007-05-27 Paolo Carlini <pcarlini@suse.de>
-
- * include/c_global/cwchar: Do not include <ctime>.
- * include/c_std/cwchar: Likewise.
- * include/ext/throw_allocator.h: Do it here.
-
-2007-05-25 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/gnu/c_locale.h (__convert_from_v): Fix typo.
-
-2007-05-24 Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
-
-2007-05-24 Steve Ellcey <sje@cup.hp.com>
+2008-02-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/doxygen/mainpage.html: Correct links.
+
+2008-02-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/html/*: Populate with regenerated files.
+
+2008-02-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/html/*: Remove all but contents of ext/pb_ds.
+ * doc/html/index.html: New.
+ * doc/html/README: New.
+
+2008-02-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/doxygen/mainpage.html: Add in corrected links.
+ * README: Edit, move most into...
+ * doc/xml/manual/appendix_contributing.xml (Directory Layout): ...here.
+ (Documentation Style): Revise.
+ * doc/xml/spine.xml: Edit file names.
+ * doc/Makefile.am: Edit xml_sources.
+ * doc/Makefile.in: Regenerate.
+
+2008-02-11 Paolo Carlini <pcarlini@suse.de>
+
+ * configure: Regenerate with documented autoconf and automake
+ versions (i.e., 2.59 and 1.9.6).
+ * Makefile.in: Likewise.
+ * src/Makefile.in: Likewise.
+ * doc/Makefile.in: Likewise.
+ * po/Makefile.in: Likewise.
+ * libmath/Makefile.in: Likewise.
+ * include/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+
+2008-02-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ Convert documentation to DocBook.
+ * doc/Makefile.am (doc-doxygen-html): Changed to doc-html-doxygen.
+ (doc-doxygen-man): Changed to doc-man-doxygen.
+ (doc-performance): Changed to doc-html-performance.
+ (doc-xml-doxygen): New.
+ (doc-xml-single): New.
+ (doc-xml-validate): New.
+ (doc-html): New.
+ (doc-html-single): New.
+ (doc-fo): New.
+ (doc-pdf): New.
+ (doc-pdf-fop-xml): New.
+ (doc-pdf-fop-fo): New.
+ (doc-pdf-xmlto): New.
+ (doc-pdf-xmlroff): New.
+ (doc-pdf-prince): New.
+ * doc/xml: New directory.
+ * doc/xml/authors.xml: New.
+ * doc/xml/images: New directory.
+ * doc/xml/images/confdeps.png: Add.
+ * doc/xml/images/confdeps.dot: Add.
+ * doc/xml/faq.xml: New.
+ * doc/xml/api.xml: New.
+ * doc/xml/gnu: New directory.
+ * doc/xml/gnu/gpl-3.0.xml: New.
+ * doc/xml/gnu/fdl-1.2.xml: New.
+ * doc/xml/gnu/gpl-2.0.xml: New.
+ * doc/xml/manual: New directory.
+ * doc/xml/manual/mt_allocator.xml: New.
+ * doc/xml/manual/allocator.xml: New.
+ * doc/xml/manual/ctype.xml: New.
+ * doc/xml/manual/numerics.xml: New.
+ * doc/xml/manual/codecvt.xml: New.
+ * doc/xml/manual/concurrency.xml: New.
+ * doc/xml/manual/backwards_compatibility.xml: New.
+ * doc/xml/manual/intro.xml: New.
+ * doc/xml/manual/shared_ptr.xml: New.
+ * doc/xml/manual/abi.xml: New.
+ * doc/xml/manual/status_cxxtr1.xml: New.
+ * doc/xml/manual/auto_ptr.xml: New.
+ * doc/xml/manual/build.xml: New.
+ * doc/xml/manual/internals.xml: New.
+ * doc/xml/manual/parallel_mode.xml: New.
+ * doc/xml/manual/status_cxx1998.xml: New.
+ * doc/xml/manual/containers.xml: New.
+ * doc/xml/manual/io.xml: New.
+ * doc/xml/manual/appendix_porting.xml: New.
+ * doc/xml/manual/utilities.xml: New.
+ * doc/xml/manual/bitmap_allocator.xml: New.
+ * doc/xml/manual/support.xml: New.
+ * doc/xml/manual/configure.xml: New.
+ * doc/xml/manual/build_hacking.xml: New.
+ * doc/xml/manual/evolution.xml: New.
+ * doc/xml/manual/using.xml: New.
+ * doc/xml/manual/debug.xml: New.
+ * doc/xml/manual/localization.xml: New.
+ * doc/xml/manual/strings.xml: New.
+ * doc/xml/manual/debug_mode.xml: New.
+ * doc/xml/manual/locale.xml: New.
+ * doc/xml/manual/extensions.xml: New.
+ * doc/xml/manual/appendix_contributing.xml: New.
+ * doc/xml/manual/messages.xml: New.
+ * doc/xml/manual/diagnostics.xml: New.
+ * doc/xml/manual/appendix_free.xml: New.
+ * doc/xml/manual/algorithms.xml: New.
+ * doc/xml/manual/iterators.xml: New.
+ * doc/xml/manual/spine.xml: New.
+ * doc/xml/manual/test.xml: New.
+ * doc/xml/manual/status_cxx200x.xml: New.
+ * doc/xml/spine.xml: New.
+
+ * doc/xml/book.txml: New. Template file.
+ * doc/xml/chapter.txml: Same.
+ * doc/xml/class.txml: Same.
+
+ * doc/doxygen/guide.html: Removed, integrated into other docs.
+ * doc/doxygen/user.cfg.in: Clean up XML generation.
+ * doc/doxygen/run_doxygen: Move to..
+ * scripts/run_doxygen: ...here.
- * Makefile.in: Regenerate.
* configure: Regenerate.
- * aclocal.m4: Regenerate.
- * include/Makefile.in: Regenerate.
+ * Makefile.in: Regenerate.
+ * src/Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/Makefile.in: Regenerate.
* libmath/Makefile.in: Regenerate.
+ * include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
- * po/Makefile.in: Regenerate.
- * src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
-2007-05-24 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/gnu/c_locale.h (__convert_from_v): Only switch to the
- "C" locale if the current one isn't already "C" (for old glibcs).
- * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table,
- ctype<char>::ctype(__c_locale, const mask*, bool, size_t),
- ctype<char>::ctype(const mask*, bool, size_t)): Likewise, for generic
- locale model.
- * config/locale/gnu/messages_members.h
- (messages<>::messages(__c_locale, const char*, size_t),
- messages_byname<_CharT>::messages_byname(const char*, size_t)):
- Only dynamically allocate memory if __s != "C".
- * config/locale/gnu/time_members.h
- (__timepunct<_CharT>::__timepunct(__c_locale, const char*, size_t)):
- Likewise.
- * config/locale/generic/time_members.h
- (__timepunct<_CharT>::__timepunct(__c_locale, const char*, size_t)):
- Likewise.
-
- * testsuite/util/testsuite_allocator.h: Revert last change.
-
-2007-05-22 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/util/testsuite_allocator.h (check_new): Assign false
- to new_called.
- (check_delete): Likewise for delete_called.
-
-2007-05-21 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/gnu/c_locale.h: Do not include <cstdarg>, use builtins.
- * config/locale/generic/c_locale.h: Likewise.
-
-2007-05-21 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31621
- * acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
- * configure: Regenerate.
-
-2007-05-20 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algo.h: Shuffle the functions to better match the
- order in the standard.
-
-2007-05-17 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/gnu/c_locale.h: Do not include <libintl.h>.
- * config/locale/gnu/messages_members.h: Do it here.
-
- * config/locale/gnu/c_locale.h: Do not include <cstdio>, use
- the builtins.
- * config/locale/generic/c_locale.h: Likewise.
-
-2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Add -g to
- compile flags, move code to test to global scope.
- * configure: Regenerate.
-
-2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
- Fix dg bits.
- * testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
-
-2007-05-17 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algobase.h (mismatch): Move...
- * include/bits/stl_algo.h: ... here.
-
-2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/tr1/cmath: Guard special math with
- __GXX_EXPERIMENTAL_CXX0X__.
- * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc:
- Remove xfail.
-
-2007-05-17 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.tcc (__pad<>::_S_pad): Minor tweaks, avoid
- unnecessary casts, do widenings just in time.
-
-2007-05-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Add a function
- to the test code compiled with -ffunction-sections -fdata-sections.
- * configure: Regenerate.
-
- * testsuite/22_locale/ctype/scan/wchar_t/1.cc: Remove
- _GLIBCXX_USE_WCHAR_T guards as superfluous.
-
- * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Add
- _GLIBCXX_USE_WCHAR_T guards.
- * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Same.
-
- * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
- Add.
- * testsuite/21_strings/char_traits/typedefs/char/1.cc: Move...
- * testsuite/21_strings/char_traits/requirements/char/typedefs.cc:
- ...here.
- * testsuite/21_strings/char_traits/typedefs: Remove.
- * testsuite/21_strings/char_traits/typedefs/char: Remove.
-
-2007-05-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/html/abi.html: Update for gcc-4.1.2 and gcc-4.2.0.
-
-2007-05-14 Kaz Kojima <kkojima@gcc.gnu.org>
-
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 17_hyperg/check_nan.cc: Add -mieee for sh.
-
-2007-05-14 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/util/testsuite_io.h: Only include <ios>.
-
-2007-05-14 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/allocator.h: Do not include cpp_type_traits.h.
-
-2007-05-14 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/postypes.h (class fpos<>): Remove redundant forward
- declaration.
-
-2007-05-13 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_tempbuf.h (return_temporary_buffer(_Tp*)): Inline.
-
-2007-05-13 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/type_traitsfwd.h: Fix include guard typo.
-
-2007-05-11 Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/pod_char_traits.h (char_traits<>::move):
- Use __builtin_memmove.
- * include/bits/locale_classes.h (locale::_Impl::_M_check_same_name,
- collate_byname(const char*, size_t)): Use __builtin_strcmp.
- * include/bits/locale_facets.h: Use __builtin_mem* and
- __builtin_str* everywhere.
- * include/bits/codecvt.h (codecvt_byname(const char*, size_t)):
- Use __builtin_strcmp.
- * include/bits/char_traits.h: Use __builtin_mem* everywhere.
- * include/bits/fstream.tcc (basic_filebuf<>::underflow, imbue):
- Use __builtin_memcpy and __builtin_memmove.
- * include/bits/locale_facets_nonio.h (moneypunct_byname(const char*,
- size_t __refs)): Use __builtin_strcmp.
- * include/std/bitset (bitset<>::_M_do_reset): Use __builtin_memset.
- * config/locale/gnu/c_locale.h: Use __builtin_strlen, __builtin_strcmp,
- and __builtin_memcpy.
- * config/locale/gnu/messages_members.h: Likewise.
- * config/locale/gnu/time_members.h: Likewise.
- * config/locale/generic/c_locale.h: Likewise.
- * config/locale/generic/messages_members.h: Likewise.
- * config/locale/generic/time_members.h: Likewise.
- * config/os/gnu-linux/ctype_noninline.h: Likewise, avoid strdup.
- * config/os/tpf/ctype_noninline.h: Likewise.
- * config/locale/generic/codecvt_members.cc: Include <cstring>.
- * config/locale/generic/ctype_members.cc: Likewise.
- * config/locale/generic/collate_members.cc: Likewise.
- * config/locale/gnu/c++locale_internal.h: Likewise.
- * config/locale/darwin/ctype_members.cc: Likewise.
- * src/ctype.cc: Likewise.
- * testsuite/19_diagnostics/logic_error/what-1.cc: Likewise.
- * testsuite/19_diagnostics/logic_error/what-2.cc: Likewise.
- * testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise.
- * testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise.
- * testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise.
- * config/locale/gnu/messages_members.cc: Avoid strdup.
- * config/locale/gnu/monetary_members.cc: Likewise.
- * config/locale/gnu/time_members.cc: Likewise.
- * config/locale/gnu/time_members.cc: Likewise.
- * config/locale/generic/c_locale.cc: Likewise.
-
-2007-05-11 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/std/stdexcept: Remove extra spacing.
-
- * testsuite/19_diagnostics/stdexceptions.cc: Break into...
- * testsuite/19_diagnostics/bad_exception: ...this. Populate.
- * testsuite/19_diagnostics/logic_error: ... this.
- * testsuite/19_diagnostics/logic_error/what-1.cc: ...this.
- * testsuite/19_diagnostics/logic_error/what-2.cc: ...this.
- * testsuite/19_diagnostics/runtime_error: ...this.
- * testsuite/19_diagnostics/runtime_error/what-1.cc: ...this.
- * testsuite/19_diagnostics/runtime_error/what-2.cc: ...this.
- * testsuite/19_diagnostics/runtime_error/what-3.cc: ...this.
- * testsuite/19_diagnostics/23591_thread-1.c: Move...
- * testsuite/19_diagnostics/bad_exception/23591_thread-1.c: ...here.
-
-2007-05-10 Paolo Carlini <pcarlini@suse.de>
-
- * 27_io/objects/wchar_t/11.cc: Include <cstring>.
- * 27_io/objects/wchar_t/10.cc: Likewise.
- * 27_io/objects/wchar_t/12.cc: Likewise.
- * 27_io/basic_streambuf/sputbackc/char/9538.cc: Likewise.
- * 27_io/basic_streambuf/sgetn/char/1.cc: Likewise.
- * 27_io/basic_streambuf/overflow/char/1.cc: Likewise.
- * 27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
- * 27_io/basic_streambuf/sputn/wchar_t/1.cc: Likewise.
- * 27_io/basic_streambuf/sputn/char/1.cc: Likewise.
- * 27_io/basic_ios/cons/char/3.cc: Likewise.
- * 27_io/basic_stringbuf/setbuf/char/2.cc: Likewise.
- * 27_io/basic_stringbuf/setbuf/char/3.cc: Likewise.
- * 27_io/basic_stringbuf/setbuf/char/4.cc: Likewise.
- * 27_io/basic_istream/extractors_character/char/4.cc: Likewise.
- * 27_io/fpos/mbstate_t/1.cc: Likewise.
- * 27_io/basic_filebuf/setbuf/char/2.cc: Likewise.
- * 27_io/basic_filebuf/setbuf/char/3.cc: Likewise.
- * 25_algorithms/copy/streambuf_iterators/char/2.cc: Likewise.
- * 25_algorithms/copy/streambuf_iterators/char/4.cc: Likewise.
- * 19_diagnostics/stdexceptions.cc: Likewise.
- * 21_strings/char_traits/requirements/short/1.cc: Likewise.
- * 21_strings/basic_string/compare/char/1.cc: Likewise.
- * 21_strings/basic_string/capacity/1.cc: Likewise.
- * ext/codecvt/char-1.cc: Likewise.
- * ext/codecvt/char-2.cc: Likewise.
- * ext/codecvt/1.cc: Likewise.
- * ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
- * ext/stdio_sync_filebuf/char/1.cc: Likewise.
- * ext/stdio_filebuf/char/2.cc: Likewise.
- * ext/stdio_filebuf/char/10063-1.cc: Likewise.
- * 22_locale/ctype/narrow/char/19955.cc: Likewise.
- * 22_locale/codecvt/unshift/wchar_t/1.cc: Likewise.
- * 22_locale/codecvt/unshift/wchar_t/2.cc: Likewise.
- * 22_locale/codecvt/unshift/wchar_t/3.cc: Likewise.
- * 22_locale/codecvt/unshift/wchar_t/4.cc: Likewise.
- * 22_locale/codecvt/unshift/char/1.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/1.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/2.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/3.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/4.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/5.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/6.cc: Likewise.
- * 22_locale/codecvt/length/wchar_t/7.cc: Likewise.
- * 22_locale/codecvt/always_noconv/char/1.cc: Likewise.
- * 22_locale/codecvt/encoding/char/1.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/1.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/2.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/3.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/4.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/5.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/6.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/7.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/8.cc: Likewise.
- * 22_locale/codecvt/in/wchar_t/9.cc: Likewise.
- * 22_locale/codecvt/in/char/1.cc: Likewise.
- * 22_locale/codecvt/max_length/char/1.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/1.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/2.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/3.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/4.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/5.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/6.cc: Likewise.
- * 22_locale/codecvt/out/wchar_t/7.cc: Likewise.
- * 22_locale/codecvt/out/char/1.cc: Likewise.
- * 22_locale/locale/cons/5.cc: Likewise.
- * 22_locale/collate_byname/named_equivalence.cc: Likewise.
-
-2007-05-07 Mark Mitchell <mark@codesourcery.com>
-
- * libstdc++-v3/libsupc++/cxxabi.h (_GLIBCXX_NOTHROW): New macro.
- (__cxa_atexit): Use it.
-
- * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
- installed-tree testing, search more include directories.
-
-2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/std/type_traits (make_signed): Remove specializations
- for floating point types.
- (make_unsigned): Same.
- * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Fix.
- * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Same.
- * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Same.
-
-2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: New.
-
-2007-05-08 Jason Merrill <jason@redhat.com>
-
- * libsupc++/cxxabi-internal.h: Remove, to be replaced by...
- * libsupc++/cxxabi-forced.h: ...this new file.
- * include/ext/vstring.tcc: Include cxxabi-forced.h instead.
- * include/bits/istream.tcc: Likewise.
- * include/bits/ostream.tcc: Likewise.
- * include/bits/basic_string.tcc: Likewise.
- * include/bits/ostream_insert.h: Likewise.
- * include/bits/fstream.tcc: Likewise.
- * include/std/bitset: Likewise.
- * libsupc++/cxxabi.h: Restore previous contents.
- * Makefile.am (headers): Add cxxabi-forced.h.
- * Makefile.in: Regenerate.
-
-2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.2.
-
- * libsupc++/cxxabi-internal.h (__foreign_exception::__pure): To
- __pure_virtual.
-
-2007-05-07 Jason Merrill <jason@redhat.com>
-
- * include/bits/ostream.tcc (operator<<(char*)): Add __s.
-
- * config/abi/pre/gnu.ver: Fix symbol versions.
- * config/abi/pre/gnu-versioned-namespace.ver: Likewise.
-
-2007-05-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * config/os/mingw32/os_defines.h (NOMINMAX): Update comment.
-
-2007-05-07 Jason Merrill <jason@redhat.com>
-
- PR c++/28145
- * libsupc++/cxxabi.h (__forced_unwind, __foreign_exception):
- New classes.
- * libsupc++/eh_exception.cc: Define their destructors.
- * config/abi/pre/gnu.ver: Export their type_infos.
- * config/abi/pre/gnu-versioned-namespace.ver: Likewise.
- * libsupc++/eh_personality.cc: A handler for abi::__forced_unwind
- matches a forced unwind, and a handler for abi::__foreign_exception
- matches a foreign exception.
-
- * include/bits/istream.tcc: Rethrow forced unwind.
- * include/bits/ostream.tcc: Likewise.
- * include/bits/ostream_insert.h: Likewise.
- * include/bits/basic_string.tcc (operator>>, getline): Likewise.
- * include/bits/fstream.tcc (basic_filebuf::close): Likewise.
- * include/ext/vstring.cc (operator>>, getline): Likewise.
- * src/istream.cc: Likewise.
- * src/compatibility.cc (basic_istream::ignore): Likewise.
- * include/std/bitset (operator>>): Likewise.
- * include/std/fstream (basic_filebuf::close): Remove throw() spec.
- * libsupc++/cxxabi-internal.h: Split out from...
- * libsupc++/cxxabi.h: ...here.
-
-2007-05-07 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algobase.h: Do not include <cstring>.
- (copy(const _Tp*, const _Tp*, _Tp*), __copy_b(const _Tp*, const _Tp*,
- _Tp*)): Use __builtin_memmove.
- (__fill_aux): Use __builtin_memset.
- (equal(const _Tp*, const _Tp*, const _Tp*),
- lexicographical_compare(const unsigned char*, const unsigned char*,
- const unsigned char*, const unsigned char*)): Use __builtin_memcmp.
- * include/bits/valarray_array.h: Do not include <cstring>.
- (_Array_default_ctor<, true>::_S_do_it): Use __builtin_memset.
- (_Array_copy_ctor<, true>::_S_do_it, _Array_copier<, true>::_S_do_it):
- Use __builtin_memcpy.
- * include/ext/algorithm
- (__lexicographical_compare_3way(const unsigned char*,
- const unsigned char*, const unsigned char*, const unsigned char*)):
- Use __builtin_memcmp.
- * testsuite/23_containers/vector/requirements/dr438/
- constructor_1_neg.cc: Adjust dg-error line number.
- * testsuite/23_containers/vector/requirements/dr438/
- constructor_2_neg.cc: Likewise.
-
-2007-05-07 Mark Mitchell <mark@codesourcery.com>
-
- * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
- installed-tree testing, search more include directories.
-
- * testsuite/22_locale/num_put/put/char/14220.cc: XFAIL on Solaris
- 2.10.
- * testsuite/22_locale/num_put/put/wchar_t/14220.cc: Likewise.
-
- * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): In
- installed-tree testing, use "remote_exec host", not "remote_exec
- exec". Trip trailing newlines from output of -dumpversion and
- -dumpmachine.
-
-2007-05-07 Benjamin Kosnik <bkoz@redhat.com>
- Howard Hinnant <hhinnant@apple.com>
-
- * include/std/type_traits: (make_signed, make_unsigned): Adjust
- for enum sizes.
- * testsuite/20_util/make_unsigned/requirements/typedefs.cc: Move to...
- * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: ...here.
- * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Add,
- compile with -funsigned-char -fshort-enums.
- * testsuite/20_util/make_signed/requirements/typedefs.cc: Move to...
- * testsuite/20_util/make_signed/requirements/typedefs-1.cc: ...here.
- * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Add,
- compile with -funsigned-char -fshort-enums.
-
- * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
- Add a temporary xfail to this test for all platforms.
-
-2007-05-06 Paolo Carlini <pcarlini@suse.de>
-
- * include/std/complex: Add missing extern template declarations.
- * testsuite/26_numerics/complex/complex_inserters_extractors.cc:
- Move...
- * testsuite/26_numerics/complex/inserters_extractors/char/1.cc:
- ... here.
- * testsuite/26_numerics/complex/inserters_extractors/wchar_t/1.cc:
- New.
-
-2007-05-06 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31834
- * testsuite/17_intro/headers/c++200x/all.cc: Protect inclusion
- of C99 headers.
- * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
- Likewise.
-
-2007-05-06 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/generic/c_locale.cc: Don't use __builtin_huge_val*
- when __*_HAS_INFINITY__ is false.
-
-2007-05-04 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_raw_storage_iter.h (class raw_storage_iterator):
- Adjust template parameter name.
-
-2007-05-04 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/cxxabi.h (__cxa_atexit): Conditionalize exception
- specification on #ifdef __cplusplus.
-
-2007-05-04 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_memory.h: Rename to stl_auto_ptr.h.
- (__get_temporary_buffer, get_temporary_buffer,
- return_temporary_buffer): Move...
- * include/bits/stl_tempbuf.h: ... here.
- * include/std/memory: Adjust includes.
- * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust dg-error line
- numbers.
- * include/Makefile.am: Adjust.
- * include/Makefile.in: Regenerate.
-
- * testsuite/util/testsuite_iterators.h: Do not include the entire
- <iterator>.
- * include/bits/stl_iterator_base_types.h: Adjust includes.
- * testsuite/25_algorithms/unique_copy/2.cc: Include <functional>.
-
-2007-05-04 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/atexit_arm.cc: New file.
- * libsupc++/vec.cc (__aeabi_atexit): Remove.
- * libsupc++/cxxabi.h (__cxa_atexit): Add exception specification.
-
- * libsupc++/Makefile.am: Add atexit_arm.cc.
- * libsupc++/Makefile.in: Regenerated.
-
-2007-05-04 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_construct.h (_Destroy(_ForwardIterator,
- _ForwardIterator __last, _Allocator)): Change the last parameter
- to _Allocator&.
- * include/bits/stl_uninitialized.h (__uninitialized_copy_a,
- __uninitialized_fill_a, __uninitialized_fill_n_a,
- __uninitialized_fill_copy, __uninitialized_copy_fill,
- __uninitialized_copy_copy): Likewise.
- * include/ext/rope: Adjust everywhere.
- * include/ext/ropeimpl.h: Likewise.
-
-2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/std/type_traits (enable_if): New.
- (conditional): New.
- (__decay_selector, decay): New.
- (__cv_selector, __match_cv_qualifiers): New.
- (__make_unsigned, __make_unsigned_selector, make_unsigned): New.
- (__make_signed, __make_signed_selector, make_signed): New.
- (has_trivial_constructor): ... to has_trivial_default_constructor.
- (has_nothrow_constructor): ... to has_nothrow_default_constructor.
- (has_trivial_copy): ... to has_trivial_copy_constructor.
- (has_nothrow_copy): ... to has_nothrow_copy_constructor.
-
- * include/tr1/type_traits_fwd: Move to...
- * include/tr1/type_traitsfwd: ... this, consistency with
- ios/string/locale forward headers.
- * include/tr1/type_traits: Adjust include.
- * include/Makefile.am (tr1_headers): Change type_traits_fwd.h to
- type_traitsfwd.h.
- * include/Makefile.in: Regenerate.
-
- * testsuite/23_containers/tuple: Move...
- * testsuite/20_util/tuple:... here.
-
- * testsuite/20_util/conditional: New.
- * testsuite/20_util/conditional/requirements: Same.
- * testsuite/20_util/conditional/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/conditional/requirements/typedefs.cc: Same.
- * testsuite/20_util/decay: Same.
- * testsuite/20_util/decay/requirements: Same.
- * testsuite/20_util/decay/requirements/explicit_instantiation.cc: Same.
- * testsuite/20_util/decay/requirements/typedefs.cc: Same.
- * testsuite/20_util/enable_if: Same.
- * testsuite/20_util/enable_if/requirements: Same.
- * testsuite/20_util/enable_if/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/enable_if/requirements/typedefs.cc: Same.
- * testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Same.
- * testsuite/20_util/has_nothrow_copy_constructor: Same.
- * testsuite/20_util/has_nothrow_copy_constructor/requirements: Same.
- * testsuite/20_util/has_nothrow_copy_constructor/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/has_nothrow_copy_constructor/requirements/
- typedefs.cc: Same.
- * testsuite/20_util/has_nothrow_copy_constructor/value.cc: Same.
- * testsuite/20_util/has_nothrow_default_constructor: Same.
- * testsuite/20_util/has_nothrow_default_constructor/requirements: Same.
- * testsuite/20_util/has_nothrow_default_constructor/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/has_nothrow_default_constructor/requirements/
- typedefs.cc: Same.
- * testsuite/20_util/has_nothrow_default_constructor/value.cc: Same.
- * testsuite/20_util/has_trivial_copy_constructor: Same.
- * testsuite/20_util/has_trivial_copy_constructor/requirements: Same.
- * testsuite/20_util/has_trivial_copy_constructor/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/has_trivial_copy_constructor/requirements/
- typedefs.cc: Same.
- * testsuite/20_util/has_trivial_copy_constructor/value.cc: Same.
- * testsuite/20_util/has_trivial_default_constructor: Same.
- * testsuite/20_util/has_trivial_default_constructor/requirements: Same.
- * testsuite/20_util/has_trivial_default_constructor/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/has_trivial_default_constructor/requirements/
- typedefs.cc: Same.
- * testsuite/20_util/has_trivial_default_constructor/value.cc: Same.
- * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc: Same.
- * testsuite/20_util/make_signed: Same.
- * testsuite/20_util/make_signed/requirements: Same.
- * testsuite/20_util/make_signed/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/make_signed/requirements/typedefs.cc: Same.
- * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
- * testsuite/20_util/make_unsigned: Same.
- * testsuite/20_util/make_unsigned/requirements: Same.
- * testsuite/20_util/make_unsigned/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs.cc: Same.
- * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
-
-2007-05-02 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31777
- * include/ext/pool_allocator.h (__pool_alloc<>::allocate,
- __pool_alloc<>::deallocate): Fix _S_force_new check.
-
-2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * 23_containers/requirements/sequences/dr438/deque/*: Move to...
- * 23_containers/deque/requirements/dr438: ...here.
-
- * 23_containers/requirements/sequences/dr438/list/*: Move to...
- * 23_containers/list/requirements/dr438: ...here.
-
- * 23_containers/requirements/sequences/dr438/vector/*: Move to...
- * 23_containers/vector/requirements/dr438: ...here.
-
-2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/*/explicit_instantiations.cc: Change to...
- * testsuite/*/explicit_instantiation.cc: ... this.
-
-2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/tr1/4_metaprogramming/*/explicit_instantiations.cc: Change
- "basic_ofstream" in comment to type_traits.
-
-2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
-
- Directory layout flattening.
-
- Added in testsuite:
- * tr1/4_metaprogramming/add_const
- * tr1/4_metaprogramming/add_const/requirements
- * tr1/4_metaprogramming/add_const/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/add_const/requirements/typedefs.cc
- * tr1/4_metaprogramming/add_cv
- * tr1/4_metaprogramming/add_cv/requirements
- * tr1/4_metaprogramming/add_cv/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/add_cv/requirements/typedefs.cc
- * tr1/4_metaprogramming/add_pointer
- * tr1/4_metaprogramming/add_pointer/requirements
- * tr1/4_metaprogramming/add_pointer/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/add_pointer/requirements/typedefs.cc
- * tr1/4_metaprogramming/add_reference
- * tr1/4_metaprogramming/add_reference/requirements
- * tr1/4_metaprogramming/add_reference/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/add_reference/requirements/typedefs.cc
- * tr1/4_metaprogramming/add_volatile
- * tr1/4_metaprogramming/add_volatile/requirements
- * tr1/4_metaprogramming/add_volatile/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/add_volatile/requirements/typedefs.cc
- * tr1/4_metaprogramming/aligned_storage
- * tr1/4_metaprogramming/aligned_storage/requirements
- * tr1/4_metaprogramming/aligned_storage/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/aligned_storage/requirements/typedefs.cc
- * tr1/4_metaprogramming/alignment_of
- * tr1/4_metaprogramming/alignment_of/requirements
- * tr1/4_metaprogramming/alignment_of/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/alignment_of/requirements/typedefs.cc
- * tr1/4_metaprogramming/alignment_of/value.cc
- * tr1/4_metaprogramming/extent
- * tr1/4_metaprogramming/extent/requirements
- * tr1/4_metaprogramming/extent/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/extent/requirements/typedefs.cc
- * tr1/4_metaprogramming/extent/value.cc
- * tr1/4_metaprogramming/has_nothrow_assign
- * tr1/4_metaprogramming/has_nothrow_assign/requirements
- * tr1/4_metaprogramming/has_nothrow_assign/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/has_nothrow_assign/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_assign/value.cc
- * tr1/4_metaprogramming/has_nothrow_constructor
- * tr1/4_metaprogramming/has_nothrow_constructor/requirements
- * tr1/4_metaprogramming/has_nothrow_constructor/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/has_nothrow_constructor/
- requirements/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_constructor/value.cc
- * tr1/4_metaprogramming/has_nothrow_copy
- * tr1/4_metaprogramming/has_nothrow_copy/requirements
- * tr1/4_metaprogramming/has_nothrow_copy/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/has_nothrow_copy/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_copy/value.cc
- * tr1/4_metaprogramming/has_trivial_assign
- * tr1/4_metaprogramming/has_trivial_assign/requirements
- * tr1/4_metaprogramming/has_trivial_assign/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/has_trivial_assign/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_assign/value.cc
- * tr1/4_metaprogramming/has_trivial_constructor
- * tr1/4_metaprogramming/has_trivial_constructor/requirements
- * tr1/4_metaprogramming/has_trivial_constructor/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/has_trivial_constructor/
- requirements/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_constructor/value.cc
- * tr1/4_metaprogramming/has_trivial_copy
- * tr1/4_metaprogramming/has_trivial_copy/requirements
- * tr1/4_metaprogramming/has_trivial_copy/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/has_trivial_copy/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_copy/value.cc
- * tr1/4_metaprogramming/has_trivial_destructor
- * tr1/4_metaprogramming/has_trivial_destructor/requirements
- * tr1/4_metaprogramming/has_trivial_destructor/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/has_trivial_destructor/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_destructor/value.cc
- * tr1/4_metaprogramming/has_virtual_destructor
- * tr1/4_metaprogramming/has_virtual_destructor/requirements
- * tr1/4_metaprogramming/has_virtual_destructor/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/has_virtual_destructor/requirements/typedefs.cc
- * tr1/4_metaprogramming/has_virtual_destructor/value.cc
- * tr1/4_metaprogramming/integral_constant
- * tr1/4_metaprogramming/integral_constant/requirements
- * tr1/4_metaprogramming/integral_constant/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/integral_constant/requirements/typedefs.cc
- * tr1/4_metaprogramming/integral_constant/true_false_value.cc
- * tr1/4_metaprogramming/is_abstract
- * tr1/4_metaprogramming/is_abstract/requirements
- * tr1/4_metaprogramming/is_abstract/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_abstract/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_abstract/value.cc
- * tr1/4_metaprogramming/is_arithmetic
- * tr1/4_metaprogramming/is_arithmetic/requirements
- * tr1/4_metaprogramming/is_arithmetic/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_arithmetic/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_arithmetic/value.cc
- * tr1/4_metaprogramming/is_array
- * tr1/4_metaprogramming/is_array/requirements
- * tr1/4_metaprogramming/is_array/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_array/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_array/value.cc
- * tr1/4_metaprogramming/is_base_of
- * tr1/4_metaprogramming/is_base_of/requirements
- * tr1/4_metaprogramming/is_base_of/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_base_of/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_base_of/value.cc
- * tr1/4_metaprogramming/is_class
- * tr1/4_metaprogramming/is_class/requirements
- * tr1/4_metaprogramming/is_class/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_class/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_class/value.cc
- * tr1/4_metaprogramming/is_compound
- * tr1/4_metaprogramming/is_compound/requirements
- * tr1/4_metaprogramming/is_compound/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_compound/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_compound/value.cc
- * tr1/4_metaprogramming/is_const
- * tr1/4_metaprogramming/is_const/requirements
- * tr1/4_metaprogramming/is_const/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_const/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_const/value.cc
- * tr1/4_metaprogramming/is_convertible
- * tr1/4_metaprogramming/is_convertible/requirements
- * tr1/4_metaprogramming/is_convertible/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_convertible/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_convertible/value.cc
- * tr1/4_metaprogramming/is_empty
- * tr1/4_metaprogramming/is_empty/requirements
- * tr1/4_metaprogramming/is_empty/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_empty/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_empty/value.cc
- * tr1/4_metaprogramming/is_enum
- * tr1/4_metaprogramming/is_enum/requirements
- * tr1/4_metaprogramming/is_enum/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_enum/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_enum/value.cc
- * tr1/4_metaprogramming/is_floating_point
- * tr1/4_metaprogramming/is_floating_point/requirements
- * tr1/4_metaprogramming/is_floating_point/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_floating_point/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_floating_point/value.cc
- * tr1/4_metaprogramming/is_function
- * tr1/4_metaprogramming/is_function/requirements
- * tr1/4_metaprogramming/is_function/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_function/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_function/value.cc
- * tr1/4_metaprogramming/is_fundamental
- * tr1/4_metaprogramming/is_fundamental/requirements
- * tr1/4_metaprogramming/is_fundamental/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_fundamental/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_fundamental/value.cc
- * tr1/4_metaprogramming/is_integral
- * tr1/4_metaprogramming/is_integral/requirements
- * tr1/4_metaprogramming/is_integral/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_integral/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_integral/value.cc
- * tr1/4_metaprogramming/is_member_function_pointer
- * tr1/4_metaprogramming/is_member_function_pointer/requirements
- * tr1/4_metaprogramming/is_member_function_pointer/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_member_function_pointer/
- requirements/typedefs.cc
- * tr1/4_metaprogramming/is_member_function_pointer/value.cc
- * tr1/4_metaprogramming/is_member_object_pointer
- * tr1/4_metaprogramming/is_member_object_pointer/requirements
- * tr1/4_metaprogramming/is_member_object_pointer/
- requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_member_object_pointer/
- requirements/typedefs.cc
- * tr1/4_metaprogramming/is_member_object_pointer/value.cc
- * tr1/4_metaprogramming/is_member_pointer
- * tr1/4_metaprogramming/is_member_pointer/requirements
- * tr1/4_metaprogramming/is_member_pointer/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_member_pointer/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_member_pointer/value.cc
- * tr1/4_metaprogramming/is_object
- * tr1/4_metaprogramming/is_object/requirements
- * tr1/4_metaprogramming/is_object/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_object/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_object/value.cc
- * tr1/4_metaprogramming/is_pod
- * tr1/4_metaprogramming/is_pod/requirements
- * tr1/4_metaprogramming/is_pod/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_pod/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_pod/value.cc
- * tr1/4_metaprogramming/is_pointer
- * tr1/4_metaprogramming/is_pointer/requirements
- * tr1/4_metaprogramming/is_pointer/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_pointer/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_pointer/value.cc
- * tr1/4_metaprogramming/is_polymorphic
- * tr1/4_metaprogramming/is_polymorphic/requirements
- * tr1/4_metaprogramming/is_polymorphic/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_polymorphic/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_polymorphic/value.cc
- * tr1/4_metaprogramming/is_reference
- * tr1/4_metaprogramming/is_reference/requirements
- * tr1/4_metaprogramming/is_reference/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_reference/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_reference/value.cc
- * tr1/4_metaprogramming/is_same
- * tr1/4_metaprogramming/is_same/requirements
- * tr1/4_metaprogramming/is_same/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_same/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_same/value.cc
- * tr1/4_metaprogramming/is_scalar
- * tr1/4_metaprogramming/is_scalar/requirements
- * tr1/4_metaprogramming/is_scalar/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_scalar/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_scalar/value.cc
- * tr1/4_metaprogramming/is_signed
- * tr1/4_metaprogramming/is_signed/requirements
- * tr1/4_metaprogramming/is_signed/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_signed/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_signed/value.cc
- * tr1/4_metaprogramming/is_union
- * tr1/4_metaprogramming/is_union/requirements
- * tr1/4_metaprogramming/is_union/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_union/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_union/value.cc
- * tr1/4_metaprogramming/is_unsigned
- * tr1/4_metaprogramming/is_unsigned/requirements
- * tr1/4_metaprogramming/is_unsigned/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_unsigned/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_unsigned/value.cc
- * tr1/4_metaprogramming/is_void
- * tr1/4_metaprogramming/is_void/requirements
- * tr1/4_metaprogramming/is_void/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/is_void/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_void/value.cc
- * tr1/4_metaprogramming/is_volatile
- * tr1/4_metaprogramming/is_volatile/requirements
- * tr1/4_metaprogramming/is_volatile/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/is_volatile/requirements/typedefs.cc
- * tr1/4_metaprogramming/is_volatile/value.cc
- * tr1/4_metaprogramming/rank
- * tr1/4_metaprogramming/rank/requirements
- * tr1/4_metaprogramming/rank/requirements/explicit_instantiations.cc
- * tr1/4_metaprogramming/rank/requirements/typedefs.cc
- * tr1/4_metaprogramming/rank/value.cc
- * tr1/4_metaprogramming/remove_all_extents
- * tr1/4_metaprogramming/remove_all_extents/requirements
- * tr1/4_metaprogramming/remove_all_extents/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_all_extents/value.cc
- * tr1/4_metaprogramming/remove_const
- * tr1/4_metaprogramming/remove_const/requirements
- * tr1/4_metaprogramming/remove_const/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_const/value.cc
- * tr1/4_metaprogramming/remove_cv
- * tr1/4_metaprogramming/remove_cv/requirements
- * tr1/4_metaprogramming/remove_cv/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_cv/value.cc
- * tr1/4_metaprogramming/remove_extent
- * tr1/4_metaprogramming/remove_extent/requirements
- * tr1/4_metaprogramming/remove_extent/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_extent/value.cc
- * tr1/4_metaprogramming/remove_pointer
- * tr1/4_metaprogramming/remove_pointer/requirements
- * tr1/4_metaprogramming/remove_pointer/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_pointer/value.cc
- * tr1/4_metaprogramming/remove_reference
- * tr1/4_metaprogramming/remove_reference/requirements
- * tr1/4_metaprogramming/remove_reference/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_reference/value.cc
- * tr1/4_metaprogramming/remove_volatile
- * tr1/4_metaprogramming/remove_volatile/requirements
- * tr1/4_metaprogramming/remove_volatile/requirements/
- explicit_instantiations.cc
- * tr1/4_metaprogramming/remove_volatile/value.cc
-
- Deleted in testsuite:
- * tr1/4_metaprogramming/alignment_of/alignment_of.cc
- * tr1/4_metaprogramming/alignment_of/typedefs.cc
- * tr1/4_metaprogramming/array_modifications
- * tr1/4_metaprogramming/array_modifications/remove_all_extents.cc
- * tr1/4_metaprogramming/array_modifications/remove_extent.cc
- * tr1/4_metaprogramming/composite_type_traits
- * tr1/4_metaprogramming/composite_type_traits/is_arithmetic
- * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/
- is_arithmetic.cc
- * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/typedefs.cc
- * tr1/4_metaprogramming/composite_type_traits/is_compound
- * tr1/4_metaprogramming/composite_type_traits/is_compound/
- is_compound.cc
- * tr1/4_metaprogramming/composite_type_traits/is_compound/typedefs.cc
- * tr1/4_metaprogramming/composite_type_traits/is_fundamental
- * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
- is_fundamental.cc
- * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
- typedefs.cc
- * tr1/4_metaprogramming/composite_type_traits/is_member_pointer
- * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
- is_member_pointer.cc
- * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
- typedefs.cc
- * tr1/4_metaprogramming/composite_type_traits/is_object
- * tr1/4_metaprogramming/composite_type_traits/is_object/24808.cc
- * tr1/4_metaprogramming/composite_type_traits/is_object/is_object.cc
- * tr1/4_metaprogramming/composite_type_traits/is_object/typedefs.cc
- * tr1/4_metaprogramming/composite_type_traits/is_scalar
- * tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc
- * tr1/4_metaprogramming/composite_type_traits/is_scalar/typedefs.cc
- * tr1/4_metaprogramming/const_volatile_modifications
- * tr1/4_metaprogramming/const_volatile_modifications/add_const.cc
- * tr1/4_metaprogramming/const_volatile_modifications/add_cv.cc
- * tr1/4_metaprogramming/const_volatile_modifications/add_volatile.cc
- * tr1/4_metaprogramming/const_volatile_modifications/remove_const.cc
- * tr1/4_metaprogramming/const_volatile_modifications/remove_cv.cc
- * tr1/4_metaprogramming/const_volatile_modifications/remove_volatile.cc
- * tr1/4_metaprogramming/extent/extent.cc
- * tr1/4_metaprogramming/extent/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_assign/has_nothrow_assign.cc
- * tr1/4_metaprogramming/has_nothrow_assign/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_constructor/
- has_nothrow_constructor.cc
- * tr1/4_metaprogramming/has_nothrow_constructor/typedefs.cc
- * tr1/4_metaprogramming/has_nothrow_copy/has_nothrow_copy.cc
- * tr1/4_metaprogramming/has_nothrow_copy/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_assign/has_trivial_assign.cc
- * tr1/4_metaprogramming/has_trivial_assign/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_constructor/
- has_trivial_constructor.cc
- * tr1/4_metaprogramming/has_trivial_constructor/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_copy/has_trivial_copy.cc
- * tr1/4_metaprogramming/has_trivial_copy/typedefs.cc
- * tr1/4_metaprogramming/has_trivial_destructor/
- has_trivial_destructor.cc
- * tr1/4_metaprogramming/has_trivial_destructor/typedefs.cc
- * tr1/4_metaprogramming/has_virtual_destructor/
- has_virtual_destructor.cc
- * tr1/4_metaprogramming/has_virtual_destructor/typedefs.cc
- * tr1/4_metaprogramming/helper_classes
- * tr1/4_metaprogramming/helper_classes/static_definition.cc
- * tr1/4_metaprogramming/helper_classes/true_false_type.cc
- * tr1/4_metaprogramming/helper_classes/true_false_type_typedefs.cc
- * tr1/4_metaprogramming/helper_classes/typedefs.cc
- * tr1/4_metaprogramming/integral_constant/true_false_type.cc
- * tr1/4_metaprogramming/integral_constant/typedefs.cc
- * tr1/4_metaprogramming/is_abstract/is_abstract.cc
- * tr1/4_metaprogramming/is_abstract/typedefs.cc
- * tr1/4_metaprogramming/is_arithmetic/is_arithmetic.cc
- * tr1/4_metaprogramming/is_arithmetic/typedefs.cc
- * tr1/4_metaprogramming/is_array/is_array.cc
- * tr1/4_metaprogramming/is_array/typedefs.cc
- * tr1/4_metaprogramming/is_base_of/is_base_of.cc
- * tr1/4_metaprogramming/is_base_of/typedefs.cc
- * tr1/4_metaprogramming/is_class/is_class.cc
- * tr1/4_metaprogramming/is_class/typedefs.cc
- * tr1/4_metaprogramming/is_compound/is_compound.cc
- * tr1/4_metaprogramming/is_compound/typedefs.cc
- * tr1/4_metaprogramming/is_const/is_const.cc
- * tr1/4_metaprogramming/is_const/typedefs.cc
- * tr1/4_metaprogramming/is_convertible/is_convertible.cc
- * tr1/4_metaprogramming/is_convertible/typedefs.cc
- * tr1/4_metaprogramming/is_empty/is_empty.cc
- * tr1/4_metaprogramming/is_empty/typedefs.cc
- * tr1/4_metaprogramming/is_enum/is_enum.cc
- * tr1/4_metaprogramming/is_enum/typedefs.cc
- * tr1/4_metaprogramming/is_floating_point/is_floating_point.cc
- * tr1/4_metaprogramming/is_floating_point/typedefs.cc
- * tr1/4_metaprogramming/is_function/is_function.cc
- * tr1/4_metaprogramming/is_function/typedefs.cc
- * tr1/4_metaprogramming/is_fundamental/is_fundamental.cc
- * tr1/4_metaprogramming/is_fundamental/typedefs.cc
- * tr1/4_metaprogramming/is_integral/is_integral.cc
- * tr1/4_metaprogramming/is_integral/typedefs.cc
- * tr1/4_metaprogramming/is_member_function_pointer/
- is_member_function_pointer.cc
- * tr1/4_metaprogramming/is_member_function_pointer/typedefs.cc
- * tr1/4_metaprogramming/is_member_object_pointer/
- is_member_object_pointer.cc
- * tr1/4_metaprogramming/is_member_object_pointer/typedefs.cc
- * tr1/4_metaprogramming/is_member_pointer/is_member_pointer.cc
- * tr1/4_metaprogramming/is_member_pointer/typedefs.cc
- * tr1/4_metaprogramming/is_object/is_object.cc
- * tr1/4_metaprogramming/is_object/typedefs.cc
- * tr1/4_metaprogramming/is_pod/is_pod.cc
- * tr1/4_metaprogramming/is_pod/typedefs.cc
- * tr1/4_metaprogramming/is_pointer/is_pointer.cc
- * tr1/4_metaprogramming/is_pointer/typedefs.cc
- * tr1/4_metaprogramming/is_polymorphic/is_polymorphic.cc
- * tr1/4_metaprogramming/is_polymorphic/typedefs.cc
- * tr1/4_metaprogramming/is_reference/is_reference.cc
- * tr1/4_metaprogramming/is_reference/typedefs.cc
- * tr1/4_metaprogramming/is_same/is_same.cc
- * tr1/4_metaprogramming/is_same/typedefs.cc
- * tr1/4_metaprogramming/is_scalar/is_scalar.cc
- * tr1/4_metaprogramming/is_scalar/typedefs.cc
- * tr1/4_metaprogramming/is_signed/is_signed.cc
- * tr1/4_metaprogramming/is_signed/typedefs.cc
- * tr1/4_metaprogramming/is_union/is_union.cc
- * tr1/4_metaprogramming/is_union/typedefs.cc
- * tr1/4_metaprogramming/is_unsigned/is_unsigned.cc
- * tr1/4_metaprogramming/is_unsigned/typedefs.cc
- * tr1/4_metaprogramming/is_void/is_void.cc
- * tr1/4_metaprogramming/is_void/typedefs.cc
- * tr1/4_metaprogramming/is_volatile/is_volatile.cc
- * tr1/4_metaprogramming/is_volatile/typedefs.cc
- * tr1/4_metaprogramming/other_transformations
- * tr1/4_metaprogramming/other_transformations/aligned_storage
- * tr1/4_metaprogramming/other_transformations/aligned_storage/
- aligned_storage.cc
- * tr1/4_metaprogramming/other_transformations/aligned_storage/
- typedefs.cc
- * tr1/4_metaprogramming/pointer_modifications
- * tr1/4_metaprogramming/pointer_modifications/add_pointer.cc
- * tr1/4_metaprogramming/pointer_modifications/remove_pointer.cc
- * tr1/4_metaprogramming/primary_type_categories
- * tr1/4_metaprogramming/primary_type_categories/is_array
- * tr1/4_metaprogramming/primary_type_categories/is_array/is_array.cc
- * tr1/4_metaprogramming/primary_type_categories/is_array/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_class
- * tr1/4_metaprogramming/primary_type_categories/is_class/is_class.cc
- * tr1/4_metaprogramming/primary_type_categories/is_class/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_enum
- * tr1/4_metaprogramming/primary_type_categories/is_enum/24808.cc
- * tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc
- * tr1/4_metaprogramming/primary_type_categories/is_enum/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_floating_point
- * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
- is_floating_point.cc
- * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
- typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_function
- * tr1/4_metaprogramming/primary_type_categories/is_function/24808.cc
- * tr1/4_metaprogramming/primary_type_categories/is_function/
- is_function.cc
- * tr1/4_metaprogramming/primary_type_categories/is_function/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_integral
- * tr1/4_metaprogramming/primary_type_categories/is_integral/
- is_integral.cc
- * tr1/4_metaprogramming/primary_type_categories/is_integral/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_function_pointer
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_function_pointer/is_member_function_pointer.cc
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_function_pointer/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_object_pointer
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_object_pointer/is_member_object_pointer.cc
- * tr1/4_metaprogramming/primary_type_categories/
- is_member_object_pointer/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_pointer
- * tr1/4_metaprogramming/primary_type_categories/is_pointer/
- is_pointer.cc
- * tr1/4_metaprogramming/primary_type_categories/is_pointer/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_reference
- * tr1/4_metaprogramming/primary_type_categories/is_reference/
- is_reference.cc
- * tr1/4_metaprogramming/primary_type_categories/is_reference/
- typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_union
- * tr1/4_metaprogramming/primary_type_categories/is_union/is_union.cc
- * tr1/4_metaprogramming/primary_type_categories/is_union/typedefs.cc
- * tr1/4_metaprogramming/primary_type_categories/is_void
- * tr1/4_metaprogramming/primary_type_categories/is_void/is_void.cc
- * tr1/4_metaprogramming/primary_type_categories/is_void/typedefs.cc
- * tr1/4_metaprogramming/rank/rank.cc
- * tr1/4_metaprogramming/rank/typedefs.cc
- * tr1/4_metaprogramming/reference_modifications/add_reference.cc
- * tr1/4_metaprogramming/reference_modifications/remove_reference.cc
- * tr1/4_metaprogramming/relationships_between_types
- * tr1/4_metaprogramming/relationships_between_types/is_base_of
- * tr1/4_metaprogramming/relationships_between_types/is_base_of/
- is_base_of.cc
- * tr1/4_metaprogramming/relationships_between_types/is_base_of/
- typedefs.cc
- * tr1/4_metaprogramming/relationships_between_types/is_convertible
- * tr1/4_metaprogramming/relationships_between_types/is_convertible/
- is_convertible.cc
- * tr1/4_metaprogramming/relationships_between_types/is_convertible/
- typedefs.cc
- * tr1/4_metaprogramming/relationships_between_types/is_same
- * tr1/4_metaprogramming/relationships_between_types/is_same/is_same.cc
- * tr1/4_metaprogramming/relationships_between_types/is_same/typedefs.cc
- * tr1/4_metaprogramming/type_properties
- * tr1/4_metaprogramming/type_properties/alignment_of
- * tr1/4_metaprogramming/type_properties/alignment_of/alignment_of.cc
- * tr1/4_metaprogramming/type_properties/alignment_of/typedefs.cc
- * tr1/4_metaprogramming/type_properties/extent
- * tr1/4_metaprogramming/type_properties/extent/extent.cc
- * tr1/4_metaprogramming/type_properties/extent/typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_assign
- * tr1/4_metaprogramming/type_properties/has_nothrow_assign/
- has_nothrow_assign.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_assign/typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_constructor
- * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
- has_nothrow_constructor.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
- typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_copy
- * tr1/4_metaprogramming/type_properties/has_nothrow_copy/
- has_nothrow_copy.cc
- * tr1/4_metaprogramming/type_properties/has_nothrow_copy/typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_assign
- * tr1/4_metaprogramming/type_properties/has_trivial_assign/
- has_trivial_assign.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_assign/typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_constructor
- * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
- has_trivial_constructor.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
- typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_copy
- * tr1/4_metaprogramming/type_properties/has_trivial_copy/
- has_trivial_copy.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_copy/typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_destructor
- * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
- has_trivial_destructor.cc
- * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
- typedefs.cc
- * tr1/4_metaprogramming/type_properties/has_virtual_destructor
- * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
- has_virtual_destructor.cc
- * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
- typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_abstract
- * tr1/4_metaprogramming/type_properties/is_abstract/is_abstract.cc
- * tr1/4_metaprogramming/type_properties/is_abstract/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_const
- * tr1/4_metaprogramming/type_properties/is_const/is_const.cc
- * tr1/4_metaprogramming/type_properties/is_const/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_empty
- * tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc
- * tr1/4_metaprogramming/type_properties/is_empty/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_pod
- * tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc
- * tr1/4_metaprogramming/type_properties/is_pod/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_polymorphic
- * tr1/4_metaprogramming/type_properties/is_polymorphic/24809.cc
- * tr1/4_metaprogramming/type_properties/is_polymorphic/
- is_polymorphic.cc
- * tr1/4_metaprogramming/type_properties/is_polymorphic/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_signed
- * tr1/4_metaprogramming/type_properties/is_signed/is_signed.cc
- * tr1/4_metaprogramming/type_properties/is_signed/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_unsigned
- * tr1/4_metaprogramming/type_properties/is_unsigned/is_unsigned.cc
- * tr1/4_metaprogramming/type_properties/is_unsigned/typedefs.cc
- * tr1/4_metaprogramming/type_properties/is_volatile
- * tr1/4_metaprogramming/type_properties/is_volatile/is_volatile.cc
- * tr1/4_metaprogramming/type_properties/is_volatile/typedefs.cc
- * tr1/4_metaprogramming/type_properties/rank
- * tr1/4_metaprogramming/type_properties/rank/rank.cc
- * tr1/4_metaprogramming/type_properties/rank/typedefs.cc
-
-2007-04-30 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Correct
- regexp to filter out -nostdinc++.
-
-2007-04-30 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/30449 (equal)
- * include/bits/stl_algobase.h (struct __niter_base): Add.
- (copy(_II, _II, _OI), copy_backward(_BI1, _BI1, _BI2),
- fill(_ForwardIterator, _ForwardIterator, const _Tp&),
- fill_n(_OI, _Size, const _Tp&), equal(_II1, _II1, _II2)):
- Use it.
- (struct __copy_normal, __copy_backward_normal,
- struct __fill_normal, struct __fill_n_normal): Remove.
- (struct __equal, struct __equal_aux): Add.
- * include/bits/stl_iterator.h: Add _Iterator_type typedef.
-
- * include/bits/stl_algobase.h (__fill_aux(wchar_t*,
- wchar_t*, wchar_t), __fill_n_aux(wchar_t*, _Size, wchar_t)):
- Remove.
-
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- constructor_1_neg.cc: Adjust dg-error line number.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- constructor_2_neg.cc: Likewise.
-
-2007-04-30 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/type_traits (is_pod): Use __is_pod.
- * testsuite/tr1/4_metaprogramming/type_properties/
- has_trivial_destructor/has_trivial_destructor.cc: Adjust.
- * testsuite/tr1/4_metaprogramming/type_properties/
- has_nothrow_constructor/has_nothrow_constructor.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/type_properties/
- has_trivial_constructor/has_trivial_constructor.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/type_properties/
- is_pod/is_pod.cc: Likewise.
-
-2007-04-29 Paolo Carlini <pcarlini@suse.de>
+2008-02-10 Paolo Carlini <pcarlini@suse.de>
- * include/bits/localefwd.h: Remove redundant inline qualifiers.
- (__check_facet): Move...
- * include/bits/basic_ios.h: ... here.
- (widen(char), narrow(char_type, char)): Define inline.
- * include/bits/basic_ios.tcc (widen(char), narrow(char_type, char)):
- Remove.
+ PR libstdc++/16251
+ * include/std/istream (basic_istream<>::basic_istream()): Call
+ this->init().
+ (basic_iostream<>::basic_iostream(basic_streambuf<>*)): Don't
+ do it here, per 27.6.1.5.1/1.
+ * include/std/ostream (basic_ostream<>::basic_ostream()): Call
+ this->init().
+ * testsuite/27_io/basic_iostream/cons/16251.C: New.
-2007-04-27 Paolo Carlini <pcarlini@suse.de>
+ * testsuite/27_io/basic_iostream/cons/2020.cc: Minor tweaks.
- DR 438, [DR].
- * include/bits/basic_string.h (_S_construct_aux(_InIterator,
- _InIterator, const _Alloc&, __true_type)): Do not cast the
- second argument.
- * include/ext/rc_string_base.h (_S_construct_aux(_Integer,
- _Integer, const _Alloc&, std::__true_type)): Likewise.
- * include/ext/sso_string_base.h (_M_construct_aux(_InIterator,
- _InIterator, std::__true_type)): Likewise.
- * include/bits/stl_deque.h (_M_initialize_dispatch(_Integer,
- _Integer, __true_type)): Cast the first argument.
- (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
- not cast the arguments.
- (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
- Likewise.
- * include/bits/stl_list.h (_M_initialize_dispatch(_Integer,
- _Integer, __true_type)): Likewise.
- (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
- not cast both arguments.
- * include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer,
- _Integer, __true_type)): Cast the first argument.
- (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
- cast the arguments.
- * include/bits/stl_vector.h (_M_initialize_dispatch(_Integer,
- _Integer, __true_type)): Cast the first argument.
- (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
- cast the arguments.
- (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
- Likewise.
- * testsuite/21_strings/basic_string/requirements/dr438/
- constructor.cc: New.
- * testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/deque/
- assign_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/deque/
- constructor.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/deque/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/deque/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/deque/
- insert_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/list/
- assign_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/list/
- constructor.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/list/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/list/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/list/
- insert_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- assign_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- constructor.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- constructor_1_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- insert_neg.cc: Likewise.
- * testsuite/23_containers/requirements/sequences/dr438/vector/
- bool/constructor.cc: Likewise.
- * docs/html/ext/howto.html: Add an entry for DR 438.
+2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-2007-04-25 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_classes.h: Remove redundant inline specifiers.
- * include/bits/ios_base.h: Likewise.
- * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error line
- numbers.
- * testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
-
-2007-04-24 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.h (class collate, class collate_byname):
- Move...
- * include/bits/locale_classes.h: ... here.
- * include/bits/locale_facets.tcc (locale::combine, locale::operator(),
- has_facet, use_facet, collate::_M_compare, collate::_M_transform,
- collate::do_compare, collate::do_transform, collate::do_hash): Move...
- * include/bits/locale_classes.tcc: ... here, new.
- * include/Makefile.am: Add.
- * testsuite/util/testsuite_abi.h: Include <locale>.
- * include/std/locale: Tweak.
- * include/std/istream: Likewise.
- * include/std/ostream: Likewise.
+ * include/backward/auto_ptr.h: Fix comment typos.
+ * include/bits/algorithmfwd.h: Likewise.
+ * include/bits/basic_ios.h: Likewise.
+ * include/bits/c++config: Likewise.
+ * include/bits/char_traits.h: Likewise.
* include/bits/codecvt.h: Likewise.
- * include/Makefile.in: Regenerate.
-
- * include/bits/codecvt.h: Adjust extern template declarations.
- * include/bits/ostream_insert.h: Likewise.
- * include/bits/ostream.tcc: Likewise.
-
- * include/bits/locale_facets.h: Do not include <bits/codecvt.h>.
- * include/std/fstream: Do it here.
- * include/bits/locale_facets_nonio.h: Likewise.
-
-2007-04-23 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.h (class time_base,
- struct __timepunct_cache, class __timepunct, class time_get,
- class time_get_byname, class time_put, class time_put_byname,
- class money_base, struct __moneypunct_cache, class moneypunct,
- class moneypunct_byname, class money_get, class money_put,
- struct messages_base, class messages, class messages_byname): Move...
- * include/bits/locale_facets_nonio.h: ... here.
- * include/bits/locale_facets.tcc
- (struct __use_cache<__moneypunct_cache<> >,
- __moneypunct_cache<>::_M_cache, money_get<>::_M_extract,
- money_get<>::__do_get, money_get<>::do_get, money_put<>::_M_insert,
- money_put<>::__do_put, money_put<>::do_put, time_get<>::do_date_order,
- time_get<>::_M_extract_via_format, time_get<>::_M_extract_num,
- time_get<>::_M_extract_name, time_get<>::do_get_time,
- time_get<>::do_get_date, time_get<>::do_get_weekday,
- time_get<>::do_get_monthname, time_get<>::do_get_year, time_put<>::put,
- time_put<>::do_put): Move...
- * include/bits/locale_facets_nonio.tcc: ... here.
- * include/Makefile.am: Add.
- * include/std/locale: Adjust includes.
+ * include/bits/gslice.h: Likewise.
+ * include/bits/ios_base.h: Likewise.
+ * include/bits/locale_facets.h: Likewise.
+ * include/bits/locale_facets_nonio.tcc: Likewise.
+ * include/bits/postypes.h: Likewise.
+ * include/bits/sstream.tcc: Likewise.
+ * include/bits/stl_algo.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_iterator.h: Likewise.
+ * include/bits/stl_iterator_base_types.h Likewise.
+ * include/bits/stl_list.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/bits/valarray_array.h: Likewise.
+ * include/debug/safe_base.h: Likewise.
+ * include/ext/bitmap_allocator.h: Likewise.
+ * include/ext/codecvt_specializations.h Likewise.
+ * include/ext/mt_allocator.h: Likewise.
+ * include/ext/rc_string_base.h: Likewise.
+ * include/ext/rope: Likewise.
+ * include/parallel/checkers.h: Likewise.
+ * include/parallel/find.h: Likewise.
+ * include/parallel/multiseq_selection.h: Likewise.
+ * include/parallel/partition.h: Likewise.
+ * include/parallel/settings.h: Likewise.
+ * include/std/bitset: Likewise.
+ * include/std/complex: Likewise.
* include/std/fstream: Likewise.
* include/std/istream: Likewise.
+ * include/std/limits: Likewise.
* include/std/ostream: Likewise.
- * include/Makefile.in: Regenerate.
-
-2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
-
- * scripts/testsuite_flags.in: Add --build-cc option.
- * testsuite/lib/libstdc++.exp (libstdc++_init): Set cc. Fix typo
- in previous change.
- (v3_target_compile_as_c): Use cc.
-
-2007-04-22 Mark Mitchell <mark@codesourcery.com>
-
- * testsuite/lib/libstdc++.exp (libstdc++_init): Use the same flags
- for remote host testing we use for local host testing. Copy all
- testsuite headers to the remote host
- (v3_target_compile_as_c): Use remote_exec, not just exec.
-
-2007-04-22 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/functional: Formatting fixes.
-
-2007-04-22 Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/concurrence.h: Do not include <cstdlib>, use
- __builtin_abort.
- * include/debug/debug.h: Likewise.
- * include/tr1/memory: Likewise.
- * include/tr1/boost_shared_ptr.h: Likewise.
- * include/tr1/functional: Likewise.
-
-2007-04-22 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.tcc: Do not include <typeinfo>.
- * testsuite/27_io/basic_ios/imbue/14072.cc: Do it here.
- * testsuite/27_io/basic_ios/cons/char/3.cc: Likewise.
- * testsuite/27_io/basic_istream/sentry/pod/1.cc: Likewise.
- * testsuite/27_io/basic_ostream/sentry/pod/1.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- pod/10081-in.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- pod/10081-out.cc: Likewise.
- * testsuite/22_locale/locale/cons/2.cc: Likewise.
- * testsuite/22_locale/locale/cons/unicode.cc: Likewise.
- * testsuite/22_locale/numpunct/members/pod/2.cc: Likewise.
- * testsuite/22_locale/global_templates/1.cc: Likewise.
-
-2007-04-19 Joseph Myers <joseph@codesourcery.com>
-
- * configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
- for long double compatibility.
- * configure: Regenerate.
- * src/complex_io.cc, src/istream-inst.cc, src/ostream-inst.cc:
- Condition some _GLIBCXX_LDBL_COMPAT calls on _GLIBCXX_USE_WCHAR_T.
-
-2007-04-14 Steve Ellcey <sje@cup.hp.com>
-
- * configure.ac: Change how LIBSUPCXX_PICFLAGS is set.
- * configure: Regenerate.
-
-2007-04-14 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/generic/c_locale.cc: Include <limits>.
-
-2007-04-13 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31556
- * include/bits/stl_algobase.h (equal(_InputIterator1, _InputIterator1,
- _InputIterator2, _BinaryPredicate), mismatch(_InputIterator1,
- _InputIterator1, _InputIterator2, _BinaryPredicate)): Convert
- predicate return to bool.
- * include/bits/stl_algo.h (__find_if(_InputIterator, _InputIterator,
- _Predicate, input_iterator_tag), search(_ForwardIterator1,
- _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
- _BinaryPredicate), __search_n(_ForwardIterator, _ForwardIterator,
- _Integer, const _Tp&, _BinaryPredicate, std::forward_iterator_tag),
- __search_n(_RandomAccessIter, _RandomAccessIter, _Integer, const _Tp&,
- _BinaryPredicate, std::random_access_iterator_tag),
- search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
- _BinaryPredicate), remove_copy_if(_InputIterator, _InputIterator,
- _OutputIterator, _Predicate), __unique_copy(_ForwardIterator,
- _ForwardIterator, _OutputIterator, _BinaryPredicate,
- forward_iterator_tag, output_iterator_tag),
- __unique_copy(_InputIterator, _InputIterator, _OutputIterator,
- _BinaryPredicate, input_iterator_tag, output_iterator_tag),
- __unique_copy(_InputIterator, _InputIterator, _OutputIterator,
- _BinaryPredicate, input_iterator_tag, output_iterator_tag),
- __unique_copy(_InputIterator, _InputIterator, _ForwardIterator,
- _BinaryPredicate, input_iterator_tag, forward_iterator_tag),
- unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate),
- __partition(_BidirectionalIterator, _BidirectionalIterator, _Predicate,
- bidirectional_iterator_tag), binary_search(_ForwardIterator,
- _ForwardIterator, const _Tp&, _Compare),
- next_permutation(_BidirectionalIterator, _BidirectionalIterator,
- _Compare), prev_permutation(_BidirectionalIterator,
- _BidirectionalIterator, _Compare)): Likewise.
-
-2007-04-13 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31554
- * include/bits/stl_algo.h (stable_partition): Convert __buf.size()
- to _DistanceType.
-
-2007-04-13 Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/numeric_traits.h: Do not include <limits>.
- (__numeric_traits_integer::__is_signed, __digits): Add.
- (__numeric_traits_floating::__digits10, __max_exponent10): Add.
- * src/istream.cc (ignore<char>(streamsize, int_type), operator>>
- (basic_istream<char>&, char*), ignore<wchar_t>(streamsize,
- int_type)): Use the latter.
- * src/compatibility.cc (ignore<char>(streamsize),
- ignore<wchar_t>(streamsize)): Likewise.
- * include/ext/vstring_util.h (__vstring_utility<>::_S_compare):
- Likewise.
- * include/bits/stl_memory.h (__get_temporary_buffer): Likewise.
- * include/bits/stl_algobase.h (lexicographical_compare(const char*,
- const char*, const char*, const char*)): Likewise.
- * include/bits/locale_facets.tcc (num_get<>::_M_extract_int(_InIter,
- _InIter, ios_base&, ios_base::iostate&, _ValueT&),
- num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT),
- num_put<>::_M_insert_float(_OutIter, ios_base&, _CharT, char,
- _ValueT), collate<>::do_hash(const _CharT*, const _CharT*)): Likewise.
- * include/bits/basic_string.h (basic_string<>::_S_compare): Likewise.
- * include/bits/istream.tcc (operator>>(short&), operator>>(int&),
- ignore(streamsize), ignore(streamsize, int_type), operator>>
- (basic_istream<>&, _CharT*)): Likewise.
- * include/bits/stl_bvector.h (vector<bool>::max_size): Likewise.
- * include/tr1/functional_hash.h (struct hash<long double>): Likewise.
- * include/std/istream: Do not include <limits>.
- * include/tr1/cmath: Include <limits>.
- * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
- Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
- Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
- Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/13.cc:
- Likewise.
- * testsuite/27_io/ios_base/storage/2.cc: Likewise.
-
- * include/tr1/hashtable: Do not include the whole <iterator>.
-
-2007-04-11 Paolo Carlini <pcarlini@suse.de>
-
- * config/locale/gnu/c_locale.h: Do not include <langinfo.h>
- and <iconv.h>.
- * config/locale/gnu/c++locale_internal.h: Include <langinfo.h>.
-
-2007-04-11 Paolo Carlini <pcarlini@suse.de>
-
- * include/std/istream (class basic_istream<>): Remove unneded friend
- declarations.
-
-2007-04-11 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/22_locale/num_get/get/wchar_t/1.cc: Initialize v.
-
-2007-04-11 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
- ios_base&, ios_base::iostate&, void*&)): Fix for sizeof(void*)
- > sizeof(unsigned long).
-
- * testsuite/22_locale/num_get/get/char/1.cc: Fix void* test.
- * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
-
- * testsuite/22_locale/num_put/put/char/1.cc: Tweak comment.
- * testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
-
-2007-04-11 Zack Weinberg <zackw@panix.com>
-
- * include/std/iosfwd: Do not include <bits/c++locale.h> and
- <bits/functexcept.h>.
-
-2007-04-10 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/ext/pb_ds/detail/resize_policy/
- cc_hash_max_collision_check_resize_trigger_imp.hpp: Qualify
- namespace std members.
- * include/ext/pb_ds/detail/list_update_policy/
- counter_lu_metadata.hpp: Same.
- * include/ext/throw_allocator.h: Same.
- * include/ext/pod_char_traits.h: Same.
- * include/ext/malloc_allocator.h: Same.
- * libsupc++/del_op.cc: Same, simplify.
-
- * include/bits/c++config: Adjust macro name.
-
- * include/c_global/cstring: Alphabetize.
- * include/c_global/cwctype: Same.
-
-2007-04-10 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/cmath: Include <bits/stl_algobase.h> instead of
- the whole <algorithm>.
-
-2007-04-10 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/type_traits (__is_function_helper): New, uses
- variadic templates.
- (is_function): Forward to the latter.
- * testsuite/tr1/4_metaprogramming/primary_type_categories/
- is_function/is_function.cc: Add test.
-
-2007-04-10 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28277 (partial: vstring bits)
- * include/bits/ostream_insert.h: New.
- * include/Makefile.am: Add.
- * include/ext/vstring.h (operator<<(basic_ostream<>&,
- const __versa_string<>&): Forward to __ostream_insert.
- * include/bits/basic_string.h (operator<<(basic_ostream<>&,
- const string<>&)): Likewise.
- * include/std/ostream (operator<<(basic_ostream<>&, _CharT),
- operator<<(basic_ostream<char,>&, char), operator<<(basic_ostream<>&,
- const _CharT*), operator<<(basic_ostream<char,>&, const char*)):
- Likewise.
- * include/ext/vstring.tcc (operator<<(basic_ostream<>&,
- const __versa_string<>&)): Remove.
- (class basic_ostream): Remove friend declarations.
- (basic_ostream<>::_M_write(char_type, streamsize),
- _M_insert(const char_type*, streamsize)): Remove.
- * include/bits/ostream.tcc (_M_insert(const char_type*, streamsize)):
- Remove definition.
- (operator<<(basic_ostream<>&, const char*)): Use __ostream_insert.
- * config/abi/pre/gnu.ver: Adjust.
- * src/ostream-inst.cc: Add __ostream_insert instantiations.
- * include/bits/locale_facets.h (__pad<>::_S_pad): Remove __num
- parameter.
- * include/bits/locale_facets.tcc (__pad<>::_S_pad): Adjust.
- (num_put<>::_M_pad(_CharT, streamsize, ios_base&, _CharT*,
- const _CharT*, int&)): Likewise.
- * include/Makefile.in: Rebuild.
- * testsuite/ext/vstring/inserters_extractors/char/28277.cc: New.
- * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: New.
-
- * include/ext/vstring_util.h: Do not include the whole <locale>.
- * include/ext/vstring.tcc (operator>>(basic_istream<>&,
- __versa_string<>&, getline(basic_istream<>&, __versa_string<>&,
- _CharT)): Tweak to refer to ios_base as a base of istream; do not
- refer to non-standard types of istream.
- * include/bits/istream.tcc (operator>>(basic_istream<>&, _CharT*),
- ws(basic_istream<>&)): Do not refer to non-standard types of istream.
- * include/std/bitset (operator>>(std::basic_istream<>&, bitset<>&)):
- Avoid using basic_streambuf<>*.
-
- * include/bits/istream.tcc (operator>>(basic_istream<>&,
- basic_string<>&), getline(basic_istream<>&, basic_string<>&, _CharT)):
- Move...
- * include/bits/basic_string.tcc: ... here; tweak to refer to ios_base
- as a base of istream; do not refer to non-standard types of istream.
- * include/std/string: Tweak includes.
-
- * include/ext/type_traits.h (__is_null_pointer): Add.
- * include/ext/rc_string_base.h: Use it.
- * include/ext/sso_string_base.h: Likewise.
- * include/bits/basic_string.tcc (__is_null_pointer): Remove, use
- the above.
- * include/ext/vstring_util.h (__vstring_utility<>::_S_is_null_pointer):
- Remove.
-
-2007-04-09 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/type_traits_fwd.h (__is_union_or_class): Remove.
- * include/tr1/type_traits (struct __in_array,
- struct __is_union_or_class, struct __is_union_or_class_helper,
- struct __is_empty_helper, struct __is_polymorphic_helper):
- Remove.
- (struct is_enum): Use __is_enum.
- (struct is_union): Use __is_union.
- (struct is_class): Use __is_class.
- (struct is_function): Adjust.
- (struct is_empty): Use __is_empty.
- (struct is_polymorphic): Use __is_polymorphic.
- (struct is_abstract): Use __is_abstract.
- (struct has_virtual_destructor): Use __has_virtual_destructor.
- (struct __is_base_of_helper): Use __is_base_of.
- * testsuite/tr1/4_metaprogramming/composite_type_traits/
- is_union_or_class/typedefs.cc: Remove.
- * testsuite/tr1/4_metaprogramming/composite_type_traits/
- is_union_or_class/is_union_or_class.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/primary_type_categories/
- is_class/typedefs.cc: New.
- * testsuite/tr1/4_metaprogramming/primary_type_categories/
- is_class/is_class.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/primary_type_categories/
- is_union/typedefs.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/primary_type_categories/
- is_union/is_union.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/type_properties/
- has_virtual_destructor/typedefs.cc: Likewise.
- * testsuite/tr1/4_metaprogramming/type_properties/
- has_virtual_destructor/has_virtual_destructor.cc: Likewise.
- * testsuite/util/testsuite_tr1.h (class VirtualDestructorClass): Add.
- * testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/
- is_polymorphic.cc: Add test.
-
-2007-04-08 Alexey Beshenov <bav.272304@gmail.com>
-
- PR libstdc++/31511
- * include/c_global/cmath.tcc (__cmath_power): Use _Tp(1).
- * include/c_std/cmath.tcc (__cmath_power): Likewise.
-
-2007-04-06 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31117
- * config/locale/gnu/c_locale.cc (__convert_to_v): Do not use errno,
- just check that the value is finite.
- * config/locale/generic/c_locale.cc (__convert_to_v): Likewise.
-
-2007-04-06 Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/type_traits.h (__numeric_traits): Move...
- * include/ext/numeric_traits.h: ... here.
- * include/Makefile.am: Add.
- * include/ext/pb_ds/detail/type_utils.hpp: Include
- <ext/numeric_traits.h> too.
- * include/tr1/random: Likewise.
- * testsuite/ext/type_traits/numeric_traits.cc: Move...
- * testsuite/ext/numeric_traits/numeric_traits.cc: ... here.
- * include/Makefile.in: Regenerate.
-
-2007-04-04 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/valarray_array.h (__valarray_default_construct(_Tp*,
- _Tp*)): Use __is_scalar instead of __is_pod.
-
-2007-04-03 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algobase.h (__copy_aux(_II, _II, _OI),
- __copy_backward_aux(_BI1, _BI1, _BI2)): Use __is_pod.
- * include/bits/stl_deque.h (deque<>::_M_destroy_data(iterator,
- iterator, const std::allocator<>&)): Use __has_trivial_constructor.
- (deque<>::_M_destroy_data_dispatch): Remove.
- * include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator,
- _InputIterator, _ForwardIterator), uninitialized_fill(_ForwardIterator,
- _ForwardIterator, const _Tp&), uninitialized_fill_n(_ForwardIterator,
- _Size, const _Tp&)): Use __is_pod.
- * include/bits/stl_tempbuf.h (_Temporary_buffer::
- _Temporary_buffer(_ForwardIterator, _ForwardIterator)): Use __is_pod.
- (_Temporary_buffer::_M_initialize_buffer): Remove.
- * include/bits/stl_construct.h (_Destroy(_ForwardIterator,
- _ForwardIterator)): Use __has_trivial_destructor.
- (__destroy_aux): Remove.
-
-2007-04-03 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_map.h (map<>::insert(iterator, const value_type&):
- Uglify parameter.
-
-2007-04-03 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31440
- * include/bits/stl_tree.h (_M_lower_bound(_Link_type, _Link_type,
- const _Key&), _M_upper_bound(_Link_type, _Link_type, const _Key&)):
- Add.
- (_M_equal_range(const _Key&) const): Remove.
- (lower_bound(const key_type&), lower_bound(const key_type&) const,
- upper_bound(const key_type&), upper_bound(const key_type&) const,
- equal_range(const key_type&), equal_range(const key_type&) const):
- Adjust.
- (find(const _Key&), find(const _Key&) const): Tweak.
- * testsuite/23_containers/map/operations/31440.cc: New.
-
-2007-04-02 Matthew Levine <gcc@severeweblint.org>
- Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31370
- * include/bits/stl_bvector.h (vector<bool>::max_size): Fix.
- (vector<bool>::_M_check_len): Add.
- * include/bits/vector.tcc (_M_fill_insert(iterator, size_type, bool),
- _M_insert_range(iterator, _ForwardIterator, _ForwardIterator,
- std::forward_iterator_tag), _M_insert_aux(iterator, bool)): Use it.
- * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: New.
- * testsuite/23_containers/vector/bool/capacity/29134.cc: Adjust.
-
- * include/bits/stl_vector.h (vector<>::_M_check_len): Add.
- * include/bits/vector.tcc (_M_insert_aux(iterator, const _Tp&),
- _M_fill_insert(iterator, size_type, const value_type&),
- _M_range_insert(iterator, _ForwardIterator, _ForwardIterator,
- std::forward_iterator_tag)): Use it.
-
-2007-04-02 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31401 (vstring bits)
- * include/ext/vstring.tcc (find(const _CharT*, size_type,
- size_type)): Avoid unsigned overflow.
-
-2007-04-02 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.tcc (num_put<>::do_put(iter_type,
- ios_base&, char_type, const void*)): Fix for sizeof(const void*)
- > sizeof(unsigned long).
-
-2007-04-01 Andreas Tobler <a.tobler@schweiz.org>
-
- * include/tr1/poly_laguerre.tcc: Missing s/__alpha/__alpha1, line 278.
-
-2007-04-01 Richard Henderson <rth@redhat.com>
-
- * include/tr1/poly_laguerre.tcc: s/__alpha/__alpha1/g.
+ * include/std/stdexcept: Likewise.
+ * include/std/streambuf: Likewise.
+ * include/tr1/bessel_function.tcc: Likewise.
+ * include/tr1/cmath: Likewise.
* include/tr1/ell_integral.tcc: Likewise.
+ * include/tr1/hypergeometric.tcc: Likewise.
+ * include/tr1/legendre_function.tcc: Likewise.
+ * include/tr1_impl/random: Likewise.
+ * include/tr1_impl/regex: Likewise.
-2007-03-31 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_bvector.h (_M_fill_insert(iterator, size_type,
- bool), _M_insert_range(iterator, _ForwardIterator, _ForwardIterator,
- std::forward_iterator_tag), _M_insert_aux(iterator, bool)): Move
- out of line...
- * include/bits/vector.tcc: ... here.
-
-2007-03-30 Paolo Carlini <pcarlini@suse.de>
-
- PR c++/26099
- * include/bits/cpp_type_traits.h (struct __is_pod, struct __is_empty):
- Remove.
- * include/bits/valarray_array.h: Adjust.
- * include/bits/allocator.h: Likewise.
- * include/bits/stl_tree.h: Likewise.
-
-2007-03-30 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31401
- * include/bits/basic_string.tcc (find(const _CharT*, size_type,
- size_type)): Avoid unsigned overflow.
- * testsuite/21_strings/basic_string/find/char/4.cc: New.
- * testsuite/21_strings/basic_string/find/wchar_t/4.cc: Likewise.
-
-2007-03-27 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/fstream.tcc (basic_filebuf<>::underflow):
- Don't call codecvt::in at all if _M_ext_next >= _M_ext_end.
- * testsuite/27_io/basic_filebuf/underflow/char/3.cc: New.
-
-2007-03-26 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/c_compatibility/complex.h: Without
- __GXX_EXPERIMENTAL_CXX0X__ include_next complex.h.
- * include/c_compatibility/fenv.h: Same.
- * include/c_compatibility/inttypes.h: Same.
- * include/c_compatibility/stdbool.h: Same.
- * include/c_compatibility/stdint.h: Same.
- * include/c_compatibility/tgmath.h: Same.
-
- * include/tr1/cinttypes: Use include_next.
- * include/tr1/cstdint: Same.
- * include/tr1/cstdbool: Same.
-
- * acinclude.m4 (GLIBCXX_ENABLE_C99): Add check for tgmath.h
- * configure: Regenerate.
- * config.h.in: Same.
-
-2007-03-25 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/functional: Formatting fixes.
-
-2007-03-23 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc:
- Likewise use std::numeric_limits<>::max().
- * testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc:
- Minor tweaks.
-
-2007-03-23 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
- (test02): Use std::numeric_limits<>::max() to get suitable large
- values.
-
-2007-03-22 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/21_strings/headers/cstdlib/functions_std.cc: Without
- C99 support, _GLIBCXX_USE_WCHAR_T not defined, so
- dg-require-c-std.
- * testsuite/tr1/6_containers/headers/functional/synopsis.cc: Same.
- * testsuite/27_io/headers/iostream/synopsis.cc: Same.
- * testsuite/27_io/headers/streambuf/types_std.cc: Same.
- * testsuite/27_io/headers/sstream/types_std.cc: Same.
- * testsuite/27_io/headers/ostream/types_std.cc: Same.
- * testsuite/27_io/headers/istream/types_std.cc: Same.
- * testsuite/27_io/headers/iostream/types_std.cc: Same.
- * testsuite/27_io/headers/fstream/types_std.cc: Same.
- * testsuite/21_strings/headers/string/types_std.cc: Same.
- * testsuite/21_strings/headers/cwctype/functions_std.cc: Same.
- * testsuite/21_strings/headers/cwctype/types_std.cc: Same.
- * testsuite/21_strings/headers/cwchar/functions_std.cc: Same.
- * testsuite/21_strings/headers/cwchar/types_std.cc: Same.
-
- * include/Makefile.am (c_compatibility_headers): Add fenv.h.
- * include/Makefile.in: Regenerate.
- * configure.host: Update comment.
-
- * include/tr1/cfenv: Use include_next.
-
-2007-03-19 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/tuple (get(_Tuple_impl<>&, get(const _Tuple_impl<>&):
- Rename as __get_helper.
- (get(tuple<>&, get(const tuple<>&)): Forward to the latter.
-
-2007-03-19 Benjamin Kosnik <bkoz@redhat.com>
-
- * docs/doxygen/user.cfg.in: Update for new includes, macros.
-
-2007-03-18 Mark Mitchell <mark@codesourcery.com>
-
- * libsupc++/array_type_info.cc: Likewise.
- * libsupc++/bad_cast.cc: Likewise.
- * libsupc++/bad_typeid.cc: Likewise.
- * libsupc++/class_type_info.cc: Likewise.
- * libsupc++/dyncast.cc: Likewise.
- * libsupc++/enum_type_info.cc: Likewise.
- * libsupc++/function_type_info.cc: Likewise.
- * libsupc++/fundamental_type_info.cc: Likewise.
- * libsupc++/pbase_type_info.cc: Likewise.
- * libsupc++/pmem_type_info.cc: Likewise.
- * libsupc++/pointer_type_info.cc: Likewise.
- * libsupc++/si_class_type_info.cc: Likewise.
- * libsupc++/vmi_class_type_info.cc: Likewise.
- * libsupc++/tinfo.h: Move inline type_info functions here.
- * libsupc++/tinfo.cc: Separate type_info classes into their own
- files.
- * libsupc++/tinfo2.cc: Likewise.
- * Makefile.am (sources): Mention new files.
- * Makefile.in: Regenerated.
-
-2007-03-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/27_io/headers/cinttypes/types_std_c++0x.cc: Use
- -std=gnu++0x instead of -std=c++0x for testing.
- * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/cfenv/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc: Same.
- * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Same.
- * testsuite/17_intro/headers/c++200x/all.cc: Same.
- * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Same.
- * testsuite/23_containers/hash/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_map/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/tuple/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_multimap/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_set/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/headers/tuple/types_std_c++0x.cc: Same.
- * testsuite/23_containers/unordered_multiset/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/array/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/enable_shared_from_this/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/headers/functional/types_std_c++0x.cc: Same.
- * testsuite/20_util/headers/functional/
- using_namespace_std_placeholders.cc: Same.
- * testsuite/20_util/headers/type_traits/types_std_c++0x.cc: Same.
- * testsuite/20_util/headers/memory/types_std_c++0x.cc: Same.
- * testsuite/20_util/shared_ptr/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/weak_ptr/requirements/
- explicit_instantiation.cc: Same.
-
-2007-03-16 Benjamin Kosnik <bkoz@redhat.com>
-
- * testsuite/lib/dg-options.exp (dg-require-c-std): New.
- * testsuite/lib/libstdc++.exp (check_v3_target_c_std): New. Check to
- see if _GLIBCXX_USE_C99_MATH is active.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 08_cyl_bessel_i/check_nan.cc: Use dg-require-c-std.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 17_hyperg/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 13_ellint_2/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 01_assoc_laguerre/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 02_assoc_legendre/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 22_sph_legendre/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 10_cyl_bessel_k/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 09_cyl_bessel_j/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 21_sph_bessel/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 07_conf_hyperg/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 16_hermite/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 12_ellint_1/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 05_comp_ellint_2/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 18_laguerre/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 14_ellint_3/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 04_comp_ellint_1/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 06_comp_ellint_3/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 19_legendre/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 03_beta/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 11_cyl_neumann/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 15_expint/check_nan.cc: Same.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 23_sph_neumann/check_nan.cc: Same.
-
- * include/tr1/poly_laguerre.tcc (__poly_laguerre): Don't check if
- unsigned int can be a NaN.
-
-2007-03-16 Edward M. Smith-Rowland <3dw4rd@verizon.net>
-
- * docs/html/ext/tr1.html : Marked tr1 math special functions done.
- * docs/html/faq/index.html : Ditto.
- * include/Makefile.in : Added new special function header files.
- * include/Makefile.am : Ditto.
- * include/tr1/common.h : Added type promotion routines for three
- and four args.
-
- * include/tr1/special_function_util.h: New.
- * include/tr1/bessel_function.tcc: New.
- * include/tr1/beta_function.tcc: New.
- * include/tr1/ell_integral.tcc: New.
- * include/tr1/exp_integral.tcc: New.
- * include/tr1/gamma.tcc: New.
- * include/tr1/hypergeometric.tcc: New.
- * include/tr1/legendre_function.tcc: New.
- * include/tr1/modified_bessel_func.tcc: New.
- * include/tr1/poly_hermite.tcc: New.
- * include/tr1/poly_laguerre.tcc: New.
- * include/tr1/riemann_zeta.tcc: New.
- * include/tr1/cmath : Included tr1 math special functions.
- * include/tr1/math.h : Ditto.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- testcase.h: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 01_assoc_laguerre/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 01_assoc_laguerre/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 01_assoc_laguerre/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 01_assoc_laguerre/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 02_assoc_legendre/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 02_assoc_legendre/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 02_assoc_legendre/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 02_assoc_legendre/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 04_comp_ellint_1/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 04_comp_ellint_1/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 04_comp_ellint_1/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 04_comp_ellint_1/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 05_comp_ellint_2/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 05_comp_ellint_2/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 05_comp_ellint_2/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 05_comp_ellint_2/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 06_comp_ellint_3/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 06_comp_ellint_3/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 06_comp_ellint_3/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 06_comp_ellint_3/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 07_conf_hyperg/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 07_conf_hyperg/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 07_conf_hyperg/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 07_conf_hyperg/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 08_cyl_bessel_i/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 08_cyl_bessel_i/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 08_cyl_bessel_i/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 08_cyl_bessel_i/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 09_cyl_bessel_j/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 09_cyl_bessel_j/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 09_cyl_bessel_j/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 09_cyl_bessel_j/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 10_cyl_bessel_k/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 10_cyl_bessel_k/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 10_cyl_bessel_k/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 10_cyl_bessel_k/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 11_cyl_neumann/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 11_cyl_neumann/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 11_cyl_neumann/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 11_cyl_neumann/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
- check_value_neg.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
- check_value_pos.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
- compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
- check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
- check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
- compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/check_value_neg.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 20_riemann_zeta/check_value_pos.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 21_sph_bessel/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 21_sph_bessel/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 21_sph_bessel/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 21_sph_bessel/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 22_sph_legendre/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 22_sph_legendre/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 22_sph_legendre/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 22_sph_legendre/compile_2.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 23_sph_neumann/compile.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 23_sph_neumann/check_nan.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 23_sph_neumann/check_value.cc: New.
- * testsuite/tr1/5_numerical_facilities/special_functions/
- 23_sph_neumann/ compile_2.cc: New.
-
-2007-03-15 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/lib/libstdc++.exp (v3-build_support) <ar>: If it
- exists, use env(AR_FOR_TARGET). Log the command.
- <ranlib>: Similar.
-
-2007-03-14 Nathan Sidwell <nathan@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>::
-
- * testsuite/lib/libstdc++.exp (check_v3_target_fileio,
- check_v3_target_time): New.
- * testsuite/lib/dg-options.exp (dg-require-fileio,
- dg-require-time): New.
- * testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: Use it.
- * testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: Use it.
- * testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: Use it.
- * testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: Use it.
- * testsuite/ext/stdio_sync_filebuf/char/1.cc: Use it.
- * testsuite/ext/stdio_filebuf/char/2.cc: Use it.
- * testsuite/ext/stdio_filebuf/char/10063-1.cc: Use it.
- * testsuite/ext/stdio_filebuf/char/10063-2.cc: Use it.
- * testsuite/ext/stdio_filebuf/char/10063-3.cc: Use it.
- * testsuite/22_locale/time_put/put/char/12439_1.cc: Use it.
- * testsuite/22_locale/time_put/put/char/12439_3.cc: Use it.
- * testsuite/27_io/basic_ofstream/open/char/1.cc: Use it.
- * testsuite/27_io/basic_ofstream/cons/char/2.cc: Use it.
- * testsuite/27_io/objects/char/12048-2.cc: Use it.
- * testsuite/27_io/objects/char/12048-4.cc: Use it.
- * testsuite/27_io/objects/char/12048-1.cc: Use it.
- * testsuite/27_io/objects/char/12048-3.cc: Use it.
- * testsuite/27_io/objects/char/10.cc: Use it.
- * testsuite/27_io/objects/char/12048-5.cc: Use it.
- * testsuite/27_io/basic_istream/get/char/2.cc: Use it.
- * testsuite/27_io/basic_istream/ignore/char/2.cc: Use it.
- * testsuite/27_io/basic_istream/ignore/char/3.cc: Use it.
- * testsuite/27_io/basic_istream/getline/char/5.cc: Use it.
- * testsuite/27_io/basic_istream/seekg/char/sstream.cc: Use it.
- * testsuite/27_io/basic_istream/seekg/char/fstream.cc: Use it.
- * testsuite/27_io/basic_istream/readsome/char/6746-2.cc: Use it.
- * testsuite/27_io/basic_istream/extractors_other/char/2.cc: Use it.
- * testsuite/27_io/basic_istream/tellg/char/sstream.cc: Use it.
- * testsuite/27_io/basic_istream/tellg/char/1.cc: Use it.
- * testsuite/27_io/basic_istream/tellg/char/fstream.cc: Use it.
- * testsuite/27_io/basic_istream/extractors_character/char/4.cc: Use it.
- * testsuite/27_io/basic_ostream/inserters_other/char/1.cc: Use it.
- * testsuite/27_io/basic_ostream/tellp/char/1.cc: Use it.
- * testsuite/27_io/basic_ostream/seekp/char/2346-fstream.cc: Use it.
- * testsuite/27_io/basic_ifstream/open/char/1.cc: Use it.
- * testsuite/27_io/basic_ifstream/cons/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetn/char/3.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/12790-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/12790-3.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/12790-4.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc: Use it.
- * testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/in_avail/char/9701-3.cc: Use it.
- * testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Use it.
- * testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Use it.
- * testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc: Use it.
- * testsuite/27_io/basic_filebuf/is_open/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/open/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/open/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/open/char/2.cc: Use it.
- * testsuite/27_io/basic_filebuf/open/char/3.cc: Use it.
- * testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc: Use it.
- * testsuite/27_io/basic_filebuf/overflow/char/2.cc: Use it.
- * testsuite/27_io/basic_filebuf/overflow/char/9988.cc: Use it.
- * testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/overflow/char/9169.cc: Use it.
- * testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/1.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/12790-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/2.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/12790-3.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/12790-4.cc: Use it.
- * testsuite/27_io/basic_filebuf/close/char/4.cc: Use it.
- * testsuite/27_io/basic_filebuf/underflow/10096.cc: Use it.
- * testsuite/27_io/basic_filebuf/underflow/char/2.cc: Use it.
- * testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/12790-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/12790-3.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: Use it.
- * testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Use it.
- * testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc: Use it.
- * testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Use it.
- * testsuite/21_strings/basic_string/inserters_extractors/
- char/10.cc: Use it.
- * testsuite/21_strings/basic_string/inserters_extractors/
- char/11.cc: Use it.
- * testsuite/21_strings/basic_string/inserters_extractors/
- char/5.cc: Use it.
-
-2007-03-13 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/tuple: Only include <utility> for std::pair, and
- forward declare reference_wrapper; formatting fixes.
- * include/tr1/ref_fwd.h: Remove.
- * include/tr1/tuple_defs.h: Remove, unused.
- * include/Makefile.am: Update.
- * include/Makefile.in: Regenerate.
- * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
- Include <tr1/functional> too.
-
- * include/tr1/tuple: Define tuple_size<tuple<_Elements...> >::value.
-
-2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
-
- * include/tr1/regex: Add "boilerplate" implementations.
- * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/
- translate_nocase.cc: New.
- * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/
- ctor.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex_traits/char/
- translate_nocase.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex_traits/char/
- ctor.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_ecma.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- default.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_grep.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_extended.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_basic.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_awk.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/regex/cons/char/
- c_string_egrep.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- range.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- string_op.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- string.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- pstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- cstring_op.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
- cstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- range.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- string_op.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- string.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- pstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- cstring_op.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
- cstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
- range.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
- default.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
- string.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
- pstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
- cstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
- range.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
- default.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
- string.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
- pstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
- cstring.cc: Likewise.
- * testsuite/tr1/7_regular_expressions/match_results/ctors/char/
- default.cc: Likewise.
-
-2007-03-12 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algo.h (swap_ranges): Move...
- * include/bits/stl_algobase.h: ... here.
- * include/tr1/array: Trim includes, stl_algobase.h is enough.
-
-2007-03-11 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (final)
- * include/std/iosfwd: Do not include <bits/c++io.h>.
- * config/io/basic_file_stdio.h: Do it here.
- * include/ext/stdio_sync_filebuf.h: Likewise.
- * include/ext/rope: Include <bits/gthr.h> unconditionally.
- * include/std/fstream: Do not include <bits/gthr.h>.
-
- * include/std/ios: Do not include <cstdio>.
- * include/bits/ios_base.h: Do it here.
- * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error
- line numbers.
- * testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
-
-2007-03-10 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/std/memory: Move C++03 implementation...
- * include/bits/stl_memory.h: ... here, new.
- * include/Makefile.am: Add.
- * include/bits/stl_tempbuf.h: Include the latter instead.
- * include/tr1/hashtable: Include allocator.h instead of
- the whole <memory>.
- * include/tr1/hashtable_policy.h: Include stl_function.h
- instead of <functional>.
- * include/Makefile.in: Regenerate.
- * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust dg-error
- line numbers.
-
-2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
-
- * include/Makefile.in: Regenerate.
- * include/tr1/mu_iterate.h: Remove.
- * include/tr1/tuple (_Tuple_impl): New.
- (tuple): Make variadic, re-implement as shell over _Tuple_impl.
- (0-element tuple): Basis case.
- (2-element tuple): Handle pair methods.
- (__get_helper): Remove.
- (tuple_element): Reimplement with variadic templates.
- (tuple_size): Ditto.
- (get): Ditto.
- (operator==): Use variadic templates in the signature.
- (operator<): Ditto.
- (operator!=): Ditto.
- (operator>): Ditto.
- (operator<=): Ditto.
- (operator>=): Ditto.
- (__stripped_tuple_type): Remove; we've inlined its behavior.
- (make_tuple): Reimplement with variadic templates.
- (tie): Ditto.
- * include/tr1/tuple_iterate.h: Remove.
- * include/tr1/bind_repeat.h: Remove.
- * include/tr1/ref_wrap_iterate.h: Remove.
- * include/tr1/bind_iterate.h: Remove.
- * include/tr1/functional (_Weak_result_type): Add variadic
- partial specializations.
- (result_of): Ditto.
- (__invoke): Reimplement using variadic templates.
- (reference_wrapper): Reimplement operator() with variadic
- templates.
- (_Maybe_unary_or_binary_function): New.
- (_Mem_fn): Implement for member function pointers using variadic
- templates.
- (placeholders): Define 30 placeholders.
- (_Index_tuple): New.
- (_Build_index_tuple): New.
- (_No_tuple_element): New.
- (_Safe_tuple_element_impl): New.
- (_Safe_tuple_element): New.
- (_Mu): Reimplement with variadic templates, use
- _Safe_tuple_element instead of tuple_element.
- (_Bind): Reimplement with variadic templates and tuples.
- (_Bind_result): Ditto.
- (bind): Reimplement with variadic templates.
- (_Function_handler): Ditto.
- (function): Ditto.
- * include/tr1/functional_iterate.h: Remove.
- * include/tr1/repeat.h: Remove.
- * include/Makefile.am: Don't install removed headers.
-
-2007-03-06 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/bits/stl_algobase.h: Do not include <cstdlib>.
- * src/localename.cc: Do it here.
- * src/ctype.cc: Likewise.
- * include/ext/pb_ds/detail/map_debug_base.hpp: Likewise.
- * include/ext/pb_ds/exception.hpp: Likewise.
- * include/ext/pb_ds/list_update_policy.hpp: Likewise.
- * include/bits/stl_algo.h: Likewise.
- * include/tr1/random: Likewise.
- * testsuite/util/testsuite_hooks.cc: Likewise.
- * testsuite/util/testsuite_abi_check.cc: Likewise.
- * testsuite/util/testsuite_abi.cc: Likewise.
- * testsuite/util/performance/assoc/timing/
- tree_order_statistics_test.hpp: Likewise.
- * config/locale/darwin/ctype_members.cc: Likewise.
- * config/locale/gnu/c++locale_internal.h: Likewise.
- * config/locale/generic/ctype_members.cc: Likewise.
- * config/locale/generic/time_members.cc: Likewise.
-
- * include/ext/pb_ds/detail/resize_policy/
- hash_load_check_resize_trigger_imp.hpp: Qualify abort.
- * testsuite/util/performance/assoc/timing/
- multimap_find_test.hpp: Likewise.
- * include/std/valarray: Do include <cstdlib>.
- * include/tr1/hashtable: Likewise.
-
-2007-03-05 Joseph Myers <joseph@codesourcery.com>
-
- PR libstdc++/30675
- * testsuite/lib/libstdc++.exp (v3-build_support): Use [transform
- "ar"] and [transform "ranlib"].
-
-2007-03-04 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/27_io/basic_ostream/inserters_arithmetic/
- char/31031.cc: Include the right header.
-
-2007-03-04 Benjamin Kosnik <bkoz@redhat.com>
-
- * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Add c_global.
- * configure.host (c_model): Set default to c_global.
- * configure: Regenerate.
- * include/Makefile.am (c_compatibility_headers_extra): Make
- conditional on GLIBCXX_C_HEADERS_COMPATIBILITY.
- (c_base_headers_extra): Make conditional on GLIBCXX_C_HEADERS_EXTRA.
- (c_compatibility_headers): Make conditional on c/c_std/c_global.
- * include/Makefile.in: Regenerate.
- * docs/html/configopts.html: Add c_global information to
- --enable-cheaders. Eventually, "c_std" should mean "C" includes
- that are in namespace std, with optional C++ "C" compatibility
- includes to inject into global scope. And "c_global" should mean
- "C" includes that are in the global namespace, with C++ includes
- injecting into namespace std and no C++ "C" compatibility
- includes.
-
-2007-03-04 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/bits/c++config: Add _GLIBCXX_NAMEPACE_C.
- Add _GLIBCXX_NAMESPACE_ASSOCIATION_CXX200x.
- Add _GLIBCXX_TR1 as namespace macro.
- Add namespace associations for std::__cxx200x conditionally.
-
- * include/c_compatibility/assert.h: Correct doxygen markup,
- conditionalize the global injections on _GLIBCXX_NAMESPACE_C.
- * include/c_compatibility/ctype.h: Same.
- * include/c_compatibility/errno.h: Same.
- * include/c_compatibility/float.h: Same.
- * include/c_compatibility/iso646.h: Same.
- * include/c_compatibility/limits.h: Same.
- * include/c_compatibility/locale.h: Same.
- * include/c_compatibility/math.h: Same.
- * include/c_compatibility/setjmp.h: Same.
- * include/c_compatibility/signal.h: Same.
- * include/c_compatibility/stdarg.h: Same.
- * include/c_compatibility/stddef.h: Same.
- * include/c_compatibility/stdio.h: Same.
- * include/c_compatibility/stdlib.h: Same.
- * include/c_compatibility/string.h: Same.
- * include/c_compatibility/time.h: Same.
- * include/c_compatibility/wchar.h: Same.
- * include/c_compatibility/wctype.h: Same.
-
- * include/c_compatibility/complex.h: Add.
- * include/c_compatibility/fenv.h: Same.
- * include/c_compatibility/inttypes.h: Same.
- * include/c_compatibility/stdbool.h: Same.
- * include/c_compatibility/stdint.h: Same.
- * include/c_compatibility/tgmath.h: Same.
-
- * include/c_global/cassert: Add, use include_next, use C++0x features
- if -std=c++0x.
- * include/c_global/cctype: Same.
- * include/c_global/cerrno: Same.
- * include/c_global/cfloat: Same.
- * include/c_global/ciso646: Same.
- * include/c_global/climits: Same.
- * include/c_global/clocale: Same.
- * include/c_global/cmath: Same.
- * include/c_global/cmath.tcc: Same.
- * include/c_global/csetjmp: Same.
- * include/c_global/csignal: Same.
- * include/c_global/cstdarg: Same.
- * include/c_global/cstddef: Same.
- * include/c_global/cstdio: Same.
- * include/c_global/cstdlib: Same.
- * include/c_global/cstring: Same.
- * include/c_global/ctime: Same.
- * include/c_global/cwchar: Same.
- * include/c_global/cwctype: Same.
-
- * include/c_global/ccomplex: Add.
- * include/c_global/cfenv: Add.
- * include/c_global/cinttypes: Add.
- * include/c_global/cstdbool: Add.
- * include/c_global/cstdint: Add.
- * include/c_global/ctgmath: Add.
-
- * include/std/algorithm: Use C++0x features if -std=c++0x.
- * include/std/bitset: Same.
- * include/std/complex: Same.
- * include/std/deque: Same.
- * include/std/fstream: Same.
- * include/std/functional: Same.
- * include/std/iomanip: Same.
- * include/std/ios: Same.
- * include/std/iosfwd: Same.
- * include/std/iostream: Same.
- * include/std/istream: Same.
- * include/std/iterator: Same.
- * include/std/limits: Same.
- * include/std/list: Same.
- * include/std/locale: Same.
- * include/std/map: Same.
- * include/std/memory: Same.
- * include/std/numeric: Same.
- * include/std/ostream: Same.
- * include/std/queue: Same.
- * include/std/set: Same.
- * include/std/sstream: Same.
- * include/std/stack: Same.
- * include/std/stdexcept: Same.
- * include/std/streambuf: Same.
- * include/std/string: Same.
- * include/std/utility: Same.
- * include/std/valarray: Same.
- * include/std/vector: Same.
-
- * include/std/array: Add.
- * include/std/random: Add.
- * include/std/regex: Add.
- * include/std/tuple: Add.
- * include/std/type_traits: Add.
- * include/std/unordered_map: Add.
- * include/std/unordered_set: Add.
- * include/std/c++0x_warning.h: Add.
-
- * include/tr1/array: Switch namespaces based on _GLIBCXX_TR1.
- * include/tr1/boost_shared_ptr.h: Same.
- * include/tr1/cctype: Same.
- * include/tr1/cfenv: Same.
- * include/tr1/cinttypes: Same.
- * include/tr1/cmath: Same.
- * include/tr1/common.h: Same.
- * include/tr1/complex: Same.
- * include/tr1/cstdint: Same.
- * include/tr1/cstdio: Same.
- * include/tr1/cstdlib: Same.
- * include/tr1/cwchar: Same.
- * include/tr1/cwctype: Same.
- * include/tr1/functional: Same.
- * include/tr1/functional_hash.h: Same.
- * include/tr1/functional_iterate.h: Same.
- * include/tr1/hashtable: Same.
- * include/tr1/hashtable_policy.h: Same.
- * include/tr1/math.h: Same.
- * include/tr1/memory: Same.
- * include/tr1/random: Same.
- * include/tr1/random.tcc: Same.
- * include/tr1/ref_fwd.h: Same.
- * include/tr1/repeat.h: Same.
- * include/tr1/stdlib.h: Same.
- * include/tr1/tuple: Same.
- * include/tr1/tuple_iterate.h: Same.
- * include/tr1/type_traits: Same.
- * include/tr1/type_traits_fwd.h: Same.
- * include/tr1/unordered_map: Same.
- * include/tr1/unordered_set: Same.
- * include/tr1/utility: Same.
-
- * include/tr1/ccomplex: Add.
- * include/tr1/complex.h: Add.
- * include/tr1/regex: Add.
-
- * include/Makefile.am: Add C++0x headers, "C" compatibility headers.
- * include/Makefile.in: Regenerate.
-
- * testsuite/tr1/headers.cc: Add in regex/complex.
-
- * testsuite/17_intro/headers/c++200x/all.cc: New.
- * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Same.
- * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Same.
- * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Same.
- * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Same.
- * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Same.
- * testsuite/20_util/enable_shared_from_this/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/headers/functional/types_std_c++0x.cc: Same.
- * testsuite/20_util/headers/functional/
- using_namespace_std_placeholders.cc: Same.
- * testsuite/20_util/headers/memory/types_std_c++0x.cc: Same.
- * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Same.
- * testsuite/20_util/headers/type_traits/types_std_c++0x.cc: Same.
- * testsuite/20_util/shared_ptr/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/20_util/weak_ptr/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/array/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/hash/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Same.
- * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Same.
- * testsuite/23_containers/headers/tuple/types_std_c++0x.cc: Same.
- * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc: Same.
- * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc: Same.
- * testsuite/23_containers/tuple/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_map/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_multimap/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_multiset/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/23_containers/unordered_set/requirements/
- explicit_instantiation.cc: Same.
- * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Same.
- * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Same.
- * testsuite/26_numerics/headers/cfenv/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Same.
- * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Same.
- * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Same.
- * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Same.
- * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Same.
- * testsuite/27_io/headers/cinttypes/types_std_c++0x.cc: Same.
- * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Same.
-
- * testsuite/tr1/8_c_compatibility/cfenv/types.cc: Rename ...
- * testsuite/tr1/8_c_compatibility/cinttypes/types.cc: Same.
- * testsuite/tr1/8_c_compatibility/cmath/types.cc: Same.
- * testsuite/tr1/8_c_compatibility/cstdint/types.cc: Same.
- * testsuite/tr1/8_c_compatibility/cstdlib/types.cc: Same.
- * testsuite/tr1/8_c_compatibility/cfenv/types_std_tr1.cc: ...to this.
- * testsuite/tr1/8_c_compatibility/cinttypes/types_std_tr1.cc: Same.
- * testsuite/tr1/8_c_compatibility/cmath/types_std_tr1.cc: Same.
- * testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc: Same.
- * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Same.
-
-2007-03-03 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31031
- * include/bits/istream.tcc: Inhibit implicit instantiation of
- the _M_insert helpers.
- * include/bits/ostream.tcc: Likewise for _M_extract.
- * testsuite/27_io/basic_ostream/inserters_arithmetic/char/
- 31031.cc: New.
- * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/
- 31031.cc: Likewise.
-
-2007-03-03 Benjamin Kosnik <bkoz@redhat.com>
-
- * include/debug/functions.h: Use cstddef.
-
- * testsuite/tr1/3_function_objects/headers/functional/
- using_namespace_std_tr1_placeholders.cc: Fix include.
-
-2007-03-03 Benjamin Kosnik <bkoz@redhat.com>
-
- * crossconfig.m4 (djgpp): Correct builtin defines to HAVE___,
- instead of HAVE____.
- * configure: Regenerate.
-
-2007-03-03 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/bits/stl_algobase.h: Do not include <iosfwd>,
- <bits/functexcept.h> is enough; adjust __copy_aux declarations;
- remove declaration of copy overload for istreambuf_iterator /
- ostreambuf_iterator.
- * src/debug.cc: Include <cstdio>.
- * include/ext/rope: Include <iosfwd>.
- * include/bits/char_traits.h: Include <cstdio> and <cwchar>.
- * include/bits/stl_algo.h: Remove declaration of find overload
- for istreambuf_iterator.
- * include/std/queue: Clean up includes.
- * include/std/stack: Likewise.
- * include/std/memory: Likewise.
- * include/std/algorithm: Likewise.
- * include/std/vector: Likewise.
- * include/std/deque: Likewise.
- * include/std/list: Likewise.
- * include/bits/stl_tree.h: Likewise.
- * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
- dg-error markers.
- * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
- * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
- * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
- * testsuite/23_containers/set/operators/1_neg.cc: Likewise.
- * testsuite/23_containers/map/operators/1_neg.cc: Likewise.
- * testsuite/20_util/auto_ptr/assign_neg.cc: Likewise.
-
- * include/ext/type_traits.h: Fix type of __max_digits10; clean up
- includes.
-
- * testsuite/util/testsuite_hooks.h: Do not include <cstddef>.
- * testsuite/util/testsuite_hooks.cc: Do it here.
-
-2007-03-02 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/27_io/objects/wchar_t/9661-1.cc: Include <cstdlib>.
- * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
- * testsuite/27_io/objects/char/9661-1.cc: Likewise.
- * testsuite/27_io/objects/char/7.cc: Likewise.
- * testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
- * testsuite/27_io/basic_istream/ignore/char/2.cc: Likewise.
- * testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Likewise.
- * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/char/
- 11.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_character/wchar_t/
- 4.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_character/char/
- 4.cc: Likewise.
- * testsuite/27_io/basic_ostream/seekp/wchar_t/
- 2346-fstream.cc: Likewise.
- * testsuite/27_io/basic_ostream/seekp/char/
- 2346-fstream.cc: Likewise.
- * testsuite/27_io/basic_filebuf/seekoff/char/26777.cc: Likewise.
- * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Likewise.
- * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
- * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
- * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise.
- * testsuite/27_io/basic_filebuf/close/char/4879.cc: Likewise.
- * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
- * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
- * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- wchar_t/10.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- wchar_t/11.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- char/10.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- char/11.cc: Likewise.
- * testsuite/ext/pb_ds/example/trie_dna.cc: Likewise.
- * testsuite/ext/new_allocator/deallocate_global.cc: Likewise.
- * testsuite/ext/new_allocator/deallocate_local.cc: Likewise.
- * testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Likewise.
- * testsuite/performance/27_io/ifstream_getline.cc: Likewise.
- * testsuite/22_locale/locale/cons/4.cc: Likewise.
- * testsuite/22_locale/locale/cons/5.cc: Likewise.
- * testsuite/tr1/2_general_utilities/shared_ptr/thread/
- mutex_weaktoshared.cc: Likewise.
- * testsuite/tr1/2_general_utilities/shared_ptr/thread/
- default_weaktoshared.cc: Likewise.
- * testsuite/thread/pthread5.cc: Likewise.
- * testsuite/thread/pthread1.cc: Likewise.
- * testsuite/23_containers/deque/cons/assign/1.cc: Likewise.
-
-2007-03-02 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/thread/pthread1.cc: Include <pthread.h>.
- * testsuite/thread/pthread2.cc: Likewise.
- * testsuite/thread/pthread3.cc: Likewise.
- * testsuite/thread/pthread4.cc: Likewise.
- * testsuite/thread/pthread5.cc: Likewise.
- * testsuite/thread/pthread6.cc: Likewise.
- * testsuite/thread/pthread7-rope.cc: Likewise.
-
-2007-03-02 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/tr1/random (class random_device): Rework to use simple
- <cstdio> input, do not include <fstream>.
- * include/tr1/random.tcc (all inserters and extractors): Refer
- to ios_base as base class of basic_istream or basic_ostream.
-
-2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
-
- * Makefile.am: Add dummy install-pdf target.
- * Makefile.in: Regenerate
-
-2007-03-01 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/31005
- * include/bits/localefwd.h: Include <cctype>.
-
-2007-02-27 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/std/bitset: Do not include <ios>, <iosfwd> is enough.
- (operator>>(std::basic_istream<>&, bitset<>&)): Tweak, refer to
- ios_base as a base of basic_istream.
- * include/std/iomanip: Do not include <ios>, <iosfwd> +
- <bits/ios_base.h> is enough.
- * include/std/iosfwd: Do not include <cctype> here...
- * include/bits/locale_facets.h: ... do it here, when needed.
- * include/bits/ostream.tcc: Clean up, do not include <locale> here...
- * include/std/ostream: ... here instead.
- * include/bits/istream.tcc: Likewise for <locale> and <ostream>...
- * include/std/istream: ... here.
- * include/bits/sstream.tcc: Do not include <sstream>.
-
-2007-02-27 Richard Guenther <rguenther@suse.de>
-
- * acinclude.m4: Adjust regular expression for ld version extraction.
- * configure: Regenerate.
-
-2007-02-26 DJ Delorie <dj@redhat.com>
-
- * crossconfig.m4 (djgpp): Pre-detect djgpp-specific results, to
- avoid needing to link during cross compiling.
- * configure: Regenerated.
-
-2007-02-26 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/std/bitset: Do not include <istream> and <ostream>,
- <ios> is enough.
- * include/std/iomanip: Do not include the whole <istream>,
- <ios> is enough; do not include <functional>; reformat.
- * include/std/functional: Do not include <cstddef>.
- * include/std/list: Do not include <bits/stl_uninitialized.h>.
- * include/std/numeric: Do not include the whole <iterator> and
- <bits/stl_function.h>.
- * include/std/valarray: Do not include <numeric>.
- * include/bits/stl_numeric.h: Include <bits/concept_check.h>.
- * src/iostream-inst.cc: Include <istream>.
- * include/ext/functional: Include <cstddef>.
- * testsuite/util/testsuite_hooks.h: Do not include <locale>,
- <ctime> is enough; qualify tm.
- * testsuite/util/testsuite_hooks.cc: Qualify tm.
-
-2007-02-26 Paolo Carlini <pcarlini@suse.de>
+2008-01-31 Paolo Carlini <pcarlini@suse.de>
- * include/bits/locale_facets.h (class ctype_byname<char>,
- class ctype_byname<wchar_t>): Declare.
- * src/ctype.cc (ctype_byname<wchar_t>::ctype_byname(const char*,
- size_t), ctype_byname<wchar_t>::~ctype_byname): Define.
- * config/locale/generic/ctype_members.cc (ctype_byname<char>::
- ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ * testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc:
+ Avoid -Wall warnings.
+ * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
Likewise.
- * config/locale/gnu/ctype_members.cc (ctype_byname<char>::
- ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
Likewise.
- * config/locale/darwin/ctype_members.cc (ctype_byname<char>::
- ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ * testsuite/tr1/6_containers/hash/operators/size_t.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise.
+ * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc:
Likewise.
- * testsuite/22_locale/headers/locale/synopsis.cc: Remove xfail.
-
-2007-02-25 Paolo Carlini <pcarlini@suse.de>
-
- * testsuite/19_diagnostics/headers/cerrno/macros.cc: Include
- the right header.
- * testsuite/18_support/headers/cstdlib/macros.cc: Likewise.
-
-2007-02-23 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/25896
- * include/tr1/hashtable (_Hashtable<>::erase(const key_type&)):
- Take care of &_M_extract((*__slot)->_M_v) == &__k.
-
- * testsuite/tr1/6_containers/unordered_map/erase/1.cc: New.
- * testsuite/tr1/6_containers/unordered_multimap/erase/1.cc: Likewise.
- * testsuite/tr1/6_containers/unordered_multiset/erase/1.cc: Likewise.
- * testsuite/tr1/6_containers/unordered_set/erase/1.cc: Likewise.
-
-2007-02-23 Mark Mitchell <mark@codesourcery.com>
-
- * testsuite/27_io/ios_base/sync_with_stdio/1.cc: XFAIL for wrapped
- targets.
-
-2007-02-23 Mark Mitchell <mark@codesourcery.com>
-
- * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
- XFAIL for Newlib targets.
-
-2007-02-22 Simon Martin <simartin@users.sourceforge.net>
-
- * testsuite/27_io/basic_ios/cons/char/3.cc: Fixed type mismatches in
- explicit instantiations.
- * testsuite/27_io/basic_istream/extractors_other/pod/
- 3983-3.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/pod/3983-1.cc:
+ * testsuite/tr1/6_containers/array/requirements/contiguous.cc:
Likewise.
- * testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc:
+ * testsuite/tr1/6_containers/array/requirements/member_swap.cc:
Likewise.
- * testsuite/27_io/basic_istream/sentry/pod/1.cc: Likewise.
- * testsuite/27_io/basic_ostream/sentry/pod/1.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/
- pod/10081-in.cc: Likewise.
- * testsuite/21_strings/basic_string/inserters_extractors/pod/
- 10081-out.cc: Likewise.
- * testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
-
-2007-02-22 Paolo Carlini <pcarlini@suse.de>
-
- * include/tr1/unordered_map (class __unordered_map,
- class __unordered_multimap): New.
- (class unordered_map, class unordered_multimap): Forward to
- the latter.
- * include/tr1/unordered_set: Likewise for unordered_set and
- unordered_multiset.
- * testsuite/tr1/6_containers/headers/unordered_set/synopsis.cc:
- Remove xfail.
- * testsuite/tr1/6_containers/headers/unordered_map/synopsis.cc:
+ * testsuite/tr1/6_containers/array/requirements/assign.cc: Likewise.
+ * testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc:
Likewise.
- * testsuite/tr1/6_containers/unordered_multimap/requirements/
- explicit_instantiation.cc: Adjust.
- * testsuite/tr1/6_containers/unordered_set/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/tr1/6_containers/unordered_map/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/tr1/6_containers/unordered_multiset/requirements/
- explicit_instantiation.cc: Likewise.
- * testsuite/tr1/6_containers/unordered_map/24064.cc: Likewise.
- * testsuite/util/native_type/assoc/native_hash_set.hpp: Likewise.
- * testsuite/util/native_type/assoc/native_hash_map.hpp: Likewise.
-
-2007-02-20 Mark Mitchell <mark@codesourcery.com>
-
- * testsuite/lib/libstdc++.exp (libstdc++_init): Compile testglue
- with -fexceptions.
-
-2007-02-20 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/tr1/functional: Split out hash bits to...
- * include/tr1/functional_hash.h: ...here.
- * include/Makefile.am: Add.
- * include/tr1/unordered_set: Include the latter instead.
- * include/tr1/unordered_map: Likewise.
- * include/tr1/random: Do not include the whole <algorithm>,
- stl_algobase.h is enough.
- * include/tr1/memory: Likewise.
- * include/Makefile.in: Regenerate.
-
- * include/tr1/utility (get(std::pair<>&), get(const std::pair<>&)):
- Mark inline.
-
-2007-02-20 Benjamin Kosnik <bkoz@redhat.com>
-
- Directory layout flattening.
-
- Added in testsuite:
- * 20_util/allocator
- * 20_util/auto_ptr
- * 20_util/function_objects
- * 20_util/function_objects/binders
- * 20_util/function_objects/binders/1.cc
- * 20_util/function_objects/binders/3113.cc
- * 20_util/function_objects/comparisons.cc
- * 20_util/pair
- * 20_util/raw_storage_iterator
- * 20_util/rel_ops.cc
- * 20_util/specialized_algorithms
- * 20_util/specialized_algorithms/16505.cc
- * 20_util/temporary_buffer.cc
- * 26_numerics/numeric_arrays/slice_array
- * 26_numerics/numeric_arrays/slice_array/array_assignment.cc
- * 26_numerics/numeric_arrays/slice_array/requirements
- * 26_numerics/numeric_arrays/slice_array/requirements/
- explicit_instantiation.cc
- * 26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc
- * 26_numerics/numeric_arrays/valarray
- * 26_numerics/numeric_arrays/valarray/27867.cc
- * 26_numerics/numeric_arrays/valarray/28277.cc
- * 26_numerics/numeric_arrays/valarray/30416.cc
- * 26_numerics/numeric_arrays/valarray/algo.cc
- * 26_numerics/numeric_arrays/valarray/binary_closure.cc
- * 26_numerics/numeric_arrays/valarray/const_bracket.cc
- * 26_numerics/numeric_arrays/valarray/dr543.cc
- * 26_numerics/numeric_arrays/valarray/name_lookup.cc
- * 26_numerics/numeric_arrays/valarray/operators.cc
- * 26_numerics/numeric_arrays/valarray/requirements
- * 26_numerics/numeric_arrays/valarray/requirements/
- explicit_instantiation.cc
- * 26_numerics/numeric_arrays/valarray/requirements/typedefs.cc
- * 26_numerics/numeric_arrays/valarray/subset_assignment.cc
- * tr1/2_general_utilities/enable_shared_from_this
- * tr1/2_general_utilities/shared_ptr
- * tr1/2_general_utilities/weak_ptr
-
- Deleted in testsuite:
- * 20_util/functional
- * 20_util/functional/binders
- * 20_util/functional/binders/1.cc
- * 20_util/functional/binders/3113.cc
- * 20_util/functional/comparisons.cc
- * 20_util/memory
- * 20_util/memory/16505.cc
- * 20_util/memory/allocator
- * 20_util/memory/allocator/10378.cc
- * 20_util/memory/allocator/14176.cc
- * 20_util/memory/allocator/1.cc
- * 20_util/memory/allocator/8230.cc
- * 20_util/memory/allocator/requirements
- * 20_util/memory/allocator/requirements/explicit_instantiation
- * 20_util/memory/allocator/requirements/explicit_instantiation/1.cc
- * 20_util/memory/auto_ptr
- * 20_util/memory/auto_ptr/1.cc
- * 20_util/memory/auto_ptr/2.cc
- * 20_util/memory/auto_ptr/3946.cc
- * 20_util/memory/auto_ptr/3.cc
- * 20_util/memory/auto_ptr/4.cc
- * 20_util/memory/auto_ptr/5.cc
- * 20_util/memory/auto_ptr/6.cc
- * 20_util/memory/auto_ptr/7.cc
- * 20_util/memory/auto_ptr/assign_neg.cc
- * 20_util/memory/auto_ptr/requirements
- * 20_util/memory/auto_ptr/requirements/explicit_instantiation
- * 20_util/memory/auto_ptr/requirements/explicit_instantiation/1.cc
- * 20_util/memory/raw_storage_iterator
- * 20_util/memory/raw_storage_iterator/requirements
- * 20_util/memory/raw_storage_iterator/requirements/base_classes.cc
- * 20_util/memory/raw_storage_iterator/requirements/
- explicit_instantiation
- * 20_util/memory/raw_storage_iterator/requirements/
- explicit_instantiation/1.cc
- * 20_util/memory/raw_storage_iterator/requirements/typedefs.cc
- * 20_util/memory/temporary_buffer.cc
- * 20_util/utility
- * 20_util/utility/pair
- * 20_util/utility/pair/1.cc
- * 20_util/utility/pair/2.cc
- * 20_util/utility/pair/3.cc
- * 20_util/utility/pair/4.cc
- * 20_util/utility/pair/requirements
- * 20_util/utility/pair/requirements/explicit_instantiation
- * 20_util/utility/pair/requirements/explicit_instantiation/1.cc
- * 20_util/utility/rel_ops.cc
- * 26_numerics/numeric_arrays/27867.cc
- * 26_numerics/numeric_arrays/28277.cc
- * 26_numerics/numeric_arrays/30416.cc
- * 26_numerics/numeric_arrays/binary_closure.cc
- * 26_numerics/numeric_arrays/dr543.cc
- * 26_numerics/numeric_arrays/slice_array_assignment.cc
- * 26_numerics/numeric_arrays/valarray.cc
- * 26_numerics/numeric_arrays/valarray_const_bracket.cc
- * 26_numerics/numeric_arrays/valarray_name_lookup.cc
- * 26_numerics/numeric_arrays/valarray_operators.cc
- * 26_numerics/numeric_arrays/valarray_subset_assignment.cc
- * tr1/2_general_utilities/memory
- * tr1/2_general_utilities/memory/enable_shared_from_this
- * tr1/2_general_utilities/memory/enable_shared_from_this/1.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/requirements
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- requirements/explicit_instantiation
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- requirements/explicit_instantiation/1.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/shared.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- still_shared.cc
- * tr1/2_general_utilities/memory/shared_ptr
- * tr1/2_general_utilities/memory/shared_ptr/assign
- * tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/
- auto_ptr_rvalue_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/dr541.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc
- * tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/casts
- * tr1/2_general_utilities/memory/shared_ptr/casts/1.cc
- * tr1/2_general_utilities/memory/shared_ptr/comparison
- * tr1/2_general_utilities/memory/shared_ptr/comparison/cmp.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons
- * tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/copy.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/default.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/pointer.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/weak_ptr.cc
- * tr1/2_general_utilities/memory/shared_ptr/cons/weak_ptr_expired.cc
- * tr1/2_general_utilities/memory/shared_ptr/dest
- * tr1/2_general_utilities/memory/shared_ptr/dest/dest.cc
- * tr1/2_general_utilities/memory/shared_ptr/misc
- * tr1/2_general_utilities/memory/shared_ptr/misc/24595.cc
- * tr1/2_general_utilities/memory/shared_ptr/misc/io.cc
- * tr1/2_general_utilities/memory/shared_ptr/misc/swap.cc
- * tr1/2_general_utilities/memory/shared_ptr/modifiers
- * tr1/2_general_utilities/memory/shared_ptr/modifiers/24805.cc
- * tr1/2_general_utilities/memory/shared_ptr/modifiers/reset.cc
- * tr1/2_general_utilities/memory/shared_ptr/modifiers/reset_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/modifiers/swap.cc
- * tr1/2_general_utilities/memory/shared_ptr/modifiers/swap_neg.cc
- * tr1/2_general_utilities/memory/shared_ptr/observers
- * tr1/2_general_utilities/memory/shared_ptr/observers/bool_conv.cc
- * tr1/2_general_utilities/memory/shared_ptr/observers/get.cc
- * tr1/2_general_utilities/memory/shared_ptr/observers/unique.cc
- * tr1/2_general_utilities/memory/shared_ptr/observers/use_count.cc
- * tr1/2_general_utilities/memory/shared_ptr/requirements
- * tr1/2_general_utilities/memory/shared_ptr/requirements/
- explicit_instantiation
- * tr1/2_general_utilities/memory/shared_ptr/requirements/
- explicit_instantiation/1.cc
- * tr1/2_general_utilities/memory/shared_ptr/thread
- * tr1/2_general_utilities/memory/shared_ptr/thread/
- default_weaktoshared.cc
- * tr1/2_general_utilities/memory/shared_ptr/thread/
- mutex_weaktoshared.cc
- * tr1/2_general_utilities/memory/weak_ptr
- * tr1/2_general_utilities/memory/weak_ptr/lock
- * tr1/2_general_utilities/memory/weak_ptr/lock/1.cc
- * tr1/2_general_utilities/memory/weak_ptr/requirements
- * tr1/2_general_utilities/memory/weak_ptr/requirements/
- explicit_instantiation
- * tr1/2_general_utilities/memory/weak_ptr/requirements/
- explicit_instantiation/1.cc
-
-2007-02-20 Benjamin Kosnik <bkoz@redhat.com>
-
- Revamp library API testing.
-
- Added in testsuite:
- * 17_intro/headers
- * 17_intro/headers/all_assert_neg.cc
- * 17_intro/headers/all_c++200x_compatibility.cc
- * 17_intro/headers/all.cc
- * 17_intro/headers/c++1998
- * 17_intro/headers/c++1998/all.cc
- * 17_intro/headers/c++1998/all_multiple_inclusion.cc
- * 17_intro/headers/c++1998/c++_for_c.tar
- * 17_intro/headers/c++1998/c++.tar
- * 17_intro/using_namespace_std.cc
- * 18_support/headers
- * 18_support/headers/cfloat
- * 18_support/headers/cfloat/values.cc
- * 18_support/headers/climits
- * 18_support/headers/climits/values.cc
- * 18_support/headers/csetjmp
- * 18_support/headers/csetjmp/functions_std.cc
- * 18_support/headers/csetjmp/macros.cc
- * 18_support/headers/csetjmp/types_std.cc
- * 18_support/headers/csignal
- * 18_support/headers/csignal/functions_std.cc
- * 18_support/headers/csignal/macros.cc
- * 18_support/headers/csignal/types_std.cc
- * 18_support/headers/cstdarg
- * 18_support/headers/cstdarg/macros.cc
- * 18_support/headers/cstdarg/types_std.cc
- * 18_support/headers/cstddef
- * 18_support/headers/cstddef/macros.cc
- * 18_support/headers/cstddef/types_std.cc
- * 18_support/headers/cstdlib
- * 18_support/headers/cstdlib/functions_std.cc
- * 18_support/headers/cstdlib/macros.cc
- * 18_support/headers/ctime
- * 18_support/headers/ctime/functions_std.cc
- * 18_support/headers/ctime/macros.cc
- * 18_support/headers/ctime/types_std.cc
- * 18_support/headers/exception
- * 18_support/headers/exception/synopsis.cc
- * 18_support/headers/exception/types_std.cc
- * 18_support/headers/limits
- * 18_support/headers/limits/synopsis.cc
- * 18_support/headers/new
- * 18_support/headers/new/synopsis.cc
- * 18_support/headers/new/types_std.cc
- * 18_support/headers/typeinfo
- * 18_support/headers/typeinfo/synopsis.cc
- * 18_support/headers/typeinfo/types_std.cc
- * 18_support/numeric_limits/is_signed.cc
- * 18_support/numeric_limits/requirements
- * 18_support/numeric_limits/requirements/explicit_instantiation
- * 18_support/numeric_limits/requirements/explicit_instantiation/1.cc
- * 18_support/numeric_limits/specialization_default_values.cc
- * 19_diagnostics/headers
- * 19_diagnostics/headers/cassert
- * 19_diagnostics/headers/cassert/macros.cc
- * 19_diagnostics/headers/cerrno
- * 19_diagnostics/headers/cerrno/macros.cc
- * 19_diagnostics/headers/stdexcept
- * 19_diagnostics/headers/stdexcept/synopsis.cc
- * 19_diagnostics/headers/stdexcept/types_std.cc
- * 20_util/headers
- * 20_util/headers/cstdlib
- * 20_util/headers/cstdlib/functions_std.cc
- * 20_util/headers/cstring
- * 20_util/headers/cstring/functions_std.cc
- * 20_util/headers/cstring/macros.cc
- * 20_util/headers/cstring/types_std.cc
- * 20_util/headers/ctime
- * 20_util/headers/ctime/functions_std.cc
- * 20_util/headers/ctime/macros.cc
- * 20_util/headers/ctime/types_std.cc
- * 20_util/headers/functional
- * 20_util/headers/functional/synopsis.cc
- * 20_util/headers/memory
- * 20_util/headers/memory/synopsis.cc
- * 20_util/headers/utility
- * 20_util/headers/utility/synopsis.cc
- * 20_util/headers/utility/using_namespace_std_rel_ops.cc
- * 20_util/memory/allocator/requirements
- * 20_util/memory/allocator/requirements/explicit_instantiation
- * 20_util/memory/allocator/requirements/explicit_instantiation/1.cc
- * 20_util/memory/auto_ptr/requirements
- * 20_util/memory/auto_ptr/requirements/explicit_instantiation
- * 20_util/memory/auto_ptr/requirements/explicit_instantiation/1.cc
- * 20_util/memory/raw_storage_iterator
- * 20_util/memory/raw_storage_iterator/requirements
- * 20_util/memory/raw_storage_iterator/requirements/base_classes.cc
- * 20_util/memory/raw_storage_iterator/requirements/
- explicit_instantiation
- * 20_util/memory/raw_storage_iterator/requirements/
- explicit_instantiation/1.cc
- * 20_util/memory/raw_storage_iterator/requirements/typedefs.cc
- * 20_util/utility/pair/requirements
- * 20_util/utility/pair/requirements/explicit_instantiation
- * 20_util/utility/pair/requirements/explicit_instantiation/1.cc
- * 21_strings/basic_string/requirements
- * 21_strings/basic_string/requirements/explicit_instantiation
- * 21_strings/basic_string/requirements/explicit_instantiation/1.cc
- * 21_strings/basic_string/requirements/explicit_instantiation/debug.cc
- * 21_strings/headers
- * 21_strings/headers/cctype
- * 21_strings/headers/cctype/functions_std.cc
- * 21_strings/headers/cstdlib
- * 21_strings/headers/cstdlib/functions_std.cc
- * 21_strings/headers/cstdlib/macros.cc
- * 21_strings/headers/cstring
- * 21_strings/headers/cstring/functions_std.cc
- * 21_strings/headers/cstring/macros.cc
- * 21_strings/headers/cstring/types_std.cc
- * 21_strings/headers/cwchar
- * 21_strings/headers/cwchar/functions_std.cc
- * 21_strings/headers/cwchar/macros.cc
- * 21_strings/headers/cwchar/types_std.cc
- * 21_strings/headers/cwctype
- * 21_strings/headers/cwctype/functions_std.cc
- * 21_strings/headers/cwctype/macros.cc
- * 21_strings/headers/cwctype/types_std.cc
- * 21_strings/headers/string
- * 21_strings/headers/string/synopsis.cc
- * 21_strings/headers/string/types_std.cc
- * 22_locale/codecvt_byname/requirements
- * 22_locale/codecvt_byname/requirements/base_classes.cc
- * 22_locale/codecvt_byname/requirements/explicit_instantiation.cc
- * 22_locale/codecvt_byname/requirements/typedefs.cc
- * 22_locale/codecvt/requirements
- * 22_locale/codecvt/requirements/base_classes.cc
- * 22_locale/codecvt/requirements/explicit_instantiation.cc
- * 22_locale/codecvt/requirements/typedefs.cc
- * 22_locale/collate_byname/requirements
- * 22_locale/collate_byname/requirements/base_classes.cc
- * 22_locale/collate_byname/requirements/explicit_instantiation.cc
- * 22_locale/collate_byname/requirements/typedefs.cc
- * 22_locale/collate/requirements
- * 22_locale/collate/requirements/base_classes.cc
- * 22_locale/collate/requirements/explicit_instantiation.cc
- * 22_locale/collate/requirements/typedefs.cc
- * 22_locale/ctype_base/mask.cc
- * 22_locale/ctype/requirements
- * 22_locale/ctype/requirements/base_classes.cc
- * 22_locale/ctype/requirements/explicit_instantiation.cc
- * 22_locale/ctype/requirements/typedefs.cc
- * 22_locale/headers
- * 22_locale/headers/clocale
- * 22_locale/headers/clocale/functions_std.cc
- * 22_locale/headers/clocale/macros.cc
- * 22_locale/headers/clocale/types_std.cc
- * 22_locale/headers/locale
- * 22_locale/headers/locale/synopsis.cc
- * 22_locale/headers/locale/types_std.cc
- * 22_locale/messages_byname/requirements
- * 22_locale/messages_byname/requirements/base_classes.cc
- * 22_locale/messages_byname/requirements/explicit_instantiation.cc
- * 22_locale/messages_byname/requirements/typedefs.cc
- * 22_locale/messages/requirements
- * 22_locale/messages/requirements/base_classes.cc
- * 22_locale/messages/requirements/explicit_instantiation.cc
- * 22_locale/messages/requirements/typedefs.cc
- * 22_locale/money_get/cons
- * 22_locale/money_get/cons/3.cc
- * 22_locale/money_get/requirements
- * 22_locale/money_get/requirements/base_classes.cc
- * 22_locale/money_get/requirements/explicit_instantiations.cc
- * 22_locale/money_get/requirements/typedefs.cc
- * 22_locale/moneypunct_byname/requirements
- * 22_locale/moneypunct_byname/requirements/base_classes.cc
- * 22_locale/moneypunct_byname/requirements/explicit_instantiation.cc
- * 22_locale/moneypunct_byname/requirements/typedefs.cc
- * 22_locale/moneypunct/requirements
- * 22_locale/moneypunct/requirements/false
- * 22_locale/moneypunct/requirements/false/base_classes.cc
- * 22_locale/moneypunct/requirements/false/explicit_instantiation.cc
- * 22_locale/moneypunct/requirements/false/intl.cc
- * 22_locale/moneypunct/requirements/false/typedefs.cc
- * 22_locale/moneypunct/requirements/true
- * 22_locale/moneypunct/requirements/true/base_classes.cc
- * 22_locale/moneypunct/requirements/true/explicit_instantiation.cc
- * 22_locale/moneypunct/requirements/true/intl.cc
- * 22_locale/moneypunct/requirements/true/typedefs.cc
- * 22_locale/money_put/cons
- * 22_locale/money_put/cons/3.cc
- * 22_locale/money_put/requirements
- * 22_locale/money_put/requirements/base_classes.cc
- * 22_locale/money_put/requirements/explicit_instantiation.cc
- * 22_locale/money_put/requirements/typedefs.cc
- * 22_locale/num_get/cons
- * 22_locale/num_get/cons/3.cc
- * 22_locale/num_get/requirements
- * 22_locale/num_get/requirements/base_classes.cc
- * 22_locale/num_get/requirements/explicit_instantiation.cc
- * 22_locale/num_get/requirements/typedefs.cc
- * 22_locale/numpunct_byname/requirements
- * 22_locale/numpunct_byname/requirements/base_classes.cc
- * 22_locale/numpunct_byname/requirements/explicit_instantiations.cc
- * 22_locale/numpunct_byname/requirements/typedefs.cc
- * 22_locale/numpunct/requirements
- * 22_locale/numpunct/requirements/base_classes.cc
- * 22_locale/numpunct/requirements/explicit_instantiations.cc
- * 22_locale/numpunct/requirements/typedefs.cc
- * 22_locale/num_put/cons
- * 22_locale/num_put/cons/3.cc
- * 22_locale/num_put/requirements
- * 22_locale/num_put/requirements/base_classes.cc
- * 22_locale/num_put/requirements/explicit_instantiations.cc
- * 22_locale/num_put/requirements/typedefs.cc
- * 22_locale/time_get/requirements
- * 22_locale/time_get/requirements/base_classes.cc
- * 22_locale/time_get/requirements/explicit_instantiations.cc
- * 22_locale/time_get/requirements/typedefs.cc
- * 22_locale/time_put/requirements
- * 22_locale/time_put/requirements/base_classes.cc
- * 22_locale/time_put/requirements/explicit_instantiations.cc
- * 22_locale/time_put/requirements/typedefs.cc
- * 23_containers/bitset/requirements
- * 23_containers/bitset/requirements/explicit_instantiation
- * 23_containers/bitset/requirements/explicit_instantiation/1.cc
- * 23_containers/deque/requirements
- * 23_containers/deque/requirements/explicit_instantiation
- * 23_containers/deque/requirements/partial_specialization
- * 23_containers/deque/requirements/partial_specialization/1.cc
- * 23_containers/headers
- * 23_containers/headers/bitset
- * 23_containers/headers/bitset/synopsis.cc
- * 23_containers/headers/deque
- * 23_containers/headers/deque/synopsis.cc
- * 23_containers/headers/list
- * 23_containers/headers/list/synopsis.cc
- * 23_containers/headers/map
- * 23_containers/headers/map/synopsis.cc
- * 23_containers/headers/queue
- * 23_containers/headers/queue/synopsis.cc
- * 23_containers/headers/set
- * 23_containers/headers/set/synopsis.cc
- * 23_containers/headers/stack
- * 23_containers/headers/stack/synopsis.cc
- * 23_containers/headers/vector
- * 23_containers/headers/vector/synopsis.cc
- * 23_containers/list/requirements
- * 23_containers/list/requirements/explicit_instantiation
- * 23_containers/list/requirements/partial_specialization
- * 23_containers/list/requirements/partial_specialization/1.cc
- * 23_containers/map/requirements
- * 23_containers/map/requirements/explicit_instantiation
- * 23_containers/map/requirements/partial_specialization
- * 23_containers/map/requirements/partial_specialization/1.cc
- * 23_containers/multimap/requirements
- * 23_containers/multimap/requirements/explicit_instantiation
- * 23_containers/multimap/requirements/partial_specialization
- * 23_containers/multimap/requirements/partial_specialization/1.cc
- * 23_containers/multiset/requirements
- * 23_containers/multiset/requirements/explicit_instantiation
- * 23_containers/multiset/requirements/partial_specialization
- * 23_containers/multiset/requirements/partial_specialization/1.cc
- * 23_containers/priority_queue/requirements
- * 23_containers/priority_queue/requirements/explicit_instantiation
- * 23_containers/priority_queue/requirements/explicit_instantiation/1.cc
- * 23_containers/queue/requirements
- * 23_containers/queue/requirements/explicit_instantiation
- * 23_containers/queue/requirements/explicit_instantiation/1.cc
- * 23_containers/set/requirements
- * 23_containers/set/requirements/explicit_instantiation
- * 23_containers/set/requirements/partial_specialization
- * 23_containers/set/requirements/partial_specialization/1.cc
- * 23_containers/stack/requirements
- * 23_containers/stack/requirements/explicit_instantiation
- * 23_containers/stack/requirements/explicit_instantiation/1.cc
- * 23_containers/vector/requirements
- * 23_containers/vector/requirements/explicit_instantiation
- * 23_containers/vector/requirements/partial_specialization
- * 23_containers/vector/requirements/partial_specialization/1.cc
- * 24_iterators/back_insert_iterator
- * 24_iterators/back_insert_iterator/2.cc
- * 24_iterators/back_insert_iterator/requirements
- * 24_iterators/back_insert_iterator/requirements/base_classes.cc
- * 24_iterators/back_insert_iterator/requirements/container.cc
- * 24_iterators/back_insert_iterator/requirements/
- explicit_instantiation.cc
- * 24_iterators/back_insert_iterator/requirements/typedefs.cc
- * 24_iterators/front_insert_iterator
- * 24_iterators/front_insert_iterator/2.cc
- * 24_iterators/front_insert_iterator/requirements
- * 24_iterators/front_insert_iterator/requirements/base_classes.cc
- * 24_iterators/front_insert_iterator/requirements/container.cc
- * 24_iterators/front_insert_iterator/requirements/
- explicit_instantiation.cc
- * 24_iterators/front_insert_iterator/requirements/typedefs.cc
- * 24_iterators/headers
- * 24_iterators/headers/iterator
- * 24_iterators/headers/iterator/synopsis.cc
- * 24_iterators/headers/iterator/types_std.cc
- * 24_iterators/insert_iterator
- * 24_iterators/insert_iterator/2.cc
- * 24_iterators/insert_iterator/requirements
- * 24_iterators/insert_iterator/requirements/base_classes.cc
- * 24_iterators/insert_iterator/requirements/container.cc
- * 24_iterators/insert_iterator/requirements/explicit_instantiation.cc
- * 24_iterators/insert_iterator/requirements/typedefs.cc
- * 24_iterators/istreambuf_iterator/requirements
- * 24_iterators/istreambuf_iterator/requirements/base_classes.cc
- * 24_iterators/istreambuf_iterator/requirements/
- explicit_instantiation.cc
- * 24_iterators/istreambuf_iterator/requirements/typedefs.cc
- * 24_iterators/istream_iterator
- * 24_iterators/istream_iterator/2.cc
- * 24_iterators/istream_iterator/requirements
- * 24_iterators/istream_iterator/requirements/base_classes.cc
- * 24_iterators/istream_iterator/requirements/explicit_instantiation.cc
- * 24_iterators/istream_iterator/requirements/typedefs.cc
- * 24_iterators/ostreambuf_iterator/requirements
- * 24_iterators/ostreambuf_iterator/requirements/base_classes.cc
- * 24_iterators/ostreambuf_iterator/requirements/
- explicit_instantiation.cc
- * 24_iterators/ostreambuf_iterator/requirements/typedefs.cc
- * 24_iterators/ostream_iterator
- * 24_iterators/ostream_iterator/requirements
- * 24_iterators/ostream_iterator/requirements/base_classes.cc
- * 24_iterators/ostream_iterator/requirements/explicit_instantiation.cc
- * 24_iterators/ostream_iterator/requirements/typedefs.cc
- * 24_iterators/random_access_iterator
- * 24_iterators/random_access_iterator/26020.cc
- * 24_iterators/random_access_iterator/string_vector_iterators.cc
- * 24_iterators/reverse_iterator/requirements
- * 24_iterators/reverse_iterator/requirements/base_classes.cc
- * 24_iterators/reverse_iterator/requirements/current.cc
- * 24_iterators/reverse_iterator/requirements/explicit_instantiation.cc
- * 24_iterators/reverse_iterator/requirements/typedefs.cc
- * 25_algorithms/headers
- * 25_algorithms/headers/algorithm
- * 25_algorithms/headers/algorithm/synopsis.cc
- * 25_algorithms/headers/cstdlib
- * 25_algorithms/headers/cstdlib/functions_std.cc
- * 26_numerics/headers
- * 26_numerics/headers/cmath
- * 26_numerics/headers/cmath/19322.cc
- * 26_numerics/headers/cmath/c99_classification_macros_c.cc
- * 26_numerics/headers/cmath/c99_classification_macros_c++.cc
- * 26_numerics/headers/cmath/c_math.cc
- * 26_numerics/headers/cmath/c_math_dynamic.cc
- * 26_numerics/headers/cmath/fabs_inline.cc
- * 26_numerics/headers/cmath/functions_std.cc
- * 26_numerics/headers/cmath/macros.cc
- * 26_numerics/headers/cmath/overloads.cc
- * 26_numerics/headers/cmath/powi.cc
- * 26_numerics/headers/complex
- * 26_numerics/headers/complex/synopsis.cc
- * 26_numerics/headers/cstdlib
- * 26_numerics/headers/cstdlib/13943.cc
- * 26_numerics/headers/cstdlib/2190.cc
- * 26_numerics/headers/cstdlib/functions_std.cc
- * 26_numerics/headers/cstdlib/macros.cc
- * 26_numerics/headers/cstdlib/types_std.cc
- * 26_numerics/headers/numeric
- * 26_numerics/headers/numeric/synopsis.cc
- * 26_numerics/headers/valarray
- * 26_numerics/headers/valarray/synopsis.cc
- * 26_numerics/headers/valarray/types_std.cc
- * 26_numerics/numeric_arrays
- * 26_numerics/numeric_operations
- * 27_io/basic_filebuf/cons/2020.cc
- * 27_io/basic_filebuf/requirements
- * 27_io/basic_filebuf/requirements/base_classes.cc
- * 27_io/basic_filebuf/requirements/explicit_instantiation.cc
- * 27_io/basic_filebuf/requirements/typedefs.cc
- * 27_io/basic_fstream/cons
- * 27_io/basic_fstream/cons/3.cc
- * 27_io/basic_fstream/requirements
- * 27_io/basic_fstream/requirements/base_classes.cc
- * 27_io/basic_fstream/requirements/explicit_instantiation.cc
- * 27_io/basic_fstream/requirements/typedefs.cc
- * 27_io/basic_ifstream/cons/2020.cc
- * 27_io/basic_ifstream/requirements
- * 27_io/basic_ifstream/requirements/base_classes.cc
- * 27_io/basic_ifstream/requirements/explicit_instantiation.cc
- * 27_io/basic_ifstream/requirements/typedefs.cc
- * 27_io/basic_ios/cons/2020.cc
- * 27_io/basic_ios/requirements
- * 27_io/basic_ios/requirements/base_classes.cc
- * 27_io/basic_ios/requirements/explicit_instantiation.cc
- * 27_io/basic_ios/requirements/typedefs.cc
- * 27_io/basic_iostream/cons
- * 27_io/basic_iostream/cons/2020.cc
- * 27_io/basic_iostream/requirements
- * 27_io/basic_iostream/requirements/base_classes.cc
- * 27_io/basic_iostream/requirements/explicit_instantiation.cc
- * 27_io/basic_iostream/requirements/typedefs.cc
- * 27_io/basic_istream/cons
- * 27_io/basic_istream/cons/3.cc
- * 27_io/basic_istream/requirements
- * 27_io/basic_istream/requirements/base_classes.cc
- * 27_io/basic_istream/requirements/explicit_instantiation.cc
- * 27_io/basic_istream/requirements/typedefs.cc
- * 27_io/basic_istringstream/cons
- * 27_io/basic_istringstream/cons/2020.cc
- * 27_io/basic_istringstream/requirements
- * 27_io/basic_istringstream/requirements/base_classes.cc
- * 27_io/basic_istringstream/requirements/explicit_instantiation.cc
- * 27_io/basic_istringstream/requirements/typedefs.cc
- * 27_io/basic_ofstream/cons/2020.cc
- * 27_io/basic_ofstream/requirements
- * 27_io/basic_ofstream/requirements/base_classes.cc
- * 27_io/basic_ofstream/requirements/explicit_instantiations.cc
- * 27_io/basic_ofstream/requirements/typedefs.cc
- * 27_io/basic_ostream/cons/2020.cc
- * 27_io/basic_ostream/requirements
- * 27_io/basic_ostream/requirements/base_classes.cc
- * 27_io/basic_ostream/requirements/explicit_instantiation.cc
- * 27_io/basic_ostream/requirements/typedefs.cc
- * 27_io/basic_ostringstream/cons/2020.cc
- * 27_io/basic_ostringstream/requirements
- * 27_io/basic_ostringstream/requirements/base_classes.cc
- * 27_io/basic_ostringstream/requirements/explicit_instantiation.cc
- * 27_io/basic_ostringstream/requirements/typedefs.cc
- * 27_io/basic_streambuf/cons/2020.cc
- * 27_io/basic_streambuf/requirements
- * 27_io/basic_streambuf/requirements/base_classes.cc
- * 27_io/basic_streambuf/requirements/typedefs.cc
- * 27_io/basic_stringbuf/cons/2020.cc
- * 27_io/basic_stringbuf/requirements
- * 27_io/basic_stringbuf/requirements/base_classes.cc
- * 27_io/basic_stringbuf/requirements/explicit_instantiation
- * 27_io/basic_stringbuf/requirements/explicit_instantiation/2.cc
- * 27_io/basic_stringbuf/requirements/explicit_instantiation/4.cc
- * 27_io/basic_stringbuf/requirements/typedefs.cc
- * 27_io/basic_stringstream/cons
- * 27_io/basic_stringstream/cons/2020.cc
- * 27_io/basic_stringstream/requirements
- * 27_io/basic_stringstream/requirements/base_classes.cc
- * 27_io/basic_stringstream/requirements/explicit_instantiation.cc
- * 27_io/basic_stringstream/requirements/typedefs.cc
- * 27_io/fpos/requirements
- * 27_io/fpos/requirements/explicit_instantiation.cc
- * 27_io/headers
- * 27_io/headers/cstdio
- * 27_io/headers/cstdio/functions_std.cc
- * 27_io/headers/cstdio/macros.cc
- * 27_io/headers/cstdio/types_std.cc
- * 27_io/headers/cstdlib
- * 27_io/headers/fstream
- * 27_io/headers/fstream/synopsis.cc
- * 27_io/headers/fstream/types_std.cc
- * 27_io/headers/iomanip
- * 27_io/headers/iomanip/synopsis.cc
- * 27_io/headers/ios
- * 27_io/headers/ios/synopsis.cc
- * 27_io/headers/iostream
- * 27_io/headers/iostream/synopsis.cc
- * 27_io/headers/iostream/types_std.cc
- * 27_io/headers/ios/types_std.cc
- * 27_io/headers/istream
- * 27_io/headers/istream/synopsis.cc
- * 27_io/headers/istream/types_std.cc
- * 27_io/headers/ostream
- * 27_io/headers/ostream/synopsis.cc
- * 27_io/headers/ostream/types_std.cc
- * 27_io/headers/sstream
- * 27_io/headers/sstream/synopsis.cc
- * 27_io/headers/sstream/types_std.cc
- * 27_io/headers/streambuf
- * 27_io/headers/streambuf/synopsis.cc
- * 27_io/headers/streambuf/types_std.cc
- * ext/debug_allocator/explicit_instantiation.cc
- * ext/hash_map/requirements
- * ext/hash_map/requirements/explicit_instantiation.cc
- * ext/hash_set/requirements
- * ext/hash_set/requirements/explicit_instantiation.cc
- * ext/malloc_allocator/explicit_instantiation.cc
- * ext/mt_allocator/explicit_instantiation.cc
- * ext/pool_allocator/explicit_instantiation.cc
- * ext/slist/requirements
- * ext/slist/requirements/explicit_instantiation.cc
- * ext/stdio_filebuf/requirements
- * ext/stdio_filebuf/requirements/explicit_instantiation.cc
- * ext/vstring/requirements
- * ext/vstring/requirements/explicit_instantiation
- * tr1/2_general_utilities/headers
- * tr1/2_general_utilities/headers/functional
- * tr1/2_general_utilities/headers/functional/synopsis.cc
- * tr1/2_general_utilities/headers/memory
- * tr1/2_general_utilities/headers/memory/synopsis.cc
- * tr1/2_general_utilities/headers/memory/types_std_tr1.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/requirements
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- requirements/explicit_instantiation
- * tr1/2_general_utilities/memory/shared_ptr/requirements
- * tr1/2_general_utilities/memory/shared_ptr/requirements/
- explicit_instantiation
- * tr1/2_general_utilities/memory/weak_ptr/requirements
- * tr1/2_general_utilities/memory/weak_ptr/requirements/
- explicit_instantiation
- * tr1/3_function_objects/headers
- * tr1/3_function_objects/headers/functional
- * tr1/3_function_objects/headers/functional/synopsis.cc
- * tr1/3_function_objects/headers/functional/types_std_tr1.cc
- * tr1/3_function_objects/headers/functional/
- using_namespace_std_tr1_placeholders.cc
- * tr1/4_metaprogramming/headers
- * tr1/4_metaprogramming/headers/type_traits
- * tr1/4_metaprogramming/headers/type_traits/synopsis.cc
- * tr1/4_metaprogramming/headers/type_traits/types_std_tr1.cc
- * tr1/5_numerical_facilities/headers
- * tr1/5_numerical_facilities/headers/random
- * tr1/5_numerical_facilities/headers/random/synopsis.cc
- * tr1/5_numerical_facilities/headers/random/types_std_tr1.cc
- * tr1/5_numerical_facilities/random/discard_block/
- requirements/typedefs.cc
- * tr1/6_containers/array/requirements/explicit_instantiation.cc
- * tr1/6_containers/hash
- * tr1/6_containers/hash/requirements
- * tr1/6_containers/hash/requirements/base_classes.cc
- * tr1/6_containers/hash/requirements/explicit_instantiation.cc
- * tr1/6_containers/headers
- * tr1/6_containers/headers/array
- * tr1/6_containers/headers/array/synopsis.cc
- * tr1/6_containers/headers/functional
- * tr1/6_containers/headers/functional/synopsis.cc
- * tr1/6_containers/headers/tuple
- * tr1/6_containers/headers/tuple/synopsis.cc
- * tr1/6_containers/headers/tuple/types_std_tr1.cc
- * tr1/6_containers/headers/unordered_map
- * tr1/6_containers/headers/unordered_map/synopsis.cc
- * tr1/6_containers/headers/unordered_set
- * tr1/6_containers/headers/unordered_set/synopsis.cc
- * tr1/6_containers/tuple/requirements
- * tr1/6_containers/tuple/requirements/explicit_instantiation.cc
- * tr1/6_containers/unordered_map
- * tr1/6_containers/unordered_map/24064.cc
- * tr1/6_containers/unordered_map/capacity
- * tr1/6_containers/unordered_map/capacity/29134-map.cc
- * tr1/6_containers/unordered_map/erase
- * tr1/6_containers/unordered_map/erase/24061-map.cc
- * tr1/6_containers/unordered_map/find
- * tr1/6_containers/unordered_map/find/map1.cc
- * tr1/6_containers/unordered_map/insert
- * tr1/6_containers/unordered_map/insert/24061-map.cc
- * tr1/6_containers/unordered_map/insert/array_syntax.cc
- * tr1/6_containers/unordered_map/insert/map_range.cc
- * tr1/6_containers/unordered_map/insert/map_single.cc
- * tr1/6_containers/unordered_map/requirements
- * tr1/6_containers/unordered_map/requirements/explicit_instantiation.cc
- * tr1/6_containers/unordered_map/requirements/iterator_neg.cc
- * tr1/6_containers/unordered_map/requirements/iterator_null_neg.cc
- * tr1/6_containers/unordered_map/swap
- * tr1/6_containers/unordered_map/swap/1.cc
- * tr1/6_containers/unordered_map/swap/2.cc
- * tr1/6_containers/unordered_multimap
- * tr1/6_containers/unordered_multimap/capacity
- * tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
- * tr1/6_containers/unordered_multimap/erase
- * tr1/6_containers/unordered_multimap/erase/24061-multimap.cc
- * tr1/6_containers/unordered_multimap/find
- * tr1/6_containers/unordered_multimap/find/multimap1.cc
- * tr1/6_containers/unordered_multimap/insert
- * tr1/6_containers/unordered_multimap/insert/24061-multimap.cc
- * tr1/6_containers/unordered_multimap/insert/multimap_range.cc
- * tr1/6_containers/unordered_multimap/insert/multimap_single.cc
- * tr1/6_containers/unordered_multimap/requirements
- * tr1/6_containers/unordered_multimap/requirements/
- explicit_instantiation.cc
- * tr1/6_containers/unordered_multimap/requirements/iterator_neg.cc
- * tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc
- * tr1/6_containers/unordered_multimap/swap
- * tr1/6_containers/unordered_multimap/swap/1.cc
- * tr1/6_containers/unordered_multimap/swap/2.cc
- * tr1/6_containers/unordered_multiset
- * tr1/6_containers/unordered_multiset/24054.cc
- * tr1/6_containers/unordered_multiset/capacity
- * tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
- * tr1/6_containers/unordered_multiset/erase
- * tr1/6_containers/unordered_multiset/erase/24061-multiset.cc
- * tr1/6_containers/unordered_multiset/find
- * tr1/6_containers/unordered_multiset/find/multiset1.cc
- * tr1/6_containers/unordered_multiset/insert
- * tr1/6_containers/unordered_multiset/insert/24061-multiset.cc
- * tr1/6_containers/unordered_multiset/insert/multiset_range.cc
- * tr1/6_containers/unordered_multiset/insert/multiset_single.cc
- * tr1/6_containers/unordered_multiset/requirements
- * tr1/6_containers/unordered_multiset/requirements/
- explicit_instantiation.cc
- * tr1/6_containers/unordered_multiset/requirements/iterator_neg.cc
- * tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc
- * tr1/6_containers/unordered_multiset/swap
- * tr1/6_containers/unordered_multiset/swap/1.cc
- * tr1/6_containers/unordered_multiset/swap/2.cc
- * tr1/6_containers/unordered_set
- * tr1/6_containers/unordered_set/23053.cc
- * tr1/6_containers/unordered_set/23465.cc
- * tr1/6_containers/unordered_set/26127.cc
- * tr1/6_containers/unordered_set/26132.cc
- * tr1/6_containers/unordered_set/capacity
- * tr1/6_containers/unordered_set/capacity/29134-set.cc
- * tr1/6_containers/unordered_set/erase
- * tr1/6_containers/unordered_set/erase/24061-set.cc
- * tr1/6_containers/unordered_set/find
- * tr1/6_containers/unordered_set/find/set1.cc
- * tr1/6_containers/unordered_set/insert
- * tr1/6_containers/unordered_set/insert/24061-set.cc
- * tr1/6_containers/unordered_set/insert/set_range.cc
- * tr1/6_containers/unordered_set/insert/set_single.cc
- * tr1/6_containers/unordered_set/requirements
- * tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc
- * tr1/6_containers/unordered_set/requirements/iterator_neg.cc
- * tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc
- * tr1/6_containers/unordered_set/requirements/
- iterators_default_constructor.cc
- * tr1/6_containers/unordered_set/swap
- * tr1/6_containers/unordered_set/swap/1.cc
- * tr1/6_containers/unordered_set/swap/2.cc
- * tr1/using_namespace_std_tr1.cc
-
- Deleted in testsuite:
- * 17_intro/header_cassert.cc
- * 17_intro/header_cerrno.cc
- * 17_intro/header_csetjmp.cc
- * 17_intro/header_cstdarg.cc
- * 17_intro/header_cstddef.cc
- * 17_intro/header_cstdio.cc
- * 17_intro/header_cstdlib.cc
- * 17_intro/header_cstring.cc
- * 17_intro/header_ctime.cc
- * 17_intro/header_cwchar.cc
- * 17_intro/header_cwctype.cc
- * 17_intro/header_fstream.cc
- * 17_intro/header_iomanip.cc
- * 17_intro/header_ios.cc
- * 17_intro/header_iosfwd.cc
- * 17_intro/header_iostream.cc
- * 17_intro/header_istream.cc
- * 17_intro/header_ostream.cc
- * 17_intro/headers.cc
- * 17_intro/headers_c++_c++0x_compat.cc
- * 17_intro/headers_c.cc
- * 17_intro/headers_c++.cc
- * 17_intro/header_sstream.cc
- * 17_intro/header_streambuf.cc
- * 17_intro/no_assert_neg.cc
- * 18_support/numeric_limits/sign.cc
- * 18_support/numeric_limits/specialization.cc
- * 20_util/memory/raw_storage_iterator.cc
- * 21_strings/basic_string/1.cc
- * 21_strings/basic_string/2.cc
- * 22_locale/codecvt/1.cc
- * 22_locale/codecvt/2.cc
- * 22_locale/codecvt_byname/1.cc
- * 22_locale/collate/1.cc
- * 22_locale/collate/2.cc
- * 22_locale/collate_byname/1.cc
- * 22_locale/ctype/1.cc
- * 22_locale/ctype_base/1.cc
- * 22_locale/messages/1.cc
- * 22_locale/messages/2.cc
- * 22_locale/messages_byname/1.cc
- * 22_locale/money_get/1.cc
- * 22_locale/money_get/2.cc
- * 22_locale/money_get/3.cc
- * 22_locale/moneypunct/1.cc
- * 22_locale/moneypunct/2.cc
- * 22_locale/moneypunct/3.cc
- * 22_locale/moneypunct_byname/1.cc
- * 22_locale/money_put/1.cc
- * 22_locale/money_put/2.cc
- * 22_locale/money_put/3.cc
- * 22_locale/num_get/1.cc
- * 22_locale/num_get/2.cc
- * 22_locale/num_get/3.cc
- * 22_locale/numpunct/1.cc
- * 22_locale/numpunct/2.cc
- * 22_locale/numpunct_byname/1.cc
- * 22_locale/num_put/1.cc
- * 22_locale/num_put/2.cc
- * 22_locale/num_put/3.cc
- * 22_locale/time_get/1.cc
- * 22_locale/time_get/2.cc
- * 22_locale/time_put/1.cc
- * 22_locale/time_put/2.cc
- * 23_containers/deque/1.cc
- * 23_containers/deque/explicit_instantiation
- * 23_containers/deque/explicit_instantiation/1.cc
- * 23_containers/deque/explicit_instantiation/2.cc
- * 23_containers/deque/explicit_instantiation/3.cc
- * 23_containers/list/1.cc
- * 23_containers/list/explicit_instantiation
- * 23_containers/list/explicit_instantiation/1.cc
- * 23_containers/list/explicit_instantiation/2.cc
- * 23_containers/list/explicit_instantiation/3.cc
- * 23_containers/map/1.cc
- * 23_containers/map/explicit_instantiation
- * 23_containers/map/explicit_instantiation/1.cc
- * 23_containers/map/explicit_instantiation/2.cc
- * 23_containers/map/explicit_instantiation/3.cc
- * 23_containers/multimap/1.cc
- * 23_containers/multimap/explicit_instantiation
- * 23_containers/multimap/explicit_instantiation/1.cc
- * 23_containers/multimap/explicit_instantiation/2.cc
- * 23_containers/multimap/explicit_instantiation/3.cc
- * 23_containers/multiset/1.cc
- * 23_containers/multiset/explicit_instantiation
- * 23_containers/multiset/explicit_instantiation/1.cc
- * 23_containers/multiset/explicit_instantiation/2.cc
- * 23_containers/multiset/explicit_instantiation/3.cc
- * 23_containers/set/1.cc
- * 23_containers/set/explicit_instantiation
- * 23_containers/set/explicit_instantiation/1.cc
- * 23_containers/set/explicit_instantiation/2.cc
- * 23_containers/set/explicit_instantiation/3.cc
- * 23_containers/vector/1.cc
- * 23_containers/vector/explicit_instantiation
- * 23_containers/vector/explicit_instantiation/1.cc
- * 23_containers/vector/explicit_instantiation/2.cc
- * 23_containers/vector/explicit_instantiation/3.cc
- * 24_iterators/26020.cc
- * 24_iterators/back_insert_iterator.cc
- * 24_iterators/front_insert_iterator.cc
- * 24_iterators/insert_iterator.cc
- * 24_iterators/istreambuf_iterator/1.cc
- * 24_iterators/istream_iterator.cc
- * 24_iterators/iterator.cc
- * 24_iterators/ostreambuf_iterator/1.cc
- * 24_iterators/ostream_iterator.cc
- * 24_iterators/reverse_iterator/1.cc
- * 26_numerics/cmath
- * 26_numerics/cmath/19322.cc
- * 26_numerics/cmath/c99_classification_macros_c.cc
- * 26_numerics/cmath/c99_classification_macros_c++.cc
- * 26_numerics/cmath/c_math.cc
- * 26_numerics/cmath/c_math_dynamic.cc
- * 26_numerics/cmath/fabs_inline.cc
- * 26_numerics/cmath/overloads.cc
- * 26_numerics/cmath/powi.cc
- * 26_numerics/cstdlib
- * 26_numerics/cstdlib/13943.cc
- * 26_numerics/numeric
- * 26_numerics/numeric/sum_diff.cc
- * 26_numerics/valarray
- * 26_numerics/valarray/27867.cc
- * 26_numerics/valarray/28277.cc
- * 26_numerics/valarray/30416.cc
- * 26_numerics/valarray/binary_closure.cc
- * 26_numerics/valarray/dr543.cc
- * 26_numerics/valarray/slice_array_assignment.cc
- * 26_numerics/valarray/slice.cc
- * 26_numerics/valarray/valarray.cc
- * 26_numerics/valarray/valarray_const_bracket.cc
- * 26_numerics/valarray/valarray_name_lookup.cc
- * 26_numerics/valarray/valarray_operators.cc
- * 26_numerics/valarray/valarray_subset_assignment.cc
- * 27_io/basic_filebuf/1.cc
- * 27_io/basic_filebuf/2.cc
- * 27_io/basic_filebuf/3.cc
- * 27_io/basic_filebuf/4.cc
- * 27_io/basic_fstream/1.cc
- * 27_io/basic_fstream/2.cc
- * 27_io/basic_fstream/3.cc
- * 27_io/basic_fstream/4.cc
- * 27_io/basic_ifstream/1.cc
- * 27_io/basic_ifstream/2.cc
- * 27_io/basic_ifstream/3.cc
- * 27_io/basic_ifstream/4.cc
- * 27_io/basic_ios/1.cc
- * 27_io/basic_ios/2.cc
- * 27_io/basic_ios/3.cc
- * 27_io/basic_ios/4.cc
- * 27_io/basic_iostream/1.cc
- * 27_io/basic_iostream/2.cc
- * 27_io/basic_iostream/3.cc
- * 27_io/basic_iostream/4.cc
- * 27_io/basic_istream/1.cc
- * 27_io/basic_istream/2.cc
- * 27_io/basic_istream/3.cc
- * 27_io/basic_istream/4.cc
- * 27_io/basic_istringstream/1.cc
- * 27_io/basic_istringstream/2.cc
- * 27_io/basic_istringstream/3.cc
- * 27_io/basic_istringstream/4.cc
- * 27_io/basic_ofstream/1.cc
- * 27_io/basic_ofstream/2.cc
- * 27_io/basic_ofstream/3.cc
- * 27_io/basic_ofstream/4.cc
- * 27_io/basic_ostream/1.cc
- * 27_io/basic_ostream/2.cc
- * 27_io/basic_ostream/3.cc
- * 27_io/basic_ostream/4.cc
- * 27_io/basic_ostringstream/1.cc
- * 27_io/basic_ostringstream/2.cc
- * 27_io/basic_ostringstream/3.cc
- * 27_io/basic_ostringstream/4.cc
- * 27_io/basic_streambuf/1.cc
- * 27_io/basic_streambuf/2.cc
- * 27_io/basic_streambuf/3.cc
- * 27_io/basic_stringbuf/1.cc
- * 27_io/basic_stringbuf/2.cc
- * 27_io/basic_stringbuf/3.cc
- * 27_io/basic_stringbuf/4.cc
- * 27_io/basic_stringbuf/5.cc
- * 27_io/basic_stringstream/1.cc
- * 27_io/basic_stringstream/2.cc
- * 27_io/basic_stringstream/3.cc
- * 27_io/basic_stringstream/4.cc
- * 27_io/fpos/1.cc
- * ext/debug_allocator/instantiate.cc
- * ext/hash_map/instantiate.cc
- * ext/hash_set/instantiate.cc
- * ext/malloc_allocator/instantiate.cc
- * ext/mt_allocator/instantiate.cc
- * ext/pool_allocator/instantiate.cc
- * ext/slist/instantiate.cc
- * ext/stdio_filebuf/char/1.cc
- * ext/vstring/explicit_instantiation
- * ext/vstring/explicit_instantiation/1.cc
- * ext/vstring/explicit_instantiation/2.cc
- * ext/vstring/explicit_instantiation/char
- * ext/vstring/explicit_instantiation/char/1.cc
- * ext/vstring/explicit_instantiation/wchar_t
- * ext/vstring/explicit_instantiation/wchar_t/1.cc
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- explicit_instantiation
- * tr1/2_general_utilities/memory/enable_shared_from_this/
- explicit_instantiation/1.cc
- * tr1/2_general_utilities/memory/shared_ptr/explicit_instantiation
- * tr1/2_general_utilities/memory/shared_ptr/explicit_instantiation/1.cc
- * tr1/2_general_utilities/memory/weak_ptr/explicit_instantiation
- * tr1/2_general_utilities/memory/weak_ptr/explicit_instantiation/1.cc
- * tr1/5_numerical_facilities/random/discard_block/requirements/
- requirements.cc
- * tr1/6_containers/array/requirements/instantiate.cc
- * tr1/6_containers/unordered
- * tr1/6_containers/unordered/23781.cc
- * tr1/6_containers/unordered/capacity
- * tr1/6_containers/unordered/capacity/29134-map.cc
- * tr1/6_containers/unordered/capacity/29134-multimap.cc
- * tr1/6_containers/unordered/capacity/29134-multiset.cc
- * tr1/6_containers/unordered/capacity/29134-set.cc
- * tr1/6_containers/unordered/erase
- * tr1/6_containers/unordered/erase/24061-map.cc
- * tr1/6_containers/unordered/erase/24061-multimap.cc
- * tr1/6_containers/unordered/erase/24061-multiset.cc
- * tr1/6_containers/unordered/erase/24061-set.cc
- * tr1/6_containers/unordered/find
- * tr1/6_containers/unordered/find/map1.cc
- * tr1/6_containers/unordered/find/multimap1.cc
- * tr1/6_containers/unordered/find/multiset1.cc
- * tr1/6_containers/unordered/find/set1.cc
- * tr1/6_containers/unordered/hash
- * tr1/6_containers/unordered/hash/24799.cc
- * tr1/6_containers/unordered/hashtable
- * tr1/6_containers/unordered/hashtable/23053.cc
- * tr1/6_containers/unordered/hashtable/23465.cc
- * tr1/6_containers/unordered/hashtable/24054.cc
- * tr1/6_containers/unordered/hashtable/24064.cc
- * tr1/6_containers/unordered/hashtable/26127.cc
- * tr1/6_containers/unordered/hashtable/26132.cc
- * tr1/6_containers/unordered/hashtable/iterators_default_constructor.cc
- * tr1/6_containers/unordered/insert
- * tr1/6_containers/unordered/insert/24061-map.cc
- * tr1/6_containers/unordered/insert/24061-multimap.cc
- * tr1/6_containers/unordered/insert/24061-multiset.cc
- * tr1/6_containers/unordered/insert/24061-set.cc
- * tr1/6_containers/unordered/insert/array_syntax.cc
- * tr1/6_containers/unordered/insert/map_range.cc
- * tr1/6_containers/unordered/insert/map_single.cc
- * tr1/6_containers/unordered/insert/multimap_range.cc
- * tr1/6_containers/unordered/insert/multimap_single.cc
- * tr1/6_containers/unordered/insert/multiset_range.cc
- * tr1/6_containers/unordered/insert/multiset_single.cc
- * tr1/6_containers/unordered/insert/set_range.cc
- * tr1/6_containers/unordered/insert/set_single.cc
- * tr1/6_containers/unordered/instantiate
- * tr1/6_containers/unordered/instantiate/hash.cc
- * tr1/6_containers/unordered/instantiate/map.cc
- * tr1/6_containers/unordered/instantiate/multimap.cc
- * tr1/6_containers/unordered/instantiate/multiset.cc
- * tr1/6_containers/unordered/instantiate/set.cc
- * tr1/6_containers/unordered/swap
- * tr1/6_containers/unordered/swap/unordered_map
- * tr1/6_containers/unordered/swap/unordered_map/1.cc
- * tr1/6_containers/unordered/swap/unordered_map/2.cc
- * tr1/6_containers/unordered/swap/unordered_multimap
- * tr1/6_containers/unordered/swap/unordered_multimap/1.cc
- * tr1/6_containers/unordered/swap/unordered_multimap/2.cc
- * tr1/6_containers/unordered/swap/unordered_multiset
- * tr1/6_containers/unordered/swap/unordered_multiset/1.cc
- * tr1/6_containers/unordered/swap/unordered_multiset/2.cc
- * tr1/6_containers/unordered/swap/unordered_set
- * tr1/6_containers/unordered/swap/unordered_set/1.cc
- * tr1/6_containers/unordered/swap/unordered_set/2.cc
- * tr1/6_containers/unordered/types
- * tr1/6_containers/unordered/types/map_iterator.cc
- * tr1/6_containers/unordered/types/multimap_iterator.cc
- * tr1/6_containers/unordered/types/multiset_iterator.cc
- * tr1/6_containers/unordered/types/set_iterator.cc
-
- * testsuite/24_iterators/reverse_iterator/2.cc: To just one
- non-requirements test.
- * testsuite/ext/headers.cc: Add new includes.
-
-2007-02-18 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/28080 (partial)
- * include/bits/stl_algobase.h: Do not include <climits>, use
- std::numeric_limits.
- * include/bits/stl_bvector.h: Use __CHAR_BIT__.
- * config/locale/gnu/codecvt_members.cc: Include <climits>.
- * config/locale/generic/codecvt_members.cc: Likewise.
- * include/std/string: Do not include <algorithm>; do not include
- <memory>, include <bits/allocator.h> instead.
- * include/ext/vstring_fwd.h: Likewise.
- * include/ext/vstring_util.h: Do not include <algorithm>.
- * include/tr1/hashtable_policy.h: Include <algorithm>.
- * testsuite/21_strings/basic_string/replace/char/1.cc: Likewise.
- * testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Likewise.
- * testsuite/23_containers/bitset/cons/1.cc: Likewise.
- * testsuite/util/testsuite_character.h: Likewise.
-
- * config/locale/gnu/codecvt_members.cc: Also include <cstdlib>,
- for MB_CUR_MAX.
- * config/locale/generic/codecvt_members.cc: Likewise.
-
-2007-02-16 Paolo Carlini <pcarlini@suse.de>
-
- Revert.
- 2007-02-14 Hans-Peter Nilsson <hp@axis.com>
-
- PR middle-end/30768
- * testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc:
- Xfail ICE for cris-*-*.
-
-2007-02-14 Hans-Peter Nilsson <hp@axis.com>
-
- PR middle-end/30768
- * testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc:
- Xfail ICE for cris-*-*.
-
-2007-02-14 Benjamin Kosnik <bkoz@redhat.com>
-
- * configure.ac: Move AM_ICONV to native-only, add HAVE_ICONV for
- newlib.
- * configure: Regenerate.
-
-2007-02-13 Dirk Mueller <dmueller@suse.de>
-
- * include/bits/locale_facets.tcc (num_get<>::do_get): Avoid
- warning about ambiguous else.
-
-2007-02-12 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/21172
- * include/bits/stl_heap.h (__adjust_heap(_RandomAccessIterator,
- _Distance, _Distance, _Tp), __adjust_heap(_RandomAccessIterator,
- _Distance, _Distance, _Tp, _Compare)): Avoid potential integer
- overflow.
-
- * include/bits/stl_heap.h (__is_heap(_RandomAccessIterator,
- _RandomAccessIterator), __is_heap(_RandomAccessIterator,
- _RandomAccessIterator, _StrictWeakOrdering): Mark inline.
- (make_heap(_RandomAccessIterator, _RandomAccessIterator,
- _Compare)): Do not mark inline.
-
- * include/bits/stl_heap.h (push_heap(_RandomAccessIterator,
- _RandomAccessIterator), sort_heap(_RandomAccessIterator,
- _RandomAccessIterator)): Uncomment __glibcxx_requires_heap.
-
-2007-02-09 Richard Sandiford <richard@codesourcery.com>
-
- * testsuite/22_locale/time_put/put/wchar_t/1.cc: XFAIL if
- dummy_wcsftime.
- * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
- * testsuite/22_locale/time_put/put/wchar_t/9.cc: Likewise.
- * testsuite/22_locale/time_put/put/wchar_t/10.cc: Likewise.
- * testsuite/22_locale/num_get/get/wchar_t/2.cc: XFAIL if lax_strtofp.
- * testsuite/22_locale/num_get/get/char/2.cc: Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
+ * testsuite/tr1/6_containers/array/comparison_operators/
+ less_or_equal.cc: Likewise.
+ * testsuite/tr1/6_containers/array/comparison_operators/
+ greater_or_equal.cc: Likewise.
+ * testsuite/tr1/6_containers/array/comparison_operators/less.cc:
Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/09.cc:
+ * testsuite/tr1/6_containers/array/comparison_operators/equal.cc:
Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+ * testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc:
Likewise.
- * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
+ * testsuite/tr1/6_containers/array/comparison_operators/greater.cc:
Likewise.
- * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/6.cc:
+ * testsuite/tr1/6_containers/array/tuple_interface/get.cc: Likewise.
+ * testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc:
Likewise.
- * testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc:
+ * testsuite/tr1/6_containers/array/element_access/back.cc: Likewise.
+ * testsuite/tr1/6_containers/array/element_access/front.cc: Likewise.
+ * testsuite/tr1/6_containers/array/element_access/data.cc: Likewise.
+ * testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc:
+ Likewise.
+ * testsuite/tr1/6_containers/array/capacity/empty.cc: Likewise.
+ * testsuite/tr1/6_containers/array/capacity/max_size.cc: Likewise.
+ * testsuite/tr1/6_containers/array/capacity/size.cc: Likewise.
+ * testsuite/thread/guard.cc: Likewise.
+ * testsuite/20_util/tuple/cons/big_tuples.cc: Likewise.
+ * testsuite/20_util/tuple/cons/constructor.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
+ * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
+ * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
Likewise.
- * testsuite/26_numerics/cmath/c99_classification_macros_c++.cc: XFAIL
- for uClibc.
- * testsuite/26_numerics/cmath/c99_classification_macros_c.cc: Likewise.
-
-2007-02-09 Paolo Carlini <pcarlini@suse.de>
-
- * scripts/testsuite_flags.in: Add back @LIBICONV@ to SECTIONLDFLAGS.
-2007-02-08 Howard Hinnant <hhinnant@apple.com>
+2008-01-26 David Edelsohn <edelsohn@gnu.org>
- PR libstdc++/17012
- * include/bits/list.tcc (list<>::remove): Take care of
- &*__first == &__value.
- * docs/html/ext/howto.html: Add an entry for DR 526.
+ PR target/34794
+ * config/os/aix/os_defines.h: Define __COMPATMATH__.
-2007-02-07 Jakub Jelinek <jakub@redhat.com>
+2008-01-24 David Edelsohn <edelsohn@gnu.org>
- PR libgomp/28468
* configure: Regenerate.
-2007-02-07 Hans-Peter Nilsson <hp@axis.com>
-
- PR testsuite/28870
- * testsuite/27_io/basic_stringbuf/overflow/char/1.cc: Use only
- 10000 iterations for simulator targets.
- * testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Use only 5
- iterations for simulator targets.
- * testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Ditto.
- * testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Ditto.
- * testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Ditto.
- * testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Ditto.
- * testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Ditto.
- * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Ditto.
- * testsuite/23_containers/set/modifiers/16728.cc: Use only 10
- iterations for simulator targets.
-
-2007-02-06 Benjamin Kosnik <bkoz@redhat.com>
- Marco Trudel <mtrudel@gmx.ch>
-
- * include/precompiled/extc++.h: Guard include files that assume
- iconv support is present from precompilation via
- _GLIBCXX_HAVE_ICONV.
-
-2007-02-05 Paolo Carlini <pcarlini@suse.de>
+2008-01-21 Matthias Klose <doko@ubuntu.com>
- * include/bits/stl_deque.h (operator<): Qualify call.
+ * doc/doxygen/user.cfg.in: Set SHORT_NAMES to YES.
-2007-02-02 Benjamin Kosnik <bkoz@redhat.com>
+2008-01-19 Paolo Carlini <pcarlini@suse.de>
- * include/bits/c++config: Consistent macro guards for config includes.
- * config/locale/gnu/c_locale.h: Same.
- * config/locale/generic/c_locale.h: Same.
- * config/allocator/mt_allocator_base.h: Same.
- * config/allocator/malloc_allocator_base.h: Same.
- * config/allocator/new_allocator_base.h: Same.
- * config/allocator/pool_allocator_base.h: Same.
- * config/allocator/bitmap_allocator_base.h: Same.
- * config/os/vxworks/os_defines.h: Same.
- * config/cpu/sh/atomicity.h: Same.
- * config/io/c_io_stdio.h: Same.
- * config/io/basic_file_stdio.h: Same.
-
-2007-02-01 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/14493
- * libsupc++/typeinfo (bad_cast::what, bad_typeid::what): Declare.
- * libsupc++/tinfo.cc: Define.
- * libsupc++/exception (bad_exception::what): Declare.
- * libsupc++/eh_exception.cc: Define.
- (exception::what): Adjust, don't use typeid.
- * libsupc++/new (bad_alloc::what): Declare.
- * libsupc++/new_handler.cc: Define.
- * config/abi/pre/gnu.ver: Export the new methods @3.4.9; adjust
- existing 3.4.10 exports to 3.4.9.
- * configure.ac: Adjust to 6.0.9.
* configure: Regenerate.
- * testsuite/util/testsuite_abi.cc: Update.
- * testsuite/18_support/14493.cc: New.
-
-2007-02-01 Ben Elliston <bje@au.ibm.com>
-
- * libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the
- emergency_buffer using `&array[0][0]' notation, use `array'.
-
-2007-01-30 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/30571
- * include/ext/pb_ds/detail/type_utils.hpp: Use C++0x
- static_assert if available, if not, centralize PB_DS_STATIC_ASSERT
- definition here.
- * include/ext/pb_ds/detail/resize_policy/
- cc_hash_max_collision_check_resize_trigger_imp.hpp: Remove
- PB_DS_STATIC_ASSERT definition.
- * include/ext/pb_ds/detail/resize_policy/
- hash_load_check_resize_trigger_imp.hpp: Same.
- * include/ext/pb_ds/detail/resize_policy/
- hash_standard_resize_policy_imp.hpp: Same.
- * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same.
- * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same.
- * include/ext/pb_ds/detail/pat_trie_/internal_node.hpp: Same.
- * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same.
- * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Same.
- * include/ext/pb_ds/trie_policy.hpp: Same.
- * testsuite/util/performance/assoc/timing/
- tree_order_statistics_test.hpp: Same.
- * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Adjust line numbers.
- * testsuite/17_intro/headers_c++_c++0x_compat.cc: New.
-
- * include/precompiled/extc++.h: Update to current list of ext files.
-
-2007-01-29 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_uninitialized.h (uninitialized_copy(const char*,
- const char*, char*), uninitialized_copy(const wchar_t*, const wchar_t*,
- wchar_t*)): Remove, just forward to std::copy.
-
-2007-01-29 Benjamin Kosnik <bkoz@redhat.com>
+ * Makefile.in: Likewise.
+ * src/Makefile.in: Likewise.
+ * doc/Makefile.in: Likewise.
+ * po/Makefile.in: Likewise.
+ * libmath/Makefile.in: Likewise.
+ * include/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+
+2008-01-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/*: To...
+ * doc/*: ...here.
+ * testsuite/Makefile.am: Move doc-performance to...
+ * Makefile.am: Add doc to SUBDIRS, move doxygen-* rules to...
+ * doc/Makefile.am: Consolidate documentation creation here.
+ (doc-doxygen-html): New.
+ (doc-doxygen-man): New.
+ (doc-performance): New.
+ * doc/Makefile.in: New.
+ * acinclude.m4 (glibcxx_SUBDIRS): Add doc directory.
+ * doc/doxygen/guide.html: Edit for unified html configuration.
+ * doc/doxygen/mainpage.html: Same.
+ * doc/doxygen/run_doxygen: Same, more namespace fixups for man
+ generation.
+ * doc/doxygen/user.cfg.in: Update for doxygen 1.5.4.
+
+ * include/tr1_impl/random: Remove maint from doxygen markup.
+ * include/tr1_impl/functional: Same.
+ * include/std/tuple: Same.
+ * include/std/streambuf: Same.
+ * include/std/bitset: Same.
+ * include/std/limits: Same.
+ * include/std/fstream: Same.
+ * include/std/istream: Same.
+ * include/std/sstream: Same.
+ * include/ext/pool_allocator.h: Same.
+ * include/ext/rc_string_base.h: Same.
+ * include/bits/basic_ios.h: Same.
+ * include/bits/stl_list.h: Same.
+ * include/bits/stl_map.h: Same.
+ * include/bits/locale_classes.h: Same.
+ * include/bits/stl_set.h: Same.
+ * include/bits/stl_iterator_base_types.h: Same.
+ * include/bits/basic_string.h: Same.
+ * include/bits/stl_multimap.h: Same.
+ * include/bits/stl_vector.h: Same.
+ * include/bits/ios_base.h: Same.
+ * include/bits/stl_deque.h: Same.
+ * include/bits/postypes.h: Same.
+ * include/bits/stl_multiset.h: Same.
+ * include/bits/stl_algo.h: Same.
+ * include/bits/stl_iterator.h: Same.
+ * include/bits/stl_tempbuf.h: Same.
+ * include/bits/stl_construct.h: Same.
+ * include/bits/stl_relops.h: Same.
+ * include/tr1/tuple: Same.
+ * include/backward/auto_ptr.h: Same.
- * include/ext/enc_filebuf.h: Resurrect, update.
- * include/ext/codecvt_specializations.h: Remove
- _GLIBCXX_USE_ICONV, _GLIBCXX_USE_ENCODING_STATE.
- * include/bits/localefwd.h: Remove declaration for __enc_traits.
- * docs/html/22_locale/codecvt.html: Change __enc_traits to
- encoding_state.
- * scripts/testsuite_flags.in: Remove ICONV.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Fixups for line number changes.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Same.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Same.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Same.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Same.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Same.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Same.
+ * testsuite/20_util/auto_ptr/assign_neg.cc: Same.
- * configure.ac: Remove GLIBCXX_CHECK_ICONV_SUPPORT.
- * acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove.
- * crossconfig.m4: Remove use of GLIBCXX_CHECK_ICONV_SUPPORT.
- * config.h.in: Remove HAVE_ICONV_CLOSE, HAVE_ICONV_OPEN,
- HAVE_NL_LANGINFO, _GLIBCXX_USE_ICONV.
- * include/Makefile.am: Uglify ICONV_CONST.
- * configure: Regenerate.
* aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
* Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
@@ -5006,163 +468,192 @@
* libsupc++/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
- * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Use
- dg-require-iconv, fix up for encoding_state changes.
- * testsuite/ext/enc_filebuf/char/13189.cc: Same.
- * testsuite/ext/enc_filebuf/char/13598.cc: Same.
- * testsuite/22_locale/codecvt/unicode: Move...
- * testsuite/22_locale/codecvt/unicode/char.cc: Move...
- * testsuite/22_locale/codecvt/unicode/1.cc: Move...
- * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Move...
- * testsuite/ext/codecvt: New.
- * testsuite/ext/codecvt/char-1.cc: ...here. Also, use dg-require-iconv.
- * testsuite/ext/codecvt/char-2.cc: ...here. Same.
- * testsuite/ext/codecvt/1.cc: ...here. Same.
- * testsuite/ext/codecvt/wchar_t.cc: ...here. Same.
- * testsuite/22_locale/locale/cons/unicode: Delete directory.
- * testsuite/22_locale/locale/cons/unicode/1.cc: Move...
- * testsuite/22_locale/locale/cons/unicode.cc: ...here.
-
-2007-01-28 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
- iter_type, ios_base&, ios_base::iostate&, bool&),
- num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT)):
- -Wconversion and -Woverflow fixes.
- * include/bits/istream.tcc (operator>>(int&), operator>>(short&)):
- Likewise.
- * include/std/valarray (valarray<>::shift, cshift): Likewise.
-
-2007-01-26 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/30586
- * config/cpu/ia64/atomic_word.h: Just include <bits/cxxabi_tweaks.h>.
- * testsuite/abi/30586.cc: New.
-
-2007-01-25 Nathan Myers <ncm@cantrip.org>
-
- * include/bits/streambuf_iterator.h (istreambuf_iterator<>::equal):
- Simplify.
-
-2007-01-24 Steve LoBasso <slobasso@yahoo.com>
- Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
- Fix condition.
- * testsuite/23_containers/deque/modifiers/erase/3.cc: New.
-
-2007-01-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
-
- * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Replace
- _Unwind_Word with _uleb128_t in the SJLJ context.
-
-2007-01-24 Benjamin Kosnik <bkoz@redhat.com>
-
- PR libstdc++/29722 continued
- * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Add
- libsupc++ library directory.
- * testsuite/abi/cxx_runtime_only_linkage.cc: Remove hard-coded
- path specification.
-
-2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
-
- * libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
- get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
- _Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
-
-2007-01-22 Paolo Carlini <pcarlini@suse.de>
+ * scripts/make_graphs.py: Correct paths for new layout.
- * include/bits/stl_algobase.h (__fill_aux(unsigned char*,
- unsigned char*, const unsigned char&), __fill_aux(signed char*,
- signed char*, const signed char&), __fill_aux(char*, char*,
- const char&), __fill_aux(wchar_t*, wchar_t*, const wchar_t&)):
- Take the character by value.
- (__fill_n_aux): Likewise.
+2008-01-17 Benjamin Kosnik <bkoz@redhat.com>
-2007-01-21 Paolo Carlini <pcarlini@suse.de>
-
- PR libstdc++/30449 (fill, fill_n)
- * include/bits/stl_algobase.h (__fill_aux(wchar_t*, wchar_t*,
- const wchar_t&), __fill_n_aux(wchar_t*, _Size, const wchar_t&)): New.
- (fill(signed char*, signed char*, const signed char&),
- fill(unsigned char*, unsigned char*, const unsigned char&),
- fill(char*, char*, char&), fill_n(signed char*, _Size,
- const signed char&), fill_n(unsigned char*, _Size,
- const unsigned char&), fill_n(char*, _Size, char&)): Rename to
- __*_aux.
- (__fill_normal, __fill_n_normal): New, call the latter.
- (fill, fill_n): Adjust, call the latter.
- * testsuite/25_algorithms/fill/4.cc: New.
- * testsuite/25_algorithms/fill/5.cc: New.
-
-2007-01-18 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/basic_string.h (basic_string<>::_S_compare): Add.
- (compare(const basic_string&)): Use it.
- * include/bits/basic_string.tcc (compare(size_type, size_type,
- const basic_string&), compare(size_type, size_type,
- const basic_string&, size_type, size_type), compare(const _CharT*),
- compare(size_type, size_type, const _CharT*), compare(size_type,
- size_type, const _CharT*, size_type)): Likewise.
- * include/ext/vstring_util.h (__vstring_utility<>::_S_compare): Add.
- * include/ext/vstring.h (compare(const __versa_string&)): Use it.
- * include/ext/vstring.tcc (compare(size_type, size_type,
- const __versa_string&), compare(size_type, size_type,
- const __versa_string&, size_type, size_type), compare(const _CharT*),
- compare(size_type, size_type, const _CharT*), compare(size_type,
- size_type, const _CharT*, size_type)): Likewise.
-
-2007-01-15 Ian Lance Taylor <iant@google.com>
- Paolo Carlini <pcarlini@suse.de>
-
- * include/ext/type_traits.h: Fix __glibcxx_max macro.
- * include/std/limits: Likewise.
-
-2007-01-15 Paolo Carlini <pcarlini@suse.de>
-
- * include/std/valarray (valarray<>::cshift): Fix typo.
-
-2007-01-14 Paolo Carlini <pcarlini@suse.de>
-
- * include/bits/stl_algobase.h (fill_n(char*, _Size,
- const signed char&)): Fix signature.
- * testsuite/25_algorithms/fill/3.cc: New.
-
-2007-01-13 John David Anglin <dave.anglin@nrc-cnrc.gc>
-
- * config/cpu/hppa/atomicity.h (__exchange_and_add): Don't use ordered
- store.
- (__atomic_add): Likewise.
+ * acinclude.m4 (AC_LC_MESSAGES): Remove serial.
+ * linkage.m4 (AC_REPLACE_MATHFUNCS): Same.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
-2007-01-13 Paolo Carlini <pcarlini@suse.de>
+2008-01-14 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/14991
- * docs/html/17_intro/porting-howto.html ([3]): Mention stdio_filebuf.
- * docs/html/17_intro/porting-howto.xml: Remove.
+ * include/parallel/list_partition.h: Formatting fixes, inline tweaks.
+ * include/parallel/numeric: Likewise.
+ * include/parallel/balanced_quicksort.h: Likewise.
+ * include/parallel/unique_copy.h: Likewise.
+ * include/parallel/algobase.h: Likewise.
+ * include/parallel/algo.h: Likewise.
- * docs/html/17_intro/porting-howto.html: Remove spurious end tags
- pointed out by validator.w3.org.
+2008-01-14 Seongbae Park <seongbae.park@gmail.com>
-2007-01-12 Paolo Carlini <pcarlini@suse.de>
+ * crossconfig.m4: Add missing header checks, C99 TR1 check,
+ and sigsetjmp check.
- PR libstdc++/30416 (continued)
- * include/std/valarray (valarray<>::shift, valarray<>::cshift):
- Allways return the same variable, thus facilitating NRVO.
+2008-01-14 Paolo Carlini <pcarlini@suse.de>
-2007-01-12 Paolo Carlini <pcarlini@suse.de>
+ * include/parallel/tree.h: Remove.
+ * include/Makefile.am: Update.
+ * include/Makefile.in: Rebuild.
- PR libstdc++/30416
- * include/std/valarray (valarray<>::shift, valarray<>::cshift):
- Do not segfault when |n| > size.
- * testsuite/26_numerics/valarray/30416.cc: New.
+ * src/Makefile.am: Remove spurious trailing backslash.
+ * src/Makefile.in: Rebuild.
+ * po/Makefile.in: Likewise.
+ * libmath/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+ * Makefile.in: Likewise.
+ * configure: Likewise.
+
+2008-01-12 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34730
+ * include/debug/functions.h (__check_sorted_set,
+ __check_sorted_set_aux): Add.
+ (__check_sorted): Check StrictWeakOrdering.
+ * include/debug/macros.h (__glibcxx_check_strict_weak_ordering,
+ __glibcxx_check_strict_weak_ordering_pred): Remove.
+ (__glibcxx_check_sorted, __glibcxx_check_sorted_pred): Adjust.
+ (__glibcxx_check_sorted_set, __glibcxx_check_sorted_set_pred): Add.
+ * include/debug/debug.h (__glibcxx_requires_sorted_set,
+ __glibcxx_requires_sorted_set_pred): Add.
+ * include/bits/stl_algo.h (merge, includes, set_union,
+ set_intersection, set_difference, set_symmetric_difference):
+ Adjust, use __glibcxx_requires_sorted_set* instead.
+ * testsuite/25_algorithms/set_intersection/34730.cc: New.
+
+2008-01-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/parallel/multiway_merge.h: Reformat to 80 columns;
+ adjust some inline specifiers; other minor style fixes.
+ * include/parallel/losertree.h: Likewise.
+ * include/parallel/list_partition.h: Likewise.
+ * include/parallel/multiseq_selection.h: Likewise.
+ * include/parallel/workstealing.h: Likewise.
+ * include/parallel/base.h: Likewise.
+ * include/parallel/par_loop.h: Likewise.
+ * include/parallel/numeric: Likewise.
+ * include/parallel/quicksort.h: Likewise.
+ * include/parallel/algorithmfwd.h: Likewise.
+ * include/parallel/for_each_selectors.h: Likewise.
+ * include/parallel/omp_loop_static.h: Likewise.
+ * include/parallel/random_shuffle.h: Likewise.
+ * include/parallel/balanced_quicksort.h: Likewise.
+ * include/parallel/set_operations.h: Likewise.
+ * include/parallel/tree.h: Likewise.
+ * include/parallel/merge.h: Likewise.
+ * include/parallel/unique_copy.h: Likewise.
+ * include/parallel/settings.h: Likewise.
+ * include/parallel/multiway_mergesort.h: Likewise.
+ * include/parallel/numericfwd.h: Likewise.
+ * include/parallel/search.h: Likewise.
+ * include/parallel/partition.h: Likewise.
+ * include/parallel/compatibility.h: Likewise.
+ * include/parallel/partial_sum.h: Likewise.
+ * include/parallel/find.h: Likewise.
+ * include/parallel/algo.h: Likewise.
+ * include/parallel/queue.h: Likewise.
+ * include/parallel/omp_loop.h: Likewise.
+ * include/parallel/sort.h: Likewise.
+ * include/parallel/random_number.h: Likewise.
+
+2008-01-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/17_intro/api.html: Fix markup for rope.h.
+
+2008-01-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/parallel/iterator.h: Reformat to 80 columns; adjust some
+ inline specifiers.
+ * include/parallel/find_selectors.h: Likewise.
+ * include/parallel/losertree.h: Likewise.
+ * include/parallel/list_partition.h: Likewise.
+ * include/parallel/for_each.h: Likewise.
+ * include/parallel/multiseq_selection.h: Likewise.
+ * include/parallel/algorithmfwd.h: Likewise.
+ * include/parallel/for_each_selectors.h: Likewise.
+ * include/parallel/balanced_quicksort.h: Likewise.
+ * include/parallel/merge.h: Likewise.
+ * include/parallel/algobase.h: Likewise.
+ * include/parallel/find.h: Likewise.
+ * include/parallel/algo.h: Likewise.
+ * include/parallel/checkers.h: Likewise.
+
+2008-01-09 Francesco Biscani <bluescarni@gmail.com>
+
+ * include/tr1_impl/hashtable (_Hashtable): Fix friend declaration
+ of __detail::_Map_base<>.
+
+2008-01-08 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: Do
+ not include <cassert>.
+ * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
+ Likewise.
+ * testsuite/util/testsuite_common_types.h: Include <algorithm>.
+
+2008-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.ac (--enable-linux-futex): Add new configure option.
+ (HAVE_LINUX_FUTEX): New AC_DEFINE.
+ * Makefile.in: Rebuilt.
+ * aclocal.m4: Rebuilt.
+ * configure: Rebuilt.
+ * config.h.in: Rebuilt.
+ * config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
+ _GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define.
+ * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
+ _GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT): Define.
+ * libsupc++/guard.cc: Include climits and syscall.h.
+ (_GLIBCXX_USE_FUTEX): Define if futex syscall and atomic builtins
+ are supported.
+ (_GLIBCXX_FUTEX_WAIT, _GLIBCXX_FUTEX_WAKE): Likewise.
+ (__guard_test_bit): New static inline.
+ (__cxa_guard_acquire, __cxa_guard_release, __cxa_guard_abort): Use
+ atomic builtins and futex syscall if _GLIBCXX_USE_FUTEX.
+
+2008-01-07 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34680
+ * include/bits/locale_classes.h (has_facet<>, use_facet<>): Do not
+ use dynamic_cast when run-time type identification is disabled; do
+ not mark inline; only declare, define...
+ * include/bits/locale_classes.tcc: ... here.
+
+2008-01-06 Ted Phelps <phelps@gnusto.com>
+
+ PR c++/34152
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check
+ _GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO.
+
+2008-01-01 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34095
+ * include/parallel/multiway_merge.h (multiway_merge_bubble,
+ parallel_multiway_merge): Together with ::operator new use
+ ::operator delete.
+ * include/parallel/losertree.h (LoserTree<>::~LoserTree): Likewise.
+ * include/parallel/quicksort.h (parallel_sort_qs_divide): Likewise.
+ * include/parallel/random_shuffle.h (parallel_random_shuffle_drs_pu,
+ sequential_random_shuffle): Likewise.
+ * include/parallel/tree.h (_M_not_sorted_bulk_insertion_construction):
+ Likewise.
+ * include/parallel/multiway_mergesort.h (parallel_sort_mwms_pu,
+ parallel_sort_mwms): Likewise.
+ * include/parallel/partial_sum.h (parallel_partial_sum_linear):
+ Likewise.
+ * testsuite/25_algorithms/sort/34095.cc: New.
-2007-01-06 Paolo Carlini <pcarlini@suse.de>
+2008-01-01 Paolo Carlini <pcarlini@suse.de>
- PR libstdc++/30365
- * crossconfig.m4 (case *-linux*): Run GLIBCXX_CHECK_LFS.
- * configure: Regenerate.
+ * testsuite/25_algorithms/sort/34636.cc: Fix Copyright year.
-2007-01-06 Matthias Klose <doko@debian.org>
+2008-01-01 Paolo Carlini <pcarlini@suse.de>
- * include/tr1/random (gamma_distribution): Fix typo in formula.
- * docs/doxygen/user.cfg.in: Use package amsmath.
+ PR libstdc++/34636
+ * include/parallel/algobase.h (lexicographical_compare_switch(...,
+ random_access_iterator_tag, random_access_iterator_tag)): Careful
+ with undereferenceable iterators.
+ * testsuite/25_algorithms/sort/34636.cc: New.
diff --git a/libstdc++-v3/ChangeLog-2007 b/libstdc++-v3/ChangeLog-2007
new file mode 100644
index 00000000000..5b472c06837
--- /dev/null
+++ b/libstdc++-v3/ChangeLog-2007
@@ -0,0 +1,8243 @@
+2007-12-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/tuple (_Tuple_impl<>::_Tuple_impl(typename
+ std::remove_reference<>::type&&, typename
+ std::remove_reference<>::type&&...),
+ _Tuple_impl(const _Tuple_impl<>&), _Tuple_impl(_Tuple_impl&&),
+ _Tuple_impl(_Tuple_impl<>&&), operator=(_Tuple_impl&&),
+ operator=(const _Tuple_impl<>&), operator=(_Tuple_impl<>&&)): Add.
+ (tuple<>::tuple(const _Elements&...), tuple(_UElements&&...),
+ tuple(tuple&&), tuple(const tuple<>&), tuple(tuple<>&&),
+ operator=(tuple&&), operator=(const tuple<>&), operator=(tuple<>&&)):
+ Likewise.
+ (tuple<_T1, _T2>::tuple(const _T1&, const _T2&, tuple(_U1&&, _U2&&),
+ tuple(tuple&&), tuple(tuple<>&&), tuple(pair<>&&), operator=(tuple&&),
+ operator=(tuple<>&&), operator=(pair<>&&)): Likewise.
+ (tuple<>::tuple(typename __add_c_ref<_Elements>::type...),
+ tuple<_T1, _T2>::tuple(typename __add_c_ref<>::type,
+ typename __add_c_ref<>::type)): Remove.
+ * testsuite/tr1/6_containers/tuple/creation_functions/tie2.cc: New.
+ * testsuite/20_util/tuple/creation_functions/tie2.cc: Likewise.
+ * testsuite/20_util/tuple/moveable.cc: Likewise.
+
+2007-12-29 Gerald Pfeifer <gerald@pfeifer.com>
+
+ * config/os/mingw32/error_constants.h: Fix typo in comment.
+
+2007-12-29 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/mingw32/error_constants.h (enum posix_errno): Move
+ inside namespace posix_error
+.
+2007-12-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34538
+ * config/os/generic/error_constants.h (enum posix_errno): Move
+ inside namespace posix_error.
+ * include/std/system_error (error_category::posix,
+ error_code::error_code(posix_errno), error_code::posix): Adjust.
+ * src/system_error.cc (gnu_error_category::posix): Likewise.
+ * testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc:
+ Adjust.
+ * testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc:
+ Likewise.
+ * testsuite/19_diagnostics/error_code/cons/1.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/equal.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/not_equal.cc:
+ Likewise.
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Likewise.
+ * testsuite/19_diagnostics/error_category/cons/default.cc: Likewise.
+ * testsuite/19_diagnostics/error_category/operators/equal.cc:
+ Likewise.
+ * testsuite/19_diagnostics/error_category/operators/not_equal.cc:
+ Likewise.
+ * testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc:
+ Likewise.
+ * testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
+ * testsuite/19_diagnostics/system_error/what-4.cc: Likewise.
+ * testsuite/19_diagnostics/headers/system_error/34538.cc: New.
+
+2007-12-26 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/25_algorithms/copy/34595.C: Rename to 34595.cc.
+
+2007-12-26 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34595
+ * include/bits/stl_algobase.h (struct __cm_assign): Remove.
+ (struct __copy_move<true, false, _Category>,
+ struct __copy_move<true, false, random_access_iterator_tag>,
+ struct __copy_move_backward<true, false, _Category>,
+ struct __copy_move_backward<true, false, random_access_iterator_tag>):
+ Add.
+ (struct __copy_move, struct __copy_move_backward,
+ struct __copy_move<false, false, random_access_iterator_tag>,
+ struct __copy_move_backward<false, false, random_access_iterator_tag>):
+ Adjust.
+ * testsuite/25_algorithms/copy/34595.C: New.
+
+2007-12-26 Chris Fairles <chris.fairles@gmail.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/tuple: New.
+ * include/tr1/tuple: New, adjust from tr1_impl/tuple code.
+ * include/tr1_impl/tuple: Remove.
+ * include/Makefile.am: Update.
+ * include/Makefile.in: Regenerate.
+
+2007-12-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/hashtable_policy.h (__lower_bound): Add.
+ (_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements,
+ _M_need_rehash): Use __lower_bound.
+ * include/std/unordered_map: Do not include the whole <algorithm>,
+ include <bits/stl_algobase.h>.
+ * include/std/unordered_set: Likewise.
+ * include/tr1/unordered_map: Likewise.
+ * include/tr1/unordered_set: Likewise.
+
+2007-12-24 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/20_util/tuple/cons/big_tuples.cc: New.
+ * testsuite/20_util/tuple/cons/constructor.cc: Likewise.
+ * testsuite/20_util/tuple/cons/assignment.cc: Likewise.
+ * testsuite/20_util/tuple/tuple_element.cc: Likewise.
+ * testsuite/20_util/tuple/tuple_size.cc: Likewise.
+ * testsuite/20_util/tuple/comparison_operators/comparisons.cc:
+ Likewise.
+ * testsuite/20_util/tuple/element_access/get.cc: Likewise.
+ * testsuite/20_util/tuple/creation_functions/23978.cc: Likewise.
+ * testsuite/20_util/tuple/creation_functions/tie.cc: Likewise.
+ * testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise.
+
+ * testsuite/20_util/tuple/requirements/explicit_instantiation.cc:
+ Fix header file and namespace.
+
+ * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Minor tweaks.
+ * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/cons/assignment.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/tuple_element.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/tuple_size.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/comparison_operators/
+ comparisons.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/element_access/get.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: Likewise.
+ * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
+ Likewise.
+
+2007-12-24 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ default_weaktoshared.cc: Use static_cast not reinterpret_cast.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ mutex_weaktoshared.cc: Likewise.
+
+2007-12-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/hashtable_policy.h (_Prime_rehash_policy::
+ _M_next_bkt, _M_bkt_for_elements, _M_need_rehash): Use __builtin_ceil.
+ * include/std/unordered_map: Do not include <cmath>; prefer
+ <bits/stringfwd.h> to <string>.
+ * include/std/unordered_set: Likewise.
+ * include/tr1/unordered_map: Likewise.
+ * include/tr1/unordered_set: Likewise.
+
+2007-12-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/complex (complex<float>::complex(float, float)):
+ Uglify parameters.
+
+2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/locale_classes.h (has_facet, use_facet): Simplify
+ RTTI checks.
+
+2007-12-17 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/test.html: Fix paths and notes on running subset of tests.
+ * docs/html/ext/parallel_mode.html: Fix markup typos.
+ * docs/html/ext/pb_ds/index.html: Likewise.
+
+2007-12-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/22_locale/global_templates/
+ standard_facet_hierarchies.cc: Fix for generic locale model.
+
+2007-12-16 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * ChangeLog: Fix my email address in previous two entries.
+
+2007-12-16 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
+ required dg-option for cygwin and darwin targets.
+ * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
+
+2007-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/tr1_impl/boost_shared_ptr.h: Add support for allocators,
+ aliasing, make_shared and rvalue-references. Move __shared_count
+ and _Sp_counted_* classes to new headers.
+ * include/tr1_impl/boost_sp_counted_base.h: New.
+ * include/bits/boost_sp_shared_count.h: New.
+ * include/tr1/boost_sp_shared_count.h: New.
+ * include/std/memory, include/tr1/memory: Include new headers.
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+ * docs/html/documentation.html: Link to shared_ptr notes.
+ * docs/html/20_util/shared_ptr.html: New.
+ * docs/html/17_intro/c++0x_status.html: Update shared_ptr status.
+ * testsuite/20_util/shared_ptr/cons/alias.cc: New.
+ * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/move.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/move.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
+ * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/assign.cc: Duplicate tr1 test.
+ * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise.
+ * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
+ * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/default.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise.
+ * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
+ * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise.
+ * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise.
+ * testsuite/20_util/shared_ptr/misc/io.cc: Likewise.
+ * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/24805.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise.
+ * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise.
+ * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise.
+ * testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
+ * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise.
+ * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise.
+ * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
+ Likewise.
+ * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
+ * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
+ 1.cc: Likewise.
+ * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/
+ 2.cc: Likewise.
+ * testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc:
+ Remove.
+ * testsuite/20_util/weak_ptr/lock/1.cc: Duplicate tr1 test.
+ * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc:
+ Likewise.
+ * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc:
+ Likewise.
+ * testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc:
+ Remove.
+
+2007-12-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.host (try_cpu settings): Set try_cpu=cris for crisv32.
+ * config/cpu/cris/atomicity.h (__exchange_and_add)
+ [__CRIS_arch_version >= 32]: Add support for CRIS v32.
+
+2007-12-15 Benjamin Kosnik <bkoz@redhat.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/parallel/partial_sum.h: Include new. Fix for DR 402.
+ * include/parallel/multiway_merge.h:Fix for DR 402.
+ * include/parallel/losertree.h: Same.
+ * include/parallel/quicksort.h: Same.
+ * include/parallel/random_shuffle.h: Same.
+ * include/parallel/multiway_mergesort.h: Same.
+
+2007-12-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/30127
+ PR libstdc++/34449
+ * include/bits/locale_classes.h (use_facet): Check facet hierarchy.
+ (has_facet): Same.
+ * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New.
+ * testsuite/22_locale/global_templates/
+ standard_facet_hierarchies.cc: New.
+
+2007-12-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/34015
+ * include/backward/backward_warning.h: Adjust warning message.
+
+2007-12-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_bvector.h (vector<bool>::reserve): Move out of
+ line...
+ * include/bits/vector.tcc: ... here.
+
+2007-12-10 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/21_strings/howto.html: Add links to referenced articles.
+
+2007-12-10 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/17_intro/backwards_compatibility.html: Fix markup.
+ * docs/html/17_intro/howto.html: Likewise.
+ * docs/html/18_support/howto.html: Likewise.
+ * docs/html/ext/concurrence.html: Likewise.
+ * docs/html/documentation.html: Likewise.
+
+2007-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/tr1/5_numerical_facilities/random/linear_congruential/
+ requirements/non_uint_neg.cc: Avoid -Wall warnings.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/compile.cc: Likewise.
+ * testsuite/util/testsuite_api.h: Likewise.
+
+2007-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/25_algorithms/nth_element/2.cc: Avoid -Wall warnings.
+ * testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/peek/wchar_t/12296.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-2.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-3.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-4.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/
+ 28277-3.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/
+ 28277-4.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Likewise.
+ * testsuite/18_support/headers/cstddef/macros.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ wchar_t/28277.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/28277.cc: Likewise.
+ * testsuite/26_numerics/headers/cmath/25913.cc: Likewise.
+ * testsuite/ext/pb_ds/example/priority_queue_xref.cc: Likewise.
+ * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: Likewise.
+ * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
+ * testsuite/ext/enc_filebuf/char/13598.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/8.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/1.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/uniform_int/
+ 33128.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ mutex_weaktoshared.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ default_weaktoshared.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ range.cc: Likewise.
+ * testsuite/23_containers/multimap/operations/1.cc: Likewise.
+ * testsuite/23_containers/set/operations/1.cc: Likewise.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
+ * testsuite/23_containers/deque/modifiers/erase/1.cc: Likewise.
+ * testsuite/23_containers/deque/modifiers/erase/2.cc: Likewise.
+ * testsuite/23_containers/multiset/operations/1.cc: Likewise.
+ * testsuite/23_containers/map/operations/1.cc: Likewise.
+ * testsuite/util/testsuite_hooks.cc: Likewise.
+ * testsuite/util/testsuite_rvalref.h: Likewise.
+
+2007-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * include/ext/throw_allocator.h (print_to_string): Change sprintf
+ format to %lu and cast ref.second.{first,second} to long.
+ * include/debug/safe_iterator.tcc (_M_can_advance): Add parens to
+ avoid warnings.
+
+2007-12-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/ext/howto.html: Update.
+ * docs/html/ext/sgiexts.html: Same.
+ * docs/html/ext/concurrence.html: New. Document extensions.
+ * docs/html/17_intro/api.html: Move some bits...
+ * docs/html/17_intro/backwards_compatibility.html: here. New. Add
+ compatibility suggestions, move existing ones.
+ * docs/html/17_intro/howto.html: Update info.
+ * docs/html/18_support/howto.html: Tweak.
+ * docs/html/faq/index.html: Update thread info.
+ * docs/html/documentation.html: Add links.
+ * docs/html/20_util/allocator.html: Update info.
+ * include/precompiled/stdc++.h: Add C++0x includes if appropriate.
+ * testsuite/17_intro/headers/c++200x/all.cc: Same.
+
+2007-12-09 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/util/testsuite_allocator.h,
+ testsuite/util/testsuite_hooks.cc,
+ testsuite/util/testsuite_character.h,
+ testsuite/util/testsuite_performance.h,
+ testsuite/util/testsuite_rvalref.h, testsuite/util/testsuite_io.h,
+ testsuite/util/testsuite_allocator.cc: Remove semi-colons after
+ namespace declarations.
+
+2007-12-05 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/hashtable_policy.h (_Prime_rehash_policy::
+ _S_n_primes): Add.
+ (_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements,
+ _M_need_rehash): Adjust.
+
+2007-12-03 Paolo Carlini <pcarlini@suse.de>
+
+ * src/hashtable.cc (__prime_list): Use __SIZEOF_LONG__.
+
+2007-12-03 Paolo Carlini <pcarlini@suse.de>
+
+ * src/hashtable.cc: New.
+ * src/hashtable_c++0x.cc: Likewise.
+ * src/Makefile.am: Add.
+ * src/Makefile.in: Regenerate.
+ * include/tr1_impl/hashtable_policy.h (struct _Primes): Remove.
+ (_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements,
+ _M_need_rehash): Adjust.
+ * config/abi/pre/gnu.ver: Update exports.
+
+ * src/hash.cc: Minor tweak.
+
+2007-12-03 Paolo Carlini <pcarlini@suse.de>
+
+ * include/debug/unordered_map (operator==(const unordered_map&,
+ const unordered_map&), operator!=(const unordered_map&,
+ const unordered_map&), operator==(const unordered_multimap&,
+ const unordered_multimap&), operator!=(const unordered_multimap&,
+ const unordered_multimap&)): Remove.
+ (unordered_map<>::unordered_map(unordered_map&&),
+ operator=(unordered_map&&), clear, _M_invalidate_all,
+ unordered_multimap<>::unordered_multimap(unordered_multimap&&),
+ operator=(unordered_map&&), clear, _M_invalidate_all,
+ swap(unordered_map<>&&, unordered_map<>&), swap(unordered_map<>&,
+ unordered_map<>&&), swap(unordered_multimap<>&&,
+ unordered_multimap<>&), swap(unordered_multimap<>&,
+ unordered_multimap<>&&)): Add.
+ * include/debug/unordered_set (operator==(const unordered_set&,
+ const unordered_set&), operator!=(const unordered_set&,
+ const unordered_set&), operator==(const unordered_multiset&,
+ const unordered_multiset&), operator!=(const unordered_multiset&,
+ const unordered_multiset&)): Remove.
+ (unordered_set<>::unordered_set(unordered_set&&),
+ operator=(unordered_set&&), clear, _M_invalidate_all,
+ unordered_multiset<>::unordered_multiset(unordered_multiset&&),
+ operator=(unordered_set&&), clear, _M_invalidate_all,
+ swap(unordered_set<>&&, unordered_set<>&), swap(unordered_set<>&,
+ unordered_set<>&&), swap(unordered_multiset<>&&,
+ unordered_multiset<>&), swap(unordered_multiset<>&,
+ unordered_multiset<>&&)): Add.
+ * include/debug/safe_association.h (_Safe_association<>::
+ _Safe_association(_Safe_association&&)): Add.
+ (_Safe_association<>::clear, _M_invalidate_all): Remove.
+
+2007-12-01 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/hashtable_policy.h (struct _LessThan): Remove.
+ (_Prime_rehash_policy::_M_bkt_for_elements, _Prime_rehash_policy::
+ _M_need_rehash): Adjust.
+
+2007-12-01 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_tempbuf.h (__get_temporary_buffer): Fold
+ in get_temporary_buffer.
+
+2007-11-29 Andris Pavenis <andris.pavenis@iki.fi>
+
+ * src/Makefile.am: Use separate vpath lines for each path.
+
+2007-11-28 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/multiway_merge.h: Destruct only elements that
+ were have been constructed before. Code beautifying and formatting.
+ * include/parallel/losertree.h: (Copy) construct all loser tree
+ item keys, so they can be deconstructed all at once.
+ * include/parallel/quicksort.h: Fix memory leak.
+ * include/parallel/random_shuffle.h: Use copy constructor instead
+ of assignment. Code beautifying and formatting.
+ * include/parallel/unique_copy.h: Use assignment instead of copy
+ constructor.
+ * include/parallel/multiway_mergesort.h: Use copy constructor
+ instead of assignment. Code beautifying and formatting.
+ * include/parallel/random_shuffle.h: Use copy constructor instead
+ of assignment. Code beautifying.
+
+2007-11-27 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/check_nan.cc: Add -mieee for sh.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 03_beta/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 12_ellint_1/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 13_ellint_2/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 14_ellint_3/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 15_expint/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 16_hermite/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 18_laguerre/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 19_legendre/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/check_nan.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/check_nan.cc: Likewise.
+
+2007-11-26 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When
+ ios_base::showpos and the type is signed and the value is zero,
+ prepend +.
+ * testsuite/22_locale/num_put/put/char/12.cc: New.
+ * testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise.
+
+2007-11-26 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/25913
+ * include/c_std/cmath (std::fpclassify, isfinite, isinf, isnan,
+ isnormal, signbit, isgreater, isgreaterequal, isless, islessequal,
+ islessgreater, isunordered): Guard with __enable_if and forward
+ with __promote.
+ * include/c_global/cmath: Likewise.
+ * testsuite/26_numerics/headers/cmath/25913.cc: New.
+
+ * include/c_std/cmath (__gnu_cxx::__capture_isfinite,
+ __capture_isinf, __capture_isnan, __capture_isnormal,
+ __capture_signbit, __capture_isgreater, __capture_isgreaterequal,
+ __capture_isless, __capture_islessequal, __capture_islessgreater,
+ __capture_isunordered): Remove.
+ (std::isfinite, isinf, isnan, isnormal, signbit, isgreater,
+ isgreaterequal, isless, islessequal, islessgreater, isunordered):
+ Forward to the corresponding builtin.
+ * include/c_global/cmath: Likewise.
+
+ * include/c_global/cmath (std::atan2, pow): Guard with __enable_if.
+
+2007-11-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/unordered_map
+ (__unordered_map<>::__unordered_map(__unordered_map&&),
+ __unordered_multimap<>::__unordered_multimap(__unordered_multimap&&),
+ unordered_map<>::unordered_map(unordered_map&&),
+ unordered_multimap<>::unordered_multimap(unordered_multimap&&),
+ unordered_map<>::operator=(unordered_map&&),
+ unordered_multimap<>::operator=(unordered_multimap&&),
+ swap(unordered_map<>&&, unordered_map<>&),
+ swap(unordered_map<>&, unordered_map<>&&),
+ swap(unordered_multimap<>&&, unordered_multimap<>&),
+ swap(unordered_multimap<>&, unordered_multimap<>&&)): Add in C++0x.
+ (swap(unordered_multimap<>&, unordered_multimap<>&),
+ swap(unordered_multimap<>&, unordered_multimap<>&)): Add.
+ * include/tr1_impl/unordered_set
+ (__unordered_set<>::__unordered_set(__unordered_set&&),
+ __unordered_multiset<>::__unordered_multiset(__unordered_multiset&&),
+ unordered_set<>::unordered_set(unordered_setp&&),
+ unordered_multiset<>::unordered_multiset(unordered_multiset&&),
+ unordered_set<>::operator=(unordered_set&&),
+ unordered_multiset<>::operator=(unordered_multiset&&),
+ swap(unordered_set<>&&, unordered_set<>&),
+ swap(unordered_set<>&, unordered_set<>&&),
+ swap(unordered_multiset<>&&, unordered_multiset<>&),
+ swap(unordered_multiset<>&, unordered_multiset<>&&)): Likewise.
+ (swap(unordered_set<>&, unordered_set<>&),
+ swap(unordered_multiset<>&, unordered_multiset<>&)): Add.
+ * include/tr1_impl/hashtable (_Hashtable<>::_Hashtable(_Hashtable&&),
+ swap(_Hashtable&&)): Add in C++0x.
+ * testsuite/23_containers/unordered_map/moveable.cc: New.
+ * testsuite/23_containers/unordered_set/moveable.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/moveable.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/moveable.cc: Likewise.
+
+2007-11-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/array (array<>::_M_check): Remove, not necessary
+ anymore.
+ (array<>::at): Adjust.
+
+ * docs/html/17_intro/c++0x_status.html: Fix array::data entry.
+
+2007-11-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (__lexicographical_compare<>::__lc):
+ Move out of line.
+
+ * include/bits/stl_algobase.h (swap_ranges): Remove redundant
+ simulated concept checks.
+
+2007-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/bitset (bitset<>::all): Add, per DR 693 [Ready].
+ (_Base_bitset<>::_M_are_all_aux()): Add.
+ * include/debug/bitset (bitset<>::all): Add.
+ * testsuite/23_containers/bitset/all/1.cc: New.
+ * docs/html/ext/howto.html: Add an entry for DR 693.
+
+ * include/std/bitset (bitset<0>::set, reset, flip, test): Remove,
+ not necessary anymore.
+
+2007-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_list.h (insert(iterator, value_type&&)): Just
+ forward to emplace.
+ * include/bits/stl_vector.h (insert(iterator, value_type&&)): Likewise.
+ * include/bits/stl_deque.h (insert(iterator, value_type&&)): Likewise.
+ * include/debug/list (insert(iterator, value_type&&)): Likewise.
+ * include/debug/vector (insert(iterator, value_type&&)): Likewise.
+ * include/debug/deque (insert(iterator, value_type&&)): Likewise.
+ * include/bits/list.tcc (insert(iterator, value_type&&)): Remove.
+ * include/bits/vector.tcc (insert(iterator, value_type&&)): Likewise.
+ * include/bits/deque.tcc (insert(iterator, value_type&&)): Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_tree.h (_Rb_tree<>::_Rb_tree_impl<, true>): Remove,
+ identical in mainline to the primary template.
+
+2007-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ * config/abi/pre/gnu.ver: Adjust new exports for 128-bit long double.
+
+2007-11-22 Johannes Singler <singler@ira.uka.de>
+
+ PR libstdc++/33893
+ * include/parallel/multiway_merge.h: made omp_dynamic-safe
+ * include/parallel/workstealing.h: made omp_dynamic-safe
+ * include/parallel/base.h: infrastructure, cleanup
+ * include/parallel/par_loop.h: made omp_dynamic-safe
+ * include/parallel/features.h: activate loser tree variant
+ * include/parallel/quicksort.h: made omp_dynamic-safe
+ * include/parallel/compiletime_settings.h: settings overridable
+ * include/parallel/equally_split.h: made omp_dynamic-safe
+ * include/parallel/omp_loop_static.h: made omp_dynamic-safe
+ * include/parallel/random_shuffle.h: made omp_dynamic-safe
+ * include/parallel/balanced_quicksort.h: made omp_dynamic-safe
+ * include/parallel/set_operations.h: made omp_dynamic-safe
+ * include/parallel/unique_copy.h: made omp_dynamic-safe
+ * include/parallel/multiway_mergesort.h: made omp_dynamic-safe
+ * include/parallel/search.h: made omp_dynamic-safe
+ * include/parallel/partition.h: made omp_dynamic-safe
+ * include/parallel/partial_sum.h: made omp_dynamic-safe
+ * include/parallel/find.h: made omp_dynamic-safe
+ * include/parallel/omp_loop.h: made omp_dynamic-safe
+ * include/parallel/losertree.h: avoid default constructor
+
+2007-11-21 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/17_intro/C++STYLE: Fix typos.
+
+2007-11-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: Validate. Add links to index,
+ correct broken links.
+ * docs/html/17_intro/C++STYLE: Add bits.
+ * docs/html/17_intro/configury.html: Correct, update.
+ * docs/html/17_intro/api.html: Correct HTML.
+
+ * include/bits/stl_algobase.h: Adjust comment.
+
+2007-11-20 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * testsuite/ext/throw_allocator/variadic_construct.cc: Add
+ dg-require-time.
+
+2007-11-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/functional_hash.h: Do not include ext/numeric_traits.h.
+ * include/tr1/functional_hash.h: Likewise.
+ * include/std/functional: Include ext/type_traits.h.
+ * include/tr1/functional: Likewise.
+
+2007-11-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/functional_hash.h
+ (hash<long double>::operator()(long double)): Only declare.
+ * src/hash.cc: Define here.
+ * config/abi/pre/gnu.ver: Adjust exports.
+ * include/tr1/functional: Do not include <cmath>.
+ * include/std/functional: Likewise.
+
+ * include/std/functional: Include <new>.
+
+2007-11-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/type_traits (_DEFINE_SPEC_BODY): Remove.
+ (_DEFINE_SPEC_0_HELPER): Rename to _DEFINE_SPEC_HELPER.
+ (_DEFINE_SPEC): Simplify; adjust uses.
+
+2007-11-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/type_traits (is_reference, is_function,
+ remove_cv, is_member_pointer, remove_reference): Declare.
+ * include/tr1_impl/type_traitsfwd.h: Remove.
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+
+2007-11-17 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/17_intro/howto.html, docs/html/21_strings/howto.html,
+ docs/html/22_locale/codecvt.html, docs/html/23_containers/howto.html,
+ docs/html/27_io/howto.html, docs/html/ext/howto.html,
+ docs/html/debug.html, docs/html/install.html,
+ docs/html/faq/index.html: Fix typos and anachronisms.
+
+2007-11-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (struct __lexicographical_compare):
+ Move to namespace std.
+ (__lexicographical_compare_aux<>(_II1, _II1, _II2, _II2)): Add.
+ (lexicographical_compare<>(_II1, _II1, _II2, _II2)): Call the latter.
+
+2007-11-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (struct __lexicographical_compare): Add.
+ (lexicographical_compare<>(_II1, _II1, _II2, _II2)): Use it.
+ (lexicographical_compare(const unsigned char*, const unsigned char*,
+ const unsigned char*, const unsigned char*),
+ lexicographical_compare(const char*, const char*, const char*,
+ const char*)): Remove.
+ * include/ext/numeric_traits.h (__numeric_traits_floating<>::
+ __is_signed): Add.
+
+2007-11-16 Paolo Carlini <pcarlini@suse.de>
+
+ * src/locale_facets.cc: Fix typo in Copyright.
+
+2007-11-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__verify_grouping): Move...
+ * src/locale_facets.cc: ... here.
+ * config/abi/pre/gnu.ver: Update exports.
+
+2007-11-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/istream.tcc (basic_istream<>::sentry::
+ sentry(basic_istream<>&, bool)): Explicitly convert to bool.
+ * include/bits/locale_facets.tcc (num_put<>::_M_insert_int(_OutIter,
+ ios_base&, _CharT, _ValueT)): Likewise.
+ * include/std/ostream (basic_ostream<>::sentry::~sentry): Likewise.
+
+2007-11-15 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34105
+ * include/bits/stl_algobase.h: Do not include <bits/algorithmfwd.h>.
+ (lexicographical_compare(const unsigned char*, const unsigned char*,
+ const unsigned char*, const unsigned char*),
+ lexicographical_compare(const char*, const char*, const char*,
+ const char*)): Move to namespace (std, _GLIBCXX_STD_P).
+ * include/parallel/algobase.h: Do not include <bits/algorithmfwd.h>.
+ (equal): Move after mismatch.
+ * include/bits/stl_heap.h (is_heap, is_heap_until): Reorder.
+ * include/bits/char_traits.h: Include <bits/stl_algobase.h> instead
+ of <bits/algorithmfwd.h>.
+ * include/bits/stl_algo.h: Include first <bits/algorithmfwd.h>.
+ * include/bits/algorithmfwd.h (lexicographical_compare): Do not
+ declare overloads.
+ * include/parallel/partition.h: Include <parallel/random_number.h>.
+ * testsuite/util/testsuite_abi.cc: Include <algorithm>.
+
+2007-11-14 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/multiway_merge.h: More robust finding of an
+ arbitrary existing element inside the input sequences.
+ * include/bits/stl_algo.h: Fix typo to actually call appropriate
+ sequential version.
+
+2007-11-13 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/documentation.html: First pass at unified table of contents.
+ * docs/html/abi.html: Move...
+ * docs/html/17_intro/abi.html: ...here.
+ * docs/html/17_intro/porting-howto.html: Update, edit, put
+ resulting pieces into...
+ * docs/html/17_intro/api.html: New.
+ * docs/html/17_intro/c++0x_status.html: New.
+ * docs/html/17_intro/CHECKLIST: Move to...
+ * docs/html/17_intro/c++1998_status.html: ...here.
+ * docs/html/ext/tr1.html: Move ...
+ * docs/html/17_intro/tr1_status.html: ...here.
+ * docs/html/debug_mode.html: Move...
+ * docs/html/ext/debug_mode.html: ...here.
+ * docs/html/parallel_mode.html: Move...
+ * docs/html/ext/parallel_mode.html: ...here
+ * docs/html/17_intro/BUGS: Remove.
+ * docs/html/17_intro/concept_check.diff: Remove.
+ * docs/html/17_intro/HEADER_POLICY: Remove.
+ * docs/html/17_intro/headers_cc.txt: Remove.
+ * docs/html/17_intro/PROBLEMS: Remove.
+ * docs/html/17_intro/RELEASE-NOTES: Remove.
+ * docs/html/explanations.html: Remove.
+ * docs/html/makedoc.awk: Remove.
+ * docs/html/faq/index.txt: Remove. HTML only.
+ * /docs/html/Makefile: Remove.
+
+ * docs/html/17_intro/configury.html: Editing, updating,
+ consistency check with doxygen conventions. Change libstdc++-v3 to
+ libstdc++.
+ * docs/html/17_intro/howto.html: Same.
+ * docs/html/17_intro/license.html: Same.
+ * docs/html/17_intro/porting.html: Same.
+ * docs/html/18_support/howto.html: Same.
+ * docs/html/19_diagnostics/howto.html: Same.
+ * docs/html/20_util/allocator.html: Same.
+ * docs/html/20_util/howto.html: Same.
+ * docs/html/21_strings/howto.html: Same.
+ * docs/html/22_locale/codecvt.html: Same.
+ * docs/html/22_locale/ctype.html: Same.
+ * docs/html/22_locale/howto.html: Same.
+ * docs/html/22_locale/messages.html: Same.
+ * docs/html/23_containers/howto.html: Same.
+ * docs/html/24_iterators/howto.html: Same.
+ * docs/html/25_algorithms/howto.html: Same.
+ * docs/html/26_numerics/howto.html: Same.
+ * docs/html/27_io/howto.html: Same.
+ * docs/html/configopts.html: Same.
+ * docs/html/debug.html: Same.
+ * docs/html/ext/ballocator_doc.html: Same.
+ * docs/html/ext/howto.html: Same.
+ * docs/html/ext/mt_allocator.html: Same.
+ * docs/html/ext/sgiexts.html: Same.
+ * docs/html/faq/index.html: Same.
+ * docs/html/install.html: Same.
+ * docs/html/test.html: Same.
+
+ * include/bits/c++config: Change _GLIBCXX_DEPRECATED to
+ _GLIBCXX_DEPRECATED_ATTR, _GLIBCXX_VISIBILITY to
+ _GLIBCXX_VISIBILITY_ATTR.
+ * include/backward/auto_ptr.h: Same.
+ * include/backward/binders.h: Same.
+ * include/bits/stl_function.h: Same.
+ * include/std/memory: Same.
+ * include/std/streambuf: Same.
+ * include/tr1_impl/boost_shared_ptr.h: Same.
+ * src/globals_io.cc: Same.
+ * src/ios_init.cc: Same.
+
+2007-11-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/deque.tcc (deque<>::_M_push_back_aux,
+ _M_push_front_aux): Do not copy unnecessarily to __t_copy.
+
+2007-11-12 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_deque.h (deque<>::push_back<>(_Args...),
+ deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...),
+ insert(iterator, _Tp&&), _M_push_back_aux<>(_Args&&...),
+ _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator,
+ _Args&&...)): Add.
+ * include/deque/deque.tcc (insert(iterator, value_type&&),
+ emplace<>(iterator, _Args...), _M_push_back_aux<>(_Args&&...),
+ _M_push_front_aux<>(_Args&&...), _M_insert_aux<>(iterator,
+ _Args&&...)): Define.
+ (_M_insert_aux(iterator, size_type, const value_type&),
+ _M_insert_aux<>(iterator, _ForwardIterator, _ForwardIterator,
+ size_type)): Use _GLIBCXX_MOVE3, _GLIBCXX_MOVE_BACKWARD3,
+ __uninitialized_move*, __uninitialized_fill_move,
+ __uninitialized_copy_move, when possible.
+ * include/bits/stl_uninitialized.h (__uninitialized_copy_copy,
+ __uninitialized_fill_copy, __uninitialized_copy_fill): Remove.
+ (__uninitialized_copy_move, __uninitialized_move_copy,
+ __uninitialized_move_fill, __uninitialized_fill_move): Add.
+ * include/debug/deque (deque<>::push_back<>(_Args...),
+ deque<>::push_front<>(_Args...), emplace<>(iterator, _Args...),
+ insert(iterator, _Tp&&)): Add.
+ * testsuite/23_containers/deque/modifiers/moveable.cc: Enable.
+ * testsuite/23_containers/deque/capacity/moveable.cc: Likewise.
+ * testsuite/23_containers/deque/cons/moveable.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line numbers.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+ * include/debug/vector (vector<>::insert(iterator, _Tp&&)): Minor
+ tweak, prefer std::move.
+
+2007-11-11 Howard Hinnant <hhinnant@apple.com>
+
+ * include/bits/stl_pair.h (pair<>::pair<>(_U1&&, _Arg0&&,
+ _Args&&...)): Add.
+
+2007-11-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_list.h (list<>::_M_create_node<>(_Args&&...),
+ _M_insert<>(iterator, _Args&&...), push_front<>(_Args&&...),
+ push_back<>(_Args&&...)): Add.
+ (list<>::emplace<>(iterator, _Args&&...), insert(iterator,
+ value_type&&)): Declare.
+ (splice(iterator, list&&), splice(iterator, list&&, iterator),
+ splice(iterator, list&&, iterator, iterator), merge(list&&),
+ merge(list&&, _StrictWeakOrdering)): Add C++0x signatures.
+ * include/bits/list.tcc (list<>::emplace<>(iterator, _Args&&...),
+ insert(iterator, value_type&&)): Define.
+ * include/debug/list (list<>::emplace<>(iterator, _Args&&...),
+ insert(iterator, value_type&&)): Add.
+ (splice(iterator, list&&), splice(iterator, list&&, iterator),
+ splice(iterator, list&&, iterator, iterator), merge(list&&),
+ merge(list&&, _StrictWeakOrdering)): Add C++0x signatures, use
+ _GLIBCXX_MOVE.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-11-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_deque.h (deque<>::operator=(deque&&)): Implement
+ resolution of DR 675, call clear first.
+ * include/bits/stl_list.h (list<>::operator=(list&&)): Likewise.
+ * include/bits/stl_bvector.h (vector<bool>::operator=(vector&&)):
+ Likewise.
+ * include/bits/stl_vector.h (vector<>::operator=(vector&&)): Likewise.
+ * include/bits/stl_map.h (map<>::operator=(map&&)): Likewise.
+ * include/bits/stl_multimap.h (multimap<>::operator=(multimap&&)):
+ Likewise.
+ * include/bits/stl_multiset.h (multiset<>::operator=(multiset&&)):
+ Likewise.
+ * include/bits/stl_set.h (set<>::operator=(set&&)): Likewise.
+ * include/debug/map.h (map<>::operator=(map&&)): Likewise.
+ * include/debug/set.h (set<>::operator=(set&&)): Likewise.
+ * include/debug/multimap.h (multimap<>::operator=(multimap&&)):
+ Likewise.
+ * include/debug/multiset.h (multiset<>::operator=(multiset&&)):
+ Likewise.
+ * include/debug/deque (deque<>::operator=(deque&&)): Likewise.
+ * include/debug/list (list<>::operator=(list&&)): Likewise.
+ * include/debug/vector (vector<>::operator=(vector&&)): Likewise.
+ * testsuite/23_containers/multimap/moveable.cc: Adjust.
+ * testsuite/23_containers/multiset/moveable.cc: Likewise.
+ * testsuite/23_containers/set/moveable.cc: Likewise.
+ * testsuite/23_containers/map/moveable.cc: Likewise.
+ * testsuite/20_util/pair/moveable.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line numbers.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-11-09 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/34032
+ * acinclude.m4 ([GLIBCXX_ENABLE_C99], [GLIBCXX_CHECK_C99_TR1]):
+ Use -std=c++98 instead of the default -std=gnu++98.
+ * configure: Regenerate.
+
+2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ * config/io/basic_file_stdio.cc (fopen_mode): Add modes missing
+ per DR 596.
+ * testsuite/27_io/basic_filebuf/open/char/4.cc: Extend.
+ * include/std/fstream: Update comment preceding open.
+ * docs/html/ext/howto.html: Update.
+
+2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/type_traits (__decay_selector<_Up, false, false>):
+ Change according to DR 705.
+ * include/bits/stl_pair.h (make_pair(_T1&&, _T2&&)): Change
+ according to DR 706.
+ * include/tr1_impl/tuple: Tweak.
+
+2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/debug/vector (push_back, emplace): Fix signature typo.
+
+2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (ctype<char>::taple, classic_table):
+ Implement trivial resolution of DR 695 [Ready].
+ * testsuite/22_locale/ctype/dr695.cc: New.
+ * docs/html/ext/howto.html: Update.
+
+2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+ * docs/html/ext/lwg-active.html: Update to Revision R52.
+ * docs/html/ext/lwg-closed.html: Likewise.
+ * docs/html/ext/lwg-defects.html: Likewise.
+ * docs/html/ext/howto.html: Adjust.
+
+2007-11-07 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/complex (fabs): In C++0x mode adjust
+ return type per DR 595 [Ready].
+
+2007-11-07 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_iterator.h (move_iterator<>::pointer): Adjust
+ typedef per DR 680 [Ready].
+
+2007-11-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/vector.tcc (vector<>::_M_insert_aux<>(iterator,
+ _Args&&...)): In C++0x mode do not use temporary copies.
+ (insert(iterator, const value_type&)): Copy to a temporary
+ when not reallocating.
+
+ * include/bits/vector.tcc (insert(iterator, value_type&&)):
+ Minor tweaks in C++0x mode.
+
+2007-11-06 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/tr1_impl/boost_shared_ptr.h: Avoid unnecessary memory
+ barriers in _S_atomic case.
+
+2007-11-05 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_vector.h (vector<>::push_back<>(_Args...),
+ emplace<>(iterator, _Args...), insert(iterator, _Tp&&),
+ _M_insert_aux<>(iterator, _Args&&...)): Add.
+ * include/bits/vector.tcc (insert(iterator, value_type&&),
+ emplace<>(iterator, _Args...), _M_insert_aux<>(iterator, _Args&&...)):
+ Define.
+ (_M_fill_insert(iterator, size_type, const value_type&),
+ _M_range_insert(iterator, _ForwardIterator, _ForwardIterator,
+ std::forward_iterator_tag)): Use __uninitialized_move_a,
+ _GLIBCXX_MOVE_BACKWARD3 when possible.
+ * include/bits/stl_uninitialized.h (__uninitialized_move_a): Add.
+ * include/debug/vector (vector<>::push_back<>(_Args...),
+ emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add.
+ * testsuite/23_containers/vector/modifiers/moveable.cc: Enable.
+ * testsuite/23_containers/vector/resize/moveable.cc: Likewise.
+ * testsuite/23_containers/vector/cons/moveable.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line numbers.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-11-03 Paolo Carlini <pcarlini@suse.de>
+ Kai-Uwe Bux <bux@kubux.net>
+
+ * include/tr1_impl/random (variate_generator<>::min, max,
+ operator()()): Return non-trivial values when _Engine_result_type
+ is a floating point type and result_type is an integer type.
+
+2007-11-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (minmax, minmax_element): Add.
+ * include/bits/algorithmfwd.h: Update.
+ * testsuite/25_algorithms/minmax/requirements/
+ explicit_instantiation/2.cc: New.
+ * testsuite/25_algorithms/minmax/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/minmax/1.cc: Likewise.
+ * testsuite/25_algorithms/minmax_element/check_type.cc: Likewise.
+ * testsuite/25_algorithms/minmax_element/requirements/
+ explicit_instantiation/2.cc: Likewise.
+ * testsuite/25_algorithms/minmax_element/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/minmax_element/1.cc: Likewise.
+ * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Update.
+
+2007-11-02 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/workstealing.h: Replaced pragma by function
+ call lock.
+ * include/parallel/search.h: Same
+ * include/parallel/partition.h: Same
+ * include/parallel/find.h: Same
+
+2007-11-01 Janis Johnson <janis187@us.ibm.com>
+
+ PR testsuite/25352
+ * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
+ Remove xfail from dg-do and add dg-skip-if.
+
+2007-10-31 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_queue.h (queue<>::push(value_type&&)): Replace
+ with "emplace" version per DR 756.
+ (priority_queue<>::push(value_type&&)): Likewise.
+ * include/bits/stl_stack.h (stack<>::push(value_type&&)): Likewise.
+
+2007-10-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/random (uniform_int<>::
+ _M_call(_UniformRandomNumberGenerator&, result_type, result_type,
+ true_type)): Only declare.
+ * include/tr1_impl/random.tcc (uniform_int<>::
+ _M_call(_UniformRandomNumberGenerator&, result_type, result_type,
+ true_type)): Re-do, unbiased for the currently supported ranges;
+ add comment.
+
+2007-10-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/ext/pb_ds/multimap_text_insert_timing_test_small.html:
+ Correct filename.
+ * docs/html/ext/pb_ds/multimap_text_find_timing_test_large.html: Same.
+ * docs/html/ext/pb_ds/
+ multimap_text_insert_mem_usage_test_small.html: Same.
+ * docs/html/ext/pb_ds/multimap_text_insert_timing_test_large.html: Same.
+ * docs/html/ext/pb_ds/
+ multimap_text_insert_mem_usage_test_large.html: Same.
+ * docs/html/ext/pb_ds/multimap_text_find_timing_test_small.html: Same.
+
+2007-10-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (PCHFLAGS): Remove -Wno-deprecated.
+ * include/Makefile.in: Regenerate.
+
+ * include/std/memory: Remove extraneous include.
+
+2007-10-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config (_GLIBCXX_DEPRECATED,
+ _GLIBCXX_USE_DEPRECATED): New. Adjust comments.
+ * include/bits/stl_auto_ptr.h: Move...
+ * includse/backward/auto_ptr.h: ...here.
+ * include/bits/stl_function.h (binder1st, binder2nd, bind1st,
+ bind2nd): Move...
+ * include/backward/binders.h: ...here. Deprecate in C++0x.
+
+ * include/tr1_impl/boost_shared_ptr.h: Guard auto_ptr usage.
+ * include/std/memory: Same.
+ * include/std/streambuf: Consistent use of _GLIBCXX_USE_DEPRECATED.
+
+ * include/backward/strstream: Fix guard macros.
+ * include/backward/backward_warning.h: Adjust for all new items.
+
+ * config/abi/pre/gnu.ver: Export basic_streambuf::stossc.
+
+ * include/Makefile.am (backward_headers): Adjust.
+ * include/Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2007-10-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/Makefile.am (ext_compat_headers): New.
+ * include/Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2007-10-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (_GLIBCXX_MOVE3,
+ _GLIBCXX_MOVE_BACKWARD3): Add.
+ * include/bits/stl_iterator.h (_GLIBCXX_MAKE_MOVE_ITERATOR): Add.
+ * include/bits/vector.tcc (vector<>::reserve): Use the latter.
+ (vector<>::erase): Use _GLIBCXX_MOVE3.
+ * include/bits/deque.tcc (deque<>::erase): Use _GLIBCXX_MOVE3
+ and _GLIBCXX_MOVE_BACKWARD3.
+ * testsuite/23_containers/vector/modifiers/erase/moveable.cc: New.
+ * testsuite/23_containers/vector/capacity/reserve/moveable.cc: New.
+ * testsuite/23_containers/deque/modifiers/erase/moveable.cc: New.
+
+2007-10-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_uninitialized.h (uninitialized_copy): Use
+ ::new and value_type per the letter of the standard.
+ * testsuite/20_util/specialized_algorithms/uninitialized_copy/
+ move_iterators/1.cc: New.
+
+ * testsuite/20_util/specialized_algorithms/16505.cc: Move to...
+ * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
+ 16505.cc: ... here.
+ * testsuite/20_util/specialized_algorithms/32158.cc: Move to...
+ * testsuite/20_util/specialized_algorithms/uninitialized_fill/
+ 32158.cc: ... here.
+
+ * include/bits/stl_construct.h (_Construct(_T1*)): Remove, unused.
+
+2007-10-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (struct __miter_base): Add.
+ (__copy_move_a2, __copy_move_backward_a2): Add.
+ (copy, copy_backward, move, move_backward): Adjust, call *a2 helpers.
+ * include/bits/cpp_type_traits.h (struct __is_move_iterator): Add.
+ * include/bits/streambuf_iterator.h (__copy_move_a<>): Rename
+ to __copy_move_a2.
+ * include/std/streambuf (friend __copy_move_a<>): Likewise.
+ * testsuite/25_algorithms/copy/move_iterators/1.cc: New.
+ * testsuite/25_algorithms/copy_backward/move_iterators/1.cc: Likewise.
+
+ * include/bits/stl_iterator.h (__normal_iterator<>::_Iterator_type):
+ Rename to iterator_type.
+
+2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/throw_allocator.h (throw_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ * include/ext/pool_allocator.h (__pool_alloc<>::
+ construct<>(pointer, _Args&&...)): Likewise.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * include/ext/bitmap_allocator.h (bitmap_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * include/ext/new_allocator.h (new_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * include/ext/malloc_allocator.h (malloc_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * include/ext/array_allocator.h (array_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * include/ext/mt_allocator.h (__mt_alloc<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * testsuite/util/testsuite_allocator.h (tracker_allocator<>::
+ construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ (uneq_allocator<>::construct<>(pointer, _Args&&...)): Add.
+ (construct(pointer, const _Tp&)): Cast pointer to void*.
+ * testsuite/ext/mt_allocator/variadic_construct.cc: New.
+ * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
+ * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
+ * testsuite/ext/malloc_allocator/variadic_construct.cc: Likewise.
+ * testsuite/ext/pool_allocator/variadic_construct.cc: Likewise.
+ * testsuite/ext/bitmap_allocator/variadic_construct.cc: Likewise.
+ * testsuite/ext/array_allocator/variadic_construct.cc: Likewise.
+
+2007-10-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/unordered_map: Fix for parallel mode.
+ * include/std/unordered_set: Same.
+
+2007-10-25 Andreas Tobler <a.tobler@schweiz.org>
+
+ * include/Makefile.am (parallel_headers): Remove timing.h.
+ * include/Makefile.in: Regenerate.
+
+2007-10-25 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/multiway_merge.h: Removed Timing<inactive_tag>
+ * include/parallel/random_shuffle.h: Same
+ * include/parallel/set_operations.h: Same
+ * include/parallel/tree.h: Same
+ * include/parallel/multiway_mergesort.h: Same
+ * include/parallel/timing.h: Removed completely
+
+2007-10-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (__lg<>(_Size)): Slightly tweak.
+ (__lg(int), __lg(long), __lg(long long)): Add, overloads
+ exploiting __builtin_clz*.
+
+2007-10-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/array (_M_instance): Align naturally.
+ * testsuite/ext/array_allocator/1.cc: Use ext/vstring,
+ more solid than our current basic_string vs alignment.
+ * testsuite/ext/array_allocator/2.cc: Likewise.
+ * testsuite/ext/array_allocator/3.cc: Likewise.
+
+2007-10-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_move.h (_GLIBCXX_MOVE): Wrap in parentheses.
+ * include/bits/stl_algobase.h (__niter_base<>): Pass iterators
+ by value, as everywhere else.
+
+2007-10-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/random
+ (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+ result_type, true_type)): Fix small thinko.
+
+2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33815
+ * include/tr1_impl/random
+ (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type,
+ result_type, true_type)): Avoid the modulo (which uses the low-order
+ bits).
+
+2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (struct __cm_assign,
+ struct __copy_move, struct __copy_move_backward, move,
+ move_backward): Add.
+ (struct __copy, struct __copy_backward): Remove.
+ (__copy_aux, __copy_backward_aux): Rename to...
+ (__copy_move_a, __copy_move_backward_a): ... this, and
+ adjust calls.
+ (copy, copy_backward): Adjust calls.
+ * include/bits/streambuf_iterator.h (__copy_aux): Rename
+ to ...
+ (__copy_move_a): ... this; add bool template parameter.
+ * include/std/streambuf: Adjust friend declarations.
+ * testsuite/util/testsuite_iterators.h
+ (WritableObject<>::operator=(U&&)): Add.
+ * testsuite/25_algorithms/move/1.cc: New.
+ * testsuite/25_algorithms/move/requirements/
+ explicit_instantiation/2.cc: Likewise.
+ * testsuite/25_algorithms/move/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/move_backward/1.cc: Likewise.
+ * testsuite/25_algorithms/move_backward/requirements/
+ explicit_instantiation/2.cc: Likewise.
+ * testsuite/25_algorithms/move_backward/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+
+2007-10-18 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/check_nan.cc: Add -mieee for sh.
+
+2007-10-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/allocator.h (struct __alloc_neq): Add.
+ * include/bits/stl_list.h (list<>::_M_check_equal_allocators): Use it.
+
+2007-10-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/hash_map: To...
+ * include/backward/hash_map: ...here. Remove debug mode.
+ * include/ext/hash_set: To...
+ * include/backward/hash_set: ...here. Remove debug mode.
+ * include/ext/hash_fun.h: To...
+ * include/backward/hash_fun.h: ...here.
+ * include/ext/hashtable.h: To...
+ * include/backward/hashtable.h: ...here.
+
+ * include/bits/c++config: Remove __gnu_cxx namespace from debug mode.
+ * include/debug/debug.h: Same.
+
+ * include/debug/hash_map: Remove.
+ * include/debug/hash_multimap.h: Remove.
+ * include/debug/hash_set.h: Remove.
+ * include/debug/hash_set: Remove.
+ * include/debug/hash_multiset.h: Remove.
+ * include/debug/hash_map.h: Remove.
+
+ * include/Makefile.am (ext_headers): Move hash_set, hash_map to
+ backward.
+ (debug_headers): Remove hash_map, hash_set, hash_map.h,
+ hash_map.h, hash_multiset.h, hash_multimap.h.
+ * include/Makefile.in: Regenerate.
+
+ * docs/html/debug.html: Update.
+ * docs/html/ext/howto.html: Same.
+ * docs/html/faq/index.html: Same.
+ * docs/doxygen/Intro.3: Same.
+ * docs/doxygen/user.cfg.in: Adjust includes.
+ * testsuite/ext/hash_map: Move to...
+ * testsuite/backward/hash_map: ...here.
+ * testsuite/ext/hash_set: Move to...
+ * testsuite/backward/hash_set: ...here.
+
+2007-10-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ Removal of pre-ISO C++ items from include/backwards.
+ * include/Makefile.am (backward_headers): Remove all but strstream,
+ backward_warning.h.
+ * include/Makefile.in: Regenerate.
+ * include/backward/new.h: Remove.
+ * include/backward/iterator.h: Same.
+ * include/backward/alloc.h: Same.
+ * include/backward/set.h: Same.
+ * include/backward/hashtable.h: Same.
+ * include/backward/hash_set.h: Same.
+ * include/backward/fstream.h: Same.
+ * include/backward/tempbuf.h: Same.
+ * include/backward/istream.h: Same.
+ * include/backward/bvector.h: Same.
+ * include/backward/stack.h: Same.
+ * include/backward/rope.h: Same.
+ * include/backward/complex.h: Same.
+ * include/backward/ostream.h: Same.
+ * include/backward/heap.h: Same.
+ * include/backward/iostream.h: Same.
+ * include/backward/function.h: Same.
+ * include/backward/multimap.h: Same.
+ * include/backward/pair.h: Same.
+ * include/backward/stream.h: Same.
+ * include/backward/iomanip.h: Same.
+ * include/backward/slist.h: Same.
+ * include/backward/tree.h: Same.
+ * include/backward/vector.h: Same.
+ * include/backward/deque.h: Same.
+ * include/backward/multiset.h: Same.
+ * include/backward/defalloc.h: Same.
+ * include/backward/list.h: Same.
+ * include/backward/map.h: Same.
+ * include/backward/algobase.h: Same.
+ * include/backward/hash_map.h: Same.
+ * include/backward/algo.h: Same.
+ * include/backward/queue.h: Same.
+ * include/backward/streambuf.h: Same.
+ * testsuite/backward/header_hash_set_h.cc: Same.
+ * testsuite/backward/header_slist_h.cc: Same.
+ * testsuite/backward/header_hash_map_h.cc: Same.
+ * testsuite/backward/header_tempbuf_h.cc: Same.
+ * testsuite/backward/header_deque_h.cc: Same.
+ * testsuite/backward/header_rope_h.cc: Same.
+ * testsuite/backward/header_iterator_h.cc: Same.
+ * testsuite/backward/header_hashtable_h.cc: Same.
+
+2007-10-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/30085
+ * include/debug/unordered_map: New.
+ * include/debug/unordered_set: New.
+ * include/debug/safe_association.h: New.
+ * include/std/unordered_map: Include debug header if _GLIBCXX_DEBUG.
+ * include/std/unordered_set: Same.
+ * include/Makefile.am (debug_headers): Add unordered_map,
+ unordered_set, safe_association.h.
+ * include/Makefile.in: Regenerate.
+ * testsuite/23_containers/unordered_map/requirements/debug.cc: New.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ debug.cc: New.
+ * testsuite/23_containers/unordered_set/requirements/debug.cc: New.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ debug.cc: New.
+
+2007-10-18 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/native_type/assoc/native_hash_multimap.hpp: Remove
+ hash_map include.
+
+2007-10-18 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33807
+ * include/bits/allocator.h (operator==(const allocator<_Tp>&,
+ const allocator<_Tp>&), operator!=(const allocator<_Tp>&,
+ const allocator<_Tp>&)): Add.
+ * testsuite/20_util/allocator/33807.cc: New.
+
+2007-10-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/cpp_type_traits.h (__is_byte): Add.
+ * include/bits/stl_algobase.h (struct __fill, struct __fill_n,
+ __fill_aux, __fill_n_aux): Remove.
+ (__fill_a, __fill_n_a): Add.
+ (fill, fill_n): Adjust.
+
+2007-10-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_iterator.h (back_insert_iterator<>::operator=
+ (typename _Container::value_type&&), front_insert_iterator<>::
+ operator=(typename _Container::value_type&&), insert_iterator<>::
+ operator=(typename _Container::value_type&&)): Add.
+
+ * include/bits/stl_iterator.h (insert_iterator<>::operator=
+ (typename _Container::const_reference)): Fix typo in signature.
+
+2007-10-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/array: Correct macro guarding cbegin, cend,
+ crbegin, crend.
+ * include/tr1_impl/hashtable: Likewise.
+
+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/vstring.h (__versa_string<>::front,
+ __versa_string<>::back): Add.
+ * testsuite/ext/vstring/element_access/char/front_back.cc: New.
+ * testsuite/ext/vstring/element_access/wchar_t/front_back.cc: Likewise.
+
+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_queue.h (queue<>::queue(_Sequence&&),
+ queue<>::queue(queue&&), queue<>::operator=(queue&&),
+ queue<>::push(value_type&&), queue<>::swap(queue&&),
+ swap(queue<>&, queue<>&), swap(queue<>&&, queue<>&),
+ swap(queue<>&, queue<>&&), priority_queue<>::
+ priority_queue(const _Compare&, _Sequence&&),
+ priority_queue<>::priority_queue(_InputIterator, _InputIterator,
+ const _Compare&, _Sequence&&),
+ priority_queue<>::priority_queue(priority_queue&&),
+ priority_queue<>::operator=(priority_queue&&),
+ priority_queue<>::push(value_type&&),
+ priority_queue<>::swap(priority_queue&&),
+ swap(priority_queue<>&, priority_queue<>&),
+ swap(priority_queue<>&&, priority_queue<>&),
+ swap(priority_queue<>&, priority_queue<>&&)): Add.
+ * include/bits/stl_stack.h (stack<>::stack(_Sequence&&),
+ stack<>::push(value_type&&), stack<>::swap(stack&&),
+ swap(stack<>&, stack<>&), swap(stack<>&&, stack<>&),
+ swap(stack<>&, stack<>&&)): Add.
+ * testsuite/23_containers/queue/moveable.cc: New.
+ * testsuite/23_containers/priority_queue/moveable.cc: Likewise.
+
+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/vstring.h (__versa_string<>::
+ __versa_string(__versa_string&&),
+ __versa_string<>::operator=(__versa_string&&,
+ swap(__versa_string<>&&, __versa_string<>&),
+ swap(__versa_string<>(&, __versa_string<>&&)): Add.
+ (__versa_string<>::swap(__versa_string&&)): Adjust for C++0x.
+ * include/ext/sso_string_base.h
+ (__sso_string_base(__sso_string_base&&)): Add.
+ (__sso_string_base()): Use _Alloc_hider(_CharT*).
+ * include/ext/rc_string_base.h (__rc_string_base(__rc_string_base&&)):
+ Add.
+ (__rc_string_base()): Use _Alloc_hider(_CharT*).
+ * include/ext/vstring_util.h (_Alloc_hider::_Alloc_hider(_CharT*)):
+ Add.
+ * testsuite/ext/vstring/moveable.cc: Add.
+
+ * include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&)): Add.
+ * include/bits/stl_map.h (map<>::map(map&&)): Forward to the latter.
+ * include/bits/stl_set.h (set<>::set(set&&)): Likewise.
+ * include/bits/stl_multimap.h (multimap<>::multimap(multimap&&)):
+ Likewise.
+ * include/bits/stl_multiset.h (multiset<>::multiset(multiset&&)):
+ Likewise.
+ * include/bits/stl_deque.h (_Deque_base<>::_Deque_base(_Deque_base&&)):
+ Add.
+ (deque<>::deque(deque&&)): Forward to the latter.
+ * include/bits/stl_list.h (_List_base<>::_List_base(_List_base&&)):
+ Add.
+ (list<>::list(list&&)): Forward to the latter.
+ * include/bits/stl_vector.h
+ (_Vector_base<>::_Vector_base(_Vector_base&&)): Add.
+ (vector<>::vector(vector&&)): Forward to the latter.
+ * include/bits/stl_bvector.h
+ (_Bvector_base<>::_Bvector_base(_Bvector_base&&)): Add.
+ (vector<bool>::vector(vector&&)): Forward to the latter.
+
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error lines.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/debug/set.h (set<>::cbegin, cend, crbegin, crend): Add.
+ * include/debug/multiset.h (set<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/debug/vector (vector<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/debug/map.h (map<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/debug/deque (deque<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/debug/list (list<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/debug/multimap.h (multimap<>::cbegin, cend, crbegin,
+ crend): Likewise.
+ * include/tr1_impl/array (array<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/ext/vstring.h (__versa_string<>::cbegin, cend, crbegin,
+ crend): Likewise.
+ * include/bits/stl_list.h (list<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/bits/stl_map.h (map<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/bits/stl_set.h (set<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/bits/stl_multimap.h (multimap<>::cbegin, cend, crbegin,
+ crend): Likewise.
+ * include/bits/stl_vector.h (vector<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/bits/stl_deque.h (deque<>::cbegin, cend, crbegin, crend):
+ Likewise.
+ * include/bits/stl_multiset.h (multiset<>::cbegin, cend, crbegin,
+ crend): Likewise.
+ * include/bits/stl_bvector.h (vector<bool>::cbegin, cend, crbegin,
+ crend): Likewise.
+ * include/tr1_impl/hashtable (_Hashtable<>::cbegin, cend): Add.
+
+ * testsuite/ext/vstring/requirements/citerators.cc: Add.
+ * testsuite/23_containers/unordered_map/requirements/citerators.cc:
+ Likewise.
+ * testsuite/23_containers/multimap/requirements/citerators.cc:
+ Likewise.
+ * testsuite/23_containers/set/requirements/citerators.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ citerators.cc: Likewise.
+ * testsuite/23_containers/unordered_set/requirements/citerators.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/citerators.cc: Likewise.
+ * testsuite/23_containers/vector/bool/requirements/citerators.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/citerators.cc: Likewise.
+ * testsuite/23_containers/multiset/requirements/citerators.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/citerators.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ citerators.cc: Likewise.
+ * testsuite/23_containers/map/requirements/citerators.cc: Likewise.
+ * testsuite/23_containers/array/requirements/citerators.cc: Likewise.
+
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error lines.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33773 (cont)
+ * testsuite/21_strings/headers/cwchar/macros.cc: Guard with
+ _GLIBCXX_USE_WCHAR_T, instead.
+
+2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33771
+ PR libstdc++/33773
+ * testsuite/21_strings/headers/cwchar/macros.cc: Guard test with
+ _GLIBCXX_HAVE_WCHAR_H.
+ * testsuite/21_strings/headers/cwctype/macros.cc: Likewise with
+ _GLIBCXX_HAVE_WCTYPE_H.
+ * testsuite/17_intro/headers/c++200x/all.cc: Guard inclusions
+ of <wchar.h> and <wctype.h>.
+ * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
+ Likewise.
+ * testsuite/17_intro/headers/c++1998/all.cc: Likewise.
+ * testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc:
+ Likewise.
+
+2007-10-14 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (is_sorted, is_sorted_until): Add.
+ * include/bits/algorithmfwd.h: Add.
+ * include/ext/algorithm: Adjust.
+ * testsuite/25_algorithms/is_sorted/requirements/
+ explicit_instantiation/2.cc: New.
+ * testsuite/25_algorithms/is_sorted/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/is_sorted/1.cc: Likewise.
+ * testsuite/25_algorithms/is_sorted_until/requirements/
+ explicit_instantiation/2.cc: Likewise.
+ * testsuite/25_algorithms/is_sorted_until/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/is_sorted_until/1.cc: Likewise.
+ * testsuite/25_algorithms/headers/algorithm/synopsis.cc:
+ Add is_sorted and is_sorted_until.
+
+ * include/bits/stl_heap.h (is_heap_until): Add concept and
+ debug-mode checks.
+
+2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_heap.h (__is_heap_until): Add.
+ (__is_heap(_RandomAccessIterator, _Distance),
+ __is_heap(_RandomAccessIterator, _Compare, _Distance)):
+ Adjust, call the latter.
+ (is_heap, is_heap_until): Add, call the above.
+ * include/bits/algorithmfwd.h: Add.
+ * testsuite/25_algorithms/is_heap/requirements/
+ explicit_instantiation/2.cc: New.
+ * testsuite/25_algorithms/is_heap/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/is_heap/1.cc: Likewise.
+ * testsuite/25_algorithms/is_heap_until/requirements/
+ explicit_instantiation/2.cc: Likewise.
+ * testsuite/25_algorithms/is_heap_until/requirements/
+ explicit_instantiation/pod.cc: Likewise.
+ * testsuite/25_algorithms/is_heap_until/1.cc: Likewise.
+ * testsuite/25_algorithms/headers/algorithm/synopsis.cc:
+ Add is_heap and is_heap_until.
+
+2007-10-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/doxygen/user.cfg.in: Scan tr1_impl/hashtable.
+ * include/tr1_impl/hashtable: Correct comment.
+
+ * include/ext/hash_map: Remove extraneous public markers.
+ * include/ext/hash_set: Same.
+
+ * testsuite/25_algorithms/headers/parallel_algorithm.cc: Move
+ inside algorithm directory.
+ * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: Same.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: Same.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc:
+ To this.
+ * testsuite/25_algorithms/headers/algorithm/
+ algorithm_parallel_mode.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/
+ parallel_algorithm_mixed1.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/
+ parallel_algorithm_mixed2.cc: Same.
+
+ * testsuite/21_strings/basic_string/requirements/
+ explicit_instantiation/debug.cc: Remove exception text.
+
+ * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
+ Fix for debug mode testing.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
+
+2007-10-12 Jesper Nilsson <jesper.nilsson@axis.com>
+
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_value_neg.c (MAX_ITERATIONS): Add limit
+ when target is simulator.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_value_pos.c (MAX_ITERATIONS): Likewise.
+
+2007-10-11 Roger Sayle <roger@eyesopen.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EOVERFLOW for Tru64.
+ * configure: Regenerate.
+ * config/os/generic/error_constants.h: Guard.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+
+2007-10-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ Convert ext/hash_map, set to tr1/functional, tr1/unordered_map, set.
+ * include/ext/rope: Use tr1/functional hash instead of ext/hash_fun.h.
+ * include/ext/pb_ds/detail/standard_policies.hpp: Same.
+ * include/precompiled/extc++.h: Remove hash_map, hash_set.
+ * testsuite/util/testsuite_abi.h (__gnu_cxx): Use unordered_map
+ instead of hash_map. Remove hash specialization for string.
+ * testsuite/util/testsuite_abi.cc: Include <vector>.
+ * testsuite/util/native_type/assoc/native_hash_set.hpp: Remove
+ hash_set code.
+ * testsuite/util/native_type/assoc/native_hash_map.hpp: Remove
+ hash_map code.
+ * testsuite/util/native_type/assoc/native_hash_multimap.hpp:
+ Change hash_multimap to unordered_multimap.
+ * testsuite/util/testsuite_common_types.h: Remove hash_map, hash_set.
+ * testsuite/ext/headers.cc: Same.
+ * testsuite/17_intro/headers/all_c++200x_compatibility.cc: Remove
+ hash_map.h, hash_set.h.
+ * testsuite/17_intro/headers/all.cc: Same.
+ * testsuite/17_intro/headers/all_pedantic_errors.cc: Same.
+
+ * include/ext/pb_ds/detail/standard_policies.hpp: Format.
+ * testsuite/util/native_type/assoc/native_set.hpp: Same,
+ update comment.
+ * testsuite/util/native_type/assoc/native_map.hpp: Same.
+ * testsuite/util/native_type/assoc/native_multimap.hpp: Same.
+ * testsuite/util/performance/assoc/timing/
+ multimap_insert_test.hpp: Same.
+ * testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same.
+
+2007-10-11 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
+ make_heap): Use _GLIBCXX_MOVE.
+ (__pop_heap): Likewise, adjust signature.
+ (pop_heap): Adjust __pop_heap call.
+ * include/bits/stl_algo.h (__heap_select): Likewise.
+ * testsuite/25_algorithms/heap/moveable.cc: Remove dg-require-rvalref.
+ * testsuite/25_algorithms/partial_sort/moveable.cc: Likewise.
+
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33734
+ * include/ext/codecvt_specializations.h (encoding_state::good,
+ init, destroy): Use cast notation instead of reinterpret_cast.
+
+2007-10-11 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/25_algorithms/heap/moveable.cc: Fix and extend.
+
+2007-10-11 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR libstdc++/33578
+ * include/parallel/compatibility.h. Use POSIX sched_yield on
+ __CYGWIN__
+ (Sleep): Add prototype for __MINGW32__.
+
+2007-10-10 Jason Merrill <jason@redhat.com>
+
+ * libsupc++/guard.cc (struct mutex_wrapper): Move into
+ anonymous namespace.
+
+2007-10-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/debug/list (list<>::list(list&&)): Fix.
+ * include/debug/vector (vector<>::vector(vector&&)): Likewise.
+ * include/debug/deque (deque<>::deque(deque&&)): Likewise.
+ * include/debug/set.h (set<>::set(set&&)): Likewise.
+ * include/debug/map.h (map<>::map(map&&)): Likewise.
+ * include/debug/multiset.h (multiset<>::multiset(multiset&&)):Likewise.
+ * include/debug/multimap.h (multimap<>::multimap(multimap&&)):Likewise.
+
+2007-10-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33633
+ * include/debug/hash_multimap.h: Change _GLIBCXX_EXT to _GLIBCXX_EXT_D.
+ * include/debug/hash_set.h: Same.
+ * include/debug/hash_multiset.h: Same.
+ * include/debug/hash_map.h: Same.
+
+2007-10-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/parallel/losertree.h (loser_tree_traits_unguarded): To
+ loser_tree_unguarded_traits.
+ * include/parallel/multiway_merge.h (__gnu_parallel): Same.
+
+2007-10-10 Paolo Carlini <pcarlini@suse.de>
+ Chris Fairles <chris.fairles@gmail.com>
+
+ * include/bits/stl_algobase.h (swap): Move...
+ * include/bits/stl_move.h: ... here.
+ * include/bits/stl_pair.h (pair<>::pair(_U1&&, _U2&&),
+ pair<>::pair(pair<>&&), pair<>::operator=(pair<>&&),
+ pair<>::swap(pair&&), swap(&, &), swap(&&, &), swap(&, &&),
+ make_pair(_T1&&, _T2&&)): Add.
+ * testsuite/20_util/pair/swap.cc: Add.
+
+2007-10-09 Wolfgang Bangerth <bangerth@dealii.org>
+
+ PR libstdc++/33485 continued.
+ * include/parallel/multiway_mergesort.h: Use __builtin_alloca.
+
+2007-10-09 Zhou Drangon <drangon.mail@gmail.com>
+
+ PR libstdc++/33682
+ * libsupc++/guard.cc: Make single conditional variable
+ implementation dependent to __GTHREAD_HAS_COND.
+
+2007-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33489 continued.
+ * include/parallel/features.h (_GLIBCXX_LOSER_TREE): Set to zero.
+ (_GLIBCXX_LOSER_TREE_POINTER): Set to one.
+ (_GLIBCXX_LOSER_TREE_UNGUARDED): Set to zero.
+ (_GLIBCXX_LOSER_TREE_POINTER_UNGUARDED): Set to one.
+ * include/parallel/multiway_merge.h (parallel_multiway_merge):
+ Change array of value_type to array of value_type pointers.
+ (multiway_merge_bubble): Same.
+ (multiway_merge_loser_tree): Same.
+ * include/parallel/merge.h (merge_advance_movc): Change to avoid
+ default construction.
+ * include/parallel/multiseq_selection.h (multiseq_partition):
+ Replace value_type, bool pair with value_type*, null-initialized.
+ * include/parallel/multiway_mergesort.h (parallel_sort_mwms):
+ Don't use array form of operator new for value_types.
+ (parallel_sort_mwms_pu): Same.
+ * include/parallel/quicksort.h (parallel_sort_qs_divide): Don't
+ use array form to construct pointer to value_type on stack,
+ instead use __builtin_alloca.
+ * include/parallel/random_shuffle.h (sequential_random_shuffle): Same,
+ but use operator new.
+ (parallel_random_shuffle_drs_pu): Same.
+ * include/parallel/partial_sum.h ( parallel_partial_sum_linear): Same.
+
+ * include/parallel/losertree.h: Format.
+ * include/parallel/settings.h: Format.
+
+ * include/parallel/multiway_merge.h: Move traits to....
+ * include/parallel/losertree.h: ... here.
+
+2007-10-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/type_traitsfwd.h (add_reference): Remove.
+ * include/tr1/type_traits (add_reference): Add forward declaration.
+ * include/tr1_impl/functional (class _Mu<>): Fix.
+
+2007-10-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/boost_concept_check.h (*AssociativeContainerConcept):
+ Remove, unused.
+
+2007-10-08 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/base.h: Added plus and multiplies functor
+ for differently typed objects.
+ * include/parallel/numeric: Use it.
+ * include/parallel/for_each_selectors.h: Allowed different types.
+ * include/parallel/partial_sum.h: Fixed return value.
+ * testsuite/26_numerics/accumulate/1.cc: Tests for accumulate.
+ * testsuite/26_numerics/inner_product/1.cc: Tests for inner_product.
+
+2007-10-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_move.h (_GLIBCXX_MOVE): Add.
+ * include/bits/stl_algobase.h: Adjust.
+ * include/bits/stl_pair.h: Likewise.
+
+ * include/bits/stl_algo.h: Minor formatting fixes.
+
+2007-10-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33489
+ * include/parallel/multiseq_selection.h: Remove default constructed
+ value_type.
+ * include/parallel/partition.h:
+ * include/parallel/partial_sum.h: Format.
+
+2007-10-08 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/multiway_merge.h: Added reference to paper.
+ * include/parallel/multiseq_selection.h: Added reference to paper.
+ * include/parallel/workstealing.h: Added reference to paper.
+ * include/parallel/balanced_quicksort.h: Added reference to paper.
+ * include/parallel/tree.h: Added reference to paper.
+ * docs/html/parallel_mode.html: Added reference to MCSTL.
+ More documentation on compile-time settings and tuning.
+
+2007-10-08 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/utility (identity, move, forward): Move to...
+ * include/bits/stl_move.h: ... here.
+ * include/Makefile.am: Add.
+ * include/bits/stl_algobase.h: Include the latter.
+ * include/Makefile.in: Regenerate.
+ * testsuite/20_util/pair/moveable.cc: Remove dg-require-rvalref.
+
+2007-10-08 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_pair.h (pair<>:pair(pair&&),
+ pair<>::operator=(pair&&)): Add.
+
+2007-10-07 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/debug/list (list<>::list(list&&),
+ list<>::operator=(list&&)): Add.
+ (list<>::swap): Adjust.
+ (swap(list&&, list& __y), swap(list&, list&& __y)): Add.
+ * include/debug/vector (vector<>::vector(vector&&),
+ vector<>::operator=(vector&&)): Add.
+ (vector<>::swap): Adjust.
+ (swap(vector&&, vector& __y), swap(vector&, vector&& __y)): Add.
+ * include/debug/deque (deque<>::deque(deque&&),
+ deque<>::operator=(deque&&)): Add.
+ (deque<>::swap): Adjust.
+ (swap(deque&&, deque& __y), swap(deque&, deque&& __y)): Add.
+ * include/debug/set.h (set<>::set(set&&),
+ set<>::operator=(set&&)): Add.
+ (set<>::swap): Adjust.
+ (swap(set&&, set& __y), swap(set&, set&& __y)): Add.
+ * include/debug/map.h (map<>::map(map&&),
+ map<>::operator=(map&&)): Add.
+ (map<>::swap): Adjust.
+ (swap(map&&, map& __y), swap(map&, map&& __y)): Add.
+ * include/debug/multiset.h (multiset<>::multiset(multiset&&),
+ multiset<>::operator=(multiset&&)): Add.
+ (smultiet<>::swap): Adjust.
+ (swap(multiset&&, multiset& __y),
+ swap(multiset&, multiset&& __y)): Add.
+ * include/debug/multimap.h (multimap<>::multimap(multimap&&),
+ multimap<>::operator=(multimap&&)): Add.
+ (multimap<>::swap): Adjust.
+ (swap(multimap&&, multimap& __y),
+ swap(multimap&, multimap&& __y)): Add.
+
+2007-10-07 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (_GLIBCXX_MOVE): Add.
+ (swap, __iter_swap): Use it.
+ * testsuite/25_algorithms/rotate/moveable.cc: Remove
+ dg-require-rvalref.
+ * testsuite/25_algorithms/remove/moveable.cc: Likewise.
+ * testsuite/25_algorithms/partition/moveable.cc: Likewise.
+ * testsuite/25_algorithms/swap_ranges/moveable.cc: Likewise.
+ * testsuite/25_algorithms/reverse/moveable.cc: Likewise.
+ * testsuite/25_algorithms/unique/moveable.cc: Likewise.
+ * testsuite/25_algorithms/remove_if/moveable.cc: Likewise.
+
+ * include/bits/stl_algobase.h (lexicographical_compare):
+ Clean up.
+
+2007-10-07 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (remove, remove_if, unique,
+ __rotate(_RandomAccessIterator, _RandomAccessIterator,
+ _RandomAccessIterator, random_access_iterator_tag)): Use _GLIBCXX_MOVE.
+ (__rotate(_ForwardIterator, _ForwardIterator, _ForwardIterator,
+ forward_iterator_tag), __rotate(_BidirectionalIterator,
+ _BidirectionalIterator, _BidirectionalIterator,
+ bidirectional_iterator_tag), __partition(_ForwardIterator,
+ _ForwardIterator, _Predicate, forward_iterator_tag)): Use iter_swap.
+
+2007-10-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33678
+ * libsupc++/typeinfo (typeinfo): Revert ordering of virtual components.
+
+2007-10-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/33487
+ * include/parallel/algorithmfwd.h (for_each, generate, generate_n,
+ transform, replace, replace_if, max_element, min_element, count,
+ count_if): Consistently construct overloads.
+ * include/parallel/numericfwd.h (accumulate, adjacent_difference,
+ inner_product): Same.
+ * include/parallel/algobase.h: Same.
+ * include/parallel/algo.h: Same.
+ * include/parallel/numeric: Same.
+
+ * include/bits/algorithmfwd.h: Correct find_end placement.
+
+ * docs/html/parallel_mode.html: Document some of the interface
+ conventions.
+
+ * include/parallel/search.h (calc_borders): Only use operator ==.
+
+ * include/parallel/algorithmfwd.h: Move __gnu_sequential bits to...
+ * include/parallel/tags.h: ...here, and use a using directive.
+
+ * include/parallel/random_shuffle.h: Include stl_numeric. Qualify
+ uses of partial_num with __gnu_sequential.
+
+ * include/parallel/tree.h: Formatting.
+
+2007-10-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ Fixes for --disable-libstdcxx-pch.
+ * include/ext/rc_string_base.h: Include stl_iterator_base_funcs.h.
+ * include/ext/vstring_util.h: Include stl_iterator.h and
+ numeric_traits.h.
+ * include/tr1/functional: Include new.
+ * testsuite/util/testsuite_api.h: Include exception.
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Set
+ PCH_CXXFLAGS via cxxpchflags.
+
+ * testsuite/25_algorithms/binary_search/requirements/
+ explicit_instantiation/2.cc: Same.: Fix includes.
+ * testsuite/25_algorithms/count_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/equal_range/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/find_end/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/find_first_of/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/find_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/for_each/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/includes/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/inplace_merge/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/lexicographical_compare/
+ requirements/explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/lower_bound/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/make_heap/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/max_element/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/max/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/merge/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/min_element/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/min/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/next_permutation/
+ requirements/explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/nth_element/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/partial_sort_copy/
+ requirements/explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/partial_sort/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/partition/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/pop_heap/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/prev_permutation/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/push_heap/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/random_shuffle/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/remove_copy_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/remove_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/replace_copy_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/replace_if/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/search_n/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/search/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/set_difference/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/set_intersection/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/set_symmetric_difference/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/set_union/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/sort_heap/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/sort/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/stable_partition/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/stable_sort/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/transform/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/unique_copy/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/unique/requirements/
+ explicit_instantiation/2.cc: Same.
+ * testsuite/25_algorithms/upper_bound/requirements/
+ explicit_instantiation/2.cc: Same.
+
+ * testsuite/25_algorithms/remove/requirements/
+ explicit_instantiation/pod.cc: Provide a hint to the compiler.
+
+2007-10-05 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/23_containers/map/moveable.cc: Remove dg-require-rvalref.
+ * testsuite/23_containers/multimap/moveable.cc: Likewise.
+ * testsuite/23_containers/set/moveable.cc: Likewise.
+ * testsuite/23_containers/multiset/moveable.cc: Likewise.
+ * testsuite/23_containers/deque/moveable.cc: Likewise.
+ * testsuite/23_containers/list/moveable.cc: Likewise.
+ * testsuite/23_containers/vector/moveable.cc: Likewise.
+ * include/std/utility: Use _GLIBCXX_BEGIN_NAMESPACE.
+
+2007-10-05 Paolo Carlini <pcarlini@suse.de>
+ Chris Jefferson <chris@bubblescope.net>
+
+ * include/bits/stl_iterator.h (class move_iterator,
+ make_move_iterator): Add.
+
+2007-10-04 Doug Kwan <dougkwan@google.com>
+
+ * include/ext/concurrent.h (class __mutex,
+ class __recursive_mutex): Add new method gthread_mutex to access
+ inner gthread mutex.
+ [__GTHREAD_HAS_COND] (class __concurrence_broadcast_error,
+ class __concurrence_wait_error, class __cond): Add.
+ * libsupc++/guard.cc (recursive_push, recursive_pop): Delete.
+ (init_in_progress_flag, set_init_in_progress_flag): Add to
+ replace recursive_push and recursive_pop.
+ (throw_recursive_init_exception): Add.
+ (acquire, __cxa_guard_acquire, __cxa_guard_abort and
+ __cxa_guard_release): [__GTHREAD_HAS_COND] Use a conditional
+ for synchronization of static variable initialization.
+ The global mutex is only held briefly when guards are
+ accessed. [!__GTHREAD_HAS_COND] Fall back to the old code,
+ which deadlocks.
+ * testsuite/thread/guard.cc: Add new test. It deadlocks with the
+ old locking code in libstdc++-v3/libsup++/guard.cc.
+
+2007-10-04 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/deque/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line number.
+ * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/list/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-10-04 Chris Jefferson <chris@bubblescope.net>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_list.h (list<>::list(list&&),
+ list<>::operator=(list&&)): Add.
+ (list<>::swap): Adjust.
+ (swap(list&&, list& __y), swap(list&, list&& __y)): Add.
+ * include/bits/stl_vector.h (vector<>::vector(vector&&),
+ vector<>::operator=(vector&&)): Add.
+ (vector<>::swap): Adjust.
+ (swap(vector&&, vector& __y), swap(vector&, vector&& __y)): Add.
+ * include/bits/stl_bvector.h (vector<>::vector(vector&&),
+ vector<>::operator=(vector&&)): Add.
+ (vector<>::swap): Adjust.
+ * include/bits/stl_deque.h (deque<>::deque(deque&&),
+ deque<>::operator=(deque&&)): Add.
+ (deque<>::swap): Adjust.
+ (swap(deque&&, deque& __y), swap(deque&, deque&& __y)): Add.
+ * include/bits/stl_set.h (set<>::set(set&&),
+ set<>::operator=(set&&)): Add.
+ (set<>::swap): Adjust.
+ (swap(set&&, set& __y), swap(set&, set&& __y)): Add.
+ * include/bits/stl_map.h (map<>::map(map&&),
+ map<>::operator=(map&&)): Add.
+ (map<>::swap): Adjust.
+ (swap(map&&, map& __y), swap(map&, map&& __y)): Add.
+ * include/bits/stl_multiset.h (multiset<>::multiset(multiset&&),
+ multiset<>::operator=(multiset&&)): Add.
+ (smultiet<>::swap): Adjust.
+ (swap(multiset&&, multiset& __y),
+ swap(multiset&, multiset&& __y)): Add.
+ * include/bits/stl_multimap.h (multimap<>::multimap(multimap&&),
+ multimap<>::operator=(multimap&&)): Add.
+ (multimap<>::swap): Adjust.
+ (swap(multimap&&, multimap& __y),
+ swap(multimap&, multimap&& __y)): Add.
+
+2007-10-04 Paolo Carlini <pcarlini@suse.de>
+
+ Avoid copying some allocator objects.
+ * include/bits/stl_list.h (_List_impl::_List_impl(),
+ _List_base::_List_base(), list<>::list()): Add.
+ * include/bits/stl_vector.h (_Vector_impl::_Vector_impl(),
+ _Vector_base::_Vector_base(), vector<>::vector()): Add.
+ * include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl(),
+ _Bvector_base::_Bvector_base(), vector<>::vector()): Add.
+ * include/bits/stl_deque.h (_Deque_impl::_Deque_impl(),
+ _Deque_base::_Deque_base(), deque<>::deque()): Add.
+ * include/bits/stl_tree.h (_Rb_tree_impl<>::_Rb_tree_impl(),
+ _Rb_tree_impl<>::_M_initialize): Add.
+ (_Rb_tree<>::_Rb_tree(const _Compare&, const allocator_type&),
+ _Rb_tree(const _Rb_tree&)): Adjust.
+ * include/bits/stl_set.h (set<>::set(),
+ set(_InputIterator, _InputIterator)): Use _M_t default constructor.
+ * include/bits/stl_map.h (map<>::map(), set(_InputIterator,
+ _InputIterator)): Use _M_t default constructor.
+ * include/bits/stl_multiset.h (multiset<>::multiset(),
+ multiset(_InputIterator, _InputIterator)): Use _M_t default
+ constructor.
+ * include/bits/stl_multimap.h (multimap<>::multimap(),
+ multimap(_InputIterator, _InputIterator)): Use _M_t default
+ constructor.
+
+2007-10-03 Chris Jefferson <chris@bubblescope.net>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/20_util/pair/moveable.cc: New. Merge from
+ libstdcxx_so_7-branch.
+ * testsuite/23_containers/deque/capacity/moveable.cc: Same.
+ * testsuite/23_containers/deque/cons/moveable.cc: Same.
+ * testsuite/23_containers/deque/modifiers/moveable.cc: Same.
+ * testsuite/23_containers/deque/moveable.cc: Same.
+ * testsuite/23_containers/list/moveable.cc: Same.
+ * testsuite/23_containers/map/moveable.cc: Same.
+ * testsuite/23_containers/multimap/moveable.cc: Same.
+ * testsuite/23_containers/multiset/moveable.cc: Same.
+ * testsuite/23_containers/set/moveable.cc: Same.
+ * testsuite/23_containers/vector/cons/moveable.cc: Same.
+ * testsuite/23_containers/vector/modifiers/moveable.cc: Same.
+ * testsuite/23_containers/vector/moveable.cc: Same.
+ * testsuite/23_containers/vector/resize/moveable.cc: Same.
+ * testsuite/25_algorithms/heap/moveable.cc: Same.
+ * testsuite/25_algorithms/nth_element/moveable.cc: Same.
+ * testsuite/25_algorithms/partial_sort/moveable.cc: Same.
+ * testsuite/25_algorithms/partition/moveable.cc: Same.
+ * testsuite/25_algorithms/remove_if/moveable.cc: Same.
+ * testsuite/25_algorithms/remove/moveable.cc: Same.
+ * testsuite/25_algorithms/reverse/moveable.cc: Same.
+ * testsuite/25_algorithms/rotate/moveable.cc: Same.
+ * testsuite/25_algorithms/sort/moveable.cc: Same.
+ * testsuite/25_algorithms/swap_ranges/moveable.cc: Same.
+ * testsuite/25_algorithms/unique/moveable.cc: Same.
+ * testsuite/util/testsuite_rvalref.h: New.
+
+ * testsuite/25_algorithms/equal/equal.cc: Move to...
+ * testsuite/25_algorithms/equal/no_operator_ne.cc: ...this.
+ * testsuite/25_algorithms/heap/heap.cc: Move to...
+ * testsuite/25_algorithms/heap/1.cc: ...this.
+ * testsuite/25_algorithms/lower_bound/lower_bound.cc: Move to...
+ * testsuite/25_algorithms/lower_bound/no_operator_ne.cc: ...this.
+ * testsuite/25_algorithms/partition/partition.cc: Move to...
+ * testsuite/25_algorithms/partition/1.cc: ...this.
+ * testsuite/25_algorithms/stable_partition/1.cc: ... and this.
+
+ * testsuite/25_algorithms/search/1.cc: Update from merge.
+ * testsuite/25_algorithms/search/check_type.cc: Same.
+
+ * testsuite/lib/dg-options.exp (dg-require-rvalref): New.
+ * testsuite/lib/libstdc++.exp (check_v3_target_rvalref): New.
+
+2007-10-03 Richard Sandiford <richard@codesourcery.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add
+ -fno-exceptions to CXXFLAGS. Use GCC_TRY_COMPILE_OR_LINK.
+ Make the tests assign results to volatile variables. Use -lm
+ for link tests in GCC_TRY_COMPILE_OR_LINK. Fall back to
+ compile-only tests if -lm is not available.
+ * configure: Regenerate.
+
+2007-10-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33613
+ * include/debug/functions.h (__check_partitioned): Rename to...
+ (__check_partioned_lower): ... this.
+ (__check_partioned_upper): Add.
+ * include/debug/macros.h (__glibcxx_check_partitioned): Rename to...
+ (__glibcxx_check_partitioned_lower): ... this, adjust.
+ (__glibcxx_check_partitioned_upper): Add.
+ * include/debug/debug.h (__glibcxx_requires_partitioned): Rename to...
+ (__glibcxx_requires_partitioned_lower): ... this, adjust.
+ (__glibcxx_requires_partitioned_upper): Add.
+ * include/bits/stl_algo.h (lower_bound, upper_bound, equal_range,
+ binary search): Use the above.
+ * testsuite/25_algorithms/lower_bound/33613.cc: New.
+ * testsuite/25_algorithms/upper_bound/33613.cc: Likewise.
+
+2007-10-03 Kazu Hirata <kazu@codesourcery.com>
+
+ Revert:
+ 2007-10-02 Richard Sandiford <richard@codesourcery.com>
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add
+ -fno-exceptions to CXXFLAGS. Use GCC_TRY_COMPILE_OR_LINK.
+ Make the tests assign results to volatile variables.
+ * configure: Regenerate.
+
+2007-10-02 Richard Sandiford <richard@codesourcery.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add
+ -fno-exceptions to CXXFLAGS. Use GCC_TRY_COMPILE_OR_LINK.
+ Make the tests assign results to volatile variables.
+ * configure: Regenerate.
+
+2007-10-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/25_algorithms/binary_search/2.cc: Split into...
+ * testsuite/25_algorithms/upper_bound/2.cc: ... this.
+ * testsuite/25_algorithms/lower_bound/2.cc: ... this.
+ * testsuite/25_algorithms/equal_range/2.cc: ... and this.
+
+2007-10-02 Chris Jefferson <chris@bubblescope.net>
+
+ * testsuite/25_algorithms/search/1.cc: Merge from
+ libstdcxx_so_7-branch.
+ * testsuite/25_algorithms/search/check_type.cc: Same.
+ * testsuite/25_algorithms/sort/vectorbool.cc: Same.
+
+2007-09-30 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * src/valarray-inst.cc, include/ext/atomicity.h,
+ include/ext/concurrence.h, include/bits/basic_string.h,
+ include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos.
+
+2007-09-29 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/test.html, docs/html/ext/mt_allocator.html,
+ docs/html/ext/tr1.html, docs/html/17_intro/contribute.html,
+ docs/html/documentation.html, docs/html/20_util/allocator.html:
+ Update docs to refer to Subversion not CVS. Fix markup.
+
+2007-09-29 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * docs/html/Makefile: Follow up to libstdc++/14991, remove target.
+
+2007-09-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/parallel/algorithmfwd.h: Spacing.
+ * include/parallel/tags.h: Correct comment.
+
+ * testsuite/Makefile.am (AM_MAKEFLAGS, AM_RUNTESTFLAGS): Remove.
+ * testsuite/Makefile.in: Regenerate.
+
+2007-09-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/testsuite_hooks.cc (set_memory_limits): Adjust
+ x86_64 virtual memory setting for libgomp.
+
+2007-09-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/stl_algo.h: Add return type information to comments.
+ * include/bits/algorithmfwd.h: Formatting.
+ * testsuite/util/testsuite_hooks.h (NonDefaultConstructible): Move..
+ * testsuite/util/testsuite_api.h: ...here. Add necessary operators
+ for use in testing chapters 25 and 26.
+ * testsuite/util/testsuite_character.h: Same.
+
+ * testsuite/25_algorithms/*/requirements/explicit_instantiation/
+ 2.cc, pod.cc: New.
+
+ * testsuite/26_numerics/accumulate, adjacent_difference, inner_product,
+ partial_sum/requirements/explicit_instantiation/2.cc, pod.cc: New.
+
+ * testsuite/26_numerics/numeric_arrays/*: Move contents into
+ testsuite/26_numerics.
+
+ * testsuite/26_numerics/numeric_operations: Same.
+
+ * testsuite/23_containers/*/requirements/explicit_instantiation/2.cc:
+ Adjust includes from testsuite_eh.h to testsuite_api.h.
+
+2007-09-25 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * testsuite/lib/libstdc++.exp (check_v3_target_fileio): Test lseek.
+
+2007-09-18 Benjamin Kosnik <bkoz@redhat.com>
+ Chalathip Thumkanon <chalathip@gmail.com>
+
+ PR libstdc++/32819
+ PR libstdc++/32822
+ * docs/html/ext/pb_ds/hash_based_containers.html: Correct.
+
+2007-09-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.host: Set atomic_flags on i486.
+
+ * include/Makefile.am: Remove parallel-mode pch.
+ * include/Makefile.in: Regenerate.
+
+ * testsuite/lib/libstdc++.exp: Set ld_library_flags for libgomp if
+ present.
+
+ * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Comment.
+ * configure: Regenerate.
+
+2007-09-17 Johannes Singler <singler@ira.uka.de>
+
+ * include/parallel/for_each.h: Fixed comment/doxygen markup typos.
+ * include/parallel/base.h: Same.
+ * include/parallel/numeric: Same.
+ * include/parallel/quicksort.h: Same.
+ * include/parallel/compiletime_settings.h: Same.
+ * include/parallel/random_shuffle.h: Same.
+ * include/parallel/balanced_quicksort.h: Same.
+ * include/parallel/tree.h: Same.
+ * include/parallel/settings.h: Same.
+ * include/parallel/search.h: Same.
+ * include/parallel/partition.h: Same.
+ * include/parallel/partial_sum.h: Same.
+
+2007-09-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/type_traitsfwd.h (aligned_storage): Remove
+ declaration.
+ * include/tr1_impl/type_traits (aligned_storage): Remove.
+ * include/std/type_traits (aligned_storage, __aligned_storage_msa):
+ Add.
+ * include/tr1/type_traits (aligned_storage): Add.
+ * testsuite/20_util/aligned_storage/value.cc: New.
+ * testsuite/20_util/aligned_storage/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
+ dg-error lines.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+ Likewise.
+
+2007-09-16 Paolo Carlini <pcarlini@suse.de>
+ Douglas Gregor <doug.gregor@gmail.com>
+
+ * include/tr1_impl/type_traits (aligned_storage): Implement
+ in the neat and general way.
+
+2007-09-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/parallel/base.h (__gnu_parallel::less<Tp>): Add partial
+ specialization for one argument.
+ (__gnu_parallel::less): Add operator.
+
+ * include/parallel/multiway_merge.h: Use __builtin_alloca.
+ * include/parallel/partial_sum.h: Same.
+ * include/parallel/find.h: Same.
+
+2007-09-14 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add
+ missing template argument.
+ * testsuite/tr1/2_general_utilities/shared_ptr/requirements/
+ explicit_instantiation/2.cc: New.
+ * testsuite/tr1/2_general_utilities/weak_ptr/requirements/
+ explicit_instantiation/2.cc: New.
+
+2007-09-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/17_intro/headers/all_pedantic_errors.cc: New.
+ * include/tr1_impl/cinttypes: Add pragma GCC system_header.
+ * include/tr1_impl/cfenv: Same.
+ * include/tr1_impl/cstdint: Same.
+ * include/tr1/cstdbool: Same.
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_prime_size_policy_imp.hpp: Same.
+ * include/parallel/partial_sum.h: Avoid VLA error with
+ __builtin_alloca.
+
+2007-09-14 Thiemo Seufer <ths@mips.com>
+
+ * crossconfig.m4 (mips*-sde-elf*): New stanza.
+ * configure: Regenerate.
+
+2007-09-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/pb_ds/*: Change namespace pb_ds to __gnu_pbds.
+ * docs/html/ext/pb_ds/*: Same.
+ * testsuite/ext/pb_ds/*: Same.
+ * testsuite/performance/ext/pb_ds/*: Same.
+ * testsuite/util/*: Same.
+
+2007-09-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/parallel/find.h: Doxygen fixups.
+ * include/bits/hashtable.h: Same.
+
+2007-09-11 Johannes Singler <singler@ira.uka.de>
+ Leonor Frias Moya <lfrias@lsi.upc.edu>
+ Felix Putze <kontakt@felix-putze.de>
+ Marius Elvert <marius.elvert@ira.uka.de>
+ Felix Bondarenko <f.bondarenko@web.de>
+ Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de>
+ Robin Dapp <r.dapp@freenet.de>
+ Benjamin Kosnik <bkoz@redhat.com>
+
+ Add parallel mode.
+ * include/parallel: New.
+ * include/parallel/iterator.h: New.
+ * include/parallel/multiway_merge.h: New.
+ * include/parallel/parallel.h: New.
+ * include/parallel/algorithm
+ * include/parallel/find_selectors.h: New.
+ * include/parallel/losertree.h: New.
+ * include/parallel/list_partition.h: New.
+ * include/parallel/types.h: New.
+ * include/parallel/for_each.h: New.
+ * include/parallel/multiseq_selection.h: New.
+ * include/parallel/workstealing.h: New.
+ * include/parallel/base.h: New.
+ * include/parallel/par_loop.h: New.
+ * include/parallel/numeric
+ * include/parallel/features.h: New.
+ * include/parallel/quicksort.h: New.
+ * include/parallel/algorithmfwd.h: New.
+ * include/parallel/equally_split.h: New.
+ * include/parallel/compiletime_settings.h: New.
+ * include/parallel/for_each_selectors.h: New.
+ * include/parallel/basic_iterator.h: New.
+ * include/parallel/omp_loop_static.h: New.
+ * include/parallel/random_shuffle.h: New.
+ * include/parallel/balanced_quicksort.h: New.
+ * include/parallel/set_operations.h: New.
+ * include/parallel/tags.h: New.
+ * include/parallel/merge.h: New.
+ * include/parallel/tree.h: New.
+ * include/parallel/settings.h: New.
+ * include/parallel/unique_copy.h: New.
+ * include/parallel/multiway_mergesort.h: New.
+ * include/parallel/numericfwd.h: New.
+ * include/parallel/search.h: New.
+ * include/parallel/partition.h: New.
+ * include/parallel/compatibility.h: New.
+ * include/parallel/algobase.h: New.
+ * include/parallel/find.h: New.
+ * include/parallel/partial_sum.h: New.
+ * include/parallel/algo.h: New.
+ * include/parallel/omp_loop.h: New.
+ * include/parallel/queue.h: New.
+ * include/parallel/timing.h: New.
+ * include/parallel/sort.h: New.
+ * include/parallel/checkers.h: New.
+ * include/parallel/random_number.h: New.
+ * include/bits/algorithmfwd.h: New.
+
+ * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New.
+ * configure.host: Add atomic_flags.
+ * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL.
+ * src/Makefile.am: Add parallel_list rules.
+ * include/Makefile.am: Add parallel files.
+ * testsuite/Makefile.am (check-parallel): Add.
+ (check-performance-parallel): Add.
+ * config.h.in: Regenerate.
+ * configure: Same.
+ * libsupc++/Makefile.in: Same.
+ * testsuite/Makefile.in: Same.
+ * Makefile.in: Same.
+ * libmath/Makefile.in: Same.
+ * include/Makefile.in: Same.
+ * src/Makefile.in: Same.
+ * po/Makefile.in: Same.
+
+ * config/abi/pre/gnu.ver: Export parallel list bits.
+
+ * docs/html/parallel_mode.html: New.
+ * docs/html/documentation.html: Add link.
+ * docs/doxygen/user.cfg.in: Adjust for new files and directory.
+ * docs/doxygen/doxygroups.cc: Adjust namespace markup.
+
+ * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change.
+ * include/debug/bitset: Same.
+ * include/debug/multiset.h: Same.
+ * include/debug/vector: Same.
+ * include/debug/map.h: Same.
+ * include/debug/deque: Same.
+ * include/debug/list: Same.
+ * include/debug/debug.h: Same.
+ * include/debug/multimap.h: Same.
+ * include/std/algorithm: Same.
+ * include/std/numeric: Same.
+ * include/std/bitset: Same.
+ * include/std/string: Same.
+ * include/ext/hash_map: Same.
+ * include/ext/hash_set: Same.
+ * include/bits/stl_list.h: Same.
+ * include/bits/stl_map.h: Same.
+ * include/bits/stl_algobase.h: Same.
+ * include/bits/stl_set.h: Same.
+ * include/bits/stl_multimap.h: Same.
+ * include/bits/stl_vector.h: Same.
+ * include/bits/stl_numeric.h: Same.
+ * include/bits/stl_deque.h: Same.
+ * include/bits/stl_multiset.h: Same.
+ * include/bits/char_traits.h: Same.
+ * include/bits/stl_algo.h: Same.
+ * include/bits/c++config: Same.
+ * include/bits/vector.tcc: Same.
+ * include/bits/deque.tcc: Same.
+ * include/bits/stl_bvector.h: Same.
+ * include/bits/list.tcc: Same.
+ * src/list.cc: Same.
+ * src/parallel_list.cc: New.
+
+ * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New.
+ * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New.
+ * scripts/testsuite_flags.in (--cxxparallelflags): New.
+ * scripts/check_performance: Adjust.
+ * testsuite/25_algorithms/headers/parallel_algorithm.cc: New.
+ * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New.
+ * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New.
+ * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New.
+ * testsuite/26_numerics/headers/numeric/
+ parallel_numeric_mixed1.cc: New.
+ * testsuite/26_numerics/headers/numeric/
+ parallel_numeric_mixed2.cc: New.
+
+2007-09-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Revert part of
+ 2007-09-06 change.
+
+2007-09-09 Roger Sayle <roger@eyesopen.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ECANCELED for cygwin.
+ * configure: Regenerate.
+ * config/os/generic/error_constants.h: Guard.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+
+2007-09-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/25_algorithms/binary_search.cc: Move...
+ * testsuite/25_algorithms/binary_search/2.cc: ...here.
+
+ * testsuite/25_algorithms/sort.cc: Move...
+ * testsuite/25_algorithms/sort/1.cc: ...here.
+ * testsuite/25_algorithms/partial_sort_copy/2.cc: ...here.
+ * testsuite/25_algorithms/nth_element/3.cc: ...here.
+ * testsuite/25_algorithms/partial_sort/2.cc: ...here.
+ * testsuite/25_algorithms/stable_sort/2.cc: ...here.
+
+ * testsuite/25_algorithms/min_max.cc: Move...
+ * testsuite/25_algorithms/min/1.cc: ...here.
+ * testsuite/25_algorithms/min/2.cc: ...here.
+ * testsuite/25_algorithms/max/1.cc: ...here.
+ * testsuite/25_algorithms/max/2.cc: ...here.
+
+2007-09-09 Joseph Myers <joseph@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (v3-build-support): Specify output
+ file for preprocessing. Use remote_exec to call ar and ranlib.
+
+2007-09-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/functional_hash.h: Add ext/numeric_traits.h.
+ * include/tr1/functional_hash.h Same.
+ * include/tr1/functional: Remove string, ext/type_traits.h includes.
+ * include/tr1_impl/functional_hash.h: Move string, wstring
+ definitions for std::<hash>::operator into separate file.
+ * include/std/functional
+ * src/hash.cc: New, move definitions here.
+ * src/hash_c++0x.cc: Same.
+ * src/Makefile.am: Add new source files.
+ * configure: Regenerate.
+ * Makefile.in: Same.
+ * src/Makefile.in: Same.
+ * po/Makefile.in: Same.
+ * libmath/Makefile.in: Same.
+ * libsupc++/Makefile.in: Same.
+ * testsuite/Makefile.in: Same.
+ * config/abi/pre/gnu.ver: Add symbols.
+ * config/abi/pre/gnu-versioned-namespace.ver: Same, fix.
+
+2007-09-07 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc:
+ Correct line number.
+
+2007-09-07 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR libstdc++/33203
+ * configure.host (error_constants_dir): New variable,
+ defaulting to os/generic.
+ ( mingw32*): Overide default.
+ * configure.ac (ERROR_CONSTANTS_SRCDIR): New.
+ * configure: Regenerate.
+ * include/Makefile.am (host_headers): Add
+ $(ERROR_CONSTANTS_SRCDIR)/error_constants.h .
+ * include/Makefile.in: Regenerate.
+ * include/std/system_error (enum posix_errno): Remove.
+ Include <bits/error_constants.h> instead.
+ * config/os/mingw32/error_constants.h: New.
+ * config/os/generic/error_constants.h: New.
+
+2007-09-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/lib/libstdc++.exp: Check CXXFLAGS.
+ * scripts/testsuite_flags.in: CXXFLAGS_default, matching dejagnu.
+
+ * include/std/ostream: Spacing tweak.
+ * include/ext/hashtable.h: Use <algorithm>.
+ * include/ext/slist: Same.
+ * include/ext/rope: Same.
+ * include/bits/stl_function.h: Format.
+ * include/tr1_impl/array: Remove section number in doxygen markup.
+ * src/list.cc: Comment tweak.
+
+ * docs/doxygen/user.cfg.in: Update for include/tr1_impl.
+
+ * testsuite/25_algorithms/search_n/iterator.cc: Add using declaration.
+ * testsuite/25_algorithms/nth_element/1.cc: Same.
+ * testsuite/21_strings/char_traits/requirements/short/1.cc: Use
+ char_type typedef to the underlying character type.
+ * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
+ Remove -ansi -pedantic-errors.
+ * testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
+ * testsuite/tr1/6_containers/headers/functional/synopsis.cc:
+ Remove specializations.
+
+2007-09-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_vector.h (_Vector_base<>::_M_allocate):
+ Do not call _M_impl.allocate when __n == 0.
+ * testsuite/23_containers/vector/zero_sized_allocations.cc: New.
+
+2007-09-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/29367
+ * include/ext/pb_ds/detail/map_debug_base.hpp: From this..
+ * include/ext/pb_ds/detail/debug_map_base.hpp: ...to this.
+ Rename map_debug_base to debug_map_base, add std::pair output
+ extractors, change duplicate map_debug_base typedef in containers
+ to debug_base. Use m_store_extra_indicator for m_store_hash_indicator.
+ * include/ext/pb_ds/*: Likewise.
+ * include/Makefile.am: Same.
+ * include/Makefile.in: Regenerate.
+
+2007-09-06 Matthias Klose <doko@debian.org>
+
+ * testsuite/27_io/headers/cstdlib: Remove empty directory.
+
+2007-09-05 Roger Sayle <roger@eyesopen.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add EBADMSG for darwin.
+ * configure: Regenerate.
+ * include/std/system_error: Guard.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
+ line numbers.
+
+2007-09-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33293
+ * include/bits/stl_numeric.h (accumulate, inner_product):
+ Add inline function-specifier.
+
+2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
+
+ * testsuite/abi/demangle/cxx0x/rref.cc: New.
+
+2007-08-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ENODATA, ENOSR,
+ ENOSTR, ETIME for freebsd.
+ * configure: Regenerate.
+ * include/std/system_error: Guard.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
+ line numbers.
+
+2007-08-28 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/33128
+ * include/tr1_impl/random (uniform_int<>::_M_call): Deal with
+ __urng() returning negative values.
+ * testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc:
+ New.
+
+2007-08-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4: Fix duplicate variable names.
+ * configure: Regenerate.
+
+2007-08-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ENOLINK, EPROTO
+ for netbsd.
+ * configure: Regenerate.
+ * include/std/system_error: Guard.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
+ line numbers.
+
+2007-08-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/system_error: New file.
+ * src/system_error.cc: New file.
+ * src/Makefile.am (sources): Add.
+ * src/Makefile.in: Regenerate.
+ * include/Makefile.am (std_headers): Add system_error.
+ * include/Makefile.in: Regenerate.
+ * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): New.
+ * configure.ac: Call it.
+ * config.h.in: Regenerate.
+ * include/bits/functional_hash.h: Add hash<error_code>.
+ * include/std/ostream: Add inserters for error_code.
+
+ * docs/doxygen/user.cfg.in: Add system_error.
+
+ * config/abi/pre/gnu.ver(GLIBCXX_3.4.10): Add new symbols.
+
+ * testsuite/19_diagnostics/error_code: New.
+ * testsuite/19_diagnostics/error_code/cons: Same.
+ * testsuite/19_diagnostics/error_code/cons/1.cc: Same.
+ * testsuite/19_diagnostics/error_code/operators: Same.
+ * testsuite/19_diagnostics/error_code/operators/bool.cc: Same.
+ * testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Same.
+ * testsuite/19_diagnostics/error_code/operators/equal.cc: Same.
+ * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Same.
+ * testsuite/19_diagnostics/error_category: Same.
+ * testsuite/19_diagnostics/error_category/cons: Same.
+ * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Same.
+ * testsuite/19_diagnostics/error_category/cons/default.cc: Same.
+ * testsuite/19_diagnostics/error_category/operators: Same.
+ * testsuite/19_diagnostics/error_category/operators/equal.cc: Same.
+ * testsuite/19_diagnostics/error_category/operators/not_equal.cc: Same.
+ * testsuite/19_diagnostics/headers/system_error: Same.
+ * testsuite/19_diagnostics/headers/system_error/
+ types_std_c++0x.cc: Same.
+ * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc: Same.
+ * testsuite/19_diagnostics/system_error: Same.
+ * testsuite/19_diagnostics/system_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/19_diagnostics/system_error/cons-1.cc: Same.
+ * testsuite/19_diagnostics/system_error/what-1.cc: Same.
+ * testsuite/19_diagnostics/system_error/what-2.cc: Same.
+ * testsuite/19_diagnostics/system_error/what-big.cc: Same.
+ * testsuite/19_diagnostics/system_error/what-3.cc: Same.
+ * testsuite/19_diagnostics/system_error/what-4.cc: Same.
+ * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
+ error_code.cc: Same.
+ * testsuite/27_io/basic_ostream/inserters_other/char/
+ error_code.cc: Same.
+ * testsuite/tr1/6_containers/hash/operators: New.
+ * testsuite/tr1/6_containers/hash/operators/size_t.cc: Same.
+
+ * testsuite/23_containers/hash: Move...
+ * testsuite/20_util/hash: ... here.
+ * testsuite/20_util/hash/operators: New.
+ * testsuite/20_util/hash/operators/size_t.cc: New.
+
+ * testsuite/20_util/function_objects/bad_function_call: Move...
+ * testsuite/20_util/bad_function_call: ...here.
+
+2007-08-21 Benjamin Kosnik <bkoz@montsouris.artheist.org>
+
+ * include/Makefile.am (install-data-local): Remove pch-install rules.
+ (host_headers): Add stdc++.h, stdtr1c++.h, extc++.h.
+ * include/Makefile.in: Regenerate.
+ * config.h.in: Same.
+
+ * scripts/check_compile: Remove space between outputs.
+ * include/ext/throw_allocator.h: Correct doxygen markup.
+ * include/bits/char_traits.h: Correct spacing.
+ * include/bits/stl_function.h: Same, for 80 column.
+ * include/std/valarray: Same.
+ * testsuite/util/testsuite_iterators.h: Same.
+ * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Format.
+
+2007-08-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ PR testsuite/31884
+ * testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc (main): Do
+ not access deleted nodes.
+
+ * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc,
+ testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc,
+ testsuite/27_io/basic_filebuf/open/char/4.cc,
+ testsuite/27_io/objects/char/9.cc: Use dg-require-fileio.
+ * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc,
+ testsuite/ext/pb_ds/regression/hash_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/trie_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/priority_queue_rand.cc,
+ testsuite/ext/pb_ds/regression/tree_data_map_rand.cc,
+ testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc,
+ testsuite/ext/throw_allocator/deallocate_global.cc,
+ testsuite/ext/throw_allocator/check_delete.cc,
+ testsuite/ext/throw_allocator/check_allocate_max_size.cc,
+ testsuite/ext/throw_allocator/check_deallocate_null.cc,
+ testsuite/ext/throw_allocator/check_new.cc,
+ testsuite/ext/throw_allocator/deallocate_local.cc,
+ testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/
+ cons/gen1.cc,
+ testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/
+ gen1.cc,
+ testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/
+ gen1.cc,
+ testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/
+ gen1.cc,
+ testsuite/23_containers/list/modifiers/insert/25288.cc: Use
+ dg-require-time.
+
+2007-08-17 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
+ dg-error lines.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Ditto.
+
+2007-08-17 Chris Fairles <chris.fairles@gmail.com>
+
+ PR libstdc++/33098
+ * include/std/type_traits (__is_convertible_helper):
+ Use add_lvalue_reference.
+
+2007-08-17 Johannes Willkomm <willkomm@sc.rwth-aachen.de>
+
+ PR libstdc++/33084
+ * include/std/valarray (operator _Op(const _Tp&,
+ const valarray<>&)): Fix typo.
+ * testsuite/26_numerics/numeric_arrays/valarray/33084.cc: New.
+
+2007-08-07 Jim Blandy <jimb@codesourcery.com>
+
+ * src/Makefile.am (libstdc++-symbol.ver): Make
+ sure the build tree copy of libstdc++-symbol.ver is writeable.
+ * src/Makefile.in: Regenerated.
+
+2007-08-02 Paolo Carlini <pcarlini@suse.de>
+
+ DR 660, [Ready] in Toronto.
+ * include/bits/stl_function.h (bit_and, bit_or, bit_xor): Add.
+ * testsuite/20_util/function_objects/dr660.cc: New.
+ * docs/html/ext/howto.html: Add an entry for DR 660, update.
+
+ * docs/html/ext/lwg-closed.html, docs/html/ext/lwg-active.html,
+ docs/html/ext/lwg-defects.html: Import Revision 49.
+
+2007-07-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/32908
+ * include/bits/stl_algobase.h (struct __lc_rai): New.
+ (lexicographical_compare(_II1, _II1, _II2, _II2),
+ lexicographical_compare(_II1, _II1, _II2, _II2, _Compare)): Use it.
+ * testsuite/performance/25_algorithms/lexicographical_compare.cc: New.
+
+2007-07-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/32907
+ * include/bits/basic_string.h (operator==(const basic_string<_CharT>&,
+ const basic_string<_CharT>&)): Add.
+ (operator!=): Forward to operator==.
+ * include/ext/vstring.h(operator==(const __versa_string<_CharT,
+ std::char_traits<_CharT>, std::allocator<_CharT>, _Base>&,
+ const __versa_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT>, _Base>&)): Add.
+ (operator!=): Forward to operator==.
+
+ * include/ext/sso_string_base.h (_M_compare): Remove.
+
+2007-07-25 Stephen M. Webb <stephenw@xandros.com>
+
+ Fixed abi_check for missing symbol size changes.
+ * testsuite/util/testsuite_abi.cc: Changed local variable name to
+ prevent member variable hiding.
+
+2007-07-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR libstdc++/31836
+ * config/locale/generic/c_locale.cc (__convert_to_v): Don't use
+ strtold if _GLIBCXX_HAVE_BROKEN_STRTOLD is defined.
+ * config/os/hpux/os_defines.h (_GLIBCXX_HAVE_BROKEN_STRTOLD): Define
+ if __hppa__ is defined.
+
+2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ PR bootstrap/3456
+ * testsuite/22_locale/locale/cons/12658_thread-1.cc: Enable on
+ mips-sgi-irix6*.
+ * testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
+ * testsuite/thread/18185.cc: Likewise.
+ * testsuite/thread/pthread1.cc: Likewise.
+ * testsuite/thread/pthread2.cc: Likewise.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread6.cc: Likewise.
+ * testsuite/thread/pthread7-rope.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ default_weaktoshared.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ mutex_weaktoshared.cc: Likewise.
+
+2007-07-16 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/mingw32/ctype_base.h: Use the generic libstdc++ masks
+ rather than MSVCRT defines.
+ * config/os/mingw32/ctype_noninline.h (classic_table): Construct
+ and return a static classic table based on generic libstdc++ masks.
+
+2007-07-12 Douglas Gregor <doug.gregor@gmail.com>
+
+ * testsuite/tr1/3_function_objects/bind/all_bound.cc: Disambiguate
+ uses of TR1/C++0x facilities.
+ * testsuite/tr1/3_function_objects/bind/nested.cc: Ditto.
+ * testsuite/tr1/3_function_objects/bind/placeholders.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_multimap/requirements/
+ explicit_instantiation.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_multimap/swap/1.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_multimap/swap/2.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_set/requirements/
+ explicit_instantiation.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_set/swap/1.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_set/swap/2.cc: Ditto.
+ * testsuite/tr1/6_containers/utility/pair.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_map/requirements/
+ explicit_instantiation.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_map/24064.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_map/swap/1.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_map/swap/2.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/cons/assignment.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/tuple_element.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/tuple_size.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/comparison_operators/
+ comparisons.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/element_access/get.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/creation_functions/23978.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/creation_functions/tie.cc: Ditto.
+ * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
+ Ditto.
+ * testsuite/tr1/6_containers/unordered_multiset/requirements/
+ explicit_instantiation.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_multiset/swap/1.cc: Ditto.
+ * testsuite/tr1/6_containers/unordered_multiset/swap/2.cc: Ditto.
+
+2007-07-10 Bob Wilson <bob.wilson@acm.org>
+
+ * configure.ac: Check if $atomicity_dir is cpu/generic/atomicity_mutex
+ instead of the non-existent cpu/generic/atomic_mutex.
+ * configure: Regenerate.
+
+2007-07-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/utility (identity, move, forward): Add.
+ * testsuite/20_util/move/requirements/explicit_instantiation.cc: New.
+ * testsuite/20_util/move/1.cc: New.
+ * testsuite/20_util/identity/value.cc: New.
+ * testsuite/20_util/identity/requirements/typedefs.cc: New.
+ * testsuite/20_util/identity/requirements/explicit_instantiation.cc:
+ New.
+ * testsuite/20_util/forward/requirements/explicit_instantiation.cc:
+ New.
+ * testsuite/20_util/forward/1.cc: New.
+ * testsuite/20_util/forward/1_neg.cc: New.
+
+2007-07-09 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/ios_base/failure/what-1.cc: Include <stdexcept>.
+
+2007-07-09 Jim Xochellis <jimxoch@yahoo.gr>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (search(_ForwardIterator1,
+ _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)): Tidy.
+ (search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _BinaryPredicate)): Likewise.
+
+2007-07-06 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/lib/libstdc++.exp (v3-build_support): Use env(AR)
+ and env(RANLIB), not env(AR_FOR_TARGET) and env(RANLIB_FOR_TARGET).
+
+2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de>
+
+ PR libstdc++/31957
+ * include/Makefile.am: Work around an AIX sed oddity.
+ * include/Makefile.in: Regenerate.
+
+2007-07-04 Jim Xochellis <jimxoch@yahoo.gr>
+
+ * include/bits/stl_algo.h (search(_ForwardIterator1,
+ _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)): Simplify
+ general case loop to a for(;;).
+ (search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _BinaryPredicate)): Likewise; remove redundant
+ inner loop.
+
+2007-07-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31518
+ * include/debug/formatter.h (_Error_formatter::_M_get_max_length): New.
+ (_Error_formatter::_Error_formatter): Use it.
+ * src/debug.cc: Define.
+ (_Error_formatter::_M_error): Tweak.
+ * configure.ac: Adjust version to 6:10:0.
+ * config/abi/pre/gnu.ver: Export _Error_formatter::_M_get_max_length
+ at GLIBCXX_3.4.10.
+ * testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.10.
+ * docs/html/debug.html: Document.
+ * configure: Regenerate.
+
+2007-07-02 Douglas Gregor <doug.gregor@gmail.com>
+
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
+ Tweak line numbers.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+ Ditto.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
+ Don't try to create an unsigned wchar_t.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
+ Don't try to create an unsigned wchar_t.
+ * testsuite/util/testsuite_hooks.h: Remove a stray semicolon.
+
+2007-07-01 Douglas Gregor <doug.gregor@gmail.com>
+
+ * include/std/type_traits (__make_unsigned): Remove invalid
+ wchar_t specialization.
+ (__make_signed): Remove invalid wchar_t specialization.
+
+2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
+
+ * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Force
+ C++98 mode.
+ * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Ditto.
+ * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Ditto.
+ * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Ditto.
+ * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Ditto.
+ * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
+ Ditto.
+ * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
+ Ditto.
+ * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Ditto.
+ * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Ditto.
+ * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Ditto.
+ * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Ditto.
+ * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Ditto.
+ * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Ditto.
+
+2007-06-28 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/32509
+ * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks
+ involving the de_DE locale only if an auto locale config is
+ used for a target suitable for the gnu locale model.
+ * docs/html/install.html: Update.
+ * configure: Regenerated.
+
+2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/testsuite_api.h: New.
+ * testsuite/27_io/ios_base/failure: Add.
+ * testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: New.
+ * testsuite/27_io/ios_base/failure/what-1.cc: Same.
+ * testsuite/27_io/ios_base/failure/what-2.cc: Same.
+ * testsuite/27_io/ios_base/failure/what-big.cc: Same.
+ * testsuite/27_io/ios_base/failure/what-3.cc: Same.
+ * testsuite/19_diagnostics/logic_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/19_diagnostics/runtime_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Same.
+ * testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Same.
+ * testsuite/18_support/bad_exception/cons_virtual_derivation.cc: Same.
+ * testsuite/18_support/bad_typeid/cons_virtual_derivation.cc: Same.
+ * testsuite/ext/concurrence_lock_error: New.
+ * testsuite/ext/concurrence_lock_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/ext/forced_exception_error: New.
+ * testsuite/ext/forced_exception_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/ext/concurrence_unlock_error: New.
+ * testsuite/ext/concurrence_unlock_error/
+ cons_virtual_derivation.cc: Same.
+ * testsuite/20_util/function_objects/bad_function_call: New.
+ * testsuite/20_util/function_objects/bad_function_call/
+ cons_virtual_derivation.cc: Same.
+
+2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/throw_allocator.h: Fixes for -fno-exceptions.
+ * testsuite/util/testsuite_shared.cc: Same.
+ * testsuite/util/io/illegal_input_error.hpp: Same.
+ * testsuite/util/io/verified_cmd_line_input.cc: Same.
+
+ * libsupc++/typeinfo (type_info): Correct comment formatting,
+ clarify member access and public interface.
+ * libsupc++/exception: Less compressed comments.
+ * libsupc++/new: Same.
+
+2007-06-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_list.h: Rename guard macro consistently with
+ file name.
+ * include/bits/stl_algobase.h: Likewise.
+ * include/bits/stl_map.h: Likewise.
+ * include/bits/stl_queue.h: Likewise.
+ * include/bits/stl_set.h: Likewise.
+ * include/bits/stl_stack.h: Likewise.
+ * include/bits/stl_iterator_base_types.h: Likewise.
+ * include/bits/stl_multimap.h: Likewise.
+ * include/bits/stl_pair.h: Likewise.
+ * include/bits/stl_vector.h: Likewise.
+ * include/bits/stl_deque.h: Likewise.
+ * include/bits/stl_multiset.h: Likewise.
+ * include/bits/stl_iterator_base_funcs.h: Likewise.
+ * include/bits/stl_algo.h: Likewise.
+ * include/bits/stl_iterator.h: Likewise.
+ * include/bits/stl_tempbuf.h: Likewise.
+ * include/bits/stl_bvector.h: Likewise.
+ * include/bits/stl_function.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+
+2007-06-17 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/cpu/m68k/atomicity.h: Use __mcfisaa__, __mcfisaaplus__,
+ __mcfisab__ & __mcfisac__ instead of obsolete cpu #defines.
+
+2007-06-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * libsupc++/eh_arm.cc (__cxa_type_match): Handle foreign
+ exceptions.
+ * libsubpc++/eh_personality.cc: Don't try to set up foreign or
+ forced unwind types here when using the ARM EABI unwinder.
+
+2007-06-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/c_global/cmath: Tweak includes.
+ * include/std/memory: Likewise.
+ * include/std/complex: Likewise.
+ * include/tr1/memory: Likewise.
+ * include/tr1/complex: Likewise.
+ * include/tr1/cmath: Likewise; do not wrap special functions
+ in #ifndef __GXX_EXPERIMENTAL_CXX0X__.
+
+2007-06-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/testsuite_performance.h: Add cstring include for
+ memset.
+
+2007-06-08 Paolo Carlini <pcarlini@suse.de>
+
+ * docs/html/install.html: Adjust consistently with libstdc++/31717.
+
+2007-06-08 Francesco Palagi <palagi@arcetri.astro.it>
+
+ * include/std/fstream: Add Table 92 in comment.
+
+2007-06-06 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/32233
+ * include/bits/stl_vector.h (_M_fill_initialize): Fix return type.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+
+2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
+ Frank Mori Hess <frank.hess@nist.gov>
+
+ * docs/html/debug.html: Correct link.
+
+2007-06-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1_impl/type_traits (is_reference, add_reference,
+ remove_reference): Remove.
+ * include/tr1/type_traits (is_reference, add_reference,
+ remove_reference): Add.
+ * include/std/type_traits (is_lvalue_reference, is_rvalue_reference,
+ is_reference, remove_reference, add_lvalue_reference,
+ add_rvalue_reference): Add.
+ * include/tr1_impl/boost_shared_ptr.h (operator*): Adjust.
+ * testsuite/20_util/add_lvalue_reference/requirements/
+ explicit_instantiation.cc: New.
+ * testsuite/20_util/add_lvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/add_rvalue_reference/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/add_rvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/is_lvalue_reference/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_lvalue_reference/requirements/
+ typedefs.cc: Likewise.
+ * testsuite/20_util/is_lvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/is_rvalue_reference/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_rvalue_reference/requirements/
+ typedefs.cc: Likewise.
+ * testsuite/20_util/is_rvalue_reference/value.cc: Likewise.
+ * testsuite/20_util/is_reference/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/20_util/is_reference/requirements/typedefs.cc: Likewise.
+ * testsuite/20_util/is_reference/value.cc: Likewise.
+ * testsuite/20_util/remove_reference/requirements/
+ explicit_instantiation.cc: New.
+ * testsuite/20_util/remove_reference/value.cc: Likewise.
+
+ * testsuite/tr1/4_metaprogramming/add_const/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/add_const/value.cc: ... here.
+ * testsuite/tr1/4_metaprogramming/add_cv/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/add_cv/value.cc: ... here.
+ * testsuite/tr1/4_metaprogramming/add_pointer/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/add_pointer/value.cc: ... here.
+ * testsuite/tr1/4_metaprogramming/add_reference/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/add_reference/value.cc: ... here.
+ * testsuite/tr1/4_metaprogramming/add_volatile/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/add_volatile/value.cc: ... here.
+ * testsuite/tr1/4_metaprogramming/aligned_storage/requirements/
+ typedefs.cc: Move...
+ * testsuite/tr1/4_metaprogramming/aligned_storage/value.cc: ... here.
+
+2007-06-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2007-06-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/19_diagnostics/logic_error/what-big.cc: New.
+ * testsuite/19_diagnostics/logic_error/what-3.cc: Same.
+ * testsuite/19_diagnostics/runtime_error/what-big.cc: Same.
+ * testsuite/19_diagnostics/runtime_error/what-3.cc: Same.
+
+ * testsuite/18_support/14493.cc: Break into...
+ * testsuite/18_support/exception/what.cc: ...this.
+ * testsuite/18_support/bad_cast/what.cc: ...this.
+ * testsuite/18_support/bad_alloc/what.cc: ...this.
+ * testsuite/18_support/bad_typeid/what.cc: ...this.
+ * testsuite/18_support/bad_exception/what.cc: ...this.
+
+ * testsuite/19_diagnostics/bad_exception/23591_thread-1.c: Move...
+ * testsuite/18_support/bad_exception/23591_thread-1.c: ...here.
+
+ * testsuite/18_support/14026.cc: Move...
+ * testsuite/18_support/uncaught_exception/14026.cc: ...here.
+
+2007-06-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/throw_allocator.h (__throw_allocator::allocate):
+ Throw bad_alloc for out of memory conditions.
+ * testsuite/ext/throw_allocator/deallocate_global.cc: New.
+ * testsuite/ext/throw_allocator/check_delete.cc: Same.
+ * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Same.
+ * testsuite/ext/throw_allocator/check_deallocate_null.cc: Same.
+ * testsuite/ext/throw_allocator/explicit_instantiation.cc: Same.
+ * testsuite/ext/throw_allocator/check_new.cc: Same.
+ * testsuite/ext/throw_allocator/deallocate_local.cc: Same.
+
+2007-05-31 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31426
+ * include/bits/c++config: Remove namespace association bits
+ from tr1 to std.
+
+ * include/ext/type_traits.h (__promote, __promote2,
+ __promote3, __promote4): Add.
+
+ * include/bits/hashtable.h: New.
+ * include/bits/functional_hash.h: Likewise.
+ * include/tr1/hashtable.h: Likewise.
+
+ * include/tr1_impl/random: New.
+ * include/tr1_impl/cinttypes: Likewise.
+ * include/tr1_impl/cstdlib: Likewise.
+ * include/tr1_impl/unordered_map: Likewise.
+ * include/tr1_impl/cstdio: Likewise.
+ * include/tr1_impl/boost_shared_ptr.h: Likewise.
+ * include/tr1_impl/cctype: Likewise.
+ * include/tr1_impl/random.tcc: Likewise.
+ * include/tr1_impl/tuple: Likewise.
+ * include/tr1_impl/functional_hash.h: Likewise.
+ * include/tr1_impl/hashtable: Likewise.
+ * include/tr1_impl/cmath: Likewise.
+ * include/tr1_impl/type_traitsfwd.h: Likewise.
+ * include/tr1_impl/hashtable_policy.h: Likewise.
+ * include/tr1_impl/cfenv: Likewise.
+ * include/tr1_impl/unordered_set: Likewise.
+ * include/tr1_impl/functional: Likewise.
+ * include/tr1_impl/utility: Likewise.
+ * include/tr1_impl/complex: Likewise.
+ * include/tr1_impl/type_traits: Likewise.
+ * include/tr1_impl/cwchar: Likewise.
+ * include/tr1_impl/cstdint: Likewise.
+ * include/tr1_impl/regex: Likewise.
+ * include/tr1_impl/array: Likewise.
+ * include/tr1_impl/cwctype: Likewise.
+
+ * include/tr1/type_traitsfwd.h: Remove.
+ * include/tr1/boost_shared_ptr.h: Likewise.
+ * include/tr1/common.h: Likewise.
+ * include/tr1/hashtable: Likewise.
+ * include/tr1/hashtable_policy.h: Likewise.
+ * include/tr1/random.tcc: Likewise.
+
+ * include/c_global/cinttypes: Include tr1_impl/cinttypes.
+ * include/c_global/cstdlib: Likewise for cstdlib.
+ * include/c_global/cstdio: Likewise for cstdio.
+ * include/c_global/cctype: Likewise for cctype.
+ * include/c_global/cmath: Likewise for cmath.
+ * include/c_global/cfenv: Likewise for cfenv.
+ * include/c_global/cwchar: Likewise for cwchar.
+ * include/c_global/cstdint: Likewise for cstdint.
+ * include/c_global/cwctype: Likewise for cwctype.
+ * include/tr1/cinttypes: Likewise for cinttypes.
+ * include/tr1/cstdlib: Likewise for cstdlib.
+ * include/tr1/cstdio: Likewise for cstdio.
+ * include/tr1/cctype: Likewise for cctype.
+ * include/tr1/cmath: Likewise for cmath.
+ * include/tr1/cfenv: Likewise for cfenv.
+ * include/tr1/cwchar: Likewise for cwchar.
+ * include/tr1/cstdint: Likewise for cstdint.
+ * include/tr1/cwctype: Likewise for cwctype.
+ * include/tr1/functional_hash.h: Likewise for functional_hash.
+
+ * include/std/tuple: Include tr1_impl/tuple.
+ * include/std/utility: Likewise for utility.
+ * include/std/type_traits: Likewise for type_traits.
+ (is_pod): Just forward to __is_pod.
+ (has_trivial_default_constructor): Just forward to
+ __has_trivial_constructor.
+ (has_trivial_copy_constructor): Just forward to __has_trivial_copy.
+ (has_trivial_assign): Just forward to __has_trivial_assign.
+ (has_trivial_destructor): Just forward to __has_trivial_destructor.
+ (has_nothrow_default_constructor): Just forward to
+ __has_nothrow_constructor.
+ (has_nothrow_copy_constructor): Just forward to __has_nothrow_copy.
+ (has_nothrow_assign): Just forward to __has_nothrow_assign.
+ (is_base_of): Just forward to __is_base_of.
+ (is_signed, is_unsigned): Implement according to the C++0x
+ specifications.
+ * include/std/memory: Likewise for memory.
+ * include/std/regex: Likewise for regex.
+ * include/std/random: Likewise for random.
+ * include/std/unordered_map: Likewise for unordered_map.
+ * include/std/unordered_set: Likewise for unordered_set.
+ * include/std/functional: Likewise for functional.
+ * include/std/complex: Likewise for complex.
+ * include/std/array: Likewise for array.
+ * include/tr1/tuple: Likewise for tuple.
+ * include/tr1/utility: Likewise for utility.
+ * include/tr1/type_traits: Likewise for type_traits
+ * include/tr1/memory: Likewise for memory.
+ * include/tr1/regex: Likewise for regex.
+ * include/tr1/random: Likewise for random.
+ * include/tr1/unordered_map: Likewise for unordered_map.
+ * include/tr1/unordered_set: Likewise for unordered_set.
+ * include/tr1/functional: Likewise for functional.
+ * include/tr1/complex: Likewise for complex.
+ * include/tr1/array: Likewise for array.
+
+ * include/c_global/ctgmath: Tweak.
+ * include/c_global/cstdarg: Likewise.
+ * include/c_global/ctime: Likewise.
+ * include/c_global/climits: Likewise.
+ * include/c_global/cfloat: Likewise.
+ * include/c_global/ccomplex: Likewise.
+ * include/c_global/cstdbool: Likewise.
+
+ * include/tr1/poly_laguerre.tcc: Tweak, don't use _GLIBCXX_TR1.
+ * include/tr1/riemann_zeta.tcc: Likewise.
+ * include/tr1/beta_function.tcc: Likewise.
+ * include/tr1/exp_integral.tcc: Likewise.
+ * include/tr1/hypergeometric.tcc: Likewise.
+ * include/tr1/modified_bessel_func.tcc: Likewise.
+ * include/tr1/legendre_function.tcc: Likewise.
+ * include/tr1/special_function_util.h: Likewise.
+ * include/tr1/bessel_function.tcc: Likewise.
+ * include/tr1/poly_hermite.tcc: Likewise.
+ * include/tr1/ell_integral.tcc: Likewise.
+ * include/tr1/gamma.tcc: Likewise.
+ * include/tr1/stdlib.h: Likewise.
+ * include/tr1/math.h: Likewise.
+
+ * include/tr1/complex.h: Minor tweaks.
+ * include/tr1/wctype.h: Likewise.
+ * include/tr1/wchar.h: Likewise.
+ * include/tr1/inttypes.h: Likewise.
+ * include/tr1/tgmath.h: Likewise.
+ * include/tr1/cstdbool: Likewise.
+ * include/tr1/cfloat: Likewise.
+ * include/tr1/ccomplex: Likewise.
+ * include/tr1/ctime: Likewise.
+ * include/tr1/climits: Likewise.
+ * include/tr1/ctgmath: Likewise.
+ * include/tr1/cstdarg: Likewise.
+
+ * testsuite/tr1/headers.cc: Move...
+ * testsuite/tr1/headers/all.cc: ... here.
+ * testsuite/tr1/using_namespace_std_tr1.cc: Move...
+ * testsuite/tr1/headers/c++200x/using_namespace_std_tr1.cc: ... here.
+ * testsuite/tr1/headers/using_namespace_std_tr1.cc ... here.
+ * testsuite/tr1/headers/c++200x/using_namespace_std_tr1.cc: New.
+
+ * testsuite/20_util/tuple/requirements/explicit_instantiation.cc:
+ Adjust namespace.
+ * testsuite/20_util/has_nothrow_copy_constructor/value.cc: Adjust to
+ the C++0x requirements.
+ * testsuite/20_util/has_nothrow_default_constructor/value.cc: Likewise.
+ * testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
+ * testsuite/20_util/has_trivial_default_constructor/value.cc: Likewise.
+
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
+ dg-error lines.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+ Likewise.
+ * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
+ Un-xfail.
+
+ * testsuite/20_util/is_signed/value.cc: New.
+ * testsuite/20_util/is_signed/requirements/typedefs.cc: Likewise.
+ * testsuite/20_util/is_signed/requirements/explicit_instantiation.cc:
+ Likewise.
+ * testsuite/20_util/is_unsigned/value.cc: Likewise..
+ * testsuite/20_util/is_unsigned/requirements/typedefs.cc: Likewise.
+ * testsuite/20_util/is_unsigned/requirements/explicit_instantiation.cc:
+ Likewise.
+
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+
+2007-05-31 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/32158 (libstdc++ bits)
+ * include/bits/stl_uninitialized.h (__uninitialized_copy_aux,
+ __uninitialized_fill_aux, __uninitialized_fill_n_aux):
+ Remove.
+ (struct __uninitialized_copy, struct __uninitialized_fill,
+ struct __uninitialized_fill_n): Add.
+ (uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
+ Adjust.
+ * testsuite/20_util/specialized_algorithms/32158.cc: New.
+
+ * include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator,
+ _InputIterator, _ForwardIterator)): Robustify vs non-POD input.
+
+ * include/bits/stl_vector.h (_M_fill_initialize): New.
+ (vector(size_type, const value_type&, const allocator_type&),
+ _M_initialize_dispatch(_Integer, _Integer, __true_type)): Use it.
+ * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust dg-error line.
+ * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-05-29 Paolo Carlini <pcarlini@suse.de>
+
+ * aclocal.m4: Regenerate.
+
+ * testsuite/17_intro/headers/c++1998/c++_for_c.tar: Remove.
+ * testsuite/17_intro/headers/c++1998/c++.tar: Likewise.
+
+2007-05-28 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/31717
+ * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check
+ gnu locale model requests to make sure it will work for the requested
+ target. Add checks for strxfrm_l, strerror_l when in gnu locale,
+ and strerror_r everywhere.
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+ * config.h.in: Regenerated.
+
+2007-05-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/boost_shared_ptr.h
+ (_Sp_counted_base<_S_mutex>::_M_add_ref_lock()): Do not wrap in
+ #ifdef __GTHREADS.
+
+2007-05-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/c_global/cwchar: Do not include <ctime>.
+ * include/c_std/cwchar: Likewise.
+ * include/ext/throw_allocator.h: Do it here.
+
+2007-05-25 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/c_locale.h (__convert_from_v): Fix typo.
+
+2007-05-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
+
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * include/Makefile.in: Regenerate.
+ * libmath/Makefile.in: Regenerate.
+ * libsupc++/Makefile.in: Regenerate.
+ * po/Makefile.in: Regenerate.
+ * src/Makefile.in: Regenerate.
+ * testsuite/Makefile.in: Regenerate.
+
+2007-05-24 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/c_locale.h (__convert_from_v): Only switch to the
+ "C" locale if the current one isn't already "C" (for old glibcs).
+ * config/os/gnu-linux/ctype_noninline.h (ctype<char>::classic_table,
+ ctype<char>::ctype(__c_locale, const mask*, bool, size_t),
+ ctype<char>::ctype(const mask*, bool, size_t)): Likewise, for generic
+ locale model.
+ * config/locale/gnu/messages_members.h
+ (messages<>::messages(__c_locale, const char*, size_t),
+ messages_byname<_CharT>::messages_byname(const char*, size_t)):
+ Only dynamically allocate memory if __s != "C".
+ * config/locale/gnu/time_members.h
+ (__timepunct<_CharT>::__timepunct(__c_locale, const char*, size_t)):
+ Likewise.
+ * config/locale/generic/time_members.h
+ (__timepunct<_CharT>::__timepunct(__c_locale, const char*, size_t)):
+ Likewise.
+
+ * testsuite/util/testsuite_allocator.h: Revert last change.
+
+2007-05-22 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/util/testsuite_allocator.h (check_new): Assign false
+ to new_called.
+ (check_delete): Likewise for delete_called.
+
+2007-05-21 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/c_locale.h: Do not include <cstdarg>, use builtins.
+ * config/locale/generic/c_locale.h: Likewise.
+
+2007-05-21 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31621
+ * acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
+ * configure: Regenerate.
+
+2007-05-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h: Shuffle the functions to better match the
+ order in the standard.
+
+2007-05-17 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/c_locale.h: Do not include <libintl.h>.
+ * config/locale/gnu/messages_members.h: Do it here.
+
+ * config/locale/gnu/c_locale.h: Do not include <cstdio>, use
+ the builtins.
+ * config/locale/generic/c_locale.h: Likewise.
+
+2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Add -g to
+ compile flags, move code to test to global scope.
+ * configure: Regenerate.
+
+2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
+ Fix dg bits.
+ * testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
+
+2007-05-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (mismatch): Move...
+ * include/bits/stl_algo.h: ... here.
+
+2007-05-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/tr1/cmath: Guard special math with
+ __GXX_EXPERIMENTAL_CXX0X__.
+ * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc:
+ Remove xfail.
+
+2007-05-17 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (__pad<>::_S_pad): Minor tweaks, avoid
+ unnecessary casts, do widenings just in time.
+
+2007-05-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Add a function
+ to the test code compiled with -ffunction-sections -fdata-sections.
+ * configure: Regenerate.
+
+ * testsuite/22_locale/ctype/scan/wchar_t/1.cc: Remove
+ _GLIBCXX_USE_WCHAR_T guards as superfluous.
+
+ * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Add
+ _GLIBCXX_USE_WCHAR_T guards.
+ * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Same.
+
+ * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
+ Add.
+ * testsuite/21_strings/char_traits/typedefs/char/1.cc: Move...
+ * testsuite/21_strings/char_traits/requirements/char/typedefs.cc:
+ ...here.
+ * testsuite/21_strings/char_traits/typedefs: Remove.
+ * testsuite/21_strings/char_traits/typedefs/char: Remove.
+
+2007-05-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/html/abi.html: Update for gcc-4.1.2 and gcc-4.2.0.
+
+2007-05-14 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 17_hyperg/check_nan.cc: Add -mieee for sh.
+
+2007-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/util/testsuite_io.h: Only include <ios>.
+
+2007-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/allocator.h: Do not include cpp_type_traits.h.
+
+2007-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/postypes.h (class fpos<>): Remove redundant forward
+ declaration.
+
+2007-05-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_tempbuf.h (return_temporary_buffer(_Tp*)): Inline.
+
+2007-05-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/type_traitsfwd.h: Fix include guard typo.
+
+2007-05-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/pod_char_traits.h (char_traits<>::move):
+ Use __builtin_memmove.
+ * include/bits/locale_classes.h (locale::_Impl::_M_check_same_name,
+ collate_byname(const char*, size_t)): Use __builtin_strcmp.
+ * include/bits/locale_facets.h: Use __builtin_mem* and
+ __builtin_str* everywhere.
+ * include/bits/codecvt.h (codecvt_byname(const char*, size_t)):
+ Use __builtin_strcmp.
+ * include/bits/char_traits.h: Use __builtin_mem* everywhere.
+ * include/bits/fstream.tcc (basic_filebuf<>::underflow, imbue):
+ Use __builtin_memcpy and __builtin_memmove.
+ * include/bits/locale_facets_nonio.h (moneypunct_byname(const char*,
+ size_t __refs)): Use __builtin_strcmp.
+ * include/std/bitset (bitset<>::_M_do_reset): Use __builtin_memset.
+ * config/locale/gnu/c_locale.h: Use __builtin_strlen, __builtin_strcmp,
+ and __builtin_memcpy.
+ * config/locale/gnu/messages_members.h: Likewise.
+ * config/locale/gnu/time_members.h: Likewise.
+ * config/locale/generic/c_locale.h: Likewise.
+ * config/locale/generic/messages_members.h: Likewise.
+ * config/locale/generic/time_members.h: Likewise.
+ * config/os/gnu-linux/ctype_noninline.h: Likewise, avoid strdup.
+ * config/os/tpf/ctype_noninline.h: Likewise.
+ * config/locale/generic/codecvt_members.cc: Include <cstring>.
+ * config/locale/generic/ctype_members.cc: Likewise.
+ * config/locale/generic/collate_members.cc: Likewise.
+ * config/locale/gnu/c++locale_internal.h: Likewise.
+ * config/locale/darwin/ctype_members.cc: Likewise.
+ * src/ctype.cc: Likewise.
+ * testsuite/19_diagnostics/logic_error/what-1.cc: Likewise.
+ * testsuite/19_diagnostics/logic_error/what-2.cc: Likewise.
+ * testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise.
+ * testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise.
+ * testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise.
+ * config/locale/gnu/messages_members.cc: Avoid strdup.
+ * config/locale/gnu/monetary_members.cc: Likewise.
+ * config/locale/gnu/time_members.cc: Likewise.
+ * config/locale/gnu/time_members.cc: Likewise.
+ * config/locale/generic/c_locale.cc: Likewise.
+
+2007-05-11 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/stdexcept: Remove extra spacing.
+
+ * testsuite/19_diagnostics/stdexceptions.cc: Break into...
+ * testsuite/19_diagnostics/bad_exception: ...this. Populate.
+ * testsuite/19_diagnostics/logic_error: ... this.
+ * testsuite/19_diagnostics/logic_error/what-1.cc: ...this.
+ * testsuite/19_diagnostics/logic_error/what-2.cc: ...this.
+ * testsuite/19_diagnostics/runtime_error: ...this.
+ * testsuite/19_diagnostics/runtime_error/what-1.cc: ...this.
+ * testsuite/19_diagnostics/runtime_error/what-2.cc: ...this.
+ * testsuite/19_diagnostics/runtime_error/what-3.cc: ...this.
+ * testsuite/19_diagnostics/23591_thread-1.c: Move...
+ * testsuite/19_diagnostics/bad_exception/23591_thread-1.c: ...here.
+
+2007-05-10 Paolo Carlini <pcarlini@suse.de>
+
+ * 27_io/objects/wchar_t/11.cc: Include <cstring>.
+ * 27_io/objects/wchar_t/10.cc: Likewise.
+ * 27_io/objects/wchar_t/12.cc: Likewise.
+ * 27_io/basic_streambuf/sputbackc/char/9538.cc: Likewise.
+ * 27_io/basic_streambuf/sgetn/char/1.cc: Likewise.
+ * 27_io/basic_streambuf/overflow/char/1.cc: Likewise.
+ * 27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
+ * 27_io/basic_streambuf/sputn/wchar_t/1.cc: Likewise.
+ * 27_io/basic_streambuf/sputn/char/1.cc: Likewise.
+ * 27_io/basic_ios/cons/char/3.cc: Likewise.
+ * 27_io/basic_stringbuf/setbuf/char/2.cc: Likewise.
+ * 27_io/basic_stringbuf/setbuf/char/3.cc: Likewise.
+ * 27_io/basic_stringbuf/setbuf/char/4.cc: Likewise.
+ * 27_io/basic_istream/extractors_character/char/4.cc: Likewise.
+ * 27_io/fpos/mbstate_t/1.cc: Likewise.
+ * 27_io/basic_filebuf/setbuf/char/2.cc: Likewise.
+ * 27_io/basic_filebuf/setbuf/char/3.cc: Likewise.
+ * 25_algorithms/copy/streambuf_iterators/char/2.cc: Likewise.
+ * 25_algorithms/copy/streambuf_iterators/char/4.cc: Likewise.
+ * 19_diagnostics/stdexceptions.cc: Likewise.
+ * 21_strings/char_traits/requirements/short/1.cc: Likewise.
+ * 21_strings/basic_string/compare/char/1.cc: Likewise.
+ * 21_strings/basic_string/capacity/1.cc: Likewise.
+ * ext/codecvt/char-1.cc: Likewise.
+ * ext/codecvt/char-2.cc: Likewise.
+ * ext/codecvt/1.cc: Likewise.
+ * ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
+ * ext/stdio_sync_filebuf/char/1.cc: Likewise.
+ * ext/stdio_filebuf/char/2.cc: Likewise.
+ * ext/stdio_filebuf/char/10063-1.cc: Likewise.
+ * 22_locale/ctype/narrow/char/19955.cc: Likewise.
+ * 22_locale/codecvt/unshift/wchar_t/1.cc: Likewise.
+ * 22_locale/codecvt/unshift/wchar_t/2.cc: Likewise.
+ * 22_locale/codecvt/unshift/wchar_t/3.cc: Likewise.
+ * 22_locale/codecvt/unshift/wchar_t/4.cc: Likewise.
+ * 22_locale/codecvt/unshift/char/1.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/1.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/2.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/3.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/4.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/5.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/6.cc: Likewise.
+ * 22_locale/codecvt/length/wchar_t/7.cc: Likewise.
+ * 22_locale/codecvt/always_noconv/char/1.cc: Likewise.
+ * 22_locale/codecvt/encoding/char/1.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/1.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/2.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/3.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/4.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/5.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/6.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/7.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/8.cc: Likewise.
+ * 22_locale/codecvt/in/wchar_t/9.cc: Likewise.
+ * 22_locale/codecvt/in/char/1.cc: Likewise.
+ * 22_locale/codecvt/max_length/char/1.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/1.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/2.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/3.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/4.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/5.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/6.cc: Likewise.
+ * 22_locale/codecvt/out/wchar_t/7.cc: Likewise.
+ * 22_locale/codecvt/out/char/1.cc: Likewise.
+ * 22_locale/locale/cons/5.cc: Likewise.
+ * 22_locale/collate_byname/named_equivalence.cc: Likewise.
+
+2007-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * libstdc++-v3/libsupc++/cxxabi.h (_GLIBCXX_NOTHROW): New macro.
+ (__cxa_atexit): Use it.
+
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
+ installed-tree testing, search more include directories.
+
+2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/type_traits (make_signed): Remove specializations
+ for floating point types.
+ (make_unsigned): Same.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Fix.
+ * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Same.
+ * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Same.
+
+2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: New.
+
+2007-05-08 Jason Merrill <jason@redhat.com>
+
+ * libsupc++/cxxabi-internal.h: Remove, to be replaced by...
+ * libsupc++/cxxabi-forced.h: ...this new file.
+ * include/ext/vstring.tcc: Include cxxabi-forced.h instead.
+ * include/bits/istream.tcc: Likewise.
+ * include/bits/ostream.tcc: Likewise.
+ * include/bits/basic_string.tcc: Likewise.
+ * include/bits/ostream_insert.h: Likewise.
+ * include/bits/fstream.tcc: Likewise.
+ * include/std/bitset: Likewise.
+ * libsupc++/cxxabi.h: Restore previous contents.
+ * Makefile.am (headers): Add cxxabi-forced.h.
+ * Makefile.in: Regenerate.
+
+2007-05-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.2.
+
+ * libsupc++/cxxabi-internal.h (__foreign_exception::__pure): To
+ __pure_virtual.
+
+2007-05-07 Jason Merrill <jason@redhat.com>
+
+ * include/bits/ostream.tcc (operator<<(char*)): Add __s.
+
+ * config/abi/pre/gnu.ver: Fix symbol versions.
+ * config/abi/pre/gnu-versioned-namespace.ver: Likewise.
+
+2007-05-07 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * config/os/mingw32/os_defines.h (NOMINMAX): Update comment.
+
+2007-05-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/28145
+ * libsupc++/cxxabi.h (__forced_unwind, __foreign_exception):
+ New classes.
+ * libsupc++/eh_exception.cc: Define their destructors.
+ * config/abi/pre/gnu.ver: Export their type_infos.
+ * config/abi/pre/gnu-versioned-namespace.ver: Likewise.
+ * libsupc++/eh_personality.cc: A handler for abi::__forced_unwind
+ matches a forced unwind, and a handler for abi::__foreign_exception
+ matches a foreign exception.
+
+ * include/bits/istream.tcc: Rethrow forced unwind.
+ * include/bits/ostream.tcc: Likewise.
+ * include/bits/ostream_insert.h: Likewise.
+ * include/bits/basic_string.tcc (operator>>, getline): Likewise.
+ * include/bits/fstream.tcc (basic_filebuf::close): Likewise.
+ * include/ext/vstring.cc (operator>>, getline): Likewise.
+ * src/istream.cc: Likewise.
+ * src/compatibility.cc (basic_istream::ignore): Likewise.
+ * include/std/bitset (operator>>): Likewise.
+ * include/std/fstream (basic_filebuf::close): Remove throw() spec.
+ * libsupc++/cxxabi-internal.h: Split out from...
+ * libsupc++/cxxabi.h: ...here.
+
+2007-05-07 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h: Do not include <cstring>.
+ (copy(const _Tp*, const _Tp*, _Tp*), __copy_b(const _Tp*, const _Tp*,
+ _Tp*)): Use __builtin_memmove.
+ (__fill_aux): Use __builtin_memset.
+ (equal(const _Tp*, const _Tp*, const _Tp*),
+ lexicographical_compare(const unsigned char*, const unsigned char*,
+ const unsigned char*, const unsigned char*)): Use __builtin_memcmp.
+ * include/bits/valarray_array.h: Do not include <cstring>.
+ (_Array_default_ctor<, true>::_S_do_it): Use __builtin_memset.
+ (_Array_copy_ctor<, true>::_S_do_it, _Array_copier<, true>::_S_do_it):
+ Use __builtin_memcpy.
+ * include/ext/algorithm
+ (__lexicographical_compare_3way(const unsigned char*,
+ const unsigned char*, const unsigned char*, const unsigned char*)):
+ Use __builtin_memcmp.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_1_neg.cc: Adjust dg-error line number.
+ * testsuite/23_containers/vector/requirements/dr438/
+ constructor_2_neg.cc: Likewise.
+
+2007-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): For
+ installed-tree testing, search more include directories.
+
+ * testsuite/22_locale/num_put/put/char/14220.cc: XFAIL on Solaris
+ 2.10.
+ * testsuite/22_locale/num_put/put/wchar_t/14220.cc: Likewise.
+
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): In
+ installed-tree testing, use "remote_exec host", not "remote_exec
+ exec". Trip trailing newlines from output of -dumpversion and
+ -dumpmachine.
+
+2007-05-07 Benjamin Kosnik <bkoz@redhat.com>
+ Howard Hinnant <hhinnant@apple.com>
+
+ * include/std/type_traits: (make_signed, make_unsigned): Adjust
+ for enum sizes.
+ * testsuite/20_util/make_unsigned/requirements/typedefs.cc: Move to...
+ * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: ...here.
+ * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Add,
+ compile with -funsigned-char -fshort-enums.
+ * testsuite/20_util/make_signed/requirements/typedefs.cc: Move to...
+ * testsuite/20_util/make_signed/requirements/typedefs-1.cc: ...here.
+ * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Add,
+ compile with -funsigned-char -fshort-enums.
+
+ * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
+ Add a temporary xfail to this test for all platforms.
+
+2007-05-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/complex: Add missing extern template declarations.
+ * testsuite/26_numerics/complex/complex_inserters_extractors.cc:
+ Move...
+ * testsuite/26_numerics/complex/inserters_extractors/char/1.cc:
+ ... here.
+ * testsuite/26_numerics/complex/inserters_extractors/wchar_t/1.cc:
+ New.
+
+2007-05-06 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31834
+ * testsuite/17_intro/headers/c++200x/all.cc: Protect inclusion
+ of C99 headers.
+ * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
+ Likewise.
+
+2007-05-06 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/c_locale.cc: Don't use __builtin_huge_val*
+ when __*_HAS_INFINITY__ is false.
+
+2007-05-04 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_raw_storage_iter.h (class raw_storage_iterator):
+ Adjust template parameter name.
+
+2007-05-04 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/cxxabi.h (__cxa_atexit): Conditionalize exception
+ specification on #ifdef __cplusplus.
+
+2007-05-04 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_memory.h: Rename to stl_auto_ptr.h.
+ (__get_temporary_buffer, get_temporary_buffer,
+ return_temporary_buffer): Move...
+ * include/bits/stl_tempbuf.h: ... here.
+ * include/std/memory: Adjust includes.
+ * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust dg-error line
+ numbers.
+ * include/Makefile.am: Adjust.
+ * include/Makefile.in: Regenerate.
+
+ * testsuite/util/testsuite_iterators.h: Do not include the entire
+ <iterator>.
+ * include/bits/stl_iterator_base_types.h: Adjust includes.
+ * testsuite/25_algorithms/unique_copy/2.cc: Include <functional>.
+
+2007-05-04 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/atexit_arm.cc: New file.
+ * libsupc++/vec.cc (__aeabi_atexit): Remove.
+ * libsupc++/cxxabi.h (__cxa_atexit): Add exception specification.
+
+ * libsupc++/Makefile.am: Add atexit_arm.cc.
+ * libsupc++/Makefile.in: Regenerated.
+
+2007-05-04 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_construct.h (_Destroy(_ForwardIterator,
+ _ForwardIterator __last, _Allocator)): Change the last parameter
+ to _Allocator&.
+ * include/bits/stl_uninitialized.h (__uninitialized_copy_a,
+ __uninitialized_fill_a, __uninitialized_fill_n_a,
+ __uninitialized_fill_copy, __uninitialized_copy_fill,
+ __uninitialized_copy_copy): Likewise.
+ * include/ext/rope: Adjust everywhere.
+ * include/ext/ropeimpl.h: Likewise.
+
+2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/std/type_traits (enable_if): New.
+ (conditional): New.
+ (__decay_selector, decay): New.
+ (__cv_selector, __match_cv_qualifiers): New.
+ (__make_unsigned, __make_unsigned_selector, make_unsigned): New.
+ (__make_signed, __make_signed_selector, make_signed): New.
+ (has_trivial_constructor): ... to has_trivial_default_constructor.
+ (has_nothrow_constructor): ... to has_nothrow_default_constructor.
+ (has_trivial_copy): ... to has_trivial_copy_constructor.
+ (has_nothrow_copy): ... to has_nothrow_copy_constructor.
+
+ * include/tr1/type_traits_fwd: Move to...
+ * include/tr1/type_traitsfwd: ... this, consistency with
+ ios/string/locale forward headers.
+ * include/tr1/type_traits: Adjust include.
+ * include/Makefile.am (tr1_headers): Change type_traits_fwd.h to
+ type_traitsfwd.h.
+ * include/Makefile.in: Regenerate.
+
+ * testsuite/23_containers/tuple: Move...
+ * testsuite/20_util/tuple:... here.
+
+ * testsuite/20_util/conditional: New.
+ * testsuite/20_util/conditional/requirements: Same.
+ * testsuite/20_util/conditional/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/conditional/requirements/typedefs.cc: Same.
+ * testsuite/20_util/decay: Same.
+ * testsuite/20_util/decay/requirements: Same.
+ * testsuite/20_util/decay/requirements/explicit_instantiation.cc: Same.
+ * testsuite/20_util/decay/requirements/typedefs.cc: Same.
+ * testsuite/20_util/enable_if: Same.
+ * testsuite/20_util/enable_if/requirements: Same.
+ * testsuite/20_util/enable_if/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/enable_if/requirements/typedefs.cc: Same.
+ * testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Same.
+ * testsuite/20_util/has_nothrow_copy_constructor: Same.
+ * testsuite/20_util/has_nothrow_copy_constructor/requirements: Same.
+ * testsuite/20_util/has_nothrow_copy_constructor/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/has_nothrow_copy_constructor/requirements/
+ typedefs.cc: Same.
+ * testsuite/20_util/has_nothrow_copy_constructor/value.cc: Same.
+ * testsuite/20_util/has_nothrow_default_constructor: Same.
+ * testsuite/20_util/has_nothrow_default_constructor/requirements: Same.
+ * testsuite/20_util/has_nothrow_default_constructor/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/has_nothrow_default_constructor/requirements/
+ typedefs.cc: Same.
+ * testsuite/20_util/has_nothrow_default_constructor/value.cc: Same.
+ * testsuite/20_util/has_trivial_copy_constructor: Same.
+ * testsuite/20_util/has_trivial_copy_constructor/requirements: Same.
+ * testsuite/20_util/has_trivial_copy_constructor/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/has_trivial_copy_constructor/requirements/
+ typedefs.cc: Same.
+ * testsuite/20_util/has_trivial_copy_constructor/value.cc: Same.
+ * testsuite/20_util/has_trivial_default_constructor: Same.
+ * testsuite/20_util/has_trivial_default_constructor/requirements: Same.
+ * testsuite/20_util/has_trivial_default_constructor/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/has_trivial_default_constructor/requirements/
+ typedefs.cc: Same.
+ * testsuite/20_util/has_trivial_default_constructor/value.cc: Same.
+ * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc: Same.
+ * testsuite/20_util/make_signed: Same.
+ * testsuite/20_util/make_signed/requirements: Same.
+ * testsuite/20_util/make_signed/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/make_signed/requirements/typedefs.cc: Same.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
+ * testsuite/20_util/make_unsigned: Same.
+ * testsuite/20_util/make_unsigned/requirements: Same.
+ * testsuite/20_util/make_unsigned/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs.cc: Same.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
+
+2007-05-02 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31777
+ * include/ext/pool_allocator.h (__pool_alloc<>::allocate,
+ __pool_alloc<>::deallocate): Fix _S_force_new check.
+
+2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * 23_containers/requirements/sequences/dr438/deque/*: Move to...
+ * 23_containers/deque/requirements/dr438: ...here.
+
+ * 23_containers/requirements/sequences/dr438/list/*: Move to...
+ * 23_containers/list/requirements/dr438: ...here.
+
+ * 23_containers/requirements/sequences/dr438/vector/*: Move to...
+ * 23_containers/vector/requirements/dr438: ...here.
+
+2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/*/explicit_instantiations.cc: Change to...
+ * testsuite/*/explicit_instantiation.cc: ... this.
+
+2007-05-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/tr1/4_metaprogramming/*/explicit_instantiations.cc: Change
+ "basic_ofstream" in comment to type_traits.
+
+2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ Directory layout flattening.
+
+ Added in testsuite:
+ * tr1/4_metaprogramming/add_const
+ * tr1/4_metaprogramming/add_const/requirements
+ * tr1/4_metaprogramming/add_const/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_const/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_cv
+ * tr1/4_metaprogramming/add_cv/requirements
+ * tr1/4_metaprogramming/add_cv/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_cv/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_pointer
+ * tr1/4_metaprogramming/add_pointer/requirements
+ * tr1/4_metaprogramming/add_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_reference
+ * tr1/4_metaprogramming/add_reference/requirements
+ * tr1/4_metaprogramming/add_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_reference/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_volatile
+ * tr1/4_metaprogramming/add_volatile/requirements
+ * tr1/4_metaprogramming/add_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_volatile/requirements/typedefs.cc
+ * tr1/4_metaprogramming/aligned_storage
+ * tr1/4_metaprogramming/aligned_storage/requirements
+ * tr1/4_metaprogramming/aligned_storage/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/aligned_storage/requirements/typedefs.cc
+ * tr1/4_metaprogramming/alignment_of
+ * tr1/4_metaprogramming/alignment_of/requirements
+ * tr1/4_metaprogramming/alignment_of/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/alignment_of/requirements/typedefs.cc
+ * tr1/4_metaprogramming/alignment_of/value.cc
+ * tr1/4_metaprogramming/extent
+ * tr1/4_metaprogramming/extent/requirements
+ * tr1/4_metaprogramming/extent/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/extent/requirements/typedefs.cc
+ * tr1/4_metaprogramming/extent/value.cc
+ * tr1/4_metaprogramming/has_nothrow_assign
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/value.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor
+ * tr1/4_metaprogramming/has_nothrow_constructor/requirements
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/value.cc
+ * tr1/4_metaprogramming/has_nothrow_copy
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/value.cc
+ * tr1/4_metaprogramming/has_trivial_assign
+ * tr1/4_metaprogramming/has_trivial_assign/requirements
+ * tr1/4_metaprogramming/has_trivial_assign/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_assign/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_assign/value.cc
+ * tr1/4_metaprogramming/has_trivial_constructor
+ * tr1/4_metaprogramming/has_trivial_constructor/requirements
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/value.cc
+ * tr1/4_metaprogramming/has_trivial_copy
+ * tr1/4_metaprogramming/has_trivial_copy/requirements
+ * tr1/4_metaprogramming/has_trivial_copy/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_copy/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_copy/value.cc
+ * tr1/4_metaprogramming/has_trivial_destructor
+ * tr1/4_metaprogramming/has_trivial_destructor/requirements
+ * tr1/4_metaprogramming/has_trivial_destructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/value.cc
+ * tr1/4_metaprogramming/has_virtual_destructor
+ * tr1/4_metaprogramming/has_virtual_destructor/requirements
+ * tr1/4_metaprogramming/has_virtual_destructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/value.cc
+ * tr1/4_metaprogramming/integral_constant
+ * tr1/4_metaprogramming/integral_constant/requirements
+ * tr1/4_metaprogramming/integral_constant/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/integral_constant/requirements/typedefs.cc
+ * tr1/4_metaprogramming/integral_constant/true_false_value.cc
+ * tr1/4_metaprogramming/is_abstract
+ * tr1/4_metaprogramming/is_abstract/requirements
+ * tr1/4_metaprogramming/is_abstract/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_abstract/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_abstract/value.cc
+ * tr1/4_metaprogramming/is_arithmetic
+ * tr1/4_metaprogramming/is_arithmetic/requirements
+ * tr1/4_metaprogramming/is_arithmetic/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_arithmetic/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_arithmetic/value.cc
+ * tr1/4_metaprogramming/is_array
+ * tr1/4_metaprogramming/is_array/requirements
+ * tr1/4_metaprogramming/is_array/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_array/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_array/value.cc
+ * tr1/4_metaprogramming/is_base_of
+ * tr1/4_metaprogramming/is_base_of/requirements
+ * tr1/4_metaprogramming/is_base_of/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_base_of/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_base_of/value.cc
+ * tr1/4_metaprogramming/is_class
+ * tr1/4_metaprogramming/is_class/requirements
+ * tr1/4_metaprogramming/is_class/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_class/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_class/value.cc
+ * tr1/4_metaprogramming/is_compound
+ * tr1/4_metaprogramming/is_compound/requirements
+ * tr1/4_metaprogramming/is_compound/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_compound/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_compound/value.cc
+ * tr1/4_metaprogramming/is_const
+ * tr1/4_metaprogramming/is_const/requirements
+ * tr1/4_metaprogramming/is_const/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_const/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_const/value.cc
+ * tr1/4_metaprogramming/is_convertible
+ * tr1/4_metaprogramming/is_convertible/requirements
+ * tr1/4_metaprogramming/is_convertible/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_convertible/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_convertible/value.cc
+ * tr1/4_metaprogramming/is_empty
+ * tr1/4_metaprogramming/is_empty/requirements
+ * tr1/4_metaprogramming/is_empty/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_empty/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_empty/value.cc
+ * tr1/4_metaprogramming/is_enum
+ * tr1/4_metaprogramming/is_enum/requirements
+ * tr1/4_metaprogramming/is_enum/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_enum/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_enum/value.cc
+ * tr1/4_metaprogramming/is_floating_point
+ * tr1/4_metaprogramming/is_floating_point/requirements
+ * tr1/4_metaprogramming/is_floating_point/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_floating_point/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_floating_point/value.cc
+ * tr1/4_metaprogramming/is_function
+ * tr1/4_metaprogramming/is_function/requirements
+ * tr1/4_metaprogramming/is_function/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_function/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_function/value.cc
+ * tr1/4_metaprogramming/is_fundamental
+ * tr1/4_metaprogramming/is_fundamental/requirements
+ * tr1/4_metaprogramming/is_fundamental/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_fundamental/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_fundamental/value.cc
+ * tr1/4_metaprogramming/is_integral
+ * tr1/4_metaprogramming/is_integral/requirements
+ * tr1/4_metaprogramming/is_integral/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_integral/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_integral/value.cc
+ * tr1/4_metaprogramming/is_member_function_pointer
+ * tr1/4_metaprogramming/is_member_function_pointer/requirements
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/value.cc
+ * tr1/4_metaprogramming/is_member_object_pointer
+ * tr1/4_metaprogramming/is_member_object_pointer/requirements
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/value.cc
+ * tr1/4_metaprogramming/is_member_pointer
+ * tr1/4_metaprogramming/is_member_pointer/requirements
+ * tr1/4_metaprogramming/is_member_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_pointer/value.cc
+ * tr1/4_metaprogramming/is_object
+ * tr1/4_metaprogramming/is_object/requirements
+ * tr1/4_metaprogramming/is_object/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_object/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_object/value.cc
+ * tr1/4_metaprogramming/is_pod
+ * tr1/4_metaprogramming/is_pod/requirements
+ * tr1/4_metaprogramming/is_pod/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_pod/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_pod/value.cc
+ * tr1/4_metaprogramming/is_pointer
+ * tr1/4_metaprogramming/is_pointer/requirements
+ * tr1/4_metaprogramming/is_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_pointer/value.cc
+ * tr1/4_metaprogramming/is_polymorphic
+ * tr1/4_metaprogramming/is_polymorphic/requirements
+ * tr1/4_metaprogramming/is_polymorphic/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_polymorphic/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_polymorphic/value.cc
+ * tr1/4_metaprogramming/is_reference
+ * tr1/4_metaprogramming/is_reference/requirements
+ * tr1/4_metaprogramming/is_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_reference/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_reference/value.cc
+ * tr1/4_metaprogramming/is_same
+ * tr1/4_metaprogramming/is_same/requirements
+ * tr1/4_metaprogramming/is_same/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_same/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_same/value.cc
+ * tr1/4_metaprogramming/is_scalar
+ * tr1/4_metaprogramming/is_scalar/requirements
+ * tr1/4_metaprogramming/is_scalar/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_scalar/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_scalar/value.cc
+ * tr1/4_metaprogramming/is_signed
+ * tr1/4_metaprogramming/is_signed/requirements
+ * tr1/4_metaprogramming/is_signed/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_signed/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_signed/value.cc
+ * tr1/4_metaprogramming/is_union
+ * tr1/4_metaprogramming/is_union/requirements
+ * tr1/4_metaprogramming/is_union/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_union/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_union/value.cc
+ * tr1/4_metaprogramming/is_unsigned
+ * tr1/4_metaprogramming/is_unsigned/requirements
+ * tr1/4_metaprogramming/is_unsigned/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_unsigned/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_unsigned/value.cc
+ * tr1/4_metaprogramming/is_void
+ * tr1/4_metaprogramming/is_void/requirements
+ * tr1/4_metaprogramming/is_void/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_void/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_void/value.cc
+ * tr1/4_metaprogramming/is_volatile
+ * tr1/4_metaprogramming/is_volatile/requirements
+ * tr1/4_metaprogramming/is_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_volatile/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_volatile/value.cc
+ * tr1/4_metaprogramming/rank
+ * tr1/4_metaprogramming/rank/requirements
+ * tr1/4_metaprogramming/rank/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/rank/requirements/typedefs.cc
+ * tr1/4_metaprogramming/rank/value.cc
+ * tr1/4_metaprogramming/remove_all_extents
+ * tr1/4_metaprogramming/remove_all_extents/requirements
+ * tr1/4_metaprogramming/remove_all_extents/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_all_extents/value.cc
+ * tr1/4_metaprogramming/remove_const
+ * tr1/4_metaprogramming/remove_const/requirements
+ * tr1/4_metaprogramming/remove_const/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_const/value.cc
+ * tr1/4_metaprogramming/remove_cv
+ * tr1/4_metaprogramming/remove_cv/requirements
+ * tr1/4_metaprogramming/remove_cv/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_cv/value.cc
+ * tr1/4_metaprogramming/remove_extent
+ * tr1/4_metaprogramming/remove_extent/requirements
+ * tr1/4_metaprogramming/remove_extent/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_extent/value.cc
+ * tr1/4_metaprogramming/remove_pointer
+ * tr1/4_metaprogramming/remove_pointer/requirements
+ * tr1/4_metaprogramming/remove_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_pointer/value.cc
+ * tr1/4_metaprogramming/remove_reference
+ * tr1/4_metaprogramming/remove_reference/requirements
+ * tr1/4_metaprogramming/remove_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_reference/value.cc
+ * tr1/4_metaprogramming/remove_volatile
+ * tr1/4_metaprogramming/remove_volatile/requirements
+ * tr1/4_metaprogramming/remove_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_volatile/value.cc
+
+ Deleted in testsuite:
+ * tr1/4_metaprogramming/alignment_of/alignment_of.cc
+ * tr1/4_metaprogramming/alignment_of/typedefs.cc
+ * tr1/4_metaprogramming/array_modifications
+ * tr1/4_metaprogramming/array_modifications/remove_all_extents.cc
+ * tr1/4_metaprogramming/array_modifications/remove_extent.cc
+ * tr1/4_metaprogramming/composite_type_traits
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/
+ is_arithmetic.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_compound
+ * tr1/4_metaprogramming/composite_type_traits/is_compound/
+ is_compound.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_compound/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
+ is_fundamental.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
+ typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
+ is_member_pointer.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
+ typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object
+ * tr1/4_metaprogramming/composite_type_traits/is_object/24808.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object/is_object.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar/typedefs.cc
+ * tr1/4_metaprogramming/const_volatile_modifications
+ * tr1/4_metaprogramming/const_volatile_modifications/add_const.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/add_cv.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/add_volatile.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_const.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_cv.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_volatile.cc
+ * tr1/4_metaprogramming/extent/extent.cc
+ * tr1/4_metaprogramming/extent/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/has_nothrow_assign.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ has_nothrow_constructor.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/has_nothrow_copy.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_assign/has_trivial_assign.cc
+ * tr1/4_metaprogramming/has_trivial_assign/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ has_trivial_constructor.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_copy/has_trivial_copy.cc
+ * tr1/4_metaprogramming/has_trivial_copy/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/
+ has_trivial_destructor.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/typedefs.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/
+ has_virtual_destructor.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/typedefs.cc
+ * tr1/4_metaprogramming/helper_classes
+ * tr1/4_metaprogramming/helper_classes/static_definition.cc
+ * tr1/4_metaprogramming/helper_classes/true_false_type.cc
+ * tr1/4_metaprogramming/helper_classes/true_false_type_typedefs.cc
+ * tr1/4_metaprogramming/helper_classes/typedefs.cc
+ * tr1/4_metaprogramming/integral_constant/true_false_type.cc
+ * tr1/4_metaprogramming/integral_constant/typedefs.cc
+ * tr1/4_metaprogramming/is_abstract/is_abstract.cc
+ * tr1/4_metaprogramming/is_abstract/typedefs.cc
+ * tr1/4_metaprogramming/is_arithmetic/is_arithmetic.cc
+ * tr1/4_metaprogramming/is_arithmetic/typedefs.cc
+ * tr1/4_metaprogramming/is_array/is_array.cc
+ * tr1/4_metaprogramming/is_array/typedefs.cc
+ * tr1/4_metaprogramming/is_base_of/is_base_of.cc
+ * tr1/4_metaprogramming/is_base_of/typedefs.cc
+ * tr1/4_metaprogramming/is_class/is_class.cc
+ * tr1/4_metaprogramming/is_class/typedefs.cc
+ * tr1/4_metaprogramming/is_compound/is_compound.cc
+ * tr1/4_metaprogramming/is_compound/typedefs.cc
+ * tr1/4_metaprogramming/is_const/is_const.cc
+ * tr1/4_metaprogramming/is_const/typedefs.cc
+ * tr1/4_metaprogramming/is_convertible/is_convertible.cc
+ * tr1/4_metaprogramming/is_convertible/typedefs.cc
+ * tr1/4_metaprogramming/is_empty/is_empty.cc
+ * tr1/4_metaprogramming/is_empty/typedefs.cc
+ * tr1/4_metaprogramming/is_enum/is_enum.cc
+ * tr1/4_metaprogramming/is_enum/typedefs.cc
+ * tr1/4_metaprogramming/is_floating_point/is_floating_point.cc
+ * tr1/4_metaprogramming/is_floating_point/typedefs.cc
+ * tr1/4_metaprogramming/is_function/is_function.cc
+ * tr1/4_metaprogramming/is_function/typedefs.cc
+ * tr1/4_metaprogramming/is_fundamental/is_fundamental.cc
+ * tr1/4_metaprogramming/is_fundamental/typedefs.cc
+ * tr1/4_metaprogramming/is_integral/is_integral.cc
+ * tr1/4_metaprogramming/is_integral/typedefs.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ is_member_function_pointer.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ is_member_object_pointer.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_member_pointer/is_member_pointer.cc
+ * tr1/4_metaprogramming/is_member_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_object/is_object.cc
+ * tr1/4_metaprogramming/is_object/typedefs.cc
+ * tr1/4_metaprogramming/is_pod/is_pod.cc
+ * tr1/4_metaprogramming/is_pod/typedefs.cc
+ * tr1/4_metaprogramming/is_pointer/is_pointer.cc
+ * tr1/4_metaprogramming/is_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_polymorphic/is_polymorphic.cc
+ * tr1/4_metaprogramming/is_polymorphic/typedefs.cc
+ * tr1/4_metaprogramming/is_reference/is_reference.cc
+ * tr1/4_metaprogramming/is_reference/typedefs.cc
+ * tr1/4_metaprogramming/is_same/is_same.cc
+ * tr1/4_metaprogramming/is_same/typedefs.cc
+ * tr1/4_metaprogramming/is_scalar/is_scalar.cc
+ * tr1/4_metaprogramming/is_scalar/typedefs.cc
+ * tr1/4_metaprogramming/is_signed/is_signed.cc
+ * tr1/4_metaprogramming/is_signed/typedefs.cc
+ * tr1/4_metaprogramming/is_union/is_union.cc
+ * tr1/4_metaprogramming/is_union/typedefs.cc
+ * tr1/4_metaprogramming/is_unsigned/is_unsigned.cc
+ * tr1/4_metaprogramming/is_unsigned/typedefs.cc
+ * tr1/4_metaprogramming/is_void/is_void.cc
+ * tr1/4_metaprogramming/is_void/typedefs.cc
+ * tr1/4_metaprogramming/is_volatile/is_volatile.cc
+ * tr1/4_metaprogramming/is_volatile/typedefs.cc
+ * tr1/4_metaprogramming/other_transformations
+ * tr1/4_metaprogramming/other_transformations/aligned_storage
+ * tr1/4_metaprogramming/other_transformations/aligned_storage/
+ aligned_storage.cc
+ * tr1/4_metaprogramming/other_transformations/aligned_storage/
+ typedefs.cc
+ * tr1/4_metaprogramming/pointer_modifications
+ * tr1/4_metaprogramming/pointer_modifications/add_pointer.cc
+ * tr1/4_metaprogramming/pointer_modifications/remove_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories
+ * tr1/4_metaprogramming/primary_type_categories/is_array
+ * tr1/4_metaprogramming/primary_type_categories/is_array/is_array.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_array/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_class
+ * tr1/4_metaprogramming/primary_type_categories/is_class/is_class.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_class/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/24808.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
+ is_floating_point.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
+ typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function
+ * tr1/4_metaprogramming/primary_type_categories/is_function/24808.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function/
+ is_function.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_integral
+ * tr1/4_metaprogramming/primary_type_categories/is_integral/
+ is_integral.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_integral/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer/is_member_function_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer/is_member_object_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer/
+ is_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_reference
+ * tr1/4_metaprogramming/primary_type_categories/is_reference/
+ is_reference.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_reference/
+ typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_union
+ * tr1/4_metaprogramming/primary_type_categories/is_union/is_union.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_union/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_void
+ * tr1/4_metaprogramming/primary_type_categories/is_void/is_void.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_void/typedefs.cc
+ * tr1/4_metaprogramming/rank/rank.cc
+ * tr1/4_metaprogramming/rank/typedefs.cc
+ * tr1/4_metaprogramming/reference_modifications/add_reference.cc
+ * tr1/4_metaprogramming/reference_modifications/remove_reference.cc
+ * tr1/4_metaprogramming/relationships_between_types
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of/
+ is_base_of.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of/
+ typedefs.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible/
+ is_convertible.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible/
+ typedefs.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_same
+ * tr1/4_metaprogramming/relationships_between_types/is_same/is_same.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_same/typedefs.cc
+ * tr1/4_metaprogramming/type_properties
+ * tr1/4_metaprogramming/type_properties/alignment_of
+ * tr1/4_metaprogramming/type_properties/alignment_of/alignment_of.cc
+ * tr1/4_metaprogramming/type_properties/alignment_of/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/extent
+ * tr1/4_metaprogramming/type_properties/extent/extent.cc
+ * tr1/4_metaprogramming/type_properties/extent/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign/
+ has_nothrow_assign.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
+ has_nothrow_constructor.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy/
+ has_nothrow_copy.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign/
+ has_trivial_assign.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
+ has_trivial_constructor.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy/
+ has_trivial_copy.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
+ has_trivial_destructor.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
+ has_virtual_destructor.cc
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_abstract
+ * tr1/4_metaprogramming/type_properties/is_abstract/is_abstract.cc
+ * tr1/4_metaprogramming/type_properties/is_abstract/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_const
+ * tr1/4_metaprogramming/type_properties/is_const/is_const.cc
+ * tr1/4_metaprogramming/type_properties/is_const/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_empty
+ * tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc
+ * tr1/4_metaprogramming/type_properties/is_empty/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_pod
+ * tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc
+ * tr1/4_metaprogramming/type_properties/is_pod/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/24809.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/
+ is_polymorphic.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_signed
+ * tr1/4_metaprogramming/type_properties/is_signed/is_signed.cc
+ * tr1/4_metaprogramming/type_properties/is_signed/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_unsigned
+ * tr1/4_metaprogramming/type_properties/is_unsigned/is_unsigned.cc
+ * tr1/4_metaprogramming/type_properties/is_unsigned/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_volatile
+ * tr1/4_metaprogramming/type_properties/is_volatile/is_volatile.cc
+ * tr1/4_metaprogramming/type_properties/is_volatile/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/rank
+ * tr1/4_metaprogramming/type_properties/rank/rank.cc
+ * tr1/4_metaprogramming/type_properties/rank/typedefs.cc
+
+2007-04-30 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Correct
+ regexp to filter out -nostdinc++.
+
+2007-04-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30449 (equal)
+ * include/bits/stl_algobase.h (struct __niter_base): Add.
+ (copy(_II, _II, _OI), copy_backward(_BI1, _BI1, _BI2),
+ fill(_ForwardIterator, _ForwardIterator, const _Tp&),
+ fill_n(_OI, _Size, const _Tp&), equal(_II1, _II1, _II2)):
+ Use it.
+ (struct __copy_normal, __copy_backward_normal,
+ struct __fill_normal, struct __fill_n_normal): Remove.
+ (struct __equal, struct __equal_aux): Add.
+ * include/bits/stl_iterator.h: Add _Iterator_type typedef.
+
+ * include/bits/stl_algobase.h (__fill_aux(wchar_t*,
+ wchar_t*, wchar_t), __fill_n_aux(wchar_t*, _Size, wchar_t)):
+ Remove.
+
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_1_neg.cc: Adjust dg-error line number.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_2_neg.cc: Likewise.
+
+2007-04-30 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/type_traits (is_pod): Use __is_pod.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ has_trivial_destructor/has_trivial_destructor.cc: Adjust.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ has_nothrow_constructor/has_nothrow_constructor.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ has_trivial_constructor/has_trivial_constructor.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ is_pod/is_pod.cc: Likewise.
+
+2007-04-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/localefwd.h: Remove redundant inline qualifiers.
+ (__check_facet): Move...
+ * include/bits/basic_ios.h: ... here.
+ (widen(char), narrow(char_type, char)): Define inline.
+ * include/bits/basic_ios.tcc (widen(char), narrow(char_type, char)):
+ Remove.
+
+2007-04-27 Paolo Carlini <pcarlini@suse.de>
+
+ DR 438, [DR].
+ * include/bits/basic_string.h (_S_construct_aux(_InIterator,
+ _InIterator, const _Alloc&, __true_type)): Do not cast the
+ second argument.
+ * include/ext/rc_string_base.h (_S_construct_aux(_Integer,
+ _Integer, const _Alloc&, std::__true_type)): Likewise.
+ * include/ext/sso_string_base.h (_M_construct_aux(_InIterator,
+ _InIterator, std::__true_type)): Likewise.
+ * include/bits/stl_deque.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
+ not cast the arguments.
+ (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
+ Likewise.
+ * include/bits/stl_list.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Likewise.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
+ not cast both arguments.
+ * include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
+ cast the arguments.
+ * include/bits/stl_vector.h (_M_initialize_dispatch(_Integer,
+ _Integer, __true_type)): Cast the first argument.
+ (_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
+ cast the arguments.
+ (_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
+ Likewise.
+ * testsuite/21_strings/basic_string/requirements/dr438/
+ constructor.cc: New.
+ * testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/deque/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/list/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ assign_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ constructor_1_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ insert_neg.cc: Likewise.
+ * testsuite/23_containers/requirements/sequences/dr438/vector/
+ bool/constructor.cc: Likewise.
+ * docs/html/ext/howto.html: Add an entry for DR 438.
+
+2007-04-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_classes.h: Remove redundant inline specifiers.
+ * include/bits/ios_base.h: Likewise.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error line
+ numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
+
+2007-04-24 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (class collate, class collate_byname):
+ Move...
+ * include/bits/locale_classes.h: ... here.
+ * include/bits/locale_facets.tcc (locale::combine, locale::operator(),
+ has_facet, use_facet, collate::_M_compare, collate::_M_transform,
+ collate::do_compare, collate::do_transform, collate::do_hash): Move...
+ * include/bits/locale_classes.tcc: ... here, new.
+ * include/Makefile.am: Add.
+ * testsuite/util/testsuite_abi.h: Include <locale>.
+ * include/std/locale: Tweak.
+ * include/std/istream: Likewise.
+ * include/std/ostream: Likewise.
+ * include/bits/codecvt.h: Likewise.
+ * include/Makefile.in: Regenerate.
+
+ * include/bits/codecvt.h: Adjust extern template declarations.
+ * include/bits/ostream_insert.h: Likewise.
+ * include/bits/ostream.tcc: Likewise.
+
+ * include/bits/locale_facets.h: Do not include <bits/codecvt.h>.
+ * include/std/fstream: Do it here.
+ * include/bits/locale_facets_nonio.h: Likewise.
+
+2007-04-23 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (class time_base,
+ struct __timepunct_cache, class __timepunct, class time_get,
+ class time_get_byname, class time_put, class time_put_byname,
+ class money_base, struct __moneypunct_cache, class moneypunct,
+ class moneypunct_byname, class money_get, class money_put,
+ struct messages_base, class messages, class messages_byname): Move...
+ * include/bits/locale_facets_nonio.h: ... here.
+ * include/bits/locale_facets.tcc
+ (struct __use_cache<__moneypunct_cache<> >,
+ __moneypunct_cache<>::_M_cache, money_get<>::_M_extract,
+ money_get<>::__do_get, money_get<>::do_get, money_put<>::_M_insert,
+ money_put<>::__do_put, money_put<>::do_put, time_get<>::do_date_order,
+ time_get<>::_M_extract_via_format, time_get<>::_M_extract_num,
+ time_get<>::_M_extract_name, time_get<>::do_get_time,
+ time_get<>::do_get_date, time_get<>::do_get_weekday,
+ time_get<>::do_get_monthname, time_get<>::do_get_year, time_put<>::put,
+ time_put<>::do_put): Move...
+ * include/bits/locale_facets_nonio.tcc: ... here.
+ * include/Makefile.am: Add.
+ * include/std/locale: Adjust includes.
+ * include/std/fstream: Likewise.
+ * include/std/istream: Likewise.
+ * include/std/ostream: Likewise.
+ * include/Makefile.in: Regenerate.
+
+2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * scripts/testsuite_flags.in: Add --build-cc option.
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Set cc. Fix typo
+ in previous change.
+ (v3_target_compile_as_c): Use cc.
+
+2007-04-22 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Use the same flags
+ for remote host testing we use for local host testing. Copy all
+ testsuite headers to the remote host
+ (v3_target_compile_as_c): Use remote_exec, not just exec.
+
+2007-04-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/functional: Formatting fixes.
+
+2007-04-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/concurrence.h: Do not include <cstdlib>, use
+ __builtin_abort.
+ * include/debug/debug.h: Likewise.
+ * include/tr1/memory: Likewise.
+ * include/tr1/boost_shared_ptr.h: Likewise.
+ * include/tr1/functional: Likewise.
+
+2007-04-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc: Do not include <typeinfo>.
+ * testsuite/27_io/basic_ios/imbue/14072.cc: Do it here.
+ * testsuite/27_io/basic_ios/cons/char/3.cc: Likewise.
+ * testsuite/27_io/basic_istream/sentry/pod/1.cc: Likewise.
+ * testsuite/27_io/basic_ostream/sentry/pod/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ pod/10081-in.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ pod/10081-out.cc: Likewise.
+ * testsuite/22_locale/locale/cons/2.cc: Likewise.
+ * testsuite/22_locale/locale/cons/unicode.cc: Likewise.
+ * testsuite/22_locale/numpunct/members/pod/2.cc: Likewise.
+ * testsuite/22_locale/global_templates/1.cc: Likewise.
+
+2007-04-19 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
+ for long double compatibility.
+ * configure: Regenerate.
+ * src/complex_io.cc, src/istream-inst.cc, src/ostream-inst.cc:
+ Condition some _GLIBCXX_LDBL_COMPAT calls on _GLIBCXX_USE_WCHAR_T.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * configure.ac: Change how LIBSUPCXX_PICFLAGS is set.
+ * configure: Regenerate.
+
+2007-04-14 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/c_locale.cc: Include <limits>.
+
+2007-04-13 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31556
+ * include/bits/stl_algobase.h (equal(_InputIterator1, _InputIterator1,
+ _InputIterator2, _BinaryPredicate), mismatch(_InputIterator1,
+ _InputIterator1, _InputIterator2, _BinaryPredicate)): Convert
+ predicate return to bool.
+ * include/bits/stl_algo.h (__find_if(_InputIterator, _InputIterator,
+ _Predicate, input_iterator_tag), search(_ForwardIterator1,
+ _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate), __search_n(_ForwardIterator, _ForwardIterator,
+ _Integer, const _Tp&, _BinaryPredicate, std::forward_iterator_tag),
+ __search_n(_RandomAccessIter, _RandomAccessIter, _Integer, const _Tp&,
+ _BinaryPredicate, std::random_access_iterator_tag),
+ search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
+ _BinaryPredicate), remove_copy_if(_InputIterator, _InputIterator,
+ _OutputIterator, _Predicate), __unique_copy(_ForwardIterator,
+ _ForwardIterator, _OutputIterator, _BinaryPredicate,
+ forward_iterator_tag, output_iterator_tag),
+ __unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ _BinaryPredicate, input_iterator_tag, output_iterator_tag),
+ __unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ _BinaryPredicate, input_iterator_tag, output_iterator_tag),
+ __unique_copy(_InputIterator, _InputIterator, _ForwardIterator,
+ _BinaryPredicate, input_iterator_tag, forward_iterator_tag),
+ unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate),
+ __partition(_BidirectionalIterator, _BidirectionalIterator, _Predicate,
+ bidirectional_iterator_tag), binary_search(_ForwardIterator,
+ _ForwardIterator, const _Tp&, _Compare),
+ next_permutation(_BidirectionalIterator, _BidirectionalIterator,
+ _Compare), prev_permutation(_BidirectionalIterator,
+ _BidirectionalIterator, _Compare)): Likewise.
+
+2007-04-13 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31554
+ * include/bits/stl_algo.h (stable_partition): Convert __buf.size()
+ to _DistanceType.
+
+2007-04-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/numeric_traits.h: Do not include <limits>.
+ (__numeric_traits_integer::__is_signed, __digits): Add.
+ (__numeric_traits_floating::__digits10, __max_exponent10): Add.
+ * src/istream.cc (ignore<char>(streamsize, int_type), operator>>
+ (basic_istream<char>&, char*), ignore<wchar_t>(streamsize,
+ int_type)): Use the latter.
+ * src/compatibility.cc (ignore<char>(streamsize),
+ ignore<wchar_t>(streamsize)): Likewise.
+ * include/ext/vstring_util.h (__vstring_utility<>::_S_compare):
+ Likewise.
+ * include/bits/stl_memory.h (__get_temporary_buffer): Likewise.
+ * include/bits/stl_algobase.h (lexicographical_compare(const char*,
+ const char*, const char*, const char*)): Likewise.
+ * include/bits/locale_facets.tcc (num_get<>::_M_extract_int(_InIter,
+ _InIter, ios_base&, ios_base::iostate&, _ValueT&),
+ num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT),
+ num_put<>::_M_insert_float(_OutIter, ios_base&, _CharT, char,
+ _ValueT), collate<>::do_hash(const _CharT*, const _CharT*)): Likewise.
+ * include/bits/basic_string.h (basic_string<>::_S_compare): Likewise.
+ * include/bits/istream.tcc (operator>>(short&), operator>>(int&),
+ ignore(streamsize), ignore(streamsize, int_type), operator>>
+ (basic_istream<>&, _CharT*)): Likewise.
+ * include/bits/stl_bvector.h (vector<bool>::max_size): Likewise.
+ * include/tr1/functional_hash.h (struct hash<long double>): Likewise.
+ * include/std/istream: Do not include <limits>.
+ * include/tr1/cmath: Include <limits>.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/13.cc:
+ Likewise.
+ * testsuite/27_io/ios_base/storage/2.cc: Likewise.
+
+ * include/tr1/hashtable: Do not include the whole <iterator>.
+
+2007-04-11 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/gnu/c_locale.h: Do not include <langinfo.h>
+ and <iconv.h>.
+ * config/locale/gnu/c++locale_internal.h: Include <langinfo.h>.
+
+2007-04-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/istream (class basic_istream<>): Remove unneded friend
+ declarations.
+
+2007-04-11 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Initialize v.
+
+2007-04-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
+ ios_base&, ios_base::iostate&, void*&)): Fix for sizeof(void*)
+ > sizeof(unsigned long).
+
+ * testsuite/22_locale/num_get/get/char/1.cc: Fix void* test.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
+
+ * testsuite/22_locale/num_put/put/char/1.cc: Tweak comment.
+ * testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
+
+2007-04-11 Zack Weinberg <zackw@panix.com>
+
+ * include/std/iosfwd: Do not include <bits/c++locale.h> and
+ <bits/functexcept.h>.
+
+2007-04-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/pb_ds/detail/resize_policy/
+ cc_hash_max_collision_check_resize_trigger_imp.hpp: Qualify
+ namespace std members.
+ * include/ext/pb_ds/detail/list_update_policy/
+ counter_lu_metadata.hpp: Same.
+ * include/ext/throw_allocator.h: Same.
+ * include/ext/pod_char_traits.h: Same.
+ * include/ext/malloc_allocator.h: Same.
+ * libsupc++/del_op.cc: Same, simplify.
+
+ * include/bits/c++config: Adjust macro name.
+
+ * include/c_global/cstring: Alphabetize.
+ * include/c_global/cwctype: Same.
+
+2007-04-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/cmath: Include <bits/stl_algobase.h> instead of
+ the whole <algorithm>.
+
+2007-04-10 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/type_traits (__is_function_helper): New, uses
+ variadic templates.
+ (is_function): Forward to the latter.
+ * testsuite/tr1/4_metaprogramming/primary_type_categories/
+ is_function/is_function.cc: Add test.
+
+2007-04-10 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28277 (partial: vstring bits)
+ * include/bits/ostream_insert.h: New.
+ * include/Makefile.am: Add.
+ * include/ext/vstring.h (operator<<(basic_ostream<>&,
+ const __versa_string<>&): Forward to __ostream_insert.
+ * include/bits/basic_string.h (operator<<(basic_ostream<>&,
+ const string<>&)): Likewise.
+ * include/std/ostream (operator<<(basic_ostream<>&, _CharT),
+ operator<<(basic_ostream<char,>&, char), operator<<(basic_ostream<>&,
+ const _CharT*), operator<<(basic_ostream<char,>&, const char*)):
+ Likewise.
+ * include/ext/vstring.tcc (operator<<(basic_ostream<>&,
+ const __versa_string<>&)): Remove.
+ (class basic_ostream): Remove friend declarations.
+ (basic_ostream<>::_M_write(char_type, streamsize),
+ _M_insert(const char_type*, streamsize)): Remove.
+ * include/bits/ostream.tcc (_M_insert(const char_type*, streamsize)):
+ Remove definition.
+ (operator<<(basic_ostream<>&, const char*)): Use __ostream_insert.
+ * config/abi/pre/gnu.ver: Adjust.
+ * src/ostream-inst.cc: Add __ostream_insert instantiations.
+ * include/bits/locale_facets.h (__pad<>::_S_pad): Remove __num
+ parameter.
+ * include/bits/locale_facets.tcc (__pad<>::_S_pad): Adjust.
+ (num_put<>::_M_pad(_CharT, streamsize, ios_base&, _CharT*,
+ const _CharT*, int&)): Likewise.
+ * include/Makefile.in: Rebuild.
+ * testsuite/ext/vstring/inserters_extractors/char/28277.cc: New.
+ * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: New.
+
+ * include/ext/vstring_util.h: Do not include the whole <locale>.
+ * include/ext/vstring.tcc (operator>>(basic_istream<>&,
+ __versa_string<>&, getline(basic_istream<>&, __versa_string<>&,
+ _CharT)): Tweak to refer to ios_base as a base of istream; do not
+ refer to non-standard types of istream.
+ * include/bits/istream.tcc (operator>>(basic_istream<>&, _CharT*),
+ ws(basic_istream<>&)): Do not refer to non-standard types of istream.
+ * include/std/bitset (operator>>(std::basic_istream<>&, bitset<>&)):
+ Avoid using basic_streambuf<>*.
+
+ * include/bits/istream.tcc (operator>>(basic_istream<>&,
+ basic_string<>&), getline(basic_istream<>&, basic_string<>&, _CharT)):
+ Move...
+ * include/bits/basic_string.tcc: ... here; tweak to refer to ios_base
+ as a base of istream; do not refer to non-standard types of istream.
+ * include/std/string: Tweak includes.
+
+ * include/ext/type_traits.h (__is_null_pointer): Add.
+ * include/ext/rc_string_base.h: Use it.
+ * include/ext/sso_string_base.h: Likewise.
+ * include/bits/basic_string.tcc (__is_null_pointer): Remove, use
+ the above.
+ * include/ext/vstring_util.h (__vstring_utility<>::_S_is_null_pointer):
+ Remove.
+
+2007-04-09 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/type_traits_fwd.h (__is_union_or_class): Remove.
+ * include/tr1/type_traits (struct __in_array,
+ struct __is_union_or_class, struct __is_union_or_class_helper,
+ struct __is_empty_helper, struct __is_polymorphic_helper):
+ Remove.
+ (struct is_enum): Use __is_enum.
+ (struct is_union): Use __is_union.
+ (struct is_class): Use __is_class.
+ (struct is_function): Adjust.
+ (struct is_empty): Use __is_empty.
+ (struct is_polymorphic): Use __is_polymorphic.
+ (struct is_abstract): Use __is_abstract.
+ (struct has_virtual_destructor): Use __has_virtual_destructor.
+ (struct __is_base_of_helper): Use __is_base_of.
+ * testsuite/tr1/4_metaprogramming/composite_type_traits/
+ is_union_or_class/typedefs.cc: Remove.
+ * testsuite/tr1/4_metaprogramming/composite_type_traits/
+ is_union_or_class/is_union_or_class.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/primary_type_categories/
+ is_class/typedefs.cc: New.
+ * testsuite/tr1/4_metaprogramming/primary_type_categories/
+ is_class/is_class.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/primary_type_categories/
+ is_union/typedefs.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/primary_type_categories/
+ is_union/is_union.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ has_virtual_destructor/typedefs.cc: Likewise.
+ * testsuite/tr1/4_metaprogramming/type_properties/
+ has_virtual_destructor/has_virtual_destructor.cc: Likewise.
+ * testsuite/util/testsuite_tr1.h (class VirtualDestructorClass): Add.
+ * testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/
+ is_polymorphic.cc: Add test.
+
+2007-04-08 Alexey Beshenov <bav.272304@gmail.com>
+
+ PR libstdc++/31511
+ * include/c_global/cmath.tcc (__cmath_power): Use _Tp(1).
+ * include/c_std/cmath.tcc (__cmath_power): Likewise.
+
+2007-04-06 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31117
+ * config/locale/gnu/c_locale.cc (__convert_to_v): Do not use errno,
+ just check that the value is finite.
+ * config/locale/generic/c_locale.cc (__convert_to_v): Likewise.
+
+2007-04-06 Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/type_traits.h (__numeric_traits): Move...
+ * include/ext/numeric_traits.h: ... here.
+ * include/Makefile.am: Add.
+ * include/ext/pb_ds/detail/type_utils.hpp: Include
+ <ext/numeric_traits.h> too.
+ * include/tr1/random: Likewise.
+ * testsuite/ext/type_traits/numeric_traits.cc: Move...
+ * testsuite/ext/numeric_traits/numeric_traits.cc: ... here.
+ * include/Makefile.in: Regenerate.
+
+2007-04-04 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/valarray_array.h (__valarray_default_construct(_Tp*,
+ _Tp*)): Use __is_scalar instead of __is_pod.
+
+2007-04-03 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (__copy_aux(_II, _II, _OI),
+ __copy_backward_aux(_BI1, _BI1, _BI2)): Use __is_pod.
+ * include/bits/stl_deque.h (deque<>::_M_destroy_data(iterator,
+ iterator, const std::allocator<>&)): Use __has_trivial_constructor.
+ (deque<>::_M_destroy_data_dispatch): Remove.
+ * include/bits/stl_uninitialized.h (uninitialized_copy(_InputIterator,
+ _InputIterator, _ForwardIterator), uninitialized_fill(_ForwardIterator,
+ _ForwardIterator, const _Tp&), uninitialized_fill_n(_ForwardIterator,
+ _Size, const _Tp&)): Use __is_pod.
+ * include/bits/stl_tempbuf.h (_Temporary_buffer::
+ _Temporary_buffer(_ForwardIterator, _ForwardIterator)): Use __is_pod.
+ (_Temporary_buffer::_M_initialize_buffer): Remove.
+ * include/bits/stl_construct.h (_Destroy(_ForwardIterator,
+ _ForwardIterator)): Use __has_trivial_destructor.
+ (__destroy_aux): Remove.
+
+2007-04-03 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_map.h (map<>::insert(iterator, const value_type&):
+ Uglify parameter.
+
+2007-04-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31440
+ * include/bits/stl_tree.h (_M_lower_bound(_Link_type, _Link_type,
+ const _Key&), _M_upper_bound(_Link_type, _Link_type, const _Key&)):
+ Add.
+ (_M_equal_range(const _Key&) const): Remove.
+ (lower_bound(const key_type&), lower_bound(const key_type&) const,
+ upper_bound(const key_type&), upper_bound(const key_type&) const,
+ equal_range(const key_type&), equal_range(const key_type&) const):
+ Adjust.
+ (find(const _Key&), find(const _Key&) const): Tweak.
+ * testsuite/23_containers/map/operations/31440.cc: New.
+
+2007-04-02 Matthew Levine <gcc@severeweblint.org>
+ Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31370
+ * include/bits/stl_bvector.h (vector<bool>::max_size): Fix.
+ (vector<bool>::_M_check_len): Add.
+ * include/bits/vector.tcc (_M_fill_insert(iterator, size_type, bool),
+ _M_insert_range(iterator, _ForwardIterator, _ForwardIterator,
+ std::forward_iterator_tag), _M_insert_aux(iterator, bool)): Use it.
+ * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: New.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Adjust.
+
+ * include/bits/stl_vector.h (vector<>::_M_check_len): Add.
+ * include/bits/vector.tcc (_M_insert_aux(iterator, const _Tp&),
+ _M_fill_insert(iterator, size_type, const value_type&),
+ _M_range_insert(iterator, _ForwardIterator, _ForwardIterator,
+ std::forward_iterator_tag)): Use it.
+
+2007-04-02 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31401 (vstring bits)
+ * include/ext/vstring.tcc (find(const _CharT*, size_type,
+ size_type)): Avoid unsigned overflow.
+
+2007-04-02 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_put<>::do_put(iter_type,
+ ios_base&, char_type, const void*)): Fix for sizeof(const void*)
+ > sizeof(unsigned long).
+
+2007-04-01 Andreas Tobler <a.tobler@schweiz.org>
+
+ * include/tr1/poly_laguerre.tcc: Missing s/__alpha/__alpha1, line 278.
+
+2007-04-01 Richard Henderson <rth@redhat.com>
+
+ * include/tr1/poly_laguerre.tcc: s/__alpha/__alpha1/g.
+ * include/tr1/ell_integral.tcc: Likewise.
+
+2007-03-31 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_bvector.h (_M_fill_insert(iterator, size_type,
+ bool), _M_insert_range(iterator, _ForwardIterator, _ForwardIterator,
+ std::forward_iterator_tag), _M_insert_aux(iterator, bool)): Move
+ out of line...
+ * include/bits/vector.tcc: ... here.
+
+2007-03-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/26099
+ * include/bits/cpp_type_traits.h (struct __is_pod, struct __is_empty):
+ Remove.
+ * include/bits/valarray_array.h: Adjust.
+ * include/bits/allocator.h: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+
+2007-03-30 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31401
+ * include/bits/basic_string.tcc (find(const _CharT*, size_type,
+ size_type)): Avoid unsigned overflow.
+ * testsuite/21_strings/basic_string/find/char/4.cc: New.
+ * testsuite/21_strings/basic_string/find/wchar_t/4.cc: Likewise.
+
+2007-03-27 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/fstream.tcc (basic_filebuf<>::underflow):
+ Don't call codecvt::in at all if _M_ext_next >= _M_ext_end.
+ * testsuite/27_io/basic_filebuf/underflow/char/3.cc: New.
+
+2007-03-26 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c_compatibility/complex.h: Without
+ __GXX_EXPERIMENTAL_CXX0X__ include_next complex.h.
+ * include/c_compatibility/fenv.h: Same.
+ * include/c_compatibility/inttypes.h: Same.
+ * include/c_compatibility/stdbool.h: Same.
+ * include/c_compatibility/stdint.h: Same.
+ * include/c_compatibility/tgmath.h: Same.
+
+ * include/tr1/cinttypes: Use include_next.
+ * include/tr1/cstdint: Same.
+ * include/tr1/cstdbool: Same.
+
+ * acinclude.m4 (GLIBCXX_ENABLE_C99): Add check for tgmath.h
+ * configure: Regenerate.
+ * config.h.in: Same.
+
+2007-03-25 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/functional: Formatting fixes.
+
+2007-03-23 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc:
+ Likewise use std::numeric_limits<>::max().
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc:
+ Minor tweaks.
+
+2007-03-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
+ (test02): Use std::numeric_limits<>::max() to get suitable large
+ values.
+
+2007-03-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/21_strings/headers/cstdlib/functions_std.cc: Without
+ C99 support, _GLIBCXX_USE_WCHAR_T not defined, so
+ dg-require-c-std.
+ * testsuite/tr1/6_containers/headers/functional/synopsis.cc: Same.
+ * testsuite/27_io/headers/iostream/synopsis.cc: Same.
+ * testsuite/27_io/headers/streambuf/types_std.cc: Same.
+ * testsuite/27_io/headers/sstream/types_std.cc: Same.
+ * testsuite/27_io/headers/ostream/types_std.cc: Same.
+ * testsuite/27_io/headers/istream/types_std.cc: Same.
+ * testsuite/27_io/headers/iostream/types_std.cc: Same.
+ * testsuite/27_io/headers/fstream/types_std.cc: Same.
+ * testsuite/21_strings/headers/string/types_std.cc: Same.
+ * testsuite/21_strings/headers/cwctype/functions_std.cc: Same.
+ * testsuite/21_strings/headers/cwctype/types_std.cc: Same.
+ * testsuite/21_strings/headers/cwchar/functions_std.cc: Same.
+ * testsuite/21_strings/headers/cwchar/types_std.cc: Same.
+
+ * include/Makefile.am (c_compatibility_headers): Add fenv.h.
+ * include/Makefile.in: Regenerate.
+ * configure.host: Update comment.
+
+ * include/tr1/cfenv: Use include_next.
+
+2007-03-19 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/tuple (get(_Tuple_impl<>&, get(const _Tuple_impl<>&):
+ Rename as __get_helper.
+ (get(tuple<>&, get(const tuple<>&)): Forward to the latter.
+
+2007-03-19 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/doxygen/user.cfg.in: Update for new includes, macros.
+
+2007-03-18 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/array_type_info.cc: Likewise.
+ * libsupc++/bad_cast.cc: Likewise.
+ * libsupc++/bad_typeid.cc: Likewise.
+ * libsupc++/class_type_info.cc: Likewise.
+ * libsupc++/dyncast.cc: Likewise.
+ * libsupc++/enum_type_info.cc: Likewise.
+ * libsupc++/function_type_info.cc: Likewise.
+ * libsupc++/fundamental_type_info.cc: Likewise.
+ * libsupc++/pbase_type_info.cc: Likewise.
+ * libsupc++/pmem_type_info.cc: Likewise.
+ * libsupc++/pointer_type_info.cc: Likewise.
+ * libsupc++/si_class_type_info.cc: Likewise.
+ * libsupc++/vmi_class_type_info.cc: Likewise.
+ * libsupc++/tinfo.h: Move inline type_info functions here.
+ * libsupc++/tinfo.cc: Separate type_info classes into their own
+ files.
+ * libsupc++/tinfo2.cc: Likewise.
+ * Makefile.am (sources): Mention new files.
+ * Makefile.in: Regenerated.
+
+2007-03-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/headers/cinttypes/types_std_c++0x.cc: Use
+ -std=gnu++0x instead of -std=c++0x for testing.
+ * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/cfenv/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc: Same.
+ * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Same.
+ * testsuite/17_intro/headers/c++200x/all.cc: Same.
+ * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Same.
+ * testsuite/23_containers/hash/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_map/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/tuple/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_set/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/headers/tuple/types_std_c++0x.cc: Same.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/array/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/enable_shared_from_this/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/headers/functional/types_std_c++0x.cc: Same.
+ * testsuite/20_util/headers/functional/
+ using_namespace_std_placeholders.cc: Same.
+ * testsuite/20_util/headers/type_traits/types_std_c++0x.cc: Same.
+ * testsuite/20_util/headers/memory/types_std_c++0x.cc: Same.
+ * testsuite/20_util/shared_ptr/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/weak_ptr/requirements/
+ explicit_instantiation.cc: Same.
+
+2007-03-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/lib/dg-options.exp (dg-require-c-std): New.
+ * testsuite/lib/libstdc++.exp (check_v3_target_c_std): New. Check to
+ see if _GLIBCXX_USE_C99_MATH is active.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/check_nan.cc: Use dg-require-c-std.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 17_hyperg/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 13_ellint_2/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 16_hermite/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 12_ellint_1/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 18_laguerre/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 14_ellint_3/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 19_legendre/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 03_beta/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 15_expint/check_nan.cc: Same.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/check_nan.cc: Same.
+
+ * include/tr1/poly_laguerre.tcc (__poly_laguerre): Don't check if
+ unsigned int can be a NaN.
+
+2007-03-16 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+
+ * docs/html/ext/tr1.html : Marked tr1 math special functions done.
+ * docs/html/faq/index.html : Ditto.
+ * include/Makefile.in : Added new special function header files.
+ * include/Makefile.am : Ditto.
+ * include/tr1/common.h : Added type promotion routines for three
+ and four args.
+
+ * include/tr1/special_function_util.h: New.
+ * include/tr1/bessel_function.tcc: New.
+ * include/tr1/beta_function.tcc: New.
+ * include/tr1/ell_integral.tcc: New.
+ * include/tr1/exp_integral.tcc: New.
+ * include/tr1/gamma.tcc: New.
+ * include/tr1/hypergeometric.tcc: New.
+ * include/tr1/legendre_function.tcc: New.
+ * include/tr1/modified_bessel_func.tcc: New.
+ * include/tr1/poly_hermite.tcc: New.
+ * include/tr1/poly_laguerre.tcc: New.
+ * include/tr1/riemann_zeta.tcc: New.
+ * include/tr1/cmath : Included tr1 math special functions.
+ * include/tr1/math.h : Ditto.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ testcase.h: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 01_assoc_laguerre/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 02_assoc_legendre/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/03_beta/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 04_comp_ellint_1/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 05_comp_ellint_2/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 06_comp_ellint_3/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 07_conf_hyperg/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 08_cyl_bessel_i/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 09_cyl_bessel_j/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 10_cyl_bessel_k/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 11_cyl_neumann/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ check_value_neg.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
+ check_value_pos.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
+ compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
+ check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
+ check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/
+ compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_value_neg.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 20_riemann_zeta/check_value_pos.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 21_sph_bessel/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 22_sph_legendre/compile_2.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/compile.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/check_nan.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/check_value.cc: New.
+ * testsuite/tr1/5_numerical_facilities/special_functions/
+ 23_sph_neumann/ compile_2.cc: New.
+
+2007-03-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/lib/libstdc++.exp (v3-build_support) <ar>: If it
+ exists, use env(AR_FOR_TARGET). Log the command.
+ <ranlib>: Similar.
+
+2007-03-14 Nathan Sidwell <nathan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>::
+
+ * testsuite/lib/libstdc++.exp (check_v3_target_fileio,
+ check_v3_target_time): New.
+ * testsuite/lib/dg-options.exp (dg-require-fileio,
+ dg-require-time): New.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: Use it.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: Use it.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: Use it.
+ * testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: Use it.
+ * testsuite/ext/stdio_sync_filebuf/char/1.cc: Use it.
+ * testsuite/ext/stdio_filebuf/char/2.cc: Use it.
+ * testsuite/ext/stdio_filebuf/char/10063-1.cc: Use it.
+ * testsuite/ext/stdio_filebuf/char/10063-2.cc: Use it.
+ * testsuite/ext/stdio_filebuf/char/10063-3.cc: Use it.
+ * testsuite/22_locale/time_put/put/char/12439_1.cc: Use it.
+ * testsuite/22_locale/time_put/put/char/12439_3.cc: Use it.
+ * testsuite/27_io/basic_ofstream/open/char/1.cc: Use it.
+ * testsuite/27_io/basic_ofstream/cons/char/2.cc: Use it.
+ * testsuite/27_io/objects/char/12048-2.cc: Use it.
+ * testsuite/27_io/objects/char/12048-4.cc: Use it.
+ * testsuite/27_io/objects/char/12048-1.cc: Use it.
+ * testsuite/27_io/objects/char/12048-3.cc: Use it.
+ * testsuite/27_io/objects/char/10.cc: Use it.
+ * testsuite/27_io/objects/char/12048-5.cc: Use it.
+ * testsuite/27_io/basic_istream/get/char/2.cc: Use it.
+ * testsuite/27_io/basic_istream/ignore/char/2.cc: Use it.
+ * testsuite/27_io/basic_istream/ignore/char/3.cc: Use it.
+ * testsuite/27_io/basic_istream/getline/char/5.cc: Use it.
+ * testsuite/27_io/basic_istream/seekg/char/sstream.cc: Use it.
+ * testsuite/27_io/basic_istream/seekg/char/fstream.cc: Use it.
+ * testsuite/27_io/basic_istream/readsome/char/6746-2.cc: Use it.
+ * testsuite/27_io/basic_istream/extractors_other/char/2.cc: Use it.
+ * testsuite/27_io/basic_istream/tellg/char/sstream.cc: Use it.
+ * testsuite/27_io/basic_istream/tellg/char/1.cc: Use it.
+ * testsuite/27_io/basic_istream/tellg/char/fstream.cc: Use it.
+ * testsuite/27_io/basic_istream/extractors_character/char/4.cc: Use it.
+ * testsuite/27_io/basic_ostream/inserters_other/char/1.cc: Use it.
+ * testsuite/27_io/basic_ostream/tellp/char/1.cc: Use it.
+ * testsuite/27_io/basic_ostream/seekp/char/2346-fstream.cc: Use it.
+ * testsuite/27_io/basic_ifstream/open/char/1.cc: Use it.
+ * testsuite/27_io/basic_ifstream/cons/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetn/char/3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/12790-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/12790-3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/12790-4.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/11543.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc: Use it.
+ * testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/in_avail/char/9701-3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/setbuf/char/2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/setbuf/char/3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/setbuf/char/12875-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/setbuf/char/12875-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc: Use it.
+ * testsuite/27_io/basic_filebuf/is_open/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/open/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/open/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/open/char/2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/open/char/3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc: Use it.
+ * testsuite/27_io/basic_filebuf/overflow/char/2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/overflow/char/9988.cc: Use it.
+ * testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/overflow/char/9169.cc: Use it.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/12790-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/12790-3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/12790-4.cc: Use it.
+ * testsuite/27_io/basic_filebuf/close/char/4.cc: Use it.
+ * testsuite/27_io/basic_filebuf/underflow/10096.cc: Use it.
+ * testsuite/27_io/basic_filebuf/underflow/char/2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/12790-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/12790-3.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sputn/char/9339.cc: Use it.
+ * testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc: Use it.
+ * testsuite/27_io/basic_filebuf/sync/char/9182-1.cc: Use it.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/10.cc: Use it.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/11.cc: Use it.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/5.cc: Use it.
+
+2007-03-13 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/tuple: Only include <utility> for std::pair, and
+ forward declare reference_wrapper; formatting fixes.
+ * include/tr1/ref_fwd.h: Remove.
+ * include/tr1/tuple_defs.h: Remove, unused.
+ * include/Makefile.am: Update.
+ * include/Makefile.in: Regenerate.
+ * testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
+ Include <tr1/functional> too.
+
+ * include/tr1/tuple: Define tuple_size<tuple<_Elements...> >::value.
+
+2007-03-12 Stephen M. Webb <stephen.webb@bregmasoft.com>
+
+ * include/tr1/regex: Add "boilerplate" implementations.
+ * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/
+ translate_nocase.cc: New.
+ * testsuite/tr1/7_regular_expressions/regex_traits/wchar_t/
+ ctor.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex_traits/char/
+ translate_nocase.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex_traits/char/
+ ctor.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_ecma.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ default.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_grep.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_extended.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_basic.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_awk.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/regex/cons/char/
+ c_string_egrep.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ string_op.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ string.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ pstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ cstring_op.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ cstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ string_op.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ string.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ pstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ cstring_op.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ cstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ default.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ string.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ pstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ cstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ default.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ string.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ pstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ cstring.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/match_results/ctors/char/
+ default.cc: Likewise.
+
+2007-03-12 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algo.h (swap_ranges): Move...
+ * include/bits/stl_algobase.h: ... here.
+ * include/tr1/array: Trim includes, stl_algobase.h is enough.
+
+2007-03-11 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (final)
+ * include/std/iosfwd: Do not include <bits/c++io.h>.
+ * config/io/basic_file_stdio.h: Do it here.
+ * include/ext/stdio_sync_filebuf.h: Likewise.
+ * include/ext/rope: Include <bits/gthr.h> unconditionally.
+ * include/std/fstream: Do not include <bits/gthr.h>.
+
+ * include/std/ios: Do not include <cstdio>.
+ * include/bits/ios_base.h: Do it here.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error
+ line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
+
+2007-03-10 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/std/memory: Move C++03 implementation...
+ * include/bits/stl_memory.h: ... here, new.
+ * include/Makefile.am: Add.
+ * include/bits/stl_tempbuf.h: Include the latter instead.
+ * include/tr1/hashtable: Include allocator.h instead of
+ the whole <memory>.
+ * include/tr1/hashtable_policy.h: Include stl_function.h
+ instead of <functional>.
+ * include/Makefile.in: Regenerate.
+ * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust dg-error
+ line numbers.
+
+2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
+
+ * include/Makefile.in: Regenerate.
+ * include/tr1/mu_iterate.h: Remove.
+ * include/tr1/tuple (_Tuple_impl): New.
+ (tuple): Make variadic, re-implement as shell over _Tuple_impl.
+ (0-element tuple): Basis case.
+ (2-element tuple): Handle pair methods.
+ (__get_helper): Remove.
+ (tuple_element): Reimplement with variadic templates.
+ (tuple_size): Ditto.
+ (get): Ditto.
+ (operator==): Use variadic templates in the signature.
+ (operator<): Ditto.
+ (operator!=): Ditto.
+ (operator>): Ditto.
+ (operator<=): Ditto.
+ (operator>=): Ditto.
+ (__stripped_tuple_type): Remove; we've inlined its behavior.
+ (make_tuple): Reimplement with variadic templates.
+ (tie): Ditto.
+ * include/tr1/tuple_iterate.h: Remove.
+ * include/tr1/bind_repeat.h: Remove.
+ * include/tr1/ref_wrap_iterate.h: Remove.
+ * include/tr1/bind_iterate.h: Remove.
+ * include/tr1/functional (_Weak_result_type): Add variadic
+ partial specializations.
+ (result_of): Ditto.
+ (__invoke): Reimplement using variadic templates.
+ (reference_wrapper): Reimplement operator() with variadic
+ templates.
+ (_Maybe_unary_or_binary_function): New.
+ (_Mem_fn): Implement for member function pointers using variadic
+ templates.
+ (placeholders): Define 30 placeholders.
+ (_Index_tuple): New.
+ (_Build_index_tuple): New.
+ (_No_tuple_element): New.
+ (_Safe_tuple_element_impl): New.
+ (_Safe_tuple_element): New.
+ (_Mu): Reimplement with variadic templates, use
+ _Safe_tuple_element instead of tuple_element.
+ (_Bind): Reimplement with variadic templates and tuples.
+ (_Bind_result): Ditto.
+ (bind): Reimplement with variadic templates.
+ (_Function_handler): Ditto.
+ (function): Ditto.
+ * include/tr1/functional_iterate.h: Remove.
+ * include/tr1/repeat.h: Remove.
+ * include/Makefile.am: Don't install removed headers.
+
+2007-03-06 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/bits/stl_algobase.h: Do not include <cstdlib>.
+ * src/localename.cc: Do it here.
+ * src/ctype.cc: Likewise.
+ * include/ext/pb_ds/detail/map_debug_base.hpp: Likewise.
+ * include/ext/pb_ds/exception.hpp: Likewise.
+ * include/ext/pb_ds/list_update_policy.hpp: Likewise.
+ * include/bits/stl_algo.h: Likewise.
+ * include/tr1/random: Likewise.
+ * testsuite/util/testsuite_hooks.cc: Likewise.
+ * testsuite/util/testsuite_abi_check.cc: Likewise.
+ * testsuite/util/testsuite_abi.cc: Likewise.
+ * testsuite/util/performance/assoc/timing/
+ tree_order_statistics_test.hpp: Likewise.
+ * config/locale/darwin/ctype_members.cc: Likewise.
+ * config/locale/gnu/c++locale_internal.h: Likewise.
+ * config/locale/generic/ctype_members.cc: Likewise.
+ * config/locale/generic/time_members.cc: Likewise.
+
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_load_check_resize_trigger_imp.hpp: Qualify abort.
+ * testsuite/util/performance/assoc/timing/
+ multimap_find_test.hpp: Likewise.
+ * include/std/valarray: Do include <cstdlib>.
+ * include/tr1/hashtable: Likewise.
+
+2007-03-05 Joseph Myers <joseph@codesourcery.com>
+
+ PR libstdc++/30675
+ * testsuite/lib/libstdc++.exp (v3-build_support): Use [transform
+ "ar"] and [transform "ranlib"].
+
+2007-03-04 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/
+ char/31031.cc: Include the right header.
+
+2007-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Add c_global.
+ * configure.host (c_model): Set default to c_global.
+ * configure: Regenerate.
+ * include/Makefile.am (c_compatibility_headers_extra): Make
+ conditional on GLIBCXX_C_HEADERS_COMPATIBILITY.
+ (c_base_headers_extra): Make conditional on GLIBCXX_C_HEADERS_EXTRA.
+ (c_compatibility_headers): Make conditional on c/c_std/c_global.
+ * include/Makefile.in: Regenerate.
+ * docs/html/configopts.html: Add c_global information to
+ --enable-cheaders. Eventually, "c_std" should mean "C" includes
+ that are in namespace std, with optional C++ "C" compatibility
+ includes to inject into global scope. And "c_global" should mean
+ "C" includes that are in the global namespace, with C++ includes
+ injecting into namespace std and no C++ "C" compatibility
+ includes.
+
+2007-03-04 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config: Add _GLIBCXX_NAMEPACE_C.
+ Add _GLIBCXX_NAMESPACE_ASSOCIATION_CXX200x.
+ Add _GLIBCXX_TR1 as namespace macro.
+ Add namespace associations for std::__cxx200x conditionally.
+
+ * include/c_compatibility/assert.h: Correct doxygen markup,
+ conditionalize the global injections on _GLIBCXX_NAMESPACE_C.
+ * include/c_compatibility/ctype.h: Same.
+ * include/c_compatibility/errno.h: Same.
+ * include/c_compatibility/float.h: Same.
+ * include/c_compatibility/iso646.h: Same.
+ * include/c_compatibility/limits.h: Same.
+ * include/c_compatibility/locale.h: Same.
+ * include/c_compatibility/math.h: Same.
+ * include/c_compatibility/setjmp.h: Same.
+ * include/c_compatibility/signal.h: Same.
+ * include/c_compatibility/stdarg.h: Same.
+ * include/c_compatibility/stddef.h: Same.
+ * include/c_compatibility/stdio.h: Same.
+ * include/c_compatibility/stdlib.h: Same.
+ * include/c_compatibility/string.h: Same.
+ * include/c_compatibility/time.h: Same.
+ * include/c_compatibility/wchar.h: Same.
+ * include/c_compatibility/wctype.h: Same.
+
+ * include/c_compatibility/complex.h: Add.
+ * include/c_compatibility/fenv.h: Same.
+ * include/c_compatibility/inttypes.h: Same.
+ * include/c_compatibility/stdbool.h: Same.
+ * include/c_compatibility/stdint.h: Same.
+ * include/c_compatibility/tgmath.h: Same.
+
+ * include/c_global/cassert: Add, use include_next, use C++0x features
+ if -std=c++0x.
+ * include/c_global/cctype: Same.
+ * include/c_global/cerrno: Same.
+ * include/c_global/cfloat: Same.
+ * include/c_global/ciso646: Same.
+ * include/c_global/climits: Same.
+ * include/c_global/clocale: Same.
+ * include/c_global/cmath: Same.
+ * include/c_global/cmath.tcc: Same.
+ * include/c_global/csetjmp: Same.
+ * include/c_global/csignal: Same.
+ * include/c_global/cstdarg: Same.
+ * include/c_global/cstddef: Same.
+ * include/c_global/cstdio: Same.
+ * include/c_global/cstdlib: Same.
+ * include/c_global/cstring: Same.
+ * include/c_global/ctime: Same.
+ * include/c_global/cwchar: Same.
+ * include/c_global/cwctype: Same.
+
+ * include/c_global/ccomplex: Add.
+ * include/c_global/cfenv: Add.
+ * include/c_global/cinttypes: Add.
+ * include/c_global/cstdbool: Add.
+ * include/c_global/cstdint: Add.
+ * include/c_global/ctgmath: Add.
+
+ * include/std/algorithm: Use C++0x features if -std=c++0x.
+ * include/std/bitset: Same.
+ * include/std/complex: Same.
+ * include/std/deque: Same.
+ * include/std/fstream: Same.
+ * include/std/functional: Same.
+ * include/std/iomanip: Same.
+ * include/std/ios: Same.
+ * include/std/iosfwd: Same.
+ * include/std/iostream: Same.
+ * include/std/istream: Same.
+ * include/std/iterator: Same.
+ * include/std/limits: Same.
+ * include/std/list: Same.
+ * include/std/locale: Same.
+ * include/std/map: Same.
+ * include/std/memory: Same.
+ * include/std/numeric: Same.
+ * include/std/ostream: Same.
+ * include/std/queue: Same.
+ * include/std/set: Same.
+ * include/std/sstream: Same.
+ * include/std/stack: Same.
+ * include/std/stdexcept: Same.
+ * include/std/streambuf: Same.
+ * include/std/string: Same.
+ * include/std/utility: Same.
+ * include/std/valarray: Same.
+ * include/std/vector: Same.
+
+ * include/std/array: Add.
+ * include/std/random: Add.
+ * include/std/regex: Add.
+ * include/std/tuple: Add.
+ * include/std/type_traits: Add.
+ * include/std/unordered_map: Add.
+ * include/std/unordered_set: Add.
+ * include/std/c++0x_warning.h: Add.
+
+ * include/tr1/array: Switch namespaces based on _GLIBCXX_TR1.
+ * include/tr1/boost_shared_ptr.h: Same.
+ * include/tr1/cctype: Same.
+ * include/tr1/cfenv: Same.
+ * include/tr1/cinttypes: Same.
+ * include/tr1/cmath: Same.
+ * include/tr1/common.h: Same.
+ * include/tr1/complex: Same.
+ * include/tr1/cstdint: Same.
+ * include/tr1/cstdio: Same.
+ * include/tr1/cstdlib: Same.
+ * include/tr1/cwchar: Same.
+ * include/tr1/cwctype: Same.
+ * include/tr1/functional: Same.
+ * include/tr1/functional_hash.h: Same.
+ * include/tr1/functional_iterate.h: Same.
+ * include/tr1/hashtable: Same.
+ * include/tr1/hashtable_policy.h: Same.
+ * include/tr1/math.h: Same.
+ * include/tr1/memory: Same.
+ * include/tr1/random: Same.
+ * include/tr1/random.tcc: Same.
+ * include/tr1/ref_fwd.h: Same.
+ * include/tr1/repeat.h: Same.
+ * include/tr1/stdlib.h: Same.
+ * include/tr1/tuple: Same.
+ * include/tr1/tuple_iterate.h: Same.
+ * include/tr1/type_traits: Same.
+ * include/tr1/type_traits_fwd.h: Same.
+ * include/tr1/unordered_map: Same.
+ * include/tr1/unordered_set: Same.
+ * include/tr1/utility: Same.
+
+ * include/tr1/ccomplex: Add.
+ * include/tr1/complex.h: Add.
+ * include/tr1/regex: Add.
+
+ * include/Makefile.am: Add C++0x headers, "C" compatibility headers.
+ * include/Makefile.in: Regenerate.
+
+ * testsuite/tr1/headers.cc: Add in regex/complex.
+
+ * testsuite/17_intro/headers/c++200x/all.cc: New.
+ * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Same.
+ * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Same.
+ * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Same.
+ * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc: Same.
+ * testsuite/18_support/headers/cstdint/types_std_c++0x.cc: Same.
+ * testsuite/20_util/enable_shared_from_this/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/headers/functional/types_std_c++0x.cc: Same.
+ * testsuite/20_util/headers/functional/
+ using_namespace_std_placeholders.cc: Same.
+ * testsuite/20_util/headers/memory/types_std_c++0x.cc: Same.
+ * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc: Same.
+ * testsuite/20_util/headers/type_traits/types_std_c++0x.cc: Same.
+ * testsuite/20_util/shared_ptr/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/20_util/weak_ptr/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/array/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/hash/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/headers/array/std_c++0x_neg.cc: Same.
+ * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc: Same.
+ * testsuite/23_containers/headers/tuple/types_std_c++0x.cc: Same.
+ * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc: Same.
+ * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc: Same.
+ * testsuite/23_containers/tuple/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_map/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_multimap/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_multiset/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/23_containers/unordered_set/requirements/
+ explicit_instantiation.cc: Same.
+ * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Same.
+ * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc: Same.
+ * testsuite/26_numerics/headers/cfenv/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/cmath/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Same.
+ * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Same.
+ * testsuite/26_numerics/headers/random/std_c++0x_neg.cc: Same.
+ * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Same.
+ * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Same.
+ * testsuite/27_io/headers/cinttypes/types_std_c++0x.cc: Same.
+ * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Same.
+
+ * testsuite/tr1/8_c_compatibility/cfenv/types.cc: Rename ...
+ * testsuite/tr1/8_c_compatibility/cinttypes/types.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cmath/types.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cstdint/types.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cstdlib/types.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cfenv/types_std_tr1.cc: ...to this.
+ * testsuite/tr1/8_c_compatibility/cinttypes/types_std_tr1.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cmath/types_std_tr1.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cstdint/types_std_tr1.cc: Same.
+ * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Same.
+
+2007-03-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31031
+ * include/bits/istream.tcc: Inhibit implicit instantiation of
+ the _M_insert helpers.
+ * include/bits/ostream.tcc: Likewise for _M_extract.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/
+ 31031.cc: New.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/
+ 31031.cc: Likewise.
+
+2007-03-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/debug/functions.h: Use cstddef.
+
+ * testsuite/tr1/3_function_objects/headers/functional/
+ using_namespace_std_tr1_placeholders.cc: Fix include.
+
+2007-03-03 Benjamin Kosnik <bkoz@redhat.com>
+
+ * crossconfig.m4 (djgpp): Correct builtin defines to HAVE___,
+ instead of HAVE____.
+ * configure: Regenerate.
+
+2007-03-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/bits/stl_algobase.h: Do not include <iosfwd>,
+ <bits/functexcept.h> is enough; adjust __copy_aux declarations;
+ remove declaration of copy overload for istreambuf_iterator /
+ ostreambuf_iterator.
+ * src/debug.cc: Include <cstdio>.
+ * include/ext/rope: Include <iosfwd>.
+ * include/bits/char_traits.h: Include <cstdio> and <cwchar>.
+ * include/bits/stl_algo.h: Remove declaration of find overload
+ for istreambuf_iterator.
+ * include/std/queue: Clean up includes.
+ * include/std/stack: Likewise.
+ * include/std/memory: Likewise.
+ * include/std/algorithm: Likewise.
+ * include/std/vector: Likewise.
+ * include/std/deque: Likewise.
+ * include/std/list: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+ * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
+ dg-error markers.
+ * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
+ * testsuite/23_containers/set/operators/1_neg.cc: Likewise.
+ * testsuite/23_containers/map/operators/1_neg.cc: Likewise.
+ * testsuite/20_util/auto_ptr/assign_neg.cc: Likewise.
+
+ * include/ext/type_traits.h: Fix type of __max_digits10; clean up
+ includes.
+
+ * testsuite/util/testsuite_hooks.h: Do not include <cstddef>.
+ * testsuite/util/testsuite_hooks.cc: Do it here.
+
+2007-03-02 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/27_io/objects/wchar_t/9661-1.cc: Include <cstdlib>.
+ * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
+ * testsuite/27_io/objects/char/9661-1.cc: Likewise.
+ * testsuite/27_io/objects/char/7.cc: Likewise.
+ * testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/ignore/char/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Likewise.
+ * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/
+ 11.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_character/wchar_t/
+ 4.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_character/char/
+ 4.cc: Likewise.
+ * testsuite/27_io/basic_ostream/seekp/wchar_t/
+ 2346-fstream.cc: Likewise.
+ * testsuite/27_io/basic_ostream/seekp/char/
+ 2346-fstream.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/seekoff/char/26777.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/close/char/4879.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ wchar_t/10.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ wchar_t/11.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/10.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/11.cc: Likewise.
+ * testsuite/ext/pb_ds/example/trie_dna.cc: Likewise.
+ * testsuite/ext/new_allocator/deallocate_global.cc: Likewise.
+ * testsuite/ext/new_allocator/deallocate_local.cc: Likewise.
+ * testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: Likewise.
+ * testsuite/performance/27_io/ifstream_getline.cc: Likewise.
+ * testsuite/22_locale/locale/cons/4.cc: Likewise.
+ * testsuite/22_locale/locale/cons/5.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ mutex_weaktoshared.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ default_weaktoshared.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread1.cc: Likewise.
+ * testsuite/23_containers/deque/cons/assign/1.cc: Likewise.
+
+2007-03-02 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/thread/pthread1.cc: Include <pthread.h>.
+ * testsuite/thread/pthread2.cc: Likewise.
+ * testsuite/thread/pthread3.cc: Likewise.
+ * testsuite/thread/pthread4.cc: Likewise.
+ * testsuite/thread/pthread5.cc: Likewise.
+ * testsuite/thread/pthread6.cc: Likewise.
+ * testsuite/thread/pthread7-rope.cc: Likewise.
+
+2007-03-02 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/tr1/random (class random_device): Rework to use simple
+ <cstdio> input, do not include <fstream>.
+ * include/tr1/random.tcc (all inserters and extractors): Refer
+ to ios_base as base class of basic_istream or basic_ostream.
+
+2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.am: Add dummy install-pdf target.
+ * Makefile.in: Regenerate
+
+2007-03-01 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/31005
+ * include/bits/localefwd.h: Include <cctype>.
+
+2007-02-27 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/std/bitset: Do not include <ios>, <iosfwd> is enough.
+ (operator>>(std::basic_istream<>&, bitset<>&)): Tweak, refer to
+ ios_base as a base of basic_istream.
+ * include/std/iomanip: Do not include <ios>, <iosfwd> +
+ <bits/ios_base.h> is enough.
+ * include/std/iosfwd: Do not include <cctype> here...
+ * include/bits/locale_facets.h: ... do it here, when needed.
+ * include/bits/ostream.tcc: Clean up, do not include <locale> here...
+ * include/std/ostream: ... here instead.
+ * include/bits/istream.tcc: Likewise for <locale> and <ostream>...
+ * include/std/istream: ... here.
+ * include/bits/sstream.tcc: Do not include <sstream>.
+
+2007-02-27 Richard Guenther <rguenther@suse.de>
+
+ * acinclude.m4: Adjust regular expression for ld version extraction.
+ * configure: Regenerate.
+
+2007-02-26 DJ Delorie <dj@redhat.com>
+
+ * crossconfig.m4 (djgpp): Pre-detect djgpp-specific results, to
+ avoid needing to link during cross compiling.
+ * configure: Regenerated.
+
+2007-02-26 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/std/bitset: Do not include <istream> and <ostream>,
+ <ios> is enough.
+ * include/std/iomanip: Do not include the whole <istream>,
+ <ios> is enough; do not include <functional>; reformat.
+ * include/std/functional: Do not include <cstddef>.
+ * include/std/list: Do not include <bits/stl_uninitialized.h>.
+ * include/std/numeric: Do not include the whole <iterator> and
+ <bits/stl_function.h>.
+ * include/std/valarray: Do not include <numeric>.
+ * include/bits/stl_numeric.h: Include <bits/concept_check.h>.
+ * src/iostream-inst.cc: Include <istream>.
+ * include/ext/functional: Include <cstddef>.
+ * testsuite/util/testsuite_hooks.h: Do not include <locale>,
+ <ctime> is enough; qualify tm.
+ * testsuite/util/testsuite_hooks.cc: Qualify tm.
+
+2007-02-26 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.h (class ctype_byname<char>,
+ class ctype_byname<wchar_t>): Declare.
+ * src/ctype.cc (ctype_byname<wchar_t>::ctype_byname(const char*,
+ size_t), ctype_byname<wchar_t>::~ctype_byname): Define.
+ * config/locale/generic/ctype_members.cc (ctype_byname<char>::
+ ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ Likewise.
+ * config/locale/gnu/ctype_members.cc (ctype_byname<char>::
+ ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ Likewise.
+ * config/locale/darwin/ctype_members.cc (ctype_byname<char>::
+ ctype_byname(const char*, size_t), ctype_byname<char>::~ctype_byname):
+ Likewise.
+ * testsuite/22_locale/headers/locale/synopsis.cc: Remove xfail.
+
+2007-02-25 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/19_diagnostics/headers/cerrno/macros.cc: Include
+ the right header.
+ * testsuite/18_support/headers/cstdlib/macros.cc: Likewise.
+
+2007-02-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/25896
+ * include/tr1/hashtable (_Hashtable<>::erase(const key_type&)):
+ Take care of &_M_extract((*__slot)->_M_v) == &__k.
+
+ * testsuite/tr1/6_containers/unordered_map/erase/1.cc: New.
+ * testsuite/tr1/6_containers/unordered_multimap/erase/1.cc: Likewise.
+ * testsuite/tr1/6_containers/unordered_multiset/erase/1.cc: Likewise.
+ * testsuite/tr1/6_containers/unordered_set/erase/1.cc: Likewise.
+
+2007-02-23 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/27_io/ios_base/sync_with_stdio/1.cc: XFAIL for wrapped
+ targets.
+
+2007-02-23 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
+ XFAIL for Newlib targets.
+
+2007-02-22 Simon Martin <simartin@users.sourceforge.net>
+
+ * testsuite/27_io/basic_ios/cons/char/3.cc: Fixed type mismatches in
+ explicit instantiations.
+ * testsuite/27_io/basic_istream/extractors_other/pod/
+ 3983-3.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/pod/3983-1.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/sentry/pod/1.cc: Likewise.
+ * testsuite/27_io/basic_ostream/sentry/pod/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ pod/10081-in.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/pod/
+ 10081-out.cc: Likewise.
+ * testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
+
+2007-02-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/unordered_map (class __unordered_map,
+ class __unordered_multimap): New.
+ (class unordered_map, class unordered_multimap): Forward to
+ the latter.
+ * include/tr1/unordered_set: Likewise for unordered_set and
+ unordered_multiset.
+ * testsuite/tr1/6_containers/headers/unordered_set/synopsis.cc:
+ Remove xfail.
+ * testsuite/tr1/6_containers/headers/unordered_map/synopsis.cc:
+ Likewise.
+ * testsuite/tr1/6_containers/unordered_multimap/requirements/
+ explicit_instantiation.cc: Adjust.
+ * testsuite/tr1/6_containers/unordered_set/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/tr1/6_containers/unordered_map/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/tr1/6_containers/unordered_multiset/requirements/
+ explicit_instantiation.cc: Likewise.
+ * testsuite/tr1/6_containers/unordered_map/24064.cc: Likewise.
+ * testsuite/util/native_type/assoc/native_hash_set.hpp: Likewise.
+ * testsuite/util/native_type/assoc/native_hash_map.hpp: Likewise.
+
+2007-02-20 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Compile testglue
+ with -fexceptions.
+
+2007-02-20 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/tr1/functional: Split out hash bits to...
+ * include/tr1/functional_hash.h: ...here.
+ * include/Makefile.am: Add.
+ * include/tr1/unordered_set: Include the latter instead.
+ * include/tr1/unordered_map: Likewise.
+ * include/tr1/random: Do not include the whole <algorithm>,
+ stl_algobase.h is enough.
+ * include/tr1/memory: Likewise.
+ * include/Makefile.in: Regenerate.
+
+ * include/tr1/utility (get(std::pair<>&), get(const std::pair<>&)):
+ Mark inline.
+
+2007-02-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ Directory layout flattening.
+
+ Added in testsuite:
+ * 20_util/allocator
+ * 20_util/auto_ptr
+ * 20_util/function_objects
+ * 20_util/function_objects/binders
+ * 20_util/function_objects/binders/1.cc
+ * 20_util/function_objects/binders/3113.cc
+ * 20_util/function_objects/comparisons.cc
+ * 20_util/pair
+ * 20_util/raw_storage_iterator
+ * 20_util/rel_ops.cc
+ * 20_util/specialized_algorithms
+ * 20_util/specialized_algorithms/16505.cc
+ * 20_util/temporary_buffer.cc
+ * 26_numerics/numeric_arrays/slice_array
+ * 26_numerics/numeric_arrays/slice_array/array_assignment.cc
+ * 26_numerics/numeric_arrays/slice_array/requirements
+ * 26_numerics/numeric_arrays/slice_array/requirements/
+ explicit_instantiation.cc
+ * 26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc
+ * 26_numerics/numeric_arrays/valarray
+ * 26_numerics/numeric_arrays/valarray/27867.cc
+ * 26_numerics/numeric_arrays/valarray/28277.cc
+ * 26_numerics/numeric_arrays/valarray/30416.cc
+ * 26_numerics/numeric_arrays/valarray/algo.cc
+ * 26_numerics/numeric_arrays/valarray/binary_closure.cc
+ * 26_numerics/numeric_arrays/valarray/const_bracket.cc
+ * 26_numerics/numeric_arrays/valarray/dr543.cc
+ * 26_numerics/numeric_arrays/valarray/name_lookup.cc
+ * 26_numerics/numeric_arrays/valarray/operators.cc
+ * 26_numerics/numeric_arrays/valarray/requirements
+ * 26_numerics/numeric_arrays/valarray/requirements/
+ explicit_instantiation.cc
+ * 26_numerics/numeric_arrays/valarray/requirements/typedefs.cc
+ * 26_numerics/numeric_arrays/valarray/subset_assignment.cc
+ * tr1/2_general_utilities/enable_shared_from_this
+ * tr1/2_general_utilities/shared_ptr
+ * tr1/2_general_utilities/weak_ptr
+
+ Deleted in testsuite:
+ * 20_util/functional
+ * 20_util/functional/binders
+ * 20_util/functional/binders/1.cc
+ * 20_util/functional/binders/3113.cc
+ * 20_util/functional/comparisons.cc
+ * 20_util/memory
+ * 20_util/memory/16505.cc
+ * 20_util/memory/allocator
+ * 20_util/memory/allocator/10378.cc
+ * 20_util/memory/allocator/14176.cc
+ * 20_util/memory/allocator/1.cc
+ * 20_util/memory/allocator/8230.cc
+ * 20_util/memory/allocator/requirements
+ * 20_util/memory/allocator/requirements/explicit_instantiation
+ * 20_util/memory/allocator/requirements/explicit_instantiation/1.cc
+ * 20_util/memory/auto_ptr
+ * 20_util/memory/auto_ptr/1.cc
+ * 20_util/memory/auto_ptr/2.cc
+ * 20_util/memory/auto_ptr/3946.cc
+ * 20_util/memory/auto_ptr/3.cc
+ * 20_util/memory/auto_ptr/4.cc
+ * 20_util/memory/auto_ptr/5.cc
+ * 20_util/memory/auto_ptr/6.cc
+ * 20_util/memory/auto_ptr/7.cc
+ * 20_util/memory/auto_ptr/assign_neg.cc
+ * 20_util/memory/auto_ptr/requirements
+ * 20_util/memory/auto_ptr/requirements/explicit_instantiation
+ * 20_util/memory/auto_ptr/requirements/explicit_instantiation/1.cc
+ * 20_util/memory/raw_storage_iterator
+ * 20_util/memory/raw_storage_iterator/requirements
+ * 20_util/memory/raw_storage_iterator/requirements/base_classes.cc
+ * 20_util/memory/raw_storage_iterator/requirements/
+ explicit_instantiation
+ * 20_util/memory/raw_storage_iterator/requirements/
+ explicit_instantiation/1.cc
+ * 20_util/memory/raw_storage_iterator/requirements/typedefs.cc
+ * 20_util/memory/temporary_buffer.cc
+ * 20_util/utility
+ * 20_util/utility/pair
+ * 20_util/utility/pair/1.cc
+ * 20_util/utility/pair/2.cc
+ * 20_util/utility/pair/3.cc
+ * 20_util/utility/pair/4.cc
+ * 20_util/utility/pair/requirements
+ * 20_util/utility/pair/requirements/explicit_instantiation
+ * 20_util/utility/pair/requirements/explicit_instantiation/1.cc
+ * 20_util/utility/rel_ops.cc
+ * 26_numerics/numeric_arrays/27867.cc
+ * 26_numerics/numeric_arrays/28277.cc
+ * 26_numerics/numeric_arrays/30416.cc
+ * 26_numerics/numeric_arrays/binary_closure.cc
+ * 26_numerics/numeric_arrays/dr543.cc
+ * 26_numerics/numeric_arrays/slice_array_assignment.cc
+ * 26_numerics/numeric_arrays/valarray.cc
+ * 26_numerics/numeric_arrays/valarray_const_bracket.cc
+ * 26_numerics/numeric_arrays/valarray_name_lookup.cc
+ * 26_numerics/numeric_arrays/valarray_operators.cc
+ * 26_numerics/numeric_arrays/valarray_subset_assignment.cc
+ * tr1/2_general_utilities/memory
+ * tr1/2_general_utilities/memory/enable_shared_from_this
+ * tr1/2_general_utilities/memory/enable_shared_from_this/1.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared2.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared3.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/not_shared.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/requirements
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ requirements/explicit_instantiation
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ requirements/explicit_instantiation/1.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/shared.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ still_shared.cc
+ * tr1/2_general_utilities/memory/shared_ptr
+ * tr1/2_general_utilities/memory/shared_ptr/assign
+ * tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/auto_ptr_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/
+ auto_ptr_rvalue_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/dr541.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc
+ * tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/casts
+ * tr1/2_general_utilities/memory/shared_ptr/casts/1.cc
+ * tr1/2_general_utilities/memory/shared_ptr/comparison
+ * tr1/2_general_utilities/memory/shared_ptr/comparison/cmp.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons
+ * tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/copy.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/default.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/pointer.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/weak_ptr.cc
+ * tr1/2_general_utilities/memory/shared_ptr/cons/weak_ptr_expired.cc
+ * tr1/2_general_utilities/memory/shared_ptr/dest
+ * tr1/2_general_utilities/memory/shared_ptr/dest/dest.cc
+ * tr1/2_general_utilities/memory/shared_ptr/misc
+ * tr1/2_general_utilities/memory/shared_ptr/misc/24595.cc
+ * tr1/2_general_utilities/memory/shared_ptr/misc/io.cc
+ * tr1/2_general_utilities/memory/shared_ptr/misc/swap.cc
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers/24805.cc
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers/reset.cc
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers/reset_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers/swap.cc
+ * tr1/2_general_utilities/memory/shared_ptr/modifiers/swap_neg.cc
+ * tr1/2_general_utilities/memory/shared_ptr/observers
+ * tr1/2_general_utilities/memory/shared_ptr/observers/bool_conv.cc
+ * tr1/2_general_utilities/memory/shared_ptr/observers/get.cc
+ * tr1/2_general_utilities/memory/shared_ptr/observers/unique.cc
+ * tr1/2_general_utilities/memory/shared_ptr/observers/use_count.cc
+ * tr1/2_general_utilities/memory/shared_ptr/requirements
+ * tr1/2_general_utilities/memory/shared_ptr/requirements/
+ explicit_instantiation
+ * tr1/2_general_utilities/memory/shared_ptr/requirements/
+ explicit_instantiation/1.cc
+ * tr1/2_general_utilities/memory/shared_ptr/thread
+ * tr1/2_general_utilities/memory/shared_ptr/thread/
+ default_weaktoshared.cc
+ * tr1/2_general_utilities/memory/shared_ptr/thread/
+ mutex_weaktoshared.cc
+ * tr1/2_general_utilities/memory/weak_ptr
+ * tr1/2_general_utilities/memory/weak_ptr/lock
+ * tr1/2_general_utilities/memory/weak_ptr/lock/1.cc
+ * tr1/2_general_utilities/memory/weak_ptr/requirements
+ * tr1/2_general_utilities/memory/weak_ptr/requirements/
+ explicit_instantiation
+ * tr1/2_general_utilities/memory/weak_ptr/requirements/
+ explicit_instantiation/1.cc
+
+2007-02-20 Benjamin Kosnik <bkoz@redhat.com>
+
+ Revamp library API testing.
+
+ Added in testsuite:
+ * 17_intro/headers
+ * 17_intro/headers/all_assert_neg.cc
+ * 17_intro/headers/all_c++200x_compatibility.cc
+ * 17_intro/headers/all.cc
+ * 17_intro/headers/c++1998
+ * 17_intro/headers/c++1998/all.cc
+ * 17_intro/headers/c++1998/all_multiple_inclusion.cc
+ * 17_intro/headers/c++1998/c++_for_c.tar
+ * 17_intro/headers/c++1998/c++.tar
+ * 17_intro/using_namespace_std.cc
+ * 18_support/headers
+ * 18_support/headers/cfloat
+ * 18_support/headers/cfloat/values.cc
+ * 18_support/headers/climits
+ * 18_support/headers/climits/values.cc
+ * 18_support/headers/csetjmp
+ * 18_support/headers/csetjmp/functions_std.cc
+ * 18_support/headers/csetjmp/macros.cc
+ * 18_support/headers/csetjmp/types_std.cc
+ * 18_support/headers/csignal
+ * 18_support/headers/csignal/functions_std.cc
+ * 18_support/headers/csignal/macros.cc
+ * 18_support/headers/csignal/types_std.cc
+ * 18_support/headers/cstdarg
+ * 18_support/headers/cstdarg/macros.cc
+ * 18_support/headers/cstdarg/types_std.cc
+ * 18_support/headers/cstddef
+ * 18_support/headers/cstddef/macros.cc
+ * 18_support/headers/cstddef/types_std.cc
+ * 18_support/headers/cstdlib
+ * 18_support/headers/cstdlib/functions_std.cc
+ * 18_support/headers/cstdlib/macros.cc
+ * 18_support/headers/ctime
+ * 18_support/headers/ctime/functions_std.cc
+ * 18_support/headers/ctime/macros.cc
+ * 18_support/headers/ctime/types_std.cc
+ * 18_support/headers/exception
+ * 18_support/headers/exception/synopsis.cc
+ * 18_support/headers/exception/types_std.cc
+ * 18_support/headers/limits
+ * 18_support/headers/limits/synopsis.cc
+ * 18_support/headers/new
+ * 18_support/headers/new/synopsis.cc
+ * 18_support/headers/new/types_std.cc
+ * 18_support/headers/typeinfo
+ * 18_support/headers/typeinfo/synopsis.cc
+ * 18_support/headers/typeinfo/types_std.cc
+ * 18_support/numeric_limits/is_signed.cc
+ * 18_support/numeric_limits/requirements
+ * 18_support/numeric_limits/requirements/explicit_instantiation
+ * 18_support/numeric_limits/requirements/explicit_instantiation/1.cc
+ * 18_support/numeric_limits/specialization_default_values.cc
+ * 19_diagnostics/headers
+ * 19_diagnostics/headers/cassert
+ * 19_diagnostics/headers/cassert/macros.cc
+ * 19_diagnostics/headers/cerrno
+ * 19_diagnostics/headers/cerrno/macros.cc
+ * 19_diagnostics/headers/stdexcept
+ * 19_diagnostics/headers/stdexcept/synopsis.cc
+ * 19_diagnostics/headers/stdexcept/types_std.cc
+ * 20_util/headers
+ * 20_util/headers/cstdlib
+ * 20_util/headers/cstdlib/functions_std.cc
+ * 20_util/headers/cstring
+ * 20_util/headers/cstring/functions_std.cc
+ * 20_util/headers/cstring/macros.cc
+ * 20_util/headers/cstring/types_std.cc
+ * 20_util/headers/ctime
+ * 20_util/headers/ctime/functions_std.cc
+ * 20_util/headers/ctime/macros.cc
+ * 20_util/headers/ctime/types_std.cc
+ * 20_util/headers/functional
+ * 20_util/headers/functional/synopsis.cc
+ * 20_util/headers/memory
+ * 20_util/headers/memory/synopsis.cc
+ * 20_util/headers/utility
+ * 20_util/headers/utility/synopsis.cc
+ * 20_util/headers/utility/using_namespace_std_rel_ops.cc
+ * 20_util/memory/allocator/requirements
+ * 20_util/memory/allocator/requirements/explicit_instantiation
+ * 20_util/memory/allocator/requirements/explicit_instantiation/1.cc
+ * 20_util/memory/auto_ptr/requirements
+ * 20_util/memory/auto_ptr/requirements/explicit_instantiation
+ * 20_util/memory/auto_ptr/requirements/explicit_instantiation/1.cc
+ * 20_util/memory/raw_storage_iterator
+ * 20_util/memory/raw_storage_iterator/requirements
+ * 20_util/memory/raw_storage_iterator/requirements/base_classes.cc
+ * 20_util/memory/raw_storage_iterator/requirements/
+ explicit_instantiation
+ * 20_util/memory/raw_storage_iterator/requirements/
+ explicit_instantiation/1.cc
+ * 20_util/memory/raw_storage_iterator/requirements/typedefs.cc
+ * 20_util/utility/pair/requirements
+ * 20_util/utility/pair/requirements/explicit_instantiation
+ * 20_util/utility/pair/requirements/explicit_instantiation/1.cc
+ * 21_strings/basic_string/requirements
+ * 21_strings/basic_string/requirements/explicit_instantiation
+ * 21_strings/basic_string/requirements/explicit_instantiation/1.cc
+ * 21_strings/basic_string/requirements/explicit_instantiation/debug.cc
+ * 21_strings/headers
+ * 21_strings/headers/cctype
+ * 21_strings/headers/cctype/functions_std.cc
+ * 21_strings/headers/cstdlib
+ * 21_strings/headers/cstdlib/functions_std.cc
+ * 21_strings/headers/cstdlib/macros.cc
+ * 21_strings/headers/cstring
+ * 21_strings/headers/cstring/functions_std.cc
+ * 21_strings/headers/cstring/macros.cc
+ * 21_strings/headers/cstring/types_std.cc
+ * 21_strings/headers/cwchar
+ * 21_strings/headers/cwchar/functions_std.cc
+ * 21_strings/headers/cwchar/macros.cc
+ * 21_strings/headers/cwchar/types_std.cc
+ * 21_strings/headers/cwctype
+ * 21_strings/headers/cwctype/functions_std.cc
+ * 21_strings/headers/cwctype/macros.cc
+ * 21_strings/headers/cwctype/types_std.cc
+ * 21_strings/headers/string
+ * 21_strings/headers/string/synopsis.cc
+ * 21_strings/headers/string/types_std.cc
+ * 22_locale/codecvt_byname/requirements
+ * 22_locale/codecvt_byname/requirements/base_classes.cc
+ * 22_locale/codecvt_byname/requirements/explicit_instantiation.cc
+ * 22_locale/codecvt_byname/requirements/typedefs.cc
+ * 22_locale/codecvt/requirements
+ * 22_locale/codecvt/requirements/base_classes.cc
+ * 22_locale/codecvt/requirements/explicit_instantiation.cc
+ * 22_locale/codecvt/requirements/typedefs.cc
+ * 22_locale/collate_byname/requirements
+ * 22_locale/collate_byname/requirements/base_classes.cc
+ * 22_locale/collate_byname/requirements/explicit_instantiation.cc
+ * 22_locale/collate_byname/requirements/typedefs.cc
+ * 22_locale/collate/requirements
+ * 22_locale/collate/requirements/base_classes.cc
+ * 22_locale/collate/requirements/explicit_instantiation.cc
+ * 22_locale/collate/requirements/typedefs.cc
+ * 22_locale/ctype_base/mask.cc
+ * 22_locale/ctype/requirements
+ * 22_locale/ctype/requirements/base_classes.cc
+ * 22_locale/ctype/requirements/explicit_instantiation.cc
+ * 22_locale/ctype/requirements/typedefs.cc
+ * 22_locale/headers
+ * 22_locale/headers/clocale
+ * 22_locale/headers/clocale/functions_std.cc
+ * 22_locale/headers/clocale/macros.cc
+ * 22_locale/headers/clocale/types_std.cc
+ * 22_locale/headers/locale
+ * 22_locale/headers/locale/synopsis.cc
+ * 22_locale/headers/locale/types_std.cc
+ * 22_locale/messages_byname/requirements
+ * 22_locale/messages_byname/requirements/base_classes.cc
+ * 22_locale/messages_byname/requirements/explicit_instantiation.cc
+ * 22_locale/messages_byname/requirements/typedefs.cc
+ * 22_locale/messages/requirements
+ * 22_locale/messages/requirements/base_classes.cc
+ * 22_locale/messages/requirements/explicit_instantiation.cc
+ * 22_locale/messages/requirements/typedefs.cc
+ * 22_locale/money_get/cons
+ * 22_locale/money_get/cons/3.cc
+ * 22_locale/money_get/requirements
+ * 22_locale/money_get/requirements/base_classes.cc
+ * 22_locale/money_get/requirements/explicit_instantiations.cc
+ * 22_locale/money_get/requirements/typedefs.cc
+ * 22_locale/moneypunct_byname/requirements
+ * 22_locale/moneypunct_byname/requirements/base_classes.cc
+ * 22_locale/moneypunct_byname/requirements/explicit_instantiation.cc
+ * 22_locale/moneypunct_byname/requirements/typedefs.cc
+ * 22_locale/moneypunct/requirements
+ * 22_locale/moneypunct/requirements/false
+ * 22_locale/moneypunct/requirements/false/base_classes.cc
+ * 22_locale/moneypunct/requirements/false/explicit_instantiation.cc
+ * 22_locale/moneypunct/requirements/false/intl.cc
+ * 22_locale/moneypunct/requirements/false/typedefs.cc
+ * 22_locale/moneypunct/requirements/true
+ * 22_locale/moneypunct/requirements/true/base_classes.cc
+ * 22_locale/moneypunct/requirements/true/explicit_instantiation.cc
+ * 22_locale/moneypunct/requirements/true/intl.cc
+ * 22_locale/moneypunct/requirements/true/typedefs.cc
+ * 22_locale/money_put/cons
+ * 22_locale/money_put/cons/3.cc
+ * 22_locale/money_put/requirements
+ * 22_locale/money_put/requirements/base_classes.cc
+ * 22_locale/money_put/requirements/explicit_instantiation.cc
+ * 22_locale/money_put/requirements/typedefs.cc
+ * 22_locale/num_get/cons
+ * 22_locale/num_get/cons/3.cc
+ * 22_locale/num_get/requirements
+ * 22_locale/num_get/requirements/base_classes.cc
+ * 22_locale/num_get/requirements/explicit_instantiation.cc
+ * 22_locale/num_get/requirements/typedefs.cc
+ * 22_locale/numpunct_byname/requirements
+ * 22_locale/numpunct_byname/requirements/base_classes.cc
+ * 22_locale/numpunct_byname/requirements/explicit_instantiations.cc
+ * 22_locale/numpunct_byname/requirements/typedefs.cc
+ * 22_locale/numpunct/requirements
+ * 22_locale/numpunct/requirements/base_classes.cc
+ * 22_locale/numpunct/requirements/explicit_instantiations.cc
+ * 22_locale/numpunct/requirements/typedefs.cc
+ * 22_locale/num_put/cons
+ * 22_locale/num_put/cons/3.cc
+ * 22_locale/num_put/requirements
+ * 22_locale/num_put/requirements/base_classes.cc
+ * 22_locale/num_put/requirements/explicit_instantiations.cc
+ * 22_locale/num_put/requirements/typedefs.cc
+ * 22_locale/time_get/requirements
+ * 22_locale/time_get/requirements/base_classes.cc
+ * 22_locale/time_get/requirements/explicit_instantiations.cc
+ * 22_locale/time_get/requirements/typedefs.cc
+ * 22_locale/time_put/requirements
+ * 22_locale/time_put/requirements/base_classes.cc
+ * 22_locale/time_put/requirements/explicit_instantiations.cc
+ * 22_locale/time_put/requirements/typedefs.cc
+ * 23_containers/bitset/requirements
+ * 23_containers/bitset/requirements/explicit_instantiation
+ * 23_containers/bitset/requirements/explicit_instantiation/1.cc
+ * 23_containers/deque/requirements
+ * 23_containers/deque/requirements/explicit_instantiation
+ * 23_containers/deque/requirements/partial_specialization
+ * 23_containers/deque/requirements/partial_specialization/1.cc
+ * 23_containers/headers
+ * 23_containers/headers/bitset
+ * 23_containers/headers/bitset/synopsis.cc
+ * 23_containers/headers/deque
+ * 23_containers/headers/deque/synopsis.cc
+ * 23_containers/headers/list
+ * 23_containers/headers/list/synopsis.cc
+ * 23_containers/headers/map
+ * 23_containers/headers/map/synopsis.cc
+ * 23_containers/headers/queue
+ * 23_containers/headers/queue/synopsis.cc
+ * 23_containers/headers/set
+ * 23_containers/headers/set/synopsis.cc
+ * 23_containers/headers/stack
+ * 23_containers/headers/stack/synopsis.cc
+ * 23_containers/headers/vector
+ * 23_containers/headers/vector/synopsis.cc
+ * 23_containers/list/requirements
+ * 23_containers/list/requirements/explicit_instantiation
+ * 23_containers/list/requirements/partial_specialization
+ * 23_containers/list/requirements/partial_specialization/1.cc
+ * 23_containers/map/requirements
+ * 23_containers/map/requirements/explicit_instantiation
+ * 23_containers/map/requirements/partial_specialization
+ * 23_containers/map/requirements/partial_specialization/1.cc
+ * 23_containers/multimap/requirements
+ * 23_containers/multimap/requirements/explicit_instantiation
+ * 23_containers/multimap/requirements/partial_specialization
+ * 23_containers/multimap/requirements/partial_specialization/1.cc
+ * 23_containers/multiset/requirements
+ * 23_containers/multiset/requirements/explicit_instantiation
+ * 23_containers/multiset/requirements/partial_specialization
+ * 23_containers/multiset/requirements/partial_specialization/1.cc
+ * 23_containers/priority_queue/requirements
+ * 23_containers/priority_queue/requirements/explicit_instantiation
+ * 23_containers/priority_queue/requirements/explicit_instantiation/1.cc
+ * 23_containers/queue/requirements
+ * 23_containers/queue/requirements/explicit_instantiation
+ * 23_containers/queue/requirements/explicit_instantiation/1.cc
+ * 23_containers/set/requirements
+ * 23_containers/set/requirements/explicit_instantiation
+ * 23_containers/set/requirements/partial_specialization
+ * 23_containers/set/requirements/partial_specialization/1.cc
+ * 23_containers/stack/requirements
+ * 23_containers/stack/requirements/explicit_instantiation
+ * 23_containers/stack/requirements/explicit_instantiation/1.cc
+ * 23_containers/vector/requirements
+ * 23_containers/vector/requirements/explicit_instantiation
+ * 23_containers/vector/requirements/partial_specialization
+ * 23_containers/vector/requirements/partial_specialization/1.cc
+ * 24_iterators/back_insert_iterator
+ * 24_iterators/back_insert_iterator/2.cc
+ * 24_iterators/back_insert_iterator/requirements
+ * 24_iterators/back_insert_iterator/requirements/base_classes.cc
+ * 24_iterators/back_insert_iterator/requirements/container.cc
+ * 24_iterators/back_insert_iterator/requirements/
+ explicit_instantiation.cc
+ * 24_iterators/back_insert_iterator/requirements/typedefs.cc
+ * 24_iterators/front_insert_iterator
+ * 24_iterators/front_insert_iterator/2.cc
+ * 24_iterators/front_insert_iterator/requirements
+ * 24_iterators/front_insert_iterator/requirements/base_classes.cc
+ * 24_iterators/front_insert_iterator/requirements/container.cc
+ * 24_iterators/front_insert_iterator/requirements/
+ explicit_instantiation.cc
+ * 24_iterators/front_insert_iterator/requirements/typedefs.cc
+ * 24_iterators/headers
+ * 24_iterators/headers/iterator
+ * 24_iterators/headers/iterator/synopsis.cc
+ * 24_iterators/headers/iterator/types_std.cc
+ * 24_iterators/insert_iterator
+ * 24_iterators/insert_iterator/2.cc
+ * 24_iterators/insert_iterator/requirements
+ * 24_iterators/insert_iterator/requirements/base_classes.cc
+ * 24_iterators/insert_iterator/requirements/container.cc
+ * 24_iterators/insert_iterator/requirements/explicit_instantiation.cc
+ * 24_iterators/insert_iterator/requirements/typedefs.cc
+ * 24_iterators/istreambuf_iterator/requirements
+ * 24_iterators/istreambuf_iterator/requirements/base_classes.cc
+ * 24_iterators/istreambuf_iterator/requirements/
+ explicit_instantiation.cc
+ * 24_iterators/istreambuf_iterator/requirements/typedefs.cc
+ * 24_iterators/istream_iterator
+ * 24_iterators/istream_iterator/2.cc
+ * 24_iterators/istream_iterator/requirements
+ * 24_iterators/istream_iterator/requirements/base_classes.cc
+ * 24_iterators/istream_iterator/requirements/explicit_instantiation.cc
+ * 24_iterators/istream_iterator/requirements/typedefs.cc
+ * 24_iterators/ostreambuf_iterator/requirements
+ * 24_iterators/ostreambuf_iterator/requirements/base_classes.cc
+ * 24_iterators/ostreambuf_iterator/requirements/
+ explicit_instantiation.cc
+ * 24_iterators/ostreambuf_iterator/requirements/typedefs.cc
+ * 24_iterators/ostream_iterator
+ * 24_iterators/ostream_iterator/requirements
+ * 24_iterators/ostream_iterator/requirements/base_classes.cc
+ * 24_iterators/ostream_iterator/requirements/explicit_instantiation.cc
+ * 24_iterators/ostream_iterator/requirements/typedefs.cc
+ * 24_iterators/random_access_iterator
+ * 24_iterators/random_access_iterator/26020.cc
+ * 24_iterators/random_access_iterator/string_vector_iterators.cc
+ * 24_iterators/reverse_iterator/requirements
+ * 24_iterators/reverse_iterator/requirements/base_classes.cc
+ * 24_iterators/reverse_iterator/requirements/current.cc
+ * 24_iterators/reverse_iterator/requirements/explicit_instantiation.cc
+ * 24_iterators/reverse_iterator/requirements/typedefs.cc
+ * 25_algorithms/headers
+ * 25_algorithms/headers/algorithm
+ * 25_algorithms/headers/algorithm/synopsis.cc
+ * 25_algorithms/headers/cstdlib
+ * 25_algorithms/headers/cstdlib/functions_std.cc
+ * 26_numerics/headers
+ * 26_numerics/headers/cmath
+ * 26_numerics/headers/cmath/19322.cc
+ * 26_numerics/headers/cmath/c99_classification_macros_c.cc
+ * 26_numerics/headers/cmath/c99_classification_macros_c++.cc
+ * 26_numerics/headers/cmath/c_math.cc
+ * 26_numerics/headers/cmath/c_math_dynamic.cc
+ * 26_numerics/headers/cmath/fabs_inline.cc
+ * 26_numerics/headers/cmath/functions_std.cc
+ * 26_numerics/headers/cmath/macros.cc
+ * 26_numerics/headers/cmath/overloads.cc
+ * 26_numerics/headers/cmath/powi.cc
+ * 26_numerics/headers/complex
+ * 26_numerics/headers/complex/synopsis.cc
+ * 26_numerics/headers/cstdlib
+ * 26_numerics/headers/cstdlib/13943.cc
+ * 26_numerics/headers/cstdlib/2190.cc
+ * 26_numerics/headers/cstdlib/functions_std.cc
+ * 26_numerics/headers/cstdlib/macros.cc
+ * 26_numerics/headers/cstdlib/types_std.cc
+ * 26_numerics/headers/numeric
+ * 26_numerics/headers/numeric/synopsis.cc
+ * 26_numerics/headers/valarray
+ * 26_numerics/headers/valarray/synopsis.cc
+ * 26_numerics/headers/valarray/types_std.cc
+ * 26_numerics/numeric_arrays
+ * 26_numerics/numeric_operations
+ * 27_io/basic_filebuf/cons/2020.cc
+ * 27_io/basic_filebuf/requirements
+ * 27_io/basic_filebuf/requirements/base_classes.cc
+ * 27_io/basic_filebuf/requirements/explicit_instantiation.cc
+ * 27_io/basic_filebuf/requirements/typedefs.cc
+ * 27_io/basic_fstream/cons
+ * 27_io/basic_fstream/cons/3.cc
+ * 27_io/basic_fstream/requirements
+ * 27_io/basic_fstream/requirements/base_classes.cc
+ * 27_io/basic_fstream/requirements/explicit_instantiation.cc
+ * 27_io/basic_fstream/requirements/typedefs.cc
+ * 27_io/basic_ifstream/cons/2020.cc
+ * 27_io/basic_ifstream/requirements
+ * 27_io/basic_ifstream/requirements/base_classes.cc
+ * 27_io/basic_ifstream/requirements/explicit_instantiation.cc
+ * 27_io/basic_ifstream/requirements/typedefs.cc
+ * 27_io/basic_ios/cons/2020.cc
+ * 27_io/basic_ios/requirements
+ * 27_io/basic_ios/requirements/base_classes.cc
+ * 27_io/basic_ios/requirements/explicit_instantiation.cc
+ * 27_io/basic_ios/requirements/typedefs.cc
+ * 27_io/basic_iostream/cons
+ * 27_io/basic_iostream/cons/2020.cc
+ * 27_io/basic_iostream/requirements
+ * 27_io/basic_iostream/requirements/base_classes.cc
+ * 27_io/basic_iostream/requirements/explicit_instantiation.cc
+ * 27_io/basic_iostream/requirements/typedefs.cc
+ * 27_io/basic_istream/cons
+ * 27_io/basic_istream/cons/3.cc
+ * 27_io/basic_istream/requirements
+ * 27_io/basic_istream/requirements/base_classes.cc
+ * 27_io/basic_istream/requirements/explicit_instantiation.cc
+ * 27_io/basic_istream/requirements/typedefs.cc
+ * 27_io/basic_istringstream/cons
+ * 27_io/basic_istringstream/cons/2020.cc
+ * 27_io/basic_istringstream/requirements
+ * 27_io/basic_istringstream/requirements/base_classes.cc
+ * 27_io/basic_istringstream/requirements/explicit_instantiation.cc
+ * 27_io/basic_istringstream/requirements/typedefs.cc
+ * 27_io/basic_ofstream/cons/2020.cc
+ * 27_io/basic_ofstream/requirements
+ * 27_io/basic_ofstream/requirements/base_classes.cc
+ * 27_io/basic_ofstream/requirements/explicit_instantiations.cc
+ * 27_io/basic_ofstream/requirements/typedefs.cc
+ * 27_io/basic_ostream/cons/2020.cc
+ * 27_io/basic_ostream/requirements
+ * 27_io/basic_ostream/requirements/base_classes.cc
+ * 27_io/basic_ostream/requirements/explicit_instantiation.cc
+ * 27_io/basic_ostream/requirements/typedefs.cc
+ * 27_io/basic_ostringstream/cons/2020.cc
+ * 27_io/basic_ostringstream/requirements
+ * 27_io/basic_ostringstream/requirements/base_classes.cc
+ * 27_io/basic_ostringstream/requirements/explicit_instantiation.cc
+ * 27_io/basic_ostringstream/requirements/typedefs.cc
+ * 27_io/basic_streambuf/cons/2020.cc
+ * 27_io/basic_streambuf/requirements
+ * 27_io/basic_streambuf/requirements/base_classes.cc
+ * 27_io/basic_streambuf/requirements/typedefs.cc
+ * 27_io/basic_stringbuf/cons/2020.cc
+ * 27_io/basic_stringbuf/requirements
+ * 27_io/basic_stringbuf/requirements/base_classes.cc
+ * 27_io/basic_stringbuf/requirements/explicit_instantiation
+ * 27_io/basic_stringbuf/requirements/explicit_instantiation/2.cc
+ * 27_io/basic_stringbuf/requirements/explicit_instantiation/4.cc
+ * 27_io/basic_stringbuf/requirements/typedefs.cc
+ * 27_io/basic_stringstream/cons
+ * 27_io/basic_stringstream/cons/2020.cc
+ * 27_io/basic_stringstream/requirements
+ * 27_io/basic_stringstream/requirements/base_classes.cc
+ * 27_io/basic_stringstream/requirements/explicit_instantiation.cc
+ * 27_io/basic_stringstream/requirements/typedefs.cc
+ * 27_io/fpos/requirements
+ * 27_io/fpos/requirements/explicit_instantiation.cc
+ * 27_io/headers
+ * 27_io/headers/cstdio
+ * 27_io/headers/cstdio/functions_std.cc
+ * 27_io/headers/cstdio/macros.cc
+ * 27_io/headers/cstdio/types_std.cc
+ * 27_io/headers/cstdlib
+ * 27_io/headers/fstream
+ * 27_io/headers/fstream/synopsis.cc
+ * 27_io/headers/fstream/types_std.cc
+ * 27_io/headers/iomanip
+ * 27_io/headers/iomanip/synopsis.cc
+ * 27_io/headers/ios
+ * 27_io/headers/ios/synopsis.cc
+ * 27_io/headers/iostream
+ * 27_io/headers/iostream/synopsis.cc
+ * 27_io/headers/iostream/types_std.cc
+ * 27_io/headers/ios/types_std.cc
+ * 27_io/headers/istream
+ * 27_io/headers/istream/synopsis.cc
+ * 27_io/headers/istream/types_std.cc
+ * 27_io/headers/ostream
+ * 27_io/headers/ostream/synopsis.cc
+ * 27_io/headers/ostream/types_std.cc
+ * 27_io/headers/sstream
+ * 27_io/headers/sstream/synopsis.cc
+ * 27_io/headers/sstream/types_std.cc
+ * 27_io/headers/streambuf
+ * 27_io/headers/streambuf/synopsis.cc
+ * 27_io/headers/streambuf/types_std.cc
+ * ext/debug_allocator/explicit_instantiation.cc
+ * ext/hash_map/requirements
+ * ext/hash_map/requirements/explicit_instantiation.cc
+ * ext/hash_set/requirements
+ * ext/hash_set/requirements/explicit_instantiation.cc
+ * ext/malloc_allocator/explicit_instantiation.cc
+ * ext/mt_allocator/explicit_instantiation.cc
+ * ext/pool_allocator/explicit_instantiation.cc
+ * ext/slist/requirements
+ * ext/slist/requirements/explicit_instantiation.cc
+ * ext/stdio_filebuf/requirements
+ * ext/stdio_filebuf/requirements/explicit_instantiation.cc
+ * ext/vstring/requirements
+ * ext/vstring/requirements/explicit_instantiation
+ * tr1/2_general_utilities/headers
+ * tr1/2_general_utilities/headers/functional
+ * tr1/2_general_utilities/headers/functional/synopsis.cc
+ * tr1/2_general_utilities/headers/memory
+ * tr1/2_general_utilities/headers/memory/synopsis.cc
+ * tr1/2_general_utilities/headers/memory/types_std_tr1.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/requirements
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ requirements/explicit_instantiation
+ * tr1/2_general_utilities/memory/shared_ptr/requirements
+ * tr1/2_general_utilities/memory/shared_ptr/requirements/
+ explicit_instantiation
+ * tr1/2_general_utilities/memory/weak_ptr/requirements
+ * tr1/2_general_utilities/memory/weak_ptr/requirements/
+ explicit_instantiation
+ * tr1/3_function_objects/headers
+ * tr1/3_function_objects/headers/functional
+ * tr1/3_function_objects/headers/functional/synopsis.cc
+ * tr1/3_function_objects/headers/functional/types_std_tr1.cc
+ * tr1/3_function_objects/headers/functional/
+ using_namespace_std_tr1_placeholders.cc
+ * tr1/4_metaprogramming/headers
+ * tr1/4_metaprogramming/headers/type_traits
+ * tr1/4_metaprogramming/headers/type_traits/synopsis.cc
+ * tr1/4_metaprogramming/headers/type_traits/types_std_tr1.cc
+ * tr1/5_numerical_facilities/headers
+ * tr1/5_numerical_facilities/headers/random
+ * tr1/5_numerical_facilities/headers/random/synopsis.cc
+ * tr1/5_numerical_facilities/headers/random/types_std_tr1.cc
+ * tr1/5_numerical_facilities/random/discard_block/
+ requirements/typedefs.cc
+ * tr1/6_containers/array/requirements/explicit_instantiation.cc
+ * tr1/6_containers/hash
+ * tr1/6_containers/hash/requirements
+ * tr1/6_containers/hash/requirements/base_classes.cc
+ * tr1/6_containers/hash/requirements/explicit_instantiation.cc
+ * tr1/6_containers/headers
+ * tr1/6_containers/headers/array
+ * tr1/6_containers/headers/array/synopsis.cc
+ * tr1/6_containers/headers/functional
+ * tr1/6_containers/headers/functional/synopsis.cc
+ * tr1/6_containers/headers/tuple
+ * tr1/6_containers/headers/tuple/synopsis.cc
+ * tr1/6_containers/headers/tuple/types_std_tr1.cc
+ * tr1/6_containers/headers/unordered_map
+ * tr1/6_containers/headers/unordered_map/synopsis.cc
+ * tr1/6_containers/headers/unordered_set
+ * tr1/6_containers/headers/unordered_set/synopsis.cc
+ * tr1/6_containers/tuple/requirements
+ * tr1/6_containers/tuple/requirements/explicit_instantiation.cc
+ * tr1/6_containers/unordered_map
+ * tr1/6_containers/unordered_map/24064.cc
+ * tr1/6_containers/unordered_map/capacity
+ * tr1/6_containers/unordered_map/capacity/29134-map.cc
+ * tr1/6_containers/unordered_map/erase
+ * tr1/6_containers/unordered_map/erase/24061-map.cc
+ * tr1/6_containers/unordered_map/find
+ * tr1/6_containers/unordered_map/find/map1.cc
+ * tr1/6_containers/unordered_map/insert
+ * tr1/6_containers/unordered_map/insert/24061-map.cc
+ * tr1/6_containers/unordered_map/insert/array_syntax.cc
+ * tr1/6_containers/unordered_map/insert/map_range.cc
+ * tr1/6_containers/unordered_map/insert/map_single.cc
+ * tr1/6_containers/unordered_map/requirements
+ * tr1/6_containers/unordered_map/requirements/explicit_instantiation.cc
+ * tr1/6_containers/unordered_map/requirements/iterator_neg.cc
+ * tr1/6_containers/unordered_map/requirements/iterator_null_neg.cc
+ * tr1/6_containers/unordered_map/swap
+ * tr1/6_containers/unordered_map/swap/1.cc
+ * tr1/6_containers/unordered_map/swap/2.cc
+ * tr1/6_containers/unordered_multimap
+ * tr1/6_containers/unordered_multimap/capacity
+ * tr1/6_containers/unordered_multimap/capacity/29134-multimap.cc
+ * tr1/6_containers/unordered_multimap/erase
+ * tr1/6_containers/unordered_multimap/erase/24061-multimap.cc
+ * tr1/6_containers/unordered_multimap/find
+ * tr1/6_containers/unordered_multimap/find/multimap1.cc
+ * tr1/6_containers/unordered_multimap/insert
+ * tr1/6_containers/unordered_multimap/insert/24061-multimap.cc
+ * tr1/6_containers/unordered_multimap/insert/multimap_range.cc
+ * tr1/6_containers/unordered_multimap/insert/multimap_single.cc
+ * tr1/6_containers/unordered_multimap/requirements
+ * tr1/6_containers/unordered_multimap/requirements/
+ explicit_instantiation.cc
+ * tr1/6_containers/unordered_multimap/requirements/iterator_neg.cc
+ * tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc
+ * tr1/6_containers/unordered_multimap/swap
+ * tr1/6_containers/unordered_multimap/swap/1.cc
+ * tr1/6_containers/unordered_multimap/swap/2.cc
+ * tr1/6_containers/unordered_multiset
+ * tr1/6_containers/unordered_multiset/24054.cc
+ * tr1/6_containers/unordered_multiset/capacity
+ * tr1/6_containers/unordered_multiset/capacity/29134-multiset.cc
+ * tr1/6_containers/unordered_multiset/erase
+ * tr1/6_containers/unordered_multiset/erase/24061-multiset.cc
+ * tr1/6_containers/unordered_multiset/find
+ * tr1/6_containers/unordered_multiset/find/multiset1.cc
+ * tr1/6_containers/unordered_multiset/insert
+ * tr1/6_containers/unordered_multiset/insert/24061-multiset.cc
+ * tr1/6_containers/unordered_multiset/insert/multiset_range.cc
+ * tr1/6_containers/unordered_multiset/insert/multiset_single.cc
+ * tr1/6_containers/unordered_multiset/requirements
+ * tr1/6_containers/unordered_multiset/requirements/
+ explicit_instantiation.cc
+ * tr1/6_containers/unordered_multiset/requirements/iterator_neg.cc
+ * tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc
+ * tr1/6_containers/unordered_multiset/swap
+ * tr1/6_containers/unordered_multiset/swap/1.cc
+ * tr1/6_containers/unordered_multiset/swap/2.cc
+ * tr1/6_containers/unordered_set
+ * tr1/6_containers/unordered_set/23053.cc
+ * tr1/6_containers/unordered_set/23465.cc
+ * tr1/6_containers/unordered_set/26127.cc
+ * tr1/6_containers/unordered_set/26132.cc
+ * tr1/6_containers/unordered_set/capacity
+ * tr1/6_containers/unordered_set/capacity/29134-set.cc
+ * tr1/6_containers/unordered_set/erase
+ * tr1/6_containers/unordered_set/erase/24061-set.cc
+ * tr1/6_containers/unordered_set/find
+ * tr1/6_containers/unordered_set/find/set1.cc
+ * tr1/6_containers/unordered_set/insert
+ * tr1/6_containers/unordered_set/insert/24061-set.cc
+ * tr1/6_containers/unordered_set/insert/set_range.cc
+ * tr1/6_containers/unordered_set/insert/set_single.cc
+ * tr1/6_containers/unordered_set/requirements
+ * tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc
+ * tr1/6_containers/unordered_set/requirements/iterator_neg.cc
+ * tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc
+ * tr1/6_containers/unordered_set/requirements/
+ iterators_default_constructor.cc
+ * tr1/6_containers/unordered_set/swap
+ * tr1/6_containers/unordered_set/swap/1.cc
+ * tr1/6_containers/unordered_set/swap/2.cc
+ * tr1/using_namespace_std_tr1.cc
+
+ Deleted in testsuite:
+ * 17_intro/header_cassert.cc
+ * 17_intro/header_cerrno.cc
+ * 17_intro/header_csetjmp.cc
+ * 17_intro/header_cstdarg.cc
+ * 17_intro/header_cstddef.cc
+ * 17_intro/header_cstdio.cc
+ * 17_intro/header_cstdlib.cc
+ * 17_intro/header_cstring.cc
+ * 17_intro/header_ctime.cc
+ * 17_intro/header_cwchar.cc
+ * 17_intro/header_cwctype.cc
+ * 17_intro/header_fstream.cc
+ * 17_intro/header_iomanip.cc
+ * 17_intro/header_ios.cc
+ * 17_intro/header_iosfwd.cc
+ * 17_intro/header_iostream.cc
+ * 17_intro/header_istream.cc
+ * 17_intro/header_ostream.cc
+ * 17_intro/headers.cc
+ * 17_intro/headers_c++_c++0x_compat.cc
+ * 17_intro/headers_c.cc
+ * 17_intro/headers_c++.cc
+ * 17_intro/header_sstream.cc
+ * 17_intro/header_streambuf.cc
+ * 17_intro/no_assert_neg.cc
+ * 18_support/numeric_limits/sign.cc
+ * 18_support/numeric_limits/specialization.cc
+ * 20_util/memory/raw_storage_iterator.cc
+ * 21_strings/basic_string/1.cc
+ * 21_strings/basic_string/2.cc
+ * 22_locale/codecvt/1.cc
+ * 22_locale/codecvt/2.cc
+ * 22_locale/codecvt_byname/1.cc
+ * 22_locale/collate/1.cc
+ * 22_locale/collate/2.cc
+ * 22_locale/collate_byname/1.cc
+ * 22_locale/ctype/1.cc
+ * 22_locale/ctype_base/1.cc
+ * 22_locale/messages/1.cc
+ * 22_locale/messages/2.cc
+ * 22_locale/messages_byname/1.cc
+ * 22_locale/money_get/1.cc
+ * 22_locale/money_get/2.cc
+ * 22_locale/money_get/3.cc
+ * 22_locale/moneypunct/1.cc
+ * 22_locale/moneypunct/2.cc
+ * 22_locale/moneypunct/3.cc
+ * 22_locale/moneypunct_byname/1.cc
+ * 22_locale/money_put/1.cc
+ * 22_locale/money_put/2.cc
+ * 22_locale/money_put/3.cc
+ * 22_locale/num_get/1.cc
+ * 22_locale/num_get/2.cc
+ * 22_locale/num_get/3.cc
+ * 22_locale/numpunct/1.cc
+ * 22_locale/numpunct/2.cc
+ * 22_locale/numpunct_byname/1.cc
+ * 22_locale/num_put/1.cc
+ * 22_locale/num_put/2.cc
+ * 22_locale/num_put/3.cc
+ * 22_locale/time_get/1.cc
+ * 22_locale/time_get/2.cc
+ * 22_locale/time_put/1.cc
+ * 22_locale/time_put/2.cc
+ * 23_containers/deque/1.cc
+ * 23_containers/deque/explicit_instantiation
+ * 23_containers/deque/explicit_instantiation/1.cc
+ * 23_containers/deque/explicit_instantiation/2.cc
+ * 23_containers/deque/explicit_instantiation/3.cc
+ * 23_containers/list/1.cc
+ * 23_containers/list/explicit_instantiation
+ * 23_containers/list/explicit_instantiation/1.cc
+ * 23_containers/list/explicit_instantiation/2.cc
+ * 23_containers/list/explicit_instantiation/3.cc
+ * 23_containers/map/1.cc
+ * 23_containers/map/explicit_instantiation
+ * 23_containers/map/explicit_instantiation/1.cc
+ * 23_containers/map/explicit_instantiation/2.cc
+ * 23_containers/map/explicit_instantiation/3.cc
+ * 23_containers/multimap/1.cc
+ * 23_containers/multimap/explicit_instantiation
+ * 23_containers/multimap/explicit_instantiation/1.cc
+ * 23_containers/multimap/explicit_instantiation/2.cc
+ * 23_containers/multimap/explicit_instantiation/3.cc
+ * 23_containers/multiset/1.cc
+ * 23_containers/multiset/explicit_instantiation
+ * 23_containers/multiset/explicit_instantiation/1.cc
+ * 23_containers/multiset/explicit_instantiation/2.cc
+ * 23_containers/multiset/explicit_instantiation/3.cc
+ * 23_containers/set/1.cc
+ * 23_containers/set/explicit_instantiation
+ * 23_containers/set/explicit_instantiation/1.cc
+ * 23_containers/set/explicit_instantiation/2.cc
+ * 23_containers/set/explicit_instantiation/3.cc
+ * 23_containers/vector/1.cc
+ * 23_containers/vector/explicit_instantiation
+ * 23_containers/vector/explicit_instantiation/1.cc
+ * 23_containers/vector/explicit_instantiation/2.cc
+ * 23_containers/vector/explicit_instantiation/3.cc
+ * 24_iterators/26020.cc
+ * 24_iterators/back_insert_iterator.cc
+ * 24_iterators/front_insert_iterator.cc
+ * 24_iterators/insert_iterator.cc
+ * 24_iterators/istreambuf_iterator/1.cc
+ * 24_iterators/istream_iterator.cc
+ * 24_iterators/iterator.cc
+ * 24_iterators/ostreambuf_iterator/1.cc
+ * 24_iterators/ostream_iterator.cc
+ * 24_iterators/reverse_iterator/1.cc
+ * 26_numerics/cmath
+ * 26_numerics/cmath/19322.cc
+ * 26_numerics/cmath/c99_classification_macros_c.cc
+ * 26_numerics/cmath/c99_classification_macros_c++.cc
+ * 26_numerics/cmath/c_math.cc
+ * 26_numerics/cmath/c_math_dynamic.cc
+ * 26_numerics/cmath/fabs_inline.cc
+ * 26_numerics/cmath/overloads.cc
+ * 26_numerics/cmath/powi.cc
+ * 26_numerics/cstdlib
+ * 26_numerics/cstdlib/13943.cc
+ * 26_numerics/numeric
+ * 26_numerics/numeric/sum_diff.cc
+ * 26_numerics/valarray
+ * 26_numerics/valarray/27867.cc
+ * 26_numerics/valarray/28277.cc
+ * 26_numerics/valarray/30416.cc
+ * 26_numerics/valarray/binary_closure.cc
+ * 26_numerics/valarray/dr543.cc
+ * 26_numerics/valarray/slice_array_assignment.cc
+ * 26_numerics/valarray/slice.cc
+ * 26_numerics/valarray/valarray.cc
+ * 26_numerics/valarray/valarray_const_bracket.cc
+ * 26_numerics/valarray/valarray_name_lookup.cc
+ * 26_numerics/valarray/valarray_operators.cc
+ * 26_numerics/valarray/valarray_subset_assignment.cc
+ * 27_io/basic_filebuf/1.cc
+ * 27_io/basic_filebuf/2.cc
+ * 27_io/basic_filebuf/3.cc
+ * 27_io/basic_filebuf/4.cc
+ * 27_io/basic_fstream/1.cc
+ * 27_io/basic_fstream/2.cc
+ * 27_io/basic_fstream/3.cc
+ * 27_io/basic_fstream/4.cc
+ * 27_io/basic_ifstream/1.cc
+ * 27_io/basic_ifstream/2.cc
+ * 27_io/basic_ifstream/3.cc
+ * 27_io/basic_ifstream/4.cc
+ * 27_io/basic_ios/1.cc
+ * 27_io/basic_ios/2.cc
+ * 27_io/basic_ios/3.cc
+ * 27_io/basic_ios/4.cc
+ * 27_io/basic_iostream/1.cc
+ * 27_io/basic_iostream/2.cc
+ * 27_io/basic_iostream/3.cc
+ * 27_io/basic_iostream/4.cc
+ * 27_io/basic_istream/1.cc
+ * 27_io/basic_istream/2.cc
+ * 27_io/basic_istream/3.cc
+ * 27_io/basic_istream/4.cc
+ * 27_io/basic_istringstream/1.cc
+ * 27_io/basic_istringstream/2.cc
+ * 27_io/basic_istringstream/3.cc
+ * 27_io/basic_istringstream/4.cc
+ * 27_io/basic_ofstream/1.cc
+ * 27_io/basic_ofstream/2.cc
+ * 27_io/basic_ofstream/3.cc
+ * 27_io/basic_ofstream/4.cc
+ * 27_io/basic_ostream/1.cc
+ * 27_io/basic_ostream/2.cc
+ * 27_io/basic_ostream/3.cc
+ * 27_io/basic_ostream/4.cc
+ * 27_io/basic_ostringstream/1.cc
+ * 27_io/basic_ostringstream/2.cc
+ * 27_io/basic_ostringstream/3.cc
+ * 27_io/basic_ostringstream/4.cc
+ * 27_io/basic_streambuf/1.cc
+ * 27_io/basic_streambuf/2.cc
+ * 27_io/basic_streambuf/3.cc
+ * 27_io/basic_stringbuf/1.cc
+ * 27_io/basic_stringbuf/2.cc
+ * 27_io/basic_stringbuf/3.cc
+ * 27_io/basic_stringbuf/4.cc
+ * 27_io/basic_stringbuf/5.cc
+ * 27_io/basic_stringstream/1.cc
+ * 27_io/basic_stringstream/2.cc
+ * 27_io/basic_stringstream/3.cc
+ * 27_io/basic_stringstream/4.cc
+ * 27_io/fpos/1.cc
+ * ext/debug_allocator/instantiate.cc
+ * ext/hash_map/instantiate.cc
+ * ext/hash_set/instantiate.cc
+ * ext/malloc_allocator/instantiate.cc
+ * ext/mt_allocator/instantiate.cc
+ * ext/pool_allocator/instantiate.cc
+ * ext/slist/instantiate.cc
+ * ext/stdio_filebuf/char/1.cc
+ * ext/vstring/explicit_instantiation
+ * ext/vstring/explicit_instantiation/1.cc
+ * ext/vstring/explicit_instantiation/2.cc
+ * ext/vstring/explicit_instantiation/char
+ * ext/vstring/explicit_instantiation/char/1.cc
+ * ext/vstring/explicit_instantiation/wchar_t
+ * ext/vstring/explicit_instantiation/wchar_t/1.cc
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ explicit_instantiation
+ * tr1/2_general_utilities/memory/enable_shared_from_this/
+ explicit_instantiation/1.cc
+ * tr1/2_general_utilities/memory/shared_ptr/explicit_instantiation
+ * tr1/2_general_utilities/memory/shared_ptr/explicit_instantiation/1.cc
+ * tr1/2_general_utilities/memory/weak_ptr/explicit_instantiation
+ * tr1/2_general_utilities/memory/weak_ptr/explicit_instantiation/1.cc
+ * tr1/5_numerical_facilities/random/discard_block/requirements/
+ requirements.cc
+ * tr1/6_containers/array/requirements/instantiate.cc
+ * tr1/6_containers/unordered
+ * tr1/6_containers/unordered/23781.cc
+ * tr1/6_containers/unordered/capacity
+ * tr1/6_containers/unordered/capacity/29134-map.cc
+ * tr1/6_containers/unordered/capacity/29134-multimap.cc
+ * tr1/6_containers/unordered/capacity/29134-multiset.cc
+ * tr1/6_containers/unordered/capacity/29134-set.cc
+ * tr1/6_containers/unordered/erase
+ * tr1/6_containers/unordered/erase/24061-map.cc
+ * tr1/6_containers/unordered/erase/24061-multimap.cc
+ * tr1/6_containers/unordered/erase/24061-multiset.cc
+ * tr1/6_containers/unordered/erase/24061-set.cc
+ * tr1/6_containers/unordered/find
+ * tr1/6_containers/unordered/find/map1.cc
+ * tr1/6_containers/unordered/find/multimap1.cc
+ * tr1/6_containers/unordered/find/multiset1.cc
+ * tr1/6_containers/unordered/find/set1.cc
+ * tr1/6_containers/unordered/hash
+ * tr1/6_containers/unordered/hash/24799.cc
+ * tr1/6_containers/unordered/hashtable
+ * tr1/6_containers/unordered/hashtable/23053.cc
+ * tr1/6_containers/unordered/hashtable/23465.cc
+ * tr1/6_containers/unordered/hashtable/24054.cc
+ * tr1/6_containers/unordered/hashtable/24064.cc
+ * tr1/6_containers/unordered/hashtable/26127.cc
+ * tr1/6_containers/unordered/hashtable/26132.cc
+ * tr1/6_containers/unordered/hashtable/iterators_default_constructor.cc
+ * tr1/6_containers/unordered/insert
+ * tr1/6_containers/unordered/insert/24061-map.cc
+ * tr1/6_containers/unordered/insert/24061-multimap.cc
+ * tr1/6_containers/unordered/insert/24061-multiset.cc
+ * tr1/6_containers/unordered/insert/24061-set.cc
+ * tr1/6_containers/unordered/insert/array_syntax.cc
+ * tr1/6_containers/unordered/insert/map_range.cc
+ * tr1/6_containers/unordered/insert/map_single.cc
+ * tr1/6_containers/unordered/insert/multimap_range.cc
+ * tr1/6_containers/unordered/insert/multimap_single.cc
+ * tr1/6_containers/unordered/insert/multiset_range.cc
+ * tr1/6_containers/unordered/insert/multiset_single.cc
+ * tr1/6_containers/unordered/insert/set_range.cc
+ * tr1/6_containers/unordered/insert/set_single.cc
+ * tr1/6_containers/unordered/instantiate
+ * tr1/6_containers/unordered/instantiate/hash.cc
+ * tr1/6_containers/unordered/instantiate/map.cc
+ * tr1/6_containers/unordered/instantiate/multimap.cc
+ * tr1/6_containers/unordered/instantiate/multiset.cc
+ * tr1/6_containers/unordered/instantiate/set.cc
+ * tr1/6_containers/unordered/swap
+ * tr1/6_containers/unordered/swap/unordered_map
+ * tr1/6_containers/unordered/swap/unordered_map/1.cc
+ * tr1/6_containers/unordered/swap/unordered_map/2.cc
+ * tr1/6_containers/unordered/swap/unordered_multimap
+ * tr1/6_containers/unordered/swap/unordered_multimap/1.cc
+ * tr1/6_containers/unordered/swap/unordered_multimap/2.cc
+ * tr1/6_containers/unordered/swap/unordered_multiset
+ * tr1/6_containers/unordered/swap/unordered_multiset/1.cc
+ * tr1/6_containers/unordered/swap/unordered_multiset/2.cc
+ * tr1/6_containers/unordered/swap/unordered_set
+ * tr1/6_containers/unordered/swap/unordered_set/1.cc
+ * tr1/6_containers/unordered/swap/unordered_set/2.cc
+ * tr1/6_containers/unordered/types
+ * tr1/6_containers/unordered/types/map_iterator.cc
+ * tr1/6_containers/unordered/types/multimap_iterator.cc
+ * tr1/6_containers/unordered/types/multiset_iterator.cc
+ * tr1/6_containers/unordered/types/set_iterator.cc
+
+ * testsuite/24_iterators/reverse_iterator/2.cc: To just one
+ non-requirements test.
+ * testsuite/ext/headers.cc: Add new includes.
+
+2007-02-18 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/bits/stl_algobase.h: Do not include <climits>, use
+ std::numeric_limits.
+ * include/bits/stl_bvector.h: Use __CHAR_BIT__.
+ * config/locale/gnu/codecvt_members.cc: Include <climits>.
+ * config/locale/generic/codecvt_members.cc: Likewise.
+ * include/std/string: Do not include <algorithm>; do not include
+ <memory>, include <bits/allocator.h> instead.
+ * include/ext/vstring_fwd.h: Likewise.
+ * include/ext/vstring_util.h: Do not include <algorithm>.
+ * include/tr1/hashtable_policy.h: Include <algorithm>.
+ * testsuite/21_strings/basic_string/replace/char/1.cc: Likewise.
+ * testsuite/21_strings/basic_string/replace/wchar_t/1.cc: Likewise.
+ * testsuite/23_containers/bitset/cons/1.cc: Likewise.
+ * testsuite/util/testsuite_character.h: Likewise.
+
+ * config/locale/gnu/codecvt_members.cc: Also include <cstdlib>,
+ for MB_CUR_MAX.
+ * config/locale/generic/codecvt_members.cc: Likewise.
+
+2007-02-16 Paolo Carlini <pcarlini@suse.de>
+
+ Revert.
+ 2007-02-14 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/30768
+ * testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc:
+ Xfail ICE for cris-*-*.
+
+2007-02-14 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/30768
+ * testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc:
+ Xfail ICE for cris-*-*.
+
+2007-02-14 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.ac: Move AM_ICONV to native-only, add HAVE_ICONV for
+ newlib.
+ * configure: Regenerate.
+
+2007-02-13 Dirk Mueller <dmueller@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::do_get): Avoid
+ warning about ambiguous else.
+
+2007-02-12 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/21172
+ * include/bits/stl_heap.h (__adjust_heap(_RandomAccessIterator,
+ _Distance, _Distance, _Tp), __adjust_heap(_RandomAccessIterator,
+ _Distance, _Distance, _Tp, _Compare)): Avoid potential integer
+ overflow.
+
+ * include/bits/stl_heap.h (__is_heap(_RandomAccessIterator,
+ _RandomAccessIterator), __is_heap(_RandomAccessIterator,
+ _RandomAccessIterator, _StrictWeakOrdering): Mark inline.
+ (make_heap(_RandomAccessIterator, _RandomAccessIterator,
+ _Compare)): Do not mark inline.
+
+ * include/bits/stl_heap.h (push_heap(_RandomAccessIterator,
+ _RandomAccessIterator), sort_heap(_RandomAccessIterator,
+ _RandomAccessIterator)): Uncomment __glibcxx_requires_heap.
+
+2007-02-09 Richard Sandiford <richard@codesourcery.com>
+
+ * testsuite/22_locale/time_put/put/wchar_t/1.cc: XFAIL if
+ dummy_wcsftime.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/9.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/10.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/2.cc: XFAIL if lax_strtofp.
+ * testsuite/22_locale/num_get/get/char/2.cc: Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/09.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/6.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc:
+ Likewise.
+ * testsuite/26_numerics/cmath/c99_classification_macros_c++.cc: XFAIL
+ for uClibc.
+ * testsuite/26_numerics/cmath/c99_classification_macros_c.cc: Likewise.
+
+2007-02-09 Paolo Carlini <pcarlini@suse.de>
+
+ * scripts/testsuite_flags.in: Add back @LIBICONV@ to SECTIONLDFLAGS.
+
+2007-02-08 Howard Hinnant <hhinnant@apple.com>
+
+ PR libstdc++/17012
+ * include/bits/list.tcc (list<>::remove): Take care of
+ &*__first == &__value.
+ * docs/html/ext/howto.html: Add an entry for DR 526.
+
+2007-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/28468
+ * configure: Regenerate.
+
+2007-02-07 Hans-Peter Nilsson <hp@axis.com>
+
+ PR testsuite/28870
+ * testsuite/27_io/basic_stringbuf/overflow/char/1.cc: Use only
+ 10000 iterations for simulator targets.
+ * testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Use only 5
+ iterations for simulator targets.
+ * testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Ditto.
+ * testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Ditto.
+ * testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Ditto.
+ * testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Ditto.
+ * testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Ditto.
+ * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Ditto.
+ * testsuite/23_containers/set/modifiers/16728.cc: Use only 10
+ iterations for simulator targets.
+
+2007-02-06 Benjamin Kosnik <bkoz@redhat.com>
+ Marco Trudel <mtrudel@gmx.ch>
+
+ * include/precompiled/extc++.h: Guard include files that assume
+ iconv support is present from precompilation via
+ _GLIBCXX_HAVE_ICONV.
+
+2007-02-05 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_deque.h (operator<): Qualify call.
+
+2007-02-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/c++config: Consistent macro guards for config includes.
+ * config/locale/gnu/c_locale.h: Same.
+ * config/locale/generic/c_locale.h: Same.
+ * config/allocator/mt_allocator_base.h: Same.
+ * config/allocator/malloc_allocator_base.h: Same.
+ * config/allocator/new_allocator_base.h: Same.
+ * config/allocator/pool_allocator_base.h: Same.
+ * config/allocator/bitmap_allocator_base.h: Same.
+ * config/os/vxworks/os_defines.h: Same.
+ * config/cpu/sh/atomicity.h: Same.
+ * config/io/c_io_stdio.h: Same.
+ * config/io/basic_file_stdio.h: Same.
+
+2007-02-01 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14493
+ * libsupc++/typeinfo (bad_cast::what, bad_typeid::what): Declare.
+ * libsupc++/tinfo.cc: Define.
+ * libsupc++/exception (bad_exception::what): Declare.
+ * libsupc++/eh_exception.cc: Define.
+ (exception::what): Adjust, don't use typeid.
+ * libsupc++/new (bad_alloc::what): Declare.
+ * libsupc++/new_handler.cc: Define.
+ * config/abi/pre/gnu.ver: Export the new methods @3.4.9; adjust
+ existing 3.4.10 exports to 3.4.9.
+ * configure.ac: Adjust to 6.0.9.
+ * configure: Regenerate.
+ * testsuite/util/testsuite_abi.cc: Update.
+ * testsuite/18_support/14493.cc: New.
+
+2007-02-01 Ben Elliston <bje@au.ibm.com>
+
+ * libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the
+ emergency_buffer using `&array[0][0]' notation, use `array'.
+
+2007-01-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/30571
+ * include/ext/pb_ds/detail/type_utils.hpp: Use C++0x
+ static_assert if available, if not, centralize PB_DS_STATIC_ASSERT
+ definition here.
+ * include/ext/pb_ds/detail/resize_policy/
+ cc_hash_max_collision_check_resize_trigger_imp.hpp: Remove
+ PB_DS_STATIC_ASSERT definition.
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_load_check_resize_trigger_imp.hpp: Same.
+ * include/ext/pb_ds/detail/resize_policy/
+ hash_standard_resize_policy_imp.hpp: Same.
+ * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same.
+ * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same.
+ * include/ext/pb_ds/detail/pat_trie_/internal_node.hpp: Same.
+ * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same.
+ * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Same.
+ * include/ext/pb_ds/trie_policy.hpp: Same.
+ * testsuite/util/performance/assoc/timing/
+ tree_order_statistics_test.hpp: Same.
+ * testsuite/ext/pb_ds/example/hash_resize_neg.cc: Adjust line numbers.
+ * testsuite/17_intro/headers_c++_c++0x_compat.cc: New.
+
+ * include/precompiled/extc++.h: Update to current list of ext files.
+
+2007-01-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_uninitialized.h (uninitialized_copy(const char*,
+ const char*, char*), uninitialized_copy(const wchar_t*, const wchar_t*,
+ wchar_t*)): Remove, just forward to std::copy.
+
+2007-01-29 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/ext/enc_filebuf.h: Resurrect, update.
+ * include/ext/codecvt_specializations.h: Remove
+ _GLIBCXX_USE_ICONV, _GLIBCXX_USE_ENCODING_STATE.
+ * include/bits/localefwd.h: Remove declaration for __enc_traits.
+ * docs/html/22_locale/codecvt.html: Change __enc_traits to
+ encoding_state.
+ * scripts/testsuite_flags.in: Remove ICONV.
+
+ * configure.ac: Remove GLIBCXX_CHECK_ICONV_SUPPORT.
+ * acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove.
+ * crossconfig.m4: Remove use of GLIBCXX_CHECK_ICONV_SUPPORT.
+ * config.h.in: Remove HAVE_ICONV_CLOSE, HAVE_ICONV_OPEN,
+ HAVE_NL_LANGINFO, _GLIBCXX_USE_ICONV.
+ * include/Makefile.am: Uglify ICONV_CONST.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * Makefile.in: Regenerate.
+ * src/Makefile.in: Regenerate.
+ * po/Makefile.in: Regenerate.
+ * libmath/Makefile.in: Regenerate.
+ * include/Makefile.in: Regenerate.
+ * libsupc++/Makefile.in: Regenerate.
+ * testsuite/Makefile.in: Regenerate.
+
+ * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Use
+ dg-require-iconv, fix up for encoding_state changes.
+ * testsuite/ext/enc_filebuf/char/13189.cc: Same.
+ * testsuite/ext/enc_filebuf/char/13598.cc: Same.
+ * testsuite/22_locale/codecvt/unicode: Move...
+ * testsuite/22_locale/codecvt/unicode/char.cc: Move...
+ * testsuite/22_locale/codecvt/unicode/1.cc: Move...
+ * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Move...
+ * testsuite/ext/codecvt: New.
+ * testsuite/ext/codecvt/char-1.cc: ...here. Also, use dg-require-iconv.
+ * testsuite/ext/codecvt/char-2.cc: ...here. Same.
+ * testsuite/ext/codecvt/1.cc: ...here. Same.
+ * testsuite/ext/codecvt/wchar_t.cc: ...here. Same.
+ * testsuite/22_locale/locale/cons/unicode: Delete directory.
+ * testsuite/22_locale/locale/cons/unicode/1.cc: Move...
+ * testsuite/22_locale/locale/cons/unicode.cc: ...here.
+
+2007-01-28 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
+ iter_type, ios_base&, ios_base::iostate&, bool&),
+ num_put<>::_M_insert_int(_OutIter, ios_base&, _CharT, _ValueT)):
+ -Wconversion and -Woverflow fixes.
+ * include/bits/istream.tcc (operator>>(int&), operator>>(short&)):
+ Likewise.
+ * include/std/valarray (valarray<>::shift, cshift): Likewise.
+
+2007-01-26 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30586
+ * config/cpu/ia64/atomic_word.h: Just include <bits/cxxabi_tweaks.h>.
+ * testsuite/abi/30586.cc: New.
+
+2007-01-25 Nathan Myers <ncm@cantrip.org>
+
+ * include/bits/streambuf_iterator.h (istreambuf_iterator<>::equal):
+ Simplify.
+
+2007-01-24 Steve LoBasso <slobasso@yahoo.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
+ Fix condition.
+ * testsuite/23_containers/deque/modifiers/erase/3.cc: New.
+
+2007-01-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Replace
+ _Unwind_Word with _uleb128_t in the SJLJ context.
+
+2007-01-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/29722 continued
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Add
+ libsupc++ library directory.
+ * testsuite/abi/cxx_runtime_only_linkage.cc: Remove hard-coded
+ path specification.
+
+2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
+ get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
+ _Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
+
+2007-01-22 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (__fill_aux(unsigned char*,
+ unsigned char*, const unsigned char&), __fill_aux(signed char*,
+ signed char*, const signed char&), __fill_aux(char*, char*,
+ const char&), __fill_aux(wchar_t*, wchar_t*, const wchar_t&)):
+ Take the character by value.
+ (__fill_n_aux): Likewise.
+
+2007-01-21 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30449 (fill, fill_n)
+ * include/bits/stl_algobase.h (__fill_aux(wchar_t*, wchar_t*,
+ const wchar_t&), __fill_n_aux(wchar_t*, _Size, const wchar_t&)): New.
+ (fill(signed char*, signed char*, const signed char&),
+ fill(unsigned char*, unsigned char*, const unsigned char&),
+ fill(char*, char*, char&), fill_n(signed char*, _Size,
+ const signed char&), fill_n(unsigned char*, _Size,
+ const unsigned char&), fill_n(char*, _Size, char&)): Rename to
+ __*_aux.
+ (__fill_normal, __fill_n_normal): New, call the latter.
+ (fill, fill_n): Adjust, call the latter.
+ * testsuite/25_algorithms/fill/4.cc: New.
+ * testsuite/25_algorithms/fill/5.cc: New.
+
+2007-01-18 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/basic_string.h (basic_string<>::_S_compare): Add.
+ (compare(const basic_string&)): Use it.
+ * include/bits/basic_string.tcc (compare(size_type, size_type,
+ const basic_string&), compare(size_type, size_type,
+ const basic_string&, size_type, size_type), compare(const _CharT*),
+ compare(size_type, size_type, const _CharT*), compare(size_type,
+ size_type, const _CharT*, size_type)): Likewise.
+ * include/ext/vstring_util.h (__vstring_utility<>::_S_compare): Add.
+ * include/ext/vstring.h (compare(const __versa_string&)): Use it.
+ * include/ext/vstring.tcc (compare(size_type, size_type,
+ const __versa_string&), compare(size_type, size_type,
+ const __versa_string&, size_type, size_type), compare(const _CharT*),
+ compare(size_type, size_type, const _CharT*), compare(size_type,
+ size_type, const _CharT*, size_type)): Likewise.
+
+2007-01-15 Ian Lance Taylor <iant@google.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/ext/type_traits.h: Fix __glibcxx_max macro.
+ * include/std/limits: Likewise.
+
+2007-01-15 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/valarray (valarray<>::cshift): Fix typo.
+
+2007-01-14 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_algobase.h (fill_n(char*, _Size,
+ const signed char&)): Fix signature.
+ * testsuite/25_algorithms/fill/3.cc: New.
+
+2007-01-13 John David Anglin <dave.anglin@nrc-cnrc.gc>
+
+ * config/cpu/hppa/atomicity.h (__exchange_and_add): Don't use ordered
+ store.
+ (__atomic_add): Likewise.
+
+2007-01-13 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/14991
+ * docs/html/17_intro/porting-howto.html ([3]): Mention stdio_filebuf.
+ * docs/html/17_intro/porting-howto.xml: Remove.
+
+ * docs/html/17_intro/porting-howto.html: Remove spurious end tags
+ pointed out by validator.w3.org.
+
+2007-01-12 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30416 (continued)
+ * include/std/valarray (valarray<>::shift, valarray<>::cshift):
+ Allways return the same variable, thus facilitating NRVO.
+
+2007-01-12 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30416
+ * include/std/valarray (valarray<>::shift, valarray<>::cshift):
+ Do not segfault when |n| > size.
+ * testsuite/26_numerics/valarray/30416.cc: New.
+
+2007-01-06 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/30365
+ * crossconfig.m4 (case *-linux*): Run GLIBCXX_CHECK_LFS.
+ * configure: Regenerate.
+
+2007-01-06 Matthias Klose <doko@debian.org>
+
+ * include/tr1/random (gamma_distribution): Fix typo in formula.
+ * docs/doxygen/user.cfg.in: Use package amsmath.
diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am
index 562b3e86a91..c1649e4a383 100644
--- a/libstdc++-v3/Makefile.am
+++ b/libstdc++-v3/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the toplevel directory of the GNU C++ Standard library.
##
-## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -25,41 +25,20 @@
include $(top_srcdir)/fragment.am
if GLIBCXX_HOSTED
- hosted_source = libmath src po testsuite
+ hosted_source = libmath doc src po testsuite
endif
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
SUBDIRS = include libsupc++ $(hosted_source)
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
-# These rules are messy, but are hella worth it.
-doxygen:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=user $${srcdir} $${builddir})
-
-doxygen-maint:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=maint $${srcdir} $${builddir})
-
-doxygen-man:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=man $${srcdir} $${builddir})
-
-.PHONY: doxygen doxygen-maint doxygen-man
-
# Handy forwarding targets.
check-%:
cd testsuite && $(MAKE) $@
+doc-%:
+ cd doc && $(MAKE) $@
+
# Multilib support.
MAKEOVERRIDES=
@@ -110,11 +89,3 @@ AM_MAKEFLAGS = \
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $(AM_MAKEFLAGS)
-
-# Installation of distribution html documentation not yet supported
-# TODO: Write custom install-html rule.
-.PHONY: install-html install-pdf
-install-html:
-
-# No install-pdf support in automake yet
-install-pdf:
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index c8ad4694faa..76397b3b914 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -46,6 +46,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../config.guess \
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -83,7 +84,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = include libsupc++ libmath src po testsuite
+DIST_SUBDIRS = include libsupc++ libmath doc src po testsuite
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -103,6 +104,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -140,6 +142,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -150,6 +154,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
@@ -300,7 +305,7 @@ WARN_CXXFLAGS = \
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
-@GLIBCXX_HOSTED_TRUE@hosted_source = libmath src po testsuite
+@GLIBCXX_HOSTED_TRUE@hosted_source = libmath doc src po testsuite
SUBDIRS = include libsupc++ $(hosted_source)
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
@@ -779,45 +784,16 @@ uninstall-info: uninstall-info-recursive
uninstall uninstall-am uninstall-info-am
-# These rules are messy, but are hella worth it.
-doxygen:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=user $${srcdir} $${builddir})
-
-doxygen-maint:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=maint $${srcdir} $${builddir})
-
-doxygen-man:
- -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
- builddir=`${PWD_COMMAND}`; \
- ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
- --host_alias=${host_alias} \
- --mode=man $${srcdir} $${builddir})
-
-.PHONY: doxygen doxygen-maint doxygen-man
-
# Handy forwarding targets.
check-%:
cd testsuite && $(MAKE) $@
+doc-%:
+ cd doc && $(MAKE) $@
+
# All the machinations with string instantiations messes up the
# automake-generated TAGS rule. Make a simple one here.
TAGS: tags-recursive $(LISP)
-
-# Installation of distribution html documentation not yet supported
-# TODO: Write custom install-html rule.
-.PHONY: install-html install-pdf
-install-html:
-
-# No install-pdf support in automake yet
-install-pdf:
# 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.
.NOEXPORT:
diff --git a/libstdc++-v3/README b/libstdc++-v3/README
index 1064095fba7..2651ec48170 100644
--- a/libstdc++-v3/README
+++ b/libstdc++-v3/README
@@ -1,96 +1,6 @@
file: libstdc++-v3/README
New users may wish to point their web browsers to the file
-documentation.html in the 'docs/html' subdirectory. It contains brief
+index.html in the 'doc/html' subdirectory. It contains brief
building instructions and notes on how to configure the library in
interesting ways.
-
-Instructions for configuring and building appear in
-docs/html/install.html.
-
-This directory contains the files needed to create an ISO Standard C++
-Library.
-
-It has subdirectories:
-
- docs
- Files in HTML and text format that document usage, quirks of the
- implementation, and contributor checklists.
-
- include
- All header files for the C++ library are within this directory,
- modulo specific runtime-related files that are in the libsupc++
- directory.
-
- include/std
- Files meant to be found by #include <name> directives in
- standard-conforming user programs.
-
- include/c
- Headers intended to directly include standard C headers.
- [NB: this can be enabled via --enable-cheaders=c]
-
- include/c_std
- Headers intended to include standard C headers, and put select
- names into the std:: namespace.
- [NB: this is the default, and is the same as --enable-cheaders=c_std]
-
- include/bits
- Files included by standard headers and by other files in
- the bits directory.
-
- include/backward
- Headers provided for backward compatibility, such as <iostream.h>.
- They are not used in this library.
-
- include/ext
- Headers that define extensions to the standard library. No
- standard header refers to any of them.
-
- scripts
- Scripts that are used during the configure, build, make, or test
- process.
-
- src
- Files that are used in constructing the library, but are not
- installed.
-
- testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]
- Test programs are here, and may be used to begin to exercise the
- library. Support for "make check" and "make check-install" is
- complete, and runs through all the subdirectories here when this
- command is issued from the build directory. Please note that
- "make check" requires DejaGNU 1.4 or later to be installed. Please
- note that "make check-script" calls the script mkcheck, which
- requires bash, and which may need the paths to bash adjusted to
- work properly, as /bin/bash is assumed.
-
-Other subdirectories contain variant versions of certain files
-that are meant to be copied or linked by the configure script.
-Currently these are:
-
- config/abi
- config/cpu
- config/io
- config/locale
- config/os
-
-In addition, two subdirectories are convenience libraries:
-
- libmath
- Support routines needed for C++ math. Only needed if the
- underlying "C" implementation is non-existent, in particular
- required or optimal long double, long long, and C99 functionality.
-
- libsupc++
- Contains the runtime library for C++, including exception
- handling and memory allocation and deallocation, RTTI, terminate
- handlers, etc.
-
-Note that glibc also has a bits/ subdirectory. We will either
-need to be careful not to collide with names in its bits/
-directory; or rename bits to (e.g.) cppbits/.
-
-In files throughout the system, lines marked with an "XXX" indicate
-a bug or incompletely-implemented feature. Lines marked "XXX MT"
-indicate a place that may require attention for multi-thread safety.
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 4b3aaa5b58d..bd14d90126e 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -49,7 +49,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
# Keep these sync'd with the list in Makefile.am. The first provides an
# expandable list at autoconf time; the second provides an expandable list
# (i.e., shell variable) at configure time.
- m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src po testsuite])
+ m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src doc po testsuite])
SUBDIRS='glibcxx_SUBDIRS'
# These need to be absolute paths, yet at the same time need to
@@ -763,24 +763,49 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities - like pre-standard snprintf - may be
+ # spuriously enabled.
+ # Long term, -std=c++0x could be even better, could manage to explicitely
+ # request C99 facilities to the underlying C headers.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_CHECK_LIB(m, sin, [
+ LIBS="$LIBS -lm"
+ ], [
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+ ])
+ fi
+
# Check for the existence of <math.h> functions used if C99 is enabled.
AC_MSG_CHECKING([for ISO C99 support in <math.h>])
AC_CACHE_VAL(ac_c99_math, [
- AC_TRY_COMPILE([#include <math.h>],
- [fpclassify(0.0);
- isfinite(0.0);
- isinf(0.0);
- isnan(0.0);
- isnormal(0.0);
- signbit(0.0);
- isgreater(0.0,0.0);
- isgreaterequal(0.0,0.0);
- isless(0.0,0.0);
- islessequal(0.0,0.0);
- islessgreater(0.0,0.0);
- islessgreater(0.0,0.0);
- isunordered(0.0,0.0);
- ],[ac_c99_math=yes], [ac_c99_math=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <math.h>
+ volatile double d1, d2;
+ volatile int i;],
+ [i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ],[ac_c99_math=yes], [ac_c99_math=no])
])
AC_MSG_RESULT($ac_c99_math)
if test x"$ac_c99_math" = x"yes"; then
@@ -798,47 +823,54 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float float_type; float_type tmpf;
- cabsf(tmpf);
- cargf(tmpf);
- ccosf(tmpf);
- ccoshf(tmpf);
- cexpf(tmpf);
- clogf(tmpf);
- csinf(tmpf);
- csinhf(tmpf);
- csqrtf(tmpf);
- ctanf(tmpf);
- ctanhf(tmpf);
- cpowf(tmpf, tmpf);
- typedef __complex__ double double_type; double_type tmpd;
- cabs(tmpd);
- carg(tmpd);
- ccos(tmpd);
- ccosh(tmpd);
- cexp(tmpd);
- clog(tmpd);
- csin(tmpd);
- csinh(tmpd);
- csqrt(tmpd);
- ctan(tmpd);
- ctanh(tmpd);
- cpow(tmpd, tmpd);
- typedef __complex__ long double ld_type; ld_type tmpld;
- cabsl(tmpld);
- cargl(tmpld);
- ccosl(tmpld);
- ccoshl(tmpld);
- cexpl(tmpld);
- clogl(tmpld);
- csinl(tmpld);
- csinhl(tmpld);
- csqrtl(tmpld);
- ctanl(tmpld);
- ctanhl(tmpld);
- cpowl(tmpld, tmpld);
- ],[ac_c99_complex=yes], [ac_c99_complex=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;],
+ [f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ ],[ac_c99_complex=yes], [ac_c99_complex=no])
fi
AC_MSG_RESULT($ac_c99_complex)
if test x"$ac_c99_complex" = x"yes"; then
@@ -851,35 +883,43 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
# Check for the existence in <stdio.h> of vscanf, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
AC_CACHE_VAL(ac_c99_stdio, [
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- }],
- [snprintf("12", 0, "%i");],
- [ac_c99_stdio=yes], [ac_c99_stdio=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }],
+ [snprintf("12", 0, "%i");],
+ [ac_c99_stdio=yes], [ac_c99_stdio=no])
])
AC_MSG_RESULT($ac_c99_stdio)
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_CACHE_VAL(ac_c99_stdlib, [
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp;
- strtof("gnu", &tmp);
- strtold("gnu", &tmp);
- strtoll("gnu", &tmp, 10);
- strtoull("gnu", &tmp, 10);
- llabs(10);
- lldiv(10,1);
- atoll("10");
- _Exit(0);
- lldiv_t mydivt;],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;],
+ [char* tmp;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+ ],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
])
AC_MSG_RESULT($ac_c99_stdlib)
@@ -940,6 +980,9 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
<complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
fi
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
fi
@@ -957,6 +1000,11 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities may be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+
# Check for the existence of <complex.h> complex math functions used
# by tr1/complex.
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
@@ -1227,6 +1275,7 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
# Check for the existence of the <stdbool.h> header.
AC_CHECK_HEADERS(stdbool.h)
+ CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
@@ -1258,6 +1307,142 @@ AC_DEFUN([GLIBCXX_CHECK_RANDOM_TR1], [
])
dnl
+dnl Check whether macros, etc are present for <system_error>
+dnl
+AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [
+
+ AC_MSG_CHECKING([for EOWNERDEAD])
+ AC_CACHE_VAL(ac_system_error1, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = EOWNERDEAD; ],
+ [ac_system_error1=yes], [ac_system_error1=no])
+ ])
+ AC_MSG_RESULT($ac_system_error1)
+ if test x"$ac_system_error1" = x"yes"; then
+ AC_DEFINE(HAVE_EOWNERDEAD, 1, [Define if EOWNERDEAD exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENOTRECOVERABLE])
+ AC_CACHE_VAL(ac_system_error2, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOTRECOVERABLE; ],
+ [ac_system_error2=yes], [ac_system_error2=no])
+ ])
+ AC_MSG_RESULT($ac_system_error2)
+ if test x"$ac_system_error2" = x"yes"; then
+ AC_DEFINE(HAVE_ENOTRECOVERABLE, 1, [Define if ENOTRECOVERABLE exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENOLINK])
+ AC_CACHE_VAL(ac_system_error3, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOLINK; ],
+ [ac_system_error3=yes], [ac_system_error3=no])
+ ])
+ AC_MSG_RESULT($ac_system_error3)
+ if test x"$ac_system_error3" = x"yes"; then
+ AC_DEFINE(HAVE_ENOLINK, 1, [Define if ENOLINK exists.])
+ fi
+
+ AC_MSG_CHECKING([for EPROTO])
+ AC_CACHE_VAL(ac_system_error_4, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = EPROTO; ],
+ [ac_system_error_4=yes], [ac_system_error_4=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_4)
+ if test x"$ac_system_error_4" = x"yes"; then
+ AC_DEFINE(HAVE_EPROTO, 1, [Define if EPROTO exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENODATA])
+ AC_CACHE_VAL(ac_system_error_5, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENODATA; ],
+ [ac_system_error_5=yes], [ac_system_error_5=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_5)
+ if test x"$ac_system_error_5" = x"yes"; then
+ AC_DEFINE(HAVE_ENODATA, 1, [Define if ENODATA exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENOSR])
+ AC_CACHE_VAL(ac_system_error_6, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSR; ],
+ [ac_system_error_6=yes], [ac_system_error_6=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_6)
+ if test x"$ac_system_error_6" = x"yes"; then
+ AC_DEFINE(HAVE_ENOSR, 1, [Define if ENOSR exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENOSTR])
+ AC_CACHE_VAL(ac_system_error_7, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSTR; ],
+ [ac_system_error_7=yes], [ac_system_error_7=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_7)
+ if test x"$ac_system_error_7" = x"yes"; then
+ AC_DEFINE(HAVE_ENOSTR, 1, [Define if ENOSTR exists.])
+ fi
+
+ AC_MSG_CHECKING([for ETIME])
+ AC_CACHE_VAL(ac_system_error_8, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ETIME; ],
+ [ac_system_error_8=yes], [ac_system_error_8=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_8)
+ if test x"$ac_system_error_8" = x"yes"; then
+ AC_DEFINE(HAVE_ETIME, 1, [Define if ETIME exists.])
+ fi
+
+ AC_MSG_CHECKING([for sys_nerr])
+ AC_CACHE_VAL(ac_system_error9, [
+ AC_TRY_COMPILE([#include <errno.h> ], [ int i = sys_nerr; ],
+ [ac_system_error9=yes], [ac_system_error9=no])
+ ])
+ AC_MSG_RESULT($ac_system_error9)
+ if test x"$ac_system_error9" = x"yes"; then
+ AC_DEFINE(HAVE_SYS_NERR, 1, [Define if sys_nerr exists.])
+ fi
+
+ AC_MSG_CHECKING([for EBADMSG])
+ AC_CACHE_VAL(ac_system_error_10, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = EBADMSG; ],
+ [ac_system_error_10=yes], [ac_system_error_10=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_10)
+ if test x"$ac_system_error_10" = x"yes"; then
+ AC_DEFINE(HAVE_EBADMSG, 1, [Define if EBADMSG exists.])
+ fi
+
+ AC_MSG_CHECKING([for ECANCELED])
+ AC_CACHE_VAL(ac_system_error_11, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ECANCELED; ],
+ [ac_system_error_11=yes], [ac_system_error_11=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_11)
+ if test x"$ac_system_error_11" = x"yes"; then
+ AC_DEFINE(HAVE_ECANCELED, 1, [Define if ECANCELED exists.])
+ fi
+
+ AC_MSG_CHECKING([for EOVERFLOW])
+ AC_CACHE_VAL(ac_system_error_12, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = EOVERFLOW; ],
+ [ac_system_error_12=yes], [ac_system_error_12=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_12)
+ if test x"$ac_system_error_12" = x"yes"; then
+ AC_DEFINE(HAVE_EOVERFLOW, 1, [Define if EOVERFLOW exists.])
+ fi
+
+ AC_MSG_CHECKING([for ENOTSUP])
+ AC_CACHE_VAL(ac_system_error_13, [
+ AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOTSUP; ],
+ [ac_system_error_13=yes], [ac_system_error_13=no])
+ ])
+ AC_MSG_RESULT($ac_system_error_13)
+ if test x"$ac_system_error_13" = x"yes"; then
+ AC_DEFINE(HAVE_ENOTSUP, 1, [Define if ENOTSUP exists.])
+ fi
+])
+
+dnl
dnl Check for what type of C headers to use.
dnl
dnl --enable-cheaders= [does stuff].
@@ -1609,6 +1794,35 @@ AC_DEFUN([GLIBCXX_ENABLE_CONCEPT_CHECKS], [
fi
])
+dnl
+dnl Check for parallel mode pre-requisites, including OpenMP support.
+dnl
+dnl + Usage: GLIBCXX_ENABLE_PARALLEL
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_PARALLEL], [
+
+ # NB: libstdc++ may be configured before libgomp: can't check for the actual
+ # dependencies (omp.h and libgomp).
+ enable_parallel=no;
+ if test -f $glibcxx_builddir/../libgomp/omp.h; then
+ enable_parallel=yes;
+ else
+ AC_MSG_NOTICE([$glibcxx_builddir/../libgomp/omp.h not found])
+ fi
+
+ # Check to see if it's explicitly disabled.
+# GLIBCXX_ENABLE(libgomp,$1,,[enable code depending on libgomp],
+# [permit yes|no])
+
+# if test x$enable_libgomp = xno; then
+# enable_parallel=no
+# fi
+
+ AC_MSG_CHECKING([for parallel mode support])
+ AC_MSG_RESULT([$enable_parallel])
+ GLIBCXX_CONDITIONAL(ENABLE_PARALLEL, test $enable_parallel = yes)
+])
+
dnl
dnl Check for which I/O library to use: stdio, or something specific.
@@ -1956,7 +2170,7 @@ AC_DEFUN([GLIBCXX_ENABLE_PCH], [
GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_PCH, test $enable_libstdcxx_pch = yes)
if test $enable_libstdcxx_pch = yes; then
- glibcxx_PCHFLAGS="-include bits/stdtr1c++.h"
+ glibcxx_PCHFLAGS="-include bits/stdc++.h"
else
glibcxx_PCHFLAGS=""
fi
@@ -2343,8 +2557,6 @@ AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
-
-# serial 1
AC_DEFUN([AC_LC_MESSAGES], [
AC_CHECK_HEADER(locale.h, [
AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index 66a69892520..baabee6eb6a 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -581,6 +581,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/enable.m4])
+m4_include([../config/futex.m4])
m4_include([../config/iconv.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/lib-ld.m4])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index b6d4967ee8a..4c187f18bad 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -24,6 +24,9 @@
/* Define to 1 if you have the `atanl' function. */
#undef HAVE_ATANL
+/* Define to 1 if the target assembler supports thread-local storage. */
+#undef HAVE_CC_TLS
+
/* Define to 1 if you have the `ceilf' function. */
#undef HAVE_CEILF
@@ -57,9 +60,45 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if EBADMSG exists. */
+#undef HAVE_EBADMSG
+
+/* Define if ECANCELED exists. */
+#undef HAVE_ECANCELED
+
/* Define to 1 if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H
+/* Define if ENODATA exists. */
+#undef HAVE_ENODATA
+
+/* Define if ENOLINK exists. */
+#undef HAVE_ENOLINK
+
+/* Define if ENOSR exists. */
+#undef HAVE_ENOSR
+
+/* Define if ENOSTR exists. */
+#undef HAVE_ENOSTR
+
+/* Define if ENOTRECOVERABLE exists. */
+#undef HAVE_ENOTRECOVERABLE
+
+/* Define if ENOTSUP exists. */
+#undef HAVE_ENOTSUP
+
+/* Define if EOVERFLOW exists. */
+#undef HAVE_EOVERFLOW
+
+/* Define if EOWNERDEAD exists. */
+#undef HAVE_EOWNERDEAD
+
+/* Define if EPROTO exists. */
+#undef HAVE_EPROTO
+
+/* Define if ETIME exists. */
+#undef HAVE_ETIME
+
/* Define to 1 if you have the `expf' function. */
#undef HAVE_EXPF
@@ -111,6 +150,9 @@
/* Define to 1 if you have the `frexpl' function. */
#undef HAVE_FREXPL
+/* Define to 1 if you have the <gconf.h> header file. */
+#undef HAVE_GCONF_H
+
/* Define to 1 if you have the <gconv.h> header file. */
#undef HAVE_GCONV_H
@@ -196,6 +238,9 @@
/* Only used in build directory testsuite_hooks.h. */
#undef HAVE_LIMIT_VMEM
+/* Define if futex syscall is available. */
+#undef HAVE_LINUX_FUTEX
+
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
@@ -328,6 +373,9 @@
/* Define to 1 if you have the <sys/machine.h> header file. */
#undef HAVE_SYS_MACHINE_H
+/* Define if sys_nerr exists. */
+#undef HAVE_SYS_NERR
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
index 4613f4e53d4..4661512fe05 100644
--- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
@@ -66,7 +66,8 @@ GLIBCXX_3.7 {
_ZNSt2_614__convert_to_v*;
# std::__copy_streambufs
- _ZNSt2_617__copy_streambufsI[cw]NS_11char_traitsI[cw]EEEEiPNS_15basic_streambufIT_T0_EES7_;
+ _ZNSt2_617__copy_streambufsI*;
+ _ZNSt2_621__copy_streambufs_eofI*;
# __gnu_cxx::__atomic_add
# __gnu_cxx::__exchange_and_add
@@ -87,6 +88,40 @@ GLIBCXX_3.7 {
_ZN9__gnu_cxx2_69free_list6_M_getE[jm];
_ZN9__gnu_cxx2_69free_list8_M_clearEv;
+ # debug mode
+ _ZN10__gnu_norm15_List_node_base4hook*;
+ _ZN10__gnu_norm15_List_node_base4swap*;
+ _ZN10__gnu_norm15_List_node_base6unhookEv;
+ _ZN10__gnu_norm15_List_node_base7reverseEv;
+ _ZN10__gnu_norm15_List_node_base8transfer*;
+
+ _ZNSt6__norm15_List_node_base4hook*;
+ _ZNSt6__norm15_List_node_base4swap*;
+ _ZNSt6__norm15_List_node_base6unhookEv;
+ _ZNSt6__norm15_List_node_base7reverseEv;
+ _ZNSt6__norm15_List_node_base8transfer*;
+
+ _ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv;
+ _ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv;
+ _ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv;
+ _ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv;
+ _ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_;
+
+ _ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb;
+ _ZN11__gnu_debug19_Safe_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb;
+ _ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv;
+ _ZN11__gnu_debug19_Safe_iterator_base16_M_detach_singleEv;
+ _ZN11__gnu_debug19_Safe_iterator_base12_M_get_mutexEv;
+ _ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv;
+ _ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_;
+
+ _ZNK11__gnu_debug16_Error_formatter10_M_message*;
+ _ZNK11__gnu_debug16_Error_formatter10_Parameter*;
+ _ZNK11__gnu_debug16_Error_formatter13_M_print_word*;
+ _ZNK11__gnu_debug16_Error_formatter15_M_print_string*;
+ _ZNK11__gnu_debug16_Error_formatter8_M_error*;
+ _ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv;
+
local:
*;
};
@@ -164,7 +199,7 @@ CXXABI_1.7 {
_ZTVN10__cxxabiv120__si_class_type_infoE;
_ZTVN10__cxxabiv121__vmi_class_type_infoE;
- # typeinfo structure (and some names)
+ # typeinfo structure
_ZTI[a-z];
_ZTIP[a-z];
_ZTIPK[a-z];
@@ -178,6 +213,8 @@ CXXABI_1.7 {
_ZTIN10__cxxabiv119__pointer_type_infoE;
_ZTIN10__cxxabiv120__si_class_type_infoE;
_ZTIN10__cxxabiv121__vmi_class_type_infoE;
+ _ZTIN10__cxxabiv115__forced_unwindE;
+ _ZTIN10__cxxabiv119__foreign_exceptionE;
# typeinfo name
_ZTS[a-z];
@@ -200,11 +237,3 @@ CXXABI_1.7 {
local:
*;
};
-
-CXXABI_1.7.1 {
-
- # typeinfo structures
- _ZTIN10__cxxabiv115__forced_unwindE;
- _ZTIN10__cxxabiv119__foreign_exceptionE;
-
-} CXXABI_1.7;
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index a7f378dd236..0467a8032fa 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1,6 +1,6 @@
## Linker script for GNU versioning (GNU ld 2.13.91+ only.)
##
-## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
## Free Software Foundation, Inc.
##
## This file is part of the GNU ISO C++ Library. This library is free
@@ -48,7 +48,7 @@ GLIBCXX_3.4 {
std::basic_ostr[a-d]*;
std::basic_ostr[f-z]*;
std::basic_[p-r]*;
- std::basic_streambuf*;
+# std::basic_streambuf
# std::basic_string
# std::basic_stringbuf
std::basic_stringstream*;
@@ -60,7 +60,8 @@ GLIBCXX_3.4 {
# std::c[i-z]*;
std::c[i-s]*;
std::c[u-z]*;
- std::[d-h]*;
+ std::[d-g]*;
+ std::h[^a]*;
std::i[a-n]*;
std::ios_base::[A-Ha-z]*;
std::ios_base::_M_grow_words*;
@@ -107,7 +108,10 @@ GLIBCXX_3.4 {
# std::string
std::strstream*;
std::strstreambuf*;
- std::[A-Zt-z]*;
+ std::t[a-q]*;
+ std::tr1::h[^a]*;
+ std::t[s-z]*;
+ std::[A-Zu-z]*;
std::_List_node_base::hook*;
std::_List_node_base::swap*;
std::_List_node_base::unhook*;
@@ -229,6 +233,13 @@ GLIBCXX_3.4 {
_ZNKSbIwSt11char_traitsIwESaIwEE9_M_ibeginEv;
_ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_E*;
+ # std::basic_streambuf
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[CD]*;
+ _ZNKSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9]*;
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9][a-z][^t]*;
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE[0-9][0-9][a-z][^t]*;
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EEaSERKS2_;
+
# std::basic_stringbuf
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[CD]*;
_ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][a-r]*;
@@ -447,7 +458,14 @@ GLIBCXX_3.4 {
_ZTVNSt6locale5facetE;
_ZTVS[a-z];
_ZTVSt[0-9][A-Za-z]*;
- _ZTVSt[0-9][0-9][A-Za-z]*;
+# _ZTVSt[0-9][0-9][A-Za-z]*;
+ _ZTVSt[0-9][0-9][A-Z]*;
+ _ZTVSt[0-9][0-9][a-d]*;
+ _ZTVSt[0-9][0-9][f-r]*;
+ _ZTVSt[0-9][0-9][t-z]*;
+ _ZTVSt[0-9][0-9]e[^r]*;
+ _ZTVSt[0-9][0-9]s[^y]*;
+
_ZTVSt11__timepunctI[cw]E;
_ZTVSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
_ZTVSt21__ctype_abstract_baseI[cw]E;
@@ -459,14 +477,23 @@ GLIBCXX_3.4 {
# typeinfo structure
_ZTIS[a-z];
- _ZTINSt8ios_base7failureE;
- _ZTINSt6locale5facetE;
_ZTISt[0-9][A-Za-z]*;
- _ZTISt[0-9][0-9][A-Za-z]*;
+# _ZTISt[0-9][0-9][A-Za-z]*;
+ _ZTISt[0-9][0-9][A-Z]*;
+ _ZTISt[0-9][0-9][a-d]*;
+ _ZTISt[0-9][0-9][f-r]*;
+ _ZTISt[0-9][0-9][t-z]*;
+ _ZTISt[0-9][0-9]e[^r]*;
+ _ZTISt[0-9][0-9]s[^y]*;
_ZTISt11__timepunctI[cw]E;
_ZTISt10__num_base;
_ZTISt21__ctype_abstract_baseI[cw]E;
_ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
+# _ZTISt16__numpunct_cacheI[cw]E;
+# _ZTISt17__timepunct_cacheI[cw]E;
+# _ZTISt18__moneypunct_cacheI[cw]Lb?EE;
+ _ZTINSt8ios_base7failureE;
+ _ZTINSt6locale5facetE;
_ZTIN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
_ZTIN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
@@ -475,7 +502,14 @@ GLIBCXX_3.4 {
_ZTSNSt6locale5facetE;
_ZTSS[a-z];
_ZTSSt[0-9][A-Za-z]*;
- _ZTSSt[0-9][0-9][A-Za-z]*;
+# _ZTSSt[0-9][0-9][A-Za-z]*;
+ _ZTSSt[0-9][0-9][A-Z]*;
+ _ZTSSt[0-9][0-9][a-d]*;
+ _ZTSSt[0-9][0-9][f-r]*;
+ _ZTSSt[0-9][0-9][t-z]*;
+ _ZTSSt[0-9][0-9]e[^r]*;
+ _ZTSSt[0-9][0-9]s[^y]*;
+
_ZTSSt11__timepunctI[cw]E;
_ZTSSt10__num_base;
_ZTSSt21__ctype_abstract_baseI[cw]E;
@@ -719,6 +753,53 @@ GLIBCXX_3.4.10 {
_ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv;
+ # system_error
+ _ZSt15system_category;
+
+ _ZTISt14error_category;
+ _ZTSSt14error_category;
+ _ZTVSt14error_category;
+
+ _ZTSSt12system_error;
+ _ZTISt12system_error;
+ _ZTVSt12system_error;
+ _ZNSt12system_errorD*Ev;
+ _ZNSt12system_errorC*;
+
+ _ZNKSt3tr14hashIRKSbIwSt11char_traitsIwESaIwEEEclES6_;
+ _ZNKSt3tr14hashIRKSsEclES2_;
+ _ZNKSt3tr14hashISbIwSt11char_traitsIwESaIwEEEclES4_;
+ _ZNKSt3tr14hashISsEclESs;
+ _ZNKSt3tr14hashI[eg]EclE[eg];
+
+ _ZNKSt4hashIRKSbIwSt11char_traitsIwESaIwEEEclES5_;
+ _ZNKSt4hashIRKSsEclES1_;
+ _ZNKSt4hashISbIwSt11char_traitsIwESaIwEEEclES3_;
+ _ZNKSt4hashISsEclESs;
+ _ZNKSt4hashISt10error_codeEclES0_;
+ _ZNKSt4hashI[eg]EclE[eg];
+
+ _ZSt17__verify_grouping*;
+
+ _ZNSt8__detail12__prime_listE;
+ _ZNSt3tr18__detail12__prime_listE;
+
+ # for parallel mode
+ _ZN14__gnu_parallel9_Settings3getEv;
+ _ZN14__gnu_parallel9_Settings3setERS0_;
+
+ _ZNSt9__cxx199815_List_node_base4hook*;
+ _ZNSt9__cxx199815_List_node_base4swap*;
+ _ZNSt9__cxx199815_List_node_base6unhookEv;
+ _ZNSt9__cxx199815_List_node_base7reverseEv;
+ _ZNSt9__cxx199815_List_node_base8transfer*;
+
+ _ZNSt15basic_streambufI[cw]St11char_traitsI[cw]EE6stosscEv;
+
+
+ _ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EE4syncEv;
+ _ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EE[5-9CD]*;
+
} GLIBCXX_3.4.9;
# Symbols in the support library (libsupc++) have their own tag.
diff --git a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
index e56c20067ca..b6b88e41431 100644
--- a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
+++ b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
@@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. ARM version.
-// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2006, 2008 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
@@ -46,6 +46,9 @@ namespace __cxxabiv1
// guard variable. */
#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
typedef int __guard;
// We also want the element size in array cookies.
@@ -62,6 +65,9 @@ namespace __cxxabiv1
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.
diff --git a/libstdc++-v3/config/cpu/cris/atomicity.h b/libstdc++-v3/config/cpu/cris/atomicity.h
index da16a1aacee..56dd0edcdd5 100644
--- a/libstdc++-v3/config/cpu/cris/atomicity.h
+++ b/libstdc++-v3/config/cpu/cris/atomicity.h
@@ -37,7 +37,20 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
int __tmp;
_Atomic_word __result;
-#if (__CRIS_arch_version >= 10)
+#if (__CRIS_arch_version >= 32)
+ __asm__ __volatile__ (" clearf p \n"
+ "0: \n"
+ " move.d %4,%2 \n"
+ " move.d [%3],%0 \n"
+ " add.d %0,%2 \n"
+ " ax \n"
+ " move.d %2,[%3] \n"
+ " bcs 0b \n"
+ " clearf p \n"
+ : "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
+ : "r" (__mem), "g" (__val), "Q" (*__mem)
+ : "memory");
+#elif (__CRIS_arch_version >= 10)
__asm__ __volatile__ (" clearf \n"
"0: \n"
" move.d %4,%2 \n"
diff --git a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
index 95fd3066c04..2859e83c9be 100644
--- a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
+++ b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h
@@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. Generic version.
-// Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2006, 2008 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
@@ -44,6 +44,9 @@ namespace __cxxabiv1
// The generic ABI uses the first byte of a 64-bit guard variable.
#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
__extension__ typedef int __guard __attribute__((mode (__DI__)));
// __cxa_vec_ctor has void return type.
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc
index 41d914ad859..104f88c96f7 100644
--- a/libstdc++-v3/config/io/basic_file_stdio.cc
+++ b/libstdc++-v3/config/io/basic_file_stdio.cc
@@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -86,27 +86,31 @@ namespace
app = std::ios_base::app,
binary = std::ios_base::binary
};
-
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 596. 27.8.1.3 Table 112 omits "a+" and "a+b" modes.
switch (mode & (in|out|trunc|app|binary))
{
- case ( out ): return "w";
- case ( out |app ): return "a";
- case ( out|trunc ): return "w";
- case (in ): return "r";
- case (in|out ): return "r+";
- case (in|out|trunc ): return "w+";
- // Extension to Table 92.
- case (in|out |app ): return "a+";
-
- case ( out |binary): return "wb";
- case ( out |app|binary): return "ab";
- case ( out|trunc |binary): return "wb";
- case (in |binary): return "rb";
+ case ( out ): return "w";
+ case ( out |app ): return "a";
+ case ( app ): return "a";
+ case ( out|trunc ): return "w";
+ case (in ): return "r";
+ case (in|out ): return "r+";
+ case (in|out|trunc ): return "w+";
+ case (in|out |app ): return "a+";
+ case (in |app ): return "a+";
+
+ case ( out |binary): return "wb";
+ case ( out |app|binary): return "ab";
+ case ( app|binary): return "ab";
+ case ( out|trunc |binary): return "wb";
+ case (in |binary): return "rb";
case (in|out |binary): return "r+b";
case (in|out|trunc |binary): return "w+b";
- // Extension to Table 92.
case (in|out |app|binary): return "a+b";
-
+ case (in |app|binary): return "a+b";
+
default: return 0; // invalid
}
}
diff --git a/libstdc++-v3/config/os/aix/os_defines.h b/libstdc++-v3/config/os/aix/os_defines.h
index 8f1f8138ab6..2aa9f7fc2cb 100644
--- a/libstdc++-v3/config/os/aix/os_defines.h
+++ b/libstdc++-v3/config/os/aix/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for AIX -*- C++ -*-
-// Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2005, 2008 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
@@ -48,4 +48,9 @@
#define _ALL_SOURCE
#endif
+// C99 math
+#ifndef __COMPATMATH__
+#define __COMPATMATH__
+#endif
+
#endif
diff --git a/libstdc++-v3/config/os/generic/error_constants.h b/libstdc++-v3/config/os/generic/error_constants.h
new file mode 100644
index 00000000000..bec1fe42d8f
--- /dev/null
+++ b/libstdc++-v3/config/os/generic/error_constants.h
@@ -0,0 +1,177 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 error_constants.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+namespace posix_error
+{
+ enum posix_errno
+ {
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ bad_message = EBADMSG,
+#endif
+
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+ identifier_removed = EIDRM,
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ no_link = ENOLINK,
+#endif
+
+ no_lock_available = ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+ no_message_available = ENODATA,
+#endif
+
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+ no_stream_resources = ENOSR,
+#endif
+
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ not_a_stream = ENOSTR,
+#endif
+
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+ not_supported = ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+ operation_canceled = ECANCELED,
+#endif
+
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ owner_dead = EOWNERDEAD,
+#endif
+
+ permission_denied = EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+ protocol_error = EPROTO,
+#endif
+
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ state_not_recoverable = ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+ stream_timeout = ETIME,
+#endif
+
+ text_file_busy = ETXTBSY,
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_synbolic_link_levels = ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+ value_too_large = EOVERFLOW,
+#endif
+
+ wrong_protocol_type = EPROTOTYPE,
+ no_posix_equivalent = 1L << 16
+ };
+}
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h
new file mode 100644
index 00000000000..27af22225d5
--- /dev/null
+++ b/libstdc++-v3/config/os/mingw32/error_constants.h
@@ -0,0 +1,133 @@
+// Specific definitions for mingw32 platform -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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 error_constants.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+# define _GLIBCXX_ERROR_CONSTANTS
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+namespace posix_error {
+// Most of the commented-out error codes are socket-related and could be
+// replaced by Winsock WSA-prefixed equivalents.
+ enum posix_errno
+ {
+// address_family_not_supported = EAFNOSUPPORT,
+// address_in_use = EADDRINUSE,
+// address_not_available = EADDRNOTAVAIL,
+// already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+// bad_message = EBADMSG,
+ broken_pipe = EPIPE,
+// connection_aborted = ECONNABORTED,
+// connection_already_in_progress = EALREADY,
+// connection_refused = ECONNREFUSED,
+// connection_reset = ECONNRESET,
+// cross_device_link = EXDEV,
+// destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+// host_unreachable = EHOSTUNREACH,
+// identifier_removed = EIDRM,
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+// message_size = EMSGSIZE,
+// network_down = ENETDOWN,
+// network_reset = ENETRESET,
+// network_unreachable = ENETUNREACH,
+// no_buffer_space = ENOBUFS,
+// no_child_process = ECHILD,
+// no_link = ENOLINK,
+ no_lock_available = ENOLCK,
+// no_message_available = ENODATA,
+// no_message = ENOMSG,
+// no_protocol_option = ENOPROTOOPT,
+// no_space_on_device = ENOSPC,
+// no_stream_resources = ENOSR,
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+// not_a_socket = ENOTSOCK,
+// not_a_stream = ENOSTR,
+// not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+// not_supported = ENOTSUP,
+// operation_canceled = ECANCELED,
+// operation_in_progress = EINPROGRESS,
+// operation_not_permitted = EPERM,
+// operation_not_supported = EOPNOTSUPP,
+// operation_would_block = EWOULDBLOCK,
+// owner_dead = EOWNERDEAD,
+ permission_denied = EACCES,
+// protocol_error = EPROTO,
+// protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+// state_not_recoverable = ENOTRECOVERABLE,
+// stream_timeout = ETIME,
+// text_file_busy = ETXTBSY,
+// timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ // too_many_synbolic_link_levels = ELOOP,
+ // value_too_large = EOVERFLOW,
+ // wrong_protocol_type = EPROTOTYPE,
+ no_posix_equivalent = 1L << 16
+ };
+}
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 8e78be89292..e23e3df06f1 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CPP CPPFLAGS EGREP LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM lt_ECHO LDFLAGS CXXCPP enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_C_GLOBAL_TRUE GLIBCXX_C_HEADERS_C_GLOBAL_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE GLIBCXX_C_HEADERS_EXTRA_TRUE GLIBCXX_C_HEADERS_EXTRA_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV LTLIBICONV SYMVER_FILE port_specific_symbol_files ENABLE_SYMVERS_TRUE ENABLE_SYMVERS_FALSE ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_GNU_NAMESPACE_TRUE ENABLE_SYMVERS_GNU_NAMESPACE_FALSE ENABLE_SYMVERS_DARWIN_TRUE ENABLE_SYMVERS_DARWIN_FALSE ENABLE_VISIBILITY_TRUE ENABLE_VISIBILITY_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CPP CPPFLAGS EGREP LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM lt_ECHO LDFLAGS CXXCPP enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_C_GLOBAL_TRUE GLIBCXX_C_HEADERS_C_GLOBAL_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE GLIBCXX_C_HEADERS_EXTRA_TRUE GLIBCXX_C_HEADERS_EXTRA_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE ENABLE_PARALLEL_TRUE ENABLE_PARALLEL_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV LTLIBICONV SYMVER_FILE port_specific_symbol_files ENABLE_SYMVERS_TRUE ENABLE_SYMVERS_FALSE ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_GNU_NAMESPACE_TRUE ENABLE_SYMVERS_GNU_NAMESPACE_FALSE ENABLE_SYMVERS_DARWIN_TRUE ENABLE_SYMVERS_DARWIN_FALSE ENABLE_VISIBILITY_TRUE ENABLE_VISIBILITY_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ATOMIC_FLAGS CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR ERROR_CONSTANTS_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1053,6 +1053,8 @@ Optional Features:
memory [default=no]
--enable-tls Use thread-local storage [default=yes]
--disable-rpath do not hardcode runtime library paths
+ --enable-linux-futex use the Linux futex system call
+ [default=default]
--enable-symvers=STYLE enables symbol versioning of the shared library
[default=yes]
--enable-visibility enables visibility safe usage [default=yes]
@@ -2419,7 +2421,7 @@ echo "${ECHO_T}$ac_cv_prog_egrep" >&6
# expandable list at autoconf time; the second provides an expandable list
# (i.e., shell variable) at configure time.
- SUBDIRS='include libmath libsupc++ src po testsuite'
+ SUBDIRS='include libmath libsupc++ src doc po testsuite'
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
@@ -4643,13 +4645,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4646: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4648: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4649: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4651: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4652: output\"" >&5)
+ (eval echo "\"\$as_me:4654: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -4905,7 +4907,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[4-9]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5693,7 +5695,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5696 "configure"' > conftest.$ac_ext
+ echo '#line 5698 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7155,11 +7157,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7158: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7160: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7162: \$? = $ac_status" >&5
+ echo "$as_me:7164: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7477,11 +7479,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7480: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7482: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7484: \$? = $ac_status" >&5
+ echo "$as_me:7486: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7582,11 +7584,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7585: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7587: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7589: \$? = $ac_status" >&5
+ echo "$as_me:7591: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7637,11 +7639,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7640: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7642: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7644: \$? = $ac_status" >&5
+ echo "$as_me:7646: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7785,7 +7787,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@@ -8019,7 +8021,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -8039,7 +8041,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -9114,7 +9116,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -10489,7 +10491,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10492 "configure"
+#line 10494 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10589,7 +10591,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10592 "configure"
+#line 10594 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10772,7 +10774,7 @@ echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -11089,7 +11091,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -11102,7 +11104,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
*-brtl*)
@@ -12369,7 +12371,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
esac
else
case $host_os in
- aix4* | aix5*)
+ aix[4-9]*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
@@ -12627,11 +12629,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12630: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12632: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12634: \$? = $ac_status" >&5
+ echo "$as_me:12636: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12726,11 +12728,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12729: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12731: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12733: \$? = $ac_status" >&5
+ echo "$as_me:12735: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12778,11 +12780,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12781: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12783: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12785: \$? = $ac_status" >&5
+ echo "$as_me:12787: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12839,7 +12841,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- aix4* | aix5*)
+ aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
@@ -13029,7 +13031,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -13792,7 +13794,7 @@ _ACEOF
-# Check for compiler support that doesn't require linking.
+# Enable compiler support that doesn't require linking.
echo "$as_me:$LINENO: checking for exception model to use" >&5
echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6
@@ -13827,7 +13829,7 @@ fi;
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 13830 "configure"
+#line 13832 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -13949,14 +13951,14 @@ echo "${ECHO_T}$enable_libstdcxx_pch" >&6
if test $enable_libstdcxx_pch = yes; then
- glibcxx_PCHFLAGS="-include bits/stdtr1c++.h"
+ glibcxx_PCHFLAGS="-include bits/stdc++.h"
else
glibcxx_PCHFLAGS=""
fi
-# Enable all the variable C++ runtime options.
+# Enable all the variable C++ runtime options that doesn't require linking.
echo "$as_me:$LINENO: checking for underlying I/O to use" >&5
echo $ECHO_N "checking for underlying I/O to use... $ECHO_C" >&6
@@ -15436,6 +15438,102 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities - like pre-standard snprintf - may be
+ # spuriously enabled.
+ # Long term, -std=c++0x could be even better, could manage to explicitely
+ # request C99 facilities to the underlying C headers.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+ ac_save_LIBS="$LIBS"
+ ac_save_gcc_no_link="$gcc_no_link"
+
+ if test x$gcc_no_link != xyes; then
+ # Use -fno-exceptions to that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+int
+main ()
+{
+sin ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+
+ LIBS="$LIBS -lm"
+
+else
+
+ # Use the default compile-only tests in GCC_TRY_COMPILE_OR_LINK
+ gcc_no_link=yes
+
+fi
+
+ fi
+
# Check for the existence of <math.h> functions used if C99 is enabled.
echo "$as_me:$LINENO: checking for ISO C99 support in <math.h>" >&5
echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
@@ -15443,6 +15541,7 @@ echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -15450,22 +15549,24 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
-fpclassify(0.0);
- isfinite(0.0);
- isinf(0.0);
- isnan(0.0);
- isnormal(0.0);
- signbit(0.0);
- isgreater(0.0,0.0);
- isgreaterequal(0.0,0.0);
- isless(0.0,0.0);
- islessequal(0.0,0.0);
- islessgreater(0.0,0.0);
- islessgreater(0.0,0.0);
- isunordered(0.0,0.0);
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
@@ -15501,6 +15602,74 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_math=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_math=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -15826,55 +15995,62 @@ done
if test x"$ac_has_complex_h" = x"yes"; then
echo "$as_me:$LINENO: checking for ISO C99 support in <complex.h>" >&5
echo $ECHO_N "checking for ISO C99 support in <complex.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ if test x$gcc_no_link = xyes; then
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float float_type; float_type tmpf;
- cabsf(tmpf);
- cargf(tmpf);
- ccosf(tmpf);
- ccoshf(tmpf);
- cexpf(tmpf);
- clogf(tmpf);
- csinf(tmpf);
- csinhf(tmpf);
- csqrtf(tmpf);
- ctanf(tmpf);
- ctanhf(tmpf);
- cpowf(tmpf, tmpf);
- typedef __complex__ double double_type; double_type tmpd;
- cabs(tmpd);
- carg(tmpd);
- ccos(tmpd);
- ccosh(tmpd);
- cexp(tmpd);
- clog(tmpd);
- csin(tmpd);
- csinh(tmpd);
- csqrt(tmpd);
- ctan(tmpd);
- ctanh(tmpd);
- cpow(tmpd, tmpd);
- typedef __complex__ long double ld_type; ld_type tmpld;
- cabsl(tmpld);
- cargl(tmpld);
- ccosl(tmpld);
- ccoshl(tmpld);
- cexpl(tmpld);
- clogl(tmpld);
- csinl(tmpld);
- csinhl(tmpld);
- csqrtl(tmpld);
- ctanl(tmpld);
- ctanhl(tmpld);
- cpowl(tmpld, tmpld);
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
;
return 0;
@@ -15910,6 +16086,104 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_complex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_complex=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
echo "$as_me:$LINENO: result: $ac_c99_complex" >&5
echo "${ECHO_T}$ac_c99_complex" >&6
@@ -15928,6 +16202,7 @@ echo $ECHO_N "checking for ISO C99 support in <stdio.h>... $ECHO_C" >&6
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -15935,15 +16210,15 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }
int
main ()
{
@@ -15982,6 +16257,68 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_stdio=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }
+int
+main ()
+{
+snprintf("12", 0, "%i");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_stdio=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -15995,6 +16332,7 @@ echo $ECHO_N "checking for ISO C99 support in <stdlib.h>... $ECHO_C" >&6
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -16002,19 +16340,25 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- strtof("gnu", &tmp);
- strtold("gnu", &tmp);
- strtoll("gnu", &tmp, 10);
- strtoull("gnu", &tmp, 10);
- llabs(10);
- lldiv(10,1);
- atoll("10");
- _Exit(0);
- lldiv_t mydivt;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+
;
return 0;
}
@@ -16049,6 +16393,74 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_stdlib=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
+int
+main ()
+{
+char* tmp;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_stdlib=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -16386,6 +16798,9 @@ _ACEOF
fi
+ gcc_no_link="$ac_save_gcc_no_link"
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -16468,6 +16883,32 @@ fi;
echo "${ECHO_T}$enable_libstdcxx_debug" >&6
+
+
+ # NB: libstdc++ may be configured before libgomp: can't check for the actual
+ # dependencies (omp.h and libgomp).
+ enable_parallel=no;
+ if test -f $glibcxx_builddir/../libgomp/omp.h; then
+ enable_parallel=yes;
+ else
+ { echo "$as_me:$LINENO: $glibcxx_builddir/../libgomp/omp.h not found" >&5
+echo "$as_me: $glibcxx_builddir/../libgomp/omp.h not found" >&6;}
+ fi
+
+ # Check to see if it's explicitly disabled.
+# GLIBCXX_ENABLE(libgomp,,,[enable code depending on libgomp],
+# [permit yes|no])
+
+# if test x$enable_libgomp = xno; then
+# enable_parallel=no
+# fi
+
+ echo "$as_me:$LINENO: checking for parallel mode support" >&5
+echo $ECHO_N "checking for parallel mode support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_parallel" >&5
+echo "${ECHO_T}$enable_parallel" >&6
+
+
echo "$as_me:$LINENO: checking for extra compiler flags for building" >&5
echo $ECHO_N "checking for extra compiler flags for building... $ECHO_C" >&6
# Check whether --enable-cxx-flags or --disable-cxx-flags was given.
@@ -16530,6 +16971,842 @@ _ACEOF
fi
+# Checks for operating systems support that don't require linking.
+
+
+ echo "$as_me:$LINENO: checking for EOWNERDEAD" >&5
+echo $ECHO_N "checking for EOWNERDEAD... $ECHO_C" >&6
+ if test "${ac_system_error1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = EOWNERDEAD;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error1" >&5
+echo "${ECHO_T}$ac_system_error1" >&6
+ if test x"$ac_system_error1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EOWNERDEAD 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENOTRECOVERABLE" >&5
+echo $ECHO_N "checking for ENOTRECOVERABLE... $ECHO_C" >&6
+ if test "${ac_system_error2+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENOTRECOVERABLE;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error2=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error2=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error2" >&5
+echo "${ECHO_T}$ac_system_error2" >&6
+ if test x"$ac_system_error2" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOTRECOVERABLE 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENOLINK" >&5
+echo $ECHO_N "checking for ENOLINK... $ECHO_C" >&6
+ if test "${ac_system_error3+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENOLINK;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error3=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error3=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error3" >&5
+echo "${ECHO_T}$ac_system_error3" >&6
+ if test x"$ac_system_error3" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOLINK 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for EPROTO" >&5
+echo $ECHO_N "checking for EPROTO... $ECHO_C" >&6
+ if test "${ac_system_error_4+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = EPROTO;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_4=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_4=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_4" >&5
+echo "${ECHO_T}$ac_system_error_4" >&6
+ if test x"$ac_system_error_4" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EPROTO 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENODATA" >&5
+echo $ECHO_N "checking for ENODATA... $ECHO_C" >&6
+ if test "${ac_system_error_5+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENODATA;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_5=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_5=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_5" >&5
+echo "${ECHO_T}$ac_system_error_5" >&6
+ if test x"$ac_system_error_5" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENODATA 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENOSR" >&5
+echo $ECHO_N "checking for ENOSR... $ECHO_C" >&6
+ if test "${ac_system_error_6+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENOSR;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_6=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_6=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_6" >&5
+echo "${ECHO_T}$ac_system_error_6" >&6
+ if test x"$ac_system_error_6" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOSR 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENOSTR" >&5
+echo $ECHO_N "checking for ENOSTR... $ECHO_C" >&6
+ if test "${ac_system_error_7+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENOSTR;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_7=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_7=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_7" >&5
+echo "${ECHO_T}$ac_system_error_7" >&6
+ if test x"$ac_system_error_7" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOSTR 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ETIME" >&5
+echo $ECHO_N "checking for ETIME... $ECHO_C" >&6
+ if test "${ac_system_error_8+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ETIME;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_8=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_8=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_8" >&5
+echo "${ECHO_T}$ac_system_error_8" >&6
+ if test x"$ac_system_error_8" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ETIME 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for sys_nerr" >&5
+echo $ECHO_N "checking for sys_nerr... $ECHO_C" >&6
+ if test "${ac_system_error9+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = sys_nerr;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error9=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error9=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error9" >&5
+echo "${ECHO_T}$ac_system_error9" >&6
+ if test x"$ac_system_error9" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_NERR 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for EBADMSG" >&5
+echo $ECHO_N "checking for EBADMSG... $ECHO_C" >&6
+ if test "${ac_system_error_10+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = EBADMSG;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_10=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_10=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_10" >&5
+echo "${ECHO_T}$ac_system_error_10" >&6
+ if test x"$ac_system_error_10" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EBADMSG 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ECANCELED" >&5
+echo $ECHO_N "checking for ECANCELED... $ECHO_C" >&6
+ if test "${ac_system_error_11+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ECANCELED;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_11=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_11=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_11" >&5
+echo "${ECHO_T}$ac_system_error_11" >&6
+ if test x"$ac_system_error_11" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ECANCELED 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for EOVERFLOW" >&5
+echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6
+ if test "${ac_system_error_12+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = EOVERFLOW;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_12=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_12=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_12" >&5
+echo "${ECHO_T}$ac_system_error_12" >&6
+ if test x"$ac_system_error_12" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EOVERFLOW 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for ENOTSUP" >&5
+echo $ECHO_N "checking for ENOTSUP... $ECHO_C" >&6
+ if test "${ac_system_error_13+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+ int i = ENOTSUP;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_system_error_13=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_system_error_13=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_system_error_13" >&5
+echo "${ECHO_T}$ac_system_error_13" >&6
+ if test x"$ac_system_error_13" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENOTSUP 1
+_ACEOF
+
+ fi
+
+
# No surprises, no surprises...
echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
@@ -16571,7 +17848,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 16574 "configure"
+#line 17851 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -38320,6 +39597,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities may be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+
# Check for the existence of <complex.h> complex math functions used
# by tr1/complex.
@@ -39337,6 +40619,7 @@ fi
done
+ CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -39427,7 +40710,7 @@ fi;
echo "$as_me:$LINENO: checking whether the target supports thread-local storage" >&5
echo $ECHO_N "checking whether the target supports thread-local storage... $ECHO_C" >&6
-if test "${have_tls+set}" = set; then
+if test "${gcc_cv_have_tls+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -39462,12 +40745,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- have_tls=yes
+ gcc_cv_have_tls=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-have_tls=no
+gcc_cv_have_tls=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -39541,14 +40824,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- have_tls=yes
+ gcc_cv_have_tls=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-have_tls=no
+gcc_cv_have_tls=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
@@ -39556,12 +40839,12 @@ else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-have_tls=yes
+gcc_cv_have_tls=yes
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$chktls_save_LDFLAGS"
- if test $have_tls = yes; then
+ if test $gcc_cv_have_tls = yes; then
chktls_save_CFLAGS="$CFLAGS"
thread_CFLAGS=failed
for flag in '' '-pthread' '-lpthread'; do
@@ -39674,14 +40957,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- have_tls=yes
+ gcc_cv_have_tls=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-have_tls=no
+gcc_cv_have_tls=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
@@ -39694,14 +40977,14 @@ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-have_tls=no
+gcc_cv_have_tls=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:$LINENO: result: $have_tls" >&5
-echo "${ECHO_T}$have_tls" >&6
- if test "$enable_tls $have_tls" = "yes yes"; then
+echo "$as_me:$LINENO: result: $gcc_cv_have_tls" >&5
+echo "${ECHO_T}$gcc_cv_have_tls" >&6
+ if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_TLS 1
@@ -41471,6 +42754,21001 @@ case "${host}" in
# This is a freestanding configuration; there is nothing to do here.
;;
+ mips*-sde-elf*)
+ # These definitions are for the SDE C library rather than newlib.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in float.h inttypes.h locale.h \
+ stdint.h stdlib.h string.h unistd.h wchar.h \
+ machine/endian.h sys/ioctl.h sys/resource.h \
+ sys/stat.h sys/time.h sys/types.h sys/uio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+
+ # All these tests are for C++; save the language and the compiler flags.
+ # The CXXFLAGS thing is suspicious, but based on similar bits previously
+ # found in GLIBCXX_CONFIGURE.
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+
+ # Check for maintainer-mode bits.
+ if test x"$USE_MAINTAINER_MODE" = xno; then
+ WERROR=''
+ else
+ WERROR='-Werror'
+ fi
+
+ # Check for -ffunction-sections -fdata-sections
+ echo "$as_me:$LINENO: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
+echo $ECHO_N "checking for g++ that supports -ffunction-sections -fdata-sections... $ECHO_C" >&6
+ CXXFLAGS='-g -Werror -ffunction-sections -fdata-sections'
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int foo; void bar() { };
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_fdsections=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_fdsections=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ else
+ # this is the suspicious part
+ CXXFLAGS=''
+ fi
+ if test x"$ac_fdsections" = x"yes"; then
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ fi
+ echo "$as_me:$LINENO: result: $ac_fdsections" >&5
+echo "${ECHO_T}$ac_fdsections" >&6
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+ # If we're not using GNU ld, then there's no point in even trying these
+ # tests. Check for that first. We should have already tested for gld
+ # by now (in libtool), but require it now just to be safe...
+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+
+
+
+ # The name set by libtool depends on the version of libtool. Shame on us
+ # for depending on an impl detail, but c'est la vie. Older versions used
+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
+ # set (hence we're using an older libtool), then set it.
+ if test x${with_gnu_ld+set} != xset; then
+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
+ with_gnu_ld=no
+ else
+ with_gnu_ld=$ac_cv_prog_gnu_ld
+ fi
+ fi
+
+ # Start by getting the version number. I think the libtool test already
+ # does some of this, but throws away the result.
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld version" >&5
+echo $ECHO_N "checking for ld version... $ECHO_C" >&6
+
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+ echo "$as_me:$LINENO: result: $glibcxx_gnu_ld_version" >&5
+echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
+ fi
+
+ # Set --gc-sections.
+ glibcxx_gcsections_min_ld=21602
+ if test x"$with_gnu_ld" = x"yes" &&
+ test $glibcxx_gnu_ld_version -gt $glibcxx_gcsections_min_ld ; then
+
+ # Sufficiently young GNU ld it is! Joy and bunny rabbits!
+ # NB: This flag only works reliably after 2.16.1. Configure tests
+ # for this are difficult, so hard wire a value that should work.
+
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS='-Wl,--gc-sections'
+
+ # Check for -Wl,--gc-sections
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
+echo $ECHO_N "checking for ld that supports -Wl,--gc-sections... $ECHO_C" >&6
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+ int one(void) { return 1; }
+ int two(void) { return 2; }
+
+int
+main ()
+{
+ two();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_gcsections=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_gcsections=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_gcsections" = "yes"; then
+ rm -f conftest.c
+ touch conftest.c
+ if $CC -c conftest.c; then
+ if $LD --gc-sections -o conftest conftest.o 2>&1 | \
+ grep "Warning: gc-sections option ignored" > /dev/null; then
+ ac_gcsections=no
+ fi
+ fi
+ rm -f conftest.c conftest.o conftest
+ fi
+ if test "$ac_gcsections" = "yes"; then
+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+ fi
+ echo "$as_me:$LINENO: result: $ac_gcsections" >&5
+echo "${ECHO_T}$ac_gcsections" >&6
+
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ # this is the suspicious part
+ CFLAGS=''
+ fi
+ fi
+
+ # Set -z,relro.
+ # Note this is only for shared objects.
+ ac_ld_relro=no
+ if test x"$with_gnu_ld" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ld that supports -Wl,-z,relro" >&5
+echo $ECHO_N "checking for ld that supports -Wl,-z,relro... $ECHO_C" >&6
+ cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ if test -n "$cxx_z_relo"; then
+ OPT_LDFLAGS="-Wl,-z,relro"
+ ac_ld_relro=yes
+ fi
+ echo "$as_me:$LINENO: result: $ac_ld_relro" >&5
+echo "${ECHO_T}$ac_ld_relro" >&6
+ fi
+
+ # Set linker optimization flags.
+ if test x"$with_gnu_ld" = x"yes"; then
+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+ fi
+
+
+
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+ echo "$as_me:$LINENO: checking for sin in -lm" >&5
+echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+int
+main ()
+{
+sin ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
+echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
+if test $ac_cv_lib_m_sin = yes; then
+ libm="-lm"
+fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $libm"
+
+
+
+ echo "$as_me:$LINENO: checking for isinf declaration" >&5
+echo $ECHO_N "checking for isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinf_use" >&6
+
+ if test x$glibcxx_cv_func_isinf_use = x"yes"; then
+
+for ac_func in isinf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinf declaration" >&5
+echo $ECHO_N "checking for _isinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinf_use" >&6
+
+ if test x$glibcxx_cv_func__isinf_use = x"yes"; then
+
+for ac_func in _isinf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for isnan declaration" >&5
+echo $ECHO_N "checking for isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnan_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnan_use" >&6
+
+ if test x$glibcxx_cv_func_isnan_use = x"yes"; then
+
+for ac_func in isnan
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnan declaration" >&5
+echo $ECHO_N "checking for _isnan declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnan_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnan_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnan(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnan_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnan_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnan_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnan_use" >&6
+
+ if test x$glibcxx_cv_func__isnan_use = x"yes"; then
+
+for ac_func in _isnan
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for finite declaration" >&5
+echo $ECHO_N "checking for finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finite_use+set} != xset; then
+ if test "${glibcxx_cv_func_finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finite_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finite_use" >&6
+
+ if test x$glibcxx_cv_func_finite_use = x"yes"; then
+
+for ac_func in finite
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finite declaration" >&5
+echo $ECHO_N "checking for _finite declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finite_use+set} != xset; then
+ if test "${glibcxx_cv_func__finite_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finite(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finite_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finite_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finite_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finite_use" >&6
+
+ if test x$glibcxx_cv_func__finite_use = x"yes"; then
+
+for ac_func in _finite
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for copysign declaration" >&5
+echo $ECHO_N "checking for copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysign_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysign_use" >&6
+
+ if test x$glibcxx_cv_func_copysign_use = x"yes"; then
+
+for ac_func in copysign
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _copysign declaration" >&5
+echo $ECHO_N "checking for _copysign declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysign_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysign_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysign(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysign_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysign_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysign_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysign_use" >&6
+
+ if test x$glibcxx_cv_func__copysign_use = x"yes"; then
+
+for ac_func in _copysign
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for sincos declaration" >&5
+echo $ECHO_N "checking for sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincos_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincos_use" >&6
+
+ if test x$glibcxx_cv_func_sincos_use = x"yes"; then
+
+for ac_func in sincos
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincos declaration" >&5
+echo $ECHO_N "checking for _sincos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincos_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincos(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincos_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincos_use" >&6
+
+ if test x$glibcxx_cv_func__sincos_use = x"yes"; then
+
+for ac_func in _sincos
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for fpclass declaration" >&5
+echo $ECHO_N "checking for fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fpclass_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fpclass_use" >&6
+
+ if test x$glibcxx_cv_func_fpclass_use = x"yes"; then
+
+for ac_func in fpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fpclass declaration" >&5
+echo $ECHO_N "checking for _fpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__fpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fpclass_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fpclass_use" >&6
+
+ if test x$glibcxx_cv_func__fpclass_use = x"yes"; then
+
+for ac_func in _fpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for qfpclass declaration" >&5
+echo $ECHO_N "checking for qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func_qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_qfpclass_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func_qfpclass_use = x"yes"; then
+
+for ac_func in qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _qfpclass declaration" >&5
+echo $ECHO_N "checking for _qfpclass declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__qfpclass_use+set} != xset; then
+ if test "${glibcxx_cv_func__qfpclass_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _qfpclass(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__qfpclass_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__qfpclass_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__qfpclass_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__qfpclass_use" >&6
+
+ if test x$glibcxx_cv_func__qfpclass_use = x"yes"; then
+
+for ac_func in _qfpclass
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for hypot declaration" >&5
+echo $ECHO_N "checking for hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypot_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypot_use" >&6
+
+ if test x$glibcxx_cv_func_hypot_use = x"yes"; then
+
+for ac_func in hypot
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypot declaration" >&5
+echo $ECHO_N "checking for _hypot declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypot_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypot_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypot(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypot_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypot_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypot_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypot_use" >&6
+
+ if test x$glibcxx_cv_func__hypot_use = x"yes"; then
+
+for ac_func in _hypot
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for float trig functions" >&5
+echo $ECHO_N "checking for float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+acosf (0); asinf (0); atanf (0); cosf (0); sinf (0); tanf (0); coshf (0); sinhf (0); tanhf (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_trig_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_trig_use" >&6
+ if test x$glibcxx_cv_func_float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosf asinf atanf cosf sinf tanf coshf sinhf tanhf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ echo "$as_me:$LINENO: checking for _float trig functions" >&5
+echo $ECHO_N "checking for _float trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+_acosf (0); _asinf (0); _atanf (0); _cosf (0); _sinf (0); _tanf (0); _coshf (0); _sinhf (0); _tanhf (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_trig_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_trig_use" >&6
+ if test x$glibcxx_cv_func__float_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosf _asinf _atanf _cosf _sinf _tanf _coshf _sinhf _tanhf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for float round functions" >&5
+echo $ECHO_N "checking for float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ceilf (0); floorf (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_float_round_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_float_round_use" >&6
+ if test x$glibcxx_cv_func_float_round_use = x"yes"; then
+
+
+for ac_func in ceilf floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ echo "$as_me:$LINENO: checking for _float round functions" >&5
+echo $ECHO_N "checking for _float round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__float_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+_ceilf (0); _floorf (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__float_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__float_round_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__float_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__float_round_use" >&6
+ if test x$glibcxx_cv_func__float_round_use = x"yes"; then
+
+
+for ac_func in _ceilf _floorf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for expf declaration" >&5
+echo $ECHO_N "checking for expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expf_use+set} != xset; then
+ if test "${glibcxx_cv_func_expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expf_use" >&6
+
+ if test x$glibcxx_cv_func_expf_use = x"yes"; then
+
+for ac_func in expf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _expf declaration" >&5
+echo $ECHO_N "checking for _expf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expf_use+set} != xset; then
+ if test "${glibcxx_cv_func__expf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expf_use" >&6
+
+ if test x$glibcxx_cv_func__expf_use = x"yes"; then
+
+for ac_func in _expf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for isnanf declaration" >&5
+echo $ECHO_N "checking for isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanf_use" >&6
+
+ if test x$glibcxx_cv_func_isnanf_use = x"yes"; then
+
+for ac_func in isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnanf declaration" >&5
+echo $ECHO_N "checking for _isnanf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanf_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanf_use" >&6
+
+ if test x$glibcxx_cv_func__isnanf_use = x"yes"; then
+
+for ac_func in _isnanf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for isinff declaration" >&5
+echo $ECHO_N "checking for isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinff_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinff_use" >&6
+
+ if test x$glibcxx_cv_func_isinff_use = x"yes"; then
+
+for ac_func in isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinff declaration" >&5
+echo $ECHO_N "checking for _isinff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinff_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinff(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinff_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinff_use" >&6
+
+ if test x$glibcxx_cv_func__isinff_use = x"yes"; then
+
+for ac_func in _isinff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for atan2f declaration" >&5
+echo $ECHO_N "checking for atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2f_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2f_use" >&6
+
+ if test x$glibcxx_cv_func_atan2f_use = x"yes"; then
+
+for ac_func in atan2f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _atan2f declaration" >&5
+echo $ECHO_N "checking for _atan2f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2f_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2f(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2f_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2f_use" >&6
+
+ if test x$glibcxx_cv_func__atan2f_use = x"yes"; then
+
+for ac_func in _atan2f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for fabsf declaration" >&5
+echo $ECHO_N "checking for fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsf_use" >&6
+
+ if test x$glibcxx_cv_func_fabsf_use = x"yes"; then
+
+for ac_func in fabsf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsf declaration" >&5
+echo $ECHO_N "checking for _fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsf_use" >&6
+
+ if test x$glibcxx_cv_func__fabsf_use = x"yes"; then
+
+for ac_func in _fabsf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for fmodf declaration" >&5
+echo $ECHO_N "checking for fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodf_use" >&6
+
+ if test x$glibcxx_cv_func_fmodf_use = x"yes"; then
+
+for ac_func in fmodf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fmodf declaration" >&5
+echo $ECHO_N "checking for _fmodf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodf_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodf_use" >&6
+
+ if test x$glibcxx_cv_func__fmodf_use = x"yes"; then
+
+for ac_func in _fmodf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for frexpf declaration" >&5
+echo $ECHO_N "checking for frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpf_use" >&6
+
+ if test x$glibcxx_cv_func_frexpf_use = x"yes"; then
+
+for ac_func in frexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _frexpf declaration" >&5
+echo $ECHO_N "checking for _frexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpf_use" >&6
+
+ if test x$glibcxx_cv_func__frexpf_use = x"yes"; then
+
+for ac_func in _frexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for hypotf declaration" >&5
+echo $ECHO_N "checking for hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotf_use" >&6
+
+ if test x$glibcxx_cv_func_hypotf_use = x"yes"; then
+
+for ac_func in hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotf declaration" >&5
+echo $ECHO_N "checking for _hypotf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotf_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotf_use" >&6
+
+ if test x$glibcxx_cv_func__hypotf_use = x"yes"; then
+
+for ac_func in _hypotf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for ldexpf declaration" >&5
+echo $ECHO_N "checking for ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpf_use = x"yes"; then
+
+for ac_func in ldexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _ldexpf declaration" >&5
+echo $ECHO_N "checking for _ldexpf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpf_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpf_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpf_use = x"yes"; then
+
+for ac_func in _ldexpf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for logf declaration" >&5
+echo $ECHO_N "checking for logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logf_use+set} != xset; then
+ if test "${glibcxx_cv_func_logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logf_use" >&6
+
+ if test x$glibcxx_cv_func_logf_use = x"yes"; then
+
+for ac_func in logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _logf declaration" >&5
+echo $ECHO_N "checking for _logf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logf_use+set} != xset; then
+ if test "${glibcxx_cv_func__logf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _logf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logf_use" >&6
+
+ if test x$glibcxx_cv_func__logf_use = x"yes"; then
+
+for ac_func in _logf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for log10f declaration" >&5
+echo $ECHO_N "checking for log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10f_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10f_use" >&6
+
+ if test x$glibcxx_cv_func_log10f_use = x"yes"; then
+
+for ac_func in log10f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _log10f declaration" >&5
+echo $ECHO_N "checking for _log10f declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10f_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10f_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _log10f(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10f_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10f_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10f_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10f_use" >&6
+
+ if test x$glibcxx_cv_func__log10f_use = x"yes"; then
+
+for ac_func in _log10f
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for modff declaration" >&5
+echo $ECHO_N "checking for modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modff_use+set} != xset; then
+ if test "${glibcxx_cv_func_modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modff_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modff_use" >&6
+
+ if test x$glibcxx_cv_func_modff_use = x"yes"; then
+
+for ac_func in modff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _modff declaration" >&5
+echo $ECHO_N "checking for _modff declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modff_use+set} != xset; then
+ if test "${glibcxx_cv_func__modff_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modff(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modff_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modff_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modff_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modff_use" >&6
+
+ if test x$glibcxx_cv_func__modff_use = x"yes"; then
+
+for ac_func in _modff
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for modf declaration" >&5
+echo $ECHO_N "checking for modf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modf_use+set} != xset; then
+ if test "${glibcxx_cv_func_modf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modf_use" >&6
+
+ if test x$glibcxx_cv_func_modf_use = x"yes"; then
+
+for ac_func in modf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _modf declaration" >&5
+echo $ECHO_N "checking for _modf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modf_use+set} != xset; then
+ if test "${glibcxx_cv_func__modf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modf_use" >&6
+
+ if test x$glibcxx_cv_func__modf_use = x"yes"; then
+
+for ac_func in _modf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for powf declaration" >&5
+echo $ECHO_N "checking for powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powf_use+set} != xset; then
+ if test "${glibcxx_cv_func_powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powf_use" >&6
+
+ if test x$glibcxx_cv_func_powf_use = x"yes"; then
+
+for ac_func in powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _powf declaration" >&5
+echo $ECHO_N "checking for _powf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powf_use+set} != xset; then
+ if test "${glibcxx_cv_func__powf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powf(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powf_use" >&6
+
+ if test x$glibcxx_cv_func__powf_use = x"yes"; then
+
+for ac_func in _powf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for sqrtf declaration" >&5
+echo $ECHO_N "checking for sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtf_use" >&6
+
+ if test x$glibcxx_cv_func_sqrtf_use = x"yes"; then
+
+for ac_func in sqrtf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtf declaration" >&5
+echo $ECHO_N "checking for _sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtf_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtf_use = x"yes"; then
+
+for ac_func in _sqrtf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for sincosf declaration" >&5
+echo $ECHO_N "checking for sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosf_use" >&6
+
+ if test x$glibcxx_cv_func_sincosf_use = x"yes"; then
+
+for ac_func in sincosf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincosf declaration" >&5
+echo $ECHO_N "checking for _sincosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosf_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosf(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosf_use" >&6
+
+ if test x$glibcxx_cv_func__sincosf_use = x"yes"; then
+
+for ac_func in _sincosf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for finitef declaration" >&5
+echo $ECHO_N "checking for finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitef_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitef_use" >&6
+
+ if test x$glibcxx_cv_func_finitef_use = x"yes"; then
+
+for ac_func in finitef
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitef declaration" >&5
+echo $ECHO_N "checking for _finitef declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitef_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitef_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitef(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitef_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitef_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitef_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitef_use" >&6
+
+ if test x$glibcxx_cv_func__finitef_use = x"yes"; then
+
+for ac_func in _finitef
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for long double trig functions" >&5
+echo $ECHO_N "checking for long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+acosl (0); asinl (0); atanl (0); cosl (0); sinl (0); tanl (0); coshl (0); sinhl (0); tanhl (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_trig_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_trig_use" >&6
+ if test x$glibcxx_cv_func_long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in acosl asinl atanl cosl sinl tanl coshl sinhl tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ echo "$as_me:$LINENO: checking for _long double trig functions" >&5
+echo $ECHO_N "checking for _long double trig functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_trig_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+_acosl (0); _asinl (0); _atanl (0); _cosl (0); _sinl (0); _tanl (0); _coshl (0); _sinhl (0); _tanhl (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_trig_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_trig_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_trig_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_trig_use" >&6
+ if test x$glibcxx_cv_func__long_double_trig_use = x"yes"; then
+
+
+
+
+
+
+
+
+
+for ac_func in _acosl _asinl _atanl _cosl _sinl _tanl _coshl _sinhl _tanhl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for long double round functions" >&5
+echo $ECHO_N "checking for long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func_long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ceill (0); floorl (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_long_double_round_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_long_double_round_use" >&6
+ if test x$glibcxx_cv_func_long_double_round_use = x"yes"; then
+
+
+for ac_func in ceill floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ echo "$as_me:$LINENO: checking for _long double round functions" >&5
+echo $ECHO_N "checking for _long double round functions... $ECHO_C" >&6
+ if test "${glibcxx_cv_func__long_double_round_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+_ceill (0); _floorl (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__long_double_round_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__long_double_round_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__long_double_round_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__long_double_round_use" >&6
+ if test x$glibcxx_cv_func__long_double_round_use = x"yes"; then
+
+
+for ac_func in _ceill _floorl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for isnanl declaration" >&5
+echo $ECHO_N "checking for isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isnanl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isnanl_use" >&6
+
+ if test x$glibcxx_cv_func_isnanl_use = x"yes"; then
+
+for ac_func in isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isnanl declaration" >&5
+echo $ECHO_N "checking for _isnanl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isnanl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isnanl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isnanl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isnanl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isnanl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isnanl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isnanl_use" >&6
+
+ if test x$glibcxx_cv_func__isnanl_use = x"yes"; then
+
+for ac_func in _isnanl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for isinfl declaration" >&5
+echo $ECHO_N "checking for isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_isinfl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_isinfl_use" >&6
+
+ if test x$glibcxx_cv_func_isinfl_use = x"yes"; then
+
+for ac_func in isinfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _isinfl declaration" >&5
+echo $ECHO_N "checking for _isinfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__isinfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__isinfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _isinfl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__isinfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__isinfl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__isinfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__isinfl_use" >&6
+
+ if test x$glibcxx_cv_func__isinfl_use = x"yes"; then
+
+for ac_func in _isinfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for copysignl declaration" >&5
+echo $ECHO_N "checking for copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func_copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_copysignl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_copysignl_use" >&6
+
+ if test x$glibcxx_cv_func_copysignl_use = x"yes"; then
+
+for ac_func in copysignl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _copysignl declaration" >&5
+echo $ECHO_N "checking for _copysignl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__copysignl_use+set} != xset; then
+ if test "${glibcxx_cv_func__copysignl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _copysignl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__copysignl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__copysignl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__copysignl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__copysignl_use" >&6
+
+ if test x$glibcxx_cv_func__copysignl_use = x"yes"; then
+
+for ac_func in _copysignl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for atan2l declaration" >&5
+echo $ECHO_N "checking for atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func_atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_atan2l_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_atan2l_use" >&6
+
+ if test x$glibcxx_cv_func_atan2l_use = x"yes"; then
+
+for ac_func in atan2l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _atan2l declaration" >&5
+echo $ECHO_N "checking for _atan2l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__atan2l_use+set} != xset; then
+ if test "${glibcxx_cv_func__atan2l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _atan2l(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__atan2l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__atan2l_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__atan2l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__atan2l_use" >&6
+
+ if test x$glibcxx_cv_func__atan2l_use = x"yes"; then
+
+for ac_func in _atan2l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for expl declaration" >&5
+echo $ECHO_N "checking for expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_expl_use+set} != xset; then
+ if test "${glibcxx_cv_func_expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_expl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_expl_use" >&6
+
+ if test x$glibcxx_cv_func_expl_use = x"yes"; then
+
+for ac_func in expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _expl declaration" >&5
+echo $ECHO_N "checking for _expl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__expl_use+set} != xset; then
+ if test "${glibcxx_cv_func__expl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _expl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__expl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__expl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__expl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__expl_use" >&6
+
+ if test x$glibcxx_cv_func__expl_use = x"yes"; then
+
+for ac_func in _expl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for fabsl declaration" >&5
+echo $ECHO_N "checking for fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fabsl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fabsl_use" >&6
+
+ if test x$glibcxx_cv_func_fabsl_use = x"yes"; then
+
+for ac_func in fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fabsl declaration" >&5
+echo $ECHO_N "checking for _fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fabsl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fabsl_use" >&6
+
+ if test x$glibcxx_cv_func__fabsl_use = x"yes"; then
+
+for ac_func in _fabsl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for fmodl declaration" >&5
+echo $ECHO_N "checking for fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func_fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_fmodl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_fmodl_use" >&6
+
+ if test x$glibcxx_cv_func_fmodl_use = x"yes"; then
+
+for ac_func in fmodl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _fmodl declaration" >&5
+echo $ECHO_N "checking for _fmodl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__fmodl_use+set} != xset; then
+ if test "${glibcxx_cv_func__fmodl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _fmodl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__fmodl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__fmodl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__fmodl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__fmodl_use" >&6
+
+ if test x$glibcxx_cv_func__fmodl_use = x"yes"; then
+
+for ac_func in _fmodl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for frexpl declaration" >&5
+echo $ECHO_N "checking for frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_frexpl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_frexpl_use" >&6
+
+ if test x$glibcxx_cv_func_frexpl_use = x"yes"; then
+
+for ac_func in frexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _frexpl declaration" >&5
+echo $ECHO_N "checking for _frexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__frexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__frexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _frexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__frexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__frexpl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__frexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__frexpl_use" >&6
+
+ if test x$glibcxx_cv_func__frexpl_use = x"yes"; then
+
+for ac_func in _frexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for hypotl declaration" >&5
+echo $ECHO_N "checking for hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func_hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_hypotl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_hypotl_use" >&6
+
+ if test x$glibcxx_cv_func_hypotl_use = x"yes"; then
+
+for ac_func in hypotl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _hypotl declaration" >&5
+echo $ECHO_N "checking for _hypotl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__hypotl_use+set} != xset; then
+ if test "${glibcxx_cv_func__hypotl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _hypotl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__hypotl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__hypotl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__hypotl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__hypotl_use" >&6
+
+ if test x$glibcxx_cv_func__hypotl_use = x"yes"; then
+
+for ac_func in _hypotl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for ldexpl declaration" >&5
+echo $ECHO_N "checking for ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func_ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func_ldexpl_use = x"yes"; then
+
+for ac_func in ldexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _ldexpl declaration" >&5
+echo $ECHO_N "checking for _ldexpl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__ldexpl_use+set} != xset; then
+ if test "${glibcxx_cv_func__ldexpl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _ldexpl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__ldexpl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__ldexpl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__ldexpl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__ldexpl_use" >&6
+
+ if test x$glibcxx_cv_func__ldexpl_use = x"yes"; then
+
+for ac_func in _ldexpl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for logl declaration" >&5
+echo $ECHO_N "checking for logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_logl_use+set} != xset; then
+ if test "${glibcxx_cv_func_logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_logl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_logl_use" >&6
+
+ if test x$glibcxx_cv_func_logl_use = x"yes"; then
+
+for ac_func in logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _logl declaration" >&5
+echo $ECHO_N "checking for _logl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__logl_use+set} != xset; then
+ if test "${glibcxx_cv_func__logl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _logl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__logl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__logl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__logl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__logl_use" >&6
+
+ if test x$glibcxx_cv_func__logl_use = x"yes"; then
+
+for ac_func in _logl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for log10l declaration" >&5
+echo $ECHO_N "checking for log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func_log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_log10l_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_log10l_use" >&6
+
+ if test x$glibcxx_cv_func_log10l_use = x"yes"; then
+
+for ac_func in log10l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _log10l declaration" >&5
+echo $ECHO_N "checking for _log10l declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__log10l_use+set} != xset; then
+ if test "${glibcxx_cv_func__log10l_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _log10l(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__log10l_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__log10l_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__log10l_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__log10l_use" >&6
+
+ if test x$glibcxx_cv_func__log10l_use = x"yes"; then
+
+for ac_func in _log10l
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for modfl declaration" >&5
+echo $ECHO_N "checking for modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func_modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_modfl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_modfl_use" >&6
+
+ if test x$glibcxx_cv_func_modfl_use = x"yes"; then
+
+for ac_func in modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _modfl declaration" >&5
+echo $ECHO_N "checking for _modfl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__modfl_use+set} != xset; then
+ if test "${glibcxx_cv_func__modfl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _modfl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__modfl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__modfl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__modfl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__modfl_use" >&6
+
+ if test x$glibcxx_cv_func__modfl_use = x"yes"; then
+
+for ac_func in _modfl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for powl declaration" >&5
+echo $ECHO_N "checking for powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_powl_use+set} != xset; then
+ if test "${glibcxx_cv_func_powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_powl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_powl_use" >&6
+
+ if test x$glibcxx_cv_func_powl_use = x"yes"; then
+
+for ac_func in powl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _powl declaration" >&5
+echo $ECHO_N "checking for _powl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__powl_use+set} != xset; then
+ if test "${glibcxx_cv_func__powl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _powl(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__powl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__powl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__powl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__powl_use" >&6
+
+ if test x$glibcxx_cv_func__powl_use = x"yes"; then
+
+for ac_func in _powl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for sqrtl declaration" >&5
+echo $ECHO_N "checking for sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func_sqrtl_use = x"yes"; then
+
+for ac_func in sqrtl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sqrtl declaration" >&5
+echo $ECHO_N "checking for _sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sqrtl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sqrtl_use" >&6
+
+ if test x$glibcxx_cv_func__sqrtl_use = x"yes"; then
+
+for ac_func in _sqrtl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for sincosl declaration" >&5
+echo $ECHO_N "checking for sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func_sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_sincosl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_sincosl_use" >&6
+
+ if test x$glibcxx_cv_func_sincosl_use = x"yes"; then
+
+for ac_func in sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _sincosl declaration" >&5
+echo $ECHO_N "checking for _sincosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__sincosl_use+set} != xset; then
+ if test "${glibcxx_cv_func__sincosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ _sincosl(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__sincosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__sincosl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__sincosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__sincosl_use" >&6
+
+ if test x$glibcxx_cv_func__sincosl_use = x"yes"; then
+
+for ac_func in _sincosl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for finitel declaration" >&5
+echo $ECHO_N "checking for finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func_finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_finitel_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_finitel_use" >&6
+
+ if test x$glibcxx_cv_func_finitel_use = x"yes"; then
+
+for ac_func in finitel
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+ echo "$as_me:$LINENO: checking for _finitel declaration" >&5
+echo $ECHO_N "checking for _finitel declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func__finitel_use+set} != xset; then
+ if test "${glibcxx_cv_func__finitel_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+ #ifdef HAVE_IEEEFP_H
+ #include <ieeefp.h>
+ #endif
+
+int
+main ()
+{
+ _finitel(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func__finitel_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func__finitel_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func__finitel_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func__finitel_use" >&6
+
+ if test x$glibcxx_cv_func__finitel_use = x"yes"; then
+
+for ac_func in _finitel
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+
+
+
+
+ LIBS="$ac_save_LIBS"
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_abs declaration" >&5
+echo $ECHO_N "checking for __builtin_abs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_use" >&6
+ if test x$glibcxx_cv_func___builtin_abs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_abs linkage" >&5
+echo $ECHO_N "checking for __builtin_abs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_abs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_abs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_abs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_abs_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_abs_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_abs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_ABS 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsf declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsf linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsf_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABSF 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabs declaration" >&5
+echo $ECHO_N "checking for __builtin_fabs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabs linkage" >&5
+echo $ECHO_N "checking for __builtin_fabs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabs_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabs_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABS 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_fabsl declaration" >&5
+echo $ECHO_N "checking for __builtin_fabsl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_use" >&6
+ if test x$glibcxx_cv_func___builtin_fabsl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_fabsl linkage" >&5
+echo $ECHO_N "checking for __builtin_fabsl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_fabsl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_fabsl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_fabsl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_fabsl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_fabsl_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_fabsl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_FABSL 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_labs declaration" >&5
+echo $ECHO_N "checking for __builtin_labs declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_use" >&6
+ if test x$glibcxx_cv_func___builtin_labs_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_labs linkage" >&5
+echo $ECHO_N "checking for __builtin_labs linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_labs_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_labs_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_labs(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_labs_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_labs_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_labs_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_LABS 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtf linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtf_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SQRTF 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrt declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrt declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrt_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrt linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrt linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrt_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrt_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrt_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrt_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrt_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SQRT 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl declaration" >&5
+echo $ECHO_N "checking for __builtin_sqrtl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sqrtl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sqrtl linkage" >&5
+echo $ECHO_N "checking for __builtin_sqrtl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sqrtl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sqrtl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sqrtl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sqrtl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sqrtl_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sqrtl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SQRTL 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinf declaration" >&5
+echo $ECHO_N "checking for __builtin_sinf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinf linkage" >&5
+echo $ECHO_N "checking for __builtin_sinf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinf_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SINF 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sin declaration" >&5
+echo $ECHO_N "checking for __builtin_sin declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_use" >&6
+ if test x$glibcxx_cv_func___builtin_sin_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sin linkage" >&5
+echo $ECHO_N "checking for __builtin_sin linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sin_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sin_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sin(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sin_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sin_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sin_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SIN 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_sinl declaration" >&5
+echo $ECHO_N "checking for __builtin_sinl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_use" >&6
+ if test x$glibcxx_cv_func___builtin_sinl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_sinl linkage" >&5
+echo $ECHO_N "checking for __builtin_sinl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_sinl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_sinl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_sinl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_sinl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_sinl_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_sinl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_SINL 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cosf declaration" >&5
+echo $ECHO_N "checking for __builtin_cosf declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosf_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosf linkage" >&5
+echo $ECHO_N "checking for __builtin_cosf linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosf_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosf_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosf(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosf_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosf_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosf_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_COSF 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cos declaration" >&5
+echo $ECHO_N "checking for __builtin_cos declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_use" >&6
+ if test x$glibcxx_cv_func___builtin_cos_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cos linkage" >&5
+echo $ECHO_N "checking for __builtin_cos linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cos_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cos_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cos(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cos_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cos_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cos_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_COS 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+ echo "$as_me:$LINENO: checking for __builtin_cosl declaration" >&5
+echo $ECHO_N "checking for __builtin_cosl declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_use+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_use" >&6
+ if test x$glibcxx_cv_func___builtin_cosl_use = x"yes"; then
+ echo "$as_me:$LINENO: checking for __builtin_cosl linkage" >&5
+echo $ECHO_N "checking for __builtin_cosl linkage... $ECHO_C" >&6
+ if test x${glibcxx_cv_func___builtin_cosl_link+set} != xset; then
+ if test "${glibcxx_cv_func___builtin_cosl_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+ __builtin_cosl(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func___builtin_cosl_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func___builtin_cosl_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func___builtin_cosl_link" >&5
+echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6
+
+ if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___BUILTIN_COSL 1
+_ACEOF
+
+ fi
+
+ fi
+
+
+
+
+echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+for ac_func in copysignf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+
+for ac_func in __signbit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+
+
+for ac_func in __signbitf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+ if test x$ac_cv_func_copysignl = x"yes"; then
+
+for ac_func in __signbitl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+ fi
+
+ # Used in libmath/Makefile.am.
+ if test -n "$LIBMATHOBJS"; then
+ need_libmath=yes
+ fi
+
+
+
+ ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+
+
+ echo "$as_me:$LINENO: checking for strtold declaration" >&5
+echo $ECHO_N "checking for strtold declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtold_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtold_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtold(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtold_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtold_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtold_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtold_use" >&6
+ if test x$glibcxx_cv_func_strtold_use = x"yes"; then
+
+for ac_func in strtold
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+
+
+
+ echo "$as_me:$LINENO: checking for strtof declaration" >&5
+echo $ECHO_N "checking for strtof declaration... $ECHO_C" >&6
+ if test x${glibcxx_cv_func_strtof_use+set} != xset; then
+ if test "${glibcxx_cv_func_strtof_use+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ strtof(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_func_strtof_use=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_func_strtof_use=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ echo "$as_me:$LINENO: result: $glibcxx_cv_func_strtof_use" >&5
+echo "${ECHO_T}$glibcxx_cv_func_strtof_use" >&6
+ if test x$glibcxx_cv_func_strtof_use = x"yes"; then
+
+for ac_func in strtof
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+
+
+ echo "$as_me:$LINENO: checking for S_ISREG or S_IFREG" >&5
+echo $ECHO_N "checking for S_ISREG or S_IFREG... $ECHO_C" >&6
+ if test "${glibcxx_cv_S_ISREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_ISREG(buffer.st_mode);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_ISREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_ISREG=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "${glibcxx_cv_S_IFREG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat buffer;
+ fstat(0, &buffer);
+ S_IFREG & buffer.st_mode;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_S_IFREG=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_S_IFREG=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ res=no
+ if test $glibcxx_cv_S_ISREG = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_ISREG 1
+_ACEOF
+
+ res=S_ISREG
+ elif test $glibcxx_cv_S_IFREG = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_IFREG 1
+_ACEOF
+
+ res=S_IFREG
+ fi
+ echo "$as_me:$LINENO: result: $res" >&5
+echo "${ECHO_T}$res" >&6
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WRITEV 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT64_T 1
+_ACEOF
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_COPYSIGN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPOT 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MODF 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+ ;;
+
*-darwin*)
# Darwin versions vary, but the linker should work in a cross environment,
# so we just check for all the features here.
@@ -64885,9 +87163,13 @@ _ACEOF
+
+
+
for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h float.h endian.h inttypes.h locale.h float.h stdint.h
+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h \
+ sys/ipc.h sys/sem.h gconf.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -86359,6 +108641,1102 @@ _ACEOF
echo "$as_me:$LINENO: result: $glibcxx_cv_WRITEV" >&5
echo "${ECHO_T}$glibcxx_cv_WRITEV" >&6
+
+ # For C99 support to TR1.
+
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
+ # undefined and fake C99 facilities may be spuriously enabled.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++98"
+
+ # Check for the existence of <complex.h> complex math functions used
+ # by tr1/complex.
+
+for ac_header in complex.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_complex_h=yes
+else
+ ac_has_complex_h=no
+fi
+
+done
+
+ ac_c99_complex_tr1=no;
+ if test x"$ac_has_complex_h" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <complex.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <complex.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <complex.h>
+int
+main ()
+{
+typedef __complex__ float float_type; float_type tmpf;
+ cacosf(tmpf);
+ casinf(tmpf);
+ catanf(tmpf);
+ cacoshf(tmpf);
+ casinhf(tmpf);
+ catanhf(tmpf);
+ typedef __complex__ double double_type; double_type tmpd;
+ cacos(tmpd);
+ casin(tmpd);
+ catan(tmpd);
+ cacosh(tmpd);
+ casinh(tmpd);
+ catanh(tmpd);
+ typedef __complex__ long double ld_type; ld_type tmpld;
+ cacosl(tmpld);
+ casinl(tmpld);
+ catanl(tmpld);
+ cacoshl(tmpld);
+ casinhl(tmpld);
+ catanhl(tmpld);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_complex_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_c99_complex_tr1" >&5
+echo "${ECHO_T}$ac_c99_complex_tr1" >&6
+ if test x"$ac_c99_complex_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_COMPLEX_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of <ctype.h> functions.
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <ctype.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <ctype.h>... $ECHO_C" >&6
+ if test "${ac_c99_ctype_tr1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+int
+main ()
+{
+int ch;
+ int ret;
+ ret = isblank(ch);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_ctype_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_ctype_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_c99_ctype_tr1" >&5
+echo "${ECHO_T}$ac_c99_ctype_tr1" >&6
+ if test x"$ac_c99_ctype_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of <fenv.h> functions.
+
+for ac_header in fenv.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_has_fenv_h=yes
+else
+ ac_has_fenv_h=no
+fi
+
+done
+
+ ac_c99_fenv_tr1=no;
+ if test x"$ac_has_fenv_h" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <fenv.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <fenv.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <fenv.h>
+int
+main ()
+{
+int except, mode;
+ fexcept_t* pflag;
+ fenv_t* penv;
+ int ret;
+ ret = feclearexcept(except);
+ ret = fegetexceptflag(pflag, except);
+ ret = feraiseexcept(except);
+ ret = fesetexceptflag(pflag, except);
+ ret = fetestexcept(except);
+ ret = fegetround();
+ ret = fesetround(mode);
+ ret = fegetenv(penv);
+ ret = feholdexcept(penv);
+ ret = fesetenv(penv);
+ ret = feupdateenv(penv);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_fenv_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_fenv_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_c99_fenv_tr1" >&5
+echo "${ECHO_T}$ac_c99_fenv_tr1" >&6
+ if test x"$ac_c99_fenv_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_FENV_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of <stdint.h> types.
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <stdint.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <stdint.h>... $ECHO_C" >&6
+ if test "${ac_c99_stdint_tr1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdint.h>
+int
+main ()
+{
+typedef int8_t my_int8_t;
+ typedef int16_t my_int16_t;
+ typedef int32_t my_int32_t;
+ typedef int64_t my_int64_t;
+ typedef int_fast8_t my_int_fast8_t;
+ typedef int_fast16_t my_int_fast16_t;
+ typedef int_fast32_t my_int_fast32_t;
+ typedef int_fast64_t my_int_fast64_t;
+ typedef int_least8_t my_int_least8_t;
+ typedef int_least16_t my_int_least16_t;
+ typedef int_least32_t my_int_least32_t;
+ typedef int_least64_t my_int_least64_t;
+ typedef intmax_t my_intmax_t;
+ typedef intptr_t my_intptr_t;
+ typedef uint8_t my_uint8_t;
+ typedef uint16_t my_uint16_t;
+ typedef uint32_t my_uint32_t;
+ typedef uint64_t my_uint64_t;
+ typedef uint_fast8_t my_uint_fast8_t;
+ typedef uint_fast16_t my_uint_fast16_t;
+ typedef uint_fast32_t my_uint_fast32_t;
+ typedef uint_fast64_t my_uint_fast64_t;
+ typedef uint_least8_t my_uint_least8_t;
+ typedef uint_least16_t my_uint_least16_t;
+ typedef uint_least32_t my_uint_least32_t;
+ typedef uint_least64_t my_uint_least64_t;
+ typedef uintmax_t my_uintmax_t;
+ typedef uintptr_t my_uintptr_t;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_stdint_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdint_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_c99_stdint_tr1" >&5
+echo "${ECHO_T}$ac_c99_stdint_tr1" >&6
+ if test x"$ac_c99_stdint_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_STDINT_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of <math.h> functions.
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <math.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <math.h>... $ECHO_C" >&6
+ if test "${ac_c99_math_tr1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+typedef double_t my_double_t;
+ typedef float_t my_float_t;
+ acosh(0.0);
+ acoshf(0.0f);
+ acoshl(0.0l);
+ asinh(0.0);
+ asinhf(0.0f);
+ asinhl(0.0l);
+ atanh(0.0);
+ atanhf(0.0f);
+ atanhl(0.0l);
+ cbrt(0.0);
+ cbrtf(0.0f);
+ cbrtl(0.0l);
+ copysign(0.0, 0.0);
+ copysignf(0.0f, 0.0f);
+ copysignl(0.0l, 0.0l);
+ erf(0.0);
+ erff(0.0f);
+ erfl(0.0l);
+ erfc(0.0);
+ erfcf(0.0f);
+ erfcl(0.0l);
+ exp2(0.0);
+ exp2f(0.0f);
+ exp2l(0.0l);
+ expm1(0.0);
+ expm1f(0.0f);
+ expm1l(0.0l);
+ fdim(0.0, 0.0);
+ fdimf(0.0f, 0.0f);
+ fdiml(0.0l, 0.0l);
+ fma(0.0, 0.0, 0.0);
+ fmaf(0.0f, 0.0f, 0.0f);
+ fmal(0.0l, 0.0l, 0.0l);
+ fmax(0.0, 0.0);
+ fmaxf(0.0f, 0.0f);
+ fmaxl(0.0l, 0.0l);
+ fmin(0.0, 0.0);
+ fminf(0.0f, 0.0f);
+ fminl(0.0l, 0.0l);
+ hypot(0.0, 0.0);
+ hypotf(0.0f, 0.0f);
+ hypotl(0.0l, 0.0l);
+ ilogb(0.0);
+ ilogbf(0.0f);
+ ilogbl(0.0l);
+ lgamma(0.0);
+ lgammaf(0.0f);
+ lgammal(0.0l);
+ llrint(0.0);
+ llrintf(0.0f);
+ llrintl(0.0l);
+ llround(0.0);
+ llroundf(0.0f);
+ llroundl(0.0l);
+ log1p(0.0);
+ log1pf(0.0f);
+ log1pl(0.0l);
+ log2(0.0);
+ log2f(0.0f);
+ log2l(0.0l);
+ logb(0.0);
+ logbf(0.0f);
+ logbl(0.0l);
+ lrint(0.0);
+ lrintf(0.0f);
+ lrintl(0.0l);
+ lround(0.0);
+ lroundf(0.0f);
+ lroundl(0.0l);
+ nan(0);
+ nanf(0);
+ nanl(0);
+ nearbyint(0.0);
+ nearbyintf(0.0f);
+ nearbyintl(0.0l);
+ nextafter(0.0, 0.0);
+ nextafterf(0.0f, 0.0f);
+ nextafterl(0.0l, 0.0l);
+ nexttoward(0.0, 0.0);
+ nexttowardf(0.0f, 0.0f);
+ nexttowardl(0.0l, 0.0l);
+ remainder(0.0, 0.0);
+ remainderf(0.0f, 0.0f);
+ remainderl(0.0l, 0.0l);
+ remquo(0.0, 0.0, 0);
+ remquo(0.0f, 0.0f, 0);
+ remquo(0.0l, 0.0l, 0);
+ rint(0.0);
+ rintf(0.0f);
+ rintl(0.0l);
+ round(0.0);
+ roundf(0.0f);
+ roundl(0.0l);
+ scalbln(0.0, 0l);
+ scalblnf(0.0f, 0l);
+ scalblnl(0.0l, 0l);
+ scalbn(0.0, 0);
+ scalbnf(0.0f, 0);
+ scalbnl(0.0l, 0);
+ tgamma(0.0);
+ tgammaf(0.0f);
+ tgammal(0.0l);
+ trunc(0.0);
+ truncf(0.0f);
+ truncl(0.0l);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_math_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_c99_math_tr1" >&5
+echo "${ECHO_T}$ac_c99_math_tr1" >&6
+ if test x"$ac_c99_math_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_MATH_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of <inttypes.h> functions (NB: doesn't make
+ # sense if the previous check fails, per C99, 7.8/1).
+ ac_c99_inttypes_tr1=no;
+ if test x"$ac_c99_stdint_tr1" = x"yes"; then
+ echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <inttypes.h>" >&5
+echo $ECHO_N "checking for ISO C99 support to TR1 in <inttypes.h>... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <inttypes.h>
+int
+main ()
+{
+intmax_t i, numer, denom, base;
+ const char* s;
+ char** endptr;
+ intmax_t ret = imaxabs(i);
+ imaxdiv_t dret = imaxdiv(numer, denom);
+ ret = strtoimax(s, endptr, base);
+ uintmax_t uret = strtoumax(s, endptr, base);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_c99_inttypes_tr1=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_inttypes_tr1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_c99_inttypes_tr1" >&5
+echo "${ECHO_T}$ac_c99_inttypes_tr1" >&6
+ if test x"$ac_c99_inttypes_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_INTTYPES_TR1 1
+_ACEOF
+
+ fi
+
+ # Check for the existence of the <stdbool.h> header.
+
+for ac_header in stdbool.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ # Check for sigsetjmp
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <setjmp.h>
+int
+main ()
+{
+sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
;;
*-mingw32*)
@@ -91904,8 +115282,222 @@ _ACEOF
#define HAVE_GETIPINFO 1
_ACEOF
+fi
+
+ # Check whether --enable-linux-futex or --disable-linux-futex was given.
+if test "${enable_linux_futex+set}" = set; then
+ enableval="$enable_linux_futex"
+ case "$enableval" in
+ yes|no|default) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable linux-futex" >&5
+echo "$as_me: error: Unknown argument to enable/disable linux-futex" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
+else
+ enable_linux_futex=default
+fi;
+
+case "$target" in
+ *-linux*)
+ case "$enable_linux_futex" in
+ default)
+ # If headers don't have gettid/futex syscalls definition, then
+ # default to no, otherwise there will be compile time failures.
+ # Otherwise, default to yes. If we don't detect we are
+ # compiled/linked against NPTL and not cross-compiling, check
+ # if programs are run by default against NPTL and if not, issue
+ # a warning.
+ enable_linux_futex=no
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/syscall.h>
+ int lk;
+int
+main ()
+{
+syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ save_LIBS="$LIBS"
+ LIBS="-lpthread $LIBS"
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef _GNU_SOURCE
+ #define _GNU_SOURCE 1
+ #endif
+ #include <pthread.h>
+ pthread_t th; void *status;
+int
+main ()
+{
+pthread_tryjoin_np (th, &status);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ enable_linux_futex=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+if test x$cross_compiling = xno; then
+ if getconf GNU_LIBPTHREAD_VERSION 2>/dev/null \
+ | LC_ALL=C grep -i NPTL > /dev/null 2>/dev/null; then :; else
+ { echo "$as_me:$LINENO: WARNING: The kernel might not support futex or gettid syscalls.
+If so, please configure with --disable-linux-futex" >&5
+echo "$as_me: WARNING: The kernel might not support futex or gettid syscalls.
+If so, please configure with --disable-linux-futex" >&2;}
+ fi
+ fi
+ enable_linux_futex=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ;;
+ yes)
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/syscall.h>
+ int lk;
+int
+main ()
+{
+syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: SYS_gettid and SYS_futex required for --enable-linux-futex" >&5
+echo "$as_me: error: SYS_gettid and SYS_futex required for --enable-linux-futex" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ;;
+ esac
+ ;;
+ *)
+ enable_linux_futex=no
+ ;;
+esac
+if test x$enable_linux_futex = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LINUX_FUTEX 1
+_ACEOF
+
+fi
+
# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
@@ -93189,8 +116781,10 @@ done
# Propagate the target-specific source directories through the build chain.
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+ATOMIC_FLAGS=${atomic_flags}
CPU_DEFINES_SRCDIR=config/${cpu_defines_dir}
OS_INC_SRCDIR=config/${os_include_dir}
+ERROR_CONSTANTS_SRCDIR=config/${error_constants_dir}
ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
@@ -93199,6 +116793,8 @@ ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
+
+
# Determine cross-compile flags and AM_CONDITIONALs.
#AC_SUBST(GLIBCXX_IS_NATIVE)
#AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
@@ -93294,6 +116890,17 @@ fi
+if test $enable_parallel = yes; then
+ ENABLE_PARALLEL_TRUE=
+ ENABLE_PARALLEL_FALSE='#'
+else
+ ENABLE_PARALLEL_TRUE='#'
+ ENABLE_PARALLEL_FALSE=
+fi
+
+
+
+
if test $enable_symvers != no; then
ENABLE_SYMVERS_TRUE=
ENABLE_SYMVERS_FALSE='#'
@@ -93557,7 +117164,7 @@ else
fi
- ac_config_files="$ac_config_files Makefile include/Makefile libmath/Makefile libsupc++/Makefile src/Makefile po/Makefile testsuite/Makefile"
+ ac_config_files="$ac_config_files Makefile include/Makefile libmath/Makefile libsupc++/Makefile src/Makefile doc/Makefile po/Makefile testsuite/Makefile"
ac_config_files="$ac_config_files scripts/testsuite_flags"
@@ -93719,6 +117326,13 @@ echo "$as_me: error: conditional \"GLIBCXX_BUILD_DEBUG\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${ENABLE_PARALLEL_TRUE}" && test -z "${ENABLE_PARALLEL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ENABLE_PARALLEL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_PARALLEL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${ENABLE_SYMVERS_TRUE}" && test -z "${ENABLE_SYMVERS_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"ENABLE_SYMVERS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -94558,6 +118172,7 @@ do
"libmath/Makefile" ) CONFIG_FILES="$CONFIG_FILES libmath/Makefile" ;;
"libsupc++/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsupc++/Makefile" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
"testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"scripts/testsuite_flags" ) CONFIG_FILES="$CONFIG_FILES scripts/testsuite_flags" ;;
@@ -94764,6 +118379,8 @@ s,@GLIBCXX_C_HEADERS_EXTRA_FALSE@,$GLIBCXX_C_HEADERS_EXTRA_FALSE,;t t
s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
s,@GLIBCXX_BUILD_DEBUG_TRUE@,$GLIBCXX_BUILD_DEBUG_TRUE,;t t
s,@GLIBCXX_BUILD_DEBUG_FALSE@,$GLIBCXX_BUILD_DEBUG_FALSE,;t t
+s,@ENABLE_PARALLEL_TRUE@,$ENABLE_PARALLEL_TRUE,;t t
+s,@ENABLE_PARALLEL_FALSE@,$ENABLE_PARALLEL_FALSE,;t t
s,@EXTRA_CXX_FLAGS@,$EXTRA_CXX_FLAGS,;t t
s,@glibcxx_thread_h@,$glibcxx_thread_h,;t t
s,@WERROR@,$WERROR,;t t
@@ -94790,9 +118407,11 @@ s,@GLIBCXX_LDBL_COMPAT_FALSE@,$GLIBCXX_LDBL_COMPAT_FALSE,;t t
s,@baseline_dir@,$baseline_dir,;t t
s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
+s,@ATOMIC_FLAGS@,$ATOMIC_FLAGS,;t t
s,@CPU_DEFINES_SRCDIR@,$CPU_DEFINES_SRCDIR,;t t
s,@ABI_TWEAKS_SRCDIR@,$ABI_TWEAKS_SRCDIR,;t t
s,@OS_INC_SRCDIR@,$OS_INC_SRCDIR,;t t
+s,@ERROR_CONSTANTS_SRCDIR@,$ERROR_CONSTANTS_SRCDIR,;t t
s,@glibcxx_prefixdir@,$glibcxx_prefixdir,;t t
s,@gxx_include_dir@,$gxx_include_dir,;t t
s,@glibcxx_toolexecdir@,$glibcxx_toolexecdir,;t t
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 5d1d947a881..3411b97afc8 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -92,11 +92,11 @@ AC_SUBST(enable_static)
## than just ignoring the results. Faster /and/ more correct, win win.
GLIBCXX_ENABLE_HOSTED
-# Check for compiler support that doesn't require linking.
+# Enable compiler support that doesn't require linking.
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_PCH($is_hosted)
-# Enable all the variable C++ runtime options.
+# Enable all the variable C++ runtime options that doesn't require linking.
GLIBCXX_ENABLE_CSTDIO
GLIBCXX_ENABLE_CLOCALE
GLIBCXX_ENABLE_ALLOCATOR
@@ -107,9 +107,13 @@ GLIBCXX_ENABLE_C99([yes])
GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"])
GLIBCXX_ENABLE_DEBUG([no])
+GLIBCXX_ENABLE_PARALLEL
GLIBCXX_ENABLE_CXX_FLAGS
GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING([no])
+# Checks for operating systems support that don't require linking.
+GLIBCXX_CHECK_SYSTEM_ERROR
+
# No surprises, no surprises...
GLIBCXX_ENABLE_THREADS
GLIBCXX_ENABLE_ATOMIC_BUILTINS
@@ -291,9 +295,10 @@ else
# Assume we have _Unwind_GetIPInfo for cross-compiles.
AC_DEFINE(HAVE_GETIPINFO)
-
fi
+GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])
+
# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
GLIBCXX_ENABLE_SYMVERS([yes])
GLIBCXX_ENABLE_VISIBILITY([yes])
@@ -324,14 +329,18 @@ GLIBCXX_CONFIGURE_TESTSUITE
# Propagate the target-specific source directories through the build chain.
ATOMICITY_SRCDIR=config/${atomicity_dir}
ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
+ATOMIC_FLAGS=${atomic_flags}
CPU_DEFINES_SRCDIR=config/${cpu_defines_dir}
OS_INC_SRCDIR=config/${os_include_dir}
+ERROR_CONSTANTS_SRCDIR=config/${error_constants_dir}
ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
AC_SUBST(ATOMICITY_SRCDIR)
AC_SUBST(ATOMIC_WORD_SRCDIR)
+AC_SUBST(ATOMIC_FLAGS)
AC_SUBST(CPU_DEFINES_SRCDIR)
AC_SUBST(ABI_TWEAKS_SRCDIR)
AC_SUBST(OS_INC_SRCDIR)
+AC_SUBST(ERROR_CONSTANTS_SRCDIR)
# Determine cross-compile flags and AM_CONDITIONALs.
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index 6fe4140be79..c994b5e7145 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -39,9 +39,16 @@
# atomic_word_dir location of atomic_word.h
# defaults to generic.
#
+# atomic_flags extra flags to pass to use atomic instructions
+# defaults to nothing.
+#
# cpu_defines_dir location of cpu_defines.h
# defaults to generic.
#
+#
+# error_constants_dir location of error_constants.h
+# defaults to os/generic.
+#
# It possibly modifies the following variables:
#
# OPT_LDFLAGS extra flags to pass when linking the library, of
@@ -67,10 +74,12 @@
c_model=c_global
c_compatibility=no
atomic_word_dir=cpu/generic
+atomic_flags=""
atomicity_dir="cpu/generic"
cpu_defines_dir="cpu/generic"
try_cpu=generic
abi_tweaks_dir="cpu/generic"
+error_constants_dir="os/generic"
# HOST-SPECIFIC OVERRIDES
# Set any CPU-dependent bits.
@@ -85,6 +94,9 @@ case "${host_cpu}" in
arm* | xscale | ep9312)
try_cpu=arm
;;
+ crisv32)
+ try_cpu=cris
+ ;;
i[567]86 | x86_64)
try_cpu=i486
;;
@@ -125,7 +137,8 @@ case "${host_cpu}" in
esac
-# Set specific CPU overrides for atomic_word_dir. Most can just use generic.
+# Set specific CPU overrides for atomic_word_dir and atomic_flags.
+# Most can just use generic.
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
case "${host_cpu}" in
alpha*)
@@ -137,11 +150,15 @@ case "${host_cpu}" in
ia64)
atomic_word_dir=cpu/ia64
;;
+ i[4567]86 | x86_64)
+ atomic_flags="-march=native"
+ ;;
powerpc* | rs6000)
atomic_word_dir=cpu/powerpc
;;
sparc* | ultrasparc)
atomic_word_dir=cpu/sparc
+ atomic_flags="-mcpu=v9"
;;
esac
@@ -161,6 +178,7 @@ fi
# Set any OS-dependent bits.
# Set the os_include_dir.
+# Set the error_costants_dir.
# Set c_model, c_compatibility here.
# If atomic ops and/or numeric limits are OS-specific rather than
# CPU-specifc, set those here too.
@@ -238,6 +256,7 @@ case "${host_os}" in
;;
mingw32*)
os_include_dir="os/mingw32"
+ error_constants_dir="os/mingw32"
;;
netbsd*)
os_include_dir="os/bsd/netbsd"
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index cbfc2d98044..6d0c226f794 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -9,6 +9,38 @@ case "${host}" in
# This is a freestanding configuration; there is nothing to do here.
;;
+ mips*-sde-elf*)
+ # These definitions are for the SDE C library rather than newlib.
+ AC_CHECK_HEADERS([float.h inttypes.h locale.h \
+ stdint.h stdlib.h string.h unistd.h wchar.h \
+ machine/endian.h sys/ioctl.h sys/resource.h \
+ sys/stat.h sys/time.h sys/types.h sys/uio.h])
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_MATH_SUPPORT
+ GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+ AC_DEFINE(HAVE_SIGSETJMP)
+ AC_DEFINE(HAVE_GETPAGESIZE)
+ AC_DEFINE(HAVE_WRITEV)
+ AC_DEFINE(HAVE_INT64_T)
+
+ AC_DEFINE(HAVE_LIBM)
+ AC_DEFINE(HAVE_COPYSIGN)
+ AC_DEFINE(HAVE_FINITE)
+ AC_DEFINE(HAVE_HYPOT)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_ISINF)
+
+ AC_DEFINE(HAVE_LDEXPF)
+ AC_DEFINE(HAVE_MODF)
+ AC_DEFINE(HAVE_SQRTF)
+ ;;
+
*-darwin*)
# Darwin versions vary, but the linker should work in a cross environment,
# so we just check for all the features here.
@@ -164,7 +196,8 @@ case "${host}" in
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
machine/endian.h machine/param.h sys/machine.h sys/types.h \
- fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h \
+ sys/ipc.h sys/sem.h gconf.h])
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_COMPILER_FEATURES
@@ -186,6 +219,18 @@ case "${host}" in
# For xsputn_2().
AC_CHECK_HEADERS(sys/uio.h)
GLIBCXX_CHECK_WRITEV
+
+ # For C99 support to TR1.
+ GLIBCXX_CHECK_C99_TR1
+
+ # Check for sigsetjmp
+ AC_TRY_COMPILE(
+ [#include <setjmp.h>],
+ [sigjmp_buf env;
+ while (! sigsetjmp (env, 1))
+ siglongjmp (env, 1);
+ ],
+ [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.])])
;;
*-mingw32*)
AC_CHECK_HEADERS([sys/types.h locale.h float.h])
diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am
new file mode 100644
index 00000000000..8f500088cb8
--- /dev/null
+++ b/libstdc++-v3/doc/Makefile.am
@@ -0,0 +1,243 @@
+## Makefile for the doc subdirectory of the GNU C++ Standard library.
+##
+## Copyright (C) 2008 Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+include $(top_srcdir)/fragment.am
+
+
+# Doxygen configuration
+# Assumes doxygen, graphviz (with dot) installed
+doc_doxygen_script=${top_srcdir}/scripts/run_doxygen
+doc-html-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=html $${srcdir} $${builddir})
+
+doc-man-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=man $${srcdir} $${builddir})
+
+doc-xml-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir})
+
+doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
+doc-xml-doxygen-single: doc-xml-doxygen
+ @echo "Generating doxygen xml single file..."
+ $(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
+
+
+# Performance doc and graph configuration.
+# Assumes pychart, beautiful soup installed.
+# Generates the plots and graphs for performance testing.
+doc_performance_script=${top_srcdir}/scripts/make_graphs.py
+doc-html-performance:
+ -@(chmod + ${doc_performance_script}; \
+ ${doc_performance_script} ${top_srcdir} \
+ ${glibcxx_builddir}/testsuite \
+ ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
+ ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
+
+
+# Docbook configuration.
+# Assumes
+# libxslt
+# docbook-style-xsl
+# emacs-nxml-mode
+# xmlto passivetex
+xml_srcdir = ${glibcxx_srcdir}/doc/xml
+xml_sources = \
+ ${xml_srcdir}/spine.xml \
+ ${xml_srcdir}/authors.xml \
+ ${xml_srcdir}/manual/abi.xml \
+ ${xml_srcdir}/manual/algorithms.xml \
+ ${xml_srcdir}/manual/allocator.xml \
+ ${xml_srcdir}/manual/auto_ptr.xml \
+ ${xml_srcdir}/manual/backwards_compatibility.xml \
+ ${xml_srcdir}/manual/bitmap_allocator.xml \
+ ${xml_srcdir}/manual/build.xml \
+ ${xml_srcdir}/manual/build_hacking.xml \
+ ${xml_srcdir}/manual/codecvt.xml \
+ ${xml_srcdir}/manual/concurrency.xml \
+ ${xml_srcdir}/manual/configure.xml \
+ ${xml_srcdir}/manual/containers.xml \
+ ${xml_srcdir}/manual/ctype.xml \
+ ${xml_srcdir}/manual/debug_mode.xml \
+ ${xml_srcdir}/manual/debug.xml \
+ ${xml_srcdir}/manual/diagnostics.xml \
+ ${xml_srcdir}/manual/evolution.xml \
+ ${xml_srcdir}/manual/extensions.xml \
+ ${xml_srcdir}/manual/internals.xml \
+ ${xml_srcdir}/manual/intro.xml \
+ ${xml_srcdir}/manual/io.xml \
+ ${xml_srcdir}/manual/iterators.xml \
+ ${xml_srcdir}/manual/locale.xml \
+ ${xml_srcdir}/manual/localization.xml \
+ ${xml_srcdir}/manual/messages.xml \
+ ${xml_srcdir}/manual/mt_allocator.xml \
+ ${xml_srcdir}/manual/numerics.xml \
+ ${xml_srcdir}/manual/parallel_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/strings.xml \
+ ${xml_srcdir}/manual/support.xml \
+ ${xml_srcdir}/manual/test.xml \
+ ${xml_srcdir}/manual/using.xml \
+ ${xml_srcdir}/manual/utilities.xml \
+ ${xml_srcdir}/manual/appendix_free.xml \
+ ${xml_srcdir}/manual/appendix_contributing.xml \
+ ${xml_srcdir}/manual/appendix_porting.xml \
+ ${xml_srcdir}/api.xml \
+ ${xml_srcdir}/faq.xml
+
+xml_sources_extra = \
+ ${xml_srcdir}/gnu/fdl-1.2.xml \
+ ${xml_srcdir}/gnu/gpl-2.0.xml
+
+xml_noinst = \
+ ${xml_srcdir}/book.txml \
+ ${xml_srcdir}/chapter.txml \
+ ${xml_srcdir}/class.txml
+
+
+XSLTPROC = xsltproc
+XSLTPROC_FLAGS = --nonet --xinclude
+XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
+XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
+XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
+#XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
+XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
+
+${glibcxx_builddir}/doc/html:
+ mkdir ${glibcxx_builddir}/doc/html
+
+${glibcxx_builddir}/doc/pdf:
+ mkdir ${glibcxx_builddir}/doc/pdf
+
+${glibcxx_builddir}/doc/fo:
+ mkdir ${glibcxx_builddir}/doc/fo
+
+${glibcxx_builddir}/doc/xml:
+ mkdir ${glibcxx_builddir}/doc/xml
+
+# Validate existing XML structure.
+XMLLINT = xmllint
+#LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
+#LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
+LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
+VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
+XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
+doc-xml-validate: $(xml_sources)
+ @echo "Generating XML validation log..."
+ $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+
+doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
+ @echo "Generating XML single..."
+ $(XMLLINT) --xinclude --noent --noblanks \
+ -o ${glibcxx_builddir}/doc/xml/spine-single.xml \
+ ${top_srcdir}/doc/xml/spine.xml
+
+# HTML, index plus chapters
+doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
+ @echo "Generating html files..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+ $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# HTML, all one page
+doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
+ @echo "Generating html single file..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+ $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# FO
+doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
+ @echo "Generating FO files..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
+ $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# PDF
+# Points to current best xml to PDF generation process.
+doc-pdf: doc-pdf-prince
+
+# PDF 1
+# fop
+FOP = fop
+FOP_FLAGS = -d -r
+doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf fop files from xml..."
+ $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
+ -xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
+
+doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
+ @echo "Generating pdf fop files from fo..."
+ $(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
+ -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
+
+# PDF 2
+# xmlto
+XML2PDF = xmlto
+XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
+doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf xmlto files..."
+ $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+
+# PDF 3
+# xmlroff
+XMLROFF = xmlroff
+XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
+doc-pdf-xmlroff: $(xml_sources) doc-fo
+ @echo "Generating pdf xmlroff files..."
+ $(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
+
+# PDF 4
+# prince
+PRINCE = prince
+PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
+doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf prince files..."
+ $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+
+
+# No install-pdf, install-html support in automake yet
+install-pdf:
+install-html:
+
+# Installation of distribution html documentation not yet supported
+# TODO: Write custom install-html rule.
+.PHONY: install-html install-pdf \
+ doc-doxygen-html doc-doxygen-man doc-performance
+
+# By adding these files here, automake will remove them for 'make clean'
+CLEANFILES = *.log
+
+# To remove directories.
+clean-local:
+ rm -rf man html pdf fo doxygen xml
diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
new file mode 100644
index 00000000000..b40e51059af
--- /dev/null
+++ b/libstdc++-v3/doc/Makefile.in
@@ -0,0 +1,653 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/fragment.am
+subdir = doc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
+ $(top_srcdir)/../config/iconv.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lib-ld.m4 \
+ $(top_srcdir)/../config/lib-link.m4 \
+ $(top_srcdir)/../config/lib-prefix.m4 \
+ $(top_srcdir)/../config/multi.m4 \
+ $(top_srcdir)/../config/no-executables.m4 \
+ $(top_srcdir)/../config/unwind_ipinfo.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/tls.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
+ACLOCAL = @ACLOCAL@
+ALLOCATOR_H = @ALLOCATOR_H@
+ALLOCATOR_NAME = @ALLOCATOR_NAME@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
+ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASIC_FILE_CC = @BASIC_FILE_CC@
+BASIC_FILE_H = @BASIC_FILE_H@
+CC = @CC@
+CCODECVT_CC = @CCODECVT_CC@
+CCOLLATE_CC = @CCOLLATE_CC@
+CCTYPE_CC = @CCTYPE_CC@
+CFLAGS = @CFLAGS@
+CLOCALE_CC = @CLOCALE_CC@
+CLOCALE_H = @CLOCALE_H@
+CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@
+CMESSAGES_CC = @CMESSAGES_CC@
+CMESSAGES_H = @CMESSAGES_H@
+CMONEY_CC = @CMONEY_CC@
+CNUMERIC_CC = @CNUMERIC_CC@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@
+CSTDIO_H = @CSTDIO_H@
+CTIME_CC = @CTIME_CC@
+CTIME_H = @CTIME_H@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DEFS = @DEFS@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
+ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
+ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
+ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
+ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
+ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
+ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
+ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
+ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
+ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
+ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+FGREP = @FGREP@
+GLIBCXX_BUILD_DEBUG_FALSE = @GLIBCXX_BUILD_DEBUG_FALSE@
+GLIBCXX_BUILD_DEBUG_TRUE = @GLIBCXX_BUILD_DEBUG_TRUE@
+GLIBCXX_BUILD_PCH_FALSE = @GLIBCXX_BUILD_PCH_FALSE@
+GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
+GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
+GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_GLOBAL_FALSE = @GLIBCXX_C_HEADERS_C_GLOBAL_FALSE@
+GLIBCXX_C_HEADERS_C_GLOBAL_TRUE = @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@
+GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
+GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
+GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_C_HEADERS_EXTRA_FALSE = @GLIBCXX_C_HEADERS_EXTRA_FALSE@
+GLIBCXX_C_HEADERS_EXTRA_TRUE = @GLIBCXX_C_HEADERS_EXTRA_TRUE@
+GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
+GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYMVER_FILE = @SYMVER_FILE@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+baseline_dir = @baseline_dir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+check_msgfmt = @check_msgfmt@
+datadir = @datadir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+glibcxx_MOFILES = @glibcxx_MOFILES@
+glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@
+glibcxx_POFILES = @glibcxx_POFILES@
+glibcxx_builddir = @glibcxx_builddir@
+glibcxx_localedir = @glibcxx_localedir@
+glibcxx_prefixdir = @glibcxx_prefixdir@
+glibcxx_srcdir = @glibcxx_srcdir@
+glibcxx_thread_h = @glibcxx_thread_h@
+glibcxx_toolexecdir = @glibcxx_toolexecdir@
+glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libtool_VERSION = @libtool_VERSION@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+port_specific_symbol_files = @port_specific_symbol_files@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+toplevel_srcdir = @toplevel_srcdir@
+
+# May be used by various substitution variables.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+MAINT_CHARSET = latin1
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+PWD_COMMAND = $${PWDCMD-pwd}
+STAMP = echo timestamp >
+toolexecdir = $(glibcxx_toolexecdir)
+toolexeclibdir = $(glibcxx_toolexeclibdir)
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS.
+CONFIG_CXXFLAGS = \
+ $(SECTION_FLAGS) $(EXTRA_CXX_FLAGS)
+
+WARN_CXXFLAGS = \
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+
+# -I/-D flags to pass when compiling.
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+
+# Doxygen configuration
+# Assumes doxygen, graphviz (with dot) installed
+doc_doxygen_script = ${top_srcdir}/scripts/run_doxygen
+doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml
+
+# Performance doc and graph configuration.
+# Assumes pychart, beautiful soup installed.
+# Generates the plots and graphs for performance testing.
+doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
+
+# Docbook configuration.
+# Assumes
+# libxslt
+# docbook-style-xsl
+# emacs-nxml-mode
+# xmlto passivetex
+xml_srcdir = ${glibcxx_srcdir}/doc/xml
+xml_sources = \
+ ${xml_srcdir}/spine.xml \
+ ${xml_srcdir}/authors.xml \
+ ${xml_srcdir}/manual/abi.xml \
+ ${xml_srcdir}/manual/algorithms.xml \
+ ${xml_srcdir}/manual/allocator.xml \
+ ${xml_srcdir}/manual/auto_ptr.xml \
+ ${xml_srcdir}/manual/backwards_compatibility.xml \
+ ${xml_srcdir}/manual/bitmap_allocator.xml \
+ ${xml_srcdir}/manual/build.xml \
+ ${xml_srcdir}/manual/build_hacking.xml \
+ ${xml_srcdir}/manual/codecvt.xml \
+ ${xml_srcdir}/manual/concurrency.xml \
+ ${xml_srcdir}/manual/configure.xml \
+ ${xml_srcdir}/manual/containers.xml \
+ ${xml_srcdir}/manual/ctype.xml \
+ ${xml_srcdir}/manual/debug_mode.xml \
+ ${xml_srcdir}/manual/debug.xml \
+ ${xml_srcdir}/manual/diagnostics.xml \
+ ${xml_srcdir}/manual/evolution.xml \
+ ${xml_srcdir}/manual/extensions.xml \
+ ${xml_srcdir}/manual/internals.xml \
+ ${xml_srcdir}/manual/intro.xml \
+ ${xml_srcdir}/manual/io.xml \
+ ${xml_srcdir}/manual/iterators.xml \
+ ${xml_srcdir}/manual/locale.xml \
+ ${xml_srcdir}/manual/localization.xml \
+ ${xml_srcdir}/manual/messages.xml \
+ ${xml_srcdir}/manual/mt_allocator.xml \
+ ${xml_srcdir}/manual/numerics.xml \
+ ${xml_srcdir}/manual/parallel_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/strings.xml \
+ ${xml_srcdir}/manual/support.xml \
+ ${xml_srcdir}/manual/test.xml \
+ ${xml_srcdir}/manual/using.xml \
+ ${xml_srcdir}/manual/utilities.xml \
+ ${xml_srcdir}/manual/appendix_free.xml \
+ ${xml_srcdir}/manual/appendix_contributing.xml \
+ ${xml_srcdir}/manual/appendix_porting.xml \
+ ${xml_srcdir}/api.xml \
+ ${xml_srcdir}/faq.xml
+
+xml_sources_extra = \
+ ${xml_srcdir}/gnu/fdl-1.2.xml \
+ ${xml_srcdir}/gnu/gpl-2.0.xml
+
+xml_noinst = \
+ ${xml_srcdir}/book.txml \
+ ${xml_srcdir}/chapter.txml \
+ ${xml_srcdir}/class.txml
+
+XSLTPROC = xsltproc
+XSLTPROC_FLAGS = --nonet --xinclude
+XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-stylesheets
+XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
+XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
+#XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
+XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
+
+# Validate existing XML structure.
+XMLLINT = xmllint
+#LINT_FLAGS = --debug --nonet --xinclude --nsclean --postvalid --nowarning
+#LINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent
+LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
+VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
+XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
+
+# PDF 1
+# fop
+FOP = fop
+FOP_FLAGS = -d -r
+
+# PDF 2
+# xmlto
+XML2PDF = xmlto
+XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
+
+# PDF 3
+# xmlroff
+XMLROFF = xmlroff
+XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
+
+# PDF 4
+# prince
+PRINCE = prince
+PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
+
+# By adding these files here, automake will remove them for 'make clean'
+CLEANFILES = *.log
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign --ignore-deps doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ $(mkdir_p) $(distdir)/..
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ clean-local distclean distclean-generic distclean-libtool \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-info-am
+
+doc-html-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=html $${srcdir} $${builddir})
+
+doc-man-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=man $${srcdir} $${builddir})
+
+doc-xml-doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`cd ..; ${PWD_COMMAND}`; \
+ ${SHELL} ${doc_doxygen_script} \
+ --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir})
+doc-xml-doxygen-single: doc-xml-doxygen
+ @echo "Generating doxygen xml single file..."
+ $(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml;
+doc-html-performance:
+ -@(chmod + ${doc_performance_script}; \
+ ${doc_performance_script} ${top_srcdir} \
+ ${glibcxx_builddir}/testsuite \
+ ${top_srcdir}/testsuite/data/make_graph_htmls.xml \
+ ${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
+
+${glibcxx_builddir}/doc/html:
+ mkdir ${glibcxx_builddir}/doc/html
+
+${glibcxx_builddir}/doc/pdf:
+ mkdir ${glibcxx_builddir}/doc/pdf
+
+${glibcxx_builddir}/doc/fo:
+ mkdir ${glibcxx_builddir}/doc/fo
+
+${glibcxx_builddir}/doc/xml:
+ mkdir ${glibcxx_builddir}/doc/xml
+doc-xml-validate: $(xml_sources)
+ @echo "Generating XML validation log..."
+ $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+
+doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml
+ @echo "Generating XML single..."
+ $(XMLLINT) --xinclude --noent --noblanks \
+ -o ${glibcxx_builddir}/doc/xml/spine-single.xml \
+ ${top_srcdir}/doc/xml/spine.xml
+
+# HTML, index plus chapters
+doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html
+ @echo "Generating html files..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+ $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# HTML, all one page
+doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html
+ @echo "Generating html single file..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \
+ $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# FO
+doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo
+ @echo "Generating FO files..."
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \
+ $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
+
+# PDF
+# Points to current best xml to PDF generation process.
+doc-pdf: doc-pdf-prince
+doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf fop files from xml..."
+ $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
+ -xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
+
+doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
+ @echo "Generating pdf fop files from fo..."
+ $(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \
+ -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf
+doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf xmlto files..."
+ $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+doc-pdf-xmlroff: $(xml_sources) doc-fo
+ @echo "Generating pdf xmlroff files..."
+ $(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo
+doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf
+ @echo "Generating pdf prince files..."
+ $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml
+
+# No install-pdf, install-html support in automake yet
+install-pdf:
+install-html:
+
+# Installation of distribution html documentation not yet supported
+# TODO: Write custom install-html rule.
+.PHONY: install-html install-pdf \
+ doc-doxygen-html doc-doxygen-man doc-performance
+
+# To remove directories.
+clean-local:
+ rm -rf man html pdf fo doxygen xml
+# 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.
+.NOEXPORT:
diff --git a/libstdc++-v3/doc/doxygen/Intro.3 b/libstdc++-v3/doc/doxygen/Intro.3
new file mode 100644
index 00000000000..cb3ff2e4a1e
--- /dev/null
+++ b/libstdc++-v3/doc/doxygen/Intro.3
@@ -0,0 +1,132 @@
+.\" t
+.\" This man page is released under the FDL as part of libstdc++.
+.TH C++Intro 3 "20 May 2004" "GNU libstdc++" "Standard C++ Library"
+.SH NAME
+C++Intro \- Introduction to the GNU libstdc++ man pages
+.SH DESCRIPTION
+This man page serves as a brief introduction to the GNU implementation of
+the Standard C++ Library. For a better introduction and more complete
+documentation, see the
+.B libstdc++
+homepage listed at the end.
+.P
+All standard library entities are declared within
+.I namespace std
+and have manual entries beginning with "std::". For example, to see
+documentation of the template class
+.I std::vector
+one would use "man std::vector". Some entities do not have a separate man
+page; for those see the main listing in "man Namespace_std".
+.P
+All the man pages are automatically generated by Doxygen. For more
+information on this tool, see the HTML counterpart to these man pages.
+.P
+Some man pages do not correspond to individual classes or functions. Rather
+they describe categories of the Standard Library. (For a more thorough
+introduction to the various categories, consult a text such as Josuttis'
+or Austern's.) These category pages are:
+.P
+.\" These are separated by ONE TAB. Nothing else. I don't like it either.
+.TS
+lB l.
+C++Intro This page.
+Namespace_std A listing of the contents of std::.
+Namespace___gnu_cxx A listing of the contents of __gnu_cxx::.
+Containers An introduction to container classes.
+Sequences Linear containers.
+Assoc_containers Key-based containers.
+Iterator_types Programatically distinguishing iterators/pointers.
+Intro_functors An introduction to function objects, or functors.
+Arithmetic_functors Functors for basic math.
+Binder_functors Functors which "remember" an argument.
+Comparison_functors Functors wrapping built-in comparisons.
+Func_ptr_functors Functors for use with pointers to functions.
+Logical_functors Functors wrapping the Boolean operations.
+Member_ptr_functor Functors for use with pointers to members.
+Negation_functors Functors which negate their contents.
+SGIextensions A list of the extensions from the SGI STL subset.
+
+.TE
+.P
+The HTML documentation typically goes into much more depth.
+.SH FILES
+Lots!
+.SS Standard Headers
+These headers will be found automatically, unless you instruct the compiler
+otherwise.
+.TS
+lB lB lB lB.
+<algorithm> <csignal> <iomanip> <ostream>
+<bitset> <cstdarg> <ios> <queue>
+<cassert> <cstddef> <iosfwd> <set>
+<cctype> <cstdio> <iostream> <sstream>
+<cerrno> <cstdlib> <istream> <stack>
+<cfloat> <cstring> <iterator> <stdexcept>
+<ciso>646 <ctime> <limits> <streambuf>
+<climits> <cwchar> <list> <string>
+<clocale> <cwctype> <locale> <utility>
+<cmath> <deque> <map> <valarray>
+<complex> <fstream> <memory> <vector>
+<csetjmp> <functional> <numeric>
+.TE
+.SS Backwards-Compatibility Headers
+For GCC 3.0 these headers will be found automatically, unless you instruct
+the compiler otherwise. You should not depend on this, instead you should
+read FAQ 5.4 and use a
+.B backward/
+prefix.
+.TS
+lB lB lB lB.
+<strstream>
+.TE
+.SS Extension Headers
+These headers will only be found automatically if you include the leading
+.B ext/
+in the name. Otherwise you need to read FAQ 5.4.
+.\" Easy way to generate these columns of headers is to use GNU ls(1):
+.\" ls -w 40 file1 file2... | sed 's=[a-z_][a-z_]*=<ext/&>=g'
+.TS
+lB lB.
+<ext/algorithm> <ext/numeric>
+<ext/functional> <ext/iterator>
+<ext/slist> <ext/rb_tree>
+<ext/rope> <ext/memory>
+<ext/bitmap_allocator.h> <ext/debug_allocator.h>
+<ext/malloc_allocator.h> <ext/mt_allocator.h>
+<ext/pool_allocator.h> <ext/pod_char_traits.h>
+<ext/stdio_filebuf.h> <ext/stdio_sync_filebuf.h>
+.TE
+.SS Libraries
+.TP
+.I libstdc++.a
+The library implementation in static archive form. If you did not configure
+libstdc++ to use shared libraries, this will always be used. Otherwise
+it will only be used if the user requests it.
+.TP
+.I libsupc++.a
+This library contains C++ language support routines. Usually you will never
+need to know about it, but it can be useful. See FAQ 2.5.
+.TP
+.I libstdc++.so[.N]
+The library implementation in shared object form. This will be used in
+preference to the static archive form by default. N will be a number equal
+to or greater than 3. If N is in the 2.x series, then you are looking at
+the old libstdc++-v2 library, which we do not maintain.
+.TP
+.I libstdc++.la
+.TP
+.I libsupc++.la
+These are Libtool library files, and should only be used when working with
+that tool.
+.SH CONFORMING TO
+Almost conforming to
+.BI "International Standard ISO/IEC 14882:1998(E), " "Programming Languages --- C++"
+(aka the C++ standard), in addition to corrections proposed by the Library
+Working Group,
+.SM JTC1/SC22/WG21.
+.SH SEE ALSO
+.UR
+http://gcc.gnu.org/libstdc++/
+.UE
+for the Frequently Asked Questions, online documentation, and much, much more!
+.\" vim:ts=8:noet:
diff --git a/libstdc++-v3/docs/doxygen/TODO b/libstdc++-v3/doc/doxygen/TODO
index d50c65d8bab..d50c65d8bab 100644
--- a/libstdc++-v3/docs/doxygen/TODO
+++ b/libstdc++-v3/doc/doxygen/TODO
diff --git a/libstdc++-v3/doc/doxygen/doxygroups.cc b/libstdc++-v3/doc/doxygen/doxygroups.cc
new file mode 100644
index 00000000000..68d142fdbfb
--- /dev/null
+++ b/libstdc++-v3/doc/doxygen/doxygroups.cc
@@ -0,0 +1,238 @@
+/*
+ Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+ See license.html for license.
+
+ This just provides documentation for stuff that doesn't need to be in the
+ source headers themselves. It is a ".cc" file for the sole cheesy reason
+ that it triggers many different text editors into doing Nice Things when
+ typing comments. However, it is mentioned nowhere except the *cfg.in files.
+
+ Some actual code (declarations) is exposed here, but no compiler ever
+ sees it. The decls must be visible to doxygen, and sometimes their real
+ declarations are not visible, or not visible in a way we want.
+
+ Pieces separated by '// //' lines will usually not be presented to the
+ user on the same page.
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+/** @namespace std
+ * @brief Everything defined by the ISO C++ Standard is within
+ * namespace <a class="el" href="namespacestd.html">std</a>.
+*/
+/** @namespace std::__detail
+ * @brief Implementation details not part of the namespace <a class="el"
+ * href="namespacestd.html">std</a> interface.
+*/
+/** @namespace std::tr1
+ * @brief Everything defined by the ISO C++ TR1 is within namespace std::tr1.
+*/
+/** @namespace std::tr1::__detail
+ * @brief Implementation details not part of the namespace std::tr1 interface.
+*/
+/** @namespace __gnu_cxx
+ * @brief GNU extensions for public use.
+*/
+/** @namespace __gnu_cxx::__detail
+ * @brief Implementation details not part of the namespace __gnu_cxx
+ * interface.
+*/
+/** @namespace __gnu_cxx::typelist
+ * @brief GNU typelist extensions for public compile-time use.
+*/
+/** @namespace __gnu_internal
+ * @brief GNU implemenation details, not for public use or
+ * export. Used only when anonymous namespaces cannot be substituted.
+*/
+/** @namespace __gnu_debug
+ * @brief GNU debug classes for public use.
+*/
+// // // // // // // // // // // // // // // // // // // // // // // //
+/** @addtogroup SGIextensions STL extensions from SGI
+Because libstdc++ based its implementation of the STL subsections of
+the library on the SGI 3.3 implementation, we inherited their extensions
+as well.
+
+They are additionally documented in the
+<a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">
+online documentation</a>, a copy of which is also shipped with the
+library source code (in .../docs/html/documentation.html). You can also
+read the documentation <a href="http://www.sgi.com/tech/stl/">on SGI's
+site</a>, which is still running even though the code is not maintained.
+
+<strong>NB</strong> that the following notes are pulled from various
+comments all over the place, so they may seem stilted.
+<hr>
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+// This is standalone because, unlike the functor introduction, there is no
+// single header file which serves as a base "all containers must include
+// this header". We do some quoting of 14882 here.
+/** @addtogroup Containers Containers
+Containers are collections of objects.
+
+A container may hold any type which meets certain requirements, but the type
+of contained object is chosen at compile time, and all objects in a given
+container must be of the same type. (Polymorphism is possible by declaring a
+container of pointers to a base class and then populating it with pointers to
+instances of derived classes. Variant value types such as the @c any class
+from <a href="http://www.boost.org/">Boost</a> can also be used.
+
+All contained types must be @c Assignable and @c CopyConstructible.
+Specific containers may place additional requirements on the types of
+their contained objects.
+
+Containers manage memory allocation and deallocation themselves when
+storing your objects. The objects are destroyed when the container is
+itself destroyed. Note that if you are storing pointers in a container,
+@c delete is @e not automatically called on the pointers before destroying them.
+
+All containers must meet certain requirements, summarized in
+<a href="tables.html">tables</a>.
+
+The standard containers are further refined into
+@link Sequences Sequences@endlink and
+@link Assoc_containers Associative Containers@endlink.
+*/
+
+/** @addtogroup Sequences Sequences
+Sequences arrange a collection of objects into a strictly linear order.
+
+The differences between sequences are usually due to one or both of the
+following:
+ - memory management
+ - algorithmic complexity
+
+As an example of the first case, @c vector is required to use a contiguous
+memory layout, while other sequences such as @c deque are not.
+
+The prime reason for choosing one sequence over another should be based on
+the second category of differences, algorithmic complexity. For example, if
+you need to perform many inserts and removals from the middle of a sequence,
+@c list would be ideal. But if you need to perform constant-time access to
+random elements of the sequence, then @c list should not be used.
+
+All sequences must meet certain requirements, summarized in
+<a href="tables.html">tables</a>.
+*/
+
+/** @addtogroup Assoc_containers Associative Containers
+Associative containers allow fast retrieval of data based on keys.
+
+Each container type is parameterized on a @c Key type, and an ordering
+relation used to sort the elements of the container.
+
+There should be more text here.
+
+All associative containers must meet certain requirements, summarized in
+<a href="tables.html">tables</a>.
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+/** @namespace abi
+ * @brief The cross-vendor C++ Application Binary Interface. A
+ * namespace alias to __cxxabiv1.
+ *
+ * A brief overview of an ABI is given in the libstdc++ FAQ, question
+ * 5.8 (you may have a copy of the FAQ locally, or you can view the online
+ * version at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_8).
+ *
+ * GCC subscribes to a relatively-new cross-vendor ABI for C++, sometimes
+ * called the IA64 ABI because it happens to be the native ABI for that
+ * platform. It is summarized at http://www.codesourcery.com/cxx-abi/
+ * along with the current specification.
+ *
+ * For users of GCC greater than or equal to 3.x, entry points are
+ * available in <cxxabi.h>, which notes, <em>"It is not normally
+ * necessary for user programs to include this header, or use the
+ * entry points directly. However, this header is available should
+ * that be needed."</em>
+*/
+
+namespace abi {
+/**
+@brief New ABI-mandated entry point in the C++ runtime library for demangling.
+
+@param mangled_name A NUL-terminated character string containing the name
+ to be demangled.
+
+@param output_buffer A region of memory, allocated with malloc, of
+ @a *length bytes, into which the demangled name
+ is stored. If @a output_buffer is not long enough,
+ it is expanded using realloc. @a output_buffer may
+ instead be NULL; in that case, the demangled name is
+ placed in a region of memory allocated with malloc.
+
+@param length If @a length is non-NULL, the length of the buffer containing
+ the demangled name is placed in @a *length.
+
+@param status @a *status is set to one of the following values:
+ - 0: The demangling operation succeeded.
+ - -1: A memory allocation failiure occurred.
+ - -2: @a mangled_name is not a valid name under the C++ ABI
+ mangling rules.
+ - -3: One of the arguments is invalid.
+
+@return A pointer to the start of the NUL-terminated demangled name, or NULL
+ if the demangling fails. The caller is responsible for deallocating
+ this memory using @c free.
+
+
+The demangling is performed using the C++ ABI mangling rules, with
+GNU extensions. For example, this function is used
+in __gnu_cxx::__verbose_terminate_handler. See
+http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#5 for other
+examples of use.
+
+@note The same demangling functionality is available via libiberty
+(@c <libiberty/demangle.h> and @c libiberty.a) in GCC 3.1 and later, but that
+requires explicit installation (@c --enable-install-libiberty) and uses a
+different API, although the ABI is unchanged.
+*/
+char* __cxa_demangle (const char* mangled_name, char* output_buffer,
+ size_t* length, int* status);
+} // namespace abi
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+/** @addtogroup binarysearch Binary search algorithms
+These algorithms are variations of a classic binary search. They all assume
+that the sequence being searched is already sorted.
+
+The number of comparisons will be logarithmic (and as few as possible).
+The number of steps through the sequence will be logarithmic for
+random-access iterators (e.g., pointers), and linear otherwise.
+
+The LWG has passed Defect Report 270, which notes: <em>The proposed
+resolution reinterprets binary search. Instead of thinking about searching
+for a value in a sorted range, we view that as an important special
+case of a more general algorithm: searching for the partition point in a
+partitioned range. We also add a guarantee that the old wording did not:
+we ensure that the upper bound is no earlier than the lower bound, that
+the pair returned by equal_range is a valid range, and that the first part
+of that pair is the lower bound.</em>
+
+The actual effect of the first sentence is that a comparison functor
+passed by the user doesn't necessarily need to induce a strict weak ordering
+relation. Rather, it partitions the range.
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+/** @addtogroup setoperations Set operation algorithms
+These algorithms are common set operations performed on sequences that are
+already sorted.
+
+The number of comparisons will be linear.
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+/* * @addtogroup groupname description of group
+placeholder text
+*/
+
+// // // // // // // // // // // // // // // // // // // // // // // //
+
+// vim:et:noai:
+
diff --git a/libstdc++-v3/doc/doxygen/mainpage.html b/libstdc++-v3/doc/doxygen/mainpage.html
new file mode 100644
index 00000000000..b723695e7a4
--- /dev/null
+++ b/libstdc++-v3/doc/doxygen/mainpage.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>libstdc++ Source: Main Index</title>
+<link href="style.css" rel="stylesheet" type="text/css">
+</head>
+
+<body bgcolor="#ffffff">
+<!--
+ Originally generated by Doxygen 1.2.12.
+
+ This used to be surrounded by /* */ marks and tagged with @mainpage, so
+ that Doxygen would create the index page from it. HOWEVER, Doxygen
+ ignores all but the most basic HTML tags, and even with those it strips
+ all the attributes. (See, the HTML you write for @mainpage isn't used
+ directly; it all gets run through Doxygen and re-output.) So lots of
+ tags were all being mangled.
+
+ Funk 'dat. Now we let Doxygen do whatever it feels like doing for the
+ index page, and then we just flat copy this over top of it. Voila!
+ Tags actually work like they're supposed to in HTML.
+-->
+
+<h1>libstdc++ Source Documentation</h1>
+
+<h2>Documentation Overview</h2>
+
+<p class="smallertext">Generated on @DATE@.</p>
+
+<p>There are two types of documentation for libstdc++. One is the
+ distribution documentation, which can be read online
+ <a href="http://gcc.gnu.org/onlinedocs/libstdc++/index.html">here</a>
+ or offline from the file doc/html/index.html in the library source
+ directory.
+</p>
+
+<p>The other type is the source documentation, of which this is the first page.
+</p>
+
+<p>Here are entry points to all the pages generated by Doxygen:
+ <ul>
+ <li><a href="modules.html">Modules</a>
+ <li><a href="namespaces.html">Namespace List</a>
+ <li><a href="hierarchy.html">Class List</a>
+ <li><a href="annotated.html">Class Annotated List</a>
+ <li><a href="classes.html">Class Alphabetical Index</a>
+ <li><a href="globals_func.html">Function Alphabetical List</a>
+ <li><a href="files.html">Source File List</a>
+ <li><a href="todo.html">TODO List</a> (This is incomplete... how ironic.)
+ </ul>
+</p>
+
+<p>If you are using Doxygen for your own projects, you can use
+ <a href="libstdc++.tag">a tag file for the appropriate version</a> and
+ an entry such as
+ <blockquote>
+ TAGFILES = "libstdc++.tag =
+ http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen"
+ </blockquote>
+ Be sure to adjust the URL for the right version. If you download a
+ local copy of the source documentation for faster viewing, you can use
+ the doxytag/installdox programs (part of Doxygen) to adjust the links
+ for you.
+</p>
+
+<h2>Generating the documentation</h2>
+<p>These HTML pages are automatically generated, along with the man
+ pages. See the section "Documentation Style"
+ in <code>doc/xml/manual/appendix_contributing.xml</code> in the
+ source tree for how to create (and write) the doxygen markup.
+ This style guide can also be viewed on the <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01apas04.html">web</a>.
+
+<h2>License, Copyright, and Other Lawyerly Verbosity</h2>
+<p>The libstdc++ documentation is released under
+ <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">
+ these terms</a>.
+</p>
+<p>Part of the generated documentation involved comments and notes from
+ SGI, who says we gotta say this:
+ <blockquote>
+ Permission to use, copy, modify, distribute and sell this software and its
+ documentation for any purpose is hereby granted without fee, provided
+ that the below copyright notice appears in all copies and that both
+ the 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.
+ <br><br>
+ Copyright &copy; 1994
+ Hewlett-Packard Company
+ </blockquote>
+</p>
+<p>Part of the generated documentation is quoted from the ISO C++ Standard,
+ which is Copyright &copy; 1998 by Information Technology Industry Council.
+</p>
+
+</body>
+</html>
diff --git a/libstdc++-v3/docs/doxygen/stdheader.cc b/libstdc++-v3/doc/doxygen/stdheader.cc
index a5145419b04..a5145419b04 100644
--- a/libstdc++-v3/docs/doxygen/stdheader.cc
+++ b/libstdc++-v3/doc/doxygen/stdheader.cc
diff --git a/libstdc++-v3/docs/doxygen/style.css b/libstdc++-v3/doc/doxygen/style.css
index c49c37cdfd9..c49c37cdfd9 100644
--- a/libstdc++-v3/docs/doxygen/style.css
+++ b/libstdc++-v3/doc/doxygen/style.css
diff --git a/libstdc++-v3/docs/doxygen/tables.html b/libstdc++-v3/doc/doxygen/tables.html
index 74ac3e2165d..74ac3e2165d 100644
--- a/libstdc++-v3/docs/doxygen/tables.html
+++ b/libstdc++-v3/doc/doxygen/tables.html
diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in
new file mode 100644
index 00000000000..8895eabe358
--- /dev/null
+++ b/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -0,0 +1,1490 @@
+# Doxyfile 1.5.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the
+# config file that follow. The default is UTF-8 which is also the
+# encoding used for all text before the first occurrence of this
+# tag. Doxygen uses libiconv (or the iconv built into libc) for the
+# transcoding. See http://www.gnu.org/software/libiconv for the list
+# of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = libstdc++
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = @outdir@
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = NO
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will
+# prepend the brief description of a member or function before the
+# detailed description. Note: if both HIDE_UNDOC_MEMBERS and
+# BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be
+# completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = YES
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES = "doctodo=@todo\nDoc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more. " \
+ "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink "
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
+# include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip
+# sources only. Doxygen will parse them like normal C++ but will
+# assume all classes use public instead of private inheritance when no
+# explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = YES
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is
+# documented as struct with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code where the coding convention is that all structs are
+# typedef'ed and only the typedef is referenced never the struct's name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = YES
+
+# If this flag is set to YES, the members of anonymous namespaces will
+# be extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the
+# base name of the file that contains the anonymous namespace. By
+# default anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = YES
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS = @enabled_sections@
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 0
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple
+# directories then setting the SHOW_DIRECTORIES tag to YES will show
+# the directory hierarchy in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or
+# script that doxygen should invoke to get the current version for
+# each file (typically from the version control system). Doxygen will
+# invoke the program by executing (via popen()) the command <command>
+# <input-file>, where <command> is the value of the
+# FILE_VERSION_FILTER tag, and <input-file> is the name of an input
+# file provided by doxygen. Whatever the program writes to standard
+# output is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = NO
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text "
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories
+# that contain documented source files. You may enter file names like
+# "myfile.cpp" or directories like "/usr/src/myproject". Separate the
+# files or directories with spaces.
+
+INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
+ @srcdir@/include/precompiled/stdc++.h \
+ @srcdir@/include/precompiled/stdtr1c++.h \
+ @srcdir@/include/precompiled/extc++.h \
+ @srcdir@/libsupc++/cxxabi.h \
+ @srcdir@/libsupc++/exception \
+ @srcdir@/libsupc++/new \
+ @srcdir@/libsupc++/typeinfo \
+ include/@host_alias@/bits \
+ include/bits \
+ include/debug \
+ include/parallel \
+ include/ext \
+ include/tr1 \
+ include/tr1_impl \
+ include/algorithm \
+ include/array \
+ include/bitset \
+ include/cassert \
+ include/ccomplex \
+ include/cctype \
+ include/cerrno \
+ include/cfenv \
+ include/cfloat \
+ include/cinttypes \
+ include/ciso646 \
+ include/climits \
+ include/clocale \
+ include/cmath \
+ include/csetjmp \
+ include/csignal \
+ include/cstdarg \
+ include/cstdbool \
+ include/cstddef \
+ include/cstdint \
+ include/cstdio \
+ include/cstdlib \
+ include/cstring \
+ include/ctgmath \
+ include/ctime \
+ include/cwchar \
+ include/cwctype \
+ include/deque \
+ include/fstream \
+ include/functional \
+ include/iomanip \
+ include/ios \
+ include/iosfwd \
+ include/iostream \
+ include/istream \
+ include/iterator \
+ include/limits \
+ include/list \
+ include/locale \
+ include/map \
+ include/memory \
+ include/numeric \
+ include/ostream \
+ include/queue \
+ include/random \
+ include/regex \
+ include/set \
+ include/sstream \
+ include/stack \
+ include/stdexcept \
+ include/streambuf \
+ include/string \
+ include/system_error \
+ include/tuple \
+ include/type_traits \
+ include/unordered_map \
+ include/unordered_set \
+ include/utility \
+ include/valarray \
+ include/vector \
+ include/backward/hash_map \
+ include/backward/hash_set \
+ include/debug/bitset \
+ include/debug/deque \
+ include/debug/list \
+ include/debug/map \
+ include/debug/set \
+ include/debug/string \
+ include/debug/vector \
+ include/ext/algorithm \
+ include/ext/functional \
+ include/ext/iterator \
+ include/ext/memory \
+ include/ext/numeric \
+ include/ext/rb_tree \
+ include/ext/rope \
+ include/ext/slist \
+ include/ext/pb_ds \
+ include/ext/pb_ds/detail \
+ include/parallel/algorithm \
+ include/parallel/numeric \
+ include/tr1/array \
+ include/tr1/ccomplex \
+ include/tr1/cctype \
+ include/tr1/cfenv \
+ include/tr1/cfloat \
+ include/tr1/cinttypes \
+ include/tr1/climits \
+ include/tr1/cmath \
+ include/tr1/complex \
+ include/tr1/cstdarg \
+ include/tr1/cstdbool \
+ include/tr1/cstdint \
+ include/tr1/cstdio \
+ include/tr1/cstdlib \
+ include/tr1/ctgmath \
+ include/tr1/ctime \
+ include/tr1/cwchar \
+ include/tr1/cwctype \
+ include/tr1/functional \
+ include/tr1/hashtable.h \
+ include/tr1/memory \
+ include/tr1/random \
+ include/tr1/regex \
+ include/tr1/tuple \
+ include/tr1/type_traits \
+ include/tr1/unordered_map \
+ include/tr1/unordered_set \
+ include/tr1_impl/utility \
+ include/tr1_impl/array \
+ include/tr1_impl/cctype \
+ include/tr1_impl/cfenv \
+ include/tr1_impl/cinttypes \
+ include/tr1_impl/cmath \
+ include/tr1_impl/complex \
+ include/tr1_impl/cstdint \
+ include/tr1_impl/cstdio \
+ include/tr1_impl/cstdlib \
+ include/tr1_impl/cwchar \
+ include/tr1_impl/cwctype \
+ include/tr1_impl/functional \
+ include/tr1_impl/hashtable \
+ include/tr1_impl/random \
+ include/tr1_impl/regex \
+ include/tr1_impl/tuple \
+ include/tr1_impl/type_traits \
+ include/tr1_impl/unordered_map \
+ include/tr1_impl/unordered_set \
+ include/tr1_impl/utility
+
+# This tag can be used to specify the character encoding of the source
+# files that doxygen parses. Internally doxygen uses the UTF-8
+# encoding, which is also the default input encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible
+# encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS = *.h \
+ *.hpp \
+ *.tcc
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = Makefile
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS = stamp-* \
+ *stdc++.h* \
+ *stdtr1c++.h* \
+ *extc++.h* \
+ */.svn/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol
+# names (namespaces, classes, functions, etc.) that should be excluded
+# from the output. The symbol name can be a fully qualified name, a
+# word, or if the wildcard * is used, a substring. Examples:
+# ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files
+# will be generated. Documented entities will be cross-referenced with
+# these sources. Note: To get rid of all source code in the generated
+# output, make sure also VERBATIM_HEADERS is set to NO. If you have
+# enabled CALL_GRAPH or CALLER_GRAPH then you must also enable this
+# option. If you don't then doxygen will produce a warning and turn it
+# on anyway
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 2
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = @do_html@
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = @html_output_dir@
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET = @srcdir@/doc/doxygen/style.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = YES
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES = amsmath
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = @do_man@
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = @do_xml@
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+#XML_SCHEMA =
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+#XML_DTD = http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED = __GTHREADS \
+ _GLIBCXX_STD=std \
+ _GLIBCXX_TR1=tr1 \
+ "_GLIBCXX_BEGIN_NAMESPACE(name)=namespace name { " \
+ "_GLIBCXX_BEGIN_NESTED_NAMESPACE(name, unused)=namespace name { " \
+ _GLIBCXX_END_NAMESPACE=} \
+ _GLIBCXX_END_NESTED_NAMESPACE=} \
+ "_GLIBCXX_TEMPLATE_ARGS=... " \
+ _GLIBCXX_DEPRECATED \
+ _GLIBCXX_USE_WCHAR_T \
+ _GLIBCXX_USE_LONG_LONG \
+ __glibcxx_function_requires=// \
+ __glibcxx_class_requires=// \
+ __glibcxx_class_requires2=// \
+ __glibcxx_class_requires3=// \
+ __glibcxx_class_requires4=//
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES
+# then this tag can be used to specify a list of macro names that
+# should be expanded. The macro definition that is found in the
+# sources will be used. Use the PREDEFINED tag if you want to use a
+# different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE = @generate_tagfile@
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = YES
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
+# be found in the default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = NO
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = NO
+
+# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES
+# then doxygen will generate a call dependency graph for every global
+# function or class method. Note that enabling this option will
+# significantly increase the time of a run. So in most cases it will
+# be better to enable call graphs for selected functions only using
+# the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES
+# then doxygen will generate a caller dependency graph for every
+# global function or class method. Note that enabling this option
+# will significantly increase the time of a run. So in most cases it
+# will be better to enable caller graphs for selected functions only
+# using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum
+# number of nodes that will be shown in the graph. If the number of
+# nodes in a graph becomes larger than this value, doxygen will
+# truncate the graph, which is visualized by representing a node as a
+# red box. Note that doxygen if the number of direct children of the
+# root node in a graph is already larger than MAX_DOT_GRAPH_NOTES then
+# the graph will not be shown at all. Also note that the size of a
+# graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = NO
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/libstdc++-v3/doc/html/README b/libstdc++-v3/doc/html/README
new file mode 100644
index 00000000000..ea5dcfcdd41
--- /dev/null
+++ b/libstdc++-v3/doc/html/README
@@ -0,0 +1,3 @@
+The HTML documentation in this folder is generated from the XML sources.
+
+To change or edit, please edit the XML sources in the ../xml directory.
diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html
new file mode 100644
index 00000000000..f9f7e65b0f7
--- /dev/null
+++ b/libstdc++-v3/doc/html/api.html
@@ -0,0 +1,48 @@
+<?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>API and Source Level Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk02.html" title="" /><link rel="prev" href="bk02.html" title="" /><link rel="next" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API and Source Level Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="api"></a>API and Source Level Documentation</h2></div><div><p class="copyright">Copyright ©
+ 2008
+
+ <a class="ulink" href="http://fsf.org" target="_top">FSF
+ </a>
+ </p></div><div><div class="legalnotice"><a id="id330876"></a><p>
+ <a class="ulink" href="17_intro/license.html" target="_top">License
+ </a>
+ </p></div></div></div><hr /></div><p>
+The GNU C++ library sources have been specially formatted so that with the
+proper invocation of another tool (Doxygen), a set of HTML pages
+are generated from the sources files themselves. The resultant
+documentation is referred to as Source Level Documentation, and is
+useful for examining the signatures of public member functions for
+the library classes, finding out what is in a particular include
+file, looking at inheritance diagrams, etc.
+</p><p>
+The source-level documentation for the most recent releases can be
+viewed online:
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+ <a class="ulink" href="libstdc++-html-USERS-3.4/index.html" target="_top">for the 3.4 release
+ </a>
+ </p></li><li><p>
+ <a class="ulink" href="libstdc++-html-USERS-4.1/index.html" target="_top">for the 4.1 release
+ </a>
+ </p></li><li><p>
+ <a class="ulink" href="libstdc++-html-USERS-4.2/index.html" target="_top">for the 4.2 release
+ </a>
+ </p></li><li><p>
+ <a class="ulink" href="latest-doxygen/index.html" target="_top">"the latest collection"
+ </a>
+ (For the main development tree; see the date on the first page.)
+ </p></li></ul></div><p>
+This generated HTML collection, as above, is also available for download in the libstdc++ snapshots directory at
+ <code class="literal">&lt;URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/&gt;</code>.
+ You will almost certainly need to use one of the
+ <a class="ulink" href="http://gcc.gnu.org/mirrors.html" target="_top">mirror sites</a> to download
+ the tarball. After unpacking, simply load libstdc++-html-*/index.html
+ into a browser.
+</p><p>
+Documentation for older releases is available for download only, not
+online viewing.
+</p><p>
+In addition, an initial set of man pages are also available in the
+same place as the HTML collections. Start with C++Intro(3).
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </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/bk02.html b/libstdc++-v3/doc/html/bk02.html
new file mode 100644
index 00000000000..a93a9ece9fa
--- /dev/null
+++ b/libstdc++-v3/doc/html/bk02.html
@@ -0,0 +1,3 @@
+<?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></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" 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="manual/backwards.html" title="Backwards Compatibility" /><link rel="next" href="api.html" title="API and Source Level Documentation" /></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="manual/backwards.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</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="manual/backwards.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> API and Source Level Documentation</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/bk03.html b/libstdc++-v3/doc/html/bk03.html
new file mode 100644
index 00000000000..49c532b5515
--- /dev/null
+++ b/libstdc++-v3/doc/html/bk03.html
@@ -0,0 +1,3 @@
+<?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></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" 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="api.html" title="API and Source Level Documentation" /><link rel="next" href="faq.html" title="Frequently Asked Questions" /></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="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</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="api.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API and Source Level Documentation </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> Frequently Asked Questions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/ext/lwg-active.html b/libstdc++-v3/doc/html/ext/lwg-active.html
new file mode 100644
index 00000000000..29e0d775bf3
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/lwg-active.html
@@ -0,0 +1,14696 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head><title>C++ Standard Library Active Issues List</title>
+
+
+
+<style type="text/css">
+p {text-align:justify}
+li {text-align:justify}
+ins {background-color:#A0FFA0}
+del {background-color:#FFA0A0}
+</style></head><body>
+<table>
+<tbody><tr>
+<td align="left">Doc. no.</td>
+<td align="left">N2456=07-0326</td>
+</tr>
+<tr>
+<td align="left">Date:</td>
+<td align="left">2007-10-20</td>
+</tr>
+<tr>
+<td align="left">Project:</td>
+<td align="left">Programming Language C++</td>
+</tr>
+<tr>
+<td align="left">Reply to:</td>
+<td align="left">Howard Hinnant &lt;<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>&gt;</td>
+</tr>
+</tbody></table>
+<h1>C++ Standard Library Active Issues List (Revision R52)</h1>
+
+ <p>Reference ISO/IEC IS 14882:1998(E)</p>
+ <p>Also see:</p>
+ <ul>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li>
+ </ul>
+ <p>The purpose of this document is to record the status of issues
+ which have come before the Library Working Group (LWG) of the ANSI
+ (J16) and ISO (WG21) C++ Standards Committee. Issues represent
+ potential defects in the ISO/IEC IS 14882:1998(E) document. Issues
+ are not to be used to request new features. </p>
+
+ <p>This document contains only library issues which are actively being
+ considered by the Library Working Group. That is, issues which have a
+ status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>,
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>. See
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a> for issues considered defects and
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a> for issues considered closed.</p>
+
+ <p>The issues in these lists are not necessarily formal ISO Defect
+ Reports (DR's). While some issues will eventually be elevated to
+ official Defect Report status, other issues will be disposed of in
+ other ways. See <a href="#Status">Issue Status</a>.</p>
+
+ <p>This document is in an experimental format designed for both
+ viewing via a world-wide web browser and hard-copy printing. It
+ is available as an HTML file for browsing or PDF file for
+ printing.</p>
+
+ <p>Prior to Revision 14, library issues lists existed in two slightly
+ different versions; a Committee Version and a Public
+ Version. Beginning with Revision 14 the two versions were combined
+ into a single version.</p>
+
+ <p>This document includes <i>[bracketed italicized notes]</i> as a
+ reminder to the LWG of current progress on issues. Such notes are
+ strictly unofficial and should be read with caution as they may be
+ incomplete or incorrect. Be aware that LWG support for a particular
+ resolution can quickly change if new viewpoints or killer examples are
+ presented in subsequent discussions.</p>
+
+ <p>For the most current official version of this document see
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21/</a>.
+ Requests for further information about this document should include
+ the document number above, reference ISO/IEC 14882:1998(E), and be
+ submitted to Information Technology Industry Council (ITI), 1250 Eye
+ Street NW, Washington, DC 20005.</p>
+
+ <p>Public information as to how to obtain a copy of the C++ Standard,
+ join the standards committee, submit an issue, or comment on an issue
+ can be found in the comp.std.c++ FAQ.
+ Public discussion of C++ Standard related issues occurs on <a href="news:comp.std.c++">news:comp.std.c++</a>.
+ </p>
+
+ <p>For committee members, files available on the committee's private
+ web site include the HTML version of the Standard itself. HTML
+ hyperlinks from this issues list to those files will only work for
+ committee members who have downloaded them into the same disk
+ directory as the issues list files. </p>
+
+<h2>Revision History</h2>
+<ul>
+<li>R52:
+2007-10-19 post-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>172 open issues, up by 4.</li>
+<li>582 closed issues, up by 27.</li>
+<li>754 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#724">724</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#725">725</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#726">726</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#727">727</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#728">728</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#729">729</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#730">730</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#731">731</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#733">733</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#735">735</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#736">736</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#737">737</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#738">738</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#739">739</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#741">741</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#745">745</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#747">747</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#748">748</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#750">750</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#751">751</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#752">752</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#753">753</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#754">754</a>.</li>
+<li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#546">546</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#564">564</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#565">565</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#573">573</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#585">585</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#588">588</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#393">393</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+<li>Changed the following issues from New to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#607">607</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#608">608</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#561">561</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#562">562</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#563">563</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#581">581</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#595">595</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>.</li>
+<li>Changed the following issues from New to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#552">552</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>.</li>
+<li>Changed the following issues from Open to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#401">401</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R51:
+2007-09-09 pre-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>168 open issues, up by 15.</li>
+<li>555 closed issues, up by 0.</li>
+<li>723 issues total, up by 15.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#711">711</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#713">713</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#714">714</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#716">716</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#717">717</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#718">718</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#719">719</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#721">721</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R50:
+2007-08-05 post-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>153 open issues, down by 5.</li>
+<li>555 closed issues, up by 17.</li>
+<li>708 issues total, up by 12.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#697">697</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#698">698</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#701">701</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#702">702</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#584">584</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>.</li>
+<li>Changed the following issues from Pending NAD Editorial to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#579">579</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from Pending WP to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>.</li>
+<li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from DR to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453">453</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R49:
+2007-06-23 pre-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>158 open issues, up by 13.</li>
+<li>538 closed issues, up by 7.</li>
+<li>696 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#692">692</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li>
+<li>Added the following Pending NAD Editorial issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#683">683</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#587">587</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R48:
+2007-05-06 post-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>145 open issues, down by 33.</li>
+<li>531 closed issues, up by 53.</li>
+<li>676 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Changed the following issues from NAD to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#357">357</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#368">368</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>.</li>
+<li>Changed the following issues from NAD_Future to NAD Future: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#105">105</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#116">116</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#149">149</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#188">188</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#219">219</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#353">353</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#599">599</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#600">600</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#601">601</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#602">602</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>.</li>
+<li>Changed the following issues from Tentatively Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R47:
+2007-03-09 pre-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>178 open issues, up by 37.</li>
+<li>478 closed issues, up by 0.</li>
+<li>656 issues total, up by 37.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li>
+<li>Changed the following issues from New to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+<li>Changed the following issues from Open to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>.</li>
+<li>Changed the following issues from Review to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R46:
+2007-01-12 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>141 open issues, up by 11.</li>
+<li>478 closed issues, down by 1.</li>
+<li>619 issues total, up by 10.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R45:
+2006-11-03 post-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 0.</li>
+<li>479 closed issues, up by 17.</li>
+<li>609 issues total, up by 17.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a> to Review.</li>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R44:
+2006-09-08 pre-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 6.</li>
+<li>462 closed issues, down by 1.</li>
+<li>592 issues total, up by 5.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R43:
+2006-06-23 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>124 open issues, up by 14.</li>
+<li>463 closed issues, down by 1.</li>
+<li>587 issues total, up by 13.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.</li>
+</ul></li>
+</ul>
+</li>
+<li>R42:
+2006-04-21 post-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>110 open issues, down by 16.</li>
+<li>464 closed issues, up by 24.</li>
+<li>574 issues total, up by 8.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a> to Open.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li>
+</ul></li>
+</ul>
+</li>
+<li>R41:
+2006-02-24 pre-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>126 open issues, up by 31.</li>
+<li>440 closed issues, up by 0.</li>
+<li>566 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>.</li>
+<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R40:
+2005-12-16 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>95 open issues.</li>
+<li>440 closed issues.</li>
+<li>535 issues total.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R39:
+2005-10-14 post-Mont Tremblant mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
+</li>
+<li>R38:
+2005-07-03 pre-Mont Tremblant mailing.
+Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
+</li>
+<li>R37:
+2005-06 mid-term mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
+</li>
+<li>R36:
+2005-04 post-Lillehammer mailing. All issues in "ready" status except
+for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
+previously in "DR" status were moved to "WP".
+</li>
+<li>R35:
+2005-03 pre-Lillehammer mailing.
+</li>
+<li>R34:
+2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
+</li>
+<li>R33:
+2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
+</li>
+<li>R32:
+2004-09 pre-Redmond mailing: reflects new proposed resolutions and
+new issues received after the 2004-07 mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
+</li>
+<li>R31:
+2004-07 mid-term mailing: reflects new proposed resolutions and
+new issues received after the post-Sydney mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
+</li>
+<li>R30:
+Post-Sydney mailing: reflects decisions made at the Sydney meeting.
+Voted all "Ready" issues from R29 into the working paper.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
+</li>
+<li>R29:
+Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
+</li>
+<li>R28:
+Post-Kona mailing: reflects decisions made at the Kona meeting.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
+</li>
+<li>R27:
+Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
+</li>
+<li>R26:
+Post-Oxford mailing: reflects decisions made at the Oxford meeting.
+All issues in Ready status were voted into DR status. All issues in
+DR status were voted into WP status.
+</li>
+<li>R25:
+Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
+</li>
+<li>R24:
+Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
+meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
+moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
+at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
+concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
+</li>
+<li>R23:
+Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
+Moved issues in the TC to TC status.
+</li>
+<li>R22:
+Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
+</li>
+<li>R21:
+Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
+</li>
+<li>R20:
+Post-Redmond mailing; reflects actions taken in Redmond. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
+not discussed at the meeting.
+
+All Ready issues were moved to DR status, with the exception of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+
+Noteworthy issues discussed at Redmond include
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
+</li>
+<li>R19:
+Pre-Redmond mailing. Added new issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
+</li>
+<li>R18:
+Post-Copenhagen mailing; reflects actions taken in Copenhagen.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
+to DR.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
+to Ready.
+
+Closed issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
+as NAD.
+
+</li>
+<li>R17:
+Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
+resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
+</li>
+<li>R16:
+post-Toronto mailing; reflects actions taken in Toronto. Added new
+issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
+appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
+the bug in enough places.
+</li>
+<li>R15:
+pre-Toronto mailing. Added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
+changes so that we pass Weblint tests.
+</li>
+<li>R14:
+post-Tokyo II mailing; reflects committee actions taken in
+Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
+</li>
+<li>R13:
+pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
+</li>
+<li>R12:
+pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
+</li>
+<li>R11:
+post-Kona mailing: Updated to reflect LWG and full committee actions
+in Kona (99-0048/N1224). Note changed resolution of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
+to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
+"closed" documents. Changed the proposed resolution of issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
+</li>
+<li>R10:
+pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
+</li>
+<li>R9:
+pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
+"closed" documents. (99-0030/N1206, 25 Aug 99)
+</li>
+<li>R8:
+post-Dublin mailing. Updated to reflect LWG and full committee actions
+in Dublin. (99-0016/N1193, 21 Apr 99)
+</li>
+<li>R7:
+pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
+</li>
+<li>R6:
+pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
+and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
+</li>
+<li>R5:
+update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
+for making list public. (30 Dec 98)
+</li>
+<li>R4:
+post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
+issues corrected. (22 Oct 98)
+</li>
+<li>R3:
+post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
+added, many issues updated to reflect LWG consensus (12 Oct 98)
+</li>
+<li>R2:
+pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
+</li>
+<li>R1:
+Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
+format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
+</li>
+</ul>
+
+<h2><a name="Status"></a>Issue Status</h2>
+
+ <p><b><a name="New">New</a></b> - The issue has not yet been
+ reviewed by the LWG. Any <b>Proposed Resolution</b> is purely a
+ suggestion from the issue submitter, and should not be construed as
+ the view of LWG.</p>
+
+ <p><b><a name="Open">Open</a></b> - The LWG has discussed the issue
+ but is not yet ready to move the issue forward. There are several
+ possible reasons for open status:</p>
+ <ul>
+ <li>Consensus may have not yet have been reached as to how to deal
+ with the issue.</li>
+ <li>Informal consensus may have been reached, but the LWG awaits
+ exact <b>Proposed Resolution</b> wording for review.</li>
+ <li>The LWG wishes to consult additional technical experts before
+ proceeding.</li>
+ <li>The issue may require further study.</li>
+ </ul>
+
+ <p>A <b>Proposed Resolution</b> for an open issue is still not be
+ construed as the view of LWG. Comments on the current state of
+ discussions are often given at the end of open issues in an italic
+ font. Such comments are for information only and should not be given
+ undue importance.</p>
+
+ <p><b><a name="Dup">Dup</a></b> - The LWG has reached consensus that
+ the issue is a duplicate of another issue, and will not be further
+ dealt with. A <b>Rationale</b> identifies the duplicated issue's
+ issue number. </p>
+
+ <p><b><a name="NAD">NAD</a></b> - The LWG has reached consensus that
+ the issue is not a defect in the Standard.</p>
+
+ <p><b><a name="NAD Editorial">NAD Editorial</a></b> - The LWG has reached consensus that
+ the issue can either be handled editorially, or is handled by a paper (usually
+ linked to in the rationale).</p>
+
+ <p><b><a name="NAD Future">NAD Future</a></b> - In addition to the regular
+ status, the LWG believes that this issue should be revisited at the
+ next revision of the standard.</p>
+
+ <p><b><a name="Review">Review</a></b> - Exact wording of a
+ <b>Proposed Resolution</b> is now available for review on an issue
+ for which the LWG previously reached informal consensus.</p>
+
+ <p><b><a name="Tentatively Ready">Tentatively Ready</a></b> - The issue has
+ been reviewed online, but not in a meeting, and some support has been formed
+ for the proposed resolution. Tentatively Ready issues may be moved to Ready
+ and forwarded to full committee within the same meeting. Unlike Ready issues
+ they will be reviewed in subcommittee prior to forwarding to full committee.</p>
+
+ <p><b><a name="Ready">Ready</a></b> - The LWG has reached consensus
+ that the issue is a defect in the Standard, the <b>Proposed
+ Resolution</b> is correct, and the issue is ready to forward to the
+ full committee for further action as a Defect Report (DR).</p>
+
+ <p><b><a name="DR">DR</a></b> - (Defect Report) - The full J16
+ committee has voted to forward the issue to the Project Editor to be
+ processed as a Potential Defect Report. The Project Editor reviews
+ the issue, and then forwards it to the WG21 Convenor, who returns it
+ to the full committee for final disposition. This issues list
+ accords the status of DR to all these Defect Reports regardless of
+ where they are in that process.</p>
+
+ <p><b><a name="TC">TC</a></b> - (Technical Corrigenda) - The full
+ WG21 committee has voted to accept the Defect Report's Proposed
+ Resolution as a Technical Corrigenda. Action on this issue is thus
+ complete and no further action is possible under ISO rules.</p>
+
+ <p><b><a name="TRDec">TRDec</a></b> - (Decimal TR defect) - The
+ LWG has voted to accept the Defect Report's Proposed
+ Resolution into the Decimal TR. Action on this issue is thus
+ complete and no further action is expected.</p>
+
+ <p><b><a name="WP">WP</a></b> - (Working Paper) - The proposed
+ resolution has not been accepted as a Technical Corrigendum, but
+ the full WG21 committee has voted to apply the Defect Report's Proposed
+ Resolution to the working paper.</p>
+
+ <p><b>Pending</b> - This is a <i>status qualifier</i>. When prepended to
+ a status this indicates the issue has been
+ processed by the committee, and a decision has been made to move the issue to
+ the associated unqualified status. However for logistical reasons the indicated
+ outcome of the issue has not yet appeared in the latest working paper.
+
+ </p><p>Issues are always given the status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> when
+ they first appear on the issues list. They may progress to
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> while the LWG
+ is actively working on them. When the LWG has reached consensus on
+ the disposition of an issue, the status will then change to
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>, or
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> as appropriate. Once the full J16 committee votes to
+ forward Ready issues to the Project Editor, they are given the
+ status of Defect Report ( <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>). These in turn may
+ become the basis for Technical Corrigenda (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>),
+ or are closed without action other than a Record of Response
+ (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a> ). The intent of this LWG process is that
+ only issues which are truly defects in the Standard move to the
+ formal ISO DR status.
+ </p>
+
+
+<h2>Active Issues</h2>
+<hr>
+<h3><a name="23"></a>23. Num_get overflow result</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The current description of numeric input does not account for the
+possibility of overflow. This is an implicit result of changing the
+description to rely on the definition of scanf() (which fails to
+report overflow), and conflicts with the documented behavior of
+traditional and current implementations. </p>
+
+<p>Users expect, when reading a character sequence that results in a
+value unrepresentable in the specified type, to have an error
+reported. The standard as written does not permit this. </p>
+
+<p><b>Further comments from Dietmar:</b></p>
+
+<p>
+I don't feel comfortable with the proposed resolution to issue 23: It
+kind of simplifies the issue to much. Here is what is going on:
+</p>
+
+<p>
+Currently, the behavior of numeric overflow is rather counter intuitive
+and hard to trace, so I will describe it briefly:
+</p>
+
+<ul>
+ <li>
+ According to 22.2.2.1.2 [facet.num.get.virtuals]
+ paragraph 11 <tt>failbit</tt> is set if <tt>scanf()</tt> would
+ return an input error; otherwise a value is converted to the rules
+ of <tt>scanf</tt>.
+ </li>
+ <li>
+ <tt>scanf()</tt> is defined in terms of <tt>fscanf()</tt>.
+ </li>
+ <li>
+ <tt>fscanf()</tt> returns an input failure if during conversion no
+ character matching the conversion specification could be extracted
+ before reaching EOF. This is the only reason for <tt>fscanf()</tt>
+ to fail due to an input error and clearly does not apply to the case
+ of overflow.
+ </li>
+ <li>
+ Thus, the conversion is performed according to the rules of
+ <tt>fscanf()</tt> which basically says that <tt>strtod</tt>,
+ <tt>strtol()</tt>, etc. are to be used for the conversion.
+ </li>
+ <li>
+ The <tt>strtod()</tt>, <tt>strtol()</tt>, etc. functions consume as
+ many matching characters as there are and on overflow continue to
+ consume matching characters but also return a value identical to
+ the maximum (or minimum for signed types if there was a leading minus)
+ value of the corresponding type and set <tt>errno</tt> to <tt>ERANGE</tt>.
+ </li>
+ <li>
+ Thus, according to the current wording in the standard, overflows
+ can be detected! All what is to be done is to check <tt>errno</tt>
+ after reading an element and, of course, clearing <tt>errno</tt>
+ before trying a conversion. With the current wording, it can be
+ detected whether the overflow was due to a positive or negative
+ number for signed types.
+ </li>
+</ul>
+
+<p><b>Further discussion from Redmond:</b></p>
+
+<p>The basic problem is that we've defined our behavior,
+including our error-reporting behavior, in terms of C90. However,
+C90's method of reporting overflow in scanf is not technically an
+"input error". The <tt>strto_*</tt> functions are more precise.</p>
+
+<p>There was general consensus that <tt>failbit</tt> should be set
+upon overflow. We considered three options based on this:</p>
+<ol>
+<li>Set failbit upon conversion error (including overflow), and
+ don't store any value.</li>
+<li>Set failbit upon conversion error, and also set <tt>errno</tt> to
+ indicated the precise nature of the error.</li>
+<li>Set failbit upon conversion error. If the error was due to
+ overflow, store +-numeric_limits&lt;T&gt;::max() as an
+ overflow indication.</li>
+</ol>
+
+<p>Straw poll: (1) 5; (2) 0; (3) 8.</p>
+
+
+<p>Discussed at Lillehammer. General outline of what we want the
+ solution to look like: we want to say that overflow is an error, and
+ provide a way to distinguish overflow from other kinds of errors.
+ Choose candidate field the same way scanf does, but don't describe
+ the rest of the process in terms of format. If a finite input field
+ is too large (positive or negative) to be represented as a finite
+ value, then set failbit and assign the nearest representable value.
+ Bill will provide wording.</p>
+
+<p>
+Discussed at Toronto:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2327.pdf">N2327</a>
+is in alignment with the direction we wanted to go with in Lillehammer. Bill
+to work on.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 22.2.2.1.2 [facet.num.get.virtuals], end of p3:
+</p>
+
+<blockquote>
+<p>
+<b>Stage 3:</b> <del>The result of stage 2 processing can be one of</del>
+<ins>The sequence of <tt>char</tt>s accumulated in stage 2 (the field) is
+converted to a numeric value by the rules of one of the functions declared
+in the header <tt>&lt;cstdlib&gt;</tt>:</ins>
+</p>
+<ul>
+<li>
+<del>A sequence of <tt>char</tt>s has been accumulated in stage 2 that is
+converted (according to the rules of <tt>scanf</tt>) to a value of the
+type of <i>val</i>. This value is stored in <i>val</i> and <tt>ios_base::goodbit</tt> is
+stored in <i>err</i>.</del>
+<ins>For a signed integer value, the function <tt>strtoll</tt>.</ins>
+</li>
+<li>
+<del>The sequence of <tt>char</tt>s accumulated in stage 2 would have caused
+<tt>scanf</tt> to report an input failure. <tt>ios_base::failbit</tt> is
+assigned to <i>err</i>.</del>
+<ins>For an unsigned integer value, the function <tt>strtoull</tt>.</ins>
+</li>
+<li>
+<ins>For a floating-point value, the function <tt>strtold</tt>.</ins>
+</li>
+</ul>
+<p>
+<ins>The numeric value to be stored can be one of:</ins>
+</p>
+<ul>
+<li><ins>zero, if the conversion function fails to convert the entire field.
+<tt>ios_base::failbit</tt> is assigned to err.</ins></li>
+<li><ins>the most positive representable value, if the field represents a value
+too large positive to be represented in <i>val</i>. <tt>ios_base::failbit</tt> is assigned
+to <i>err</i>.</ins></li>
+<li><ins>the most negative representable value (zero for unsigned integer), if
+the field represents a value too large negative to be represented in <i>val</i>.
+<tt>ios_base::failbit</tt> is assigned to <i>err</i>.</ins></li>
+<li><ins>the converted value, otherwise.</ins></li>
+</ul>
+
+<p><ins>
+The resultant numeric value is stored in <i>val</i>.
+</ins></p>
+</blockquote>
+
+<p>
+Change 22.2.2.1.2 [facet.num.get.virtuals], p6-p7:
+</p>
+
+<blockquote>
+<pre>iter_type do_get(iter_type <i>in</i>, iter_type <i>end</i>, ios_base&amp; <i>str</i>,
+ ios_base::iostate&amp; <i>err</i>, bool&amp; <i>val</i>) const;
+</pre>
+<blockquote>
+<p>
+-6- <i>Effects:</i> If
+<tt>(<i>str</i>.flags()&amp;ios_base::boolalpha)==0</tt> then input
+proceeds as it would for a <tt>long</tt> except that if a value is being
+stored into <i>val</i>, the value is determined according to the
+following: If the value to be stored is 0 then <tt>false</tt> is stored.
+If the value is 1 then <tt>true</tt> is stored. Otherwise
+<del><tt><i>err</i>|=ios_base::failbit</tt> is performed and no value</del> <ins><tt>true</tt></ins> is
+stored<del>.</del> <ins>and <tt>ios_base::failbit</tt> is assigned to <i>err</i>.</ins>
+</p>
+<p>
+-7- Otherwise target sequences are determined "as if" by calling the
+members <tt>falsename()</tt> and <tt>truename()</tt> of the facet
+obtained by <tt>use_facet&lt;numpunct&lt;charT&gt;
+&gt;(<i>str</i>.getloc())</tt>. Successive characters in the range
+<tt>[<i>in</i>,<i>end</i>)</tt> (see 23.1.1) are obtained and matched
+against corresponding positions in the target sequences only as
+necessary to identify a unique match. The input iterator <i>in</i> is
+compared to <i>end</i> only when necessary to obtain a character. If <del>and
+only if</del> a target sequence is uniquely matched, <i>val</i> is set to the
+corresponding value. <ins>Otherwise <tt>false</tt> is stored and <tt>ios_base::failbit</tt>
+is assigned to <i>err</i>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="96"></a>96. Vector&lt;bool&gt; is not a container</h3>
+<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p><tt>vector&lt;bool&gt;</tt> is not a container as its reference and
+pointer types are not references and pointers. </p>
+
+<p>Also it forces everyone to have a space optimization instead of a
+speed one.</p>
+
+<p><b>See also:</b> 99-0008 == N1185 Vector&lt;bool&gt; is
+Nonconforming, Forces Optimization Choice.</p>
+
+<p><i>[In Santa Cruz the LWG felt that this was Not A Defect.]</i></p>
+
+
+<p><i>[In Dublin many present felt that failure to meet Container
+requirements was a defect. There was disagreement as to whether
+or not the optimization requirements constituted a defect.]</i></p>
+
+
+<p><i>[The LWG looked at the following resolutions in some detail:
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; * Not A Defect.<br>
+&nbsp;&nbsp;&nbsp;&nbsp; * Add a note explaining that vector&lt;bool&gt; does not meet
+Container requirements.<br>
+&nbsp;&nbsp;&nbsp;&nbsp; * Remove vector&lt;bool&gt;.<br>
+&nbsp;&nbsp;&nbsp;&nbsp; * Add a new category of container requirements which
+vector&lt;bool&gt; would meet.<br>
+&nbsp;&nbsp;&nbsp;&nbsp; * Rename vector&lt;bool&gt;.<br>
+<br>
+No alternative had strong, wide-spread, support and every alternative
+had at least one "over my dead body" response.<br>
+<br>
+There was also mention of a transition scheme something like (1) add
+vector_bool and deprecate vector&lt;bool&gt; in the next standard. (2)
+Remove vector&lt;bool&gt; in the following standard.]</i></p>
+
+
+<p><i>[Modifying container requirements to permit returning proxies
+(thus allowing container requirements conforming vector&lt;bool&gt;)
+was also discussed.]</i></p>
+
+
+<p><i>[It was also noted that there is a partial but ugly workaround in
+that vector&lt;bool&gt; may be further specialized with a customer
+allocator.]</i></p>
+
+
+<p><i>[Kona: Herb Sutter presented his paper J16/99-0035==WG21/N1211,
+vector&lt;bool&gt;: More Problems, Better Solutions. Much discussion
+of a two step approach: a) deprecate, b) provide replacement under a
+new name. LWG straw vote on that: 1-favor, 11-could live with, 2-over
+my dead body. This resolution was mentioned in the LWG report to the
+full committee, where several additional committee members indicated
+over-my-dead-body positions.]</i></p>
+
+
+<p>Discussed at Lillehammer. General agreement that we should
+ deprecate vector&lt;bool&gt; and introduce this functionality under
+ a different name, e.g. bit_vector. This might make it possible to
+ remove the vector&lt;bool&gt; specialization in the standard that comes
+ after C++0x. There was also a suggestion that
+ in C++0x we could additional say that it's implementation defined
+ whether vector&lt;bool&gt; refers to the specialization or to the
+ primary template, but there wasn't general agreement that this was a
+ good idea.</p>
+
+<p>We need a paper for the new bit_vector class.</p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We now have:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf">N2050</a>
+and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2160.html">N2160</a>.
+</p>
+
+<p><i>[
+Batavia: The LWG feels we need something closer to SGI's <tt>bitvector</tt> to ease migration
+from <tt>vector&lt;bool&gt;</tt>. Although some of the funcitonality from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf">N2050</a>
+could well be used in such a template. The concern is easing the API migration for those
+users who want to continue using a bit-packed container. Alan and Beman to work.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="255"></a>255. Why do <tt>basic_streambuf&lt;&gt;::pbump()</tt> and <tt>gbump()</tt> take an int?</h3>
+<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The basic_streambuf members gbump() and pbump() are specified to take an
+int argument. This requirement prevents the functions from effectively
+manipulating buffers larger than std::numeric_limits&lt;int&gt;::max()
+characters. It also makes the common use case for these functions
+somewhat difficult as many compilers will issue a warning when an
+argument of type larger than int (such as ptrdiff_t on LLP64
+architectures) is passed to either of the function. Since it's often the
+result of the subtraction of two pointers that is passed to the
+functions, a cast is necessary to silence such warnings. Finally, the
+usage of a native type in the functions signatures is inconsistent with
+other member functions (such as sgetn() and sputn()) that manipulate the
+underlying character buffer. Those functions take a streamsize argument.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the signatures of these functions in the synopsis of template
+class basic_streambuf (27.5.2) and in their descriptions (27.5.2.3.1, p4
+and 27.5.2.3.2, p4) to take a streamsize argument.
+</p>
+
+<p>
+Although this change has the potential of changing the ABI of the
+library, the change will affect only platforms where int is different
+than the definition of streamsize. However, since both functions are
+typically inline (they are on all known implementations), even on such
+platforms the change will not affect any user code unless it explicitly
+relies on the existing type of the functions (e.g., by taking their
+address). Such a possibility is IMO quite remote.
+</p>
+
+<p>
+Alternate Suggestion from Howard Hinnant, c++std-lib-7780:
+</p>
+
+<p>
+This is something of a nit, but I'm wondering if streamoff wouldn't be a
+better choice than streamsize. The argument to pbump and gbump MUST be
+signed. But the standard has this to say about streamsize
+(27.4.1/2/Footnote):
+</p>
+
+<blockquote><p>
+ [Footnote: streamsize is used in most places where ISO C would use
+ size_t. Most of the uses of streamsize could use size_t, except for
+ the strstreambuf constructors, which require negative values. It
+ should probably be the signed type corresponding to size_t (which is
+ what Posix.2 calls ssize_t). --- end footnote]
+</p></blockquote>
+
+<p>
+This seems a little weak for the argument to pbump and gbump. Should we
+ever really get rid of strstream, this footnote might go with it, along
+with the reason to make streamsize signed.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this change is too big for now. We may wish to
+reconsider this for a future revision of the standard. One
+possibility is overloading pbump, rather than changing the
+signature.</p>
+<p><i>[
+[2006-05-04: Reopened at the request of Chris (Krzysztof ?elechowski)]
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="290"></a>290. Requirements to for_each and its function object</h3>
+<p><b>Section:</b> 25.1.1 [alg.foreach] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.foreach">issues</a> in [alg.foreach].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The specification of the for_each algorithm does not have a
+"Requires" section, which means that there are no
+restrictions imposed on the function object whatsoever. In essence it
+means that I can provide any function object with arbitrary side
+effects and I can still expect a predictable result. In particular I
+can expect that the function object is applied exactly last - first
+times, which is promised in the "Complexity" section.
+</p>
+
+<p>I don't see how any implementation can give such a guarantee
+without imposing requirements on the function object.
+</p>
+
+<p>Just as an example: consider a function object that removes
+elements from the input sequence. In that case, what does the
+complexity guarantee (applies f exactly last - first times) mean?
+</p>
+
+<p>One can argue that this is obviously a nonsensical application and
+a theoretical case, which unfortunately it isn't. I have seen
+programmers shooting themselves in the foot this way, and they did not
+understand that there are restrictions even if the description of the
+algorithm does not say so.
+</p>
+<p><i>[Lillehammer: This is more general than for_each. We don't want
+ the function object in transform invalidiating iterators
+ either. There should be a note somewhere in clause 17 (17, not 25)
+ saying that user code operating on a range may not invalidate
+ iterators unless otherwise specified. Bill will provide wording.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="299"></a>299. Incorrect return types for iterator dereference</h3>
+<p><b>Section:</b> 24.1.4 [bidirectional.iterators], 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> John Potter <b>Date:</b> 2001-01-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bidirectional.iterators">issues</a> in [bidirectional.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In section 24.1.4 [bidirectional.iterators],
+Table 75 gives the return type of *r-- as convertible to T. This is
+not consistent with Table 74 which gives the return type of *r++ as
+T&amp;. *r++ = t is valid while *r-- = t is invalid.
+</p>
+
+<p>
+In section 24.1.5 [random.access.iterators],
+Table 76 gives the return type of a[n] as convertible to T. This is
+not consistent with the semantics of *(a + n) which returns T&amp; by
+Table 74. *(a + n) = t is valid while a[n] = t is invalid.
+</p>
+
+<p>
+Discussion from the Copenhagen meeting: the first part is
+uncontroversial. The second part, operator[] for Random Access
+Iterators, requires more thought. There are reasonable arguments on
+both sides. Return by value from operator[] enables some potentially
+useful iterators, e.g. a random access "iota iterator" (a.k.a
+"counting iterator" or "int iterator"). There isn't any obvious way
+to do this with return-by-reference, since the reference would be to a
+temporary. On the other hand, <tt>reverse_iterator</tt> takes an
+arbitrary Random Access Iterator as template argument, and its
+operator[] returns by reference. If we decided that the return type
+in Table 76 was correct, we would have to change
+<tt>reverse_iterator</tt>. This change would probably affect user
+code.
+</p>
+
+<p>
+History: the contradiction between <tt>reverse_iterator</tt> and the
+Random Access Iterator requirements has been present from an early
+stage. In both the STL proposal adopted by the committee
+(N0527==94-0140) and the STL technical report (HPL-95-11 (R.1), by
+Stepanov and Lee), the Random Access Iterator requirements say that
+operator[]'s return value is "convertible to T". In N0527
+reverse_iterator's operator[] returns by value, but in HPL-95-11
+(R.1), and in the STL implementation that HP released to the public,
+reverse_iterator's operator[] returns by reference. In 1995, the
+standard was amended to reflect the contents of HPL-95-11 (R.1). The
+original intent for operator[] is unclear.
+</p>
+
+<p>
+In the long term it may be desirable to add more fine-grained
+iterator requirements, so that access method and traversal strategy
+can be decoupled. (See "Improved Iterator Categories and
+Requirements", N1297 = 01-0011, by Jeremy Siek.) Any decisions
+about issue 299 should keep this possibility in mind.
+</p>
+
+<p>Further discussion: I propose a compromise between John Potter's
+resolution, which requires <tt>T&amp;</tt> as the return type of
+<tt>a[n]</tt>, and the current wording, which requires convertible to
+<tt>T</tt>. The compromise is to keep the convertible to <tt>T</tt>
+for the return type of the expression <tt>a[n]</tt>, but to also add
+<tt>a[n] = t</tt> as a valid expression. This compromise "saves" the
+common case uses of random access iterators, while at the same time
+allowing iterators such as counting iterator and caching file
+iterators to remain random access iterators (iterators where the
+lifetime of the object returned by <tt>operator*()</tt> is tied to the
+lifetime of the iterator).
+</p>
+
+<p>
+Note that the compromise resolution necessitates a change to
+<tt>reverse_iterator</tt>. It would need to use a proxy to support
+<tt>a[n] = t</tt>.
+</p>
+
+<p>
+Note also there is one kind of mutable random access iterator that
+will no longer meet the new requirements. Currently, iterators that
+return an r-value from <tt>operator[]</tt> meet the requirements for a
+mutable random access iterartor, even though the expression <tt>a[n] =
+t</tt> will only modify a temporary that goes away. With this proposed
+resolution, <tt>a[n] = t</tt> will be required to have the same
+operational semantics as <tt>*(a + n) = t</tt>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+In section 24.1.4 [lib.bidirectdional.iterators], change the return
+type in table 75 from "convertible to <tt>T</tt>" to
+<tt>T&amp;</tt>.
+</p>
+
+<p>
+In section 24.1.5 [lib.random.access.iterators], change the
+operational semantics for <tt>a[n]</tt> to " the r-value of
+<tt>a[n]</tt> is equivalent to the r-value of <tt>*(a +
+n)</tt>". Add a new row in the table for the expression <tt>a[n] = t</tt>
+with a return type of convertible to <tt>T</tt> and operational semantics of
+<tt>*(a + n) = t</tt>.
+</p>
+
+<p><i>[Lillehammer: Real problem, but should be addressed as part of
+ iterator redesign]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="309"></a>309. Does sentry catch exceptions?</h3>
+<p><b>Section:</b> 27.6 [iostream.format] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-19</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iostream.format">active issues</a> in [iostream.format].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.format">issues</a> in [iostream.format].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The descriptions of the constructors of basic_istream&lt;&gt;::sentry
+(27.6.1.1.3 [istream::sentry]) and basic_ostream&lt;&gt;::sentry
+(27.6.2.4 [ostream::sentry]) do not explain what the functions do in
+case an exception is thrown while they execute. Some current
+implementations allow all exceptions to propagate, others catch them
+and set ios_base::badbit instead, still others catch some but let
+others propagate.
+</p>
+
+<p>
+The text also mentions that the functions may call setstate(failbit)
+(without actually saying on what object, but presumably the stream
+argument is meant). That may have been fine for
+basic_istream&lt;&gt;::sentry prior to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>, since
+the function performs an input operation which may fail. However,
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a> amends 27.6.1.1.3 [istream::sentry], p2 to
+clarify that the function should actually call setstate(failbit |
+eofbit), so the sentence in p3 is redundant or even somewhat
+contradictory.
+</p>
+
+<p>
+The same sentence that appears in 27.6.2.4 [ostream::sentry], p3
+doesn't seem to be very meaningful for basic_istream&lt;&gt;::sentry
+which performs no input. It is actually rather misleading since it
+would appear to guide library implementers to calling
+setstate(failbit) when os.tie()-&gt;flush(), the only called function,
+throws an exception (typically, it's badbit that's set in response to
+such an event).
+</p>
+
+<p><b>Additional comments from Martin, who isn't comfortable with the
+ current proposed resolution</b> (see c++std-lib-11530)</p>
+
+<p>
+The istream::sentry ctor says nothing about how the function
+deals with exemptions (27.6.1.1.2, p1 says that the class is
+responsible for doing "exception safe"(*) prefix and suffix
+operations but it doesn't explain what level of exception
+safety the class promises to provide). The mockup example
+of a "typical implementation of the sentry ctor" given in
+27.6.1.1.2, p6, removed in ISO/IEC 14882:2003, doesn't show
+exception handling, either. Since the ctor is not classified
+as a formatted or unformatted input function, the text in
+27.6.1.1, p1 through p4 does not apply. All this would seem
+to suggest that the sentry ctor should not catch or in any
+way handle exceptions thrown from any functions it may call.
+Thus, the typical implementation of an istream extractor may
+look something like [1].
+</p>
+
+<p>
+The problem with [1] is that while it correctly sets ios::badbit
+if an exception is thrown from one of the functions called from
+the sentry ctor, if the sentry ctor reaches EOF while extracting
+whitespace from a stream that has eofbit or failbit set in
+exceptions(), it will cause an ios::failure to be thrown, which
+will in turn cause the extractor to set ios::badbit.
+</p>
+
+<p>
+The only straightforward way to prevent this behavior is to
+move the definition of the sentry object in the extractor
+above the try block (as suggested by the example in 22.2.8,
+p9 and also indirectly supported by 27.6.1.3, p1). See [2].
+But such an implementation will allow exceptions thrown from
+functions called from the ctor to freely propagate to the
+caller regardless of the setting of ios::badbit in the stream
+object's exceptions().
+</p>
+
+<p>
+So since neither [1] nor [2] behaves as expected, the only
+possible solution is to have the sentry ctor catch exceptions
+thrown from called functions, set badbit, and propagate those
+exceptions if badbit is also set in exceptions(). (Another
+solution exists that deals with both kinds of sentries, but
+the code is non-obvious and cumbersome -- see [3].)
+</p>
+
+<p>
+Please note that, as the issue points out, current libraries
+do not behave consistently, suggesting that implementors are
+not quite clear on the exception handling in istream::sentry,
+despite the fact that some LWG members might feel otherwise.
+(As documented by the parenthetical comment here:
+http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1480.html#309)
+</p>
+
+<p>
+Also please note that those LWG members who in Copenhagen
+felt that "a sentry's constructor should not catch exceptions,
+because sentries should only be used within (un)formatted input
+functions and that exception handling is the responsibility of
+those functions, not of the sentries," as noted here
+http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1310.html#309
+would in effect be either arguing for the behavior described
+in [1] or for extractors implemented along the lines of [3].
+</p>
+
+<p>
+The original proposed resolution (Revision 25 of the issues
+list) clarifies the role of the sentry ctor WRT exception
+handling by making it clear that extractors (both library
+or user-defined) should be implemented along the lines of
+[2] (as opposed to [1]) and that no exception thrown from
+the callees should propagate out of either function unless
+badbit is also set in exceptions().
+</p>
+
+
+<p>[1] Extractor that catches exceptions thrown from sentry:</p>
+
+<blockquote>
+<pre>struct S { long i; };
+
+istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
+{
+ ios::iostate err = ios::goodbit;
+ try {
+ const istream::sentry guard (strm, false);
+ if (guard) {
+ use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
+ .get (istreambuf_iterator&lt;char&gt;(strm),
+ istreambuf_iterator&lt;char&gt;(),
+ strm, err, s.i);
+ }
+ }
+ catch (...) {
+ bool rethrow;
+ try {
+ strm.setstate (ios::badbit);
+ rethrow = false;
+ }
+ catch (...) {
+ rethrow = true;
+ }
+ if (rethrow)
+ throw;
+ }
+ if (err)
+ strm.setstate (err);
+ return strm;
+}
+</pre>
+</blockquote>
+
+<p>[2] Extractor that propagates exceptions thrown from sentry:</p>
+
+<blockquote>
+<pre>istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
+{
+ istream::sentry guard (strm, false);
+ if (guard) {
+ ios::iostate err = ios::goodbit;
+ try {
+ use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
+ .get (istreambuf_iterator&lt;char&gt;(strm),
+ istreambuf_iterator&lt;char&gt;(),
+ strm, err, s.i);
+ }
+ catch (...) {
+ bool rethrow;
+ try {
+ strm.setstate (ios::badbit);
+ rethrow = false;
+ }
+ catch (...) {
+ rethrow = true;
+ }
+ if (rethrow)
+ throw;
+ }
+ if (err)
+ strm.setstate (err);
+ }
+ return strm;
+}
+</pre>
+</blockquote>
+
+<p>
+[3] Extractor that catches exceptions thrown from sentry
+but doesn't set badbit if the exception was thrown as a
+result of a call to strm.clear().
+</p>
+
+<blockquote>
+<pre>istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
+{
+ const ios::iostate state = strm.rdstate ();
+ const ios::iostate except = strm.exceptions ();
+ ios::iostate err = std::ios::goodbit;
+ bool thrown = true;
+ try {
+ const istream::sentry guard (strm, false);
+ thrown = false;
+ if (guard) {
+ use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
+ .get (istreambuf_iterator&lt;char&gt;(strm),
+ istreambuf_iterator&lt;char&gt;(),
+ strm, err, s.i);
+ }
+ }
+ catch (...) {
+ if (thrown &amp;&amp; state &amp; except)
+ throw;
+ try {
+ strm.setstate (ios::badbit);
+ thrown = false;
+ }
+ catch (...) {
+ thrown = true;
+ }
+ if (thrown)
+ throw;
+ }
+ if (err)
+ strm.setstate (err);
+
+ return strm;
+}
+</pre>
+</blockquote>
+
+<p>
+[Pre-Berlin] Reopened at the request of Paolo Carlini and Steve Clamage.
+</p>
+
+<p>
+[Pre-Portland] A relevant newsgroup post:
+</p>
+
+<p>
+The current proposed resolution of issue #309
+(http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309) is
+unacceptable. I write commerical software and coding around this
+makes my code ugly, non-intuitive, and requires comments referring
+people to this very issue. Following is the full explanation of my
+experience.
+</p>
+<p>
+In the course of writing software for commercial use, I constructed
+std::ifstream's based on user-supplied pathnames on typical POSIX
+systems.
+</p>
+<p>
+It was expected that some files that opened successfully might not read
+successfully -- such as a pathname which actually refered to a
+directory. Intuitively, I expected the streambuffer underflow() code
+to throw an exception in this situation, and recent implementations of
+libstdc++'s basic_filebuf do just that (as well as many of my own
+custom streambufs).
+</p>
+<p>
+I also intuitively expected that the istream code would convert these
+exceptions to the "badbit' set on the stream object, because I had not
+requested exceptions. I refer to 27.6.1.1. P4.
+</p>
+<p>
+However, this was not the case on at least two implementations -- if
+the first thing I did with an istream was call operator&gt;&gt;( T&amp; ) for T
+among the basic arithmetic types and std::string. Looking further I
+found that the sentry's constructor was invoking the exception when it
+pre-scanned for whitespace, and the extractor function (operator&gt;&gt;())
+was not catching exceptions in this situation.
+</p>
+<p>
+So, I was in a situation where setting 'noskipws' would change the
+istream's behavior even though no characters (whitespace or not) could
+ever be successfully read.
+</p>
+<p>
+Also, calling .peek() on the istream before calling the extractor()
+changed the behavior (.peek() had the effect of setting the badbit
+ahead of time).
+</p>
+<p>
+I found this all to be so inconsistent and inconvenient for me and my
+code design, that I filed a bugzilla entry for libstdc++. I was then
+told that the bug cannot be fixed until issue #309 is resolved by the
+committee.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees there is minor variation between implementations,
+ but believes that it doesn't matter. This is a rarely used corner
+ case. There is no evidence that this has any commercial importance
+ or that it causes actual portability problems for customers trying
+ to write code that runs on multiple implementations.</p>
+
+
+
+
+
+<hr>
+<h3><a name="342"></a>342. seek and eofbit</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>I think we have a defect.</p>
+
+<p>According to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> which is now a dr, the
+description of seekg in 27.6.1.3 [istream.unformatted] paragraph 38 now looks
+like:</p>
+
+<blockquote><p>
+Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1), except that it does not count the number of characters
+extracted and does not affect the value returned by subsequent calls to
+gcount(). After constructing a sentry object, if fail() != true,
+executes rdbuf()-&gt;pubseekpos( pos).
+</p></blockquote>
+
+<p>And according to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> which is also now a dr,
+27.6.1.3, paragraph 1 looks like:</p>
+
+<blockquote><p>
+Each unformatted input function begins execution by constructing an
+object of class sentry with the default argument noskipws (second)
+argument true. If the sentry object returns true, when converted to a
+value of type bool, the function endeavors to obtain the requested
+input. Otherwise, if the sentry constructor exits by throwing an
+exception or if the sentry object returns false, when converted to a
+value of type bool, the function returns without attempting to obtain
+any input. In either case the number of extracted characters is set to
+0; unformatted input functions taking a character array of non-zero
+size as an argument shall also store a null character (using charT())
+in the first location of the array. If an exception is thrown during
+input then ios::badbit is turned on in *this'ss error state. If
+(exception()&amp;badbit)!= 0 then the exception is rethrown. It also counts
+the number of characters extracted. If no exception has been thrown it
+ends by storing the count in a member object and returning the value
+specified. In any event the sentry object is destroyed before leaving
+the unformatted input function.
+</p></blockquote>
+
+<p>And finally 27.6.1.1.2/5 says this about sentry:</p>
+
+<blockquote><p>
+If, after any preparation is completed, is.good() is true, ok_ != false
+otherwise, ok_ == false.
+</p></blockquote>
+
+<p>
+So although the seekg paragraph says that the operation proceeds if
+!fail(), the behavior of unformatted functions says the operation
+proceeds only if good(). The two statements are contradictory when only
+eofbit is set. I don't think the current text is clear which condition
+should be respected.
+</p>
+
+<p><b>Further discussion from Redmond:</b></p>
+
+<p>PJP: It doesn't seem quite right to say that <tt>seekg</tt> is
+"unformatted". That makes specific claims about sentry that
+aren't quite appropriate for seeking, which has less fragile failure
+modes than actual input. If we do really mean that it's unformatted
+input, it should behave the same way as other unformatted input. On
+the other hand, "principle of least surprise" is that seeking from EOF
+ought to be OK.</p>
+
+<p>
+Pre-Berlin: Paolo points out several problems with the proposed resolution in
+Ready state:
+</p>
+
+<ul>
+<li>It should apply to both overloads of seekg.</li>
+<li>tellg has similar issues, except that it should not call clear().</li>
+<li>The point about clear() seems to apply to seekp().</li>
+<li>Depending on the outcome of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#419">419</a>
+if the sentry
+sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then
+you can never seek away from the end of stream.</li>
+</ul>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change 27.6.1.3 [istream.unformatted] to:</p>
+<blockquote><p>
+Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1), except that it does not count the number of characters
+extracted, does not affect the value returned by subsequent calls to
+gcount(), and does not examine the value returned by the sentry
+object. After constructing a sentry object, if <tt>fail() !=
+true</tt>, executes <tt>rdbuf()-&gt;pubseekpos(pos)</tt>. In
+case of success, the function calls clear().
+In case of failure, the function calls <tt>setstate(failbit)</tt>
+(which may throw <tt>ios_base::failure</tt>).
+</p></blockquote>
+
+<p><i>[Lillehammer: Matt provided wording.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>In C, fseek does clear EOF. This is probably what most users would
+ expect. We agree that having eofbit set should not deter a seek,
+ and that a successful seek should clear eofbit. Note
+ that <tt>fail()</tt> is true only if <tt>failbit</tt>
+ or <tt>badbit</tt> is set, so using <tt>!fail()</tt>, rather
+ than <tt>good()</tt>, satisfies this goal.</p>
+
+
+
+
+
+<hr>
+<h3><a name="343"></a>343. Unspecified library header dependencies</h3>
+<p><b>Section:</b> 21 [strings], 23 [containers], 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-10-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#strings">issues</a> in [strings].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The synopses of the C++ library headers clearly show which names are
+required to be defined in each header. Since in order to implement the
+classes and templates defined in these headers declarations of other
+templates (but not necessarily their definitions) are typically
+necessary the standard in 17.4.4, p1 permits library implementers to
+include any headers needed to implement the definitions in each header.
+</p>
+
+<p>
+For instance, although it is not explicitly specified in the synopsis of
+&lt;string&gt;, at the point of definition of the std::basic_string template
+the declaration of the std::allocator template must be in scope. All
+current implementations simply include &lt;memory&gt; from within &lt;string&gt;,
+either directly or indirectly, to bring the declaration of
+std::allocator into scope.
+</p>
+
+<p>
+Additionally, however, some implementation also include &lt;istream&gt; and
+&lt;ostream&gt; at the top of &lt;string&gt; to bring the declarations of
+std::basic_istream and std::basic_ostream into scope (which are needed
+in order to implement the string inserter and extractor operators
+(21.3.7.9 [lib.string.io])). Other implementations only include
+&lt;iosfwd&gt;, since strictly speaking, only the declarations and not the
+full definitions are necessary.
+</p>
+
+<p>
+Obviously, it is possible to implement &lt;string&gt; without actually
+providing the full definitions of all the templates std::basic_string
+uses (std::allocator, std::basic_istream, and std::basic_ostream).
+Furthermore, not only is it possible, doing so is likely to have a
+positive effect on compile-time efficiency.
+</p>
+
+<p>
+But while it may seem perfectly reasonable to expect a program that uses
+the std::basic_string insertion and extraction operators to also
+explicitly include &lt;istream&gt; or &lt;ostream&gt;, respectively, it doesn't seem
+reasonable to also expect it to explicitly include &lt;memory&gt;. Since
+what's reasonable and what isn't is highly subjective one would expect
+the standard to specify what can and what cannot be assumed.
+Unfortunately, that isn't the case.
+</p>
+
+<p>The examples below demonstrate the issue.</p>
+
+<p>Example 1:</p>
+
+<p>It is not clear whether the following program is complete:</p>
+
+<pre>#include &lt;string&gt;
+
+extern std::basic_ostream&lt;char&gt; &amp;strm;
+
+int main () {
+ strm &lt;&lt; std::string ("Hello, World!\n");
+}
+</pre>
+
+<p>or whether one must explicitly include &lt;memory&gt; or
+&lt;ostream&gt; (or both) in addition to &lt;string&gt; in order for
+the program to compile.</p>
+
+
+<p>Example 2:</p>
+
+<p>Similarly, it is unclear whether the following program is complete:</p>
+
+<pre>#include &lt;istream&gt;
+
+extern std::basic_iostream&lt;char&gt; &amp;strm;
+
+int main () {
+ strm &lt;&lt; "Hello, World!\n";
+}
+</pre>
+
+<p>
+or whether one needs to explicitly include &lt;ostream&gt;, and
+perhaps even other headers containing the definitions of other
+required templates:</p>
+
+<pre>#include &lt;ios&gt;
+#include &lt;istream&gt;
+#include &lt;ostream&gt;
+#include &lt;streambuf&gt;
+
+extern std::basic_iostream&lt;char&gt; &amp;strm;
+
+int main () {
+ strm &lt;&lt; "Hello, World!\n";
+}
+</pre>
+
+<p>Example 3:</p>
+
+<p>Likewise, it seems unclear whether the program below is complete:</p>
+<pre>#include &lt;iterator&gt;
+
+bool foo (std::istream_iterator&lt;int&gt; a, std::istream_iterator&lt;int&gt; b)
+{
+ return a == b;
+}
+
+int main () { }
+</pre>
+
+<p>or whether one should be required to include &lt;istream&gt;.</p>
+
+<p>There are many more examples that demonstrate this lack of a
+requirement. I believe that in a good number of cases it would be
+unreasonable to require that a program explicitly include all the
+headers necessary for a particular template to be specialized, but I
+think that there are cases such as some of those above where it would
+be desirable to allow implementations to include only as much as
+necessary and not more.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+For every C++ library header, supply a minimum set of other C++ library
+headers that are required to be included by that header. The proposed
+list is below (C++ headers for C Library Facilities, table 12 in
+17.4.1.2, p3, are omitted):
+</p>
+
+<pre>+------------+--------------------+
+| C++ header |required to include |
++============+====================+
+|&lt;algorithm&gt; | |
++------------+--------------------+
+|&lt;bitset&gt; | |
++------------+--------------------+
+|&lt;complex&gt; | |
++------------+--------------------+
+|&lt;deque&gt; |&lt;memory&gt; |
++------------+--------------------+
+|&lt;exception&gt; | |
++------------+--------------------+
+|&lt;fstream&gt; |&lt;ios&gt; |
++------------+--------------------+
+|&lt;functional&gt;| |
++------------+--------------------+
+|&lt;iomanip&gt; |&lt;ios&gt; |
++------------+--------------------+
+|&lt;ios&gt; |&lt;streambuf&gt; |
++------------+--------------------+
+|&lt;iosfwd&gt; | |
++------------+--------------------+
+|&lt;iostream&gt; |&lt;istream&gt;, &lt;ostream&gt;|
++------------+--------------------+
+|&lt;istream&gt; |&lt;ios&gt; |
++------------+--------------------+
+|&lt;iterator&gt; | |
++------------+--------------------+
+|&lt;limits&gt; | |
++------------+--------------------+
+|&lt;list&gt; |&lt;memory&gt; |
++------------+--------------------+
+|&lt;locale&gt; | |
++------------+--------------------+
+|&lt;map&gt; |&lt;memory&gt; |
++------------+--------------------+
+|&lt;memory&gt; | |
++------------+--------------------+
+|&lt;new&gt; |&lt;exception&gt; |
++------------+--------------------+
+|&lt;numeric&gt; | |
++------------+--------------------+
+|&lt;ostream&gt; |&lt;ios&gt; |
++------------+--------------------+
+|&lt;queue&gt; |&lt;deque&gt; |
++------------+--------------------+
+|&lt;set&gt; |&lt;memory&gt; |
++------------+--------------------+
+|&lt;sstream&gt; |&lt;ios&gt;, &lt;string&gt; |
++------------+--------------------+
+|&lt;stack&gt; |&lt;deque&gt; |
++------------+--------------------+
+|&lt;stdexcept&gt; | |
++------------+--------------------+
+|&lt;streambuf&gt; |&lt;ios&gt; |
++------------+--------------------+
+|&lt;string&gt; |&lt;memory&gt; |
++------------+--------------------+
+|&lt;strstream&gt; | |
++------------+--------------------+
+|&lt;typeinfo&gt; |&lt;exception&gt; |
++------------+--------------------+
+|&lt;utility&gt; | |
++------------+--------------------+
+|&lt;valarray&gt; | |
++------------+--------------------+
+|&lt;vector&gt; |&lt;memory&gt; |
++------------+--------------------+
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>The portability problem is real. A program that works correctly on
+one implementation might fail on another, because of different header
+dependencies. This problem was understood before the standard was
+completed, and it was a conscious design choice.</p>
+<p>One possible way to deal with this, as a library extension, would
+be an &lt;all&gt; header.</p>
+
+<p>
+Hinnant: It's time we dealt with this issue for C++0X. Reopened.
+</p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="382"></a>382. codecvt do_in/out result</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-08-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It seems that the descriptions of codecvt do_in() and do_out() leave
+sufficient room for interpretation so that two implementations of
+codecvt may not work correctly with the same filebuf. Specifically,
+the following seems less than adequately specified:
+</p>
+
+<ol>
+<li>
+ the conditions under which the functions terminate
+</li>
+<li>
+ precisely when the functions return ok
+</li>
+<li>
+ precisely when the functions return partial
+</li>
+<li>
+ the full set of conditions when the functions return error
+</li>
+</ol>
+
+<ol>
+<li>
+ 22.2.1.4.2 [locale.codecvt.virtuals], p2 says this about the effects of the
+ function: ...Stops if it encounters a character it cannot
+ convert... This assumes that there *is* a character to
+ convert. What happens when there is a sequence that doesn't form a
+ valid source character, such as an unassigned or invalid UNICODE
+ character, or a sequence that cannot possibly form a character
+ (e.g., the sequence "\xc0\xff" in UTF-8)?
+</li>
+<li>
+ Table 53 says that the function returns codecvt_base::ok
+ to indicate that the function(s) "completed the conversion."
+ Suppose that the source sequence is "\xc0\x80" in UTF-8,
+ with from pointing to '\xc0' and (from_end==from + 1).
+ It is not clear whether the return value should be ok
+ or partial (see below).
+</li>
+<li>
+ Table 53 says that the function returns codecvt_base::partial
+ if "not all source characters converted." With the from pointers
+ set up the same way as above, it is not clear whether the return
+ value should be partial or ok (see above).
+</li>
+<li>
+ Table 53, in the row describing the meaning of error mistakenly
+ refers to a "from_type" character, without the symbol from_type
+ having been defined. Most likely, the word "source" character
+ is intended, although that is not sufficient. The functions
+ may also fail when they encounter an invalid source sequence
+ that cannot possibly form a valid source character (e.g., as
+ explained in bullet 1 above).
+</li>
+</ol>
+<p>
+Finally, the conditions described at the end of 22.2.1.4.2 [locale.codecvt.virtuals], p4 don't seem to be possible:
+</p>
+<blockquote><p>
+ "A return value of partial, if (from_next == from_end),
+ indicates that either the destination sequence has not
+ absorbed all the available destination elements, or that
+ additional source elements are needed before another
+ destination element can be produced."
+</p></blockquote>
+<p>
+If the value is partial, it's not clear to me that (from_next
+==from_end) could ever hold if there isn't enough room
+in the destination buffer. In order for (from_next==from_end) to
+hold, all characters in that range must have been successfully
+converted (according to 22.2.1.4.2 [locale.codecvt.virtuals], p2) and since there are no
+further source characters to convert, no more room in the
+destination buffer can be needed.
+</p>
+<p>
+It's also not clear to me that (from_next==from_end) could ever
+hold if additional source elements are needed to produce another
+destination character (not element as incorrectly stated in the
+text). partial is returned if "not all source characters have
+been converted" according to Table 53, which also implies that
+(from_next==from) does NOT hold.
+</p>
+<p>
+Could it be that the intended qualifying condition was actually
+(from_next != from_end), i.e., that the sentence was supposed
+to read
+</p>
+<blockquote><p>
+ "A return value of partial, if (from_next != from_end),..."
+</p></blockquote>
+<p>
+which would make perfect sense, since, as far as I understand it,
+partial can only occur if (from_next != from_end)?
+</p>
+<p><i>[Lillehammer: Defer for the moment, but this really needs to be
+ fixed. Right now, the description of codecvt is too vague for it to
+ be a useful contract between providers and clients of codecvt
+ facets. (Note that both vendors and users can be both providers and
+ clients of codecvt facets.) The major philosophical issue is whether
+ the standard should only describe mappings that take a single wide
+ character to multiple narrow characters (and vice versa), or whether
+ it should describe fully general N-to-M conversions. When the
+ original standard was written only the former was contemplated, but
+ today, in light of the popularity of utf8 and utf16, that doesn't
+ seem sufficient for C++0x. Bill supports general N-to-M conversions;
+ we need to make sure Martin and Howard agree.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="387"></a>387. std::complex over-encapsulated</h3>
+<p><b>Section:</b> 26.3 [complex.numbers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.numbers">issues</a> in [complex.numbers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The absence of explicit description of std::complex&lt;T&gt; layout
+makes it imposible to reuse existing software developed in traditional
+languages like Fortran or C with unambigous and commonly accepted
+layout assumptions. There ought to be a way for practitioners to
+predict with confidence the layout of std::complex&lt;T&gt; whenever T
+is a numerical datatype. The absence of ways to access individual
+parts of a std::complex&lt;T&gt; object as lvalues unduly promotes
+severe pessimizations. For example, the only way to change,
+independently, the real and imaginary parts is to write something like
+</p>
+
+<pre>complex&lt;T&gt; z;
+// ...
+// set the real part to r
+z = complex&lt;T&gt;(r, z.imag());
+// ...
+// set the imaginary part to i
+z = complex&lt;T&gt;(z.real(), i);
+</pre>
+
+<p>
+At this point, it seems appropriate to recall that a complex number
+is, in effect, just a pair of numbers with no particular invariant to
+maintain. Existing practice in numerical computations has it that a
+complex number datatype is usually represented by Cartesian
+coordinates. Therefore the over-encapsulation put in the specification
+of std::complex&lt;&gt; is not justified.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following requirements to 26.3 [complex.numbers] as 26.3/4:</p>
+<blockquote>
+<p>If z is an lvalue expression of type cv std::complex&lt;T&gt; then</p>
+
+<ul>
+<li>the expression reinterpret_cast&lt;cv T(&amp;)[2]&gt;(z)
+is well-formed; and</li>
+<li>reinterpret_cast&lt;cvT(&amp;)[2]&gt;(z)[0]designates the
+real part of z; and</li>
+<li>reinterpret_cast&lt;cvT(&amp;)[2]&gt;(z)[1]designates the
+imaginary part of z.</li>
+</ul>
+
+<p>
+Moreover, if a is an expression of pointer type cv complex&lt;T&gt;*
+and the expression a[i] is well-defined for an integer expression
+i then:
+</p>
+
+<ul>
+<li>reinterpret_cast&lt;cvT*&gt;(a)[2+i] designates the real
+part of a[i]; and</li>
+<li>reinterpret_cast&lt;cv T*&gt;(a)[2+i+1] designates the
+imaginary part of a[i].</li>
+</ul>
+</blockquote>
+
+<p>In the header synopsis in 26.3.1 [complex.synopsis], replace</p>
+<pre> template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);
+</pre>
+
+<p>with</p>
+
+<pre> template&lt;class T&gt; const T&amp; real(const complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; T&amp; real( complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; const T&amp; imag(const complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; T&amp; imag( complex&lt;T&gt;&amp;);
+</pre>
+
+<p>In 26.3.7 [complex.value.ops] paragraph 1, change</p>
+<pre> template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);
+</pre>
+<p>to</p>
+<pre> template&lt;class T&gt; const T&amp; real(const complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; T&amp; real( complex&lt;T&gt;&amp;);
+</pre>
+<p>and change the <b>Returns</b> clause to "<b>Returns:</b> The real
+part of <i>x</i>.</p>
+
+<p>In 26.3.7 [complex.value.ops] paragraph 2, change</p>
+<pre> template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);
+</pre>
+<p>to</p>
+<pre> template&lt;class T&gt; const T&amp; imag(const complex&lt;T&gt;&amp;);
+ template&lt;class T&gt; T&amp; imag( complex&lt;T&gt;&amp;);
+</pre>
+<p>and change the <b>Returns</b> clause to "<b>Returns:</b> The imaginary
+part of <i>x</i>.</p>
+
+<p><i>[Kona: The layout guarantee is absolutely necessary for C
+ compatibility. However, there was disagreement about the other part
+ of this proposal: retrieving elements of the complex number as
+ lvalues. An alternative: continue to have real() and imag() return
+ rvalues, but add set_real() and set_imag(). Straw poll: return
+ lvalues - 2, add setter functions - 5. Related issue: do we want
+ reinterpret_cast as the interface for converting a complex to an
+ array of two reals, or do we want to provide a more explicit way of
+ doing it? Howard will try to resolve this issue for the next
+ meeting.]</i></p>
+
+
+<p><i>[pre-Sydney: Howard summarized the options in n1589.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that C99 compatibility would be enough
+justification for this change even without other considerations. All
+existing implementations already have the layout proposed here.</p>
+
+
+
+
+
+<hr>
+<h3><a name="394"></a>394. behavior of formatted output on failure</h3>
+<p><b>Section:</b> 27.6.2.6.1 [ostream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-12-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There is a contradiction in Formatted output about what bit is
+supposed to be set if the formatting fails. On sentence says it's
+badbit and another that it's failbit.
+</p>
+<p>
+27.6.2.5.1, p1 says in the Common Requirements on Formatted output
+functions:
+</p>
+<pre> ... If the generation fails, then the formatted output function
+ does setstate(ios::failbit), which might throw an exception.
+</pre>
+<p>
+27.6.2.5.2, p1 goes on to say this about Arithmetic Inserters:
+</p>
+<p>
+ ... The formatting conversion occurs as if it performed the
+ following code fragment:
+</p>
+<pre> bool failed =
+ use_facet&lt;num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt;
+ &gt; &gt;
+ (getloc()).put(*this, *this, fill(), val). failed();
+
+ ... If failed is true then does setstate(badbit) ...
+</pre>
+<p>
+The original intent of the text, according to Jerry Schwarz (see
+c++std-lib-10500), is captured in the following paragraph:
+</p>
+<p>
+In general "badbit" should mean that the stream is unusable because
+of some underlying failure, such as disk full or socket closure;
+"failbit" should mean that the requested formatting wasn't possible
+because of some inconsistency such as negative widths. So typically
+if you clear badbit and try to output something else you'll fail
+again, but if you clear failbit and try to output something else
+you'll succeed.
+</p>
+<p>
+In the case of the arithmetic inserters, since num_put cannot
+report failure by any means other than exceptions (in response
+to which the stream must set badbit, which prevents the kind of
+recoverable error reporting mentioned above), the only other
+detectable failure is if the iterator returned from num_put
+returns true from failed().
+</p>
+<p>
+Since that can only happen (at least with the required iostream
+specializations) under such conditions as the underlying failure
+referred to above (e.g., disk full), setting badbit would seem
+to be the appropriate response (indeed, it is required in
+27.6.2.5.2, p1). It follows that failbit can never be directly
+set by the arithmetic (it can only be set by the sentry object
+under some unspecified conditions).
+</p>
+<p>
+The situation is different for other formatted output functions
+which can fail as a result of the streambuf functions failing
+(they may do so by means other than exceptions), and which are
+then required to set failbit.
+</p>
+<p>
+The contradiction, then, is that ostream::operator&lt;&lt;(int) will
+set badbit if the disk is full, while operator&lt;&lt;(ostream&amp;,
+char) will set failbit under the same conditions. To make the behavior
+consistent, the Common requirements sections for the Formatted output
+functions should be changed as proposed below.
+</p>
+<p><i>[Kona: There's agreement that this is a real issue. What we
+ decided at Kona: 1. An error from the buffer (which can be detected
+ either directly from streambuf's member functions or by examining a
+ streambuf_iterator) should always result in badbit getting set.
+ 2. There should never be a circumstance where failbit gets set.
+ That represents a formatting error, and there are no circumstances
+ under which the output facets are specified as signaling a
+ formatting error. (Even more so for string output that for numeric
+ because there's nothing to format.) If we ever decide to make it
+ possible for formatting errors to exist then the facets can signal
+ the error directly, and that should go in clause 22, not clause 27.
+ 3. The phrase "if generation fails" is unclear and should be
+ eliminated. It's not clear whether it's intended to mean a buffer
+ error (e.g. a full disk), a formatting error, or something else.
+ Most people thought it was supposed to refer to buffer errors; if
+ so, we should say so. Martin will provide wording.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="396"></a>396. what are characters zero and one</h3>
+<p><b>Section:</b> 23.3.5.1 [bitset.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.cons">issues</a> in [bitset.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+23.3.5.1, p6 [lib.bitset.cons] talks about a generic character
+having the value of 0 or 1 but there is no definition of what
+that means for charT other than char and wchar_t. And even for
+those two types, the values 0 and 1 are not actually what is
+intended -- the values '0' and '1' are. This, along with the
+converse problem in the description of to_string() in 23.3.5.2,
+p33, looks like a defect remotely related to DR 303.
+ </p>
+ <p>
+http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#303
+ </p>
+ <pre>23.3.5.1:
+ -6- An element of the constructed string has value zero if the
+ corresponding character in str, beginning at position pos,
+ is 0. Otherwise, the element has the value one.
+ </pre>
+ <pre>23.3.5.2:
+ -33- Effects: Constructs a string object of the appropriate
+ type and initializes it to a string of length N characters.
+ Each character is determined by the value of its
+ corresponding bit position in *this. Character position N
+ ?- 1 corresponds to bit position zero. Subsequent decreasing
+ character positions correspond to increasing bit positions.
+ Bit value zero becomes the character 0, bit value one becomes
+ the character 1.
+ </pre>
+ <p>
+Also note the typo in 23.3.5.1, p6: the object under construction
+is a bitset, not a string.
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the constructor's function declaration immediately before
+23.3.5.1 [bitset.cons] p3 to:</p>
+<pre> template &lt;class charT, class traits, class Allocator&gt;
+ explicit
+ bitset(const basic_string&lt;charT, traits, Allocator&gt;&amp; str,
+ typename basic_string&lt;charT, traits, Allocator&gt;::size_type pos = 0,
+ typename basic_string&lt;charT, traits, Allocator&gt;::size_type n =
+ basic_string&lt;charT, traits, Allocator&gt;::npos,
+ charT zero = charT('0'), charT one = charT('1'))
+</pre>
+<p>Change the first two sentences of 23.3.5.1 [bitset.cons] p6 to: "An
+element of the constructed string has value 0 if the corresponding
+character in <i>str</i>, beginning at position <i>pos</i>,
+is <i>zero</i>. Otherwise, the element has the value 1.</p>
+
+<p>Change the text of the second sentence in 23.3.5.1, p5 to read:
+ "The function then throws invalid_argument if any of the rlen
+ characters in str beginning at position pos is other than <i>zero</i>
+ or <i>one</i>. The function uses traits::eq() to compare the character
+ values."
+</p>
+
+<p>Change the declaration of the <tt>to_string</tt> member function
+ immediately before 23.3.5.2 [bitset.members] p33 to:</p>
+<pre> template &lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT, traits, Allocator&gt;
+ to_string(charT zero = charT('0'), charT one = charT('1')) const;
+</pre>
+<p>Change the last sentence of 23.3.5.2 [bitset.members] p33 to: "Bit
+ value 0 becomes the character <tt><i>zero</i></tt>, bit value 1 becomes the
+ character <tt><i>one</i></tt>.</p>
+<p>Change 23.3.5.3 [bitset.operators] p8 to:</p>
+<p><b>Returns</b>:</p>
+<pre> os &lt;&lt; x.template to_string&lt;charT,traits,allocator&lt;charT&gt; &gt;(
+ use_facet&lt;ctype&lt;charT&gt; &gt;(<i>os</i>.getloc()).widen('0'),
+ use_facet&lt;ctype&lt;charT&gt; &gt;(<i>os</i>.getloc()).widen('1'));
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>There is a real problem here: we need the character values of '0'
+ and '1', and we have no way to get them since strings don't have
+ imbued locales. In principle the "right" solution would be to
+ provide an extra object, either a ctype facet or a full locale,
+ which would be used to widen '0' and '1'. However, there was some
+ discomfort about using such a heavyweight mechanism. The proposed
+ resolution allows those users who care about this issue to get it
+ right.</p>
+<p>We fix the inserter to use the new arguments. Note that we already
+ fixed the analogous problem with the extractor in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a>.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="397"></a>397. ostream::sentry dtor throws exceptions</h3>
+<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+17.4.4.8, p3 prohibits library dtors from throwing exceptions.
+ </p>
+ <p>
+27.6.2.3, p4 says this about the ostream::sentry dtor:
+ </p>
+ <pre> -4- If ((os.flags() &amp; ios_base::unitbuf) &amp;&amp; !uncaught_exception())
+ is true, calls os.flush().
+ </pre>
+ <p>
+27.6.2.6, p7 that describes ostream::flush() says:
+ </p>
+ <pre> -7- If rdbuf() is not a null pointer, calls rdbuf()-&gt;pubsync().
+ If that function returns ?-1 calls setstate(badbit) (which
+ may throw ios_base::failure (27.4.4.3)).
+ </pre>
+ <p>
+That seems like a defect, since both pubsync() and setstate() can
+throw an exception.
+ </p>
+<p><i>[
+The contradiction is real. Clause 17 says destructors may never
+throw exceptions, and clause 27 specifies a destructor that does
+throw. In principle we might change either one. We're leaning
+toward changing clause 17: putting in an "unless otherwise specified"
+clause, and then putting in a footnote saying the sentry destructor
+is the only one that can throw. PJP suggests specifying that
+sentry::~sentry() should internally catch any exceptions it might cause.
+]</i></p>
+
+
+<p><i>[
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#418">418</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a> for related issues.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="398"></a>398. effects of end-of-file on unformatted input functions</h3>
+<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+While reviewing unformatted input member functions of istream
+for their behavior when they encounter end-of-file during input
+I found that the requirements vary, sometimes unexpectedly, and
+in more than one case even contradict established practice (GNU
+libstdc++ 3.2, IBM VAC++ 6.0, STLPort 4.5, SunPro 5.3, HP aCC
+5.38, Rogue Wave libstd 3.1, and Classic Iostreams).
+ </p>
+ <p>
+The following unformatted input member functions set eofbit if they
+encounter an end-of-file (this is the expected behavior, and also
+the behavior of all major implementations):
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ get (char_type*, streamsize, char_type);
+ </pre>
+ <p>
+ Also sets failbit if it fails to extract any characters.
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ get (char_type*, streamsize);
+ </pre>
+ <p>
+ Also sets failbit if it fails to extract any characters.
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ getline (char_type*, streamsize, char_type);
+ </pre>
+ <p>
+ Also sets failbit if it fails to extract any characters.
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ getline (char_type*, streamsize);
+ </pre>
+ <p>
+ Also sets failbit if it fails to extract any characters.
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ ignore (int, int_type);
+ </pre>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ read (char_type*, streamsize);
+ </pre>
+ <p>
+ Also sets failbit if it encounters end-of-file.
+ </p>
+ <pre> streamsize readsome (char_type*, streamsize);
+ </pre>
+
+ <p>
+The following unformated input member functions set failbit but
+not eofbit if they encounter an end-of-file (I find this odd
+since the functions make it impossible to distinguish a general
+failure from a failure due to end-of-file; the requirement is
+also in conflict with all major implementation which set both
+eofbit and failbit):
+ </p>
+ <pre> int_type get();
+ </pre>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ get (char_type&amp;);
+ </pre>
+ <p>
+These functions only set failbit of they extract no characters,
+otherwise they don't set any bits, even on failure (I find this
+inconsistency quite unexpected; the requirement is also in
+conflict with all major implementations which set eofbit
+whenever they encounter end-of-file):
+ </p>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ get (basic_streambuf&lt;charT, traits&gt;&amp;, char_type);
+ </pre>
+ <pre> basic_istream&lt;charT, traits&gt;&amp;
+ get (basic_streambuf&lt;charT, traits&gt;&amp;);
+ </pre>
+ <p>
+This function sets no bits (all implementations except for
+STLport and Classic Iostreams set eofbit when they encounter
+end-of-file):
+ </p>
+ <pre> int_type peek ();
+ </pre>
+<p>Informally, what we want is a global statement of intent saying
+ that eofbit gets set if we trip across EOF, and then we can take
+ away the specific wording for individual functions. A full review
+ is necessary. The wording currently in the standard is a mishmash,
+ and changing it on an individual basis wouldn't make things better.
+ Dietmar will do this work.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="408"></a>408. Is vector&lt;reverse_iterator&lt;char*&gt; &gt; forbidden?</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I've been discussing iterator semantics with Dave Abrahams, and a
+surprise has popped up. I don't think this has been discussed before.
+</p>
+
+<p>
+24.1 [iterator.requirements] says that the only operation that can be performed on "singular"
+iterator values is to assign a non-singular value to them. (It
+doesn't say they can be destroyed, and that's probably a defect.)
+Some implementations have taken this to imply that there is no need
+to initialize the data member of a reverse_iterator&lt;&gt; in the default
+constructor. As a result, code like
+</p>
+<blockquote><pre> std::vector&lt;std::reverse_iterator&lt;char*&gt; &gt; v(7);
+ v.reserve(1000);
+</pre></blockquote>
+<p>
+invokes undefined behavior, because it must default-initialize the
+vector elements, and then copy them to other storage. Of course many
+other vector operations on these adapters are also left undefined,
+and which those are is not reliably deducible from the standard.
+</p>
+
+<p>
+I don't think that 24.1 was meant to make standard-library iterator
+types unsafe. Rather, it was meant to restrict what operations may
+be performed by functions which take general user- and standard
+iterators as arguments, so that raw pointers would qualify as
+iterators. However, this is not clear in the text, others have come
+to the opposite conclusion.
+</p>
+
+<p>
+One question is whether the standard iterator adaptors have defined
+copy semantics. Another is whether they have defined destructor
+semantics: is
+</p>
+<blockquote><pre> { std::vector&lt;std::reverse_iterator&lt;char*&gt; &gt; v(7); }
+</pre></blockquote>
+<p>
+undefined too?
+</p>
+
+<p>
+Note this is not a question of whether algorithms are allowed to
+rely on copy semantics for arbitrary iterators, just whether the
+types we actually supply support those operations. I believe the
+resolution must be expressed in terms of the semantics of the
+adapter's argument type. It should make clear that, e.g., the
+reverse_iterator&lt;T&gt; constructor is actually required to execute
+T(), and so copying is defined if the result of T() is copyable.
+</p>
+
+<p>
+Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, which defines reverse_iterator's default
+constructor more precisely, has some relevance to this issue.
+However, it is not the whole story.
+</p>
+
+<p>
+The issue was whether
+</p>
+<blockquote><pre> reverse_iterator() { }
+</pre></blockquote>
+<p>
+is allowed, vs.
+</p>
+<blockquote><pre> reverse_iterator() : current() { }
+</pre></blockquote>
+
+<p>
+The difference is when T is char*, where the first leaves the member
+uninitialized, and possibly equal to an existing pointer value, or
+(on some targets) may result in a hardware trap when copied.
+</p>
+
+<p>
+8.5 paragraph 5 seems to make clear that the second is required to
+satisfy DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, at least for non-class Iterator argument
+types.
+</p>
+
+<p>
+But that only takes care of reverse_iterator, and doesn't establish
+a policy for all iterators. (The reverse iterator adapter was just
+an example.) In particular, does my function
+</p>
+<blockquote><pre> template &lt;typename Iterator&gt;
+ void f() { std::vector&lt;Iterator&gt; v(7); }
+</pre></blockquote>
+<p>
+evoke undefined behavior for some conforming iterator definitions?
+I think it does, now, because vector&lt;&gt; will destroy those singular
+iterator values, and that's explicitly disallowed.
+</p>
+
+<p>
+24.1 shouldn't give blanket permission to copy all singular iterators,
+because then pointers wouldn't qualify as iterators. However, it
+should allow copying of that subset of singular iterator values that
+are default-initialized, and it should explicitly allow destroying any
+iterator value, singular or not, default-initialized or not.
+</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#407">407</a></p>
+<p><i>[
+We don't want to require all singular iterators to be copyable,
+because that is not the case for pointers. However, default
+construction may be a special case. Issue: is it really default
+construction we want to talk about, or is it something like value
+initialization? We need to check with core to see whether default
+constructed pointers are required to be copyable; if not, it would be
+wrong to impose so strict a requirement for iterators.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="417"></a>417. what does ctype::do_widen() return on failure</h3>
+<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The Effects and Returns clauses of the do_widen() member function of
+the ctype facet fail to specify the behavior of the function on failure.
+That the function may not be able to simply cast the narrow character
+argument to the type of the result since doing so may yield the wrong value
+for some wchar_t encodings. Popular implementations of ctype&lt;wchar_t&gt; that
+use mbtowc() and UTF-8 as the native encoding (e.g., GNU glibc) will fail
+when the argument's MSB is set. There is no way for the the rest of locale
+and iostream to reliably detect this failure.
+</p>
+<p><i>[Kona: This is a real problem. Widening can fail. It's unclear
+ what the solution should be. Returning WEOF works for the wchar_t
+ specialization, but not in general. One option might be to add a
+ default, like <i>narrow</i>. But that's an incompatible change.
+ Using <i>traits::eof</i> might seem like a good idea, but facets
+ don't have access to traits (a recurring problem). We could
+ have <i>widen</i> throw an exception, but that's a scary option;
+ existing library components aren't written with the assumption
+ that <i>widen</i> can throw.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="418"></a>418. exceptions thrown during iostream cleanup</h3>
+<p><b>Section:</b> 27.4.2.1.6 [ios::Init] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The dtor of the ios_base::Init object is supposed to call flush() on the
+6 standard iostream objects cout, cerr, clog, wcout, wcerr, and wclog.
+This call may cause an exception to be thrown.
+</p>
+
+<p>
+17.4.4.8, p3 prohibits all library destructors from throwing exceptions.
+</p>
+
+<p>
+The question is: What should this dtor do if one or more of these calls
+to flush() ends up throwing an exception? This can happen quite easily
+if one of the facets installed in the locale imbued in the iostream
+object throws.
+</p>
+<p><i>[Kona: We probably can't do much better than what we've got, so
+ the LWG is leaning toward NAD. At the point where the standard
+ stream objects are being cleaned up, the usual error reporting
+ mechanism are all unavailable. And exception from flush at this
+ point will definitely cause problems. A quality implementation
+ might reasonably swallow the exception, or call abort, or do
+ something even more drastic.]</i></p>
+
+
+<p><i>[
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#397">397</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a> for related issues.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="419"></a>419. istream extractors not setting failbit if eofbit is already set</h3>
+<p><b>Section:</b> 27.6.1.1.3 [istream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::sentry">issues</a> in [istream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+27.6.1.1.3 [istream::sentry], p2 says that istream::sentry ctor prepares for input if is.good()
+is true. p4 then goes on to say that the ctor sets the sentry::ok_ member to
+true if the stream state is good after any preparation. 27.6.1.2.1 [istream.formatted.reqmts], p1 then
+says that a formatted input function endeavors to obtain the requested input
+if the sentry's operator bool() returns true.
+
+Given these requirements, no formatted extractor should ever set failbit if
+the initial stream rdstate() == eofbit. That is contrary to the behavior of
+all implementations I tested. The program below prints out
+
+eof = 1, fail = 0
+eof = 1, fail = 1
+
+on all of them.
+ </p>
+<pre>
+#include &lt;sstream&gt;
+#include &lt;cstdio&gt;
+
+int main()
+{
+ std::istringstream strm ("1");
+
+ int i = 0;
+
+ strm &gt;&gt; i;
+
+ std::printf ("eof = %d, fail = %d\n",
+ !!strm.eof (), !!strm.fail ());
+
+ strm &gt;&gt; i;
+
+ std::printf ("eof = %d, fail = %d\n",
+ !!strm.eof (), !!strm.fail ());
+}
+
+</pre>
+ <p>
+<br>
+
+Comments from Jerry Schwarz (c++std-lib-11373):
+<br>
+
+Jerry Schwarz wrote:
+<br>
+
+I don't know where (if anywhere) it says it in the standard, but the
+formatted extractors are supposed to set failbit if they don't extract
+any characters. If they didn't then simple loops like
+<br>
+
+while (cin &gt;&gt; x);
+<br>
+
+would loop forever.
+<br>
+
+Further comments from Martin Sebor:
+<br>
+
+The question is which part of the extraction should prevent this from happening
+by setting failbit when eofbit is already set. It could either be the sentry
+object or the extractor. It seems that most implementations have chosen to
+set failbit in the sentry [...] so that's the text that will need to be
+corrected.
+
+ </p>
+<p>
+Pre Berlin: This issue is related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>. If the sentry
+sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then
+you can never seek away from the end of stream.
+</p>
+<p>Kona: Possibly NAD. If eofbit is set then good() will return false. We
+ then set <i>ok</i> to false. We believe that the sentry's
+ constructor should always set failbit when <i>ok</i> is false, and
+ we also think the standard already says that. Possibly it could be
+ clearer.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 27.6.1.1.3 [istream::sentry], p2 to:
+</p>
+
+<blockquote>
+<pre>explicit sentry(basic_istream&lt;charT,traits&gt;&amp; <i>is</i> , bool <i>noskipws</i> = false);</pre>
+<p>
+-2- <i>Effects:</i> If <tt>is.good()</tt> is <del><tt>true</tt></del>
+<ins><tt>false</tt></ins>, <ins>calls <tt>is.setstate(failbit)</tt>.
+Otherwise</ins> prepares for formatted or unformatted input. ...
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="421"></a>421. is basic_streambuf copy-constructible?</h3>
+<p><b>Section:</b> 27.5.2.1 [streambuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.cons">issues</a> in [streambuf.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The reflector thread starting with c++std-lib-11346 notes that the class
+template basic_streambuf, along with basic_stringbuf and basic_filebuf,
+is copy-constructible but that the semantics of the copy constructors
+are not defined anywhere. Further, different implementations behave
+differently in this respect: some prevent copy construction of objects
+of these types by declaring their copy ctors and assignment operators
+private, others exhibit undefined behavior, while others still give
+these operations well-defined semantics.
+</p>
+
+<p>
+Note that this problem doesn't seem to be isolated to just the three
+types mentioned above. A number of other types in the library section
+of the standard provide a compiler-generated copy ctor and assignment
+operator yet fail to specify their semantics. It's believed that the
+only types for which this is actually a problem (i.e. types where the
+compiler-generated default may be inappropriate and may not have been
+intended) are locale facets. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#439">439</a>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+27.5.2 [lib.streambuf]: Add into the synopsis, public section, just above the destructor declaration:
+</p>
+
+<blockquote>
+<pre>basic_streambuf(const basic_streambuf&amp; sb);
+basic_streambuf&amp; operator=(const basic_streambuf&amp; sb);
+</pre>
+</blockquote>
+
+<p>Insert after 27.5.2.1, paragraph 2:</p>
+<blockquote>
+<pre>basic_streambuf(const basic_streambuf&amp; sb);
+</pre>
+
+<p>Constructs a copy of sb.</p>
+<p>Postcondtions:</p>
+<pre> eback() == sb.eback()
+ gptr() == sb.gptr()
+ egptr() == sb.egptr()
+ pbase() == sb.pbase()
+ pptr() == sb.pptr()
+ epptr() == sb.epptr()
+ getloc() == sb.getloc()
+</pre>
+
+<pre>basic_streambuf&amp; operator=(const basic_streambuf&amp; sb);
+</pre>
+
+<p>Assigns the data members of sb to this.</p>
+
+<p>Postcondtions:</p>
+<pre> eback() == sb.eback()
+ gptr() == sb.gptr()
+ egptr() == sb.egptr()
+ pbase() == sb.pbase()
+ pptr() == sb.pptr()
+ epptr() == sb.epptr()
+ getloc() == sb.getloc()
+</pre>
+
+<p>Returns: *this.</p>
+</blockquote>
+
+<p>27.7.1 [lib.stringbuf]:</p>
+
+<p><b>Option A:</b></p>
+
+<blockquote>
+<p>Insert into the basic_stringbuf synopsis in the private section:</p>
+
+<pre>basic_stringbuf(const basic_stringbuf&amp;); // not defined
+basic_stringbuf&amp; operator=(const basic_stringbuf&amp;); // not defined
+</pre>
+</blockquote>
+
+<p><b>Option B:</b></p>
+
+<blockquote>
+<p>Insert into the basic_stringbuf synopsis in the public section:</p>
+
+<pre>basic_stringbuf(const basic_stringbuf&amp; sb);
+basic_stringbuf&amp; operator=(const basic_stringbuf&amp; sb);
+</pre>
+
+<p>27.7.1.1, insert after paragraph 4:</p>
+
+<pre>basic_stringbuf(const basic_stringbuf&amp; sb);</pre>
+
+<p>
+Constructs an independent copy of sb as if with sb.str(), and with the openmode that sb was constructed with.
+</p>
+
+<p>Postcondtions: </p>
+<pre> str() == sb.str()
+ gptr() - eback() == sb.gptr() - sb.eback()
+ egptr() - eback() == sb.egptr() - sb.eback()
+ pptr() - pbase() == sb.pptr() - sb.pbase()
+ getloc() == sb.getloc()
+</pre>
+
+<p>
+Note: The only requirement on epptr() is that it point beyond the
+initialized range if an output sequence exists. There is no requirement
+that epptr() - pbase() == sb.epptr() - sb.pbase().
+</p>
+
+<pre>basic_stringbuf&amp; operator=(const basic_stringbuf&amp; sb);</pre>
+<p>After assignment the basic_stringbuf has the same state as if it
+were initially copy constructed from sb, except that the
+basic_stringbuf is allowed to retain any excess capacity it might have,
+which may in turn effect the value of epptr().
+</p>
+</blockquote>
+
+<p>27.8.1.1 [lib.filebuf]</p>
+
+<p>Insert at the bottom of the basic_filebuf synopsis:</p>
+
+<blockquote>
+<pre>private:
+ basic_filebuf(const basic_filebuf&amp;); // not defined
+ basic_filebuf&amp; operator=(const basic_filebuf&amp;); // not defined
+</pre>
+</blockquote>
+<p><i>[Kona: this is an issue for basic_streambuf itself and for its
+ derived classes. We are leaning toward allowing basic_streambuf to
+ be copyable, and specifying its precise semantics. (Probably the
+ obvious: copying the buffer pointers.) We are less sure whether
+ the streambuf derived classes should be copyable. Howard will
+ write up a proposal.]</i></p>
+
+
+<p><i>[Sydney: Dietmar presented a new argument against basic_streambuf
+ being copyable: it can lead to an encapsulation violation. Filebuf
+ inherits from streambuf. Now suppose you inhert a my_hijacking_buf
+ from streambuf. You can copy the streambuf portion of a filebuf to a
+ my_hijacking_buf, giving you access to the pointers into the
+ filebuf's internal buffer. Perhaps not a very strong argument, but
+ it was strong enough to make people nervous. There was weak
+ preference for having streambuf not be copyable. There was weak
+ preference for having stringbuf not be copyable even if streambuf
+ is. Move this issue to open for now.
+]</i></p>
+
+
+<p><i>[
+2007-01-12, Howard:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1862.html#27.5.2%20-%20Class%20template%20basic_streambuf%3CcharT,traits%3E">Rvalue Reference Recommendations for Chapter 27</a>
+recommends protected copy constructor and assignment for <tt>basic_streambuf</tt> with the same semantics
+as would be generated by the compiler. These members aid in derived classes implementing move semantics.
+A protected copy constructor and copy assignment operator do not expose encapsulation more so than it is
+today as each data member of a <tt>basic_streambuf</tt> is already both readable and writable by derived
+classes via various get/set protected member functions (<tt>eback()</tt>, <tt>setp()</tt>, etc.). Rather
+a protected copy constructor and copy assignment operator simply make the job of derived classes implementing
+move semantics less tedious and error prone.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+27.5.2 [lib.streambuf]: The proposed basic_streambuf copy constructor
+and assignment operator are the same as currently implied by the lack
+of declarations: public and simply copies the data members. This
+resolution is not a change but a clarification of the current
+standard.
+</p>
+
+<p>
+27.7.1 [lib.stringbuf]: There are two reasonable options: A) Make
+basic_stringbuf not copyable. This is likely the status-quo of
+current implementations. B) Reasonable copy semantics of
+basic_stringbuf can be defined and implemented. A copyable
+basic_streambuf is arguably more useful than a non-copyable one. This
+should be considered as new functionality and not the fixing of a
+defect. If option B is chosen, ramifications from issue 432 are taken
+into account.
+</p>
+
+<p>
+27.8.1.1 [lib.filebuf]: There are no reasonable copy semantics for
+basic_filebuf.
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="423"></a>423. effects of negative streamsize in iostreams</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+A third party test suite tries to exercise istream::ignore(N) with
+a negative value of N and expects that the implementation will treat
+N as if it were 0. Our implementation asserts that (N &gt;= 0) holds and
+aborts the test.
+</p>
+
+<p>
+I can't find anything in section 27 that prohibits such values but I don't
+see what the effects of such calls should be, either (this applies to
+a number of unformatted input functions as well as some member functions
+of the basic_streambuf template).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+I propose that we add to each function in clause 27 that takes an argument,
+say N, of type streamsize a Requires clause saying that "N &gt;= 0." The intent
+is to allow negative streamsize values in calls to precision() and width()
+but disallow it in calls to streambuf::sgetn(), istream::ignore(), or
+ostream::write().
+</p>
+
+<p><i>[Kona: The LWG agreed that this is probably what we want. However, we
+ need a review to find all places where functions in clause 27 take
+ arguments of type streamsize that shouldn't be allowed to go
+ negative. Martin will do that review.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="424"></a>424. normative notes</h3>
+<p><b>Section:</b> 17.3.1.1 [structure.summary] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+The text in 17.3.1.1, p1 says:
+<br>
+
+"Paragraphs labelled "Note(s):" or "Example(s):" are informative, other
+paragraphs are normative."
+<br>
+
+The library section makes heavy use of paragraphs labeled "Notes(s),"
+some of which are clearly intended to be normative (see list 1), while
+some others are not (see list 2). There are also those where the intent
+is not so clear (see list 3).
+<br><br>
+
+List 1 -- Examples of (presumably) normative Notes:
+<br>
+
+20.6.1.1 [allocator.members], p3,<br>
+20.6.1.1 [allocator.members], p10,<br>
+21.3.2 [string.cons], p11,<br>
+22.1.1.2 [locale.cons], p11,<br>
+23.2.2.3 [deque.modifiers], p2,<br>
+25.3.7 [alg.min.max], p3,<br>
+26.3.6 [complex.ops], p15,<br>
+27.5.2.4.3 [streambuf.virt.get], p7.<br>
+<br>
+
+List 2 -- Examples of (presumably) informative Notes:
+<br>
+
+18.5.1.3 [new.delete.placement], p3,<br>
+21.3.6.6 [string::replace], p14,<br>
+22.2.1.4.2 [locale.codecvt.virtuals], p3,<br>
+25.1.1 [alg.foreach], p4,<br>
+26.3.5 [complex.member.ops], p1,<br>
+27.4.2.5 [ios.base.storage], p6.<br>
+<br>
+
+List 3 -- Examples of Notes that are not clearly either normative
+or informative:
+<br>
+
+22.1.1.2 [locale.cons], p8,<br>
+22.1.1.5 [locale.statics], p6,<br>
+27.5.2.4.5 [streambuf.virt.put], p4.<br>
+<br>
+
+None of these lists is meant to be exhaustive.
+</p>
+
+<p><i>[Definitely a real problem. The big problem is there's material
+ that doesn't quite fit any of the named paragraph categories
+ (e.g. <b>Effects</b>). Either we need a new kind of named
+ paragraph, or we need to put more material in unnamed paragraphs
+ jsut after the signature. We need to talk to the Project Editor
+ about how to do this.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[Pete: I changed the paragraphs marked "Note" and "Notes" to use "Remark" and "Remarks".
+Fixed as editorial. This change has been in the WD since the post-Redmond mailing, in 2004.
+Recommend NAD.]</i></p>
+
+<p><i>[
+Batavia: We feel that the references in List 2 above should be changed from <i>Remarks</i>
+to <i>Notes</i>. We also feel that those items in List 3 need to be double checked for
+the same change. Alan and Pete to review.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="427"></a>427. stage 2 and rationale of DR 221</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The requirements specified in Stage 2 and reiterated in the rationale
+of DR 221 (and echoed again in DR 303) specify that num_get&lt;charT&gt;::
+do_get() compares characters on the stream against the widened elements
+of "012...abc...ABCX+-"
+</p>
+
+<p>
+An implementation is required to allow programs to instantiate the num_get
+template on any charT that satisfies the requirements on a user-defined
+character type. These requirements do not include the ability of the
+character type to be equality comparable (the char_traits template must
+be used to perform tests for equality). Hence, the num_get template cannot
+be implemented to support any arbitrary character type. The num_get template
+must either make the assumption that the character type is equality-comparable
+(as some popular implementations do), or it may use char_traits&lt;charT&gt; to do
+the comparisons (some other popular implementations do that). This diversity
+of approaches makes it difficult to write portable programs that attempt to
+instantiate the num_get template on user-defined types.
+</p>
+
+<p><i>[Kona: the heart of the problem is that we're theoretically
+ supposed to use traits classes for all fundamental character
+ operations like assignment and comparison, but facets don't have
+ traits parameters. This is a fundamental design flaw and it
+ appears all over the place, not just in this one place. It's not
+ clear what the correct solution is, but a thorough review of facets
+ and traits is in order. The LWG considered and rejected the
+ possibility of changing numeric facets to use narrowing instead of
+ widening. This may be a good idea for other reasons (see issue
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#459">459</a>), but it doesn't solve the problem raised by this
+ issue. Whether we use widen or narrow the <tt>num_get</tt> facet
+ still has no idea which traits class the user wants to use for
+ the comparison, because only streams, not facets, are passed traits
+ classes. The standard does not require that two different
+ traits classes with the same <tt>char_type</tt> must necessarily
+ have the same behavior.]</i></p>
+
+
+<p>Informally, one possibility: require that some of the basic
+character operations, such as <tt>eq</tt>, <tt>lt</tt>,
+and <tt>assign</tt>, must behave the same way for all traits classes
+with the same <tt>char_type</tt>. If we accept that limitation on
+traits classes, then the facet could reasonably be required to
+use <tt>char_traits&lt;charT&gt;</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="430"></a>430. valarray subset operations</h3>
+<p><b>Section:</b> 26.5.2.4 [valarray.sub] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard fails to specify the behavior of valarray::operator[](slice)
+and other valarray subset operations when they are passed an "invalid"
+slice object, i.e., either a slice that doesn't make sense at all (e.g.,
+slice (0, 1, 0) or one that doesn't specify a valid subset of the valarray
+object (e.g., slice (2, 1, 1) for a valarray of size 1).
+</p>
+<p><i>[Kona: the LWG believes that invalid slices should invoke
+ undefined behavior. Valarrays are supposed to be designed for high
+ performance, so we don't want to require specific checking. We
+ need wording to express this decision.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="431"></a>431. Swapping containers with unequal allocators</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements], 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-09-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Clause 20.1.2 [allocator.requirements] paragraph 4 says that implementations
+ are permitted to supply containers that are unable to cope with
+ allocator instances and that container implementations may assume
+ that all instances of an allocator type compare equal. We gave
+ implementers this latitude as a temporary hack, and eventually we
+ want to get rid of it. What happens when we're dealing with
+ allocators that <i>don't</i> compare equal?
+</p>
+
+<p>In particular: suppose that <tt>v1</tt> and <tt>v2</tt> are both
+ objects of type <tt>vector&lt;int, my_alloc&gt;</tt> and that
+ <tt>v1.get_allocator() != v2.get_allocator()</tt>. What happens if
+ we write <tt>v1.swap(v2)</tt>? Informally, three possibilities:</p>
+
+<p>1. This operation is illegal. Perhaps we could say that an
+ implementation is required to check and to throw an exception, or
+ perhaps we could say it's undefined behavior.</p>
+<p>2. The operation performs a slow swap (i.e. using three
+ invocations of <tt>operator=</tt>, leaving each allocator with its
+ original container. This would be an O(N) operation.</p>
+<p>3. The operation swaps both the vectors' contents and their
+ allocators. This would be an O(1) operation. That is:</p>
+ <blockquote>
+ <pre> my_alloc a1(...);
+ my_alloc a2(...);
+ assert(a1 != a2);
+
+ vector&lt;int, my_alloc&gt; v1(a1);
+ vector&lt;int, my_alloc&gt; v2(a2);
+ assert(a1 == v1.get_allocator());
+ assert(a2 == v2.get_allocator());
+
+ v1.swap(v2);
+ assert(a1 == v2.get_allocator());
+ assert(a2 == v1.get_allocator());
+ </pre>
+ </blockquote>
+
+<p><i>[Kona: This is part of a general problem. We need a paper
+ saying how to deal with unequal allocators in general.]</i></p>
+
+
+<p><i>[pre-Sydney: Howard argues for option 3 in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1599.html">N1599</a>.
+]</i></p>
+
+
+<p><i>[
+2007-01-12, Howard: This issue will now tend to come up more often with move constructors
+and move assignment operators. For containers, these members transfer resources (i.e.
+the allocated memory) just like swap.
+]</i></p>
+
+
+<p><i>[
+Batavia: There is agreement to overload the container <tt>swap</tt> on the allocator's Swappable
+requirement using concepts. If the allocator supports Swappable, then container's swap will
+swap allocators, else it will perform a "slow swap" using copy construction and copy assignment.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="446"></a>446. Iterator equality between different containers</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements], 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Andy Koenig <b>Date:</b> 2003-12-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+What requirements does the standard place on equality comparisons between
+iterators that refer to elements of different containers. For example, if
+v1 and v2 are empty vectors, is v1.end() == v2.end() allowed to yield true?
+Is it allowed to throw an exception?
+</p>
+
+<p>
+The standard appears to be silent on both questions.
+</p>
+<p><i>[Sydney: The intention is that comparing two iterators from
+different containers is undefined, but it's not clear if we say that,
+or even whether it's something we should be saying in clause 23 or in
+clause 24. Intuitively we might want to say that equality is defined
+only if one iterator is reachable from another, but figuring out how
+to say it in any sensible way is a bit tricky: reachability is defined
+in terms of equality, so we can't also define equality in terms of
+reachability.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="454"></a>454. basic_filebuf::open should accept wchar_t names</h3>
+<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<pre> basic_filebuf *basic_filebuf::open(const char *, ios_base::open_mode);
+</pre>
+
+<p>should be supplemented with the overload:</p>
+
+<pre> basic_filebuf *basic_filebuf::open(const wchar_t *, ios_base::open_mode);
+</pre>
+
+<p>
+Depending on the operating system, one of these forms is fundamental and
+the other requires an implementation-defined mapping to determine the
+actual filename.
+</p>
+
+<p><i>[Sydney: Yes, we want to allow wchar_t filenames. Bill will
+ provide wording.]</i></p>
+
+
+<p><i>[
+In Toronto we noted that this is issue 5 from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1569.htm">N1569</a>.
+]</i></p>
+
+<p>
+How does this interact with the newly-defined character types, and how
+do we avoid interface explosion considering <tt>std::string</tt> overloads that
+were added? Propose another solution that is different than the
+suggestion proposed by PJP.
+</p>
+<p>
+Suggestion is to make a member template function for <tt>basic_string</tt> (for
+<tt>char</tt>, <tt>wchar_t</tt>, <tt>u16char</tt>, <tt>u32char</tt> instantiations), and then just keep a
+<tt>const char*</tt> member.
+</p>
+<p>
+Goal is to do implicit conversion between character string literals to
+appropriate <tt>basic_string</tt> type. Not quite sure if this is possible.
+</p>
+<p>
+Implementors are free to add specific overloads for non-char character
+types.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change from:</p>
+<blockquote>
+<pre>basic_filebuf&lt;charT,traits&gt;* open(
+ const char* s,
+ ios_base::openmode mode );
+</pre>
+
+<p>
+Effects: If is_open() != false, returns a null pointer.
+Otherwise, initializes the filebuf as required. It then
+opens a file, if possible, whose name is the NTBS s ("as if"
+by calling std::fopen(s,modstr)).</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<pre>basic_filebuf&lt;charT,traits&gt;* open(
+ const char* s,
+ ios_base::openmode mode );
+
+basic_filebuf&lt;charT,traits&gt;* open(
+ const wchar_t* ws,
+ ios_base::openmode mode );
+</pre>
+
+<p>
+Effects: If is_open() != false, returns a null pointer.
+Otherwise, initializes the filebuf as required. It then
+opens a file, if possible, whose name is the NTBS s ("as if"
+by calling std::fopen(s,modstr)).
+For the second signature, the NTBS s is determined from the
+WCBS ws in an implementation-defined manner.
+</p>
+
+<p>
+(NOTE: For a system that "naturally" represents a filename
+as a WCBS, the NTBS s in the first signature may instead
+be mapped to a WCBS; if so, it follows the same mapping
+rules as the first argument to open.)
+</p>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Slightly controversial, but by a 7-1 straw poll the LWG agreed to move
+this to Ready. The controversy was because the mapping between wide
+names and files in a filesystem is implementation defined. The
+counterargument, which most but not all LWG members accepted, is that
+the mapping between narrow files names and files is also
+implemenation defined.</p>
+
+<p><i>[Lillehammer: Moved back to "open" status, at Beman's urging.
+(1) Why just basic_filebuf, instead of also basic_fstream (and
+possibly other things too). (2) Why not also constructors that take
+std::basic_string? (3) We might want to wait until we see Beman's
+filesystem library; we might decide that it obviates this.]</i></p>
+
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="458"></a>458. 24.1.5 contains unintented limitation for operator-</h3>
+<p><b>Section:</b> 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-02-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#random.access.iterators">issues</a> in [random.access.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 24.1.5 [lib.random.access.iterators], table 76 the operational
+semantics for the expression "r -= n" are defined as "return r += -n".
+This means, that the expression -n must be valid, which is not the case
+for unsigned types.
+</p>
+
+<p><i>[
+Sydney: Possibly not a real problem, since difference type is required
+to be a signed integer type. However, the wording in the standard may
+be less clear than we would like.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+To remove this limitation, I suggest to change the
+operational semantics for this column to:
+</p>
+<blockquote><pre> { Distance m = n;
+ if (m &gt;= 0)
+ while (m--) --r;
+ else
+ while (m++) ++r;
+ return r; }
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="459"></a>459. Requirement for widening in stage 2 is overspecification</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-03-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>When parsing strings of wide-character digits, the standard
+ requires the library to widen narrow-character "atoms" and compare
+ the widened atoms against the characters that are being parsed.
+ Simply narrowing the wide characters would be far simpler, and
+ probably more efficient. The two choices are equivalent except in
+ convoluted test cases, and many implementations already ignore the
+ standard and use narrow instead of widen.</p>
+
+<p>
+First, I disagree that using narrow() instead of widen() would
+necessarily have unfortunate performance implications. A possible
+implementation of narrow() that allows num_get to be implemented
+in a much simpler and arguably comparably efficient way as calling
+widen() allows, i.e. without making a virtual call to do_narrow every
+time, is as follows:
+</p>
+
+<pre> inline char ctype&lt;wchar_t&gt;::narrow (wchar_t wc, char dflt) const
+ {
+ const unsigned wi = unsigned (wc);
+
+ if (wi &gt; UCHAR_MAX)
+ return typeid (*this) == typeid (ctype&lt;wchar_t&gt;) ?
+ dflt : do_narrow (wc, dflt);
+
+ if (narrow_ [wi] &lt; 0) {
+ const char nc = do_narrow (wc, dflt);
+ if (nc == dflt)
+ return dflt;
+ narrow_ [wi] = nc;
+ }
+
+ return char (narrow_ [wi]);
+ }
+</pre>
+
+<p>
+Second, I don't think the change proposed in the issue (i.e., to use
+narrow() instead of widen() during Stage 2) would be at all
+drastic. Existing implementations with the exception of libstdc++
+currently already use narrow() so the impact of the change on programs
+would presumably be isolated to just a single implementation. Further,
+since narrow() is not required to translate alternate wide digit
+representations such as those mentioned in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a>
+to
+their narrow equivalents (i.e., the portable source characters '0'
+through '9'), the change does not necessarily imply that these
+alternate digits would be treated as ordinary digits and accepted as
+part of numbers during parsing. In fact, the requirement in 22.2.1.1.2
+[locale.ctype.virtuals], p13 forbids narrow() to translate an alternate
+digit character, wc, to an ordinary digit in the basic source
+character set unless the expression
+(ctype&lt;charT&gt;::is(ctype_base::digit, wc) == true) holds. This in
+turn is prohibited by the C standard (7.25.2.1.5, 7.25.2.1.5, and
+5.2.1, respectively) for charT of either char or wchar_t.
+</p>
+
+<p><i>[Sydney: To a large extent this is a nonproblem. As long as
+you're only trafficking in char and wchar_t we're only dealing with a
+stable character set, so you don't really need either 'widen' or
+'narrow': can just use literals. Finally, it's not even clear whether
+widen-vs-narrow is the right question; arguably we should be using
+codecvt instead.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change stage 2 so that implementations are permitted to use either
+technique to perform the comparison:</p>
+<ol>
+ <li> call widen on the atoms and compare (either by using
+ operator== or char_traits&lt;charT&gt;::eq) the input with
+ the widened atoms, or</li>
+ <li> call narrow on the input and compare the narrow input
+ with the atoms</li>
+ <li> do (1) or (2) only if charT is not char or wchar_t,
+ respectively; i.e., avoid calling widen or narrow
+ if it the source and destination types are the same</li>
+</ol>
+
+
+
+
+
+<hr>
+<h3><a name="462"></a>462. Destroying objects with static storage duration</h3>
+<p><b>Section:</b> 3.6.3 [basic.start.term], 18.3 [cstdint] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+3.6.3 Termination spells out in detail the interleaving of static
+destructor calls and calls to functions registered with atexit. To
+match this behavior requires intimate cooperation between the code
+that calls destructors and the exit/atexit machinery. The former
+is tied tightly to the compiler; the latter is a primitive mechanism
+inherited from C that traditionally has nothing to do with static
+construction and destruction. The benefits of intermixing destructor
+calls with atexit handler calls is questionable at best, and <i>very</i>
+difficult to get right, particularly when mixing third-party C++
+libraries with different third-party C++ compilers and C libraries
+supplied by still other parties.
+</p>
+
+<p>
+I believe the right thing to do is defer all static destruction
+until after all atexit handlers are called. This is a change in
+behavior, but one that is likely visible only to perverse test
+suites. At the very least, we should <i>permit</i> deferred destruction
+even if we don't require it.
+</p>
+
+<p><i>[If this is to be changed, it should probably be changed by CWG.
+ At this point, however, the LWG is leaning toward NAD. Implementing
+ what the standard says is hard work, but it's not impossible and
+ most vendors went through that pain years ago. Changing this
+ behavior would be a user-visible change, and would break at least
+ one real application.]</i></p>
+
+
+<p><i>[
+Batavia: Send to core with our recommendation that we should permit deferred
+destruction but not require it.
+]</i></p>
+
+
+<p><i>[
+Howard: The course of action recommended in Batavia would undo LWG
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a> and break current code implementing the "phoenix
+singleton". Search the net for "phoenix singleton atexit" to get a feel
+for the size of the adverse impact this change would have. Below is
+sample code which implements the phoenix singleton and would break if
+<tt>atexit</tt> is changed in this way:
+]</i></p>
+
+
+<blockquote><pre>#include &lt;cstdlib&gt;
+#include &lt;iostream&gt;
+#include &lt;type_traits&gt;
+#include &lt;new&gt;
+
+class A
+{
+ bool alive_;
+ A(const A&amp;);
+ A&amp; operator=(const A&amp;);
+public:
+ A() : alive_(true) {std::cout &lt;&lt; "A()\n";}
+ ~A() {alive_ = false; std::cout &lt;&lt; "~A()\n";}
+ void use()
+ {
+ if (alive_)
+ std::cout &lt;&lt; "A is alive\n";
+ else
+ std::cout &lt;&lt; "A is dead\n";
+ }
+};
+
+void deallocate_resource();
+
+// This is the phoenix singleton pattern
+A&amp; get_resource(bool create = true)
+{
+ static std::aligned_storage&lt;sizeof(A), std::alignment_of&lt;A&gt;::value&gt;::type buf;
+ static A* a;
+ if (create)
+ {
+ if (a != (A*)&amp;buf)
+ {
+ a = ::new (&amp;buf) A;
+ std::atexit(deallocate_resource);
+ }
+ }
+ else
+ {
+ a-&gt;~A();
+ a = (A*)&amp;buf + 1;
+ }
+ return *a;
+}
+
+void deallocate_resource()
+{
+ get_resource(false);
+}
+
+void use_A(const char* message)
+{
+ A&amp; a = get_resource();
+ std::cout &lt;&lt; "Using A " &lt;&lt; message &lt;&lt; "\n";
+ a.use();
+}
+
+struct B
+{
+ ~B() {use_A("from ~B()");}
+};
+
+B b;
+
+int main()
+{
+ use_A("from main()");
+}
+</pre></blockquote>
+
+<p>
+The correct output is:
+</p>
+
+<blockquote><pre>A()
+Using A from main()
+A is alive
+~A()
+A()
+Using A from ~B()
+A is alive
+~A()
+</pre></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="471"></a>471. result of what() implementation-defined</h3>
+<p><b>Section:</b> 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#type.info">issues</a> in [type.info].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>[lib.exception] specifies the following:</p>
+<pre> exception (const exception&amp;) throw();
+ exception&amp; operator= (const exception&amp;) throw();
+
+ -4- Effects: Copies an exception object.
+ -5- Notes: The effects of calling what() after assignment
+ are implementation-defined.
+</pre>
+
+<p>
+First, does the Note only apply to the assignment operator? If so,
+what are the effects of calling what() on a copy of an object? Is
+the returned pointer supposed to point to an identical copy of
+the NTBS returned by what() called on the original object or not?
+</p>
+
+<p>
+Second, is this Note intended to extend to all the derived classes
+in section 19? I.e., does the standard provide any guarantee for
+the effects of what() called on a copy of any of the derived class
+described in section 19?
+</p>
+
+<p>
+Finally, if the answer to the first question is no, I believe it
+constitutes a defect since throwing an exception object typically
+implies invoking the copy ctor on the object. If the answer is yes,
+then I believe the standard ought to be clarified to spell out
+exactly what the effects are on the copy (i.e., after the copy
+ctor was called).
+</p>
+
+<p><i>[Redmond: Yes, this is fuzzy. The issue of derived classes is
+ fuzzy too.]</i></p>
+
+
+<p><i>[
+Batavia: Howard provided wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 18.7.1 [exception] to:
+</p>
+
+<blockquote>
+<pre>exception(const exception&amp; <ins><i>e</i></ins>) throw();
+exception&amp; operator=(const exception&amp; <ins><i>e</i></ins>) throw();</pre>
+<blockquote>
+<p>
+-4- <i>Effects:</i> Copies an exception object.
+</p>
+<p>
+<del> -5- <i>Remarks:</i> The effects of calling what() after assignment are implementation-defined.</del>
+</p>
+<p>
+<ins>-5- <i>Throws:</i> Nothing. This also applies
+to all standard library-defined classes that derive from <tt>exception</tt>.</ins>
+</p>
+<p>
+<ins>-7- <i>Postcondition:</i> <tt>strcmp(what(), <i>e</i>.what()) == 0</tt>. This also applies
+to all standard library-defined classes that derive from <tt>exception</tt>.</ins>
+</p>
+
+</blockquote>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="473"></a>473. underspecified ctype calls</h3>
+<p><b>Section:</b> 22.2.1.1 [locale.ctype] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-07-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Most ctype member functions come in two forms: one that operates
+on a single character at a time and another form that operates
+on a range of characters. Both forms are typically described by
+a single Effects and/or Returns clause.
+</p>
+<p>
+The Returns clause of each of the single-character non-virtual forms
+suggests that the function calls the corresponding single character
+virtual function, and that the array form calls the corresponding
+virtual array form. Neither of the two forms of each virtual member
+function is required to be implemented in terms of the other.
+</p>
+<p>
+There are three problems:
+</p>
+<p>
+1. One is that while the standard does suggest that each non-virtual
+member function calls the corresponding form of the virtual function,
+it doesn't actually explicitly require it.
+</p>
+<p>
+Implementations that cache results from some of the virtual member
+functions for some or all values of their arguments might want to
+call the array form from the non-array form the first time to fill
+the cache and avoid any or most subsequent virtual calls. Programs
+that rely on each form of the virtual function being called from
+the corresponding non-virtual function will see unexpected behavior
+when using such implementations.
+</p>
+<p>
+2. The second problem is that either form of each of the virtual
+functions can be overridden by a user-defined function in a derived
+class to return a value that is different from the one produced by
+the virtual function of the alternate form that has not been
+overriden.
+</p>
+<p>
+Thus, it might be possible for, say, ctype::widen(c) to return one
+value, while for ctype::widen(&amp;c, &amp;c + 1, &amp;wc) to set
+wc to another value. This is almost certainly not intended. Both
+forms of every function should be required to return the same result
+for the same character, otherwise the same program using an
+implementation that calls one form of the functions will behave
+differently than when using another implementation that calls the
+other form of the function "under the hood."
+</p>
+<p>
+3. The last problem is that the standard text fails to specify whether
+one form of any of the virtual functions is permitted to be implemented
+in terms of the other form or not, and if so, whether it is required
+or permitted to call the overridden virtual function or not.
+</p>
+<p>
+Thus, a program that overrides one of the virtual functions so that
+it calls the other form which then calls the base member might end
+up in an infinite loop if the called form of the base implementation
+of the function in turn calls the other form.
+</p>
+<p>
+Lillehammer: Part of this isn't a real problem. We already talk about
+caching. 22.1.1/6 But part is a real problem. ctype virtuals may call
+each other, so users don't know which ones to override to avoid avoid
+infinite loops.</p>
+
+<p>This is a problem for all facet virtuals, not just ctype virtuals,
+so we probably want a blanket statement in clause 22 for all
+facets. The LWG is leaning toward a blanket prohibition, that a
+facet's virtuals may never call each other. We might want to do that
+in clause 27 too, for that matter. A review is necessary. Bill will
+provide wording.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+<hr>
+<h3><a name="484"></a>484. Convertible to T</h3>
+<p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-09-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>From comp.std.c++:</p>
+
+<p>
+I note that given an input iterator a for type T,
+then *a only has to be "convertable to T", not actually of type T.
+</p>
+
+<p>Firstly, I can't seem to find an exact definition of "convertable to T".
+While I assume it is the obvious definition (an implicit conversion), I
+can't find an exact definition. Is there one?</p>
+
+<p>Slightly more worryingly, there doesn't seem to be any restriction on
+the this type, other than it is "convertable to T". Consider two input
+iterators a and b. I would personally assume that most people would
+expect *a==*b would perform T(*a)==T(*b), however it doesn't seem that
+the standard requires that, and that whatever type *a is (call it U)
+could have == defined on it with totally different symantics and still
+be a valid inputer iterator.</p>
+
+<p>Is this a correct reading? When using input iterators should I write
+T(*a) all over the place to be sure that the object i'm using is the
+class I expect?</p>
+
+<p>This is especially a nuisance for operations that are defined to be
+ "convertible to bool". (This is probably allowed so that
+ implementations could return say an int and avoid an unnessary
+ conversion. However all implementations I have seen simply return a
+ bool anyway. Typical implemtations of STL algorithms just write
+ things like <tt>while(a!=b &amp;&amp; *a!=0)</tt>. But strictly
+ speaking, there are lots of types that are convertible to T but
+ that also overload the appropriate operators so this doesn't behave
+ as expected.</p>
+
+<p>If we want to make code like this legal (which most people seem to
+ expect), then we'll need to tighten up what we mean by "convertible
+ to T".</p>
+
+<p><i>[Lillehammer: The first part is NAD, since "convertible" is
+ well-defined in core. The second part is basically about pathological
+ overloads. It's a minor problem but a real one. So leave open for
+ now, hope we solve it as part of iterator redesign.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="485"></a>485. output iterator insufficently constrained</h3>
+<p><b>Section:</b> 24.1.2 [output.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-10-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#output.iterators">issues</a> in [output.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The note on 24.1.2 Output iterators insufficently limits what can be
+performed on output iterators. While it requires that each iterator is
+progressed through only once and that each iterator is written to only
+once, it does not require the following things:</p>
+
+<p>Note: Here it is assumed that x is an output iterator of type X which
+has not yet been assigned to.</p>
+
+<p>a) That each value of the output iterator is written to:
+The standard allows:
+++x; ++x; ++x;
+</p>
+
+<p>
+b) That assignments to the output iterator are made in order
+X a(x); ++a; *a=1; *x=2; is allowed
+</p>
+
+<p>
+c) Chains of output iterators cannot be constructed:
+X a(x); ++a; X b(a); ++b; X c(b); ++c; is allowed, and under the current
+wording (I believe) x,a,b,c could be written to in any order.
+</p>
+
+<p>I do not believe this was the intension of the standard?</p>
+<p><i>[Lillehammer: Real issue. There are lots of constraints we
+ intended but didn't specify. Should be solved as part of iterator
+ redesign.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="492"></a>492. Invalid iterator arithmetic expressions</h3>
+<p><b>Section:</b> 23 [containers], 24 [iterators], 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Various clauses other than clause 25 make use of iterator arithmetic not
+supported by the iterator category in question.
+Algorithms in clause 25 are exceptional because of 25 [lib.algorithms],
+paragraph 9, but this paragraph does not provide semantics to the
+expression "iterator - n", where n denotes a value of a distance type
+between iterators.</p>
+
+<p>1) Examples of current wording:</p>
+
+<p>Current wording outside clause 25:</p>
+
+<p>
+23.2.2.4 [lib.list.ops], paragraphs 19-21: "first + 1", "(i - 1)",
+"(last - first)"
+23.3.1.1 [lib.map.cons], paragraph 4: "last - first"
+23.3.2.1 [lib.multimap.cons], paragraph 4: "last - first"
+23.3.3.1 [lib.set.cons], paragraph 4: "last - first"
+23.3.4.1 [lib.multiset.cons], paragraph 4: "last - first"
+24.4.1 [lib.reverse.iterators], paragraph 1: "(i - 1)"
+</p>
+
+<p>
+[Important note: The list is not complete, just an illustration. The
+same issue might well apply to other paragraphs not listed here.]</p>
+
+<p>None of these expressions is valid for the corresponding iterator
+category.</p>
+
+<p>Current wording in clause 25:</p>
+
+<p>
+25.1.1 [lib.alg.foreach], paragraph 1: "last - 1"
+25.1.3 [lib.alg.find.end], paragraph 2: "[first1, last1 -
+(last2-first2))"
+25.2.8 [lib.alg.unique], paragraph 1: "(i - 1)"
+25.2.8 [lib.alg.unique], paragraph 5: "(i - 1)"
+</p>
+
+<p>
+However, current wording of 25 [lib.algorithms], paragraph 9 covers
+neither of these four cases:</p>
+
+<p>Current wording of 25 [lib.algorithms], paragraph 9:</p>
+
+<p>
+"In the description of the algorithms operator + and - are used for some
+of the iterator categories for which they do not have to be defined. In
+these cases the semantics of a+n is the same as that of</p>
+<pre>{X tmp = a;
+advance(tmp, n);
+return tmp;
+}
+</pre>
+<p>and that of b-a is the same as of return distance(a, b)"</p>
+
+<p>
+This paragrpah does not take the expression "iterator - n" into account,
+where n denotes a value of a distance type between two iterators [Note:
+According to current wording, the expression "iterator - n" would be
+resolved as equivalent to "return distance(n, iterator)"]. Even if the
+expression "iterator - n" were to be reinterpreted as equivalent to
+"iterator + -n" [Note: This would imply that "a" and "b" were
+interpreted implicitly as values of iterator types, and "n" as value of
+a distance type], then 24.3.4/2 interfers because it says: "Requires: n
+may be negative only for random access and bidirectional iterators.",
+and none of the paragraphs quoted above requires the iterators on which
+the algorithms operate to be of random access or bidirectional category.
+</p>
+
+<p>2) Description of intended behavior:</p>
+
+<p>
+For the rest of this Defect Report, it is assumed that the expression
+"iterator1 + n" and "iterator1 - iterator2" has the semantics as
+described in current 25 [lib.algorithms], paragraph 9, but applying to
+all clauses. The expression "iterator1 - n" is equivalent to an
+result-iterator for which the expression "result-iterator + n" yields an
+iterator denoting the same position as iterator1 does. The terms
+"iterator1", "iterator2" and "result-iterator" shall denote the value of
+an iterator type, and the term "n" shall denote a value of a distance
+type between two iterators.</p>
+
+<p>
+All implementations known to the author of this Defect Report comply
+with these assumptions.
+No impact on current code is expected.</p>
+
+<p>3) Proposed fixes:</p>
+
+
+<p>Change 25 [lib.algorithms], paragraph 9 to:</p>
+
+<p>
+"In the description of the algorithms operator + and - are used for some
+of the iterator categories for which they do not have to be defined. In
+this paragraph, a and b denote values of an iterator type, and n denotes
+a value of a distance type between two iterators. In these cases the
+semantics of a+n is the same as that of</p>
+<pre>{X tmp = a;
+advance(tmp, n);
+return tmp;
+}
+</pre>
+<p>,the semantics of a-n denotes the value of an iterator i for which the
+following condition holds:
+advance(i, n) == a,
+and that of b-a is the same as of
+return distance(a, b)".
+</p>
+
+<p>Comments to the new wording:</p>
+
+<p>
+a) The wording " In this paragraph, a and b denote values of an iterator
+type, and n denotes a value of a distance type between two iterators."
+was added so the expressions "b-a" and "a-n" are distinguished regarding
+the types of the values on which they operate.
+b) The wording ",the semantics of a-n denotes the value of an iterator i
+for which the following condition holds: advance(i, n) == a" was added
+to cover the expression 'iterator - n'. The wording "advance(i, n) == a"
+was used to avoid a dependency on the semantics of a+n, as the wording
+"i + n == a" would have implied. However, such a dependency might well
+be deserved.
+c) DR 225 is not considered in the new wording.
+</p>
+
+<p>
+Proposed fixes regarding invalid iterator arithmetic expressions outside
+clause 25:</p>
+
+<p>
+Either
+a) Move modified 25 [lib.algorithms], paragraph 9 (as proposed above)
+before any current invalid iterator arithmetic expression. In that case,
+the first sentence of 25 [lib.algorithms], paragraph 9, need also to be
+modified and could read: "For the rest of this International Standard,
+...." / "In the description of the following clauses including this
+...." / "In the description of the text below ..." etc. - anyways
+substituting the wording "algorithms", which is a straight reference to
+clause 25.
+In that case, 25 [lib.algorithms] paragraph 9 will certainly become
+obsolete.
+Alternatively,
+b) Add an appropiate paragraph similar to resolved 25 [lib.algorithms],
+paragraph 9, to the beginning of each clause containing invalid iterator
+arithmetic expressions.
+Alternatively,
+c) Fix each paragraph (both current wording and possible resolutions of
+DRs) containing invalid iterator arithmetic expressions separately.
+</p>
+
+<p>5) References to other DRs:</p>
+
+<p>
+See DR 225.
+See DR 237. The resolution could then also read "Linear in last -
+first".
+</p>
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>[Lillehammer: Minor issue, but real. We have a blanket statement
+about this in 25/11. But (a) it should be in 17, not 25; and (b) it's
+not quite broad enough, because there are some arithmetic expressions
+it doesn't cover. Bill will provide wording.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="498"></a>498. Requirements for partition() and stable_partition() too strong</h3>
+<p><b>Section:</b> 25.2.13 [alg.partitions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Sean Parent, Joe Gottman <b>Date:</b> 2005-05-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Problem:
+The iterator requirements for partition() and stable_partition() [25.2.12]
+are listed as BidirectionalIterator, however, there are efficient algorithms
+for these functions that only require ForwardIterator that have been known
+since before the standard existed. The SGI implementation includes these (see
+<a href="http://www.sgi.com/tech/stl/partition.html">http://www.sgi.com/tech/stl/partition.html</a>
+and
+<a href="http://www.sgi.com/tech/stl/stable_partition.html">http://www.sgi.com/tech/stl/stable_partition.html</a>).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 25.2.12 from </p>
+<blockquote><pre>template&lt;class BidirectionalIterator, class Predicate&gt;
+BidirectionalIterator partition(BidirectionalIterato r first,
+ BidirectionalIterator last,
+ Predicate pred);
+</pre></blockquote>
+<p>to </p>
+<blockquote><pre>template&lt;class ForwardIterator, class Predicate&gt;
+ForwardIterator partition(ForwardIterator first,
+ ForwardIterator last,
+ Predicate pred);
+</pre></blockquote>
+<p>Change the complexity from </p>
+
+<blockquote><p>
+At most (last - first)/2 swaps are done. Exactly (last - first)
+applications of the predicate are done.
+</p></blockquote>
+
+<p>to </p>
+
+<blockquote><p>
+If ForwardIterator is a bidirectional_iterator, at most (last - first)/2
+swaps are done; otherwise at most (last - first) swaps are done. Exactly
+(last - first) applications of the predicate are done.
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Partition is a "foundation" algorithm useful in many contexts (like sorting
+as just one example) - my motivation for extending it to include forward
+iterators is slist - without this extension you can't partition an slist
+(without writing your own partition). Holes like this in the standard
+library weaken the argument for generic programming (ideally I'd be able
+to provide a library that would refine std::partition() to other concepts
+without fear of conflicting with other libraries doing the same - but
+that is a digression). I consider the fact that partition isn't defined
+to work for ForwardIterator a minor embarrassment.
+</p>
+
+<p><i>[Mont Tremblant: Moved to Open, request motivation and use cases
+by next meeting. Sean provided further rationale by post-meeting
+mailing.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="502"></a>502. Proposition: Clarification of the interaction between a facet and an iterator</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Christopher Conrade Zseleghovski <b>Date:</b> 2005-06-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Motivation:
+</p>
+
+<p>
+This requirement seems obvious to me, it is the essence of code modularity.
+I have complained to Mr. Plauger that the Dinkumware library does not
+observe this principle but he objected that this behaviour is not covered in
+the standard.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Append the following point to 22.1.1.1.1:
+</p>
+
+<p>
+6. The implementation of a facet of Table 52 parametrized with an
+InputIterator/OutputIterator should use that iterator only as character
+source/sink respectively.
+For a *_get facet, it means that the value received depends only on the
+sequence of input characters and not on how they are accessed.
+For a *_put facet, it means that the sequence of characters output depends
+only on the value to be formatted and not of how the characters are stored.
+</p>
+
+<p><i>[
+Berlin: Moved to Open, Need to clean up this area to make it clear
+locales don't have to contain open ended sets of facets. Jack, Howard,
+Bill.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="503"></a>503. more on locales</h3>
+<p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2005-06-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+a) In 22.2.1.1 para. 2 we refer to "the instantiations required in Table
+51" to refer to the facet *objects* associated with a locale. And we
+almost certainly mean just those associated with the default or "C"
+locale. Otherwise, you can't switch to a locale that enforces a different
+mapping between narrow and wide characters, or that defines additional
+uppercase characters.
+</p>
+
+<p>
+b) 22.2.1.5 para. 3 (codecvt) has the same issues.
+</p>
+
+<p>
+c) 22.2.1.5.2 (do_unshift) is even worse. It *forbids* the generation of
+a homing sequence for the basic character set, which might very well need
+one.
+</p>
+
+<p>
+d) 22.2.1.5.2 (do_length) likewise dictates that the default mapping
+between wide and narrow characters be taken as one-for-one.
+</p>
+
+<p>
+e) 22.2.2 para. 2 (num_get/put) is both muddled and vacuous, as far as
+I can tell. The muddle is, as before, calling Table 51 a list of
+instantiations. But the constraint it applies seems to me to cover
+*all* defined uses of num_get/put, so why bother to say so?
+</p>
+
+<p>
+f) 22.2.3.1.2 para. 1(do_decimal_point) says "The required instantiations
+return '.' or L'.'.) Presumably this means "as appropriate for the
+character type. But given the vague definition of "required" earlier,
+this overrules *any* change of decimal point for non "C" locales.
+Surely we don't want to do that.
+</p>
+
+<p>
+g) 22.2.3.1.2 para. 2 (do_thousands_sep) says "The required instantiations
+return ',' or L','.) As above, this probably means "as appropriate for the
+character type. But this overrules the "C" locale, which requires *no*
+character ('\0') for the thousands separator. Even if we agree that we
+don't mean to block changes in decimal point or thousands separator,
+we should also eliminate this clear incompatibility with C.
+</p>
+
+<p>
+h) 22.2.3.1.2 para. 2 (do_grouping) says "The required instantiations
+return the empty string, indicating no grouping." Same considerations
+as for do_decimal_point.
+</p>
+
+<p>
+i) 22.2.4.1 para. 1 (collate) refers to "instantiations required in Table
+51". Same bad jargon.
+</p>
+
+<p>
+j) 22.2.4.1.2 para. 1 (do_compare) refers to "instantiations required
+in Table 51". Same bad jargon.
+</p>
+
+<p>
+k) 22.2.5 para. 1 (time_get/put) uses the same muddled and vacuous
+as num_get/put.
+</p>
+
+<p>
+l) 22.2.6 para. 2 (money_get/put) uses the same muddled and vacuous
+as num_get/put.
+</p>
+
+<p>
+m) 22.2.6.3.2 (do_pos/neg_format) says "The instantiations required
+in Table 51 ... return an object of type pattern initialized to
+{symbol, sign, none, value}." This once again *overrides* the "C"
+locale, as well as any other locale."
+</p>
+
+<p>
+3) We constrain the use_facet calls that can be made by num_get/put,
+so why don't we do the same for money_get/put? Or for any of the
+other facets, for that matter?
+</p>
+
+<p>
+4) As an almost aside, we spell out when a facet needs to use the ctype
+facet, but several also need to use a codecvt facet and we don't say so.
+</p>
+<p><i>[
+Berlin: Bill to provide wording.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="518"></a>518. Are insert and erase stable for unordered_multiset and unordered_multimap?</h3>
+<p><b>Section:</b> 23.1.3 [unord.req], TR1 6.3.1 [tr.unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2005-07-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord.req">active issues</a> in [unord.req].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord.req">issues</a> in [unord.req].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Issue 371 deals with stability of multiset/multimap under insert and erase
+(i.e. do they preserve the relative order in ranges of equal elements).
+The same issue applies to unordered_multiset and unordered_multimap.
+</p>
+<p><i>[
+Moved to open (from review): There is no resolution.
+]</i></p>
+
+
+<p><i>[
+Toronto: We have a resolution now. Moved to Review. Some concern was noted
+as to whether this conflicted with existing practice or not. An additional
+concern was in specifying (partial) ordering for an unordered container.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Wording for the proposed resolution is taken from the equivalent text for associative containers.
+</p>
+
+<p>
+Change 23.1.3 [unord.req], Unordered associative containers, paragraph 6 to:
+</p>
+
+<blockquote><p>
+An unordered associative container supports <i>unique</i> keys if it may
+contain at most one element for each key. Otherwise, it supports <i>equivalent
+keys</i>. <tt>unordered_set</tt> and <tt>unordered_map</tt> support
+unique keys. <tt>unordered_multiset</tt> and <tt>unordered_multimap</tt>
+support equivalent keys. In containers that support equivalent keys, elements
+with equivalent keys are adjacent to each other. <ins>For
+<tt>unordered_multiset</tt>
+and <tt>unordered_multimap</tt>,<tt> insert</tt> and <tt>erase</tt>
+preserve the relative ordering of equivalent elements.</ins>
+</p></blockquote>
+
+<p>
+Change 23.1.3 [unord.req], Unordered associative containers, paragraph 8 to:
+</p>
+
+<blockquote>
+<p>The elements of an unordered associative container are organized into <i>
+buckets</i>. Keys with the same hash code appear in the same bucket. The number
+of buckets is automatically increased as elements are added to an unordered
+associative container, so that the average number of elements per bucket is kept
+below a bound. Rehashing invalidates iterators, changes ordering between
+elements, and changes which buckets elements appear in, but does not invalidate
+pointers or references to elements. <ins>For <tt>unordered_multiset</tt>
+and <tt>unordered_multimap</tt>, rehashing
+preserves the relative ordering of equivalent elements.</ins></p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="522"></a>522. Tuple doesn't define swap</h3>
+<p><b>Section:</b> 20.3 [tuple], TR1 6.1 [tr.tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Andy Koenig <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Tuple doesn't define swap(). It should.
+</p>
+<p><i>[
+Berlin: Doug to provide wording.
+]</i></p>
+
+<p><i>[
+Batavia: Howard to provide wording.
+]</i></p>
+
+<p><i>[
+Toronto: Howard to provide wording (really this time).
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="523"></a>523. regex case-insensitive character ranges are unimplementable as specified</h3>
+<p><b>Section:</b> 28 [re] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Eric Niebler <b>Date:</b> 2005-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re">issues</a> in [re].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A problem with TR1 regex is currently being discussed on the Boost
+developers list. It involves the handling of case-insensitive matching
+of character ranges such as [Z-a]. The proper behavior (according to the
+ECMAScript standard) is unimplementable given the current specification
+of the TR1 regex_traits&lt;&gt; class template. John Maddock, the author of
+the TR1 regex proposal, agrees there is a problem. The full discussion
+can be found at http://lists.boost.org/boost/2005/06/28850.php (first
+message copied below). We don't have any recommendations as yet.
+</p>
+<p>
+-- Begin original message --
+</p>
+<p>
+The situation of interest is described in the ECMAScript specification
+(ECMA-262), section 15.10.2.15:
+</p>
+<p>
+"Even if the pattern ignores case, the case of the two ends of a range
+is significant in determining which characters belong to the range.
+Thus, for example, the pattern /[E-F]/i matches only the letters E, F,
+e, and f, while the pattern /[E-f]/i matches all upper and lower-case
+ASCII letters as well as the symbols [, \, ], ^, _, and `."
+</p>
+<p>
+A more interesting case is what should happen when doing a
+case-insentitive match on a range such as [Z-a]. It should match z, Z,
+a, A and the symbols [, \, ], ^, _, and `. This is not what happens with
+Boost.Regex (it throws an exception from the regex constructor).
+</p>
+<p>
+The tough pill to swallow is that, given the specification in TR1, I
+don't think there is any effective way to handle this situation.
+According to the spec, case-insensitivity is handled with
+regex_traits&lt;&gt;::translate_nocase(CharT) -- two characters are equivalent
+if they compare equal after both are sent through the translate_nocase
+function. But I don't see any way of using this translation function to
+make character ranges case-insensitive. Consider the difficulty of
+detecting whether "z" is in the range [Z-a]. Applying the transformation
+to "z" has no effect (it is essentially std::tolower). And we're not
+allowed to apply the transformation to the ends of the range, because as
+ECMA-262 says, "the case of the two ends of a range is significant."
+</p>
+<p>
+So AFAICT, TR1 regex is just broken, as is Boost.Regex. One possible fix
+is to redefine translate_nocase to return a string_type containing all
+the characters that should compare equal to the specified character. But
+this function is hard to implement for Unicode, and it doesn't play nice
+with the existing ctype facet. What a mess!
+</p>
+<p>
+-- End original message --
+</p>
+
+<p><i>[
+John Maddock adds:
+]</i></p>
+
+
+<p>
+One small correction, I have since found that ICU's regex package does
+implement this correctly, using a similar mechanism to the current
+TR1.Regex.
+</p>
+<p>
+Given an expression [c1-c2] that is compiled as case insensitive it:
+</p>
+<p>
+Enumerates every character in the range c1 to c2 and converts it to it's
+case folded equivalent. That case folded character is then used a key to a
+table of equivalence classes, and each member of the class is added to the
+list of possible matches supported by the character-class. This second step
+isn't possible with our current traits class design, but isn't necessary if
+the input text is also converted to a case-folded equivalent on the fly.
+</p>
+<p>
+ICU applies similar brute force mechanisms to character classes such as
+[[:lower:]] and [[:word:]], however these are at least cached, so the impact
+is less noticeable in this case.
+</p>
+<p>
+Quick and dirty performance comparisons show that expressions such as
+"[X-\\x{fff0}]+" are indeed very slow to compile with ICU (about 200 times
+slower than a "normal" expression). For an application that uses a lot of
+regexes this could have a noticeable performance impact. ICU also has an
+advantage in that it knows the range of valid characters codes: code points
+outside that range are assumed not to require enumeration, as they can not
+be part of any equivalence class. I presume that if we want the TR1.Regex
+to work with arbitrarily large character sets enumeration really does become
+impractical.
+</p>
+<p>
+Finally note that Unicode has:
+</p>
+<p>
+Three cases (upper, lower and title).
+One to many, and many to one case transformations.
+Character that have context sensitive case translations - for example an
+uppercase sigma has two different lowercase forms - the form chosen depends
+on context(is it end of a word or not), a caseless match for an upper case
+sigma should match either of the lower case forms, which is why case folding
+is often approximated by tolower(toupper(c)).
+</p>
+<p>
+Probably we need some way to enumerate character equivalence classes,
+including digraphs (either as a result or an input), and some way to tell
+whether the next character pair is a valid digraph in the current locale.
+</p>
+<p>
+Hoping this doesn't make this even more complex that it was already,
+</p>
+
+<p><i>[
+Portland: Alisdair: Detect as invalid, throw an exception.
+Pete: Possible general problem with case insensitive ranges.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="527"></a>527. tr1::bind has lost its Throws clause</h3>
+<p><b>Section:</b> 20.5.11.1.3 [func.bind.bind], TR1 3.6.3 [tr.func.bind.bind] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2005-10-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The original bind proposal gives the guarantee that tr1::bind(f, t1,
+..., tN) does not throw when the copy constructors of f, t1, ..., tN
+don't.
+</p>
+
+<p>
+This guarantee is not present in the final version of TR1.
+</p>
+
+<p>
+I'm pretty certain that we never removed it on purpose. Editorial omission? :-)
+</p>
+
+<p><i>[
+Berlin: not quite editorial, needs proposed wording.
+]</i></p>
+
+<p><i>[
+Batavia: Doug to translate wording to variadic templates.
+]</i></p>
+
+
+<p><i>[
+Toronto: We agree but aren't quite happy with the wording. The "t"'s no
+longer refer to anything. Alan to provide improved wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.5.10.1.3 [lib.func.bind.bind] ([tr.func.bind.bind]), add a new paragraph after p2:
+</p>
+<blockquote><p>
+<i>Throws:</i> Nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt>
+throws an exception.
+</p></blockquote>
+
+<p>
+Add a new paragraph after p4:
+</p>
+<blockquote><p>
+<i>Throws:</i> nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt>
+throws an exception.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="529"></a>529. The standard encourages redundant and confusing preconditions</h3>
+<p><b>Section:</b> 17.4.3.8 [res.on.required] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-10-25</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+17.4.3.8/1 says:
+</p>
+
+<blockquote><p>
+Violation of the preconditions specified in a function's
+Required behavior: paragraph results in undefined behavior unless the
+function's Throws: paragraph specifies throwing an exception when the
+precondition is violated.
+</p></blockquote>
+
+<p>
+This implies that a precondition violation can lead to defined
+behavior. That conflicts with the only reasonable definition of
+precondition: that a violation leads to undefined behavior. Any other
+definition muddies the waters when it comes to analyzing program
+correctness, because precondition violations may be routinely done in
+correct code (e.g. you can use std::vector::at with the full
+expectation that you'll get an exception when your index is out of
+range, catch the exception, and continue). Not only is it a bad
+example to set, but it encourages needless complication and redundancy
+in the standard. For example:
+</p>
+
+<blockquote><pre> 21 Strings library
+ 21.3.3 basic_string capacity
+
+ void resize(size_type n, charT c);
+
+ 5 Requires: n &lt;= max_size()
+ 6 Throws: length_error if n &gt; max_size().
+ 7 Effects: Alters the length of the string designated by *this as follows:
+</pre></blockquote>
+
+<p>
+The Requires clause is entirely redundant and can be dropped. We
+could make that simplifying change (and many others like it) even
+without changing 17.4.3.8/1; the wording there just seems to encourage
+the redundant and error-prone Requires: clause.
+</p>
+
+<p><i>[
+Batavia: Alan and Pete to work.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1. Change 17.4.3.8/1 to read:
+</p>
+
+<blockquote><p>
+Violation of the preconditions specified in a function's
+<i>Required behavior:</i> paragraph results in undefined behavior
+<del>unless the function's <i>Throws:</i> paragraph specifies throwing
+an exception when the precondition is violated</del>.
+</p></blockquote>
+
+<p>
+2. Go through and remove redundant Requires: clauses. Specifics to be
+ provided by Dave A.
+</p>
+
+<p><i>[
+Berlin: The LWG requests a detailed survey of part 2 of the proposed resolution.
+]</i></p>
+
+
+<p><i>[
+Alan provided the survey
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="539"></a>539. partial_sum and adjacent_difference should mention requirements</h3>
+<p><b>Section:</b> 26.6.3 [partial.sum] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Marc Schoolderman <b>Date:</b> 2006-02-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There are some problems in the definition of partial_sum and
+adjacent_difference in 26.4 [lib.numeric.ops]
+</p>
+
+<p>
+Unlike <tt>accumulate</tt> and <tt>inner_product</tt>, these functions are not
+parametrized on a "type T", instead, 26.4.3 [lib.partial.sum] simply
+specifies the effects clause as;
+</p>
+
+<blockquote><p>
+Assigns to every element referred to by iterator <tt>i</tt> in the range
+<tt>[result,result + (last - first))</tt> a value correspondingly equal to
+</p>
+<blockquote><pre>((...(* first + *( first + 1)) + ...) + *( first + ( i - result )))
+</pre></blockquote>
+</blockquote>
+
+<p>
+And similarly for BinaryOperation. Using just this definition, it seems
+logical to expect that:
+</p>
+
+
+<blockquote><pre>char i_array[4] = { 100, 100, 100, 100 };
+int o_array[4];
+
+std::partial_sum(i_array, i_array+4, o_array);
+</pre></blockquote>
+
+<p>
+Is equivalent to
+</p>
+
+<blockquote><pre>int o_array[4] = { 100, 100+100, 100+100+100, 100+100+100+100 };
+</pre></blockquote>
+
+<p>
+i.e. 100, 200, 300, 400, with addition happening in the <tt>result type</tt>,
+<tt>int</tt>.
+</p>
+
+<p>
+Yet all implementations I have tested produce 100, -56, 44, -112,
+because they are using an accumulator of the <tt>InputIterator</tt>'s
+<tt>value_type</tt>, which in this case is <tt>char</tt>, not <tt>int</tt>.
+</p>
+
+<p>
+The issue becomes more noticeable when the result of the expression <tt>*i +
+*(i+1)</tt> or <tt>binary_op(*i, *i-1)</tt> can't be converted to the
+<tt>value_type</tt>. In a contrived example:
+</p>
+
+<blockquote><pre>enum not_int { x = 1, y = 2 };
+...
+not_int e_array[4] = { x, x, y, y };
+std::partial_sum(e_array, e_array+4, o_array);
+</pre></blockquote>
+
+<p>
+Is it the intent that the operations happen in the <tt>input type</tt>, or in
+the <tt>result type</tt>?
+</p>
+
+<p>
+If the intent is that operations happen in the <tt>result type</tt>, something
+like this should be added to the "Requires" clause of 26.4.3/4
+[lib.partial.sum]:
+</p>
+
+<blockquote><p>
+The type of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall meet the
+requirements of <tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt>
+(23.1) types.
+</p></blockquote>
+
+<p>
+(As also required for <tt>T</tt> in 26.4.1 [lib.accumulate] and 26.4.2
+[lib.inner.product].)
+</p>
+
+<p>
+The "auto initializer" feature proposed in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1894.pdf">N1894</a>
+is not required to
+implement <tt>partial_sum</tt> this way. The 'narrowing' behaviour can still be
+obtained by using the <tt>std::plus&lt;&gt;</tt> function object.
+</p>
+
+<p>
+If the intent is that operations happen in the <tt>input type</tt>, then
+something like this should be added instead;
+</p>
+
+<blockquote><p>
+The type of *first shall meet the requirements of
+<tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types.
+The result of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall be
+convertible to this type.
+</p></blockquote>
+
+<p>
+The 'widening' behaviour can then be obtained by writing a custom proxy
+iterator, which is somewhat involved.
+</p>
+
+<p>
+In both cases, the semantics should probably be clarified.
+</p>
+
+<p>
+26.4.4 [lib.adjacent.difference] is similarly underspecified, although
+all implementations seem to perform operations in the 'result' type:
+</p>
+
+<blockquote><pre>unsigned char i_array[4] = { 4, 3, 2, 1 };
+int o_array[4];
+
+std::adjacent_difference(i_array, i_array+4, o_array);
+</pre></blockquote>
+
+<p>
+o_array is 4, -1, -1, -1 as expected, not 4, 255, 255, 255.
+</p>
+
+<p>
+In any case, <tt>adjacent_difference</tt> doesn't mention the requirements on the
+<tt>value_type</tt>; it can be brought in line with the rest of 26.4
+[lib.numeric.ops] by adding the following to 26.4.4/2
+[lib.adjacent.difference]:
+</p>
+
+<blockquote><p>
+The type of <tt>*first</tt> shall meet the requirements of
+<tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types."
+</p></blockquote>
+<p><i>[
+Berlin: Giving output iterator's value_types very controversial. Suggestion of
+adding signatures to allow user to specify "accumulator".
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="546"></a>546. _Longlong and _ULonglong are integer types</h3>
+<p><b>Section:</b> TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The TR sneaks in two new integer types, _Longlong and _Ulonglong, in [tr.c99].
+The rest of the TR should use that type. I believe this affects two places.
+First, the random number requirements, 5.1.1/10-11, lists all of the types with
+which template parameters named IntType and UIntType may be instantiated.
+_Longlong (or "long long", assuming it is added to C++0x) should be added to the
+IntType list, and UIntType (again, or "unsigned long long") should be added to
+the UIntType list. Second, 6.3.2 lists the types for which hash&lt;&gt; is
+required to be instantiable. _Longlong and _Ulonglong should be added to that
+list, so that people may use long long as a hash key.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="550"></a>550. What should the return type of pow(float,int) be?</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-12</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Assuming we adopt the
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">C
+compatibility package from C99</a> what should be the return type of the
+following signature be:
+</p>
+<blockquote><pre>? pow(float, int);
+</pre></blockquote>
+<p>
+C++03 says that the return type should be <tt>float</tt>.
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
+TR1</a> and C90/99 say the return type should be <tt>double</tt>. This can put
+clients into a situation where C++03 provides answers that are not as high
+quality as C90/C99/TR1. For example:
+</p>
+<blockquote><pre>#include &lt;math.h&gt;
+
+int main()
+{
+ float x = 2080703.375F;
+ double y = pow(x, 2);
+}
+</pre></blockquote>
+<p>
+Assuming an IEEE 32 bit float and IEEE 64 bit double, C90/C99/TR1 all suggest:
+</p>
+
+<blockquote><pre>y = 4329326534736.390625
+</pre></blockquote>
+
+<p>
+which is exactly right. While C++98/C++03 demands:
+</p>
+
+<blockquote><pre>y = 4329326510080.
+</pre></blockquote>
+
+<p>
+which is only approximately right.
+</p>
+
+<p>
+I recommend that C++0X adopt the mixed mode arithmetic already adopted by
+Fortran, C and TR1 and make the return type of <tt>pow(float,int)</tt> be
+<tt>double</tt>.
+</p>
+
+<p><i>[
+Kona (2007): Other functions that are affected by this issue include
+<tt>ldexp</tt>, <tt>scalbln</tt>, and <tt>scalbn</tt>. We also believe that there is a typo in
+26.7/10: <tt>float nexttoward(float, long double);</tt> [sic] should be <tt>float
+nexttoward(float, float);</tt> Proposed Disposition: Review (the proposed
+resolution appears above, rather than below, the heading "Proposed
+resolution")
+]</i></p>
+
+
+<p><i>[
+</i></p><p>
+<i>Howard, post Kona:
+</i></p>
+<blockquote>
+<p>
+<i>Unfortunately I strongly disagree with a part of the resolution
+from Kona. I am moving from New to Open instead of to Review because I do not believe
+we have consensus on the intent of the resolution.
+</i></p>
+<p>
+<i>This issue does not include <tt>ldexp</tt>, <tt>scalbln</tt>, and <tt>scalbn</tt> because
+the second integral parameter in each of these signatures (from C99) is <b>not</b> a
+<i>generic parameter</i> according to C99 7.22p2. The corresponding C++ overloads are
+intended (as far as I know) to correspond directly to C99's definition of <i>generic parameter</i>.
+</i></p>
+<p>
+<i>For similar reasons, I do not believe that the second <tt>long double</tt> parameter of
+<tt>nexttoward</tt>, nor the return type of this function, is in error. I believe the
+correct signature is:
+</i></p>
+<blockquote>
+<pre><i>float nexttoward(float, long double);
+</i></pre>
+</blockquote>
+<p>
+<i>which is what both the C++0X working paper and C99 state (as far as I currently understand).
+</i></p>
+<p>
+<i>This is really <b>only</b> about <tt>pow(float, int)</tt>. And this is because C++98 took one
+route (with <tt>pow</tt> only) and C99 took another (with many math functions in <tt>&lt;tgmath.h&gt;</tt>.
+The proposed resolution basically says: C++98 got it wrong and C99 got it right; let's go with C99.
+</i></p>
+</blockquote>
+<i>]</i>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.7 [c.math]
+</p>
+
+<blockquote><pre>float pow(float, float);
+<del>float</del> <ins>double</ins> pow(float, int);
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="556"></a>556. is Compare a BinaryPredicate?</h3>
+<p><b>Section:</b> 25.3 [alg.sorting] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.sorting">issues</a> in [alg.sorting].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 25, p8 we allow BinaryPredicates to return a type that's convertible
+to bool but need not actually be bool. That allows predicates to return
+things like proxies and requires that implementations be careful about
+what kinds of expressions they use the result of the predicate in (e.g.,
+the expression in if (!pred(a, b)) need not be well-formed since the
+negation operator may be inaccessible or return a type that's not
+convertible to bool).
+</p>
+<p>
+Here's the text for reference:
+</p>
+<blockquote><p>
+ ...if an algorithm takes BinaryPredicate binary_pred as its argument
+ and first1 and first2 as its iterator arguments, it should work
+ correctly in the construct if (binary_pred(*first1, first2)){...}.
+</p></blockquote>
+
+<p>
+In 25.3, p2 we require that the Compare function object return true
+of false, which would seem to preclude such proxies. The relevant text
+is here:
+</p>
+<blockquote><p>
+ Compare is used as a function object which returns true if the first
+ argument is less than the second, and false otherwise...
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+I think we could fix this by rewording 25.3, p2 to read somthing like:
+</p>
+<blockquote><p>
+-2- <tt>Compare</tt> is <del>used as a function object which returns
+<tt>true</tt> if the first argument</del> <ins>a <tt>BinaryPredicate</tt>. The
+return value of the function call operator applied to an object of type
+<tt>Compare</tt>, when converted to type <tt>bool</tt>, yields <tt>true</tt>
+if the first argument of the call</ins> is less than the second, and
+<tt>false</tt> otherwise. <tt>Compare <i>comp</i></tt> is used throughout for
+algorithms assuming an ordering relation. It is assumed that <tt><i>comp</i></tt>
+will not apply any non-constant function through the dereferenced iterator.
+</p></blockquote>
+
+
+<p><i>[
+Portland: Jack to define "convertible to bool" such that short circuiting isn't
+destroyed.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="557"></a>557. TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3>
+<p><b>Section:</b> 18.3 [cstdint], TR1 8.22 [tr.c99.cstdint] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#cstdint">issues</a> in [cstdint].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I'm seeing a problem with such overloads: when, _Longlong == intmax_t ==
+long long we end up, essentially, with the same arguments and different
+return types (lldiv_t and imaxdiv_t, respectively). Similar issue with
+abs(_Longlong) and abs(intmax_t), of course.
+</p>
+<p>
+Comparing sections 8.25 and 8.11, I see an important difference,
+however: 8.25.3 and 8.25.4 carefully describe div and abs for _Longlong
+types (rightfully, because not moved over directly from C99), whereas
+there is no equivalent in 8.11: the abs and div overloads for intmax_t
+types appear only in the synopsis and are not described anywhere, in
+particular no mention in 8.11.2 (at variance with 8.25.2).
+</p>
+<p>
+I'm wondering whether we really, really, want div and abs for intmax_t...
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+<p><i>[
+Portland: no consensus.
+]</i></p>
+
+
+<p><b>Rationale:</b></p>
+<p><i>[
+Batavia, Bill: The <tt>&lt;cstdint&gt;</tt> synopsis in TR1 8.11.1 [tr.c99.cinttypes.syn] contains:
+]</i></p>
+
+<blockquote><pre>intmax_t imaxabs(intmax_t i);
+intmax_t abs(intmax_t i);
+
+imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
+imaxdiv_t div(intmax_t numer, intmax_t denom);
+</pre></blockquote>
+
+<p><i>[
+and in TR1 8.11.2 [tr.c99.cinttypes.def]:
+]</i></p>
+
+
+<blockquote><p>
+The header defines all functions, types, and macros the same as C99
+subclause 7.8.
+</p></blockquote>
+
+<p><i>[
+This is as much definition as we give for most other C99 functions,
+so nothing need change. We might, however, choose to add the footnote:
+]</i></p>
+
+
+<blockquote><p>
+[<i>Note:</i> These overloads for <tt>abs</tt> and <tt>div</tt> may well be equivalent to
+those that take <tt>long long</tt> arguments. If so, the implementation is
+responsible for avoiding conflicting declarations. -- <i>end note</i>]
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="561"></a>561. inserter overly generic</h3>
+<p><b>Section:</b> 24.4.2.6.5 [inserter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-02-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The declaration of <tt>std::inserter</tt> is:
+</p>
+
+<blockquote><pre>template &lt;class Container, class Iterator&gt;
+insert_iterator&lt;Container&gt;
+inserter(Container&amp; x, Iterator i);
+</pre></blockquote>
+
+<p>
+The template parameter <tt>Iterator</tt> in this function is completely unrelated
+to the template parameter <tt>Container</tt> when it doesn't need to be. This
+causes the code to be overly generic. That is, any type at all can be deduced
+as <tt>Iterator</tt>, whether or not it makes sense. Now the same is true of
+<tt>Container</tt>. However, for every free (unconstrained) template parameter
+one has in a signature, the opportunity for a mistaken binding grows geometrically.
+</p>
+
+<p>
+It would be much better if <tt>inserter</tt> had the following signature instead:
+</p>
+
+<blockquote><pre>template &lt;class Container&gt;
+insert_iterator&lt;Container&gt;
+inserter(Container&amp; x, typename Container::iterator i);
+</pre></blockquote>
+
+<p>
+Now there is only one free template parameter. And the second argument to
+<tt>inserter</tt> must be implicitly convertible to the container's iterator,
+else the call will not be a viable overload (allowing other functions in the
+overload set to take precedence). Furthermore, the first parameter must have a
+nested type named <tt>iterator</tt>, or again the binding to <tt>std::inserter</tt>
+is not viable. Contrast this with the current situation
+where any type can bind to <tt>Container</tt> or <tt>Iterator</tt> and those
+types need not be anything closely related to containers or iterators.
+</p>
+
+<p>
+This can adversely impact well written code. Consider:
+</p>
+
+<blockquote><pre>#include &lt;iterator&gt;
+#include &lt;string&gt;
+
+namespace my
+{
+
+template &lt;class String&gt;
+struct my_type {};
+
+struct my_container
+{
+template &lt;class String&gt;
+void push_back(const my_type&lt;String&gt;&amp;);
+};
+
+template &lt;class String&gt;
+void inserter(const my_type&lt;String&gt;&amp; m, my_container&amp; c) {c.push_back(m);}
+
+} // my
+
+int main()
+{
+ my::my_container c;
+ my::my_type&lt;std::string&gt; m;
+ inserter(m, c);
+}
+</pre></blockquote>
+
+<p>
+Today this code fails because the call to <tt>inserter</tt> binds to
+<tt>std::inserter</tt> instead of to <tt>my::inserter</tt>. However with the
+proposed change <tt>std::inserter</tt> will no longer be a viable function which
+leaves only <tt>my::inserter</tt> in the overload resolution set. Everything
+works as the client intends.
+</p>
+
+<p>
+To make matters a little more insidious, the above example works today if you
+simply change the first argument to an rvalue:
+</p>
+
+<blockquote><pre> inserter(my::my_type(), c);
+</pre></blockquote>
+
+<p>
+It will also work if instantiated with some string type other than
+<tt>std::string</tt> (or any other <tt>std</tt> type). It will also work if
+<tt>&lt;iterator&gt;</tt> happens to not get included.
+</p>
+
+<p>
+And it will fail again for such inocuous reaons as <tt>my_type</tt> or
+<tt>my_container</tt> privately deriving from any <tt>std</tt> type.
+</p>
+
+<p>
+It seems unfortunate that such simple changes in the client's code can result
+in such radically differing behavior.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 24.2:
+</p>
+
+<blockquote><p>
+<b>24.2 Header</b> <tt>&lt;iterator&gt;</tt> <b>synopsis</b>
+</p>
+<blockquote><pre>...
+template &lt;class Container<del>, class Iterator</del>&gt;
+ insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Iterator</del> <ins>typename Container::iterator</ins> i);
+...
+</pre></blockquote>
+</blockquote>
+
+<p>
+Change 24.4.2.5:
+</p>
+
+<blockquote><p>
+<b>24.4.2.5 Class template</b> <tt>insert_iterator</tt></p>
+<blockquote><pre>...
+template &lt;class Container<del>, class Iterator</del>&gt;
+ insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Iterator</del> <ins>typename Container::iterator</ins> i);
+...
+</pre></blockquote>
+</blockquote>
+
+<p>
+Change 24.4.2.6.5:
+</p>
+
+<blockquote>
+<p>
+<b>24.4.2.6.5</b> <tt>inserter</tt>
+</p>
+<pre>template &lt;class Container<del>, class Inserter</del>&gt;
+ insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Inserter</del> <ins>typename Container::iterator</ins> i);
+</pre>
+<blockquote><p>
+-1- <i>Returns:</i> <tt>insert_iterator&lt;Container&gt;(x,<del>typename Container::iterator(</del>i<del>)</del>)</tt>.
+</p></blockquote>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): This issue will probably be addressed as a part of the
+concepts overhaul of the library anyway, but the proposed resolution is
+correct in the absence of concepts. Proposed Disposition: Ready
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="562"></a>562. stringbuf ctor inefficient</h3>
+<p><b>Section:</b> 27.7 [string.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+For better efficiency, the requirement on the stringbuf ctor that
+takes a string argument should be loosened up to let it set
+<code>epptr()</code> beyond just one past the last initialized
+character just like <code>overflow()</code> has been changed to be
+allowed to do (see issue 432). That way the first call to
+<code>sputc()</code> on an object won't necessarily cause a call to
+<code>overflow</code>. The corresponding change should be made to the
+string overload of the <code>str()</code> member function.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Change 27.7.1.1, p3 of the Working Draft, N1804, as follows:
+
+ </p>
+
+<blockquote><pre>explicit basic_stringbuf(const basic_string&lt;charT,traits,Allocator&gt;&amp; <i>s<del>tr</del></i>,
+ ios_base::openmode <i>which</i> = ios_base::in | ios_base::out);
+</pre>
+
+<p>
+-3- <i>Effects:</i> Constructs an object of class <tt>basic_stringbuf</tt>,
+initializing the base class with <tt>basic_streambuf()</tt>
+(27.5.2.1), and initializing <tt><i>mode</i></tt> with <tt><i>which</i></tt>.
+Then <ins>calls <tt>str(<i>s</i>)</tt>.</ins> <del>copies the content of
+<i>str</i> into the <tt>basic_stringbuf</tt> underlying character
+sequence. If <tt><i>which</i> &amp; ios_base::out</tt> is true, initializes the
+output sequence such that <tt>pbase()</tt> points to the first underlying
+character, <tt>epptr()</tt> points one past the last underlying character, and
+<tt>pptr()</tt> is equal to <tt>epptr()</tt> if <tt><i>which</i> &amp; ios_base::ate</tt>
+is true, otherwise <tt>pptr()</tt> is equal to <tt>pbase()</tt>. If
+<tt>which &amp; ios_base::in</tt> is true, initializes the input sequence such
+that <tt>eback()</tt> and <tt>gptr()</tt> point to the first underlying
+character and <tt>egptr()</tt> points one past the last underlying character.</del>
+</p>
+</blockquote>
+
+ <p>
+
+Change the Effects clause of the <code>str()</code> in 27.7.1.2, p2 to
+read:
+
+ </p>
+<blockquote>
+<p>
+-2- <i>Effects:</i> Copies the content<ins>s</ins> of <tt><i>s</i></tt> into the
+<tt>basic_stringbuf</tt> underlying character sequence <ins>and
+initializes the input and output sequences according to <tt><i>mode</i></tt></ins>.
+<del>If
+<tt><i>mode</i> &amp; ios_base::out</tt> is true, initializes the output
+sequence such that <tt>pbase()</tt> points to the first underlying character,
+<tt>epptr()</tt> points one past the last underlying character, and <tt>pptr()</tt>
+is equal to <tt>epptr()</tt> if <tt><i>mode</i> &amp; ios_base::in</tt>
+is true, otherwise <tt>pptr()</tt> is equal to <tt>pbase()</tt>. If
+<tt>mode &amp; ios_base::in</tt> is true, initializes the input sequence
+such that <tt>eback()</tt> and <tt>gptr()</tt> point to the first underlying
+character and <tt>egptr()</tt> points one past the last underlying character.</del>
+</p>
+
+ <p>
+
+<ins>-3- <i>Postconditions:</i> If <code>mode &amp; ios_base::out</code> is true,
+<code>pbase()</code> points to the first underlying character and
+<code>(epptr() &gt;= pbase() + s.size())</code> holds; in addition, if
+<code>mode &amp; ios_base::in</code> is true, <code>(pptr() == pbase()
++ s.data())</code> holds, otherwise <code>(pptr() == pbase())</code>
+is true. If <code>mode &amp; ios_base::in</code> is true,
+<code>eback()</code> points to the first underlying character, and
+<code>(gptr() == eback())</code> and <code>(egptr() == eback() +
+s.size())</code> hold.</ins>
+
+ </p>
+</blockquote>
+
+
+<p><i>[
+Kona (2007) Moved to Ready.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="563"></a>563. stringbuf seeking from end</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to Table 92 (unchanged by issue 432), when <code>(way ==
+end)</code> the <code>newoff</code> value in out mode is computed as
+the difference between <code>epptr()</code> and <code>pbase()</code>.
+</p>
+ <p>
+
+This value isn't meaningful unless the value of <code>epptr()</code>
+can be precisely controlled by a program. That used to be possible
+until we accepted the resolution of issue 432, but since then the
+requirements on <code>overflow()</code> have been relaxed to allow it
+to make more than 1 write position available (i.e., by setting
+<code>epptr()</code> to some unspecified value past
+<code>pptr()</code>). So after the first call to
+<code>overflow()</code> positioning the output sequence relative to
+end will have unspecified results.
+
+ </p>
+ <p>
+
+In addition, in <code>in|out</code> mode, since <code>(egptr() ==
+epptr())</code> need not hold, there are two different possible values
+for <code>newoff</code>: <code>epptr() - pbase()</code> and
+<code>egptr() - eback()</code>.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Change the <code>newoff</code> column in the last row of Table 94 to
+read:
+
+ </p>
+<blockquote><p>
+
+the <del>end</del> <ins>high mark</ins> pointer minus the beginning
+pointer (<code><del>xend</del> <ins>high_mark</ins> - xbeg</code>).
+
+</p></blockquote>
+
+
+<p><i>[
+Kona (2007) Moved to Ready.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="564"></a>564. stringbuf seekpos underspecified</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The effects of the <code>seekpos()</code> member function of
+<code>basic_stringbuf</code> simply say that the function positions
+the input and/or output sequences but fail to spell out exactly
+how. This is in contrast to the detail in which <code>seekoff()</code>
+is described.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Change 27.7.1.3, p13 to read:
+
+ </p>
+<blockquote>
+<p>
+-13- <i>Effects:</i> <ins>Same as <tt>seekoff(off_type(<i>sp</i>), ios_base::beg,
+<i>which</i>)</tt>.</ins> <del>Alters the stream position within the controlled sequences,
+if possible, to correspond to the stream position stored in <tt><i>sp</i></tt>
+(as described below).</del>
+</p>
+<ul>
+<li><del>If <tt>(<i>which</i> &amp; ios_base::in) != 0</tt>, positions the input sequence.</del></li>
+<li><del>If <tt>(<i>which</i> &amp; ios_base::out) != 0</tt>, positions the output sequence.</del></li>
+<li><del>If <tt><i>sp</i></tt> is an invalid stream position, or if the function
+positions neither sequence, the positioning operation fails. If <tt><i>sp</i></tt>
+has not been obtained by a previous successful call to one of the positioning
+functions (<tt>seekoff</tt>, <tt>seekpos</tt>, <tt>tellg</tt>, <tt>tellp</tt>)
+the effect is undefined.</del></li>
+</ul>
+</blockquote>
+
+
+<p><i>[
+Kona (2007): A <tt>pos_type</tt> is a position in a stream by
+definition, so there is no ambiguity as to what it means. Proposed
+Disposition: NAD
+]</i></p>
+
+
+<p><i>[
+Post-Kona Martin adds:
+I'm afraid I disagree
+with the Kona '07 rationale for marking it NAD. The only text
+that describes precisely what it means to position the input
+or output sequence is in <tt>seekoff()</tt>. The <tt>seekpos()</tt> Effects
+clause is inadequate in comparison and the proposed resolution
+plugs the hole by specifying <tt>seekpos()</tt> in terms of <tt>seekoff()</tt>.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="565"></a>565. xsputn inefficient</h3>
+<p><b>Section:</b> 27.5.2.4.5 [streambuf.virt.put] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+<tt>streambuf::xsputn()</tt> is specified to have the effect of
+"writing up to <tt>n</tt> characters to the output sequence as if by
+repeated calls to <tt>sputc(c)</tt>."
+
+ </p>
+ <p>
+
+Since <tt>sputc()</tt> is required to call <tt>overflow()</tt> when
+<tt>(pptr() == epptr())</tt> is true, strictly speaking
+<tt>xsputn()</tt> should do the same. However, doing so would be
+suboptimal in some interesting cases, such as in unbuffered mode or
+when the buffer is <tt>basic_stringbuf</tt>.
+
+ </p>
+ <p>
+
+Assuming calling <tt>overflow()</tt> is not really intended to be
+required and the wording is simply meant to describe the general
+effect of appending to the end of the sequence it would be worthwhile
+to mention in <tt>xsputn()</tt> that the function is not actually
+required to cause a call to <tt>overflow()</tt>.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Add the following sentence to the <tt>xsputn()</tt> Effects clause in
+27.5.2.4.5, p1 (N1804):
+
+ </p>
+ <blockquote>
+ <p>
+-1- <i>Effects:</i> Writes up to <tt><i>n</i></tt> characters to the output
+sequence as if by repeated calls to <tt>sputc(<i>c</i>)</tt>. The characters
+written are obtained from successive elements of the array whose first element
+is designated by <tt><i>s</i></tt>. Writing stops when either <tt><i>n</i></tt>
+characters have been written or a call to <tt>sputc(<i>c</i>)</tt> would return
+<tt>traits::eof()</tt>. <ins>It is uspecified whether the function calls
+<tt>overflow()</tt> when <tt>(pptr() == epptr())</tt> becomes true or whether
+it achieves the same effects by other means.</ins>
+ </p>
+ </blockquote>
+ <p>
+
+In addition, I suggest to add a footnote to this function with the
+same text as Footnote 292 to make it extra clear that derived classes
+are permitted to override <tt>xsputn()</tt> for efficiency.
+
+ </p>
+
+
+<p><i>[
+Kona (2007): We want to permit a <tt>streambuf</tt> that streams output directly
+to a device without making calls to <tt>sputc</tt> or <tt>overflow</tt>. We believe that
+has always been the intention of the committee. We believe that the
+proposed wording doesn't accomplish that. Proposed Disposition: Open
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="567"></a>567. streambuf inserter and extractor should be unformatted</h3>
+<p><b>Section:</b> 27.6 [iostream.format] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-25</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iostream.format">active issues</a> in [iostream.format].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.format">issues</a> in [iostream.format].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Issue 60 explicitly made the extractor and inserter operators that
+take a <tt>basic_streambuf*</tt> argument formatted input and output
+functions, respectively. I believe that's wrong, certainly in the
+case of the extractor, since formatted functions begin by extracting
+and discarding whitespace. The extractor should not discard any
+characters.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+I propose to change each operator to behave as unformatted input and
+output function, respectively. The changes below are relative to the
+working draft document number N1804.
+
+ </p>
+ <p>
+
+Specifically, change 27.6.1.2.3, p14 as follows:
+
+ </p>
+
+ <blockquote>
+ <p>
+
+<i>Effects</i>: Behaves as a<ins>n un</ins>formatted input function
+(as described in <del>27.6.1.2.1</del><ins>27.6.1.3, paragraph
+1</ins>).
+
+ </p>
+ </blockquote>
+ <p>
+
+And change 27.6.2.5.3, p7 as follows:
+
+ </p>
+
+ <blockquote>
+ <p>
+
+<i>Effects</i>: Behaves as a<ins>n un</ins>formatted output function
+(as described in <del>27.6.2.5.1</del><ins>27.6.2.6, paragraph
+1</ins>).
+
+ </p>
+ </blockquote>
+
+
+<p><i>[
+Kona (2007): Proposed Disposition: Ready
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="568"></a>568. log2 overloads missing</h3>
+<p><b>Section:</b> TR1 8.16.4 [tr.c99.cmath.over] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-03-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>log2</tt> is missing from the list of "additional overloads" in TR1 8.16.4 [tr.c99.cmath.over] p1.
+</p>
+
+<p>
+Hinnant: This is a TR1 issue only. It is fixed in the current (N2135) WD.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add <tt>log2</tt> to the list of functions in TR1 8.16.4 [tr.c99.cmath.over] p1.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="570"></a>570. Request adding additional explicit specializations of char_traits</h3>
+<p><b>Section:</b> 21.1 [char.traits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Jack Reeves <b>Date:</b> 2006-04-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Currently, the Standard Library specifies only a declaration for template class
+char_traits&lt;&gt; and requires the implementation provide two explicit
+specializations: char_traits&lt;char&gt; and char_traits&lt;wchar_t&gt;. I feel the Standard
+should require explicit specializations for all built-in character types, i.e.
+char, wchar_t, unsigned char, and signed char.
+</p>
+<p>
+I have put together a paper
+(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a>)
+that describes this in more detail and
+includes all the necessary wording.
+</p>
+<p><i>[
+Portland: Jack will rewrite
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a>
+to propose a primary template that will work with other integral types.
+]</i></p>
+
+<p><i>[
+Toronto: issue has grown with addition of <tt>char16_t</tt> and <tt>char32_t</tt>.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="573"></a>573. C++0x file positioning should handle modern file sizes</h3>
+<p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There are two deficiencies related to file sizes:
+</p>
+<ol>
+<li>It doesn't appear that the Standard Library is specified in
+ a way that handles modern file sizes, which are often too
+ large to be represented by an unsigned long.</li>
+
+<li>The std::fpos class does not currently have the ability to
+ set/get file positions.</li>
+</ol>
+<p>
+The Dinkumware implementation of the Standard Library as shipped with the Microsoft compiler copes with these issues by:
+</p>
+<ol type="A">
+<li>Defining fpos_t be long long, which is large enough to
+ represent any file position likely in the foreseeable future.</li>
+
+<li>Adding member functions to class fpos. For example,
+<blockquote><pre>fpos_t seekpos() const;
+</pre></blockquote>
+</li>
+</ol>
+<p>
+Because there are so many types relating to file positions and offsets (fpos_t,
+fpos, pos_type, off_type, streamoff, streamsize, streampos, wstreampos, and
+perhaps more), it is difficult to know if the Dinkumware extensions are
+sufficient. But they seem a useful starting place for discussions, and they do
+represent existing practice.
+</p>
+
+<p><i>[
+Kona (2007): We need a paper. It would be nice if someone proposed
+clarifications to the definitions of <tt>pos_type</tt> and <tt>off_type</tt>. Currently
+these definitions are horrible. Proposed Disposition: Open
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="574"></a>574. DR 369 Contradicts Text</h3>
+<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2006-04-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+lib.iostream.objects requires that the standard stream objects are never
+destroyed, and it requires that they be destroyed.
+</p>
+<p>
+DR 369 adds words to say that we really mean for ios_base::Init objects to force
+construction of standard stream objects. It ends, though, with the phrase "these
+stream objects shall be destroyed after the destruction of dynamically ...".
+However, the rule for destruction is stated in the standard: "The objects are
+not destroyed during program execution."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 27.3 [iostream.objects]/1:
+</p>
+
+<blockquote>
+<p>
+-2- The objects are constructed and the associations are established at
+some time prior to or during the first time an object of class
+<tt>ios_base::Init</tt> is constructed, and in any case before the body of main
+begins execution.<sup>290)</sup> The objects are not destroyed during program
+execution.<sup>291)</sup> If a translation unit includes <tt>&lt;iostream&amp;t;</tt> or explicitly
+constructs an <tt>ios_base::Init</tt> object, these stream objects shall be
+constructed before dynamic initialization of non-local objects defined
+later in that translation unit<del>, and these stream objects shall be
+destroyed after the destruction of dynamically initialized non-local
+objects defined later in that translation unit</del>.
+</p>
+</blockquote>
+
+
+<p><i>[
+Kona (2007): From 27.3 [iostream.objects]/2, strike the words "...and these stream objects
+shall be destroyed after the destruction of dynamically initialized
+non-local objects defined later in that translation unit." Proposed
+Disposition: Review
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="579"></a>579. erase(iterator) for unordered containers should not return an iterator</h3>
+<p><b>Section:</b> 23.1.3 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2006-06-13</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord.req">active issues</a> in [unord.req].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord.req">issues</a> in [unord.req].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+See
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
+for full discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Option 1:
+</p>
+
+<p>
+The problem can be eliminated by omitting the requirement that <tt>a.erase(q)</tt> return an
+iterator. This is, however, in contrast with the equivalent requirements for other
+standard containers.
+</p>
+
+<p>
+Option 2:
+</p>
+
+<p>
+<tt>a.erase(q)</tt> can be made to compute the next iterator only when explicitly requested:
+the technique consists in returning a proxy object implicitly convertible to <tt>iterator</tt>, so
+that
+</p>
+
+<blockquote><pre>iterator q1=a.erase(q);
+</pre></blockquote>
+
+<p>
+works as expected, while
+</p>
+
+<blockquote><pre>a.erase(q);
+</pre></blockquote>
+
+<p>
+does not ever invoke the conversion-to-iterator operator, thus avoiding the associated
+computation. To allow this technique, some sections of TR1 along the line "return value
+is an iterator..." should be changed to "return value is an unspecified object implicitly
+convertible to an iterator..." Although this trick is expected to work transparently, it can
+have some collateral effects when the expression <tt>a.erase(q)</tt> is used inside generic
+code.
+</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
+was discussed in Portland and the consensus was that there appears to be
+no need for either change proposed in the paper. The consensus opinion
+was that since the iterator could serve as its own proxy, there appears
+to be no need for the change. In general, "converts to" is undesirable
+because it interferes with template matching.
+</p>
+
+<p>
+Post Toronto: There does not at this time appear to be consensus with the Portland consensus.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="580"></a>580. unused allocator members</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a></p>
+<p><b>Discussion:</b></p>
+ <p>
+
+C++ Standard Library templates that take an allocator as an argument
+are required to call the <code>allocate()</code> and
+<code>deallocate()</code> members of the allocator object to obtain
+storage. However, they do not appear to be required to call any other
+allocator members such as <code>construct()</code>,
+<code>destroy()</code>, <code>address()</code>, and
+<code>max_size()</code>. This makes these allocator members less than
+useful in portable programs.
+
+ </p>
+ <p>
+
+It's unclear to me whether the absence of the requirement to use these
+allocator members is an unintentional omission or a deliberate
+choice. However, since the functions exist in the standard allocator
+and since they are required to be provided by any user-defined
+allocator I believe the standard ought to be clarified to explictly
+specify whether programs should or should not be able to rely on
+standard containers calling the functions.
+
+ </p>
+ <p>
+
+I propose that all containers be required to make use of these
+functions.
+
+ </p>
+<p><i>[
+Batavia: We support this resolution. Martin to provide wording.
+]</i></p>
+
+<p><i>[
+pre-Oxford: Martin provided wording.
+]</i></p>
+
+
+
+ <p><b>Proposed resolution:</b></p>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
+
+Specifically, I propose to change 23.1 [container.requirements],
+p9 as follows:
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<blockquote>
+<p>
+-9- Copy constructors &nbsp;for all container types defined &nbsp;in this clause
+<ins>that &nbsp;&nbsp;are &nbsp;parametrized &nbsp;on &nbsp;&nbsp;<code>Allocator</code></ins> &nbsp;copy
+<del>an</del><ins>the</ins> &nbsp;allocator argument from &nbsp;their respective
+first parameters.
+
+All other &nbsp;constructors for &nbsp;these container types &nbsp;take a<del>n</del>
+<ins>const</ins> &nbsp;<code>Allocator&amp;</code> &nbsp;argument &nbsp;(20.1.6), &nbsp;an
+allocator whose <code>value_type</code> is the same as the container's
+<code>value_type</code>.
+
+A copy of this &nbsp;argument <del>is</del><ins>shall be</ins> used for any
+memory &nbsp;allocation <ins> and &nbsp;deallocation</ins> performed<del>,</del>
+by these &nbsp;constructors and by all &nbsp;member functions<del>,</del> during
+the &nbsp;lifetime &nbsp;of each &nbsp;container &nbsp;object. &nbsp;&nbsp;<ins>Allocation shall &nbsp;be
+performed &nbsp;"as &nbsp;if" &nbsp;by &nbsp;calling &nbsp;the &nbsp;<code>allocate()</code> &nbsp;member
+function on &nbsp;a copy &nbsp;of the allocator &nbsp;object of the &nbsp;appropriate type
+<sup>New &nbsp;Footnote)</sup>, &nbsp;&nbsp;and &nbsp;deallocation &nbsp;"as &nbsp;&nbsp;if" &nbsp;by &nbsp;calling
+<code>deallocate()</code> on &nbsp;a copy of &nbsp;the same allocator &nbsp;object of
+the corresponding type.</ins>
+
+<ins>A &nbsp;copy of &nbsp;this argument &nbsp;shall also &nbsp;be used &nbsp;to &nbsp;construct and
+destroy objects whose lifetime &nbsp;is managed by the container, including
+but not &nbsp;limited to those of &nbsp;the container's <code>value_type</code>,
+and &nbsp;to &nbsp;obtain &nbsp;their &nbsp;address. &nbsp;&nbsp;All &nbsp;objects &nbsp;residing &nbsp;in &nbsp;storage
+allocated by a &nbsp;container's allocator shall be constructed &nbsp;"as if" by
+calling the <code>construct()</code> member &nbsp;function on a copy of the
+allocator object of &nbsp;the appropriate type. &nbsp;The same &nbsp;objects shall be
+destroyed "as if" &nbsp;by calling <code>destroy()</code> on a &nbsp;copy of the
+same allocator object &nbsp;of the same type. &nbsp;The &nbsp;address of such objects
+shall be obtained "as if" by calling the <code>address()</code> member
+function &nbsp;on &nbsp;a &nbsp;copy &nbsp;of &nbsp;the allocator &nbsp;object &nbsp;of &nbsp;the &nbsp;appropriate
+type.</ins>
+
+<ins>Finally, a copy &nbsp;of this argument shall be &nbsp;used by its container
+object to determine &nbsp;the maximum number of objects &nbsp;of the container's
+<code>value_type</code> the container may &nbsp;store at the same time. The
+container &nbsp;member function <code>max_size()</code>
+obtains &nbsp;this number
+from &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returned &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by
+&nbsp;&nbsp;&nbsp;&nbsp;a &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to
+<code>get_allocator().max_size()</code>.</ins>
+
+In &nbsp;&nbsp;all &nbsp;container &nbsp;&nbsp;types &nbsp;defined &nbsp;&nbsp;in &nbsp;this &nbsp;&nbsp;clause <ins>that &nbsp;are
+parametrized &nbsp;&nbsp;&nbsp;&nbsp;on &nbsp;&nbsp;&nbsp;<code>Allocator</code></ins>, &nbsp;&nbsp;&nbsp;&nbsp;the &nbsp;&nbsp;&nbsp;member
+<code>get_allocator()</code> &nbsp;&nbsp;&nbsp;&nbsp;returns
+&nbsp;&nbsp;&nbsp;&nbsp;a &nbsp;&nbsp;&nbsp;&nbsp;copy
+&nbsp;&nbsp;&nbsp;&nbsp;of &nbsp;&nbsp;&nbsp;&nbsp;the
+<code>Allocator</code> &nbsp;&nbsp;&nbsp;&nbsp;object
+&nbsp;&nbsp;&nbsp;&nbsp;used &nbsp;&nbsp;&nbsp;&nbsp;to
+&nbsp;&nbsp;&nbsp;construct &nbsp;&nbsp;&nbsp;&nbsp;the
+container.<sup>258)</sup>
+</p>
+<p>
+New Footnote: This type &nbsp;may be different from <code>Allocator</code>:
+it &nbsp;&nbsp;&nbsp;&nbsp;may &nbsp;&nbsp;&nbsp;be
+&nbsp;&nbsp;&nbsp;&nbsp;derived &nbsp;&nbsp;&nbsp;from
+&nbsp;&nbsp;&nbsp;&nbsp;<code>Allocator</code> &nbsp;&nbsp;&nbsp;via
+<code>Allocator::rebind&lt;U&gt;::other</code> &nbsp;&nbsp;for &nbsp;the &nbsp;appropriate
+type <code>U</code>.
+</p>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</blockquote>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<p>
+The proposed wording seems cumbersome but I couldn't think of a better
+way &nbsp;&nbsp;to &nbsp;describe &nbsp;&nbsp;the
+&nbsp;&nbsp;requirement &nbsp;that &nbsp;&nbsp;containers &nbsp;use
+&nbsp;&nbsp;their
+<code>Allocator</code> &nbsp;to manage &nbsp;only objects &nbsp;(regardless &nbsp;of their
+type) &nbsp;that &nbsp;persist &nbsp;over &nbsp;their &nbsp;lifetimes &nbsp;and &nbsp;not, &nbsp;for &nbsp;example,
+temporaries &nbsp;created on the &nbsp;stack. That &nbsp;is, containers &nbsp;shouldn't be
+required &nbsp;to &nbsp;call &nbsp;<code>Allocator::construct(Allocator::allocate(1),
+elem)</code> &nbsp;just to &nbsp;construct a &nbsp;temporary copy &nbsp;of an &nbsp;element, or
+<code>Allocator::destroy(Allocator::address(temp), &nbsp;&nbsp;&nbsp;&nbsp;1)</code> &nbsp;&nbsp;&nbsp;to
+destroy temporaries.
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
+
+
+<p><i>[
+Howard: This same paragraph will need some work to accommodate <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
+]</i></p>
+
+
+<p><i>[
+post Oxford: This would be rendered NAD Editorial by acceptance of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="581"></a>581. <code>flush()</code> not unformatted function</h3>
+<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The resolution of issue 60 changed <code>basic_ostream::flush()</code>
+so as not to require it to behave as an unformatted output function.
+That has at least two in my opinion problematic consequences:
+
+ </p>
+ <p>
+
+First, <code>flush()</code> now calls <code>rdbuf()-&gt;pubsync()</code>
+unconditionally, without regard to the state of the stream. I can't
+think of any reason why <code>flush()</code> should behave differently
+from the vast majority of stream functions in this respect.
+
+ </p>
+ <p>
+
+Second, <code>flush()</code> is not required to catch exceptions from
+<code>pubsync()</code> or set <code>badbit</code> in response to such
+events. That doesn't seem right either, as most other stream functions
+do so.
+
+ </p>
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+I propose to revert the resolution of issue 60 with respect to
+<code>flush()</code>. Specifically, I propose to change 27.6.2.6, p7
+as follows:
+
+ </p>
+
+<p>
+Effects: <ins>Behaves as an unformatted output function (as described
+in 27.6.2.6, paragraph 1). </ins>If <code>rdbuf()</code> is not a null
+pointer, <ins>constructs a sentry object. If this object returns
+<code>true</code> when converted to a value of type bool the function
+</ins>calls <code>rdbuf()-&gt;pubsync()</code>. If that function returns
+-1 calls <code>setstate(badbit)</code> (which may throw
+<code>ios_base::failure</code> (27.4.4.3)). <ins>Otherwise, if the
+sentry object returns <code>false</code>, does nothing.</ins><del>Does
+not behave as an unformatted output function (as described in
+27.6.2.6, paragraph 1).</del>
+</p>
+
+
+
+<p><i>[
+Kona (2007): Proposed Disposition: Ready
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="582"></a>582. specialized algorithms and volatile storage</h3>
+<p><b>Section:</b> 20.6.4.1 [uninitialized.copy] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#uninitialized.copy">active issues</a> in [uninitialized.copy].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#uninitialized.copy">issues</a> in [uninitialized.copy].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The specialized algorithms [lib.specialized.algorithms] are specified
+as having the general effect of invoking the following expression:
+
+ </p>
+ <pre>
+new (static_cast&lt;void*&gt;(&amp;*i))
+ typename iterator_traits&lt;ForwardIterator&gt;::value_type (x)
+
+ </pre>
+ <p>
+
+This expression is ill-formed when the type of the subexpression
+<code>&amp;*i</code> is some volatile-qualified <code>T</code>.
+
+ </p>
+
+<p><i>[
+Batavia: Lack of support for proposed resolution but agree there is a
+defect. Howard to look at wording. Concern that move semantics
+properly expressed if iterator returns rvalue.
+]</i></p>
+
+
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+In order to allow these algorithms to operate on volatile storage I
+propose to change the expression so as to make it well-formed even for
+pointers to volatile types. Specifically, I propose the following
+changes to clauses 20 and 24. Change 20.6.4.1, p1 to read:
+
+ </p>
+ <pre>
+<i>Effects</i>:
+
+typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
+typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
+
+for (; first != last; ++result, ++first)
+ new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*result))
+ value_type (*first);
+
+ </pre>
+ <p>
+
+change 20.6.4.2, p1 to read
+
+ </p>
+ <pre>
+<i>Effects</i>:
+
+typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
+typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
+
+for (; first != last; ++result, ++first)
+ new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*first))
+ value_type (*x);
+
+ </pre>
+ <p>
+
+and change 20.6.4.3, p1 to read
+
+ </p>
+ <pre>
+<i>Effects</i>:
+
+typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
+typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
+
+for (; n--; ++first)
+ new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*first))
+ value_type (*x);
+
+ </pre>
+ <p>
+
+In addition, since there is no partial specialization for
+<code>iterator_traits&lt;volatile T*&gt;</code> I propose to add one
+to parallel such specialization for &lt;const T*&gt;. Specifically, I
+propose to add the following text to the end of 24.3.1, p3:
+
+ </p>
+ <p>
+
+and for pointers to volatile as
+
+ </p>
+ <pre>
+namespace std {
+template&lt;class T&gt; struct iterator_traits&lt;volatile T*&gt; {
+typedef ptrdiff_t difference_type;
+typedef T value_type;
+typedef volatile T* pointer;
+typedef volatile T&amp; reference;
+typedef random_access_iterator_tag iterator_category;
+};
+}
+
+ </pre>
+ <p>
+
+Note that the change to <code>iterator_traits</code> isn't necessary
+in order to implement the specialized algorithms in a way that allows
+them to operate on volatile strorage. It is only necesassary in order
+to specify their effects in terms of <code>iterator_traits</code> as
+is done here. Implementations can (and some do) achieve the same
+effect by means of function template overloading.
+
+ </p>
+
+
+
+
+<hr>
+<h3><a name="585"></a>585. facet error reporting</h3>
+<p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor, Paolo Carlini <b>Date:</b> 2006-06-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Section 22.2, paragraph 2 requires facet <code>get()</code> members
+that take an <code>ios_base::iostate&amp;</code> argument,
+<code><i>err</i></code>, to ignore the (initial) value of the
+argument, but to set it to <code>ios_base::failbit</code> in case of a
+parse error.
+
+ </p>
+ <p>
+
+We believe there are a few minor problems with this blanket
+requirement in conjunction with the wording specific to each
+<code>get()</code> member function.
+
+ </p>
+ <p>
+
+First, besides <code>get()</code> there are other member functions
+with a slightly different name (for example,
+<code>get_date()</code>). It's not completely clear that the intent of
+the paragraph is to include those as well, and at least one
+implementation has interpreted the requirement literally.
+
+ </p>
+ <p>
+
+Second, the requirement to "set the argument to
+<code>ios_base::failbit</code> suggests that the functions are not
+permitted to set it to any other value (such as
+<code>ios_base::eofbit</code>, or even <code>ios_base::eofbit |
+ios_base::failbit</code>).
+
+ </p>
+ <p>
+
+However, 22.2.2.1.2, p5 (Stage 3 of <code>num_get</code> parsing) and
+p6 (<code>bool</code> parsing) specifies that the <code>do_get</code>
+functions perform <code><i>err</i> |= ios_base::eofbit</code>, which
+contradicts the earlier requirement to ignore <i>err</i>'s initial
+value.
+
+ </p>
+ <p>
+
+22.2.6.1.2, p1 (the Effects clause of the <code>money_get</code>
+facet's <code>do_get</code> member functions) also specifies that
+<code><i>err</i></code>'s initial value be used to compute the final
+value by ORing it with either <code>ios_base::failbit</code> or
+with<code>ios_base::eofbit | ios_base::failbit</code>.
+
+ </p>
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+We believe the intent is for all facet member functions that take an
+<code>ios_base::iostate&amp;</code> argument to:
+
+ </p>
+ <ul>
+ <li>
+
+ignore the initial value of the <code><i>err</i></code> argument,
+
+ </li>
+ <li>
+
+reset <code><i>err</i></code> to <code>ios_base::goodbit</code> prior
+to any further processing,
+
+ </li>
+ <li>
+
+and set either <code>ios_base::eofbit</code>, or
+<code>ios_base::failbit</code>, or both in <code><i>err</i></code>, as
+appropriate, in response to reaching the end-of-file or on parse
+error, or both.
+
+ </li>
+ </ul>
+ <p>
+
+To that effect we propose to change 22.2, p2 as follows:
+
+ </p>
+ <p>
+
+The <i>put</i><del>()</del> members make no provision for error
+reporting. (Any failures of the OutputIterator argument must be
+extracted from the returned iterator.) <ins>Unless otherwise
+specified, </ins>the <i>get</i><del>()</del> members <ins>that</ins>
+take an <code>ios_base::iostate&amp;</code> argument <del>whose value
+they ignore, but set to ios_base::failbit in case of a parse
+error.</del><ins>, <code><i>err</i></code>, start by evaluating
+<code>err = ios_base::goodbit</code>, and may subsequently set
+<i>err</i> to either <code>ios_base::eofbit</code>, or
+<code>ios_base::failbit</code>, or <code>ios_base::eofbit |
+ios_base::failbit</code> in response to reaching the end-of-file or in
+case of a parse error, or both, respectively.</ins>
+
+ </p>
+
+
+<p><i>[
+Kona (2007): We need to change the proposed wording to clarify that the
+phrase "the get members" actually denotes <tt>get()</tt>, <tt>get_date()</tt>, etc.
+Proposed Disposition: Open
+]</i></p>
+
+
+
+
+<hr>
+<h3><a name="588"></a>588. requirements on zero sized tr1::arrays and other details</h3>
+<p><b>Section:</b> 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2006-07-18</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The wording used for section 23.2.1 [lib.array] seems to be subtly
+ambiguous about zero sized arrays (N==0). Specifically:
+</p>
+<p>
+* "An instance of array&lt;T, N&gt; stores N elements of type T, so that
+[...]"
+</p>
+<p>
+Does this imply that a zero sized array object stores 0 elements, i.e.
+that it cannot store any element of type T? The next point clarifies
+the rationale behind this question, basically how to implement begin()
+and end():
+</p>
+<p>
+* 23.2.1.5 [lib.array.zero], p2: "In the case that N == 0, begin() ==
+end() == unique value."
+</p>
+<p>
+What does "unique" mean in this context? Let's consider the following
+possible implementations, all relying on a partial specialization:
+</p>
+<blockquote><pre>a)
+ template&lt; typename T &gt;
+ class array&lt; T, 0 &gt; {
+
+ ....
+
+ iterator begin()
+ { return iterator( reinterpret_cast&lt; T * &gt;( this ) ); }
+ ....
+
+ };
+</pre></blockquote>
+<p>
+This has been used in boost, probably intending that the return value
+had to be unique to the specific array object and that array couldn't
+store any T. Note that, besides relying on a reinterpret_cast, has
+(more than potential) alignment problems.
+</p>
+<blockquote><pre>b)
+ template&lt; typename T &gt;
+ class array&lt; T, 0 &gt; {
+
+ T t;
+
+ iterator begin()
+ { return iterator( &amp;t ); }
+ ....
+
+ };
+</pre></blockquote>
+<p>
+This provides a value which is unique to the object and to the type of
+the array, but requires storing a T. Also, it would allow the user to
+mistakenly provide an initializer list with one element.
+</p>
+<p>
+A slight variant could be returning *the* null pointer of type T
+</p>
+<blockquote><pre> return static_cast&lt;T*&gt;(0);
+</pre></blockquote>
+<p>
+In this case the value would be unique to the type array&lt;T, 0&gt; but not
+to the objects (all objects of type array&lt;T, 0&gt; with the same value
+for T would yield the same pointer value).
+</p>
+<p>
+Furthermore this is inconsistent with what the standard requires from
+allocation functions (see library issue 9).
+</p>
+<p>
+c) same as above but with t being a static data member; again, the
+value would be unique to the type, not to the object.
+</p>
+<p>
+d) to avoid storing a T *directly* while disallowing the possibility
+to use a one-element initializer list a non-aggregate nested class
+could be defined
+</p>
+<blockquote><pre> struct holder { holder() {} T t; } h;
+</pre></blockquote>
+<p>
+and then begin be defined as
+</p>
+<blockquote><pre> iterator begin() { return &amp;h.t; }
+</pre></blockquote>
+<p>
+But then, it's arguable whether the array stores a T or not.
+Indirectly it does.
+</p>
+<p>
+-----------------------------------------------------
+</p>
+<p>
+Now, on different issues:
+</p>
+<p>
+* what's the effect of calling assign(T&amp;) on a zero-sized array? There
+seems to be only mention of front() and back(), in 23.2.1 [lib.array]
+p4 (I would also suggest to move that bullet to section 23.2.1.5
+[lib.array.zero], for locality of reference)
+</p>
+<p>
+* (minor) the opening paragraph of 23.2.1 [lib.array] wording is a bit
+inconsistent with that of other sequences: that's not a problem in
+itself, but compare it for instance with "A vector is a kind of
+sequence that supports random access iterators"; though the intent is
+obvious one might argue that the wording used for arrays doesn't tell
+what an array is, and relies on the reader to infer that it is what
+the &lt;array&gt; header defines.
+</p>
+<p>
+* it would be desiderable to have a static const data member of type
+std::size_t, with value N, for usage as integral constant expression
+</p>
+<p>
+* section 23.1 [lib.container.requirements] seem not to consider
+fixed-size containers at all, as it says: "[containers] control
+allocation and deallocation of these objects [the contained objects]
+through constructors, destructors, *insert and erase* operations"
+</p>
+<p>
+* max_size() isn't specified: the result is obvious but, technically,
+it relies on table 80: "size() of the largest possible container"
+which, again, doesn't seem to consider fixed size containers
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><i>[
+Kona (2007): requirements on zero sized <tt>tr1::array</tt>s and other details
+Issue 617: <tt>std::array</tt> is a sequence that doesn't satisfy the sequence
+requirements? Alisdair will prepare a paper. Proposed Disposition: Open
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="595"></a>595. TR1/C++0x: fabs(complex&lt;T&gt;) redundant / wrongly specified</h3>
+<p><b>Section:</b> 26.3.7 [complex.value.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Stefan Große Pawig <b>Date:</b> 2006-09-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+TR1 introduced, in the C compatibility chapter, the function
+fabs(complex&lt;T&gt;):
+</p>
+<blockquote><pre>----- SNIP -----
+8.1.1 Synopsis [tr.c99.cmplx.syn]
+
+ namespace std {
+ namespace tr1 {
+[...]
+ template&lt;class T&gt; complex&lt;T&gt; fabs(const complex&lt;T&gt;&amp; x);
+ } // namespace tr1
+ } // namespace std
+
+[...]
+
+8.1.8 Function fabs [tr.c99.cmplx.fabs]
+
+1 Effects: Behaves the same as C99 function cabs, defined in
+ subclause 7.3.8.1.
+----- SNIP -----
+</pre></blockquote>
+
+<p>
+The current C++0X draft document (n2009.pdf) adopted this
+definition in chapter 26.3.1 (under the comment // 26.3.7 values)
+and 26.3.7/7.
+</p>
+<p>
+But in C99 (ISO/IEC 9899:1999 as well as the 9899:TC2 draft document
+n1124), the referenced subclause reads
+</p>
+
+<blockquote><pre>----- SNIP -----
+7.3.8.1 The cabs functions
+
+ Synopsis
+
+1 #include &lt;complex.h&gt;
+ double cabs(double complex z);
+ float cabsf(float complex z);
+ long double cabsl(long double z);
+
+ Description
+
+2 The cabs functions compute the complex absolute value (also called
+ norm, modulus, or magnitude) of z.
+
+ Returns
+
+3 The cabs functions return the complex absolute value.
+----- SNIP -----
+</pre></blockquote>
+
+<p>
+Note that the return type of the cabs*() functions is not a complex
+type. Thus, they are equivalent to the already well established
+ template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp; x);
+(26.2.7/2 in ISO/IEC 14882:1998, 26.3.7/2 in the current draft
+document n2009.pdf).
+</p>
+<p>
+So either the return value of fabs() is specified wrongly, or fabs()
+does not behave the same as C99's cabs*().
+</p>
+
+<b>Possible Resolutions</b>
+
+<p>
+This depends on the intention behind the introduction of fabs().
+</p>
+<p>
+If the intention was to provide a /complex/ valued function that
+calculates the magnitude of its argument, this should be
+explicitly specified. In TR1, the categorization under "C
+compatibility" is definitely wrong, since C99 does not provide
+such a complex valued function.
+</p>
+<p>
+Also, it remains questionable if such a complex valued function
+is really needed, since complex&lt;T&gt; supports construction and
+assignment from real valued arguments. There is no difference
+in observable behaviour between
+</p>
+<blockquote><pre> complex&lt;double&gt; x, y;
+ y = fabs(x);
+ complex&lt;double&gt; z(fabs(x));
+</pre></blockquote>
+<p>
+and
+</p>
+<blockquote><pre> complex&lt;double&gt; x, y;
+ y = abs(x);
+ complex&lt;double&gt; z(abs(x));
+</pre></blockquote>
+<p>
+If on the other hand the intention was to provide the intended
+functionality of C99, fabs() should be either declared deprecated
+or (for C++0X) removed from the standard, since the functionality
+is already provided by the corresponding overloads of abs().
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change the synopsis in 26.3.1 [complex.synopsis]:
+</p>
+
+<blockquote><pre>template&lt;class T&gt; <del>complex&lt;</del>T<del>&gt;</del> fabs(const complex&lt;T&gt;&amp;);
+</pre></blockquote>
+
+<p>
+Change 26.3.7 [complex.value.ops], p7:
+</p>
+
+<blockquote>
+<pre>template&lt;class T&gt; <del>complex&lt;</del>T<del>&gt;</del> fabs(const complex&lt;T&gt;&amp; <i>x</i>);
+</pre>
+<blockquote>
+<p>
+-7- <i>Effects:</i> Behaves the same as C99 function <tt>cabs</tt>, defined in subclause 7.3.8.1.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): Change the return type of <tt>fabs(complex)</tt> to <tt>T</tt>.
+Proposed Disposition: Ready
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="596"></a>596. 27.8.1.3 Table 112 omits "a+" and "a+b" modes</h3>
+<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2006-09-26</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In testing 27.8.1.4 [filebuf.members], Table 112 (in the latest N2009 draft), we invoke
+</p>
+<blockquote><pre> ostr.open("somename", ios_base::out | ios_base::in | ios_base::app)
+</pre></blockquote>
+<p>
+and we expect the open to fail, because out|in|app is not listed in
+Table 92, and just before the table we see very specific words:
+</p>
+<blockquote><p>
+ If mode is not some combination of flags shown in the table
+ then the open fails.
+</p></blockquote>
+<p>
+But the corresponding table in the C standard, 7.19.5.3, provides two
+modes "a+" and "a+b", to which the C++ modes out|in|app and
+out|in|app|binary would presumably apply.
+</p>
+<p>
+We would like to argue that the intent of Table 112 was to match the
+semantics of 7.19.5.3 and that the omission of "a+" and "a+b" was
+unintentional. (Otherwise there would be valid and useful behaviors
+available in C file I/O which are unavailable using C++, for no
+valid functional reason.)
+</p>
+<p>
+We further request that the missing modes be explicitly restored to
+the WP, for inclusion in C++0x.
+</p>
+
+<p><i>[
+Martin adds:
+]</i></p>
+
+
+<p>
+...besides "a+" and "a+b" the C++ table is also missing a row
+for a lone app bit which in at least two current implementation
+as well as in Classic Iostreams corresponds to the C stdio "a"
+mode and has been traditionally documented as implying ios::out.
+Which means the table should also have a row for in|app meaning
+the same thing as "a+" already proposed in the issue.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to the table "File open modes" in 27.8.1.4 [filebuf.members]:
+</p>
+
+<blockquote>
+<table border="1">
+<caption> File open modes</caption>
+<tbody><tr>
+<th colspan="5"><tt>ios_base</tt> Flag combination</th>
+<th><tt>stdio</tt> equivalent</th>
+</tr>
+<tr>
+<th><tt>binary</tt></th><th><tt>in</tt></th><th><tt>out</tt></th><th><tt>trunc</tt></th><th><tt>app</tt></th><th><tt>&nbsp;</tt></th>
+</tr>
+
+<tr>
+<td>&nbsp;</td> <td>&nbsp;</td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"w"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td>&nbsp;</td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>"a"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"a"</tt></ins></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>"w"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"r"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"r+"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>"w+"</tt></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>+</tt></ins></td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"a+"</tt></ins></td>
+</tr>
+<tr>
+<td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"a+"</tt></ins></td>
+</tr>
+
+<tr>
+<td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"wb"</tt></td>
+</tr>
+<tr>
+<td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>"ab"</tt></td>
+</tr>
+<tr>
+<td><ins><tt>+</tt></ins></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"ab"</tt></ins></td>
+</tr>
+<tr>
+<td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>"wb"</tt></td>
+</tr>
+<tr>
+<td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"rb"</tt></td>
+</tr>
+<tr>
+<td><tt>+</tt></td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><tt>"r+b"</tt></td>
+</tr>
+<tr>
+<td><tt>+</tt></td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td><tt>+</tt></td> <td>&nbsp;</td> <td><tt>"w+b"</tt></td>
+</tr><tr>
+<td><ins><tt>+</tt></ins></td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>+</tt></ins></td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"a+b"</tt></ins></td>
+</tr>
+<tr>
+<td><ins><tt>+</tt></ins></td> <td><ins><tt>+</tt></ins></td> <td>&nbsp;</td> <td>&nbsp;</td> <td><ins><tt>+</tt></ins></td> <td><ins><tt>"a+b"</tt></ins></td>
+</tr>
+
+
+</tbody></table>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007) Added proposed wording and moved to Review.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="597"></a>597. Decimal: The notion of 'promotion' cannot be emulated by user-defined types.</h3>
+<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Daveed Vandevoorde <b>Date:</b> 2006-04-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In a private email, Daveed writes:
+</p>
+<blockquote>
+<p>
+I am not familiar with the C TR, but my guess is that the
+class type approach still won't match a built-in type
+approach because the notion of "promotion" cannot be
+emulated by user-defined types.
+</p>
+<p>
+Here is an example:
+</p>
+</blockquote>
+<pre>
+ struct S {
+ S(_Decimal32 const&amp;); // Converting constructor
+ };
+ void f(S);
+
+ void f(_Decimal64);
+
+ void g(_Decimal32 d) {
+ f(d);
+ }
+</pre>
+
+<blockquote>
+<p>
+If _Decimal32 is a built-in type, the call f(d) will likely
+resolve to f(_Decimal64) because that requires only a
+promotion, whereas f(S) requires a user-defined conversion.
+</p>
+<p>
+If _Decimal32 is a class type, I think the call f(d) will be
+ambiguous because both the conversion to _Decimal64 and the
+conversion to S will be user-defined conversions with neither
+better than the other.
+</p>
+</blockquote>
+<p>
+Robert comments:
+</p>
+<p>In general, a library of arithmetic types cannot exactly emulate the
+behavior of the intrinsic numeric types. There are several ways to tell
+whether an implementation of the decimal types uses compiler
+intrinisics or a library. For example:
+</p>
+<pre> _Decimal32 d1;
+ d1.operator+=(5); // If d1 is a builtin type, this won't compile.
+</pre>
+<p>
+In preparing the decimal TR, we have three options:
+</p>
+<ol>
+<li>require that the decimal types be class types</li>
+<li>require that the decimal types be builtin types, like float and double</li>
+<li>specify a library of class types, but allow enough implementor
+latitude that a conforming implementation could instead provide builtin
+types</li>
+</ol>
+<p>
+We decided as a group to pursue option #3, but that approach implies
+that implementations may not agree on the semantics of certain use
+cases (first example, above), or on whether certain other cases are
+well-formed (second example). Another potentially important problem is
+that, under the present definition of POD, the decimal classes are not
+POD types, but builtins will be.
+</p>
+<p>Note that neither example above implies any problems with respect to
+C-to-C++ compatibility, since neither example can be expressed in C.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="606"></a>606. Decimal: allow narrowing conversions</h3>
+<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-15</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In c++std-lib-17205, Martin writes:
+</p>
+<blockquote><p>...was it a deliberate design choice to make narrowing
+assignments ill-formed while permitting narrowing compound assignments?
+For instance:
+</p></blockquote>
+<pre> decimal32 d32;
+ decimal64 d64;
+
+ d32 = 64; // error
+ d32 += 64; // okay
+</pre>
+<p>
+In c++std-lib-17229, Robert responds:
+</p>
+<blockquote><p>It is a vestige of an old idea that I forgot to remove
+from the paper. Narrowing assignments should be permitted. The bug is
+that the converting constructors that cause narrowing should not be
+explicit. Thanks for pointing this out.
+</p></blockquote>
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1. In "3.2.2 Class <code>decimal32</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversions:
+</p>
+<pre> // <i>3.2.2.2 conversion from floating-point type:</i>
+ <del>explicit</del> decimal32(decimal64 <i>d64</i>);
+ <del>explicit</del> decimal32(decimal128 <i>d128</i>);
+</pre>
+<p>
+2. Do the same thing in "3.2.2.2. Conversion from floating-point type."
+</p>
+<p>
+3. In "3.2.3 Class <code>decimal64</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversion:
+</p>
+<pre> // <i>3.2.3.2 conversion from floating-point type:</i>
+ <del>explicit</del> decimal64(decimal128 <i>d128</i>);
+</pre>
+<p>
+4. Do the same thing in "3.2.3.2. Conversion from floating-point type."
+</p>
+
+<p><i>[
+Redmond: We prefer explicit conversions for narrowing and implicit for widening.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="612"></a>612. numeric_limits::is_modulo insufficently defined</h3>
+<p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2006-11-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+18.2.1.2 55 states that "A type is modulo if it is possible to add two
+positive numbers together and have a result that wraps around to a
+third number that is less".
+This seems insufficent for the following reasons:
+</p>
+
+<ol>
+<li>Doesn't define what that value recieved is.</li>
+<li>Doesn't state the result is repeatable</li>
+<li> Doesn't require that doing addition, subtraction and other
+operations on all values is defined behaviour.</li>
+</ol>
+
+<p><i>[
+Batavia: Related to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2144.pdf">N2144</a>.
+Pete: is there an ISO definition of modulo? Underflow on signed behavior is undefined.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Suggest 18.2.1.2 [numeric.limits.members[numeric.limits.members], paragraph 57 is ammeded to:
+</p>
+
+<blockquote><p>
+A type is modulo if<ins>,</ins> <del>it is possible to add two positive numbers
+and have a result that wraps around to a third number that is less.</del>
+<ins>given any operation involving +,- or * on values of that type whose value
+would fall outside the range <tt>[min(), max()]</tt>, then the value returned
+differs from the true value by an integer multiple of <tt>(max() - min() +
+1)</tt>.</ins>
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="614"></a>614. std::string allocator requirements still inconsistent</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This is based on N2134, where 21.3.1/2 states:
+"... The Allocator object used shall be a copy of the Allocator object
+passed to the basic_string object's constructor or, if the constructor does
+not take an Allocator argument, a copy of a default-constructed Allocator
+object."
+</p>
+<p>
+Section 21.3.2/1 lists two constructors:
+</p>
+<blockquote><pre>basic_string(const basic_string&lt;charT,traits,Allocator&gt;&amp; str );
+
+basic_string(const basic_string&lt;charT,traits,Allocator&gt;&amp; str ,
+ size_type pos , size_type n = npos,
+ const Allocator&amp; a = Allocator());
+</pre></blockquote>
+<p>
+and then says "In the first form, the Allocator value used is copied from
+str.get_allocator().", which isn't an option according to 21.3.1.
+</p>
+<p><i>[
+Batavia: We need blanket statement to the effect of:
+]</i></p>
+
+
+<ol>
+<li>If an allocator is passed in, use it, or,</li>
+<li>If a string is passed in, use its allocator.</li>
+</ol>
+<p><i>[
+Review constructors and functions that return a string; make sure we follow these
+rules (substr, operator+, etc.). Howard to supply wording.
+]</i></p>
+
+
+<p><i>[
+Bo adds: The new container constructor which takes only a <tt>size_type</tt> is not
+consistent with 23.1 [container.requirements], p9 which says in part:
+
+<blockquote>
+All other constructors for these container types take an
+<tt>Allocator&amp;</tt> argument (20.1.2), an allocator whose value type
+is the same as the container's value type. A copy of this argument is
+used for any memory allocation performed, by these constructors and by
+all member functions, during the lifetime of each container object.
+</blockquote>
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="617"></a>617. std::array is a sequence that doesn't satisfy the sequence requirements?</h3>
+<p><b>Section:</b> 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-30</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The <tt>&lt;array&gt;</tt> header is given under 23.2 [sequences].
+23.2.1 [array]/paragraph 3 says:
+</p>
+<blockquote><p>
+"Unless otherwise specified, all array operations are as described in
+23.1 [container.requirements]".
+</p></blockquote>
+<p>
+However, array isn't mentioned at all in section 23.1 [container.requirements].
+In particular, Table 82 "Sequence requirements" lists several operations (insert, erase, clear)
+that std::array does not have in 23.2.1 [array].
+</p>
+<p>
+Also, Table 83 "Optional sequence operations" lists several operations that
+std::array does have, but array isn't mentioned.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="618"></a>618. valarray::cshift() effects on empty array</h3>
+<p><b>Section:</b> 26.5.2.7 [valarray.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2007-01-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I would respectfully request an issue be opened with the intention to
+clarify the wording for <tt>size() == 0</tt> for <tt>cshift</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.5.2.7 [valarray.members], paragraph 10:
+</p>
+
+<blockquote>
+
+<pre>valarray&lt;T&gt; cshift(int <i>n</i>) const;
+</pre>
+
+<blockquote>
+<p>
+This function returns an object of class <tt>valarray&lt;T&gt;</tt>, of
+length <tt>size()</tt>, <del>each of whose elements <tt>I</tt> is
+<tt>(*this)[(I + n ) % size()]</tt>. Thus, if element zero is taken as
+the leftmost element, a positive value of <i>n</i> shifts the elements
+circularly left <i>n</i> places.</del> <ins>that is a circular shift of <tt>*this</tt>. If
+element zero is taken as the leftmost element, a non-negative value of
+<i>n</i> shifts the elements circularly left <i>n</i> places and a
+negative value of <i>n</i> shifts the elements circularly right
+-<i>n</i> places.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+We do not believe that there is any real ambiguity about what happens
+when <tt>size() == 0</tt>, but we do believe that spelling this out as a C++
+expression causes more trouble that it solves. The expression is
+certainly wrong when <tt>n &lt; 0</tt>, since the sign of % with negative arguments
+is implementation defined.
+</p>
+
+
+<p><i>[
+Kona (2007) Changed proposed wording, added rationale and set to Review.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="620"></a>620. valid uses of empty valarrays</h3>
+<p><b>Section:</b> 26.5.2.1 [valarray.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The <i>Effects</i> clause for the default <code>valarray</code> ctor
+suggests that it is possible to increase the size of an empty
+<code>valarray</code> object by calling other non-const member
+functions of the class besides <code>resize()</code>. However, such an
+interpretation would be contradicted by the requirement on the copy
+assignment operator (and apparently also that on the computed
+assignments) that the assigned arrays be the same size. See the
+reflector discussion starting with c++std-lib-17871.
+
+ </p>
+ <p>
+
+In addition, <i>Footnote</i> 280 uses some questionable normative
+language.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Reword the <i>Effects</i> clause and <i>Footnote 280</i> as follows (26.5.2.1 [valarray.cons]):
+
+ </p>
+ <blockquote>
+ <p>
+
+<code>valarray();</code>
+
+ </p>
+ <p>
+
+<i>Effects</i>: Constructs an object of class
+<code>valarray&lt;T&gt;</code>,<sup>279)</sup> which has zero
+length<del> until it is passed into a library function as a modifiable
+lvalue or through a non-constant this pointer</del>.<sup>280)</sup>
+
+ </p>
+ <p>
+
+<ins><i>Postcondition</i>: <code>size() == 0</code>.</ins>
+
+ </p>
+ <p>
+
+<i>Footnote 280</i>: This default constructor is essential, since
+arrays of <code>valarray</code> <del>are likely to prove useful.
+There shall also be a way to change the size of an array after
+initialization; this is supplied by the semantics</del> <ins>may be
+useful. The length of an empty array can be increased after
+initialization by means</ins> of the <code>resize()</code> member
+function.
+
+ </p>
+ </blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="621"></a>621. non-const copy assignment operators of helper arrays</h3>
+<p><b>Section:</b> 26.5 [numarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numarray">issues</a> in [numarray].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The computed and "fill" assignment operators of <code>valarray</code>
+helper array class templates (<code>slice_array</code>,
+<code>gslice_array</code>, <code>mask_array</code>, and
+<code>indirect_array</code>) are const member functions of each class
+template (the latter by the resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#123">123</a>
+since they have reference semantics and thus do not affect
+the state of the object on which they are called. However, the copy
+assignment operators of these class templates, which also have
+reference semantics, are non-const. The absence of constness opens
+the door to speculation about whether they really are intended to have
+reference semantics (existing implementations vary widely).
+
+ </p>
+
+<p>
+Pre-Kona, Martin adds:
+</p>
+
+<p>
+I realized that adding the const qualifier to the
+functions as I suggested would break the const correctness of the
+classes. A few possible solutions come to mind:
+</p>
+
+<ol>
+<li>Add the const qualifier to the return types of these functions.</li>
+<li>Change the return type of all the functions to void to match
+the signatures of all the other assignment operators these classes
+define.</li>
+<li>Prohibit the copy assignment of these classes by declaring the
+copy assignment operators private (as is done and documented by
+some implementations).</li>
+</ol>
+
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Declare the copy assignment operators of all four helper array
+class templates const.
+
+ </p>
+ <p>
+
+Specifically, make the following edits:
+
+ </p>
+ <p>
+
+Change the signature in 26.5.5 [template.slice.array] and
+26.5.5.1 [slice.arr.assign] as follows:
+
+ </p>
+ <blockquote><pre>
+<code><ins>const</ins> slice_array&amp; operator= (const slice_array&amp;)<ins> const</ins>;</code>
+
+ </pre></blockquote>
+ <p>
+
+Change the signature in 26.5.7 [template.gslice.array] and
+26.5.7.1 [gslice.array.assign] as follows:
+
+ </p>
+ <blockquote><pre>
+<code><ins>const</ins> gslice_array&amp; operator= (const gslice_array&amp;)<ins> const</ins>;</code>
+
+ </pre></blockquote>
+ <p>
+
+Change the signature in 26.5.8 [template.mask.array] and 26.5.8.1 [mask.array.assign] as
+follows:
+
+ </p>
+ <blockquote><pre>
+<code><ins>const</ins> mask_array&amp; operator= (const mask_array&amp;)<ins> const</ins>;</code>
+
+ </pre></blockquote>
+ <p>
+
+Change the signature in 26.5.9 [template.indirect.array] and
+26.5.9.1 [indirect.array.assign] as follows:
+
+ </p>
+ <blockquote><pre>
+<code><ins>const</ins> indirect_array&amp; operator= (const indirect_array&amp;)<ins> const</ins>;</code>
+
+ </pre></blockquote>
+
+
+<p><i>[
+Kona (2007) Added const qualification to the return types and set to Ready.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="622"></a>622. behavior of <code>filebuf</code> dtor and <code>close</code> on error</h3>
+<p><b>Section:</b> 27.8.1.17 [fstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+<code>basic_filebuf</code> dtor is specified to have the following
+straightforward effects:
+
+ </p>
+ <blockquote><p>
+
+<i>Effects</i>: Destroys an object of class
+<code>basic_filebuf</code>. Calls <code>close()</code>.
+
+ </p></blockquote>
+ <p>
+
+<code>close()</code> does a lot of potentially complicated processing,
+including calling <code>overflow()</code> to write out the termination
+sequence (to bring the output sequence to its initial shift
+state). Since any of the functions called during the processing can
+throw an exception, what should the effects of an exception be on the
+dtor? Should the dtor catch and swallow it or should it propagate it
+to the caller? The text doesn't seem to provide any guidance in this
+regard other than the general restriction on throwing (but not
+propagating) exceptions from destructors of library classes in
+17.4.4.8 [res.on.exception.handling].
+
+ </p>
+ <p>
+
+Further, the last thing <code>close()</code> is specified to do is
+call <code>fclose()</code> to close the <code>FILE</code> pointer. The
+last sentence of the <i>Effects</i> clause reads:
+
+ </p>
+ <blockquote><p>
+
+... If any of the calls to <code>overflow</code> or
+<code>std::fclose</code> fails then <code>close</code> fails.
+
+ </p></blockquote>
+ <p>
+
+This suggests that <code>close()</code> might be required to call
+<code>fclose()</code> if and only if none of the calls to
+<code>overflow()</code> fails, and avoid closing the <code>FILE</code>
+otherwise. This way, if <code>overflow()</code> failed to flush out
+the data, the caller would have the opportunity to try to flush it
+again (perhaps after trying to deal with whatever problem may have
+caused the failure), rather than losing it outright.
+
+ </p>
+ <p>
+
+On the other hand, the function's <i>Postcondition</i> specifies that
+<code>is_open() == false</code>, which suggests that it should call
+<code>fclose()</code> unconditionally. However, since
+<i>Postcondition</i> clauses are specified for many functions in the
+standard, including constructors where they obviously cannot apply
+after an exception, it's not clear whether this <i>Postcondition</i>
+clause is intended to apply even after an exception.
+
+ </p>
+ <p>
+
+It might be worth noting that the traditional behavior (Classic
+Iostreams <code>fstream::close()</code> and C <code>fclose()</code>)
+is to close the <code>FILE</code> unconditionally, regardless of
+errors.
+
+ </p>
+
+<p><i>[
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#397">397</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#418">418</a> for related issues.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+After discussing this on the reflector (see the thread starting with
+c++std-lib-17650) we propose that <code>close()</code> be clarified to
+match the traditional behavior, that is to close the <code>FILE</code>
+unconditionally, even after errors or exceptions. In addition, we
+propose the dtor description be amended so as to explicitly require it
+to catch and swallow any exceptions thrown by <code>close()</code>.
+
+ </p>
+ <p>
+
+Specifically, we propose to make the following edits in
+27.8.1.4 [filebuf.members]:
+
+ </p>
+ <blockquote>
+ <pre>
+<code>basic_filebuf&lt;charT,traits&gt;* close();</code>
+
+ </pre>
+ <p>
+
+<i>Effects</i>: If <code>is_open() == false</code>, returns a null
+pointer. If a put area exists, calls
+<code>overflow(traits::eof())</code> to flush characters. If the last
+virtual member function called on <code>*this</code> (between
+<code>underflow</code>, <code>overflow</code>, <code>seekoff</code>,
+and <code>seekpos</code>) was <code>overflow</code> then calls
+<code>a_codecvt.unshift</code> (possibly several times) to determine a
+termination sequence, inserts those characters and calls
+<code>overflow(traits::eof())</code> again. Finally<ins>, regardless
+of whether any of the preceding calls fails or throws an exception,
+the function</ins> <del>it</del> closes the file ("as if" by calling
+<code>std::fclose(file)</code>).<sup>334)</sup> If any of the calls
+<ins>made by the function</ins><del>to <code>overflow</code>
+or</del><ins>, including </ins><code>std::fclose</code><ins>, </ins>
+fails then <code>close</code> fails<ins> by returning a null pointer.
+If one of these calls throws an exception, the exception is caught and
+rethrown after closing the file.</ins>
+
+ </p>
+ </blockquote>
+ <p>
+
+And to make the following edits in 27.8.1.2 [filebuf.cons].
+
+ </p>
+ <blockquote>
+ <pre>
+<code>virtual ~basic_filebuf();</code>
+
+ </pre>
+ <p>
+
+<i>Effects</i>: Destroys an object of class
+<code>basic_filebuf&lt;charT,traits&gt;</code>. Calls
+<code>close()</code>. <ins>If an exception occurs during the
+destruction of the object, including the call to <code>close()</code>,
+the exception is caught but not rethrown (see
+17.4.4.8 [res.on.exception.handling]).</ins>
+
+ </p>
+ </blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="623"></a>623. <code>pubimbue</code> forbidden to call <code>imbue</code></h3>
+<p><b>Section:</b> 27.1.1 [iostream.limits.imbue] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+27.1.1 [iostream.limits.imbue] specifies that "no function described in
+clause 27 except for <code>ios_base::imbue</code> causes any instance
+of <code>basic_ios::imbue</code> or
+<code>basic_streambuf::imbue</code> to be called."
+
+ </p>
+ <p>
+
+That contradicts the <i>Effects</i> clause for
+<code>basic_streambuf::pubimbue()</code> which requires the function
+to do just that: call <code>basic_streambuf::imbue()</code>.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+To fix this, rephrase the sentence above to allow
+<code>pubimbue</code> to do what it was designed to do. Specifically.
+change 27.1.1 [iostream.limits.imbue], p1 to read:
+
+ </p>
+ <blockquote><p>
+
+No function described in clause 27 except for
+<code>ios_base::imbue</code> <ins>and <code>basic_filebuf::pubimbue</code></ins>
+causes any instance of <code>basic_ios::imbue</code> or
+<code>basic_streambuf::imbue</code> to be called. ...
+
+ </p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="624"></a>624. <code>valarray</code> assignment and arrays of unequal length</h3>
+<p><b>Section:</b> 26.5.2.2 [valarray.assign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The behavior of the <code>valarray</code> copy assignment operator is
+defined only when both sides have the same number of elements and the
+spec is explicit about assignments of arrays of unequal lengths having
+undefined behavior.
+
+ </p>
+ <p>
+
+However, the generalized subscripting assignment operators overloaded
+on <code>slice_array</code> et al (26.5.2.2 [valarray.assign]) don't have any
+such restriction, leading the reader to believe that the behavior of
+these overloads is well defined regardless of the lengths of the
+arguments.
+
+ </p>
+ <p>
+
+For example, based on the reading of the spec the behavior of the
+snippet below can be expected to be well-defined:
+
+ </p>
+ <pre> const std::slice from_0_to_3 (0, 3, 1); // refers to elements 0, 1, 2
+ const std::valarray&lt;int&gt; a (1, 3); // a = { 1, 1, 1 }
+ std::valarray&lt;int&gt; b (2, 4); // b = { 2, 2, 2, 2 }
+
+ b = a [from_0_to_3];
+ </pre>
+ <p>
+
+In practice, <code>b</code> may end up being <code>{ 1, 1, 1 }</code>,
+<code>{ 1, 1, 1, 2 }</code>, or anything else, indicating that
+existing implementations vary.
+
+ </p>
+
+<p>
+Quoting from Section 3.4, Assignment operators, of Al Vermeulen's
+Proposal for Standard C++ Array Classes (see c++std-lib-704;
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0308.asc">N0308</a>):
+</p>
+<blockquote><p>
+ ...if the size of the array on the right hand side of the equal
+ sign differs from the size of the array on the left, a run time
+ error occurs. How this error is handled is implementation
+ dependent; for compilers which support it, throwing an exception
+ would be reasonable.
+</p></blockquote>
+
+<p>
+And see more history in
+<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/1993/N0280.pdf">N0280</a>.
+</p>
+
+ <p>
+
+It has been argued in discussions on the committee's reflector that
+the semantics of all <code>valarray</code> assignment operators should
+be permitted to be undefined unless the length of the arrays being
+assigned is the same as the length of the one being assigned from. See
+the thread starting at c++std-lib-17786.
+
+ </p>
+ <p>
+
+In order to reflect such views, the standard must specify that the
+size of the array referred to by the argument of the assignment must
+match the size of the array under assignment, for example by adding a
+<i>Requires</i> clause to 26.5.2.2 [valarray.assign] as follows:
+
+ </p>
+ <blockquote><p>
+
+<i>Requires</i>: The length of the array to which the argument refers
+equals <code>size()</code>.
+
+ </p></blockquote>
+
+ <p>
+
+Note that it's far from clear that such leeway is necessary in order
+to implement <code>valarray</code> efficiently.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Insert new paragraph into 26.5.2.2 [valarray.assign]:
+</p>
+
+<blockquote>
+<pre>valarray&lt;T&gt;&amp; operator=(const slice_array&lt;T&gt;&amp;);
+valarray&lt;T&gt;&amp; operator=(const gslice_array&lt;T&gt;&amp;);
+valarray&lt;T&gt;&amp; operator=(const mask_array&lt;T&gt;&amp;);
+valarray&lt;T&gt;&amp; operator=(const indirect_array&lt;T&gt;&amp;);
+</pre>
+<blockquote>
+<p><ins>
+<i>Requires</i>: The length of the array to which the argument refers
+equals <code>size()</code>.
+</ins></p>
+<p>
+These operators allow the results of a generalized subscripting operation to be assigned directly to a <tt>valarray</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="625"></a>625. mixed up <i>Effects</i> and <i>Returns</i> clauses</h3>
+<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Many member functions of <code>basic_string</code> are overloaded,
+with some of the overloads taking a <code>string</code> argument,
+others <code>value_type*</code>, others <code>size_type</code>, and
+others still <code>iterators</code>. Often, the requirements on one of
+the overloads are expressed in the form of <i>Effects</i>,
+<i>Throws</i>, and in the Working Paper
+(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
+also <i>Remark</i> clauses, while those on the rest of the overloads
+via a reference to this overload and using a <i>Returns</i> clause.
+
+ </p><p>
+ </p>
+
+The difference between the two forms of specification is that per
+17.3.1.3 [structure.specifications], p3, an <i>Effects</i> clause specifies
+<i>"actions performed by the functions,"</i> i.e., its observable
+effects, while a <i>Returns</i> clause is <i>"a description of the
+return value(s) of a function"</i> that does not impose any
+requirements on the function's observable effects.
+
+ <p>
+ </p>
+
+Since only <i>Notes</i> are explicitly defined to be informative and
+all other paragraphs are explicitly defined to be normative, like
+<i>Effects</i> and <i>Returns</i>, the new <i>Remark</i> clauses also
+impose normative requirements.
+
+ <p>
+ </p>
+
+So by this strict reading of the standard there are some member
+functions of <code>basic_string</code> that are required to throw an
+exception under some conditions or use specific traits members while
+many other otherwise equivalent overloads, while obliged to return the
+same values, aren't required to follow the exact same requirements
+with regards to the observable effects.
+
+ <p>
+ </p>
+
+Here's an example of this problem that was precipitated by the change
+from informative Notes to normative <i>Remark</i>s (presumably made to
+address <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#424">424</a>):
+
+ <p>
+ </p>
+
+In the Working Paper, <code>find(string, size_type)</code> contains a
+<i>Remark</i> clause (which is just a <i>Note</i> in the current
+standard) requiring it to use <code>traits::eq()</code>.
+
+ <p>
+ </p>
+
+<code>find(const charT *s, size_type pos)</code> is specified to
+return <code>find(string(s), pos)</code> by a <i>Returns</i> clause
+and so it is not required to use <code>traits::eq()</code>. However,
+the Working Paper has replaced the original informative <i>Note</i>
+about the function using <code>traits::length()</code> with a
+normative requirement in the form of a <i>Remark</i>. Calling
+<code>traits::length()</code> may be suboptimal, for example when the
+argument is a very long array whose initial substring doesn't appear
+anywhere in <code>*this</code>.
+
+ <p>
+ </p>
+
+Here's another similar example, one that existed even prior to the
+introduction of <i>Remark</i>s:
+
+ <p>
+ </p>
+
+<code> insert(size_type pos, string, size_type, size_type)</code> is
+required to throw <code>out_of_range</code> if <code>pos &gt;
+size()</code>.
+
+ <p>
+ </p>
+
+<code>insert(size_type pos, string str)</code> is specified to return
+<code>insert(pos, str, 0, npos)</code> by a <i>Returns</i> clause and
+so its effects when <code>pos &gt; size()</code> are strictly speaking
+unspecified.
+
+
+ <p>
+
+I believe a careful review of the current <i>Effects</i> and
+<i>Returns</i> clauses is needed in order to identify all such
+problematic cases. In addition, a review of the Working Paper should
+be done to make sure that the newly introduced normative <i>Remark</i>
+clauses do not impose any undesirable normative requirements in place
+of the original informative <i>Notes</i>.
+
+ </p>
+<p><i>[
+Batavia: Alan and Pete to work.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="626"></a>626. new <i>Remark</i> clauses not documented</h3>
+<p><b>Section:</b> 17.3.1.3 [structure.specifications] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#structure.specifications">issues</a> in [structure.specifications].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The <i>Remark</i> clauses newly introduced into the Working Paper
+(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
+are not mentioned in 17.3.1.3 [structure.specifications] where we list the
+meaning of <i>Effects</i>, <i>Requires</i>, and other clauses (with
+the exception of <i>Notes</i> which are documented as informative in
+17.3.1.1 [structure.summary], p2, and which they replace in many cases).
+
+ </p>
+ <p>
+
+Propose add a bullet for <i>Remarks</i> along with a brief description.
+
+ </p>
+<p><i>[
+Batavia: Alan and Pete to work.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="627"></a>627. Low memory and exceptions</h3>
+<p><b>Section:</b> 18.5.1.1 [new.delete.single] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-01-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.single">issues</a> in [new.delete.single].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I recognize the need for nothrow guarantees in the exception reporting
+mechanism, but I strongly believe that implementors also need an escape hatch
+when memory gets really low. (Like, there's not enough heap to construct and
+copy exception objects, or not enough stack to process the throw.) I'd like to
+think we can put this escape hatch in 18.5.1.1 [new.delete.single],
+<tt>operator new</tt>, but I'm not sure how to do it. We need more than a
+footnote, but the wording has to be a bit vague. The idea is that if
+<tt>new</tt> can't allocate something sufficiently small, it has the right to
+<tt>abort</tt>/call <tt>terminate</tt>/call <tt>unexpected</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="629"></a>629. complex<t> insertion and locale dependence</t></h3>
+<p><b>Section:</b> 26.3.6 [complex.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2007-01-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.ops">issues</a> in [complex.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+is there an issue opened for (0,3) as complex number with
+the French local? With the English local, the above parses as an
+imaginery complex number. With the French locale it parses as a
+real complex number.
+</p>
+
+<p>
+Further notes/ideas from the lib-reflector, messages 17982-17984:
+</p>
+
+<blockquote>
+<p>
+Add additional entries in num_punct to cover the complex separator (French would be ';').
+</p>
+<p>
+Insert a space before the comma, which should eliminate the ambiguity.
+</p>
+<p>
+Solve the problem for ordered sequences in general, perhaps with a
+dedicated facet. Then complex should use that solution.
+</p>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="630"></a>630. arrays of valarray</h3>
+<p><b>Section:</b> 26.5.2.1 [valarray.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-28</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Section 26.1 [numeric.requirements], p1 suggests that a
+<code>valarray</code> specialization on a type <code>T</code> that
+satisfies the requirements enumerated in the paragraph is itself a
+valid type on which <code>valarray</code> may be instantiated
+(Footnote 269 makes this clear). I.e.,
+<code>valarray&lt;valarray&lt;T&gt; &gt;</code> is valid as long as
+<code>T</code> is valid. However, since implementations of
+<code>valarray</code> are permitted to initialize storage allocated by
+the class by invoking the default ctor of <code>T</code> followed by
+the copy assignment operator, such implementations of
+<code>valarray</code> wouldn't work with (perhaps user-defined)
+specializations of <code>valarray</code> whose assignment operator had
+undefined behavior when the size of its argument didn't match the size
+of <code>*this</code>. By <i>"wouldn't work"</i> I mean that it would
+be impossible to resize such an array of arrays by calling the
+<code>resize()</code> member function on it if the function used the
+copy assignment operator after constructing all elements using the
+default ctor (e.g., by invoking <code>new value_type[N]</code>) to
+obtain default-initialized storage) as it's permitted to do.
+
+ </p>
+ <p>
+
+Stated more generally, the problem is that
+<code>valarray&lt;valarray&lt;T&gt; &gt;::resize(size_t)</code> isn't
+required or guaranteed to have well-defined semantics for every type
+<code>T</code> that satisfies all requirements in
+26.1 [numeric.requirements].
+
+ </p>
+ <p>
+
+I believe this problem was introduced by the adoption of the
+resolution outlined in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1996/N0857.asc">N0857</a>,
+<i>Assignment of valarrays</i>, from 1996. The copy assignment
+operator of the original numerical array classes proposed in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0280.pdf">N0280</a>,
+as well as the one proposed in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0308.asc">N0308</a>
+(both from 1993), had well-defined semantics for arrays of unequal
+size (the latter explicitly only when <code>*this</code> was empty;
+assignment of non empty arrays of unequal size was a runtime error).
+
+ </p>
+ <p>
+
+The justification for the change given in N0857 was the "loss of
+performance [deemed] only significant for very simple operations on
+small arrays or for architectures with very few registers."
+
+ </p>
+ <p>
+
+Since tiny arrays on a limited subset of hardware architectures are
+likely to be an exceedingly rare case (despite the continued
+popularity of x86) I propose to revert the resolution and make the
+behavior of all <code>valarray</code> assignment operators
+well-defined even for non-conformal arrays (i.e., arrays of unequal
+size). I have implemented this change and measured no significant
+degradation in performance in the common case (non-empty arrays of
+equal size). I have measured a 50% (and in some cases even greater)
+speedup in the case of assignments to empty arrays versus calling
+<code>resize()</code> first followed by an invocation of the copy
+assignment operator.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Change 26.5.2.2 [valarray.assign], p1 as follows:
+
+ </p>
+ <blockquote>
+ <p>
+ <code>
+
+valarray&lt;T&gt;&amp; operator=(const valarray&lt;T&gt;&amp;<ins> x</ins>);
+
+ </code>
+ </p>
+ <p>
+
+-1- Each element of the <code>*this</code> array is assigned the value
+of the corresponding element of the argument array. <del>The
+resulting behavior is undefined if </del><ins>When </ins>the length of
+the argument array is not equal to the length of the *this
+array<del>.</del><ins> resizes <code>*this</code> to make the two
+arrays the same length, as if by calling
+<code>resize(x.size())</code>, before performing the assignment.</ins>
+
+ </p>
+ </blockquote>
+ <p>
+
+And add a new paragraph just below paragraph 1 with the following
+text:
+
+ </p>
+ <blockquote>
+ <p>
+
+<ins>-2- <i>Postcondition</i>: <code>size() == x.size()</code>.</ins>
+
+ </p>
+ </blockquote>
+ <p>
+
+Also add the following paragraph to 26.5.2.2 [valarray.assign], immediately after p4:
+
+ </p>
+ <blockquote>
+ <p>
+
+<ins>-?- When the length, <i><code>N</code></i> of the array referred
+to by the argument is not equal to the length of <code>*this</code>,
+the operator resizes <code>*this</code> to make the two arrays the
+same length, as if by calling <code>resize(<i>N</i>)</code>, before
+performing the assignment.</ins>
+
+ </p>
+ </blockquote>
+
+
+<p><i>[
+Kona (2007): Gaby to propose wording for an alternative resolution in
+which you can assign to a <tt>valarray</tt> of size 0, but not to any other
+<tt>valarray</tt> whose size is unequal to the right hand side of the assignment.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="631"></a>631. conflicting requirements for <tt>BinaryPredicate</tt></h3>
+<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> James Kanze <b>Date:</b> 2007-01-31</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The general requirements for <tt><tt>BinaryPredicate</tt></tt> (in 25 [algorithms]/8) contradict the implied specific requirements for
+some functions. In particular, it says that:
+</p>
+
+<blockquote><p>
+[...] if an algorithm takes <tt>BinaryPredicate <i>binary_pred</i></tt>
+as its argument and <tt><i>first1</i></tt> and <i>first2</i> as its
+iterator arguments, it should work correctly in the construct <tt>if
+(binary_pred (*<i>first1</i> , *<i>first2</i> )){...}</tt>.
+<tt>BinaryPredicate</tt> always takes the first iterator type as its
+first argument, that is, in those cases when <tt>T <i>value</i></tt> is
+part of the signature, it should work correctly in the context of <tt>if
+(binary_pred (*<i>first1</i> , <i>value</i>)){...}</tt>.
+</p></blockquote>
+
+<p>
+In the description of <tt>upper_bound</tt> (25.3.3.2 [upper.bound]/2), however, the use is described as
+"<tt>!comp(<i>value</i>, <i>e</i>)</tt>", where <tt><i>e</i></tt> is an
+element of the sequence (a result of dereferencing
+<tt>*<i>first</i></tt>).
+</p>
+
+<p>
+In the description of <tt>lexicographical_compare</tt>, we have both
+"<tt>*<i>first1</i> &lt; *<i>first2</i></tt>" and "<tt>*<i>first2</i>
+&lt; *<i>first1</i></tt>" (which presumably implies "<tt>comp(
+*<i>first1</i>, *<i>first2</i> )</tt>" and "<tt>comp( *<i>first2</i>,
+*<i>first1</i> )</tt>".
+</p>
+
+<p><i>[
+Toronto: Moved to Open. ConceptGCC seems to get <tt>lower_bound</tt>
+and <tt>upper_bound</tt> to work withoutt these changes.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Logically, the <tt>BinaryPredicate</tt> is used as an ordering
+relationship, with the semantics of "less than". Depending on the
+function, it may be used to determine equality, or any of the inequality
+relationships; doing this requires being able to use it with either
+parameter first. I would thus suggest that the requirement be:
+</p>
+
+<blockquote><p>
+[...] <tt>BinaryPredicate</tt> always takes the first iterator
+<tt>value_type</tt> as one of its arguments, it is unspecified which. If
+an algorithm takes <tt>BinaryPredicate <i>binary_pred</i></tt> as its
+argument and <tt><i><i>first1</i></i></tt> and <i>first2</i> as its
+iterator arguments, it should work correctly both in the construct
+<tt>if (binary_pred (*<i>first1</i> , *<i>first2</i> )){...}</tt> and
+<tt>if (binary_pred (*<i>first2</i>, *<i>first1</i>)){...}</tt>. In
+those cases when <tt>T <i>value</i></tt> is part of the signature, it
+should work correctly in the context of <tt>if (binary_pred
+(*<i>first1</i> , <i>value</i>)){...}</tt> and of <tt>if (binary_pred
+(<i>value</i>, *<i>first1</i>)){...}</tt>. [<i>Note:</i> if the two
+types are not identical, and neither is convertable to the other, this
+may require that the <tt>BinaryPredicate</tt> be a functional object
+with two overloaded <tt>operator()()</tt> functions. <i>--end note</i>]
+</p></blockquote>
+
+<p>
+Alternatively, one could specify an order for each function. IMHO, this
+would be more work for the committee, more work for the implementors,
+and of no real advantage for the user: some functions, such as
+<tt>lexicographical_compare</tt> or <tt>equal_range</tt>, will still require both
+functions, and it seems like a much easier rule to teach that both
+functions are always required, rather than to have a complicated list of
+when you only need one, and which one.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="632"></a>632. Time complexity of size() for std::set</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Lionel B <b>Date:</b> 2007-02-01</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A recent news group discussion:
+</p>
+<blockquote>
+<p>
+Anyone know if the Standard has anything to say about the time complexity
+of size() for std::set? I need to access a set's size (/not/ to know if it is empty!) heavily
+during an algorithm and was thus wondering whether I'd be better off
+tracking the size "manually" or whether that'd be pointless.
+</p>
+<p>
+That would be pointless. size() is O(1).
+</p>
+<p>
+Nit: the standard says "should" have constant time. Implementations may take
+license to do worse. I know that some do this for <tt>std::list&lt;&gt;</tt> as a part of
+some trade-off with other operation.
+</p>
+
+<p>
+I was aware of that, hence my reluctance to use size() for std::set.
+</p>
+<p>
+However, this reason would not apply to <tt>std::set&lt;&gt;</tt> as far as I can see.
+</p>
+<p>
+Ok, I guess the only option is to try it and see...
+</p>
+</blockquote>
+
+<p>
+If I have any recommendation to the C++ Standards Committee it is that
+implementations must (not "should"!) document clearly[1], where known, the
+time complexity of *all* container access operations.
+</p>
+<p>
+[1] In my case (gcc 4.1.1) I can't swear that the time complexity of size()
+for std::set is not documented... but if it is it's certainly well hidden
+away.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><i>[
+Kona (2007): This issue affects all the containers. We'd love to see a
+paper dealing with the broad issue. We think that the complexity of the
+<tt>size()</tt> member of every container -- except possibly <tt>list</tt> -- should be
+O(1). Alan has volunteered to provide wording.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="635"></a>635. domain of <tt>allocator::address</tt></h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-02-08</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The table of allocator requirements in 20.1.2 [allocator.requirements] describes
+<tt>allocator::address</tt> as:
+</p>
+<blockquote><pre>a.address(r)
+a.address(s)
+</pre></blockquote>
+<p>
+where <tt>r</tt> and <tt>s</tt> are described as:
+</p>
+<blockquote><p>
+a value of type <tt>X::reference</tt> obtained by the expression <tt>*p</tt>.
+</p></blockquote>
+
+<p>
+and <tt>p</tt> is
+</p>
+
+<blockquote><p>
+a value of type <tt>X::pointer</tt>, obtained by calling <tt>a1.allocate</tt>,
+where <tt>a1 == a</tt>
+</p></blockquote>
+
+<p>
+This all implies that to get the address of some value of type <tt>T</tt> that
+value must have been allocated by this allocator or a copy of it.
+</p>
+
+<p>
+However sometimes container code needs to compare the address of an external value of
+type <tt>T</tt> with an internal value. For example <tt>list::remove(const T&amp; t)</tt>
+may want to compare the address of the external value <tt>t</tt> with that of a value
+stored within the list. Similarly <tt>vector</tt> or <tt>deque insert</tt> may
+want to make similar comparisons (to check for self-referencing calls).
+</p>
+
+<p>
+Mandating that <tt>allocator::address</tt> can only be called for values which the
+allocator allocated seems overly restrictive.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.1.2 [allocator.requirements]:
+</p>
+
+<blockquote>
+<p>
+<tt>r</tt> : a value of type <tt>X::reference</tt> <del>obtained by the expression *p</del>.
+</p>
+<p>
+<tt>s</tt> : a value of type <tt>X::const_reference</tt> <del>obtained by the
+expression <tt>*q</tt> or by conversion from a value <tt>r</tt></del>.
+</p>
+</blockquote>
+
+<p><i>[
+post Oxford: This would be rendered NAD Editorial by acceptance of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>.
+]</i></p>
+
+
+<p><i>[
+Kona (2007): This issue is section 8 of N2387. There was some discussion of it but
+no resolution to this issue was recorded. Moved to Open.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="638"></a>638. deque end invalidation during erase</h3>
+<p><b>Section:</b> 23.2.2.3 [deque.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Steve LoBasso <b>Date:</b> 2007-02-17</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard states at 23.2.2.3 [deque.modifiers]/4:
+</p>
+<blockquote><pre>deque erase(...)
+</pre>
+ <p>
+<i>Effects:</i> ... An erase at either end of the deque invalidates only
+the iterators and the references to the erased elements.
+</p>
+</blockquote>
+<p>
+This does not state that iterators to end will be invalidated.
+It needs to be amended in such a way as to account for end invalidation.
+</p>
+<p>
+Something like:
+</p>
+<blockquote><p>
+Any time the last element is erased, iterators to end are invalidated.
+</p></blockquote>
+
+<p>
+This would handle situations like:
+</p>
+<blockquote><pre>erase(begin(), end())
+erase(end() - 1)
+pop_back()
+resize(n, ...) where n &lt; size()
+pop_front() with size() == 1
+
+</pre></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 23.2.2.3 [deque.modifiers], p4:
+</p>
+
+<blockquote>
+<pre>iterator erase(const_iterator position);
+iterator erase(const_iterator first, const_iterator last);
+</pre>
+
+<blockquote>
+<p>
+-4- <i>Effects:</i> An erase in the middle of the <tt>deque</tt>
+invalidates all the iterators and references to elements of the
+<tt>deque</tt> <ins>and the past-the-end iterator</ins>. An erase at
+either end of the <tt>deque</tt> invalidates only the iterators and the
+references to the erased elements<ins>, except that erasing at the end
+also invalidates the past-the-end iterator</ins>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): Proposed wording added and moved to Review.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="645"></a>645. Missing members in match_results</h3>
+<p><b>Section:</b> 28.10 [re.results] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.results">active issues</a> in [re.results].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.results">issues</a> in [re.results].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to the description given in 28.10 [re.results]/2 the class template
+match_results "shall satisfy the requirements of a Sequence, [..],
+except that only operations defined for const-qualified Sequences
+are supported".
+Comparing the provided operations from 28.10 [re.results]/3 with the
+sequence/container tables 80 and 81 one recognizes the following
+missing operations:
+</p>
+
+<p>
+1) The members
+</p>
+
+<blockquote><pre>const_iterator rbegin() const;
+const_iterator rend() const;
+</pre></blockquote>
+
+<p>
+should exists because 23.1/10 demands these for containers
+(all sequences are containers) which support bidirectional
+iterators. Aren't these supported by match_result? This is not
+explicitely expressed, but it's somewhat implied by two arguments:
+</p>
+<p>
+(a) Several typedefs delegate to
+<tt>iterator_traits&lt;BidirectionalIterator&gt;</tt>.
+</p>
+<p>
+(b) The existence of <tt>const_reference operator[](size_type n) const</tt>
+implies even random-access iteration.
+I also suggest, that <tt>match_result</tt> should explicitly mention,
+which minimum iterator category is supported and if this does
+not include random-access the existence of <tt>operator[]</tt> is
+somewhat questionable.
+</p>
+<p>
+2) The new "convenience" members
+</p>
+<blockquote><pre>const_iterator cbegin() const;
+const_iterator cend() const;
+const_iterator crbegin() const;
+const_iterator crend() const;
+</pre></blockquote>
+<p>
+should be added according to tables 80/81.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following members to the <tt>match_results</tt> synopsis after <tt>end()</tt> in 28.10 [re.results]
+para 3:
+</p>
+
+<blockquote><pre>const_iterator cbegin() const;
+const_iterator cend() const;
+</pre></blockquote>
+
+<p>
+In section 28.10.3 [re.results.acc] change:
+</p>
+
+<blockquote>
+<pre>const_iterator begin() const;
+<ins>const_iterator cbegin() const;</ins>
+</pre>
+<blockquote>
+<p>
+-7- <i>Returns:</i> A starting iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
+</p>
+</blockquote>
+
+<pre>const_iterator end() const;
+<ins>const_iterator cend() const;</ins>
+</pre>
+<blockquote>
+<p>
+-8- <i>Returns:</i> A terminating iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): Voted to adopt proposed wording in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>
+except removing the entry in the table container requirements. Moved to Review.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="653"></a>653. Library reserved names</h3>
+<p><b>Section:</b> 1.2 [intro.refs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-03-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#intro.refs">issues</a> in [intro.refs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+</p>
+<blockquote>
+<p>
+1.2 [intro.refs] Normative references
+</p>
+
+<p>
+The following standards contain provisions which, through reference in
+this text, constitute provisions of this Interna- tional Standard. At
+the time of publication, the editions indicated were valid. All
+standards are subject to revision, and parties to agreements based on
+this International Standard are encouraged to investigate the
+possibility of applying the most recent editions of the standards
+indicated below. Members of IEC and ISO maintain registers of currently
+valid International Standards.
+</p>
+
+<ul>
+<li>Ecma International, ECMAScript Language Specification, Standard
+Ecma-262, third edition, 1999.</li>
+<li>ISO/IEC 2382 (all parts), Information technology - Vocabulary</li>
+<li>ISO/IEC 9899:1990, Programming languages - C</li>
+<li>ISO/IEC 9899/Amd.1:1995, Programming languages - C, AMENDMENT 1: C
+Integrity</li>
+<li>ISO/IEC 9899:1999, Programming languages - C</li>
+<li>ISO/IEC 9899:1999/Cor.1:2001 Programming languages - C</li>
+<li>ISO/IEC 9899:1999/Cor.2:2004 Programming languages - C</li>
+<li>ISO/IEC 9945:2003, Information Technology-Portable Operating System
+Interface (POSIX)</li>
+<li>ISO/IEC 10646-1:1993 Information technology - Universal Multiple-Octet
+Coded Character Set (UCS) - Part 1: Architecture and Basic Multilingual
+Plane</li>
+</ul>
+</blockquote>
+
+<p>
+I'm not sure how many of those reserve naming patterns that might affect
+us, but I am equally sure I don't own a copy of any of these to check!
+</p>
+<p>
+The point is to list the reserved naming patterns, rather than the
+individual names themselves - although we may want to list C keywords
+that are valid identifiers in C++ but likely to cause trouble in shared
+headers (e.g. restrict)
+</p>
+
+<p><i>[
+Kona (2007): Recommend NAD. No one has identified a specific defect, just the possibility of one.
+]</i></p>
+
+
+<p><i>[
+Post-Kona: Alisdair request Open. A good example of the problem was a
+discussion of the system error proposal, where it was pointed out an all-caps
+identifier starting with a capital E conflicted with reserved macro names for
+both Posix and C. I had absolutely no idea of this rule, and suspect I was
+not the only one in the room.<br>
+<br>
+Resolution will require someone with access to all the listed documents to
+research their respective name reservation rules, or people with access to
+specific documents add their rules to this issue until the list is complete.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="659"></a>659. istreambuf_iterator should have an operator-&gt;()</h3>
+<p><b>Section:</b> 24.5.3 [istreambuf.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-03-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istreambuf.iterator">issues</a> in [istreambuf.iterator].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Greg Herlihy has clearly demonstrated that a user defined input
+iterator should have an operator-&gt;(), even if its
+value type is a built-in type (comp.std.c++, "Re: Should any iterator
+have an operator-&gt;() in C++0x?", March 2007). &nbsp;And as Howard
+Hinnant remarked in the same thread that the input iterator
+<tt>istreambuf_iterator</tt> doesn't have one, this must be a
+defect!
+</p>
+<p>
+Based on Greg's example, the following code demonstrates the issue:
+</p><pre>&nbsp;#include &lt;iostream&gt;
+&nbsp;#include &lt;fstream&gt;
+&nbsp;#include &lt;streambuf&gt;
+
+&nbsp;typedef char C;
+&nbsp;int main ()
+&nbsp;{
+&nbsp;&nbsp;&nbsp;std::ifstream s("filename", std::ios::in);
+&nbsp;&nbsp;&nbsp;std::istreambuf_iterator&lt;char&gt; i(s);
+
+&nbsp;&nbsp;&nbsp;(*i).~C(); &nbsp;// This is well-formed...
+&nbsp;&nbsp;&nbsp;i-&gt;~C(); &nbsp;// ... so this should be supported!
+&nbsp;}
+</pre>
+
+<p>
+Of course, operator-&gt; is also needed when the value_type of
+istreambuf_iterator is a class.
+</p>
+<p>
+The operator-&gt; could be implemented in various ways. &nbsp;For instance,
+by storing the current value inside the iterator, and returning its
+address. &nbsp;Or by returning a proxy, like operator_arrow_proxy, from
+<a href="http://www.boost.org/boost/iterator/iterator_facade.hpp">http://www.boost.org/boost/iterator/iterator_facade.hpp</a>
+</p>
+<p>
+I hope that the resolution of this issue will contribute to getting a
+clear and consistent definition of iterator concepts.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to the synopsis in 24.5.3 [istreambuf.iterator]:
+</p>
+
+<blockquote><pre>charT operator*() const;
+<ins>pointer operator-&gt;() const;</ins>
+istreambuf_iterator&lt;charT,traits&gt;&amp; operator++();
+</pre></blockquote>
+
+<p>
+Change 24.5.3 [istreambuf.iterator], p1:
+</p>
+
+<blockquote><p>
+The class template <tt>istreambuf_iterator</tt> reads successive
+characters from the <tt>streambuf</tt> for which it was constructed.
+<tt>operator*</tt> provides access to the current input character, if
+any. <ins><tt>operator-&gt;</tt> may return a proxy.</ins> Each time
+<tt>operator++</tt> is evaluated, the iterator advances to the next
+input character. If the end of stream is reached
+(<tt>streambuf_type::sgetc()</tt> returns <tt>traits::eof()</tt>), the
+iterator becomes equal to the end of stream iterator value. The default
+constructor <tt>istreambuf_iterator()</tt> and the constructor
+<tt>istreambuf_iterator(0)</tt> both construct an end of stream iterator
+object suitable for use as an end-of-range.
+</p></blockquote>
+
+
+
+<p><i>[
+Kona (2007): The proposed resolution is inconsistent because the return
+type of <tt>istreambuf_iterator::operator-&gt;()</tt> is specified to be <tt>pointer</tt>,
+but the proposed text also states that "<tt>operator-&gt;</tt> may return a proxy."
+]</i></p>
+
+
+<p><i>[
+Niels Dekker (mailed to Howard Hinnant):
+]</i></p>
+
+<blockquote>
+<p>
+The proposed resolution does
+not seem inconsistent to me. <tt>istreambuf_iterator::operator-&gt;()</tt> should
+have <tt>istreambuf_iterator::pointer</tt> as return type, and this return type
+may in fact be a proxy.
+</p>
+<p>
+AFAIK, the resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#445">445</a> ("<tt>iterator_traits::reference</tt>
+unspecified for some iterator categories") implies that for any iterator
+class <tt>Iter</tt>, the return type of <tt>operator-&gt;()</tt> is <tt>Iter::pointer</tt>, by
+definition. &nbsp;I don't think <tt>Iter::pointer</tt> needs to be a raw pointer.
+</p>
+<p>
+Still I wouldn't mind if the text "<tt>operator-&gt;</tt> may return a proxy" would
+be removed from the resolution. I think it's up to the library
+implementation, how to implement <tt>istreambuf_iterator::operator-&gt;()</tt>. &nbsp;As
+longs as it behaves as expected: <tt>i-&gt;m</tt> should have the same effect as
+<tt>(*i).m</tt>. Even for an explicit destructor call, <tt>i-&gt;~C()</tt>. &nbsp;The main issue
+is just: <tt>istreambuf_iterator</tt> should have an <tt>operator-&gt;()</tt>!
+</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="661"></a>661. New 27.6.1.2.2 changes make special extractions useless</h3>
+<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-04-01</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+To the more drastic changes of 27.6.1.2.2 [istream.formatted.arithmetic] in the current draft N2134 belong
+the explicit description of the extraction of the types short and int in
+terms of as-if code fragments.
+</p>
+
+<ol>
+<li>
+The corresponding as-if extractions in paragraph 2 and 3 will never
+result in a change of the operator&gt;&gt; argument val, because the
+contents of the local variable lval is in no case written into val.
+Furtheron both fragments need a currently missing parentheses in the
+beginning of the if-statement to be valid C++.
+</li>
+<li>I would like to ask whether the omission of a similar explicit
+extraction of unsigned short and unsigned int in terms of long -
+compared to their corresponding new insertions, as described in
+27.6.2.6.2 [ostream.inserters.arithmetic], is a deliberate decision or
+an
+oversight.
+</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<ol>
+<li>
+<p>
+In 27.6.1.2.2 [istream.formatted.arithmetic]/2 change the current as-if code fragment
+</p>
+<blockquote><pre>typedef num_get&lt;charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
+iostate err = 0;
+long lval;
+use_facet&lt;numget&gt;(loc).get(*this, 0, *this, err, lval );
+if (err == 0) <ins>{</ins>
+ <del>&amp;&amp;</del> <ins>if</ins> (lval &lt; numeric_limits&lt;short&gt;::min() || numeric_limits&lt;short&gt;::max() &lt; lval)<del>)</del>
+ err = ios_base::failbit;
+ <ins>else
+ val = static_cast&lt;short&gt;(lval);
+}</ins>
+setstate(err);
+</pre></blockquote>
+
+<p>
+Similarily in 27.6.1.2.2 [istream.formatted.arithmetic]/3 change the current as-if fragment
+</p>
+
+<blockquote><pre>typedef num_get&lt;charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
+iostate err = 0;
+long lval;
+use_facet&lt;numget&gt;(loc).get(*this, 0, *this, err, lval );
+if (err == 0) <ins>{</ins>
+ <del>&amp;&amp;</del> <ins>if</ins> (lval &lt; numeric_limits&lt;int&gt;::min() || numeric_limits&lt;int&gt;::max() &lt; lval)<del>)</del>
+ err = ios_base::failbit;
+ <ins>else
+ val = static_cast&lt;int&gt;(lval);
+}</ins>
+setstate(err);
+</pre></blockquote>
+</li>
+<li>
+---
+</li>
+</ol>
+
+
+<p><i>[
+Kona (2007): Note to the editor: the name lval in the call to <tt>use_facet</tt>
+is incorrectly italicized in the code fragments corresponding to
+<tt>operator&gt;&gt;(short &amp;)</tt> and <tt>operator &gt;&gt;(int &amp;)</tt>. Also, val -- which appears
+twice on the line with the <tt>static_cast</tt> in the proposed resolution --
+should be italicized. Also, in response to part two of the issue: this
+is deliberate.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="664"></a>664. <tt>do_unshift</tt> for <tt>codecvt&lt;char, char, mbstate_t&gt;</tt></h3>
+<p><b>Section:</b> 22.2.1.4.2 [locale.codecvt.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.virtuals">issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.1.4.2 [locale.codecvt.virtuals], para 7 says (regarding <tt>do_unshift</tt>):
+</p>
+
+<blockquote><p>
+<i>Effects:</i> Places characters starting at to that should be appended to
+terminate a sequence when the current <tt>stateT</tt> is given by
+<tt><i>state</i></tt>.<sup>237)</sup> Stores no more than <tt>(<i>to_limit</i> -
+<i>to</i>)</tt> destination elements, and leaves the <tt><i>to_next</i></tt>
+pointer pointing one beyond the last element successfully stored.
+<em><tt>codecvt&lt;char, char, mbstate_t&gt;</tt> stores no characters.</em>
+</p></blockquote>
+
+<p>
+The following objection has been raised:
+</p>
+
+<blockquote><p>
+Since the C++ Standard permits a nontrivial conversion for the required
+instantiations of <tt>codecvt</tt>, it is overly restrictive to say that
+<tt>do_unshift</tt> must store no characters and return <tt>noconv</tt>.
+</p></blockquote>
+
+<p>
+[Plum ref _222152Y50]
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 22.2.1.4.2 [locale.codecvt.virtuals], p7:
+</p>
+
+<blockquote>
+<p>
+<i>Effects:</i> Places characters starting at <i>to</i> that should be
+appended to terminate a sequence when the current <tt>stateT</tt> is
+given by state.<sup>237)</sup> Stores no more than (<i>to_limit -to</i>)
+destination elements, and leaves the <i>to_next</i> pointer pointing one
+beyond the last element successfully stored. <del><tt>codecvt&lt;char, char,
+mbstate_t&gt;</tt> stores no characters.</del>
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="665"></a>665. <tt>do_unshift</tt> return value</h3>
+<p><b>Section:</b> 22.2.1.4.2 [locale.codecvt.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.virtuals">issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.1.4.2 [locale.codecvt.virtuals], para 8 says:
+</p>
+
+<blockquote><p>
+<tt>codecvt&lt;char,char,mbstate_t&gt;</tt>, returns <tt>noconv</tt>.
+</p></blockquote>
+
+<p>
+The following objection has been raised:
+</p>
+
+<blockquote><p>
+Despite what the C++ Standard&nbsp;
+says, <tt>unshift</tt> can't always return <tt>noconv</tt> for the default facets, since&nbsp;
+they can be nontrivial. At least one implementation does whatever the&nbsp;
+C functions do.
+</p></blockquote>
+
+<p>
+[Plum ref _222152Y62]
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 22.2.1.4.2 [locale.codecvt.virtuals], p8:
+</p>
+
+<blockquote>
+<p><i>Returns:</i> An enumeration value, as summarized in Table 76:</p>
+<p>...</p>
+<p>
+<del><tt>codecvt&lt;char,char,mbstate_t&gt;</tt>, returns <tt>noconv</tt>.</del>
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="666"></a>666. <tt>moneypunct::do_curr_symbol()</tt></h3>
+<p><b>Section:</b> 22.2.6.3.2 [locale.moneypunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.moneypunct.virtuals">issues</a> in [locale.moneypunct.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.6.3.2 [locale.moneypunct.virtuals], para 4 footnote 257 says
+</p>
+
+<blockquote><p>
+<sup>257)</sup> For international&nbsp;
+specializations (second template parameter <tt>true</tt>) this is always four&nbsp;
+characters long, usually three letters and a space.
+</p></blockquote>
+
+<p>
+The following objection has been raised:
+</p>
+
+<blockquote><p>
+The international currency&nbsp;
+symbol is whatever the underlying locale says it is, not necessarily&nbsp;
+four characters long.
+</p></blockquote>
+
+<p>
+[Plum ref _222632Y41]
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change footnote 253 in 22.2.6.3.2 [locale.moneypunct.virtuals]:
+</p>
+
+<blockquote>
+<p>
+<sup>253)</sup> For international specializations (second template
+parameter <tt>true</tt>) this is <del>always</del> <ins>typically</ins>
+four characters long, usually three letters and a space.
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="667"></a>667. <tt>money_get</tt>'s widened minus sign</h3>
+<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.6.1.2 [locale.money.get.virtuals], para 1 says:
+</p>
+
+<blockquote><p>
+The result is returned as an integral value&nbsp;
+stored in <tt>units</tt> or as a sequence of digits possibly preceded by a&nbsp;
+minus sign (as produced by <tt>ct.widen(c)</tt> where <tt>c</tt> is '-' or in the range&nbsp;
+from '0' through '9', inclusive) stored in <tt>digits</tt>.
+</p></blockquote>
+
+<p>
+The following
+objection has been raised:
+</p>
+
+<blockquote><p>
+Some implementations interpret this to mean that a facet derived from
+<tt>ctype&lt;wchar_t&gt;</tt> can provide its own member <tt>do_widen(char)</tt>
+which produces e.g. <tt>L'@'</tt> for the "widened" minus sign, and that the
+<tt>'@'</tt> symbol will appear in the resulting sequence of digits.&nbsp; Other
+implementations have assumed that one or more places in the standard permit the
+implementation to "hard-wire" <tt>L'-'</tt> as the "widened" minus sign.&nbsp; Are
+both interpretations permissible, or only&nbsp; one?
+</p></blockquote>
+
+<p>
+[Plum ref _222612Y14]
+</p>
+
+<p>
+Furthermore: if <tt>ct.widen('9')</tt> produces <tt>L'X'</tt> (a non-digit), does a
+parse fail if a <tt>'9'</tt> appears in the subject string? [Plum ref _22263Y33]
+</p>
+
+<p><i>[
+Kona (2007): Bill and Dietmar to provide proposed wording.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="668"></a>668. <tt>money_get</tt>'s empty minus sign</h3>
+<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.6.1.2 [locale.money.get.virtuals], para 3 says:
+</p>
+
+<blockquote><p>
+If <tt>pos</tt> or <tt>neg</tt> is empty, the sign component is
+optional, and if no sign is detected, the result is given the sign&nbsp;
+that corresponds to the source of the empty string.
+</p></blockquote>
+
+<p>
+The following
+objection has been raised:
+</p>
+
+<blockquote><p>
+A <tt>negative_sign</tt> of "" means "there is no&nbsp;
+way to write a negative sign" not "any null sequence is a negative&nbsp;
+sign, so it's always there when you look for it".
+</p></blockquote>
+
+<p>
+[Plum ref _222612Y32]
+</p>
+
+<p><i>[
+Kona (2007): Bill to provide proposed wording and interpretation of existing wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="669"></a>669. Equivalent postive and negative signs in <tt>money_get</tt></h3>
+<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.6.1.2 [locale.money.get.virtuals], para 3 sentence 4 says:
+</p>
+
+<blockquote><p>
+If the first character of <tt>pos</tt> is equal to the first character of <tt>neg</tt>,&nbsp;
+or if both strings are empty, the result is given a positive sign.
+</p></blockquote>
+
+<p>
+One interpretation is that an input sequence must match either the
+positive pattern or the negative pattern, and then in either event it
+is interpreted as positive.&nbsp; The following objections has been raised:
+</p>
+
+<blockquote><p>
+The input can successfully match only a positive sign, so the negative
+pattern is an unsuccessful match.
+</p></blockquote>
+
+<p>
+[Plum ref _222612Y34, 222612Y51b]
+</p>
+
+<p><i>[
+Bill to provide proposed wording and interpretation of existing wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="670"></a>670. <tt>money_base::pattern</tt> and <tt>space</tt></h3>
+<p><b>Section:</b> 22.2.6.3 [locale.moneypunct] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.6.3 [locale.moneypunct], para 2 says:
+</p>
+
+<blockquote><p>
+The value <tt>space</tt> indicates that at least one space is required at&nbsp;
+that position.
+</p></blockquote>
+
+<p>
+The following objection has been raised:
+</p>
+
+<blockquote><p>
+Whitespace&nbsp;is optional when matching space. (See 22.2.6.1.2 [locale.money.get.virtuals], para 2.)
+</p></blockquote>
+
+<p>
+[Plum ref _22263Y22]
+</p>
+
+<p><i>[
+Kona (2007): Bill to provide proposed wording. We agree that C++03 is
+ambiguous, and that we want C++0X to say "space" means 0 or more
+whitespace characters on input.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="671"></a>671. precision of hexfloat</h3>
+<p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> John Salmon <b>Date:</b> 2007-04-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I am trying to understand how TR1 supports hex float (%a) output.
+</p>
+<p>
+As far as I can tell, it does so via the following:
+</p>
+<p>
+8.15 Additions to header &lt;locale&gt; [tr.c99.locale]
+</p>
+<p>
+In subclause 22.2.2.2.2 [facet.num.put.virtuals], Table 58 Floating-point conversions, after
+the line:
+floatfield == ios_base::scientific %E
+</p>
+<p>
+add the two lines:
+</p>
+<blockquote><pre>floatfield == ios_base::fixed | ios_base::scientific &amp;&amp; !uppercase %a
+floatfield == ios_base::fixed | ios_base::scientific %A 2
+</pre></blockquote>
+<p>
+[Note: The additional requirements on print and scan functions, later
+in this clause, ensure that the print functions generate hexadecimal
+floating-point fields with a %a or %A conversion specifier, and that
+the scan functions match hexadecimal floating-point fields with a %g
+conversion specifier. &nbsp;end note]
+</p>
+<p>
+Following the thread, in 22.2.2.2.2 [facet.num.put.virtuals], we find:
+</p>
+<p>
+For conversion from a floating-point type, if (flags &amp; fixed) != 0 or
+if str.precision() &gt; 0, then str.precision() is specified in the
+conversion specification.
+</p>
+<p>
+This would seem to imply that when floatfield == fixed|scientific, the
+precision of the conversion specifier is to be taken from
+str.precision(). &nbsp;Is this really what's intended? &nbsp;I sincerely hope
+that I'm either missing something or this is an oversight. &nbsp;Please
+tell me that the committee did not intend to mandate that hex floats
+(and doubles) should by default be printed as if by %.6a.
+</p>
+
+<p><i>[
+Howard: I think the fundamental issue we overlooked was that with %f,
+%e, %g, the default precision was always 6. &nbsp;With %a the default
+precision is not 6, it is infinity. &nbsp;So for the first time, we need to
+distinguish between the default value of precision, and the precision
+value 6.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><i>[
+Kona (2007): Robert volunteers to propose wording.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="672"></a>672. Swappable requirements need updating</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-04</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current <tt>Swappable</tt> is:
+</p>
+
+<blockquote>
+<table border="1">
+<caption>Table 37: <tt>Swappable</tt> requirements <b>[swappable]</b></caption>
+<tbody><tr><th>expression</th><th>return type</th><th>post-condition</th></tr>
+<tr><td><tt>swap(s,t)</tt></td><td><tt>void</tt></td><td><tt>t</tt> has the value originally held by <tt>u</tt>, and <tt>u</tt> has the value originally
+held by <tt>t</tt></td></tr>
+<tr><td colspan="3">
+<p>
+The Swappable requirement is met by satisfying one or more of the following conditions:
+</p>
+<ul>
+<li>
+<tt>T</tt> is Swappable if <tt>T</tt> satisfies the <tt>CopyConstructible</tt> requirements (Table 34)
+and the <tt>CopyAssignable</tt> requirements (Table 36);
+</li>
+<li>
+<tt>T</tt> is Swappable if a namespace scope function named <tt>swap</tt> exists in the same
+namespace as the definition of <tt>T</tt>, such that the expression <tt>swap(t,u)</tt> is valid
+and has the semantics described in this table.
+</li>
+</ul>
+</td></tr>
+</tbody></table>
+</blockquote>
+
+<p>
+With the passage of rvalue reference into the language, <tt>Swappable</tt> needs to be updated to
+require only <tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>. This is a minimum.
+</p>
+
+<p>
+Additionally we may want to support proxy references such that the following code is acceptable:
+</p>
+
+<blockquote><pre>namespace Mine {
+
+template &lt;class T&gt;
+struct proxy {...};
+
+template &lt;class T&gt;
+struct proxied_iterator
+{
+ typedef T value_type;
+ typedef proxy&lt;T&gt; reference;
+ reference operator*() const;
+ ...
+};
+
+struct A
+{
+ // heavy type, has an optimized swap, maybe isn't even copyable or movable, just swappable
+ void swap(A&amp;);
+ ...
+};
+
+void swap(A&amp;, A&amp;);
+void swap(proxy&lt;A&gt;, A&amp;);
+void swap(A&amp;, proxy&lt;A&gt;);
+void swap(proxy&lt;A&gt;, proxy&lt;A&gt;);
+
+} // Mine
+
+...
+
+Mine::proxied_iterator&lt;Mine::A&gt; i(...)
+Mine::A a;
+swap(*i1, a);
+</pre></blockquote>
+
+<p>
+I.e. here is a call to <tt>swap</tt> which the user enables swapping between a proxy to a class and the class
+itself. We do not need to anything in terms of implementation except not block their way with overly
+constrained concepts. That is, the <tt>Swappable</tt> concept should be expanded to allow swapping
+between two different types for the case that one is binding to a user-defined <tt>swap</tt>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 20.1.1 [utility.arg.requirements]:
+</p>
+
+<blockquote>
+
+<p>
+-1- The template definitions in the C++ Standard Library refer to various
+named requirements whose details are set out in tables 31-38. In these
+tables, <tt>T</tt> is a type to be supplied by a C++ program
+instantiating a template; <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
+values of type <tt>const T</tt>; <tt>s</tt> and <tt>t</tt> are modifiable
+lvalues of type <tt>T</tt>; <tt>u</tt> is a value of type (possibly
+<tt>const</tt>) <tt>T</tt>; and <tt>rv</tt> is a non-<tt>const</tt>
+rvalue of type <tt>T</tt>.
+</p>
+
+<table border="1">
+<caption>Table 37: <tt>Swappable</tt> requirements <b>[swappable]</b></caption>
+<tbody><tr><th>expression</th><th>return type</th><th>post-condition</th></tr>
+<tr><td><tt>swap(s,t)</tt></td><td><tt>void</tt></td>
+<td><tt>t</tt> has the value originally
+held by <tt>u</tt>, and
+<tt>u</tt> has the value originally held
+by <tt>t</tt></td></tr>
+<tr><td colspan="3">
+<p>
+The <tt>Swappable</tt> requirement is met by satisfying one or more of the following conditions:
+</p>
+<ul>
+<li>
+<tt>T</tt> is <tt>Swappable</tt> if <tt>T</tt> satisfies the
+<del><tt>CopyConstructible</tt></del> <ins>MoveConstructible</ins>
+requirements (Table <del>34</del> <ins>33</ins>) and the <del><tt>CopyAssignable</tt></del> <ins>MoveAssignable</ins>
+requirements (Table <del>36</del> <ins>35</ins>);
+</li>
+<li>
+<tt>T</tt> is <tt>Swappable</tt> if a namespace scope function named
+<tt>swap</tt> exists in the same namespace as the definition of
+<tt>T</tt>, such that the expression
+<tt>swap(t,u)</tt> is valid and has the
+semantics described in this table.
+</li>
+</ul>
+</td></tr>
+</tbody></table>
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): We like the change to the <tt>Swappable</tt> requirements to use
+move semantics. The issue relating to the support of proxies is
+separable from the one relating to move semantics, and it's bigger than
+just swap. We'd like to address only the move semantics changes under
+this issue, and open a separated issue (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>) to handle proxies. Also, there
+may be a third issue, in that the current definition of <tt>Swappable</tt> does
+not permit rvalues to be operands to a swap operation, and Howard's
+proposed resolution would allow the right-most operand to be an rvalue,
+but it would not allow the left-most operand to be an rvalue (some swap
+functions in the library have been overloaded to permit left operands to
+swap to be rvalues).
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="673"></a>673. <tt>unique_ptr</tt> update</h3>
+<p><b>Section:</b> 20.6.5 [unique.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Since the publication of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a>
+there have been a few small but significant advances which should be included into
+<tt>unique_ptr</tt>. There exists a
+<a href="http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr.html">reference implmenation</a>
+for all of these changes.
+</p>
+
+<ul>
+
+<li>
+<p>
+Even though <tt>unique_ptr&lt;void&gt;</tt> is not a valid use case (unlike for <tt>shared_ptr&lt;void&gt;</tt>),
+unexpected cases to crop up which require the instantiation of the interface of <tt>unique_ptr&lt;void&gt;</tt>
+even if it is never used. For example see
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">LWG 541</a> for how this accidently
+happened to <tt>auto_ptr</tt>. I believe the most robust way to protect <tt>unique_ptr</tt> against this
+type of failure is to augment the return type of <tt>unique_ptr&lt;T&gt;:operator*()</tt> with
+<tt>add_lvalue_reference&lt;T&gt;::type</tt>. This means that given an instantiated <tt>unique_ptr&lt;void&gt;</tt>
+the act of dereferencing it will simply return <tt>void</tt> instead of causing a compile time failure.
+This is simpler than creating a <tt>unique_ptr&lt;void&gt;</tt> specialization which isn't robust in the
+face of <tt><i>cv-</i></tt>qualified <tt>void</tt> types.
+</p>
+
+<p>
+This resolution also supports instantiations such as <tt>unique_ptr&lt;void, free_deleter&gt;</tt>
+which could be very useful to the client.
+</p>
+
+</li>
+
+<li>
+<p>
+Efforts have been made to better support containers and smart pointers in shared
+memory contexts. One of the key hurdles in such support is not assuming that a
+pointer type is actually a <tt>T*</tt>. This can easily be accomplished
+for <tt>unique_ptr</tt> by having the deleter define the pointer type:
+<tt>D::pointer</tt>. Furthermore this type can easily be defaulted to
+<tt>T*</tt> should the deleter <tt>D</tt> choose not to define a pointer
+type (reference implementation
+<a href="http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr.html">here</a>).
+This change has no run time overhead. It has no interface overhead on
+authors of custom delter types. It simply allows (but not requires)
+authors of custom deleter types to define a smart pointer for the
+storage type of <tt>unique_ptr</tt> if they find such functionality
+useful. <tt>std::default_delete</tt> is an example of a deleter which
+defaults <tt>pointer</tt> to <tt>T*</tt> by simply ignoring this issue
+and not including a <tt>pointer typedef</tt>.
+</p>
+</li>
+
+<li>
+<p>
+When the deleter type is a function pointer then it is unsafe to construct
+a <tt>unique_ptr</tt> without specifying the function pointer in the constructor.
+This case is easy to check for with a <tt>static_assert</tt> assuring that the
+deleter is not a pointer type in those constructors which do not accept deleters.
+</p>
+
+<blockquote><pre>unique_ptr&lt;A, void(*)(void*)&gt; p(new A); // error, no function given to delete the pointer!
+</pre></blockquote>
+
+</li>
+
+</ul>
+
+<p><i>[
+Kona (2007): We don't like the solution given to the first bullet in
+light of concepts. The second bullet solves the problem of supporting
+fancy pointers for one library component only. The full LWG needs to
+decide whether to solve the problem of supporting fancy pointers
+piecemeal, or whether a paper addressing the whole library is needed. We
+think that the third bullet is correct.
+]</i></p>
+
+
+<p><i>[
+Post Kona: Howard adds example user code related to the first bullet:
+]</i></p>
+
+
+<blockquote>
+<pre>void legacy_code(void*, std::size_t);
+
+void foo(std::size_t N)
+{
+ std::unique_ptr&lt;void, void(*)(void*)&gt; ptr(std::malloc(N), std::free);
+ legacy_code(ptr.get(), N);
+} // unique_ptr used for exception safety purposes
+</pre>
+</blockquote>
+
+<p>
+I.e. <tt>unique_ptr&lt;void&gt;</tt> <i>is</i> a useful tool that we don't want
+to disable with concepts. The only part of <tt>unique_ptr&lt;void&gt;</tt> we
+want to disable (with concepts or by other means) are the two member functions:
+</p>
+
+<blockquote><pre>T&amp; operator*() const;
+T* operator-&gt;() const;
+</pre></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>[
+I am grateful for the generous aid of Peter Dimov and Ion Gaztañaga in helping formulate and review
+the proposed resolutions below.
+]</i></p>
+
+
+<ul>
+<li>
+
+<p>
+Change 20.6.5.2 [unique.ptr.single]:
+</p>
+
+<blockquote><pre>template &lt;class T, class D = default_delete&lt;T&gt;&gt; class unique_ptr {
+ ...
+ <del>T&amp;</del> <ins>typename add_lvalue_reference&lt;T&gt;::type</ins> operator*() const;
+ ...
+};
+</pre></blockquote>
+
+<p>
+Change 20.6.5.2.4 [unique.ptr.single.observers]:
+</p>
+
+<blockquote><pre><del>T&amp;</del> <ins>typename add_lvalue_reference&lt;T&gt;::type</ins> operator*() const;
+</pre></blockquote>
+
+</li>
+
+<li>
+<p>
+Change 20.6.5.2 [unique.ptr.single]:
+</p>
+
+<blockquote><pre>template &lt;class T, class D = default_delete&lt;T&gt;&gt; class unique_ptr {
+public:
+ <ins>typedef <i>implementation (see description below)</i> pointer;</ins>
+ ...
+ explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p);
+ ...
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined (see description below)</i> d);
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined (see description below)</i> d);
+ ...
+ <del>T*</del> <ins>pointer</ins> operator-&gt;() const;
+ <del>T*</del> <ins>pointer</ins> get() const;
+ ...
+ <del>T*</del> <ins>pointer</ins> release();
+ void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);
+};
+</pre></blockquote>
+
+<p>
+<ins>
+-3- If the type <tt>remove_reference&lt;D&gt;::type::pointer</tt>
+exists, then <tt>unique_ptr&lt;T, D&gt;::pointer</tt> is a typedef to
+<tt>remove_reference&lt;D&gt;::type::pointer</tt>. Otherwise
+<tt>unique_ptr&lt;T, D&gt;::pointer</tt> is a typedef to <tt>T*</tt>.
+The type <tt>unique_ptr&lt;T, D&gt;::pointer</tt> must be <tt>CopyConstructible</tt>
+and <tt>CopyAssignable</tt>.
+</ins>
+</p>
+
+<p>
+Change 20.6.5.2.1 [unique.ptr.single.ctor]:
+</p>
+
+<blockquote><pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);
+...
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+...
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A&amp; d);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, A&amp;&amp; d);
+...
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, A&amp; d);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, A&amp;&amp; d);
+...
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A&amp; d);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A&amp;&amp; d);
+...
+</pre></blockquote>
+
+<p>
+-23- <i>Requires:</i> If <tt>D</tt> is not a reference type,
+construction of the deleter <tt>D</tt> from an rvalue of type <tt>E</tt>
+must be well formed and not throw an exception. If <tt>D</tt> is a
+reference type, then <tt>E</tt> must be the same type as <tt>D</tt>
+(diagnostic required). <del><tt>U*</tt></del> <ins><tt>unique_ptr&lt;U,E&gt;::pointer</tt></ins>
+must be implicitly convertible to <del><tt>T*</tt></del>
+<ins>pointer</ins>.
+</p>
+
+<p>
+-25- <i>Postconditions:</i> <tt>get() == value u.get()</tt> had before
+the construction, modulo any required offset adjustments resulting from
+the cast from <del><tt>U*</tt></del>
+<ins><tt>unique_ptr&lt;U,E&gt;::pointer</tt></ins> to <del><tt>T*</tt></del>
+<ins>pointer</ins>. <tt>get_deleter()</tt> returns a reference to the
+internally stored deleter which was constructed from
+<tt>u.get_deleter()</tt>.
+</p>
+
+<p>
+Change 20.6.5.2.3 [unique.ptr.single.asgn]:
+</p>
+
+<blockquote>
+<p>
+-8- <i>Requires:</i> Assignment of the deleter <tt>D</tt> from an rvalue
+<tt>D</tt> must not throw an exception. <del><tt>U*</tt></del>
+<ins><tt>unique_ptr&lt;U,E&gt;::pointer</tt></ins> must be implicitly
+convertible to <del><tt>T*</tt></del> <ins>pointer</ins>.
+</p>
+</blockquote>
+
+<p>
+Change 20.6.5.2.4 [unique.ptr.single.observers]:
+</p>
+
+<blockquote>
+<pre><del>T*</del> <ins>pointer</ins> operator-&gt;() const;</pre>
+...
+<pre><del>T*</del> <ins>pointer</ins> get() const;</pre>
+</blockquote>
+
+<p>
+Change 20.6.5.2.5 [unique.ptr.single.modifiers]:
+</p>
+
+<blockquote>
+<pre><del>T*</del> <ins>pointer</ins> release();</pre>
+...
+<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);</pre>
+</blockquote>
+
+<p>
+Change 20.6.5.3 [unique.ptr.runtime]:
+</p>
+
+<blockquote><pre>template &lt;class T, class D&gt; class unique_ptr&lt;T[], D&gt; {
+public:
+ <ins>typedef <i>implementation</i> pointer;</ins>
+ ...
+ explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p);
+ ...
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+ ...
+ <del>T*</del> <ins>pointer</ins> get() const;
+ ...
+ <del>T*</del> <ins>pointer</ins> release();
+ void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);
+};
+</pre></blockquote>
+
+<p>
+Change 20.6.5.3.1 [unique.ptr.runtime.ctor]:
+</p>
+
+<blockquote>
+<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+</pre>
+
+<p>
+These constructors behave the same as in the primary template except
+that they do not accept pointer types which are convertible to
+<del><tt>T*</tt></del> <ins><tt>pointer</tt></ins>. [<i>Note:</i> One
+implementation technique is to create private templated overloads of
+these members. <i>-- end note</i>]
+</p>
+</blockquote>
+
+<p>
+Change 20.6.5.3.3 [unique.ptr.runtime.modifiers]:
+</p>
+
+<blockquote>
+<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);
+</pre>
+
+<p>
+-1- <i>Requires:</i> Does not accept pointer types which are convertible
+to <del><tt>T*</tt></del> <ins><tt>pointer</tt></ins> (diagnostic
+required). [<i>Note:</i> One implementation technique is to create a private
+templated overload. <i>-- end note</i>]
+</p>
+</blockquote>
+
+<p>
+Change 20.6.5.4 [unique.ptr.compiletime]:
+</p>
+
+<blockquote><pre>template &lt;class T, class D, size_t N&gt; class unique_ptr&lt;T[N], D&gt; {
+public:
+ <ins>typedef <i>implementation</i> pointer;</ins>
+ ...
+ explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p);
+ ...
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+ unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d);
+ ...
+ <del>T*</del> <ins>pointer</ins> get() const;
+ ...
+ <del>T*</del> <ins>pointer</ins> release();
+ void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);
+};
+</pre></blockquote>
+
+<p>
+Change 20.6.5.4.3 [unique.ptr.compiletime.modifiers]:
+</p>
+
+<blockquote>
+<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);
+</pre>
+
+<p>
+-1- <i>Requires:</i> Does not accept pointer types which are convertible
+to <del><tt>T*</tt></del> <ins><tt>pointer</tt></ins> (dignostic required). [<i>Note:</i> One implementation
+technique is to create a private templated overload. <i>--end note</i>]
+</p>
+
+</blockquote>
+
+</li>
+
+<li>
+
+<p>
+Change 20.6.5.2.1 [unique.ptr.single.ctor]:
+</p>
+
+<blockquote>
+<pre>unique_ptr();</pre>
+<blockquote>
+<p>
+<i>Requires:</i> <tt>D</tt> must be default constructible, and that
+construction must not throw an exception. <tt>D</tt> must not be a
+reference type <ins>or pointer type (diagnostic required)</ins>.
+</p>
+</blockquote>
+<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);</pre>
+<blockquote>
+<p>
+<i>Requires:</i> The expression <tt>D()(p)</tt> must be well formed.
+The default constructor of <tt>D</tt> must not throw an exception.
+<tt>D</tt> must not be a reference type <ins>or pointer type (diagnostic
+required)</ins>.
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+Change 20.6.5.2.1 [unique.ptr.single.ctor]:
+</p>
+
+<blockquote>
+<pre>unique_ptr();</pre>
+<blockquote>
+<p>
+<i>Requires:</i> <tt>D</tt> must be default constructible, and that
+construction must not throw an exception. <tt>D</tt> must not be a
+reference type <ins>or pointer type (diagnostic required)</ins>.
+</p>
+</blockquote>
+<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);</pre>
+<blockquote>
+<p>
+<i>Requires:</i> The expression <tt>D()(p)</tt> must be well formed.
+The default constructor of <tt>D</tt> must not throw an exception.
+<tt>D</tt> must not be a reference type <ins>or pointer type (diagnostic
+required)</ins>.
+</p>
+</blockquote>
+</blockquote>
+
+</li>
+
+</ul>
+
+
+
+
+
+
+<hr>
+<h3><a name="674"></a>674. <tt>shared_ptr</tt> interface changes for consistency with N1856</h3>
+<p><b>Section:</b> 20.6.6.2 [util.smartptr.shared] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#util.smartptr.shared">active issues</a> in [util.smartptr.shared].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared">issues</a> in [util.smartptr.shared].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a> does not propose
+any changes to <tt>shared_ptr</tt>. It needs to be updated to use a rvalue reference where appropriate
+and to interoperate with <tt>unique_ptr</tt> as it does with <tt>auto_ptr</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 20.6.6.2 [util.smartptr.shared] as follows:
+</p>
+
+<blockquote>
+<pre>template&lt;class Y&gt; explicit shared_ptr(auto_ptr&lt;Y&gt;<del>&amp;</del><ins>&amp;&amp;</ins> r);
+<ins>template&lt;class Y, class D&gt; explicit shared_ptr(const unique_ptr&lt;Y,D&gt;&amp; r) = delete;
+template&lt;class Y, class D&gt; explicit shared_ptr(unique_ptr&lt;Y,D&gt;&amp;&amp; r);</ins>
+...
+template&lt;class Y&gt; shared_ptr&amp; operator=(auto_ptr&lt;Y&gt;<del>&amp;</del><ins>&amp;&amp;</ins> r);
+<ins>template&lt;class Y, class D&gt; shared_ptr&amp; operator=(const unique_ptr&lt;Y,D&gt;&amp; r) = delete;
+template&lt;class Y, class D&gt; shared_ptr&amp; operator=(unique_ptr&lt;Y,D&gt;&amp;&amp; r);</ins></pre>
+</blockquote>
+
+<p>
+Change 20.6.6.2.1 [util.smartptr.shared.const] as follows:
+</p>
+
+<blockquote>
+<pre><ins>template&lt;class Y&gt; shared_ptr(auto_ptr&lt;Y&gt;<del>&amp;</del><ins>&amp;&amp;</ins> r);</ins></pre>
+</blockquote>
+
+<p>
+Add to 20.6.6.2.1 [util.smartptr.shared.const]:
+</p>
+
+<blockquote>
+<pre><ins>template&lt;class Y, class D&gt; shared_ptr(unique_ptr&lt;Y, D&gt;&amp;&amp; r);</ins></pre>
+<blockquote>
+
+<p><ins>
+<i>Effects:</i> Equivalent to <tt>shared_ptr( r.release(), r.get_deleter() )</tt> when <tt>D</tt> is
+ not a reference type, <tt>shared_ptr( r.release(), ref( r.get_deleter() ) )</tt>
+ otherwise.
+</ins></p>
+
+<p><ins>
+<i>Exception safety:</i> If an exception is thrown, the constructor has no effect.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 20.6.6.2.3 [util.smartptr.shared.assign] as follows:
+</p>
+
+<blockquote>
+<pre>template&lt;class Y&gt; shared_ptr&amp; operator=(auto_ptr&lt;Y&gt;<del>&amp;</del><ins>&amp;&amp;</ins> r);</pre>
+</blockquote>
+
+<p>
+Add to 20.6.6.2.3 [util.smartptr.shared.assign]:
+</p>
+
+<blockquote>
+<pre><ins>template&lt;class Y, class D&gt; shared_ptr&amp; operator=(unique_ptr&lt;Y,D&gt;&amp;&amp; r);</ins></pre>
+
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Equivalent to <tt>shared_ptr(std::move(r)).swap(*this)</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Returns:</i> <tt>*this</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+
+
+<p><i>[
+Kona (2007): We may need to open an issue (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>) to deal with the question of
+whether <tt>shared_ptr</tt> needs an rvalue <tt>swap</tt>.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="675"></a>675. Move assignment of containers</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+James Hopkin pointed out to me that if <tt>vector&lt;T&gt;</tt> move assignment is O(1)
+(just a <tt>swap</tt>) then containers such as <tt>vector&lt;shared_ptr&lt;ostream&gt;&gt;</tt> might have
+the wrong semantics under move assignment when the source is not truly an rvalue, but a
+moved-from lvalue (destructors could run late).
+</p>
+
+<blockquote><pre><tt>vector&lt;shared_ptr&lt;ostream&gt;&gt;</tt> v1;
+<tt>vector&lt;shared_ptr&lt;ostream&gt;&gt;</tt> v2;
+...
+v1 = v2; // #1
+v1 = std::move(v2); // #2
+</pre></blockquote>
+
+<p>
+Move semantics means not caring what happens to the source (<tt>v2</tt> in this example).
+It doesn't mean not caring what happens to the target (<tt>v1</tt>). In the above example
+both assignments should have the same effect on <tt>v1</tt>. Any non-shared <tt>ostream</tt>'s
+<tt>v1</tt> owns before the assignment should be closed, whether <tt>v1</tt> is undergoing
+copy assignment or move assignment.
+</p>
+
+<p>
+This implies that the semantics of move assignment of a generic container should be
+<tt>clear, swap</tt> instead of just swap. An alternative which could achieve the same
+effect would be to move assign each element. In either case, the complexity of move
+assignment needs to be relaxed to <tt>O(v1.size())</tt>.
+</p>
+
+<p>
+The performance hit of this change is not nearly as drastic as it sounds.
+In practice, the target of a move assignment has always just been move constructed
+or move assigned <i>from</i>. Therefore under <tt>clear, swap</tt> semantics (in
+this common use case) we are still achieving O(1) complexity.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 23.1 [container.requirements]:
+</p>
+
+<blockquote>
+<table border="1">
+<caption>Table 86: Container requirements</caption>
+<tbody><tr>
+<th>expression</th><th>return type</th><th>operational semantics</th>
+<th>assertion/note pre/post-condition</th><th>complexity</th>
+</tr>
+<tr>
+<td><tt>a = rv;</tt></td><td><tt>X&amp;</tt></td>
+<td><ins>All existing elements of <tt>a</tt> are either move assigned or destructed</ins></td>
+<td><tt>a</tt> shall be equal to the
+value that <tt>rv</tt> had
+before this construction
+</td>
+<td><del>constant</del> <ins>linear in <tt>a.size()</tt></ins></td>
+</tr>
+</tbody></table>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="676"></a>676. Moving the unordered containers</h3>
+<p><b>Section:</b> 23.4 [unord] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord">active issues</a> in [unord].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord">issues</a> in [unord].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Move semantics are missing from the <tt>unordered</tt> containers. The proposed
+resolution below adds move-support consistent with
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1858.html">N1858</a>
+and the current working draft.
+</p>
+
+<p>
+The current proposed resolution simply lists the requirements for each function.
+These might better be hoisted into the requirements table for unordered associative containers.
+Futhermore a mild reorganization of the container requirements could well be in order.
+This defect report is purposefully ignoring these larger issues and just focusing
+on getting the unordered containers "moved".
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Add to 23.4 [unord]:
+</p>
+
+<blockquote><pre>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+
+template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+
+...
+
+template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_set&lt;Value, Hash, Pred, Alloc&gt;&amp; y);</ins>
+
+template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Value, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multiset&lt;Value, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre></blockquote>
+
+<p><b><tt>unordered_map</tt></b></p>
+
+<p>
+Change 23.4.1 [unord.map]:
+</p>
+
+<blockquote><pre>class unordered_map
+{
+ ...
+ unordered_map(const unordered_map&amp;);
+ <ins>unordered_map(unordered_map&amp;&amp;);</ins>
+ ~unordered_map();
+ unordered_map&amp; operator=(const unordered_map&amp;);
+ <ins>unordered_map&amp; operator=(unordered_map&amp;&amp;);</ins>
+ ...
+ // modifiers
+ <del>std::</del>pair&lt;iterator, bool&gt; insert(const value_type&amp; obj);
+ <ins>template &lt;class P&gt; pair&lt;iterator, bool&gt; insert(P&amp;&amp; obj);</ins>
+ iterator insert(iterator hint, const value_type&amp; obj);
+ <ins>template &lt;class P&gt; iterator insert(iterator hint, P&amp;&amp; obj);</ins>
+ const_iterator insert(const_iterator hint, const value_type&amp; obj);
+ <ins>template &lt;class P&gt; const_iterator insert(const_iterator hint, P&amp;&amp; obj);</ins>
+ ...
+ void swap(unordered_map&amp;<ins>&amp;</ins>);
+ ...
+ mapped_type&amp; operator[](const key_type&amp; k);
+ <ins>mapped_type&amp; operator[](key_type&amp;&amp; k);</ins>
+ ...
+};
+
+template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre></blockquote>
+
+<p>
+Add to 23.4.1.1 [unord.map.cnstr]:
+</p>
+
+<blockquote>
+<pre>template &lt;class InputIterator&gt;
+ unordered_map(InputIterator f, InputIterator l,
+ size_type n = <i>implementation-defined</i>,
+ const hasher&amp; hf = hasher(),
+ const key_equal&amp; eql = key_equal(),
+ const allocator_type&amp; a = allocator_type());
+</pre>
+
+<blockquote><p>
+<ins>
+<i>Requires:</i> If the iterator's dereference operator returns an
+lvalue or a const rvalue <tt>pair&lt;key_type, mapped_type&gt;</tt>,
+then both <tt>key_type</tt> and <tt>mapped_type</tt> shall be
+<tt>CopyConstructible</tt>.
+</ins>
+</p></blockquote>
+</blockquote>
+
+<p>
+Add to 23.4.1.2 [unord.map.elem]:
+</p>
+
+<blockquote>
+
+<pre>mapped_type&amp; operator[](const key_type&amp; k);</pre>
+
+<blockquote>
+<p>...</p>
+<p><ins>
+<i>Requires:</i> <tt>key_type</tt> shall be <tt>CopyConstructible</tt>
+and <tt>mapped_type</tt> shall be <tt>DefaultConstructible</tt>.
+</ins></p>
+</blockquote>
+
+<pre><ins>mapped_type&amp; operator[](key_type&amp;&amp; k);</ins></pre>
+
+<blockquote>
+<p><ins>
+<i>Effects:</i> If the <tt>unordered_map</tt> does not already contain an
+element whose key is equivalent to <tt>k</tt> , inserts the value
+<tt>std::pair&lt;const key_type, mapped_type&gt;(std::move(k), mapped_type())</tt>.
+</ins></p>
+
+<p><ins>
+<i>Requires:</i> <tt>mapped_type</tt> shall be <tt>DefaultConstructible</tt>.
+</ins></p>
+
+<p><ins>
+<i>Returns:</i> A reference to <tt>x.second</tt>, where <tt>x</tt> is the
+(unique) element whose key is equivalent to <tt>k</tt>.
+</ins></p>
+
+</blockquote>
+
+</blockquote>
+
+<p>
+Add new section [unord.map.modifiers]:
+</p>
+
+<blockquote>
+<pre><ins>pair&lt;iterator, bool&gt; insert(const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; pair&lt;iterator, bool&gt; insert(P&amp;&amp; x);</ins>
+<ins>iterator insert(iterator hint, const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; iterator insert(iterator hint, P&amp;&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; const_iterator insert(const_iterator hint, P&amp;&amp; x);</ins>
+<ins>template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);</ins>
+</pre>
+
+<blockquote>
+<p><ins>
+<i>Requires:</i> Those signatures taking a <tt>const value_type&amp;</tt> parameter
+requires both the <tt>key_type</tt> and the <tt>mapped_type</tt> to be
+<tt>CopyConstructible</tt>.
+</ins></p>
+
+<p><ins>
+<tt>P</tt> shall be convertible to <tt>value_type</tt>.
+ If <tt>P</tt> is instantiated as a reference
+type, then the argument <tt>x</tt> is copied from. Otherwise <tt>x</tt>
+is considered to be an rvalue as it is converted to <tt>value_type</tt>
+and inserted into the <tt>unordered_map</tt>. Specifically, in such
+cases <tt>CopyConstructible</tt> is not required of <tt>key_type</tt> or
+<tt>mapped_type</tt> unless the conversion from <tt>P</tt> specifically
+requires it (e.g. if <tt>P</tt> is a <tt>tuple&lt;const key_type,
+mapped_type&gt;</tt>, then <tt>key_type</tt> must be
+<tt>CopyConstructible</tt>).
+</ins></p>
+
+<p><ins>
+The signature taking <tt>InputIterator</tt>
+parameters requires <tt>CopyConstructible</tt> of both
+<tt>key_type</tt> and <tt>mapped_type</tt> if the dereferenced
+<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue
+<tt>value_type</tt>.
+</ins></p>
+
+</blockquote>
+
+</blockquote>
+
+<p>
+Add to 23.4.1.3 [unord.map.swap]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre>
+</blockquote>
+
+<p><b><tt>unordered_multimap</tt></b></p>
+
+<p>
+Change 23.4.2 [unord.multimap]:
+</p>
+
+<blockquote><pre>class unordered_multimap
+{
+ ...
+ unordered_multimap(const unordered_multimap&amp;);
+ <ins>unordered_multimap(unordered_multimap&amp;&amp;);</ins>
+ ~unordered_multimap();
+ unordered_multimap&amp; operator=(const unordered_multimap&amp;);
+ <ins>unordered_multimap&amp; operator=(unordered_multimap&amp;&amp;);</ins>
+ ...
+ // modifiers
+ iterator insert(const value_type&amp; obj);
+ <ins>template &lt;class P&gt; iterator insert(P&amp;&amp; obj);</ins>
+ iterator insert(iterator hint, const value_type&amp; obj);
+ <ins>template &lt;class P&gt; iterator insert(iterator hint, P&amp;&amp; obj);</ins>
+ const_iterator insert(const_iterator hint, const value_type&amp; obj);
+ <ins>template &lt;class P&gt; const_iterator insert(const_iterator hint, P&amp;&amp; obj);</ins>
+ ...
+ void swap(unordered_multimap&amp;<ins>&amp;</ins>);
+ ...
+};
+
+template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre></blockquote>
+
+<p>
+Add to 23.4.2.1 [unord.multimap.cnstr]:
+</p>
+
+<blockquote>
+<pre>template &lt;class InputIterator&gt;
+ unordered_multimap(InputIterator f, InputIterator l,
+ size_type n = <i>implementation-defined</i>,
+ const hasher&amp; hf = hasher(),
+ const key_equal&amp; eql = key_equal(),
+ const allocator_type&amp; a = allocator_type());
+</pre>
+
+<blockquote><p>
+<ins>
+<i>Requires:</i> If the iterator's dereference operator returns an
+lvalue or a const rvalue <tt>pair&lt;key_type, mapped_type&gt;</tt>,
+then both <tt>key_type</tt> and <tt>mapped_type</tt> shall be
+<tt>CopyConstructible</tt>.
+</ins>
+</p></blockquote>
+</blockquote>
+
+<p>
+Add new section [unord.multimap.modifiers]:
+</p>
+
+<blockquote>
+<pre><ins>iterator insert(const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; iterator insert(P&amp;&amp; x);</ins>
+<ins>iterator insert(iterator hint, const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; iterator insert(iterator hint, P&amp;&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, const value_type&amp; x);</ins>
+<ins>template &lt;class P&gt; const_iterator insert(const_iterator hint, P&amp;&amp; x);</ins>
+<ins>template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);</ins>
+</pre>
+
+<blockquote>
+<p><ins>
+<i>Requires:</i> Those signatures taking a <tt>const value_type&amp;</tt> parameter
+requires both the <tt>key_type</tt> and the <tt>mapped_type</tt> to be
+<tt>CopyConstructible</tt>.
+</ins></p>
+
+<p><ins>
+<tt>P</tt> shall be convertible to <tt>value_type</tt>.
+ If <tt>P</tt> is instantiated as a reference
+type, then the argument <tt>x</tt> is copied from. Otherwise <tt>x</tt>
+is considered to be an rvalue as it is converted to <tt>value_type</tt>
+and inserted into the <tt>unordered_multimap</tt>. Specifically, in such
+cases <tt>CopyConstructible</tt> is not required of <tt>key_type</tt> or
+<tt>mapped_type</tt> unless the conversion from <tt>P</tt> specifically
+requires it (e.g. if <tt>P</tt> is a <tt>tuple&lt;const key_type,
+mapped_type&gt;</tt>, then <tt>key_type</tt> must be
+<tt>CopyConstructible</tt>).
+</ins></p>
+
+<p><ins>
+The signature taking <tt>InputIterator</tt>
+parameters requires <tt>CopyConstructible</tt> of both
+<tt>key_type</tt> and <tt>mapped_type</tt> if the dereferenced
+<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue
+<tt>value_type</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Add to 23.4.2.2 [unord.multimap.swap]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre>
+</blockquote>
+
+<p><b><tt>unordered_set</tt></b></p>
+
+<p>
+Change 23.4.3 [unord.set]:
+</p>
+
+<blockquote><pre>class unordered_set
+{
+ ...
+ unordered_set(const unordered_set&amp;);
+ <ins>unordered_set(unordered_set&amp;&amp;);</ins>
+ ~unordered_set();
+ unordered_set&amp; operator=(const unordered_set&amp;);
+ <ins>unordered_set&amp; operator=(unordered_set&amp;&amp;);</ins>
+ ...
+ // modifiers
+ <del>std::</del>pair&lt;iterator, bool&gt; insert(const value_type&amp; obj);
+ <ins>pair&lt;iterator, bool&gt; insert(value_type&amp;&amp; obj);</ins>
+ iterator insert(iterator hint, const value_type&amp; obj);
+ <ins>iterator insert(iterator hint, value_type&amp;&amp; obj);</ins>
+ const_iterator insert(const_iterator hint, const value_type&amp; obj);
+ <ins>const_iterator insert(const_iterator hint, value_type&amp;&amp; obj);</ins>
+ ...
+ void swap(unordered_set&amp;<ins>&amp;</ins>);
+ ...
+};
+
+template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre></blockquote>
+
+<p>
+Add to 23.4.3.1 [unord.set.cnstr]:
+</p>
+
+<blockquote>
+<pre>template &lt;class InputIterator&gt;
+ unordered_set(InputIterator f, InputIterator l,
+ size_type n = <i>implementation-defined</i>,
+ const hasher&amp; hf = hasher(),
+ const key_equal&amp; eql = key_equal(),
+ const allocator_type&amp; a = allocator_type());
+</pre>
+
+<blockquote><p>
+<ins>
+<i>Requires:</i> If the iterator's dereference operator returns an
+lvalue or a const rvalue <tt>value_type</tt>, then the
+<tt>value_type</tt> shall be <tt>CopyConstructible</tt>.
+</ins>
+</p></blockquote>
+</blockquote>
+
+<p>
+Add new section [unord.set.modifiers]:
+</p>
+
+<blockquote>
+<pre><ins>pair&lt;iterator, bool&gt; insert(const value_type&amp; x);</ins>
+<ins>pair&lt;iterator, bool&gt; insert(value_type&amp;&amp; x);</ins>
+<ins>iterator insert(iterator hint, const value_type&amp; x);</ins>
+<ins>iterator insert(iterator hint, value_type&amp;&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, const value_type&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, value_type&amp;&amp; x);</ins>
+<ins>template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);</ins>
+</pre>
+
+<blockquote>
+
+<p><ins>
+<i>Requires:</i> Those signatures taking a <tt>const
+value_type&amp;</tt> parameter requires the <tt>value_type</tt> to
+be <tt>CopyConstructible</tt>.
+</ins></p>
+
+<p><ins>
+The signature taking <tt>InputIterator</tt> parameters requires
+<tt>CopyConstructible</tt> of <tt>value_type</tt> if the dereferenced
+<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue
+<tt>value_type</tt>.
+</ins></p>
+
+</blockquote>
+
+</blockquote>
+
+<p>
+Add to 23.4.3.2 [unord.set.swap]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre>
+</blockquote>
+
+<p><b><tt>unordered_multiset</tt></b></p>
+
+<p>
+Change 23.4.4 [unord.multiset]:
+</p>
+
+<blockquote><pre>class unordered_multiset
+{
+ ...
+ unordered_multiset(const unordered_multiset&amp;);
+ <ins>unordered_multiset(unordered_multiset&amp;&amp;);</ins>
+ ~unordered_multiset();
+ unordered_multiset&amp; operator=(const unordered_multiset&amp;);
+ <ins>unordered_multiset&amp; operator=(unordered_multiset&amp;&amp;);</ins>
+ ...
+ // modifiers
+ iterator insert(const value_type&amp; obj);
+ <ins>iterator insert(value_type&amp;&amp; obj);</ins>
+ iterator insert(iterator hint, const value_type&amp; obj);
+ <ins>iterator insert(iterator hint, value_type&amp;&amp; obj);</ins>
+ const_iterator insert(const_iterator hint, const value_type&amp; obj);
+ <ins>const_iterator insert(const_iterator hint, value_type&amp;&amp; obj);</ins>
+ ...
+ void swap(unordered_multiset&amp;<ins>&amp;</ins>);
+ ...
+};
+
+template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre></blockquote>
+
+<p>
+Add to 23.4.4.1 [unord.multiset.cnstr]:
+</p>
+
+<blockquote>
+<pre>template &lt;class InputIterator&gt;
+ unordered_multiset(InputIterator f, InputIterator l,
+ size_type n = <i>implementation-defined</i>,
+ const hasher&amp; hf = hasher(),
+ const key_equal&amp; eql = key_equal(),
+ const allocator_type&amp; a = allocator_type());
+</pre>
+
+<blockquote><p>
+<ins>
+<i>Requires:</i> If the iterator's dereference operator returns an
+lvalue or a const rvalue <tt>value_type</tt>, then the
+<tt>value_type</tt> shall be <tt>CopyConstructible</tt>.
+</ins>
+</p></blockquote>
+</blockquote>
+
+<p>
+Add new section [unord.multiset.modifiers]:
+</p>
+
+<blockquote>
+<pre><ins>iterator insert(const value_type&amp; x);</ins>
+<ins>iterator insert(value_type&amp;&amp; x);</ins>
+<ins>iterator insert(iterator hint, const value_type&amp; x);</ins>
+<ins>iterator insert(iterator hint, value_type&amp;&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, const value_type&amp; x);</ins>
+<ins>const_iterator insert(const_iterator hint, value_type&amp;&amp; x);</ins>
+<ins>template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);</ins>
+</pre>
+
+<blockquote>
+
+<p><ins>
+<i>Requires:</i> Those signatures taking a <tt>const
+value_type&amp;</tt> parameter requires the <tt>value_type</tt> to
+be <tt>CopyConstructible</tt>.
+</ins></p>
+
+<p><ins>
+The signature taking <tt>InputIterator</tt> parameters requires
+<tt>CopyConstructible</tt> of <tt>value_type</tt> if the dereferenced
+<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue
+<tt>value_type</tt>.
+</ins></p>
+
+</blockquote>
+
+</blockquote>
+
+<p>
+Add to 23.4.4.2 [unord.multiset.swap]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</ins>
+<ins>template &lt;class Key, class T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</ins>
+</pre>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="679"></a>679. resize parameter by value</h3>
+<p><b>Section:</b> 23.2 [sequences] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-06-11</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The C++98 standard specifies that one member function alone of the containers
+passes its parameter (<tt>T</tt>) by value instead of by const reference:
+</p>
+
+<blockquote><pre>void resize(size_type sz, T c = T());
+</pre></blockquote>
+
+<p>
+This fact has been discussed / debated repeatedly over the years, the first time
+being even before C++98 was ratified. The rationale for passing this parameter by
+value has been:
+</p>
+
+<blockquote>
+<p>
+So that self referencing statements are guaranteed to work, for example:
+</p>
+<blockquote><pre>v.resize(v.size() + 1, v[0]);
+</pre></blockquote>
+</blockquote>
+
+<p>
+However this rationale is not convincing as the signature for <tt>push_back</tt> is:
+</p>
+
+<blockquote><pre>void push_back(const T&amp; x);
+</pre></blockquote>
+
+<p>
+And <tt>push_back</tt> has similar semantics to <tt>resize</tt> (append).
+And <tt>push_back</tt> must also work in the self referencing case:
+</p>
+
+<blockquote><pre>v.push_back(v[0]); // must work
+</pre></blockquote>
+
+<p>
+The problem with passing <tt>T</tt> by value is that it can be significantly more
+expensive than passing by reference. The converse is also true, however when it is
+true it is usually far less dramatic (e.g. for scalar types).
+</p>
+
+<p>
+Even with move semantics available, passing this parameter by value can be expensive.
+Consider for example <tt>vector&lt;vector&lt;int&gt;&gt;</tt>:
+</p>
+
+<blockquote><pre>std::vector&lt;int&gt; x(1000);
+std::vector&lt;std::vector&lt;int&gt;&gt; v;
+...
+v.resize(v.size()+1, x);
+</pre></blockquote>
+
+<p>
+In the pass-by-value case, <tt>x</tt> is copied once to the parameter of
+<tt>resize</tt>. And then internally, since the code can not know at compile
+time by how much <tt>resize</tt> is growing the <tt>vector</tt>, <tt>x</tt> is
+usually copied (not moved) a second time from <tt>resize</tt>'s parameter into its proper place
+within the <tt>vector</tt>.
+</p>
+
+<p>
+With pass-by-const-reference, the <tt>x</tt> in the above example need be copied
+only once. In this case, <tt>x</tt> has an expensive copy constructor and so any
+copies that can be saved represents a significant savings.
+</p>
+
+<p>
+If we can be efficient for <tt>push_back</tt>, we should be efficient for <tt>resize</tt>
+as well. The resize taking a reference parameter has been coded and shipped in the
+CodeWarrior library with no reports of problems which I am aware of.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 23.2.2 [deque], p2:
+</p>
+
+<blockquote><pre>class deque {
+ ...
+ void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+<p>
+Change 23.2.2.2 [deque.capacity], p3:
+</p>
+
+<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+<p>
+Change 23.2.3 [list], p2:
+</p>
+
+<blockquote><pre>class list {
+ ...
+ void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+<p>
+Change 23.2.3.2 [list.capacity], p3:
+</p>
+
+<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+<p>
+Change 23.2.5 [vector], p2:
+</p>
+
+<blockquote><pre>class vector {
+ ...
+ void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+<p>
+Change 23.2.5.2 [vector.capacity], p11:
+</p>
+
+<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&amp;</ins> c);
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="680"></a>680. move_iterator operator-&gt; return</h3>
+<p><b>Section:</b> 24.4.3.1 [move.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-06-11</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>move_iterator</tt>'s <tt>operator-&gt;</tt> return type <tt>pointer</tt>
+does not consistently match the type which is returned in the description
+in 24.4.3.3.5 [move.iter.op.ref].
+</p>
+
+<blockquote><pre>template &lt;class Iterator&gt;
+class move_iterator {
+public:
+ ...
+ typedef typename iterator_traits&lt;Iterator&gt;::pointer pointer;
+ ...
+ pointer operator-&gt;() const {return current;}
+ ...
+private:
+ Iterator current; // exposition only
+};
+</pre></blockquote>
+
+
+<p>
+There are two possible fixes.
+</p>
+
+<ol>
+<li><tt>pointer operator-&gt;() const {return &amp;*current;}</tt></li>
+<li><tt>typedef Iterator pointer;</tt></li>
+</ol>
+
+<p>
+The first solution is the one chosen by <tt>reverse_iterator</tt>. A potential
+disadvantage of this is it may not work well with iterators which return a
+proxy on dereference and that proxy has overloaded <tt>operator&amp;()</tt>. Proxy
+references often need to overloaad <tt>operator&amp;()</tt> to return a proxy
+pointer. That proxy pointer may or may not be the same type as the iterator's
+<tt>pointer</tt> type.
+</p>
+
+<p>
+By simply returning the <tt>Iterator</tt> and taking advantage of the fact that
+the language forwards calls to <tt>operator-&gt;</tt> automatically until it
+finds a non-class type, the second solution avoids the issue of an overloaded
+<tt>operator&amp;()</tt> entirely.
+</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the synopsis in 24.4.3.1 [move.iterator]:
+</p>
+
+<blockquote><pre>typedef <del>typename iterator_traits&lt;</del>Iterator<del>&gt;::pointer</del> pointer;
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="684"></a>684. Unclear which members of match_results should be used in comparison</h3>
+<p><b>Section:</b> 28.10 [re.results] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.results">active issues</a> in [re.results].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.results">issues</a> in [re.results].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 28.4 [re.syn] of N2284, two template functions
+are declared here:
+</p>
+<blockquote><pre>// 28.10, class template match_results:
+&nbsp; &lt;<i>snip</i>&gt;
+// match_results comparisons
+&nbsp; template &lt;class BidirectionalIterator, class Allocator&gt;
+&nbsp; &nbsp; bool operator== (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
+&nbsp; template &lt;class BidirectionalIterator, class Allocator&gt;
+&nbsp; &nbsp; bool operator!= (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
+
+// 28.10.6, match_results swap:
+</pre></blockquote>
+
+<p>
+But the details of these two bool operator functions (i.e., which members of
+<tt>match_results</tt> should be used in comparison) are not described in any
+following sections.
+</p>
+
+<p><i>[
+John adds:
+]</i></p>
+
+
+<blockquote><p>
+That looks like a bug: <tt>operator==</tt> should return <tt>true</tt> only if
+the two objects refer to the same match - ie if one object was constructed as a
+copy of the other.
+</p></blockquote>
+
+<p><i>[
+Kona (2007): Bill and Pete to add minor wording to that proposed in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a new section after 28.10.6 [re.results.swap], which reads:
+</p>
+<p>
+28.10.7 match_results non-member functions.
+</p>
+
+<blockquote>
+<pre>template&lt;class BidirectionalIterator, class Allocator&gt;
+ bool operator==(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
+ const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>true</tt> only if the two objects refer to the same match.
+</p>
+</blockquote>
+</blockquote>
+
+<blockquote>
+<pre>template&lt;class BidirectionalIterator, class Allocator&gt;
+ bool operator!=(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
+ const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>!(m1 == m2)</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+<blockquote>
+<pre>template&lt;class BidirectionalIterator, class Allocator&gt;
+ void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
+ match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>m1.swap(m2)</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="685"></a>685. reverse_iterator/move_iterator difference has invalid signatures</h3>
+<p><b>Section:</b> 24.4.1.3.19 [reverse.iter.opdiff], 24.4.3.3.14 [move.iter.nonmember] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-06-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In C++03 the difference between two <tt>reverse_iterators</tt>
+</p>
+<blockquote><pre>ri1 - ri2
+</pre></blockquote>
+<p>
+is possible to compute only if both iterators have the same base
+iterator. The result type is the <tt>difference_type</tt> of the base iterator.
+</p>
+<p>
+In the current draft, the operator is defined as 24.4.1.3.19 [reverse.iter.opdiff]
+</p>
+<blockquote><pre>template&lt;class Iterator1, class Iterator2&gt;
+typename reverse_iterator&lt;Iterator&gt;::difference_type
+&nbsp; &nbsp;operator-(const reverse_iterator&lt;Iterator1&gt;&amp; x,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const reverse_iterator&lt;Iterator2&gt;&amp; y);
+</pre></blockquote>
+<p>
+The return type is the same as the C++03 one, based on the no longer
+present <tt>Iterator</tt> template parameter.
+</p>
+<p>
+Besides being slightly invalid, should this operator work only when
+<tt>Iterator1</tt> and <tt>Iterator2</tt> has the same <tt>difference_type</tt>? Or should the
+implementation choose one of them? Which one?
+</p>
+<p>
+The same problem now also appears in <tt>operator-()</tt> for <tt>move_iterator</tt>
+24.4.3.3.14 [move.iter.nonmember].
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the synopsis in 24.4.1.1 [reverse.iterator]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Iterator1, class Iterator2&gt;
+ <del>typename reverse_iterator&lt;Iterator&gt;::difference_type</del> <ins>auto</ins> operator-(
+ const reverse_iterator&lt;Iterator1&gt;&amp; x,
+ const reverse_iterator&lt;Iterator2&gt;&amp; y)<ins> -&gt; decltype(operator-(Iterator1, Iterator2))</ins>;
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>y.current - x.current</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+Change 24.4.1.3.19 [reverse.iter.opdiff]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Iterator1, class Iterator2&gt;
+ <del>typename reverse_iterator&lt;Iterator&gt;::difference_type</del> <ins>auto</ins> operator-(
+ const reverse_iterator&lt;Iterator1&gt;&amp; x,
+ const reverse_iterator&lt;Iterator2&gt;&amp; y)<ins> -&gt; decltype(operator-(Iterator1, Iterator2))</ins>;
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>y.current - x.current</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+
+<p>
+Change the synopsis in 24.4.3.1 [move.iterator]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Iterator1, class Iterator2&gt;
+ <del>typename move_iterator&lt;Iterator&gt;::difference_type</del> <ins>auto</ins> operator-(
+ const move_iterator&lt;Iterator1&gt;&amp; x,
+ const move_iterator&lt;Iterator2&gt;&amp; y)<ins> -&gt; decltype(operator-(Iterator1, Iterator2))</ins>;
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>y.current - x.current</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+Change 24.4.3.3.14 [move.iter.nonmember]:
+</p>
+
+<blockquote>
+<pre>template &lt;class Iterator1, class Iterator2&gt;
+ <del>typename move_iterator&lt;Iterator&gt;::difference_type</del> <ins>auto</ins> operator-(
+ const move_iterator&lt;Iterator1&gt;&amp; x,
+ const move_iterator&lt;Iterator2&gt;&amp; y)<ins> -&gt; decltype(operator-(Iterator1, Iterator2))</ins>;
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>x.base() - y.base()</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="686"></a>686. Unique_ptr and shared_ptr fail to specify non-convertibility to int for unspecified-bool-type</h3>
+<p><b>Section:</b> 20.6.5.2.4 [unique.ptr.single.observers], 20.6.6.2.5 [util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-06-14</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard library uses the <tt>operator <i>unspecified-bool-type</i>() const</tt> idiom in
+five places. In three of those places (20.5.15.2.3 [func.wrap.func.cap], function capacity
+for example) the returned value is constrained to disallow
+unintended conversions to int. The standardese is
+</p>
+<blockquote><p>
+The return type shall not be convertible to <tt>int</tt>.
+</p></blockquote>
+<p>
+This constraint is omitted for <tt>unique_ptr</tt> and <tt>shared_ptr</tt>. It should be added for those.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+To the <i>Returns</i> paragraph for <tt>operator <i>unspecified-bool-type</i>()
+const</tt>
+of 20.6.5.2.4 [unique.ptr.single.observers] paragraph 11 and 20.6.6.2.5
+[util.smartptr.shared.obs] paragraph 16, add the sentence:
+</p>
+<blockquote><p>
+The return type shall not be convertible to <tt>int</tt>.
+</p></blockquote>
+
+
+<p><i>[
+Kona (2007): Uncertain if <tt>nullptr</tt> will address this issue.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="687"></a>687. shared_ptr conversion constructor not constrained</h3>
+<p><b>Section:</b> 20.6.6.2.1 [util.smartptr.shared.const], 20.6.6.3.1 [util.smartptr.weak.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Since all conversions from <tt>shared_ptr&lt;T&gt;</tt> to <tt>shared_ptr&lt;U&gt;</tt> have the same
+rank regardless of the relationship between <tt>T</tt> and <tt>U</tt>, reasonable user
+code that works with raw pointers fails with <tt>shared_ptr</tt>:
+</p>
+
+<blockquote><pre>void f( shared_ptr&lt;void&gt; );
+void f( shared_ptr&lt;int&gt; );
+
+int main()
+{
+&nbsp;&nbsp;f( shared_ptr&lt;double&gt;() ); // ambiguous
+}
+</pre></blockquote>
+
+<p>
+Now that we officially have <tt>enable_if</tt>, we can constrain the constructor
+and the corresponding assignment operator to only participate in the
+overload resolution when the pointer types are compatible.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.6.6.2.1 [util.smartptr.shared.const], change:
+</p>
+
+<blockquote><p>
+-14- <i>Requires:</i> <del>For the second constructor</del> <ins>The
+second constructor shall not participate in the overload resolution
+unless</ins> <tt>Y*</tt> <del>shall be</del> <ins>is implicitly</ins> convertible
+to <tt>T*</tt>.
+</p></blockquote>
+
+<p>
+In 20.6.6.3.1 [util.smartptr.weak.const], change:
+</p>
+
+<blockquote>
+<pre><del>template&lt;class Y&gt; weak_ptr(shared_ptr&lt;Y&gt; const&amp; r);</del>
+<del>weak_ptr(weak_ptr const&amp; r);</del>
+<del>template&lt;class Y&gt; weak_ptr(weak_ptr&lt;Y&gt; const&amp; r);</del>
+<ins>weak_ptr(weak_ptr const&amp; r);</ins>
+<ins>template&lt;class Y&gt; weak_ptr(weak_ptr&lt;Y&gt; const&amp; r);</ins>
+<ins>template&lt;class Y&gt; weak_ptr(shared_ptr&lt;Y&gt; const&amp; r);</ins>
+</pre>
+<blockquote><p>
+-4- <i>Requires:</i> <del>For</del> <del>t</del><ins>T</ins>he second and
+third constructors<del>,</del> <ins>shall not participate in the
+overload resolution unless</ins> <tt>Y*</tt> <del>shall be</del>
+<ins>is implicitly</ins> convertible to <tt>T*</tt>.
+</p></blockquote>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="688"></a>688. reference_wrapper, cref unsafe, allow binding to rvalues</h3>
+<p><b>Section:</b> 20.5.5.1 [refwrap.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#refwrap.const">active issues</a> in [refwrap.const].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#refwrap.const">issues</a> in [refwrap.const].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A <tt>reference_wrapper</tt> can be constructed from an rvalue, either by using
+the constructor, or via <tt>cref</tt> (and <tt>ref</tt> in some corner cases). This leads
+to a dangling reference being stored into the <tt>reference_wrapper</tt> object.
+Now that we have a mechanism to detect an rvalue, we can fix them to
+disallow this source of undefined behavior.
+</p>
+
+<p>
+Also please see the thread starting at c++std-lib-17398 for some good discussion on this subject.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.5.5 [refwrap], add:
+</p>
+
+<blockquote><pre><ins>private:</ins>
+<ins>&nbsp;&nbsp;explicit reference_wrapper(T&amp;&amp;);</ins>
+</pre></blockquote>
+
+<p>
+In 20.5.5.1 [refwrap.const], add:
+</p>
+
+<blockquote>
+<pre><ins>explicit reference_wrapper(T&amp;&amp;);</ins>
+</pre>
+<blockquote><p>
+<ins>-?- Not defined to disallow creating a <tt>reference_wrapper</tt> from an rvalue.</ins>
+</p></blockquote>
+</blockquote>
+
+<p>
+In the synopsis of <tt>&lt;functional&gt;</tt> (20.5.5 [refwrap]), change the declarations
+of <tt>ref</tt> and <tt>cref</tt> to:
+</p>
+
+<blockquote><pre>template&lt;class T&gt; reference_wrapper&lt;T&gt; ref(T&amp;<ins>&amp;</ins>);
+template&lt;class T&gt; reference_wrapper&lt;const T&gt; cref(<del>const</del> T&amp;<ins>&amp;</ins>);
+</pre></blockquote>
+
+<p>
+In 20.5.5.5 [refwrap.helpers], change:
+</p>
+
+<blockquote>
+<pre>template&lt;class T&gt; reference_wrapper&lt;T&gt; ref(T&amp;<ins>&amp;</ins> t);
+</pre>
+<blockquote>
+<p>
+<ins>-1- <i>Requires:</i> <tt>t</tt> shall be an lvalue.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<p>and change:</p>
+
+<blockquote>
+<pre>template&lt;class T&gt; reference_wrapper&lt;const T&gt; cref(<del>const</del> T&amp;<ins>&amp;</ins> t);
+</pre>
+<blockquote>
+<p>
+<ins>-6- <i>Requires:</i> <tt>t</tt> shall be an lvalue.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+
+
+<p><i>[
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2292.html">N2292</a>
+addresses the first part of the resolution but not the second.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="689"></a>689. reference_wrapper constructor overly constrained</h3>
+<p><b>Section:</b> 20.5.5.1 [refwrap.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#refwrap.const">active issues</a> in [refwrap.const].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#refwrap.const">issues</a> in [refwrap.const].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The constructor of <tt>reference_wrapper</tt> is currently <tt>explicit</tt>. The primary
+motivation behind this is the safety problem with respect to rvalues,
+which is addressed by the proposed resolution of the previous issue.
+Therefore we should consider relaxing the requirements on the
+constructor since requests for the implicit conversion keep resurfacing.
+</p>
+<p>
+Also please see the thread starting at c++std-lib-17398 for some good discussion on this subject.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove the <tt>explicit</tt> from the constructor of <tt>reference_wrapper</tt>. If the
+proposed resolution of the previous issue is accepted, remove the
+<tt>explicit</tt> from the <tt>T&amp;&amp;</tt> constructor as well to keep them in sync.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="691"></a>691. const_local_iterator cbegin, cend missing from TR1</h3>
+<p><b>Section:</b> 23.4 [unord], TR1 6.3 [tr.hash] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>
+ <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2007-06-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord">active issues</a> in [unord].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord">issues</a> in [unord].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Review">Review</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The last version of TR1 does not include the following member
+functions
+for unordered containers:
+</p>
+
+<blockquote><pre>const_local_iterator cbegin(size_type n) const;
+const_local_iterator cend(size_type n) const;
+</pre></blockquote>
+
+<p>
+which looks like an oversight to me. I've checked th TR1 issues lists
+and the latest working draft of the C++0x std (N2284) and haven't
+found any mention to these menfuns or to their absence.
+</p>
+<p>
+Is this really an oversight, or am I missing something?
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following two rows to table 93 (unordered associative container
+requirements) in section 23.1.3 [unord.req]:
+</p>
+
+<blockquote>
+<table border="1">
+<caption>Unordered associative container requirements (in addition to container)</caption>
+<tbody><tr>
+<th>expression</th> <th>return type</th> <th>assertion/note pre/post-condition</th> <th>complexity</th>
+</tr>
+<tr>
+<td><ins><tt>b.cbegin(n)</tt></ins></td> <td><ins><tt>const_local_iterator</tt></ins></td> <td><ins><tt>n</tt> shall be in the range <tt>[0, bucket_count())</tt>. Note: <tt>[b.cbegin(n), b.cend(n))</tt> is a valid range containing all of the elements in the <tt>n</tt><sup><i>th</i></sup> bucket.</ins></td> <td><ins>Constant</ins></td>
+</tr>
+<tr>
+<td><ins><tt>b.cend(n)</tt></ins></td> <td><ins><tt>const_local_iterator</tt></ins></td> <td><ins><tt>n</tt> shall be in the range <tt>[0, bucket_count())</tt>.</ins></td> <td><ins>Constant</ins></td>
+</tr>
+</tbody></table>
+</blockquote>
+
+<p>
+Add to the synopsis in 23.4.1 [unord.map]:
+</p>
+
+<blockquote><pre><ins>const_local_iterator cbegin(size_type n) const;
+const_local_iterator cend(size_type n) const;</ins>
+</pre></blockquote>
+
+<p>
+Add to the synopsis in 23.4.2 [unord.multimap]:
+</p>
+
+<blockquote><pre><ins>const_local_iterator cbegin(size_type n) const;
+const_local_iterator cend(size_type n) const;</ins>
+</pre></blockquote>
+
+<p>
+Add to the synopsis in 23.4.3 [unord.set]:
+</p>
+
+<blockquote><pre><ins>const_local_iterator cbegin(size_type n) const;
+const_local_iterator cend(size_type n) const;</ins>
+</pre></blockquote>
+
+<p>
+Add to the synopsis in 23.4.4 [unord.multiset]:
+</p>
+
+<blockquote><pre><ins>const_local_iterator cbegin(size_type n) const;
+const_local_iterator cend(size_type n) const;</ins>
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="692"></a>692. <code>get_money</code> and <code>put_money</code> should be&nbsp;formatted I/O functions</h3>
+<p><b>Section:</b> 27.6.4 [ext.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ext.manip">issues</a> in [ext.manip].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In a private email Bill Plauger notes:
+</p>
+<blockquote><p>
+I &nbsp;believe that &nbsp;the function &nbsp;that &nbsp;implements <code>get_money</code>
+[from <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2072.html">N2072</a>]
+should behave &nbsp;as a &nbsp;formatted input function, &nbsp;and the &nbsp;function that
+implements <code>put_money</code> should &nbsp;behave as a formatted output
+function. This &nbsp;has implications regarding the &nbsp;skipping of whitespace
+and the handling of errors, among other things.
+</p>
+<p>
+The words &nbsp;don't say that &nbsp;right now and &nbsp;I'm far from &nbsp;convinced that
+such a change is editorial.
+</p></blockquote>
+<p>
+Martin's response:
+</p>
+<blockquote><p>
+I agree that the manipulators should handle exceptions the same way as
+formatted I/O functions do. The text in N2072 assumes so but the
+<i>Returns</i> clause explicitly omits exception handling for the sake
+of brevity. The spec should be clarified to that effect.
+</p>
+<p>
+As for dealing &nbsp;with whitespace, I also agree it &nbsp;would make sense for
+the extractors &nbsp;and inserters involving the new &nbsp;manipulators to treat
+it the same way as formatted I/O.
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add &nbsp;a new &nbsp;paragraph immediately &nbsp;above &nbsp;p4 of 27.6.4 [ext.manip] with &nbsp;the
+following text:
+</p>
+<blockquote><p>
+<i>Effects</i>: &nbsp;The &nbsp;&nbsp;expression &nbsp;<code><i>in</i> &gt;&gt; get_money(mon, intl)</code>
+described below behaves as a formatted input function (as
+described in 27.6.1.2.1 [istream.formatted.reqmts]).
+</p></blockquote>
+<p>
+Also change p4 of 27.6.4 [ext.manip] as follows:
+</p>
+<blockquote><p>
+<i>Returns</i>: An object <code>s</code> of unspecified type such that
+if <code>in</code> is &nbsp;an object of type <code>basic_istream&lt;charT,
+traits&gt;</code> &nbsp;&nbsp;&nbsp;then &nbsp;&nbsp;&nbsp;the &nbsp;&nbsp;&nbsp;expression &nbsp;&nbsp;<code><i>in</i> &gt;&gt; get_money(mon, intl)</code> behaves as <ins>a formatted input function
+that &nbsp;&nbsp;&nbsp;calls &nbsp;&nbsp;&nbsp;</ins><code>f(in, mon, intl)</code><del> &nbsp;&nbsp;&nbsp;were
+called</del>. The function <code>f</code> can be defined as...
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="693"></a>693. <code>std::bitset::all()</code> missing</h3>
+<p><b>Section:</b> 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.bitset">issues</a> in [template.bitset].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The <code>bitset</code> class template provides the member function
+<code>any()</code> to determine whether an object of the type has any
+bits set, and the member function <code>none()</code> to determine
+whether all of an object's bits are clear. However, the template does
+not provide a corresponding function to discover whether a
+<code>bitset</code> object has all its bits set. While it is
+possible, even easy, to obtain this information by comparing the
+result of <code>count()</code> with the result of <code>size()</code>
+for equality (i.e., via <code>b.count() == b.size()</code>) the
+operation is less efficient than a member function designed
+specifically for that purpose could be. (<code>count()</code> must
+count all non-zero bits in a <code>bitset</code> a word at a time
+while <code>all()</code> could stop counting as soon as it encountered
+the first word with a zero bit).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a declaration of the new member function <code>all()</code> to the
+defintion of the <code>bitset</code> template in 23.3.5 [template.bitset], p1,
+right above the declaration of <code>any()</code> as shown below:
+</p>
+
+<blockquote><pre>bool operator!=(const bitset&lt;N&gt;&amp; rhs) const;
+bool test(size_t pos) const;
+<ins>bool all() const;</ins>
+bool any() const;
+bool none() const;
+</pre></blockquote>
+
+<p>
+Add a description of the new member function to the end of 23.3.5.2 [bitset.members] with the following text:
+</p>
+<blockquote><p>
+<code>bool all() const;</code>
+</p>
+<blockquote>
+<i>Returns</i>: <code>count() == size()</code>.
+</blockquote>
+</blockquote>
+
+<p>
+In addition, change the description of <code>any()</code> and
+<code>none()</code> for consistency with <code>all()</code> as
+follows:
+</p>
+<blockquote><p>
+<code>bool any() const;</code>
+</p>
+<blockquote>
+<p>
+<i>Returns</i>: <del><code>true</code> if any bit in <code>*this</code>
+is one</del><ins><code>count() != 0</code></ins>.
+</p>
+</blockquote>
+<p>
+<code>bool none() const;</code>
+</p>
+<blockquote>
+<p>
+<i>Returns</i>: <del><code>true</code> if no bit in <code>*this</code>
+is one</del><ins><code>count() == 0</code></ins>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="694"></a>694. <code>std::bitset</code> and <code>long long</code></h3>
+<p><b>Section:</b> 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.bitset">issues</a> in [template.bitset].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Objects of the <code>bitset</code> class template specializations can
+be constructed from and explicitly converted to values of the widest
+C++ integer type, <code>unsigned long</code>. With the introduction
+of <code>long long</code> into the language the template should be
+enhanced to make it possible to interoperate with values of this type
+as well, or perhaps <code>uintmax_t</code>. See c++std-lib-18274 for
+a brief discussion in support of this change.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+For simplicity, instead of adding overloads for <code>unsigned long
+long</code> and dealing with possible ambiguities in the spec, replace
+the <code>bitset</code> ctor that takes an <code>unsigned long</code>
+argument with one taking <code>unsigned long long</code> in the
+definition of the template as shown below. (The standard permits
+implementations to add overloads on other integer types or employ
+template tricks to achieve the same effect provided they don't cause
+ambiguities or changes in behavior.)
+</p>
+<blockquote>
+<pre>// [bitset.cons] constructors:
+bitset();
+bitset(unsigned <ins>long</ins> long val);
+template&lt;class charT, class traits, class Allocator&gt;
+explicit bitset(
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ typename basic_string&lt;charT,traits,Allocator&gt;::size_type pos = 0,
+ typename basic_string&lt;charT,traits,Allocator&gt;::size_type n =
+ basic_string&lt;charT,traits,Allocator&gt;::npos);
+</pre>
+</blockquote>
+<p>
+Make a corresponding change in 23.3.5.1 [bitset.cons], p2:
+</p>
+<blockquote>
+<p>
+<code>bitset(unsigned <ins>long</ins> long val);</code>
+</p>
+<blockquote>
+<i>Effects</i>: Constructs an object of class bitset&lt;N&gt;,
+initializing the first <code><i>M</i></code> bit positions to the
+corresponding bit values in <code><i>val</i></code>.
+<code><i>M</i></code> is the smaller of <code><i>N</i></code> and the
+number of bits in the value representation (section [basic.types]) of
+<code>unsigned <ins> long</ins> long</code>. If <code><i>M</i> &lt;
+<i>N</i></code> <ins>is <code>true</code></ins>, the remaining bit
+positions are initialized to zero.
+</blockquote>
+</blockquote>
+
+<p>
+Additionally, introduce a new member function <code>to_ullong()</code>
+to make it possible to convert <code>bitset</code> to values of the
+new type. Add the following declaration to the definition of the
+template, immediate after the declaration of <code>to_ulong()</code>
+in 23.3.5 [template.bitset], p1, as shown below:
+</p>
+<blockquote>
+<pre>// element access:
+bool operator[](size_t pos) const; // for b[i];
+reference operator[](size_t pos); // for b[i];
+unsigned long to_ulong() const;
+<ins>unsigned long long to_ullong() const;</ins>
+template &lt;class charT, class traits, class Allocator&gt;
+basic_string&lt;charT, traits, Allocator&gt; to_string() const;
+</pre>
+</blockquote>
+<p>
+And add a description of the new member function to 23.3.5.2 [bitset.members],
+below the description of the existing <code>to_ulong()</code> (if
+possible), with the following text:
+</p>
+<blockquote>
+<p>
+<code>unsigned long long to_ullong() const;</code>
+</p>
+<blockquote>
+<i>Throws</i>: <code>overflow_error</code> if the integral value
+<code><i>x</i></code> corresponding to the bits in <code>*this</code>
+cannot be represented as type <code>unsigned long long</code>.
+</blockquote>
+<blockquote>
+<i>Returns:</i> <code><i>x</i></code>.
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="695"></a>695. ctype&lt;char&gt;::classic_table() not accessible</h3>
+<p><b>Section:</b> 22.2.1.3 [facet.ctype.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The <code>ctype&lt;char&gt;::classic_table()</code> static member
+function returns a pointer to an array of const
+<code>ctype_base::mask</code> objects (enums) that contains
+<code>ctype&lt;char&gt;::table_size</code> elements. The table
+describes the properties of the character set in the "C" locale (i.e.,
+whether a character at an index given by its value is alpha, digit,
+punct, etc.), and is typically used to initialize the
+<code>ctype&lt;char&gt;</code> facet in the classic "C" locale (the
+protected <code>ctype&lt;char&gt;</code> member function
+<code>table()</code> then returns the same value as
+<code>classic_table()</code>).
+</p>
+<p>
+However, while <code>ctype&lt;char&gt;::table_size</code> (the size of
+the table) is a public static const member of the
+<code>ctype&lt;char&gt;</code> specialization, the
+<code>classic_table()</code> static member function is protected. That
+makes getting at the classic data less than convenient (i.e., one has
+to create a whole derived class just to get at the masks array). It
+makes little sense to expose the size of the table in the public
+interface while making the table itself protected, especially when the
+table is a constant object.
+</p>
+<p>
+The same argument can be made for the non-static protected member
+function <code>table()</code>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Make the <code>ctype&lt;char&gt;::classic_table()</code> and
+<code>ctype&lt;char&gt;::table()</code> member functions public by
+moving their declarations into the public section of the definition of
+specialization in 22.2.1.3 [facet.ctype.special] as shown below:
+</p>
+<blockquote>
+<pre> static locale::id id;
+ static const size_t table_size = IMPLEMENTATION_DEFINED;
+<del>protected:</del>
+ const mask* table() const throw();
+ static const mask* classic_table() throw();
+<ins>protected:</ins>
+
+~ctype(); // virtual
+virtual char do_toupper(char c) const;
+</pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="696"></a>696. <code>istream::operator&gt;&gt;(int&amp;)</code> broken</h3>
+<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-23</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+From message c++std-lib-17897:
+</p>
+<p>
+The code shown in 27.6.1.2.2 [istream.formatted.arithmetic] as the "as if"
+implementation of the two arithmetic extractors that don't have a
+corresponding <code>num_get</code> interface (i.e., the
+<code>short</code> and <code>int</code> overloads) is subtly buggy in
+how it deals with <code>EOF</code>, overflow, and other similar
+conditions (in addition to containing a few typos).
+</p>
+<p>
+One problem is that if <code>num_get::get()</code> reaches the EOF
+after reading in an otherwise valid value that exceeds the limits of
+the narrower type (but not <code>LONG_MIN</code> or
+<code>LONG_MAX</code>), it will set <code><i>err</i></code> to
+<code>eofbit</code>. Because of the if condition testing for
+<code>(<i>err</i> == 0)</code>, the extractor won't set
+<code>failbit</code> (and presumably, return a bogus value to the
+caller).
+</p>
+<p>
+Another problem with the code is that it never actually sets the
+argument to the extracted value. It can't happen after the call to
+<code>setstate()</code> since the function may throw, so we need to
+show when and how it's done (we can't just punt as say: "it happens
+afterwards"). However, it turns out that showing how it's done isn't
+quite so easy since the argument is normally left unchanged by the
+facet on error except when the error is due to a misplaced thousands
+separator, which causes <code>failbit</code> to be set but doesn't
+prevent the facet from storing the value.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="697"></a>697. New <tt>&lt;system_error&gt;</tt> header leads to name clashes</h3>
+<p><b>Section:</b> 19.4 [syserr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-06-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The most recent state of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2241.html">N2241</a>
+as well as the current draft
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
+(section 19.4 [syserr], p.2) proposes a
+new
+enumeration type <tt>posix_errno</tt> immediatly in the namespace <tt>std</tt>. One of
+the enumerators has the name <tt>invalid_argument</tt>, or fully qualified:
+<tt>std::invalid_argument</tt>. This name clashes with the exception type
+<tt>std::invalid_argument</tt>, see 19.1 [std.exceptions]/p.3. This clash makes
+e.g. the following snippet invalid:
+</p>
+
+<blockquote><pre>#include &lt;system_error&gt;
+#include &lt;stdexcept&gt;
+
+void foo() { throw std::invalid_argument("Don't call us - we call you!"); }
+</pre></blockquote>
+
+<p>
+I propose that this enumeration type (and probably the remaining parts
+of
+<tt>&lt;system_error&gt;</tt> as well) should be moved into one additional inner
+namespace, e.g. <tt>sys</tt> or <tt>system</tt> to reduce foreseeable future clashes
+due
+to the great number of members that <tt>std::posix_errno</tt> already contains
+(Btw.: Why has the already proposed <tt>std::sys</tt> sub-namespace from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2066.html">N2066</a>
+been rejected?). A further clash <em>candidate</em> seems to be
+<tt>std::protocol_error</tt>
+(a reasonable name for an exception related to a std network library,
+I guess).
+</p>
+
+<p>
+Another possible resolution would rely on the proposed strongly typed
+enums,
+as described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2213.pdf">N2213</a>.
+But maybe the forbidden implicit conversion to integral types would
+make
+these enumerators less attractive in this special case?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="698"></a>698. Some system_error issues</h3>
+<p><b>Section:</b> 19.4.5.1 [syserr.syserr.overview] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-06-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 19.4.5.1 [syserr.syserr.overview] we have the class definition of
+<tt>std::system_error</tt>. In contrast to all exception classes, which
+are constructible with a <tt>what_arg string</tt> (see 19.1 [std.exceptions],
+or <tt>ios_base::failure</tt> in 27.4.2.1.1 [ios::failure]), only overloads with with
+<tt>const string&amp;</tt> are possible. For consistency with the re-designed
+remaining exception classes this class should also provide
+c'tors which accept a const <tt>char* what_arg</tt> string.
+</p>
+<p>
+Please note that this proposed addition makes sense even
+considering the given implementation hint for <tt>what()</tt>, because
+<tt>what_arg</tt> is required to be set as <tt>what_arg</tt> of the base class
+<tt>runtime_error</tt>, which now has the additional c'tor overload
+accepting a <tt>const char*</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="700"></a>700. N1856 defines struct <tt>identity</tt></h3>
+<p><b>Section:</b> 20.2.2 [forward] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-07-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a>
+defines struct <tt>identity</tt> in <tt>&lt;utility&gt;</tt> which clashes with
+the traditional definition of struct <tt>identity</tt> in <tt>&lt;functional&gt;</tt>
+(not standard, but a common extension from old STL). Be nice
+if we could avoid this name clash for backward compatibility.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.2.2 [forward]:
+</p>
+
+<blockquote>
+<pre>template &lt;class T&gt; struct identity
+{
+ typedef T type;
+ <ins>const T&amp; operator()(const T&amp; x) const;</ins>
+};
+</pre>
+<blockquote>
+<pre><ins>const T&amp; operator()(const T&amp; x) const;</ins>
+</pre>
+<blockquote>
+<p>
+<ins><i>Returns:</i> <tt>x</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="701"></a>701. assoc laguerre poly's</h3>
+<p><b>Section:</b> TR1 5.2.1.1 [tr.num.sf.Lnm] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Christopher Crawford <b>Date:</b> 2007-06-30</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I see that the definition the associated Laguerre
+polynomials TR1 5.2.1.1 [tr.num.sf.Lnm] has been corrected since
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1687.pdf">N1687</a>.
+However, the draft standard only specifies ranks of integer value <tt>m</tt>,
+while the associated Laguerre polynomials are actually valid for real
+values of <tt>m &gt; -1</tt>. &nbsp;In the case of non-integer values of <tt>m</tt>, the
+definition &nbsp;<tt><i>L</i><sub>n</sub><sup>(m)</sup> = (1/n!)e<sup>x</sup>x<sup>-m</sup> (d/dx)<sup>n</sup> (e<sup>-x</sup>x<sup>m+n</sup>)</tt>
+must be used, which also holds for integer values of <tt>m</tt>. &nbsp;See
+Abramowitz &amp; Stegun, 22.11.6 for the general case, and 22.5.16-17 for
+the integer case.&nbsp;&nbsp;In fact fractional values are most commonly used in
+physics, for example to <tt>m = +/- 1/2</tt> to describe the harmonic
+oscillator in 1 dimension, and <tt>1/2, 3/2, 5/2, ...</tt> in 3
+dimensions.
+</p>
+<p>
+If I am correct, the calculation of the more general case is no
+more difficult, and is in fact the function implemented in the GNU
+Scientific Library.&nbsp;&nbsp;I would urge you to consider upgrading the
+standard, either adding extra functions for real <tt>m</tt> or switching the
+current ones to <tt>double</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="702"></a>702. Restriction in associated Legendre functions</h3>
+<p><b>Section:</b> TR1 5.2.1.2 [tr.num.sf.Plm] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Christopher Crawford <b>Date:</b> 2007-06-30</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+One other small thing, in TR1 5.2.1.2 [tr.num.sf.Plm], the restriction should&nbsp;&nbsp;be
+<tt>|x| &lt;= 1</tt>, not <tt>x &gt;= 0</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="703"></a>703. <tt>map::at()</tt> need a complexity specification</h3>
+<p><b>Section:</b> 23.3.1.2 [map.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Joe Gottman <b>Date:</b> 2007-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#map.access">issues</a> in [map.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>map::at()</tt> need a complexity specification.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following to the specification of <tt>map::at()</tt>, 23.3.1.2 [map.access]:
+</p>
+<blockquote>
+<p>
+<i>Complexity:</i> logarithmic.
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="704"></a>704. MoveAssignable requirement for container value type overly strict</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The move-related changes inadvertently overwrote the intent of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#276">276</a>.
+Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#276">276</a> removed the requirement of <tt>CopyAssignable</tt> from
+most of the member functions of node-based containers. But the move-related changes
+unnecessarily introduced the <tt>MoveAssignable</tt> requirement for those members which used to
+require <tt>CopyAssignable</tt>.
+</p>
+
+<p>
+We also discussed (c++std-lib-18722) the possibility of dropping <tt>MoveAssignable</tt>
+from some of the sequence requirements. Additionally the <i>in-place</i> construction
+work may further reduce requirements. For purposes of an easy reference, here are the
+minimum sequence requirements as I currently understand them. Those items in requirements
+table in the working draft which do not appear below have been purposefully omitted for
+brevity as they do not have any requirements of this nature. Some items which do not
+have any requirements of this nature are included below just to confirm that they were
+not omitted by mistake.
+</p>
+
+<table border="1">
+<caption>Container Requirements</caption>
+<tbody><tr><td><tt>X u(a)</tt></td><td><tt>value_type</tt> must be <tt>CopyConstructible</tt></td></tr>
+<tr><td><tt>X u(rv)</tt></td><td><tt>array</tt> requires <tt>value_type</tt> to be <tt>MoveConstructible</tt></td></tr>
+<tr><td><tt>a = u</tt></td><td>Sequences require <tt>value_type</tt> to be <tt>CopyConstructible</tt> and <tt>CopyAssignable</tt>.
+ Associative containers require <tt>value_type</tt> to be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a = rv</tt></td><td><tt>array</tt> requires <tt>value_type</tt> to be <tt>MoveAssignable</tt>.
+ Sequences with non-<tt>Swappable</tt> allocators require <tt>value_type</tt> to be <tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>.
+ Associative containers with non-<tt>Swappable</tt> allocators require <tt>value_type</tt> to be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>swap(a,u)</tt></td><td><tt>array</tt> requires <tt>value_type</tt> to be <tt>Swappable</tt>.
+ Sequences with non-<tt>Swappable</tt> allocators require <tt>value_type</tt> to be <tt>Swappable</tt>, <tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>.
+ Associative containers with non-<tt>Swappable</tt> allocators require <tt>value_type</tt> to be <tt>MoveConstructible</tt>.</td></tr>
+</tbody></table>
+
+<p>
+</p>
+
+<table border="1">
+<caption>Sequence Requirements</caption>
+<tbody><tr><td><tt>X(n)</tt></td><td><tt>value_type</tt> must be <tt>DefaultConstructible</tt></td></tr>
+<tr><td><tt>X(n, t)</tt></td><td><tt>value_type</tt> must be <tt>CopyConstructible</tt></td></tr>
+<tr><td><tt>X(i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ If the iterators return an rvalue the <tt>value_type</tt> must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(p, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>CopyAssignable</tt>.</td></tr>
+<tr><td><tt>a.insert(p, rv)</tt></td><td>The <tt>value_type</tt> must be <tt>MoveConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>MoveAssignable</tt>.</td></tr>
+<tr><td><tt>a.insert(p, n, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>CopyAssignable</tt>.</td></tr>
+<tr><td><tt>a.insert(p, i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>CopyAssignable</tt> when the iterators return an lvalue.
+ If the iterators return an rvalue the <tt>value_type</tt> must be <tt>MoveConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>MoveAssignable</tt> when the iterators return an rvalue.</td></tr>
+<tr><td><tt>a.erase(p)</tt></td><td>The sequences <tt>vector</tt> and <tt>deque</tt> require the <tt>value_type</tt> to be <tt>MoveAssignable</tt>.</td></tr>
+<tr><td><tt>a.erase(q1, q2)</tt></td><td>The sequences <tt>vector</tt> and <tt>deque</tt> require the <tt>value_type</tt> to be <tt>MoveAssignable</tt>.</td></tr>
+<tr><td><tt>a.clear()</tt></td><td></td></tr>
+<tr><td><tt>a.assign(i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt> and <tt>CopyAssignable</tt>.
+ If the iterators return an rvalue the <tt>value_type</tt> must be <tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>.</td></tr>
+<tr><td><tt>a.assign(n, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt> and <tt>CopyAssignable</tt>.</td></tr>
+<tr><td><tt>a.resize(n)</tt></td><td>The <tt>value_type</tt> must be <tt>DefaultConstructible</tt>.
+ The sequences <tt>vector</tt> and <tt>deque</tt> also require the <tt>value_type</tt> to be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.resize(n, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+</tbody></table>
+
+<p>
+</p>
+
+<table border="1">
+<caption>Optional Sequence Requirements</caption>
+<tbody><tr><td><tt>a.front()</tt></td><td></td></tr>
+<tr><td><tt>a.back()</tt></td><td></td></tr>
+<tr><td><tt>a.push_front(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a.push_front(rv)</tt></td><td>The <tt>value_type</tt> must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.push_back(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a.push_back(rv)</tt></td><td>The <tt>value_type</tt> must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.pop_front()</tt></td><td></td></tr>
+<tr><td><tt>a.pop_back()</tt></td><td></td></tr>
+<tr><td><tt>a[n]</tt></td><td></td></tr>
+<tr><td><tt>a.at[n]</tt></td><td></td></tr>
+</tbody></table>
+
+<p>
+</p>
+
+<table border="1">
+<caption>Associative Container Requirements</caption>
+<tbody><tr><td><tt>X(i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ If the iterators return an rvalue the <tt>value_type</tt> must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a_uniq.insert(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a_uniq.insert(rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a_eq.insert(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a_eq.insert(rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(p, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(p, rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ If the iterators return an rvalue the <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>..</td></tr>
+</tbody></table>
+
+<p>
+</p>
+
+<table border="1">
+<caption>Unordered Associative Container Requirements</caption>
+<tbody><tr><td><tt>X(i, j, n, hf, eq)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ If the iterators return an rvalue the <tt>value_type</tt> must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a_uniq.insert(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a_uniq.insert(rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a_eq.insert(t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a_eq.insert(rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(p, t)</tt></td><td>The <tt>value_type</tt> must be <tt>CopyConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(p, rv)</tt></td><td>The <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>a.insert(i, j)</tt></td><td>If the iterators return an lvalue the <tt>value_type</tt> must be <tt>CopyConstructible</tt>.
+ If the iterators return an rvalue the <tt>key_type</tt> and the <tt>mapped_type</tt> (if it exists) must be <tt>MoveConstructible</tt>..</td></tr>
+</tbody></table>
+
+<p>
+</p>
+
+<table border="1">
+<caption>Miscellaneous Requirements</caption>
+<tbody><tr><td><tt>map[lvalue-key]</tt></td><td>The <tt>key_type</tt> must be <tt>CopyConstructible</tt>.
+ The <tt>mapped_type</tt> must be <tt>DefaultConstructible</tt> and <tt>MoveConstructible</tt>.</td></tr>
+<tr><td><tt>map[rvalue-key]</tt></td><td>The <tt>key_type</tt> must be <tt>MoveConstructible</tt>.
+ The <tt>mapped_type</tt> must be <tt>DefaultConstructible</tt> and <tt>MoveConstructible</tt>.</td></tr>
+</tbody></table>
+
+<p><i>[
+Kona (2007): Howard and Alan to update requirements table in issue with emplace signatures.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="705"></a>705. type-trait <tt>decay</tt> incompletely specified</h3>
+<p><b>Section:</b> 20.4.7 [meta.trans.other] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 2007-07-08</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current working draft has a type-trait <tt>decay</tt> in 20.4.7 [meta.trans.other].
+</p>
+
+<p>
+Its use is to turn C++03 pass-by-value parameters into efficient C++0x
+pass-by-rvalue-reference parameters. However, the current definition
+introduces an incompatible change where the cv-qualification of the
+parameter type is retained. The deduced type should loose such
+cv-qualification, as pass-by-value does.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.4.7 [meta.trans.other] change the last sentence:
+</p>
+
+<blockquote><p>
+Otherwise the member typedef <tt>type</tt> equals <tt><ins>remove_cv&lt;</ins>U<ins>&gt;::type</ins></tt>.
+</p></blockquote>
+
+<p>
+In 20.3.1.2 [tuple.creation]/1 change:
+</p>
+
+<blockquote><p>
+<del>where each <tt>Vi</tt> in <tt>VTypes</tt> is <tt>X&amp;</tt> if, for the
+corresponding type <tt>Ti</tt> in <tt>Types</tt>,
+<tt>remove_cv&lt;remove_reference&lt;Ti&gt;::type&gt;::type</tt> equals
+<tt>reference_wrapper&lt;X&gt;</tt>, otherwise <tt>Vi</tt> is
+<tt>decay&lt;Ti&gt;::type</tt>.</del>
+<ins>Let <tt>Ui</tt> be <tt>decay&lt;Ti&gt;::type</tt> for each
+<tt>Ti</tt> in <tt>Types</tt>. Then each <tt>Vi</tt> in <tt>VTypes</tt>
+is <tt>X&amp;</tt> if <tt>Ui</tt> equals
+<tt>reference_wrapper&lt;X&gt;</tt>, otherwise <tt>Vi</tt> is
+<tt>Ui</tt>.</ins>
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="706"></a>706. <tt>make_pair()</tt> should behave as <tt>make_tuple()</tt> wrt. <tt>reference_wrapper()</tt></h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>
+ <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 2007-07-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current draft has <tt>make_pair()</tt> in 20.2.3 [pairs]/16
+and <tt>make_tuple()</tt> in 20.3.1.2 [tuple.creation].
+<tt>make_tuple()</tt> detects the presence of
+<tt>reference_wrapper&lt;X&gt;</tt> arguments and "unwraps" the reference in
+such cases. <tt>make_pair()</tt> would OTOH create a
+<tt>reference_wrapper&lt;X&gt;</tt> member. I suggest that the two
+functions are made to behave similar in this respect to minimize
+confusion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.2 [utility] change the synopsis for make_pair() to read
+</p>
+
+<blockquote><pre>template &lt;class T1, class T2&gt;
+ pair&lt;<del>typename decay&lt;T1&gt;::type</del> <ins>V1</ins>, <del>typename decay&lt;T2&gt;::type</del> <ins>V2</ins>&gt; make_pair(T1&amp;&amp;, T2&amp;&amp;);
+</pre></blockquote>
+
+<p>
+In 20.2.3 [pairs]/16 change the declaration to match the above synopsis.
+Then change the 20.2.3 [pairs]/17 to:
+</p>
+
+<blockquote>
+<p>
+<i>Returns:</i> <tt>pair&lt;<del>typename decay&lt;T1&gt;::type</del> <ins>V1</ins>,<del>typename decay&lt;T2&gt;::type</del> <ins>V2</ins>&gt;(forward&lt;T1&gt;(x),forward&lt;T2&gt;(y))</tt> <ins>where <tt>V1</tt> and
+<tt>V2</tt> are determined as follows: Let <tt>Ui</tt> be
+<tt>decay&lt;Ti&gt;::type</tt> for each <tt>Ti</tt>. Then each
+<tt>Vi</tt> is <tt>X&amp;</tt> if <tt>Ui</tt> equals
+<tt>reference_wrapper&lt;X&gt;</tt>, otherwise <tt>Vi</tt> is
+<tt>Ui</tt>.</ins>
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="707"></a>707. null pointer constant for <tt>exception_ptr</tt></h3>
+<p><b>Section:</b> 18.7.1 [exception] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Jens Maurer <b>Date:</b> 2007-07-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+From the Toronto Core wiki:
+</p>
+
+<p>
+What do you mean by "null pointer constant"? How do you guarantee that
+<tt>exception_ptr() == 1</tt> doesn't work? &nbsp;Do you even want to prevent that?
+What's the semantics? &nbsp;What about <tt>void *p = 0; exception_ptr() == p</tt>?
+Maybe disallow those in the interface, but how do you do that with
+portable C++? Could specify just "make it work".
+</p>
+
+<p>
+Peter's response:
+</p>
+
+<p>
+null pointer constant as defined in 4.10 [conv.ptr]. Intent is "just make it
+work", can be implemented as assignment operator taking a unique pointer
+to member, as in the unspecified bool type idiom.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="708"></a>708. Locales need to be per thread and updated for POSIX changes</h3>
+<p><b>Section:</b> 22 [localization] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-07-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#localization">issues</a> in [localization].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The POSIX "Extended API Set Part 4,"
+</p>
+<blockquote><p>
+<a href="http://www.opengroup.org/sib/details.tpl?id=C065">http://www.opengroup.org/sib/details.tpl?id=C065</a>
+</p></blockquote>
+<p>
+introduces extensions to the C locale mechanism that
+allow multiple concurrent locales to be used in the same application
+by introducing a type <tt>locale_t</tt> that is very similar to
+<tt>std::locale</tt>, and a number of <tt>_l</tt> functions that make use of it.
+</p>
+<p>
+The global locale (set by setlocale) is now specified to be per-
+process. If a thread does not call <tt>uselocale</tt>, the global locale is
+in effect for that thread. It can install a per-thread locale by
+using <tt>uselocale</tt>.
+</p>
+<p>
+There is also a nice <tt>querylocale</tt> mechanism by which one can obtain
+the name (such as "de_DE") for a specific <tt>facet</tt>, even for combined
+locales, with no <tt>std::locale</tt> equivalent.
+</p>
+<p>
+<tt>std::locale</tt> should be harmonized with the new POSIX <tt>locale_t</tt>
+mechanism and provide equivalents for <tt>uselocale</tt> and <tt>querylocale</tt>.
+</p>
+
+<p><i>[
+Kona (2007): Bill and Nick to provide wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="709"></a>709. <tt>char_traits::not_eof</tt> has wrong signature</h3>
+<p><b>Section:</b> 21.1.3 [char.traits.specializations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-08-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The changes made for <tt>constexpr</tt> in 21.1.3 [char.traits.specializations] have
+not only changed the <tt>not_eof</tt> function from pass by const reference to
+pass by value, it has also changed the parameter type from <tt>int_type</tt> to
+<tt>char_type</tt>.
+</p>
+<p>
+This doesn't work for type <tt>char</tt>, and is inconsistent with the
+requirements in Table 56, Traits requirements, 21.1.1 [char.traits.require].
+</p>
+
+<p>
+Pete adds:
+</p>
+
+<blockquote><p>
+For what it's worth, that may not have been an intentional change.
+N2349, which detailed the changes for adding constant expressions to
+the library, has strikeout bars through the <tt>const</tt> and the <tt>&amp;</tt> that
+surround the <tt>char_type</tt> argument, but none through <tt>char_type</tt> itself.
+So the intention may have been just to change to pass by value, with
+text incorrectly copied from the standard.
+</p></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the signature in 21.1.3.1 [char.traits.specializations.char],
+21.1.3.2 [char.traits.specializations.char16_t], 21.1.3.3 [char.traits.specializations.char32_t],
+and 21.1.3.4 [char.traits.specializations.wchar.t] to
+</p>
+
+<blockquote><pre>static constexpr int_type not_eof(<del>char_type</del> <ins>int_type</ins> c);
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="710"></a>710. Missing postconditions</h3>
+<p><b>Section:</b> 20.6.6.2 [util.smartptr.shared] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-08-24</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#util.smartptr.shared">active issues</a> in [util.smartptr.shared].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared">issues</a> in [util.smartptr.shared].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A discussion on
+<a href="http://groups.google.com/group/comp.std.c++/browse_frm/thread/8e89dceb35cd7971">comp.std.c++</a>
+has identified a contradiction in the <tt>shared_ptr</tt> specification.
+The <tt>shared_ptr</tt> move constructor and the cast functions are
+missing postconditions for the <tt>get()</tt> accessor.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to 20.6.6.2.1 [util.smartptr.shared.const]:
+</p>
+
+<blockquote>
+<pre>shared_ptr(shared_ptr&amp;&amp; r);
+template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt;&amp;&amp; r);
+</pre>
+<blockquote>
+<p>
+<i>Postconditions:</i> <tt>*this</tt> shall contain the old value of <tt>r</tt>. <tt>r</tt>
+shall be empty. <ins><tt>r.get() == 0</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+Add to 20.6.6.2.10 [util.smartptr.shared.cast]:
+</p>
+
+<blockquote>
+<pre>template&lt;class T, class U&gt; shared_ptr&lt;T&gt; static_pointer_cast(shared_ptr&lt;U&gt; const&amp; r);
+</pre>
+<blockquote>
+<p>
+<ins><i>Postconditions:</i> If <tt>w</tt> is the return value,
+<tt>w.get() == static_cast&lt;T*&gt;(r.get()) &amp;&amp; w.use_count() == r.use_count()</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<blockquote>
+<pre>template&lt;class T, class U&gt; shared_ptr&lt;T&gt; dynamic_pointer_cast(shared_ptr&lt;U&gt; const&amp; r);
+</pre>
+<blockquote>
+<p>
+<ins><i>Postconditions:</i> If <tt>w</tt> is the return value, <tt>w.get() == dynamic_cast&lt;T*&gt;(r.get())</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<blockquote>
+<pre>template&lt;class T, class U&gt; shared_ptr&lt;T&gt; const_pointer_cast(shared_ptr&lt;U&gt; const&amp; r);
+</pre>
+<blockquote>
+<p>
+<ins><i>Postconditions:</i> If <tt>w</tt> is the return value,
+<tt>w.get() == const_cast&lt;T*&gt;(r.get()) &amp;&amp; w.use_count() == r.use_count()</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+Alberto Ganesh Barbati has written an
+<a href="http://barbati.net/c++/shared_ptr.pdf">alternative proposal</a>
+where he suggests (among other things) that the casts be respecified in terms of
+the aliasing constructor as follows:
+</p>
+
+<p>
+Change 20.6.6.2.10 [util.smartptr.shared.cast]:
+</p>
+
+<blockquote>
+<p>
+-2- <i>Returns:</i> <del>If <tt>r</tt> is empty, an <tt>empty
+shared_ptr&lt;T&gt;;</tt> otherwise, a <tt>shared_ptr&lt;T&gt;</tt>
+object that stores <tt>static_cast&lt;T*&gt;(r.get())</tt> and shares ownership with
+<tt>r</tt>.</del> <ins><tt>shared_ptr&lt;T&gt;(r, static_cast&lt;T*&gt;(r.get())</tt>.</ins>
+</p>
+</blockquote>
+
+<blockquote>
+<p>
+-6- <i>Returns:</i>
+</p>
+<ul>
+<li><del>When <tt>dynamic_cast&lt;T*&gt;(r.get())</tt> returns a nonzero value,
+a <tt>shared_ptr&lt;T&gt;</tt> object that stores a copy
+of it and <i>shares ownership</i> with <tt>r</tt>;</del></li>
+<li><del>Otherwise, an <i>empty</i> <tt>shared_ptr&lt;T&gt;</tt> object.</del></li>
+<li><ins>If <tt>p = dynamic_cast&lt;T*&gt;(r.get())</tt> is a non-null pointer, <tt>shared_ptr&lt;T&gt;(r, p);</tt></ins></li>
+<li><ins>Otherwise, <tt>shared_ptr&lt;T&gt;()</tt>.</ins></li>
+</ul>
+</blockquote>
+
+<blockquote>
+<p>
+-10- <i>Returns:</i> <del>If <tt>r</tt> is empty, an <tt>empty
+shared_ptr&lt;T&gt;;</tt> otherwise, a <tt>shared_ptr&lt;T&gt;</tt>
+object that stores <tt>const_cast&lt;T*&gt;(r.get())</tt> and shares ownership with
+<tt>r</tt>.</del> <ins><tt>shared_ptr&lt;T&gt;(r, const_cast&lt;T*&gt;(r.get())</tt>.</ins>
+</p>
+</blockquote>
+
+<p>
+This takes care of the missing postconditions for the casts by bringing
+in the aliasing constructor postcondition "by reference".
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="711"></a>711. Contradiction in empty <tt>shared_ptr</tt></h3>
+<p><b>Section:</b> 20.6.6.2.5 [util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-08-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared.obs">issues</a> in [util.smartptr.shared.obs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A discussion on
+<a href="http://groups.google.com/group/comp.std.c++/browse_frm/thread/8e89dceb35cd7971">comp.std.c++</a>
+has identified a contradiction in the <tt>shared_ptr</tt> specification.
+The note:
+</p>
+
+<blockquote><p>
+[ <i>Note:</i> this constructor allows creation of an empty shared_ptr instance with a non-NULL stored pointer.
+-end note ]
+</p></blockquote>
+
+<p>
+after the aliasing constructor
+</p>
+
+<blockquote><pre>template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt; const&amp; r, T *p);
+</pre></blockquote>
+
+<p>
+reflects the intent of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm">N2351</a>
+to, well, allow the creation of an empty <tt>shared_ptr</tt>
+with a non-NULL stored pointer.
+</p>
+
+<p>
+This is contradicted by the second sentence in the Returns clause of 20.6.6.2.5 [util.smartptr.shared.obs]:
+</p>
+
+<blockquote>
+<pre>T* get() const;
+</pre>
+<blockquote><p>
+<i>Returns:</i> the stored pointer. Returns a null pointer if <tt>*this</tt> is empty.
+</p></blockquote>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In keeping the N2351 spirit and obviously my preference, change 20.6.6.2.5 [util.smartptr.shared.obs]:
+</p>
+
+<blockquote>
+<pre>T* get() const;
+</pre>
+<blockquote><p>
+<i>Returns:</i> the stored pointer. <del>Returns a null pointer if <tt>*this</tt> is empty.</del>
+</p></blockquote>
+</blockquote>
+
+<p>
+Alternative proposed resolution: (I won't be happy if we do this, but it's possible):
+</p>
+
+<p>
+Change 20.6.6.2.1 [util.smartptr.shared.const]:
+</p>
+
+<blockquote>
+<pre>template&lt;class Y&gt; shared_ptr(shared_ptr&lt;Y&gt; const&amp; r, T *p);
+</pre>
+<blockquote>
+<p>
+<ins><i>Requires:</i> If <tt>r</tt> is empty, <tt>p</tt> shall be <tt>0</tt>.</ins>
+</p>
+<p>
+<del>[ <i>Note:</i> this constructor allows creation of an empty <tt>shared_ptr</tt>
+instance with a non-NULL stored pointer.
+-- <i>end note</i> ]</del>
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="713"></a>713. <tt>sort()</tt> complexity is too lax</h3>
+<p><b>Section:</b> 25.3.1.1 [sort] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2007-08-30</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The complexity of <tt>sort()</tt> is specified as "Approximately <tt>N
+log(N)</tt> (where <tt>N == last - first</tt> ) comparisons on the
+average", with no worst case complicity specified. The intention was to
+allow a median-of-three quicksort implementation, which is usually <tt>O(N
+log N)</tt> but can be quadratic for pathological inputs. However, there is
+no longer any reason to allow implementers the freedom to have a
+worst-cast-quadratic sort algorithm. Implementers who want to use
+quicksort can use a variant like David Musser's "Introsort" (Software
+Practice and Experience 27:983-993, 1997), which is guaranteed to be <tt>O(N
+log N)</tt> in the worst case without incurring additional overhead in the
+average case. Most C++ library implementers already do this, and there
+is no reason not to guarantee it in the standard.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 25.3.1.1 [sort], change the complexity to "O(N log N)", and remove footnote 266:
+</p>
+
+<blockquote>
+<p>
+<i>Complexity:</i> <del>Approximately</del> <ins>O(</ins><i>N</i> log(<i>N</i>)<ins>)</ins> <del>(where <i>N</i> == <i>last</i> - <i>first</i> )
+</del>comparisons<del> on the average</del>.<del><sup>266)</sup></del>
+</p>
+<p>
+<del><sup>266)</sup>
+If the worst case behavior is important <tt>stable_sort()</tt> (25.3.1.2) or <tt>partial_sort()</tt>
+(25.3.1.3) should be used.</del>
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="714"></a>714. <tt>search_n</tt> complexity is too lax</h3>
+<p><b>Section:</b> 25.1.9 [alg.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2007-08-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.search">issues</a> in [alg.search].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The complexity for <tt>search_n</tt> (25.1.9 [alg.search] par 7) is specified as "At most
+(last - first ) * count applications of the corresponding predicate if
+count is positive, or 0 otherwise." This is unnecessarily pessimistic.
+Regardless of the value of count, there is no reason to examine any
+element in the range more than once.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the complexity to "At most (last - first) applications of the corresponding predicate".
+</p>
+
+<blockquote>
+<pre>template&lt;class ForwardIterator, class Size, class T&gt;
+ ForwardIterator
+ search_n(ForwardIterator first , ForwardIterator last , Size count ,
+ const T&amp; value );
+
+template&lt;class ForwardIterator, class Size, class T,
+ class BinaryPredicate&gt;
+ ForwardIterator
+ search_n(ForwardIterator first , ForwardIterator last , Size count ,
+ const T&amp; value , BinaryPredicate pred );
+</pre>
+<blockquote>
+<p>
+<i>Complexity:</i> At most <tt>(last - first ) <del>* count</del></tt> applications of the corresponding predicate
+<del>if <tt>count</tt> is positive, or 0 otherwise</del>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="715"></a>715. <tt>minmax_element</tt> complexity is too lax</h3>
+<p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2007-08-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The complexity for <tt>minmax_element</tt> (25.3.7 [alg.min.max] par 16) says "At most <tt>max(2 *
+(last - first ) - 2, 0)</tt> applications of the corresponding comparisons",
+i.e. the worst case complexity is no better than calling <tt>min_element</tt> and
+<tt>max_element</tt> separately. This is gratuitously inefficient. There is a
+well known technique that does better: see section 9.1 of CLRS
+(Introduction to Algorithms, by Cormen, Leiserson, Rivest, and Stein).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 25.3.7 [alg.min.max] to:
+</p>
+
+<blockquote>
+<pre>template&lt;class ForwardIterator&gt;
+ pair&lt;ForwardIterator, ForwardIterator&gt;
+ minmax_element(ForwardIterator first , ForwardIterator last);
+template&lt;class ForwardIterator, class Compare&gt;
+ pair&lt;ForwardIterator, ForwardIterator&gt;
+ minmax_element(ForwardIterator first , ForwardIterator last , Compare comp);
+</pre>
+<blockquote>
+<p>
+<i>Returns:</i> <tt>make_pair(m, M)</tt>, where <tt>m</tt> is
+<del><tt>min_element(first, last)</tt> or <tt>min_element(first, last,
+comp)</tt></del> <ins>the first iterator <tt>i</tt> in <tt>[first,
+last)</tt> such that no other element in the range is smaller,</ins> and
+<ins>where</ins> <tt>M</tt> is <del><tt>max_element(first, last)</tt> or
+<tt>max_element(first, last, comp)</tt></del> <ins>the last iterator
+<tt>i</tt> in <tt>[first, last)</tt> such that no other element in the
+range is larger</ins>.
+</p>
+<p>
+<i>Complexity:</i> At most <del><tt>max(2 * (last - first ) - 2, 0)</tt></del>
+<ins><tt>max(&#8970;(3/2) (N-1)&#8971;, 0)</tt></ins> applications of the
+corresponding <del>comparisons</del> <ins>predicate, where <tt>N</tt> is <tt>distance(first, last)</tt></ins>.
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="716"></a>716. Production in [re.grammar] not actually modified</h3>
+<p><b>Section:</b> 28.13 [re.grammar] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan T. Lavavej <b>Date:</b> 2007-08-31</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+TR1 7.13 [tr.re.grammar]/3 and C++0x WP 28.13 [re.grammar]/3 say:
+</p>
+
+<blockquote>
+<p>
+The following productions within the ECMAScript grammar are modified as follows:
+</p>
+
+<blockquote><pre>CharacterClass ::
+[ [lookahead &#8713; {^}] ClassRanges ]
+[ ^ ClassRanges ]
+</pre></blockquote>
+
+</blockquote>
+
+<p>
+This definition for <tt>CharacterClass</tt> appears to be exactly identical to that in ECMA-262.
+</p>
+
+<p>
+Was an actual modification intended here and accidentally omitted, or was this production accidentally included?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove this mention of the CharacterClass production.
+</p>
+
+<blockquote><pre><del>CharacterClass ::
+[ [lookahead &#8713; {^}] ClassRanges ]
+[ ^ ClassRanges ]</del>
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="717"></a>717. Incomplete <tt>valarray::operator[]</tt> specification in [valarray.access]</h3>
+<p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Since the return type of <tt>valarray</tt>'s <tt>operator[] const</tt> overload has been
+changed to <tt>const T&amp;</tt> as described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> several paragraphs of
+the section 26.5.2.3 [valarray.access] are now
+incompletely
+specified, because many requirements and guarantees should now also
+apply to the const overload. Most notably, the address and reference
+guarantees should be extended to the const overload case.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.5.2.3 [valarray.access]:
+</p>
+
+<blockquote>
+<p>
+-1- <del>When applied to a constant array, the subscript operator returns a
+reference to the corresponding element of the array. When applied to a
+non-constant array, t</del><ins>T</ins>he subscript operator returns a
+reference to the corresponding element of the array.
+</p>
+
+<p>
+-3- The expression <tt>&amp;a[i+j] == &amp;a[i] + j</tt> evaluates as <tt>true</tt> for all <tt>size_t i</tt>
+and <tt>size_t j</tt> such that <tt>i+j</tt> is less
+than the length of the <del>non-constant</del> array <tt>a</tt>.
+</p>
+
+<p>
+-4- Likewise, the expression <tt>&amp;a[i] != &amp;b[j]</tt> evaluates
+as <tt>true</tt> for any two <del>non-constant</del> arrays <tt>a</tt> and
+<tt>b</tt> and for any <tt>size_t i</tt> and <tt>size_t j</tt> such that
+<tt>i</tt> is less than the length of <tt>a</tt> and <tt>j</tt> is less
+than the length of <tt>b</tt>. This property indicates an absence of
+aliasing and may be used to advantage by optimizing
+compilers.<sup>281)</sup>
+</p>
+
+<p>
+-5- The reference returned by the subscript operator for a<ins>n</ins> <del>non-constant</del> array is guaranteed to be valid until
+the member function <tt>resize(size_t, T)</tt> (26.5.2.7) is called for that array or until the lifetime
+of that array ends, whichever happens first.
+</p>
+
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="718"></a>718. <tt>basic_string</tt> is not a sequence</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-08-18</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 21.3 [basic.string]/3 states:
+</p>
+
+<blockquote>
+<p>
+The class template <tt>basic_string</tt> conforms to the requirements for a
+Sequence (23.1.1) and for a Reversible Container (23.1).
+</p>
+</blockquote>
+
+<p>
+First of all, 23.1.1 [sequence.reqmts] is no longer "Sequence" but "Sequence container".
+Secondly, after the resent changes to containers (<tt>emplace</tt>, <tt>push_back</tt>,
+<tt>const_iterator</tt> parameters to <tt>insert</tt> and <tt>erase</tt>), <tt>basic_string</tt> is not
+even close to conform to the current requirements.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove this sentence, in recognition of the fact that <tt>basic_string</tt> is
+not just a <tt>vector</tt>-light for literal types, but something quite
+different, a string abstraction in its own right.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="719"></a>719. <tt>std::is_literal</tt> type traits should be provided</h3>
+<p><b>Section:</b> 20.4 [meta] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta">issues</a> in [meta].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Since the inclusion of <tt>constexpr</tt> in the standard draft N2369 we have
+a new type category "literal", which is defined in 3.9 [basic.types]/p.11:
+</p>
+
+<blockquote>
+<p>
+-11- A type is a <i>literal</i> type if it is:
+</p>
+<ul>
+<li>a scalar type; or</li>
+<li><p>a class type (clause 9) with</p>
+<ul>
+<li>a trivial copy constructor,</li>
+<li>a trivial destructor,</li>
+<li>at least one constexpr constructor other than the copy constructor,</li>
+<li>no virtual base classes, and</li>
+<li>all non-static data members and base classes of literal types; or</li>
+</ul>
+</li>
+<li>an array of literal type.</li>
+</ul>
+</blockquote>
+
+<p>
+I strongly suggest that the standard provides a type traits for
+literal types in 20.4.4.3 [meta.unary.prop] for several reasons:
+</p>
+
+<ol type="a">
+<li>To keep the traits in sync with existing types.</li>
+<li>I see many reasons for programmers to use this trait in template
+ code to provide optimized template definitions for these types,
+ see below.</li>
+<li>A user-provided definition of this trait is practically impossible
+to write portably.</li>
+</ol>
+
+<p>
+The special problem of reason (c) is that I don't see currently a
+way to portably test the condition for literal class types:
+</p>
+
+<blockquote>
+<ul>
+<li>at least one constexpr constructor other than the copy constructor,</li>
+</ul>
+</blockquote>
+
+<p>
+Here follows a simply example to demonstrate it's usefulness:
+</p>
+
+<blockquote><pre>template &lt;typename T&gt;
+constexpr typename std::enable_if&lt;std::is_literal&lt;T&gt;::value, T&gt;::type
+abs(T x) {
+ return x &lt; T() ? -x : x;
+}
+
+template &lt;typename T&gt;
+typename std::enable_if&lt;!std::is_literal&lt;T&gt;::value, T&gt;::type
+abs(const T&amp; x) {
+ return x &lt; T() ? -x : x;
+}
+</pre></blockquote>
+
+<p>
+Here we have the possibility to provide a general <tt>abs</tt> function
+template that can be used in ICE's if it's argument is a literal
+type which's value is a constant expression, otherwise we
+have an optimized version for arguments which are expensive
+to copy and therefore need the usage of arguments of
+reference type (instead of <tt>const T&amp;</tt> we could decide to
+use <tt>T&amp;&amp;</tt>, but that is another issue).
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.4.2 [meta.type.synop] in the group "type properties",
+just below the line
+</p>
+
+<blockquote><pre>template &lt;class T&gt; struct is_pod;
+</pre></blockquote>
+
+<p>
+add a new one:
+</p>
+
+<blockquote><pre>template &lt;class T&gt; struct is_literal;
+</pre></blockquote>
+
+<p>
+In 20.4.4.3 [meta.unary.prop], table Type Property Predicates, just
+below the line for the <tt>is_pod</tt> property add a new line:
+</p>
+
+<table border="1">
+<tbody><tr>
+<th>Template</th><th>Condition</th><th>Preconditions</th>
+</tr>
+<tr>
+<td><tt>template &lt;class T&gt; struct is_literal;</tt></td>
+<td><tt>T</tt> is a literal type (3.9)</td>
+<td><tt>T</tt> shall be a complete type, an
+array of unknown bound, or
+(possibly cv-qualified) <tt>void</tt>.</td>
+</tr>
+</tbody></table>
+
+
+
+
+
+
+<hr>
+<h3><a name="720"></a>720. Omissions in constexpr usages</h3>
+<p><b>Section:</b> 23.2.1 [array], 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-25</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<ol>
+<li>
+The member function <tt>bool array&lt;T,N&gt;::empty() const</tt> should be a
+<tt>constexpr</tt> because this is easily to proof and to implement following it's operational
+semantics defined by Table 87 (Container requirements) which says: <tt>a.size() == 0</tt>.
+</li>
+<li>
+The member function <tt>bool bitset&lt;N&gt;::test() const</tt> must be a
+<tt>constexpr</tt> (otherwise it would violate the specification of <tt>constexpr
+bitset&lt;N&gt;::operator[](size_t) const</tt>, because it's return clause delegates to <tt>test()</tt>).
+</li>
+<li>
+I wonder how the constructor <tt>bitset&lt;N&gt;::bitset(unsigned long)</tt> can
+be declared as a <tt>constexpr</tt>. Current implementations usually have no such <tt>bitset</tt>
+c'tor which would fulfill the requirements of a <tt>constexpr</tt> c'tor because they have a
+non-empty c'tor body that typically contains for-loops or <tt>memcpy</tt> to compute the
+initialisation. What have I overlooked here?
+</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<ol>
+<li>
+<p>In the class template definition of 23.2.1 [array]/p. 3 change</p>
+<blockquote><pre><ins>constexpr</ins> bool empty() const;
+</pre></blockquote>
+</li>
+
+<li>
+<p>In the class template definition of 23.3.5 [template.bitset]/p. 1 change</p>
+<blockquote><pre><ins>constexpr</ins> bool test(size_t pos ) const;
+</pre></blockquote>
+
+<p>
+and in 23.3.5.2 [bitset.members] change
+</p>
+
+<blockquote><pre><ins>constexpr</ins> bool test(size_t pos ) const;
+</pre></blockquote>
+
+</li>
+</ol>
+
+
+
+
+
+<hr>
+<h3><a name="721"></a>721. <tt>wstring_convert</tt> inconsistensies</h3>
+<p><b>Section:</b> 22.1.3.2.2 [conversions.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-08-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 3 says that the <tt>Codecvt</tt> template parameter shall meet the
+requirements of <tt>std::codecvt</tt>, even though <tt>std::codecvt</tt> itself cannot
+be used (because of a protected destructor).
+</p>
+
+<p>
+How are we going to explain this code to beginning programmers?
+</p>
+
+<blockquote><pre>template&lt;class I, class E, class S&gt;
+struct codecvt : std::codecvt&lt;I, E, S&gt;
+{
+ ~codecvt()
+ { }
+};
+
+void main()
+{
+ std::wstring_convert&lt;codecvt&lt;wchar_t, char, std::mbstate_t&gt; &gt; compiles_ok;
+
+ std::wstring_convert&lt;std::codecvt&lt;wchar_t, char, std::mbstate_t&gt; &gt; not_ok;
+}
+</pre></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="722"></a>722. Missing [c.math] functions <tt>nanf</tt> and <tt>nanl</tt></h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-27</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the listing of 26.7 [c.math], table 108: Header <tt>&lt;cmath&gt;</tt> synopsis I miss
+the following C99 functions (from 7.12.11.2):
+</p>
+
+<blockquote><pre>float nanf(const char *tagp);
+long double nanl(const char *tagp);
+</pre></blockquote>
+
+<p>
+(Note: These functions cannot be overloaded and they are also not
+listed anywhere else)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 26.7 [c.math], table 108, section "Functions", add <tt>nanf</tt> and <tt>nanl</tt>
+just after the existing entry <tt>nan</tt>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="723"></a>723. <tt>basic_regex</tt> should be moveable</h3>
+<p><b>Section:</b> 28.8 [re.regex] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.regex">issues</a> in [re.regex].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to the current state of the standard draft, the class
+template <tt>basic_regex</tt>, as described in 28.8 [re.regex]/3, is
+neither <tt>MoveConstructible</tt> nor <tt>MoveAssignable</tt>.
+IMO it should be, because typical regex state machines tend
+to have a rather large data quantum and I have seen several
+use cases, where a factory function returns regex values,
+which would take advantage of moveabilities.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<ol type="a">
+<li>
+<p>
+In the header <tt>&lt;regex&gt;</tt> synopsis 28.4 [re.syn], just below the function
+template <tt>swap</tt> add two further overloads:
+</p>
+<blockquote><pre>template &lt;class charT, class traits&gt;
+ void swap(basic_regex&lt;charT, traits&gt;&amp; e1, basic_regex&lt;charT, traits&gt;&amp; e2);
+<ins>template &lt;class charT, class traits&gt;
+ void swap(basic_regex&lt;charT, traits&gt;&amp;&amp; e1, basic_regex&lt;charT, traits&gt;&amp; e2);
+template &lt;class charT, class traits&gt;
+ void swap(basic_regex&lt;charT, traits&gt;&amp; e1, basic_regex&lt;charT, traits&gt;&amp;&amp; e2);</ins>
+</pre></blockquote>
+<p>
+In the class definition of <tt>basic_regex</tt>, just below 28.8 [re.regex]/3,
+perform the following changes:
+</p>
+</li>
+
+<li>
+<p>Just after the copy c'tor:</p>
+<blockquote><pre>basic_regex(basic_regex&amp;&amp;);
+</pre></blockquote>
+</li>
+
+<li>
+<p>Just after the copy-assignment op.:</p>
+<blockquote><pre>basic_regex&amp; operator=(basic_regex&amp;&amp;);
+</pre></blockquote>
+</li>
+
+<li>
+<p>Just after the first <tt>assign</tt> overload insert:</p>
+<blockquote><pre>basic_regex&amp; assign(basic_regex&amp;&amp; that);
+</pre></blockquote>
+</li>
+
+<li>
+<p>Change the current <tt>swap</tt> function to read:</p>
+<blockquote><pre>void swap(basic_regex&amp;&amp;);
+</pre></blockquote>
+</li>
+
+<li>
+<p>In 28.8.2 [re.regex.construct], just below the copy c'tor add a
+corresponding member definition of:</p>
+<blockquote><pre>basic_regex(basic_regex&amp;&amp;);
+</pre></blockquote>
+</li>
+
+<li>
+<p>Also in 28.8.2 [re.regex.construct], just below the copy assignment
+c'tor add a corresponding member definition of:</p>
+<blockquote><pre>basic_regex&amp; operator=(basic_regex&amp;&amp;);
+</pre></blockquote>
+</li>
+
+<li>
+<p>In 28.8.3 [re.regex.assign], just below the first <tt>assign</tt> overload add
+a corresponding member definition of:</p>
+<blockquote><pre>basic_regex&amp; assign(basic_regex&amp;&amp; that);
+</pre></blockquote>
+</li>
+
+<li>
+<p>In 28.8.6 [re.regex.swap], change the signature of <tt>swap</tt> to
+say:</p>
+<blockquote><pre>void swap(basic_regex&amp;&amp; e);
+</pre></blockquote>
+</li>
+
+<li>
+<p>In 28.8.7.1 [re.regex.nmswap], just below the single binary <tt>swap</tt>
+function, add the two missing overloads:</p>
+<blockquote><pre>template &lt;class charT, class traits&gt;
+ void swap(basic_regex&lt;charT, traits&gt;&amp;&amp; e1, basic_regex&lt;charT, traits&gt;&amp; e2);
+template &lt;class charT, class traits&gt;
+ void swap(basic_regex&lt;charT, traits&gt;&amp; e1, basic_regex&lt;charT, traits&gt;&amp;&amp; e2);
+</pre></blockquote>
+</li>
+</ol>
+
+<p>
+Of course there would be need of corresponding proper standardese
+to describe these additions.
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="724"></a>724. <tt>DefaultConstructible</tt> is not defined</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2007-09-12</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The <tt>DefaultConstructible</tt> requirement is referenced in
+several places in the August 2007 working draft
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf">N2369</a>,
+but is not defined anywhere.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In section 20.1.1 [utility.arg.requirements], before table 33, add the
+following table:
+</p>
+
+<p style="text-align: center;" align="center">Table 33: <tt>DefaultConstructible</tt> requirements</p>
+
+<div align="center">
+
+<table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
+ <tbody><tr>
+ <td style="border-style: solid none double solid; border-color: navy -moz-use-text-color navy navy; border-width: 1pt medium 1.5pt 1pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114">
+ <p style="margin: 0in 0in 0.0001pt; text-align: center;" align="center">expression</p>
+ </td>
+ <td style="border-style: solid solid double none; border-color: navy navy navy -moz-use-text-color; border-width: 1pt 1pt 1.5pt medium; padding: 0in 5.4pt; width: 243pt;" valign="top" width="324">
+ <p style="margin: 0in 0in 0.0001pt; text-align: center;" align="center">post-condition</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color navy navy; border-width: medium medium 1pt 1pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114">
+ <p style="margin: 0in 0in 0.0001pt;"><tt>T
+ t;</tt><br>
+ <tt>T()</tt></p>
+ </td>
+ <td style="border-style: none solid solid none; border-color: -moz-use-text-color navy navy -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 243pt;" valign="top" width="324">
+ <p style="margin: 0in 0in 0.0001pt;"><tt>T</tt>
+ is <i>default constructed.</i></p>
+ </td>
+ </tr>
+</tbody></table>
+
+</div>
+
+
+
+
+
+
+<hr>
+<h3><a name="725"></a>725. Optional sequence container requirements column label</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> David Abrahams <b>Date:</b> 2007-09-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 90: (Optional sequence container operations) states the
+"assertion note pre/post-condition" of <tt>operator[]</tt> to be
+</p>
+
+<blockquote><pre>*(a.begin() + n)
+</pre></blockquote>
+
+<p>
+Surely that's meant to be "operational semantics?"
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<blockquote>
+<table border="1">
+<caption>Table 90: Optional sequence container operations</caption>
+<tbody><tr>
+<th>expression</th> <th>return type</th> <th><del>assertion/note<br>pre/post-condition</del><br> <ins>operational semantics</ins></th> <th>container</th>
+</tr>
+</tbody></table>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="726"></a>726. Missing <tt>regex_replace()</tt> overloads</h3>
+<p><b>Section:</b> 28.11.4 [re.alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan T. Lavavej <b>Date:</b> 2007-09-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.alg.replace">active issues</a> in [re.alg.replace].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.alg.replace">issues</a> in [re.alg.replace].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Two overloads of <tt>regex_replace()</tt> are currently provided:
+</p>
+
+<blockquote><pre>template &lt;class OutputIterator, class BidirectionalIterator,
+ class traits, class charT&gt;
+ OutputIterator
+ regex_replace(OutputIterator out,
+ BidirectionalIterator first, BidirectionalIterator last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const basic_string&lt;charT&gt;&amp; fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+&nbsp;
+template &lt;class traits, class charT&gt;
+ basic_string&lt;charT&gt;
+ regex_replace(const basic_string&lt;charT&gt;&amp; s,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const basic_string&lt;charT&gt;&amp; fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+</pre></blockquote>
+
+<ol>
+<li>Overloads taking <tt>const charT *</tt> are provided for <tt>regex_match()</tt> and
+<tt>regex_search()</tt>, but not <tt>regex_replace()</tt>.&nbsp; This is inconsistent.</li>
+<li>
+<p>The absence of <tt>const charT *</tt> overloads prevents ordinary-looking code from compiling, such as:</p>
+
+<blockquote><pre>const string s("kitten");
+const regex r("en");
+cout &lt;&lt; regex_replace(s, r, "y") &lt;&lt; endl;
+</pre></blockquote>
+
+<p>
+The compiler error message will be something like "could not deduce
+template argument for 'const std::basic_string&lt;_Elem&gt; &amp;' from 'const
+char[1]'".
+</p>
+
+<p>
+Users expect that anything taking a <tt>basic_string&lt;charT&gt;</tt> can also take a
+<tt>const charT *</tt>.&nbsp; In their own code, when they write a function taking
+<tt>std::string</tt> (or <tt>std::wstring</tt>), they can pass a <tt>const char *</tt> (or <tt>const
+wchar_t *</tt>), thanks to <tt>basic_string</tt>'s implicit constructor.&nbsp; Because the
+regex algorithms are templated on <tt>charT</tt>, they can't rely on
+<tt>basic_string</tt>'s implicit constructor (as the compiler error message
+indicates, template argument deduction fails first).
+</p>
+
+<p>
+If a user figures out what the compiler error message means, workarounds
+are available - but they are all verbose.&nbsp; Explicit template arguments
+could be given to <tt>regex_replace()</tt>, allowing <tt>basic_string</tt>'s implicit
+constructor to be invoked - but <tt>charT</tt> is the last template argument, not
+the first, so this would be extremely verbose.&nbsp; Therefore, constructing
+a <tt>basic_string</tt> from each C string is the simplest workaround.
+</p>
+</li>
+
+<li>
+There is an efficiency consideration: constructing <tt>basic_string</tt>s can
+impose performance costs that could be avoided by a library
+implementation taking C strings and dealing with them directly.&nbsp;
+(Currently, for replacement sources, C strings can be converted into
+iterator pairs at the cost of verbosity, but for format strings, there
+is no way to avoid constructing a <tt>basic_string</tt>.)
+</li>
+</ol>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Provide additional overloads for <tt>regex_replace()</tt>: one additional
+overload of the iterator-based form (taking <tt>const charT* fmt</tt>), and three
+additional overloads of the convenience form (one taking <tt>const charT*
+str</tt>, another taking <tt>const charT* fmt</tt>, and the third taking both <tt>const
+charT* str</tt> and <tt>const charT* fmt</tt>). 28.11.4 [re.alg.replace]:
+</p>
+
+<blockquote>
+<pre>template &lt;class OutputIterator, class BidirectionalIterator,
+ class traits, class charT&gt;
+ OutputIterator
+ regex_replace(OutputIterator out,
+ BidirectionalIterator first, BidirectionalIterator last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const basic_string&lt;charT&gt;&amp; fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+
+<ins>template &lt;class OutputIterator, class BidirectionalIterator,
+ class traits, class charT&gt;
+ OutputIterator
+ regex_replace(OutputIterator out,
+ BidirectionalIterator first, BidirectionalIterator last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const charT* fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);</ins>
+</pre>
+<p>...</p>
+<pre>template &lt;class traits, class charT&gt;
+ basic_string&lt;charT&gt;
+ regex_replace(const basic_string&lt;charT&gt;&amp; s,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const basic_string&lt;charT&gt;&amp; fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+
+<ins>template &lt;class traits, class charT&gt;
+ basic_string&lt;charT&gt;
+ regex_replace(const basic_string&lt;charT&gt;&amp; s,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const charT* fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);</ins>
+
+<ins>template &lt;class traits, class charT&gt;
+ basic_string&lt;charT&gt;
+ regex_replace(const charT* s,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const basic_string&lt;charT&gt;&amp; fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);</ins>
+
+<ins>template &lt;class traits, class charT&gt;
+ basic_string&lt;charT&gt;
+ regex_replace(const charT* s,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ const charT* fmt,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);</ins>
+</pre>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="727"></a>727. <tt>regex_replace()</tt> doesn't accept <tt>basic_string</tt>s with custom traits and allocators</h3>
+<p><b>Section:</b> 28.11.4 [re.alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan T. Lavavej <b>Date:</b> 2007-09-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.alg.replace">active issues</a> in [re.alg.replace].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.alg.replace">issues</a> in [re.alg.replace].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>regex_match()</tt> and <tt>regex_search()</tt> take <tt>const basic_string&lt;charT, ST,
+SA&gt;&amp;</tt>.&nbsp; <tt>regex_replace()</tt> takes <tt>const basic_string&lt;charT&gt;&amp;</tt>.&nbsp; This prevents
+<tt>regex_replace()</tt> from accepting <tt>basic_string</tt>s with custom traits and
+allocators.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Overloads of <tt>regex_replace()</tt> taking <tt>basic_string</tt> should be additionally
+templated on <tt>class ST, class SA</tt> and take <tt>const basic_string&lt;charT, ST,
+SA&gt;&amp;</tt>.&nbsp; Consistency with <tt>regex_match()</tt> and <tt>regex_search()</tt> would place
+<tt>class ST, class SA</tt> as the first template arguments; compatibility with
+existing code using TR1 and giving explicit template arguments to
+<tt>regex_replace()</tt> would place <tt>class ST, class SA</tt> as the last template
+arguments.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="728"></a>728. Problem in [rand.eng.mers]/6</h3>
+<p><b>Section:</b> 26.4.3.2 [rand.eng.mers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The <tt>mersenne_twister_engine</tt> is required to use a seeding method that is given
+as an algorithm parameterized over the number of bits <tt>W</tt>. I doubt whether the given generalization
+of an algorithm that was originally developed only for unsigned 32-bit integers is appropriate
+for other bit widths. For instance, <tt>W</tt> could be theoretically 16 and <tt>UIntType</tt> a 16-bit integer, in
+which case the given multiplier would not fit into the <tt>UIntType</tt>. Moreover, T. Nishimura and M.
+Matsumoto have chosen a dif ferent multiplier for their 64 bit Mersenne Twister
+[<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/VERSIONS/C-LANG/mt19937-64.c">reference</a>].
+</p>
+
+<p>
+I see two possible resolutions:
+</p>
+
+<ol type="a">
+<li>Restrict the parameter <tt>W</tt> of the <tt>mersenne_twister_template</tt> to values of 32 or 64 and use the
+multiplier from [the above reference] for the 64-bit case (my preference)</li>
+<li>Interpret the state array for any <tt>W</tt> as a 32-bit array of appropriate length (and a specified byte
+order) and always employ the 32-bit algorithm for seeding
+</li>
+</ol>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for further discussion.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="729"></a>729. Problem in [rand.req.eng]/3</h3>
+<p><b>Section:</b> 26.4.1.3 [rand.req.eng] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req.eng">issues</a> in [rand.req.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The 3rd table row in 26.4.1.3 [rand.req.eng]/3 requires random number engines to accept any
+arithmetic type as a seed, which is then casted to the engine's <tt>result_type</tt> and subsequently
+used for seeding the state of the engine. The requirement stated as "Creates an engine with
+initial state determined by <tt>static_cast&lt;X::result_type&gt;(s)</tt>" forces random number engines
+to either use a seeding method that completely depends on the <tt>result_type</tt> (see the discussion
+of seeding for the <tt>mersenne_twister_engine</tt> in point T2 above) or at least to throw away "bits
+of randomness" in the seed value if the <tt>result_type</tt> is smaller than the seed type. This seems
+to be inappropriate for many modern random number generators, in particular F2-linear or
+cryptographic ones, which operate on an internal bit array that in principle is independent of the
+type of numbers returned.
+</p>
+
+<p>
+<b>Posible resolution:</b> I propose to change the wording to a version similar to "Creates an
+engine with initial state determined by <tt>static_cast&lt;UintType&gt;(s)</tt>, where <tt>UintType</tt> is an
+implementation specific unsigned integer type."
+</p>
+
+<p>
+Additionally, the definition of s in 26.4.1.3 [rand.req.eng]/1 c) could be restricted to unsigned integer types.
+</p>
+
+<p>
+Similarly, the type of the seed in 26.4.1.4 [rand.req.adapt]/3 e) could be left unspecified.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for further discussion.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for further discussion.
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="730"></a>730. Comment on [rand.req.adapt]/3 e)</h3>
+<p><b>Section:</b> 26.4.1.4 [rand.req.adapt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+If an engine adaptor is invoked with an argument of type <tt>seed_seq</tt>, then all base
+engines are specified to be seeded with this <tt>seed_seq</tt>. As <tt>seed_seq</tt>'s randomization method is
+qualified as constant, this procedure will ef fectively initialize all base engines with the same seed
+(though the resulting state might still dif fer to a certain degree if the engines are of different types).
+It is not clear whether this mode of operation is in general appropriate, hence -- as far as the
+stated requirements are of general nature and not just specific to the engine adaptors provided by
+the library -- it might be better to leave the behaviour unspecified, since the current definition of
+<tt>seed_seq</tt> does not allow for a generally satisfying specification.
+</p>
+
+<p>
+<b>Posssible resolution:</b> [As above]
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for further discussion.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="731"></a>731. proposal for a customizable <tt>seed_seq</tt></h3>
+<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The proper way to seed random number engines seems to be the most frequently
+discussed issue of the 26.4 [rand] proposal. While the new <tt>seed_seq</tt> approach is already rather
+general and probably sufficient for most situations, it is unlikely to be optimal in every case (one
+problem was pointed out in point T5 above). In some situations it might, for instance, be better to
+seed the state with a cryptographic generator.
+</p>
+<p>
+In my opinion this is a pretty strong argument for extending the standard with a simple facility to
+customize the seeding procedure. This could, for example, be done with the following minimal
+changes:
+</p>
+
+<p>
+<b>Possible resolution:</b>
+</p>
+
+<ol type="a">
+<li>
+Turn the interface specification of 26.4.7.1 [rand.util.seedseq]/2 into a "SeedSeq" requirement, where the
+exact behaviour of the constructors and the randomize method are left unspecified and where the
+const qualification for randomize is removed. Classes implementing this interface are additionally
+required to specialize the traits class in c).
+</li>
+<li>
+Provide the class <tt>seed_seq</tt> as a default implementation of the SeedSeq interface.
+</li>
+<li>
+<p>
+Supplement the <tt>seed_seq</tt> with a traits class
+</p>
+<blockquote><pre>template &lt;typename T&gt;
+struct is_seed_seq { static const bool value = false; }
+</pre></blockquote>
+<p>and the specialization</p>
+<blockquote><pre>template &lt;&gt;
+struct is_seed_seq&lt;seed_seq&gt; { static const bool value = true; }
+</pre></blockquote>
+<p>which users can supplement with further specializations.</p>
+</li>
+<li>
+Change 26.4.1.3 [rand.req.eng]/1 d) to "q is an lvalue of a type that fulfils the SeedSeq requirements", and
+modify the constructors and seed methods in 26.4.3 [rand.eng] appropriately (the actual implementation
+could be done using the SFINAE technique).
+</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="732"></a>732. Defect in [rand.dist.samp.genpdf]</h3>
+<p><b>Section:</b> 26.4.8.5.3 [rand.dist.samp.genpdf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+26.4.8.5.3 [rand.dist.samp.genpdf] describes the interface for a distribution template that is
+meant to simulate random numbers from any general distribution given only the density and the
+support of the distribution. I'm not aware of any general purpose algorithm that would be capable
+of correctly and efficiently implementing the described functionality. From what I know, this is
+essentially an unsolved research problem. Existing algorithms either require more knowledge
+about the distribution and the problem domain or work only under very limited circumstances.
+Even the state of the art special purpose library UNU.RAN does not solve the problem in full
+generality, and in any case, testing and customer support for such a library feature would be a
+nightmare.
+</p>
+
+<p>
+<b>Possible resolution:</b> For these reasons, I propose to delete section 26.4.8.5.3 [rand.dist.samp.genpdf].
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="733"></a>733. Comment on [rand.req.dist]/9</h3>
+<p><b>Section:</b> 26.4.1.5 [rand.req.dist] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The requirement "P shall have a declaration of the form <tt>typedef X distribution_-
+type</tt>" effectively makes the use of inheritance for implementing distributions very inconvenient,
+because the child of a distribution class in general will not satisfy this requirement. In my opinion
+the benefits of having a typedef in the parameter class pointing back to the distribution class are
+not worth the hassle this requirement causes. [In my code base I never made use of the nested
+typedef but on several occasions could have profited from being able to use simple inheritance for
+the implementation of a distribution class.]
+</p>
+
+<p>
+<b>Proposed resolution:</b> I propose to drop this requirement.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="734"></a>734. Unnecessary restriction in [rand.dist.norm.chisq]</h3>
+<p><b>Section:</b> 26.4.8.4.3 [rand.dist.norm.chisq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>chi_squared_distribution</tt>, <tt>fisher_f_distribution</tt> and <tt>student_t_distribution</tt>
+have parameters for the "degrees of freedom" <tt>n</tt> and <tt>m</tt> that are specified as integers. For the
+following two reasons this is an unnecessary restriction: First, in many applications such as
+Bayesian inference or Monte Carlo simulations it is more convenient to treat the respective param-
+eters as continuous variables. Second, the standard non-naive algorithms (i.e.
+O(1) algorithms)
+for simulating from these distributions work with floating-point parameters anyway (all three
+distributions could be easily implemented using the Gamma distribution, for instance).
+</p>
+
+<p>
+Similar arguments could in principle be made for the parameters <tt>t</tt> and <tt>k</tt> of the discrete
+<tt>binomial_distribution</tt> and <tt>negative_binomial_distribution</tt>, though in both cases continuous
+parameters are less frequently used in practice and in case of the <tt>binomial_distribution</tt>
+the implementation would be significantly complicated by a non-discrete parameter (in most
+implementations one would need an approximation of the log-gamma function instead of just the
+log-factorial function).
+</p>
+
+<p>
+<b>Possible resolution:</b> For these reasons, I propose to change the type of the respective parameters
+to double.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="735"></a>735. Unfortunate naming</h3>
+<p><b>Section:</b> 26.4.8.2.2 [rand.dist.bern.bin], 26.4.8.2.4 [rand.dist.bern.negbin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In my opinion the choice of name for the <tt>t</tt> parameter of the <tt>binomial_distribution</tt>
+is very unfortunate. In virtually every internet reference, book and software implementation
+this parameter is called <tt>n</tt> instead, see for example Wikipedia, Mathworld, Evans et al. (1993)
+Statistical Distributions, 2nd E., Wiley, p. 38, the R statistical computing language, p. 926,
+Mathematica and Matlab.
+</p>
+
+<p>
+Similarly, the choice of <tt>k</tt> for the parameter of the negative binomial distributions is rather unusual.
+The most common choice for the negative binomial distribution seems to be <tt>r</tt> instead.
+</p>
+
+<p>
+Choosing unusual names for the parameters causes confusion among users and makes the
+interface unnecessarily inconvenient to use.
+</p>
+
+<p>
+<b>Possible resolution:</b> For these reasons, I propose to change the name of the respective parameters
+to <tt>n</tt> and <tt>r</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="736"></a>736. Comment on [rand.dist.samp.discrete]</h3>
+<p><b>Section:</b> 26.4.8.5.1 [rand.dist.samp.discrete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<ol type="a">
+<li>
+The specification for <tt>discrete_distribution</tt> requires the member <tt>probabilities()</tt>
+to return a vector of <i>standardized</i> probabilities, which forces the implementation every time to
+divide each probability by the sum of all probabilities, as the sum will in practice almost never be
+exactly 1.0. This is unnecessarily inef ficient as the implementation would otherwise not need to
+compute the standardized probabilities at all and could instead work with the non-standardized
+probabilities and the sum. If there was no standardization the user would just get back the
+probabilities that were previously supplied to the distribution object, which to me seems to be the
+more obvious solution.
+</li>
+<li>
+The behaviour of <tt>discrete_distribution</tt> is not specified in case the number of given
+probabilities is larger than the maximum number representable by the IntType.
+</li>
+</ol>
+
+<p>
+<b>Possible resolution:</b> I propose to change the specification such that the non-standardized
+probabilities need to be returned and that an additional requirement is included for the number
+of probabilities to be smaller than the maximum of IntType.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="737"></a>737. Comment on [rand.dist.samp.pconst]</h3>
+<p><b>Section:</b> 26.4.8.5.2 [rand.dist.samp.pconst] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<ol type="a">
+<li>
+The discussion in point T11 above regarding <tt>probabilities()</tt> similarly applies
+to the method <tt>densities()</tt> of <tt>piecewise_constant_distribution</tt>.
+</li>
+<li>
+<p>
+The design of the constructor
+</p>
+<blockquote><pre>template &lt;class InputIteratorB, class InputIteratorW&gt;
+piecewise_constant_distribution( InputIteratorB firstB, InputIteratorB lastB,
+ InputIteratorW firstW);
+</pre></blockquote>
+<p>
+is unnecessarily unsafe, as there is no separate end-iterator given for the weights. I can't see
+any performance or convenience reasons that would justify the risks inherent in such a function
+interface, in particular the risk that input error might go unnoticed.
+</p>
+</li>
+</ol>
+
+<p>
+<b>Possible resolution:</b> I propose to add an <tt>InputIteratorW lastW</tt> argument to the interface.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="738"></a>738. Editorial issue in [rand.adapt.disc]/3</h3>
+<p><b>Section:</b> 26.4.4.1 [rand.adapt.disc] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Since the template parameter <tt>p</tt> and <tt>r</tt> are of type <tt>size_t</tt>, the member <tt>n</tt> in the class
+exposition should have type <tt>size_t</tt>, too.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="739"></a>739. Defect in [rand.util.canonical]/3</h3>
+<p><b>Section:</b> 26.4.7.2 [rand.util.canonical] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.canonical">issues</a> in [rand.util.canonical].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The complexity of <tt>generate_canonical</tt> is specified to be "exactly k=max(1, ceil(b/log2
+R)) invocations of g". This terms involves a logarithm that is not rounded and hence can not (in
+general) be computed at compile time. As this function template is performance critical, I propose
+to replace ceil(b/log2 R) with ceil(b/floor(log2 R)).
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for further discussion.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for the proposed resolution.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="740"></a>740. Please remove <tt>*_ptr&lt;T[N]&gt;</tt></h3>
+<p><b>Section:</b> 20.6.5.4 [unique.ptr.compiletime] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Herb Sutter <b>Date:</b> 2007-10-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Please don't provide <tt>*_ptr&lt;T[N]&gt;</tt>. It doesn't enable any useful
+bounds-checking (e.g., you could imagine that doing <tt>op++</tt> on a
+<tt>shared_ptr&lt;T[N]&gt;</tt> yields a <tt>shared_ptr&lt;T[N-1]&gt;</tt>, but that promising path
+immediately falters on <tt>op--</tt> which can't reliably dereference because we
+don't know the lower bound). Also, most buffers you'd want to point to
+don't have a compile-time known size.
+</p>
+
+<p>
+To enable any bounds-checking would require run-time information, with
+the usual triplet: base (lower bound), current offset, and max offset
+(upper bound). And I can sympathize with the point of view that you
+wouldn't want to require this on <tt>*_ptr</tt> itself. But please let's not
+follow the <tt>&lt;T[N]&gt;</tt> path, especially not with additional functions to
+query the bounds etc., because this sets wrong user expectations by
+embarking on a path that doesn't go all the way to bounds checking as it
+seems to imply.
+</p>
+
+<p>
+If bounds checking is desired, consider a <tt>checked_*_ptr</tt> instead (e.g.,
+<tt>checked_shared_ptr</tt>). And make the interfaces otherwise identical so that
+user code could easily <tt>#define/typedef</tt> between prepending <tt>checked_</tt> on
+debug builds and not doing so on release builds (for example).
+</p>
+
+<p>
+Note that some may object that <tt>checked_*_ptr</tt> may seem to make the smart
+pointer more like <tt>vector</tt>, and we don't want two ways to spell <tt>vector</tt>. I
+don't agree, but if that were true that would be another reason to
+remove <tt>*_ptr&lt;T[N]&gt;</tt> which equally makes the smart pointer more like
+<tt>std::array.</tt> :-)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the synopsis under 20.6.5 [unique.ptr] p2:
+</p>
+
+<blockquote><pre>...
+template&lt;class T&gt; struct default_delete;
+template&lt;class T&gt; struct default_delete&lt;T[]&gt;;
+<del>template&lt;class T, size_t N&gt; struct default_delete&lt;T[N]&gt;;</del>
+
+template&lt;class T, class D = default_delete&lt;T&gt;&gt; class unique_ptr;
+template&lt;class T, class D&gt; class unique_ptr&lt;T[], D&gt;;
+<del>template&lt;class T, class D, size_t N&gt; class unique_ptr&lt;T[N], D&gt;;</del>
+...
+</pre></blockquote>
+
+<p>
+Remove the entire section 20.6.5.1.3 [unique.ptr.dltr.dflt2] <b><tt>default_delete&lt;T[N]&gt;</tt></b>.
+</p>
+
+<p>
+Remove the entire section 20.6.5.4 [unique.ptr.compiletime] <b><tt>unique_ptr</tt> for array objects with a compile time length</b>
+and its subsections: 20.6.5.4.1 [unique.ptr.compiletime.dtor], 20.6.5.4.2 [unique.ptr.compiletime.observers],
+20.6.5.4.3 [unique.ptr.compiletime.modifiers].
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="741"></a>741. Const-incorrect <tt>get_deleter</tt> function for <tt>shared_ptr</tt></h3>
+<p><b>Section:</b> 20.6.6.2.11 [util.smartptr.getdeleter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-09-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.getdeleter">issues</a> in [util.smartptr.getdeleter].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The following issue was raised by Alf P. Steinbach in c.l.c++.mod:
+</p>
+
+<p>
+According to the recent draft N2369, both the header memory synopsis
+of 20.6 [memory] and 20.6.6.2.11 [util.smartptr.getdeleter] declare:
+</p>
+
+<blockquote><pre>template&lt;class D, class T&gt; D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
+</pre></blockquote>
+
+<p>
+This allows to retrieve the pointer to a mutable deleter of a <tt>const
+shared_ptr</tt> (if that owns one) and therefore contradicts the usual
+philosophy that associated functors are either read-only (e.g.
+<tt>key_comp</tt> or <tt>value_comp</tt> of <tt>std::map</tt>) or do at least reflect
+the mutability of the owner (as seen for the both overloads of
+<tt>unique_ptr::get_deleter</tt>).
+Even the next similar counter-part of <tt>get_deleter</tt> - the two
+overloads of <tt>function::target</tt> in the class template function
+synopsis 20.5.15.2 [func.wrap.func] or in 20.5.15.2.5 [func.wrap.func.targ] - do
+properly mirror the const-state of the owner.
+</p>
+
+<b>Possible proposed resolutions:</b>
+
+<p>
+Replace the declarations of <tt>get_deleter</tt> in the header <tt>&lt;memory&gt;</tt>
+synopsis of 20.6 [memory] and in 20.6.6.2.11 [util.smartptr.getdeleter] by one of the
+following alternatives (A) or (B):
+</p>
+
+<ol type="A">
+<li>
+Provide <b>only</b> the immutable variant. This would reflect the
+current praxis of <tt>container::get_allocator()</tt>, <tt>map::key_comp()</tt>, or
+<tt>map::value_comp</tt>.
+
+<blockquote><pre>template&lt;class D, class T&gt; const D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
+</pre></blockquote>
+</li>
+<li>
+Just remove the function.
+</li>
+</ol>
+
+<p>
+Alberto Ganesh Barbati adds:
+</p>
+
+<ol start="3" type="A">
+<li>
+<p>
+Replace it with two functions:
+</p>
+<blockquote><pre>template &lt;class D, class T&gt; D get_deleter(shared_ptr&lt;T&gt; const&amp;);
+template &lt;class D, class T&gt; bool has_deleter(shared_ptr&lt;T&gt; const&amp;);
+</pre></blockquote>
+
+<p>
+The first one would throw if <tt>D</tt> is the wrong type, while the latter would
+never throw. This approach would reflect the current praxis of
+<tt>use_facet/has_facet</tt>, with the twist of returning the deleter by value as
+<tt>container::get_allocator()</tt> do.
+</p>
+</li>
+</ol>
+
+<p>
+Peter Dimov adds:
+</p>
+
+<blockquote>
+<p>
+My favorite option is "not a defect". A, B and C break useful code.
+</p>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="742"></a>742. Enabling <tt>swap</tt> for proxy iterators</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This issue was split from <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>. <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a> now just
+deals with changing the requirements of <tt>T</tt> in the <tt>Swappable</tt>
+requirement from <tt>CopyConstructible</tt> and <tt>CopyAssignable</tt> to
+<tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>.
+</p>
+
+<p>
+This issue seeks to widen the <tt>Swappable</tt> requirement to support proxy iterators. Here
+is example code:
+</p>
+
+<blockquote><pre>namespace Mine {
+
+template &lt;class T&gt;
+struct proxy {...};
+
+template &lt;class T&gt;
+struct proxied_iterator
+{
+ typedef T value_type;
+ typedef proxy&lt;T&gt; reference;
+ reference operator*() const;
+ ...
+};
+
+struct A
+{
+ // heavy type, has an optimized swap, maybe isn't even copyable or movable, just swappable
+ void swap(A&amp;);
+ ...
+};
+
+void swap(A&amp;, A&amp;);
+void swap(proxy&lt;A&gt;, A&amp;);
+void swap(A&amp;, proxy&lt;A&gt;);
+void swap(proxy&lt;A&gt;, proxy&lt;A&gt;);
+
+} // Mine
+
+...
+
+Mine::proxied_iterator&lt;Mine::A&gt; i(...)
+Mine::A a;
+<b>swap(*i1, a);</b>
+</pre></blockquote>
+
+<p>
+The key point to note in the above code is that in the call to <tt>swap</tt>, <tt>*i1</tt>
+and <tt>a</tt> are different types (currently types can only be <tt>Swappable</tt> with the
+same type). A secondary point is that to support proxies, one must be able to pass rvalues
+to <tt>swap</tt>. But note that I am not stating that the general purpose <tt>std::swap</tt>
+should accept rvalues! Only that overloaded <tt>swap</tt>s, as in the example above, be allowed
+to take rvalues.
+</p>
+
+<p>
+That is, no standard library code needs to change. We simply need to have a more flexible
+definition of <tt>Swappable</tt>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.1.1 [utility.arg.requirements]:
+</p>
+
+<blockquote>
+
+<p>
+-1- The template definitions in the C++ Standard Library refer to various
+named requirements whose details are set out in tables 31-38. In these
+tables, <tt>T</tt> <ins>and <tt>V</tt> are</ins> <del>is a</del> type<ins>s</ins> to be supplied by a C++ program
+instantiating a template; <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
+values of type <tt>const T</tt>; <tt>s</tt> and <tt>t</tt> are modifiable
+lvalues of type <tt>T</tt>; <tt>u</tt> is a value of type (possibly
+<tt>const</tt>) <tt>T</tt>; <del>and</del> <tt>rv</tt> is a non-<tt>const</tt>
+rvalue of type <tt>T</tt><ins>; <tt>w</tt> is a value of type <tt>T</tt>; and <tt>v</tt> is a value of type <tt>V</tt></ins>.
+</p>
+
+<table border="1">
+<caption>Table 37: <tt>Swappable</tt> requirements <b>[swappable]</b></caption>
+<tbody><tr><th>expression</th><th>return type</th><th>post-condition</th></tr>
+<tr><td><tt>swap(<del>s</del><ins>w</ins>,<del>t</del><ins>v</ins>)</tt></td><td><tt>void</tt></td>
+<td><del><tt>t</tt></del><ins><tt>w</tt></ins> has the value originally
+held by <del><tt>u</tt></del><ins><tt>v</tt></ins>, and
+<del><tt>u</tt></del><ins><tt>v</tt></ins> has the value originally held
+by <del><tt>t</tt></del><ins><tt>w</tt></ins></td></tr>
+<tr><td colspan="3">
+<p>
+The <tt>Swappable</tt> requirement is met by satisfying one or more of the following conditions:
+</p>
+<ul>
+<li>
+<tt>T</tt> is <tt>Swappable</tt> if <ins><tt>T</tt> and <tt>V</tt> are
+the same type and </ins> <tt>T</tt> satisfies the
+<del><tt>CopyConstructible</tt></del>
+<ins><tt>MoveConstructible</tt></ins> requirements (Table <del>34</del>
+<ins>33</ins>) and the <del><tt>CopyAssignable</tt></del>
+<ins><tt>MoveAssignable</tt></ins> requirements (Table <del>36</del>
+<ins>35</ins>);
+</li>
+<li>
+<tt>T</tt> is <tt>Swappable</tt> <ins>with <tt>V</tt></ins> if a namespace scope function named
+<tt>swap</tt> exists in the same namespace as the definition of
+<tt>T</tt> <ins>or <tt>V</tt></ins>, such that the expression
+<tt>swap(<del>t</del><ins>w</ins>,<del>u</del> <ins>v</ins>)</tt> is valid and has the
+semantics described in this table.
+</li>
+</ul>
+</td></tr>
+</tbody></table>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="743"></a>743. rvalue <tt>swap</tt> for <tt>shared_ptr</tt></h3>
+<p><b>Section:</b> 20.6.6.2.9 [util.smartptr.shared.spec] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-10-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+When the LWG looked at <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a> in Kona the following note was made:
+</p>
+
+<blockquote><p>
+We may need to open an issue to deal with the question of
+whether <tt>shared_ptr</tt> needs an rvalue <tt>swap</tt>.
+</p></blockquote>
+
+<p>
+This issue was opened in response to that note.
+</p>
+
+<p>
+I believe allowing rvalue <tt>shared_ptr</tt>s to <tt>swap</tt> is both
+appropriate, and consistent with how other library components are currently specified.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the synopsis in 20.6.6.2 [util.smartptr.shared]:
+</p>
+
+<blockquote><pre>void swap(shared_ptr&amp;<ins>&amp;</ins> r);
+...
+template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp; a, shared_ptr&lt;T&gt;&amp; b);
+<ins>template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp;&amp; a, shared_ptr&lt;T&gt;&amp; b);
+template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp; a, shared_ptr&lt;T&gt;&amp;&amp; b);</ins>
+</pre></blockquote>
+
+<p>
+Change 20.6.6.2.4 [util.smartptr.shared.mod]:
+</p>
+
+<blockquote><pre>void swap(shared_ptr&amp;<ins>&amp;</ins> r);
+</pre></blockquote>
+
+<p>
+Change 20.6.6.2.9 [util.smartptr.shared.spec]:
+</p>
+
+<blockquote><pre>template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp; a, shared_ptr&lt;T&gt;&amp; b);
+<ins>template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp;&amp; a, shared_ptr&lt;T&gt;&amp; b);
+template&lt;class T&gt; void swap(shared_ptr&lt;T&gt;&amp; a, shared_ptr&lt;T&gt;&amp;&amp; b);</ins>
+</pre></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="744"></a>744. What is the lifetime of an exception pointed to by an exception_ptr?</h3>
+<p><b>Section:</b> 18.7.5 [propagation] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#propagation">active issues</a> in [propagation].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#propagation">issues</a> in [propagation].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Without some lifetime guarantee, it is hard to know how this type can be
+used. &nbsp;Very specifically, I don't see how the current wording would
+guarantee and exception_ptr caught at the end of one thread could be safely
+stored and rethrown in another thread - the original motivation for this
+API.
+</p>
+<p>
+(Peter Dimov agreed it should be clearer, maybe a non-normative note to
+explain?)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="745"></a>745. copy_exception API slices.</h3>
+<p><b>Section:</b> 18.7.5 [propagation] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#propagation">active issues</a> in [propagation].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#propagation">issues</a> in [propagation].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It could be I did not understand the design rationale, but I thought
+copy_exception would produce an exception_ptr to the most-derived (dynamic)
+type of the passed exception. &nbsp;Instead it slices, which appears to be less
+useful, and a likely source of FAQ questions in the future.
+</p>
+<p>
+(Peter Dimov suggests NAD)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="746"></a>746. current_exception may fail with bad_alloc</h3>
+<p><b>Section:</b> 18.7.5 [propagation] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#propagation">active issues</a> in [propagation].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#propagation">issues</a> in [propagation].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I understand that the attempt to copy an exception may run out of memory,
+but I believe this is the only part of the standard that mandates failure
+with specifically <tt>bad_alloc</tt>, as opposed to allowing an
+implementation-defined type derived from <tt>bad_alloc</tt>. &nbsp;For instance, the Core
+language for a failed new expression is:
+</p>
+<blockquote>
+<p>
+Any other allocation function that fails to allocate storage shall indicate
+failure only by throwing an exception of a type that would match a handler
+(15.3) of type <tt>std::bad_alloc</tt> (18.5.2.1).
+</p>
+</blockquote>
+<p>
+I think we should allow similar freedom here (or add a blanket
+compatible-exception freedom paragraph in 17)
+</p>
+<p>
+I prefer the clause 17 approach myself, and maybe clean up any outstanding
+wording that could also rely on it.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="747"></a>747. We have 3 separate type traits to identify classes supporting no-throw operations</h3>
+<p><b>Section:</b> 20.4.4.3 [meta.unary.prop] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#meta.unary.prop">active issues</a> in [meta.unary.prop].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta.unary.prop">issues</a> in [meta.unary.prop].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+We have 3 separate type traits to identify classes supporting no-throw
+operations, which are very useful when trying to provide exception safety
+guarantees. &nbsp;However, I'm not entirely clear on what the current wording
+requires of a conforming implementation. &nbsp;To quote from
+<tt>has_nothrow_default_constructor</tt>:
+</p>
+<blockquote><p>
+or <tt>T</tt> is a class type with a default constructor that is known not to throw
+any exceptions
+</p></blockquote>
+<p>
+What level of magic do we expect to deduce if this is known?
+</p>
+<p>
+E.g.
+</p>
+
+<blockquote><pre>struct test{
+&nbsp;int x;
+&nbsp;test() : x() {}
+};
+</pre></blockquote>
+<p>
+Should I expect a conforming compiler to
+&nbsp;<tt>assert( has_nothrow_constructor&lt;test&gt;::value )</tt>
+</p>
+<p>
+Is this a QoI issue?
+</p>
+<p>
+Should I expect to 'know' only if-and-only-if there is an inline definition
+available?
+</p>
+<p>
+Should I never expect that to be true, and insist that the user supplies an
+empty throw spec if they want to assert the no-throw guarantee?
+</p>
+<p>
+It would be helpful to maybe have a footnote explaining what is required,
+but right now I don't know what to suggest putting in the footnote.
+</p>
+<p>
+(agreement since is that trivial ops and explicit no-throws are required.
+Open if QoI should be allowed to detect further)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="748"></a>748. The is_abstract type trait is defined by reference to 10.4.</h3>
+<p><b>Section:</b> 20.4.4.3 [meta.unary.prop] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#meta.unary.prop">active issues</a> in [meta.unary.prop].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta.unary.prop">issues</a> in [meta.unary.prop].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I am trying to decide is a pure virtual function is a <i>necessary</i> as well as
+sufficient requirement to be classified as abstract?
+</p>
+<p>
+For instance, is the following (non-polymorphic) type considered abstract?
+</p>
+<blockquote><pre>struct abstract {
+protected:
+&nbsp;abstract(){}
+&nbsp;abstract( abstract const &amp; ) {}
+&nbsp;~abstract() {}
+};
+</pre></blockquote>
+<p>
+(Suggested that this may be NAD, with an editorial fix-up from Pete on the
+core wording to make clear that abstract requires a pure virtual function)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="749"></a>749. Currently <tt>has_nothrow_copy_constructor&lt;T&gt;::value</tt> is true if T has 'a' nothrow copy constructor.</h3>
+<p><b>Section:</b> 20.4.4.3 [meta.unary.prop] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#meta.unary.prop">active issues</a> in [meta.unary.prop].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta.unary.prop">issues</a> in [meta.unary.prop].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Unfortunately a class can have multiple copy constructors, and I believe to
+be useful this trait should only return true is ALL copy constructors are
+no-throw.
+</p>
+<p>
+For instance:
+</p>
+<blockquote>
+<pre>struct awkward {
+&nbsp;awkward( const awkward &amp; ) throw() {}
+&nbsp;awkward( awkward &amp; ) { throw "oops"; } };
+</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="750"></a>750. The current definition for <tt>is_convertible</tt> requires that the type be
+implicitly convertible, so explicit constructors are ignored.</h3>
+<p><b>Section:</b> 20.4.5 [meta.rel] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+With the pending arrival of explicit conversion functions though, I'm
+wondering if we want an additional trait, <tt>is_explictly_convertible</tt>?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="751"></a>751. change pass-by-reference members of <tt>vector&lt;bool&gt;</tt> to pass-by-value?</h3>
+<p><b>Section:</b> 23.2.6 [vector.bool] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A number of vector&lt;bool&gt; members take const bool&amp; as arguments.
+Is there any chance we could change them to pass-by-value or would I
+be wasting everyone's time if wrote up an issue?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="752"></a>752. Allocator complexity requirement</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Hans Boehm <b>Date:</b> 2007-10-11</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Did LWG recently discuss 20.1.2 [allocator.requirements]-2, which states that "All the operations
+on the allocators are expected to be amortized constant time."?
+</p>
+<p>
+As I think I pointed out earlier, this is currently fiction for
+<tt>allocate()</tt> if it has to obtain memory from the OS, and it's unclear to
+me how to interpret this for <tt>construct()</tt> and <tt>destroy()</tt> if they deal with
+large objects. &nbsp;Would it be controversial to officially let these take
+time linear in the size of the object, as they already do in real life?
+</p>
+<p>
+<tt>Allocate()</tt> more blatantly takes time proportional to the size of the
+object if you mix in GC. &nbsp;But it's not really a new problem, and I think
+we'd be confusing things by leaving the bogus requirements there. &nbsp;The
+current requirement on <tt>allocate()</tt> is generally not important anyway,
+since it takes O(size) to construct objects in the resulting space.
+There are real performance issues here, but they're all concerned with
+the constants, not the asymptotic complexity.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.1.2 [allocator.requirements]/2:
+</p>
+
+<blockquote>
+<p>
+-2- Table 39 describes the requirements on types manipulated through
+allocators. All the operations on the allocators are expected to be
+amortized constant time<ins>, except that <tt>allocate</tt> and
+<tt>construct</tt> may require time proportional to the size of the
+object allocated or constructed</ins>. Table 40 describes the
+requirements on allocator types.
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="753"></a>753. Move constructor in draft</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Yechezkel Mett <b>Date:</b> 2007-10-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The draft standard n2369 uses the term <i>move constructor</i> in a few
+places, but doesn't seem to define it.
+</p>
+
+<p>
+<tt>MoveConstructible</tt> requirements are defined in Table 33 in 20.1.1 [utility.arg.requirements] as
+follows:
+</p>
+
+<blockquote>
+<table border="1">
+<caption><tt>MoveConstructible</tt> requirements</caption>
+<tbody><tr>
+<th>expression</th> <th>post-condition</th>
+</tr>
+<tr>
+<td><tt>T t = rv</tt></td> <td><tt>t</tt> is equivalent to the value of <tt>rv</tt> before the construction</td>
+</tr>
+<tr>
+<td colspan="2">[<i>Note:</i> There is no requirement on the value of <tt>rv</tt> after the
+construction. <i>-- end note</i>]</td>
+</tr>
+</tbody></table>
+</blockquote>
+
+<p>
+(where <tt>rv</tt> is a non-const rvalue of type <tt>T</tt>).
+</p>
+
+<p>
+So I assume the move constructor is the constructor that would be used
+in filling the above requirement.
+</p>
+
+<p>
+For <tt>vector::reserve</tt>, <tt>vector::resize</tt> and the <tt>vector</tt> modifiers given in
+23.2.5.4 [vector.modifiers] we have
+</p>
+
+<blockquote>
+<i>Requires:</i> If <tt>value_type</tt> has a move constructor, that constructor shall
+not throw any exceptions.
+</blockquote>
+
+<p>
+Firstly "If <tt>value_type</tt> has a move constructor" is superfluous; every
+type which can be put into a <tt>vector</tt> has a move constructor (a copy
+constructor is also a move constructor). Secondly it means that for
+any <tt>value_type</tt> which has a throwing copy constructor and no other move
+constructor these functions cannot be used -- which I think will come
+as a shock to people who have been using such types in <tt>vector</tt> until
+now!
+</p>
+
+<p>
+I can see two ways to correct this. The simpler, which is presumably
+what was intended, is to say "If <tt>value_type</tt> has a move constructor and
+no copy constructor, the move constructor shall not throw any
+exceptions" or "If <tt>value_type</tt> has a move constructor which changes the
+value of its parameter,".
+</p>
+
+<p>
+The other alternative is add to <tt>MoveConstructible</tt> the requirement that
+the expression does not throw. This would mean that not every type
+that satisfies the <tt>CopyConstructible</tt> requirements also satisfies the
+<tt>MoveConstructible</tt> requirements. It would mean changing requirements in
+various places in the draft to allow either <tt>MoveConstructible</tt> or
+<tt>CopyConstructible</tt>, but I think the result would be clearer and
+possibly more concise too.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="754"></a>754. Ambiguous return clause for <tt>std::uninitialized_copy</tt></h3>
+<p><b>Section:</b> 20.6.4.1 [uninitialized.copy] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-10-15</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#uninitialized.copy">active issues</a> in [uninitialized.copy].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#uninitialized.copy">issues</a> in [uninitialized.copy].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+14882-2003, [lib.uninitialized.copy] is currently written as follows:
+</p>
+
+<blockquote>
+<pre>template &lt;class InputIterator, class ForwardIterator&gt;
+ ForwardIterator uninitialized_copy(InputIterator <i>first</i>, InputIterator <i>last</i>,
+ ForwardIterator <i>result</i>);
+</pre>
+<blockquote>
+<p>
+-1- <i>Effects:</i>
+</p>
+<blockquote><pre>for (; first != last; ++result, ++first)
+ new (static_cast&lt;void*&gt;(&amp;*result))
+ typename iterator_traits&lt;ForwardIterator&gt;::value_type(*first);
+</pre></blockquote>
+<p>
+-2- <i>Returns:</i> <tt><i>result</i></tt>
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+similarily for N2369, and its corresponding section
+20.6.4.1 [uninitialized.copy].
+</p>
+
+<p>
+It's not clear to me what the return clause is supposed to mean, I see
+two
+possible interpretations:
+</p>
+
+<ol type="a">
+<li>
+The notion of <tt><i>result</i></tt> is supposed to mean the value given by the
+function parameter <tt><i>result</i></tt> [Note to the issue editor: Please use italics for
+<tt><i>result</i></tt>].
+This seems somewhat implied by recognizing that both the function
+parameter
+and the name used in the clause do have the same italic font.
+</li>
+<li>
+The notion of "result" is supposed to mean the value of <tt><i>result</i></tt>
+after the
+preceding effects clause. This is in fact what all implementations I
+checked
+do (and which is probably it's intend, because it matches the
+specification of <tt>std::copy</tt>).
+</li>
+</ol>
+
+<p>
+The problem is: I see nothing in the standard which grants that this
+interpretation
+is correct, specifically [lib.structure.specifications] or
+17.3.1.3 [structure.specifications]
+resp. do not clarify which "look-up" rules apply for names found in
+the elements
+of the detailed specifications - Do they relate to the corresponding
+synopsis or
+to the effects clause (or possibly other elements)? Fortunately most
+detailed
+descriptions are unambigious in this regard, e.g. this problem does
+not apply
+for <tt>std::copy</tt>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the wording of the return clause to say (20.6.4.1 [uninitialized.copy]):
+</p>
+
+<blockquote>
+<p>
+-2- <i>Returns:</i> <ins>The value of</ins> <tt><i>result</i></tt> <ins>after effects have taken place.</ins>
+</p>
+</blockquote>
+
+
+
+
+
+
+</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/doc/html/ext/lwg-closed.html b/libstdc++-v3/doc/html/ext/lwg-closed.html
new file mode 100644
index 00000000000..52184fb805e
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/lwg-closed.html
@@ -0,0 +1,10627 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head><title>C++ Standard Library Closed Issues List</title>
+
+
+
+<style type="text/css">
+p {text-align:justify}
+li {text-align:justify}
+ins {background-color:#A0FFA0}
+del {background-color:#FFA0A0}
+</style></head><body>
+<table>
+<tbody><tr>
+<td align="left">Doc. no.</td>
+<td align="left">N2458=07-0328</td>
+</tr>
+<tr>
+<td align="left">Date:</td>
+<td align="left">2007-10-20</td>
+</tr>
+<tr>
+<td align="left">Project:</td>
+<td align="left">Programming Language C++</td>
+</tr>
+<tr>
+<td align="left">Reply to:</td>
+<td align="left">Howard Hinnant &lt;<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>&gt;</td>
+</tr>
+</tbody></table>
+<h1>C++ Standard Library Closed Issues List (Revision R52)</h1>
+
+ <p>Reference ISO/IEC IS 14882:1998(E)</p>
+ <p>Also see:</p>
+ <ul>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
+ </ul>
+
+ <p>This document contains only library issues which have been closed
+ by the Library Working Group as duplicates or not defects. That is,
+ issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> active issues and more
+ information. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a> for issues considered
+ defects. The introductory material in that document also applies to
+ this document.</p>
+
+<h2>Revision History</h2>
+<ul>
+<li>R52:
+2007-10-19 post-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>172 open issues, up by 4.</li>
+<li>582 closed issues, up by 27.</li>
+<li>754 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#724">724</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#725">725</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#726">726</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#727">727</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#728">728</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#729">729</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#730">730</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#731">731</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#733">733</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#735">735</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#736">736</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#737">737</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#738">738</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#739">739</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#741">741</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#745">745</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#747">747</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#748">748</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#750">750</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#751">751</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#752">752</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#753">753</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#754">754</a>.</li>
+<li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#546">546</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#564">564</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#565">565</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#573">573</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#585">585</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#588">588</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#393">393</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+<li>Changed the following issues from New to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#607">607</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#608">608</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#561">561</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#562">562</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#563">563</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#581">581</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#595">595</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>.</li>
+<li>Changed the following issues from New to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#552">552</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>.</li>
+<li>Changed the following issues from Open to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#401">401</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R51:
+2007-09-09 pre-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>168 open issues, up by 15.</li>
+<li>555 closed issues, up by 0.</li>
+<li>723 issues total, up by 15.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#711">711</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#713">713</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#714">714</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#716">716</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#717">717</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#718">718</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#719">719</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#721">721</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R50:
+2007-08-05 post-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>153 open issues, down by 5.</li>
+<li>555 closed issues, up by 17.</li>
+<li>708 issues total, up by 12.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#697">697</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#698">698</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#701">701</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#702">702</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#584">584</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>.</li>
+<li>Changed the following issues from Pending NAD Editorial to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#579">579</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from Pending WP to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>.</li>
+<li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from DR to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453">453</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R49:
+2007-06-23 pre-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>158 open issues, up by 13.</li>
+<li>538 closed issues, up by 7.</li>
+<li>696 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#692">692</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li>
+<li>Added the following Pending NAD Editorial issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#683">683</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#587">587</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R48:
+2007-05-06 post-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>145 open issues, down by 33.</li>
+<li>531 closed issues, up by 53.</li>
+<li>676 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Changed the following issues from NAD to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#357">357</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#368">368</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>.</li>
+<li>Changed the following issues from NAD_Future to NAD Future: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#105">105</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#116">116</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#149">149</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#188">188</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#219">219</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#353">353</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#599">599</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#600">600</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#601">601</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#602">602</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>.</li>
+<li>Changed the following issues from Tentatively Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R47:
+2007-03-09 pre-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>178 open issues, up by 37.</li>
+<li>478 closed issues, up by 0.</li>
+<li>656 issues total, up by 37.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li>
+<li>Changed the following issues from New to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+<li>Changed the following issues from Open to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>.</li>
+<li>Changed the following issues from Review to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R46:
+2007-01-12 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>141 open issues, up by 11.</li>
+<li>478 closed issues, down by 1.</li>
+<li>619 issues total, up by 10.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R45:
+2006-11-03 post-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 0.</li>
+<li>479 closed issues, up by 17.</li>
+<li>609 issues total, up by 17.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a> to Review.</li>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R44:
+2006-09-08 pre-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 6.</li>
+<li>462 closed issues, down by 1.</li>
+<li>592 issues total, up by 5.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R43:
+2006-06-23 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>124 open issues, up by 14.</li>
+<li>463 closed issues, down by 1.</li>
+<li>587 issues total, up by 13.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.</li>
+</ul></li>
+</ul>
+</li>
+<li>R42:
+2006-04-21 post-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>110 open issues, down by 16.</li>
+<li>464 closed issues, up by 24.</li>
+<li>574 issues total, up by 8.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a> to Open.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li>
+</ul></li>
+</ul>
+</li>
+<li>R41:
+2006-02-24 pre-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>126 open issues, up by 31.</li>
+<li>440 closed issues, up by 0.</li>
+<li>566 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>.</li>
+<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R40:
+2005-12-16 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>95 open issues.</li>
+<li>440 closed issues.</li>
+<li>535 issues total.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R39:
+2005-10-14 post-Mont Tremblant mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
+</li>
+<li>R38:
+2005-07-03 pre-Mont Tremblant mailing.
+Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
+</li>
+<li>R37:
+2005-06 mid-term mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
+</li>
+<li>R36:
+2005-04 post-Lillehammer mailing. All issues in "ready" status except
+for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
+previously in "DR" status were moved to "WP".
+</li>
+<li>R35:
+2005-03 pre-Lillehammer mailing.
+</li>
+<li>R34:
+2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
+</li>
+<li>R33:
+2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
+</li>
+<li>R32:
+2004-09 pre-Redmond mailing: reflects new proposed resolutions and
+new issues received after the 2004-07 mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
+</li>
+<li>R31:
+2004-07 mid-term mailing: reflects new proposed resolutions and
+new issues received after the post-Sydney mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
+</li>
+<li>R30:
+Post-Sydney mailing: reflects decisions made at the Sydney meeting.
+Voted all "Ready" issues from R29 into the working paper.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
+</li>
+<li>R29:
+Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
+</li>
+<li>R28:
+Post-Kona mailing: reflects decisions made at the Kona meeting.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
+</li>
+<li>R27:
+Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
+</li>
+<li>R26:
+Post-Oxford mailing: reflects decisions made at the Oxford meeting.
+All issues in Ready status were voted into DR status. All issues in
+DR status were voted into WP status.
+</li>
+<li>R25:
+Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
+</li>
+<li>R24:
+Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
+meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
+moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
+at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
+concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
+</li>
+<li>R23:
+Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
+Moved issues in the TC to TC status.
+</li>
+<li>R22:
+Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
+</li>
+<li>R21:
+Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
+</li>
+<li>R20:
+Post-Redmond mailing; reflects actions taken in Redmond. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
+not discussed at the meeting.
+
+All Ready issues were moved to DR status, with the exception of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+
+Noteworthy issues discussed at Redmond include
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
+</li>
+<li>R19:
+Pre-Redmond mailing. Added new issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
+</li>
+<li>R18:
+Post-Copenhagen mailing; reflects actions taken in Copenhagen.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
+to DR.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
+to Ready.
+
+Closed issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
+as NAD.
+
+</li>
+<li>R17:
+Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
+resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
+</li>
+<li>R16:
+post-Toronto mailing; reflects actions taken in Toronto. Added new
+issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
+appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
+the bug in enough places.
+</li>
+<li>R15:
+pre-Toronto mailing. Added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
+changes so that we pass Weblint tests.
+</li>
+<li>R14:
+post-Tokyo II mailing; reflects committee actions taken in
+Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
+</li>
+<li>R13:
+pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
+</li>
+<li>R12:
+pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
+</li>
+<li>R11:
+post-Kona mailing: Updated to reflect LWG and full committee actions
+in Kona (99-0048/N1224). Note changed resolution of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
+to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
+"closed" documents. Changed the proposed resolution of issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
+</li>
+<li>R10:
+pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
+</li>
+<li>R9:
+pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
+"closed" documents. (99-0030/N1206, 25 Aug 99)
+</li>
+<li>R8:
+post-Dublin mailing. Updated to reflect LWG and full committee actions
+in Dublin. (99-0016/N1193, 21 Apr 99)
+</li>
+<li>R7:
+pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
+</li>
+<li>R6:
+pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
+and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
+</li>
+<li>R5:
+update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
+for making list public. (30 Dec 98)
+</li>
+<li>R4:
+post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
+issues corrected. (22 Oct 98)
+</li>
+<li>R3:
+post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
+added, many issues updated to reflect LWG consensus (12 Oct 98)
+</li>
+<li>R2:
+pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
+</li>
+<li>R1:
+Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
+format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
+</li>
+</ul>
+
+<h2>Closed Issues</h2>
+<hr>
+<h3><a name="2"></a>2. Auto_ptr conversions effects incorrect</h3>
+<p><b>Section:</b> D.9.1.3 [auto.ptr.conv] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1997-12-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 1 in "Effects", says "Calls
+p-&gt;release()" where it clearly must be "Calls
+p.release()". (As it is, it seems to require using
+auto_ptr&lt;&gt;::operator-&gt; to refer to X::release, assuming that
+exists.)</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 20.4.4.3 [meta.unary.prop] paragraph 1 Effects from
+"Calls p-&gt;release()" to "Calls p.release()".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect: the proposed change is already found in the standard.
+[Originally classified as a defect, later reclassified.]</p>
+
+
+
+
+
+<hr>
+<h3><a name="4"></a>4. Basic_string size_type and difference_type should be implementation defined</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Morristown we changed the size_type and difference_type typedefs
+for all the other containers to implementation defined with a
+reference to 23.1 [container.requirements]. This should probably also have been
+done for strings. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. [Originally classified as a defect, later
+reclassified.] basic_string, unlike the other standard library
+template containers, is severely constrained by its use of
+char_traits. Those types are dictated by the traits class, and are far
+from implementation defined.</p>
+
+
+
+
+
+<hr>
+<h3><a name="6"></a>6. File position not an offset unimplementable</h3>
+<p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Table 88, in I/O, is too strict; it's unimplementable on systems
+where a file position isn't just an offset. It also never says just
+what fpos&lt;&gt; is really supposed to be. [Here's my summary, which
+Jerry agrees is more or less accurate. "I think I now know what
+the class really is, at this point: it's a magic cookie that
+encapsulates an mbstate_t and a file position (possibly represented as
+an fpos_t), it has syntactic support for pointer-like arithmetic, and
+implementors are required to have real, not just syntactic, support
+for arithmetic." This isn't standardese, of course.] </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. The LWG believes that the Standard is already clear,
+and that the above summary is what the Standard in effect says.</p>
+
+
+
+
+
+<hr>
+<h3><a name="10"></a>10. Codecvt&lt;&gt;::do unclear</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a></p>
+<p><b>Discussion:</b></p>
+<p>Section 22.2.1.5.2 says that codecvt&lt;&gt;::do_in and do_out
+should return the value noconv if "no conversion was
+needed". However, I don't see anything anywhere that defines what
+it means for a conversion to be needed or not needed. I can think of
+several circumstances where one might plausibly think that a
+conversion is not "needed", but I don't know which one is
+intended here. </p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="12"></a>12. Way objects hold allocators unclear</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-02-23</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>I couldn't find a statement in the standard saying whether the allocator object held by
+a container is held as a copy of the constructor argument or whether a pointer of
+reference is maintained internal. There is an according statement for compare objects and
+how they are maintained by the associative containers, but I couldn't find anything
+regarding allocators. </p>
+
+<p>Did I overlook it? Is it an open issue or known defect? Or is it deliberately left
+unspecified? </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. The LWG believes that the Standard is already
+clear.&nbsp; See 23.1 [container.requirements], paragraph 8.</p>
+
+
+
+
+
+<hr>
+<h3><a name="43"></a>43. Locale table correction</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a></p>
+<p><b>Discussion:</b></p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="45"></a>45. Stringstreams read/write pointers initial position unclear</h3>
+<p><b>Section:</b> 27.7.3 [ostringstream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matthias Mueller <b>Date:</b> 1998-05-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In a comp.lang.c++.moderated Matthias Mueller wrote:</p>
+
+<p>"We are not sure how to interpret the CD2 (see 27.2
+[iostream.forward], 27.7.3.1 [ostringstream.cons], 27.7.1.1
+[stringbuf.cons])
+with respect to the question as to what the correct initial positions
+of the write and&nbsp; read pointers of a stringstream should
+be."</p>
+
+<p>"Is it the same to output two strings or to initialize the stringstream with the
+first and to output the second?"</p>
+
+<p><i>[PJ Plauger, Bjarne Stroustrup, Randy Smithey, Sean Corfield, and
+Jerry Schwarz have all offered opinions; see reflector messages
+lib-6518, 6519, 6520, 6521, 6523, 6524.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes the Standard is correct as written. The behavior
+of stringstreams is consistent with fstreams, and there is a
+constructor which can be used to obtain the desired effect. This
+behavior is known to be different from strstreams.</p>
+
+
+
+
+
+<hr>
+<h3><a name="58"></a>58. Extracting a char from a wide-oriented stream</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.6.1.2.3 has member functions for extraction of signed char and
+unsigned char, both singly and as strings. However, it doesn't say
+what it means to extract a <tt>char</tt> from a
+<tt>basic_streambuf&lt;charT, Traits&gt;</tt>. </p>
+
+<p>basic_streambuf, after all, has no members to extract a char, so
+basic_istream must somehow convert from charT to signed char or
+unsigned char. The standard doesn't say how it is to perform that
+conversion. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>The Standard is correct as written. There is no such extractor and
+this is the intent of the LWG.</p>
+
+
+
+
+<hr>
+<h3><a name="65"></a>65. Underspecification of strstreambuf::seekoff</h3>
+<p><b>Section:</b> D.7.1.3 [depr.strstreambuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.strstreambuf.virtuals">issues</a> in [depr.strstreambuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The standard says how this member function affects the current
+stream position. (<tt>gptr</tt> or <tt>pptr</tt>) However, it does not
+say how this member function affects the beginning and end of the
+get/put area. </p>
+
+<p>This is an issue when seekoff is used to position the get pointer
+beyond the end of the current read area. (Which is legal. This is
+implicit in the definition of <i>seekhigh</i> in D.7.1, paragraph 4.)
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees that seekoff() is underspecified, but does not wish
+to invest effort in this deprecated feature.</p>
+
+
+
+
+
+<hr>
+<h3><a name="67"></a>67. Setw useless for strings</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-07-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a></p>
+<p><b>Discussion:</b></p>
+<p>In a comp.std.c++ posting Michel Michaud wrote: What
+should be output by: </p>
+
+<pre> string text("Hello");
+ cout &lt;&lt; '[' &lt;&lt; setw(10) &lt;&lt; right &lt;&lt; text &lt;&lt; ']';
+</pre>
+
+<p>Shouldn't it be:</p>
+
+<pre> [ Hello]</pre>
+
+<p>Another person replied: Actually, according to the FDIS, the width
+of the field should be the minimum of width and the length of the
+string, so the output shouldn't have any padding. I think that this is
+a typo, however, and that what is wanted is the maximum of the
+two. (As written, setw is useless for strings. If that had been the
+intent, one wouldn't expect them to have mentioned using its value.)
+</p>
+
+<p>It's worth pointing out that this is a recent correction anyway;
+IIRC, earlier versions of the draft forgot to mention formatting
+parameters whatsoever.</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="72"></a>72. Do_convert phantom member function</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a></p>
+<p><b>Discussion:</b></p>
+<p>In 22.2.1.4 [locale.codecvt] par 3, and in 22.2.1.4.2 [locale.codecvt.virtuals] par 8, a nonexistent member function
+"do_convert" is mentioned. This member was replaced with
+"do_in" and "do_out", the proper referents in the
+contexts above.</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="73"></a>73. <tt>is_open</tt> should be const</h3>
+<p><b>Section:</b> 27.8.1 [fstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fstreams">issues</a> in [fstreams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Classes <tt>basic_ifstream</tt>, <tt>basic_ofstream</tt>, and
+<tt>basic_fstream</tt> all have a member function <tt>is_open</tt>. It
+should be a <tt>const</tt> member function, since it does nothing but
+call one of <tt>basic_filebuf</tt>'s const member functions. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. This is a deliberate feature; const streams would be
+meaningless.</p>
+
+
+
+
+<hr>
+<h3><a name="77"></a>77. Valarray operator[] const returning value</h3>
+<p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Levente Farkas <b>Date:</b> 1998-09-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a></p>
+<p><b>Discussion:</b></p>
+<p>valarray:<br>
+<br>
+&nbsp;&nbsp;&nbsp; <tt>T operator[] (size_t) const;</tt><br>
+<br>
+why not <br>
+<br>
+&nbsp;&nbsp;&nbsp; <tt>const T&amp; operator[] (size_t) const;</tt><br>
+<br>
+as in vector ???<br>
+<br>
+One can't copy even from a const valarray eg:<br>
+<br>
+&nbsp;&nbsp;&nbsp; <tt>memcpy(ptr, &amp;v[0], v.size() * sizeof(double));<br>
+</tt><br>
+[I] find this bug in valarray is very difficult.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that the interface was deliberately designed that
+way. That is what valarray was designed to do; that's where the
+"value array" name comes from. LWG members further comment
+that "we don't want valarray to be a full STL container."
+26.5.2.3 [valarray.access] specifies properties that indicate "an
+absence of aliasing" for non-constant arrays; this allows
+optimizations, including special hardware optimizations, that are not
+otherwise possible. </p>
+
+
+
+
+
+<hr>
+<h3><a name="81"></a>81. Wrong declaration of slice operations</h3>
+<p><b>Section:</b> 26.5.5 [template.slice.array], 26.5.7 [template.gslice.array], 26.5.8 [template.mask.array], 26.5.9 [template.indirect.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.slice.array">issues</a> in [template.slice.array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Isn't the definition of copy constructor and assignment operators wrong?
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Instead of</p>
+
+<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array(const slice_array&amp;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array&amp; operator=(const slice_array&amp;);</pre>
+
+<p>IMHO they have to be</p>
+
+<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array(const slice_array&lt;T&gt;&amp;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array&amp; operator=(const slice_array&lt;T&gt;&amp;);</pre>
+
+<p>Same for gslice_array. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. The Standard is correct as written. </p>
+
+
+
+
+<hr>
+<h3><a name="82"></a>82. Missing constant for set elements</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 5 specifies:</p>
+
+<blockquote><p>
+For set and multiset the value type is the same as the key type. For
+map and multimap it is equal to pair&lt;const Key, T&gt;.
+</p></blockquote>
+
+<p>Strictly speaking, this is not correct because for set and multiset
+the value type is the same as the <b>constant</b> key type.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. The Standard is correct as written; it uses a
+different mechanism (const &amp;) for <tt>set</tt> and
+<tt>multiset</tt>. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for a related
+issue.</p>
+
+
+
+
+<hr>
+<h3><a name="84"></a>84. Ambiguity with string::insert()</h3>
+<p><b>Section:</b> 21.3.5 [string.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>If I try</p>
+<pre> s.insert(0,1,' ');</pre>
+
+<p>&nbsp; I get an nasty ambiguity. It might be</p>
+<pre> s.insert((size_type)0,(size_type)1,(charT)' ');</pre>
+
+<p>which inserts 1 space character at position 0, or</p>
+<pre> s.insert((char*)0,(size_type)1,(charT)' ')</pre>
+
+<p>which inserts 1 space character at iterator/address 0 (bingo!), or</p>
+<pre> s.insert((char*)0, (InputIterator)1, (InputIterator)' ')</pre>
+
+<p>which normally inserts characters from iterator 1 to iterator '
+'. But according to 23.1.1.9 (the "do the right thing" fix)
+it is equivalent to the second. However, it is still ambiguous,
+because of course I mean the first!</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Not a defect. The LWG believes this is a "genetic
+misfortune" inherent in the design of string and thus not a
+defect in the Standard as such .</p>
+
+
+
+
+<hr>
+<h3><a name="85"></a>85. String char types</h3>
+<p><b>Section:</b> 21 [strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#strings">issues</a> in [strings].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The standard seems not to require that charT is equivalent to
+traits::char_type. So, what happens if charT is not equivalent to
+traits::char_type?</p>
+
+
+<p><b>Rationale:</b></p>
+<p>There is already wording in 21.1 [char.traits] paragraph 3 that
+requires them to be the same.</p>
+
+
+
+
+<hr>
+<h3><a name="87"></a>87. Error in description of string::compare()</h3>
+<p><b>Section:</b> 21.3.6.8 [string::swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::swap">issues</a> in [string::swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a></p>
+<p><b>Discussion:</b></p>
+<p>The following compare() description is obviously a bug:</p>
+
+<pre>int compare(size_type pos, size_type n1,
+ charT *s, size_type n2 = npos) const;
+</pre>
+
+<p>because without passing n2 it should compare up to the end of the
+string instead of comparing npos characters (which throws an
+exception) </p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="88"></a>88. Inconsistency between string::insert() and string::append()</h3>
+<p><b>Section:</b> 21.3.6.4 [string::insert], 21.3.6.2 [string::append] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Why does </p>
+<pre> template&lt;class InputIterator&gt;
+ basic_string&amp; append(InputIterator first, InputIterator last);</pre>
+
+<p>return a string, while</p>
+<pre> template&lt;class InputIterator&gt;
+ void insert(iterator p, InputIterator first, InputIterator last);</pre>
+
+<p>returns nothing ?</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this stylistic inconsistency is not sufficiently
+serious to constitute a defect.</p>
+
+
+
+
+<hr>
+<h3><a name="89"></a>89. Missing throw specification for string::insert() and string::replace()</h3>
+<p><b>Section:</b> 21.3.6.4 [string::insert], 21.3.6.6 [string::replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a></p>
+<p><b>Discussion:</b></p>
+<p>All insert() and replace() members for strings with an iterator as
+first argument lack a throw specification. The throw
+specification should probably be: length_error if size exceeds
+maximum. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Considered a duplicate because it will be solved by the resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="93"></a>93. Incomplete Valarray Subset Definitions</h3>
+<p><b>Section:</b> 26.5 [numarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numarray">issues</a> in [numarray].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>You can easily create subsets, but you can't easily combine them
+with other subsets. Unfortunately, you almost always needs an
+explicit type conversion to valarray. This is because the standard
+does not specify that valarray subsets provide the same operations as
+valarrays. </p>
+
+<p>For example, to multiply two subsets and assign the result to a third subset, you can't
+write the following:</p>
+
+<pre>va[slice(0,4,3)] = va[slice(1,4,3)] * va[slice(2,4,3)];</pre>
+
+<p>Instead, you have to code as follows:</p>
+
+<pre>va[slice(0,4,3)] = static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(1,4,3)]) *
+ static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(2,4,3)]);</pre>
+
+<p>This is tedious and error-prone. Even worse, it costs performance because each cast
+creates a temporary objects, which could be avoided without the cast. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Extend all valarray subset types so that they offer all valarray operations.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard; it is a request for an extension.</p>
+
+
+
+
+<hr>
+<h3><a name="94"></a>94. May library implementors add template parameters to Standard Library classes?</h3>
+<p><b>Section:</b> 17.4.4 [conforming] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Is it a permitted extension for library implementors to add template parameters to
+standard library classes, provided that those extra parameters have defaults? For example,
+instead of defining <tt>template &lt;class T, class Alloc = allocator&lt;T&gt; &gt; class
+vector;</tt> defining it as <tt>template &lt;class T, class Alloc = allocator&lt;T&gt;,
+int N = 1&gt; class vector;</tt> </p>
+
+<p>The standard may well already allow this (I can't think of any way that this extension
+could break a conforming program, considering that users are not permitted to
+forward-declare standard library components), but it ought to be explicitly permitted or
+forbidden. </p>
+
+<p>comment from Steve Cleary via comp.std.c++:</p>
+<blockquote>
+<p>I disagree [with the proposed resolution] for the following reason:
+consider user library code with template template parameters. For
+example, a user library object may be templated on the type of
+underlying sequence storage to use (deque/list/vector), since these
+classes all take the same number and type of template parameters; this
+would allow the user to determine the performance tradeoffs of the
+user library object. A similar example is a user library object
+templated on the type of underlying set storage (set/multiset) or map
+storage (map/multimap), which would allow users to change (within
+reason) the semantic meanings of operations on that object.</p>
+<p>I think that additional template parameters should be forbidden in
+the Standard classes. Library writers don't lose any expressive power,
+and can still offer extensions because additional template parameters
+may be provided by a non-Standard implementation class:</p>
+<pre>
+ template &lt;class T, class Allocator = allocator&lt;T&gt;, int N = 1&gt;
+ class __vector
+ { ... };
+ template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
+ class vector: public __vector&lt;T, Allocator&gt;
+ { ... };
+</pre>
+
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.8 [res.on.exception.handling]:</p>
+
+<blockquote>
+ <p>17.4.4.9 Template Parameters</p> <p>A specialization of a
+ template class described in the C++ Standard Library behaves the
+ same as if the implementation declares no additional template
+ parameters.</p> <p>Footnote: Additional template parameters with
+ default values are thus permitted.</p>
+</blockquote>
+
+<p>Add "template parameters" to the list of subclauses at
+the end of 17.4.4 [conforming] paragraph 1.</p>
+
+<p><i>[Kona: The LWG agreed the standard needs clarification. After
+discussion with John Spicer, it seems added template parameters can be
+detected by a program using template-template parameters. A straw vote
+- "should implementors be allowed to add template
+parameters?" found no consensus ; 5 - yes, 7 - no.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+There is no ambiguity; the standard is clear as written. Library
+implementors are not permitted to add template parameters to standard
+library classes. This does not fall under the "as if" rule,
+so it would be permitted only if the standard gave explicit license
+for implementors to do this. This would require a change in the
+standard.
+</p>
+
+<p>
+The LWG decided against making this change, because it would break
+user code involving template template parameters or specializations
+of standard library class templates.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="95"></a>95. Members added by the implementation</h3>
+<p><b>Section:</b> 17.4.4.4 [member.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual
+members a base class and break user derived classes.</p>
+
+<p>Example: </p>
+
+<blockquote>
+ <pre>// implementation code:
+struct _Base { // _Base is in the implementer namespace
+ virtual void foo ();
+};
+class vector : _Base // deriving from a class is allowed
+{ ... };
+
+// user code:
+class vector_checking : public vector
+{
+ void foo (); // don't want to override _Base::foo () as the
+ // user doesn't know about _Base::foo ()
+};</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Clarify the wording to make the example illegal.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard.&nbsp; The example is already
+illegal.&nbsp; See 17.4.4.4 [member.functions] paragraph 2.</p>
+
+
+
+
+<hr>
+<h3><a name="97"></a>97. Insert inconsistent definition</h3>
+<p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p><tt>insert(iterator, const value_type&amp;)</tt> is defined both on
+sequences and on set, with unrelated semantics: insert here (in
+sequences), and insert with hint (in associative containers). They
+should have different names (B.S. says: do not abuse overloading).</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard. It is a genetic misfortune of
+the design, for better or for worse.</p>
+
+
+
+
+<hr>
+<h3><a name="99"></a>99. Reverse_iterator comparisons completely wrong</h3>
+<p><b>Section:</b> 24.4.1.3.13 [reverse.iter.op==] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The &lt;, &gt;, &lt;=, &gt;= comparison operator are wrong: they
+return the opposite of what they should.</p>
+
+<p>Note: same problem in CD2, these were not even defined in CD1. SGI
+STL code is correct; this problem is known since the Morristown
+meeting but there it was too late</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard. A careful reading shows the Standard is correct
+as written. A review of several implementations show that they implement
+exactly what the Standard says.</p>
+
+
+
+
+<hr>
+<h3><a name="100"></a>100. Insert iterators/ostream_iterators overconstrained</h3>
+<p><b>Section:</b> 24.4.2 [insert.iterators], 24.5.4 [ostreambuf.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Overspecified For an insert iterator it, the expression *it is
+required to return a reference to it. This is a simple possible
+implementation, but as the SGI STL documentation says, not the only
+one, and the user should not assume that this is the case.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this causes no harm and is not a defect in the
+standard. The only example anyone could come up with caused some
+incorrect code to work, rather than the other way around.</p>
+
+
+
+
+
+<hr>
+<h3><a name="101"></a>101. No way to free storage for vector and deque</h3>
+<p><b>Section:</b> 23.2.5 [vector], 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Reserve can not free storage, unlike string::reserve</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard. The LWG has considered this
+issue in the past and sees no need to change the Standard. Deque has
+no reserve() member function. For vector, shrink-to-fit can be
+expressed in a single line of code (where <tt>v</tt> is
+<tt>vector&lt;T&gt;</tt>):
+</p>
+
+<blockquote>
+ <p><tt>vector&lt;T&gt;(v).swap(v);&nbsp; // shrink-to-fit v</tt></p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="102"></a>102. Bug in insert range in associative containers</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a></p>
+<p><b>Discussion:</b></p>
+<p>Table 69 of Containers say that a.insert(i,j) is linear if [i, j) is ordered. It seems
+impossible to implement, as it means that if [i, j) = [x], insert in an associative
+container is O(1)!</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>N+log (size()) if [i,j) is sorted according to value_comp()</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="104"></a>104. Description of basic_string::operator[] is unclear</h3>
+<p><b>Section:</b> 21.3.4 [string.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.capacity">issues</a> in [string.capacity].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It is not clear that undefined behavior applies when pos == size ()
+for the non const version.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Rewrite as: Otherwise, if pos &gt; size () or pos == size () and
+the non-const version is used, then the behavior is undefined.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The Standard is correct. The proposed resolution already appears in
+the Standard.</p>
+
+
+
+
+<hr>
+<h3><a name="105"></a>105. fstream ctors argument types desired</h3>
+<p><b>Section:</b> 27.8 [file.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>fstream ctors take a const char* instead of string.<br>
+fstream ctors can't take wchar_t</p>
+
+<p>An extension to add a const wchar_t* to fstream would make the
+implementation non conforming.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect in the Standard. It might be an
+interesting extension for the next Standard. </p>
+
+
+
+
+<hr>
+<h3><a name="107"></a>107. Valarray constructor is strange</h3>
+<p><b>Section:</b> 26.5.2 [template.valarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.valarray">issues</a> in [template.valarray].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The order of the arguments is (elem, size) instead of the normal
+(size, elem) in the rest of the library. Since elem often has an
+integral or floating point type, both types are convertible to each
+other and reversing them leads to a well formed program.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Inverting the arguments could silently break programs. Introduce
+the two signatures (const T&amp;, size_t) and (size_t, const T&amp;),
+but make the one we do not want private so errors result in a
+diagnosed access violation. This technique can also be applied to STL
+containers.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that while the order of arguments is unfortunate,
+it does not constitute a defect in the standard. The LWG believes that
+the proposed solution will not work for valarray&lt;size_t&gt; and
+perhaps other cases.</p>
+
+
+
+
+<hr>
+<h3><a name="111"></a>111. istreambuf_iterator::equal overspecified, inefficient</h3>
+<p><b>Section:</b> 24.5.3.5 [istreambuf.iterator::equal] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The member istreambuf_iterator&lt;&gt;::equal is specified to be
+unnecessarily inefficient. While this does not affect the efficiency
+of conforming implementations of iostreams, because they can
+"reach into" the iterators and bypass this function, it does
+affect users who use istreambuf_iterators. </p>
+
+<p>The inefficiency results from a too-scrupulous definition, which
+requires a "true" result if neither iterator is at eof. In
+practice these iterators can only usefully be compared with the
+"eof" value, so the extra test implied provides no benefit,
+but slows down users' code. </p>
+
+<p>The solution is to weaken the requirement on the function to return
+true only if both iterators are at eof. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 24.5.3.5 [istreambuf.iterator::equal],
+paragraph 1, </p>
+
+<blockquote>
+ <p>-1- Returns: true if and only if both iterators are at end-of-stream, or neither is at
+ end-of-stream, regardless of what streambuf object they use. </p>
+</blockquote>
+
+<p>with</p>
+
+<blockquote>
+ <p>-1- Returns: true if and only if both iterators are at
+ end-of-stream, regardless of what streambuf object they use. </p>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>It is not clear that this is a genuine defect. Additionally, the
+LWG was reluctant to make a change that would result in
+operator== not being a equivalence relation. One consequence of
+this change is that an algorithm that's passed the range [i, i)
+would no longer treat it as an empty range.</p>
+
+
+
+
+
+<hr>
+<h3><a name="113"></a>113. Missing/extra iostream sync semantics</h3>
+<p><b>Section:</b> 27.6.1.1 [istream], 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream">issues</a> in [istream].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 27.6.1.1, class basic_istream has a member function sync, described in 27.6.1.3,
+paragraph 36. </p>
+
+<p>Following the chain of definitions, I find that the various sync functions have defined
+semantics for output streams, but no semantics for input streams. On the other hand,
+basic_ostream has no sync function. </p>
+
+<p>The sync function should at minimum be added to basic_ostream, for internal
+consistency. </p>
+
+<p>A larger question is whether sync should have assigned semantics for input streams. </p>
+
+<p>Classic iostreams said streambuf::sync flushes pending output and attempts to return
+unread input characters to the source. It is a protected member function. The filebuf
+version (which is public) has that behavior (it backs up the read pointer). Class
+strstreambuf does not override streambuf::sync, and so sync can't be called on a
+strstream. </p>
+
+<p>If we can add corresponding semantics to the various sync functions, we should. If not,
+we should remove sync from basic_istream.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>A sync function is not needed in basic_ostream because the flush function provides the
+desired functionality.</p>
+
+<p>As for the other points, the LWG finds the standard correct as written.</p>
+
+
+
+
+
+<hr>
+<h3><a name="116"></a>116. bitset cannot be constructed with a const char*</h3>
+<p><b>Section:</b> 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-11-06</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.bitset">issues</a> in [template.bitset].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The following code does not compile with the EDG compiler:</p>
+
+<blockquote>
+ <pre>#include &lt;bitset&gt;
+using namespace std;
+bitset&lt;32&gt; b("111111111");</pre>
+</blockquote>
+
+<p>If you cast the ctor argument to a string, i.e.:</p>
+
+<blockquote>
+ <pre>bitset&lt;32&gt; b(string("111111111"));</pre>
+</blockquote>
+
+<p>then it will compile. The reason is that bitset has the following templatized
+constructor:</p>
+
+<blockquote>
+ <pre>template &lt;class charT, class traits, class Allocator&gt;
+explicit bitset (const basic_string&lt;charT, traits, Allocator&gt;&amp; str, ...);</pre>
+</blockquote>
+
+<p>According to the compiler vendor, Steve Adamcyk at EDG, the user
+cannot pass this template constructor a <tt>const char*</tt> and
+expect a conversion to <tt>basic_string</tt>. The reason is
+"When you have a template constructor, it can get used in
+contexts where type deduction can be done. Type deduction basically
+comes up with exact matches, not ones involving conversions."
+</p>
+
+<p>I don't think the intention when this constructor became
+templatized was for construction from a <tt>const char*</tt> to no
+longer work.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to 23.3.5 [template.bitset] a bitset constructor declaration</p>
+
+<blockquote>
+ <pre>explicit bitset(const char*);</pre>
+</blockquote>
+
+<p>and in Section 23.3.5.1 [bitset.cons] add:</p>
+
+<blockquote>
+ <pre>explicit bitset(const char* str);</pre>
+ <p>Effects: <br>
+ &nbsp;&nbsp;&nbsp; Calls <tt>bitset((string) str, 0, string::npos);</tt></p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Although the problem is real, the standard is designed that way so
+it is not a defect. Education is the immediate workaround. A future
+standard may wish to consider the Proposed Resolution as an
+extension.</p>
+
+
+
+
+
+<hr>
+<h3><a name="121"></a>121. Detailed definition for ctype&lt;wchar_t&gt; specialization</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 22.1.1.1.1 has the following listed in Table 51: ctype&lt;char&gt; ,
+ctype&lt;wchar_t&gt;. </p>
+
+<p>Also Section 22.2.1.1 [locale.ctype] says: </p>
+
+<blockquote>
+ <p>The instantiations required in Table 51 (22.1.1.1.1) namely ctype&lt;char&gt; and
+ ctype&lt;wchar_t&gt; , implement character classing appropriate to the implementation's
+ native character set. </p>
+</blockquote>
+
+<p>However, Section 22.2.1.3 [facet.ctype.special]
+only has a detailed description of the ctype&lt;char&gt; specialization, not the
+ctype&lt;wchar_t&gt; specialization. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the ctype&lt;wchar_t&gt; detailed class description to Section
+22.2.1.3 [facet.ctype.special]. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Specialization for wchar_t is not needed since the default is acceptable.</p>
+
+
+
+
+
+<hr>
+<h3><a name="128"></a>128. Need open_mode() function for file stream, string streams, file buffers, and string&nbsp; buffers</h3>
+<p><b>Section:</b> 27.7 [string.streams], 27.8 [file.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-02-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The following question came from Thorsten Herlemann:</p>
+
+<blockquote>
+ <p>You can set a mode when constructing or opening a file-stream or
+ filebuf, e.g. ios::in, ios::out, ios::binary, ... But how can I get
+ that mode later on, e.g. in my own operator &lt;&lt; or operator
+ &gt;&gt; or when I want to check whether a file-stream or
+ file-buffer object passed as parameter is opened for input or output
+ or binary? Is there no possibility? Is this a design-error in the
+ standard C++ library? </p>
+</blockquote>
+
+<p>It is indeed impossible to find out what a stream's or stream
+buffer's open mode is, and without that knowledge you don't know
+how certain operations behave. Just think of the append mode. </p>
+
+<p>Both streams and stream buffers should have a <tt>mode()</tt> function that returns the
+current open mode setting. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>For stream buffers, add a function to the base class as a non-virtual function
+qualified as const to 27.5.2 [streambuf]:</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>openmode mode() const</tt>;</p>
+
+<p><b>&nbsp;&nbsp;&nbsp; Returns</b> the current open mode.</p>
+
+<p>With streams, I'm not sure what to suggest. In principle, the mode
+could already be returned by <tt>ios_base</tt>, but the mode is only
+initialized for file and string stream objects, unless I'm overlooking
+anything. For this reason it should be added to the most derived
+stream classes. Alternatively, it could be added to <tt>basic_ios</tt>
+and would be default initialized in <tt>basic_ios&lt;&gt;::init()</tt>.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This might be an interesting extension for some future, but it is
+not a defect in the current standard. The Proposed Resolution is
+retained for future reference.</p>
+
+
+
+
+
+<hr>
+<h3><a name="131"></a>131. list::splice throws nothing</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>What happens if a splice operation causes the size() of a list to grow
+beyond max_size()?</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Size() cannot grow beyond max_size().&nbsp; </p>
+
+
+
+
+
+<hr>
+<h3><a name="135"></a>135. basic_iostream doubly initialized</h3>
+<p><b>Section:</b> 27.6.1.5.1 [iostream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>-1- Effects Constructs an object of class basic_iostream, assigning
+initial values to the base classes by calling
+basic_istream&lt;charT,traits&gt;(sb) (lib.istream) and
+basic_ostream&lt;charT,traits&gt;(sb) (lib.ostream)</p>
+
+<p>The called for basic_istream and basic_ostream constructors call
+init(sb). This means that the basic_iostream's virtual base class is
+initialized twice.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.6.1.5.1, paragraph 1 to:</p>
+
+<p>-1- Effects Constructs an object of class basic_iostream, assigning
+initial values to the base classes by calling
+basic_istream&lt;charT,traits&gt;(sb) (lib.istream).</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agreed that the <tt> init()</tt> function is called
+twice, but said that this is harmless and so not a defect in the
+standard.</p>
+
+
+
+
+<hr>
+<h3><a name="138"></a>138. Class ctype_byname&lt;char&gt; redundant and misleading</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 22.2.1.4 [locale.codecvt] specifies that
+ctype_byname&lt;char&gt; must be a specialization of the ctype_byname
+template.</p>
+
+<p>It is common practice in the standard that specializations of class templates are only
+mentioned where the interface of the specialization deviates from the interface of the
+template that it is a specialization of. Otherwise, the fact whether or not a required
+instantiation is an actual instantiation or a specialization is left open as an
+implementation detail. </p>
+
+<p>Clause 22.2.1.4 deviates from that practice and for that reason is misleading. The
+fact, that ctype_byname&lt;char&gt; is specified as a specialization suggests that there
+must be something "special" about it, but it has the exact same interface as the
+ctype_byname template. Clause 22.2.1.4 does not have any explanatory value, is at best
+redundant, at worst misleading - unless I am missing anything. </p>
+
+<p>Naturally, an implementation will most likely implement ctype_byname&lt;char&gt; as a
+specialization, because the base class ctype&lt;char&gt; is a specialization with an
+interface different from the ctype template, but that's an implementation detail and need
+not be mentioned in the standard. </p>
+
+
+<p><b>Rationale:</b></p>
+<p> The standard as written is mildly misleading, but the correct fix
+is to deal with the underlying problem in the ctype_byname base class,
+not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
+
+
+
+
+<hr>
+<h3><a name="140"></a>140. map&lt;Key, T&gt;::value_type does not satisfy the assignable requirement</h3>
+<p><b>Section:</b> 23.3.1 [map] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Mark Mitchell <b>Date:</b> 1999-04-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#map">issues</a> in [map].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<blockquote>
+ <p>23.1 [container.requirements]<br>
+ <br>
+ expression&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return type
+ &nbsp;&nbsp;&nbsp;&nbsp; pre/post-condition<br>
+ -------------&nbsp;&nbsp;&nbsp;&nbsp; ----------- &nbsp;&nbsp;&nbsp;&nbsp;
+ -------------------<br>
+ X::value_type&nbsp;&nbsp;&nbsp; T
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ T is assignable<br>
+ <br>
+ 23.3.1 [map]<br>
+ <br>
+ A map satisfies all the requirements of a container.<br>
+ <br>
+ For a map&lt;Key, T&gt; ... the value_type is pair&lt;const Key, T&gt;.</p>
+</blockquote>
+
+<p>There's a contradiction here. In particular, `pair&lt;const Key,
+T&gt;' is not assignable; the `const Key' cannot be assigned
+to. So,&nbsp; map&lt;Key, T&gt;::value_type does not satisfy the
+assignable requirement imposed by a container.</p>
+
+<p><i>[See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for the slightly related issue of
+modification of set keys.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that the standard is inconsistent, but that this
+is a design problem rather than a strict defect. May wish to
+reconsider for the next standard.</p>
+
+
+
+
+<hr>
+<h3><a name="143"></a>143. C .h header wording unclear</h3>
+<p><b>Section:</b> D.5 [depr.c.headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Christophe de Dinechin <b>Date:</b> 1999-05-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>[depr.c.headers] paragraph 2 reads:</p>
+
+<blockquote>
+
+<p>Each C header, whose name has the form name.h, behaves as if each
+name placed in the Standard library namespace by the corresponding
+cname header is also placed within the namespace scope of the
+namespace std and is followed by an explicit using-declaration
+(_namespace.udecl_)</p>
+
+</blockquote>
+
+<p>I think it should mention the global name space somewhere...&nbsp;
+Currently, it indicates that name placed in std is also placed in
+std...</p>
+
+<p>I don't know what is the correct wording. For instance, if struct
+tm is defined in time.h, ctime declares std::tm. However, the current
+wording seems ambiguous regarding which of the following would occur
+for use of both ctime and time.h:</p>
+
+<blockquote>
+ <pre>// version 1:
+namespace std {
+ struct tm { ... };
+}
+using std::tm;
+
+// version 2:
+struct tm { ... };
+namespace std {
+ using ::tm;
+}
+
+// version 3:
+struct tm { ... };
+namespace std {
+ struct tm { ... };
+}</pre>
+</blockquote>
+
+<p>I think version 1 is intended.</p>
+
+<p><i>[Kona: The LWG agreed that the wording is not clear. It also
+agreed that version 1 is intended, version 2 is not equivalent to
+version 1, and version 3 is clearly not intended. The example below
+was constructed by Nathan Myers to illustrate why version 2 is not
+equivalent to version 1.</i></p>
+
+<p><i>Although not equivalent, the LWG is unsure if (2) is enough of
+a problem to be prohibited. Points discussed in favor of allowing
+(2):</i></p>
+
+<blockquote>
+ <ul>
+ <li><i>It may be a convenience to implementors.</i></li>
+ <li><i>The only cases that fail are structs, of which the C library
+ contains only a few.</i></li>
+ </ul>
+</blockquote>
+
+<p><i>]</i></p>
+
+<p><b>Example:</b></p>
+
+<blockquote>
+
+<pre>#include &lt;time.h&gt;
+#include &lt;utility&gt;
+
+int main() {
+ std::tm * t;
+ make_pair( t, t ); // okay with version 1 due to Koenig lookup
+ // fails with version 2; make_pair not found
+ return 0;
+}</pre>
+
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Replace D.5 [depr.c.headers] paragraph 2 with:</p>
+
+<blockquote>
+
+<p> Each C header, whose name has the form name.h, behaves as if each
+name placed in the Standard library namespace by the corresponding
+cname header is also placed within the namespace scope of the
+namespace std by name.h and is followed by an explicit
+using-declaration (_namespace.udecl_) in global scope.</p>
+
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p> The current wording in the standard is the result of a difficult
+compromise that averted delay of the standard. Based on discussions
+in Tokyo it is clear that there is no still no consensus on stricter
+wording, so the issue has been closed. It is suggested that users not
+write code that depends on Koenig lookup of C library functions.</p>
+
+
+
+
+<hr>
+<h3><a name="145"></a>145. adjustfield lacks default value</h3>
+<p><b>Section:</b> 27.4.4.1 [basic.ios.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.cons">issues</a> in [basic.ios.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There is no initial value for the adjustfield defined, although
+many people believe that the default adjustment were right. This is a
+common misunderstanding. The standard only defines that, if no
+adjustment is specified, all the predefined inserters must add fill
+characters before the actual value, which is "as if" the
+right flag were set. The flag itself need not be set.</p>
+
+<p>When you implement a user-defined inserter you cannot rely on right
+being the default setting for the adjustfield. Instead, you must be
+prepared to find none of the flags set and must keep in mind that in
+this case you should make your inserter behave "as if" the
+right flag were set. This is surprising to many people and complicates
+matters more than necessary.</p>
+
+<p>Unless there is a good reason why the adjustfield should not be
+initialized I would suggest to give it the default value that
+everybody expects anyway.</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This is not a defect. It is deliberate that the default is no bits
+set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 [facet.num.put.virtuals] paragraph 19, Table 61 - Fill padding.</p>
+
+
+
+
+<hr>
+<h3><a name="149"></a>149. Insert should return iterator to first element inserted</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-06-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Suppose that c and c1 are sequential containers and i is an
+iterator that refers to an element of c. Then I can insert a copy of
+c1's elements into c ahead of element i by executing </p>
+
+<blockquote>
+
+<pre>c.insert(i, c1.begin(), c1.end());</pre>
+
+</blockquote>
+
+<p>If c is a vector, it is fairly easy for me to find out where the
+newly inserted elements are, even though i is now invalid: </p>
+
+<blockquote>
+
+<pre>size_t i_loc = i - c.begin();
+c.insert(i, c1.begin(), c1.end());</pre>
+
+</blockquote>
+
+<p>and now the first inserted element is at c.begin()+i_loc and one
+past the last is at c.begin()+i_loc+c1.size().<br>
+<br>
+But what if c is a list? I can still find the location of one past the
+last inserted element, because i is still valid. To find the location
+of the first inserted element, though, I must execute something like </p>
+
+<blockquote>
+
+<pre>for (size_t n = c1.size(); n; --n)
+ --i;</pre>
+
+</blockquote>
+
+<p>because i is now no longer a random-access iterator.<br>
+<br>
+Alternatively, I might write something like </p>
+
+<blockquote>
+
+<pre>bool first = i == c.begin();
+list&lt;T&gt;::iterator j = i;
+if (!first) --j;
+c.insert(i, c1.begin(), c1.end());
+if (first)
+ j = c.begin();
+else
+ ++j;</pre>
+
+</blockquote>
+
+<p>which, although wretched, requires less overhead.<br>
+<br>
+But I think the right solution is to change the definition of insert
+so that instead of returning void, it returns an iterator that refers
+to the first element inserted, if any, and otherwise is a copy of its
+first argument.&nbsp; </p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this was an intentional design decision and so is
+not a defect. It may be worth revisiting for the next standard.</p>
+
+
+
+
+<hr>
+<h3><a name="157"></a>157. Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt></h3>
+<p><b>Section:</b> 27.4.2.5 [ios.base.storage] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.storage">issues</a> in [ios.base.storage].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a></p>
+<p><b>Discussion:</b></p>
+<p>According to paragraphs 2 and 4 of 27.4.2.5 [ios.base.storage], the
+functions <tt>iword()</tt> and <tt>pword()</tt> "set the
+<tt>badbit</tt> (which might throw an exception)" on
+failure. ... but what does it mean for <tt>ios_base</tt> to set the
+<tt>badbit</tt>? The state facilities of the IOStream library are
+defined in <tt>basic_ios</tt>, a derived class! It would be possible
+to attempt a down cast but then it would be necessary to know the
+character type used...</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="162"></a>162. Really "formatted input functions"?</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
+<p><b>Discussion:</b></p>
+<p>It appears to be somewhat nonsensical to consider the functions
+defined in the paragraphs 1 to 5 to be "Formatted input
+function" but since these functions are defined in a section
+labeled "Formatted input functions" it is unclear to me
+whether these operators are considered formatted input functions which
+have to conform to the "common requirements" from 27.6.1.2.1
+[istream.formatted.reqmts]: If this is the case, all manipulators, not
+just
+<tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set
+(... but setting <tt>noskipws</tt> using the manipulator syntax would
+also skip whitespace :-)</p>
+
+<p>See also issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#166">166</a> for the same problem in formatted
+output</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="163"></a>163. Return of <tt>gcount()</tt> after a call to <tt>gcount</tt></h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
+<p><b>Discussion:</b></p>
+<p>It is not clear which functions are to be considered unformatted
+input functions. As written, it seems that all functions in 27.6.1.3
+[istream.unformatted] are unformatted input functions. However, it does
+not
+really make much sense to construct a sentry object for
+<tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what
+happens to the <tt>gcount()</tt> if eg. <tt>gcount()</tt>,
+<tt>putback()</tt>, <tt>unget()</tt>, or <tt>sync()</tt> is called:
+These functions don't extract characters, some of them even
+"unextract" a character. Should this still be reflected in
+<tt>gcount()</tt>? Of course, it could be read as if after a call to
+<tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt> (the last
+unformatted input function, <tt>gcount()</tt>, didn't extract any
+character) and after a call to <tt>putback()</tt> <tt>gcount()</tt>
+returns <tt>-1</tt> (the last unformatted input function
+<tt>putback()</tt> did "extract" back into the
+stream). Correspondingly for <tt>unget()</tt>. Is this what is
+intended? If so, this should be clarified. Otherwise, a corresponding
+clarification should be used.</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="166"></a>166. Really "formatted output functions"?</h3>
+<p><b>Section:</b> 27.6.2.6.3 [ostream.inserters] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
+<p><b>Discussion:</b></p>
+<p>From 27.6.2.6.1 [ostream.formatted.reqmts] it appears that all the functions
+defined in 27.6.2.6.3 [ostream.inserters] have to construct a
+<tt>sentry</tt> object. Is this really intended?</p>
+
+<p>This is basically the same problem as issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#162">162</a> but
+for output instead of input.</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="177"></a>177. Complex operators cannot be explicitly instantiated</h3>
+<p><b>Section:</b> 26.3.6 [complex.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.ops">issues</a> in [complex.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>A user who tries to explicitly instantiate a complex non-member operator will
+get compilation errors. Below is a simplified example of the reason why. The
+problem is that iterator_traits cannot be instantiated on a non-pointer type
+like float, yet when the compiler is trying to decide which operator+ needs to
+be instantiated it must instantiate the declaration to figure out the first
+argument type of a reverse_iterator operator.</p>
+<pre>namespace std {
+template &lt;class Iterator&gt;
+struct iterator_traits
+{
+ typedef typename Iterator::value_type value_type;
+};
+
+template &lt;class T&gt; class reverse_iterator;
+
+// reverse_iterator operator+
+template &lt;class T&gt;
+reverse_iterator&lt;T&gt; operator+
+(typename iterator_traits&lt;T&gt;::difference_type, const reverse_iterator&lt;T&gt;&amp;);
+
+template &lt;class T&gt; struct complex {};
+
+// complex operator +
+template &lt;class T&gt;
+complex&lt;T&gt; operator+ (const T&amp; lhs, const complex&lt;T&gt;&amp; rhs)
+{ return complex&lt;T&gt;();}
+}
+
+// request for explicit instantiation
+template std::complex&lt;float&gt; std::operator+&lt;float&gt;(const float&amp;,
+ const std::complex&lt;float&gt;&amp;);</pre>
+<p>See also c++-stdlib reflector messages: lib-6814, 6815, 6816.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Implementors can make minor changes and the example will
+work. Users are not affected in any case.</p> <p>According to John
+Spicer, It is possible to explicitly instantiate these operators using
+different syntax: change "std::operator+&lt;float&gt;" to
+"std::operator+".</p>
+
+<p>The proposed resolution of issue 120 is that users will not be able
+to explicitly instantiate standard library templates. If that
+resolution is accepted then library implementors will be the only ones
+that will be affected by this problem, and they must use the indicated
+syntax.</p>
+
+
+
+
+<hr>
+<h3><a name="178"></a>178. Should clog and cerr initially be tied to cout?</h3>
+<p><b>Section:</b> 27.3.1 [narrow.stream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#narrow.stream.objects">issues</a> in [narrow.stream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 27.3.1 says "After the object cerr is initialized,
+cerr.flags() &amp; unitbuf is nonzero. Its state is otherwise the same as
+required for ios_base::init (lib.basic.ios.cons). It doesn't say
+anything about the the state of clog. So this means that calling
+cerr.tie() and clog.tie() should return 0 (see Table 89 for
+ios_base::init effects).
+</p>
+<p>
+Neither of the popular standard library implementations
+that I tried does this, they both tie cerr and clog
+to &amp;cout. I would think that would be what users expect.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The standard is clear as written.</p>
+<p>27.3.1/5 says that "After the object cerr is initialized, cerr.flags()
+&amp; unitbuf is nonzero. Its state is otherwise the same as required for
+ios_base::init (27.4.4.1)." Table 89 in 27.4.4.1, which gives the
+postconditions of basic_ios::init(), says that tie() is 0. (Other issues correct
+ios_base::init to basic_ios::init().)</p>
+
+
+
+
+<hr>
+<h3><a name="180"></a>180. Container member iterator arguments constness has unintended consequences</h3>
+<p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 1999-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It is the constness of the container which should control whether
+it can be modified through a member function such as erase(), not the
+constness of the iterators. The iterators only serve to give
+positioning information.</p>
+
+<p>Here's a simple and typical example problem which is currently very
+difficult or impossible to solve without the change proposed
+below.</p>
+
+<p>Wrap a standard container C in a class W which allows clients to
+find and read (but not modify) a subrange of (C.begin(), C.end()]. The
+only modification clients are allowed to make to elements in this
+subrange is to erase them from C through the use of a member function
+of W.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change all non-const iterator parameters of standard library
+container member functions to accept const_iterator parameters.
+Note that this change applies to all library clauses, including
+strings.</p>
+
+<p>For example, in 21.3.5.5 change:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>iterator erase(iterator p);</tt><br>
+<br>
+to:<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>iterator erase(const_iterator p);</tt>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The issue was discussed at length. It was generally agreed that 1)
+There is no major technical argument against the change (although
+there is a minor argument that some obscure programs may break), and
+2) Such a change would not break const correctness. The concerns about
+making the change were 1) it is user detectable (although only in
+boundary cases), 2) it changes a large number of signatures, and 3) it
+seems more of a design issue that an out-and-out defect.</p>
+
+<p>The LWG believes that this issue should be considered as part of a
+general review of const issues for the next revision of the
+standard. Also see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>.</p>
+
+
+
+
+<hr>
+<h3><a name="188"></a>188. valarray helpers missing augmented assignment operators</h3>
+<p><b>Section:</b> 26.5.2.6 [valarray.cassign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-08-15</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>26.5.2.6 defines augmented assignment operators
+valarray&lt;T&gt;::op=(const T&amp;), but fails to provide
+corresponding versions for the helper classes. Thus making the
+following illegal:</p>
+<blockquote>
+<pre>#include &lt;valarray&gt;
+
+int main()
+{
+std::valarray&lt;double&gt; v(3.14, 1999);
+
+v[99] *= 2.0; // Ok
+
+std::slice s(0, 50, 2);
+
+v[s] *= 2.0; // ERROR
+}</pre>
+</blockquote>
+<p>I can't understand the intent of that omission. It makes the
+valarray library less intuitive and less useful.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Although perhaps an unfortunate
+design decision, the omission is not a defect in the current
+standard.&nbsp; A future standard may wish to add the missing
+operators.</p>
+
+
+
+
+<hr>
+<h3><a name="190"></a>190. min() and max() functions should be std::binary_functions</h3>
+<p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Mark Rintoul <b>Date:</b> 1999-08-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Both std::min and std::max are defined as template functions. This
+is very different than the definition of std::plus (and similar
+structs) which are defined as function objects which inherit
+std::binary_function.<br>
+<br>
+ This lack of inheritance leaves std::min and std::max somewhat useless in standard library algorithms which require
+a function object that inherits std::binary_function.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Although perhaps an unfortunate design decision, the omission is not a defect
+in the current standard.&nbsp; A future standard may wish to consider additional
+function objects.</p>
+
+
+
+
+<hr>
+<h3><a name="191"></a>191. Unclear complexity for algorithms such as binary search</h3>
+<p><b>Section:</b> 25.3.3 [alg.binary.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1999-10-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.binary.search">issues</a> in [alg.binary.search].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The complexity of binary_search() is stated as "At most
+log(last-first) + 2 comparisons", which seems to say that the
+algorithm has logarithmic complexity. However, this algorithms is
+defined for forward iterators. And for forward iterators, the need to
+step element-by-element results into linear complexity. But such a
+statement is missing in the standard. The same applies to
+lower_bound(), upper_bound(), and equal_range().&nbsp;<br>
+<br>
+However, strictly speaking the standard contains no bug here. So this
+might considered to be a clarification or improvement.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The complexity is expressed in terms of comparisons, and that
+complexity can be met even if the number of iterators accessed is
+linear. Paragraph 1 already says exactly what happens to
+iterators.</p>
+
+
+
+
+<hr>
+<h3><a name="192"></a>192. a.insert(p,t) is inefficient and overconstrained</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
+<p><b>Discussion:</b></p>
+<p>As defined in 23.1.2, paragraph 7 (table 69), a.insert(p,t) suffers from
+several problems:</p>
+<table border="1" cellpadding="5">
+ <tbody><tr>
+ <td><b>expression</b></td>
+ <td><b>return type</b></td>
+ <td><b>pre/post-condition</b></td>
+ <td><b>complexity</b></td>
+ </tr>
+ <tr>
+ <td><tt>a.insert(p,t)</tt></td>
+ <td><tt>iterator</tt></td>
+ <td>inserts t if and only if there is no element with key equivalent to the key of
+ t in containers with unique keys; always inserts t in containers with equivalent
+ keys. always returns the iterator pointing to the element with key equivalent to
+ the key of t . iterator p is a hint pointing to where the insert should start to search.</td>
+ <td>logarithmic in general, but amortized constant if t is inserted right after p .</td>
+ </tr>
+</tbody></table>
+<p>1. For a container with unique keys, only logarithmic complexity is
+guaranteed if no element is inserted, even though constant complexity is always
+possible if p points to an element equivalent to t.</p>
+<p>2. For a container with equivalent keys, the amortized constant complexity
+guarantee is only useful if no key equivalent to t exists in the container.
+Otherwise, the insertion could occur in one of multiple locations, at least one
+of which would not be right after p.</p>
+<p>3. By guaranteeing amortized constant complexity only when t is inserted
+after p, it is impossible to guarantee constant complexity if t is inserted at
+the beginning of the container. Such a problem would not exist if amortized
+constant complexity was guaranteed if t is inserted before p, since there is
+always some p immediately before which an insert can take place.</p>
+<p>4. For a container with equivalent keys, p does not allow specification of
+where to insert the element, but rather only acts as a hint for improving
+performance. This negates the added functionality that p would provide if it
+specified where within a sequence of equivalent keys the insertion should occur.
+Specifying the insert location provides more control to the user, while
+providing no disadvantage to the container implementation.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.1.2 [associative.reqmts] paragraph 7, replace the row in table 69
+for a.insert(p,t) with the following two rows:</p>
+<table border="1" cellpadding="5">
+ <tbody><tr>
+ <td><b>expression</b></td>
+ <td><b>return type</b></td>
+ <td><b>pre/post-condition</b></td>
+ <td><b>complexity</b></td>
+ </tr>
+ <tr>
+ <td><tt>a_uniq.insert(p,t)</tt></td>
+ <td><tt>iterator</tt></td>
+ <td>inserts t if and only if there is no element with key equivalent to the
+ key of t. returns the iterator pointing to the element with key equivalent
+ to the key of t.</td>
+ <td>logarithmic in general, but amortized constant if t is inserted right
+ before p or p points to an element with key equivalent to t.</td>
+ </tr>
+ <tr>
+ <td><tt>a_eq.insert(p,t)</tt></td>
+ <td><tt>iterator</tt></td>
+ <td>inserts t and returns the iterator pointing to the newly inserted
+ element. t is inserted right before p if doing so preserves the container
+ ordering.</td>
+ <td>logarithmic in general, but amortized constant if t is inserted right
+ before p.</td>
+ </tr>
+</tbody></table>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Too big a change.&nbsp; Furthermore, implementors report checking
+both before p and after p, and don't want to change this behavior.</p>
+
+
+
+
+
+<hr>
+<h3><a name="194"></a>194. rdbuf() functions poorly specified</h3>
+<p><b>Section:</b> 27.4.4 [ios] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1999-09-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In classic iostreams, base class ios had an rdbuf function that returned a
+pointer to the associated streambuf. Each derived class had its own rdbuf
+function that returned a pointer of a type reflecting the actual type derived
+from streambuf. Because in ARM C++, virtual function overrides had to have the
+same return type, rdbuf could not be virtual.</p>
+<p>In standard iostreams, we retain the non-virtual rdbuf function design, and
+in addition have an overloaded rdbuf function that sets the buffer pointer.
+There is no need for the second function to be virtual nor to be implemented in
+derived classes.</p>
+<p>Minor question: Was there a specific reason not to make the original rdbuf
+function virtual?</p>
+<p>Major problem: Friendly compilers warn about functions in derived classes
+that hide base-class overloads. Any standard implementation of iostreams will
+result in such a warning on each of the iostream classes, because of the
+ill-considered decision to overload rdbuf only in a base class.</p>
+<p>In addition, users of the second rdbuf function must use explicit
+qualification or a cast to call it from derived classes. An explicit
+qualification or cast to basic_ios would prevent access to any later overriding
+version if there was one.</p>
+<p>What I'd like to do in an implementation is add a using- declaration for the
+second rdbuf function in each derived class. It would eliminate warnings about
+hiding functions, and would enable access without using explicit qualification.
+Such a change I don't think would change the behavior of any valid program, but
+would allow invalid programs to compile:</p>
+<blockquote>
+ <pre> filebuf mybuf;
+ fstream f;
+ f.rdbuf(mybuf); // should be an error, no visible rdbuf</pre>
+</blockquote>
+<p>I'd like to suggest this problem as a defect, with the proposed resolution to
+require the equivalent of a using-declaration for the rdbuf function that is not
+replaced in a later derived class. We could discuss whether replacing the
+function should be allowed.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>For historical reasons, the standard is correct as written. There is a subtle difference between the base
+class <tt> rdbuf()</tt> and derived class <tt>rdbuf()</tt>. The derived
+class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base class
+<tt> rdbuf()</tt> will return the "current streambuf" if that has been changed by the variant you mention.</p>
+
+<p>Permission is not required to add such an extension. See
+17.4.4.4 [member.functions].</p>
+
+
+
+
+<hr>
+<h3><a name="196"></a>196. Placement new example has alignment problems</h3>
+<p><b>Section:</b> 18.5.1.3 [new.delete.placement] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Herb Sutter <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.placement">issues</a> in [new.delete.placement].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a></p>
+<p><b>Discussion:</b></p>
+<p>The example in 18.5.1.3 [new.delete.placement] paragraph 4 reads: </p>
+
+<blockquote>
+
+<p>[Example: This can be useful for constructing an object at a known address:<br>
+<br>
+<tt>&nbsp;&nbsp; char place[sizeof(Something)];<br>
+&nbsp;&nbsp; Something* p = new (place) Something();<br>
+<br>
+</tt>end example] </p>
+
+</blockquote>
+
+<p>This example has potential alignment problems. </p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="197"></a>197. max_size() underspecified</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements], 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-10-21</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Must the value returned by max_size() be unchanged from call to call? </p>
+
+<p>Must the value returned from max_size() be meaningful? </p>
+
+<p>Possible meanings identified in lib-6827: </p>
+
+<p>1) The largest container the implementation can support given "best
+case" conditions - i.e. assume the run-time platform is "configured to
+the max", and no overhead from the program itself. This may possibly
+be determined at the point the library is written, but certainly no
+later than compile time.<br>
+<br>
+2) The largest container the program could create, given "best case"
+conditions - i.e. same platform assumptions as (1), but take into
+account any overhead for executing the program itself. (or, roughly
+"storage=storage-sizeof(program)"). This does NOT include any resource
+allocated by the program. This may (or may not) be determinable at
+compile time.<br>
+<br>
+3) The largest container the current execution of the program could
+create, given knowledge of the actual run-time platform, but again,
+not taking into account any currently allocated resource. This is
+probably best determined at program start-up.<br>
+<br>
+4) The largest container the current execution program could create at
+the point max_size() is called (or more correctly at the point
+max_size() returns :-), given it's current environment (i.e. taking
+into account the actual currently available resources). This,
+obviously, has to be determined dynamically each time max_size() is
+called. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>max_size() isn't useful for very many things, and the existing
+ wording is sufficiently clear for the few cases that max_size() can
+ be used for. None of the attempts to change the existing wording
+ were an improvement.</p>
+
+<p>It is clear to the LWG that the value returned by max_size() can't
+ change from call to call.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="203"></a>203. basic_istream::sentry::sentry() is uninstantiable with ctype&lt;user-defined type&gt;</h3>
+<p><b>Section:</b> 27.6.1.1.3 [istream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt McClure and Dietmar Kühl <b>Date:</b> 2000-01-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::sentry">issues</a> in [istream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.6.1.1.2 Paragraph 4 states:</p>
+<blockquote>
+ <p>To decide if the character c is a whitespace character, the constructor
+ performs ''as if'' it executes the following code fragment:&nbsp;</p>
+ <pre>const ctype&lt;charT&gt;&amp; ctype = use_facet&lt;ctype&lt;charT&gt; &gt;(is.getloc());
+if (ctype.is(ctype.space,c)!=0)
+// c is a whitespace character.</pre>
+</blockquote>
+
+<p> But Table 51 in 22.1.1.1.1 only requires an implementation to
+provide specializations for ctype&lt;char&gt; and
+ctype&lt;wchar_t&gt;. If sentry's constructor is implemented using
+ctype, it will be uninstantiable for a user-defined character type
+charT, unless the implementation has provided non-working (since it
+would be impossible to define a correct ctype&lt;charT&gt; specialization
+for an arbitrary charT) definitions of ctype's virtual member
+functions.</p>
+
+<p>
+It seems the intent the standard is that sentry should behave, in
+every respect, not just during execution, as if it were implemented
+using ctype, with the burden of providing a ctype specialization
+falling on the user. But as it is written, nothing requires the
+translation of sentry's constructor to behave as if it used the above
+code, and it would seem therefore, that sentry's constructor should be
+instantiable for all character types.
+</p>
+
+<p>
+Note: If I have misinterpreted the intent of the standard with
+respect to sentry's constructor's instantiability, then a note should
+be added to the following effect:
+</p>
+
+<blockquote><p>
+An implementation is forbidden from using the above code if it renders
+the constructor uninstantiable for an otherwise valid character
+type.
+</p></blockquote>
+
+<p>In any event, some clarification is needed.</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>It is possible but not easy to instantiate on types other than char
+or wchar_t; many things have to be done first. That is by intention
+and is not a defect.</p>
+
+
+
+
+<hr>
+<h3><a name="204"></a>204. distance(first, last) when "last" is before "first"</h3>
+<p><b>Section:</b> 24.3.4 [iterator.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Rintala Matti <b>Date:</b> 2000-01-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 24.3.4 describes the function distance(first, last) (where first and
+last are iterators) which calculates "the number of increments or
+decrements needed to get from 'first' to 'last'".</p>
+<p>The function should work for forward, bidirectional and random access
+iterators, and there is a requirement 24.3.4.5 which states that "'last'
+must be reachable from 'first'".</p>
+<p>With random access iterators the function is easy to implement as "last
+- first".</p>
+<p>With forward iterators it's clear that 'first' must point to a place before
+'last', because otherwise 'last' would not be reachable from 'first'.</p>
+<p>But what about bidirectional iterators? There 'last' is reachable from
+'first' with the -- operator even if 'last' points to an earlier position than
+'first'. However, I cannot see how the distance() function could be implemented
+if the implementation does not know which of the iterators points to an earlier
+position (you cannot use ++ or -- on either iterator if you don't know which
+direction is the "safe way to travel").</p>
+<p>The paragraph 24.3.4.1 states that "for ... bidirectional iterators they
+use ++ to provide linear time implementations". However, the ++ operator is
+not mentioned in the reachability requirement. Furthermore 24.3.4.4 explicitly
+mentions that distance() returns the number of increments _or decrements_,
+suggesting that it could return a negative number also for bidirectional
+iterators when 'last' points to a position before 'first'.</p>
+<p>Is a further requirement is needed to state that for forward and
+bidirectional iterators "'last' must be reachable from 'first' using the ++
+operator". Maybe this requirement might also apply to random access
+iterators so that distance() would work the same way for every iterator
+category?</p>
+
+
+<p><b>Rationale:</b></p>
+<p>"Reachable" is defined in the standard in 24.1 [iterator.requirements] paragraph 6.
+The definition is only in terms of operator++(). The LWG sees no defect in
+the standard.</p>
+
+
+
+
+<hr>
+<h3><a name="205"></a>205. numeric_limits unclear on how to determine floating point types</h3>
+<p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-01-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In several places in 18.2.1.2 [numeric.limits.members], a member is
+described as "Meaningful for all floating point types."
+However, no clear method of determining a floating point type is
+provided.</p>
+
+<p>In 18.2.1.5 [numeric.special], paragraph 1 states ". . . (for
+example, epsilon() is only meaningful if is_integer is
+false). . ." which suggests that a type is a floating point type
+if is_specialized is true and is_integer is false; however, this is
+unclear.</p>
+
+<p>When clarifying this, please keep in mind this need of users: what
+exactly is the definition of floating point? Would a fixed point or
+rational representation be considered one? I guess my statement here
+is that there could also be types that are neither integer or
+(strictly) floating point.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>It is up to the implementor of a user define type to decide if it is a
+floating point type.</p>
+
+
+
+
+<hr>
+<h3><a name="207"></a>207. ctype&lt;char&gt; members return clause incomplete</h3>
+<p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Robert Klarer <b>Date:</b> 1999-11-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a></p>
+<p><b>Discussion:</b></p>
+<p>
+The <tt>widen</tt> and <tt>narrow</tt> member functions are described
+in 22.2.1.3.2, paragraphs 9-11. In each case we have two overloaded
+signatures followed by a <b>Returns</b> clause. The <b>Returns</b>
+clause only describes one of the overloads.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members]
+paragraph 10 from:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
+
+<p>to:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to),
+respectively.</p>
+
+<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 11
+from:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(low, high, to).</p>
+
+<p>to:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(c) or do_narrow(low, high, to),
+respectively.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>, which addresses the same
+paragraphs.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="213"></a>213. Math function overloads ambiguous</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Due to the additional overloaded versions of numeric functions for
+float and long double according to Section 26.5, calls such as int x;
+std::pow (x, 4) are ambiguous now in a standard conforming
+implementation. Current implementations solve this problem very
+different (overload for all types, don't overload for float and long
+double, use preprocessor, follow the standard and get
+ambiguities).</p> <p>This behavior should be standardized or at least
+identified as implementation defined.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>These math issues are an
+understood and accepted consequence of the design. They have
+been discussed several times in the past. Users must write casts
+or write floating point expressions as arguments.</p>
+
+
+
+
+<hr>
+<h3><a name="215"></a>215. Can a map's key_type be const?</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>A user noticed that this doesn't compile with the Rogue Wave library because
+the rb_tree class declares a key_allocator, and allocator&lt;const int&gt; is
+not legal, I think:</p>
+<blockquote>
+ <pre>map &lt; const int, ... &gt; // legal?</pre>
+</blockquote>
+<p>which made me wonder whether it is legal for a map's key_type to be const. In
+email from Matt Austern he said:</p>
+<blockquote>
+<p>I'm not sure whether it's legal to declare a map with a const key type. I
+hadn't thought about that question until a couple weeks ago. My intuitive
+feeling is that it ought not to be allowed, and that the standard ought to say
+so. It does turn out to work in SGI's library, though, and someone in the
+compiler group even used it. Perhaps this deserves to be written up as an issue
+too.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The "key is assignable" requirement from table 69 in
+23.1.2 [associative.reqmts] already implies the key cannot be const.</p>
+
+
+
+
+<hr>
+<h3><a name="216"></a>216. setbase manipulator description flawed</h3>
+<p><b>Section:</b> 27.6.3 [std.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Hyman Rosen <b>Date:</b> 2000-02-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#std.manip">issues</a> in [std.manip].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a></p>
+<p><b>Discussion:</b></p>
+<p>27.6.3 [std.manip] paragraph 5 says:</p>
+<blockquote>
+<pre>smanip setbase(int base);</pre>
+<p> Returns: An object s of unspecified type such that if out is an
+(instance of) basic_ostream then the expression out&lt;&lt;s behaves
+as if f(s) were called, in is an (instance of) basic_istream then the
+expression in&gt;&gt;s behaves as if f(s) were called. Where f can be
+defined as:</p>
+<pre>ios_base&amp; f(ios_base&amp; str, int base)
+{
+ // set basefield
+ str.setf(n == 8 ? ios_base::oct :
+ n == 10 ? ios_base::dec :
+ n == 16 ? ios_base::hex :
+ ios_base::fmtflags(0), ios_base::basefield);
+ return str;
+}</pre>
+</blockquote>
+<p>There are two problems here. First, f takes two parameters, so the
+description needs to say that out&lt;&lt;s and in&gt;&gt;s behave as if f(s,base)
+had been called. Second, f is has a parameter named base, but is written as if
+the parameter was named n.</p>
+<p>Actually, there's a third problem. The paragraph has grammatical errors.
+There needs to be an "and" after the first comma, and the "Where
+f" sentence fragment needs to be merged into its preceding sentence. You
+may also want to format the function a little better. The formatting above is
+more-or-less what the Standard contains.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The resolution of this defect is subsumed by the proposed resolution for
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a>.</p>
+
+<p><i>[Tokyo: The LWG agrees that this is a defect and notes that it
+occurs additional places in the section, all requiring fixes.]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="218"></a>218. Algorithms do not use binary predicate objects for default comparisons</h3>
+<p><b>Section:</b> 25.3 [alg.sorting] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.sorting">issues</a> in [alg.sorting].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Many of the algorithms take an argument, pred, of template parameter type
+BinaryPredicate or an argument comp of template parameter type Compare. These
+algorithms usually have an overloaded version that does not take the predicate
+argument. In these cases pred is usually replaced by the use of operator== and
+comp is replaced by the use of operator&lt;.</p>
+<p>This use of hard-coded operators is inconsistent with other parts of the
+library, particularly the containers library, where equality is established
+using equal_to&lt;&gt; and ordering is established using less&lt;&gt;. Worse,
+the use of operator&lt;, would cause the following innocent-looking code to have
+undefined behavior:</p>
+<blockquote>
+ <pre>vector&lt;string*&gt; vec;
+sort(vec.begin(), vec.end());</pre>
+</blockquote>
+<p>The use of operator&lt; is not defined for pointers to unrelated objects. If
+std::sort used less&lt;&gt; to compare elements, then the above code would be
+well-defined, since less&lt;&gt; is explicitly specialized to produce a total
+ordering of pointers.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This use of operator== and operator&lt; was a very deliberate, conscious, and
+explicitly made design decision; these operators are often more efficient. The
+predicate forms are available for users who don't want to rely on operator== and
+operator&lt;.</p>
+
+
+
+
+<hr>
+<h3><a name="219"></a>219. find algorithm missing version that takes a binary predicate argument</h3>
+<p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find">issues</a> in [alg.find].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The find function always searches for a value using operator== to compare the
+value argument to each element in the input iterator range. This is inconsistent
+with other find-related functions such as find_end and find_first_of, which
+allow the caller to specify a binary predicate object to be used for determining
+equality. The fact that this can be accomplished using a combination of find_if
+and bind_1st or bind_2nd does not negate the desirability of a consistent,
+simple, alternative interface to find.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<blockquote>
+<p>In section 25.1.2 [alg.find], add a second prototype for find
+(between the existing prototype and the prototype for find_if), as
+follows:</p>
+<pre> template&lt;class InputIterator, class T, class BinaryPredicate&gt;
+ InputIterator find(InputIterator first, InputIterator last,
+ const T&amp; value, BinaryPredicate bin_pred);</pre>
+<p>Change the description of the return from:</p>
+<blockquote>
+ <p>Returns: The first iterator i in the range [first, last) for which the following corresponding
+ conditions hold: *i == value, pred(*i) != false. Returns last if no such iterator is found.</p>
+</blockquote>
+<p>&nbsp;to:</p>
+<blockquote>
+ <p>Returns: The first iterator i in the range [first, last) for which the following&nbsp;
+ corresponding condition holds: *i == value, bin_pred(*i,value) != false, pred(*)
+ != false. Return last if no such iterator is found.</p>
+</blockquote>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>This is request for a pure extension, so it is not a defect in the
+current standard.&nbsp; As the submitter pointed out, "this can
+be accomplished using a combination of find_if and bind_1st or
+bind_2nd".</p>
+
+
+
+
+<hr>
+<h3><a name="236"></a>236. ctype&lt;char&gt;::is() member modifies facet</h3>
+<p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a></p>
+<p><b>Discussion:</b></p>
+<p>The description of the <tt>is()</tt> member in paragraph 4 of 22.2.1.3.2 [facet.ctype.char.members] is broken: According to this description, the
+second form of the <tt>is()</tt> method modifies the masks in the
+<tt>ctype</tt> object. The correct semantics if, of course, to obtain
+an array of masks. The corresponding method in the general case,
+ie. the <tt>do_is()</tt> method as described in 22.2.1.1.2 [locale.ctype.virtuals] paragraph 1 does the right thing.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>Change paragraph 4 from</p>
+ <blockquote><p>
+ The second form, for all *p in the range [low, high), assigns
+ vec[p-low] to table()[(unsigned char)*p].
+ </p></blockquote>
+ <p>to become</p>
+ <blockquote><p>
+ The second form, for all *p in the range [low, high), assigns
+ table()[(unsigned char)*p] to vec[p-low].
+ </p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="244"></a>244. Must <tt>find</tt>'s third argument be CopyConstructible?</h3>
+<p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find">issues</a> in [alg.find].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Is the following implementation of <tt>find</tt> acceptable?</p>
+
+<pre> template&lt;class Iter, class X&gt;
+ Iter find(Iter begin, Iter end, const X&amp; x)
+ {
+ X x1 = x; // this is the crucial statement
+ while (begin != end &amp;&amp; *begin != x1)
+ ++begin;
+ return begin;
+ }
+</pre>
+
+<p>If the answer is yes, then it is implementation-dependent as to
+whether the following fragment is well formed:</p>
+
+<pre> vector&lt;string&gt; v;
+
+ find(v.begin(), v.end(), "foo");
+</pre>
+
+<p>At issue is whether there is a requirement that the third argument
+of find be CopyConstructible. There may be no problem here, but
+analysis is necessary.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>There is no indication in the standard that find's third argument
+is required to be Copy Constructible. The LWG believes that no such
+requirement was intended. As noted above, there are times when a user
+might reasonably pass an argument that is not Copy Constructible.</p>
+
+
+
+
+<hr>
+<h3><a name="245"></a>245. Which operations on <tt>istream_iterator</tt> trigger input operations?</h3>
+<p><b>Section:</b> 24.5.1 [istream.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>I do not think the standard specifies what operation(s) on istream
+iterators trigger input operations. So, for example:</p>
+
+<pre> istream_iterator&lt;int&gt; i(cin);
+
+ int n = *i++;
+</pre>
+
+<p>I do not think it is specified how many integers have been read
+from cin. The number must be at least 1, of course, but can it be 2?
+More?</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The standard is clear as written: the stream is read every time
+operator++ is called, and it is also read either when the iterator is
+constructed or when operator* is called for the first time. In the
+example above, exactly two integers are read from cin.</p>
+
+<p>There may be a problem with the interaction between istream_iterator
+and some STL algorithms, such as find. There are no guarantees about
+how many times find may invoke operator++.</p>
+
+
+
+
+<hr>
+<h3><a name="246"></a>246. <tt>a.insert(p,t)</tt> is incorrectly specified</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Mark Rodgers <b>Date:</b> 2000-05-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
+<p><b>Discussion:</b></p>
+<p>Closed issue 192 raised several problems with the specification of
+this function, but was rejected as Not A Defect because it was too big
+a change with unacceptable impacts on existing implementations.
+However, issues remain that could be addressed with a smaller change
+and with little or no consequent impact.</p>
+
+<ol>
+ <li><p> The specification is inconsistent with the original
+ proposal and with several implementations.</p>
+
+ <p>The initial implementation by Hewlett Packard only ever looked
+ immediately <i>before</i> p, and I do not believe there was any
+ intention to standardize anything other than this behavior.
+ Consequently, current implementations by several leading
+ implementors also look immediately before p, and will only insert
+ after p in logarithmic time. I am only aware of one implementation
+ that does actually look after p, and it looks before p as well. It
+ is therefore doubtful that existing code would be relying on the
+ behavior defined in the standard, and it would seem that fixing
+ this defect as proposed below would standardize existing
+ practice.</p></li>
+
+ <li><p>
+ The specification is inconsistent with insertion for sequence
+ containers.</p>
+
+ <p>This is difficult and confusing to teach to newcomers. All
+ insert operations that specify an iterator as an insertion location
+ should have a consistent meaning for the location represented by
+ that iterator.</p></li>
+
+ <li><p> As specified, there is no way to hint that the insertion
+ should occur at the beginning of the container, and the way to hint
+ that it should occur at the end is long winded and unnatural.</p>
+
+ <p>For a container containing n elements, there are n+1 possible
+ insertion locations and n+1 valid iterators. For there to be a
+ one-to-one mapping between iterators and insertion locations, the
+ iterator must represent an insertion location immediately before
+ the iterator.</p></li>
+
+ <li><p> When appending sorted ranges using insert_iterators,
+ insertions are guaranteed to be sub-optimal.</p>
+
+ <p>In such a situation, the optimum location for insertion is
+ always immediately after the element previously inserted. The
+ mechanics of the insert iterator guarantee that it will try and
+ insert after the element after that, which will never be correct.
+ However, if the container first tried to insert before the hint,
+ all insertions would be performed in amortized constant
+ time.</p></li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.1.2 [lib.associative.reqmts] paragraph 7, table 69, make
+the following changes in the row for a.insert(p,t):</p>
+
+<p><i>assertion/note pre/post condition:</i>
+<br>Change the last sentence from</p>
+ <blockquote><p>
+ "iterator p is a hint pointing to where the insert should
+ start to search."
+ </p></blockquote>
+<p>to</p>
+ <blockquote><p>
+ "iterator p is a hint indicating that immediately before p
+ may be a correct location where the insertion could occur."
+ </p></blockquote>
+
+<p><i>complexity:</i><br>
+Change the words "right after" to "immediately before".</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+<hr>
+<h3><a name="249"></a>249. Return Type of <tt>auto_ptr::operator=</tt></h3>
+<p><b>Section:</b> D.9.1 [auto.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Joseph Gottman <b>Date:</b> 2000-06-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#auto.ptr">issues</a> in [auto.ptr].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>According to section 20.4.5, the function
+<tt>auto_ptr::operator=()</tt> returns a reference to an auto_ptr.
+The reason that <tt>operator=()</tt> usually returns a reference is to
+facilitate code like</p>
+
+<pre> int x,y,z;
+ x = y = z = 1;
+</pre>
+
+<p>However, given analogous code for <tt>auto_ptr</tt>s,</p>
+<pre> auto_ptr&lt;int&gt; x, y, z;
+ z.reset(new int(1));
+ x = y = z;
+</pre>
+
+<p>the result would be that <tt>z</tt> and <tt>y</tt> would both be set to
+NULL, instead of all the <tt>auto_ptr</tt>s being set to the same value.
+This makes such cascading assignments useless and counterintuitive for
+<tt>auto_ptr</tt>s.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change <tt>auto_ptr::operator=()</tt> to return <tt>void</tt> instead
+of an <tt>auto_ptr</tt> reference.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The return value has uses other than cascaded assignments: a user can
+call an auto_ptr member function, pass the auto_ptr to a
+function, etc. Removing the return value could break working user
+code.</p>
+
+
+
+
+<hr>
+<h3><a name="257"></a>257. STL functional object and iterator inheritance.</h3>
+<p><b>Section:</b> 20.5.3 [base], 24.3.2 [iterator.basic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Robert Dick <b>Date:</b> 2000-08-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to the November 1997 Draft Standard, the results of deleting an
+object of a derived class through a pointer to an object of its base class are
+undefined if the base class has a non-virtual destructor. Therefore, it is
+potentially dangerous to publicly inherit from such base classes.
+</p>
+
+<p>Defect:
+<br>
+The STL design encourages users to publicly inherit from a number of classes
+which do nothing but specify interfaces, and which contain non-virtual
+destructors.
+</p>
+
+<p>Attribution:
+<br>
+Wil Evers and William E. Kempf suggested this modification for functional
+objects.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+When a base class in the standard library is useful only as an interface
+specifier, i.e., when an object of the class will never be directly
+instantiated, specify that the class contains a protected destructor. This
+will prevent deletion through a pointer to the base class without performance,
+or space penalties (on any implementation I'm aware of).
+</p>
+
+<p>
+As an example, replace...
+</p>
+
+<pre> template &lt;class Arg, class Result&gt;
+ struct unary_function {
+ typedef Arg argument_type;
+ typedef Result result_type;
+ };
+</pre>
+
+<p>
+... with...
+</p>
+
+<pre> template &lt;class Arg, class Result&gt;
+ struct unary_function {
+ typedef Arg argument_type;
+ typedef Result result_type;
+ protected:
+ ~unary_function() {}
+ };
+</pre>
+
+<p>
+Affected definitions:
+<br>
+ &nbsp;20.3.1 [lib.function.objects] -- unary_function, binary_function
+ <br>
+ &nbsp;24.3.2 [lib.iterator.basic] -- iterator
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+The standard is clear as written; this is a request for change, not a
+defect in the strict sense. The LWG had several different objections
+to the proposed change. One is that it would prevent users from
+creating objects of type <tt>unary_function</tt> and
+<tt>binary_function</tt>. Doing so can sometimes be legitimate, if users
+want to pass temporaries as traits or tag types in generic code.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="267"></a>267. interaction of strstreambuf::overflow() and seekoff()</h3>
+<p><b>Section:</b> D.7.1.3 [depr.strstreambuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.strstreambuf.virtuals">issues</a> in [depr.strstreambuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It appears that the interaction of the strstreambuf members overflow()
+and seekoff() can lead to undefined behavior in cases where defined
+behavior could reasonably be expected. The following program
+demonstrates this behavior:
+</p>
+
+<pre> #include &lt;strstream&gt;
+
+ int main ()
+ {
+ std::strstreambuf sb;
+ sb.sputc ('c');
+
+ sb.pubseekoff (-1, std::ios::end, std::ios::in);
+ return !('c' == sb.sgetc ());
+ }
+</pre>
+
+<p>
+D.7.1.1, p1 initializes strstreambuf with a call to basic_streambuf&lt;&gt;(),
+which in turn sets all pointers to 0 in 27.5.2.1, p1.
+</p>
+
+<p>
+27.5.2.2.5, p1 says that basic_streambuf&lt;&gt;::sputc(c) calls
+overflow(traits::to_int_type(c)) if a write position isn't available (it
+isn't due to the above).
+</p>
+
+<p>
+D.7.1.3, p3 says that strstreambuf::overflow(off, ..., ios::in) makes at
+least one write position available (i.e., it allows the function to make
+any positive number of write positions available).
+</p>
+
+<p>
+D.7.1.3, p13 computes newoff = seekhigh - eback(). In D.7.1, p4 we see
+seekhigh = epptr() ? epptr() : egptr(), or seekhigh = epptr() in this
+case. newoff is then epptr() - eback().
+</p>
+
+<p>
+D.7.1.4, p14 sets gptr() so that gptr() == eback() + newoff + off, or
+gptr() == epptr() + off holds.
+</p>
+
+<p>
+If strstreambuf::overflow() made exactly one write position available
+then gptr() will be set to just before epptr(), and the program will
+return 0. Buf if the function made more than one write position
+available, epptr() and gptr() will both point past pptr() and the
+behavior of the program is undefined.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+ <p>Change the last sentence of D.7.1 [depr.strstreambuf] paragraph 4 from</p>
+
+ <blockquote><p>
+ Otherwise, seeklow equals gbeg and seekhigh is either pend, if
+ pend is not a null pointer, or gend.
+ </p></blockquote>
+
+ <p>to become</p>
+
+ <blockquote><p>
+ Otherwise, seeklow equals gbeg and seekhigh is either gend if
+ 0 == pptr(), or pbase() + max where max is the maximum value of
+ pptr() - pbase() ever reached for this stream.
+ </p></blockquote>
+
+<p><i>[
+ pre-Copenhagen: Dietmar provided wording for proposed resolution.
+]</i></p>
+
+
+<p><i>[
+ post-Copenhagen: Fixed a typo: proposed resolution said to fix
+ 4.7.1, not D.7.1.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>This is related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>: it's not clear what it
+means to seek beyond the current area. Without resolving issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a> we can't resolve this. As with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>,
+the library working group does not wish to invest time nailing down
+corner cases in a deprecated feature.</p>
+
+
+
+
+
+<hr>
+<h3><a name="269"></a>269. cstdarg and unnamed parameters</h3>
+<p><b>Section:</b> 18.7 [support.exception] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> J. Stephen Adamczyk <b>Date:</b> 2000-10-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.exception">issues</a> in [support.exception].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+One of our customers asks whether this is valid C++:
+</p>
+
+<pre> #include &lt;cstdarg&gt;
+
+ void bar(const char *, va_list);
+
+ void
+ foo(const char *file, const char *, ...)
+ {
+ va_list ap;
+ va_start(ap, file);
+ bar(file, ap);
+ va_end(ap);
+ }
+</pre>
+
+<p>
+The issue being whether it is valid to use cstdarg when the final
+parameter before the "..." is unnamed. cstdarg is, as far
+as I can tell, inherited verbatim from the C standard. and the
+definition there (7.8.1.1 in the ISO C89 standard) refers to "the
+identifier of the rightmost parameter". What happens when there
+is no such identifier?
+</p>
+
+<p>
+My personal opinion is that this should be allowed, but some tweak
+might be required in the C++ standard.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Not a defect, the C and C++ standards are clear. It is impossible to
+use varargs if the parameter immediately before "..." has no
+name, because that is the parameter that must be passed to va_start.
+The example given above is broken, because va_start is being passed
+the wrong parameter.
+</p>
+
+<p>
+There is no support for extending varargs to provide additional
+functionality beyond what's currently there. For reasons of C/C++
+compatibility, it is especially important not to make gratuitous
+changes in this part of the C++ standard. The C committee has already
+been requested not to touch this part of the C standard unless
+necessary.
+</p>
+
+
+
+
+<hr>
+<h3><a name="277"></a>277. Normative encouragement in allocator requirements unclear</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-07</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 20.1.5, paragraph 5, the standard says that "Implementors are
+encouraged to supply libraries that can accept allocators that
+encapsulate more general memory models and that support non-equal
+instances." This is intended as normative encouragement to
+standard library implementors. However, it is possible to interpret
+this sentence as applying to nonstandard third-party libraries.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.1.5, paragraph 5, change "Implementors" to
+"Implementors of the library described in this International
+Standard".
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes the normative encouragement is already
+sufficiently clear, and that there are no important consequences
+even if it is misunderstood.</p>
+
+
+
+
+
+<hr>
+<h3><a name="279"></a>279. const and non-const iterators should have equivalent typedefs</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+This came from an email from Steve Cleary to Fergus in reference to
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
+this in Toronto and believes it should be a separate issue.
+</p>
+
+<p>
+Steve said: "We may want to state that the const/non-const iterators must have
+the same difference type, size_type, and category."
+</p>
+
+<p>
+(Comment from Judy)
+I'm not sure if the above sentence should be true for all
+const and non-const iterators in a particular container, or if it means
+the container's iterator can't be compared with the container's
+const_iterator unless the above it true. I suspect the former.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In <b>Section:</b> 23.1 [container.requirements],
+table 65, in the assertion/note pre/post condition for X::const_iterator,
+add the following:
+</p>
+
+<blockquote>
+<p>
+typeid(X::const_iterator::difference_type) == typeid(X::iterator::difference_type)
+</p>
+
+<p>
+typeid(X::const_iterator::size_type) == typeid(X::iterator::size_type)
+</p>
+
+<p>
+typeid(X::const_iterator::category) == typeid(X::iterator::category)
+</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Going through the types one by one: Iterators don't have a
+<tt>size_type</tt>. We already know that the difference types are
+identical, because the container requirements already say that the
+difference types of both X::iterator and X::const_iterator are both
+X::difference_type. The standard does not require that X::iterator
+and X::const_iterator have the same iterator category, but the LWG
+does not see this as a defect: it's possible to imagine cases in which
+it would be useful for the categories to be different.</p>
+
+<p>It may be desirable to require X::iterator and X::const_iterator to
+have the same value type, but that is a new issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#322">322</a>.)</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="287"></a>287. conflicting ios_base fmtflags</h3>
+<p><b>Section:</b> 27.4.2.2 [fmtflags.state] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fmtflags.state">issues</a> in [fmtflags.state].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The Effects clause for ios_base::setf(fmtflags fmtfl) says
+"Sets fmtfl in flags()". What happens if the user first calls
+ios_base::scientific and then calls ios_base::fixed or vice-versa?
+This is an issue for all of the conflicting flags, i.e. ios_base::left
+and ios_base::right or ios_base::dec, ios_base::hex and ios_base::oct.
+</p>
+
+<p>
+I see three possible solutions:
+</p>
+
+<ol>
+<li>Set ios_base::failbit whenever the user specifies a conflicting
+flag with one previously explicitly set. If the constructor is
+supposed to set ios_base::dec (see discussion below), then
+the user setting hex or oct format after construction will not
+set failbit. </li>
+<li>The last call to setf "wins", i.e. it clears any conflicting
+previous setting.</li>
+<li>All the flags that the user specifies are set, but when actually
+interpreting them, fixed always override scientific, right always
+overrides left, dec overrides hex which overrides oct.</li>
+</ol>
+
+<p>
+Most existing implementations that I tried seem to conform to resolution #3,
+except that when using the iomanip manipulator hex or oct then that always
+overrides dec, but calling setf(ios_base::hex) doesn't.
+</p>
+
+<p>
+There is a sort of related issue, which is that although the ios_base
+constructor says that each ios_base member has an indeterminate value
+after construction, all the existing implementations I tried explicitly set
+ios_base::dec.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+<tt>adjustfield</tt>, <tt>basefield</tt>, and <tt>floatfield</tt>
+are each multi-bit fields. It is possible to set multiple bits within
+each of those fields. (For example, <tt>dec</tt> and
+<tt>oct</tt>). These fields are used by locale facets. The LWG
+reviewed the way in which each of those three fields is used, and
+believes that in each case the behavior is well defined for any
+possible combination of bits. See for example Table 58, in 22.2.2.2.2
+[facet.num.put.virtuals], noting the requirement in paragraph 6 of that
+section.
+</p>
+<p>
+Users are advised to use manipulators, or else use the two-argument
+version of <tt>setf</tt>, to avoid unexpected behavior.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="289"></a>289. &lt;cmath&gt; requirements missing C float and long double versions</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+ In ISO/IEC 9899:1990 Programming Languages C we find the following
+ concerning &lt;math.h&gt;:
+</p>
+
+<blockquote><p>
+ 7.13.4 Mathematics &lt;math.h&gt;
+ <br>
+ The names of all existing functions declared in the &lt;math.h&gt;
+ header, suffixed with f or l, are reserved respectively for
+ corresponding functions with float and long double arguments
+ are return values.
+</p></blockquote>
+
+<p>
+ For example, <tt>float&nbsp;sinf(float)</tt>
+ is reserved.
+</p>
+
+<p>
+ In the C99 standard, &lt;math.h&gt; must contain declarations
+ for these functions.
+</p>
+
+<p>
+So, is it acceptable for an implementor to add these prototypes to the
+C++ versions of the math headers? Are they required?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add these Functions to Table 80, section 26.5 and to Table 99,
+section C.2:
+</p>
+
+<pre> acosf asinf atanf atan2f ceilf cosf coshf
+ expf fabsf floorf fmodf frexpf ldexpf
+ logf log10f modff powf sinf sinhf sqrtf
+ tanf tanhf
+ acosl asinl atanl atan2l ceill cosl coshl
+ expl fabsl floorl fmodl frexpl ldexpl
+ logl log10l modfl powl sinl sinhl sqrtl
+ tanl tanhl
+</pre>
+
+<p>
+There should probably be a note saying that these functions
+are optional and, if supplied, should match the description in
+the 1999 version of the C standard. In the next round
+of C++ standardization they can then become mandatory.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The C90 standard, as amended, already permits (but does not
+require) these functions, and the C++ standard incorporates the
+C90 standard by reference. C99 is not an issue, because it is
+never referred to by the C++ standard.</p>
+
+
+
+
+
+<hr>
+<h3><a name="293"></a>293. Order of execution in transform algorithm</h3>
+<p><b>Section:</b> 25.2.4 [alg.transform] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-04</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.transform">issues</a> in [alg.transform].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>This issue is related to issue 242. In case that the resolution
+proposed for issue 242 is accepted, we have have the following
+situation: The 4 numeric algorithms (accumulate and consorts) as well
+as transform would allow a certain category of side effects. The
+numeric algorithms specify that they invoke the functor "for
+every iterator i in the range [first, last) in order". transform,
+in contrast, would not give any guarantee regarding order of
+invocation of the functor, which means that the functor can be invoked
+in any arbitrary order.
+</p>
+
+<p>Why would that be a problem? Consider an example: say the
+transformator that is a simple enumerator ( or more generally
+speaking, "is order-sensitive" ). Since a standard
+compliant implementation of transform is free to invoke the enumerator
+in no definite order, the result could be a garbled enumeration.
+Strictly speaking this is not a problem, but it is certainly at odds
+with the prevalent understanding of transform as an algorithms that
+assigns "a new _corresponding_ value" to the output
+elements.
+</p>
+
+<p>All implementations that I know of invoke the transformator in
+definite order, namely starting from first and proceeding to last -
+1. Unless there is an optimization conceivable that takes advantage of
+the indefinite order I would suggest to specify the order, because it
+eliminate the uncertainty that users would otherwise have regarding
+the order of execution of their potentially order-sensitive function
+objects.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In section 25.2.3 - Transform [lib.alg.transform] change:</p>
+<blockquote><p>
+-1- Effects: Assigns through every iterator i in the range [result,
+result + (last1 - first1)) a new corresponding
+value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
+(i - result), *(first2 + (i - result))).
+</p></blockquote>
+<p>to:</p>
+<blockquote><p>
+-1- Effects: Computes values by invoking the operation op or binary_op
+for every iterator in the range [first1, last1) in order. Assigns through
+every iterator i in the range [result, result + (last1 - first1)) a new
+corresponding
+value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
+(i - result), *(first2 + (i - result))).
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>For Input Iterators an order is already guaranteed, because
+only one order is possible. If a user who passes a Forward
+Iterator to one of these algorithms really needs a specific
+order of execution, it's possible to achieve that effect by
+wrapping it in an Input Iterator adaptor.</p>
+
+
+
+
+
+<hr>
+<h3><a name="296"></a>296. Missing descriptions and requirements of pair operators</h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The synopsis of the header <tt>&lt;utility&gt;</tt> in 20.2 [utility]
+lists the complete set of equality and relational operators for <tt>pair</tt>
+but the section describing the template and the operators only describes
+<tt>operator==()</tt> and <tt>operator&lt;()</tt>, and it fails to mention
+any requirements on the template arguments. The remaining operators are
+not mentioned at all.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>20.2.1 [operators] paragraph 10 already specifies the semantics.
+That paragraph says that, if declarations of operator!=, operator&gt;,
+operator&lt;=, and operator&gt;= appear without definitions, they are
+defined as specified in 20.2.1 [operators]. There should be no user
+confusion, since that paragraph happens to immediately precede the
+specification of <tt>pair</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="302"></a>302. Need error indication from codecvt&lt;&gt;::do_length</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Gregory Bumgardner <b>Date:</b> 2001-01-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The effects of <tt>codecvt&lt;&gt;::do_length()</tt> are described in
+22.2.1.5.2, paragraph 10. As implied by that paragraph, and clarified
+in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#75">75</a>, <tt>codecvt&lt;&gt;::do_length()</tt> must
+process the source data and update the <tt>stateT</tt> argument just
+as if the data had been processed by <tt>codecvt&lt;&gt;::in()</tt>.
+However, the standard does not specify how <tt>do_length()</tt> would
+report a translation failure, should the source sequence contain
+untranslatable or illegal character sequences.
+</p>
+
+<p>
+The other conversion methods return an "error" result value
+to indicate that an untranslatable character has been encountered, but
+<tt>do_length()</tt> already has a return value (the number of source
+characters that have been processed by the method).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+This issue cannot be resolved without modifying the interface. An exception
+cannot be used, as there would be no way to determine how many characters
+have been processed and the state object would be left in an indeterminate
+state.
+</p>
+
+<p>
+A source compatible solution involves adding a fifth argument to length()
+and do_length() that could be used to return position of the offending
+character sequence. This argument would have a default value that would
+allow it to be ignored:
+</p>
+
+<pre> int length(stateT&amp; state,
+ const externT* from,
+ const externT* from_end,
+ size_t max,
+ const externT** from_next = 0);
+
+ virtual
+ int do_length(stateT&amp; state,
+ const externT* from,
+ const externT* from_end,
+ size_t max,
+ const externT** from_next);
+</pre>
+
+<p>
+Then an exception could be used to report any translation errors and
+the from_next argument, if used, could then be used to retrieve the
+location of the offending character sequence.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The standard is already clear: the return value is the number of
+"valid complete characters". If it encounters an invalid sequence of
+external characters, it stops.</p>
+
+
+
+
+
+<hr>
+<h3><a name="304"></a>304. Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-02-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+We all "know" that input iterators are allowed to produce
+values when dereferenced of which there is no other in-memory copy.
+</p>
+
+<p>
+But: Table 72, with a careful reading, seems to imply that this can only be
+the case if the value_type has no members (e.g. is a built-in type).
+</p>
+
+<p>The problem occurs in the following entry:</p>
+
+<pre> a-&gt;m pre: (*a).m is well-defined
+ Equivalent to (*a).m
+</pre>
+
+<p>
+<tt>*a.m</tt> can be well-defined if <tt>*a</tt> is not a reference
+type, but since <tt>operator-&gt;()</tt> must return a pointer for
+<tt>a-&gt;m</tt> to be well-formed, it needs something to return a
+pointer <i>to</i>. This seems to indicate that <tt>*a</tt> must be
+buffered somewhere to make a legal input iterator.
+</p>
+
+<p>I don't think this was intentional.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The current standard is clear and consistent. Input iterators that
+ return rvalues are in fact implementable. They may in some cases
+ require extra work, but it is still possible to define an operator-&gt;
+ in such cases: it doesn't have to return a T*, but may return a
+ proxy type. No change to the standard is justified.</p>
+
+
+
+
+
+<hr>
+<h3><a name="313"></a>313. set_terminate and set_unexpected question</h3>
+<p><b>Section:</b> 18.7.3.3 [terminate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2001-04-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#terminate">issues</a> in [terminate].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to section 18.7.3.3 of the standard, std::terminate() is
+supposed to call the terminate_handler in effect immediately after
+evaluating the throw expression.
+</p>
+
+<p>
+Question: what if the terminate_handler in effect is itself
+std::terminate?
+</p>
+
+<p>For example:</p>
+
+<pre> #include &lt;exception&gt;
+
+ int main () {
+ std::set_terminate(std::terminate);
+ throw 5;
+ return 0;
+ }
+</pre>
+
+<p>
+Is the implementation allowed to go into an infinite loop?
+</p>
+
+<p>
+I think the same issue applies to std::set_unexpected.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Infinite recursion is to be expected: users who set the terminate
+handler to <tt>terminate</tt> are explicitly asking for <tt>terminate</tt>
+to call itself.</p>
+
+
+
+
+
+<hr>
+<h3><a name="314"></a>314. Is the stack unwound when terminate() is called?</h3>
+<p><b>Section:</b> 18.7.3.3 [terminate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-04-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#terminate">issues</a> in [terminate].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+The standard appears to contradict itself about whether the stack is
+unwound when the implementation calls terminate().
+</p>
+
+<p>From 18.7.3.3p2:</p>
+<blockquote><p>
+ Calls the terminate_handler function in effect immediately
+ after evaluating the throw-expression (lib.terminate.handler),
+ if called by the implementation [...]
+</p></blockquote>
+
+<p>So the stack is guaranteed not to be unwound.</p>
+
+<p>But from 15.3p9:</p>
+<blockquote><p>
+ [...]whether or not the stack is unwound before this call
+ to terminate() is implementation-defined (except.terminate).
+</p></blockquote>
+
+<p>
+And 15.5.1 actually defines that in most cases the stack is unwound.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>There is definitely no contradiction between the core and library
+clauses; nothing in the core clauses says that stack unwinding happens
+after <tt>terminate</tt> is called. 18.7.3.3p2 does not say anything
+about when terminate() is called; it merely specifies which
+<tt>terminate_handler</tt> is used.</p>
+
+
+
+
+
+<hr>
+<h3><a name="323"></a>323. abs() overloads in different headers</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-04</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Currently the standard mandates the following overloads of
+abs():</p>
+
+<pre> abs(long), abs(int) in &lt;cstdlib&gt;
+
+ abs(float), abs(double), abs(long double) in &lt;cmath&gt;
+
+ template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;) in &lt;complex&gt;
+
+ template&lt;class T&gt; valarray&lt;T&gt; abs(const valarray&lt;T&gt;&amp;); in &lt;valarray&gt;
+</pre>
+
+<p>
+The problem is that having only some overloads visible of a function
+that works on "implicitly inter-convertible" types is dangerous in
+practice. The headers that get included at any point in a translation
+unit can change unpredictably during program
+development/maintenance. The wrong overload might be unintentionally
+selected.
+</p>
+
+<p>
+Currently, there is nothing that mandates the simultaneous visibility
+of these overloads. Indeed, some vendors have begun fastidiously
+reducing dependencies among their (public) headers as a QOI issue: it
+helps people to write portable code by refusing to compile unless all
+the correct headers are #included.
+</p>
+
+<p>The same issue may exist for other functions in the library.</p>
+
+<p>Redmond: PJP reports that C99 adds two new kinds of abs: complex,
+and int_max_abs.</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#343">343</a>.</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The programs that could potentially be broken by this situation are
+ already fragile, and somewhat contrived: For example, a user-defined
+ class that has conversion overloads both to <tt>long</tt> and
+ to <tt>float</tt>. If <tt>x</tt> is a value of such a class, then
+ <tt>abs(x)</tt> would give the <tt>long</tt> version if the user
+ included &lt;cstdlib&gt;, the <tt>float</tt> version if the user
+ included &lt;cmath&gt;, and would be diagnosed as ambiguous at
+ compile time if the user included both headers. The LWG couldn't
+ find an example of a program whose meaning would be changed (as
+ opposed to changing it from well-formed to ill-formed) simply by
+ adding another standard header.</p>
+
+<p>Since the harm seems minimal, and there don't seem to be any simple
+ and noninvasive solutions, this is being closed as NAD. It is
+ marked as "Future" for two reasons. First, it might be useful to
+ define an <tt>&lt;all&gt;</tt> header that would include all
+ Standard Library headers. Second, we should at least make sure that
+ future library extensions don't make this problem worse.</p>
+
+
+
+
+
+<hr>
+<h3><a name="326"></a>326. Missing typedef in moneypunct_byname</h3>
+<p><b>Section:</b> 22.2.6.4 [locale.moneypunct.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-05</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The definition of the moneypunct facet contains the typedefs char_type
+and string_type. Only one of these names, string_type, is defined in
+the derived facet, moneypunct_byname.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>For consistency with the numpunct facet, add a typedef for
+char_type to the definition of the moneypunct_byname facet in
+22.2.6.4 [locale.moneypunct.byname].</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The absence of the typedef is irrelevant. Users can still access
+the typedef, because it is inherited from the base class.</p>
+
+
+
+
+
+<hr>
+<h3><a name="330"></a>330. Misleading "exposition only" value in class locale definition</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The "exposition only" value of the std::locale::none constant shown in
+the definition of class locale is misleading in that it on many
+systems conflicts with the value assigned to one if the LC_XXX
+constants (specifically, LC_COLLATE on AIX, LC_ALL on HP-UX, LC_CTYPE
+on Linux and SunOS). This causes incorrect behavior when such a
+constant is passed to one of the locale member functions that accept a
+locale::category argument and interpret it as either the C LC_XXX
+constant or a bitmap of locale::category values. At least three major
+implementations adopt the suggested value without a change and
+consequently suffer from this problem.
+</p>
+
+<p>
+For instance, the following code will (presumably) incorrectly copy facets
+belonging to the collate category from the German locale on AIX:
+</p>
+
+<pre> std::locale l (std::locale ("C"), "de_DE", std::locale::none);
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees that it may be difficult to implement locale member
+functions in such a way that they can take either <tt>category</tt>
+arguments or the LC_ constants defined in &lt;cctype&gt;. In light of
+this requirement (22.1.1.1.1 [locale.category], paragraph 2), and in light
+of the requirement in the preceding paragraph that it is possible to
+combine <tt>category</tt> bitmask elements with bitwise operations,
+defining the <tt>category</tt> elements is delicate,
+particularly if an implementor is constrained to work with a
+preexisting C library. (Just using the existing LC_ constants would
+not work in general.) There's no set of "exposition only" values that
+could give library implementors proper guidance in such a delicate
+matter. The non-normative example we're giving is no worse than
+any other choice would be.</p>
+
+<p>See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="332"></a>332. Consider adding increment and decrement operators to std::fpos&lt; T &gt; </h3>
+<p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Increment and decrement operators are missing from
+Table 88 -- Position type requirements in 27.4.3 [fpos].
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Table 88 (section 27.4.3) -- Position type requirements
+be updated to include increment and decrement operators.
+</p>
+
+<pre>expression return type operational note
+
+++p fpos&amp; p += O(1)
+p++ fpos { P tmp = p;
+ ++p;
+ return tmp; }
+--p fpos&amp; p -= O(1)
+p-- fpos { P tmp = p;
+ --p;
+ return tmp; }
+</pre>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this is a request for extension, not a defect
+report. Additionally, nobody saw a clear need for this extension;
+<tt>fpos</tt> is used only in very limited ways.</p>
+
+
+
+
+
+<hr>
+<h3><a name="344"></a>344. grouping + showbase</h3>
+<p><b>Section:</b> 22.2.2 [category.numeric] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+When both grouping and showbase are active and the basefield is octal,
+does the leading 0 participate in the grouping or not? For example,
+should one format as: 0,123,456 or 0123,456?
+</p>
+<p>
+An analogy can be drawn with hexadecimal. It appears that 0x123,456 is
+preferred over 0x,123,456. However, this analogy is not universally
+accepted to apply to the octal base. The standard is not clear on how
+to format (or parse) in this manner.
+</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Insert into 22.2.3.1.2 [facet.numpunct.virtuals] paragraph 3, just before the last
+sentence:
+</p>
+<blockquote><p>
+The leading hexadecimal base specifier "0x" does not participate in
+grouping. The leading '0' octal base specifier may participate in
+grouping. It is unspecified if the leading '0' participates in
+formatting octal numbers. In parsing octal numbers, the implementation
+is encouraged to accept both the leading '0' participating in the
+grouping, and not participating (e.g. 0123,456 or 0,123,456).
+</p></blockquote>
+
+<p><b>Rationale:</b></p>
+<p>
+The current behavior may be unspecified, but it's not clear that it
+matters. This is an obscure corner case, since grouping is usually
+intended for the benefit of humans and oct/hex prefixes are usually
+intended for the benefit of machines. There is not a strong enough
+consensus in the LWG for action.
+</p>
+
+
+
+
+<hr>
+<h3><a name="348"></a>348. Minor issue with std::pair operator&lt;</h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current wording of 20.2.2 [lib.pairs] p6 precludes the use of
+operator&lt; on any pair type which contains a pointer.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 20.2.3 [pairs] paragraph 6, replace:</p>
+<pre> Returns: x.first &lt; y.first || (!(y.first &lt; x.first) &amp;&amp; x.second &lt;
+ y.second).
+</pre>
+<p>With:</p>
+<pre> Returns: std::less&lt;T1&gt;()( x.first, y.first ) ||
+ (!std::less&lt;T1&gt;()( y.first, x.first) &amp;&amp;
+ std::less&lt;T2&gt;()( x.second, y.second ) )
+</pre>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This is an instance of a much more general problem. If we want
+ operator&lt; to translate to std::less for pairs of pointers, where
+ do we draw the line? The same issue applies to individual
+ pointers, smart pointer wrappers, std::vector&lt;T*&gt;, and so
+ on.</p>
+
+<p>Andy Koenig suggests that the real issue here is that we aren't
+ distinguishing adequately between two different orderings, a
+ "useful ordering" and a "canonical ordering" that's used just
+ because we sometimes need <i>some</i> ordering without caring much
+ which ordering it is. Another example of the later is typeinfo's
+ <tt>before</tt>.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="350"></a>350. allocator&lt;&gt;::address</h3>
+<p><b>Section:</b> 20.6.1.1 [allocator.members], 20.1.2 [allocator.requirements], 17.4.1.1 [contents] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 2001-10-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a></p>
+<p><b>Discussion:</b></p>
+<p>See c++std-lib-9006 and c++std-lib-9007. This issue is taken
+verbatim from -9007.</p>
+
+<p>
+The core language feature allowing definition of operator&amp;() applied
+to any non-builtin type makes that operator often unsafe to use in
+implementing libraries, including the Standard Library. The result
+is that many library facilities fail for legal user code, such as
+the fragment</p>
+<pre> class A { private: A* operator&amp;(); };
+ std::vector&lt;A&gt; aa;
+
+ class B { };
+ B* operator&amp;(B&amp;) { return 0; }
+ std::vector&lt;B&gt; ba;
+</pre>
+
+<p>
+In particular, the requirements table for Allocator (Table 32) specifies
+no semantics at all for member address(), and allocator&lt;&gt;::address is
+defined in terms of unadorned operator &amp;.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 20.6.1.1, Change the definition of allocator&lt;&gt;::address from:</p>
+<blockquote><p>
+ Returns: &amp;x
+</p></blockquote>
+
+<p>to:</p>
+
+<p>
+ Returns: The value that the built in operator&amp;(x) would return if not
+ overloaded.
+</p>
+
+<p>
+In 20.1.6, Table 32, add to the Notes column of the a.address(r) and
+a.address(s) lines, respectively:
+</p>
+
+<pre> allocator&lt;T&gt;::address(r)
+ allocator&lt;T&gt;::address(s)
+</pre>
+
+<p>In addition, in clause 17.4.1.1, add a statement:</p>
+
+<blockquote><p>
+ The Standard Library does not apply operator&amp; to any type for which
+ operator&amp; may be overloaded.
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes both examples are ill-formed. The contained type
+is required to be CopyConstructible (20.1.1 [utility.arg.requirements]), and that
+includes the requirement that &amp;t return the usual types and
+values. Since allocators are intended to be used in conjunction with
+containers, and since the CopyConstructible requirements appear to
+have been written to deal with the concerns of this issue, the LWG
+feels it is NAD unless someone can come up with a well-formed example
+exhibiting a problem.</p>
+
+<p>It may well be that the CopyConstructible requirements are too
+ restrictive and that either the container requirements or the
+ CopyConstructive requirements should be relaxed, but that's a far
+ larger issue. Marking this issue as "future" as a pointer to that
+ larger issue.</p>
+
+
+
+
+
+<hr>
+<h3><a name="351"></a>351. unary_negate and binary_negate: struct or class?</h3>
+<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Dale Riley <b>Date:</b> 2001-11-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 20.5 [function.objects] the header &lt;functional&gt; synopsis declares
+the unary_negate and binary_negate function objects as struct.
+However in 20.5.10 [negators] the unary_negate and binary_negate
+function objects are defined as class. Given the context, they are
+not "basic function objects" like negate, so this is either a typo or
+an editorial oversight.
+</p>
+
+<p><i>[Taken from comp.std.c++]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the synopsis to reflect the useage in 20.5.10 [negators]</p>
+
+<p><i>[Curaçao: Since the language permits "struct", the LWG
+views this as NAD. They suggest, however, that the Project Editor
+might wish to make the change as editorial.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="353"></a>353. <tt>std::pair</tt> missing template assignment</h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The class template <tt>std::pair</tt> defines a template ctor (20.2.2, p4) but
+no template assignment operator. This may lead to inefficient code since
+assigning an object of <tt>pair&lt;C, D&gt;</tt> to <tt>pair&lt;A, B&gt;</tt>
+where the types <tt>C</tt> and <tt>D</tt> are distinct from but convertible to
+<tt>A</tt> and <tt>B</tt>, respectively, results in a call to the template copy
+ctor to construct an unnamed temporary of type <tt>pair&lt;A, B&gt;</tt>
+followed by an ordinary (perhaps implicitly defined) assignment operator,
+instead of just a straight assignment.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following declaration to the definition of <tt>std::pair</tt>:
+</p>
+<pre> template&lt;class U, class V&gt;
+ pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
+</pre>
+<p>
+And also add a paragraph describing the effects of the function template to the
+end of 20.2.2:
+</p>
+<pre> template&lt;class U, class V&gt;
+ pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
+</pre>
+<p>
+ <b>Effects</b>: <tt>first = p.first;</tt>
+ <tt>second = p.second;</tt>
+ <b>Returns</b>: <tt>*this</tt>
+</p>
+
+<p><i>[Curaçao: There is no indication this is was anything other than
+a design decision, and thus NAD.&nbsp; May be appropriate for a future
+standard.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="356"></a>356. Meaning of ctype_base::mask enumerators</h3>
+<p><b>Section:</b> 22.2.1 [category.ctype] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-01-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#category.ctype">issues</a> in [category.ctype].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>What should the following program print?</p>
+
+<pre> #include &lt;locale&gt;
+ #include &lt;iostream&gt;
+
+ class my_ctype : public std::ctype&lt;char&gt;
+ {
+ typedef std::ctype&lt;char&gt; base;
+ public:
+ my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
+ {
+ std::copy(base::classic_table(), base::classic_table() + base::table_size,
+ my_table);
+ my_table[(unsigned char) '_'] = (base::mask) (base::print | base::space);
+ }
+ private:
+ mask my_table[base::table_size];
+ };
+
+ int main()
+ {
+ my_ctype ct;
+ std::cout &lt;&lt; "isspace: " &lt;&lt; ct.is(std::ctype_base::space, '_') &lt;&lt; " "
+ &lt;&lt; "isalpha: " &lt;&lt; ct.is(std::ctype_base::alpha, '_') &lt;&lt; std::endl;
+ }
+</pre>
+
+<p>The goal is to create a facet where '_' is treated as whitespace.</p>
+
+<p>On gcc 3.0, this program prints "isspace: 1 isalpha: 0". On
+Microsoft C++ it prints "isspace: 1 isalpha: 1".</p>
+
+<p>
+I believe that both implementations are legal, and the standard does not
+give enough guidance for users to be able to use std::ctype's
+protected interface portably.</p>
+
+<p>
+The above program assumes that ctype_base::mask enumerators like
+<tt>space</tt> and <tt>print</tt> are disjoint, and that the way to
+say that a character is both a space and a printing character is to or
+those two enumerators together. This is suggested by the "exposition
+only" values in 22.2.1 [category.ctype], but it is nowhere specified in
+normative text. An alternative interpretation is that the more
+specific categories subsume the less specific. The above program
+gives the results it does on the Microsoft compiler because, on that
+compiler, <tt>print</tt> has all the bits set for each specific
+printing character class.
+</p>
+
+<p>From the point of view of std::ctype's public interface, there's no
+important difference between these two techniques. From the point of
+view of the protected interface, there is. If I'm defining a facet
+that inherits from std::ctype&lt;char&gt;, I'm the one who defines the
+value that table()['a'] returns. I need to know what combination of
+mask values I should use. This isn't so very esoteric: it's exactly
+why std::ctype has a protected interface. If we care about users
+being able to write their own ctype facets, we have to give them a
+portable way to do it.
+</p>
+
+<p>
+Related reflector messages:
+lib-9224, lib-9226, lib-9229, lib-9270, lib-9272, lib-9273, lib-9274,
+lib-9277, lib-9279.
+</p>
+
+<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> is related, but not identical. The
+proposed resolution if issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> says that
+ctype_base::mask must be a bitmask type. It does not say that the
+ctype_base::mask elements are bitmask elements, so it doesn't
+directly affect this issue.</p>
+
+<p>More comments from Benjamin Kosnik, who believes that
+that C99 compatibility essentially requires what we're
+calling option 1 below.</p>
+
+<blockquote>
+<pre>I think the C99 standard is clear, that isspace -&gt; !isalpha.
+--------
+
+#include &lt;locale&gt;
+#include &lt;iostream&gt;
+
+class my_ctype : public std::ctype&lt;char&gt;
+{
+private:
+ typedef std::ctype&lt;char&gt; base;
+ mask my_table[base::table_size];
+
+public:
+ my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
+ {
+ std::copy(base::classic_table(), base::classic_table() + base::table_size,
+ my_table);
+ mask both = base::print | base::space;
+ my_table[static_cast&lt;mask&gt;('_')] = both;
+ }
+};
+
+int main()
+{
+ using namespace std;
+ my_ctype ct;
+ cout &lt;&lt; "isspace: " &lt;&lt; ct.is(ctype_base::space, '_') &lt;&lt; endl;
+ cout &lt;&lt; "isprint: " &lt;&lt; ct.is(ctype_base::print, '_') &lt;&lt; endl;
+
+ // ISO C99, isalpha iff upper | lower set, and !space.
+ // 7.5, p 193
+ // -&gt; looks like g++ behavior is correct.
+ // 356 -&gt; bitmask elements are required for ctype_base
+ // 339 -&gt; bitmask type required for mask
+ cout &lt;&lt; "isalpha: " &lt;&lt; ct.is(ctype_base::alpha, '_') &lt;&lt; endl;
+}
+</pre>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Informally, we have three choices:</p>
+<ol>
+<li>Require that the enumerators are disjoint (except for alnum and
+graph)</li>
+<li>Require that the enumerators are not disjoint, and specify which
+of them subsume which others. (e.g. mandate that lower includes alpha
+and print)</li>
+<li>Explicitly leave this unspecified, which the result that the above
+program is not portable.</li>
+</ol>
+
+<p>Either of the first two options is just as good from the standpoint
+of portability. Either one will require some implementations to
+change.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees that this is a real ambiguity, and that both
+interpretations are conforming under the existing standard. However,
+there's no evidence that it's causing problems for real users. Users
+who want to define ctype facets portably can test the ctype_base masks
+to see which interpretation is being used.</p>
+
+
+
+
+
+<hr>
+<h3><a name="357"></a>357. &lt;cmath&gt; float functions cannot return HUGE_VAL</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-02-26</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The float versions of the math functions have no meaningful value to return
+for a range error. The long double versions have a value they can return,
+but it isn't necessarily the most reasonable value.
+</p>
+
+<p>
+Section 26.5 [lib.c.math], paragraph 5, says that C++ "adds float and long
+double overloaded versions of these functions, with the same semantics,"
+referring to the math functions from the C90 standard.
+</p>
+
+<p>
+The C90 standard, in section 7.5.1, paragraph 3, says that functions return
+"the value of the macro HUGE_VAL" when they encounter a range error.
+Section 7.5, paragraph 2, defines HUGE_VAL as a macro that "expands to a
+positive double expression, not necessarily representable as a float."
+</p>
+
+<p>
+Therefore, the float versions of the math functions have no way to
+signal a range error. <i>[Curaçao: The LWG notes that this isn't
+strictly correct, since errno is set.]</i> The semantics require that they
+return HUGE_VAL, but they cannot because HUGE_VAL might not be
+representable as a float.
+</p>
+
+<p>
+The problem with long double functions is less severe because HUGE_VAL is
+representable as a long double. On the other hand, it might not be a "huge"
+long double value, and might fall well within the range of normal return
+values for a long double function. Therefore, it does not make sense for a
+long double function to return a double (HUGE_VAL) for a range error.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Curaçao: C99 was faced with a similar problem, which they fixed by
+adding HUGE_VALF and HUGE_VALL in addition to HUGE_VAL.</p>
+
+<p>C++ must also fix, but it should be done in the context of the
+general C99 based changes to C++, not via DR. Thus the LWG in Curaçao
+felt the resolution should be NAD, FUTURE, but the issue is being held
+open for one more meeting to ensure LWG members not present during the
+discussion concur.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Will be fixed as part of more general work in the TR.</p>
+
+
+
+
+
+<hr>
+<h3><a name="361"></a>361. num_get&lt;&gt;::do_get (..., void*&amp;) checks grouping</h3>
+<p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.2.2.2.2, p12 specifies that <tt>thousands_sep</tt> is to be inserted only
+for integral types (issue 282 suggests that this should be done for
+all arithmetic types).
+</p>
+
+<p>
+22.2.2.1.2, p12 requires that grouping be checked for all extractors
+including that for <tt>void*</tt>.
+</p>
+
+<p>
+I don't think that's right. <tt>void*</tt> values should not be checked for
+grouping, should they? (Although if they should, then <tt>num_put</tt> needs
+to write them out, otherwise their extraction will fail.)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the first sentence of 22.2.2.2.2, p12 from
+</p>
+<blockquote><p>
+ Digit grouping is checked. That is, the positions of discarded
+ separators is examined for consistency with
+ use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().
+ If they are not consistent then ios_base::failbit is assigned
+ to err.
+</p></blockquote>
+
+<p>to</p>
+<blockquote><p>
+ Except for conversions to void*, digit grouping is checked...
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This would be a change: as it stands, the standard clearly
+ specifies that grouping applies to void*. A survey of existing
+ practice shows that most existing implementations do that, as they
+ should.</p>
+
+
+
+
+
+<hr>
+<h3><a name="366"></a>366. Excessive const-qualification</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The following member functions are declared const, yet return non-const
+pointers. We believe they are should be changed, because they allow code
+that may surprise the user. See document N1360 for details and
+rationale.
+</p>
+
+<p><i>[Santa Cruz: the real issue is that we've got const member
+functions that return pointers to non-const, and N1360 proposes
+replacing them by overloaded pairs. There isn't a consensus about
+whether this is a real issue, since we've never said what our
+constness policy is for iostreams. N1360 relies on a distinction
+between physical constness and logical constness; that distinction, or
+those terms, does not appear in the standard.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.4.4 and 27.4.4.2</p>
+<p>Replace</p>
+<pre> basic_ostream&lt;charT,traits&gt;* tie() const;
+</pre>
+<p>with</p>
+<pre> basic_ostream&lt;charT,traits&gt;* tie();
+ const basic_ostream&lt;charT,traits&gt;* tie() const;
+</pre>
+
+<p>and replace</p>
+<pre> basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
+</pre>
+<p>with</p>
+<pre> basic_streambuf&lt;charT,traits&gt;* rdbuf();
+ const basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
+</pre>
+
+<p>In 27.5.2 and 27.5.2.3.1</p>
+<p>Replace</p>
+<pre> char_type* eback() const;
+</pre>
+<p>with</p>
+<pre> char_type* eback();
+ const char_type* eback() const;
+</pre>
+
+<p>Replace</p>
+<pre> char_type gptr() const;
+</pre>
+<p>with</p>
+<pre> char_type* gptr();
+ const char_type* gptr() const;
+</pre>
+
+<p>Replace</p>
+<pre> char_type* egptr() const;
+</pre>
+<p>with</p>
+<pre> char_type* egptr();
+ const char_type* egptr() const;
+</pre>
+
+<p>In 27.5.2 and 27.5.2.3.2</p>
+<p>Replace</p>
+<pre> char_type* pbase() const;
+</pre>
+<p>with</p>
+<pre> char_type* pbase();
+ const char_type* pbase() const;
+</pre>
+
+<p>Replace</p>
+<pre> char_type* pptr() const;
+</pre>
+<p>with</p>
+<pre> char_type* pptr();
+ const char_type* pptr() const;
+</pre>
+
+<p>Replace</p>
+<pre> char_type* epptr() const;
+</pre>
+<p>with</p>
+<pre> char_type* epptr();
+ const char_type* epptr() const;
+</pre>
+
+<p>In 27.7.2, 27.7.2.2, 27.7.3 27.7.3.2, 27.7.4, and 27.7.6</p>
+<p>Replace</p>
+<pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
+</pre>
+<p>with</p>
+<pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf();
+ const basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
+</pre>
+
+<p>In 27.8.1.5, 27.8.1.7, 27.8.1.8, 27.8.1.10, 27.8.1.11, and 27.8.1.13</p>
+<p>Replace</p>
+<pre> basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
+</pre>
+<p>with</p>
+<pre> basic_filebuf&lt;charT,traits&gt;* rdbuf();
+ const basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>The existing specification is a bit sloppy, but there's no
+ particular reason to change this other than tidiness, and there are
+ a number of ways in which streams might have been designed
+ differently if we were starting today. There's no evidence that the
+ existing constness policy is harming users. We might consider
+ a different constness policy as part of a full stream redesign.</p>
+
+
+
+
+
+<hr>
+<h3><a name="367"></a>367. remove_copy/remove_copy_if and Input Iterators</h3>
+<p><b>Section:</b> 25.2.8 [alg.remove] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Anthony Williams <b>Date:</b> 2002-05-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.remove">issues</a> in [alg.remove].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+remove_copy and remove_copy_if (25.2.8 [alg.remove]) permit their
+input range to be marked with Input Iterators. However, since two
+operations are required against the elements to copy (comparison and
+assigment), when the input range uses Input Iterators, a temporary
+copy must be taken to avoid dereferencing the iterator twice. This
+therefore requires the value type of the InputIterator to be
+CopyConstructible. If the iterators are at least Forward Iterators,
+then the iterator can be dereferenced twice, or a reference to the
+result maintained, so the temporary is not required.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add "If InputIterator does not meet the requirements of forward
+iterator, then the value type of InputIterator must be copy
+constructible. Otherwise copy constructible is not required." to
+25.2.8 [alg.remove] paragraph 6.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The assumption is that an input iterator can't be dereferenced
+ twice. There's no basis for that assumption in the Standard.</p>
+
+
+
+
+
+<hr>
+<h3><a name="368"></a>368. basic_string::replace has two "Throws" paragraphs</h3>
+<p><b>Section:</b> 21.3.6.6 [string::replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2002-06-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+21.3.6.6 [string::replace] basic_string::replace, second
+signature, given in paragraph 1, has two "Throws" paragraphs (3 and
+5).
+</p>
+
+<p>
+In addition, the second "Throws" paragraph (5) includes specification
+(beginning with "Otherwise, the function replaces ...") that should be
+part of the "Effects" paragraph.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is editorial. Both "throws" statements are true. The bug is
+ just that the second one should be a sentence, part of the "Effects"
+ clause, not a separate "Throws". The project editor has been
+ notified.</p>
+
+
+
+
+
+<hr>
+<h3><a name="372"></a>372. Inconsistent description of stdlib exceptions</h3>
+<p><b>Section:</b> 17.4.4.8 [res.on.exception.handling], 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Randy Maddox <b>Date:</b> 2002-07-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#res.on.exception.handling">issues</a> in [res.on.exception.handling].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>Paragraph 3 under clause 17.4.4.8 [res.on.exception.handling], Restrictions on
+Exception Handling, states that "Any other functions defined in the
+C++ Standard Library that do not have an exception-specification may
+throw implementation-defined exceptions unless otherwise specified."
+This statement is followed by a reference to footnote 178 at the
+bottom of that page which states, apparently in reference to the C++
+Standard Library, that "Library implementations are encouraged (but
+not required) to report errors by throwing exceptions from (or derived
+from) the standard exceptions."</p>
+
+<p>These statements appear to be in direct contradiction to clause
+18.6.1 [type.info], which states "The class exception defines the
+base class for the types of objects thrown as exceptions by the C++
+Standard library components ...".</p>
+
+<p>Is this inconsistent?</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Clause 17 is setting the overall library requirements, and it's
+ clear and consistent. This sentence from Clause 18 is descriptive,
+ not setting a requirement on any other class.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="374"></a>374. moneypunct::frac_digits returns int not unsigned</h3>
+<p><b>Section:</b> 22.2.6.3.1 [locale.moneypunct.members], 22.2.6.3.2 [locale.moneypunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-08</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In section 22.2.6.3.1 [locale.moneypunct.members], frac_digits() returns type
+"int". This implies that frac_digits() might return a negative value,
+but a negative value is nonsensical. It should return "unsigned".
+</p>
+
+<p>
+Similarly, in section 22.2.6.3.2 [locale.moneypunct.virtuals], do_frac_digits()
+should return "unsigned".
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Regardless of whether the return value is int or unsigned, it's
+always conceivable that frac_digits might return a nonsensical
+value. (Is 4294967295 really any better than -1?) The clients of
+moneypunct, the get and put facets, can and do perform range
+checks.</p>
+
+
+
+
+
+<hr>
+<h3><a name="377"></a>377. basic_string::insert and length_error</h3>
+<p><b>Section:</b> 21.3.6.4 [string::insert] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 21.3.6.4 [string::insert], paragraph 4, contains the following,
+"Then throws length_error if size() &gt;= npos - rlen."
+</p>
+
+<p>
+Related to DR 83, this sentence should probably be removed.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p><p>This requirement is redundant but correct. No change is
+needed.</p>
+
+
+
+
+<hr>
+<h3><a name="378"></a>378. locale immutability and locale::operator=()</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a></p>
+<p><b>Discussion:</b></p>
+<p>
+I think there is a problem with 22.1.1, p6 which says that
+</p>
+<pre> -6- An instance of locale is immutable; once a facet reference
+ is obtained from it, that reference remains usable as long
+ as the locale value itself exists.
+</pre>
+<p>
+and 22.1.1.2, p4:
+</p>
+<pre> const locale&amp; operator=(const locale&amp; other) throw();
+
+ -4- Effects: Creates a copy of other, replacing the current value.
+</pre>
+<p>
+How can a reference to a facet obtained from a locale object remain
+valid after an assignment that clearly must replace all the facets
+in the locale object? Imagine a program such as this
+</p>
+<pre> std::locale loc ("de_DE");
+ const std::ctype&lt;char&gt; &amp;r0 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
+ loc = std::locale ("en_US");
+ const std::ctype&lt;char&gt; &amp;r1 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
+</pre>
+<p>
+Is r0 really supposed to be preserved and destroyed only when loc goes
+out of scope?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[Summer '04 mid-meeting mailing: Martin and Dietmar believe this
+ is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a> and recommend that it be
+ closed.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="385"></a>385. Does call by value imply the CopyConstructible requirement?</h3>
+<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Many function templates have parameters that are passed by value;
+a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in
+25.1.2 [alg.find]. Are the corresponding template parameters
+(<tt>Predicate</tt> in this case) implicitly required to be
+CopyConstructible, or does that need to be spelled out explicitly?
+</p>
+
+<p>
+This isn't quite as silly a question as it might seem to be at first
+sight. If you call <tt>find_if</tt> in such a way that template
+argument deduction applies, then of course you'll get call by value
+and you need to provide a copy constructor. If you explicitly provide
+the template arguments, however, you can force call by reference by
+writing something like <tt>find_if&lt;my_iterator,
+my_predicate&amp;&gt;</tt>. The question is whether implementation
+are required to accept this, or whether this is ill-formed because
+my_predicate&amp; is not CopyConstructible.
+</p>
+
+<p>
+The scope of this problem, if it is a problem, is unknown. Function
+object arguments to generic algorithms in clauses 25 [algorithms]
+and 26 [numerics] are obvious examples. A review of the whole
+library is necessary.
+</p>
+<p><i>[
+This is really two issues. First, predicates are typically passed by
+value but we don't say they must be Copy Constructible. They should
+be. Second: is specialization allowed to transform value arguments
+into references? References aren't copy constructible, so this should
+not be allowed.
+]</i></p>
+
+<p><i>[
+2007-01-12, Howard: First, despite the note above, references <b>are</b>
+copy constructible. They just aren't assignable. Second, this is very
+closely related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a> and should be consistent with that.
+That issue already says that implementations are allowed to copy
+function objects. If one passes in a reference, it is copyable, but
+susceptible to slicing if one passes in a reference to a base. Third,
+with rvalue reference in the language one only needs to satisfy
+MoveConstructible to pass an rvalue "by value". Though the function
+might still copy the function object internally (requiring
+CopyConstructible). Finally (and fwiw), if we wanted to, it is easy to
+code all of the std::algorithms such that they do not copy function
+objects internally. One merely passes them by reference internally if
+desired (this has been fully implemented and shipped for several years).
+ If this were mandated, it would reverse <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>, allowing
+function objects to reliably maintain state. E.g. the example in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a> would reliably remove only the third element.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Recommend NAD.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Generic algorithms will be marked with concepts and these will imply a requirement
+of MoveConstructible (not CopyConstructible). The signature of the function will
+then precisely describe and enforce the precise requirements.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="388"></a>388. Use of complex as a key in associative containers</h3>
+<p><b>Section:</b> 26.3 [complex.numbers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.numbers">issues</a> in [complex.numbers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Practice with std::complex&lt;&gt; and the associative containers
+occasionally reveals artificial and distracting issues with constructs
+resembling: std::set&lt;std::complex&lt;double&gt; &gt; s;
+</p>
+
+<p>
+The main reason for the above to fail is the absence of an approriate
+definition for std::less&lt;std::complex&lt;T&gt; &gt;. That in turn comes from
+the definition of the primary template std::less&lt;&gt; in terms of
+operator&lt;.
+</p>
+
+<p>
+The usual argument goes as follows: Since there is no ordering over
+the complex field compatible with field operations it makes little
+sense to define a function operator&lt; operating on the datatype
+std::complex&lt;T&gt;. That is fine. However, that reasoning does not carry
+over to std::less&lt;T&gt; which is used, among other things, by associative
+containers as an ordering useful to meet complexity requirements.
+</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Informally: Add a specialization of std::less for std::complex.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Discussed in Santa Cruz. An overwhelming majority of the LWG
+believes this should not be treated a DR: it's a request for a design
+change, not a defect in the existing standard. Most people (10-3)
+believed that we probably don't want this change, period: as with
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, it's hard to know where to draw the line.
+The LWG noted that users who want to put objects into an associative
+container for which <tt>operator&lt;</tt> isn't defined can simply
+provide their own comparison function object.</p>
+
+
+
+
+
+<hr>
+<h3><a name="390"></a>390. CopyConstructible requirements too strict</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
+ <b>Submitter:</b> Doug Gregor <b>Date:</b> 2002-10-24</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The CopyConstructible requirements in Table 30 state that for an
+object t of type T (where T is CopyConstructible), the expression &amp;t
+returns the address of t (with type T*). This requirement is overly
+strict, in that it disallows types that overload operator&amp; to not
+return a value of type T*. This occurs, for instance, in the <a href="http://www.boost.org/libs/lambda">Boost.Lambda</a> library, where
+operator&amp; is overloaded for a Boost.Lambda function object to return
+another function object.
+</p>
+
+<p>Example:</p>
+
+<pre> std::vector&lt;int&gt; u, v;
+ int x;
+ // ...
+ std::transform(u.begin(), u.end(), std::back_inserter(v), _1 * x);
+</pre>
+
+<p>
+_1 * x returns an unnamed function object with operator&amp; overloaded to
+not return T* , therefore rendering the std::transform call ill-formed.
+However, most standard library implementations will compile this code
+properly, and the viability of such binder libraries is severely hindered
+by the unnecessary restriction in the CopyConstructible requirements.
+</p>
+
+<p>
+For reference, the address of an object can be retrieved without using
+the address-of operator with the following function template:
+</p>
+
+<pre> template &lt;typename T&gt; T* addressof(T&amp; v)
+ {
+ return reinterpret_cast&lt;T*&gt;(
+ &amp;const_cast&lt;char&amp;&gt;(reinterpret_cast&lt;const volatile char &amp;&gt;(v)));
+ }
+</pre>
+
+<p>
+Note: this relates directly to library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, which
+will need to be reexamined if the CopyConstructible requirements
+change.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove the last two rows of Table 30, eliminating the requirements
+that &amp;t and &amp;u return the address of t and u, respectively.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This was a deliberate design decision. Perhaps it should be
+ reconsidered for C++0x. </p>
+
+
+
+
+
+<hr>
+<h3><a name="392"></a>392. 'equivalence' for input iterators</h3>
+<p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Corwin Joy <b>Date:</b> 2002-12-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+In section 24.1.1 [input.iterators] table 72 -
+'Input Iterator Requirements' we have as a postcondition of *a:
+"If a==b and (a, b) is in the domain of == then *a is equivalent to *b".
+</p>
+
+<p>
+In section 24.5.3.5 [istreambuf.iterator::equal] it states that
+"istreambuf_iterator::equal returns true if and only if both iterators
+are at end-of-stream, or neither is at end-of-stream, <i>regardless of
+what streambuf object they use</i>." (My emphasis).
+</p>
+
+<p>
+The defect is that either 'equivalent' needs to be more precisely
+defined or the conditions for equality in 24.5.3.5 [istreambuf.iterator::equal]
+are incorrect. (Or both).
+</p>
+
+<p>Consider the following example:</p>
+<pre> #include &lt;iostream&gt;
+ #include &lt;fstream&gt;
+ #include &lt;iterator&gt;
+ using namespace std;
+
+ int main() {
+ ifstream file1("file1.txt"), file2("file2.txt");
+ istreambuf_iterator&lt;char&gt; f1(file1), f2(file2);
+ cout &lt;&lt; "f1 == f2 : " &lt;&lt; boolalpha &lt;&lt; (f1 == f2) &lt;&lt; endl;
+ cout &lt;&lt; "f1 = " &lt;&lt; *f1 &lt;&lt; endl;
+ cout &lt;&lt; "f2 = " &lt;&lt; *f2 &lt;&lt; endl;
+ return 0;
+ }
+</pre>
+
+<p>Now assuming that neither f1 or f2 are at the end-of-stream then
+f1 == f2 by 24.5.3.5 [istreambuf.iterator::equal].</p>
+
+<p>However, it is unlikely that *f1 will give the same value as *f2 except
+by accident.</p>
+
+<p>So what does *f1 'equivalent' to *f2 mean? I think the standard should
+be clearer on this point, or at least be explicit that this does not
+mean that *f1 and *f2 are required to have the same value in the case
+of input iterators.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p><p>The two iterators aer not in the domain of ==</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="393"></a>393. do_in/do_out operation on state unclear</h3>
+<p><b>Section:</b> 22.2.1.4.2 [locale.codecvt.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
+ <b>Submitter:</b> Alberto Barbati <b>Date:</b> 2002-12-24</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.virtuals">issues</a> in [locale.codecvt.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+this DR follows the discussion on the previous thread "codecvt::do_in
+not consuming external characters". It's just a clarification issue
+and not a request for a change.
+</p>
+<p>
+Can do_in()/do_out() produce output characters without consuming input
+characters as a result of operation on state?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a note at the end of 22.2.1.4.2 [locale.codecvt.virtuals],
+paragraph 3:
+</p>
+
+<p>
+[Note: As a result of operations on state, it can return ok or partial
+and set from_next == from and to_next != to. --end note]
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+The submitter believes that standard already provides an affirmative
+answer to the question. However, the current wording has induced a few
+library implementors to make the incorrect assumption that
+do_in()/do_out() always consume at least one internal character when
+they succeed.
+</p>
+
+<p>
+The submitter also believes that the proposed resolution is not in
+conflict with the related issue 76. Moreover, by explicitly allowing
+operations on state to produce characters, a codecvt implementation
+may effectively implement N-to-M translations without violating the
+"one character at a time" principle described in such issue. On a side
+note, the footnote in the proposed resolution of issue 76 that
+informally rules out N-to-M translations for basic_filebuf should be
+removed if this issue is accepted as valid.
+</p>
+
+
+<p><i>[
+Kona (2007): The proposed resolution is to add a note. Since this is
+non-normative, the issue is editorial, but we believe that the note is
+correct. Proposed Disposition: NAD, Editorial
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="399"></a>399. volations of unformatted input function requirements</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+The Effects clauses for the two functions below violate the
+general requirements on unformatted input functions outlined
+in 27.6.1.3: they do not begin by constructing a sentry object.
+Instead, they begin by calling widen ('\n'), which may throw
+an exception. The exception is then allowed to propagate from
+the unformatted input function irrespective of the setting of
+exceptions().
+ </p>
+ <p>
+Note that in light of 27.6.1.1, p3 and p4, the fact that the
+functions allow exceptions thrown from widen() to propagate
+may not strictly speaking be a defect (but the fact that the
+functions do not start by constructing a sentry object still
+is). However, since an exception thrown from ctype&lt;charT&gt;
+::widen() during any other input operation (say, from within
+a call to num_get&lt;charT&gt;::get()) will be caught and cause
+badbit to be set, these two functions should not be treated
+differently for the sake of consistency.
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Not a defect. The standard is consistent, and the behavior required
+by the standard is unambiguous. Yes, it's theoretically possible for
+widen to throw. (Not that this will happen for the default ctype
+facet or for most real-world replacement ctype facets.) Users who
+define ctype facets that can throw, and who care about this behavior,
+can use alternative signatures that don't call widen.
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="429"></a>429. typo in basic_ios::clear(iostate)</h3>
+<p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a></p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The Effects clause in 27.4.4.3, p5 describing the effects of a call to
+the ios_base member function clear(iostate state) says that the function
+only throws if the respective bits are already set prior to the function
+call. That's obviously not the intent. If it was, a call to clear(badbit)
+on an object for which (rdstate() == goodbit &amp;&amp; exceptions() == badbit)
+holds would not result in an exception being thrown.
+
+ </p>
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+The text ought to be changed from
+<br>
+
+"If (rdstate() &amp; exceptions()) == 0, returns. ..."
+<br>
+
+to
+<br>
+
+"If (state &amp; exceptions()) == 0, returns. ..."
+ </p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="433"></a>433. Contradiction in specification of unexpected()</h3>
+<p><b>Section:</b> 18.7.2.4 [unexpected] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Vyatcheslav Sysoltsev <b>Date:</b> 2003-09-29</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Clause 15.5.2 [except.unexpected] paragraph 1 says that "void unexpected();
+is called (18.7.2) immediately after completing the stack unwinding
+for the former function", but 18.7.2.4 (Effects) says that "void
+unexpected(); . . . Calls the unexpected_handler function in effect
+immediately after evaluating the throwexpression (18.7.2.2),". Isn't
+here a contradiction: 15.5.2 requires stack have been unwound when in
+void unexpected() and therefore in unexpected_handler but 18.7.2.4
+claims that unexpected_handler is called "in effect immediately" after
+evaluation of throw expression is finished, so there is no space left
+for stack to be unwound therefore? I think the phrase "in effect
+immediately" should be removed from the standard because it brings
+ambiguity in understanding.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>There is no contradiction. The phrase "in effect immediately" is
+ just to clarify which handler is to be called.</p>
+
+
+
+
+
+<hr>
+<h3><a name="437"></a>437. Formatted output of function pointers is confusing</h3>
+<p><b>Section:</b> 27.6.2.6.2 [ostream.inserters.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Ivan Godard <b>Date:</b> 2003-10-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.arithmetic">issues</a> in [ostream.inserters.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Given:
+</p>
+<pre>void f(int) {}
+void(*g)(int) = f;
+cout &lt;&lt; g;
+</pre>
+
+<p>
+(with the expected #include and usings), the value printed is a rather
+surprising "true". Rather useless too.
+</p>
+
+<p>The standard defines:</p>
+
+<pre>ostream&amp; operator&lt;&lt;(ostream&amp;, void*);</pre>
+
+<p>which picks up all data pointers and prints their hex value, but does
+not pick up function pointers because there is no default conversion
+from function pointer to void*. Absent that, we fall back to legacy
+conversions from C and the function pointer is converted to bool.
+</p>
+
+<p>There should be an analogous inserter that prints the address of a
+ function pointer.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is indeed a wart, but there is no good way to solve it. C
+ doesn't provide a portable way of outputting the address of a
+ function point either.</p>
+
+
+
+
+
+<hr>
+<h3><a name="439"></a>439. Should facets be copyable?</h3>
+<p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The following facets classes have no copy constructors described in
+ the standard, which, according to the standard, means that they are
+ supposed to use the compiler-generated defaults. Default copy
+ behavior is probably inappropriate. We should either make these
+ classes uncopyable or else specify exactly what their constructors do.</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#421">421</a>.</p>
+
+<pre> ctype_base
+ ctype
+ ctype_byname
+ ctype&lt;char&gt;
+ ctype_byname&lt;char&gt;
+ codecvt_base
+ codecvt
+ codecvt_byname
+ num_get
+ num_put
+ numpunct
+ numpunct_byname
+ collate
+ collate_byname
+ time_base
+ time_get
+ time_get_byname
+ time_put
+ time_put_byname
+ money_get
+ money_put
+ money_base
+ moneypunct
+ moneypunct_byname
+ messages_base
+ messages
+ messages_byname
+</pre>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>The copy constructor in the base class is private.</p>
+
+
+
+
+
+<hr>
+<h3><a name="440"></a>440. Should std::complex use unqualified transcendentals?</h3>
+<p><b>Section:</b> 26.3.8 [complex.transcendentals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-05</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Operations like <tt>pow</tt> and <tt>exp</tt> on
+<tt>complex&lt;T&gt;</tt> are typically implemented in terms of
+operations like <tt>sin</tt> and <tt>cos</tt> on <tt>T</tt>.
+Should implementations write this as <tt>std::sin</tt>, or as plain
+unqualified <tt>sin</tt>?
+</p>
+
+<p>The issue, of course, is whether we want to use
+argument-dependent lookup in the case where <tt>T</tt> is a
+user-defined type. This is similar to the issue of valarray
+transcendentals, as discussed in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>.</p>
+
+<p>This issue differs from valarray transcendentals in two important
+ways. First, "the effect of instantiating the template
+<tt>complex</tt> for types other than float, double or long double is
+unspecified." (26.3.1 [complex.synopsis]) Second, the standard does not
+dictate implementation, so there is no guarantee that a particular
+real math function is used in the implementation of a particular
+complex function.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>If you instantiate std::complex for user-defined types, all bets
+are off.</p>
+
+
+
+
+
+<hr>
+<h3><a name="447"></a>447. Wrong template argument for time facets</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2003-12-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a></p>
+<p><b>Discussion:</b></p>
+<p>
+22.1.1.1.1/4, table 52, "Required Instantiations", lists, among others:
+</p>
+<pre> time_get&lt;char,InputIterator&gt;
+ time_get_byname&lt;char,InputIterator&gt;
+ time_get&lt;wchar_t,OutputIterator&gt;
+ time_get_byname&lt;wchar_t,OutputIterator&gt;
+</pre>
+
+<p>
+The second argument to the last two should be InputIterator, not
+OutputIterator.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the second template argument to InputIterator.
+</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="450"></a>450. set::find is inconsistent with associative container requirements</h3>
+<p><b>Section:</b> 23.3.3 [set] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#set">issues</a> in [set].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a></p>
+<p><b>Discussion:</b></p>
+<p>map/multimap have:</p>
+
+<pre> iterator find(const key_type&amp; x) const;
+ const_iterator find(const key_type&amp; x) const;
+</pre>
+
+<p>
+which is consistent with the table of associative container requirements.
+But set/multiset have:
+</p>
+<pre> iterator find(const key_type&amp;) const;
+</pre>
+
+<p>
+set/multiset should look like map/multimap, and honor the requirements
+table, in this regard.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="451"></a>451. Associative erase should return an iterator</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts], 23.3 [associative] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p>
+<p><b>Discussion:</b></p>
+<p>map/multimap/set/multiset have:</p>
+<pre> void erase(iterator);
+ void erase(iterator, iterator);
+</pre>
+
+<p>But there's no good reason why these can't return an iterator, as for
+vector/deque/list:</p>
+<pre> iterator erase(iterator);
+ iterator erase(iterator, iterator);
+</pre>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Informally: The table of associative container requirements, and the
+relevant template classes, should return an iterator designating the
+first element beyond the erased subrange.
+</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="452"></a>452. locale::combine should be permitted to generate a named locale</h3>
+<p><b>Section:</b> 22.1.1.3 [locale.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.members">issues</a> in [locale.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<pre>template&lt;class Facet&gt;
+ locale::combine(const locale&amp;) const;
+</pre>
+<p>
+is obliged to create a locale that has no name. This is overspecification
+and overkill. The resulting locale should follow the usual rules -- it
+has a name if the locale argument has a name and Facet is one of the
+standard facets.
+</p>
+
+<p><i>[
+ Sydney and post-Sydney (see c++std-lib-13439, c++std-lib-13440,
+ c++std-lib-13443): agreed that it's overkill to say that the locale
+ is obligated to be nameless. However, we also can't require it to
+ have a name. At the moment, locale names are based on categories
+ and not on individual facets. If a locale contains two different
+ facets of different names from the same category, then this would
+ not fit into existing naming schemes. We need to give
+ implementations more freedom. Bill will provide wording.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>After further discussion the LWG decided to close this as NAD.
+ The fundamental problem is that names right now are per-category,
+ not per-facet. The <tt>combine</tt> member function works at the
+ wrong level of granularity.</p>
+
+
+
+
+
+<hr>
+<h3><a name="463"></a>463. auto_ptr usability issues</h3>
+<p><b>Section:</b> D.9.1 [auto.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Rani Sharoni <b>Date:</b> 2003-12-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#auto.ptr">issues</a> in [auto.ptr].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+TC1 CWG DR #84 effectively made the template&lt;class Y&gt; operator auto_ptr&lt;Y&gt;()
+member of auto_ptr (20.4.5.3/4) obsolete.
+</p>
+
+<p>
+The sole purpose of this obsolete conversion member is to enable copy
+initialization base from r-value derived (or any convertible types like
+cv-types) case:
+</p>
+<pre>#include &lt;memory&gt;
+using std::auto_ptr;
+
+struct B {};
+struct D : B {};
+
+auto_ptr&lt;D&gt; source();
+int sink(auto_ptr&lt;B&gt;);
+int x1 = sink( source() ); // #1 EDG - no suitable copy constructor
+</pre>
+
+<p>
+The excellent analysis of conversion operations that was given in the final
+auto_ptr proposal
+(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1128.pdf)
+explicitly specifies this case analysis (case 4). DR #84 makes the analysis
+wrong and actually comes to forbid the loophole that was exploited by the
+auto_ptr designers.
+</p>
+
+<p>
+I didn't encounter any compliant compiler (e.g. EDG, GCC, BCC and VC) that
+ever allowed this case. This is probably because it requires 3 user defined
+conversions and in fact current compilers conform to DR #84.
+</p>
+
+<p>
+I was surprised to discover that the obsolete conversion member actually has
+negative impact of the copy initialization base from l-value derived
+case:</p>
+<pre>auto_ptr&lt;D&gt; dp;
+int x2 = sink(dp); // #2 EDG - more than one user-defined conversion applies
+</pre>
+
+<p>
+I'm sure that the original intention was allowing this initialization using
+the template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt;&amp; a) constructor (20.4.5.1/4) but
+since in this copy initialization it's merely user defined conversion (UDC)
+and the obsolete conversion member is UDC with the same rank (for the early
+overloading stage) there is an ambiguity between them.
+</p>
+
+<p>
+Removing the obsolete member will have impact on code that explicitly
+invokes it:
+</p>
+<pre>int y = sink(source().operator auto_ptr&lt;B&gt;());
+</pre>
+
+<p>
+IMHO no one ever wrote such awkward code and the reasonable workaround for
+#1 is:
+</p>
+<pre>int y = sink( auto_ptr&lt;B&gt;(source()) );
+</pre>
+
+<p>
+I was even more surprised to find out that after removing the obsolete
+conversion member the initialization was still ill-formed:
+int x3 = sink(dp); // #3 EDG - no suitable copy constructor
+</p>
+
+<p>
+This copy initialization semantically requires copy constructor which means
+that both template conversion constructor and the auto_ptr_ref conversion
+member (20.4.5.3/3) are required which is what was explicitly forbidden in
+DR #84. This is a bit amusing case in which removing ambiguity results with
+no candidates.
+</p>
+
+<p>
+I also found exception safety issue with auto_ptr related to auto_ptr_ref:
+</p>
+<pre>int f(auto_ptr&lt;B&gt;, std::string);
+auto_ptr&lt;B&gt; source2();
+
+// string constructor throws while auto_ptr_ref
+// "holds" the pointer
+int x4 = f(source2(), "xyz"); // #4
+</pre>
+
+<p>
+The theoretic execution sequence that will cause a leak:
+</p>
+<ol>
+<li>call auto_ptr&lt;B&gt;::operator auto_ptr_ref&lt;B&gt;()</li>
+<li>call string::string(char const*) and throw</li>
+</ol>
+
+<p>
+According to 20.4.5.3/3 and 20.4.5/2 the auto_ptr_ref conversion member
+returns auto_ptr_ref&lt;Y&gt; that holds *this and this is another defect since
+the type of *this is auto_ptr&lt;X&gt; where X might be different from Y. Several
+library vendors (e.g. SGI) implement auto_ptr_ref&lt;Y&gt; with Y* as member which
+is much more reasonable. Other vendor implemented auto_ptr_ref as
+defectively required and it results with awkward and catastrophic code:
+int oops = sink(auto_ptr&lt;B&gt;(source())); // warning recursive on all control
+paths
+</p>
+
+<p>
+Dave Abrahams noticed that there is no specification saying that
+auto_ptr_ref copy constructor can't throw.
+</p>
+
+<p>
+My proposal comes to solve all the above issues and significantly simplify
+auto_ptr implementation. One of the fundamental requirements from auto_ptr
+is that it can be constructed in an intuitive manner (i.e. like ordinary
+pointers) but with strict ownership semantics which yield that source
+auto_ptr in initialization must be non-const. My idea is to add additional
+constructor template with sole propose to generate ill-formed, diagnostic
+required, instance for const auto_ptr arguments during instantiation of
+declaration. This special constructor will not be instantiated for other
+types which is achievable using 14.8.2/2 (SFINAE). Having this constructor
+in hand makes the constructor template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp;)
+legitimate since the actual argument can't be const yet non const r-value
+are acceptable.
+</p>
+
+<p>
+This implementation technique makes the "private auxiliary class"
+auto_ptr_ref obsolete and I found out that modern C++ compilers (e.g. EDG,
+GCC and VC) consume the new implementation as expected and allow all
+intuitive initialization and assignment cases while rejecting illegal cases
+that involve const auto_ptr arguments.
+</p>
+
+<p>The proposed auto_ptr interface:</p>
+
+<pre>namespace std {
+ template&lt;class X&gt; class auto_ptr {
+ public:
+ typedef X element_type;
+
+ // 20.4.5.1 construct/copy/destroy:
+ explicit auto_ptr(X* p=0) throw();
+ auto_ptr(auto_ptr&amp;) throw();
+ template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp;) throw();
+ auto_ptr&amp; operator=(auto_ptr&amp;) throw();
+ template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt;) throw();
+ ~auto_ptr() throw();
+
+ // 20.4.5.2 members:
+ X&amp; operator*() const throw();
+ X* operator-&gt;() const throw();
+ X* get() const throw();
+ X* release() throw();
+ void reset(X* p=0) throw();
+
+ private:
+ template&lt;class U&gt;
+ auto_ptr(U&amp; rhs, typename
+unspecified_error_on_const_auto_ptr&lt;U&gt;::type = 0);
+ };
+}
+</pre>
+
+<p>
+One compliant technique to implement the unspecified_error_on_const_auto_ptr
+helper class is using additional private auto_ptr member class template like
+the following:
+</p>
+<pre>template&lt;typename T&gt; struct unspecified_error_on_const_auto_ptr;
+
+template&lt;typename T&gt;
+struct unspecified_error_on_const_auto_ptr&lt;auto_ptr&lt;T&gt; const&gt;
+{ typedef typename auto_ptr&lt;T&gt;::const_auto_ptr_is_not_allowed type; };
+</pre>
+
+<p>
+There are other techniques to implement this helper class that might work
+better for different compliers (i.e. better diagnostics) and therefore I
+suggest defining its semantic behavior without mandating any specific
+implementation. IMO, and I didn't found any compiler that thinks otherwise,
+14.7.1/5 doesn't theoretically defeat the suggested technique but I suggest
+verifying this with core language experts.
+</p>
+
+<p><b>Further changes in standard text:</b></p>
+<p>Remove section 20.4.5.3</p>
+
+<p>Change 20.4.5/2 to read something like:
+Initializing auto_ptr&lt;X&gt; from const auto_ptr&lt;Y&gt; will result with unspecified
+ill-formed declaration that will require unspecified diagnostic.</p>
+
+<p>Change 20.4.5.1/4,5,6 to read:</p>
+
+<pre>template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp; a) throw();</pre>
+<p> 4 Requires: Y* can be implicitly converted to X*.</p>
+<p> 5 Effects: Calls const_cast&lt;auto_ptr&lt;Y&gt;&amp;&gt;(a).release().</p>
+<p> 6 Postconditions: *this holds the pointer returned from a.release().</p>
+
+<p>Change 20.4.5.1/10</p>
+<pre>template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt; a) throw();
+</pre>
+<p>
+10 Requires: Y* can be implicitly converted to X*. The expression delete
+get() is well formed.
+</p>
+
+<p>LWG TC DR #127 is obsolete.</p>
+
+<p>
+Notice that the copy constructor and copy assignment operator should remain
+as before and accept non-const auto_ptr&amp; since they have effect on the form
+of the implicitly declared copy constructor and copy assignment operator of
+class that contains auto_ptr as member per 12.8/5,10:
+</p>
+<pre>struct X {
+ // implicit X(X&amp;)
+ // implicit X&amp; operator=(X&amp;)
+ auto_ptr&lt;D&gt; aptr_;
+};
+</pre>
+
+<p>
+In most cases this indicates about sloppy programming but preserves the
+current auto_ptr behavior.
+</p>
+
+<p>
+Dave Abrahams encouraged me to suggest fallback implementation in case that
+my suggestion that involves removing of auto_ptr_ref will not be accepted.
+In this case removing the obsolete conversion member to auto_ptr&lt;Y&gt; and
+20.4.5.3/4,5 is still required in order to eliminate ambiguity in legal
+cases. The two constructors that I suggested will co exist with the current
+members but will make auto_ptr_ref obsolete in initialization contexts.
+auto_ptr_ref will be effective in assignment contexts as suggested in DR
+#127 and I can't see any serious exception safety issues in those cases
+(although it's possible to synthesize such). auto_ptr_ref&lt;X&gt; semantics will
+have to be revised to say that it strictly holds pointer of type X and not
+reference to an auto_ptr for the favor of cases in which auto_ptr_ref&lt;Y&gt; is
+constructed from auto_ptr&lt;X&gt; in which X is different from Y (i.e. assignment
+from r-value derived to base).
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[Redmond: punt for the moment. We haven't decided yet whether we
+ want to fix auto_ptr for C++-0x, or remove it and replace it with
+ move_ptr and unique_ptr.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. We're just going to deprecate it. It still works for simple use cases
+and people know how to deal with it. Going forward <tt>unique_ptr</tt> is the recommended
+tool.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="466"></a>466. basic_string ctor should prevent null pointer error</h3>
+<p><b>Section:</b> 21.3.1 [string.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-06-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.require">issues</a> in [string.require].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Today, my colleagues and me wasted a lot of time. After some time, I
+found the problem. It could be reduced to the following short example:
+</p>
+
+<pre> #include &lt;string&gt;
+ int main() { std::string( 0 ); }
+</pre>
+
+<p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and
+Comeau online) compile the above without errors or warnings! The
+programs (at least for the GCC) resulted in a SEGV.</p>
+
+<p>I know that the standard explicitly states that the ctor of string
+requires a char* which is not zero. STLs could easily detect the above
+case with a private ctor for basic_string which takes a single 'int'
+argument. This would catch the above code at compile time and would not
+ambiguate any other legal ctors.</p>
+
+<p><i>[Redmond: No great enthusiasm for doing this. If we do,
+ however, we want to do it for all places that take <tt>charT*</tt>
+ pointers, not just the single-argument constructor. The other
+ question is whether we want to catch this at compile time (in which
+ case we catch the error of a literal 0, but not an expression whose
+ value is a null pointer), at run time, or both.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. Relegate this functionality to debugging implementations.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="470"></a>470. accessing containers from their elements' special functions</h3>
+<p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+The standard doesn't prohibit the destructors (or any other special
+functions) of containers' elements invoked from a member function
+of the container from "recursively" calling the same (or any other)
+member function on the same container object, potentially while the
+container is in an intermediate state, or even changing the state
+of the container object while it is being modified. This may result
+in some surprising (i.e., undefined) behavior.
+</p>
+
+<p>Read email thread starting with c++std-lib-13637 for more.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add to Container Requirements the following new paragraph:</p>
+
+<pre> Unless otherwise specified, the behavior of a program that
+ invokes a container member function f from a member function
+ g of the container's value_type on a container object c that
+ called g from its mutating member function h, is undefined.
+ I.e., if v is an element of c, directly or indirectly calling
+ c.h() from v.g() called from c.f(), is undefined.
+</pre>
+
+<p><i>[Redmond: This is a real issue, but it's probably a clause 17
+ issue, not clause 23. We get the same issue, for example, if we
+ try to destroy a stream from one of the stream's callback functions.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. We agree this is an issue, but not a defect.
+We believe that there is no wording we can put in the standard
+that will cover all cases without introducing unfortunate
+corner cases.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="472"></a>472. Missing "Returns" clause in std::equal_range</h3>
+<p><b>Section:</b> 25.3.3.3 [equal.range] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Prateek R Karandikar <b>Date:</b> 2004-06-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#equal.range">issues</a> in [equal.range].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a></p>
+<p><b>Discussion:</b></p>
+<p>
+There is no "Returns:" clause for std::equal_range, which returns non-void.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Fixed as part of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="476"></a>476. Forward Iterator implied mutability</h3>
+<p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>24.1/3 says:</p>
+<blockquote><p>
+ Forward iterators satisfy all the requirements of the input and
+ output iterators and can be used whenever either kind is specified
+</p></blockquote>
+
+<p>
+The problem is that satisfying the requirements of output iterator
+means that you can always assign *something* into the result of
+dereferencing it. That makes almost all non-mutable forward
+iterators non-conforming. I think we need to sever the refinement
+relationship between forward iterator and output iterator.
+</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>. But this is not a dup.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Yes, 24.1/3 does say that. But it's introductory material. The
+precise specification is in 24.1.3, and the requrements table there is
+right. We don't need to fine-tune introductory wording. (Especially
+since this wording is likely to be changed as part of the iterator
+overhaul.)</p>
+
+
+
+
+
+<hr>
+<h3><a name="477"></a>477. Operator-&gt; for const forward iterators</h3>
+<p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
+<p><b>Discussion:</b></p>
+<p>
+The Forward Iterator requirements table contains the following:
+</p>
+<pre> expression return type operational precondition
+ semantics
+ ========== ================== =========== ==========================
+ a-&gt;m U&amp; if X is mutable, (*a).m pre: (*a).m is well-defined.
+ otherwise const U&amp;
+
+ r-&gt;m U&amp; (*r).m pre: (*r).m is well-defined.
+</pre>
+
+<p>
+The first line is exactly right. The second line is wrong. Basically
+it implies that the const-ness of the iterator affects the const-ness
+of referenced members. But Paragraph 11 of [lib.iterator.requirements] says:
+</p>
+
+<blockquote><p>
+ In the following sections, a and b denote values of type const X, n
+ denotes a value of the difference type Distance, u, tmp, and m
+ denote identifiers, r denotes a value of X&amp;, t denotes a value of
+ value type T, o denotes a value of some type that is writable to
+ the output iterator.
+</p></blockquote>
+
+<p>AFAICT if we need the second line at all, it should read the same
+as the first line.</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees that this is a real problem. Marked as a DUP
+ because the LWG chose to adopt the solution proposed in
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="479"></a>479. Container requirements and placement new</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Herb Sutter <b>Date:</b> 2004-08-01</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a></p>
+<p><b>Discussion:</b></p>
+<p>Nothing in the standard appears to make this program ill-formed:</p>
+
+<pre> struct C {
+ void* operator new( size_t s ) { return ::operator new( s ); }
+ // NOTE: this hides in-place and nothrow new
+ };
+
+ int main() {
+ vector&lt;C&gt; v;
+ v.push_back( C() );
+ }
+</pre>
+
+<p>Is that intentional? We should clarify whether or not we intended
+ to require containers to support types that define their own special
+ versions of <tt>operator new</tt>.</p>
+
+<p><i>[
+Lillehammer: A container will definitely never use this overridden
+operator new, but whether it will fail to compile is unclear from the
+standard. Are containers supposed to use qualified or unqualified
+placement new? 20.4.1.1 is somewhat relevant, but the standard
+doesn't make it completely clear whether containers have to use
+Allocator::construct(). If containers don't use it, the details of how
+containers use placement new are unspecified. That is the real bug,
+but it needs to be fixed as part of the allocator overhaul. Weak
+support that the eventual solution should make this code well formed.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="480"></a>480. unary_function and binary_function should have protected nonvirtual destructors</h3>
+<p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Joe Gottman <b>Date:</b> 2004-08-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The classes std::unary_function and std::binary_function are both
+designed to be inherited from but contain no virtual functions. This
+makes it too easy for a novice programmer to write code like
+binary_function&lt;int, int, int&gt; *p = new plus&lt;int&gt;; delete p;</p>
+
+<p>There are two common ways to prevent this source of undefined
+behavior: give the base class a public virtual destructor, or give it
+a protected nonvirtual destructor. Since unary_function and
+binary_function have no other virtual functions, (note in particular
+the absence of an operator()() ), it would cost too much to give them
+public virtual destructors. Therefore, they should be given protected
+nonvirtual destructors.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change Paragraph 20.3.1 of the Standard from</p>
+<pre> template &lt;class Arg, class Result&gt;
+ struct unary_function {
+ typedef Arg argument_type;
+ typedef Result result_type;
+ };
+
+ template &lt;class Arg1, class Arg2, class Result&gt;
+ struct binary_function {
+ typedef Arg1 first_argument_type;
+ typedef Arg2 second_argument_type;
+ typedef Result result_type;
+ };
+</pre>
+
+<p>to</p>
+<pre> template &lt;class Arg, class Result&gt;
+ struct unary_function {
+ typedef Arg argument_type;
+ typedef Result result_type;
+ protected:
+ ~unary_function() {}
+ };
+
+ template &lt;class Arg1, class Arg2, class Result&gt;
+ struct binary_function {
+ typedef Arg1 first_argument_type;
+ typedef Arg2 second_argument_type;
+ typedef Result result_type;
+ protected:
+ ~binary_function() {}
+ };
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG doesn't believe the existing definition causes anybody any
+ concrete harm.</p>
+
+
+
+
+
+<hr>
+<h3><a name="481"></a>481. unique's effects on the range [result, last)</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-08-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard says that unique(first, last) "eliminates all but the
+first element from every consecutive group of equal elements" in
+[first, last) and returns "the end of the resulting range". So a
+postcondition is that [first, result) is the same as the old [first,
+last) except that duplicates have been eliminated.
+</p>
+
+<p>What postconditions are there on the range [result, last)? One
+ might argue that the standard says nothing about those values, so
+ they can be anything. One might also argue that the standard
+ doesn't permit those values to be changed, so they must not be.
+ Should the standard say something explicit one way or the other?</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>We don't want to make many guarantees about what's in [result,
+end). Maybe we aren't being quite explicit enough about not being
+explicit, but it's hard to think that's a major problem.</p>
+
+
+
+
+
+<hr>
+<h3><a name="482"></a>482. Swapping pairs</h3>
+<p><b>Section:</b> 20.2.3 [pairs], 20.3 [tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-09-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>(Based on recent comp.std.c++ discussion)</p>
+
+<p>Pair (and tuple) should specialize std::swap to work in terms of
+std::swap on their components. For example, there's no obvious reason
+why swapping two objects of type pair&lt;vector&lt;int&gt;,
+list&lt;double&gt; &gt; should not take O(1).</p>
+
+<p><i>[Lillehammer: We agree it should be swappable. Howard will
+ provide wording.]</i></p>
+
+
+<p><i>[
+Post Oxford: We got <tt>swap</tt> for <tt>pair</tt> but accidently
+missed <tt>tuple</tt>. <tt>tuple::swap</tt> is being tracked by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Wording provided in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
+</p>
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD, fixed by
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="483"></a>483. Heterogeneous equality and EqualityComparable</h3>
+<p><b>Section:</b> 25.1 [alg.nonmodifying], 25.2 [alg.modifying.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2004-09-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a></p>
+<p><b>Discussion:</b></p>
+<p>c++std-lib-14262</p>
+
+<p>[lib.alg.find] requires T to be EqualityComparable:</p>
+
+<pre>template &lt;class InputIterator, class T&gt;
+ InputIterator find(InputIterator first, InputIterator last,
+ const T&amp; value);
+</pre>
+
+<p>
+However the condition being tested, as specified in the Effects
+clause, is actually *i == value, where i is an InputIterator.
+</p>
+
+<p>
+The two clauses are in agreement only if the type of *i is T, but this
+isn't necessarily the case. *i may have a heterogeneous comparison
+operator that takes a T, or a T may be convertible to the type of *i.
+</p>
+
+<p>Further discussion (c++std-lib-14264): this problem affects a
+ number of algorithsm in clause 25, not just <tt>find</tt>. We
+ should try to resolve this problem everywhere it appears.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>[lib.alg.find]:</p>
+<blockquote><p>
+ Remove [lib.alg.find]/1.
+</p></blockquote>
+
+<p>[lib.alg.count]:</p>
+<blockquote><p>
+ Remove [lib.alg.count]/1.
+</p></blockquote>
+
+<p>[lib.alg.search]:</p>
+<blockquote><p>
+ Remove "Type T is EqualityComparable (20.1.1), " from [lib.alg.search]/4.
+</p></blockquote>
+
+<p>[lib.alg.replace]:</p>
+
+<blockquote>
+ <p>
+ Remove [lib.alg.replace]/1.
+ Replace [lb.alg.replace]/2 with:
+ </p>
+
+ <blockquote><p>
+ For every iterator i in the range [first, last) for which *i == value
+ or pred(*i) holds perform *i = new_value.
+ </p></blockquote>
+
+ <p>
+ Remove the first sentence of /4.
+ Replace the beginning of /5 with:
+ </p>
+
+ <blockquote><p>
+ For every iterator i in the range [result, result + (last -
+ first)), assign to *i either...
+ </p></blockquote>
+
+ <p>(Note the defect here, current text says assign to i, not *i).</p>
+</blockquote>
+
+<p>[lib.alg.fill]:</p>
+
+<blockquote>
+ <p>
+ Remove "Type T is Assignable (23.1), " from /1.
+ Replace /2 with:
+ </p>
+
+ <blockquote><p>
+ For every iterator i in the range [first, last) or [first, first + n),
+ perform *i = value.
+ </p></blockquote>
+</blockquote>
+
+<p>[lib.alg.remove]:</p>
+<blockquote><p>
+ Remove /1.
+ Remove the first sentence of /6.
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Duplicate of (a subset of) issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a>.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="486"></a>486. min/max CopyConstructible requirement is too strict</h3>
+<p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-10-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a></p>
+<p><b>Discussion:</b></p>
+<p>A straightforward implementation of these algorithms does not need to
+copy T.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>drop the the words "and CopyConstructible" from paragraphs 1 and 4</p>
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="487"></a>487. Allocator::construct is too limiting</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Dhruv Matani <b>Date:</b> 2004-10-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard's version of allocator::construct(pointer,
+const_reference) severely limits what you can construct using this
+function. Say you can construct a socket from a file descriptor. Now,
+using this syntax, I first have to manually construct a socket from
+the fd, and then pass the constructed socket to the construct()
+function so it will just to an uninitialized copy of the socket I
+manually constructed. Now it may not always be possible to copy
+construct a socket eh! So, I feel that the changes should go in the
+allocator::construct(), making it:
+</p>
+<pre> template&lt;typename T&gt;
+ struct allocator{
+ template&lt;typename T1&gt;
+ void construct(pointer T1 const&amp; rt1);
+ };
+</pre>
+
+<p>
+Now, the ctor of the class T which matches the one that takes a T1 can
+be called! Doesn't that sound great?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>NAD. STL uses copying all the time, and making it possible for
+ allocators to construct noncopyable objects is useless in the
+ absence of corresponding container changes. We might consider this
+ as part of a larger redesign of STL.</p>
+
+
+
+
+
+<hr>
+<h3><a name="489"></a>489. std::remove / std::remove_if wrongly specified</h3>
+<p><b>Section:</b> 25.2.8 [alg.remove] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.remove">issues</a> in [alg.remove].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 25.2.7 [lib.alg.remove], paragraphs 1 to 5 describe the
+behavior of the mutating sequence operations std::remove and
+std::remove_if. However, the wording does not reflect the intended
+behavior [Note: See definition of intended behavior below] of these
+algorithms, as it is known to the C++ community [1].
+</p>
+
+
+
+<p>1) Analysis of current wording:</p>
+
+
+<p>25.2.7 [lib.alg.remove], paragraph 2:</p>
+
+<p>Current wording says:
+"Effects: Eliminates all the elements referred to by iterator i in the
+range [first, last) for which the following corresponding conditions
+hold: *i == value, pred(*i) != false."</p>
+
+<p>
+This sentences expresses specifically that all elements denoted by the
+(original) range [first, last) for which the corresponding condition
+hold will be eliminated. Since there is no formal definition of the term
+"eliminate" provided, the meaning of "eliminate" in everyday language
+implies that as postcondition, no element in the range denoted by
+[first, last) will hold the corresponding condition on reiteration over
+the range [first, last).
+</p>
+
+<p>
+However, this is neither the intent [Note: See definition of intended
+behavior below] nor a general possible approach. It can be easily proven
+that if all elements of the original range[first, last) will hold the
+condition, it is not possible to substitute them by an element for which
+the condition will not hold.
+</p>
+
+
+<p>25.2.7 [lib.alg.remove], paragraph 3:</p>
+
+<p>
+Current wording says:
+"Returns: The end of the resulting range."
+</p>
+
+<p>
+The resulting range is not specified. In combination with 25.2.7
+[lib.alg.remove], paragraph 2, the only reasonable interpretation of
+this so-called resulting range is the range [first,last) - thus
+returning always the ForwardIterator 'last' parameter.
+</p>
+
+
+<p>
+25.2.7 [lib.alg.remove], paragraph 4:
+</p>
+
+<p>
+Current wording says:
+"Notes: Stable: the relative order of the elements that are not removed
+is the same as their relative order in the original range"
+</p>
+
+<p>
+This sentences makes use of the term "removed", which is neither
+specified, nor used in a previous paragraph (which uses the term
+"eliminate"), nor unamgiuously separated from the name of the algorithm.
+</p>
+
+
+<p>2) Description of intended behavior:</p>
+
+<p>
+For the rest of this Defect Report, it is assumed that the intended
+behavior was that all elements of the range [first, last) which do not
+hold the condition *i == value (std::remove) or pred(*i) != false
+(std::remove_if)], call them s-elements [Note: s...stay], will be placed
+into a contiguous subrange of [first, last), denoted by the iterators
+[first, return value). The number of elements in the resulting range
+[first, return value) shall be equal to the number of s-elements in the
+original range [first, last). The relative order of the elements in the
+resulting subrange[first, return value) shall be the same as the
+relative order of the corresponding elements in the original range. It
+is undefined whether any elements in the resulting subrange [return
+value, last) will hold the corresponding condition, or not.
+</p>
+
+<p>
+All implementations known to the author of this Defect Report comply
+with this intent. Since the intent of the behavior (contrary to the
+current wording) is also described in various utility references serving
+the C++ community [1], it is not expected that fixing the paragraphs
+will influence current code - unless the code relies on the behavior as
+it is described by current wording and the implementation indeed
+reflects the current wording, and not the intent.
+</p>
+
+
+
+<p>3) Proposed fixes:</p>
+
+
+<p>Change 25.2.7 [lib.alg.remove], paragraph 2 to:</p>
+
+<p>
+"Effect: Places all the elements referred to by iterator i in the range
+[first, last) for which the following corresponding conditions hold :
+!(*i == value), pred(*i) == false into the subrange [first, k) of the
+original range, where k shall denote a value of type ForwardIterator. It
+is undefined whether any elements in the resulting subrange [k, last)
+will hold the corresponding condition, or not."
+</p>
+
+<p>Comments to the new wording:</p>
+
+<p>
+a) "Places" has no special meaning, and the everyday language meaning
+should fit.
+b) The corresponding conditions were negated compared to the current
+wording, becaue the new wording requires it.
+c) The wording "of the original range" might be redundant, since any
+subrange starting at 'first' and containing no more elements than the
+original range is implicitly a subrange of the original range [first,
+last).
+d) The iterator k was introduced instead of "return value" in order to
+avoid a cyclic dependency on 25.2.7/3. The wording ", where k shall
+denote a value of type ForwardIterator" might be redundant, because it
+follows implicitly by 25.2.7/3.
+e) "Places" does, in the author's opinion, explicitly forbid duplicating
+any element holding the corresponding condition in the original range
+[first, last) within the resulting range [first, k). If there is doubt
+this term might be not unambiguous regarding this, it is suggested that
+k is specified more closely by the following wording: "k shall denote a
+value of type ForwardIterator [Note: see d)] so that k - first is equal
+to the number of elements in the original range [first, last) for which
+the corresponding condition did hold". This could also be expressed as a
+separate paragraph "Postcondition:"
+f) The senctence "It is undefined whether any elements in the resulting
+subrange [k, last) will hold the corresponding condition, or not." was
+added consciously so the term "Places" does not imply if the original
+range [first, last) contains n elements holding the corresponding
+condition, the identical range[first, last) will also contain exactly n
+elements holding the corresponding condition after application of the
+algorithm.
+</p>
+
+<p>
+Change 25.2.7 [lib.alg.remove], paragraph 3 to:
+
+"Returns: The iterator k."
+</p>
+
+<p>
+Change 25.2.7 [lib.alg.remove], paragraph 4 to:
+
+"Notes: Stable: the relative order of the elements that are placed into
+the subrange [first, return value) shall be the same as their relative
+order was in the original range [first, last) prior to application of
+the algorithm."
+</p>
+
+<p>
+Comments to the new wording:
+</p>
+
+<p>
+a) the wording "was ... prior to application of the algorithm" is used
+to explicitly distinguish the original range not only by means of
+iterators, but also by a 'chronological' factor from the resulting range
+[first, return value). It might be redundant.
+</p>
+
+<p>
+[1]:
+The wording of these references is not always unambiguous, and provided
+examples partially contradict verbal description of the algorithms,
+because the verbal description resembles the problematic wording of
+ISO/IEC 14882:2003.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that the standard is sufficiently clear, and that
+ there is no evidence of any real-world confusion about this point.</p>
+
+
+
+
+
+<hr>
+<h3><a name="490"></a>490. std::unique wrongly specified</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 25.2.8 [lib.alg.unique], paragraphs 1 to 3 describe the
+behavior of the mutating sequence operation std::unique. However, the
+wording does not reflect the intended behavior [Note: See definition of
+intended behavior below] of these algorithms, as it is known to the C++
+community [1].</p>
+
+
+
+<p>1) Analysis of current wording:</p>
+
+
+<p>25.2.8 [lib.alg.unique], paragraph 1:</p>
+
+<p>
+Current wording says:
+"Effects: Eliminates all but the first element from every consecutive
+group of equal elements referred to by the iterator i in the range
+[first, last) for which the following corresponding conditions hold: *i
+== *(i - 1) or pred(*i, *(i -1)) != false"
+</p>
+
+<p>
+This sentences expresses specifically that all elements denoted by the
+(original) range [first, last) which are not but the first element from
+a consecutive group of equal elements (where equality is defined as *i
+== *(i - 1) or pred(*i, *(i - 1)) ! = false) [Note: See DR 202], call
+them r-elements [Note: r...remove], will be eliminated. Since there is
+no formal definition of the term "eliminate" provided, it is undefined
+how this "elimination" takes place. But the meaning of "eliminate" in
+everyday language seems to disallow explicitly that after application of
+the algorithm, any r-element will remain at any position of the range
+[first, last) [2].
+</p>
+
+<p>
+Another defect in the current wording concerns the iterators used to
+compare two elements for equality: The current wording contains the
+expression "(i - 1)", which is not covered by 25/9 [Note: See DR
+submitted by Thomas Mang regarding invalid iterator arithmetic
+expressions].
+</p>
+
+
+<p>
+25.2.8 [lib.alg.unique], paragraph 2:
+</p>
+<p>Current wording says:
+"Returns: The end of the resulting range."</p>
+
+<p>
+The resulting range is not specified. In combination with 25.2.8
+[lib.alg.unique], paragraph 1, one reasonable interpretation (in the
+author's opinion even the only possible interpretation) of this
+so-called resulting range is the range [first, last) - thus returning
+always the ForwardIterator 'last' parameter.
+</p>
+
+<p>2) Description of intended behavior:</p>
+
+<p>
+For the rest of this Defect Report, it is assumed that the intended
+behavior was that all elements denoted by the original range [first,
+last) which are the first element from a consecutive group of elements
+for which the corresponding conditions: *(i-1) == *i (for the version of
+unique without a predicate argument) or pred(*(i-1), *i) ! = false (for
+the version of unique with a predicate argument) [Note: If such a group
+of elements consists of only a single element, this is also considered
+the first element] [Note: See resolutions of DR 202], call them
+s-elements [Note: s...stay], will be placed into a contiguous subrange
+of [first, last), denoted by the iterators [first, return value). The
+number of elements in the resulting range [first, return value) shall be
+equal to the number of s-elements in the original range [first, last).
+Invalid iterator arithmetic expressions are expected to be resolved as
+proposed in DR submitted by Thomas Mang regarding invalid iterator
+arithmetic expressions. It is also assumed by the author that the
+relative order of the elements in the resulting subrange [first, return
+value) shall be the same as the relative order of the corresponding
+elements (the s-elements) in the original range [Note: If this was not
+intended behavior, the additional proposed paragraph about stable order
+will certainly become obsolete].
+Furthermore, the resolutions of DR 202 are partially considered.
+</p>
+
+<p>
+All implementations known to the author of this Defect Report comply
+with this intent [Note: Except possible effects of DR 202]. Since this
+intent of the behavior (contrary to the current wording) is also
+described in various utility references serving the C++ community [1],
+it is not expected that fixing the paragraphs will influence current
+code [Note: Except possible effects of DR 202] - unless the code relies
+on the behavior as it is described by current wording and the
+implementation indeed reflects the current wording, and not the intent.
+</p>
+
+
+
+<p>3) Proposed fixes:</p>
+
+<p>
+Change 25.2.8 [lib.alg.unique], paragraph 1 to:
+</p>
+
+<p>
+"Effect: Places the first element from every consecutive group of
+elements, referred to by the iterator i in the range [first, last), for
+which the following conditions hold: *(i-1) == *i (for the version of
+unique without a predicate argument) or pred(*(i -1), *i) != false (for
+the version of unique with a predicate argument), into the subrange
+[first, k) of the original range, where k shall denote a value of type
+ForwardIterator."
+</p>
+
+<p>Comments to the new wording:</p>
+
+<p>
+a) The new wording was influenced by the resolutions of DR 202. If DR
+202 is resolved in another way, the proposed wording need also
+additional review.
+b) "Places" has no special meaning, and the everyday language meaning
+should fit.
+c) The expression "(i - 1)" was left, but is expected that DR submitted
+by Thomas Mang regarding invalid iterator arithmetic expressions will
+take this into account.
+d) The wording "(for the version of unique without a predicate
+argument)" and "(for the version of unique with a predicate argument)"
+was added consciously for clarity and is in resemblence with current
+23.2.2.4 [lib.list.ops], paragraph 19. It might be considered redundant.
+e) The wording "of the original range" might be redundant, since any
+subrange starting at first and containing no more elements than the
+original range is implicitly a subrange of the original range [first,
+last).
+f) The iterator k was introduced instead of "return value" in order to
+avoid a cyclic dependency on 25.2.8 [lib.alg.unique], paragraph 2. The
+wording ", where k shall denote a value of type ForwardIterator" might
+be redundant, because it follows implicitly by 25.2.8 [lib.alg.unique],
+paragraph 2.
+g) "Places" does, in the author's opinion, explicitly forbid duplicating
+any s-element in the original range [first, last) within the resulting
+range [first, k). If there is doubt this term might be not unambiguous
+regarding this, it is suggested that k is specified more closely by the
+following wording: "k shall denote a value of type ForwardIterator
+[Note: See f)] so that k - first is equal to the number of elements in
+the original range [first, last) being the first element from every
+consecutive group of elements for which the corresponding condition did
+hold". This could also be expressed as a separate paragraph
+"Postcondition:".
+h) If it is considered that the wording is unclear whether it declares
+the element of a group which consists of only a single element
+implicitly to be the first element of this group [Note: Such an
+interpretation could eventually arise especially in case last - first ==
+1] , the following additional sentence is proposed: "If such a group of
+elements consists of only a single element, this element is also
+considered the first element."
+</p>
+
+<p>
+Change 25.2.8 [lib.alg.unique], paragraph 2 to:
+"Returns: The iterator k."
+</p>
+
+<p>
+Add a separate paragraph "Notes:" as 25.2.8 [lib.alg.unique], paragraph
+2a or 3a, or a separate paragraph "Postcondition:" before 25.2.8
+[lib.alg.unique], paragraph 2 (wording inside {} shall be eliminated if
+the preceding expressions are used, or the preceding expressions shall
+be eliminated if wording inside {} is used):
+</p>
+
+<p>
+"Notes:{Postcondition:} Stable: the relative order of the elements that
+are placed into the subrange [first, return value {k}) shall be the same
+as their relative order was in the original range [first, last) prior to
+application of the algorithm."
+</p>
+
+<p>Comments to the new wording:</p>
+
+<p>
+a) It is assumed by the author that the algorithm was intended to be
+stable.
+In case this was not the intent, this paragraph becomes certainly
+obsolete.
+b) The wording "was ... prior to application of the algorithm" is used
+to explicitly distinguish the original range not only by means of
+iterators, but also by a 'chronological' factor from the resulting range
+[first, return value). It might be redundant.
+</p>
+
+<p>
+25.2.8 [lib.alg.unique], paragraph 3:
+</p>
+<p>See DR 239.</p>
+
+<p>
+4) References to other DRs:
+</p>
+
+<p>
+See DR 202, but which does not address any of the problems described in
+this Defect Report [Note: This DR is supposed to complement DR 202].
+See DR 239.
+See DR submitted by Thomas Mang regarding invalid iterator arithmetic
+expressions.
+</p>
+
+<p>
+[1]:
+The wording of these references is not always unambiguous, and provided
+examples partially contradict verbal description of the algorithms,
+because the verbal description resembles the problematic wording of
+ISO/IEC 14882:2003.
+</p>
+
+<p>
+[2]:
+Illustration of conforming implementations according to current wording:
+</p>
+
+<p>
+One way the author of this DR considers how this "elimination" could be
+achieved by a conforming implementation according to current wording is
+by substituting each r-element by _any_ s-element [Note: s...stay; any
+non-r-element], since all r-elements are "eliminated".
+</p>
+
+<p>
+In case of a sequence consisting of elements being all 'equal' [Note:
+See DR 202], substituting each r-element by the single s-element is the
+only possible solution according to current wording.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes the standard is sufficiently clear. No
+implementers get it wrong, and changing it wouldn't cause any code to
+change, so there is no real-world harm here.</p>
+
+
+
+
+
+<hr>
+<h3><a name="491"></a>491. std::list&lt;&gt;::unique incorrectly specified</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 23.2.3.4 [list.ops], paragraphs 19 to 21 describe the
+behavior of the std::list&lt;T, Allocator&gt;::unique operation. However, the
+current wording is defective for various reasons.</p>
+
+
+
+<p>
+1) Analysis of current wording:
+</p>
+
+<p>23.2.3.4 [list.ops], paragraph 19:</p>
+
+<p>
+Current wording says:
+"Effects: Eliminates all but the first element from every consecutive
+group of equal elements referred to by the iterator i in the range
+[first + 1, last) for which *i == *(i - 1) (for the version of unique
+with no argument) or pred(*i, *(i -1)) (for the version of unique with a
+predicate argument) holds."</p>
+
+<p>
+This sentences makes use of the undefined term "Eliminates". Although it
+is, to a certain degree, reasonable to consider the term "eliminate"
+synonymous with "erase", using "Erase" in the first place, as the
+wording of 23.2.3.4 [list.ops], paragraph 15 does, would be clearer.</p>
+
+<p>
+The range of the elements referred to by iterator i is "[first + 1,
+last)". However, neither "first" nor "last" is defined.</p>
+
+<p>
+The sentence makes three times use of iterator arithmetic expressions (
+"first + 1", "*i == *(i - 1)", "pred(*i, *(i -1))" ) which is not
+defined for bidirectional iterator [see DR submitted by Thomas Mang
+regarding invalid iterator arithmetic expressions].</p>
+
+<p>
+The same problems as pointed out in DR 202 (equivalence relation / order
+of arguments for pred()) apply to this paragraph.</p>
+
+<p>
+23.2.3.4 [list.ops], paragraph 20:
+</p>
+
+<p>
+Current wording says:
+"Throws: Nothing unless an exception in thrown by *i == *(i-1) or
+pred(*i, *(i - 1))"</p>
+
+<p>
+The sentence makes two times use of invalid iterator arithmetic
+expressions ( "*i == *(i - 1)", "pred(*i, *(i -1))" ).
+</p>
+<p>
+[Note: Minor typos: "in" / missing dot at end of sentence.]
+</p>
+
+<p>
+23.2.3.4 [list.ops], paragraph 21:</p>
+
+<p>
+Current wording says:
+"Complexity: If the range (last - first) is not empty, exactly (last -
+first) - 1 applications of the corresponding predicate, otherwise no
+application of the predicate.</p>
+
+<p>
+See DR 315 regarding "(last - first)" not yielding a range.</p>
+
+<p>
+Invalid iterator arithmetic expression "(last - first) - 1" left .</p>
+
+
+<p>2) Description of intended behavior:</p>
+
+<p>
+For the rest of this Defect Report, it is assumed that "eliminate" is
+supposed to be synonymous to "erase", that "first" is equivalent to an
+iterator obtained by a call to begin(), "last" is equivalent to an
+iterator obtained by a call to end(), and that all invalid iterator
+arithmetic expressions are resolved as described in DR submitted by
+Thomas Mang regarding invalid iterator arithmetic expressions.</p>
+
+<p>
+Furthermore, the resolutions of DR 202 are considered regarding
+equivalence relation and order of arguments for a call to pred.</p>
+
+<p>
+All implementations known to the author of this Defect Report comply
+with these assumptions, apart from the impact of the alternative
+resolution of DR 202. Except for the changes implied by the resolutions
+of DR 202, no impact on current code is expected.</p>
+
+<p>
+3) Proposed fixes:</p>
+
+<p>
+Change 23.2.3.4 [list.ops], paragraph 19 to:</p>
+
+<p>
+"Effect: Erases all but the first element from every consecutive group
+of elements, referred to by the iterator i in the range [begin(),
+end()), for which the following conditions hold: *(i-1) == *i (for the
+version of unique with no argument) or pred(*(i-1), *i) != false (for
+the version of unique with a predicate argument)."</p>
+
+<p>
+Comments to the new wording:</p>
+
+<p>
+a) The new wording was influenced by DR 202 and the resolutions
+presented there. If DR 202 is resolved in another way, the proposed
+wording need also additional review.
+b) "Erases" refers in the author's opinion unambiguously to the member
+function "erase". In case there is doubt this might not be unamgibuous,
+a direct reference to the member function "erase" is suggested [Note:
+This would also imply a change of 23.2.3.4 [list.ops], paragraph
+15.].
+c) The expression "(i - 1)" was left, but is expected that DR submitted
+by Thomas Mang regarding invalid iterator arithmetic expressions will
+take this into account.
+d) The wording "(for the version of unique with no argument)" and "(for
+the version of unique with a predicate argument)" was kept consciously
+for clarity.
+e) "begin()" substitutes "first", and "end()" substitutes "last". The
+range need adjustment from "[first + 1, last)" to "[begin(), end())" to
+ensure a valid range in case of an empty list.
+f) If it is considered that the wording is unclear whether it declares
+the element of a group which consists of only a single element
+implicitly to be the first element of this group [Note: Such an
+interpretation could eventually arise especially in case size() == 1] ,
+the following additional sentence is proposed: "If such a group of
+elements consists of only a single element, this element is also
+considered the first element."</p>
+
+<p>
+Change 23.2.3.4 [list.ops], paragraph 20 to:</p>
+
+<p>
+"Throws: Nothing unless an exception is thrown by *(i-1) == *i or
+pred(*(i-1), *i)."</p>
+
+<p>
+Comments to the new wording:</p>
+
+<p>
+a) The wording regarding the conditions is identical to proposed
+23.2.3.4 [list.ops], paragraph 19. If 23.2.3.4 [list.ops],
+paragraph 19 is resolved in another way, the proposed wording need also
+additional review.
+b) The expression "(i - 1)" was left, but is expected that DR submitted
+by Thomas Mang regarding invalid iterator arithmetic expressions will
+take this into account.
+c) Typos fixed.</p>
+
+<p>
+Change 23.2.3.4 [list.ops], paragraph 21 to:</p>
+
+<p>
+"Complexity: If empty() == false, exactly size() - 1 applications of the
+corresponding predicate, otherwise no applications of the corresponding
+predicate."</p>
+
+<p>
+Comments to the new wording:</p>
+
+<p>
+a) The new wording is supposed to also replace the proposed resolution
+of DR 315, which suffers from the problem of undefined "first" / "last".
+</p>
+
+<p>
+5) References to other DRs:</p>
+
+<p>See DR 202.
+See DR 239.
+See DR 315.
+See DR submitted by Thomas Mang regarding invalid iterator arithmetic
+expressions.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>"All implementations known to the author of this Defect Report
+comply with these assumption", and "no impact on current code is
+expected", i.e. there is no evidence of real-world confusion or
+harm.</p>
+
+
+
+
+
+<hr>
+<h3><a name="493"></a>493. Undefined Expression in Input Iterator Note Title</h3>
+<p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-12-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>1) In 24.1.1/3, the following text is currently present.</p>
+
+<p>"Note: For input iterators, a==b does not imply ++a=++b (Equality does
+not guarantee the substitution property or referential transparency)."</p>
+
+<p>However, when in Table 72, part of the definition of ++r is given as:</p>
+
+<p>"pre: r is dereferenceable.
+post: any copies of the previous value of r are no longer required
+either to be dereferenceable ..."</p>
+
+<p>While a==b does not imply that b is a copy of a, this statement should
+perhaps still be made more clear.</p>
+
+<p>2) There are no changes to intended behaviour</p>
+
+<p>
+3) This Note should be altered to say "Note: For input iterators a==b,
+when its behaviour is defined ++a==++b may still be false (Equality does
+not guarantee the substitution property or referential transparency).</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is descriptive text, not normative, and the meaning is clear.</p>
+
+
+
+
+
+<hr>
+<h3><a name="494"></a>494. Wrong runtime complexity for associative container's insert and delete</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Hans B os <b>Date:</b> 2004-12-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>According to [lib.associative.reqmts] table 69, the runtime comlexity
+of insert(p, t) and erase(q) can be done in amortized constant time.</p>
+
+<p>It was my understanding that an associative container could be
+implemented as a balanced binary tree.</p>
+
+<p>For inser(p, t), you 'll have to iterate to p's next node to see if t
+can be placed next to p. Furthermore, the insertion usually takes
+place at leaf nodes. An insert next to the root node will be done at
+the left of the root next node</p>
+
+<p>So when p is the root node you 'll have to iterate from the root to
+its next node, which takes O(log(size)) time in a balanced tree.</p>
+
+<p>If you insert all values with insert(root, t) (where root is the
+root of the tree before insertion) then each insert takes O(log(size))
+time. The amortized complexity per insertion will be O(log(size))
+also.</p>
+
+<p>For erase(q), the normal algorithm for deleting a node that has no
+empty left or right subtree, is to iterate to the next (or previous),
+which is a leaf node. Then exchange the node with the next and delete
+the leaf node. Furthermore according to DR 130, erase should return
+the next node of the node erased. Thus erasing the root node,
+requires iterating to the next node.</p>
+
+<p>Now if you empty a map by deleting the root node until the map is
+empty, each operation will take O(log(size)), and the amortized
+complexity is still O(log(size)).</p>
+
+<p>The operations can be done in amortized constant time if iterating
+to the next node can be done in (non amortized) constant time. This
+can be done by putting all nodes in a double linked list. This
+requires two extra links per node. To me this is a bit overkill since
+you can already efficiently insert or erase ranges with erase(first,
+last) and insert(first, last).</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>Only "amortized constant" in special circumstances, and we believe
+ that's implementable. That is: doing this N times will be O(N), not
+ O(log N).</p>
+
+
+
+
+
+<hr>
+<h3><a name="499"></a>499. Std. doesn't seem to require stable_sort() to be stable!</h3>
+<p><b>Section:</b> 25.3.1.2 [stable.sort] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Prateek Karandikar <b>Date:</b> 2005-04-12</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<blockquote><p>
+17.3.1.1 Summary</p>
+
+<p>
+1 The Summary provides a synopsis of the category, and introduces the
+first-level subclauses. Each subclause also provides a summary, listing
+the headers specified in the subclause and the library entities
+provided in each header.
+</p>
+<p>
+2 Paragraphs labelled "Note(s):" or "Example(s):" are informative,
+other paragraphs are normative.
+</p></blockquote>
+
+<p>So this means that a "Notes" paragraph wouldn't be normative. </p>
+
+<blockquote><p>
+25.3.1.2 stable_sort
+</p>
+<pre>template&lt;class RandomAccessIterator&gt;
+void stable_sort(RandomAccessIterat or first, RandomAccessIterator last);
+
+template&lt;class RandomAccessIterator, class Compare&gt;
+void stable_sort(RandomAccessIterat or first, RandomAccessIterator last, Compare comp);
+</pre>
+<p>
+1 Effects: Sorts the elements in the range [first, last).
+</p>
+<p>
+2 Complexity: It does at most N(log N)^2 (where N == last - first)
+comparisons; if enough extra memory is available, it is N log N.
+</p>
+<p>
+3 Notes: Stable: the relative order of the equivalent elements is
+preserved.
+</p></blockquote>
+
+<p>
+The Notes para is informative, and nowhere else is stability mentioned above.
+</p>
+
+<p>
+Also, I just searched for the word "stable" in my copy of the Standard.
+and the phrase "Notes: Stable: the relative order of the elements..."
+is repeated several times in the Standard library clauses for
+describing various functions. How is it that stability is talked about
+in the informative paragraph? Or am I missing something obvious?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+This change has already been made.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="500"></a>500. do_length cannot be implemented correctly</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Krzysztof &#379;elechowski <b>Date:</b> 2005-05-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<ol>
+<li>codecvt::do_length is of type int;</li>
+<li>it is assumed to be sort-of returning from_next - from of type ptrdiff_t;</li>
+<li>ptrdiff_t cannot be cast to an int without data loss.</li>
+</ol>
+<p>
+Contradiction.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="501"></a>501. Proposal: strengthen guarantees of lib.comparisons</h3>
+<p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Me &lt;anti_spam_email2003@yahoo.com&gt; <b>Date:</b> 2005-06-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<blockquote><p>
+"For templates greater, less, greater_equal, and less_equal,
+the specializations for any pointer type yield a total order, even if
+the built-in operators &lt;, &gt;, &lt;=, &gt;= do not."
+</p></blockquote>
+
+<p>
+The standard should do much better than guarantee that these provide a
+total order, it should guarantee that it can be used to test if memory
+overlaps, i.e. write a portable memmove. You can imagine a platform
+where the built-in operators use a uint32_t comparison (this tests for
+overlap on this platform) but the less&lt;T*&gt; functor is allowed to be
+defined to use a int32_t comparison. On this platform, if you use
+std::less with the intent of making a portable memmove, comparison on
+an array that straddles the 0x7FFFFFFF/0x8000000 boundary can give
+incorrect results.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a footnote to 20.5.3/8 saying:
+</p>
+
+<blockquote><p>
+Given a p1 and p2 such that p1 points to N objects of type T and p2
+points to M objects of type T. If [p1,p1+N) does not overlap [p2,p2+M),
+less returns the same value when comparing all pointers in [p1,p1+N) to
+all pointers in [p2,p2+M). Otherwise, there is a value Q and a value R
+such that less returns the same value when comparing all pointers in
+[p1,p1+Q) to all pointers in [p2,p2+R) and an opposite value when
+comparing all pointers in [p1+Q,p1+N) to all pointers in [p2+R,p2+M).
+For the sake of completeness, the null pointer value (4.10) for T is
+considered to be an array of 1 object that doesn't overlap with any
+non-null pointer to T. less_equal, greater, greater_equal, equal_to,
+and not_equal_to give the expected results based on the total ordering
+semantics of less. For T of void, treat it as having similar semantics
+as T of char i.e. less&lt;cv T*&gt;(a, b) gives the same results as less&lt;cv
+void*&gt;(a, b) which gives the same results as less&lt;cv char*&gt;((cv
+char*)(cv void*)a, (cv char*)(cv void*)b).
+</p></blockquote>
+
+<p>
+I'm also thinking there should be a footnote to 20.5.3/1 saying that if
+A and B are similar types (4.4/4), comp&lt;A&gt;(a,b) returns the same value
+as comp&lt;B&gt;(a,b) (where comp is less, less_equal, etc.). But this might
+be problematic if there is some really funky operator overloading going
+on that does different things based on cv (that should be undefined
+behavior if somebody does that though). This at least should be
+guaranteed for all POD types (especially pointers) that use the
+built-in comparison operators.
+</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+less is already required to provide a strict weak ordering which is good enough
+to detect overlapping memory situations.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="504"></a>504. Integer types in pseudo-random number engine requirements</h3>
+<p><b>Section:</b> 26.4.1 [rand.req], TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req">issues</a> in [rand.req].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In [tr.rand.req], Paragraph 2 states that "... s is a value of integral type,
+g is an ... object returning values of unsigned integral type ..."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 5.1.1 [tr.rand.req], Paragraph 2 replace
+</p>
+
+<blockquote><p>
+... s is a value of integral type, g is an lvalue of a type other than X that
+defines a zero-argument function object returning values of <del>unsigned integral</del> type
+<ins><tt>unsigned long int</tt></ins>,
+...
+</p></blockquote>
+
+<p>
+In 5.1.1 [tr.rand.seq], Table 16, replace in the line for X(s)
+</p>
+
+<blockquote><p>
+creates an engine with the initial internal state
+determined by <ins><tt>static_cast&lt;unsigned long&gt;(</tt></ins><tt><i>s</i></tt><ins><tt>)</tt></ins>
+</p></blockquote>
+
+<p><i>[
+Mont Tremblant: Both s and g should be unsigned long.
+This should refer to the constructor signatures. Jens provided wording post Mont Tremblant.
+]</i></p>
+
+
+<p><i>[
+Berlin: N1932 adopts the proposed resolution: see 26.3.1.3/1e and Table 3 row 2. Moved
+to Ready.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Jens: Just requiring X(unsigned long) still makes it possible
+for an evil library writer to also supply a X(int) that does something
+unexpected. The wording above requires that X(s) always performs
+as if X(unsigned long) would have been called. I believe that is
+sufficient and implements our intentions from Mont Tremblant. I
+see no additional use in actually requiring a X(unsigned long)
+signature. u.seed(s) is covered by its reference to X(s), same
+arguments.
+</p>
+
+
+<p><i>[
+Portland: Subsumed by N2111.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="506"></a>506. Requirements of Distribution parameter for variate_generator</h3>
+<p><b>Section:</b> 26.4 [rand], TR1 5.1.3 [tr.rand.var] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 3 requires that template argument U (which corresponds to template
+parameter Engine) satisfy all uniform random number generator requirements.
+However, there is no analogous requirement regarding the template argument
+that corresponds to template parameter Distribution. We believe there should
+be, and that it should require that this template argument satisfy all random
+distribution requirements.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18.
+</p>
+<p>
+Consequence 2: Add max() and min() functions to those distributions that
+do not already have them.
+</p>
+
+<p><i>[
+Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere.
+Marc supports having min and max to satisfy generic programming interface.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>Berlin: N1932 makes this moot: variate_generator has been eliminated.</p>
+
+
+
+
+
+<hr>
+<h3><a name="509"></a>509. Uniform_int template parameters</h3>
+<p><b>Section:</b> 26.4.8.1 [rand.dist.uni], TR1 5.1.7.1 [tr.rand.dist.iunif] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In [tr.rand.dist.iunif] the uniform_int distribution currently has a single
+template parameter, IntType, used as the input_type and as the result_type
+of the distribution. We believe there is no reason to conflate these types
+in this way.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We recommend that there be a second template parameter to
+reflect the distribution's input_type, and that the existing first template
+parameter continue to reflect (solely) the result_type:
+</p>
+<blockquote><pre>template&lt; class IntType = int, UIntType = unsigned int &gt;
+class uniform_int
+{
+public:
+ // types
+ typedef UIntType input_type;
+ typedef IntType result_type;
+</pre></blockquote>
+
+<p><i>[
+Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
+eliminated.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="510"></a>510. Input_type for bernoulli_distribution</h3>
+<p><b>Section:</b> 26.4.8.2 [rand.dist.bern], TR1 5.1.7.2 [tr.rand.dist.bern] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In [tr.rand.dist.bern] the distribution currently requires;
+</p>
+<blockquote><pre>typedef int input_type;
+</pre></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We believe this is an unfortunate choice, and recommend instead:
+</p>
+<blockquote><pre>typedef unsigned int input_type;
+</pre></blockquote>
+
+<p><i>[
+Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
+eliminated.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="511"></a>511. Input_type for binomial_distribution</h3>
+<p><b>Section:</b> 26.4.8 [rand.dist], TR1 5.1.7.5 [tr.rand.dist.bin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist">issues</a> in [rand.dist].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Unlike all other distributions in TR1, this binomial_distribution has an
+implementation-defined input_type. We believe this is an unfortunate choice,
+because it hinders users from writing portable code. It also hinders the
+writing of compliance tests. We recommend instead:
+</p>
+<blockquote><pre>typedef RealType input_type;
+</pre></blockquote>
+<p>
+While this choice is somewhat arbitrary (as it was for some of the other
+distributions), we make this particular choice because (unlike all other
+distributions) otherwise this template would not publish its RealType
+argument and so users could not write generic code that accessed this
+second template parameter. In this respect, the choice is consistent with
+the other distributions in TR1.
+</p>
+<p>
+We have two reasons for recommending that a real type be specified instead.
+One reason is based specifically on characteristics of binomial distribution
+implementations, while the other is based on mathematical characteristics of
+probability distribution functions in general.
+</p>
+<p>
+Implementations of binomial distributions commonly use Stirling approximations
+for values in certain ranges. It is far more natural to use real values to
+represent these approximations than it would be to use integral values to do
+so. In other ranges, implementations reply on the Bernoulli distribution to
+obtain values. While TR1's bernoulli_distribution::input_type is specified as
+int, we believe this would be better specified as double.
+</p>
+<p>
+This brings us to our main point: The notion of a random distribution rests
+on the notion of a cumulative distribution function, which in turn mathematically
+depends on a continuous dependent variable. Indeed, such a distribution function
+would be meaningless if it depended on discrete values such as integers - and this
+remains true even if the distribution function were to take discrete steps.
+</p>
+<p>
+Although this note is specifically about binomial_distribution::input_type,
+we intend to recommend that all of the random distributions input_types be
+specified as a real type (either a RealType template parameter, or double,
+as appropriate).
+</p>
+<p>
+Of the nine distributions in TR1, four already have this characteristic
+(uniform_real, exponential_distribution, normal_distribution, and
+gamma_distribution). We have already argued the case for the binomial the
+remaining four distributions.
+</p>
+<p>
+In the case of uniform_int, we believe that the calculations to produce an
+integer result in a specified range from an integer in a different specified
+range is best done using real arithmetic. This is because it involves a
+product, one of whose terms is the ratio of the extents of the two ranges.
+Without real arithmetic, the results become less uniform: some numbers become
+more (or less) probable that they should be. This is, of course, undesireable
+behavior in a uniform distribution.
+</p>
+<p>
+Finally, we believe that in the case of the bernoulli_distribution (briefly
+mentioned earlier), as well as the cases of the geometric_distribution and the
+poisson_distribution, it would be far more natural to have a real input_type.
+This is because the most natural computation involves the random number
+delivered and the distribution's parameter p (in the case of bernoulli_distribution,
+for example, the computation is a comparison against p), and p is already specified
+in each case as having some real type.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<blockquote><pre>typedef RealType input_type;
+</pre></blockquote>
+
+<p><i>[
+Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
+eliminated.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="512"></a>512. Seeding subtract_with_carry_01 from a single unsigned long</h3>
+<p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 8 specifies the algorithm by which a subtract_with_carry_01 engine
+is to be seeded given a single unsigned long. This algorithm is seriously
+flawed in the case where the engine parameter w (also known as word_size)
+exceeds 31 [bits]. The key part of the paragraph reads:
+</p>
+<blockquote><p>
+sets x(-r) ... x(-1) to (lcg(1)*2**(-w)) mod 1
+</p></blockquote>
+<p>
+and so forth.
+</p>
+<p>
+Since the specified linear congruential engine, lcg, delivers numbers with
+a maximum of 2147483563 (just a shade under 31 bits), then when w is, for
+example, 48, each of the x(i) will be less than 2**-17. The consequence
+is that roughly the first 400 numbers delivered will be conspicuously
+close to either zero or one.
+</p>
+<p>
+Unfortunately, this is not an innocuous flaw: One of the predefined engines
+in [tr.rand.predef], namely ranlux64_base_01, has w = 48 and would exhibit
+this poor behavior, while the original N1378 proposal states that these
+pre-defined engines are intended to be of "known good properties."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 5.1.4.4 [tr.rand.eng.sub1], replace the "effects" clause for
+void seed(unsigned long value = 19780503) by
+</p>
+
+<blockquote><p>
+<i>Effects:</i> If <tt>value == 0</tt>, sets value to <tt>19780503</tt>. In any
+case, <del>with a linear congruential generator <tt>lcg</tt>(i) having parameters
+<tt><i>m<sub>lcg</sub></i> = 2147483563</tt>, <tt><i>a<sub>lcg</sub></i> = 40014</tt>,
+<tt><i>c<sub>lcg</sub></i> = 0</tt>, and <tt><i>lcg</i>(0) = value</tt>,</del>
+sets <ins>carry<tt>(-1)</tt> and</ins> <tt>x(-r) &#8230; x(-1)</tt>
+<ins>as if executing</ins></p>
+
+<blockquote><pre><ins>
+linear_congruential&lt;unsigned long, 40014, 0, 2147483563&gt; lcg(value);
+seed(lcg);
+</ins></pre></blockquote>
+
+<p>
+<del>to <tt>(<i>lcg</i>(1) · 2<sup>-<i>w</i></sup>) mod 1
+&#8230; (<i>lcg</i>(<i>r</i>) · 2<sup>-<i>w</i></sup>) mod 1</tt>,
+respectively. If <tt><i>x</i>(-1) == 0</tt>, sets carry<tt>(-1) = 2<sup>-<i>w</i></sup></tt>,
+else sets carry<tt>(-1) = 0</tt>.</del></p>
+</blockquote>
+
+<p><i>[
+Jens provided revised wording post Mont Tremblant.
+]</i></p>
+
+
+<p><i>[
+Berlin: N1932 adopts the originally-proposed resolution of the issue.
+Jens's supplied wording is a clearer description of what is
+intended. Moved to Ready.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Jens: I'm using an explicit type here, because fixing the
+prose would probably not qualify for the (with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a> even
+stricter) requirements we have for seed(Gen&amp;).
+</p>
+
+<p><i>[
+Portland: Subsumed by N2111.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="513"></a>513. Size of state for subtract_with_carry_01</h3>
+<p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 3 begins:
+</p>
+<blockquote><p>
+The size of the state is r.
+</p></blockquote>
+<p>
+However, this is not quite consistent with the remainder of the paragraph
+which specifies a total of nr+1 items in the textual representation of
+the state. We recommend the sentence be corrected to match:
+</p>
+<blockquote><p>
+The size of the state is nr+1.
+</p></blockquote>
+<p>
+To give meaning to the coefficient n, it may be also desirable to move
+n's definition from later in the paragraph. Either of the following
+seem reasonable formulations:
+</p>
+<blockquote><p>
+With n=..., the size of the state is nr+1.
+</p></blockquote>
+<blockquote><p>
+The size of the state is nr+1, where n=... .
+</p></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[
+Jens: I plead for "NAD" on the grounds that "size of state" is only
+used as an argument for big-O complexity notation, thus
+constant factors and additions don't count.
+]</i></p>
+
+
+<p><i>[
+Berlin: N1932 adopts the proposed NAD.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="514"></a>514. Size of state for subtract_with_carry</h3>
+<p><b>Section:</b> 26.4.3.3 [rand.eng.sub], TR1 5.1.4.3 [tr.rand.eng.sub] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 2 begins:
+</p>
+<blockquote><p>
+The size of the state is r.
+</p></blockquote>
+<p>
+However, the next sentence specifies a total of r+1 items in the textual
+representation of the state, r specific x's as well as a specific carry.
+This makes a total of r+1 items that constitute the size of the state,
+rather than r.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We recommend the sentence be corrected to match:
+</p>
+<blockquote><p>
+ The size of the state is r+1.
+</p></blockquote>
+
+<p><i>[
+Jens: I plead for "NAD" on the grounds that "size of state" is only
+used as an argument for big-O complexity notation, thus
+constant factors and additions don't count.
+]</i></p>
+
+
+<p><i>[
+Berlin: N1932 adopts the proposed NAD.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="515"></a>515. Random number engine traits</h3>
+<p><b>Section:</b> 26.4.2 [rand.synopsis], TR1 5.1.2 [tr.rand.synopsis] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.synopsis">issues</a> in [rand.synopsis].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+To accompany the concept of a pseudo-random number engine as defined in Table 17,
+we propose and recommend an adjunct template, engine_traits, to be declared in
+[tr.rand.synopsis] as:
+</p>
+<blockquote><pre>template&lt; class PSRE &gt;
+class engine_traits;
+</pre></blockquote>
+<p>
+This template's primary purpose would be as an aid to generic programming involving
+pseudo-random number engines. Given only the facilities described in tr1, it would
+be very difficult to produce any algorithms involving the notion of a generic engine.
+The intent of this proposal is to provide, via engine_traits&lt;&gt;, sufficient
+descriptive information to allow an algorithm to employ a pseudo-random number engine
+without regard to its exact type, i.e., as a template parameter.
+</p>
+<p>
+For example, today it is not possible to write an efficient generic function that
+requires any specific number of random bits. More specifically, consider a
+cryptographic application that internally needs 256 bits of randomness per call:
+</p>
+<blockquote><pre>template&lt; class Eng, class InIter, class OutIter &gt;
+void crypto( Eng&amp; e, InIter in, OutIter out );
+</pre></blockquote>
+<p>
+Without knowning the number of bits of randomness produced per call to a provided
+engine, the algorithm has no means of determining how many times to call the engine.
+</p>
+<p>
+In a new section [tr.rand.eng.traits], we proposed to define the engine_traits
+template as:
+</p>
+<blockquote><pre>template&lt; class PSRE &gt;
+class engine_traits
+{
+ static std::size_t bits_of_randomness = 0u;
+ static std::string name() { return "unknown_engine"; }
+ // TODO: other traits here
+};
+</pre></blockquote>
+<p>
+Further, each engine described in [tr.rand.engine] would be accompanied by a
+complete specialization of this new engine_traits template.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[
+Berlin: Walter: While useful for implementation per TR1, N1932 has no need for this
+feature. Recommend close as NAD.
+]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1932.pdf">N1932</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>
+covers this. Already in WP.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="516"></a>516. Seeding subtract_with_carry_01 using a generator</h3>
+<p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 6 says:
+</p>
+<blockquote><p>
+... obtained by successive invocations of g, ...
+</p></blockquote>
+<p>
+We recommend instead:
+</p>
+<blockquote><p>
+... obtained by taking successive invocations of g mod 2**32, ...
+</p></blockquote>
+<p>
+as the context seems to require only 32-bit quantities be used here.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7. Moved to Ready.
+</p>
+
+<p><i>[
+Portland: Subsumed by N2111.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="517"></a>517. Should include name in external representation</h3>
+<p><b>Section:</b> 26.4.1 [rand.req], TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req">issues</a> in [rand.req].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The last two rows of Table 16 deal with the i/o requirements of an engine,
+specifying that the textual representation of an engine's state,
+appropriately formatted, constitute the engine's external representation.
+</p>
+<p>
+This seems adequate when an engine's type is known. However, it seems
+inadequate in the context of generic code, where it becomes useful and
+perhaps even necessary to determine an engine's type via input.
+</p>
+<p>
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We therefore recommend that, in each of these two rows of Table 16, the
+text "textual representation" be expanded so as to read "engine name
+followed by the textual representation."
+</p>
+
+<p><i>[
+Berlin: N1932 considers this NAD. This is a QOI issue.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="525"></a>525. type traits definitions not clear</h3>
+<p><b>Section:</b> 20.4.4 [meta.unary], TR1 4.5 [tr.meta.unary] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Robert Klarer <b>Date:</b> 2005-07-11</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It is not completely clear how the primary type traits deal with
+cv-qualified types. And several of the secondary type traits
+seem to be lacking a definition.
+</p>
+
+<p><i>[
+Berlin: Howard to provide wording.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Wording provided in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028</a>.
+A
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
+provides more detail for motivation.
+</p>
+
+
+<p><b>Rationale:</b></p>
+Solved by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
+in the WP.
+
+
+
+
+
+<hr>
+<h3><a name="526"></a>526. Is it undefined if a function in the standard changes in parameters?</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2005-09-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Problem: There are a number of places in the C++ standard library where
+it is possible to write what appear to be sensible ways of calling
+functions, but which can cause problems in some (or all)
+implementations, as they cause the values given to the function to be
+changed in a way not specified in standard (and therefore not coded to
+correctly work). These fall into two similar categories.
+</p>
+
+<p>
+1) Parameters taken by const reference can be changed during execution
+of the function
+</p>
+
+<p>
+Examples:
+</p>
+
+<p>
+Given std::vector&lt;int&gt; v:
+</p>
+<p>
+v.insert(v.begin(), v[2]);
+</p>
+<p>
+v[2] can be changed by moving elements of vector
+</p>
+
+
+<p>
+Given std::list&lt;int&gt; l:
+</p>
+<p>
+l.remove(*l.begin());
+</p>
+<p>
+Will delete the first element, and then continue trying to access it.
+This is particularily vicious, as it will appear to work in almost all
+cases.
+</p>
+
+<p>
+2) A range is given which changes during the execution of the function:
+Similarly,
+</p>
+
+<p>
+v.insert(v.begin(), v.begin()+4, v.begin()+6);
+</p>
+
+<p>
+This kind of problem has been partly covered in some cases. For example
+std::copy(first, last, result) states that result cannot be in the range
+[first, last). However, does this cover the case where result is a
+reverse_iterator built from some iterator in the range [first, last)?
+Also, std::copy would still break if result was reverse_iterator(last +
+1), yet this is not forbidden by the standard
+</p>
+
+<p>
+Solution:
+</p>
+
+<p>
+One option would be to try to more carefully limit the requirements of
+each function. There are many functions which would have to be checked.
+However as has been shown in the std::copy case, this may be difficult.
+A simpler, more global option would be to somewhere insert text similar to:
+</p>
+
+<p>
+If the execution of any function would change either any values passed
+by reference or any value in any range passed to a function in a way not
+defined in the definition of that function, the result is undefined.
+</p>
+
+<p>
+Such code would have to at least cover chapters 23 and 25 (the sections
+I read through carefully). I can see no harm on applying it to much of
+the rest of the standard.
+</p>
+
+<p>
+Some existing parts of the standard could be improved to fit with this,
+for example the requires for 25.2.1 (Copy) could be adjusted to:
+</p>
+
+<p>
+Requires: For each non-negative integer n &lt; (last - first), assigning to
+*(result + n) must not alter any value in the range [first + n, last).
+</p>
+
+<p>
+However, this may add excessive complication.
+</p>
+
+<p>
+One other benefit of clearly introducing this text is that it would
+allow a number of small optimisations, such as caching values passed
+by const reference.
+</p>
+
+<p>
+Matt Austern adds that this issue also exists for the <tt>insert</tt> and
+<tt>erase</tt> members of the ordered and unordered associative containers.
+</p>
+
+<p><i>[
+Berlin: Lots of controversey over how this should be solved. Lots of confusion
+as to whether we're talking about self referencing iterators or references.
+Needs a good survey as to the cases where this matters, for which
+implementations, and how expensive it is to fix each case.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD.
+</p>
+<ul>
+<li><tt>vector::insert(iter, value)</tt> is required to work because the standard
+doesn't give permission for it not to work.</li>
+<li><tt>list::remove(value)</tt> is required to work because the standard
+doesn't give permission for it not to work.</li>
+<li><tt>vector::insert(iter, iter, iter)</tt> is not required to work because
+23.1.1 [sequence.reqmts], p4 says so.</li>
+<li><tt>copy</tt> has to work, except where 25.2.1 [alg.copy] says
+it doesn't have to work. While a language lawyer can tear this wording apart,
+it is felt that the wording is not prone to accidental interpretation.</li>
+<li>The current working draft provide exceptions for the unordered associative
+containers similar to the containers requirements which exempt the member
+template insert functions from self referencing.</li>
+</ul>
+
+
+
+
+
+<hr>
+<h3><a name="528"></a>528. <tt>const_iterator</tt> <tt>iterator</tt> issue when they are the same type</h3>
+<p><b>Section:</b> 23.4 [unord], TR1 6.3.4 [tr.unord.unord] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-10-12</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord">active issues</a> in [unord].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord">issues</a> in [unord].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+while implementing the resolution of issue 6.19 I'm noticing the
+following: according to 6.3.4.3/2 (and 6.3.4.5/2), for unordered_set and
+unordered_multiset:
+</p>
+
+<blockquote><p>
+ "The iterator and const_iterator types are both const types. It is
+unspecified whether they are the same type"
+</p></blockquote>
+
+<p>
+Now, according to the resolution of 6.19, we have overloads of insert
+with hint and erase (single and range) both for iterator and
+const_iterator, which, AFAICS, can be meaningful at the same time *only*
+if iterator and const_iterator *are* in fact different types.
+</p>
+<p>
+Then, iterator and const_iterator are *required* to be different types?
+Or that is an unintended consequence? Maybe the overloads for plain
+iterators should be added only to unordered_map and unordered_multimap?
+Or, of course, I'm missing something?
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to 6.3.4.3p2 (and 6.3.4.5p2):
+</p>
+<p>
+2 ... The iterator and const_iterator types are both <del>const</del>
+<ins>constant</ins> iterator types.
+It is unspecified whether they are the same type.
+</p>
+
+<p>
+Add a new subsection to 17.4.4 [lib.conforming]:
+</p>
+
+<blockquote>
+<p>
+An implementation shall not supply an overloaded function
+ signature specified in any library clause if such a signature
+ would be inherently ambiguous during overload resolution
+ due to two library types referring to the same type.
+</p>
+<p>
+ [Note: For example, this occurs when a container's iterator
+ and const_iterator types are the same. -- end note]
+</p>
+</blockquote>
+
+<p><i>[
+Post-Berlin: Beman supplied wording.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+Toronto: The first issue has been fixed by N2350 (the insert and erase members
+are collapsed into one signature). Alisdair to open a separate issue on the
+chapter 17 wording.
+
+
+
+
+
+<hr>
+<h3><a name="532"></a>532. Tuple comparison</h3>
+<p><b>Section:</b> 20.3.1.5 [tuple.rel], TR1 6.1.3.5 [tr.tuple.rel] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
+ <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-11-29</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Where possible, tuple comparison operators &lt;,&lt;=,=&gt;, and &gt; ought to be
+defined in terms of std::less rather than operator&lt;, in order to
+support comparison of tuples of pointers.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+change 6.1.3.5/5 from:
+</p>
+
+<blockquote><p>
+ Returns: The result of a lexicographical comparison between t and
+ u. The result is defined as: (bool)(get&lt;0&gt;(t) &lt; get&lt;0&gt;(u)) ||
+ (!(bool)(get&lt;0&gt;(u) &lt; get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for
+ some tuple r is a tuple containing all but the first element of
+ r. For any two zero-length tuples e and f, e &lt; f returns false.
+</p></blockquote>
+
+<p>
+to:
+</p>
+
+<blockquote>
+<p>
+ Returns: The result of a lexicographical comparison between t and
+ u. For any two zero-length tuples e and f, e &lt; f returns false.
+ Otherwise, the result is defined as: cmp( get&lt;0&gt;(t), get&lt;0&gt;(u)) ||
+ (!cmp(get&lt;0&gt;(u), get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for some
+ tuple r is a tuple containing all but the first element of r, and
+ cmp(x,y) is an unspecified function template defined as follows.
+</p>
+<p>
+ Where T is the type of x and U is the type of y:
+</p>
+
+<p>
+ if T and U are pointer types and T is convertible to U, returns
+ less&lt;U&gt;()(x,y)
+</p>
+
+<p>
+ otherwise, if T and U are pointer types, returns less&lt;T&gt;()(x,y)
+</p>
+
+<p>
+ otherwise, returns (bool)(x &lt; y)
+</p>
+</blockquote>
+
+<p><i>[
+Berlin: This issue is much bigger than just tuple (pair, containers,
+algorithms). Dietmar will survey and work up proposed wording.
+]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. This will be fixed with the next revision of concepts.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="536"></a>536. Container iterator constructor and explicit convertibility</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2005-12-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a></p>
+<p><b>Discussion:</b></p>
+<p>
+The iterator constructor X(i,j) for containers as defined in 23.1.1 and
+23.2.2 does only require that i and j be input iterators but
+nothing is said about their associated value_type. There are three
+sensible
+options:
+</p>
+<ol>
+<li>iterator's value_type is exactly X::value_type (modulo cv).</li>
+<li>iterator's value_type is *implicitly* convertible to X::value_type.</li>
+<li>iterator's value_type is *explicitly* convertible to X::value_type.</li>
+</ol>
+<p>
+The issue has practical implications, and stdlib vendors have
+taken divergent approaches to it: Dinkumware follows 2,
+libstdc++ follows 3.
+</p>
+<p>
+The same problem applies to the definition of insert(p,i,j) for
+sequences and insert(i,j) for associative contianers, as well as
+assign.
+</p>
+
+<p><i>[
+The following added by Howard and the example code was originally written by
+Dietmar.
+]</i></p>
+
+<p>
+Valid code below?
+</p>
+
+<blockquote><pre>#include &lt;vector&gt;
+#include &lt;iterator&gt;
+#include &lt;iostream&gt;
+
+struct foo
+{
+ explicit foo(int) {}
+};
+
+int main()
+{
+ std::vector&lt;int&gt; v_int;
+ std::vector&lt;foo&gt; v_foo1(v_int.begin(), v_int.end());
+ std::vector&lt;foo&gt; v_foo2((std::istream_iterator&lt;int&gt;(std::cin)),
+ std::istream_iterator&lt;int&gt;());
+}
+</pre></blockquote>
+<p><i>[
+Berlin: Some support, not universal, for respecting the explicit qualifier.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="544"></a>544. minor NULL problems in C.2</h3>
+<p><b>Section:</b> C.2 [diff.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-25</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to C.2.2.3, p1, "the macro NULL, defined in any of &lt;clocale&gt;,
+&lt;cstddef&gt;, &lt;cstdio&gt;, &lt;cstdlib&gt;, &lt;cstring&gt;, &lt;ctime&gt;,
+or &lt;cwchar&gt;." This is consistent with the C standard.
+</p>
+<p>
+However, Table 95 in C.2 fails to mention &lt;clocale&gt; and &lt;cstdlib&gt;.
+</p>
+<p>
+In addition, C.2, p2 claims that "The C++ Standard library provides
+54 standard macros from the C library, as shown in Table 95." While
+table 95 does have 54 entries, since a couple of them (including the
+NULL macro) are listed more than once, the actual number of macros
+defined by the C++ Standard Library may not be 54.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+I propose we add &lt;clocale&gt; and &lt;cstdlib&gt; to Table 96 and remove the
+number of macros from C.2, p2 and reword the sentence as follows:
+</p>
+<blockquote><p>
+The C++ Standard library <del>provides 54 standard macros from</del>
+<ins>defines a number macros corresponding to those defined by</ins> the C
+<ins>Standard</ins> library, as shown in Table 96.
+</p></blockquote>
+
+<p><i>[
+Portland: Resolution is considered editorial. It will be incorporated into the WD.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="547"></a>547. division should be floating-point, not integer</h3>
+<p><b>Section:</b> 26.4 [rand], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 10 describes how a variate generator uses numbers produced by an
+engine to pass to a generator. The sentence that concerns me is: "Otherwise, if
+the value for engine_value_type::result_type is true and the value for
+Distribution::input_type is false [i.e. if the engine produces integers and the
+engine wants floating-point values], then the numbers in s_eng are divided by
+engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the
+engine is producing integers, both the numerator and the denominator are
+integers and we'll be doing integer division, which I don't think is what we
+want. Shouldn't we be performing a conversion to a floating-point type first?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD as the affected section is now gone and so the issue is moot.
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="548"></a>548. May random_device block?</h3>
+<p><b>Section:</b> 26.4.6 [rand.device], TR1 5.1.6 [tr.rand.device] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Class random_device "produces non-deterministic random numbers", using some
+external source of entropy. In most real-world systems, the amount of available
+entropy is limited. Suppose that entropy has been exhausted. What is an
+implementation permitted to do? In particular, is it permitted to block
+indefinitely until more random bits are available, or is the implementation
+required to detect failure immediately? This is not an academic question. On
+Linux a straightforward implementation would read from /dev/random, and "When
+the entropy pool is empty, reads to /dev/random will block until additional
+environmental noise is gathered." Programmers need to know whether random_device
+is permitted to (or possibly even required to?) behave the same way.
+</p>
+
+<p><i>[
+Berlin: Walter: N1932 considers this NAD. Does the standard specify whether std::cin
+may block?
+]</i></p>
+
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a> (NAD).
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="549"></a>549. Undefined variable in binomial_distribution</h3>
+<p><b>Section:</b> 26.4.8 [rand.dist], TR1 5.1.7.5 [tr.rand.dist.bin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist">issues</a> in [rand.dist].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 1 says that "A binomial distributon random distribution produces
+integer values i&gt;0 with p(i) = (n choose i) * p*i * (1-p)^(t-i), where t and
+p are the parameters of the distribution. OK, that tells us what t, p, and i
+are. What's n?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1.
+</p>
+
+<p><i>[
+Portland: Subsumed by N2111.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="553"></a>553. very minor editorial change intptr_t / uintptr_t</h3>
+<p><b>Section:</b> 18.3.1 [cstdint.syn], TR1 8.22.1 [tr.c99.cstdint.syn] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-01-30</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the synopsis, some types are identified as optional: int8_t, int16_t,
+and so on, consistently with C99, indeed.
+</p>
+<p>
+On the other hand, intptr_t and uintptr_t, are not marked as such and
+probably should, consistently with C99, 7.18.1.4.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 18.3.1 [cstdint.syn]:
+</p>
+
+<blockquote><pre>...
+typedef <i>signed integer type</i> intptr_t; <ins><i>// optional</i></ins>
+...
+typedef <i>unsigned integer type</i> uintptr_t; <ins><i>// optional</i></ins>
+...
+</pre></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+Recommend NAD and fix as editorial with the proposed resolution.
+
+
+
+
+
+<hr>
+<h3><a name="554"></a>554. Problem with lwg DR 184 numeric_limits&lt;bool&gt;</h3>
+<p><b>Section:</b> 18.2.1.5 [numeric.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.special">issues</a> in [numeric.special].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I believe we have a bug in the resolution of:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">lwg 184</a>
+(WP status).
+</p>
+
+<p>
+The resolution spells out each member of <tt>numeric_limits&lt;bool&gt;</tt>.
+The part I'm having a little trouble with is:
+</p>
+<blockquote><pre>static const bool traps = false;
+</pre></blockquote>
+
+<p>
+Should this not be implementation defined? Given:
+</p>
+
+<blockquote><pre>int main()
+{
+ bool b1 = true;
+ bool b2 = false;
+ bool b3 = b1/b2;
+}
+</pre></blockquote>
+
+<p>
+If this causes a trap, shouldn't <tt>numeric_limits&lt;bool&gt;::traps</tt> be
+<tt>true</tt>?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 18.2.1.5p3:
+</p>
+
+<blockquote><p>
+-3- The specialization for <tt>bool</tt> shall be provided as follows: </p>
+<blockquote><pre>namespace std {
+ template &lt;&gt; class numeric_limits&lt;bool&gt; {
+ ...
+ static const bool traps = <del>false</del> <ins><i>implementation-defined</i></ins>;
+ ...
+ };
+}
+</pre></blockquote>
+</blockquote>
+
+<p><i>[
+Redmond: NAD because traps refers to values, not operations. There is no bool
+value that will trap.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="555"></a>555. TR1, 8.21/1: typo</h3>
+<p><b>Section:</b> TR1 8.21 [tr.c99.boolh] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This one, if nobody noticed it yet, seems really editorial:
+s/cstbool/cstdbool/
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 8.21p1:
+</p>
+<blockquote><p>
+-1- The header behaves as if it defines the additional macro defined in
+<tt>&lt;cst<ins>d</ins>bool&gt;</tt> by including the header <tt>&lt;cstdbool&gt;</tt>.
+</p></blockquote>
+
+<p><i>[
+Redmond: Editorial.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="558"></a>558. lib.input.iterators Defect</h3>
+<p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> David Abrahams <b>Date:</b> 2006-02-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<blockquote>
+<p>
+ 24.1.1 Input iterators [lib.input.iterators]
+</p>
+<p>
+ 1 A class or a built-in type X satisfies the requirements of an
+ input iterator for the value type T if the following expressions are
+ valid, where U is the type of any specified member of type T, as
+ shown in Table 73.
+</p>
+</blockquote>
+<p>
+There is no capital U used in table 73. There is a lowercase u, but
+that is clearly not meant to denote a member of type T. Also, there's
+no description in 24.1.1 of what lowercase a means. IMO the above
+should have been...Hah, a and b are already covered in 24.1/11, so maybe it
+should have just been:
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 24.1.1p1:
+</p>
+<blockquote><p>
+-1- A class or a built-in type <tt>X</tt> satisfies the requirements of an
+input iterator for the value type <tt>T</tt> if the following expressions
+are valid<del>, where <tt>U</tt> is the type of any specified member of type
+<tt>T</tt>,</del> as shown in Table 73.
+</p></blockquote>
+
+<p><i>[
+Portland: Editorial.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="560"></a>560. User-defined allocators without default constructor</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Sergey P. Derevyago <b>Date:</b> 2006-02-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<h4>1. The essence of the problem.</h4>
+<p>
+User-defined allocators without default constructor are not explicitly
+supported by the standard but they can be supported just like std::vector
+supports elements without default constructor.
+</p>
+<p>
+As a result, there exist implementations that work well with such allocators
+and implementations that don't.
+</p>
+
+<h4>2. The cause of the problem.</h4>
+<p>
+1) The standard doesn't explicitly state this intent but it should. In
+particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator
+instances that compare non-equal. So it can similarly state the intent w.r.t.
+the user-defined allocators without default constructor.
+</p>
+<p>
+2) Some container operations are obviously underspecified. In particular,
+21.3.7.1p2 tells:
+</p>
+<blockquote><pre>template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt; operator+(
+ const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs
+ );
+</pre>
+<p>
+Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs) + rhs</tt>.
+</p>
+</blockquote>
+<p>
+That leads to the basic_string&lt;charT,traits,Allocator&gt;(lhs, Allocator()) call.
+Obviously, the right requirement is:
+</p>
+<blockquote><p>
+Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs, rhs.get_allocator()) + rhs</tt>.
+</p></blockquote>
+<p>
+It seems like a lot of DRs can be submitted on this "Absent call to
+get_allocator()" topic.
+</p>
+
+<h4>3. Proposed actions.</h4>
+<p>
+1) Explicitly state the intent to allow for user-defined allocators without
+default constructor in 20.1.5 Allocator requirements.
+</p>
+<p>
+2) Correct all the places, where a correct allocator object is available
+through the get_allocator() call but default Allocator() gets passed instead.
+</p>
+<h4>4. Code sample.</h4>
+<p>
+Let's suppose that the following memory pool is available:
+</p>
+<blockquote><pre>class mem_pool {
+ // ...
+ void* allocate(size_t size);
+ void deallocate(void* ptr, size_t size);
+};
+</pre></blockquote>
+<p>
+So the following allocator can be implemented via this pool:
+</p>
+<blockquote><pre>class stl_allocator {
+ mem_pool&amp; pool;
+
+ public:
+ explicit stl_allocator(mem_pool&amp; mp) : pool(mp) {}
+ stl_allocator(const stl_allocator&amp; sa) : pool(sa.pool) {}
+ template &lt;class U&gt;
+ stl_allocator(const stl_allocator&lt;U&gt;&amp; sa) : pool(sa.get_pool()) {}
+ ~stl_allocator() {}
+
+ pointer allocate(size_type n, std::allocator&lt;void&gt;::const_pointer = 0)
+ {
+ return (n!=0) ? static_cast&lt;pointer&gt;(pool.allocate(n*sizeof(T))) : 0;
+ }
+
+ void deallocate(pointer p, size_type n)
+ {
+ if (n!=0) pool.deallocate(p, n*sizeof(T));
+ }
+
+ // ...
+};
+</pre></blockquote>
+<p>
+Then the following code works well on some implementations and doesn't work on
+another:
+</p>
+<blockquote><pre>typedef basic_string&lt;char, char_traits&lt;char&gt;, stl_allocator&lt;char&gt; &gt;
+ tl_string;
+mem_pool mp;
+tl_string s1("abc", stl_allocator&lt;int&gt;(mp));
+printf("(%s)\n", ("def"+s1).c_str());
+</pre></blockquote>
+<p>
+In particular, on some implementations the code can't be compiled without
+default stl_allocator() constructor.
+</p>
+<p>
+The obvious way to solve the compile-time problems is to intentionally define
+a NULL pointer dereferencing default constructor
+</p>
+<blockquote><pre>stl_allocator() : pool(*static_cast&lt;mem_pool*&gt;(0)) {}
+</pre></blockquote>
+<p>
+in a hope that it will not be called. The problem is that it really gets
+called by operator+(const char*, const string&amp;) under the current 21.3.7.1p2
+wording.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. <tt>operator+()</tt> with <tt>string</tt> already requires the desired
+semantics of copying the allocator from one of the strings (<i>lhs</i> when there is a choice).
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="569"></a>569. Postcondition for basic_ios::clear(iostate) incorrectly stated</h3>
+<p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
+ <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-03-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a></p>
+<p><b>Discussion:</b></p>
+<p>
+Section: 27.4.4.3 [lib.iostate.flags]
+</p>
+<p>
+Paragraph 4 says:
+</p>
+<blockquote>
+<blockquote><pre>void clear(iostate <i>state</i> = goodbit);
+</pre></blockquote>
+<p>
+<i>Postcondition:</i> If <tt>rdbuf()!=0</tt> then <tt><i>state</i> == rdstate();</tt>
+otherwise <tt>rdstate()==<i>state</i>|ios_base::badbit</tt>.
+</p>
+</blockquote>
+
+<p>
+The postcondition "rdstate()==state|ios_base::badbit" is parsed as
+"(rdstate()==state)|ios_base::badbit", which is probably what the
+committee meant.
+</p>
+
+
+
+
+<p><b>Rationale:</b></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="571"></a>571. Update C90 references to C99?</h3>
+<p><b>Section:</b> 1.2 [intro.refs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#intro.refs">issues</a> in [intro.refs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC
+9899:1990, Programming languages - C. Should that be changed to ISO/IEC
+9899:1999?
+</p>
+<p>
+What impact does this have on the library?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 1.2/1 [intro.refs] of the WP, change:
+</p>
+<blockquote>
+<ul>
+<li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i></li>
+</ul>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+Recommend NAD, fixed editorially.
+
+
+
+
+
+<hr>
+<h3><a name="572"></a>572. Oops, we gave 507 WP status</h3>
+<p><b>Section:</b> 26.4 [rand], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-04-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot:
+variate_generator has been eliminated. Then in full committee we voted to give
+this issue WP status (mistakenly).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Strike the proposed resolution of issue 507.
+</p>
+<p><i>[
+post-Portland: Walter and Howard recommend NAD. The proposed resolution of 507 no longer
+exists in the current WD.
+]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+NAD. Will be moot once
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2135.pdf">N2135</a>
+is adopted.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="583"></a>583. div() for unsigned integral types</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There is no div() function for unsigned integer types.
+</p>
+<p>
+There are several possible resolutions. The simplest one is noted below. Other
+possibilities include a templated solution.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to 26.7 [lib.c.math] paragraph 8:
+</p>
+
+<blockquote><pre>struct udiv_t div(unsigned, unsigned);
+struct uldiv_t div(unsigned long, unsigned long);
+struct ulldiv_t div(unsigned long long, unsigned long long);
+</pre></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+Toronto: C99 does not have these unsigned versions because
+the signed version exist just to define the implementation-defined behavior
+of signed integer division. Unsigned integer division has no implementation-defined
+behavior and thus does not need this treatment.
+
+
+
+
+
+<hr>
+<h3><a name="584"></a>584. missing int pow(int,int) functionality</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There is no pow() function for any integral type.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add something like:
+</p>
+
+<blockquote><pre>template&lt; typename T&gt;
+T power( T x, int n );
+// requires: n &gt;=0
+</pre></blockquote>
+
+
+<p><b>Rationale:</b></p>
+Toronto: We already have double pow(integral, integral) from 26.7 [c.math] p11.
+
+
+
+
+
+<hr>
+<h3><a name="587"></a>587. iststream ctor missing description</h3>
+<p><b>Section:</b> D.7.2.1 [depr.istrstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The <code>iststream(char*, streamsize)</code> ctor is in the class
+synopsis in D.7.2 but its signature is missing in the description
+below (in D.7.2.1).
+
+ </p>
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+This seems like a simple editorial issue and the missing signature can
+be added to the one for <code>const char*</code> in paragraph 2.
+
+ </p>
+
+<p><i>[
+post Oxford: Noted that it is already fixed in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="590"></a>590. Type traits implementation latitude should be removed for C++0x</h3>
+<p><b>Section:</b> 20.4 [meta], TR1 4.9 [tr.meta.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-08-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta">issues</a> in [meta].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type
+traits implementers that is not needed in C++0x. It includes the wording:
+</p>
+
+<blockquote><p>
+[<i>Note:</i> the latitude granted to implementers in this clause is temporary,
+and is expected to be removed in future revisions of this document. -- <i>end note</i>]
+</p></blockquote>
+
+<p>
+Note:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">N2157: Minor Modifications to the type traits Wording</a>
+also has the intent of removing this wording from the WP.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove 20.4.9 [lib.meta.req] in its entirety from the WP.
+</p>
+
+<p><i>[
+post-Oxford: Recommend NAD Editorial. This resolution is now in the
+current working draft.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="591"></a>591. Misleading "built-in</h3>
+<p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> whyglinux <b>Date:</b> 2006-08-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+18.2.1.2 numeric_limits members [lib.numeric.limits.members]
+Paragraph 7:
+</p>
+<blockquote><p>
+"For built-in integer types, the number of non-sign bits in the
+representation."
+</p></blockquote>
+
+<p>
+26.1 Numeric type requirements [lib.numeric.requirements]
+Footnote:
+</p>
+
+<blockquote><p>
+"In other words, value types. These include built-in arithmetic types,
+pointers, the library class complex, and instantiations of valarray for
+value types."
+</p></blockquote>
+
+<p>
+Integer types (which are bool, char, wchar_t, and the signed and
+unsigned integer types) and arithmetic types (which are integer and
+floating types) are all built-in types and thus there are no
+non-built-in (that is, user-defined) integer or arithmetic types. Since
+the redundant "built-in" in the above 2 sentences can mislead that
+there may be built-in or user-defined integer and arithmetic types
+(which is not correct), the "built-in" should be removed.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+18.2.1.2 numeric_limits members [lib.numeric.limits.members]
+Paragraph 7:
+</p>
+<blockquote><p>
+"For <del>built-in</del> integer types, the number of non-sign bits in the
+representation."
+</p></blockquote>
+
+<p>
+26.1 Numeric type requirements [lib.numeric.requirements]
+Footnote:
+</p>
+
+<blockquote><p>
+"In other words, value types. These include <del>built-in</del> arithmetic types,
+pointers, the library class complex, and instantiations of valarray for
+value types."
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD / Editorial. The proposed resolution is accepted as editorial.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="592"></a>592. Incorrect treatment of rdbuf()-&gt;close() return type</h3>
+<p><b>Section:</b> 27.8.1.9 [ifstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
+ <b>Submitter:</b> Christopher Kohlhoff <b>Date:</b> 2006-08-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I just spotted a minor problem in 27.8.1.7
+[lib.ifstream.members] para 4 and also 27.8.1.13
+[lib.fstream.members] para 4. In both places it says:
+</p>
+<blockquote>
+<pre>void close();
+</pre>
+<p>
+Effects: Calls rdbuf()-&gt;close() and, if that function returns false, ...
+</p>
+</blockquote>
+<p>
+However, basic_filebuf::close() (27.8.1.2) returns a pointer to the
+filebuf on success, null on failure, so I think it is meant to
+say "if that function returns a null pointer". Oddly, it is
+correct for basic_ofstream.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 27.8.1.9 [ifstream.members], p5:
+</p>
+
+<blockquote><p>
+<i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
+<ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
+calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
+(27.4.4.3)).
+</p></blockquote>
+
+<p>
+Change 27.8.1.17 [fstream.members], p5:
+</p>
+
+<blockquote><p>
+<i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
+<ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
+calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
+(27.4.4.3)).
+</p></blockquote>
+
+
+
+<p><i>[
+Kona (2007): Proposed Disposition: NAD, Editorial
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="594"></a>594. Disadvantages of defining Swappable in terms of CopyConstructible and Assignable</h3>
+<p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
+ <b>Submitter:</b> Niels Dekker <b>Date:</b> 2006-11-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It seems undesirable to define the Swappable requirement in terms of
+CopyConstructible and Assignable requirements. And likewise, once the
+MoveConstructible and MoveAssignable requirements (N1860) have made it
+into the Working Draft, it seems undesirable to define the Swappable
+requirement in terms of those requirements. Instead, it appears
+preferable to have the Swappable requirement defined exclusively in
+terms of the existence of an appropriate swap function.
+</p>
+<p>
+Section 20.1.4 [lib.swappable] of the current Working Draft (N2009)
+says:
+</p>
+<blockquote><p>
+The Swappable requirement is met by satisfying one or more of the
+following conditions:</p>
+<ul>
+<li>
+T is Swappable if T satisfies the CopyConstructible requirements
+(20.1.3) and the Assignable requirements (23.1);
+</li>
+<li>
+T is Swappable if a namespace scope function named swap exists in the
+same namespace as the definition of T, such that the expression
+swap(t,u) is valid and has the semantics described in Table 33.
+</li>
+</ul>
+</blockquote>
+I can think of three disadvantages of this definition:
+<ol>
+<li>
+If a client's type T satisfies the first condition (T is both
+CopyConstructible and Assignable), the client cannot stop T from
+satisfying the Swappable requirement without stopping T from
+satisfying the first condition.
+<p>
+A client might want to stop T from satisfying the Swappable
+requirement, because swapping by means of copy construction and
+assignment might throw an exception, and she might find a throwing
+swap unacceptable for her type. On the other hand, she might not feel
+the need to fully implement her own swap function for this type. In
+this case she would want to be able to simply prevent algorithms that
+would swap objects of type T from being used, e.g., by declaring a
+swap function for T, and leaving this function purposely undefined.
+This would trigger a link error, if an attempt would be made to use
+such an algorithm for this type. For most standard library
+implementations, this practice would indeed have the effect of
+stopping T from satisfying the Swappable requirement.
+</p>
+</li>
+<li>
+A client's type T that does not satisfy the first condition can not be
+made Swappable by providing a specialization of std::swap for T.
+<p>
+While I'm aware about the fact that people have mixed feelings about
+providing a specialization of std::swap, it is well-defined to do so.
+It sounds rather counter-intuitive to say that T is not Swappable, if
+it has a valid and semantically correct specialization of std::swap.
+Also in practice, providing such a specialization will have the same
+effect as satisfying the Swappable requirement.
+</p>
+</li>
+<li>
+For a client's type T that satisfies both conditions of the Swappable
+requirement, it is not specified which of the two conditions prevails.
+After reading section 20.1.4 [lib.swappable], one might wonder whether
+objects of T will be swapped by doing copy construction and
+assignments, or by calling the swap function of T.
+<p>
+I'm aware that the intention of the Draft is to prefer calling the
+swap function of T over doing copy construction and assignments. Still
+in my opinion, it would be better to make this clear in the wording of
+the definition of Swappable.
+</p>
+</li>
+</ol>
+<p>
+I would like to have the Swappable requirement defined in such a way
+that the following code fragment will correctly swap two objects of a
+type T, if and only if T is Swappable:
+</p>
+<pre> using std::swap;
+ swap(t, u); // t and u are of type T.
+</pre>
+<p>
+This is also the way Scott Meyers recommends calling a swap function,
+in Effective C++, Third Edition, item 25.
+</p>
+<p>
+Most aspects of this issue have been dealt with in a discussion on
+comp.std.c++ about the Swappable requirement, from 13 September to 4
+October 2006, including valuable input by David Abrahams, Pete Becker,
+Greg Herlihy, Howard Hinnant and others.
+</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change section 20.1.4 [lib.swappable] as follows:
+</p>
+<blockquote><p>
+The Swappable requirement is met by satisfying
+<del>one or more of the following conditions:</del>
+<ins>the following condition:</ins></p>
+<ul>
+
+<li>
+<del>T is Swappable if T satisfies the CopyConstructible requirements
+(20.1.3) and the Assignable requirements (23.1);</del>
+</li>
+<li>
+<del>
+T is Swappable if a namespace scope function named swap exists in the
+same namespace as the definition of T, such that the expression
+swap(t,u) is valid and has the semantics described in Table 33.
+</del>
+T is Swappable if an unqualified function call swap(t,u) is valid
+within the namespace std, and has the semantics described in Table 33.
+</li>
+</ul>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD. Concepts, specifically
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2082.pdf">N2082</a>
+and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2084.pdf">N2084</a>,
+will essentially rewrite this section and provide the desired semantics.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="615"></a>615. Inconsistencies in Section 21.4</h3>
+<p><b>Section:</b> 21.5 [c.strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.strings">issues</a> in [c.strings].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the current draft N2134, 21.4/1 says
+</p>
+<p>
+"Tables 59,228) 60, 61, 62,and 63 229) 230) describe headers &lt;cctype&gt;,
+&lt;cwctype&gt;, &lt;cstring&gt;, &lt;cwchar&gt;, and &lt;cstdlib&gt; (character conversions),
+respectively."
+</p>
+<p>
+Here footnote 229 applies to table 62, not table 63.
+</p>
+<p>
+Also, footnote 230 lists the new functions in table 63, "atoll, strtoll,
+strtoull, strtof, and strtold added by TR1". However, strtof is not present
+in table 63.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Recommend NAD, editorial. Send to Pete.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="633"></a>633. Return clause mentions undefined "type()"</h3>
+<p><b>Section:</b> 20.5.15.2.5 [func.wrap.func.targ] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+20.5.15.2.5 [func.wrap.func.targ], p4 says:
+</p>
+<blockquote><p>
+<i>Returns:</i> If <tt>type() == typeid(T)</tt>, a pointer to the stored
+function target; otherwise a null pointer.
+</p></blockquote>
+
+<ol>
+<li>
+There exists neither a type, a typedef <tt>type</tt>, nor member
+function <tt>type()</tt> in class template function nor in the global or
+<tt>std</tt> namespace.
+</li>
+<li>
+Assuming that <tt>type</tt> should have been <tt>target_type()</tt>,
+this description would lead to false results, if <tt>T = <i>cv</i>
+void</tt> due to returns clause 20.5.15.2.5 [func.wrap.func.targ], p1.
+</li>
+</ol>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.5.15.2.5 [func.wrap.func.targ], p4:
+</p>
+
+<blockquote><p>
+<i>Returns:</i> If <tt><del>type()</del> <ins>target_type()</ins> == typeid(T) <ins>&amp;&amp; typeid(T) !=
+typeid(void)</ins></tt>, a pointer to the stored function target;
+otherwise a null pointer.
+</p></blockquote>
+
+<p><i>[
+Pete: Agreed. It's editorial, so I'll fix it.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="636"></a>636. 26.5.2.3 valarray::operator[]</h3>
+<p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The signature of the const operator[] has been changed to return a const
+reference.
+</p>
+<p>
+The description in paragraph 1 still says that the operator returns by
+value.
+</p>
+<p><i>[
+Pete recommends editorial fix.
+]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="637"></a>637. [c.math]/10 inconsistent return values</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-13</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+26.7 [c.math], paragraph 10 has long lists of added signatures for float and long double
+functions. All the signatures have float/long double return values, which is
+inconsistent with some of the double functions they are supposed to
+overload.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.7 [c.math], paragraph 10,
+</p>
+
+<blockquote><pre><del>float</del> <ins>int</ins> ilogb(float);
+<del>float</del> <ins>long</ins> lrint(float);
+<del>float</del> <ins>long</ins> lround(float);
+<del>float</del> <ins>long long</ins> llrint(float);
+<del>float</del> <ins>long long</ins> llround(float);
+
+<del>long double</del> <ins>int</ins> ilogb(long double);
+<del>long double</del> <ins>long</ins> lrint(long double);
+<del>long double</del> <ins>long</ins> lround(long double);
+<del>long double</del> <ins>long long</ins> llrint(long double);
+<del>long double</del> <ins>long long</ins> llround(long double);
+</pre></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="639"></a>639. Still problems with exceptions during streambuf IO</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors], 27.6.2.6.3 [ostream.inserters] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There already exist two active DR's for the wording of 27.6.1.2.3 [istream::extractors]/13
+from 14882:2003(E), namely <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#413">413</a>.
+</p>
+
+<p>
+Even with these proposed corrections, already maintained in N2134,
+I have the feeling, that the current wording does still not properly
+handle the "exceptional" situation. The combination of para 14
+</p>
+
+<blockquote><p>
+"[..] Characters are extracted and inserted until
+any of the following occurs:
+</p>
+<p>
+[..]
+</p>
+<p>
+- an exception occurs (in which case the exception is caught)."
+</p></blockquote>
+
+<p>
+and 15
+</p>
+
+<blockquote><p>
+"If the function inserts no characters, it calls setstate(failbit),
+which
+may throw ios_base::failure (27.4.4.3). If it inserted no characters
+because it caught an exception thrown while extracting characters
+from *this and failbit is on in exceptions() (27.4.4.3), then the
+caught
+exception is rethrown."
+</p></blockquote>
+
+<p>
+both in N2134 seems to imply that any exception, which occurs
+*after* at least one character has been inserted is caught and lost
+for
+ever. It seems that even if failbit is on in exceptions() rethrow is
+not
+allowed due to the wording "If it inserted no characters because it
+caught an exception thrown while extracting".
+</p>
+
+<p>
+Is this behaviour by design?
+</p>
+
+<p>
+I would like to add that its output counterpart in 27.6.2.6.3 [ostream.inserters]/7-9
+(also
+N2134) does not demonstrate such an exception-loss-behaviour.
+On the other side, I wonder concerning several subtle differences
+compared to input::
+</p>
+<p>
+1) Paragraph 8 says at its end:
+</p>
+
+<blockquote><p>
+"- an exception occurs while getting a character from sb."
+</p></blockquote>
+
+<p>
+Note that there is nothing mentioned which would imply that such
+an exception will be caught compared to 27.6.1.2.3 [istream::extractors]/14.
+</p>
+
+<p>
+2) Paragraph 9 says:
+</p>
+
+<blockquote><p>
+"If the function inserts no characters, it calls setstate(failbit)
+(which
+may throw ios_base::failure (27.4.4.3)). If an exception was thrown
+while extracting a character, the function sets failbit in error
+state,
+and if failbit is on in exceptions() the caught exception is
+rethrown."
+</p></blockquote>
+
+<p>
+The sentence starting with "If an exception was thrown" seems to
+imply that such an exception *should* be caught before.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+(a) In 27.6.1.2.3 [istream::extractors]/15 (N2134) change the sentence
+</p>
+
+<blockquote><p>
+If the function inserts no characters, it calls
+<tt>setstate(failbit)</tt>, which may throw <tt>ios_base::failure</tt>
+(27.4.4.3). If <del>it inserted no characters because it caught an
+exception thrown while extracting characters from <tt>*this</tt></del>
+<ins>an exception was thrown while extracting a character from
+<tt>*this</tt>, the function sets <tt>failbit</tt> in error state,</ins>
+and <tt>failbit</tt> is on in <tt>exceptions()</tt> (27.4.4.3), then the
+caught exception is rethrown.
+</p></blockquote>
+
+<p>
+(b) In 27.6.2.6.3 [ostream.inserters]/8 (N2134) change the sentence:
+</p>
+
+<blockquote>
+<p>
+Gets characters from <tt>sb</tt> and inserts them in <tt>*this</tt>.
+Characters are read from <tt>sb</tt> and inserted until any of the
+following occurs:
+</p>
+<ul>
+<li>end-of-file occurs on the input sequence;</li>
+<li>inserting in the output sequence fails (in which case the character to be inserted is not extracted);</li>
+<li>an exception occurs while getting a character from <tt>sb</tt> <ins>(in which
+case the exception is caught)</ins>.</li>
+</ul>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+This extractor is described as a formatted input function so the
+exception behavior is already specified. There is additional behavior
+described in this section that applies to the case in which failbit is
+set. This doesn't contradict the usual exception behavior for formatted
+input functions because that applies to the case in which badbit is set.
+
+
+
+
+
+<hr>
+<h3><a name="641"></a>641. Editorial fix for 27.6.4 (N2134)</h3>
+<p><b>Section:</b> 27.6.4 [ext.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ext.manip">issues</a> in [ext.manip].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The function <tt>f</tt> in para 4 (27.6.4 [ext.manip]) references an unknown <tt>strm</tt>
+in the following line:
+</p>
+
+<blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, strm, err, mon);
+</pre></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 27.6.4 [ext.manip], p4:
+</p>
+
+<blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, str<del>m</del>, err, mon);
+</pre></blockquote>
+
+<p><i>[
+Oxford: Editorial.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="642"></a>642. Invalidated fstream footnotes in N2134</h3>
+<p><b>Section:</b> 27.8.1.9 [ifstream.members], 27.8.1.13 [ofstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard wording of N2134 has extended the 14882:2003(E)
+wording for the ifstream/ofstream/fstream open function to fix
+a long standing problem, see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#409">409</a>.
+</p>
+
+<p>
+Now it's properly written as
+</p>
+
+<blockquote><p>
+"If that function does not return a null pointer calls clear(),
+otherwise
+calls setstate(failbit)[..]"
+</p></blockquote>
+
+<p>
+instead of the previous
+</p>
+
+<blockquote><p>
+"If that function returns a null pointer, calls setstate(failbit)[..]
+</p></blockquote>
+
+<p>
+While the old footnotes saying
+</p>
+
+<blockquote><p>
+"A successful open does not change the error state."
+</p></blockquote>
+
+<p>
+where correct and important, they are invalid now for ifstream and
+ofstream (because clear *does* indeed modify the error state) and
+should be removed (Interestingly fstream itself never had these,
+although
+they where needed for that time).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.8.1.9 [ifstream.members], remove footnote:
+</p>
+
+<blockquote><p>
+<del><sup>334)</sup> A successful open does not change the error state.</del>
+</p></blockquote>
+
+<p>
+In 27.8.1.13 [ofstream.members], remove footnote:
+</p>
+
+<blockquote><p>
+<del><sup>335)</sup> A successful open does not change the error state.</del>
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="647"></a>647. Inconsistent regex_search params</h3>
+<p><b>Section:</b> 28.11.3 [re.alg.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+28.11.3 [re.alg.search]/5 declares
+</p>
+
+<blockquote><pre>template &lt;class iterator, class charT, class traits&gt;
+bool regex_search(iterator first, iterator last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+</pre></blockquote>
+
+<p>
+where it's not explained, which iterator category
+the parameter iterator belongs to. This is inconsistent
+to the preceding declaration in the synopsis section
+28.4 [re.syn], which says:
+</p>
+
+<blockquote><pre>template &lt;class BidirectionalIterator, class charT, class traits&gt;
+bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+</pre></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 28.11.3 [re.alg.search]/5 replace all three occurences of param "iterator" with
+"BidirectionalIterator"
+</p>
+
+<blockquote><pre>template &lt;class <del>iterator</del> <ins>BidirectionalIterator</ins>, class charT, class traits&gt;
+ bool regex_search(<del>iterator</del> <ins>BidirectionalIterator</ins> first, <del>iterator</del> <ins>BidirectionalIterator</ins> last,
+ const basic_regex&lt;charT, traits&gt;&amp; e,
+ regex_constants::match_flag_type flags =
+ regex_constants::match_default);
+</pre>
+<p>
+-6- <i>Effects:</i> Behaves "as if" by constructing an object what of
+type <tt>match_results&lt;<del>iterator</del>
+<ins>BidirectionalIterator</ins>&gt;</tt> and then returning the result
+of <tt>regex_search(first, last, what, e, flags)</tt>.
+</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+Applied to working paper while issue was still in New status.
+
+
+
+
+
+<hr>
+<h3><a name="648"></a>648. regex_iterator c'tor needs clarification/editorial fix</h3>
+<p><b>Section:</b> 28.12.1.1 [re.regiter.cnstr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 28.12.1.1 [re.regiter.cnstr]/2 the effects paragraph starts with:
+</p>
+
+<blockquote>
+<p>
+<i>Effects:</i> Initializes begin and end to point to the beginning and the
+end of the target sequence, sets pregex to &amp;re, sets flags to f,[..]
+</p></blockquote>
+
+<p>
+There are two issues with this description:
+</p>
+
+<ol>
+<li>
+The meaning of very first part of this quote is unclear, because
+there is no target sequence provided, instead there are given two
+parameters a and b, both of type BidirectionalIterator. The mentioned
+part does not explain what a and b represent.
+</li>
+<li>
+There does not exist any parameter f, but instead a parameter
+m in the constructor declaration, so this is actually an editorial
+fix.
+</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 28.12.1.1 [re.regiter.cnstr]/2 change the above quoted part by
+</p>
+
+<blockquote><p>
+<i>Effects:</i> Initializes <tt>begin</tt> and <tt>end</tt> to point to
+the beginning and the end of the target sequence <ins>designated by the
+iterator range <tt>[a, b)</tt></ins>, sets <tt>pregex</tt> to
+<tt>&amp;re</tt>, sets <tt>flags</tt> to <tt><del>f</del>
+<ins>m</ins></tt>, then calls <tt>regex_search(begin, end, match,
+*pregex, flags)</tt>. If this call returns <tt>false</tt> the
+constructor sets <tt>*this</tt> to the end-of-sequence iterator.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="649"></a>649. Several typos in regex_token_iterator constructors</h3>
+<p><b>Section:</b> 28.12.2.1 [re.tokiter.cnstr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter.cnstr">issues</a> in [re.tokiter.cnstr].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 28.12.2.1 [re.tokiter.cnstr]/1+2 both the constructor declaration
+and the following text shows some obvious typos:
+</p>
+<p>
+1) The third constructor form is written as
+</p>
+<blockquote><pre>template &lt;std::size_t N&gt;
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+ const regex_type&amp; re,
+ const int (&amp;submatches)[R],
+ regex_constants::match_flag_type m =
+ regex_constants::match_default);
+</pre></blockquote>
+
+<p>
+where the dimensions of submatches are specified by an
+unknown value R, which should be N.
+</p>
+<p>
+2) Paragraph 2 of the same section says in its last sentence:
+</p>
+
+<blockquote><p>
+The third constructor initializes the member <tt>subs</tt> to hold a
+copy of the sequence of integer values pointed to by the iterator range
+<tt>[&amp;submatches, &amp;submatches + R)</tt>.
+</p></blockquote>
+
+<p>
+where again R must be replaced by N.
+</p>
+
+<p>
+3) Paragraph 3 of the same section says in its first sentence:
+</p>
+
+<blockquote><p>
+Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
+<tt>position</tt> to <tt>position_iterator(a, b, re, f)</tt>.
+</p></blockquote>
+
+<p>
+where a non-existing parameter "f" is mentioned, which must be
+replaced
+by the parameter "m".
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 28.12.2.1 [re.tokiter.cnstr]/1:
+</p>
+<blockquote><pre>template &lt;std::size_t N&gt;
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
+ const regex_type&amp; re,
+ const int (&amp;submatches)[<del>R</del> <ins>N</ins>],
+ regex_constants::match_flag_type m =
+ regex_constants::match_default);
+</pre></blockquote>
+
+<p>
+Change 28.12.2.1 [re.tokiter.cnstr]/2:
+</p>
+
+<blockquote><p>
+<i>Effects:</i> The first constructor initializes the member
+<tt>subs</tt> to hold the single value <tt>submatch</tt>. The second
+constructor initializes the member <tt>subs</tt> to hold a copy of the
+argument <tt>submatches</tt>. The third constructor initializes the
+member <tt>subs</tt> to hold a copy of the sequence of integer values
+pointed to by the iterator range <tt>[&amp;submatches, &amp;submatches +
+<del>R</del> <ins>N</ins>)</tt>.
+</p></blockquote>
+
+<p>
+Change 28.12.2.1 [re.tokiter.cnstr]/3:
+</p>
+
+<blockquote><p>
+Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
+<tt>position</tt> to <tt>position_iterator(a, b, re, <del>f</del>
+<ins>m</ins>)</tt>. If <tt>position</tt> is not an end-of-sequence
+iterator the constructor sets <tt>result</tt> to the address of the
+current match. Otherwise if any of the values stored in <tt>subs</tt> is
+equal to <tt>-1</tt> the constructor sets <tt>*this</tt> to a suffix
+iterator that points to the range <tt>[a, b)</tt>, otherwise the
+constructor sets <tt>*this</tt> to an end-of-sequence iterator.
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="656"></a>656. Typo in subtract_with_carry_engine declaration</h3>
+<p><b>Section:</b> 26.4.2 [rand.synopsis] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.synopsis">issues</a> in [rand.synopsis].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+26.4.2 [rand.synopsis] the header <tt>&lt;random&gt;</tt> synopsis
+contains an unreasonable closing curly brace inside the
+<tt>subtract_with_carry_engine</tt> declaration.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the current declaration in 26.4.2 [rand.synopsis]
+</p>
+
+<blockquote><pre>template &lt;class UIntType, size_t w<del>}</del>, size_t s, size_t r&gt;
+class subtract_with_carry_engine;
+</pre></blockquote>
+
+
+<p><i>[
+Pete: Recommends editorial.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="657"></a>657. unclear requirement about header inclusion</h3>
+<p><b>Section:</b> 17.4.2.1 [using.headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2007-03-14</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+17.4.2.1 [using.headers] states:
+</p>
+
+<blockquote><p>
+A translation unit shall include a header only outside of any
+external declaration or definition, [...]
+</p></blockquote>
+
+<p>
+I see three problems with this requirement:
+</p>
+
+<ol type="a">
+<li><p>The C++ standard doesn't define what an "external declaration" or
+an "external definition" are (incidentally the C99 standard does, and
+has a sentence very similar to the above regarding header inclusion).
+</p><p>
+I think the intent is that the #include directive shall lexically
+appear outside *any* declaration; instead, when the issue was pointed
+out on comp.std.c++ at least one poster interpreted "external
+declaration" as "declaration of an identifier with external linkage".
+If this were the correct interpretation, then the two inclusions below
+would be legal:
+</p>
+<blockquote><pre> // at global scope
+ static void f()
+ {
+# include &lt;cstddef&gt;
+ }
+
+ static void g()
+ {
+# include &lt;stddef.h&gt;
+ }
+</pre></blockquote>
+<p>
+(note that while the first example is unlikely to compile correctly,
+the second one may well do)
+</p></li>
+
+<li><p>as the sentence stands, violations will require a diagnostic; is
+this the intent? It was pointed out on comp.std.c++ (by several
+posters) that at least one way to ensure a diagnostic exists:
+</p>
+<blockquote><p>
+ [If there is an actual file for each header,] one simple way
+ to implement this would be to insert a reserved identifier
+ such as __begin_header at the start of each standard header.
+ This reserved identifier would be ignored for all other
+ purposes, except that, at the appropriate point in phase 7, if
+ it is found inside an external definition, a diagnostic is
+ generated. There's many other similar ways to achieve the same
+ effect.
+ </p>
+<p> --James Kuyper, on comp.std.c++
+</p></blockquote></li>
+
+<li><p>is the term "header" meant to be limited to standard headers?
+Clause 17 is all about the library, but still the general question is
+interesting and affects one of the points in the explicit namespaces
+proposal (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1691.html">n1691</a>):
+</p>
+<blockquote><p>
+ Those seeking to conveniently enable argument-dependent
+ lookups for all operators within an explicit namespace
+ could easily create a header file that does so:
+</p><pre> namespace mymath::
+ {
+ #include "using_ops.hpp"
+ }
+</pre></blockquote>
+</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+We believe that the existing language does not cause any real confusion
+and any new formulation of the rules that we could come up with are
+unlikely to be better than what's already in the standard.
+
+
+
+
+
+<hr>
+<h3><a name="658"></a>658. Two unspecified function comparators in [function.objects]</h3>
+<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The header <tt>&lt;functional&gt;</tt> synopsis in 20.5 [function.objects]
+contains the following two free comparison operator templates
+for the <tt>function</tt> class template
+</p>
+
+<blockquote><pre>template&lt;class Function1, class Function2&gt;
+void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
+template&lt;class Function1, class Function2&gt;
+void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
+</pre></blockquote>
+
+<p>
+which are nowhere described. I assume that they are relicts before the
+corresponding two private and undefined member templates in the function
+template (see 20.5.15.2 [func.wrap.func] and X [func.wrap.func.undef]) have been introduced. The original free
+function templates should be removed, because using an undefined entity
+would lead to an ODR violation of the user.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove the above mentioned two function templates from
+the header <tt>&lt;functional&gt;</tt> synopsis (20.5 [function.objects])
+</p>
+
+<blockquote><pre><del>template&lt;class Function1, class Function2&gt;
+void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
+template&lt;class Function1, class Function2&gt;
+void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);</del>
+</pre></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+Fixed by
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2292.html">N2292</a>
+Standard Library Applications for Deleted Functions.
+
+
+
+
+
+<hr>
+<h3><a name="662"></a>662. Inconsistent handling of incorrectly-placed thousands separators</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Cosmin Truta <b>Date:</b> 2007-04-05</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+From Section 22.2.2.1.2 [facet.num.get.virtuals], paragraphs 11 and 12, it is implied
+that the value read from a stream must be stored
+even if the placement of thousands separators does not conform to the
+<code>grouping()</code> specification from the <code>numpunct</code> facet.
+Since incorrectly-placed thousands separators are flagged as an extraction
+failure (by the means of <code>failbit</code>), we believe it is better not
+to store the value. A consistent strategy, in which any kind of extraction
+failure leaves the input item intact, is conceptually cleaner, is able to avoid
+corner-case traps, and is also more understandable from the programmer's point
+of view.
+</p>
+<p>
+Here is a quote from <i>"The C++ Programming Language (Special Edition)"</i>
+by B.&nbsp;Stroustrup (Section&nbsp;D.4.2.3, pg.&nbsp;897):
+</p>
+<blockquote><p>
+<i>"If a value of the desired type could not be read, failbit is set in r.
+[...] An input operator will use r to determine how to set the state of its
+stream. If no error was encountered, the value read is assigned through v;
+otherwise, v is left unchanged."</i>
+</p></blockquote>
+<p>
+This statement implies that <code>rdstate()</code> alone is sufficient to
+determine whether an extracted value is to be assigned to the input item
+<i>val</i> passed to <code>do_get</code>. However, this is in disagreement
+with the current C++ Standard. The above-mentioned assumption is true in all
+cases, except when there are mismatches in digit grouping. In the latter case,
+the parsed value is assigned to <i>val</i>, and, at the same time, <i>err</i>
+is assigned to <code>ios_base::failbit</code> (essentially "lying" about the
+success of the operation). Is this intentional? The current behavior raises
+both consistency and usability concerns.
+</p>
+<p>
+Although digit grouping is outside the scope of <code>scanf</code> (on which
+the virtual methods of <code>num_get</code> are based), handling of grouping
+should be consistent with the overall behavior of scanf. The specification of
+<code>scanf</code> makes a distinction between input failures and matching
+failures, and yet both kinds of failures have no effect on the input items
+passed to <code>scanf</code>. A mismatch in digit grouping logically falls in
+the category of matching failures, and it would be more consistent, and less
+surprising to the user, to leave the input item intact whenever a failure is
+being signaled.
+</p>
+<p>
+The extraction of <code>bool</code> is another example outside the scope of
+<code>scanf</code>, and yet consistent, even in the event of a successful
+extraction of a <code>long</code> but a failed conversion from
+<code>long</code> to <code>bool</code>.
+</p>
+<p>
+Inconsistency is further aggravated by the fact that, when failbit is set,
+subsequent extraction operations are no-ops until <code>failbit</code> is
+explicitly cleared. Assuming that there is no explicit handling of
+<code>rdstate()</code> (as in <code>cin&gt;&gt;i&gt;&gt;j</code>) it is
+counter-intuitive to be able to extract an integer with mismatched digit
+grouping, but to be unable to extract another, properly-formatted integer
+that immediately follows.
+</p>
+<p>
+Moreover, setting <code>failbit</code>, and selectively assigning a value to
+the input item, raises usability problems. Either the strategy of
+<code>scanf</code> (when there is no extracted value in case of failure), or
+the strategy of the <code>strtol</code> family (when there is always an
+extracted value, and there are well-defined defaults in case of a failure) are
+easy to understand and easy to use. On the other hand, if <code>failbit</code>
+alone cannot consistently make a difference between a failed extraction, and a
+successful but not-quite-correct extraction whose output happens to be the same
+as the previous value, the programmer must resort to implementation tricks.
+Consider the following example:
+</p>
+<pre> int i = old_i;
+ cin &gt;&gt; i;
+ if (cin.fail())
+ // can the value of i be trusted?
+ // what does it mean if i == old_i?
+ // ...
+</pre>
+<p>
+Last but not least, the current behvaior is not only confusing to the casual
+reader, but it has also been confusing to some book authors. Besides
+Stroustrup's book, other books (e.g. "Standard C++ IOStreams and Locales" by
+Langer and Kreft) are describing the same mistaken assumption. Although books
+are not to be used instead of the standard reference, the readers of these
+books, as well as the people who are generally familiar to <code>scanf</code>,
+are even more likely to misinterpret the standard, and expect the input items
+to remain intact when a failure occurs.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 22.2.2.1.2 [facet.num.get.virtuals]:
+</p>
+
+<blockquote>
+<p>
+<b>Stage 3:</b> The result of stage 2 processing can be one of
+</p>
+<ul>
+<li>A sequence of <code>chars</code> has been accumulated in stage 2 that is converted (according to the rules of <code>scanf</code>) to a value of the type of <code><i>val</i></code>. <del>This value is stored in <code><i>val</i></code> and <code>ios_base::goodbit</code> is stored in <code><i>err</i></code>.</del></li>
+
+<li>The sequence of <code>chars</code> accumulated in stage 2 would have caused <code>scanf</code> to report an input failure. <code>ios_base::failbit</code> is assigned to <code><i>err</i></code>.</li>
+</ul>
+<p>
+<ins>In the first case,</ins> <del>D</del><ins>d</ins>igit grouping is checked. That is, the positions of discarded separators is examined for consistency with <code>use_facet&lt;numpunct&lt;charT&gt; &gt;(<i>loc</i>).grouping()</code>. If they are not consistent then <code>ios_base::failbit</code> is assigned to <code><i>err</i></code>. <ins>Otherwise, the value that was converted in stage 2 is stored in <code><i>val</i></code> and <code>ios_base::goodbit</code> is stored in <code><i>err</i></code>.</ins>
+</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+post-Toronto: Changed from New to NAD at the request of the author. The preferred solution of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2327.pdf">N2327</a>
+makes this resolution obsolete.
+
+
+
+
+
+<hr>
+<h3><a name="663"></a>663. Complexity Requirements</h3>
+<p><b>Section:</b> 17.3.1.3 [structure.specifications] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
+ <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#structure.specifications">issues</a> in [structure.specifications].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+17.3.1.3 [structure.specifications] para 5 says
+</p>
+
+<blockquote><p>
+-5- Complexity requirements specified in the library&nbsp;
+clauses are upper bounds, and implementations that provide better
+complexity guarantees satisfy the requirements.
+</p></blockquote>
+
+<p>
+The following
+objection has been raised:
+</p>
+
+<blockquote><p>
+The library clauses suggest general
+guidelines regarding complexity, but we have been unable to discover
+any absolute hard-and-fast formulae for these requirements.&nbsp; Unless
+or until the Library group standardizes specific hard-and-fast
+formulae, we regard all the complexity requirements as subject to a&nbsp;
+"fudge factor" without any intrinsic upper bound.
+</p></blockquote>
+
+<p>
+[Plum ref&nbsp;
+_23213Y31 etc]
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+<p><b>Rationale:</b></p>
+Kona (2007): No specific instances of underspecification have been
+identified, and big-O notation always involves constant factors.
+
+
+
+
+
+<hr>
+<h3><a name="683"></a>683. regex_token_iterator summary error</h3>
+<p><b>Section:</b> 28.12.2 [re.tokiter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
+ <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter">issues</a> in [re.tokiter].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+28.12.2 [re.tokiter], p3 says:
+</p>
+<blockquote>
+<p>
+After it is constructed, the iterator finds and stores a value
+<tt>match_results&lt;BidirectionalIterator&gt;</tt> position and sets the
+internal count <tt>N</tt> to zero.
+</p>
+</blockquote>
+
+<p>
+Should read:
+</p>
+
+<blockquote>
+<p>
+After it is constructed, the iterator finds and stores a value
+<tt><del>match_results</del><ins>regex_iterator</ins>&lt;BidirectionalIterator<ins>, charT, traits</ins>&gt;</tt>
+position and sets the internal count <tt>N</tt> to zero.
+</p>
+</blockquote>
+
+<p><i>[
+John adds:
+]</i></p>
+
+
+<blockquote><p>
+Yep, looks like a typo/administrative fix to me.
+</p></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="690"></a>690. abs(long long) should return long long</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
+ <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-06-10</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Quoting the latest draft (n2135), 26.7 [c.math]:
+</p>
+
+<blockquote>
+<p>
+The added signatures are:
+</p>
+<blockquote><pre>long abs(long); // labs()
+long abs(long long); // llabs()
+</pre></blockquote>
+</blockquote>
+<p>
+Shouldn't <tt>abs(long long)</tt> have <tt>long long</tt> as return type?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.7 [c.math]:
+</p>
+<blockquote><pre><ins>long </ins>long abs(long long); // llabs()
+</pre></blockquote>
+
+
+<p><b>Rationale:</b></p>
+Had already been fixed in the WP by the time the LWG reviewed this.
+
+
+
+
+
+</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/doc/html/ext/lwg-defects.html b/libstdc++-v3/doc/html/ext/lwg-defects.html
new file mode 100644
index 00000000000..cefbee652e6
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/lwg-defects.html
@@ -0,0 +1,24284 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head><title>C++ Standard Library Defect Report List</title>
+
+
+
+<style type="text/css">
+p {text-align:justify}
+li {text-align:justify}
+ins {background-color:#A0FFA0}
+del {background-color:#FFA0A0}
+</style></head><body>
+<table>
+<tbody><tr>
+<td align="left">Doc. no.</td>
+<td align="left">N2457=07-0327</td>
+</tr>
+<tr>
+<td align="left">Date:</td>
+<td align="left">2007-10-20</td>
+</tr>
+<tr>
+<td align="left">Project:</td>
+<td align="left">Programming Language C++</td>
+</tr>
+<tr>
+<td align="left">Reply to:</td>
+<td align="left">Howard Hinnant &lt;<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>&gt;</td>
+</tr>
+</tbody></table>
+<h1>C++ Standard Library Defect Report List (Revision R52)</h1>
+
+ <p>Reference ISO/IEC IS 14882:1998(E)</p>
+ <p>Also see:</p>
+ <ul>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
+ <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li>
+ </ul>
+ <p>This document contains only library issues which have been closed
+ by the Library Working Group (LWG) after being found to be defects
+ in the standard. That is, issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>,
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a>. See the
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a> for issues closed as non-defects. See the
+ <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> for active issues and more information. The
+ introductory material in that document also applies to this
+ document.</p>
+
+<h2>Revision History</h2>
+<ul>
+<li>R52:
+2007-10-19 post-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>172 open issues, up by 4.</li>
+<li>582 closed issues, up by 27.</li>
+<li>754 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#724">724</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#725">725</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#726">726</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#727">727</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#728">728</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#729">729</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#730">730</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#731">731</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#733">733</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#735">735</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#736">736</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#737">737</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#738">738</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#739">739</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#741">741</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#745">745</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#747">747</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#748">748</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#750">750</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#751">751</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#752">752</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#753">753</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#754">754</a>.</li>
+<li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#546">546</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#564">564</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#565">565</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#573">573</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#585">585</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#588">588</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#393">393</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+<li>Changed the following issues from New to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#607">607</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#608">608</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#561">561</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#562">562</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#563">563</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#581">581</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#595">595</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>.</li>
+<li>Changed the following issues from New to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#552">552</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>.</li>
+<li>Changed the following issues from Open to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#401">401</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R51:
+2007-09-09 pre-Kona mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>168 open issues, up by 15.</li>
+<li>555 closed issues, up by 0.</li>
+<li>723 issues total, up by 15.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#711">711</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#713">713</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#714">714</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#716">716</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#717">717</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#718">718</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#719">719</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#721">721</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R50:
+2007-08-05 post-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>153 open issues, down by 5.</li>
+<li>555 closed issues, up by 17.</li>
+<li>708 issues total, up by 12.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#697">697</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#698">698</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#701">701</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#702">702</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#706">706</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
+<li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#584">584</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>.</li>
+<li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>.</li>
+<li>Changed the following issues from Pending NAD Editorial to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#579">579</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>.</li>
+<li>Changed the following issues from Pending WP to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
+<li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>.</li>
+<li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from DR to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453">453</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R49:
+2007-06-23 pre-Toronto mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>158 open issues, up by 13.</li>
+<li>538 closed issues, up by 7.</li>
+<li>696 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#692">692</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li>
+<li>Added the following Pending NAD Editorial issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#683">683</a>.</li>
+<li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#587">587</a>.</li>
+<li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R48:
+2007-05-06 post-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>145 open issues, down by 33.</li>
+<li>531 closed issues, up by 53.</li>
+<li>676 issues total, up by 20.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Changed the following issues from NAD to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#357">357</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#368">368</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a>.</li>
+<li>Changed the following issues from Tentatively Ready to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>.</li>
+<li>Changed the following issues from NAD_Future to NAD Future: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#105">105</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#116">116</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#149">149</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#188">188</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#219">219</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#353">353</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>.</li>
+<li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>.</li>
+<li>Changed the following issues from Tentatively Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
+<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
+<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
+<li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#599">599</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#600">600</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#601">601</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#602">602</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a>.</li>
+<li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>.</li>
+<li>Changed the following issues from Tentatively Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R47:
+2007-03-09 pre-Oxford mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>178 open issues, up by 37.</li>
+<li>478 closed issues, up by 0.</li>
+<li>656 issues total, up by 37.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
+<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li>
+<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li>
+<li>Changed the following issues from New to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+<li>Changed the following issues from Open to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>.</li>
+<li>Changed the following issues from Review to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R46:
+2007-01-12 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>141 open issues, up by 11.</li>
+<li>478 closed issues, down by 1.</li>
+<li>619 issues total, up by 10.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R45:
+2006-11-03 post-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 0.</li>
+<li>479 closed issues, up by 17.</li>
+<li>609 issues total, up by 17.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a> to Review.</li>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R44:
+2006-09-08 pre-Portland mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>130 open issues, up by 6.</li>
+<li>462 closed issues, down by 1.</li>
+<li>592 issues total, up by 5.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R43:
+2006-06-23 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>124 open issues, up by 14.</li>
+<li>463 closed issues, down by 1.</li>
+<li>587 issues total, up by 13.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.</li>
+</ul></li>
+</ul>
+</li>
+<li>R42:
+2006-04-21 post-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>110 open issues, down by 16.</li>
+<li>464 closed issues, up by 24.</li>
+<li>574 issues total, up by 8.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a> to Open.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.</li>
+<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.</li>
+<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li>
+</ul></li>
+</ul>
+</li>
+<li>R41:
+2006-02-24 pre-Berlin mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>126 open issues, up by 31.</li>
+<li>440 closed issues, up by 0.</li>
+<li>566 issues total, up by 31.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>.</li>
+<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li>
+<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R40:
+2005-12-16 mid-term mailing.
+<ul>
+<li><b>Summary:</b><ul>
+<li>95 open issues.</li>
+<li>440 closed issues.</li>
+<li>535 issues total.</li>
+</ul></li>
+<li><b>Details:</b><ul>
+<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li>
+</ul></li>
+</ul>
+</li>
+<li>R39:
+2005-10-14 post-Mont Tremblant mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
+Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
+Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
+</li>
+<li>R38:
+2005-07-03 pre-Mont Tremblant mailing.
+Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
+</li>
+<li>R37:
+2005-06 mid-term mailing.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
+</li>
+<li>R36:
+2005-04 post-Lillehammer mailing. All issues in "ready" status except
+for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
+previously in "DR" status were moved to "WP".
+</li>
+<li>R35:
+2005-03 pre-Lillehammer mailing.
+</li>
+<li>R34:
+2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
+</li>
+<li>R33:
+2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
+</li>
+<li>R32:
+2004-09 pre-Redmond mailing: reflects new proposed resolutions and
+new issues received after the 2004-07 mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
+</li>
+<li>R31:
+2004-07 mid-term mailing: reflects new proposed resolutions and
+new issues received after the post-Sydney mailing. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
+</li>
+<li>R30:
+Post-Sydney mailing: reflects decisions made at the Sydney meeting.
+Voted all "Ready" issues from R29 into the working paper.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
+</li>
+<li>R29:
+Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
+</li>
+<li>R28:
+Post-Kona mailing: reflects decisions made at the Kona meeting.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
+</li>
+<li>R27:
+Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
+</li>
+<li>R26:
+Post-Oxford mailing: reflects decisions made at the Oxford meeting.
+All issues in Ready status were voted into DR status. All issues in
+DR status were voted into WP status.
+</li>
+<li>R25:
+Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
+</li>
+<li>R24:
+Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
+meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
+moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
+at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
+concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
+</li>
+<li>R23:
+Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
+Moved issues in the TC to TC status.
+</li>
+<li>R22:
+Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
+</li>
+<li>R21:
+Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
+</li>
+<li>R20:
+Post-Redmond mailing; reflects actions taken in Redmond. Added
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
+not discussed at the meeting.
+
+All Ready issues were moved to DR status, with the exception of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+
+Noteworthy issues discussed at Redmond include
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
+</li>
+<li>R19:
+Pre-Redmond mailing. Added new issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
+</li>
+<li>R18:
+Post-Copenhagen mailing; reflects actions taken in Copenhagen.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
+new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
+to DR.
+
+Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
+to Ready.
+
+Closed issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
+as NAD.
+
+</li>
+<li>R17:
+Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
+resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
+Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
+</li>
+<li>R16:
+post-Toronto mailing; reflects actions taken in Toronto. Added new
+issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
+appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
+the bug in enough places.
+</li>
+<li>R15:
+pre-Toronto mailing. Added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
+changes so that we pass Weblint tests.
+</li>
+<li>R14:
+post-Tokyo II mailing; reflects committee actions taken in
+Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
+</li>
+<li>R13:
+pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
+</li>
+<li>R12:
+pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
+</li>
+<li>R11:
+post-Kona mailing: Updated to reflect LWG and full committee actions
+in Kona (99-0048/N1224). Note changed resolution of issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
+to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
+"closed" documents. Changed the proposed resolution of issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
+of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
+</li>
+<li>R10:
+pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
+</li>
+<li>R9:
+pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
+"closed" documents. (99-0030/N1206, 25 Aug 99)
+</li>
+<li>R8:
+post-Dublin mailing. Updated to reflect LWG and full committee actions
+in Dublin. (99-0016/N1193, 21 Apr 99)
+</li>
+<li>R7:
+pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
+</li>
+<li>R6:
+pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
+and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
+</li>
+<li>R5:
+update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
+for making list public. (30 Dec 98)
+</li>
+<li>R4:
+post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
+issues corrected. (22 Oct 98)
+</li>
+<li>R3:
+post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
+added, many issues updated to reflect LWG consensus (12 Oct 98)
+</li>
+<li>R2:
+pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
+</li>
+<li>R1:
+Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
+format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
+</li>
+</ul>
+
+<h2>Defect Reports</h2>
+<hr>
+<h3><a name="1"></a>1. C library linkage editing oversight</h3>
+<p><b>Section:</b> 17.4.2.2 [using.linkage] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The change specified in the proposed resolution below did not make
+it into the Standard. This change was accepted in principle at the
+London meeting, and the exact wording below was accepted at the
+Morristown meeting.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 17.4.2.2 [using.linkage] paragraph 2
+from:</p>
+
+<blockquote>
+ <p>It is unspecified whether a name from the Standard C library
+ declared with external linkage has either extern "C" or
+ extern "C++" linkage.</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+ <p>Whether a name from the Standard C library declared with external
+ linkage has extern "C" or extern "C++" linkage
+ is implementation defined. It is recommended that an implementation
+ use extern "C++" linkage for this purpose.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="3"></a>3. Atexit registration during atexit() call is not described</h3>
+<p><b>Section:</b> 18.4 [support.start.term] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1997-12-12</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>We appear not to have covered all the possibilities of
+ exit processing with respect to
+atexit registration. <br>
+<br>
+Example 1: (C and C++)</p>
+
+<pre> #include &lt;stdlib.h&gt;
+ void f1() { }
+ void f2() { atexit(f1); }
+
+ int main()
+ {
+ atexit(f2); // the only use of f2
+ return 0; // for C compatibility
+ }</pre>
+
+<p>At program exit, f2 gets called due to its registration in
+main. Running f2 causes f1 to be newly registered during the exit
+processing. Is this a valid program? If so, what are its
+semantics?</p>
+
+<p>
+Interestingly, neither the C standard, nor the C++ draft standard nor
+the forthcoming C9X Committee Draft says directly whether you can
+register a function with atexit during exit processing.</p>
+
+<p>
+All 3 standards say that functions are run in reverse order of their
+registration. Since f1 is registered last, it ought to be run first,
+but by the time it is registered, it is too late to be first.</p>
+
+<p>If the program is valid, the standards are self-contradictory about
+its semantics.</p>
+
+<p>Example 2: (C++ only)</p>
+
+<pre>
+ void F() { static T t; } // type T has a destructor
+
+ int main()
+ {
+ atexit(F); // the only use of F
+ }
+</pre>
+
+<p>Function F registered with atexit has a local static variable t,
+and F is called for the first time during exit processing. A local
+static object is initialized the first time control flow passes
+through its definition, and all static objects are destroyed during
+exit processing. Is the code valid? If so, what are its semantics?</p>
+
+<p>
+Section 18.3 "Start and termination" says that if a function
+F is registered with atexit before a static object t is initialized, F
+will not be called until after t's destructor completes.</p>
+
+<p>
+In example 2, function F is registered with atexit before its local
+static object O could possibly be initialized. On that basis, it must
+not be called by exit processing until after O's destructor
+completes. But the destructor cannot be run until after F is called,
+since otherwise the object could not be constructed in the first
+place.</p>
+
+<p>If the program is valid, the standard is self-contradictory about
+its semantics.</p>
+
+<p>I plan to submit Example 1 as a public comment on the C9X CD, with
+a recommendation that the results be undefined. (Alternative: make it
+unspecified. I don't think it is worthwhile to specify the case where
+f1 itself registers additional functions, each of which registers
+still more functions.)</p>
+
+<p>I think we should resolve the situation in the whatever way the C
+committee decides. </p>
+
+<p>For Example 2, I recommend we declare the results undefined.</p>
+
+<p><i>[See reflector message lib-6500 for further discussion.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change section 18.3/8 from:</p>
+<blockquote><p>
+ First, objects with static storage duration are destroyed and
+ functions registered by calling atexit are called. Objects with
+ static storage duration are destroyed in the reverse order of the
+ completion of their constructor. (Automatic objects are not
+ destroyed as a result of calling exit().) Functions registered with
+ atexit are called in the reverse order of their registration. A
+ function registered with atexit before an object obj1 of static
+ storage duration is initialized will not be called until obj1's
+ destruction has completed. A function registered with atexit after
+ an object obj2 of static storage duration is initialized will be
+ called before obj2's destruction starts.
+</p></blockquote>
+<p>to:</p>
+<blockquote><p>
+ First, objects with static storage duration are destroyed and
+ functions registered by calling atexit are called. Non-local objects
+ with static storage duration are destroyed in the reverse order of
+ the completion of their constructor. (Automatic objects are not
+ destroyed as a result of calling exit().) Functions registered with
+ atexit are called in the reverse order of their registration, except
+ that a function is called after any previously registered functions
+ that had already been called at the time it was registered. A
+ function registered with atexit before a non-local object obj1 of
+ static storage duration is initialized will not be called until
+ obj1's destruction has completed. A function registered with atexit
+ after a non-local object obj2 of static storage duration is
+ initialized will be called before obj2's destruction starts. A local
+ static object obj3 is destroyed at the same time it would be if a
+ function calling the obj3 destructor were registered with atexit at
+ the completion of the obj3 constructor.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>See 99-0039/N1215, October 22, 1999, by Stephen D. Clamage for the analysis
+supporting to the proposed resolution.</p>
+
+
+
+
+
+<hr>
+<h3><a name="5"></a>5. String::compare specification questionable</h3>
+<p><b>Section:</b> 21.3.6.8 [string::swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Jack Reeves <b>Date:</b> 1997-12-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::swap">issues</a> in [string::swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#87">87</a></p>
+<p><b>Discussion:</b></p>
+<p>At the very end of the basic_string class definition is the signature: int
+compare(size_type pos1, size_type n1, const charT* s, size_type n2 = npos) const; In the
+following text this is defined as: returns
+basic_string&lt;charT,traits,Allocator&gt;(*this,pos1,n1).compare(
+basic_string&lt;charT,traits,Allocator&gt;(s,n2); </p>
+
+<p>Since the constructor basic_string(const charT* s, size_type n, const Allocator&amp; a
+= Allocator()) clearly requires that s != NULL and n &lt; npos and further states that it
+throws length_error if n == npos, it appears the compare() signature above should always
+throw length error if invoked like so: str.compare(1, str.size()-1, s); where 's' is some
+null terminated character array. </p>
+
+<p>This appears to be a typo since the obvious intent is to allow either the call above or
+something like: str.compare(1, str.size()-1, s, strlen(s)-1); </p>
+
+<p>This would imply that what was really intended was two signatures int compare(size_type
+pos1, size_type n1, const charT* s) const int compare(size_type pos1, size_type n1, const
+charT* s, size_type n2) const; each defined in terms of the corresponding constructor. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the compare signature in 21.3 [basic.string]
+(at the very end of the basic_string synopsis) which reads:</p>
+
+<blockquote>
+ <p><tt>int compare(size_type pos1, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s,
+ size_type n2 = npos) const;</tt></p>
+</blockquote>
+
+<p>with:</p>
+
+<blockquote>
+ <p><tt>int compare(size_type pos1, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s) const;<br>
+ int compare(size_type pos1, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s,
+ size_type n2) const;</tt></p>
+</blockquote>
+
+<p>Replace the portion of 21.3.6.8 [string::swap]
+paragraphs 5 and 6 which read:</p>
+
+<blockquote>
+ <p><tt>int compare(size_type pos, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charT * s, size_type n2
+ = npos) const;<br>
+ </tt>Returns:<tt><br>
+ basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ basic_string&lt;charT,traits,Allocator&gt;( s, n2))</tt></p>
+</blockquote>
+
+<p>with:</p>
+
+<blockquote>
+ <p><tt>int compare(size_type pos, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT * s) const;<br>
+ </tt>Returns:<tt><br>
+ basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ basic_string&lt;charT,traits,Allocator&gt;( s ))<br>
+ <br>
+ int compare(size_type pos, size_type n1,<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT * s,
+ size_type n2) const;<br>
+ </tt>Returns:<tt><br>
+ basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ basic_string&lt;charT,traits,Allocator&gt;( s, n2))</tt></p>
+</blockquote>
+
+<p>Editors please note that in addition to splitting the signature, the third argument
+becomes const, matching the existing synopsis.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>While the LWG dislikes adding signatures, this is a clear defect in
+the Standard which must be fixed.&nbsp; The same problem was also
+identified in issues 7 (item 5) and 87.</p>
+
+
+
+
+
+<hr>
+<h3><a name="7"></a>7. String clause minor problems</h3>
+<p><b>Section:</b> 21 [strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#strings">issues</a> in [strings].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>(1) In 21.3.6.4 [string::insert], the description of template
+&lt;class InputIterator&gt; insert(iterator, InputIterator,
+InputIterator) makes no sense. It refers to a member function that
+doesn't exist. It also talks about the return value of a void
+function. </p>
+
+<p>(2) Several versions of basic_string::replace don't appear in the
+class synopsis. </p>
+
+<p>(3) basic_string::push_back appears in the synopsis, but is never
+described elsewhere. In the synopsis its argument is const charT,
+which doesn't makes much sense; it should probably be charT, or
+possible const charT&amp;. </p>
+
+<p>(4) basic_string::pop_back is missing. </p>
+
+<p>(5) int compare(size_type pos, size_type n1, charT* s, size_type n2
+= npos) make no sense. First, it's const charT* in the synopsis and
+charT* in the description. Second, given what it says in RETURNS,
+leaving out the final argument will always result in an exception
+getting thrown. This is paragraphs 5 and 6 of
+21.3.6.8 [string::swap]</p>
+
+<p>(6) In table 37, in section 21.1.1 [char.traits.require],
+there's a note for X::move(s, p, n). It says "Copies correctly
+even where p is in [s, s+n)". This is correct as far as it goes,
+but it doesn't go far enough; it should also guarantee that the copy
+is correct even where s in in [p, p+n). These are two orthogonal
+guarantees, and neither one follows from the other. Both guarantees
+are necessary if X::move is supposed to have the same sort of
+semantics as memmove (which was clearly the intent), and both
+guarantees are necessary if X::move is actually supposed to be
+useful. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>ITEM 1: In 21.3.5.4 [lib.string::insert], change paragraph 16 to <br>
+<br>
+&nbsp;&nbsp;&nbsp; EFFECTS: Equivalent to insert(p - begin(), basic_string(first, last)).<br>
+<br>
+ITEM 2:&nbsp; Not a defect; the Standard is clear.. There are ten versions of replace() in
+the synopsis, and ten versions in 21.3.5.6 [lib.string::replace].<br>
+<br>
+ITEM 3: Change the declaration of push_back in the string synopsis (21.3,
+[lib.basic.string]) from:</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp; void push_back(const charT)<br>
+<br>
+to<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; void push_back(charT)<br>
+<br>
+Add the following text immediately after 21.3.5.2 [lib.string::append], paragraph 10.<br>
+<br>
+&nbsp;&nbsp;&nbsp; void basic_string::push_back(charT c);<br>
+&nbsp;&nbsp;&nbsp; EFFECTS: Equivalent to append(static_cast&lt;size_type&gt;(1), c);<br>
+<br>
+ITEM 4: Not a defect. The omission appears to have been deliberate.<br>
+<br>
+ITEM 5: Duplicate; see issue 5 (and 87).<br>
+<br>
+ITEM 6: In table 37, Replace:<br>
+<br>
+&nbsp;&nbsp;&nbsp; "Copies correctly even where p is in [s, s+n)."<br>
+<br>
+with:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; "Copies correctly even where the ranges [p, p+n) and [s,
+s+n) overlap."</p>
+
+
+
+
+
+<hr>
+<h3><a name="8"></a>8. Locale::global lacks guarantee</h3>
+<p><b>Section:</b> 22.1.1.5 [locale.statics] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It appears there's an important guarantee missing from clause
+22. We're told that invoking locale::global(L) sets the C locale if L
+has a name. However, we're not told whether or not invoking
+setlocale(s) sets the global C++ locale. </p>
+
+<p>The intent, I think, is that it should not, but I can't find any
+such words anywhere. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a sentence at the end of 22.1.1.5 [locale.statics],
+paragraph 2:&nbsp; </p>
+
+<blockquote>
+ <p>No library function other than <tt>locale::global()</tt> shall affect
+ the value returned by <tt>locale()</tt>. </p>
+
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="9"></a>9. Operator new(0) calls should not yield the same pointer</h3>
+<p><b>Section:</b> 18.5.1 [new.delete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-01-04</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Scott Meyers, in a comp.std.c++ posting: I just noticed that
+section 3.7.3.1 of CD2 seems to allow for the possibility that all
+calls to operator new(0) yield the same pointer, an implementation
+technique specifically prohibited by ARM 5.3.3.Was this prohibition
+really lifted? Does the FDIS agree with CD2 in the regard? [Issues
+list maintainer's note: the IS is the same.]</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the last paragraph of 3.7.3 from:</p>
+<blockquote>
+ <p>Any allocation and/or deallocation functions defined in a C++ program shall
+ conform to the semantics specified in 3.7.3.1 and 3.7.3.2.</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>Any allocation and/or deallocation functions defined in a C++ program,
+ including the default versions in the library, shall conform to the semantics
+ specified in 3.7.3.1 and 3.7.3.2.</p>
+</blockquote>
+<p>Change 3.7.3.1/2, next-to-last sentence, from :</p>
+<blockquote>
+ <p>If the size of the space requested is zero, the value returned shall not be
+ a null pointer value (4.10).</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>Even if the size of the space requested is zero, the request can fail. If
+ the request succeeds, the value returned shall be a non-null pointer value
+ (4.10) p0 different from any previously returned value p1, unless that value
+ p1 was since passed to an operator delete.</p>
+</blockquote>
+<p>5.3.4/7 currently reads:</p>
+<blockquote>
+ <p>When the value of the expression in a direct-new-declarator is zero, the
+ allocation function is called to allocate an array with no elements. The
+ pointer returned by the new-expression is non-null. [Note: If the library
+ allocation function is called, the pointer returned is distinct from the
+ pointer to any other object.]</p>
+</blockquote>
+<p>Retain the first sentence, and delete the remainder.</p>
+<p>18.5.1 currently has no text. Add the following:</p>
+<blockquote>
+ <p>Except where otherwise specified, the provisions of 3.7.3 apply to the
+ library versions of operator new and operator delete.</p>
+</blockquote>
+<p>To 18.5.1.3, add the following text:</p>
+<blockquote>
+ <p>The provisions of 3.7.3 do not apply to these reserved placement forms of
+ operator new and operator delete.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>See 99-0040/N1216, October 22, 1999, by Stephen D. Clamage for the analysis
+supporting to the proposed resolution.</p>
+
+
+
+
+
+<hr>
+<h3><a name="11"></a>11. Bitset minor problems</h3>
+<p><b>Section:</b> 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.bitset">issues</a> in [template.bitset].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>(1) bitset&lt;&gt;::operator[] is mentioned in the class synopsis (23.3.5), but it is
+not documented in 23.3.5.2. </p>
+
+<p>(2) The class synopsis only gives a single signature for bitset&lt;&gt;::operator[],
+reference operator[](size_t pos). This doesn't make much sense. It ought to be overloaded
+on const. reference operator[](size_t pos); bool operator[](size_t pos) const. </p>
+
+<p>(3) Bitset's stream input function (23.3.5.3) ought to skip all whitespace before
+trying to extract 0s and 1s. The standard doesn't explicitly say that, though. This should
+go in the Effects clause.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>ITEMS 1 AND 2:<br>
+<br>
+In the bitset synopsis (23.3.5 [template.bitset]),
+replace the member function <br>
+<br>
+<tt>&nbsp;&nbsp;&nbsp; reference operator[](size_t pos);<br>
+</tt><br>
+with the two member functions<br>
+<br>
+<tt>&nbsp;&nbsp;&nbsp; bool operator[](size_t pos) const; <br>
+&nbsp;&nbsp;&nbsp; reference operator[](size_t pos); <br>
+</tt><br>
+Add the following text at the end of 23.3.5.2 [bitset.members],
+immediately after paragraph 45:</p>
+
+<blockquote>
+ <p><tt>bool operator[](size_t pos) const;</tt><br>
+ Requires: pos is valid<br>
+ Throws: nothing<br>
+ Returns: <tt>test(pos)</tt><br>
+ <br>
+ <tt>bitset&lt;N&gt;::reference operator[](size_t pos);</tt> <br>
+ Requires: pos is valid<br>
+ Throws: nothing<br>
+ Returns: An object of type <tt>bitset&lt;N&gt;::reference</tt> such that <tt>(*this)[pos]
+ == this-&gt;test(pos)</tt>, and such that <tt>(*this)[pos] = val</tt> is equivalent to <tt>this-&gt;set(pos,
+ val);</tt></p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes Item 3 is not a defect. "Formatted
+input" implies the desired semantics. See 27.6.1.2 [istream.formatted].
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="13"></a>13. Eos refuses to die</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> William M. Miller <b>Date:</b> 1998-03-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 27.6.1.2.3, there is a reference to "eos", which is
+the only one in the whole draft (at least using Acrobat search), so
+it's undefined. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.1.2.3 [istream::extractors], replace "eos" with
+"charT()"</p>
+
+
+
+
+
+<hr>
+<h3><a name="14"></a>14. Locale::combine should be const</h3>
+<p><b>Section:</b> 22.1.1.3 [locale.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.members">issues</a> in [locale.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>locale::combine is the only member function of locale (other than constructors and
+destructor) that is not const. There is no reason for it not to be const, and good reasons
+why it should have been const. Furthermore, leaving it non-const conflicts with 22.1.1
+paragraph 6: "An instance of a locale is immutable." </p>
+
+<p>History: this member function originally was a constructor. it happened that the
+interface it specified had no corresponding language syntax, so it was changed to a member
+function. As constructors are never const, there was no "const" in the interface
+which was transformed into member "combine". It should have been added at that
+time, but the omission was not noticed. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1 [locale] and also in 22.1.1.3 [locale.members], add
+"const" to the declaration of member combine: </p>
+<blockquote>
+ <pre>template &lt;class Facet&gt; locale combine(const locale&amp; other) const; </pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="15"></a>15. Locale::name requirement inconsistent</h3>
+<p><b>Section:</b> 22.1.1.3 [locale.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.members">issues</a> in [locale.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>locale::name() is described as returning a string that can be passed to a locale
+constructor, but there is no matching constructor. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1.3 [locale.members], paragraph 5, replace
+"<tt>locale(name())</tt>" with
+"<tt>locale(name().c_str())</tt>".
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="16"></a>16. Bad ctype_byname&lt;char&gt; decl</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The new virtual members ctype_byname&lt;char&gt;::do_widen and do_narrow did not get
+edited in properly. Instead, the member do_widen appears four times, with wrong argument
+lists. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>The correct declarations for the overloaded members
+<tt>do_narrow</tt> and <tt>do_widen</tt> should be copied
+from 22.2.1.3 [facet.ctype.special].</p>
+
+
+
+
+
+<hr>
+<h3><a name="17"></a>17. Bad bool parsing</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>This section describes the process of parsing a text boolean value from the input
+stream. It does not say it recognizes either of the sequences "true" or
+"false" and returns the corresponding bool value; instead, it says it recognizes
+only one of those sequences, and chooses which according to the received value of a
+reference argument intended for returning the result, and reports an error if the other
+sequence is found. (!) Furthermore, it claims to get the names from the ctype&lt;&gt;
+facet rather than the numpunct&lt;&gt; facet, and it examines the "boolalpha"
+flag wrongly; it doesn't define the value "loc"; and finally, it computes
+wrongly whether to use numeric or "alpha" parsing.<br>
+<br>
+I believe the correct algorithm is "as if": </p>
+
+<pre> // in, err, val, and str are arguments.
+ err = 0;
+ const numpunct&lt;charT&gt;&amp; np = use_facet&lt;numpunct&lt;charT&gt; &gt;(str.getloc());
+ const string_type t = np.truename(), f = np.falsename();
+ bool tm = true, fm = true;
+ size_t pos = 0;
+ while (tm &amp;&amp; pos &lt; t.size() || fm &amp;&amp; pos &lt; f.size()) {
+ if (in == end) { err = str.eofbit; }
+ bool matched = false;
+ if (tm &amp;&amp; pos &lt; t.size()) {
+ if (!err &amp;&amp; t[pos] == *in) matched = true;
+ else tm = false;
+ }
+ if (fm &amp;&amp; pos &lt; f.size()) {
+ if (!err &amp;&amp; f[pos] == *in) matched = true;
+ else fm = false;
+ }
+ if (matched) { ++in; ++pos; }
+ if (pos &gt; t.size()) tm = false;
+ if (pos &gt; f.size()) fm = false;
+ }
+ if (tm == fm || pos == 0) { err |= str.failbit; }
+ else { val = tm; }
+ return in;</pre>
+
+<p>Notice this works reasonably when the candidate strings are both empty, or equal, or
+when one is a substring of the other. The proposed text below captures the logic of the
+code above.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.1.2 [facet.num.get.virtuals], in the first line of paragraph 14,
+change "&amp;&amp;" to "&amp;".</p>
+
+<p>Then, replace paragraphs 15 and 16 as follows:</p>
+
+<blockquote>
+
+ <p>Otherwise target sequences are determined "as if" by
+ calling the members <tt>falsename()</tt> and
+ <tt>truename()</tt> of the facet obtained by
+ <tt>use_facet&lt;numpunct&lt;charT&gt;&nbsp;&gt;(str.getloc())</tt>.
+ Successive characters in the range <tt>[in,end)</tt> (see
+ [lib.sequence.reqmts]) are obtained and matched against
+ corresponding positions in the target sequences only as necessary to
+ identify a unique match. The input iterator <tt>in</tt> is
+ compared to <tt>end</tt> only when necessary to obtain a
+ character. If and only if a target sequence is uniquely matched,
+ <tt>val</tt> is set to the corresponding value.</p>
+
+</blockquote>
+
+<blockquote>
+ <p>The <tt>in</tt> iterator is always left pointing one position beyond the last character
+ successfully matched. If <tt>val</tt> is set, then err is set to <tt>str.goodbit</tt>; or to
+ <tt>str.eofbit</tt> if, when seeking another character to match, it is found that
+ <tt>(in==end)</tt>. If <tt>val</tt> is not set, then <i>err</i> is set to <tt>str.failbit</tt>; or to
+ <tt>(str.failbit|str.eofbit)</tt>if
+ the reason for the failure was that <tt>(in==end)</tt>. [Example: for targets
+ <tt>true</tt>:"a" and <tt>false</tt>:"abb", the input sequence "a" yields
+ <tt>val==true</tt> and <tt>err==str.eofbit</tt>; the input sequence "abc" yields
+ <tt>err=str.failbit</tt>, with <tt>in</tt> ending at the 'c' element. For targets
+ <tt>true</tt>:"1"
+ and <tt>false</tt>:"0", the input sequence "1" yields <tt>val==true</tt>
+ and <tt>err=str.goodbit</tt>. For empty targets (""), any input sequence yields
+ <tt>err==str.failbit</tt>. --end example]</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="18"></a>18. Get(...bool&amp;) omitted</h3>
+<p><b>Section:</b> 22.2.2.1.1 [facet.num.get.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.members">issues</a> in [facet.num.get.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In the list of num_get&lt;&gt; non-virtual members on page 22-23, the member
+that parses bool values was omitted from the list of definitions of non-virtual
+members, though it is listed in the class definition and the corresponding
+virtual is listed everywhere appropriate. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add at the beginning of 22.2.2.1.1 [facet.num.get.members]
+another get member for bool&amp;, copied from the entry in
+22.2.2.1 [locale.num.get].</p>
+
+
+
+
+
+<hr>
+<h3><a name="19"></a>19. "Noconv" definition too vague</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#10">10</a></p>
+<p><b>Discussion:</b></p>
+<p>
+In the definitions of codecvt&lt;&gt;::do_out and do_in, they are
+specified to return noconv if "no conversion is
+needed". This definition is too vague, and does not say
+normatively what is done with the buffers.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the entry for noconv in the table under paragraph 4 in section
+22.2.1.4.2 [locale.codecvt.virtuals] to read:
+</p>
+<blockquote>
+ <p><tt>noconv</tt>: <tt>internT</tt> and <tt>externT</tt> are the same type,
+ and input sequence is identical to converted sequence.</p>
+</blockquote>
+<p>Change the Note in paragraph 2 to normative text as follows:</p>
+<blockquote>
+ <p>If returns <tt>noconv</tt>, <tt>internT</tt> and <tt>externT</tt> are the
+ same type and the converted sequence is identical to the input sequence <tt>[from,from_next)</tt>.
+ <tt>to_next</tt> is set equal to <tt>to</tt>, the value of <tt>state</tt> is
+ unchanged, and there are no changes to the values in <tt>[to, to_limit)</tt>.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="20"></a>20. Thousands_sep returns wrong type</h3>
+<p><b>Section:</b> 22.2.3.1.2 [facet.numpunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The synopsis for numpunct&lt;&gt;::do_thousands_sep, and the
+definition of numpunct&lt;&gt;::thousands_sep which calls it, specify
+that it returns a value of type char_type. Here it is erroneously
+described as returning a "string_type". </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.3.1.2 [facet.numpunct.virtuals], above paragraph 2, change
+"string_type" to "char_type". </p>
+
+
+
+
+
+<hr>
+<h3><a name="21"></a>21. Codecvt_byname&lt;&gt; instantiations</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In the second table in the section, captioned "Required
+instantiations", the instantiations for codecvt_byname&lt;&gt;
+have been omitted. These are necessary to allow users to construct a
+locale by name from facets. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add in 22.1.1.1.1 [locale.category] to the table captioned
+"Required instantiations", in the category "ctype"
+the lines </p>
+
+<blockquote>
+ <pre>codecvt_byname&lt;char,char,mbstate_t&gt;,
+codecvt_byname&lt;wchar_t,char,mbstate_t&gt; </pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="22"></a>22. Member open vs. flags</h3>
+<p><b>Section:</b> 27.8.1.9 [ifstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description of basic_istream&lt;&gt;::open leaves unanswered questions about how it
+responds to or changes flags in the error status for the stream. A strict reading
+indicates that it ignores the bits and does not change them, which confuses users who do
+not expect eofbit and failbit to remain set after a successful open. There are three
+reasonable resolutions: 1) status quo 2) fail if fail(), ignore eofbit 3) clear failbit
+and eofbit on call to open(). </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.8.1.9 [ifstream.members] paragraph 3, <i>and</i> in 27.8.1.13 [ofstream.members] paragraph 3, under open() effects, add a footnote:
+</p>
+
+<blockquote>
+ <p>A successful open does not change the error state.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>This may seem surprising to some users, but it's just an instance
+of a general rule: error flags are never cleared by the
+implementation. The only way error flags are are ever cleared is if
+the user explicitly clears them by hand.</p>
+
+<p>The LWG believed that preserving this general rule was
+important enough so that an exception shouldn't be made just for this
+one case. The resolution of this issue clarifies what the LWG
+believes to have been the original intent.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="24"></a>24. "do_convert" doesn't exist</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#72">72</a></p>
+<p><b>Discussion:</b></p>
+<p>The description of codecvt&lt;&gt;::do_out and do_in mentions a
+symbol "do_convert" which is not defined in the
+standard. This is a leftover from an edit, and should be "do_in
+and do_out". </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.1.4 [locale.codecvt], paragraph 3, change
+"do_convert" to "do_in or do_out". Also, in 22.2.1.4.2 [locale.codecvt.virtuals], change "do_convert()" to "do_in
+or do_out". </p>
+
+
+
+
+
+<hr>
+<h3><a name="25"></a>25. String operator&lt;&lt; uses width() value wrong</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#67">67</a></p>
+<p><b>Discussion:</b></p>
+<p>In the description of operator&lt;&lt; applied to strings, the standard says that uses
+the smaller of os.width() and str.size(), to pad "as described in stage 3"
+elsewhere; but this is inconsistent, as this allows no possibility of space for padding. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 21.3.8.9 [string.io] paragraph 4 from:<br>
+<br>
+&nbsp;&nbsp;&nbsp; "... where <tt>n</tt> is the smaller of <tt>os.width()</tt> and <tt>str.size()</tt>;
+..."<br>
+<br>
+to: <br>
+<br>
+&nbsp;&nbsp;&nbsp; "... where <tt>n</tt> is the larger of <tt>os.width()</tt> and <tt>str.size()</tt>;
+..."</p>
+
+
+
+
+
+<hr>
+<h3><a name="26"></a>26. Bad sentry example</h3>
+<p><b>Section:</b> 27.6.1.1.3 [istream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::sentry">issues</a> in [istream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In paragraph 6, the code in the example: </p>
+
+<pre> template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ basic_istream&lt;charT,traits&gt;::sentry(
+ basic_istream&lt;charT,traits&gt;&amp; is, bool noskipws = false) {
+ ...
+ int_type c;
+ typedef ctype&lt;charT&gt; ctype_type;
+ const ctype_type&amp; ctype = use_facet&lt;ctype_type&gt;(is.getloc());
+ while ((c = is.rdbuf()-&gt;snextc()) != traits::eof()) {
+ if (ctype.is(ctype.space,c)==0) {
+ is.rdbuf()-&gt;sputbackc (c);
+ break;
+ }
+ }
+ ...
+ }</pre>
+
+<p>fails to demonstrate correct use of the facilities described. In
+particular, it fails to use traits operators, and specifies incorrect
+semantics. (E.g. it specifies skipping over the first character in the
+sequence without examining it.) </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the example above from 27.6.1.1.3 [istream::sentry]
+paragraph 6.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The originally proposed replacement code for the example was not
+correct. The LWG tried in Kona and again in Tokyo to correct it
+without success. In Tokyo, an implementor reported that actual working
+code ran over one page in length and was quite complicated. The LWG
+decided that it would be counter-productive to include such a lengthy
+example, which might well still contain errors.</p>
+
+
+
+
+
+<hr>
+<h3><a name="27"></a>27. String::erase(range) yields wrong iterator</h3>
+<p><b>Section:</b> 21.3.6.5 [string::erase] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::erase">issues</a> in [string::erase].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The string::erase(iterator first, iterator last) is specified to return an element one
+place beyond the next element after the last one erased. E.g. for the string
+"abcde", erasing the range ['b'..'d') would yield an iterator for element 'e',
+while 'd' has not been erased. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 21.3.6.5 [string::erase], paragraph 10, change: </p>
+
+<blockquote>
+ <p>Returns: an iterator which points to the element immediately following _last_ prior to
+ the element being erased. </p>
+</blockquote>
+
+<p>to read </p>
+
+<blockquote>
+ <p>Returns: an iterator which points to the element pointed to by _last_ prior to the
+ other elements being erased. </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="28"></a>28. Ctype&lt;char&gt;is ambiguous</h3>
+<p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#236">236</a></p>
+<p><b>Discussion:</b></p>
+<p>The description of the vector form of ctype&lt;char&gt;::is can be interpreted to mean
+something very different from what was intended. Paragraph 4 says </p>
+
+<blockquote>
+ <p>Effects: The second form, for all *p in the range [low, high), assigns vec[p-low] to
+ table()[(unsigned char)*p]. </p>
+</blockquote>
+
+<p>This is intended to copy the value indexed from table()[] into the place identified in
+vec[]. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 22.2.1.3.2 [facet.ctype.char.members], paragraph 4, to read </p>
+
+<blockquote>
+ <p>Effects: The second form, for all *p in the range [low, high), assigns into vec[p-low]
+ the value table()[(unsigned char)*p]. </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="29"></a>29. Ios_base::init doesn't exist</h3>
+<p><b>Section:</b> 27.3.1 [narrow.stream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#narrow.stream.objects">issues</a> in [narrow.stream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Sections 27.3.1 [narrow.stream.objects] and 27.3.2 [wide.stream.objects] mention
+a function ios_base::init, which is not defined. Probably they mean
+basic_ios&lt;&gt;::init, defined in 27.4.4.1 [basic.ios.cons],
+paragraph 3. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>[R12: modified to include paragraph 5.]</p>
+
+<p>In 27.3.1 [narrow.stream.objects] paragraph 2 and 5, change </p>
+
+<blockquote>
+ <p>ios_base::init </p>
+</blockquote>
+
+<p>to </p>
+
+<blockquote>
+ <p>basic_ios&lt;char&gt;::init </p>
+</blockquote>
+
+<p>Also, make a similar change in 27.3.2 [wide.stream.objects] except it
+should read </p>
+
+<blockquote>
+ <p>basic_ios&lt;wchar_t&gt;::init </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="30"></a>30. Wrong header for LC_*</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 2 implies that the C macros LC_CTYPE etc. are defined in &lt;cctype&gt;,
+where they are in fact defined elsewhere to appear in &lt;clocale&gt;. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1.1.1 [locale.category], paragraph 2, change
+"&lt;cctype&gt;" to read "&lt;clocale&gt;". </p>
+
+
+
+
+
+<hr>
+<h3><a name="31"></a>31. Immutable locale values</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#378">378</a></p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 6, says "An instance of <tt>locale</tt> is
+<i>immutable</i>; once a facet reference is obtained from it,
+...". This has caused some confusion, because locale variables
+are manifestly assignable. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1 [locale] replace paragraph 6</p>
+
+<blockquote>
+ <p>An instance of <tt>locale</tt> is immutable; once a facet
+ reference is obtained from it, that reference remains usable as long
+ as the locale value itself exists.</p>
+</blockquote>
+
+<p>with</p>
+
+<blockquote>
+ <p>Once a facet reference is obtained from a locale object by
+ calling use_facet&lt;&gt;, that reference remains usable, and the
+ results from member functions of it may be cached and re-used, as
+ long as some locale object refers to that facet.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="32"></a>32. Pbackfail description inconsistent</h3>
+<p><b>Section:</b> 27.5.2.4.4 [streambuf.virt.pback] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description of the required state before calling virtual member
+basic_streambuf&lt;&gt;::pbackfail requirements is inconsistent with the conditions
+described in 27.5.2.2.4 [lib.streambuf.pub.pback] where member sputbackc calls it.
+Specifically, the latter says it calls pbackfail if: </p>
+
+<p>&nbsp;&nbsp;&nbsp; traits::eq(c,gptr()[-1]) is false </p>
+
+<p>where pbackfail claims to require: </p>
+
+<p>&nbsp;&nbsp;&nbsp; traits::eq(*gptr(),traits::to_char_type(c)) returns false </p>
+
+<p>It appears that the pbackfail description is wrong. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.5.2.4.4 [streambuf.virt.pback], paragraph 1, change:</p>
+
+<blockquote>
+ <p>"<tt>traits::eq(*gptr(),traits::to_char_type( c))</tt>"</p>
+</blockquote>
+
+<p>to </p>
+
+<blockquote>
+ <p>"<tt>traits::eq(traits::to_char_type(c),gptr()[-1])</tt>"
+ </p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Note deliberate reordering of arguments for clarity in addition to the correction of
+the argument value.</p>
+
+
+
+
+
+<hr>
+<h3><a name="33"></a>33. Codecvt&lt;&gt; mentions from_type</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#43">43</a></p>
+<p><b>Discussion:</b></p>
+<p>In the table defining the results from do_out and do_in, the specification for the
+result <i>error</i> says </p>
+
+<blockquote>
+ <p>encountered a from_type character it could not convert </p>
+</blockquote>
+
+<p>but from_type is not defined. This clearly is intended to be an externT for do_in, or
+an internT for do_out. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 4, replace the definition
+in the table for the case of _error_ with </p>
+
+<blockquote>
+ <p>encountered a character in <tt>[from,from_end)</tt> that it could not convert. </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="34"></a>34. True/falsename() not in ctype&lt;&gt;</h3>
+<p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In paragraph 19, Effects:, members truename() and falsename are used from facet
+ctype&lt;charT&gt;, but it has no such members. Note that this is also a problem in
+22.2.2.1.2, addressed in (4). </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.2.2 [facet.num.put.virtuals], paragraph 19, in the Effects:
+clause for member put(...., bool), replace the initialization of the
+string_type value s as follows: </p>
+
+<blockquote>
+ <pre>const numpunct&amp; np = use_facet&lt;numpunct&lt;charT&gt; &gt;(loc);
+string_type s = val ? np.truename() : np.falsename(); </pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="35"></a>35. No manipulator unitbuf in synopsis</h3>
+<p><b>Section:</b> 27.4 [iostreams.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 27.4.5.1 [fmtflags.manip], we have a definition for a manipulator
+named "unitbuf". Unlike other manipulators, it's not listed
+in synopsis. Similarly for "nounitbuf". </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to the synopsis for &lt;ios&gt; in 27.4 [iostreams.base], after
+the entry for "nouppercase", the prototypes: </p>
+
+<blockquote>
+ <pre>ios_base&amp; unitbuf(ios_base&amp; str);
+ios_base&amp; nounitbuf(ios_base&amp; str); </pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="36"></a>36. Iword &amp; pword storage lifetime omitted</h3>
+<p><b>Section:</b> 27.4.2.5 [ios.base.storage] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.storage">issues</a> in [ios.base.storage].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In the definitions for ios_base::iword and pword, the lifetime of the storage is
+specified badly, so that an implementation which only keeps the last value stored appears
+to conform. In particular, it says: </p>
+
+<p>The reference returned may become invalid after another call to the object's iword
+member with a different index ... </p>
+
+<p>This is not idle speculation; at least one implementation was done this way. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add in 27.4.2.5 [ios.base.storage], in both paragraph 2 and also in
+paragraph 4, replace the sentence: </p>
+
+<blockquote>
+ <p>The reference returned may become invalid after another call to the object's iword
+ [pword] member with a different index, after a call to its copyfmt member, or when the
+ object is destroyed. </p>
+</blockquote>
+
+<p>with: </p>
+
+<blockquote>
+ <p>The reference returned is invalid after any other operations on the object. However,
+ the value of the storage referred to is retained, so that until the next call to copyfmt,
+ calling iword [pword] with the same index yields another reference to the same value. </p>
+</blockquote>
+
+<p>substituting "iword" or "pword" as appropriate. </p>
+
+
+
+
+
+<hr>
+<h3><a name="37"></a>37. Leftover "global" reference</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In the overview of locale semantics, paragraph 4, is the sentence </p>
+
+<blockquote>
+ <p>If Facet is not present in a locale (or, failing that, in the global locale), it throws
+ the standard exception bad_cast. </p>
+</blockquote>
+
+<p>This is not supported by the definition of use_facet&lt;&gt;, and represents semantics
+from an old draft. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1 [locale], paragraph 4, delete the parenthesized
+expression </p>
+
+<blockquote>
+ <p>(or, failing that, in the global locale) </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="38"></a>38. Facet definition incomplete</h3>
+<p><b>Section:</b> 22.1.2 [locale.global.templates] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It has been noticed by Esa Pulkkinen that the definition of
+"facet" is incomplete. In particular, a class derived from
+another facet, but which does not define a member <i>id</i>, cannot
+safely serve as the argument <i>F</i> to use_facet&lt;F&gt;(loc),
+because there is no guarantee that a reference to the facet instance
+stored in <i>loc</i> is safely convertible to <i>F</i>. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the definition of std::use_facet&lt;&gt;(), replace the text in paragraph 1 which
+reads: </p>
+
+<blockquote>
+ <p>Get a reference to a facet of a locale. </p>
+</blockquote>
+
+<p>with: </p>
+
+<blockquote>
+ <p>Requires: <tt>Facet</tt> is a facet class whose definition
+ contains the public static member <tt>id</tt> as defined in 22.1.1.1.2 [locale.facet]. </p>
+</blockquote>
+
+<p><i>[
+Kona: strike as overspecification the text "(not inherits)"
+from the original resolution, which read "... whose definition
+contains (not inherits) the public static member
+<tt>id</tt>..."
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="39"></a>39. istreambuf_iterator&lt;&gt;::operator++(int) definition garbled</h3>
+<p><b>Section:</b> 24.5.3.4 [istreambuf.iterator::op++] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Following the definition of istreambuf_iterator&lt;&gt;::operator++(int) in paragraph
+3, the standard contains three lines of garbage text left over from a previous edit. </p>
+
+<blockquote>
+ <pre>istreambuf_iterator&lt;charT,traits&gt; tmp = *this;
+sbuf_-&gt;sbumpc();
+return(tmp); </pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 24.5.3.4 [istreambuf.iterator::op++], delete the three lines of code at the
+end of paragraph 3. </p>
+
+
+
+
+
+<hr>
+<h3><a name="40"></a>40. Meaningless normative paragraph in examples</h3>
+<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 3 of the locale examples is a description of part of an
+implementation technique that has lost its referent, and doesn't mean
+anything. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Delete 22.2.8 [facets.examples] paragraph 3 which begins "This
+initialization/identification system depends...", or (at the
+editor's option) replace it with a place-holder to keep the paragraph
+numbering the same. </p>
+
+
+
+
+
+<hr>
+<h3><a name="41"></a>41. Ios_base needs clear(), exceptions()</h3>
+<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#157">157</a></p>
+<p><b>Discussion:</b></p>
+<p>The description of ios_base::iword() and pword() in 27.4.2.4 [ios.members.static], say that if they fail, they "set badbit,
+which may throw an exception". However, ios_base offers no
+interface to set or to test badbit; those interfaces are defined in
+basic_ios&lt;&gt;. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the description in 27.4.2.5 [ios.base.storage] in
+paragraph 2, and also in paragraph 4, as follows. Replace</p>
+
+<blockquote>
+ <p>If the function fails it sets badbit, which may throw an exception.</p>
+</blockquote>
+
+<p>with</p>
+
+<blockquote>
+ <p>If the function fails, and <tt>*this</tt> is a base sub-object of
+ a <tt>basic_ios&lt;&gt;</tt> object or sub-object, the effect is
+ equivalent to calling <tt>basic_ios&lt;&gt;::setstate(badbit)</tt>
+ on the derived object (which may throw <tt>failure</tt>).</p>
+</blockquote>
+
+<p><i>[Kona: LWG reviewed wording; setstate(failbit) changed to
+setstate(badbit).]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="42"></a>42. String ctors specify wrong default allocator</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The basic_string&lt;&gt; copy constructor: </p>
+
+<pre>basic_string(const basic_string&amp; str, size_type pos = 0,
+ size_type n = npos, const Allocator&amp; a = Allocator()); </pre>
+
+<p>specifies an Allocator argument default value that is
+counter-intuitive. The natural choice for a the allocator to copy from
+is str.get_allocator(). Though this cannot be expressed in
+default-argument notation, overloading suffices. </p>
+
+<p>Alternatively, the other containers in Clause 23 (deque, list,
+vector) do not have this form of constructor, so it is inconsistent,
+and an evident source of confusion, for basic_string&lt;&gt; to have
+it, so it might better be removed. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p> In 21.3 [basic.string], replace the declaration of the copy
+constructor as follows: </p>
+
+<blockquote>
+ <pre>basic_string(const basic_string&amp; str);
+basic_string(const basic_string&amp; str, size_type pos, size_type n = npos,
+ const Allocator&amp; a = Allocator());</pre>
+</blockquote>
+
+<p>In 21.3.1 [string.require], replace the copy constructor declaration
+as above. Add to paragraph 5, Effects:</p>
+
+<blockquote>
+ <p>In the first form, the Allocator value used is copied from
+ <tt>str.get_allocator()</tt>.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes the constructor is actually broken, rather than
+just an unfortunate design choice.</p>
+
+<p>The LWG considered two other possible resolutions:</p>
+
+<p>A. In 21.3 [basic.string], replace the declaration of the copy
+constructor as follows:</p>
+
+<blockquote>
+ <pre>basic_string(const basic_string&amp; str, size_type pos = 0,
+ size_type n = npos);
+basic_string(const basic_string&amp; str, size_type pos,
+ size_type n, const Allocator&amp; a); </pre>
+</blockquote>
+
+<p>In 21.3.1 [string.require], replace the copy constructor declaration
+as above. Add to paragraph 5, Effects: </p>
+
+<blockquote>
+ <p>When no <tt>Allocator</tt> argument is provided, the string is constructed using the
+ value <tt>str.get_allocator()</tt>. </p>
+</blockquote>
+
+<p>B. In 21.3 [basic.string], and also in 21.3.1 [string.require], replace
+the declaration of the copy constructor as follows: </p>
+
+<blockquote>
+ <pre>basic_string(const basic_string&amp; str, size_type pos = 0,
+ size_type n = npos); </pre>
+</blockquote>
+
+<p>The proposed resolution reflects the original intent of the LWG. It
+was also noted by Pete Becker that this fix "will cause
+a small amount of existing code to now work correctly."</p>
+
+<p><i>[
+Kona: issue editing snafu fixed - the proposed resolution now correctly
+reflects the LWG consensus.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="44"></a>44. Iostreams use operator== on int_type values</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Many of the specifications for iostreams specify that character
+values or their int_type equivalents are compared using operators ==
+or !=, though in other places traits::eq() or traits::eq_int_type is
+specified to be used throughout. This is an inconsistency; we should
+change uses of == and != to use the traits members instead. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>[Pre-Kona: Dietmar supplied wording]</i></p>
+
+
+<p>List of changes to clause 27:</p>
+<ol>
+<li>
+ In lib.basic.ios.members paragraph 13 (postcondition clause for
+ 'fill(cT)') change
+
+<blockquote><pre> fillch == fill()
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(fillch, fill())
+</pre></blockquote>
+
+
+</li>
+<li>
+ In lib.istream.unformatted paragraph 7 (effects clause for
+ 'get(cT,streamsize,cT)'), third bullet, change
+
+<blockquote><pre> c == delim for the next available input character c
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(c, delim) for the next available input character c
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.istream.unformatted paragraph 12 (effects clause for
+ 'get(basic_streambuf&lt;cT,Tr&gt;&amp;,cT)'), third bullet, change
+
+<blockquote><pre> c == delim for the next available input character c
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(c, delim) for the next available input character c
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.istream.unformatted paragraph 17 (effects clause for
+ 'getline(cT,streamsize,cT)'), second bullet, change
+
+<blockquote><pre> c == delim for the next available input character c
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(c, delim) for the next available input character c
+ </pre></blockquote>
+
+</li>
+<li>
+ In lib.istream.unformatted paragraph 24 (effects clause for
+ 'ignore(int,int_type)'), second bullet, change
+
+<blockquote><pre> c == delim for the next available input character c
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq_int_type(c, delim) for the next available input
+ character c
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.istream.unformatted paragraph 25 (notes clause for
+ 'ignore(int,int_type)'), second bullet, change
+
+<blockquote><pre> The last condition will never occur if delim == traits::eof()
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> The last condition will never occur if
+ traits::eq_int_type(delim, traits::eof()).
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.istream.sentry paragraph 6 (example implementation for the
+ sentry constructor) change
+
+<blockquote><pre> while ((c = is.rdbuf()-&gt;snextc()) != traits::eof()) {
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> while (!traits::eq_int_type(c = is.rdbuf()-&gt;snextc(), traits::eof())) {
+</pre></blockquote>
+
+</li>
+</ol>
+
+<p>List of changes to Chapter 21:</p>
+
+<ol>
+<li>
+ In lib.string::find paragraph 1 (effects clause for find()),
+ second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.string::rfind paragraph 1 (effects clause for rfind()),
+ second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.string::find.first.of paragraph 1 (effects clause for
+ find_first_of()), second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.string::find.last.of paragraph 1 (effects clause for
+ find_last_of()), second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+
+</li>
+<li>
+ In lib.string::find.first.not.of paragraph 1 (effects clause for
+ find_first_not_of()), second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+</li>
+
+<li>
+ In lib.string::find.last.not.of paragraph 1 (effects clause for
+ find_last_not_of()), second bullet, change
+
+<blockquote><pre> at(xpos+I) == str.at(I) for all elements ...
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ...
+</pre></blockquote>
+</li>
+
+<li>
+ In lib.string.ios paragraph 5 (effects clause for getline()),
+ second bullet, change
+
+<blockquote><pre> c == delim for the next available input character c
+</pre></blockquote>
+
+ to
+
+<blockquote><pre> traits::eq(c, delim) for the next available input character c
+</pre></blockquote>
+</li>
+
+</ol>
+
+<p>Notes:</p>
+<ul>
+<li>
+ Fixing this issue highlights another sloppyness in
+ lib.istream.unformatted paragraph 24: this clause mentions a "character"
+ which is then compared to an 'int_type' (see item 5. in the list
+ below). It is not clear whether this requires explicit words and
+ if so what these words are supposed to be. A similar issue exists,
+ BTW, for operator*() of istreambuf_iterator which returns the result
+ of sgetc() as a character type (see lib.istreambuf.iterator::op*
+ paragraph 1), and for operator++() of istreambuf_iterator which
+ passes the result of sbumpc() to a constructor taking a char_type
+ (see lib.istreambuf.iterator::operator++ paragraph 3). Similarily, the
+ assignment operator ostreambuf_iterator passes a char_type to a function
+ taking an int_type (see lib.ostreambuf.iter.ops paragraph 1).
+</li>
+<li>
+ It is inconsistent to use comparisons using the traits functions in
+ Chapter 27 while not using them in Chapter 21, especially as some
+ of the inconsistent uses actually involve streams (eg. getline() on
+ streams). To avoid leaving this issue open still longer due to this
+ inconsistency (it is open since 1998), a list of changes to Chapter
+ 21 is below.
+</li>
+<li>
+ In Chapter 24 there are several places with statements like "the end
+ of stream is reached (streambuf_type::sgetc() returns traits::eof())"
+ (lib.istreambuf.iterator paragraph 1, lib.ostreambuf.iter.ops
+ paragraph 5). It is unclear whether these should be clarified to use
+ traits::eq_int_type() for detecting traits::eof().
+</li>
+</ul>
+
+
+
+
+
+
+<hr>
+<h3><a name="46"></a>46. Minor Annex D errors</h3>
+<p><b>Section:</b> D.7 [depr.str.strstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p><p>See lib-6522 and edit-814.</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>Change D.7.1 [depr.strstreambuf] (since streambuf is a typedef of
+basic_streambuf&lt;char&gt;) from:</p>
+
+<pre> virtual streambuf&lt;char&gt;* setbuf(char* s, streamsize n);</pre>
+
+<p>to:</p>
+
+<pre> virtual streambuf* setbuf(char* s, streamsize n);</pre>
+
+<p>In D.7.4 [depr.strstream] insert the semicolon now missing after
+int_type:</p>
+
+<pre> namespace std {
+ class strstream
+ : public basic_iostream&lt;char&gt; {
+ public:
+ // Types
+ typedef char char_type;
+ typedef typename char_traits&lt;char&gt;::int_type int_type
+ typedef typename char_traits&lt;char&gt;::pos_type pos_type;</pre>
+
+
+
+
+
+<hr>
+<h3><a name="47"></a>47. Imbue() and getloc() Returns clauses swapped</h3>
+<p><b>Section:</b> 27.4.2.3 [ios.base.locales] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.locales">issues</a> in [ios.base.locales].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 27.4.2.3 specifies how imbue() and getloc() work. That
+section has two RETURNS clauses, and they make no sense as
+stated. They make perfect sense, though, if you swap them. Am I
+correct in thinking that paragraphs 2 and 4 just got mixed up by
+accident?</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.4.2.3 [ios.base.locales] swap paragraphs 2 and 4.</p>
+
+
+
+
+
+<hr>
+<h3><a name="48"></a>48. Use of non-existent exception constructor</h3>
+<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.4.2.1.1, paragraph 2, says that class failure initializes the
+base class, exception, with exception(msg). Class exception (see
+18.6.1) has no such constructor.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 27.4.2.1.1 [ios::failure], paragraph 2, with</p>
+
+<blockquote>
+ <p>EFFECTS: Constructs an object of class <tt>failure</tt>.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="49"></a>49. Underspecification of ios_base::sync_with_stdio</h3>
+<p><b>Section:</b> 27.4.2.4 [ios.members.static] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Two problems</p>
+
+<p>(1) 27.4.2.4 doesn't say what ios_base::sync_with_stdio(f)
+returns. Does it return f, or does it return the previous
+synchronization state? My guess is the latter, but the standard
+doesn't say so.</p>
+
+<p>(2) 27.4.2.4 doesn't say what it means for streams to be
+synchronized with stdio. Again, of course, I can make some
+guesses. (And I'm unhappy about the performance implications of those
+guesses, but that's another matter.)</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the following sentence in 27.4.2.4 [ios.members.static]
+returns clause from:</p>
+
+<blockquote>
+ <p><tt>true</tt> if the standard iostream objects (27.3) are
+ synchronized and otherwise returns <tt>false</tt>.</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+ <p><tt>true</tt> if the previous state of the standard iostream
+ objects (27.3) was synchronized and otherwise returns
+ <tt>false</tt>.</p>
+</blockquote>
+
+<p>Add the following immediately after 27.4.2.4 [ios.members.static],
+paragraph 2:</p>
+
+<blockquote>
+<p>When a standard iostream object str is <i>synchronized</i> with a
+standard stdio stream f, the effect of inserting a character c by</p>
+<pre> fputc(f, c);
+</pre>
+
+<p>is the same as the effect of</p>
+<pre> str.rdbuf()-&gt;sputc(c);
+</pre>
+
+<p>for any sequence of characters; the effect of extracting a
+character c by</p>
+<pre> c = fgetc(f);
+</pre>
+
+<p>is the same as the effect of:</p>
+<pre> c = str.rdbuf()-&gt;sbumpc(c);
+</pre>
+
+<p>for any sequences of characters; and the effect of pushing
+back a character c by</p>
+<pre> ungetc(c, f);
+</pre>
+
+<p>is the same as the effect of</p>
+<pre> str.rdbuf()-&gt;sputbackc(c);
+</pre>
+
+<p>for any sequence of characters. [<i>Footnote</i>: This implies
+that operations on a standard iostream object can be mixed arbitrarily
+with operations on the corresponding stdio stream. In practical
+terms, synchronization usually means that a standard iostream object
+and a standard stdio object share a buffer. <i>--End Footnote</i>]</p>
+</blockquote>
+
+<p><i>[pre-Copenhagen: PJP and Matt contributed the definition
+of "synchronization"]</i></p>
+
+
+<p><i>[post-Copenhagen: proposed resolution was revised slightly:
+text was added in the non-normative footnote to say that operations
+on the two streams can be mixed arbitrarily.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="50"></a>50. Copy constructor and assignment operator of ios_base</h3>
+<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>As written, ios_base has a copy constructor and an assignment
+operator. (Nothing in the standard says it doesn't have one, and all
+classes have copy constructors and assignment operators unless you
+take specific steps to avoid them.) However, nothing in 27.4.2 says
+what the copy constructor and assignment operator do. </p>
+
+<p>My guess is that this was an oversight, that ios_base is, like
+basic_ios, not supposed to have a copy constructor or an assignment
+operator.</p>
+
+<p>
+Jerry Schwarz comments: Yes, its an oversight, but in the opposite
+sense to what you're suggesting. At one point there was a definite
+intention that you could copy ios_base. It's an easy way to save the
+entire state of a stream for future use. As you note, to carry out
+that intention would have required a explicit description of the
+semantics (e.g. what happens to the iarray and parray stuff).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.4.2 [ios.base], class ios_base, specify the copy
+constructor and operator= members as being private.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes the difficulty of specifying correct semantics
+outweighs any benefit of allowing ios_base objects to be copyable.</p>
+
+
+
+
+
+<hr>
+<h3><a name="51"></a>51. Requirement to not invalidate iterators missing</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> David Vandevoorde <b>Date:</b> 1998-06-23</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The std::sort algorithm can in general only sort a given sequence
+by moving around values. The list&lt;&gt;::sort() member on the other
+hand could move around values or just update internal pointers. Either
+method can leave iterators into the list&lt;&gt; dereferencable, but
+they would point to different things. </p>
+
+<p>Does the FDIS mandate anywhere which method should be used for
+list&lt;&gt;::sort()?</p>
+
+<p>Matt Austern comments:</p>
+
+<p>I think you've found an omission in the standard. </p>
+
+<p>The library working group discussed this point, and there was
+supposed to be a general requirement saying that list, set, map,
+multiset, and multimap may not invalidate iterators, or change the
+values that iterators point to, except when an operation does it
+explicitly. So, for example, insert() doesn't invalidate any iterators
+and erase() and remove() only invalidate iterators pointing to the
+elements that are being erased. </p>
+
+<p>I looked for that general requirement in the FDIS, and, while I
+found a limited form of it for the sorted associative containers, I
+didn't find it for list. It looks like it just got omitted. </p>
+
+<p>The intention, though, is that list&lt;&gt;::sort does not
+invalidate any iterators and does not change the values that any
+iterator points to. There would be no reason to have the member
+function otherwise.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a new paragraph at the end of 23.1:</p>
+
+<blockquote>
+ <p>Unless otherwise specified (either explicitly or by defining a function in terms of
+ other functions), invoking a container member function or passing a container as an
+ argument to a library function shall not invalidate iterators to, or change the values of,
+ objects within that container. </p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>This was US issue CD2-23-011; it was accepted in London but the
+change was not made due to an editing oversight. The wording in the
+proposed resolution below is somewhat updated from CD2-23-011,
+particularly the addition of the phrase "or change the values
+of"</p>
+
+
+
+
+
+<hr>
+<h3><a name="52"></a>52. Small I/O problems</h3>
+<p><b>Section:</b> 27.4.3.2 [fpos.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>First, 27.4.4.1 [basic.ios.cons], table 89. This is pretty obvious:
+it should be titled "basic_ios&lt;&gt;() effects", not
+"ios_base() effects". </p>
+
+<p>[The second item is a duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#6">6</a> for
+resolution.]</p>
+
+<p>Second, 27.4.3.2 [fpos.operations] table 88 . There are a couple
+different things wrong with it, some of which I've already discussed
+with Jerry, but the most obvious mechanical sort of error is that it
+uses expressions like P(i) and p(i), without ever defining what sort
+of thing "i" is.
+</p>
+
+<p>(The other problem is that it requires support for streampos
+arithmetic. This is impossible on some systems, i.e. ones where file
+position is a complicated structure rather than just a number. Jerry
+tells me that the intention was to require syntactic support for
+streampos arithmetic, but that it wasn't actually supposed to do
+anything meaningful except on platforms, like Unix, where genuine
+arithmetic is possible.) </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.4.4.1 [basic.ios.cons] table 89 title from
+"ios_base() effects" to "basic_ios&lt;&gt;()
+effects". </p>
+
+
+
+
+
+<hr>
+<h3><a name="53"></a>53. Basic_ios destructor unspecified</h3>
+<p><b>Section:</b> 27.4.4.1 [basic.ios.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.cons">issues</a> in [basic.ios.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There's nothing in 27.4.4 saying what basic_ios's destructor does.
+The important question is whether basic_ios::~basic_ios() destroys
+rdbuf().</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add after 27.4.4.1 [basic.ios.cons] paragraph 2:</p>
+
+<blockquote>
+ <p><tt>virtual ~basic_ios();</tt></p>
+ <p><b>Notes</b>: The destructor does not destroy <tt>rdbuf()</tt>.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG reviewed the additional question of whether or not
+<tt>rdbuf(0)</tt> may set <tt>badbit</tt>. The answer is
+clearly yes; it may be set via <tt>clear()</tt>. See 27.4.4.2 [basic.ios.members], paragraph 6. This issue was reviewed at length
+by the LWG, which removed from the original proposed resolution a
+footnote which incorrectly said "<tt>rdbuf(0)</tt> does not set
+<tt>badbit</tt>".</p>
+
+
+
+
+
+<hr>
+<h3><a name="54"></a>54. Basic_streambuf's destructor</h3>
+<p><b>Section:</b> 27.5.2.1 [streambuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.cons">issues</a> in [streambuf.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The class synopsis for basic_streambuf shows a (virtual)
+destructor, but the standard doesn't say what that destructor does. My
+assumption is that it does nothing, but the standard should say so
+explicitly. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add after 27.5.2.1 [streambuf.cons] paragraph 2:</p>
+
+<blockquote>
+ <p><tt>virtual&nbsp; ~basic_streambuf();</tt></p>
+ <p><b>Effects</b>: None.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="55"></a>55. Invalid stream position is undefined</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Several member functions in clause 27 are defined in certain
+circumstances to return an "invalid stream position", a term
+that is defined nowhere in the standard. Two places (27.5.2.4.2,
+paragraph 4, and 27.8.1.4, paragraph 15) contain a cross-reference to
+a definition in _lib.iostreams.definitions_, a nonexistent
+section. </p>
+
+<p>I suspect that the invalid stream position is just supposed to be
+pos_type(-1). Probably best to say explicitly in (for example)
+27.5.2.4.2 that the return value is pos_type(-1), rather than to use
+the term "invalid stream position", define that term
+somewhere, and then put in a cross-reference. </p>
+
+<p>The phrase "invalid stream position" appears ten times in
+the C++ Standard. In seven places it refers to a return value, and it
+should be changed. In three places it refers to an argument, and it
+should not be changed. Here are the three places where "invalid
+stream position" should not be changed:</p>
+
+<blockquote>
+ <p>27.7.1.4 [stringbuf.virtuals], paragraph 14<br>
+ 27.8.1.5 [filebuf.virtuals], paragraph 14<br>
+ D.7.1.3 [depr.strstreambuf.virtuals], paragraph 17
+ </p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.5.2.4.2 [streambuf.virt.buffer], paragraph 4, change "Returns an
+object of class pos_type that stores an invalid stream position
+(_lib.iostreams.definitions_)" to "Returns
+<tt>pos_type(off_type(-1))</tt>".
+</p>
+
+<p>In 27.5.2.4.2 [streambuf.virt.buffer], paragraph 6, change "Returns
+an object of class pos_type that stores an invalid stream
+position" to "Returns <tt>pos_type(off_type(-1))</tt>".</p>
+
+<p>In 27.7.1.4 [stringbuf.virtuals], paragraph 13, change "the object
+stores an invalid stream position" to "the return value is
+<tt>pos_type(off_type(-1))</tt>". </p>
+
+<p>In 27.8.1.5 [filebuf.virtuals], paragraph 13, change "returns an
+invalid stream position (27.4.3)" to "returns
+<tt>pos_type(off_type(-1))</tt>" </p>
+
+<p>In 27.8.1.5 [filebuf.virtuals], paragraph 15, change "Otherwise
+returns an invalid stream position (_lib.iostreams.definitions_)"
+to "Otherwise returns <tt>pos_type(off_type(-1))</tt>"
+</p>
+
+<p>In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 15, change "the object
+stores an invalid stream position" to "the return value is
+<tt>pos_type(off_type(-1))</tt>" </p>
+
+<p>In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 18, change "the object
+stores an invalid stream position" to "the return value is
+<tt>pos_type(off_type(-1))</tt>"</p>
+
+
+
+
+
+<hr>
+<h3><a name="56"></a>56. Showmanyc's return type</h3>
+<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The class summary for basic_streambuf&lt;&gt;, in 27.5.2, says that
+showmanyc has return type int. However, 27.5.2.4.3 says that its
+return type is streamsize. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change <tt>showmanyc</tt>'s return type in the
+27.5.2 [streambuf] class summary to <tt>streamsize</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="57"></a>57. Mistake in char_traits</h3>
+<p><b>Section:</b> 21.1.3.4 [char.traits.specializations.wchar.t] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>21.1.3.2, paragraph 3, says "The types streampos and
+wstreampos may be different if the implementation supports no shift
+encoding in narrow-oriented iostreams but supports one or more shift
+encodings in wide-oriented streams". </p>
+
+<p>That's wrong: the two are the same type. The &lt;iosfwd&gt; summary
+in 27.2 says that streampos and wstreampos are, respectively, synonyms
+for fpos&lt;char_traits&lt;char&gt;::state_type&gt; and
+fpos&lt;char_traits&lt;wchar_t&gt;::state_type&gt;, and, flipping back
+to clause 21, we see in 21.1.3.1 and 21.1.3.2 that
+char_traits&lt;char&gt;::state_type and
+char_traits&lt;wchar_t&gt;::state_type must both be mbstate_t. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the sentence in 21.1.3.4 [char.traits.specializations.wchar.t] paragraph 3 which
+begins "The types streampos and wstreampos may be
+different..." . </p>
+
+
+
+
+
+<hr>
+<h3><a name="59"></a>59. Ambiguity in specification of gbump</h3>
+<p><b>Section:</b> 27.5.2.3.2 [streambuf.get.area] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.5.2.3.1 says that basic_streambuf::gbump() "Advances the
+next pointer for the input sequence by n." </p>
+
+<p>The straightforward interpretation is that it is just gptr() +=
+n. An alternative interpretation, though, is that it behaves as if it
+calls sbumpc n times. (The issue, of course, is whether it might ever
+call underflow.) There is a similar ambiguity in the case of
+pbump. </p>
+
+<p>(The "classic" AT&amp;T implementation used the
+former interpretation.)</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.5.2.3.2 [streambuf.get.area] paragraph 4 gbump effects from:</p>
+
+<blockquote>
+ <p>Effects: Advances the next pointer for the input sequence by n.</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+ <p>Effects: Adds <tt>n</tt> to the next pointer for the input sequence.</p>
+</blockquote>
+
+<p>Make the same change to 27.5.2.3.3 [streambuf.put.area] paragraph 4 pbump
+effects.</p>
+
+
+
+
+
+<hr>
+<h3><a name="60"></a>60. What is a formatted input function?</h3>
+<p><b>Section:</b> 27.6.1.2.1 [istream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.reqmts">issues</a> in [istream.formatted.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#162">162</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#163">163</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#166">166</a></p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 1 of 27.6.1.2.1 contains general requirements for all
+formatted input functions. Some of the functions defined in section
+27.6.1.2 explicitly say that those requirements apply ("Behaves
+like a formatted input member (as described in 27.6.1.2.1)"), but
+others don't. The question: is 27.6.1.2.1 supposed to apply to
+everything in 27.6.1.2, or only to those member functions that
+explicitly say "behaves like a formatted input member"? Or
+to put it differently: are we to assume that everything that appears
+in a section called "Formatted input functions" really is a
+formatted input function? I assume that 27.6.1.2.1 is intended to
+apply to the arithmetic extractors (27.6.1.2.2), but I assume that it
+is not intended to apply to extractors like </p>
+
+<pre> basic_istream&amp; operator&gt;&gt;(basic_istream&amp; (*pf)(basic_istream&amp;));</pre>
+
+<p>and </p>
+
+<pre> basic_istream&amp; operator&gt;&gt;(basic_streammbuf*);</pre>
+
+<p>There is a similar ambiguity for unformatted input, formatted output, and unformatted
+output. </p>
+
+<p>Comments from Judy Ward: It seems like the problem is that the
+basic_istream and basic_ostream operator &lt;&lt;()'s that are used
+for the manipulators and streambuf* are in the wrong section and
+should have their own separate section or be modified to make it clear
+that the "Common requirements" listed in section 27.6.1.2.1
+(for basic_istream) and section 27.6.2.5.1 (for basic_ostream) do not
+apply to them. </p>
+
+<p>Additional comments from Dietmar Kühl: It appears to be somewhat
+nonsensical to consider the functions defined in 27.6.1.2.3
+[istream::extractors] paragraphs 1 to 5 to be "Formatted input
+function" but since these functions are defined in a section
+labeled "Formatted input functions" it is unclear to me
+whether these operators are considered formatted input functions which
+have to conform to the "common requirements" from 27.6.1.2.1
+[istream.formatted.reqmts]: If this is the case, all manipulators, not
+just <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is
+set (... but setting <tt>noskipws</tt> using the manipulator syntax
+would also skip whitespace :-)</p> <p>It is not clear which functions
+are to be considered unformatted input functions. As written, it seems
+that all functions in 27.6.1.3 [istream.unformatted] are unformatted input
+functions. However, it does not really make much sense to construct a
+sentry object for <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is
+unclear what happens to the <tt>gcount()</tt> if
+eg. <tt>gcount()</tt>, <tt>putback()</tt>, <tt>unget()</tt>, or
+<tt>sync()</tt> is called: These functions don't extract characters,
+some of them even "unextract" a character. Should this still
+be reflected in <tt>gcount()</tt>? Of course, it could be read as if
+after a call to <tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt>
+(the last unformatted input function, <tt>gcount()</tt>, didn't
+extract any character) and after a call to <tt>putback()</tt>
+<tt>gcount()</tt> returns <tt>-1</tt> (the last unformatted input
+function <tt>putback()</tt> did "extract" back into the
+stream). Correspondingly for <tt>unget()</tt>. Is this what is
+intended? If so, this should be clarified. Otherwise, a corresponding
+clarification should be used.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.6.1.2.2 [lib.istream.formatted.arithmetic], paragraph 1.
+Change the beginning of the second sentence from "The conversion
+occurs" to "These extractors behave as formatted input functions (as
+described in 27.6.1.2.1). After a sentry object is constructed,
+the conversion occurs"
+</p>
+
+<p>
+In 27.6.1.2.3, [lib.istream::extractors], before paragraph 1.
+Add an effects clause. "Effects: None. This extractor does
+not behave as a formatted input function (as described in
+27.6.1.2.1).
+</p>
+
+<p>
+In 27.6.1.2.3, [lib.istream::extractors], paragraph 2. Change the
+effects clause to "Effects: Calls pf(*this). This extractor does not
+behave as a formatted input function (as described in 27.6.1.2.1).
+</p>
+
+<p>
+In 27.6.1.2.3, [lib.istream::extractors], paragraph 4. Change the
+effects clause to "Effects: Calls pf(*this). This extractor does not
+behave as a formatted input function (as described in 27.6.1.2.1).
+</p>
+
+<p>
+In 27.6.1.2.3, [lib.istream::extractors], paragraph 12. Change the
+first two sentences from "If sb is null, calls setstate(failbit),
+which may throw ios_base::failure (27.4.4.3). Extracts characters
+from *this..." to "Behaves as a formatted input function (as described
+in 27.6.1.2.1). If sb is null, calls setstate(failbit), which may
+throw ios_base::failure (27.4.4.3). After a sentry object is
+constructed, extracts characters from *this...".
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], before paragraph 2. Add an
+effects clause. "Effects: none. This member function does not behave
+as an unformatted input function (as described in 27.6.1.3, paragraph 1)."
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 3. Change the
+beginning of the first sentence of the effects clause from "Extracts a
+character" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts a
+character"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 5. Change the
+beginning of the first sentence of the effects clause from "Extracts a
+character" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts a
+character"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 7. Change the
+beginning of the first sentence of the effects clause from "Extracts
+characters" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
+characters"
+</p>
+
+<p>
+[No change needed in paragraph 10, because it refers to paragraph 7.]
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 12. Change the
+beginning of the first sentence of the effects clause from "Extracts
+characters" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
+characters"
+</p>
+
+<p>
+[No change needed in paragraph 15.]
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 17. Change the
+beginning of the first sentence of the effects clause from "Extracts
+characters" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
+characters"
+</p>
+
+<p>
+[No change needed in paragraph 23.]
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 24. Change the
+beginning of the first sentence of the effects clause from "Extracts
+characters" to "Behaves as an unformatted input function (as described
+in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
+characters"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], before paragraph 27. Add an
+Effects clause: "Effects: Behaves as an unformatted input function (as
+described in 27.6.1.3, paragraph 1). After constructing a sentry
+object, reads but does not extract the current input character."
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 28. Change the
+first sentence of the Effects clause from "If !good() calls" to
+Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1). After constructing a sentry object, if !good() calls"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 30. Change the
+first sentence of the Effects clause from "If !good() calls" to
+"Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1). After constructing a sentry object, if !good() calls"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 32. Change the
+first sentence of the Effects clause from "If !good() calls..." to
+"Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1). After constructing a sentry object, if !good()
+calls..." Add a new sentence to the end of the Effects clause:
+"[Note: this function extracts no characters, so the value returned
+by the next call to gcount() is 0.]"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 34. Change the
+first sentence of the Effects clause from "If !good() calls" to
+"Behaves as an unformatted input function (as described in 27.6.1.3,
+paragraph 1). After constructing a sentry object, if !good() calls".
+Add a new sentence to the end of the Effects clause: "[Note: this
+function extracts no characters, so the value returned by the next
+call to gcount() is 0.]"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 36. Change the
+first sentence of the Effects clause from "If !rdbuf() is" to "Behaves
+as an unformatted input function (as described in 27.6.1.3, paragraph
+1), except that it does not count the number of characters extracted
+and does not affect the value returned by subsequent calls to
+gcount(). After constructing a sentry object, if rdbuf() is"
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], before paragraph 37. Add an
+Effects clause: "Effects: Behaves as an unformatted input function (as
+described in 27.6.1.3, paragraph 1), except that it does not count the
+number of characters extracted and does not affect the value returned
+by subsequent calls to gcount()." Change the first sentence of
+paragraph 37 from "if fail()" to "after constructing a sentry object,
+if fail()".
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 38. Change the
+first sentence of the Effects clause from "If fail()" to "Behaves
+as an unformatted input function (as described in 27.6.1.3, paragraph
+1), except that it does not count the number of characters extracted
+and does not affect the value returned by subsequent calls to
+gcount(). After constructing a sentry object, if fail()
+</p>
+
+<p>
+In 27.6.1.3, [lib.istream.unformatted], paragraph 40. Change the
+first sentence of the Effects clause from "If fail()" to "Behaves
+as an unformatted input function (as described in 27.6.1.3, paragraph
+1), except that it does not count the number of characters extracted
+and does not affect the value returned by subsequent calls to
+gcount(). After constructing a sentry object, if fail()
+</p>
+
+<p>
+In 27.6.2.5.2 [lib.ostream.inserters.arithmetic], paragraph 1. Change
+the beginning of the third sentence from "The formatting conversion"
+to "These extractors behave as formatted output functions (as
+described in 27.6.2.5.1). After the sentry object is constructed, the
+conversion occurs".
+</p>
+
+<p>
+In 27.6.2.5.3 [lib.ostream.inserters], before paragraph 1. Add an
+effects clause: "Effects: None. Does not behave as a formatted output
+function (as described in 27.6.2.5.1).".
+</p>
+
+<p>
+In 27.6.2.5.3 [lib.ostream.inserters], paragraph 2. Change the
+effects clause to "Effects: calls pf(*this). This extractor does not
+behave as a formatted output function (as described in 27.6.2.5.1).".
+</p>
+
+<p>
+In 27.6.2.5.3 [lib.ostream.inserters], paragraph 4. Change the
+effects clause to "Effects: calls pf(*this). This extractor does not
+behave as a formatted output function (as described in 27.6.2.5.1).".
+</p>
+
+<p>
+In 27.6.2.5.3 [lib.ostream.inserters], paragraph 6. Change the first
+sentence from "If sb" to "Behaves as a formatted output function (as
+described in 27.6.2.5.1). After the sentry object is constructed, if
+sb".
+</p>
+
+<p>
+In 27.6.2.6 [lib.ostream.unformatted], paragraph 2. Change the first
+sentence from "Inserts the character" to "Behaves as an unformatted
+output function (as described in 27.6.2.6, paragraph 1). After
+constructing a sentry object, inserts the character".
+</p>
+
+<p>
+In 27.6.2.6 [lib.ostream.unformatted], paragraph 5. Change the first
+sentence from "Obtains characters" to "Behaves as an unformatted
+output function (as described in 27.6.2.6, paragraph 1). After
+constructing a sentry object, obtains characters".
+</p>
+
+<p>
+In 27.6.2.6 [lib.ostream.unformatted], paragraph 7. Add a new
+sentence at the end of the paragraph: "Does not behave as an
+unformatted output function (as described in 27.6.2.6, paragraph 1)."
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>See J16/99-0043==WG21/N1219, Proposed Resolution to Library Issue 60,
+by Judy Ward and Matt Austern. This proposed resolution is section
+VI of that paper.</p>
+
+
+
+
+
+<hr>
+<h3><a name="61"></a>61. Ambiguity in iostreams exception policy</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The introduction to the section on unformatted input (27.6.1.3)
+says that every unformatted input function catches all exceptions that
+were thrown during input, sets badbit, and then conditionally rethrows
+the exception. That seems clear enough. Several of the specific
+functions, however, such as get() and read(), are documented in some
+circumstances as setting eofbit and/or failbit. (The standard notes,
+correctly, that setting eofbit or failbit can sometimes result in an
+exception being thrown.) The question: if one of these functions
+throws an exception triggered by setting failbit, is this an exception
+"thrown during input" and hence covered by 27.6.1.3, or does
+27.6.1.3 only refer to a limited class of exceptions? Just to make
+this concrete, suppose you have the following snippet. </p>
+
+<pre>
+ char buffer[N];
+ istream is;
+ ...
+ is.exceptions(istream::failbit); // Throw on failbit but not on badbit.
+ is.read(buffer, N);</pre>
+
+<p>Now suppose we reach EOF before we've read N characters. What
+iostate bits can we expect to be set, and what exception (if any) will
+be thrown? </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.6.1.3, paragraph 1, after the sentence that begins
+"If an exception is thrown...", add the following
+parenthetical comment: "(Exceptions thrown from
+<tt>basic_ios&lt;&gt;::clear()</tt> are not caught or rethrown.)"
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG looked to two alternative wordings, and choose the proposed
+resolution as better standardese.</p>
+
+
+
+
+
+<hr>
+<h3><a name="62"></a>62. <tt>Sync</tt>'s return value</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The Effects clause for sync() (27.6.1.3, paragraph 36) says that it
+"calls rdbuf()-&gt;pubsync() and, if that function returns -1
+... returns traits::eof()." </p>
+
+<p>That looks suspicious, because traits::eof() is of type
+traits::int_type while the return type of sync() is int. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.1.3 [istream.unformatted], paragraph 36, change "returns
+<tt>traits::eof()</tt>" to "returns <tt>-1</tt>".
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="63"></a>63. Exception-handling policy for unformatted output</h3>
+<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Clause 27 details an exception-handling policy for formatted input,
+unformatted input, and formatted output. It says nothing for
+unformatted output (27.6.2.6). 27.6.2.6 should either include the same
+kind of exception-handling policy as in the other three places, or
+else it should have a footnote saying that the omission is
+deliberate. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.6.2.6, paragraph 1, replace the last sentence ("In any
+case, the unformatted output function ends by destroying the sentry
+object, then returning the value specified for the formatted output
+function.") with the following text:
+</p>
+<blockquote><p>
+If an exception is thrown during output, then <tt>ios::badbit</tt> is
+turned on [Footnote: without causing an <tt>ios::failure</tt> to be
+thrown.] in <tt>*this</tt>'s error state. If <tt>(exceptions() &amp;
+badbit) != 0</tt> then the exception is rethrown. In any case, the
+unformatted output function ends by destroying the sentry object,
+then, if no exception was thrown, returning the value specified for
+the formatted output function.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+This exception-handling policy is consistent with that of formatted
+input, unformatted input, and formatted output.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="64"></a>64. Exception handling in <tt>basic_istream::operator&gt;&gt;(basic_streambuf*)</tt></h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.6.1.2.3, paragraph 13, is ambiguous. It can be interpreted two
+different ways, depending on whether the second sentence is read as an
+elaboration of the first. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 27.6.1.2.3 [istream::extractors], paragraph 13, which begins
+"If the function inserts no characters ..." with:</p>
+
+<blockquote>
+ <p>If the function inserts no characters, it calls
+ <tt>setstate(failbit)</tt>, which may throw
+ <tt>ios_base::failure</tt> (27.4.4.3). If it inserted no characters
+ because it caught an exception thrown while extracting characters
+ from <tt>sb</tt> and <tt>failbit</tt> is on in <tt>exceptions()</tt>
+ (27.4.4.3), then the caught exception is rethrown. </p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="66"></a>66. Strstreambuf::setbuf</h3>
+<p><b>Section:</b> D.7.1.3 [depr.strstreambuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.strstreambuf.virtuals">issues</a> in [depr.strstreambuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>D.7.1.3, paragraph 19, says that strstreambuf::setbuf
+"Performs an operation that is defined separately for each class
+derived from strstreambuf". This is obviously an incorrect
+cut-and-paste from basic_streambuf. There are no classes derived from
+strstreambuf. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>D.7.1.3 [depr.strstreambuf.virtuals], paragraph 19, replace the setbuf effects
+clause which currently says "Performs an operation that is
+defined separately for each class derived from strstreambuf"
+with:</p>
+
+<blockquote>
+ <p><b>Effects</b>: implementation defined, except that
+ <tt>setbuf(0,0)</tt> has no effect.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="68"></a>68. Extractors for char* should store null at end</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-07-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Extractors for char* (27.6.1.2.3) do not store a null character
+after the extracted character sequence whereas the unformatted
+functions like get() do. Why is this?</p>
+
+<p>Comment from Jerry Schwarz: There is apparently an editing
+glitch. You'll notice that the last item of the list of what stops
+extraction doesn't make any sense. It was supposed to be the line that
+said a null is stored.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>27.6.1.2.3 [istream::extractors], paragraph 7, change the last list
+item from:</p>
+
+<blockquote><p>
+ A null byte (<tt>charT()</tt>) in the next position, which may be
+ the first position if no characters were extracted.
+</p></blockquote>
+
+<p>to become a new paragraph which reads:</p>
+
+<blockquote><p>
+ Operator&gt;&gt; then stores a null byte (<tt>charT()</tt>) in the
+ next position, which may be the first position if no characters were
+ extracted.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="69"></a>69. Must elements of a vector be contiguous?</h3>
+<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1998-07-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The issue is this: Must the elements of a vector be in contiguous memory?</p>
+
+<p>(Please note that this is entirely separate from the question of
+whether a vector iterator is required to be a pointer; the answer to
+that question is clearly "no," as it would rule out
+debugging implementations)</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following text to the end of 23.2.5 [vector],
+paragraph 1. </p>
+
+<blockquote>
+ <p>The elements of a vector are stored contiguously, meaning that if
+ v is a <tt>vector&lt;T, Allocator&gt;</tt> where T is some type
+ other than <tt>bool</tt>, then it obeys the identity <tt>&amp;v[n]
+ == &amp;v[0] + n</tt> for all <tt>0 &lt;= n &lt; v.size()</tt>.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG feels that as a practical matter the answer is clearly
+"yes". There was considerable discussion as to the best way
+to express the concept of "contiguous", which is not
+directly defined in the standard. Discussion included:</p>
+
+<ul>
+ <li>An operational definition similar to the above proposed resolution is
+ already used for valarray (26.5.2.3 [valarray.access]).</li>
+ <li>There is no need to explicitly consider a user-defined operator&amp;
+ because elements must be copyconstructible (23.1 [container.requirements] para 3)
+ and copyconstructible (20.1.1 [utility.arg.requirements]) specifies
+ requirements for operator&amp;.</li>
+ <li>There is no issue of one-past-the-end because of language rules.</li>
+</ul>
+
+
+
+
+
+<hr>
+<h3><a name="70"></a>70. Uncaught_exception() missing throw() specification</h3>
+<p><b>Section:</b> 18.7 [support.exception], 18.7.4 [uncaught] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-08-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.exception">issues</a> in [support.exception].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In article 3E04@pratique.fr, Valentin Bonnard writes: </p>
+
+<p>uncaught_exception() doesn't have a throw specification.</p>
+
+<p>It is intentional ? Does it means that one should be prepared to
+handle exceptions thrown from uncaught_exception() ?</p>
+
+<p>uncaught_exception() is called in exception handling contexts where
+exception safety is very important.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 15.5.3 [except.uncaught], paragraph 1, 18.7 [support.exception],
+and 18.7.4 [uncaught], add "throw()" to uncaught_exception().</p>
+
+
+
+
+<hr>
+<h3><a name="71"></a>71. Do_get_monthname synopsis missing argument</h3>
+<p><b>Section:</b> 22.2.5.1 [locale.time.get] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The locale facet member <tt>time_get&lt;&gt;::do_get_monthname</tt>
+is described in 22.2.5.1.2 [locale.time.get.virtuals] with five arguments,
+consistent with do_get_weekday and with its specified use by member
+get_monthname. However, in the synopsis, it is specified instead with
+four arguments. The missing argument is the "end" iterator
+value.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.5.1 [locale.time.get], add an "end" argument to
+the declaration of member do_monthname as follows:</p>
+
+<pre> virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;</pre>
+
+
+
+
+<hr>
+<h3><a name="74"></a>74. Garbled text for <tt>codecvt::do_max_length</tt></h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-09-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The text of <tt>codecvt::do_max_length</tt>'s "Returns"
+clause (22.2.1.5.2, paragraph 11) is garbled. It has unbalanced
+parentheses and a spurious <b>n</b>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 11 with the
+following:</p>
+
+<blockquote><p>
+ <b>Returns</b>: The maximum value that
+ <tt>do_length(state, from, from_end, 1)</tt> can return for any
+ valid range <tt>[from, from_end)</tt> and <tt>stateT</tt> value
+ <tt>state</tt>. The specialization <tt>codecvt&lt;char, char,
+ mbstate_t&gt;::do_max_length()</tt> returns 1.
+</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="75"></a>75. Contradiction in <tt>codecvt::length</tt>'s argument types</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt
+Austern <b>Date:</b> 1998-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The class synopses for classes <tt>codecvt&lt;&gt;</tt> (22.2.1.5)
+and <tt>codecvt_byname&lt;&gt;</tt> (22.2.1.6) say that the first
+parameter of the member functions <tt>length</tt> and
+<tt>do_length</tt> is of type <tt>const stateT&amp;</tt>. The member
+function descriptions, however (22.2.1.5.1, paragraph 6; 22.2.1.5.2,
+paragraph 9) say that the type is <tt>stateT&amp;</tt>. Either the
+synopsis or the summary must be changed. </p>
+
+<p>If (as I believe) the member function descriptions are correct,
+then we must also add text saying how <tt>do_length</tt> changes its
+<tt>stateT</tt> argument. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.1.4 [locale.codecvt], and also in 22.2.1.5 [locale.codecvt.byname],
+change the <tt>stateT</tt> argument type on both member
+<tt>length()</tt> and member <tt>do_length()</tt> from </p>
+
+<blockquote>
+ <p><tt>const stateT&amp;</tt></p>
+</blockquote>
+
+<p>to</p>
+
+<blockquote>
+ <p><tt>stateT&amp;</tt></p>
+</blockquote>
+
+<p>In 22.2.1.4.2 [locale.codecvt.virtuals], add to the definition for member
+<tt>do_length</tt> a paragraph:</p>
+
+<blockquote>
+ <p>Effects: The effect on the <tt>state</tt> argument is ``as if''
+ it called <tt>do_in(state, from, from_end, from, to, to+max,
+ to)</tt> for <tt>to</tt> pointing to a buffer of at least
+ <tt>max</tt> elements.</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="76"></a>76. Can a <tt>codecvt</tt> facet always convert one internal character at a time?</h3>
+<p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-09-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>This issue concerns the requirements on classes derived from
+<tt>codecvt</tt>, including user-defined classes. What are the
+restrictions on the conversion from external characters
+(e.g. <tt>char</tt>) to internal characters (e.g. <tt>wchar_t</tt>)?
+Or, alternatively, what assumptions about <tt>codecvt</tt> facets can
+the I/O library make? </p>
+
+<p>The question is whether it's possible to convert from internal
+characters to external characters one internal character at a time,
+and whether, given a valid sequence of external characters, it's
+possible to pick off internal characters one at a time. Or, to put it
+differently: given a sequence of external characters and the
+corresponding sequence of internal characters, does a position in the
+internal sequence correspond to some position in the external
+sequence? </p>
+
+<p>To make this concrete, suppose that <tt>[first, last)</tt> is a
+sequence of <i>M</i> external characters and that <tt>[ifirst,
+ilast)</tt> is the corresponding sequence of <i>N</i> internal
+characters, where <i>N &gt; 1</i>. That is, <tt>my_encoding.in()</tt>,
+applied to <tt>[first, last)</tt>, yields <tt>[ifirst,
+ilast)</tt>. Now the question: does there necessarily exist a
+subsequence of external characters, <tt>[first, last_1)</tt>, such
+that the corresponding sequence of internal characters is the single
+character <tt>*ifirst</tt>?
+</p>
+
+<p>(What a "no" answer would mean is that
+<tt>my_encoding</tt> translates sequences only as blocks. There's a
+sequence of <i>M</i> external characters that maps to a sequence of
+<i>N</i> internal characters, but that external sequence has no
+subsequence that maps to <i>N-1</i> internal characters.) </p>
+
+<p>Some of the wording in the standard, such as the description of
+<tt>codecvt::do_max_length</tt> (22.2.1.4.2 [locale.codecvt.virtuals],
+paragraph 11) and <tt>basic_filebuf::underflow</tt> (27.8.1.5 [filebuf.virtuals], paragraph 3) suggests that it must always be
+possible to pick off internal characters one at a time from a sequence
+of external characters. However, this is never explicitly stated one
+way or the other. </p>
+
+<p>This issue seems (and is) quite technical, but it is important if
+we expect users to provide their own encoding facets. This is an area
+where the standard library calls user-supplied code, so a well-defined
+set of requirements for the user-supplied code is crucial. Users must
+be aware of the assumptions that the library makes. This issue affects
+positioning operations on <tt>basic_filebuf</tt>, unbuffered input,
+and several of <tt>codecvt</tt>'s member functions. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following text as a new paragraph, following 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 2:</p>
+
+<blockquote>
+<p>A <tt>codecvt</tt> facet that is used by <tt>basic_filebuf</tt>
+(27.8 [file.streams]) must have the property that if</p>
+<pre> do_out(state, from, from_end, from_next, to, to_lim, to_next)
+</pre>
+<p>would return <tt>ok</tt>, where <tt>from != from_end</tt>, then </p>
+<pre> do_out(state, from, from + 1, from_next, to, to_end, to_next)
+</pre>
+<p>must also return <tt>ok</tt>, and that if</p>
+<pre> do_in(state, from, from_end, from_next, to, to_lim, to_next)
+</pre>
+<p>would return <tt>ok</tt>, where <tt>to != to_lim</tt>, then</p>
+<pre> do_in(state, from, from_end, from_next, to, to + 1, to_next)
+</pre>
+<p>must also return <tt>ok</tt>. [<i>Footnote:</i> Informally, this
+means that <tt>basic_filebuf</tt> assumes that the mapping from
+internal to external characters is 1 to N: a <tt>codecvt</tt> that is
+used by <tt>basic_filebuf</tt> must be able to translate characters
+one internal character at a time. <i>--End Footnote</i>]</p>
+</blockquote>
+
+<p><i>[Redmond: Minor change in proposed resolution. Original
+proposed resolution talked about "success", with a parenthetical
+comment that success meant returning <tt>ok</tt>. New wording
+removes all talk about "success", and just talks about the
+return value.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+
+ <p>The proposed resoluion says that conversions can be performed one
+ internal character at a time. This rules out some encodings that
+ would otherwise be legal. The alternative answer would mean there
+ would be some internal positions that do not correspond to any
+ external file position.</p>
+ <p>
+ An example of an encoding that this rules out is one where the
+ <tt>internT</tt> and <tt>externT</tt> are of the same type, and
+ where the internal sequence <tt>c1 c2</tt> corresponds to the
+ external sequence <tt>c2 c1</tt>.
+ </p>
+ <p>It was generally agreed that <tt>basic_filebuf</tt> relies
+ on this property: it was designed under the assumption that
+ the external-to-internal mapping is N-to-1, and it is not clear
+ that <tt>basic_filebuf</tt> is implementable without that
+ restriction.
+ </p>
+ <p>
+ The proposed resolution is expressed as a restriction on
+ <tt>codecvt</tt> when used by <tt>basic_filebuf</tt>, rather
+ than a blanket restriction on all <tt>codecvt</tt> facets,
+ because <tt>basic_filebuf</tt> is the only other part of the
+ library that uses <tt>codecvt</tt>. If a user wants to define
+ a <tt>codecvt</tt> facet that implements a more general N-to-M
+ mapping, there is no reason to prohibit it, so long as the user
+ does not expect <tt>basic_filebuf</tt> to be able to use it.
+ </p>
+
+
+
+
+
+<hr>
+<h3><a name="78"></a>78. Typo: event_call_back</h3>
+<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>typo: event_call_back should be event_callback &nbsp; </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the 27.4.2 [ios.base] synopsis change
+"event_call_back" to "event_callback". </p>
+
+
+
+
+<hr>
+<h3><a name="79"></a>79. Inconsistent declaration of polar()</h3>
+<p><b>Section:</b> 26.3.1 [complex.synopsis], 26.3.7 [complex.value.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.synopsis">issues</a> in [complex.synopsis].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 26.3.1 [complex.synopsis] polar is declared as follows:</p>
+<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;); </pre>
+
+<p>In 26.3.7 [complex.value.ops] it is declared as follows:</p>
+<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp; rho, const T&amp; theta = 0); </pre>
+
+<p>Thus whether the second parameter is optional is not clear. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 26.3.1 [complex.synopsis] change:</p>
+<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;);</pre>
+
+<p>to:</p>
+<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp; rho, const T&amp; theta = 0); </pre>
+
+
+
+
+
+<hr>
+<h3><a name="80"></a>80. Global Operators of complex declared twice</h3>
+<p><b>Section:</b> 26.3.1 [complex.synopsis], 26.3.2 [complex] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.synopsis">issues</a> in [complex.synopsis].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Both 26.2.1 and 26.2.2 contain declarations of global operators for
+class complex. This redundancy should be removed.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Reduce redundancy according to the general style of the standard. </p>
+
+
+
+
+<hr>
+<h3><a name="83"></a>83. String::npos vs. string::max_size()</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#89">89</a></p>
+<p><b>Discussion:</b></p>
+<p>Many string member functions throw if size is getting or exceeding
+npos. However, I wonder why they don't throw if size is getting or
+exceeding max_size() instead of npos. May be npos is known at compile
+time, while max_size() is known at runtime. However, what happens if
+size exceeds max_size() but not npos, then? It seems the standard
+lacks some clarifications here.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>After 21.3 [basic.string] paragraph 4 ("The functions
+described in this clause...") add a new paragraph:</p>
+
+<blockquote>
+ <p>For any string operation, if as a result of the operation, <tt> size()</tt> would exceed
+ <tt> max_size()</tt> then
+ the operation throws <tt>length_error</tt>.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes length_error is the correct exception to throw.</p>
+
+
+
+
+<hr>
+<h3><a name="86"></a>86. String constructors don't describe exceptions</h3>
+<p><b>Section:</b> 21.3.1 [string.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.require">issues</a> in [string.require].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The constructor from a range:</p>
+
+<pre>template&lt;class InputIterator&gt;
+ basic_string(InputIterator begin, InputIterator end,
+ const Allocator&amp; a = Allocator());</pre>
+
+<p>lacks a throws clause. However, I would expect that it throws
+according to the other constructors if the numbers of characters in
+the range equals npos (or exceeds max_size(), see above). </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 21.3.1 [string.require], Strike throws paragraphs for
+constructors which say "Throws: length_error if n ==
+npos."</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Throws clauses for length_error if n == npos are no longer needed
+because they are subsumed by the general wording added by the
+resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
+
+
+
+
+<hr>
+<h3><a name="90"></a>90. Incorrect description of operator &gt;&gt; for strings</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The effect of operator &gt;&gt; for strings contain the following item:</p>
+
+<p>&nbsp;&nbsp;&nbsp; <tt>isspace(c,getloc())</tt> is true for the next available input
+character c.</p>
+
+<p>Here <tt>getloc()</tt> has to be replaced by <tt>is.getloc()</tt>. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 21.3.8.9 [string.io] paragraph 1 Effects clause replace:</p>
+
+<blockquote>
+ <p><tt>isspace(c,getloc())</tt> is true for the next available input character c.</p>
+</blockquote>
+
+<p>with:</p>
+
+<blockquote>
+ <p><tt>isspace(c,is.getloc())</tt> is true for the next available input character c.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="91"></a>91. Description of operator&gt;&gt; and getline() for string&lt;&gt; might cause endless loop</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Operator &gt;&gt; and getline() for strings read until eof()
+in the input stream is true. However, this might never happen, if the
+stream can't read anymore without reaching EOF. So shouldn't it be
+changed into that it reads until !good() ? </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 21.3.8.9 [string.io], paragraph 1, replace:</p>
+<blockquote><p>
+Effects: Begins by constructing a sentry object k as if k were
+constructed by typename basic_istream&lt;charT,traits&gt;::sentry k( is). If
+bool( k) is true, it calls str.erase() and then extracts characters
+from is and appends them to str as if by calling str.append(1, c). If
+is.width() is greater than zero, the maximum number n of characters
+appended is is.width(); otherwise n is str.max_size(). Characters are
+extracted and appended until any of the following occurs:
+</p></blockquote>
+<p>with:</p>
+<blockquote><p>
+Effects: Behaves as a formatted input function (27.6.1.2.1
+[istream.formatted.reqmts]). After constructing a sentry object, if the
+sentry converts to true, calls str.erase() and then extracts
+characters from is and appends them to str as if by calling
+str.append(1,c). If is.width() is greater than zero, the maximum
+number n of characters appended is is.width(); otherwise n is
+str.max_size(). Characters are extracted and appended until any of the
+following occurs:
+</p></blockquote>
+
+<p>In 21.3.8.9 [string.io], paragraph 6, replace</p>
+<blockquote><p>
+Effects: Begins by constructing a sentry object k as if by typename
+basic_istream&lt;charT,traits&gt;::sentry k( is, true). If bool( k) is true,
+it calls str.erase() and then extracts characters from is and appends
+them to str as if by calling str.append(1, c) until any of the
+following occurs:
+</p></blockquote>
+<p>with:</p>
+<blockquote><p>Effects: Behaves as an unformatted input function
+(27.6.1.3 [istream.unformatted]), except that it does not affect the
+value returned
+by subsequent calls to basic_istream&lt;&gt;::gcount(). After
+constructing a sentry object, if the sentry converts to true, calls
+str.erase() and then extracts characters from is and appends them to
+str as if by calling str.append(1,c) until any of the following
+occurs:
+</p></blockquote>
+
+<p><i>[Redmond: Made changes in proposed resolution. <tt>operator&gt;&gt;</tt>
+should be a formatted input function, not an unformatted input function.
+<tt>getline</tt> should not be required to set <tt>gcount</tt>, since
+there is no mechanism for <tt>gcount</tt> to be set except by one of
+<tt>basic_istream</tt>'s member functions.]</i></p>
+
+
+<p><i>[Curaçao: Nico agrees with proposed resolution.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The real issue here is whether or not these string input functions
+get their characters from a streambuf, rather than by calling an
+istream's member functions, a streambuf signals failure either by
+returning eof or by throwing an exception; there are no other
+possibilities. The proposed resolution makes it clear that these two
+functions do get characters from a streambuf.</p>
+
+
+
+
+
+<hr>
+<h3><a name="92"></a>92. Incomplete Algorithm Requirements</h3>
+<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The standard does not state, how often a function object is copied,
+called, or the order of calls inside an algorithm. This may lead to
+surprising/buggy behavior. Consider the following example: </p>
+
+<pre>class Nth { // function object that returns true for the nth element
+ private:
+ int nth; // element to return true for
+ int count; // element counter
+ public:
+ Nth (int n) : nth(n), count(0) {
+ }
+ bool operator() (int) {
+ return ++count == nth;
+ }
+};
+....
+// remove third element
+ list&lt;int&gt;::iterator pos;
+ pos = remove_if(coll.begin(),coll.end(), // range
+ Nth(3)), // remove criterion
+ coll.erase(pos,coll.end()); </pre>
+
+<p>This call, in fact removes the 3rd <b>AND the 6th</b> element. This
+happens because the usual implementation of the algorithm copies the
+function object internally: </p>
+
+<pre>template &lt;class ForwIter, class Predicate&gt;
+ForwIter std::remove_if(ForwIter beg, ForwIter end, Predicate op)
+{
+ beg = find_if(beg, end, op);
+ if (beg == end) {
+ return beg;
+ }
+ else {
+ ForwIter next = beg;
+ return remove_copy_if(++next, end, beg, op);
+ }
+} </pre>
+
+<p>The algorithm uses find_if() to find the first element that should
+be removed. However, it then uses a copy of the passed function object
+to process the resulting elements (if any). Here, Nth is used again
+and removes also the sixth element. This behavior compromises the
+advantage of function objects being able to have a state. Without any
+cost it could be avoided (just implement it directly instead of
+calling find_if()). </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add a new paragraph following 25 [algorithms] paragraph 8:</p>
+<blockquote><p>
+[Note: Unless otherwise specified, algorithms that take function
+objects as arguments are permitted to copy those function objects
+freely. Programmers for whom object identity is important should
+consider using a wrapper class that points to a noncopied
+implementation object, or some equivalent solution.]
+</p></blockquote>
+
+<p><i>[Dublin: Pete Becker felt that this may not be a defect,
+but rather something that programmers need to be educated about.
+There was discussion of adding wording to the effect that the number
+and order of calls to function objects, including predicates, not
+affect the behavior of the function object.]</i></p>
+
+
+<p><i>[Pre-Kona: Nico comments: It seems the problem is that we don't
+have a clear statement of "predicate" in the
+standard. People including me seemed to think "a function
+returning a Boolean value and being able to be called by an STL
+algorithm or be used as sorting criterion or ... is a
+predicate". But a predicate has more requirements: It should
+never change its behavior due to a call or being copied. IMHO we have
+to state this in the standard. If you like, see section 8.1.4 of my
+library book for a detailed discussion.]</i></p>
+
+
+<p><i>[Kona: Nico will provide wording to the effect that "unless
+otherwise specified, the number of copies of and calls to function
+objects by algorithms is unspecified".&nbsp; Consider placing in
+25 [algorithms] after paragraph 9.]</i></p>
+
+
+<p><i>[Santa Cruz: The standard doesn't currently guarantee that
+ functions object won't be copied, and what isn't forbidden is
+ allowed. It is believed (especially since implementations that were
+ written in concert with the standard do make copies of function
+ objects) that this was intentional. Thus, no normative change is
+ needed. What we should put in is a non-normative note suggesting to
+ programmers that if they want to guarantee the lack of copying they
+ should use something like the <tt>ref</tt> wrapper.]</i></p>
+
+
+<p><i>[Oxford: Matt provided wording.]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="98"></a>98. Input iterator requirements are badly written</h3>
+<p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Table 72 in 24.1.1 [input.iterators] specifies semantics for
+<tt>*r++</tt> of:</p>
+
+<p>&nbsp;&nbsp; <tt>{ T tmp = *r; ++r; return tmp; }</tt></p>
+
+<p>There are two problems with this. First, the return type is
+specified to be "T", as opposed to something like "convertible to T".
+This is too specific: we want to allow *r++ to return an lvalue.</p>
+
+<p>Second, writing the semantics in terms of code misleadingly
+suggests that the effects *r++ should precisely replicate the behavior
+of this code, including side effects. (Does this mean that *r++
+should invoke the copy constructor exactly as many times as the sample
+code above would?) See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#334">334</a> for a similar
+problem.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In Table 72 in 24.1.1 [input.iterators], change the return type
+for <tt>*r++</tt> from <tt>T</tt> to "convertible to T".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This issue has two parts: the return type, and the number of times
+ the copy constructor is invoked.</p>
+
+<p>The LWG believes the the first part is a real issue. It's
+ inappropriate for the return type to be specified so much more
+ precisely for *r++ than it is for *r. In particular, if r is of
+ (say) type <tt>int*</tt>, then *r++ isn't <tt>int</tt>,
+ but <tt>int&amp;</tt>.</p>
+
+<p>The LWG does not believe that the number of times the copy
+ constructor is invoked is a real issue. This can vary in any case,
+ because of language rules on copy constructor elision. That's too
+ much to read into these semantics clauses.</p>
+
+<p>Additionally, as Dave Abrahams pointed out (c++std-lib-13703): since
+ we're told (24.1/3) that forward iterators satisfy all the requirements
+ of input iterators, we can't impose any requirements in the Input
+ Iterator requirements table that forward iterators don't satisfy.</p>
+
+
+
+
+
+<hr>
+<h3><a name="103"></a>103. set::iterator is required to be modifiable, but this allows modification of keys</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Set::iterator is described as implementation-defined with a
+reference to the container requirement; the container requirement says
+that const_iterator is an iterator pointing to const T and iterator an
+iterator pointing to T.</p>
+
+<p>23.1.2 paragraph 2 implies that the keys should not be modified to
+break the ordering of elements. But that is not clearly
+specified. Especially considering that the current standard requires
+that iterator for associative containers be different from
+const_iterator. Set, for example, has the following: </p>
+
+<p><tt>typedef implementation defined iterator;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // See _lib.container.requirements_</tt></p>
+
+<p>23.1 [container.requirements] actually requires that iterator type pointing
+to T (table 65). Disallowing user modification of keys by changing the
+standard to require an iterator for associative container to be the
+same as const_iterator would be overkill since that will unnecessarily
+significantly restrict the usage of associative container. A class to
+be used as elements of set, for example, can no longer be modified
+easily without either redesigning the class (using mutable on fields
+that have nothing to do with ordering), or using const_cast, which
+defeats requiring iterator to be const_iterator. The proposed solution
+goes in line with trusting user knows what he is doing. </p>
+
+<p><b>Other Options Evaluated:</b> </p>
+
+<p>Option A.&nbsp;&nbsp; In 23.1.2 [associative.reqmts], paragraph 2, after
+first sentence, and before "In addition,...", add one line:
+</p>
+
+<blockquote>
+ <p>Modification of keys shall not change their strict weak ordering. </p>
+</blockquote>
+
+<p>Option B.&nbsp;Add three new sentences to 23.1.2 [associative.reqmts]:</p>
+
+<blockquote>
+ <p>At the end of paragraph 5: "Keys in an associative container
+ are immutable." At the end of paragraph 6: "For
+ associative containers where the value type is the same as the key
+ type, both <tt>iterator</tt> and <tt>const_iterator</tt> are
+ constant iterators. It is unspecified whether or not
+ <tt>iterator</tt> and <tt>const_iterator</tt> are the same
+ type."</p>
+</blockquote>
+
+<p>Option C.&nbsp;To 23.1.2 [associative.reqmts], paragraph 3, which
+currently reads:</p>
+
+<blockquote>
+ <p>The phrase ``equivalence of keys'' means the equivalence relation imposed by the
+ comparison and not the operator== on keys. That is, two keys k1 and k2 in the same
+ container are considered to be equivalent if for the comparison object comp, comp(k1, k2)
+ == false &amp;&amp; comp(k2, k1) == false.</p>
+</blockquote>
+
+<p>&nbsp; add the following:</p>
+
+<blockquote>
+ <p>For any two keys k1 and k2 in the same container, comp(k1, k2) shall return the same
+ value whenever it is evaluated. [Note: If k2 is removed from the container and later
+ reinserted, comp(k1, k2) must still return a consistent value but this value may be
+ different than it was the first time k1 and k2 were in the same container. This is
+ intended to allow usage like a string key that contains a filename, where comp compares
+ file contents; if k2 is removed, the file is changed, and the same k2 (filename) is
+ reinserted, comp(k1, k2) must again return a consistent value but this value may be
+ different than it was the previous time k2 was in the container.]</p>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following to 23.1.2 [associative.reqmts] at
+the indicated location:</p>
+
+<blockquote>
+ <p>At the end of paragraph 3: "For any two keys k1 and k2 in the same container,
+ calling comp(k1, k2) shall always return the same
+ value."</p>
+ <p>At the end of paragraph 5: "Keys in an associative container are immutable."</p>
+ <p>At the end of paragraph 6: "For associative containers where the value type is the
+ same as the key type, both <tt>iterator</tt> and <tt>const_iterator</tt> are constant
+ iterators. It is unspecified whether or not <tt>iterator</tt> and <tt>const_iterator</tt>
+ are the same type."</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Several arguments were advanced for and against allowing set elements to be
+mutable as long as the ordering was not effected. The argument which swayed the
+LWG was one of safety; if elements were mutable, there would be no compile-time
+way to detect of a simple user oversight which caused ordering to be
+modified. There was a report that this had actually happened in practice,
+and had been painful to diagnose. If users need to modify elements,
+it is possible to use mutable members or const_cast.</p>
+
+<p>Simply requiring that keys be immutable is not sufficient, because the comparison
+object may indirectly (via pointers) operate on values outside of the keys.</p>
+
+<p>
+The types <tt>iterator</tt> and <tt>const_iterator</tt> are permitted
+to be different types to allow for potential future work in which some
+member functions might be overloaded between the two types. No such
+member functions exist now, and the LWG believes that user functionality
+will not be impaired by permitting the two types to be the same. A
+function that operates on both iterator types can be defined for
+<tt>const_iterator</tt> alone, and can rely on the automatic
+conversion from <tt>iterator</tt> to <tt>const_iterator</tt>.
+</p>
+
+<p><i>[Tokyo: The LWG crafted the proposed resolution and rationale.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="106"></a>106. Numeric library private members are implementation defined</h3>
+<p><b>Section:</b> 26.5.5 [template.slice.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.slice.array">issues</a> in [template.slice.array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>This is the only place in the whole standard where the implementation has to document
+something private.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove the comment which says "// remainder implementation defined" from:
+</p>
+
+<ul>
+ <li>26.5.5 [template.slice.array]</li>
+ <li>26.5.7 [template.gslice.array]</li>
+ <li>26.5.8 [template.mask.array]</li>
+ <li>26.5.9 [template.indirect.array]</li>
+</ul>
+
+
+
+
+
+<hr>
+<h3><a name="108"></a>108. Lifetime of exception::what() return unspecified</h3>
+<p><b>Section:</b> 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#type.info">issues</a> in [type.info].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 18.6.1, paragraphs 8-9, the lifetime of the return value of
+exception::what() is left unspecified. This issue has implications
+with exception safety of exception handling: some exceptions should
+not throw bad_alloc.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to 18.6.1 [type.info] paragraph 9 (exception::what notes
+clause) the sentence:</p>
+
+<blockquote>
+ <p>The return value remains valid until the exception object from which it is obtained is
+ destroyed or a non-const member function of the exception object is called.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>If an exception object has non-const members, they may be used
+to set internal state that should affect the contents of the string
+returned by <tt>what()</tt>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="109"></a>109. Missing binders for non-const sequence elements</h3>
+<p><b>Section:</b> D.8 [depr.lib.binders] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bjarne Stroustrup <b>Date:</b> 1998-10-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.lib.binders">issues</a> in [depr.lib.binders].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>There are no versions of binders that apply to non-const elements
+of a sequence. This makes examples like for_each() using bind2nd() on
+page 521 of "The C++ Programming Language (3rd)"
+non-conforming. Suitable versions of the binders need to be added.</p>
+
+<p>Further discussion from Nico:</p>
+
+<p>What is probably meant here is shown in the following example:</p>
+
+<pre>class Elem {
+ public:
+ void print (int i) const { }
+ void modify (int i) { }
+}; </pre>
+<pre>int main()
+{
+ vector&lt;Elem&gt; coll(2);
+ for_each (coll.begin(), coll.end(), bind2nd(mem_fun_ref(&amp;Elem::print),42)); // OK
+ for_each (coll.begin(), coll.end(), bind2nd(mem_fun_ref(&amp;Elem::modify),42)); // ERROR
+}</pre>
+
+<p>The error results from the fact that bind2nd() passes its first
+argument (the argument of the sequence) as constant reference. See the
+following typical implementation:</p>
+
+<blockquote>
+ <pre>template &lt;class Operation&gt;
+class binder2nd
+ : public unary_function&lt;typename Operation::first_argument_type,
+ typename Operation::result_type&gt; {
+protected:
+ Operation op;
+ typename Operation::second_argument_type value;
+public:
+ binder2nd(const Operation&amp; o,
+ const typename Operation::second_argument_type&amp; v)
+ : op(o), value(v) {} </pre>
+ <pre> typename Operation::result_type
+ operator()(const typename Operation::first_argument_type&amp; x) const {
+ return op(x, value);
+ }
+};</pre>
+</blockquote>
+
+<p>The solution is to overload operator () of bind2nd for non-constant arguments:</p>
+
+<blockquote>
+ <pre>template &lt;class Operation&gt;
+class binder2nd
+ : public unary_function&lt;typename Operation::first_argument_type,
+ typename Operation::result_type&gt; {
+protected:
+ Operation op;
+ typename Operation::second_argument_type value;
+public:
+ binder2nd(const Operation&amp; o,
+ const typename Operation::second_argument_type&amp; v)
+ : op(o), value(v) {} </pre>
+ <pre> typename Operation::result_type
+ operator()(const typename Operation::first_argument_type&amp; x) const {
+ return op(x, value);
+ }
+ typename Operation::result_type
+ operator()(typename Operation::first_argument_type&amp; x) const {
+ return op(x, value);
+ }
+};</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><b>Howard believes there is a flaw</b> in this resolution.
+See c++std-lib-9127. We may need to reopen this issue.</p>
+
+<p>In D.8 [depr.lib.binders] in the declaration of binder1st after:</p>
+<blockquote>
+ <p><tt>typename Operation::result_type<br>
+ &nbsp;operator()(const typename Operation::second_argument_type&amp; x) const;</tt></p>
+</blockquote>
+<p>insert:</p>
+<blockquote>
+ <p><tt>typename Operation::result_type<br>
+ &nbsp;operator()(typename Operation::second_argument_type&amp; x) const;</tt></p>
+</blockquote>
+<p>In D.8 [depr.lib.binders] in the declaration of binder2nd after:</p>
+<blockquote>
+ <p><tt>typename Operation::result_type<br>
+ &nbsp;operator()(const typename Operation::first_argument_type&amp; x) const;</tt></p>
+</blockquote>
+<p>insert:</p>
+<blockquote>
+ <p><tt>typename Operation::result_type<br>
+ &nbsp;operator()(typename Operation::first_argument_type&amp; x) const;</tt></p>
+</blockquote>
+
+<p><i>[Kona: The LWG discussed this at some length.It was agreed that
+this is a mistake in the design, but there was no consensus on whether
+it was a defect in the Standard. Straw vote: NAD - 5. Accept
+proposed resolution - 3. Leave open - 6.]</i></p>
+
+
+<p><i>[Copenhagen: It was generally agreed that this was a defect.
+Strap poll: NAD - 0. Accept proposed resolution - 10.
+Leave open - 1.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="110"></a>110. istreambuf_iterator::equal not const</h3>
+<p><b>Section:</b> 24.5.3 [istreambuf.iterator], 24.5.3.5 [istreambuf.iterator::equal] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istreambuf.iterator">issues</a> in [istreambuf.iterator].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Member istreambuf_iterator&lt;&gt;::equal is not declared
+"const", yet 24.5.3.6 [istreambuf.iterator::op==] says that operator==,
+which is const, calls it. This is contradictory. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 24.5.3 [istreambuf.iterator] and also in 24.5.3.5 [istreambuf.iterator::equal],
+replace:</p>
+
+<blockquote>
+ <pre>bool equal(istreambuf_iterator&amp; b);</pre>
+</blockquote>
+
+<p>with:</p>
+
+<blockquote>
+ <pre>bool equal(const istreambuf_iterator&amp; b) const;</pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="112"></a>112. Minor typo in <tt>ostreambuf_iterator</tt> constructor</h3>
+<p><b>Section:</b> 24.5.4.1 [ostreambuf.iter.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-10-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The <b>requires</b> clause for <tt>ostreambuf_iterator</tt>'s
+constructor from an <tt>ostream_type</tt> (24.5.4.1, paragraph 1)
+reads "<i>s</i> is not null". However, <i>s</i> is a
+reference, and references can't be null. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 24.5.4.1 [ostreambuf.iter.cons]:</p>
+
+<p>Move the current paragraph 1, which reads "Requires: s is not
+null.", from the first constructor to the second constructor.</p>
+
+<p>Insert a new paragraph 1 Requires clause for the first constructor
+reading:</p>
+
+<blockquote>
+ <p><b>Requires</b>: <tt>s.rdbuf()</tt> is not null.</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="114"></a>114. Placement forms example in error twice</h3>
+<p><b>Section:</b> 18.5.1.3 [new.delete.placement] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.placement">issues</a> in [new.delete.placement].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a></p>
+<p><b>Discussion:</b></p>
+<p>Section 18.5.1.3 contains the following example: </p>
+
+<pre>[Example: This can be useful for constructing an object at a known address:
+ char place[sizeof(Something)];
+ Something* p = new (place) Something();
+ -end example]</pre>
+
+<p>First code line: "place" need not have any special alignment, and the
+following constructor could fail due to misaligned data.</p>
+
+<p>Second code line: Aren't the parens on Something() incorrect?&nbsp; [Dublin: the LWG
+believes the () are correct.]</p>
+
+<p>Examples are not normative, but nevertheless should not show code that is invalid or
+likely to fail.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the first line of code in the example in
+18.5.1.3 [new.delete.placement] with:
+</p>
+
+<blockquote>
+ <pre>void* place = operator new(sizeof(Something));</pre>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="115"></a>115. Typo in strstream constructors</h3>
+<p><b>Section:</b> D.7.4.1 [depr.strstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-11-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>D.7.4.1 strstream constructors paragraph 2 says: </p>
+
+<blockquote>
+ <p>Effects: Constructs an object of class strstream, initializing the base class with
+ iostream(&amp; sb) and initializing sb with one of the two constructors: </p>
+ <p>- If mode&amp;app==0, then s shall designate the first element of an array of n
+ elements. The constructor is strstreambuf(s, n, s). </p>
+ <p>- If mode&amp;app==0, then s shall designate the first element of an array of n
+ elements that contains an NTBS whose first element is designated by s. The constructor is
+ strstreambuf(s, n, s+std::strlen(s)).</p>
+</blockquote>
+
+<p>Notice the second condition is the same as the first. I think the second condition
+should be "If mode&amp;app==app", or "mode&amp;app!=0", meaning that
+the append bit is set.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In D.7.3.1 [depr.ostrstream.cons] paragraph 2 and D.7.4.1 [depr.strstream.cons]
+paragraph 2, change the first condition to <tt>(mode&amp;app)==0</tt>
+and the second condition to <tt>(mode&amp;app)!=0</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="117"></a>117. <tt>basic_ostream</tt> uses nonexistent <tt>num_put</tt> member functions</h3>
+<p><b>Section:</b> 27.6.2.6.2 [ostream.inserters.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-11-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.arithmetic">issues</a> in [ostream.inserters.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The <b>effects</b> clause for numeric inserters says that
+insertion of a value <tt>x</tt>, whose type is either <tt>bool</tt>,
+<tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned
+int</tt>, <tt>long</tt>, <tt>unsigned long</tt>, <tt>float</tt>,
+<tt>double</tt>, <tt>long double</tt>, or <tt>const void*</tt>, is
+delegated to <tt>num_put</tt>, and that insertion is performed as if
+through the following code fragment: </p>
+
+<pre>bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(), val). failed();</pre>
+
+<p>This doesn't work, because <tt>num_put&lt;&gt;</tt>::put is only
+overloaded for the types <tt>bool</tt>, <tt>long</tt>, <tt>unsigned
+long</tt>, <tt>double</tt>, <tt>long double</tt>, and <tt>const
+void*</tt>. That is, the code fragment in the standard is incorrect
+(it is diagnosed as ambiguous at compile time) for the types
+<tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned
+int</tt>, and <tt>float</tt>. </p>
+
+<p>We must either add new member functions to <tt>num_put</tt>, or
+else change the description in <tt>ostream</tt> so that it only calls
+functions that are actually there. I prefer the latter. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 27.6.2.5.2, paragraph 1 with the following: </p>
+
+<blockquote>
+<p>
+The classes num_get&lt;&gt; and num_put&lt;&gt; handle locale-dependent numeric
+formatting and parsing. These inserter functions use the imbued
+locale value to perform numeric formatting. When val is of type bool,
+long, unsigned long, double, long double, or const void*, the
+formatting conversion occurs as if it performed the following code
+fragment:
+</p>
+
+<pre>bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(), val). failed();
+</pre>
+
+<p>
+When val is of type short the formatting conversion occurs as if it
+performed the following code fragment:
+</p>
+
+<pre>ios_base::fmtflags baseflags = ios_base::flags() &amp; ios_base::basefield;
+bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(),
+ baseflags == ios_base::oct || baseflags == ios_base::hex
+ ? static_cast&lt;long&gt;(static_cast&lt;unsigned short&gt;(val))
+ : static_cast&lt;long&gt;(val)). failed();
+</pre>
+
+<p>
+When val is of type int the formatting conversion occurs as if it performed
+the following code fragment:
+</p>
+
+<pre>ios_base::fmtflags baseflags = ios_base::flags() &amp; ios_base::basefield;
+bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(),
+ baseflags == ios_base::oct || baseflags == ios_base::hex
+ ? static_cast&lt;long&gt;(static_cast&lt;unsigned int&gt;(val))
+ : static_cast&lt;long&gt;(val)). failed();
+</pre>
+
+<p>
+When val is of type unsigned short or unsigned int the formatting conversion
+occurs as if it performed the following code fragment:
+</p>
+
+<pre>bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(), static_cast&lt;unsigned long&gt;(val)).
+failed();
+</pre>
+
+<p>
+When val is of type float the formatting conversion occurs as if it
+performed the following code fragment:
+</p>
+
+<pre>bool failed = use_facet&lt;
+ num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
+ &gt;(getloc()).put(*this, *this, fill(), static_cast&lt;double&gt;(val)).
+failed();
+</pre>
+
+</blockquote>
+
+<p><i>[post-Toronto: This differs from the previous proposed
+resolution; PJP provided the new wording. The differences are in
+signed short and int output.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The original proposed resolution was to cast int and short to long,
+unsigned int and unsigned short to unsigned long, and float to double,
+thus ensuring that we don't try to use nonexistent num_put&lt;&gt;
+member functions. The current proposed resolution is more
+complicated, but gives more expected results for hex and octal output
+of signed short and signed int. (On a system with 16-bit short, for
+example, printing short(-1) in hex format should yield 0xffff.)</p>
+
+
+
+
+
+<hr>
+<h3><a name="118"></a>118. <tt>basic_istream</tt> uses nonexistent <tt>num_get</tt> member functions</h3>
+<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-11-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Formatted input is defined for the types <tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>,
+<tt>unsigned int</tt>, <tt>long</tt>, <tt>unsigned long</tt>, <tt>float</tt>, <tt>double</tt>,
+<tt>long double</tt>, <tt>bool</tt>, and <tt>void*</tt>. According to section 27.6.1.2.2,
+formatted input of a value <tt>x</tt> is done as if by the following code fragment: </p>
+
+<pre>typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
+iostate err = 0;
+use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, val);
+setstate(err);</pre>
+
+<p>According to section 22.2.2.1.1 [facet.num.get.members], however,
+<tt>num_get&lt;&gt;::get()</tt> is only overloaded for the types
+<tt>bool</tt>, <tt>long</tt>, <tt>unsigned short</tt>, <tt>unsigned
+int</tt>, <tt>unsigned long</tt>, <tt>unsigned long</tt>,
+<tt>float</tt>, <tt>double</tt>, <tt>long double</tt>, and
+<tt>void*</tt>. Comparing the lists from the two sections, we find
+that 27.6.1.2.2 is using a nonexistent function for types
+<tt>short</tt> and <tt>int</tt>. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.1.2.2 [istream.formatted.arithmetic] Arithmetic Extractors, remove the
+two lines (1st and 3rd) which read:</p>
+<blockquote>
+ <pre>operator&gt;&gt;(short&amp; val);
+...
+operator&gt;&gt;(int&amp; val);</pre>
+</blockquote>
+
+<p>And add the following at the end of that section (27.6.1.2.2) :</p>
+
+<blockquote>
+ <pre>operator&gt;&gt;(short&amp; val);</pre>
+ <p>The conversion occurs as if performed by the following code fragment (using
+ the same notation as for the preceding code fragment):</p>
+ <pre> typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
+ iostate err = 0;
+ long lval;
+ use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, lval);
+ if (err == 0
+ &amp;&amp; (lval &lt; numeric_limits&lt;short&gt;::min() || numeric_limits&lt;short&gt;::max() &lt; lval))
+ err = ios_base::failbit;
+ setstate(err);</pre>
+ <pre>operator&gt;&gt;(int&amp; val);</pre>
+ <p>The conversion occurs as if performed by the following code fragment (using
+ the same notation as for the preceding code fragment):</p>
+ <pre> typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
+ iostate err = 0;
+ long lval;
+ use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, lval);
+ if (err == 0
+ &amp;&amp; (lval &lt; numeric_limits&lt;int&gt;::min() || numeric_limits&lt;int&gt;::max() &lt; lval))
+ err = ios_base::failbit;
+ setstate(err);</pre>
+</blockquote>
+
+<p><i>[Post-Tokyo: PJP provided the above wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="119"></a>119. Should virtual functions be allowed to strengthen the exception specification?</h3>
+<p><b>Section:</b> 17.4.4.8 [res.on.exception.handling] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#res.on.exception.handling">issues</a> in [res.on.exception.handling].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 17.4.4.8 [res.on.exception.handling] states: </p>
+
+<p>"An implementation may strengthen the exception-specification
+for a function by removing listed exceptions." </p>
+
+<p>The problem is that if an implementation is allowed to do this for
+virtual functions, then a library user cannot write a class that
+portably derives from that class. </p>
+
+<p>For example, this would not compile if ios_base::failure::~failure
+had an empty exception specification: </p>
+
+<pre>#include &lt;ios&gt;
+#include &lt;string&gt;
+
+class D : public std::ios_base::failure {
+public:
+ D(const std::string&amp;);
+ ~D(); // error - exception specification must be compatible with
+ // overridden virtual function ios_base::failure::~failure()
+};</pre>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change Section 17.4.4.8 [res.on.exception.handling] from:</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp; "may strengthen the
+exception-specification for a function"</p>
+
+<p>to:</p>
+
+<p>&nbsp;&nbsp;&nbsp;&nbsp; "may strengthen the
+exception-specification for a non-virtual function". </p>
+
+
+
+
+
+<hr>
+<h3><a name="120"></a>120. Can an implementor add specializations?</h3>
+<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>The original issue asked whether a library implementor could
+specialize standard library templates for built-in types. (This was
+an issue because users are permitted to explicitly instantiate
+standard library templates.)</p>
+
+<p>Specializations are no longer a problem, because of the resolution
+to core issue 259. Under the proposed resolution, it will be legal
+for a translation unit to contain both a specialization and an
+explicit instantiation of the same template, provided that the
+specialization comes first. In such a case, the explicit
+instantiation will be ignored. Further discussion of library issue
+120 assumes that the core 259 resolution will be adopted.</p>
+
+<p>However, as noted in lib-7047, one piece of this issue still
+remains: what happens if a standard library implementor explicitly
+instantiates a standard library templates? It's illegal for a program
+to contain two different explicit instantiations of the same template
+for the same type in two different translation units (ODR violation),
+and the core working group doesn't believe it is practical to relax
+that restriction.</p>
+
+<p>The issue, then, is: are users allowed to explicitly instantiate
+standard library templates for non-user defined types? The status quo
+answer is 'yes'. Changing it to 'no' would give library implementors
+more freedom.</p>
+
+<p>This is an issue because, for performance reasons, library
+implementors often need to explicitly instantiate standard library
+templates. (for example, std::basic_string&lt;char&gt;) Does giving
+users freedom to explicitly instantiate standard library templates for
+non-user defined types make it impossible or painfully difficult for
+library implementors to do this?</p>
+
+<p>John Spicer suggests, in lib-8957, that library implementors have a
+mechanism they can use for explicit instantiations that doesn't
+prevent users from performing their own explicit instantiations: put
+each explicit instantiation in its own object file. (Different
+solutions might be necessary for Unix DSOs or MS-Windows DLLs.) On
+some platforms, library implementors might not need to do anything
+special: the "undefined behavior" that results from having two
+different explicit instantiations might be harmless.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>Append to 17.4.3.1 [reserved.names] paragraph 1: </p>
+ <blockquote><p>
+ A program may explicitly instantiate any templates in the standard
+ library only if the declaration depends on the name of a user-defined
+ type of external linkage and the instantiation meets the standard library
+ requirements for the original template.
+ </p></blockquote>
+
+<p><i>[Kona: changed the wording from "a user-defined name" to "the name of
+ a user-defined type"]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG considered another possible resolution:</p>
+<blockquote>
+ <p>In light of the resolution to core issue 259, no normative changes
+ in the library clauses are necessary. Add the following non-normative
+ note to the end of 17.4.3.1 [reserved.names] paragraph 1:</p>
+ <blockquote><p>
+ [<i>Note:</i> A program may explicitly instantiate standard library
+ templates, even when an explicit instantiation does not depend on
+ a user-defined name. <i>--end note</i>]
+ </p></blockquote>
+</blockquote>
+
+<p>The LWG rejected this because it was believed that it would make
+ it unnecessarily difficult for library implementors to write
+ high-quality implementations. A program may not include an
+ explicit instantiation of the same template, for the same template
+ arguments, in two different translation units. If users are
+ allowed to provide explicit instantiations of Standard Library
+ templates for built-in types, then library implementors aren't,
+ at least not without nonportable tricks.</p>
+
+<p>The most serious problem is a class template that has writeable
+ static member variables. Unfortunately, such class templates are
+ important and, in existing Standard Library implementations, are
+ often explicitly specialized by library implementors: locale facets,
+ which have a writeable static member variable <tt>id</tt>. If a
+ user's explicit instantiation collided with the implementations
+ explicit instantiation, iostream initialization could cause locales
+ to be constructed in an inconsistent state.</p>
+
+<p>One proposed implementation technique was for Standard Library
+ implementors to provide explicit instantiations in separate object
+ files, so that they would not be picked up by the linker when the
+ user also provides an explicit instantiation. However, this
+ technique only applies for Standard Library implementations that
+ are packaged as static archives. Most Standard Library
+ implementations nowadays are packaged as dynamic libraries, so this
+ technique would not apply.</p>
+
+<p>The Committee is now considering standardization of dynamic
+ linking. If there are such changes in the future, it may be
+ appropriate to revisit this issue later.</p>
+
+
+
+
+
+<hr>
+<h3><a name="122"></a>122. streambuf/wstreambuf description should not say they are specializations</h3>
+<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 27.5.2 describes the streambuf classes this way: </p>
+
+<blockquote>
+
+<p>The class streambuf is a specialization of the template class basic_streambuf
+specialized for the type char. </p>
+
+<p>The class wstreambuf is a specialization of the template class basic_streambuf
+specialized for the type wchar_t. </p>
+
+</blockquote>
+
+<p>This implies that these classes must be template specializations, not typedefs. </p>
+
+<p>It doesn't seem this was intended, since Section 27.5 has them declared as typedefs. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove 27.5.2 [streambuf] paragraphs 2 and 3 (the above two
+sentences). </p>
+
+
+<p><b>Rationale:</b></p>
+<p>The <tt>streambuf</tt> synopsis already has a declaration for the
+typedefs and that is sufficient. </p>
+
+
+
+
+
+<hr>
+<h3><a name="123"></a>123. Should valarray helper arrays fill functions be const?</h3>
+<p><b>Section:</b> 26.5.5.3 [slice.arr.fill], 26.5.7.3 [gslice.array.fill], 26.5.8.3 [mask.array.fill], 26.5.9.3 [indirect.array.fill] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>One of the operator= in the valarray helper arrays is const and one
+is not. For example, look at slice_array. This operator= in Section
+26.5.5.1 [slice.arr.assign] is const: </p>
+
+<p>&nbsp;&nbsp;&nbsp; <tt>void operator=(const valarray&lt;T&gt;&amp;) const;</tt> </p>
+
+<p>but this one in Section 26.5.5.3 [slice.arr.fill] is not: </p>
+
+<p>&nbsp;&nbsp;&nbsp; <tt>void operator=(const T&amp;); </tt></p>
+
+<p>The description of the semantics for these two functions is similar. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>26.5.5 [template.slice.array] Template class slice_array</p>
+<blockquote>
+
+ <p>In the class template definition for slice_array, replace the member
+ function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>with</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.5.3 [slice.arr.fill] slice_array fill function</p>
+<blockquote>
+
+ <p>Change the function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>to</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.7 [template.gslice.array] Template class gslice_array</p>
+<blockquote>
+
+ <p>In the class template definition for gslice_array, replace the member
+ function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>with</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.7.3 [gslice.array.fill] gslice_array fill function</p>
+<blockquote>
+
+ <p>Change the function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>to</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.8 [template.mask.array] Template class mask_array</p>
+<blockquote>
+
+ <p>In the class template definition for mask_array, replace the member
+ function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>with</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.8.3 [mask.array.fill] mask_array fill function</p>
+<blockquote>
+
+ <p>Change the function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>to</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.9 [template.indirect.array] Template class indirect_array</p>
+<blockquote>
+
+ <p>In the class template definition for indirect_array, replace the member
+ function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>with</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+<p>26.5.9.3 [indirect.array.fill] indirect_array fill function</p>
+<blockquote>
+
+ <p>Change the function declaration</p>
+ <pre> void operator=(const T&amp;);
+ </pre>
+ <p>to</p>
+ <pre> void operator=(const T&amp;) const;
+ </pre>
+</blockquote>
+
+
+<p><i>[Redmond: Robert provided wording.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>There's no good reason for one version of operator= being const and
+another one not. Because of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, this now
+matters: these functions are now callable in more circumstances. In
+many existing implementations, both versions are already const.</p>
+
+
+
+
+
+<hr>
+<h3><a name="124"></a>124. ctype_byname&lt;charT&gt;::do_scan_is &amp; do_scan_not return type should be const charT*</h3>
+<p><b>Section:</b> 22.2.1.2 [locale.ctype.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.byname">issues</a> in [locale.ctype.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 22.2.1.2 [locale.ctype.byname]
+ctype_byname&lt;charT&gt;::do_scan_is() and do_scan_not() are declared
+to return a const char* not a const charT*. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change Section 22.2.1.2 [locale.ctype.byname] <tt>do_scan_is()</tt> and
+<tt>do_scan_not()</tt> to return a <tt> const
+charT*</tt>. </p>
+
+
+
+
+
+<hr>
+<h3><a name="125"></a>125. valarray&lt;T&gt;::operator!() return type is inconsistent</h3>
+<p><b>Section:</b> 26.5.2 [template.valarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.valarray">issues</a> in [template.valarray].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 26.5.2 [template.valarray] valarray&lt;T&gt;::operator!()
+is
+declared to return a valarray&lt;T&gt;, but in Section 26.5.2.5
+[valarray.unary] it is declared to return a valarray&lt;bool&gt;. The
+latter appears to be correct. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change in Section 26.5.2 [template.valarray] the declaration of
+<tt>operator!()</tt> so that the return type is
+<tt>valarray&lt;bool&gt;</tt>. </p>
+
+
+
+
+<hr>
+<h3><a name="126"></a>126. typos in Effects clause of ctype::do_narrow()</h3>
+<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p><p>Typos in 22.2.1.1.2 need to be fixed.</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>In Section 22.2.1.1.2 [locale.ctype.virtuals] change: </p>
+
+<pre> do_widen(do_narrow(c),0) == c</pre>
+
+<p>to:</p>
+
+<pre> do_widen(do_narrow(c,0)) == c</pre>
+
+<p>and change:</p>
+
+<pre> (is(M,c) || !ctc.is(M, do_narrow(c),dfault) )</pre>
+
+<p>to:</p>
+
+<pre> (is(M,c) || !ctc.is(M, do_narrow(c,dfault)) )</pre>
+
+
+
+
+
+<hr>
+<h3><a name="127"></a>127. auto_ptr&lt;&gt; conversion issues</h3>
+<p><b>Section:</b> D.9.1 [auto.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Greg Colvin <b>Date:</b> 1999-02-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#auto.ptr">issues</a> in [auto.ptr].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There are two problems with the current <tt>auto_ptr</tt> wording
+in the standard: </p>
+
+<p>First, the <tt>auto_ptr_ref</tt> definition cannot be nested
+because <tt>auto_ptr&lt;Derived&gt;::auto_ptr_ref</tt> is unrelated to
+<tt>auto_ptr&lt;Base&gt;::auto_ptr_ref</tt>. <i>Also submitted by
+Nathan Myers, with the same proposed resolution.</i></p>
+
+<p>Second, there is no <tt>auto_ptr</tt> assignment operator taking an
+<tt>auto_ptr_ref</tt> argument. </p>
+
+<p>I have discussed these problems with my proposal coauthor, Bill
+Gibbons, and with some compiler and library implementors, and we
+believe that these problems are not desired or desirable implications
+of the standard. </p>
+
+<p>25 Aug 1999: The proposed resolution now reflects changes suggested
+by Dave Abrahams, with Greg Colvin's concurrence; 1) changed
+"assignment operator" to "public assignment
+operator", 2) changed effects to specify use of release(), 3)
+made the conversion to auto_ptr_ref const. </p>
+
+<p>2 Feb 2000: Lisa Lippincott comments: [The resolution of] this issue
+states that the conversion from auto_ptr to auto_ptr_ref should
+be const. This is not acceptable, because it would allow
+initialization and assignment from _any_ const auto_ptr! It also
+introduces an implementation difficulty in writing this conversion
+function -- namely, somewhere along the line, a const_cast will be
+necessary to remove that const so that release() may be called. This
+may result in undefined behavior [7.1.5.1/4]. The conversion
+operator does not have to be const, because a non-const implicit
+object parameter may be bound to an rvalue [13.3.3.1.4/3]
+[13.3.1/5]. </p>
+
+ <p>Tokyo: The LWG removed the following from the proposed resolution:</p>
+
+ <p>In 20.4.4 [meta.unary], paragraph 2, and 20.4.4.3 [meta.unary.prop],
+ paragraph 2, make the conversion to auto_ptr_ref const:</p>
+ <blockquote>
+ <pre>template&lt;class Y&gt; operator auto_ptr_ref&lt;Y&gt;() const throw();</pre>
+ </blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 20.4.4 [meta.unary], paragraph 2, move
+the <tt>auto_ptr_ref</tt> definition to namespace scope.</p>
+
+<p>In 20.4.4 [meta.unary], paragraph 2, add
+a public assignment operator to the <tt>auto_ptr</tt> definition: </p>
+
+<blockquote>
+ <pre>auto_ptr&amp; operator=(auto_ptr_ref&lt;X&gt; r) throw();</pre>
+</blockquote>
+
+<p>Also add the assignment operator to 20.4.4.3 [meta.unary.prop]: </p>
+
+<blockquote>
+ <pre>auto_ptr&amp; operator=(auto_ptr_ref&lt;X&gt; r) throw()</pre>
+
+ <p><b>Effects:</b> Calls <tt>reset(p.release())</tt> for the <tt>auto_ptr
+ p</tt> that <tt>r</tt> holds a reference to.<br>
+ <b>Returns: </b><tt>*this</tt>.</p>
+
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="129"></a>129. Need error indication from seekp() and seekg()</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted], 27.6.2.5 [ostream.seeks] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-02-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Currently, the standard does not specify how seekg() and seekp()
+indicate failure. They are not required to set failbit, and they can't
+return an error indication because they must return *this, i.e. the
+stream. Hence, it is undefined what happens if they fail. And they
+<i>can</i> fail, for instance, when a file stream is disconnected from the
+underlying file (is_open()==false) or when a wide character file
+stream must perform a state-dependent code conversion, etc. </p>
+
+<p>The stream functions seekg() and seekp() should set failbit in the
+stream state in case of failure.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to the Effects: clause of&nbsp; seekg() in
+27.6.1.3 [istream.unformatted] and to the Effects: clause of seekp() in
+27.6.2.5 [ostream.seeks]: </p>
+
+<blockquote>
+ <p>In case of failure, the function calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>).
+ </p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Setting failbit is the usual error reporting mechanism for streams</p>
+
+
+
+
+<hr>
+<h3><a name="130"></a>130. Return type of container::erase(iterator) differs for associative containers</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts], 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-03-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#451">451</a></p>
+<p><b>Discussion:</b></p>
+<p>Table 67 (23.1.1) says that container::erase(iterator) returns an
+iterator. Table 69 (23.1.2) says that in addition to this requirement,
+associative containers also say that container::erase(iterator)
+returns void. That's not an addition; it's a change to the
+requirements, which has the effect of making associative containers
+fail to meet the requirements for containers.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+In 23.1.2 [associative.reqmts], in Table 69 Associative container
+requirements, change the return type of <tt>a.erase(q)</tt> from
+<tt>void</tt> to <tt>iterator</tt>. Change the
+assertion/not/pre/post-condition from "erases the element pointed to
+by <tt>q</tt>" to "erases the element pointed to by <tt>q</tt>.
+Returns an iterator pointing to the element immediately following q
+prior to the element being erased. If no such element exists, a.end()
+is returned."
+</p>
+
+<p>
+In 23.1.2 [associative.reqmts], in Table 69 Associative container
+requirements, change the return type of <tt>a.erase(q1, q2)</tt>
+from <tt>void</tt> to <tt>iterator</tt>. Change the
+assertion/not/pre/post-condition from "erases the elements in the
+range <tt>[q1, q2)</tt>" to "erases the elements in the range <tt>[q1,
+q2)</tt>. Returns q2."
+</p>
+
+<p>
+In 23.3.1 [map], in the <tt>map</tt> class synopsis; and
+in 23.3.2 [multimap], in the <tt>multimap</tt> class synopsis; and
+in 23.3.3 [set], in the <tt>set</tt> class synopsis; and
+in 23.3.4 [multiset], in the <tt>multiset</tt> class synopsis:
+change the signature of the first <tt>erase</tt> overload to
+</p>
+<pre> iterator erase(iterator position);
+</pre>
+<p>and change the signature of the third <tt>erase</tt> overload to</p>
+<pre> iterator erase(iterator first, iterator last);
+</pre>
+
+
+<p><i>[Pre-Kona: reopened at the request of Howard Hinnant]</i></p>
+
+
+<p><i>[Post-Kona: the LWG agrees the return type should be
+<tt>iterator</tt>, not <tt>void</tt>. (Alex Stepanov agrees too.)
+Matt provided wording.]</i></p>
+
+
+<p><i>[
+ Sydney: the proposed wording went in the right direction, but it
+ wasn't good enough. We want to return an iterator from the range form
+ of erase as well as the single-iterator form. Also, the wording is
+ slightly different from the wording we have for sequences; there's no
+ good reason for having a difference. Matt provided new wording,
+(reflected above) which we will review at the next meeting.
+]</i></p>
+
+
+<p><i>[
+Redmond: formally voted into WP.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="132"></a>132. list::resize description uses random access iterators</h3>
+<p><b>Section:</b> 23.2.3.2 [list.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description reads:</p>
+
+<p>-1- Effects:</p>
+
+<pre> if (sz &gt; size())
+ insert(end(), sz-size(), c);
+ else if (sz &lt; size())
+ erase(begin()+sz, end());
+ else
+ ; // do nothing</pre>
+
+<p>Obviously list::resize should not be specified in terms of random access iterators.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 23.2.3.2 [list.capacity] paragraph 1 to:</p>
+
+<p>Effects:</p>
+
+<pre> if (sz &gt; size())
+ insert(end(), sz-size(), c);
+ else if (sz &lt; size())
+ {
+ iterator i = begin();
+ advance(i, sz);
+ erase(i, end());
+ }</pre>
+
+<p><i>[Dublin: The LWG asked Howard to discuss exception safety offline
+with David Abrahams. They had a discussion and believe there is
+no issue of exception safety with the proposed resolution.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="133"></a>133. map missing get_allocator()</h3>
+<p><b>Section:</b> 23.3.1 [map] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#map">issues</a> in [map].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p><p>The title says it all.</p>
+
+<p><b>Proposed resolution:</b></p>
+<p>Insert in 23.3.1 [map], paragraph 2,
+after operator= in the map declaration:</p>
+
+<pre> allocator_type get_allocator() const;</pre>
+
+
+
+
+<hr>
+<h3><a name="134"></a>134. vector constructors over specified</h3>
+<p><b>Section:</b> 23.2.5.1 [vector.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The complexity description says: "It does at most 2N calls to the copy constructor
+of T and logN reallocations if they are just input iterators ...".</p>
+
+<p>This appears to be overly restrictive, dictating the precise memory/performance
+tradeoff for the implementor.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 23.2.5.1 [vector.cons], paragraph 1 to:</p>
+
+<p>-1- Complexity: The constructor template &lt;class
+InputIterator&gt; vector(InputIterator first, InputIterator last)
+makes only N calls to the copy constructor of T (where N is the
+distance between first and last) and no reallocations if iterators
+first and last are of forward, bidirectional, or random access
+categories. It makes order N calls to the copy constructor of T and
+order logN reallocations if they are just input iterators.
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>"at most 2N calls" is correct only if the growth factor
+is greater than or equal to 2.
+</p>
+
+
+
+
+<hr>
+<h3><a name="136"></a>136. seekp, seekg setting wrong streams?</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>I may be misunderstanding the intent, but should not seekg set only
+the input stream and seekp set only the output stream? The description
+seems to say that each should set both input and output streams. If
+that's really the intent, I withdraw this proposal.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In section 27.6.1.3 change:</p>
+
+<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type pos);
+Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos). </pre>
+
+<p>To:</p>
+
+<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type pos);
+Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos, ios_base::in). </pre>
+
+<p>In section 27.6.1.3 change:</p>
+
+<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type&amp; off, ios_base::seekdir dir);
+Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir). </pre>
+
+<p>To:</p>
+
+<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type&amp; off, ios_base::seekdir dir);
+Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir, ios_base::in). </pre>
+
+<p>In section 27.6.2.4, paragraph 2 change:</p>
+
+<pre>-2- Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos). </pre>
+
+<p>To:</p>
+
+<pre>-2- Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos, ios_base::out). </pre>
+
+<p>In section 27.6.2.4, paragraph 4 change:</p>
+
+<pre>-4- Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir). </pre>
+
+<p>To:</p>
+
+<pre>-4- Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir, ios_base::out). </pre>
+
+<p><i>[Dublin: Dietmar Kühl thinks this is probably correct, but would
+like the opinion of more iostream experts before taking action.]</i></p>
+
+
+<p><i>[Tokyo: Reviewed by the LWG. PJP noted that although his docs are
+incorrect, his implementation already implements the Proposed
+Resolution.]</i></p>
+
+
+<p><i>[Post-Tokyo: Matt Austern comments:<br>
+Is it a problem with basic_istream and basic_ostream, or is it a problem
+with basic_stringbuf?
+We could resolve the issue either by changing basic_istream and
+basic_ostream, or by changing basic_stringbuf. I prefer the latter
+change (or maybe both changes): I don't see any reason for the standard to
+require that std::stringbuf s(std::string("foo"), std::ios_base::in);
+s.pubseekoff(0, std::ios_base::beg); must fail.<br>
+This requirement is a bit weird. There's no similar requirement
+for basic_streambuf&lt;&gt;::seekpos, or for basic_filebuf&lt;&gt;::seekoff or
+basic_filebuf&lt;&gt;::seekpos.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="137"></a>137. Do use_facet and has_facet look in the global locale?</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 22.1.1 [locale] says:</p>
+
+<p>-4- In the call to use_facet&lt;Facet&gt;(loc), the type argument
+chooses a facet, making available all members of the named type. If
+Facet is not present in a locale (or, failing that, in the global
+locale), it throws the standard exception bad_cast. A C++ program can
+check if a locale implements a particular facet with the template
+function has_facet&lt;Facet&gt;(). </p>
+
+<p>This contradicts the specification given in section
+22.1.2 [locale.global.templates]:
+<br><br>
+template &lt;class&nbsp; Facet&gt; const&nbsp; Facet&amp; use_facet(const
+locale&amp;&nbsp; loc); <br>
+<br>
+-1- Get a reference to a facet of a locale. <br>
+-2- Returns: a reference to the corresponding facet of loc, if present. <br>
+-3- Throws: bad_cast if has_facet&lt;Facet&gt;(loc) is false. <br>
+-4- Notes: The reference returned remains valid at least as long as any copy of loc exists
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the phrase "(or, failing that, in the global locale)"
+from section 22.1.1. </p>
+
+
+<p><b>Rationale:</b></p>
+<p>Needed for consistency with the way locales are handled elsewhere
+in the standard.</p>
+
+
+
+
+<hr>
+<h3><a name="139"></a>139. Optional sequence operation table description unclear</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-03-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The sentence introducing the Optional sequence operation table
+(23.1.1 paragraph 12) has two problems:</p>
+
+<p>A. It says ``The operations in table 68 are provided only for the containers for which
+they take constant time.''<br>
+<br>
+That could be interpreted in two ways, one of them being ``Even though table 68 shows
+particular operations as being provided, implementations are free to omit them if they
+cannot implement them in constant time.''<br>
+<br>
+B. That paragraph says nothing about amortized constant time, and it should.&nbsp;</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the wording in 23.1.1 paragraph 12&nbsp; which begins ``The operations in table 68 are provided only..."
+with:</p>
+
+<blockquote>
+ <p>Table 68 lists sequence operations that are provided for some types of sequential
+ containers but not others. An implementation shall provide these operations for all
+ container types shown in the ``container'' column, and shall implement them so as to take
+ amortized constant time.</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="141"></a>141. basic_string::find_last_of, find_last_not_of say pos instead of xpos</h3>
+<p><b>Section:</b> 21.3.6.4 [string::insert], 21.3.6.6 [string::replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Arch Robison <b>Date:</b> 1999-04-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1 surely have misprints where they
+say:<br>
+<br>
+&#8212; <tt>xpos &lt;= pos</tt> and <tt>pos &lt; size();</tt></p>
+
+<p>Surely the document meant to say ``<tt>xpos &lt; size()</tt>'' in both places.</p>
+
+<p><i>[Judy Ward also sent in this issue for 21.3.6.4 with the same
+proposed resolution.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1, the line which says:<br>
+<br>
+&#8212; <tt>xpos &lt;= pos</tt> and <tt>pos &lt; size();<br>
+<br>
+</tt>to:<br>
+<tt><br>
+</tt>&#8212; <tt>xpos &lt;= pos</tt> and <tt>xpos &lt; size();</tt></p>
+
+
+
+
+<hr>
+<h3><a name="142"></a>142. lexicographical_compare complexity wrong</h3>
+<p><b>Section:</b> 25.3.8 [alg.lex.comparison] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-06-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The lexicographical_compare complexity is specified as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; "At most min((last1 - first1), (last2 - first2))
+applications of the corresponding comparison."<br>
+<br>
+The best I can do is twice that expensive.</p>
+
+<p>Nicolai Josuttis comments in lib-6862: You mean, to check for
+equality you have to check both &lt; and &gt;? Yes, IMO you are
+right! (and Matt states this complexity in his book)</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.3.8 [alg.lex.comparison] complexity to:</p>
+ <blockquote><p>
+ At most <tt>2*min((last1 - first1), (last2 - first2))</tt>
+ applications of the corresponding comparison.
+ </p></blockquote>
+
+<p>Change the example at the end of paragraph 3 to read:</p>
+ <blockquote><p>
+ [Example:<br>
+ <br>
+ &nbsp;&nbsp;&nbsp; for ( ; first1 != last1 &amp;&amp; first2 != last2 ;
+ ++first1, ++first2) {<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (*first1 &lt; *first2) return true;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (*first2 &lt; *first1) return false;<br>
+ &nbsp;&nbsp;&nbsp; }<br>
+ &nbsp;&nbsp;&nbsp; return first1 == last1 &amp;&amp; first2 != last2;<br>
+ &nbsp;&nbsp;&nbsp;<br>
+ --end example]
+ </p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="144"></a>144. Deque constructor complexity wrong </h3>
+<p><b>Section:</b> 23.2.2.1 [deque.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Herb Sutter <b>Date:</b> 1999-05-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#deque.cons">issues</a> in [deque.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 23.2.2.1 [deque.cons] paragraph 6, the deque ctor that takes an iterator range appears
+to have complexity requirements which are incorrect, and which contradict the
+complexity requirements for insert(). I suspect that the text in question,
+below, was taken from vector:</p>
+<blockquote>
+ <p>Complexity: If the iterators first and last are forward iterators,
+ bidirectional iterators, or random access iterators the constructor makes only
+ N calls to the copy constructor, and performs no reallocations, where N is
+ last - first.</p>
+</blockquote>
+<p>The word "reallocations" does not really apply to deque. Further,
+all of the following appears to be spurious:</p>
+<blockquote>
+ <p>It makes at most 2N calls to the copy constructor of T and log N
+ reallocations if they are input iterators.1)</p>
+ <p>1) The complexity is greater in the case of input iterators because each
+ element must be added individually: it is impossible to determine the distance
+ between first abd last before doing the copying.</p>
+</blockquote>
+<p>This makes perfect sense for vector, but not for deque. Why should deque gain
+an efficiency advantage from knowing in advance the number of elements to
+insert?</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.2.2.1 [deque.cons] paragraph 6, replace the Complexity description, including the
+footnote, with the following text (which also corrects the "abd"
+typo):</p>
+<blockquote>
+ <p>Complexity: Makes last - first calls to the copy constructor of T.</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="146"></a>146. complex&lt;T&gt; Inserter and Extractor need sentries</h3>
+<p><b>Section:</b> 26.3.6 [complex.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.ops">issues</a> in [complex.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The extractor for complex numbers is specified as:&nbsp;</p>
+
+<blockquote>
+
+<p> template&lt;class T, class charT, class traits&gt;&nbsp;<br>
+ basic_istream&lt;charT, traits&gt;&amp;&nbsp;<br>
+ operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, complex&lt;T&gt;&amp; x);<br>
+&nbsp;<br>
+Effects: Extracts a complex number x of the form: u, (u), or (u,v),
+where u is the real part and v is the imaginary part
+(lib.istream.formatted).&nbsp;<br>
+Requires: The input values be convertible to T. If bad input is
+encountered, calls is.setstate(ios::failbit) (which may throw
+ios::failure (lib.iostate.flags).&nbsp;<br>
+Returns: is .</p>
+
+</blockquote>
+<p>Is it intended that the extractor for complex numbers does not skip
+whitespace, unlike all other extractors in the standard library do?
+Shouldn't a sentry be used?&nbsp;<br>
+<br>
+The inserter for complex numbers is specified as:</p>
+
+<blockquote>
+
+<p> template&lt;class T, class charT, class traits&gt;&nbsp;<br>
+ basic_ostream&lt;charT, traits&gt;&amp;&nbsp;<br>
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; o, const complex&lt;T&gt;&amp; x);<br>
+<br>
+Effects: inserts the complex number x onto the stream o as if it were implemented as follows:<br>
+<br>
+ template&lt;class T, class charT, class traits&gt;&nbsp;<br>
+ basic_ostream&lt;charT, traits&gt;&amp;&nbsp;<br>
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; o, const complex&lt;T&gt;&amp; x)&nbsp;<br>
+ {&nbsp;<br>
+ basic_ostringstream&lt;charT, traits&gt; s;&nbsp;<br>
+ s.flags(o.flags());&nbsp;<br>
+ s.imbue(o.getloc());&nbsp;<br>
+ s.precision(o.precision());&nbsp;<br>
+ s &lt;&lt; '(' &lt;&lt; x.real() &lt;&lt; "," &lt;&lt; x.imag() &lt;&lt; ')';&nbsp;<br>
+ return o &lt;&lt; s.str();&nbsp;<br>
+ }</p>
+
+</blockquote>
+
+<p>Is it intended that the inserter for complex numbers ignores the
+field width and does not do any padding? If, with the suggested
+implementation above, the field width were set in the stream then the
+opening parentheses would be adjusted, but the rest not, because the
+field width is reset to zero after each insertion.</p>
+
+<p>I think that both operations should use sentries, for sake of
+consistency with the other inserters and extractors in the
+library. Regarding the issue of padding in the inserter, I don't know
+what the intent was.&nbsp;</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>After 26.3.6 [complex.ops] paragraph 14 (operator&gt;&gt;), add a
+Notes clause:</p>
+
+<blockquote>
+
+<p>Notes: This extraction is performed as a series of simpler
+extractions. Therefore, the skipping of whitespace is specified to be the
+same for each of the simpler extractions.</p>
+
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>For extractors, the note is added to make it clear that skipping whitespace
+follows an "all-or-none" rule.</p>
+
+<p>For inserters, the LWG believes there is no defect; the standard is correct
+as written.</p>
+
+
+
+
+<hr>
+<h3><a name="147"></a>147. Library Intro refers to global functions that aren't global</h3>
+<p><b>Section:</b> 17.4.4.3 [global.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Lois Goldthwaite <b>Date:</b> 1999-06-04</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#global.functions">issues</a> in [global.functions].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The library had many global functions until 17.4.1.1 [lib.contents]
+paragraph 2 was added: </p>
+
+<blockquote>
+
+<p>All library entities except macros, operator new and operator
+delete are defined within the namespace std or namespaces nested
+within namespace std. </p>
+
+</blockquote>
+
+<p>It appears "global function" was never updated in the following: </p>
+
+<blockquote>
+
+<p>17.4.4.3 - Global functions [lib.global.functions]<br>
+<br>
+-1- It is unspecified whether any global functions in the C++ Standard
+Library are defined as inline (dcl.fct.spec).<br>
+<br>
+-2- A call to a global function signature described in Clauses
+lib.language.support through lib.input.output behaves the same as if
+the implementation declares no additional global function
+signatures.*<br>
+<br>
+ [Footnote: A valid C++ program always calls the expected library
+ global function. An implementation may also define additional
+ global functions that would otherwise not be called by a valid C++
+ program. --- end footnote]<br>
+<br>
+-3- A global function cannot be declared by the implementation as
+taking additional default arguments.&nbsp;<br>
+<br>
+17.4.4.4 - Member functions [lib.member.functions]<br>
+<br>
+-2- An implementation can declare additional non-virtual member
+function signatures within a class: </p>
+
+ <blockquote>
+
+<p>-- by adding arguments with default values to a member function
+signature; The same latitude does not extend to the implementation of
+virtual or global functions, however. </p>
+
+ </blockquote>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p> Change "global" to "global or non-member" in:</p>
+<blockquote>
+ <p>17.4.4.3 [lib.global.functions] section title,<br>
+ 17.4.4.3 [lib.global.functions] para 1,<br>
+ 17.4.4.3 [lib.global.functions] para 2 in 2 places plus 2
+ places in the footnote,<br>
+ 17.4.4.3 [lib.global.functions] para 3,<br>
+ 17.4.4.4 [lib.member.functions] para 2</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Because operator new and delete are global, the proposed resolution
+was changed from "non-member" to "global or non-member.
+</p>
+
+
+
+
+<hr>
+<h3><a name="148"></a>148. Functions in the example facet BoolNames should be const</h3>
+<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Jeremy Siek <b>Date:</b> 1999-06-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 22.2.8 [facets.examples] paragraph 13, the do_truename() and
+do_falsename() functions in the example facet BoolNames should be
+const. The functions they are overriding in
+numpunct_byname&lt;char&gt; are const. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.8 [facets.examples] paragraph 13, insert "const" in
+two places:</p>
+<blockquote>
+ <p><tt>string do_truename() const { return "Oui Oui!"; }<br>
+ string do_falsename() const { return "Mais Non!"; }</tt></p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="150"></a>150. Find_first_of says integer instead of iterator </h3>
+<p><b>Section:</b> 25.1.4 [alg.find.first.of] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt McClure <b>Date:</b> 1999-06-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find.first.of">issues</a> in [alg.find.first.of].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.1.4 [alg.find.first.of] paragraph 2 from:</p>
+
+<blockquote>
+<p>Returns: The first iterator i in the range [first1, last1) such
+that for some integer j in the range [first2, last2) ...</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>Returns: The first iterator i in the range [first1, last1) such
+that for some iterator j in the range [first2, last2) ...</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="151"></a>151. Can't currently clear() empty container</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>For both sequences and associative containers, a.clear() has the
+semantics of erase(a.begin(),a.end()), which is undefined for an empty
+container since erase(q1,q2) requires that q1 be dereferenceable
+(23.1.1,3 and 23.1.2,7). When the container is empty, a.begin() is
+not dereferenceable.<br>
+<br>
+The requirement that q1 be unconditionally dereferenceable causes many
+operations to be intuitively undefined, of which clearing an empty
+container is probably the most dire.<br>
+<br>
+Since q1 and q2 are only referenced in the range [q1, q2), and [q1,
+q2) is required to be a valid range, stating that q1 and q2 must be
+iterators or certain kinds of iterators is unnecessary.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.1.1, paragraph 3, change:</p>
+<blockquote>
+ <p>p and q2 denote valid iterators to a, q and q1 denote valid dereferenceable iterators to a, [q1, q2) denotes a valid range</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>p denotes a valid iterator to a, q denotes a valid dereferenceable iterator to a, [q1, q2) denotes a valid range
+ in a</p>
+</blockquote>
+<p>In 23.1.2, paragraph 7, change:</p>
+<blockquote>
+ <p>p and q2 are valid iterators to a, q and q1 are valid dereferenceable
+ iterators to a, [q1, q2) is a valid range</p>
+</blockquote>
+<p>to</p>
+<blockquote>
+ <p>p is a valid iterator to a, q is a valid dereferenceable iterator to a, [q1, q2) is a valid range
+ into a</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="152"></a>152. Typo in <tt>scan_is()</tt> semantics</h3>
+<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The semantics of <tt>scan_is()</tt> (paragraphs 4 and 6) is not exactly described
+because there is no function <tt>is()</tt> which only takes a character as
+argument. Also, in the effects clause (paragraph 3), the semantic is also kept
+vague.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.1.1.2 [locale.ctype.virtuals] paragraphs 4 and 6, change the returns
+clause from:</p>
+<blockquote>
+ <p>"... such that <tt>is(*p)</tt>
+would..."</p>
+</blockquote>
+<p>to:&nbsp; "... such that <tt>is(m, *p)</tt>
+ would...."</p>
+
+
+
+
+
+<hr>
+<h3><a name="153"></a>153. Typo in <tt>narrow()</tt> semantics</h3>
+<p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#207">207</a></p>
+<p><b>Discussion:</b></p>
+<p>The description of the array version of <tt>narrow()</tt> (in
+paragraph 11) is flawed: There is no member <tt>do_narrow()</tt> which
+takes only three arguments because in addition to the range a default
+character is needed.</p>
+
+<p>Additionally, for both <tt>widen</tt> and <tt>narrow</tt> we have
+two signatures followed by a <b>Returns</b> clause that only addresses
+one of them.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members]
+paragraph 10 from:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
+
+<p>to:</p>
+<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to),
+respectively.</p>
+
+<p>Change 22.2.1.3.2 [facet.ctype.char.members] paragraph 10 and 11 from:</p>
+<pre> char narrow(char c, char /*dfault*/) const;
+ const char* narrow(const char* low, const char* high,
+ char /*dfault*/, char* to) const;</pre>
+<pre> Returns: do_narrow(low, high, to).</pre>
+<p>to:</p>
+<pre> char narrow(char c, char dfault) const;
+ const char* narrow(const char* low, const char* high,
+ char dfault, char* to) const;</pre>
+<pre> Returns: do_narrow(c, dfault) or
+ do_narrow(low, high, dfault, to), respectively.</pre>
+
+<p><i>[Kona: 1) the problem occurs in additional places, 2) a user
+defined version could be different.]</i></p>
+
+
+<p><i>[Post-Tokyo: Dietmar provided the above wording at the request of
+the LWG. He could find no other places the problem occurred. He
+asks for clarification of the Kona "a user defined
+version..." comment above. Perhaps it was a circuitous way of
+saying "dfault" needed to be uncommented?]</i></p>
+
+
+<p><i>[Post-Toronto: the issues list maintainer has merged in the
+proposed resolution from issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#207">207</a>, which addresses the
+same paragraphs.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="154"></a>154. Missing <tt>double</tt> specifier for <tt>do_get()</tt></h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The table in paragraph 7 for the length modifier does not list the length
+modifier <tt>l</tt> to be applied if the type is <tt>double</tt>. Thus, the
+standard asks the implementation to do undefined things when using <tt>scanf()</tt>
+(the missing length modifier for <tt>scanf()</tt> when scanning <tt>double</tt>s
+is actually a problem I found quite often in production code, too).</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.1.2 [facet.num.get.virtuals], paragraph 7, add a row in the Length
+Modifier table to say that for <tt>double</tt> a length modifier
+<tt>l</tt> is to be used.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The standard makes an embarrassing beginner's mistake.</p>
+
+
+
+
+<hr>
+<h3><a name="155"></a>155. Typo in naming the class defining the class <tt>Init</tt></h3>
+<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There are conflicting statements about where the class
+<tt>Init</tt> is defined. According to 27.3 [iostream.objects] paragraph 2
+it is defined as <tt>basic_ios::Init</tt>, according to 27.4.2 [ios.base] it is defined as <tt>ios_base::Init</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.3 [iostream.objects] paragraph 2 from
+"<tt>basic_ios::Init"</tt> to
+"<tt>ios_base::Init"</tt>.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Although not strictly wrong, the standard was misleading enough to warrant
+the change.</p>
+
+
+
+
+<hr>
+<h3><a name="156"></a>156. Typo in <tt>imbue()</tt> description</h3>
+<p><b>Section:</b> 27.4.2.3 [ios.base.locales] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.locales">issues</a> in [ios.base.locales].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There is a small discrepancy between the declarations of
+<tt>imbue()</tt>: in 27.4.2 [ios.base] the argument is passed as
+<tt>locale const&amp;</tt> (correct), in 27.4.2.3 [ios.base.locales] it
+is passed as <tt>locale const</tt> (wrong).</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.4.2.3 [ios.base.locales] change the <tt>imbue</tt> argument
+from "<tt>locale const" to "locale
+const&amp;".</tt></p>
+
+
+
+
+<hr>
+<h3><a name="158"></a>158. Underspecified semantics for <tt>setbuf()</tt></h3>
+<p><b>Section:</b> 27.5.2.4.2 [streambuf.virt.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.virt.buffer">issues</a> in [streambuf.virt.buffer].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The default behavior of <tt>setbuf()</tt> is described only for the
+situation that <tt>gptr() != 0 &amp;&amp; gptr() != egptr()</tt>:
+namely to do nothing. What has to be done in other situations&nbsp;
+is not described although there is actually only one reasonable
+approach, namely to do nothing, too.</p>
+
+<p>Since changing the buffer would almost certainly mess up most
+buffer management of derived classes unless these classes do it
+themselves, the default behavior of <tt>setbuf()</tt> should always be
+to do nothing.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.5.2.4.2 [streambuf.virt.buffer], paragraph 3, Default behavior,
+to: "Default behavior: Does nothing. Returns this."</p>
+
+
+
+
+<hr>
+<h3><a name="159"></a>159. Strange use of <tt>underflow()</tt></h3>
+<p><b>Section:</b> 27.5.2.4.3 [streambuf.virt.get] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description of the meaning of the result of
+<tt>showmanyc()</tt> seems to be rather strange: It uses calls to
+<tt>underflow()</tt>. Using <tt>underflow()</tt> is strange because
+this function only reads the current character but does not extract
+it, <tt>uflow()</tt> would extract the current character. This should
+be fixed to use <tt>sbumpc()</tt> instead.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.5.2.4.3 [streambuf.virt.get] paragraph 1,
+<tt>showmanyc()</tt>returns clause, by replacing the word
+"supplied" with the words "extracted from the
+stream".</p>
+
+
+
+
+<hr>
+<h3><a name="160"></a>160. Typo: Use of non-existing function <tt>exception()</tt></h3>
+<p><b>Section:</b> 27.6.1.1 [istream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream">issues</a> in [istream].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The paragraph 4 refers to the function <tt>exception()</tt> which
+is not defined. Probably, the referred function is
+<tt>basic_ios&lt;&gt;::exceptions()</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.1.1 [istream], 27.6.1.3 [istream.unformatted], paragraph 1,
+27.6.2.1 [ostream], paragraph 3, and 27.6.2.6.1 [ostream.formatted.reqmts],
+paragraph 1, change "<tt>exception()" to
+"exceptions()"</tt>.</p>
+
+<p><i>[Note to Editor: "exceptions" with an "s"
+is the correct spelling.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="161"></a>161. Typo: <tt>istream_iterator</tt> vs. <tt>istreambuf_iterator</tt></h3>
+<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The note in the second paragraph pretends that the first argument
+is an object of type <tt>istream_iterator</tt>. This is wrong: It is
+an object of type <tt>istreambuf_iterator</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.6.1.2.2 [istream.formatted.arithmetic] from:</p>
+<blockquote>
+ <p>The first argument provides an object of the istream_iterator class...</p>
+</blockquote>
+<p>to</p>
+<blockquote>
+ <p>The first argument provides an object of the istreambuf_iterator class...</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="164"></a>164. do_put() has apparently unused fill argument</h3>
+<p><b>Section:</b> 22.2.5.3.2 [locale.time.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-07-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 22.2.5.3.2 [locale.time.put.virtuals] the do_put() function is specified
+as taking a fill character as an argument, but the description of the
+function does not say whether the character is used at all and, if so,
+in which way. The same holds for any format control parameters that
+are accessible through the ios_base&amp; argument, such as the
+adjustment or the field width. Is strftime() supposed to use the fill
+character in any way? In any case, the specification of
+time_put.do_put() looks inconsistent to me.<br> <br> Is the
+signature of do_put() wrong, or is the effects clause incomplete?</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following note after 22.2.5.3.2 [locale.time.put.virtuals]
+paragraph 2:</p>
+<blockquote>
+ <p> [Note: the <tt>fill</tt> argument may be used in the implementation-defined formats, or by derivations. A space character is a reasonable default
+ for this argument. --end Note]</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG felt that while the normative text was correct,
+users need some guidance on what to pass for the <tt>fill</tt>
+argument since the standard doesn't say how it's used.</p>
+
+
+
+
+<hr>
+<h3><a name="165"></a>165. <tt>xsputn()</tt>, <tt>pubsync()</tt> never called by <tt>basic_ostream</tt> members?</h3>
+<p><b>Section:</b> 27.6.2.1 [ostream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream">issues</a> in [ostream].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 2 explicitly states that none of the <tt>basic_ostream</tt>
+functions falling into one of the groups "formatted output functions"
+and "unformatted output functions" calls any stream buffer function
+which might call a virtual function other than <tt>overflow()</tt>. Basically
+this is fine but this implies that <tt>sputn()</tt> (this function would call
+the virtual function <tt>xsputn()</tt>) is never called by any of the standard
+output functions. Is this really intended? At minimum it would be convenient to
+call <tt>xsputn()</tt> for strings... Also, the statement that <tt>overflow()</tt>
+is the only virtual member of <tt>basic_streambuf</tt> called is in conflict
+with the definition of <tt>flush()</tt> which calls <tt>rdbuf()-&gt;pubsync()</tt>
+and thereby the virtual function <tt>sync()</tt> (<tt>flush()</tt> is listed
+under "unformatted output functions").</p>
+<p>In addition, I guess that the sentence starting with "They may use other
+public members of <tt>basic_ostream</tt> ..." probably was intended to
+start with "They may use other public members of <tt>basic_streamuf</tt>..."
+although the problem with the virtual members exists in both cases.</p>
+<p>I see two obvious resolutions:</p>
+<ol>
+ <li>state in a footnote that this means that <tt>xsputn()</tt> will never be
+ called by any ostream member and that this is intended.</li>
+ <li>relax the restriction and allow calling <tt>overflow()</tt> and <tt>xsputn()</tt>.
+ Of course, the problem with <tt>flush()</tt> has to be resolved in some way.</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the last sentence of 27.6.2.1 (lib.ostream) paragraph 2 from:</p>
+<blockquote>
+ <p>They may use other public members of basic_ostream except that they do not
+ invoke any virtual members of rdbuf() except overflow().</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>They may use other public members of basic_ostream except that they shall
+ not invoke any virtual members of rdbuf() except overflow(), xsputn(), and
+ sync().</p>
+</blockquote>
+
+<p><i>[Kona: the LWG believes this is a problem. Wish to ask Jerry or
+PJP why the standard is written this way.]</i></p>
+
+
+<p><i>[Post-Tokyo: Dietmar supplied wording at the request of the
+LWG. He comments: The rules can be made a little bit more specific if
+necessary be explicitly spelling out what virtuals are allowed to be
+called from what functions and eg to state specifically that flush()
+is allowed to call sync() while other functions are not.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="167"></a>167. Improper use of <tt>traits_type::length()</tt></h3>
+<p><b>Section:</b> 27.6.2.6.4 [ostream.inserters.character] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.character">issues</a> in [ostream.inserters.character].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 4 states that the length is determined using
+<tt>traits::length(s)</tt>. Unfortunately, this function is not
+defined for example if the character type is <tt>wchar_t</tt> and the
+type of <tt>s</tt> is <tt>char const*</tt>. Similar problems exist if
+the character type is <tt>char</tt> and the type of <tt>s</tt> is
+either <tt>signed char const*</tt> or <tt>unsigned char
+const*</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 27.6.2.6.4 [ostream.inserters.character] paragraph 4 from:</p>
+<blockquote>
+ <p>Effects: Behaves like an formatted inserter (as described in
+ lib.ostream.formatted.reqmts) of out. After a sentry object is
+ constructed it inserts characters. The number of characters starting
+ at s to be inserted is traits::length(s). Padding is determined as
+ described in lib.facet.num.put.virtuals. The traits::length(s)
+ characters starting at s are widened using out.widen
+ (lib.basic.ios.members). The widened characters and any required
+ padding are inserted into out. Calls width(0).</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>Effects: Behaves like a formatted inserter (as described in
+ lib.ostream.formatted.reqmts) of out. After a sentry object is
+ constructed it inserts <i>n</i> characters starting at <i>s</i>,
+ where <i>n</i> is the number that would be computed as if by:</p>
+ <ul>
+ <li>traits::length(s) for the overload where the first argument is of
+ type basic_ostream&lt;charT, traits&gt;&amp; and the second is
+ of type const charT*, and also for the overload where the first
+ argument is of type basic_ostream&lt;char, traits&gt;&amp; and
+ the second is of type const char*.</li>
+ <li>std::char_traits&lt;char&gt;::length(s)
+ for the overload where the first argument is of type
+ basic_ostream&lt;charT, traits&gt;&amp; and the second is of type
+ const char*.</li>
+ <li>traits::length(reinterpret_cast&lt;const char*&gt;(s))
+ for the other two overloads.</li>
+ </ul>
+ <p>Padding is determined as described in
+ lib.facet.num.put.virtuals. The <i>n</i> characters starting at
+ <i>s</i> are widened using out.widen (lib.basic.ios.members). The
+ widened characters and any required padding are inserted into
+ out. Calls width(0).</p>
+</blockquote>
+
+<p><i>[Santa Cruz: Matt supplied new wording]</i></p>
+
+
+<p><i>[Kona: changed "where <i>n</i> is" to " where <i>n</i> is the
+ number that would be computed as if by"]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>We have five separate cases. In two of them we can use the
+user-supplied traits class without any fuss. In the other three we
+try to use something as close to that user-supplied class as possible.
+In two cases we've got a traits class that's appropriate for
+char and what we've got is a const signed char* or a const
+unsigned char*; that's close enough so we can just use a reinterpret
+cast, and continue to use the user-supplied traits class. Finally,
+there's one case where we just have to give up: where we've got a
+traits class for some arbitrary charT type, and we somehow have to
+deal with a const char*. There's nothing better to do but fall back
+to char_traits&lt;char&gt;</p>
+
+
+
+
+
+<hr>
+<h3><a name="168"></a>168. Typo: formatted vs. unformatted</h3>
+<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The first paragraph begins with a descriptions what has to be done
+in <i>formatted</i> output functions. Probably this is a typo and the
+paragraph really want to describe unformatted output functions...</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.2.7 [ostream.unformatted] paragraph 1, the first and last
+sentences, change the word "formatted" to
+"unformatted":</p>
+<blockquote>
+ <p>"Each <b>unformatted </b> output function begins ..."<br>
+ "... value specified for the <b>unformatted </b> output
+ function."</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="169"></a>169. Bad efficiency of <tt>overflow()</tt> mandated</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 8, Notes, of this section seems to mandate an extremely
+inefficient way of buffer handling for <tt>basic_stringbuf</tt>,
+especially in view of the restriction that <tt>basic_ostream</tt>
+member functions are not allowed to use <tt>xsputn()</tt> (see 27.6.2.1 [ostream]): For each character to be inserted, a new buffer
+is to be created.</p>
+<p>Of course, the resolution below requires some handling of
+simultaneous input and output since it is no longer possible to update
+<tt>egptr()</tt> whenever <tt>epptr()</tt> is changed. A possible
+solution is to handle this in <tt>underflow()</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.7.1.4 [stringbuf.virtuals] paragraph 8, Notes, insert the words
+"at least" as in the following:</p>
+<blockquote>
+ <p>To make a write position available, the function reallocates (or initially
+ allocates) an array object with a sufficient number of elements to hold the
+ current array object (if any), plus <b>at least</b> one additional write
+ position.</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="170"></a>170. Inconsistent definition of <tt>traits_type</tt></h3>
+<p><b>Section:</b> 27.7.4 [stringstream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The classes <tt>basic_stringstream</tt> (27.7.4 [stringstream]),
+<tt>basic_istringstream</tt> (27.7.2 [istringstream]), and
+<tt>basic_ostringstream</tt> (27.7.3 [ostringstream]) are inconsistent
+in their definition of the type <tt>traits_type</tt>: For
+<tt>istringstream</tt>, this type is defined, for the other two it is
+not. This should be consistent.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p><b>Proposed resolution:</b></p> <p>To the declarations of
+<tt>basic_ostringstream</tt> (27.7.3 [ostringstream]) and
+<tt>basic_stringstream</tt> (27.7.4 [stringstream]) add:</p>
+<blockquote>
+<pre>typedef traits traits_type;</pre>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="171"></a>171. Strange <tt>seekpos()</tt> semantics due to joint position</h3>
+<p><b>Section:</b> 27.8.1.5 [filebuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.virtuals">issues</a> in [filebuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Overridden virtual functions, seekpos()</p> <p>In 27.8.1.1 [filebuf] paragraph 3, it is stated that a joint input and
+output position is maintained by <tt>basic_filebuf</tt>. Still, the
+description of <tt>seekpos()</tt> seems to talk about different file
+positions. In particular, it is unclear (at least to me) what is
+supposed to happen to the output buffer (if there is one) if only the
+input position is changed. The standard seems to mandate that the
+output buffer is kept and processed as if there was no positioning of
+the output position (by changing the input position). Of course, this
+can be exactly what you want if the flag <tt>ios_base::ate</tt> is
+set. However, I think, the standard should say something like
+this:</p>
+<ul>
+ <li>If <tt>(which &amp; mode) == 0</tt> neither read nor write position is
+ changed and the call fails. Otherwise, the joint read and write position is
+ altered to correspond to <tt>sp</tt>.</li>
+ <li>If there is an output buffer, the output sequences is updated and any
+ unshift sequence is written before the position is altered.</li>
+ <li>If there is an input buffer, the input sequence is updated after the
+ position is altered.</li>
+</ul>
+<p>Plus the appropriate error handling, that is...</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the unnumbered paragraph in 27.8.1.4 (lib.filebuf.virtuals) before
+paragraph 14 from:</p>
+<blockquote>
+ <p>pos_type seekpos(pos_type sp, ios_base::openmode = ios_base::in |
+ ios_base::out);</p>
+ <p>Alters the file position, if possible, to correspond to the position stored
+ in sp (as described below).</p>
+ <p>- if (which&amp;ios_base::in)!=0, set the file position to sp, then update
+ the input sequence</p>
+ <p>- if (which&amp;ios_base::out)!=0, then update the output sequence, write
+ any unshift sequence, and set the file position to sp.</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>pos_type seekpos(pos_type sp, ios_base::openmode = ios_base::in |
+ ios_base::out);</p>
+ <p>Alters the file position, if possible, to correspond to the position stored
+ in sp (as described below). Altering the file position performs as follows:</p>
+ <p>1. if (om &amp; ios_base::out)!=0, then update the output sequence and
+ write any unshift sequence;</p>
+ <p>2. set the file position to sp;</p>
+ <p>3. if (om &amp; ios_base::in)!=0, then update the input sequence;</p>
+ <p>where om is the open mode passed to the last call to open(). The operation
+ fails if is_open() returns false.</p>
+</blockquote>
+
+<p><i>[Kona: Dietmar is working on a proposed resolution.]</i></p>
+
+<p><i>[Post-Tokyo: Dietmar supplied the above wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="172"></a>172. Inconsistent types for <tt>basic_istream::ignore()</tt></h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 1999-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 27.6.1.1 [istream] the function
+<tt>ignore()</tt> gets an object of type <tt>streamsize</tt> as first
+argument. However, in 27.6.1.3 [istream.unformatted]
+paragraph 23 the first argument is of type <tt>int.</tt></p>
+
+<p>As far as I can see this is not really a contradiction because
+everything is consistent if <tt>streamsize</tt> is typedef to be
+<tt>int</tt>. However, this is almost certainly not what was
+intended. The same thing happened to <tt>basic_filebuf::setbuf()</tt>,
+as described in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#173">173</a>.</p>
+
+<p>Darin Adler also
+submitted this issue, commenting: Either 27.6.1.1 should be modified
+to show a first parameter of type int, or 27.6.1.3 should be modified
+to show a first parameter of type streamsize and use
+numeric_limits&lt;streamsize&gt;::max.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.6.1.3 [istream.unformatted] paragraph 23 and 24, change both uses
+of <tt>int</tt> in the description of <tt>ignore()</tt> to
+<tt>streamsize</tt>.</p>
+
+
+
+
+<hr>
+<h3><a name="173"></a>173. Inconsistent types for <tt>basic_filebuf::setbuf()</tt></h3>
+<p><b>Section:</b> 27.8.1.5 [filebuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 1999-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.virtuals">issues</a> in [filebuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+In 27.8.1.1 [filebuf] the function <tt>setbuf()</tt> gets an
+object of type <tt>streamsize</tt> as second argument. However, in
+27.8.1.5 [filebuf.virtuals] paragraph 9 the second argument is of type
+<tt>int</tt>.
+</p>
+
+<p>
+As far as I can see this is not really a contradiction because
+everything is consistent if <tt>streamsize</tt> is typedef to be
+<tt>int</tt>. However, this is almost certainly not what was
+intended. The same thing happened to <tt>basic_istream::ignore()</tt>,
+as described in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#172">172</a>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.8.1.5 [filebuf.virtuals] paragraph 9, change all uses of
+<tt>int</tt> in the description of <tt>setbuf()</tt> to
+<tt>streamsize</tt>.</p>
+
+
+
+
+<hr>
+<h3><a name="174"></a>174. Typo: <tt>OFF_T</tt> vs. <tt>POS_T</tt></h3>
+<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>According to paragraph 1 of this section, <tt>streampos</tt> is the
+type <tt>OFF_T</tt>, the same type as <tt>streamoff</tt>. However, in
+paragraph 6 the <tt>streampos</tt> gets the type <tt>POS_T</tt></p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change D.6 [depr.ios.members] paragraph 1 from "<tt>typedef
+OFF_T streampos;</tt>" to "<tt>typedef POS_T
+streampos;</tt>"</p>
+
+
+
+
+<hr>
+<h3><a name="175"></a>175. Ambiguity for <tt>basic_streambuf::pubseekpos()</tt> and a few other functions.</h3>
+<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>According to paragraph 8 of this section, the methods
+<tt>basic_streambuf::pubseekpos()</tt>,
+<tt>basic_ifstream::open()</tt>, and <tt>basic_ofstream::open</tt>
+"may" be overloaded by a version of this function taking the
+type <tt>ios_base::open_mode</tt> as last argument argument instead of
+<tt>ios_base::openmode</tt> (<tt>ios_base::open_mode</tt> is defined
+in this section to be an alias for one of the integral types). The
+clause specifies, that the last argument has a default argument in
+three cases. However, this generates an ambiguity with the overloaded
+version because now the arguments are absolutely identical if the last
+argument is not specified.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In D.6 [depr.ios.members] paragraph 8, remove the default arguments for
+<tt>basic_streambuf::pubseekpos()</tt>,
+<tt>basic_ifstream::open()</tt>, and
+<tt>basic_ofstream::open().</tt></p>
+
+
+
+
+<hr>
+<h3><a name="176"></a>176. <tt>exceptions()</tt> in <tt>ios_base</tt>...?</h3>
+<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The "overload" for the function <tt>exceptions()</tt> in
+paragraph 8 gives the impression that there is another function of
+this function defined in class <tt>ios_base</tt>. However, this is not
+the case. Thus, it is hard to tell how the semantics (paragraph 9) can
+be implemented: "Call the corresponding member function specified
+in clause 27 [input.output]."</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In D.6 [depr.ios.members] paragraph 8, move the declaration of the
+function <tt>exceptions()</tt>into class <tt>basic_ios</tt>.</p>
+
+
+
+
+<hr>
+<h3><a name="179"></a>179. Comparison of const_iterators to iterators doesn't work</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-07-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Currently the following will not compile on two well-known standard
+library implementations:</p>
+
+<blockquote>
+ <pre>#include &lt;set&gt;
+using namespace std;
+
+void f(const set&lt;int&gt; &amp;s)
+{
+ set&lt;int&gt;::iterator i;
+ if (i==s.end()); // s.end() returns a const_iterator
+}</pre>
+</blockquote>
+
+<p>
+The reason this doesn't compile is because operator== was implemented
+as a member function of the nested classes set:iterator and
+set::const_iterator, and there is no conversion from const_iterator to
+iterator. Surprisingly, (s.end() == i) does work, though, because of
+the conversion from iterator to const_iterator.
+</p>
+
+<p>
+I don't see a requirement anywhere in the standard that this must
+work. Should there be one? If so, I think the requirement would need
+to be added to the tables in section 24.1.1. I'm not sure about the
+wording. If this requirement existed in the standard, I would think
+that implementors would have to make the comparison operators
+non-member functions.</p>
+
+<p>This issues was also raised on comp.std.c++ by Darin
+Adler.&nbsp; The example given was:</p>
+
+<blockquote>
+ <pre>bool check_equal(std::deque&lt;int&gt;::iterator i,
+std::deque&lt;int&gt;::const_iterator ci)
+{
+return i == ci;
+}</pre>
+</blockquote>
+
+<p>Comment from John Potter:</p>
+<blockquote>
+ <p>
+ In case nobody has noticed, accepting it will break reverse_iterator.
+ </p>
+
+ <p>
+ The fix is to make the comparison operators templated on two types.
+ </p>
+
+ <pre> template &lt;class Iterator1, class Iterator2&gt;
+ bool operator== (reverse_iterator&lt;Iterator1&gt; const&amp; x,
+ reverse_iterator&lt;Iterator2&gt; const&amp; y);
+ </pre>
+
+ <p>
+ Obviously: return x.base() == y.base();
+ </p>
+
+ <p>
+ Currently, no reverse_iterator to const_reverse_iterator compares are
+ valid.
+ </p>
+
+ <p>
+ BTW, I think the issue is in support of bad code. Compares should be
+ between two iterators of the same type. All std::algorithms require
+ the begin and end iterators to be of the same type.
+ </p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Insert this paragraph after 23.1 [container.requirements] paragraph 7:</p>
+<blockquote>
+ <p>In the expressions</p>
+ <pre> i == j
+ i != j
+ i &lt; j
+ i &lt;= j
+ i &gt;= j
+ i &gt; j
+ i - j
+ </pre>
+ <p>Where i and j denote objects of a container's iterator type,
+ either or both may be replaced by an object of the container's
+ const_iterator type referring to the same element with no
+ change in semantics.</p>
+</blockquote>
+
+<p><i>[post-Toronto: Judy supplied a proposed resolution saying that
+<tt>iterator</tt> and <tt>const_iterator</tt> could be freely mixed in
+iterator comparison and difference operations.]</i></p>
+
+
+<p><i>[Redmond: Dave and Howard supplied a new proposed resolution which
+explicitly listed expressions; there was concern that the previous
+proposed resolution was too informal.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+The LWG believes it is clear that the above wording applies only to
+the nested types <tt>X::iterator</tt> and <tt>X::const_iterator</tt>,
+where <tt>X</tt> is a container. There is no requirement that
+<tt>X::reverse_iterator</tt> and <tt>X::const_reverse_iterator</tt>
+can be mixed. If mixing them is considered important, that's a
+separate issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>.)
+</p>
+
+
+
+
+<hr>
+<h3><a name="181"></a>181. make_pair() unintended behavior</h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The claim has surfaced in Usenet that expressions such as<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>make_pair("abc", 3)</tt><br>
+<br>
+are illegal, notwithstanding their use in examples, because template instantiation tries to bind the first template
+parameter to <tt> const char (&amp;)[4]</tt>, which type is uncopyable.<br>
+<br>
+I doubt anyone intended that behavior...
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 20.2 [utility], paragraph 1 change the following
+declaration of make_pair():</p>
+<blockquote>
+ <pre>template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(const T1&amp;, const T2&amp;);</pre>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <pre>template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(T1, T2);</pre>
+</blockquote>
+<p> In 20.2.3 [pairs] paragraph 7 and the line before, change:</p>
+<blockquote>
+<pre>template &lt;class T1, class T2&gt;
+pair&lt;T1, T2&gt; make_pair(const T1&amp; x, const T2&amp; y);</pre>
+</blockquote>
+<p>to:</p>
+<blockquote>
+<pre>template &lt;class T1, class T2&gt;
+pair&lt;T1, T2&gt; make_pair(T1 x, T2 y);</pre>
+</blockquote>
+<p>and add the following footnote to the effects clause:</p>
+<blockquote>
+ <p> According to 12.8 [class.copy], an implementation is permitted
+ to not perform a copy of an argument, thus avoiding unnecessary
+ copies.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Two potential fixes were suggested by Matt Austern and Dietmar
+Kühl, respectively, 1) overloading with array arguments, and 2) use of
+a reference_traits class with a specialization for arrays. Andy
+Koenig suggested changing to pass by value. In discussion, it appeared
+that this was a much smaller change to the standard that the other two
+suggestions, and any efficiency concerns were more than offset by the
+advantages of the solution. Two implementors reported that the
+proposed resolution passed their test suites.</p>
+
+
+
+
+<hr>
+<h3><a name="182"></a>182. Ambiguous references to size_t</h3>
+<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Al Stevens <b>Date:</b> 1999-08-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Many references to <tt> size_t</tt> throughout the document
+omit the <tt> std::</tt> namespace qualification.</p> <p>For
+example, 17.4.3.4 [replacement.functions] paragraph 2:</p>
+<blockquote>
+<pre> operator new(size_t)
+ operator new(size_t, const std::nothrow_t&amp;)
+ operator new[](size_t)
+ operator new[](size_t, const std::nothrow_t&amp;)</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p> In 17.4.3.4 [replacement.functions] paragraph 2: replace:</p>
+<blockquote>
+<p><tt> - operator new(size_t)<br>
+ - operator new(size_t, const std::nothrow_t&amp;)<br>
+ - operator new[](size_t)<br>
+ - operator new[](size_t, const std::nothrow_t&amp;)</tt></p>
+</blockquote>
+<p> by:</p>
+<blockquote>
+<pre>- operator new(std::size_t)
+- operator new(std::size_t, const std::nothrow_t&amp;)
+- operator new[](std::size_t)
+- operator new[](std::size_t, const std::nothrow_t&amp;)</pre>
+</blockquote>
+<p>In [lib.allocator.requirements] 20.1.5, paragraph 4: replace:</p>
+<blockquote>
+ <p>The typedef members pointer, const_pointer, size_type, and difference_type
+ are required to be T*, T const*, size_t, and ptrdiff_t, respectively.</p>
+</blockquote>
+<p>&nbsp;by:</p>
+<blockquote>
+ <p>The typedef members pointer, const_pointer, size_type, and difference_type
+ are required to be T*, T const*, std::size_t, and std::ptrdiff_t,
+ respectively.</p>
+</blockquote>
+<p>In [lib.allocator.members] 20.4.1.1, paragraphs 3 and 6: replace:</p>
+<blockquote>
+ <p>3 Notes: Uses ::operator new(size_t) (18.4.1).</p>
+ <p>6 Note: the storage is obtained by calling ::operator new(size_t), but it
+ is unspecified when or how often this function is called. The use of hint is
+ unspecified, but intended as an aid to locality if an implementation so
+ desires.</p>
+</blockquote>
+<p>by:</p>
+<blockquote>
+ <p>3 Notes: Uses ::operator new(std::size_t) (18.4.1).</p>
+ <p>6 Note: the storage is obtained by calling ::operator new(std::size_t), but
+ it is unspecified when or how often this function is called. The use of hint
+ is unspecified, but intended as an aid to locality if an implementation so
+ desires.</p>
+</blockquote>
+<p>In [lib.char.traits.require] 21.1.1, paragraph 1: replace:</p>
+<blockquote>
+ <p>In Table 37, X denotes a Traits class defining types and functions for the
+ character container type CharT; c and d denote values of type CharT; p and q
+ denote values of type const CharT*; s denotes a value of type CharT*; n, i and
+ j denote values of type size_t; e and f denote values of type X::int_type; pos
+ denotes a value of type X::pos_type; and state denotes a value of type X::state_type.</p>
+</blockquote>
+<p>by:</p>
+<blockquote>
+ <p>In Table 37, X denotes a Traits class defining types and functions for the
+ character container type CharT; c and d denote values of type CharT; p and q
+ denote values of type const CharT*; s denotes a value of type CharT*; n, i and
+ j denote values of type std::size_t; e and f denote values of type X::int_type;
+ pos denotes a value of type X::pos_type; and state denotes a value of type X::state_type.</p>
+</blockquote>
+<p>In [lib.char.traits.require] 21.1.1, table 37: replace the return type of
+X::length(p): "size_t" by "std::size_t".</p>
+<p> In [lib.std.iterator.tags] 24.3.3, paragraph 2: replace:<br>
+&nbsp;&nbsp;&nbsp; typedef ptrdiff_t difference_type;<br>
+ by:<br>
+&nbsp;&nbsp;&nbsp; typedef std::ptrdiff_t difference_type;</p>
+<p> In [lib.locale.ctype] 22.2.1.1 put namespace std { ...} around the
+declaration of template &lt;class charT&gt; class ctype.<br>
+<br>
+ In [lib.iterator.traits] 24.3.1, paragraph 2 put namespace std { ...} around the declaration of:<br>
+<br>
+&nbsp;&nbsp;&nbsp; template&lt;class Iterator&gt; struct iterator_traits<br>
+&nbsp;&nbsp;&nbsp; template&lt;class T&gt; struct iterator_traits&lt;T*&gt;<br>
+&nbsp;&nbsp;&nbsp; template&lt;class T&gt; struct iterator_traits&lt;const T*&gt;</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes correcting names like <tt>size_t</tt> and
+<tt>ptrdiff_t</tt> to <tt>std::size_t</tt> and <tt>std::ptrdiff_t</tt>
+to be essentially editorial. There there can't be another size_t or
+ptrdiff_t meant anyway because, according to 17.4.3.1.4 [extern.types],</p>
+
+<blockquote><p>
+For each type T from the Standard C library, the types ::T and std::T
+are reserved to the implementation and, when defined, ::T shall be
+identical to std::T.
+</p></blockquote>
+
+<p>The issue is treated as a Defect Report to make explicit the Project
+Editor's authority to make this change.</p>
+
+<p><i>[Post-Tokyo: Nico Josuttis provided the above wording at the
+request of the LWG.]</i></p>
+
+
+<p><i>[Toronto: This is tangentially related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>, but only tangentially: the intent of this issue is to
+address use of the name <tt>size_t</tt> in contexts outside of
+namespace std, such as in the description of <tt>::operator new</tt>.
+The proposed changes should be reviewed to make sure they are
+correct.]</i></p>
+
+
+<p><i>[pre-Copenhagen: Nico has reviewed the changes and believes
+them to be correct.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="183"></a>183. I/O stream manipulators don't work for wide character streams</h3>
+<p><b>Section:</b> 27.6.3 [std.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-07-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#std.manip">issues</a> in [std.manip].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.6.3 [std.manip] paragraph 3 says (clause numbering added for
+exposition):</p>
+<blockquote>
+<p>Returns: An object s of unspecified type such that if [1] out is an (instance
+of) basic_ostream then the expression out&lt;&lt;s behaves as if f(s) were
+called, and if [2] in is an (instance of) basic_istream then the expression
+in&gt;&gt;s behaves as if f(s) were called. Where f can be defined as: ios_base&amp;
+f(ios_base&amp; str, ios_base::fmtflags mask) { // reset specified flags
+str.setf(ios_base::fmtflags(0), mask); return str; } [3] The expression
+out&lt;&lt;s has type ostream&amp; and value out. [4] The expression in&gt;&gt;s
+has type istream&amp; and value in.</p>
+</blockquote>
+<p>Given the definitions [1] and [2] for out and in, surely [3] should read:
+"The expression out &lt;&lt; s has type basic_ostream&amp; ..." and
+[4] should read: "The expression in &gt;&gt; s has type basic_istream&amp;
+..."</p>
+<p>If the wording in the standard is correct, I can see no way of implementing
+any of the manipulators so that they will work with wide character streams.</p>
+<p>e.g. wcout &lt;&lt; setbase( 16 );</p>
+<p>Must have value 'wcout' (which makes sense) and type 'ostream&amp;' (which
+doesn't).</p>
+<p>The same "cut'n'paste" type also seems to occur in Paras 4,5,7 and
+8. In addition, Para 6 [setfill] has a similar error, but relates only to
+ostreams.</p>
+<p>I'd be happier if there was a better way of saying this, to make it clear
+that the value of the expression is "the same specialization of
+basic_ostream as out"&amp;</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace section 27.6.3 [std.manip] except paragraph 1 with the
+following:</p>
+<blockquote>
+<p>2- The type designated smanip in each of the following function
+descriptions is implementation-specified and may be different for each
+function.<br>
+<br>
+<tt>smanip resetiosflags(ios_base::fmtflags mask);</tt><br>
+<br>
+-3- Returns: An object s of unspecified type such that if out is an
+instance of basic_ostream&lt;charT,traits&gt; then the expression
+out&lt;&lt;s behaves
+as if f(s, mask) were called, or if in is an instance of
+basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
+behaves as if
+f(s, mask) were called. The function f can be defined as:*<br>
+<br>
+[Footnote: The expression cin &gt;&gt; resetiosflags(ios_base::skipws)
+clears ios_base::skipws in the format flags stored in the
+basic_istream&lt;charT,traits&gt; object cin (the same as cin &gt;&gt;
+noskipws), and the expression cout &lt;&lt;
+resetiosflags(ios_base::showbase) clears
+ios_base::showbase in the format flags stored in the
+basic_ostream&lt;charT,traits&gt; object cout (the same as cout
+&lt;&lt;
+noshowbase). --- end footnote]<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, ios_base::fmtflags mask)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // reset specified flags<br>
+&nbsp;&nbsp; str.setf(ios_base::fmtflags(0), mask);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
+The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
+<br>
+&nbsp;<tt>smanip setiosflags(ios_base::fmtflags mask);</tt><br>
+<br>
+-4- Returns: An object s of unspecified type such that if out is an
+instance of basic_ostream&lt;charT,traits&gt; then the expression
+out&lt;&lt;s behaves
+as if f(s, mask) were called, or if in is an instance of
+basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
+behaves as if f(s,
+mask) were called. The function f can be defined as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, ios_base::fmtflags mask)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // set specified flags<br>
+&nbsp;&nbsp; str.setf(mask);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
+The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
+<br>
+<tt>smanip setbase(int base);</tt><br>
+<br>
+-5- Returns: An object s of unspecified type such that if out is an
+instance of basic_ostream&lt;charT,traits&gt; then the expression
+out&lt;&lt;s behaves
+as if f(s, base) were called, or if in is an instance of
+basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
+behaves as if f(s,
+base) were called. The function f can be defined as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int base)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // set basefield<br>
+&nbsp;&nbsp; str.setf(base == 8 ? ios_base::oct :<br>
+&nbsp;&nbsp; base == 10 ? ios_base::dec :<br>
+&nbsp;&nbsp; base == 16 ? ios_base::hex :<br>
+&nbsp;&nbsp; ios_base::fmtflags(0), ios_base::basefield);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
+The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
+<br>
+<tt>smanip setfill(char_type c);<br>
+</tt><br>
+-6- Returns: An object s of unspecified type such that if out is (or is
+derived from) basic_ostream&lt;charT,traits&gt; and c has type charT
+then the
+expression out&lt;&lt;s behaves as if f(s, c) were called. The function
+f can be
+defined as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>template&lt;class charT, class traits&gt;<br>
+&nbsp;&nbsp; basic_ios&lt;charT,traits&gt;&amp; f(basic_ios&lt;charT,traits&gt;&amp; str, charT c)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // set fill character<br>
+&nbsp;&nbsp; str.fill(c);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.<br>
+<br>
+<tt>smanip setprecision(int n);</tt><br>
+<br>
+-7- Returns: An object s of unspecified type such that if out is an
+instance of basic_ostream&lt;charT,traits&gt; then the expression
+out&lt;&lt;s behaves
+as if f(s, n) were called, or if in is an instance of
+basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
+behaves as if f(s, n)
+were called. The function f can be defined as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int n)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // set precision<br>
+&nbsp;&nbsp; str.precision(n);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
+The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in<br>
+.<br>
+<tt>smanip setw(int n);<br>
+</tt><br>
+-8- Returns: An object s of unspecified type such that if out is an
+instance of basic_ostream&lt;charT,traits&gt; then the expression
+out&lt;&lt;s behaves
+as if f(s, n) were called, or if in is an instance of
+basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
+behaves as if f(s, n)
+were called. The function f can be defined as:<br>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int n)<br>
+&nbsp;&nbsp; {<br>
+&nbsp;&nbsp; // set width<br>
+&nbsp;&nbsp; str.width(n);<br>
+&nbsp;&nbsp; return str;<br>
+&nbsp;&nbsp; }<br>
+</tt><br>
+The expression out&lt;&lt;s has type
+basic_ostream&lt;charT,traits&gt;&amp; and value out. The expression
+in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value
+in.
+</p>
+</blockquote>
+
+<p><i>[Kona: Andy Sawyer and Beman Dawes will work to improve the wording of
+the proposed resolution.]</i></p>
+
+
+<p><i>[Tokyo - The LWG noted that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> involves
+the same paragraphs.]</i></p>
+
+
+<p><i>[Post-Tokyo: The issues list maintainer combined the proposed
+resolution of this issue with the proposed resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> as they both involved the same paragraphs, and were so
+intertwined that dealing with them separately appear fraught with
+error. The full text was supplied by Bill Plauger; it was cross
+checked against changes supplied by Andy Sawyer. It should be further
+checked by the LWG.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="184"></a>184. numeric_limits&lt;bool&gt; wording problems</h3>
+<p><b>Section:</b> 18.2.1.5 [numeric.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-07-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.special">issues</a> in [numeric.special].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>bools are defined by the standard to be of integer types, as per
+3.9.1 [basic.fundamental] paragraph 7. However "integer types"
+seems to have a special meaning for the author of 18.2. The net effect
+is an unclear and confusing specification for
+numeric_limits&lt;bool&gt; as evidenced below.</p>
+
+<p>18.2.1.2/7 says numeric_limits&lt;&gt;::digits is, for built-in integer
+types, the number of non-sign bits in the representation.</p>
+
+<p>4.5/4 states that a bool promotes to int ; whereas 4.12/1 says any non zero
+arithmetical value converts to true.</p>
+
+<p>I don't think it makes sense at all to require
+numeric_limits&lt;bool&gt;::digits and numeric_limits&lt;bool&gt;::digits10 to
+be meaningful.</p>
+
+<p>The standard defines what constitutes a signed (resp. unsigned) integer
+types. It doesn't categorize bool as being signed or unsigned. And the set of
+values of bool type has only two elements.</p>
+
+<p>I don't think it makes sense to require numeric_limits&lt;bool&gt;::is_signed
+to be meaningful.</p>
+
+<p>18.2.1.2/18 for numeric_limits&lt;integer_type&gt;::radix&nbsp; says:</p>
+<blockquote>
+ <p>For integer types, specifies the base of the representation.186)</p>
+</blockquote>
+
+<p>This disposition is at best misleading and confusing for the standard
+requires a "pure binary numeration system" for integer types as per
+3.9.1/7</p>
+
+<p>The footnote 186) says: "Distinguishes types with base other than 2 (e.g
+BCD)."&nbsp; This also erroneous as the standard never defines any integer
+types with base representation other than 2.</p>
+
+<p>Furthermore, numeric_limits&lt;bool&gt;::is_modulo and
+numeric_limits&lt;bool&gt;::is_signed have similar problems.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Append to the end of 18.2.1.5 [numeric.special]:</p>
+<blockquote>
+ <p>The specialization for bool shall be provided as follows:</p>
+ <pre> namespace std {
+ template&lt;&gt; class numeric_limits&lt;bool&gt; {
+ public:
+ static const bool is_specialized = true;
+ static bool min() throw() { return false; }
+ static bool max() throw() { return true; }
+
+ static const int digits = 1;
+ static const int digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static bool epsilon() throw() { return 0; }
+ static bool round_error() throw() { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static bool infinity() throw() { return 0; }
+ static bool quiet_NaN() throw() { return 0; }
+ static bool signaling_NaN() throw() { return 0; }
+ static bool denorm_min() throw() { return 0; }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+ }</pre>
+</blockquote>
+
+<p><i>[Tokyo:&nbsp; The LWG desires wording that specifies exact values
+rather than more general wording in the original proposed
+resolution.]</i></p>
+
+
+<p><i>[Post-Tokyo:&nbsp; At the request of the LWG in Tokyo, Nico
+Josuttis provided the above wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="185"></a>185. Questionable use of term "inline"</h3>
+<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> UK Panel <b>Date:</b> 1999-07-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 4 of 20.5 [function.objects] says:</p>
+<blockquote>
+ <p>&nbsp;[Example: To negate every element of a: transform(a.begin(), a.end(),
+ a.begin(), negate&lt;double&gt;()); The corresponding functions will inline
+ the addition and the negation. end example]</p>
+</blockquote>
+<p>(Note: The "addition" referred to in the above is in para 3) we can
+find no other wording, except this (non-normative) example which suggests that
+any "inlining" will take place in this case.</p>
+<p>Indeed both:</p>
+<blockquote>
+ <p>17.4.4.3 Global Functions [lib.global.functions] 1 It is
+ unspecified whether any global functions in the C++ Standard Library
+ are defined as inline (7.1.2).</p>
+</blockquote>
+<p>and</p>
+<blockquote>
+ <p>17.4.4.4 Member Functions [lib.member.functions] 1 It is
+ unspecified whether any member functions in the C++ Standard Library
+ are defined as inline (7.1.2).</p>
+</blockquote>
+<p>take care to state that this may indeed NOT be the case.</p>
+<p>Thus the example "mandates" behavior that is explicitly
+not required elsewhere.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 20.5 [function.objects] paragraph 1, remove the sentence:</p>
+<blockquote>
+<p>They are important for the effective use of the library.</p>
+</blockquote>
+<p>Remove 20.5 [function.objects] paragraph 2, which reads:</p>
+<blockquote>
+ <p> Using function objects together with function templates
+ increases the expressive power of the library as well as making the
+ resulting code much more efficient.</p>
+</blockquote>
+<p>In 20.5 [function.objects] paragraph 4, remove the sentence:</p>
+<blockquote>
+ <p>The corresponding functions will inline the addition and the
+ negation.</p>
+</blockquote>
+
+<p><i>[Kona: The LWG agreed there was a defect.]</i></p>
+
+<p><i>[Tokyo: The LWG crafted the proposed resolution.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="186"></a>186. bitset::set() second parameter should be bool</h3>
+<p><b>Section:</b> 23.3.5.2 [bitset.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Darin Adler <b>Date:</b> 1999-08-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.members">issues</a> in [bitset.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In section 23.3.5.2 [bitset.members], paragraph 13 defines the
+bitset::set operation to take a second parameter of type int. The
+function tests whether this value is non-zero to determine whether to
+set the bit to true or false. The type of this second parameter should
+be bool. For one thing, the intent is to specify a Boolean value. For
+another, the result type from test() is bool. In addition, it's
+possible to slice an integer that's larger than an int. This can't
+happen with bool, since conversion to bool has the semantic of
+translating 0 to false and any non-zero value to true.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.3.5 [template.bitset] Para 1 Replace:</p>
+<blockquote>
+<pre>bitset&lt;N&gt;&amp; set(size_t pos, int val = true ); </pre>
+</blockquote>
+<p>With:</p>
+<blockquote>
+ <pre>bitset&lt;N&gt;&amp; set(size_t pos, bool val = true );</pre>
+</blockquote>
+<p>In 23.3.5.2 [bitset.members] Para 12(.5) Replace:</p>
+<blockquote>
+ <pre>bitset&lt;N&gt;&amp; set(size_t pos, int val = 1 );</pre>
+</blockquote>
+<p>With:</p>
+<blockquote>
+ <pre>bitset&lt;N&gt;&amp; set(size_t pos, bool val = true );</pre>
+</blockquote>
+
+<p><i>[Kona: The LWG agrees with the description.&nbsp; Andy Sawyer will work
+on better P/R wording.]</i></p>
+
+<p><i>[Post-Tokyo: Andy provided the above wording.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p><tt>bool</tt> is a better choice. It is believed that binary
+compatibility is not an issue, because this member function is
+usually implemented as <tt>inline</tt>, and because it is already
+the case that users cannot rely on the type of a pointer to a
+nonvirtual member of a standard library class.</p>
+
+
+
+
+
+<hr>
+<h3><a name="187"></a>187. iter_swap underspecified</h3>
+<p><b>Section:</b> 25.2.3 [alg.swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.swap">issues</a> in [alg.swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description of iter_swap in 25.2.2 paragraph 7,says that it
+``exchanges the values'' of the objects to which two iterators
+refer.<br> <br> What it doesn't say is whether it does so using swap
+or using the assignment operator and copy constructor.<br> <br> This
+question is an important one to answer, because swap is specialized to
+work efficiently for standard containers.<br> For example:</p>
+<blockquote>
+<pre>vector&lt;int&gt; v1, v2;
+iter_swap(&amp;v1, &amp;v2);</pre>
+</blockquote>
+<p>Is this call to iter_swap equivalent to calling swap(v1, v2)?&nbsp;
+Or is it equivalent to</p>
+<blockquote>
+<pre>{
+vector&lt;int&gt; temp = v1;
+v1 = v2;
+v2 = temp;
+}</pre>
+</blockquote>
+<p>The first alternative is O(1); the second is O(n).</p>
+<p>A LWG member, Dave Abrahams, comments:</p>
+<blockquote>
+<p>Not an objection necessarily, but I want to point out the cost of
+that requirement:</p>
+ <blockquote>
+<p><tt>iter_swap(list&lt;T&gt;::iterator, list&lt;T&gt;::iterator)</tt></p>
+ </blockquote>
+<p>can currently be specialized to be more efficient than
+iter_swap(T*,T*) for many T (by using splicing). Your proposal would
+make that optimization illegal.&nbsp;</p>
+</blockquote>
+
+<p><i>[Kona: The LWG notes the original need for iter_swap was proxy iterators
+which are no longer permitted.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the effect clause of iter_swap in 25.2.2 paragraph 7 from:</p>
+<blockquote>
+<p>Exchanges the values pointed to by the two iterators a and b.</p>
+</blockquote>
+<p>to</p>
+<blockquote>
+<p><tt>swap(*a, *b)</tt>.</p>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>It's useful to say just what <tt>iter_swap</tt> does. There may be
+ some iterators for which we want to specialize <tt>iter_swap</tt>,
+ but the fully general version should have a general specification.</p>
+
+<p>Note that in the specific case of <tt>list&lt;T&gt;::iterator</tt>,
+iter_swap should not be specialized as suggested above. That would do
+much more than exchanging the two iterators' values: it would change
+predecessor/successor relationships, possibly moving the iterator from
+one list to another. That would surely be inappropriate.</p>
+
+
+
+
+
+<hr>
+<h3><a name="189"></a>189. setprecision() not specified correctly</h3>
+<p><b>Section:</b> 27.4.2.2 [fmtflags.state] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fmtflags.state">issues</a> in [fmtflags.state].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.4.2.2 paragraph 9 claims that setprecision() sets the precision,
+and includes a parenthetical note saying that it is the number of
+digits after the decimal point.<br>
+<br>
+This claim is not strictly correct. For example, in the default
+floating-point output format, setprecision sets the number of
+significant digits printed, not the number of digits after the decimal
+point.<br>
+<br>
+I would like the committee to look at the definition carefully and
+correct the statement in 27.4.2.2</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove from 27.4.2.2 [fmtflags.state], paragraph 9, the text
+"(number of digits after the decimal point)".</p>
+
+
+
+
+<hr>
+<h3><a name="193"></a>193. Heap operations description incorrect</h3>
+<p><b>Section:</b> 25.3.6 [alg.heap.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Markus Mauhart <b>Date:</b> 1999-09-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a></p>
+<p><b>Discussion:</b></p>
+<p>25.3.6 [lib.alg.heap.operations] states two key properties of a heap [a,b), the first of them
+is<br>
+<br>
+&nbsp;&nbsp;&nbsp; `"(1) *a is the largest element"<br>
+<br>
+I think this is incorrect and should be changed to the wording in the proposed
+resolution.</p>
+<p>Actually there are two independent changes:</p>
+<blockquote>
+ <p>A-"part of largest equivalence class" instead of "largest", cause 25.3
+ [lib.alg.sorting] asserts "strict weak ordering" for all its sub clauses.</p>
+ <p>B-Take
+'an oldest' from that equivalence class, otherwise the heap functions
+could not be used for a priority queue as explained in 23.2.3.2.2
+[lib.priqueue.members] (where I assume that a "priority queue" respects
+priority AND time).</p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.3.6 [alg.heap.operations] property (1) from:</p>
+<blockquote>
+ <p>(1) *a is the largest element</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>(1) There is no element greater than <tt>*a</tt></p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="195"></a>195. Should <tt>basic_istream::sentry</tt>'s constructor ever set eofbit?</h3>
+<p><b>Section:</b> 27.6.1.1.3 [istream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-10-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::sentry">issues</a> in [istream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Suppose that <tt>is.flags() &amp; ios_base::skipws</tt> is nonzero.
+What should <tt>basic_istream&lt;&gt;::sentry</tt>'s constructor do if it
+reaches eof while skipping whitespace? 27.6.1.1.2/5 suggests it
+should set failbit. Should it set eofbit as well? The standard
+doesn't seem to answer that question.</p>
+
+<p>On the one hand, nothing in 27.6.1.1.3 [istream::sentry] says that
+<tt>basic_istream&lt;&gt;::sentry</tt> should ever set eofbit. On the
+other hand, 27.6.1.1 [istream] paragraph 4 says that if
+extraction from a <tt>streambuf</tt> "returns
+<tt>traits::eof()</tt>, then the input function, except as explicitly
+noted otherwise, completes its actions and does
+<tt>setstate(eofbit)"</tt>. So the question comes down to
+whether <tt>basic_istream&lt;&gt;::sentry</tt>'s constructor is an
+input function.</p>
+
+<p>Comments from Jerry Schwarz:</p>
+<blockquote>
+<p>It was always my intention that eofbit should be set any time that a
+virtual returned something to indicate eof, no matter what reason
+iostream code had for calling the virtual.</p>
+<p>
+The motivation for this is that I did not want to require streambufs
+to behave consistently if their virtuals are called after they have
+signaled eof.</p>
+<p>
+The classic case is a streambuf reading from a UNIX file. EOF isn't
+really a state for UNIX file descriptors. The convention is that a
+read on UNIX returns 0 bytes to indicate "EOF", but the file
+descriptor isn't shut down in any way and future reads do not
+necessarily also return 0 bytes. In particular, you can read from
+tty's on UNIX even after they have signaled "EOF". (It
+isn't always understood that a ^D on UNIX is not an EOF indicator, but
+an EOL indicator. By typing a "line" consisting solely of
+^D you cause a read to return 0 bytes, and by convention this is
+interpreted as end of file.)</p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a sentence to the end of 27.6.1.1.2 paragraph 2:</p>
+<blockquote>
+<p>If <tt>is.rdbuf()-&gt;sbumpc()</tt> or <tt>is.rdbuf()-&gt;sgetc()</tt>
+returns <tt>traits::eof()</tt>, the function calls
+<tt>setstate(failbit | eofbit)</tt> (which may throw
+<tt>ios_base::failure</tt>).
+</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="198"></a>198. Validity of pointers and references unspecified after iterator destruction</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 1999-11-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Is a pointer or reference obtained from an iterator still valid after
+destruction of the iterator?
+</p>
+<p>
+Is a pointer or reference obtained from an iterator still valid after the value
+of the iterator changes?
+</p>
+<blockquote>
+<pre>#include &lt;iostream&gt;
+#include &lt;vector&gt;
+#include &lt;iterator&gt;
+
+int main()
+{
+ typedef std::vector&lt;int&gt; vec_t;
+ vec_t v;
+ v.push_back( 1 );
+
+ // Is a pointer or reference obtained from an iterator still
+ // valid after destruction of the iterator?
+ int * p = &amp;*v.begin();
+ std::cout &lt;&lt; *p &lt;&lt; '\n'; // OK?
+
+ // Is a pointer or reference obtained from an iterator still
+ // valid after the value of the iterator changes?
+ vec_t::iterator iter( v.begin() );
+ p = &amp;*iter++;
+ std::cout &lt;&lt; *p &lt;&lt; '\n'; // OK?
+
+ return 0;
+}
+</pre>
+</blockquote>
+
+<p>The standard doesn't appear to directly address these
+questions. The standard needs to be clarified. At least two real-world
+cases have been reported where library implementors wasted
+considerable effort because of the lack of clarity in the
+standard. The question is important because requiring pointers and
+references to remain valid has the effect for practical purposes of
+prohibiting iterators from pointing to cached rather than actual
+elements of containers.</p>
+
+<p>The standard itself assumes that pointers and references obtained
+from an iterator are still valid after iterator destruction or
+change. The definition of reverse_iterator::operator*(), 24.4.1.3.3 [reverse.iter.conv], which returns a reference, defines
+effects:</p>
+
+<blockquote>
+ <pre>Iterator tmp = current;
+return *--tmp;</pre>
+</blockquote>
+<p>The definition of reverse_iterator::operator-&gt;(), 24.4.1.3.4
+[reverse.iter.op.star], which returns a pointer, defines effects:</p>
+<blockquote>
+ <pre>return &amp;(operator*());</pre>
+</blockquote>
+
+<p>Because the standard itself assumes pointers and references remain
+valid after iterator destruction or change, the standard should say so
+explicitly. This will also reduce the chance of user code breaking
+unexpectedly when porting to a different standard library
+implementation.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a new paragraph to 24.1 [iterator.requirements]:</p>
+<blockquote><p>
+Destruction of an iterator may invalidate pointers and references
+previously obtained from that iterator.
+</p></blockquote>
+
+<p>Replace paragraph 1 of 24.4.1.3.3 [reverse.iter.conv] with:</p>
+
+<blockquote>
+<p><b>Effects:</b></p>
+<pre> this-&gt;tmp = current;
+ --this-&gt;tmp;
+ return *this-&gt;tmp;
+</pre>
+
+<p>
+[<i>Note:</i> This operation must use an auxiliary member variable,
+rather than a temporary variable, to avoid returning a reference that
+persists beyond the lifetime of its associated iterator. (See
+24.1 [iterator.requirements].) The name of this member variable is shown for
+exposition only. <i>--end note</i>]
+</p>
+</blockquote>
+
+<p><i>[Post-Tokyo: The issue has been reformulated purely
+in terms of iterators.]</i></p>
+
+
+<p><i>[Pre-Toronto: Steve Cleary pointed out the no-invalidation
+assumption by reverse_iterator. The issue and proposed resolution was
+reformulated yet again to reflect this reality.]</i></p>
+
+
+<p><i>[Copenhagen: Steve Cleary pointed out that reverse_iterator
+assumes its underlying iterator has persistent pointers and
+references. Andy Koenig pointed out that it is possible to rewrite
+reverse_iterator so that it no longer makes such an assupmption.
+However, this issue is related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a>. If we
+decide it is intentional that <tt>p[n]</tt> may return by value
+instead of reference when <tt>p</tt> is a Random Access Iterator,
+other changes in reverse_iterator will be necessary.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This issue has been discussed extensively. Note that it is
+<i>not</i> an issue about the behavior of predefined iterators. It is
+asking whether or not user-defined iterators are permitted to have
+transient pointers and references. Several people presented examples
+of useful user-defined iterators that have such a property; examples
+include a B-tree iterator, and an "iota iterator" that doesn't point
+to memory. Library implementors already seem to be able to cope with
+such iterators: they take pains to avoid forming references to memory
+that gets iterated past. The only place where this is a problem is
+<tt>reverse_iterator</tt>, so this issue changes
+<tt>reverse_iterator</tt> to make it work.</p>
+
+<p>This resolution does not weaken any guarantees provided by
+predefined iterators like <tt>list&lt;int&gt;::iterator</tt>.
+Clause 23 should be reviewed to make sure that guarantees for
+predefined iterators are as strong as users expect.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="199"></a>199. What does <tt>allocate(0)</tt> return?</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-11-19</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Suppose that <tt>A</tt> is a class that conforms to the
+Allocator requirements of Table 32, and <tt>a</tt> is an
+object of class <tt>A</tt> What should be the return
+value of <tt>a.allocate(0)</tt>? Three reasonable
+possibilities: forbid the argument <tt>0</tt>, return
+a null pointer, or require that the return value be a
+unique non-null pointer.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a note to the <tt>allocate</tt> row of Table 32:
+"[<i>Note:</i> If <tt>n == 0</tt>, the return value is unspecified. <i>--end note</i>]"</p>
+
+
+<p><b>Rationale:</b></p>
+<p>A key to understanding this issue is that the ultimate use of
+allocate() is to construct an iterator, and that iterator for zero
+length sequences must be the container's past-the-end
+representation. Since this already implies special case code, it
+would be over-specification to mandate the return value.
+</p>
+
+
+
+
+<hr>
+<h3><a name="200"></a>200. Forward iterator requirements don't allow constant iterators</h3>
+<p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-11-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In table 74, the return type of the expression <tt>*a</tt> is given
+as <tt>T&amp;</tt>, where <tt>T</tt> is the iterator's value type.
+For constant iterators, however, this is wrong. ("Value type"
+is never defined very precisely, but it is clear that the value type
+of, say, <tt>std::list&lt;int&gt;::const_iterator</tt> is supposed to be
+<tt>int</tt>, not <tt>const int</tt>.)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In table 74, in the <tt>*a</tt> and <tt>*r++</tt> rows, change the
+return type from "<tt>T&amp;</tt>" to "<tt>T&amp;</tt>
+if <tt>X</tt> is mutable, otherwise <tt>const T&amp;</tt>".
+In the <tt>a-&gt;m</tt> row, change the return type from
+"<tt>U&amp;</tt>" to "<tt>U&amp;</tt> if <tt>X</tt> is mutable,
+otherwise <tt>const U&amp;</tt>".
+</p>
+
+<p><i>[Tokyo: The LWG believes this is the tip of a larger iceberg;
+there are multiple const problems with the STL portion of the library
+and that these should be addressed as a single package.&nbsp; Note
+that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a> has already been declared NAD Future for
+that very reason.]</i></p>
+
+
+<p><i>[Redmond: the LWG thinks this is separable from other constness
+issues. This issue is just cleanup; it clarifies language that was
+written before we had iterator_traits. Proposed resolution was
+modified: the original version only discussed *a. It was pointed out
+that we also need to worry about *r++ and a-&gt;m.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="201"></a>201. Numeric limits terminology wrong</h3>
+<p><b>Section:</b> 18.2.1 [limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Stephen Cleary <b>Date:</b> 1999-12-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#limits">issues</a> in [limits].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In some places in this section, the terms "fundamental types" and
+"scalar types" are used when the term "arithmetic types" is intended.
+The current usage is incorrect because void is a fundamental type and
+pointers are scalar types, neither of which should have
+specializations of numeric_limits.
+</p>
+<p><i>[Lillehammer: it remains true that numeric_limits is using
+ imprecise language. However, none of the proposals for changed
+ wording are clearer. A redesign of numeric_limits is needed, but this
+ is more a task than an open issue.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 18.2 [support.limits] to:
+</p>
+
+<blockquote>
+<p>
+-1- The headers <tt>&lt;limits&gt;</tt>, <tt>&lt;climits&gt;</tt>,
+<tt>&lt;cfloat&gt;</tt>, and <tt>&lt;cinttypes&gt;</tt> supply
+characteristics of implementation-dependent <del>fundamental</del>
+<ins>arithmetic</ins> types (3.9.1).
+</p>
+</blockquote>
+
+<p>
+Change 18.2.1 [limits] to:
+</p>
+
+<blockquote>
+<p>
+-1- The <tt>numeric_limits</tt> component provides a C++ program with
+information about various properties of the implementation's
+representation of the <del>fundamental</del> <ins>arithmetic</ins>
+types.
+</p>
+<p>
+-2- Specializations shall be provided for each <del>fundamental</del>
+<ins>arithmetic</ins> type, both floating point and integer, including
+<tt>bool</tt>. The member <tt>is_specialized</tt> shall be <tt>true</tt>
+for all such specializations of <tt>numeric_limits</tt>.
+</p>
+<p>
+-4- Non-<del>fundamental</del><ins>arithmetic</ins> standard types, such
+as <tt>complex&lt;T&gt;</tt> (26.3.2), shall not have specializations.
+</p>
+</blockquote>
+
+<p>
+Change 18.2.1.1 [numeric.limits] to:
+</p>
+
+<blockquote>
+<p>
+<del>-1- The member <tt>is_specialized</tt> makes it possible to distinguish
+between fundamental types, which have specializations, and non-scalar types,
+which do not.</del>
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="202"></a>202. unique() effects unclear when predicate not an equivalence relation</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-01-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+What should unique() do if you give it a predicate that is not an
+equivalence relation? There are at least two plausible answers:
+</p>
+
+<blockquote>
+
+<p>
+ 1. You can't, because 25.2.8 says that it it "eliminates all but
+ the first element from every consecutive group of equal
+ elements..." and it wouldn't make sense to interpret "equal" as
+ meaning anything but an equivalence relation. [It also doesn't
+ make sense to interpret "equal" as meaning ==, because then there
+ would never be any sense in giving a predicate as an argument at
+ all.]
+</p>
+
+<p>
+ 2. The word "equal" should be interpreted to mean whatever the
+ predicate says, even if it is not an equivalence relation
+ (and in particular, even if it is not transitive).
+</p>
+
+</blockquote>
+
+<p>
+The example that raised this question is from Usenet:
+</p>
+
+<blockquote>
+
+<pre>int f[] = { 1, 3, 7, 1, 2 };
+int* z = unique(f, f+5, greater&lt;int&gt;());</pre>
+
+</blockquote>
+
+<p>
+If one blindly applies the definition using the predicate
+greater&lt;int&gt;, and ignore the word "equal", you get:
+</p>
+
+<blockquote>
+
+<p>
+ Eliminates all but the first element from every consecutive group
+ of elements referred to by the iterator i in the range [first, last)
+ for which *i &gt; *(i - 1).
+</p>
+
+</blockquote>
+
+<p>
+The first surprise is the order of the comparison. If we wanted to
+allow for the predicate not being an equivalence relation, then we
+should surely compare elements the other way: pred(*(i - 1), *i). If
+we do that, then the description would seem to say: "Break the
+sequence into subsequences whose elements are in strictly increasing
+order, and keep only the first element of each subsequence". So the
+result would be 1, 1, 2. If we take the description at its word, it
+would seem to call for strictly DEcreasing order, in which case the
+result should be 1, 3, 7, 2.<br>
+<br>
+In fact, the SGI implementation of unique() does neither: It yields 1,
+3, 7.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.2.9 [alg.unique] paragraph 1 to:</p>
+<blockquote><p>
+For a nonempty range, eliminates all but the first element from every
+consecutive group of equivalent elements referred to by the iterator
+<tt>i</tt> in the range [first+1, last) for which the following
+conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) !=
+false</tt>.
+</p></blockquote>
+
+<p>
+Also insert a new paragraph, paragraph 2a, that reads: "Requires: The
+comparison function must be an equivalence relation."
+</p>
+
+<p><i>[Redmond: discussed arguments for and against requiring the
+comparison function to be an equivalence relation. Straw poll:
+14-2-5. First number is to require that it be an equivalence
+relation, second number is to explicitly not require that it be an
+equivalence relation, third number is people who believe they need
+more time to consider the issue. A separate issue: Andy Sawyer
+pointed out that "i-1" is incorrect, since "i" can refer to the first
+iterator in the range. Matt provided wording to address this
+problem.]</i></p>
+
+
+<p><i>[Curaçao: The LWG changed "... the range (first,
+last)..." to "... the range [first+1, last)..." for
+clarity. They considered this change close enough to editorial to not
+require another round of review.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG also considered an alternative resolution: change
+25.2.9 [alg.unique] paragraph 1 to:</p>
+
+<blockquote><p>
+For a nonempty range, eliminates all but the first element from every
+consecutive group of elements referred to by the iterator
+<tt>i</tt> in the range (first, last) for which the following
+conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) !=
+false</tt>.
+</p></blockquote>
+
+<p>
+Also insert a new paragraph, paragraph 1a, that reads: "Notes: The
+comparison function need not be an equivalence relation."
+</p>
+
+
+<p>Informally: the proposed resolution imposes an explicit requirement
+that the comparison function be an equivalence relation. The
+alternative resolution does not, and it gives enough information so
+that the behavior of unique() for a non-equivalence relation is
+specified. Both resolutions are consistent with the behavior of
+existing implementations.</p>
+
+
+
+
+
+<hr>
+<h3><a name="206"></a>206. operator new(size_t, nothrow) may become unlinked to ordinary operator new if ordinary version replaced</h3>
+<p><b>Section:</b> 18.5.1.1 [new.delete.single] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-08-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.single">issues</a> in [new.delete.single].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>As specified, the implementation of the nothrow version of operator
+new does not necessarily call the ordinary operator new, but may
+instead simply call the same underlying allocator and return a null
+pointer instead of throwing an exception in case of failure.</p>
+
+<p>Such an implementation breaks code that replaces the ordinary
+version of new, but not the nothrow version. If the ordinary version
+of new/delete is replaced, and if the replaced delete is not
+compatible with pointers returned from the library versions of new,
+then when the replaced delete receives a pointer allocated by the
+library new(nothrow), crash follows.</p>
+
+<p>The fix appears to be that the lib version of new(nothrow) must
+call the ordinary new. Thus when the ordinary new gets replaced, the
+lib version will call the replaced ordinary new and things will
+continue to work.</p>
+
+<p>An alternative would be to have the ordinary new call
+new(nothrow). This seems sub-optimal to me as the ordinary version of
+new is the version most commonly replaced in practice. So one would
+still need to replace both ordinary and nothrow versions if one wanted
+to replace the ordinary version.</p>
+
+<p>Another alternative is to put in clear text that if one version is
+replaced, then the other must also be replaced to maintain
+compatibility. Then the proposed resolution below would just be a
+quality of implementation issue. There is already such text in
+paragraph 7 (under the new(nothrow) version). But this nuance is
+easily missed if one reads only the paragraphs relating to the
+ordinary new.</p>
+
+<p>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2158.html">N2158</a>
+has been written explaining the rationale for the proposed resolution below.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 18.5.1.1 [new.delete.single]:
+</p>
+
+<blockquote>
+<pre>void* operator new(std::size_t <i>size</i>, const std::nothrow_t&amp;) throw();
+</pre>
+<blockquote>
+<p>
+-5- <i>Effects:</i> Same as above, except that it is called by a placement
+version of a <i>new-expression</i> when a C++ program prefers a null pointer result as
+an error indication, instead of a <tt>bad_alloc</tt> exception.
+</p>
+
+<p>
+-6- <i>Replaceable:</i> a C++ program may define a function with this function
+signature that displaces the default version defined by the C++ Standard
+library.
+</p>
+
+<p>
+-7- <i>Required behavior:</i> Return a non-null pointer to suitably aligned
+storage (3.7.4), or else return a null pointer. This nothrow version of operator
+new returns a pointer obtained as if acquired from the <ins>(possibly
+replaced)</ins> ordinary version. This requirement is binding on a replacement
+version of this function.
+</p>
+
+<p>
+-8- <i>Default behavior:</i>
+</p>
+<ul>
+<li><ins>
+Calls <tt>operator new(<i>size</i>)</tt>.
+</ins></li>
+<li><ins>
+If the call to <tt>operator new(<i>size</i>)</tt> returns normally, returns
+the result of that call, else
+</ins></li>
+<li><ins>
+if the call to <tt>operator new(<i>size</i>)</tt> throws an exception, returns
+a null pointer.
+</ins></li>
+<li><del>
+Executes a loop: Within the loop, the function first attempts to allocate the
+requested storage. Whether the attempt involves a call to the Standard C library
+function <tt>malloc</tt> is unspecified.
+</del></li>
+<li><del>
+Returns a pointer to the allocated storage if the attempt is successful.
+Otherwise, if the last argument to <tt>set_new_handler()</tt> was a null
+pointer, return a null pointer.
+</del></li>
+<li><del>
+Otherwise, the function calls the current <i>new_handler</i> (18.5.2.2). If the
+called function returns, the loop repeats.
+</del></li>
+<li><del>
+The loop terminates when an attempt to allocate the requested storage is
+successful or when a called <i>new_handler</i> function does not return. If the
+called <i>new_handler</i> function terminates by throwing a <tt>bad_alloc
+exception</tt>, the function returns a null pointer.
+</del></li>
+</ul>
+<p>
+-9- [<i>Example:</i>
+</p>
+<blockquote><pre>T* p1 = new T; <i>// throws bad_alloc if it fails</i>
+T* p2 = new(nothrow) T; <i>// returns 0 if it fails</i>
+</pre></blockquote>
+<p>
+--<i>end example</i>]
+</p>
+</blockquote>
+
+<pre>void operator delete(void* <i>ptr</i>) throw();
+<del>void operator delete(void* <i>ptr</i>, const std::nothrow_t&amp;) throw();</del>
+</pre>
+
+<blockquote>
+<p>
+-10- <i>Effects:</i> The <i>deallocation function</i> (3.7.4.2) called by a
+<i>delete-expression</i> to render the value of <tt><i>ptr</i></tt> invalid.
+</p>
+<p>
+-11- <i>Replaceable:</i> a C++ program may define a function with this function
+signature that displaces the default version defined by the C++ Standard
+library.
+</p>
+<p>
+-12- <i>Requires:</i> the value of <tt><i>ptr</i></tt> is null or the value
+returned by an earlier call to the <del>default</del> <ins>(possibly
+replaced)</ins> <tt>operator new(std::size_t)</tt> or <tt>operator
+new(std::size_t, const std::nothrow_t&amp;)</tt>.
+</p>
+<p>
+-13- <i>Default behavior:</i>
+</p>
+<ul>
+<li>
+For a null value of <tt><i>ptr</i></tt>, do nothing.
+</li>
+<li>
+Any other value of <tt><i>ptr</i></tt> shall be a value returned earlier by a
+call to the default <tt>operator new</tt>, which was not invalidated by an
+intervening call to <tt>operator delete(void*)</tt> (17.4.3.7). For such a
+non-null value of <tt><i>ptr</i></tt>, reclaims storage allocated by the earlier
+call to the default <tt>operator new</tt>.
+</li>
+</ul>
+<p>
+-14- <i>Remarks:</i> It is unspecified under what conditions part or all of
+such reclaimed storage is allocated by a subsequent call to <tt>operator
+new</tt> or any of <tt>calloc</tt>, <tt>malloc</tt>, or <tt>realloc</tt>,
+declared in <tt>&lt;cstdlib&gt;</tt>.
+</p>
+</blockquote>
+
+<pre><ins>void operator delete(void* <i>ptr</i>, const std::nothrow_t&amp;) throw();</ins>
+</pre>
+
+<blockquote>
+<p><ins>
+-15- <i>Effects:</i> Same as above, except that it is called by the
+implementation when an exception propagates from a nothrow placement version
+of the <i>new-expression</i> (i.e. when the constructor throws an exception).
+</ins></p>
+<p><ins>
+-16- <i>Replaceable:</i> a C++ program may define a function with this function
+signature that displaces the default version defined by the C++ Standard
+library.
+</ins></p>
+<p><ins>
+-17- <i>Requires:</i> the value of <tt><i>ptr</i></tt> is null or the
+value returned by an earlier call to the (possibly replaced) <tt>operator
+new(std::size_t)</tt> or <tt>operator new(std::size_t, const
+std::nothrow_t&amp;)</tt>. </ins></p>
+<p><ins>
+-18- <i>Default behavior:</i> Calls <tt>operator delete(<i>ptr</i>)</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 18.5.1.2 [new.delete.array]
+</p>
+
+<blockquote>
+<pre>void* operator new[](std::size_t <i>size</i>, const std::nothrow_t&amp;) throw();
+</pre>
+
+<blockquote>
+<p>
+-5- <i>Effects:</i> Same as above, except that it is called by a placement
+version of a <i>new-expression</i> when a C++ program prefers a null pointer result as
+an error indication, instead of a <tt>bad_alloc</tt> exception.
+</p>
+
+<p>
+-6- <i>Replaceable:</i> a C++ program can define a function with this function
+signature that displaces the default version defined by the C++ Standard
+library.
+</p>
+
+<p>
+-7- <i>Required behavior:</i> <del>Same as for operator <tt>new(std::size_t,
+const std::nothrow_t&amp;)</tt>. This nothrow version of operator <tt>new[]</tt>
+returns a pointer obtained as if acquired from the ordinary version.</del>
+<ins>Return a non-null pointer to suitably aligned storage (3.7.4), or else
+return a null pointer. This nothrow version of operator new returns a pointer
+obtained as if acquired from the (possibly replaced) <tt>operator
+new[](std::size_t <i>size</i>)</tt>. This requirement is binding on a
+replacement version of this function.</ins>
+</p>
+
+<p>
+-8- <i>Default behavior:</i> <del>Returns <tt>operator new(<i>size</i>,
+nothrow)</tt>.</del>
+</p>
+
+<ul>
+<li><ins>
+Calls <tt>operator new[](<i>size</i>)</tt>.
+</ins></li>
+<li><ins>
+If the call to <tt>operator new[](<i>size</i>)</tt> returns normally, returns
+the result of that call, else
+</ins></li>
+<li><ins>
+if the call to <tt>operator new[](<i>size</i>)</tt> throws an exception, returns
+a null pointer.
+</ins></li>
+</ul>
+</blockquote>
+
+<pre>void operator delete[](void* <i>ptr</i>) throw();
+void operator delete[](void* <i>ptr</i>, const std::nothrow_t&amp;) throw();
+</pre>
+
+<blockquote>
+<p>
+-9- <i>Effects:</i> The <i>deallocation function</i> (3.7.4.2) called by the
+array form of a <i>delete-expression</i> to render the value of
+<tt><i>ptr</i></tt> invalid.
+</p>
+
+<p>
+-10- <i>Replaceable:</i> a C++ program can define a function with this function
+signature that displaces the default version defined by the C++ Standard
+library.
+</p>
+
+<p>
+-11- <i>Requires:</i> the value of
+<tt><i>ptr</i></tt> is null or the value returned by an earlier call to
+<tt>operator new[](std::size_t)</tt> or <tt>operator new[](std::size_t, const
+std::nothrow_t&amp;)</tt>.
+</p>
+
+<p>
+-12- <i>Default behavior:</i> Calls <tt>operator delete(<i>ptr</i>)</tt> or
+<tt>operator delete<ins>[]</ins>(<i>ptr</i><del>, std::nothrow</del>)</tt> respectively.
+</p>
+</blockquote>
+
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Yes, they may become unlinked, and that is by design. If a user
+replaces one, the user should also replace the other.</p>
+
+<p><i>[
+Reopened due to a gcc conversation between Howard, Martin and Gaby. Forwarding
+or not is visible behavior to the client and it would be useful for the client
+to know which behavior it could depend on.
+]</i></p>
+
+
+<p><i>[
+Batavia: Robert voiced serious reservations about backwards compatibility for
+his customers.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="208"></a>208. Unnecessary restriction on past-the-end iterators</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Stephen Cleary <b>Date:</b> 2000-02-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 24.1 paragraph 5, it is stated ". . . Dereferenceable and
+past-the-end values are always non-singular."</p>
+<p>This places an unnecessary restriction on past-the-end iterators for
+containers with forward iterators (for example, a singly-linked list). If the
+past-the-end value on such a container was a well-known singular value, it would
+still satisfy all forward iterator requirements.</p>
+<p>Removing this restriction would allow, for example, a singly-linked list
+without a "footer" node.</p>
+<p>This would have an impact on existing code that expects past-the-end
+iterators obtained from different (generic) containers being not equal.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 24.1 [iterator.requirements] paragraph 5, the last sentence, from:</p>
+<blockquote>
+<p>Dereferenceable and past-the-end values are always non-singular.</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+<p>Dereferenceable values are always non-singular.&nbsp;</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>For some kinds of containers, including singly linked lists and
+zero-length vectors, null pointers are perfectly reasonable past-the-end
+iterators. Null pointers are singular.
+</p>
+
+
+
+
+<hr>
+<h3><a name="209"></a>209. basic_string declarations inconsistent</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Igor Stauder <b>Date:</b> 2000-02-11</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In Section 21.3 [basic.string] the basic_string member function
+declarations use a consistent style except for the following functions:</p>
+<blockquote>
+ <pre>void push_back(const charT);
+basic_string&amp; assign(const basic_string&amp;);
+void swap(basic_string&lt;charT,traits,Allocator&gt;&amp;);</pre>
+</blockquote>
+<p>- push_back, assign, swap: missing argument name&nbsp;<br>
+- push_back: use of const with charT (i.e. POD type passed by value
+not by reference - should be charT or const charT&amp; )<br>
+- swap: redundant use of template parameters in argument
+basic_string&lt;charT,traits,Allocator&gt;&amp;</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In Section 21.3 [basic.string] change the basic_string member
+function declarations push_back, assign, and swap to:</p>
+<blockquote>
+ <pre>void push_back(charT c);
+
+basic_string&amp; assign(const basic_string&amp; str);
+void swap(basic_string&amp; str);</pre>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Although the standard is in general not consistent in declaration
+style, the basic_string declarations are consistent other than the
+above. The LWG felt that this was sufficient reason to merit the
+change.
+</p>
+
+
+
+
+<hr>
+<h3><a name="210"></a>210. distance first and last confused</h3>
+<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 2000-02-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In paragraph 9 of section 25 [algorithms], it is written:</p>
+<blockquote>
+ <p> In the description of the algorithms operators + and - are used
+ for some of the iterator categories for which they do not have to
+ be defined. In these cases the semantics of [...] a-b is the same
+ as of<br>
+ <br>
+ &nbsp;&nbsp;&nbsp;&nbsp; <tt>return distance(a, b);</tt></p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>On the last line of paragraph 9 of section 25 [algorithms] change
+<tt>"a-b"</tt> to <tt>"b-a".</tt></p>
+
+
+<p><b>Rationale:</b></p>
+<p>There are two ways to fix the defect; change the description to b-a
+or change the return to distance(b,a). The LWG preferred the
+former for consistency.</p>
+
+
+
+
+<hr>
+<h3><a name="211"></a>211. operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Scott Snyder <b>Date:</b> 2000-02-04</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The description of the stream extraction operator for std::string (section
+21.3.7.9 [lib.string.io]) does not contain a requirement that failbit be set in
+the case that the operator fails to extract any characters from the input
+stream.</p>
+<p>This implies that the typical construction</p>
+<blockquote>
+ <pre>std::istream is;
+std::string str;
+...
+while (is &gt;&gt; str) ... ;</pre>
+</blockquote>
+<p>(which tests failbit) is not required to terminate at EOF.</p>
+<p>Furthermore, this is inconsistent with other extraction operators,
+which do include this requirement. (See sections 27.6.1.2 [istream.formatted] and 27.6.1.3 [istream.unformatted]), where this
+requirement is present, either explicitly or implicitly, for the
+extraction operators. It is also present explicitly in the description
+of getline (istream&amp;, string&amp;, charT) in section 21.3.8.9 [string.io] paragraph 8.)</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Insert new paragraph after paragraph 2 in section 21.3.8.9 [string.io]:</p>
+<blockquote>
+
+<p>If the function extracts no characters, it calls
+is.setstate(ios::failbit) which may throw ios_base::failure
+(27.4.4.3).</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="212"></a>212. Empty range behavior unclear for several algorithms</h3>
+<p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The standard doesn't specify what min_element() and max_element() shall
+return if the range is empty (first equals last). The usual implementations
+return last. This problem seems also apply to partition(), stable_partition(),
+next_permutation(), and prev_permutation().</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 25.3.7 [alg.min.max] - Minimum and maximum, paragraphs 7 and
+9, append: Returns last if first==last.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG looked in some detail at all of the above mentioned
+algorithms, but believes that except for min_element() and
+max_element() it is already clear that last is returned if first ==
+last.</p>
+
+
+
+
+<hr>
+<h3><a name="214"></a>214. set::find() missing const overload</h3>
+<p><b>Section:</b> 23.3.3 [set], 23.3.4 [multiset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#set">issues</a> in [set].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#450">450</a></p>
+<p><b>Discussion:</b></p>
+<p>The specification for the associative container requirements in
+Table 69 state that the find member function should "return
+iterator; const_iterator for constant a". The map and multimap
+container descriptions have two overloaded versions of find, but set
+and multiset do not, all they have is:</p>
+<blockquote>
+ <pre>iterator find(const key_type &amp; x) const;</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the prototypes for find(), lower_bound(), upper_bound(), and
+equal_range() in section 23.3.3 [set] and section 23.3.4 [multiset] to each have two overloads:</p>
+<blockquote>
+ <pre>iterator find(const key_type &amp; x);
+const_iterator find(const key_type &amp; x) const;</pre>
+ <pre>iterator lower_bound(const key_type &amp; x);
+const_iterator lower_bound(const key_type &amp; x) const;</pre>
+ <pre>iterator upper_bound(const key_type &amp; x);
+const_iterator upper_bound(const key_type &amp; x) const;</pre>
+ <pre>pair&lt;iterator, iterator&gt; equal_range(const key_type &amp; x);
+pair&lt;const_iterator, const_iterator&gt; equal_range(const key_type &amp; x) const;</pre>
+</blockquote>
+
+<p><i>[Tokyo: At the request of the LWG, Judy Ward provided wording
+extending the proposed resolution to lower_bound, upper_bound, and
+equal_range.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="217"></a>217. Facets example (Classifying Japanese characters) contains errors</h3>
+<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-02-29</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The example in 22.2.8, paragraph 11 contains the following errors:</p>
+<p>1) The member function `My::JCtype::is_kanji()' is non-const; the function
+must be const in order for it to be callable on a const object (a reference to
+which which is what std::use_facet&lt;&gt;() returns).</p>
+<p>2) In file filt.C, the definition of `JCtype::id' must be qualified with the
+name of the namespace `My'.</p>
+<p>3) In the definition of `loc' and subsequently in the call to use_facet&lt;&gt;()
+in main(), the name of the facet is misspelled: it should read `My::JCtype'
+rather than `My::JCType'.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the "Classifying Japanese characters" example in 22.2.8,
+paragraph 11 with the following:</p>
+<pre>#include &lt;locale&gt;</pre>
+<pre>namespace My {
+ using namespace std;
+ class JCtype : public locale::facet {
+ public:
+ static locale::id id; // required for use as a new locale facet
+ bool is_kanji (wchar_t c) const;
+ JCtype() {}
+ protected:
+ ~JCtype() {}
+ };
+}</pre>
+<pre>// file: filt.C
+#include &lt;iostream&gt;
+#include &lt;locale&gt;
+#include "jctype" // above
+std::locale::id My::JCtype::id; // the static JCtype member
+declared above.</pre>
+<pre>int main()
+{
+ using namespace std;
+ typedef ctype&lt;wchar_t&gt; wctype;
+ locale loc(locale(""), // the user's preferred locale...
+ new My::JCtype); // and a new feature ...
+ wchar_t c = use_facet&lt;wctype&gt;(loc).widen('!');
+ if (!use_facet&lt;My::JCtype&gt;(loc).is_kanji(c))
+ cout &lt;&lt; "no it isn't!" &lt;&lt; endl;
+ return 0;
+}</pre>
+
+
+
+
+<hr>
+<h3><a name="220"></a>220. ~ios_base() usage valid?</h3>
+<p><b>Section:</b> 27.4.2.7 [ios.base.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Jonathan Schilling, Howard Hinnant <b>Date:</b> 2000-03-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The pre-conditions for the ios_base destructor are described in 27.4.2.7
+paragraph 2:</p>
+<blockquote>
+ <p>Effects: Destroys an object of class ios_base. Calls each registered
+ callback pair (fn,index) (27.4.2.6) as (*fn)(erase_event,*this,index) at such
+ time that any ios_base member function called from within fn has well defined
+ results.</p>
+</blockquote>
+<p>But what is not clear is: If no callback functions were ever registered, does
+it matter whether the ios_base members were ever initialized?</p>
+<p>For instance, does this program have defined behavior:</p>
+<blockquote>
+ <pre>#include &lt;ios&gt;</pre>
+ <pre>class D : public std::ios_base { };</pre>
+ <pre>int main() { D d; }</pre>
+</blockquote>
+<p>It seems that registration of a callback function would surely affect the
+state of an ios_base. That is, when you register a callback function with an
+ios_base, the ios_base must record that fact somehow.</p>
+<p>But if after construction the ios_base is in an indeterminate state, and that
+state is not made determinate before the destructor is called, then how would
+the destructor know if any callbacks had indeed been registered? And if the
+number of callbacks that had been registered is indeterminate, then is not the
+behavior of the destructor undefined?</p>
+<p>By comparison, the basic_ios class description in 27.4.4.1 paragraph 2 makes
+it explicit that destruction before initialization results in undefined
+behavior.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Modify 27.4.2.7 paragraph 1 from</p>
+<blockquote>
+ <p>Effects: Each ios_base member has an indeterminate value after
+ construction.</p>
+</blockquote>
+<p>to</p>
+<blockquote>
+ <p>Effects: Each ios_base member has an indeterminate
+value after construction. These members must be initialized by calling
+basic_ios::init. If an ios_base object is destroyed before these
+initializations have taken place, the behavior is undefined.</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="221"></a>221. num_get&lt;&gt;::do_get stage 2 processing broken</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-03-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Stage 2 processing of numeric conversion is broken.</p>
+
+<p>Table 55 in 22.2.2.1.2 says that when basefield is 0 the integral
+conversion specifier is %i. A %i specifier determines a number's base
+by its prefix (0 for octal, 0x for hex), so the intention is clearly
+that a 0x prefix is allowed. Paragraph 8 in the same section,
+however, describes very precisely how characters are processed. (It
+must be done "as if" by a specified code fragment.) That
+description does not allow a 0x prefix to be recognized.</p>
+
+<p>Very roughly, stage 2 processing reads a char_type ct. It converts
+ct to a char, not by using narrow but by looking it up in a
+translation table that was created by widening the string literal
+"0123456789abcdefABCDEF+-". The character "x" is
+not found in that table, so it can't be recognized by stage 2
+processing.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.1.2 paragraph 8, replace the line:</p>
+<blockquote>
+ <pre>static const char src[] = "0123456789abcdefABCDEF+-";</pre>
+</blockquote>
+<p>with the line:</p>
+<blockquote>
+ <pre>static const char src[] = "0123456789abcdefxABCDEFX+-";</pre>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>If we're using the technique of widening a string literal, the
+string literal must contain every character we wish to recognize.
+This technique has the consequence that alternate representations
+of digits will not be recognized. This design decision was made
+deliberately, with full knowledge of that limitation.</p>
+
+
+
+
+
+<hr>
+<h3><a name="222"></a>222. Are throw clauses necessary if a throw is already implied by the effects clause?</h3>
+<p><b>Section:</b> 17.3.1.3 [structure.specifications] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-03-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#structure.specifications">issues</a> in [structure.specifications].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 21.3.6.8 describes the basic_string::compare function this way:</p>
+<blockquote>
+ <pre>21.3.6.8 - basic_string::compare [lib.string::compare]
+
+int compare(size_type pos1, size_type n1,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str ,
+ size_type pos2 , size_type n2 ) const;
+
+-4- Returns:
+
+ basic_string&lt;charT,traits,Allocator&gt;(*this,pos1,n1).compare(
+ basic_string&lt;charT,traits,Allocator&gt;(str,pos2,n2)) .</pre>
+</blockquote>
+<p>and the constructor that's implicitly called by the above is
+defined to throw an out-of-range exception if pos &gt; str.size(). See
+section 21.3.1 [string.require] paragraph 4.</p>
+
+<p>On the other hand, the compare function descriptions themselves don't have
+"Throws: " clauses and according to 17.3.1.3, paragraph 3, elements
+that do not apply to a function are omitted.</p>
+<p>So it seems there is an inconsistency in the standard -- are the
+"Effects" clauses correct, or are the "Throws" clauses
+missing?</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 17.3.1.3 [structure.specifications] paragraph 3, the footnote 148 attached to
+the sentence "Descriptions of function semantics contain the
+following elements (as appropriate):", insert the word
+"further" so that the foot note reads:</p>
+<blockquote>
+ <p>To save space, items that do not apply to a function are
+ omitted. For example, if a function does not specify any further
+ preconditions, there will be no "Requires" paragraph.</p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The standard is somewhat inconsistent, but a failure to note a
+throw condition in a throws clause does not grant permission not to
+throw. The inconsistent wording is in a footnote, and thus
+non-normative. The proposed resolution from the LWG clarifies the
+footnote.</p>
+
+
+
+
+<hr>
+<h3><a name="223"></a>223. reverse algorithm should use iter_swap rather than swap</h3>
+<p><b>Section:</b> 25.2.10 [alg.reverse] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-03-21</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Shouldn't the effects say "applies iter_swap to all pairs..."?</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 25.2.10 [alg.reverse], replace:</p>
+ <blockquote><p>
+ Effects: For each non-negative integer i &lt;= (last - first)/2,
+ applies swap to all pairs of iterators first + i, (last - i) - 1.
+ </p></blockquote>
+<p>with:</p>
+ <blockquote><p>
+ Effects: For each non-negative integer i &lt;= (last - first)/2,
+ applies iter_swap to all pairs of iterators first + i, (last - i) - 1.
+ </p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="224"></a>224. clear() complexity for associative containers refers to undefined N</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Ed Brey <b>Date:</b> 2000-03-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In the associative container requirements table in 23.1.2 paragraph 7,
+a.clear() has complexity "log(size()) + N". However, the meaning of N
+is not defined.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the associative container requirements table in 23.1.2 paragraph
+7, the complexity of a.clear(), change "log(size()) + N" to
+"linear in <tt>size()</tt>".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>It's the "log(size())", not the "N", that is in
+error: there's no difference between <i>O(N)</i> and <i>O(N +
+log(N))</i>. The text in the standard is probably an incorrect
+cut-and-paste from the range version of <tt>erase</tt>.</p>
+
+
+
+
+<hr>
+<h3><a name="225"></a>225. std:: algorithms use of other unqualified algorithms</h3>
+<p><b>Section:</b> 17.4.4.3 [global.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#global.functions">issues</a> in [global.functions].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Are algorithms in std:: allowed to use other algorithms without qualification, so functions in
+user namespaces might be found through Koenig lookup?</p>
+<p>For example, a popular standard library implementation includes this
+implementation of std::unique:</p>
+<blockquote>
+<pre>namespace std {
+ template &lt;class _ForwardIter&gt;
+ _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
+ __first = adjacent_find(__first, __last);
+ return unique_copy(__first, __last, __first);
+ }
+ }</pre>
+</blockquote>
+<p>Imagine two users on opposite sides of town, each using unique on his own
+sequences bounded by my_iterators . User1 looks at his standard library
+implementation and says, "I know how to implement a more efficient
+unique_copy for my_iterators", and writes:</p>
+<blockquote>
+<pre>namespace user1 {
+ class my_iterator;
+ // faster version for my_iterator
+ my_iterator unique_copy(my_iterator, my_iterator, my_iterator);
+ }</pre>
+</blockquote>
+<p>user1::unique_copy() is selected by Koenig lookup, as he intended.</p>
+<p>User2 has other needs, and writes:</p>
+<blockquote>
+<pre>namespace user2 {
+ class my_iterator;
+ // Returns true iff *c is a unique copy of *a and *b.
+ bool unique_copy(my_iterator a, my_iterator b, my_iterator c);
+ }</pre>
+</blockquote>
+<p>User2 is shocked to find later that his fully-qualified use of
+std::unique(user2::my_iterator, user2::my_iterator, user2::my_iterator) fails to
+compile (if he's lucky). Looking in the standard, he sees the following Effects
+clause for unique():</p>
+<blockquote>
+ <p>Effects: Eliminates all but the first element from every consecutive group
+ of equal elements referred to by the iterator i in the range [first, last) for
+ which the following corresponding conditions hold: *i == *(i - 1) or pred(*i,
+ *(i - 1)) != false</p>
+</blockquote>
+<p>The standard gives user2 absolutely no reason to think he can interfere with
+std::unique by defining names in namespace user2. His standard library has been
+built with the template export feature, so he is unable to inspect the
+implementation. User1 eventually compiles his code with another compiler, and
+his version of unique_copy silently stops being called. Eventually, he realizes
+that he was depending on an implementation detail of his library and had no
+right to expect his unique_copy() to be called portably.</p>
+<p>On the face of it, and given above scenario, it may seem obvious that the
+implementation of unique() shown is non-conforming because it uses unique_copy()
+rather than ::std::unique_copy(). Most standard library implementations,
+however, seem to disagree with this notion.</p>
+<p> <i>[Tokyo:&nbsp; Steve Adamczyk from
+the core working group indicates that "std::" is sufficient;&nbsp;
+leading "::" qualification is not required because any namespace
+qualification is sufficient to suppress Koenig lookup.]</i></p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a paragraph and a note at the end of
+17.4.4.3 [global.functions]:</p>
+<blockquote>
+
+<p>Unless otherwise specified, no global or non-member function in the
+standard library shall use a function from another namespace which is
+found through <i>argument-dependent name lookup</i> (3.4.2 [basic.lookup.argdep]).</p>
+
+<p>[Note: the phrase "unless otherwise specified" is intended to
+allow Koenig lookup in cases like that of ostream_iterators:<br>
+
+<br>
+ Effects:</p>
+ <blockquote>
+<p>*out_stream &lt;&lt; value;<br>
+ if(delim != 0) *out_stream &lt;&lt; delim;<br>
+ return (*this);</p>
+ <p>--end note]</p>
+ </blockquote>
+</blockquote>
+
+<p><i>[Tokyo: The LWG agrees that this is a defect in the standard, but
+is as yet unsure if the proposed resolution is the best
+solution. Furthermore, the LWG believes that the same problem of
+unqualified library names applies to wording in the standard itself,
+and has opened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> accordingly. Any resolution of
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be coordinated with the resolution of
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>.]</i></p>
+
+
+<p><i>[Toronto: The LWG is not sure if this is a defect in the
+standard. Most LWG members believe that an implementation of
+<tt>std::unique</tt> like the one quoted in this issue is already
+illegal, since, under certain circumstances, its semantics are not
+those specified in the standard. The standard's description of
+<tt>unique</tt> does not say that overloading <tt>adjacent_find</tt>
+should have any effect.]</i></p>
+
+
+<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
+225, 226, and 229. Their conclusion was that the issues should be
+separated into an LWG portion (Howard's paper, N1387=02-0045), and a
+EWG portion (Dave will write a proposal). The LWG and EWG had
+(separate) discussions of this plan the next day. The proposed
+resolution for this issue is in accordance with Howard's paper.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>It could be argued that this proposed isn't strictly necessary,
+ that the Standard doesn't grant implementors license to write a
+ standard function that behaves differently than specified in the
+ Standard just because of an unrelated user-defined name in some
+ other namespace. However, this is at worst a clarification. It is
+ surely right that algorithsm shouldn't pick up random names, that
+ user-defined names should have no effect unless otherwise specified.
+ Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> deals with the question of when it is
+ appropriate for the standard to explicitly specify otherwise.</p>
+
+
+
+
+
+<hr>
+<h3><a name="226"></a>226. User supplied specializations or overloads of namespace std function templates</h3>
+<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The issues are:&nbsp;</p>
+<p>1. How can a 3rd party library implementor (lib1) write a version of a standard
+algorithm which is specialized to work with his own class template?&nbsp;</p>
+<p>2. How can another library implementor (lib2) write a generic algorithm which
+will take advantage of the specialized algorithm in lib1?</p>
+<p>This appears to be the only viable answer under current language rules:</p>
+<blockquote>
+ <pre>namespace lib1
+{
+ // arbitrary-precision numbers using T as a basic unit
+ template &lt;class T&gt;
+ class big_num { //...
+ };
+ </pre>
+ <pre> // defining this in namespace std is illegal (it would be an
+ // overload), so we hope users will rely on Koenig lookup
+ template &lt;class T&gt;
+ void swap(big_int&lt;T&gt;&amp;, big_int&lt;T&gt;&amp;);
+}</pre>
+ <pre>#include &lt;algorithm&gt;
+namespace lib2
+{
+ template &lt;class T&gt;
+ void generic_sort(T* start, T* end)
+ {
+ ...
+ // using-declaration required so we can work on built-in types
+ using std::swap;
+ // use Koenig lookup to find specialized algorithm if available
+ swap(*x, *y);
+ }
+}</pre>
+</blockquote>
+<p>This answer has some drawbacks. First of all, it makes writing lib2 difficult
+and somewhat slippery. The implementor needs to remember to write the
+using-declaration, or generic_sort will fail to compile when T is a built-in
+type. The second drawback is that the use of this style in lib2 effectively
+"reserves" names in any namespace which defines types which may
+eventually be used with lib2. This may seem innocuous at first when applied to
+names like swap, but consider more ambiguous names like unique_copy() instead.
+It is easy to imagine the user wanting to define these names differently in his
+own namespace. A definition with semantics incompatible with the standard
+library could cause serious problems (see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>).</p>
+<p>Why, you may ask, can't we just partially specialize std::swap()? It's
+because the language doesn't allow for partial specialization of function
+templates. If you write:</p>
+<blockquote>
+ <pre>namespace std
+{
+ template &lt;class T&gt;
+ void swap(lib1::big_int&lt;T&gt;&amp;, lib1::big_int&lt;T&gt;&amp;);
+}</pre>
+</blockquote>
+<p>You have just overloaded std::swap, which is illegal under the current
+language rules. On the other hand, the following full specialization is legal:</p>
+<blockquote>
+ <pre>namespace std
+{
+ template &lt;&gt;
+ void swap(lib1::other_type&amp;, lib1::other_type&amp;);
+}</pre>
+</blockquote>
+
+<p>This issue reflects concerns raised by the "Namespace issue
+with specialized swap" thread on comp.lang.c++.moderated. A
+similar set of concerns was earlier raised on the boost.org mailing
+list and the ACCU-general mailing list. Also see library reflector
+message c++std-lib-7354.</p>
+
+<p>
+J. C. van Winkel points out (in c++std-lib-9565) another unexpected
+fact: it's impossible to output a container of std::pair's using copy
+and an ostream_iterator, as long as both pair-members are built-in or
+std:: types. That's because a user-defined operator&lt;&lt; for (for
+example) std::pair&lt;const std::string, int&gt; will not be found:
+lookup for operator&lt;&lt; will be performed only in namespace std.
+Opinions differed on whether or not this was a defect, and, if so,
+whether the defect is that something is wrong with user-defined
+functionality and std, or whether it's that the standard library does
+not provide an operator&lt;&lt; for std::pair&lt;&gt;.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Adopt the wording proposed in Howard Hinnant's paper
+ N1523=03-0106, "Proposed Resolution To LWG issues 225, 226, 229".</p>
+
+
+<p><i>[Tokyo: Summary, "There is no conforming way to extend
+std::swap for user defined templates."&nbsp; The LWG agrees that
+there is a problem. Would like more information before
+proceeding. This may be a core issue. Core issue 229 has been opened
+to discuss the core aspects of this problem. It was also noted that
+submissions regarding this issue have been received from several
+sources, but too late to be integrated into the issues list.
+]</i></p>
+
+
+<p><i>[Post-Tokyo: A paper with several proposed resolutions,
+J16/00-0029==WG21/N1252, "Shades of namespace std functions
+" by Alan Griffiths, is in the Post-Tokyo mailing. It
+should be considered a part of this issue.]</i></p>
+
+
+<p><i>[Toronto: Dave Abrahams and Peter Dimov have proposed a
+resolution that involves core changes: it would add partial
+specialization of function template. The Core Working Group is
+reluctant to add partial specialization of function templates. It is
+viewed as a large change, CWG believes that proposal presented leaves
+some syntactic issues unanswered; if the CWG does add partial
+specialization of function templates, it wishes to develop its own
+proposal. The LWG continues to believe that there is a serious
+problem: there is no good way for users to force the library to use
+user specializations of generic standard library functions, and in
+certain cases (e.g. transcendental functions called by
+<tt>valarray</tt> and <tt>complex</tt>) this is important. Koenig
+lookup isn't adequate, since names within the library must be
+qualified with <tt>std</tt> (see issue 225), specialization doesn't
+work (we don't have partial specialization of function templates), and
+users aren't permitted to add overloads within namespace std.
+]</i></p>
+
+
+<p><i>[Copenhagen: Discussed at length, with no consensus. Relevant
+papers in the pre-Copenhagen mailing: N1289, N1295, N1296. Discussion
+focused on four options. (1) Relax restrictions on overloads within
+namespace std. (2) Mandate that the standard library use unqualified
+calls for <tt>swap</tt> and possibly other functions. (3) Introduce
+helper class templates for <tt>swap</tt> and possibly other functions.
+(4) Introduce partial specialization of function templates. Every
+option had both support and opposition. Straw poll (first number is
+support, second is strongly opposed): (1) 6, 4; (2) 6, 7; (3) 3, 8;
+(4) 4, 4.]</i></p>
+
+
+<p><i>[Redmond: Discussed, again no consensus. Herb presented an
+argument that a user who is defining a type <tt>T</tt> with an
+associated <tt>swap</tt> should not be expected to put that
+<tt>swap</tt> in namespace std, either by overloading or by partial
+specialization. The argument is that <tt>swap</tt> is part of
+<tt>T</tt>'s interface, and thus should to in the same namespace as
+<tt>T</tt> and only in that namespace. If we accept this argument,
+the consequence is that standard library functions should use
+unqualified call of <tt>swap</tt>. (And which other functions? Any?)
+A small group (Nathan, Howard, Jeremy, Dave, Matt, Walter, Marc) will
+try to put together a proposal before the next meeting.]</i></p>
+
+
+<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
+225, 226, and 229. Their conclusion was that the issues should be
+separated into an LWG portion (Howard's paper, N1387=02-0045), and a
+EWG portion (Dave will write a proposal). The LWG and EWG had
+(separate) discussions of this plan the next day. The proposed
+resolution is the one proposed by Howard.]</i></p>
+
+
+<p><i>[Santa Cruz: the LWG agreed with the general direction of
+ Howard's paper, N1387. (Roughly: Koenig lookup is disabled unless
+ we say otherwise; this issue is about when we do say otherwise.)
+ However, there were concerns about wording. Howard will provide new
+ wording. Bill and Jeremy will review it.]</i></p>
+
+
+<p><i>[Kona: Howard proposed the new wording. The LWG accepted his
+ proposed resolution.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>Informally: introduce a Swappable concept, and specify that the
+ value types of the iterators passed to certain standard algorithms
+ (such as iter_swap, swap_ranges, reverse, rotate, and sort) conform
+ to that concept. The Swappable concept will make it clear that
+ these algorithms use unqualified lookup for the calls
+ to <tt>swap</tt>. Also, in 26.5.3.3 [valarray.transcend] paragraph 1,
+ state that the valarray transcendentals use unqualified lookup.</p>
+
+
+
+
+
+<hr>
+<h3><a name="227"></a>227. std::swap() should require CopyConstructible or DefaultConstructible arguments</h3>
+<p><b>Section:</b> 25.2.3 [alg.swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.swap">issues</a> in [alg.swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>25.2.2 reads:</p>
+<blockquote>
+ <p><tt> template&lt;class T&gt; void swap(T&amp; a, T&amp; b);</tt><br>
+ <br>
+ Requires: Type T is Assignable (_lib.container.requirements_).<br>
+ Effects: Exchanges values stored in two locations.</p>
+</blockquote>
+<p>The only reasonable** generic implementation of swap requires construction of a
+ new temporary copy of one of its arguments:</p>
+<blockquote>
+<pre>template&lt;class T&gt; void swap(T&amp; a, T&amp; b);
+ {
+ T tmp(a);
+ a = b;
+ b = tmp;
+ }</pre>
+</blockquote>
+<p>But a type which is only Assignable cannot be swapped by this implementation.</p>
+<p>**Yes, there's also an unreasonable implementation which would require T to be
+ DefaultConstructible instead of CopyConstructible. I don't think this is worthy
+ of consideration:</p>
+<blockquote>
+<pre>template&lt;class T&gt; void swap(T&amp; a, T&amp; b);
+{
+ T tmp;
+ tmp = a;
+ a = b;
+ b = tmp;
+}</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.2.2 paragraph 1 from:</p>
+<blockquote>
+<p> Requires: Type T is Assignable (23.1).</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+<p> Requires: Type T is CopyConstructible (20.1.3) and Assignable (23.1)</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="228"></a>228. Incorrect specification of "..._byname" facets</h3>
+<p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The sections 22.2.1.2 [locale.ctype.byname], 22.2.1.5
+[locale.codecvt.byname],
+sref ref="22.2.1.6", 22.2.3.2 [locale.numpunct.byname], 22.2.4.2
+[locale.collate.byname], 22.2.5.4 [locale.time.put.byname], 22.2.6.4
+[locale.moneypunct.byname], and 22.2.7.2 [locale.messages.byname]
+overspecify the
+definitions of the "..._byname" classes by listing a bunch
+of virtual functions. At the same time, no semantics of these
+functions are defined. Real implementations do not define these
+functions because the functional part of the facets is actually
+implemented in the corresponding base classes and the constructor of
+the "..._byname" version just provides suitable date used by
+these implementations. For example, the 'numpunct' methods just return
+values from a struct. The base class uses a statically initialized
+struct while the derived version reads the contents of this struct
+from a table. However, no virtual function is defined in
+'numpunct_byname'.</p>
+
+<p>For most classes this does not impose a problem but specifically
+for 'ctype' it does: The specialization for 'ctype_byname&lt;char&gt;'
+is required because otherwise the semantics would change due to the
+virtual functions defined in the general version for 'ctype_byname':
+In 'ctype&lt;char&gt;' the method 'do_is()' is not virtual but it is
+made virtual in both 'ctype&lt;cT&gt;' and 'ctype_byname&lt;cT&gt;'.
+Thus, a class derived from 'ctype_byname&lt;char&gt;' can tell whether
+this class is specialized or not under the current specification:
+Without the specialization, 'do_is()' is virtual while with
+specialization it is not virtual.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>&nbsp; Change section 22.2.1.2 (lib.locale.ctype.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT&gt;
+ class ctype_byname : public ctype&lt;charT&gt; {
+ public:
+ typedef ctype&lt;charT&gt;::mask mask;
+ explicit ctype_byname(const char*, size_t refs = 0);
+ protected:
+ ~ctype_byname(); // virtual
+ };
+ }</pre>
+<p>&nbsp; Change section 22.2.1.6 (lib.locale.codecvt.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class internT, class externT, class stateT&gt;
+ class codecvt_byname : public codecvt&lt;internT, externT, stateT&gt; {
+ public:
+ explicit codecvt_byname(const char*, size_t refs = 0);
+ protected:
+ ~codecvt_byname(); // virtual
+ };
+ }
+</pre>
+<p>&nbsp; Change section 22.2.3.2 (lib.locale.numpunct.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT&gt;
+ class numpunct_byname : public numpunct&lt;charT&gt; {
+ // this class is specialized for char and wchar_t.
+ public:
+ typedef charT char_type;
+ typedef basic_string&lt;charT&gt; string_type;
+ explicit numpunct_byname(const char*, size_t refs = 0);
+ protected:
+ ~numpunct_byname(); // virtual
+ };
+ }</pre>
+<p>&nbsp; Change section 22.2.4.2 (lib.locale.collate.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT&gt;
+ class collate_byname : public collate&lt;charT&gt; {
+ public:
+ typedef basic_string&lt;charT&gt; string_type;
+ explicit collate_byname(const char*, size_t refs = 0);
+ protected:
+ ~collate_byname(); // virtual
+ };
+ }</pre>
+<p>&nbsp; Change section 22.2.5.2 (lib.locale.time.get.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
+ class time_get_byname : public time_get&lt;charT, InputIterator&gt; {
+ public:
+ typedef time_base::dateorder dateorder;
+ typedef InputIterator iter_type</pre>
+<pre> explicit time_get_byname(const char*, size_t refs = 0);
+ protected:
+ ~time_get_byname(); // virtual
+ };
+ }</pre>
+<p>&nbsp; Change section 22.2.5.4 (lib.locale.time.put.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
+ class time_put_byname : public time_put&lt;charT, OutputIterator&gt;
+ {
+ public:
+ typedef charT char_type;
+ typedef OutputIterator iter_type;</pre>
+<pre> explicit time_put_byname(const char*, size_t refs = 0);
+ protected:
+ ~time_put_byname(); // virtual
+ };
+ }"</pre>
+<p>&nbsp; Change section 22.2.6.4 (lib.locale.moneypunct.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT, bool Intl = false&gt;
+ class moneypunct_byname : public moneypunct&lt;charT, Intl&gt; {
+ public:
+ typedef money_base::pattern pattern;
+ typedef basic_string&lt;charT&gt; string_type;</pre>
+<pre> explicit moneypunct_byname(const char*, size_t refs = 0);
+ protected:
+ ~moneypunct_byname(); // virtual
+ };
+ }</pre>
+<p>&nbsp; Change section 22.2.7.2 (lib.locale.messages.byname) to become:</p>
+<pre> namespace std {
+ template &lt;class charT&gt;
+ class messages_byname : public messages&lt;charT&gt; {
+ public:
+ typedef messages_base::catalog catalog;
+ typedef basic_string&lt;charT&gt; string_type;</pre>
+<pre> explicit messages_byname(const char*, size_t refs = 0);
+ protected:
+ ~messages_byname(); // virtual
+ };
+ }</pre>
+<p>Remove section 22.2.1.4 [locale.codecvt] completely (because in
+this case only those members are defined to be virtual which are
+defined to be virtual in 'ctype&lt;cT&gt;'.)</p>
+
+<p><i>[Post-Tokyo: Dietmar Kühl submitted this issue at the request of
+the LWG to solve the underlying problems raised by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>.]</i></p>
+
+
+<p><i>[Copenhagen: proposed resolution was revised slightly, to remove
+three last virtual functions from <tt>messages_byname</tt>.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="229"></a>229. Unqualified references of other library entities</h3>
+<p><b>Section:</b> 17.4.1.1 [contents] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 2000-04-19</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Throughout the library chapters, the descriptions of library entities refer
+to other library entities without necessarily qualifying the names.</p>
+
+<p>For example, section 25.2.2 "Swap" describes the effect of
+swap_ranges in terms of the unqualified name "swap". This section
+could reasonably be interpreted to mean that the library must be implemented so
+as to do a lookup of the unqualified name "swap", allowing users to
+override any ::std::swap function when Koenig lookup applies.</p>
+
+<p>Although it would have been best to use explicit qualification with
+"::std::" throughout, too many lines in the standard would have to be
+adjusted to make that change in a Technical Corrigendum.</p>
+
+<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>, which addresses qualification of
+<tt>size_t</tt>, is a special case of this.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>To section 17.4.1.1 "Library contents" Add the following paragraph:</p>
+<blockquote>
+ <p>Whenever a name x defined in the standard library is mentioned, the name x
+ is assumed to be fully qualified as ::std::x, unless explicitly described
+ otherwise. For example, if the Effects section for library function F is
+ described as calling library function G, the function ::std::G is meant.</p>
+</blockquote>
+
+<p><i>[Post-Tokyo: Steve Clamage submitted this issue at the request of
+the LWG to solve a problem in the standard itself similar to the
+problem within implementations of library identified by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>. Any resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be
+coordinated with the resolution of this issue.]</i></p>
+
+
+<p><i>[post-Toronto: Howard is undecided about whether it is
+appropriate for all standard library function names referred to in
+other standard library functions to be explicitly qualified by
+<tt>std</tt>: it is common advice that users should define global
+functions that operate on their class in the same namespace as the
+class, and this requires argument-dependent lookup if those functions
+are intended to be called by library code. Several LWG members are
+concerned that valarray appears to require argument-dependent lookup,
+but that the wording may not be clear enough to fall under
+"unless explicitly described otherwise".]</i></p>
+
+
+<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
+225, 226, and 229. Their conclusion was that the issues should be
+separated into an LWG portion (Howard's paper, N1387=02-0045), and a
+EWG portion (Dave will write a proposal). The LWG and EWG had
+(separate) discussions of this plan the next day. This paper resolves
+issues 225 and 226. In light of that resolution, the proposed
+resolution for the current issue makes sense.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="230"></a>230. Assignable specified without also specifying CopyConstructible</h3>
+<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2000-04-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> identified an instance (std::swap) where
+Assignable was specified without also specifying
+CopyConstructible. The LWG asked that the standard be searched to
+determine if the same defect existed elsewhere.</p>
+
+<p>There are a number of places (see proposed resolution below) where
+Assignable is specified without also specifying
+CopyConstructible. There are also several cases where both are
+specified. For example, 26.4.1 [rand.req].</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.1 [container.requirements] table 65 for value_type:
+change "T is Assignable" to "T is CopyConstructible and
+Assignable"
+</p>
+
+<p>In 23.1.2 [associative.reqmts] table 69 X::key_type; change
+"Key is Assignable" to "Key is
+CopyConstructible and Assignable"<br>
+</p>
+
+<p>In 24.1.2 [output.iterators] paragraph 1, change:
+</p>
+<blockquote>
+<p> A class or a built-in type X satisfies the requirements of an
+output iterator if X is an Assignable type (23.1) and also the
+following expressions are valid, as shown in Table 73:
+</p>
+</blockquote>
+<p>to:
+</p>
+<blockquote>
+<p> A class or a built-in type X satisfies the requirements of an
+output iterator if X is a CopyConstructible (20.1.3) and Assignable
+type (23.1) and also the following expressions are valid, as shown in
+Table 73:
+</p>
+</blockquote>
+
+<p><i>[Post-Tokyo: Beman Dawes submitted this issue at the request of
+the LWG. He asks that the 25.2.5 [alg.replace] and 25.2.6 [alg.fill] changes be studied carefully, as it is not clear that
+CopyConstructible is really a requirement and may be
+overspecification.]</i></p>
+
+
+<p><i>[Portions of the resolution for issue 230 have been superceded by
+the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#276">276</a>.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The original proposed resolution also included changes to input
+iterator, fill, and replace. The LWG believes that those changes are
+not necessary. The LWG considered some blanket statement, where an
+Assignable type was also required to be Copy Constructible, but
+decided against this because fill and replace really don't require the
+Copy Constructible property.</p>
+
+
+
+
+<hr>
+<h3><a name="231"></a>231. Precision in iostream?</h3>
+<p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> James Kanze, Stephen Clamage <b>Date:</b> 2000-04-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>What is the following program supposed to output?</p>
+<pre>#include &lt;iostream&gt;
+
+ int
+ main()
+ {
+ std::cout.setf( std::ios::scientific , std::ios::floatfield ) ;
+ std::cout.precision( 0 ) ;
+ std::cout &lt;&lt; 1.00 &lt;&lt; '\n' ;
+ return 0 ;
+ }</pre>
+<p>From my C experience, I would expect "1e+00"; this is what
+<tt>printf("%.0e" , 1.00 );</tt> does. G++ outputs
+"1.000000e+00".</p>
+
+<p>The only indication I can find in the standard is 22.2.2.2.2/11,
+where it says "For conversion from a floating-point type, if
+(flags &amp; fixed) != 0 or if str.precision() &gt; 0, then
+str.precision() is specified in the conversion specification."
+This is an obvious error, however, fixed is not a mask for a field,
+but a value that a multi-bit field may take -- the results of and'ing
+fmtflags with ios::fixed are not defined, at least not if
+ios::scientific has been set. G++'s behavior corresponds to what might
+happen if you do use (flags &amp; fixed) != 0 with a typical
+implementation (floatfield == 3 &lt;&lt; something, fixed == 1
+&lt;&lt; something, and scientific == 2 &lt;&lt; something).</p>
+
+<p>Presumably, the intent is either (flags &amp; floatfield) != 0, or
+(flags &amp; floatfield) == fixed; the first gives something more or
+less like the effect of precision in a printf floating point
+conversion. Only more or less, of course. In order to implement printf
+formatting correctly, you must know whether the precision was
+explicitly set or not. Say by initializing it to -1, instead of 6, and
+stating that for floating point conversions, if precision &lt; -1, 6
+will be used, for fixed point, if precision &lt; -1, 1 will be used,
+etc. Plus, of course, if precision == 0 and flags &amp; floatfield ==
+0, 1 should be = used. But it probably isn't necessary to emulate all
+of the anomalies of printf:-).</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Replace 22.2.2.2.2 [facet.num.put.virtuals], paragraph 11, with the following
+sentence:
+</p>
+<blockquote><p>
+For conversion from a floating-point type,
+<tt><i>str</i>.precision()</tt> is specified in the conversion
+specification.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The floatfield determines whether numbers are formatted as if
+with %f, %e, or %g. If the <tt>fixed</tt> bit is set, it's %f,
+if <tt>scientific</tt> it's %e, and if both bits are set, or
+neither, it's %g.</p>
+<p>Turning to the C standard, a precision of 0 is meaningful
+for %f and %e. For %g, precision 0 is taken to be the same as
+precision 1.</p>
+<p>The proposed resolution has the effect that if neither
+<tt>fixed</tt> nor <tt>scientific</tt> is set we'll be
+specifying a precision of 0, which will be internally
+turned into 1. There's no need to call it out as a special
+case.</p>
+<p>The output of the above program will be "1e+00".</p>
+
+<p><i>[Post-Curaçao: Howard provided improved wording covering the case
+where precision is 0 and mode is %g.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="232"></a>232. "depends" poorly defined in 17.4.3.1</h3>
+<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2000-04-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>17.4.3.1/1 uses the term "depends" to limit the set of allowed
+specializations of standard templates to those that "depend on a
+user-defined name of external linkage."</p>
+<p>This term, however, is not adequately defined, making it possible to
+construct a specialization that is, I believe, technically legal according to
+17.4.3.1/1, but that specializes a standard template for a built-in type such as
+'int'.</p>
+<p>The following code demonstrates the problem:</p>
+<blockquote>
+ <pre>#include &lt;algorithm&gt;</pre>
+ <pre>template&lt;class T&gt; struct X
+{
+ typedef T type;
+};</pre>
+ <pre>namespace std
+{
+ template&lt;&gt; void swap(::X&lt;int&gt;::type&amp; i, ::X&lt;int&gt;::type&amp; j);
+}</pre>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change "user-defined name" to "user-defined
+type".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This terminology is used in section 2.5.2 and 4.1.1 of <i>The C++
+Programming Language</i>. It disallows the example in the issue,
+since the underlying type itself is not user-defined. The only
+possible problem I can see is for non-type templates, but there's no
+possible way for a user to come up with a specialization for bitset,
+for example, that might not have already been specialized by the
+implementor?</p>
+
+<p><i>[Toronto: this may be related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a>.]</i></p>
+
+
+<p><i>[post-Toronto: Judy provided the above proposed resolution and
+rationale.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="233"></a>233. Insertion hints in associative containers</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-04-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#192">192</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#246">246</a></p>
+<p><b>Discussion:</b></p>
+<p>
+If <tt>mm</tt> is a multimap and <tt>p</tt> is an iterator
+into the multimap, then <tt>mm.insert(p, x)</tt> inserts
+<tt>x</tt> into <tt>mm</tt> with <tt>p</tt> as a hint as
+to where it should go. Table 69 claims that the execution time is
+amortized constant if the insert winds up taking place adjacent to
+<tt>p</tt>, but does not say when, if ever, this is guaranteed to
+happen. All it says it that <tt>p</tt> is a hint as to where to
+insert.
+</p>
+<p>
+The question is whether there is any guarantee about the relationship
+between <tt>p</tt> and the insertion point, and, if so, what it
+is.
+</p>
+<p>
+I believe the present state is that there is no guarantee: The user
+can supply <tt>p</tt>, and the implementation is allowed to
+disregard it entirely.
+</p>
+
+<p><b>Additional comments from Nathan:</b><br>
+
+The vote [in Redmond] was on whether to elaborately specify the use of
+the hint, or to require behavior only if the value could be inserted
+adjacent to the hint. I would like to ensure that we have a chance to
+vote for a deterministic treatment: "before, if possible, otherwise
+after, otherwise anywhere appropriate", as an alternative to the
+proposed "before or after, if possible, otherwise [...]".
+</p>
+
+<p><i>[Toronto: there was general agreement that this is a real defect:
+when inserting an element x into a multiset that already contains
+several copies of x, there is no way to know whether the hint will be
+used. The proposed resolution was that the new element should always
+be inserted as close to the hint as possible. So, for example, if
+there is a subsequence of equivalent values, then providing a.begin()
+as the hint means that the new element should be inserted before the
+subsequence even if a.begin() is far away. JC van Winkel supplied
+precise wording for this proposed resolution, and also for an
+alternative resolution in which hints are only used when they are
+adjacent to the insertion point.]</i></p>
+
+
+<p><i>[Copenhagen: the LWG agreed to the original proposed resolution,
+in which an insertion hint would be used even when it is far from the
+insertion point. This was contingent on seeing a reference
+implementation showing that it is possible to implement this
+requirement without loss of efficiency. John Potter provided such a
+reference implementation.]</i></p>
+
+
+<p><i>[Redmond: The LWG was reluctant to adopt the proposal that
+emerged from Copenhagen: it seemed excessively complicated, and went
+beyond fixing the defect that we identified in Toronto. PJP provided
+the new wording described in this issue. Nathan agrees that we
+shouldn't adopt the more detailed semantics, and notes: "we know that
+you can do it efficiently enough with a red-black tree, but there are
+other (perhaps better) balanced tree techniques that might differ
+enough to make the detailed semantics hard to satisfy."]</i></p>
+
+
+<p><i>[Curaçao: Nathan should give us the alternative wording he
+suggests so the LWG can decide between the two options.]</i></p>
+
+
+<p><i>[Lillehammer: The LWG previously rejected the more detailed
+ semantics, because it seemed more loike a new feature than like
+ defect fixing. We're now more sympathetic to it, but we (especially
+ Bill) are still worried about performance. N1780 describes a naive
+ algorithm, but it's not clear whether there is a non-naive
+ implementation. Is it possible to implement this as efficently as
+ the current version of insert?]</i></p>
+
+
+<p><i>[Post Lillehammer:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">N1780</a>
+updated in post meeting mailing with
+feedback from Lillehammer with more information regarding performance.
+]</i></p>
+
+
+<p><i>[
+Batavia:
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a>
+accepted with minor wording changes in the proposed wording (reflected in the
+proposed resolution below). Concerns about the performance of the algorithm
+were satisfactorily met by
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a>.
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a> already handles the stability of equal ranges
+and so that part of the resolution from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a>
+is no longer needed (or reflected in the proposed wording below).
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change the indicated rows of the "Associative container requirements" Table in
+23.1.2 [associative.reqmts] to:
+</p>
+
+<p></p><center>
+<table border="1">
+<caption>Associative container requirements</caption>
+<tbody><tr><th>expression</th> <th>return type</th>
+<th>assertion/note<br>pre/post-condition</th>
+<th>complexity</th></tr>
+<tr><td><tt>a_eq.insert(t)</tt></td>
+<td><tt>iterator</tt></td>
+<td>
+inserts <tt>t</tt> and returns the iterator pointing to the newly inserted
+element. <ins>If a range containing elements equivalent to <tt>t</tt> exists in
+<tt>a_eq</tt>, <tt>t</tt> is inserted at the end of that range.</ins>
+</td>
+<td>
+logarithmic
+</td></tr>
+<tr><td><tt>a.insert(p,t)</tt></td>
+<td><tt>iterator</tt></td>
+<td>
+inserts <tt>t</tt> if and only if there is no element with key equivalent to the
+key of <tt>t</tt> in containers with unique keys; always inserts <tt>t</tt> in containers
+with equivalent keys. always returns the iterator pointing to the element with key
+equivalent to the key of <tt>t</tt>. <del>iterator <tt>p</tt> is a hint pointing to where
+the insert should start to search.</del> <ins><tt>t</tt> is inserted as close as possible
+to the position just prior to <tt>p</tt>.</ins>
+</td>
+<td>
+logarithmic in general, but amortized constant if <tt>t</tt> is inserted right <del>after</del>
+ <ins>before</ins> <tt>p</tt>.
+</td></tr>
+</tbody></table>
+</center>
+
+
+
+
+
+
+<hr>
+<h3><a name="234"></a>234. Typos in allocator definition</h3>
+<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In paragraphs 12 and 13 the effects of <tt>construct()</tt> and
+<tt>destruct()</tt> are described as returns but the functions actually
+return <tt>void</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Substitute "Returns" by "Effect".</p>
+
+
+
+
+<hr>
+<h3><a name="235"></a>235. No specification of default ctor for reverse_iterator</h3>
+<p><b>Section:</b> 24.4.1.1 [reverse.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The declaration of <tt>reverse_iterator</tt> lists a default
+constructor. However, no specification is given what this constructor
+should do.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>In section 24.4.1.3.1 [reverse.iter.cons] add the following
+ paragraph:</p>
+ <blockquote>
+ <p><tt>reverse_iterator()</tt></p>
+
+ <p>Default initializes <tt>current</tt>. Iterator operations
+ applied to the resulting iterator have defined behavior if and
+ only if the corresponding operations are defined on a default
+ constructed iterator of type <tt>Iterator</tt>.</p>
+ </blockquote>
+ <p><i>[pre-Copenhagen: Dietmar provide wording for proposed
+ resolution.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="237"></a>237. Undefined expression in complexity specification</h3>
+<p><b>Section:</b> 23.2.2.1 [deque.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#deque.cons">issues</a> in [deque.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The complexity specification in paragraph 6 says that the complexity
+is linear in <tt>first - last</tt>. Even if <tt>operator-()</tt> is
+defined on iterators this term is in general undefined because it
+would have to be <tt>last - first</tt>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>Change paragraph 6 from</p>
+ <blockquote><p>Linear in <i>first - last</i>.</p></blockquote>
+ <p>to become</p>
+ <blockquote><p>Linear in <i>distance(first, last)</i>.</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="238"></a>238. Contradictory results of stringbuf initialization.</h3>
+<p><b>Section:</b> 27.7.1.1 [stringbuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-05-11</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 27.7.1.1 paragraph 4 the results of calling the constructor of
+'basic_stringbuf' are said to be <tt>str() == str</tt>. This is fine
+that far but consider this code:</p>
+
+<pre> std::basic_stringbuf&lt;char&gt; sbuf("hello, world", std::ios_base::openmode(0));
+ std::cout &lt;&lt; "'" &lt;&lt; sbuf.str() &lt;&lt; "'\n";
+</pre>
+
+<p>Paragraph 3 of 27.7.1.1 basically says that in this case neither
+the output sequence nor the input sequence is initialized and
+paragraph 2 of 27.7.1.2 basically says that <tt>str()</tt> either
+returns the input or the output sequence. None of them is initialized,
+ie. both are empty, in which case the return from <tt>str()</tt> is
+defined to be <tt>basic_string&lt;cT&gt;()</tt>.</p>
+
+<p>However, probably only test cases in some testsuites will detect this
+"problem"...</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove 27.7.1.1 paragraph 4.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>We could fix 27.7.1.1 paragraph 4, but there would be no point. If
+we fixed it, it would say just the same thing as text that's already
+in the standard.</p>
+
+
+
+
+<hr>
+<h3><a name="239"></a>239. Complexity of unique() and/or unique_copy incorrect</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The complexity of unique and unique_copy are inconsistent with each
+other and inconsistent with the implementations.&nbsp; The standard
+specifies:</p>
+
+<p>for unique():</p>
+
+<blockquote><p>-3- Complexity: If the range (last - first) is not empty, exactly
+(last - first) - 1 applications of the corresponding predicate, otherwise
+no applications of the predicate.</p></blockquote>
+
+<p>for unique_copy():</p>
+
+<blockquote><p>-7- Complexity: Exactly last - first applications of the corresponding
+predicate.</p></blockquote>
+
+<p>
+The implementations do it the other way round: unique() applies the
+predicate last-first times and unique_copy() applies it last-first-1
+times.</p>
+
+<p>As both algorithms use the predicate for pair-wise comparison of
+sequence elements I don't see a justification for unique_copy()
+applying the predicate last-first times, especially since it is not
+specified to which pair in the sequence the predicate is applied
+twice.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change both complexity sections in 25.2.9 [alg.unique] to:</p>
+
+<blockquote><p>Complexity: For nonempty ranges, exactly last - first - 1
+applications of the corresponding predicate.</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="240"></a>240. Complexity of adjacent_find() is meaningless</h3>
+<p><b>Section:</b> 25.1.5 [alg.adjacent.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The complexity section of adjacent_find is defective:</p>
+
+<blockquote>
+<pre>template &lt;class ForwardIterator&gt;
+ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last
+ BinaryPredicate pred);
+</pre>
+
+<p>-1- Returns: The first iterator i such that both i and i + 1 are in
+the range [first, last) for which the following corresponding
+conditions hold: *i == *(i + 1), pred(*i, *(i + 1)) != false. Returns
+last if no such iterator is found.</p>
+
+<p>-2- Complexity: Exactly find(first, last, value) - first applications
+of the corresponding predicate.
+</p>
+</blockquote>
+
+<p>In the Complexity section, it is not defined what "value"
+is supposed to mean. My best guess is that "value" means an
+object for which one of the conditions pred(*i,value) or
+pred(value,*i) is true, where i is the iterator defined in the Returns
+section. However, the value type of the input sequence need not be
+equality-comparable and for this reason the term find(first, last,
+value) - first is meaningless.</p>
+
+<p>A term such as find_if(first, last, bind2nd(pred,*i)) - first or
+find_if(first, last, bind1st(pred,*i)) - first might come closer to
+the intended specification. Binders can only be applied to function
+objects that have the function call operator declared const, which is
+not required of predicates because they can have non-const data
+members. For this reason, a specification using a binder could only be
+an "as-if" specification.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the complexity section in 25.1.5 [alg.adjacent.find] to:</p>
+<blockquote><p>
+For a nonempty range, exactly <tt>min((<i>i</i> - <i>first</i>) + 1,
+(<i>last</i> - <i>first</i>) - 1)</tt> applications of the
+corresponding predicate, where <i>i</i> is <tt>adjacent_find</tt>'s
+return value.
+</p></blockquote>
+
+<p><i>[Copenhagen: the original resolution specified an upper
+bound. The LWG preferred an exact count.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="241"></a>241. Does unique_copy() require CopyConstructible and Assignable?</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>Some popular implementations of unique_copy() create temporary
+copies of values in the input sequence, at least if the input iterator
+is a pointer. Such an implementation is built on the assumption that
+the value type is CopyConstructible and Assignable.</p>
+
+<p>It is common practice in the standard that algorithms explicitly
+specify any additional requirements that they impose on any of the
+types used by the algorithm. An example of an algorithm that creates
+temporary copies and correctly specifies the additional requirements
+is accumulate(), 26.4.1 [rand.req].</p>
+
+<p>Since the specifications of unique() and unique_copy() do not
+require CopyConstructible and Assignable of the InputIterator's value
+type the above mentioned implementations are not standard-compliant. I
+cannot judge whether this is a defect in the standard or a defect in
+the implementations.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 25.2.8 change:</p>
+
+<blockquote><p>
+-4- Requires: The ranges [first, last) and [result, result+(last-first))
+shall not overlap.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote>
+ <p>-4- Requires: The ranges [first, last) and [result,
+ result+(last-first)) shall not overlap. The expression *result =
+ *first must be valid. If neither InputIterator nor OutputIterator
+ meets the requirements of forward iterator then the value type of
+ InputIterator must be copy constructible. Otherwise copy
+ constructible is not required. </p>
+</blockquote>
+
+<p><i>[Redmond: the original proposed resolution didn't impose an
+explicit requirement that the iterator's value type must be copy
+constructible, on the grounds that an input iterator's value type must
+always be copy constructible. Not everyone in the LWG thought that
+this requirement was clear from table 72. It has been suggested that
+it might be possible to implement <tt>unique_copy</tt> without
+requiring assignability, although current implementations do impose
+that requirement. Howard provided new wording.]</i></p>
+
+
+<p><i>[
+Curaçao: The LWG changed the PR editorially to specify
+"neither...nor...meet..." as clearer than
+"both...and...do not meet...". Change believed to be so
+minor as not to require re-review.
+]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="242"></a>242. Side effects of function objects</h3>
+<p><b>Section:</b> 25.2.4 [alg.transform], 26.4 [rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.transform">issues</a> in [alg.transform].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The algorithms transform(), accumulate(), inner_product(),
+partial_sum(), and adjacent_difference() require that the function
+object supplied to them shall not have any side effects.</p>
+
+<p>The standard defines a side effect in 1.9 [intro.execution] as:</p>
+<blockquote><p>-7- Accessing an object designated by a volatile lvalue (basic.lval),
+modifying an object, calling a library I/O function, or calling a function
+that does any of those operations are all side effects, which are changes
+in the state of the execution environment.</p></blockquote>
+
+<p>As a consequence, the function call operator of a function object supplied
+to any of the algorithms listed above cannot modify data members, cannot
+invoke any function that has a side effect, and cannot even create and
+modify temporary objects.&nbsp; It is difficult to imagine a function object
+that is still useful under these severe limitations. For instance, any
+non-trivial transformator supplied to transform() might involve creation
+and modification of temporaries, which is prohibited according to the current
+wording of the standard.</p>
+
+<p>On the other hand, popular implementations of these algorithms exhibit
+uniform and predictable behavior when invoked with a side-effect-producing
+function objects. It looks like the strong requirement is not needed for
+efficient implementation of these algorithms.</p>
+
+<p>The requirement of&nbsp; side-effect-free function objects could be
+replaced by a more relaxed basic requirement (which would hold for all
+function objects supplied to any algorithm in the standard library):</p>
+<blockquote><p>A function objects supplied to an algorithm shall not invalidate
+any iterator or sequence that is used by the algorithm. Invalidation of
+the sequence includes destruction of the sorting order if the algorithm
+relies on the sorting order (see section 25.3 - Sorting and related operations
+[lib.alg.sorting]).</p></blockquote>
+
+<p>I can't judge whether it is intended that the function objects supplied
+to transform(), accumulate(), inner_product(), partial_sum(), or adjacent_difference()
+shall not modify sequence elements through dereferenced iterators.</p>
+
+<p>It is debatable whether this issue is a defect or a change request.
+Since the consequences for user-supplied function objects are drastic and
+limit the usefulness of the algorithms significantly I would consider it
+a defect.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>Things to notice about these changes:</i></p>
+
+<ol>
+<li> <i>The fully-closed ("[]" as opposed to half-closed "[)" ranges
+ are intentional. we want to prevent side-effects from
+ invalidating the end iterators.</i></li>
+
+<li> <i>That has the unintentional side-effect of prohibiting
+ modification of the end element as a side-effect. This could
+ conceivably be significant in some cases.</i></li>
+
+<li> <i>The wording also prevents side-effects from modifying elements
+ of the output sequence. I can't imagine why anyone would want
+ to do this, but it is arguably a restriction that implementors
+ don't need to place on users.</i></li>
+
+<li> <i>Lifting the restrictions imposed in #2 and #3 above is possible
+ and simple, but would require more verbiage.</i></li>
+</ol>
+
+<p>Change 25.2.3/2 from:</p>
+
+<blockquote><p>
+ -2- Requires: op and binary_op shall not have any side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -2- Requires: in the ranges [first1, last1], [first2, first2 +
+ (last1 - first1)] and [result, result + (last1- first1)], op and
+ binary_op shall neither modify elements nor invalidate iterators or
+ subranges.
+ [Footnote: The use of fully closed ranges is intentional --end footnote]
+</p></blockquote>
+
+
+<p>Change 25.2.3/2 from:</p>
+
+<blockquote><p>
+ -2- Requires: op and binary_op shall not have any side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -2- Requires: op and binary_op shall not invalidate iterators or
+ subranges, or modify elements in the ranges [first1, last1],
+ [first2, first2 + (last1 - first1)], and [result, result + (last1
+ - first1)].
+ [Footnote: The use of fully closed ranges is intentional --end footnote]
+</p></blockquote>
+
+
+<p>Change 26.4.1/2 from:</p>
+
+<blockquote><p>
+ -2- Requires: T must meet the requirements of CopyConstructible
+ (lib.copyconstructible) and Assignable (lib.container.requirements)
+ types. binary_op shall not cause side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -2- Requires: T must meet the requirements of CopyConstructible
+ (lib.copyconstructible) and Assignable
+ (lib.container.requirements) types. In the range [first, last],
+ binary_op shall neither modify elements nor invalidate iterators
+ or subranges.
+ [Footnote: The use of a fully closed range is intentional --end footnote]
+</p></blockquote>
+
+<p>Change 26.4.2/2 from:</p>
+
+<blockquote><p>
+ -2- Requires: T must meet the requirements of CopyConstructible
+ (lib.copyconstructible) and Assignable (lib.container.requirements)
+ types. binary_op1 and binary_op2 shall not cause side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -2- Requires: T must meet the requirements of CopyConstructible
+ (lib.copyconstructible) and Assignable (lib.container.requirements)
+ types. In the ranges [first, last] and [first2, first2 + (last -
+ first)], binary_op1 and binary_op2 shall neither modify elements
+ nor invalidate iterators or subranges.
+ [Footnote: The use of fully closed ranges is intentional --end footnote]
+</p></blockquote>
+
+
+<p>Change 26.4.3/4 from:</p>
+
+<blockquote><p>
+ -4- Requires: binary_op is expected not to have any side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -4- Requires: In the ranges [first, last] and [result, result +
+ (last - first)], binary_op shall neither modify elements nor
+ invalidate iterators or subranges.
+ [Footnote: The use of fully closed ranges is intentional --end footnote]
+</p></blockquote>
+
+<p>Change 26.4.4/2 from:</p>
+
+<blockquote><p>
+ -2- Requires: binary_op shall not have any side effects.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -2- Requires: In the ranges [first, last] and [result, result +
+ (last - first)], binary_op shall neither modify elements nor
+ invalidate iterators or subranges.
+ [Footnote: The use of fully closed ranges is intentional --end footnote]
+</p></blockquote>
+
+<p><i>[Toronto: Dave Abrahams supplied wording.]</i></p>
+
+
+<p><i>[Copenhagen: Proposed resolution was modified slightly. Matt
+added footnotes pointing out that the use of closed ranges was
+intentional.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="243"></a>243. <tt>get</tt> and <tt>getline</tt> when sentry reports failure</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>basic_istream&lt;&gt;::get(), and basic_istream&lt;&gt;::getline(),
+are unclear with respect to the behavior and side-effects of the named
+functions in case of an error.</p>
+
+<p>27.6.1.3, p1 states that "... If the sentry object returns
+true, when converted to a value of type bool, the function endeavors
+to obtain the requested input..." It is not clear from this (or
+the rest of the paragraph) what precisely the behavior should be when
+the sentry ctor exits by throwing an exception or when the sentry
+object returns false. In particular, what is the number of characters
+extracted that gcount() returns supposed to be?</p>
+
+<p>27.6.1.3 p8 and p19 say about the effects of get() and getline():
+"... In any case, it then stores a null character (using
+charT()) into the next successive location of the array." Is not
+clear whether this sentence applies if either of the conditions above
+holds (i.e., when sentry fails).</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to 27.6.1.3, p1 after the sentence</p>
+
+<blockquote><p>
+"... If the sentry object returns true, when converted to a value of
+type bool, the function endeavors to obtain the requested input."
+</p></blockquote>
+
+<p>the following</p>
+
+
+<blockquote><p>
+"Otherwise, if the sentry constructor exits by throwing an exception or
+if the sentry object returns false, when converted to a value of type
+bool, the function returns without attempting to obtain any input. In
+either case the number of extracted characters is set to 0; unformatted
+input functions taking a character array of non-zero size as an argument
+shall also store a null character (using charT()) in the first location
+of the array."
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Although the general philosophy of the input functions is that the
+argument should not be modified upon failure, <tt>getline</tt>
+historically added a terminating null unconditionally. Most
+implementations still do that. Earlier versions of the draft standard
+had language that made this an unambiguous requirement; those words
+were moved to a place where their context made them less clear. See
+Jerry Schwarz's message c++std-lib-7618.</p>
+
+
+
+
+<hr>
+<h3><a name="247"></a>247. <tt>vector</tt>, <tt>deque::insert</tt> complexity</h3>
+<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 2000-06-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 2 of 23.2.5.4 [vector.modifiers] describes the complexity
+of <tt>vector::insert</tt>:</p>
+
+ <blockquote><p>
+ Complexity: If first and last are forward iterators, bidirectional
+ iterators, or random access iterators, the complexity is linear in
+ the number of elements in the range [first, last) plus the distance
+ to the end of the vector. If they are input iterators, the complexity
+ is proportional to the number of elements in the range [first, last)
+ times the distance to the end of the vector.
+ </p></blockquote>
+
+<p>First, this fails to address the non-iterator forms of
+<tt>insert</tt>.</p>
+
+<p>Second, the complexity for input iterators misses an edge case --
+it requires that an arbitrary number of elements can be added at
+the end of a <tt>vector</tt> in constant time.</p>
+
+<p>I looked to see if <tt>deque</tt> had a similar problem, and was
+surprised to find that <tt>deque</tt> places no requirement on the
+complexity of inserting multiple elements (23.2.2.3 [deque.modifiers],
+paragraph 3):</p>
+
+ <blockquote><p>
+ Complexity: In the worst case, inserting a single element into a
+ deque takes time linear in the minimum of the distance from the
+ insertion point to the beginning of the deque and the distance
+ from the insertion point to the end of the deque. Inserting a
+ single element either at the beginning or end of a deque always
+ takes constant time and causes a single call to the copy constructor
+ of T.
+ </p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change Paragraph 2 of 23.2.5.4 [vector.modifiers] to</p>
+ <blockquote><p>
+ Complexity: The complexity is linear in the number of elements
+ inserted plus the distance to the end of the vector.
+ </p></blockquote>
+
+ <p><i>[For input iterators, one may achieve this complexity by first
+ inserting at the end of the <tt>vector</tt>, and then using
+ <tt>rotate</tt>.]</i></p>
+
+
+<p>Change 23.2.2.3 [deque.modifiers], paragraph 3, to:</p>
+
+ <blockquote><p>
+ Complexity: The complexity is linear in the number of elements
+ inserted plus the shorter of the distances to the beginning and
+ end of the deque. Inserting a single element at either the
+ beginning or the end of a deque causes a single call to the copy
+ constructor of T.
+ </p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This is a real defect, and proposed resolution fixes it: some
+ complexities aren't specified that should be. This proposed
+ resolution does constrain deque implementations (it rules out the
+ most naive possible implementations), but the LWG doesn't see a
+ reason to permit that implementation.</p>
+
+
+
+
+
+<hr>
+<h3><a name="248"></a>248. time_get fails to set eofbit</h3>
+<p><b>Section:</b> 22.2.5 [category.time] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-06-22</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>There is no requirement that any of time_get member functions set
+ios::eofbit when they reach the end iterator while parsing their input.
+Since members of both the num_get and money_get facets are required to
+do so (22.2.2.1.2, and 22.2.6.1.2, respectively), time_get members
+should follow the same requirement for consistency.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add paragraph 2 to section 22.2.5.1 with the following text:</p>
+
+<blockquote><p>
+If the end iterator is reached during parsing by any of the get()
+member functions, the member sets ios_base::eofbit in err.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Two alternative resolutions were proposed. The LWG chose this one
+because it was more consistent with the way eof is described for other
+input facets.</p>
+
+
+
+
+<hr>
+<h3><a name="250"></a>250. splicing invalidates iterators</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Brian Parker <b>Date:</b> 2000-07-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 23.2.3.4 [list.ops] states that
+</p>
+<pre> void splice(iterator position, list&lt;T, Allocator&gt;&amp; x);
+</pre>
+<p>
+<i>invalidates</i> all iterators and references to list <tt>x</tt>.
+</p>
+
+<p>
+This is unnecessary and defeats an important feature of splice. In
+fact, the SGI STL guarantees that iterators to <tt>x</tt> remain valid
+after <tt>splice</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add a footnote to 23.2.3.4 [list.ops], paragraph 1:</p>
+<blockquote><p>
+[<i>Footnote:</i> As specified in [default.con.req], paragraphs
+4-5, the semantics described in this clause applies only to the case
+where allocators compare equal. --end footnote]
+</p></blockquote>
+
+<p>In 23.2.3.4 [list.ops], replace paragraph 4 with:</p>
+<blockquote><p>
+Effects: Inserts the contents of x before position and x becomes
+empty. Pointers and references to the moved elements of x now refer to
+those same elements but as members of *this. Iterators referring to the
+moved elements will continue to refer to their elements, but they now
+behave as iterators into *this, not into x.
+</p></blockquote>
+
+<p>In 23.2.3.4 [list.ops], replace paragraph 7 with:</p>
+<blockquote><p>
+Effects: Inserts an element pointed to by i from list x before
+position and removes the element from x. The result is unchanged if
+position == i or position == ++i. Pointers and references to *i continue
+to refer to this same element but as a member of *this. Iterators to *i
+(including i itself) continue to refer to the same element, but now
+behave as iterators into *this, not into x.
+</p></blockquote>
+
+<p>In 23.2.3.4 [list.ops], replace paragraph 12 with:</p>
+<blockquote><p>
+Requires: [first, last) is a valid range in x. The result is
+undefined if position is an iterator in the range [first, last).
+Pointers and references to the moved elements of x now refer to those
+same elements but as members of *this. Iterators referring to the moved
+elements will continue to refer to their elements, but they now behave as
+iterators into *this, not into x.
+</p></blockquote>
+
+<p><i>[pre-Copenhagen: Howard provided wording.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The original proposed resolution said that iterators and references
+would remain "valid". The new proposed resolution clarifies what that
+means. Note that this only applies to the case of equal allocators.
+From [default.con.req] paragraph 4, the behavior of list when
+allocators compare nonequal is outside the scope of the standard.</p>
+
+
+
+
+<hr>
+<h3><a name="251"></a>251. basic_stringbuf missing allocator_type</h3>
+<p><b>Section:</b> 27.7.1 [stringbuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-07-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The synopsis for the template class <tt>basic_stringbuf</tt>
+doesn't list a typedef for the template parameter
+<tt>Allocator</tt>. This makes it impossible to determine the type of
+the allocator at compile time. It's also inconsistent with all other
+template classes in the library that do provide a typedef for the
+<tt>Allocator</tt> parameter.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to the synopses of the class templates basic_stringbuf (27.7.1),
+basic_istringstream (27.7.2), basic_ostringstream (27.7.3), and
+basic_stringstream (27.7.4) the typedef:</p>
+<pre> typedef Allocator allocator_type;
+</pre>
+
+
+
+
+<hr>
+<h3><a name="252"></a>252. missing casts/C-style casts used in iostreams</h3>
+<p><b>Section:</b> 27.7 [string.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-07-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.7.2.2, p1 uses a C-style cast rather than the more appropriate
+const_cast&lt;&gt; in the Returns clause for basic_istringstream&lt;&gt;::rdbuf().
+The same C-style cast is being used in 27.7.3.2, p1, D.7.2.2, p1, and
+D.7.3.2, p1, and perhaps elsewhere. 27.7.6, p1 and D.7.2.2, p1 are missing
+the cast altogether.</p>
+
+<p>C-style casts have not been deprecated, so the first part of this
+issue is stylistic rather than a matter of correctness.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.7.2.2, p1 replace </p>
+<pre> -1- Returns: (basic_stringbuf&lt;charT,traits,Allocator&gt;*)&amp;sb.</pre>
+
+<p>with</p>
+<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
+
+
+<p>In 27.7.3.2, p1 replace</p>
+<pre> -1- Returns: (basic_stringbuf&lt;charT,traits,Allocator&gt;*)&amp;sb.</pre>
+
+<p>with</p>
+<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
+
+<p>In 27.7.6, p1, replace</p>
+<pre> -1- Returns: &amp;sb</pre>
+
+<p>with</p>
+<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
+
+<p>In D.7.2.2, p1 replace</p>
+<pre> -2- Returns: &amp;sb. </pre>
+
+<p>with</p>
+<pre> -2- Returns: const_cast&lt;strstreambuf*&gt;(&amp;sb).</pre>
+
+
+
+
+<hr>
+<h3><a name="253"></a>253. valarray helper functions are almost entirely useless</h3>
+<p><b>Section:</b> 26.5.2.1 [valarray.cons], 26.5.2.2 [valarray.assign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Robert Klarer <b>Date:</b> 2000-07-31</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>This discussion is adapted from message c++std-lib-7056 posted
+November 11, 1999. I don't think that anyone can reasonably claim
+that the problem described below is NAD.</p>
+
+<p>These valarray constructors can never be called:</p>
+
+<pre> template &lt;class T&gt;
+ valarray&lt;T&gt;::valarray(const slice_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt;::valarray(const gslice_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt;::valarray(const mask_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt;::valarray(const indirect_array&lt;T&gt; &amp;);
+</pre>
+
+<p>Similarly, these valarray assignment operators cannot be
+called:</p>
+
+<pre> template &lt;class T&gt;
+ valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const slice_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const gslice_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const mask_array&lt;T&gt; &amp;);
+ template &lt;class T&gt;
+ valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const indirect_array&lt;T&gt; &amp;);
+</pre>
+
+<p>Please consider the following example:</p>
+
+<pre> #include &lt;valarray&gt;
+ using namespace std;
+
+ int main()
+ {
+ valarray&lt;double&gt; va1(12);
+ valarray&lt;double&gt; va2(va1[slice(1,4,3)]); // line 1
+ }
+</pre>
+
+
+<p>Since the valarray va1 is non-const, the result of the sub-expression
+va1[slice(1,4,3)] at line 1 is an rvalue of type const
+std::slice_array&lt;double&gt;. This slice_array rvalue is then used to
+construct va2. The constructor that is used to construct va2 is
+declared like this:</p>
+
+<pre> template &lt;class T&gt;
+ valarray&lt;T&gt;::valarray(const slice_array&lt;T&gt; &amp;);
+</pre>
+
+<p>Notice the constructor's const reference parameter. When the
+constructor is called, a slice_array must be bound to this reference.
+The rules for binding an rvalue to a const reference are in 8.5.3,
+paragraph 5 (see also 13.3.3.1.4). Specifically, paragraph 5
+indicates that a second slice_array rvalue is constructed (in this
+case copy-constructed) from the first one; it is this second rvalue
+that is bound to the reference parameter. Paragraph 5 also requires
+that the constructor that is used for this purpose be callable,
+regardless of whether the second rvalue is elided. The
+copy-constructor in this case is not callable, however, because it is
+private. Therefore, the compiler should report an error.</p>
+
+<p>Since slice_arrays are always rvalues, the valarray constructor that has a
+parameter of type const slice_array&lt;T&gt; &amp; can never be called. The
+same reasoning applies to the three other constructors and the four
+assignment operators that are listed at the beginning of this post.
+Furthermore, since these functions cannot be called, the valarray helper
+classes are almost entirely useless.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>slice_array:</p>
+<ul>
+<li> Make the copy constructor and copy-assignment operator declarations
+ public in the slice_array class template definition in 26.5.5 [template.slice.array] </li>
+<li> remove paragraph 3 of 26.5.5 [template.slice.array]</li>
+<li> remove the copy constructor declaration from [cons.slice.arr]</li>
+<li> change paragraph 1 of [cons.slice.arr] to read "This constructor is declared
+ to be private. This constructor need not be defined."</li>
+<li> remove the first sentence of paragraph 1 of 26.5.5.1 [slice.arr.assign]</li>
+<li> Change the first three words of the second sentence of paragraph 1 of
+ 26.5.5.1 [slice.arr.assign] to "These assignment operators have"</li>
+</ul>
+
+<p>gslice_array:</p>
+<ul>
+<li> Make the copy constructor and copy-assignment operator declarations
+ public in the gslice_array class template definition in 26.5.7 [template.gslice.array] </li>
+<li> remove the note in paragraph 3 of 26.5.7 [template.gslice.array]</li>
+<li> remove the copy constructor declaration from [gslice.array.cons]</li>
+<li> change paragraph 1 of [gslice.array.cons] to read "This constructor is declared
+ to be private. This constructor need not be defined."</li>
+<li> remove the first sentence of paragraph 1 of 26.5.7.1 [gslice.array.assign]</li>
+<li> Change the first three words of the second sentence of paragraph 1 of
+ 26.5.7.1 [gslice.array.assign] to "These assignment operators have"</li>
+</ul>
+
+<p>mask_array:</p>
+<ul>
+<li> Make the copy constructor and copy-assignment operator declarations
+ public in the mask_array class template definition in 26.5.8 [template.mask.array] </li>
+<li> remove the note in paragraph 2 of 26.5.8 [template.mask.array]</li>
+<li> remove the copy constructor declaration from [mask.array.cons]</li>
+<li> change paragraph 1 of [mask.array.cons] to read "This constructor is declared
+ to be private. This constructor need not be defined."</li>
+<li> remove the first sentence of paragraph 1 of 26.5.8.1 [mask.array.assign]</li>
+<li> Change the first three words of the second sentence of paragraph 1 of
+ 26.5.8.1 [mask.array.assign] to "These assignment operators have"</li>
+</ul>
+
+<p>indirect_array:</p>
+<ul>
+<li>Make the copy constructor and copy-assignment operator declarations
+ public in the indirect_array class definition in 26.5.9 [template.indirect.array]</li>
+<li> remove the note in paragraph 2 of 26.5.9 [template.indirect.array]</li>
+<li> remove the copy constructor declaration from [indirect.array.cons]</li>
+<li> change the descriptive text in [indirect.array.cons] to read "This constructor is
+ declared to be private. This constructor need not be defined."</li>
+<li> remove the first sentence of paragraph 1 of 26.5.9.1 [indirect.array.assign]</li>
+<li> Change the first three words of the second sentence of paragraph 1 of
+ 26.5.9.1 [indirect.array.assign] to "These assignment operators have"</li>
+</ul>
+<p><i>[Proposed resolution was modified in Santa Cruz: explicitly make
+copy constructor and copy assignment operators public, instead of
+removing them.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Keeping the valarray constructors private is untenable. Merely
+making valarray a friend of the helper classes isn't good enough,
+because access to the copy constructor is checked in the user's
+environment.</p>
+
+<p>Making the assignment operator public is not strictly necessary to
+solve this problem. A majority of the LWG <i>(straw poll: 13-4)</i>
+believed we should make the assignment operators public, in addition
+to the copy constructors, for reasons of symmetry and user
+expectation.</p>
+
+
+
+
+
+<hr>
+<h3><a name="254"></a>254. Exception types in clause 19 are constructed from <tt>std::string</tt></h3>
+<p><b>Section:</b> 19.1 [std.exceptions], 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-08-01</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Many of the standard exception types which implementations are
+required to throw are constructed with a const std::string&amp;
+parameter. For example:
+</p>
+
+<pre> 19.1.5 Class out_of_range [lib.out.of.range]
+ namespace std {
+ class out_of_range : public logic_error {
+ public:
+ explicit out_of_range(const string&amp; what_arg);
+ };
+ }
+
+ 1 The class out_of_range defines the type of objects thrown as excep-
+ tions to report an argument value not in its expected range.
+
+ out_of_range(const string&amp; what_arg);
+
+ Effects:
+ Constructs an object of class out_of_range.
+ Postcondition:
+ strcmp(what(), what_arg.c_str()) == 0.
+</pre>
+
+<p>
+There are at least two problems with this:
+</p>
+<ol>
+<li>A program which is low on memory may end up throwing
+std::bad_alloc instead of out_of_range because memory runs out while
+constructing the exception object.</li>
+<li>An obvious implementation which stores a std::string data member
+may end up invoking terminate() during exception unwinding because the
+exception object allocates memory (or rather fails to) as it is being
+copied.</li>
+</ol>
+
+<p>
+There may be no cure for (1) other than changing the interface to
+out_of_range, though one could reasonably argue that (1) is not a
+defect. Personally I don't care that much if out-of-memory is reported
+when I only have 20 bytes left, in the case when out_of_range would
+have been reported. People who use exception-specifications might care
+a lot, though.
+</p>
+
+<p>
+There is a cure for (2), but it isn't completely obvious. I think a
+note for implementors should be made in the standard. Avoiding
+possible termination in this case shouldn't be left up to chance. The
+cure is to use a reference-counted "string" implementation
+in the exception object. I am not necessarily referring to a
+std::string here; any simple reference-counting scheme for a NTBS
+would do.
+</p>
+
+<p><b>Further discussion, in email:</b></p>
+
+<p>
+...I'm not so concerned about (1). After all, a library implementation
+can add const char* constructors as an extension, and users don't
+<i>need</i> to avail themselves of the standard exceptions, though this is
+a lame position to be forced into. FWIW, std::exception and
+std::bad_alloc don't require a temporary basic_string.
+</p>
+
+<p>
+...I don't think the fixed-size buffer is a solution to the problem,
+strictly speaking, because you can't satisfy the postcondition
+<br>
+ <tt>&nbsp;&nbsp;strcmp(what(), what_arg.c_str()) == 0</tt>
+<br>
+For all values of what_arg (i.e. very long values). That means that
+the only truly conforming solution requires a dynamic allocation.
+</p>
+
+<p><b>Further discussion, from Redmond:</b></p>
+
+<p>The most important progress we made at the Redmond meeting was
+realizing that there are two separable issues here: the const
+string&amp; constructor, and the copy constructor. If a user writes
+something like <tt>throw std::out_of_range("foo")</tt>, the const
+string&amp; constructor is invoked before anything gets thrown. The
+copy constructor is potentially invoked during stack unwinding.</p>
+
+<p>The copy constructor is a more serious problem, becuase failure
+during stack unwinding invokes <tt>terminate</tt>. The copy
+constructor must be nothrow. <i>Curaçao: Howard thinks this
+requirement may already be present.</i></p>
+
+<p>The fundamental problem is that it's difficult to get the nothrow
+requirement to work well with the requirement that the exception
+objects store a string of unbounded size, particularly if you also try
+to make the const string&amp; constructor nothrow. Options discussed
+include:</p>
+
+<ul>
+<li>Limit the size of a string that exception objects are required to
+throw: change the postconditions of 19.1.2 [domain.error] paragraph 3
+and 19.1.6 [runtime.error] paragraph 3 to something like this:
+"strncmp(what(), what_arg._str(), N) == 0, where N is an
+implementation defined constant no smaller than 256".</li>
+<li>Allow the const string&amp; constructor to throw, but not the
+copy constructor. It's the implementor's responsibility to get it
+right. (An implementor might use a simple refcount class.)</li>
+<li>Compromise between the two: an implementation is not allowed to
+throw if the string's length is less than some N, but, if it doesn't
+throw, the string must compare equal to the argument.</li>
+<li>Add a new constructor that takes a const char*</li>
+</ul>
+
+<p>(Not all of these options are mutually exclusive.)</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 19.1.1 [logic.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class logic_error : public exception {
+ public:
+ explicit logic_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit logic_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>logic_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>logic_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.2 [domain.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class domain_error : public logic_error {
+ public:
+ explicit domain_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit domain_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>domain_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>domain_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+
+</blockquote>
+</blockquote>
+
+<p>
+Change 19.1.3 [invalid.argument]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class invalid_argument : public logic_error {
+ public:
+ explicit invalid_argument(const string&amp; <i>what_arg</i>);
+ <ins>explicit invalid_argument(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>invalid_argument(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>invalid_argument</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.4 [length.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class length_error : public logic_error {
+ public:
+ explicit length_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit length_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>length_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>length_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.5 [out.of.range]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class out_of_range : public logic_error {
+ public:
+ explicit out_of_range(const string&amp; <i>what_arg</i>);
+ <ins>explicit out_of_range(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>out_of_range(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>out_of_range</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.6 [runtime.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class runtime_error : public exception {
+ public:
+ explicit runtime_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit runtime_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>runtime_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>runtime_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.7 [range.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class range_error : public runtime_error {
+ public:
+ explicit range_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit range_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>range_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>range_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.8 [overflow.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class overflow_error : public runtime_error {
+ public:
+ explicit overflow_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit overflow_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>overflow_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>overflow_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 19.1.9 [underflow.error]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class underflow_error : public runtime_error {
+ public:
+ explicit underflow_error(const string&amp; <i>what_arg</i>);
+ <ins>explicit underflow_error(const char* <i>what_arg</i>);</ins>
+ };
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>underflow_error(const char* <i>what_arg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>underflow_error</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+<p>
+Change 27.4.2.1.1 [ios::failure]
+</p>
+
+<blockquote>
+<pre>namespace std {
+ class ios_base::failure : public exception {
+ public:
+ explicit failure(const string&amp; <i>msg</i>);
+ <ins>explicit failure(const char* <i>msg</i>);</ins>
+ virtual const char* what() const throw();
+};
+}
+</pre>
+<p>...</p>
+<p>
+<ins><tt>failure(const char* <i>msg</i>);</tt></ins>
+</p>
+<blockquote>
+<p><ins>
+-4- <i>Effects:</i> Constructs an object of class <tt>failure</tt>.
+</ins></p>
+<p><ins>
+-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>msg</i>) == 0</tt>.
+</ins></p>
+</blockquote>
+
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+
+<p>Throwing a bad_alloc while trying to construct a message for another
+exception-derived class is not necessarily a bad thing. And the
+bad_alloc constructor already has a no throw spec on it (18.4.2.1).</p>
+
+<p><b>Future:</b></p>
+
+<p>All involved would like to see const char* constructors added, but
+this should probably be done for C++0X as opposed to a DR.</p>
+
+<p>I believe the no throw specs currently decorating these functions
+could be improved by some kind of static no throw spec checking
+mechanism (in a future C++ language). As they stand, the copy
+constructors might fail via a call to unexpected. I think what is
+intended here is that the copy constructors can't fail.</p>
+
+<p><i>[Pre-Sydney: reopened at the request of Howard Hinnant.
+ Post-Redmond: James Kanze noticed that the copy constructors of
+ exception-derived classes do not have nothrow clauses. Those
+ classes have no copy constructors declared, meaning the
+ compiler-generated implicit copy constructors are used, and those
+ compiler-generated constructors might in principle throw anything.]</i></p>
+
+
+<p><i>[
+Batavia: Merged copy constructor and assignment operator spec into <tt>exception</tt>
+and added <tt>ios::failure</tt> into the proposed resolution.
+]</i></p>
+
+
+<p><i>[
+Oxford: The proposed resolution simply addresses the issue of constructing
+the exception objects with <tt>const char*</tt> and string literals without
+the need to explicit include or construct a <tt>std::string</tt>.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="256"></a>256. typo in 27.4.4.2, p17: copy_event does not exist</h3>
+<p><b>Section:</b> 27.4.4.2 [basic.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.members">issues</a> in [basic.ios.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+27.4.4.2, p17 says
+</p>
+
+<blockquote><p>
+-17- Before copying any parts of rhs, calls each registered callback
+pair (fn,index) as (*fn)(erase_event,*this,index). After all parts but
+exceptions() have been replaced, calls each callback pair that was
+copied from rhs as (*fn)(copy_event,*this,index).
+</p></blockquote>
+
+<p>
+The name copy_event isn't defined anywhere. The intended name was
+copyfmt_event.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace copy_event with copyfmt_event in the named paragraph.</p>
+
+
+
+
+<hr>
+<h3><a name="258"></a>258. Missing allocator requirement</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-08-22</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+From lib-7752:
+</p>
+
+<p>
+I've been assuming (and probably everyone else has been assuming) that
+allocator instances have a particular property, and I don't think that
+property can be deduced from anything in Table 32.
+</p>
+
+<p>
+I think we have to assume that allocator type conversion is a
+homomorphism. That is, if x1 and x2 are of type X, where
+X::value_type is T, and if type Y is X::template
+rebind&lt;U&gt;::other, then Y(x1) == Y(x2) if and only if x1 == x2.
+</p>
+
+<p>
+Further discussion: Howard Hinnant writes, in lib-7757:
+</p>
+
+<p>
+I think I can prove that this is not provable by Table 32. And I agree
+it needs to be true except for the "and only if". If x1 != x2, I see no
+reason why it can't be true that Y(x1) == Y(x2). Admittedly I can't
+think of a practical instance where this would happen, or be valuable.
+But I also don't see a need to add that extra restriction. I think we
+only need:
+</p>
+
+<blockquote><p>
+ if (x1 == x2) then Y(x1) == Y(x2)
+</p></blockquote>
+
+<p>
+If we decide that == on allocators is transitive, then I think I can
+prove the above. But I don't think == is necessarily transitive on
+allocators. That is:
+</p>
+
+<p>
+Given x1 == x2 and x2 == x3, this does not mean x1 == x3.
+</p>
+
+<p>Example:</p>
+
+<blockquote>
+<p>
+x1 can deallocate pointers from: x1, x2, x3 <br>
+x2 can deallocate pointers from: x1, x2, x4 <br>
+x3 can deallocate pointers from: x1, x3 <br>
+x4 can deallocate pointers from: x2, x4
+</p>
+
+<p>
+x1 == x2, and x2 == x4, but x1 != x4
+</p>
+</blockquote>
+<p><i>[Toronto: LWG members offered multiple opinions. One
+opinion is that it should not be required that <tt>x1 == x2</tt>
+implies <tt>Y(x1) == Y(x2)</tt>, and that it should not even be
+required that <tt>X(x1) == x1</tt>. Another opinion is that
+the second line from the bottom in table 32 already implies the
+desired property. This issue should be considered in light of
+other issues related to allocator instances.]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Accept proposed wording from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2436.pdf">N2436</a> part 3.
+</p>
+
+
+<p><i>[Lillehammer: Same conclusion as before: this should be
+ considered as part of an allocator redesign, not solved on its own.]</i></p>
+
+
+<p><i>[
+Batavia: An allocator redesign is not forthcoming and thus we fixed this one issue.
+]</i></p>
+
+
+<p><i>[
+Toronto: Reopened at the request of the project editor (Pete) because the proposed
+wording did not fit within the indicated table. The intent of the resolution remains
+unchanged. Pablo to work with Pete on improved wording.
+]</i></p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2387 for this issue which
+was subsequently split out into a separate paper N2436 for the purposes of voting.
+The resolution in N2436 addresses this issue. The LWG voted to accelerate this
+issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="259"></a>259. <tt>basic_string::operator[]</tt> and const correctness</h3>
+<p><b>Section:</b> 21.3.4 [string.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Chris Newton <b>Date:</b> 2000-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.capacity">issues</a> in [string.capacity].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<i>Paraphrased from a message that Chris Newton posted to comp.std.c++:</i>
+</p>
+
+<p>
+The standard's description of <tt>basic_string&lt;&gt;::operator[]</tt>
+seems to violate const correctness.
+</p>
+
+<p>
+The standard (21.3.4/1) says that "If <tt>pos &lt; size()</tt>,
+returns <tt>data()[pos]</tt>." The types don't work. The
+return value of <tt>data()</tt> is <tt>const charT*</tt>, but
+<tt>operator[]</tt> has a non-const version whose return type is <tt>reference</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In section 21.3.4, paragraph 1, change
+"<tt>data()[<i>pos</i>]</tt>" to "<tt>*(begin() +
+<i>pos</i>)</tt>".
+</p>
+
+
+
+
+<hr>
+<h3><a name="260"></a>260. Inconsistent return type of <tt>istream_iterator::operator++(int)</tt></h3>
+<p><b>Section:</b> 24.5.1.2 [istream.iterator.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.iterator.ops">issues</a> in [istream.iterator.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The synopsis of istream_iterator::operator++(int) in 24.5.1 shows
+it as returning the iterator by value. 24.5.1.2, p5 shows the same
+operator as returning the iterator by reference. That's incorrect
+given the Effects clause below (since a temporary is returned). The
+`&amp;' is probably just a typo.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the declaration in 24.5.1.2, p5 from</p>
+ <pre> istream_iterator&lt;T,charT,traits,Distance&gt;&amp; operator++(int);
+ </pre>
+<p>to</p>
+ <pre> istream_iterator&lt;T,charT,traits,Distance&gt; operator++(int);
+ </pre>
+<p>(that is, remove the `&amp;').</p>
+
+
+
+
+<hr>
+<h3><a name="261"></a>261. Missing description of <tt>istream_iterator::operator!=</tt></h3>
+<p><b>Section:</b> 24.5.1.2 [istream.iterator.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.iterator.ops">issues</a> in [istream.iterator.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+24.5.1, p3 lists the synopsis for
+</p>
+
+<pre> template &lt;class T, class charT, class traits, class Distance&gt;
+ bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+</pre>
+
+<p>
+but there is no description of what the operator does (i.e., no Effects
+or Returns clause) in 24.5.1.2.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add paragraph 7 to the end of section 24.5.1.2 with the following text:
+</p>
+
+<pre> template &lt;class T, class charT, class traits, class Distance&gt;
+ bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+</pre>
+
+<p>-7- Returns: !(x == y).</p>
+
+
+
+
+<hr>
+<h3><a name="262"></a>262. Bitmask operator ~ specified incorrectly</h3>
+<p><b>Section:</b> 17.3.2.1.2 [bitmask.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2000-09-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The ~ operation should be applied after the cast to int_type.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 17.3.2.1.2 [lib.bitmask.types] operator~ from:
+</p>
+
+<pre> bitmask operator~ ( bitmask X )
+ { return static_cast&lt; bitmask&gt;(static_cast&lt;int_type&gt;(~ X)); }
+</pre>
+
+<p>
+to:
+</p>
+
+<pre> bitmask operator~ ( bitmask X )
+ { return static_cast&lt; bitmask&gt;(~static_cast&lt;int_type&gt;(X)); }
+</pre>
+
+
+
+
+<hr>
+<h3><a name="263"></a>263. Severe restriction on <tt>basic_string</tt> reference counting</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Kevlin Henney <b>Date:</b> 2000-09-04</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The note in paragraph 6 suggests that the invalidation rules for
+references, pointers, and iterators in paragraph 5 permit a reference-
+counted implementation (actually, according to paragraph 6, they permit
+a "reference counted implementation", but this is a minor editorial fix).
+</p>
+
+<p>
+However, the last sub-bullet is so worded as to make a reference-counted
+implementation unviable. In the following example none of the
+conditions for iterator invalidation are satisfied:
+</p>
+
+<pre> // first example: "*******************" should be printed twice
+ string original = "some arbitrary text", copy = original;
+ const string &amp; alias = original;
+
+ string::const_iterator i = alias.begin(), e = alias.end();
+ for(string::iterator j = original.begin(); j != original.end(); ++j)
+ *j = '*';
+ while(i != e)
+ cout &lt;&lt; *i++;
+ cout &lt;&lt; endl;
+ cout &lt;&lt; original &lt;&lt; endl;
+</pre>
+
+<p>
+Similarly, in the following example:
+</p>
+
+<pre> // second example: "some arbitrary text" should be printed out
+ string original = "some arbitrary text", copy = original;
+ const string &amp; alias = original;
+
+ string::const_iterator i = alias.begin();
+ original.begin();
+ while(i != alias.end())
+ cout &lt;&lt; *i++;
+</pre>
+
+<p>
+I have tested this on three string implementations, two of which were
+reference counted. The reference-counted implementations gave
+"surprising behavior" because they invalidated iterators on
+the first call to non-const begin since construction. The current
+wording does not permit such invalidation because it does not take
+into account the first call since construction, only the first call
+since various member and non-member function calls.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the following sentence in 21.3 paragraph 5 from
+</p>
+
+<blockquote><p>
+ Subsequent to any of the above uses except the forms of insert() and
+ erase() which return iterators, the first call to non-const member
+ functions operator[](), at(), begin(), rbegin(), end(), or rend().
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+ Following construction or any of the above uses, except the forms of
+ insert() and erase() that return iterators, the first call to non-
+ const member functions operator[](), at(), begin(), rbegin(), end(),
+ or rend().
+</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="264"></a>264. Associative container <tt>insert(i, j)</tt> complexity requirements are not feasible.</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> John Potter <b>Date:</b> 2000-09-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#102">102</a></p>
+<p><b>Discussion:</b></p>
+<p>
+Table 69 requires linear time if [i, j) is sorted. Sorted is necessary but not sufficient.
+Consider inserting a sorted range of even integers into a set&lt;int&gt; containing the odd
+integers in the same range.
+</p>
+
+<p><i>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#102">102</a></i></p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In Table 69, in section 23.1.2, change the complexity clause for
+insertion of a range from "N log(size() + N) (N is the distance
+from i to j) in general; linear if [i, j) is sorted according to
+value_comp()" to "N log(size() + N), where N is the distance
+from i to j".
+</p>
+
+<p><i>[Copenhagen: Minor fix in proposed resolution: fixed unbalanced
+parens in the revised wording.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Testing for valid insertions could be less efficient than simply
+inserting the elements when the range is not both sorted and between
+two adjacent existing elements; this could be a QOI issue.
+</p>
+
+<p>
+The LWG considered two other options: (a) specifying that the
+complexity was linear if [i, j) is sorted according to value_comp()
+and between two adjacent existing elements; or (b) changing to
+Klog(size() + N) + (N - K) (N is the distance from i to j and K is the
+number of elements which do not insert immediately after the previous
+element from [i, j) including the first). The LWG felt that, since
+we can't guarantee linear time complexity whenever the range to be
+inserted is sorted, it's more trouble than it's worth to say that it's
+linear in some special cases.
+</p>
+
+
+
+
+<hr>
+<h3><a name="265"></a>265. std::pair::pair() effects overly restrictive</h3>
+<p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-09-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I don't see any requirements on the types of the elements of the
+std::pair container in 20.2.2. From the descriptions of the member
+functions it appears that they must at least satisfy the requirements of
+20.1.3 [lib.copyconstructible] and 20.1.4 [lib.default.con.req], and in
+the case of the [in]equality operators also the requirements of 20.1.1
+[lib.equalitycomparable] and 20.1.2 [lib.lessthancomparable].
+</p>
+
+<p>
+I believe that the the CopyConstructible requirement is unnecessary in
+the case of 20.2.2, p2.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the Effects clause in 20.2.2, p2 from</p>
+
+<blockquote><p>
+-2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() :
+first(T1()), second(T2()) {} </tt>
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+-2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() :
+first(), second() {} </tt>
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>The existing specification of pair's constructor appears to be a
+historical artifact: there was concern that pair's members be properly
+zero-initialized when they are built-in types. At one time there was
+uncertainty about whether they would be zero-initialized if the
+default constructor was written the obvious way. This has been
+clarified by core issue 178, and there is no longer any doubt that
+the straightforward implementation is correct.</p>
+
+
+
+
+<hr>
+<h3><a name="266"></a>266. bad_exception::~bad_exception() missing Effects clause</h3>
+<p><b>Section:</b> 18.7.2.1 [bad.exception] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-09-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The synopsis for std::bad_exception lists the function ~bad_exception()
+but there is no description of what the function does (the Effects
+clause is missing).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove the destructor from the class synopses of
+<tt>bad_alloc</tt> (18.5.2.1 [bad.alloc]),
+<tt>bad_cast</tt> (18.6.2 [bad.cast]),
+<tt>bad_typeid</tt> (18.6.3 [bad.typeid]),
+and <tt>bad_exception</tt> (18.7.2.1 [bad.exception]).
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+This is a general problem with the exception classes in clause 18.
+The proposed resolution is to remove the destructors from the class
+synopses, rather than to document the destructors' behavior, because
+removing them is more consistent with how exception classes are
+described in clause 19.
+</p>
+
+
+
+
+<hr>
+<h3><a name="268"></a>268. Typo in locale synopsis</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The synopsis of the class std::locale in 22.1.1 contains two typos:
+the semicolons after the declarations of the default ctor
+locale::locale() and the copy ctor locale::locale(const locale&amp;)
+are missing.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the missing semicolons, i.e., change</p>
+
+<pre> // construct/copy/destroy:
+ locale() throw()
+ locale(const locale&amp; other) throw()
+</pre>
+
+<p>in the synopsis in 22.1.1 to</p>
+
+<pre> // construct/copy/destroy:
+ locale() throw();
+ locale(const locale&amp; other) throw();
+</pre>
+
+
+
+
+<hr>
+<h3><a name="270"></a>270. Binary search requirements overly strict</h3>
+<p><b>Section:</b> 25.3.3 [alg.binary.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-10-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.binary.search">issues</a> in [alg.binary.search].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#472">472</a></p>
+<p><b>Discussion:</b></p>
+<p>
+Each of the four binary search algorithms (lower_bound, upper_bound,
+equal_range, binary_search) has a form that allows the user to pass a
+comparison function object. According to 25.3, paragraph 2, that
+comparison function object has to be a strict weak ordering.
+</p>
+
+<p>
+This requirement is slightly too strict. Suppose we are searching
+through a sequence containing objects of type X, where X is some
+large record with an integer key. We might reasonably want to look
+up a record by key, in which case we would want to write something
+like this:
+</p>
+<pre> struct key_comp {
+ bool operator()(const X&amp; x, int n) const {
+ return x.key() &lt; n;
+ }
+ }
+
+ std::lower_bound(first, last, 47, key_comp());
+</pre>
+
+<p>
+key_comp is not a strict weak ordering, but there is no reason to
+prohibit its use in lower_bound.
+</p>
+
+<p>
+There's no difficulty in implementing lower_bound so that it allows
+the use of something like key_comp. (It will probably work unless an
+implementor takes special pains to forbid it.) What's difficult is
+formulating language in the standard to specify what kind of
+comparison function is acceptable. We need a notion that's slightly
+more general than that of a strict weak ordering, one that can encompass
+a comparison function that involves different types. Expressing that
+notion may be complicated.
+</p>
+
+<p><i>Additional questions raised at the Toronto meeting:</i></p>
+<ul>
+<li> Do we really want to specify what ordering the implementor must
+ use when calling the function object? The standard gives
+ specific expressions when describing these algorithms, but it also
+ says that other expressions (with different argument order) are
+ equivalent.</li>
+<li> If we are specifying ordering, note that the standard uses both
+ orderings when describing <tt>equal_range</tt>.</li>
+<li> Are we talking about requiring these algorithms to work properly
+ when passed a binary function object whose two argument types
+ are not the same, or are we talking about requirements when
+ they are passed a binary function object with several overloaded
+ versions of <tt>operator()</tt>?</li>
+<li> The definition of a strict weak ordering does not appear to give
+ any guidance on issues of overloading; it only discusses expressions,
+ and all of the values in these expressions are of the same type.
+ Some clarification would seem to be in order.</li>
+</ul>
+
+<p><i>Additional discussion from Copenhagen:</i></p>
+<ul>
+<li>It was generally agreed that there is a real defect here: if
+the predicate is merely required to be a Strict Weak Ordering, then
+it's possible to pass in a function object with an overloaded
+operator(), where the version that's actually called does something
+completely inappropriate. (Such as returning a random value.)</li>
+
+<li>An alternative formulation was presented in a paper distributed by
+David Abrahams at the meeting, "Binary Search with Heterogeneous
+Comparison", J16-01/0027 = WG21 N1313: Instead of viewing the
+predicate as a Strict Weak Ordering acting on a sorted sequence, view
+the predicate/value pair as something that partitions a sequence.
+This is almost equivalent to saying that we should view binary search
+as if we are given a unary predicate and a sequence, such that f(*p)
+is true for all p below a specific point and false for all p above it.
+The proposed resolution is based on that alternative formulation.</li>
+</ul>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change 25.3 [lib.alg.sorting] paragraph 3 from:</p>
+
+<blockquote><p>
+ 3 For all algorithms that take Compare, there is a version that uses
+ operator&lt; instead. That is, comp(*i, *j) != false defaults to *i &lt;
+ *j != false. For the algorithms to work correctly, comp has to
+ induce a strict weak ordering on the values.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ 3 For all algorithms that take Compare, there is a version that uses
+ operator&lt; instead. That is, comp(*i, *j) != false defaults to *i
+ &lt; *j != false. For algorithms other than those described in
+ lib.alg.binary.search (25.3.3) to work correctly, comp has to induce
+ a strict weak ordering on the values.
+</p></blockquote>
+
+<p>Add the following paragraph after 25.3 [lib.alg.sorting] paragraph 5:</p>
+
+<blockquote><p>
+ -6- A sequence [start, finish) is partitioned with respect to an
+ expression f(e) if there exists an integer n such that
+ for all 0 &lt;= i &lt; distance(start, finish), f(*(begin+i)) is true if
+ and only if i &lt; n.
+</p></blockquote>
+
+<p>Change 25.3.3 [lib.alg.binary.search] paragraph 1 from:</p>
+
+<blockquote><p>
+ -1- All of the algorithms in this section are versions of binary
+ search and assume that the sequence being searched is in order
+ according to the implied or explicit comparison function. They work
+ on non-random access iterators minimizing the number of
+ comparisons, which will be logarithmic for all types of
+ iterators. They are especially appropriate for random access
+ iterators, because these algorithms do a logarithmic number of
+ steps through the data structure. For non-random access iterators
+ they execute a linear number of steps.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -1- All of the algorithms in this section are versions of binary
+ search and assume that the sequence being searched is partitioned
+ with respect to an expression formed by binding the search key to
+ an argument of the implied or explicit comparison function. They
+ work on non-random access iterators minimizing the number of
+ comparisons, which will be logarithmic for all types of
+ iterators. They are especially appropriate for random access
+ iterators, because these algorithms do a logarithmic number of
+ steps through the data structure. For non-random access iterators
+ they execute a linear number of steps.
+</p></blockquote>
+
+<p>Change 25.3.3.1 [lib.lower.bound] paragraph 1 from:</p>
+
+<blockquote><p>
+ -1- Requires: Type T is LessThanComparable
+ (lib.lessthancomparable).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -1- Requires: The elements e of [first, last) are partitioned with
+ respect to the expression e &lt; value or comp(e, value)
+</p></blockquote>
+
+
+<p>Remove 25.3.3.1 [lib.lower.bound] paragraph 2:</p>
+
+<blockquote><p>
+ -2- Effects: Finds the first position into which value can be
+ inserted without violating the ordering.
+</p></blockquote>
+
+<p>Change 25.3.3.2 [lib.upper.bound] paragraph 1 from:</p>
+
+<blockquote><p>
+ -1- Requires: Type T is LessThanComparable (lib.lessthancomparable).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -1- Requires: The elements e of [first, last) are partitioned with
+ respect to the expression !(value &lt; e) or !comp(value, e)
+</p></blockquote>
+
+<p>Remove 25.3.3.2 [lib.upper.bound] paragraph 2:</p>
+
+<blockquote><p>
+ -2- Effects: Finds the furthermost position into which value can be
+ inserted without violating the ordering.
+</p></blockquote>
+
+<p>Change 25.3.3.3 [lib.equal.range] paragraph 1 from:</p>
+
+<blockquote><p>
+ -1- Requires: Type T is LessThanComparable
+ (lib.lessthancomparable).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -1- Requires: The elements e of [first, last) are partitioned with
+ respect to the expressions e &lt; value and !(value &lt; e) or
+ comp(e, value) and !comp(value, e). Also, for all elements e of
+ [first, last), e &lt; value implies !(value &lt; e) or comp(e,
+ value) implies !comp(value, e)
+</p></blockquote>
+
+<p>Change 25.3.3.3 [lib.equal.range] paragraph 2 from:</p>
+
+<blockquote><p>
+ -2- Effects: Finds the largest subrange [i, j) such that the value
+ can be inserted at any iterator k in it without violating the
+ ordering. k satisfies the corresponding conditions: !(*k &lt; value)
+ &amp;&amp; !(value &lt; *k) or comp(*k, value) == false &amp;&amp; comp(value, *k) ==
+ false.
+</p></blockquote>
+
+<p>to:</p>
+
+<pre> -2- Returns:
+ make_pair(lower_bound(first, last, value),
+ upper_bound(first, last, value))
+ or
+ make_pair(lower_bound(first, last, value, comp),
+ upper_bound(first, last, value, comp))
+</pre>
+
+<p>Change 25.3.3.3 [lib.binary.search] paragraph 1 from:</p>
+
+<blockquote><p>
+ -1- Requires: Type T is LessThanComparable
+ (lib.lessthancomparable).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+ -1- Requires: The elements e of [first, last) are partitioned with
+ respect to the expressions e &lt; value and !(value &lt; e) or comp(e,
+ value) and !comp(value, e). Also, for all elements e of [first,
+ last), e &lt; value implies !(value &lt; e) or comp(e, value) implies
+ !comp(value, e)
+</p></blockquote>
+
+<p><i>[Copenhagen: Dave Abrahams provided this wording]</i></p>
+
+
+<p><i>[Redmond: Minor changes in wording. (Removed "non-negative", and
+changed the "other than those described in" wording.) Also, the LWG
+decided to accept the "optional" part.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The proposed resolution reinterprets binary search. Instead of
+thinking about searching for a value in a sorted range, we view that
+as an important special case of a more general algorithm: searching
+for the partition point in a partitioned range.</p>
+
+<p>We also add a guarantee that the old wording did not: we ensure
+that the upper bound is no earlier than the lower bound, that
+the pair returned by equal_range is a valid range, and that the first
+part of that pair is the lower bound.</p>
+
+
+
+
+
+<hr>
+<h3><a name="271"></a>271. basic_iostream missing typedefs</h3>
+<p><b>Section:</b> 27.6.1.5 [iostreamclass] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Class template basic_iostream has no typedefs. The typedefs it
+inherits from its base classes can't be used, since (for example)
+basic_iostream&lt;T&gt;::traits_type is ambiguous.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add the following to basic_iostream's class synopsis in
+27.6.1.5 [iostreamclass], immediately after <tt>public</tt>:</p>
+
+<pre> // types:
+ typedef charT char_type;
+ typedef typename traits::int_type int_type;
+ typedef typename traits::pos_type pos_type;
+ typedef typename traits::off_type off_type;
+ typedef traits traits_type;
+</pre>
+
+
+
+
+<hr>
+<h3><a name="272"></a>272. Missing parentheses around subexpression</h3>
+<p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a></p>
+<p><b>Discussion:</b></p>
+<p>
+27.4.4.3, p4 says about the postcondition of the function: If
+rdbuf()!=0 then state == rdstate(); otherwise
+rdstate()==state|ios_base::badbit.
+</p>
+
+<p>
+The expression on the right-hand-side of the operator==() needs to be
+parenthesized in order for the whole expression to ever evaluate to
+anything but non-zero.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add parentheses like so: rdstate()==(state|ios_base::badbit).
+</p>
+
+
+
+
+<hr>
+<h3><a name="273"></a>273. Missing ios_base qualification on members of a dependent class</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.5.2.4.2, p4, and 27.8.1.6, p2, 27.8.1.7, p3, 27.8.1.9, p2,
+27.8.1.10, p3 refer to in and/or out w/o ios_base:: qualification.
+That's incorrect since the names are members of a dependent base
+class (14.6.2 [temp.dep]) and thus not visible.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Qualify the names with the name of the class of which they are
+members, i.e., ios_base.</p>
+
+
+
+
+<hr>
+<h3><a name="274"></a>274. a missing/impossible allocator requirement</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I see that table 31 in 20.1.5, p3 allows T in std::allocator&lt;T&gt; to be of
+any type. But the synopsis in 20.4.1 calls for allocator&lt;&gt;::address() to
+be overloaded on reference and const_reference, which is ill-formed for
+all T = const U. In other words, this won't work:
+</p>
+
+<p>
+template class std::allocator&lt;const int&gt;;
+</p>
+
+<p>
+The obvious solution is to disallow specializations of allocators on
+const types. However, while containers' elements are required to be
+assignable (which rules out specializations on const T's), I think that
+allocators might perhaps be potentially useful for const values in other
+contexts. So if allocators are to allow const types a partial
+specialization of std::allocator&lt;const T&gt; would probably have to be
+provided.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the text in row 1, column 2 of table 32 in 20.1.5, p3 from</p>
+
+ <blockquote><p>
+ any type
+ </p></blockquote>
+
+<p>to</p>
+ <blockquote><p>
+ any non-const, non-reference type
+ </p></blockquote>
+
+<p><i>[Redmond: previous proposed resolution was "any non-const,
+non-volatile, non-reference type". Got rid of the "non-volatile".]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Two resolutions were originally proposed: one that partially
+specialized std::allocator for const types, and one that said an
+allocator's value type may not be const. The LWG chose the second.
+The first wouldn't be appropriate, because allocators are intended for
+use by containers, and const value types don't work in containers.
+Encouraging the use of allocators with const value types would only
+lead to unsafe code.
+</p>
+<p>
+The original text for proposed resolution 2 was modified so that it
+also forbids volatile types and reference types.
+</p>
+
+<p><i>[Curaçao: LWG double checked and believes volatile is correctly
+excluded from the PR.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="275"></a>275. Wrong type in num_get::get() overloads</h3>
+<p><b>Section:</b> 22.2.2.1.1 [facet.num.get.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.members">issues</a> in [facet.num.get.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 22.2.2.1.1, we have a list of overloads for num_get&lt;&gt;::get().
+There are eight overloads, all of which are identical except for the
+last parameter. The overloads are:
+</p>
+<ul>
+<li> long&amp; </li>
+<li> unsigned short&amp; </li>
+<li> unsigned int&amp; </li>
+<li> unsigned long&amp; </li>
+<li> short&amp; </li>
+<li> double&amp; </li>
+<li> long double&amp; </li>
+<li> void*&amp; </li>
+</ul>
+
+<p>
+There is a similar list, in 22.2.2.1.2, of overloads for
+num_get&lt;&gt;::do_get(). In this list, the last parameter has
+the types:
+</p>
+<ul>
+<li> long&amp; </li>
+<li> unsigned short&amp; </li>
+<li> unsigned int&amp; </li>
+<li> unsigned long&amp; </li>
+<li> float&amp; </li>
+<li> double&amp; </li>
+<li> long double&amp; </li>
+<li> void*&amp; </li>
+</ul>
+
+<p>
+These two lists are not identical. They should be, since
+<tt>get</tt> is supposed to call <tt>do_get</tt> with exactly
+the arguments it was given.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.1.1 [facet.num.get.members], change</p>
+<pre> iter_type get(iter_type in, iter_type end, ios_base&amp; str,
+ ios_base::iostate&amp; err, short&amp; val) const;
+</pre>
+<p>to</p>
+<pre> iter_type get(iter_type in, iter_type end, ios_base&amp; str,
+ ios_base::iostate&amp; err, float&amp; val) const;
+</pre>
+
+
+
+
+<hr>
+<h3><a name="276"></a>276. Assignable requirement for container value type overly strict</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2000-11-07</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+23.1/3 states that the objects stored in a container must be
+Assignable. 23.3.1 [map], paragraph 2,
+states that map satisfies all requirements for a container, while in
+the same time defining value_type as pair&lt;const Key, T&gt; - a type
+that is not Assignable.
+</p>
+
+<p>
+It should be noted that there exists a valid and non-contradictory
+interpretation of the current text. The wording in 23.1/3 avoids
+mentioning value_type, referring instead to "objects stored in a
+container." One might argue that map does not store objects of
+type map::value_type, but of map::mapped_type instead, and that the
+Assignable requirement applies to map::mapped_type, not
+map::value_type.
+</p>
+
+<p>
+However, this makes map a special case (other containers store objects of
+type value_type) and the Assignable requirement is needlessly restrictive in
+general.
+</p>
+
+<p>
+For example, the proposed resolution of active library issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> is to make set::iterator a constant iterator; this
+means that no set operations can exploit the fact that the stored
+objects are Assignable.
+</p>
+
+<p>
+This is related to, but slightly broader than, closed issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>23.1/3: Strike the trailing part of the sentence:</p>
+ <blockquote><p>
+ , and the additional requirements of Assignable types from 23.1/3
+ </p></blockquote>
+<p>so that it reads:</p>
+ <blockquote><p>
+ -3- The type of objects stored in these components must meet the
+ requirements of CopyConstructible types (lib.copyconstructible).
+ </p></blockquote>
+
+<p>23.1/4: Modify to make clear that this requirement is not for all
+containers. Change to:</p>
+
+<blockquote><p>
+-4- Table 64 defines the Assignable requirement. Some containers
+require this property of the types to be stored in the container. T is
+the type used to instantiate the container. t is a value of T, and u is
+a value of (possibly const) T.
+</p></blockquote>
+
+<p>23.1, Table 65: in the first row, change "T is Assignable" to "T is
+CopyConstructible".</p>
+
+<p>23.2.1/2: Add sentence for Assignable requirement. Change to:</p>
+
+<blockquote><p>
+-2- A deque satisfies all of the requirements of a container and of a
+reversible container (given in tables in lib.container.requirements) and
+of a sequence, including the optional sequence requirements
+(lib.sequence.reqmts). In addition to the requirements on the stored
+object described in 23.1[lib.container.requirements], the stored object
+must also meet the requirements of Assignable. Descriptions are
+provided here only for operations on deque that are not described in one
+of these tables or for operations where there is additional semantic
+information.
+</p></blockquote>
+
+<p>23.2.2/2: Add Assignable requirement to specific methods of list.
+Change to:</p>
+
+<blockquote>
+<p>-2- A list satisfies all of the requirements of a container and of a
+reversible container (given in two tables in lib.container.requirements)
+and of a sequence, including most of the the optional sequence
+requirements (lib.sequence.reqmts). The exceptions are the operator[]
+and at member functions, which are not provided.
+
+[Footnote: These member functions are only provided by containers whose
+iterators are random access iterators. --- end foonote]
+</p>
+
+<p>list does not require the stored type T to be Assignable unless the
+following methods are instantiated:
+
+[Footnote: Implementors are permitted but not required to take advantage
+of T's Assignable properties for these methods. -- end foonote]
+</p>
+<pre> list&lt;T,Allocator&gt;&amp; operator=(const list&lt;T,Allocator&gt;&amp; x );
+ template &lt;class InputIterator&gt;
+ void assign(InputIterator first, InputIterator last);
+ void assign(size_type n, const T&amp; t);
+</pre>
+
+
+<p>Descriptions are provided here only for operations on list that are not
+described in one of these tables or for operations where there is
+additional semantic information.</p>
+</blockquote>
+
+<p>23.2.4/2: Add sentence for Assignable requirement. Change to:</p>
+
+<blockquote><p>
+-2- A vector satisfies all of the requirements of a container and of a
+reversible container (given in two tables in lib.container.requirements)
+and of a sequence, including most of the optional sequence requirements
+(lib.sequence.reqmts). The exceptions are the push_front and pop_front
+member functions, which are not provided. In addition to the
+requirements on the stored object described in
+23.1[lib.container.requirements], the stored object must also meet the
+requirements of Assignable. Descriptions are provided here only for
+operations on vector that are not described in one of these tables or
+for operations where there is additional semantic information.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>list, set, multiset, map, multimap are able to store non-Assignables.
+However, there is some concern about <tt>list&lt;T&gt;</tt>:
+although in general there's no reason for T to be Assignable, some
+implementations of the member functions <tt>operator=</tt> and
+<tt>assign</tt> do rely on that requirement. The LWG does not want
+to forbid such implementations.</p>
+
+<p>Note that the type stored in a standard container must still satisfy
+the requirements of the container's allocator; this rules out, for
+example, such types as "const int". See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#274">274</a>
+for more details.
+</p>
+
+<p>In principle we could also relax the "Assignable" requirement for
+individual <tt>vector</tt> member functions, such as
+<tt>push_back</tt>. However, the LWG did not see great value in such
+selective relaxation. Doing so would remove implementors' freedom to
+implement <tt>vector::push_back</tt> in terms of
+<tt>vector::insert</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="278"></a>278. What does iterator validity mean?</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2000-11-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 23.2.3.4 [list.ops] states that
+</p>
+<pre> void splice(iterator position, list&lt;T, Allocator&gt;&amp; x);
+</pre>
+<p>
+<i>invalidates</i> all iterators and references to list <tt>x</tt>.
+</p>
+
+<p>
+But what does the C++ Standard mean by "invalidate"? You
+can still dereference the iterator to a spliced list element, but
+you'd better not use it to delimit a range within the original
+list. For the latter operation, it has definitely lost some of its
+validity.
+</p>
+
+<p>
+If we accept the proposed resolution to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>,
+then we'd better clarify that a "valid" iterator need no
+longer designate an element within the same container as it once did.
+We then have to clarify what we mean by invalidating a past-the-end
+iterator, as when a vector or string grows by reallocation. Clearly,
+such an iterator has a different kind of validity. Perhaps we should
+introduce separate terms for the two kinds of "validity."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following text to the end of section 24.1 [iterator.requirements],
+after paragraph 5:</p>
+<blockquote><p>
+An <i>invalid</i> iterator is an iterator that may be
+singular. [Footnote: This definition applies to pointers, since
+pointers are iterators. The effect of dereferencing an iterator that
+has been invalidated is undefined.]
+</p></blockquote>
+
+<p><i>[post-Copenhagen: Matt provided wording.]</i></p>
+
+
+<p><i>[Redmond: General agreement with the intent, some objections to
+the wording. Dave provided new wording.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This resolution simply defines a term that the Standard uses but
+ never defines, "invalid", in terms of a term that is defined,
+ "singular".</p>
+
+<p>Why do we say "may be singular", instead of "is singular"? That's
+ becuase a valid iterator is one that is known to be nonsingular.
+ Invalidating an iterator means changing it in such a way that it's
+ no longer known to be nonsingular. An example: inserting an
+ element into the middle of a vector is correctly said to invalidate
+ all iterators pointing into the vector. That doesn't necessarily
+ mean they all become singular.</p>
+
+
+
+
+
+<hr>
+<h3><a name="280"></a>280. Comparison of reverse_iterator to const reverse_iterator</h3>
+<p><b>Section:</b> 24.4.1 [reverse.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This came from an email from Steve Cleary to Fergus in reference to
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
+this in Toronto and believed it should be a separate issue. There was
+also some reservations about whether this was a worthwhile problem to
+fix.
+</p>
+
+<p>
+Steve said: "Fixing reverse_iterator. std::reverse_iterator can
+(and should) be changed to preserve these additional
+requirements." He also said in email that it can be done without
+breaking user's code: "If you take a look at my suggested
+solution, reverse_iterator doesn't have to take two parameters; there
+is no danger of breaking existing code, except someone taking the
+address of one of the reverse_iterator global operator functions, and
+I have to doubt if anyone has ever done that. . . <i>But</i>, just in
+case they have, you can leave the old global functions in as well --
+they won't interfere with the two-template-argument functions. With
+that, I don't see how <i>any</i> user code could break."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+<b>Section:</b> 24.4.1.1 [reverse.iterator]
+add/change the following declarations:</p>
+<pre> A) Add a templated assignment operator, after the same manner
+ as the templated copy constructor, i.e.:
+
+ template &lt; class U &gt;
+ reverse_iterator &lt; Iterator &gt;&amp; operator=(const reverse_iterator&lt; U &gt;&amp; u);
+
+ B) Make all global functions (except the operator+) have
+ two template parameters instead of one, that is, for
+ operator ==, !=, &lt;, &gt;, &lt;=, &gt;=, - replace:
+
+ template &lt; class Iterator &gt;
+ typename reverse_iterator&lt; Iterator &gt;::difference_type operator-(
+ const reverse_iterator&lt; Iterator &gt;&amp; x,
+ const reverse_iterator&lt; Iterator &gt;&amp; y);
+
+ with:
+
+ template &lt; class Iterator1, class Iterator2 &gt;
+ typename reverse_iterator &lt; Iterator1 &gt;::difference_type operator-(
+ const reverse_iterator &lt; Iterator1 &gt; &amp; x,
+ const reverse_iterator &lt; Iterator2 &gt; &amp; y);
+</pre>
+<p>
+Also make the addition/changes for these signatures in
+24.4.1.3 [reverse.iter.ops].
+</p>
+
+<p><i>[
+Copenhagen: The LWG is concerned that the proposed resolution
+introduces new overloads. Experience shows that introducing
+overloads is always risky, and that it would be inappropriate to
+make this change without implementation experience. It may be
+desirable to provide this feature in a different way.
+]</i></p>
+
+
+<p><i>[
+Lillehammer: We now have implementation experience, and agree that
+this solution is safe and correct.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="281"></a>281. std::min() and max() requirements overly restrictive</h3>
+<p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#486">486</a></p>
+<p><b>Discussion:</b></p>
+<p>The requirements in 25.3.7, p1 and 4 call for T to satisfy the
+requirements of <tt>LessThanComparable</tt> ( [lessthancomparable])
+and <tt>CopyConstructible</tt> (20.1.1 [utility.arg.requirements]).
+Since the functions take and return their arguments and result by
+const reference, I believe the <tt>CopyConstructible</tt> requirement
+is unnecessary.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the <tt>CopyConstructible</tt> requirement. Specifically, replace
+25.3.7, p1 with</p>
+<p><b>-1- Requires:</b> Type T is <tt>LessThanComparable</tt>
+( [lessthancomparable]).
+</p>
+<p>and replace 25.3.7, p4 with</p>
+<p><b>-4- Requires:</b> Type T is <tt>LessThanComparable</tt>
+( [lessthancomparable]).
+</p>
+
+
+
+
+<hr>
+<h3><a name="282"></a>282. What types does numpunct grouping refer to?</h3>
+<p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2000-12-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 16 mistakenly singles out integral types for inserting
+thousands_sep() characters. This conflicts with the syntax for floating
+point numbers described under 22.2.3.1/2.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change paragraph 16 from:</p>
+
+<blockquote><p>
+For integral types, punct.thousands_sep() characters are inserted into
+the sequence as determined by the value returned by punct.do_grouping()
+using the method described in 22.2.3.1.2 [facet.numpunct.virtuals].
+</p></blockquote>
+
+<p>To:</p>
+
+<blockquote><p>
+For arithmetic types, punct.thousands_sep() characters are inserted into
+the sequence as determined by the value returned by punct.do_grouping()
+using the method described in 22.2.3.1.2 [facet.numpunct.virtuals].
+</p></blockquote>
+
+<p><i>[
+Copenhagen: Opinions were divided about whether this is actually an
+inconsistency, but at best it seems to have been unintentional. This
+is only an issue for floating-point output: The standard is
+unambiguous that implementations must parse thousands_sep characters
+when performing floating-point. The standard is also unambiguous that
+this requirement does not apply to the "C" locale.
+]</i></p>
+
+
+<p><i>[
+A survey of existing practice is needed; it is believed that some
+implementations do insert thousands_sep characters for floating-point
+output and others fail to insert thousands_sep characters for
+floating-point input even though this is unambiguously required by the
+standard.
+]</i></p>
+
+
+<p><i>[Post-Curaçao: the above proposed resolution is the consensus of
+Howard, Bill, Pete, Benjamin, Nathan, Dietmar, Boris, and Martin.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="283"></a>283. std::replace() requirement incorrect/insufficient</h3>
+<p><b>Section:</b> 25.2.5 [alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.replace">issues</a> in [alg.replace].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#483">483</a></p>
+<p><b>Discussion:</b></p>
+<p>
+(revision of the further discussion)
+There are a number of problems with the requires clauses for the
+algorithms in 25.1 and 25.2. The requires clause of each algorithm
+should describe the necessary and sufficient requirements on the inputs
+to the algorithm such that the algorithm compiles and runs properly.
+Many of the requires clauses fail to do this. Here is a summary of the kinds
+of mistakes:
+</p>
+
+<ol>
+<li>
+Use of EqualityComparable, which only puts requirements on a single
+type, when in fact an equality operator is required between two
+different types, typically either T and the iterator's value type
+or between the value types of two different iterators.
+</li>
+<li>
+Use of Assignable for T when in fact what was needed is Assignable
+for the value_type of the iterator, and convertability from T to the
+value_type of the iterator. Or for output iterators, the requirement
+should be that T is writable to the iterator (output iterators do
+not have value types).
+</li>
+</ol>
+
+<p>
+Here is the list of algorithms that contain mistakes:
+</p>
+
+<ul>
+<li>25.1.2 std::find</li>
+<li>25.1.6 std::count</li>
+<li>25.1.8 std::equal</li>
+<li>25.1.9 std::search, std::search_n</li>
+<li>25.2.4 std::replace, std::replace_copy</li>
+<li>25.2.5 std::fill</li>
+<li>25.2.7 std::remove, std::remove_copy</li>
+</ul>
+
+<p>
+Also, in the requirements for EqualityComparable, the requirement that
+the operator be defined for const objects is lacking.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>20.1.1 Change p1 from</p>
+
+<p>In Table 28, <tt>T</tt> is a type to be supplied by a C++ program
+instantiating a template, <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
+values of type <tt>T</tt>.
+</p>
+
+<p>to</p>
+
+<p>
+In Table 28, <tt>T</tt> is a type to be supplied by a C++ program
+instantiating a template, <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
+values of type <tt>const T</tt>.
+</p>
+
+<p>25 Between p8 and p9</p>
+
+<p>Add the following sentence:</p>
+
+<p>When the description of an algorithm gives an expression such as
+<tt>*first == value</tt> for a condition, it is required that the expression
+evaluate to either true or false in boolean contexts.</p>
+
+<p>25.1.2 Change p1 by deleting the requires clause.</p>
+
+<p>25.1.6 Change p1 by deleting the requires clause.</p>
+
+<p>25.1.9</p>
+
+<p>Change p4 from</p>
+
+<p>-4- Requires: Type <tt>T</tt> is <tt>EqualityComparable</tt>
+(20.1.1), type Size is convertible to integral type (4.7.12.3).
+</p>
+
+<p>to</p>
+
+<p>-4- Requires: The type <tt>Size</tt> is convertible to integral
+type (4.7.12.3).</p>
+
+<p>25.2.4 Change p1 from</p>
+
+<p>-1- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1 ) (and, for <tt>replace()</tt>, <tt>EqualityComparable</tt> (20.1.1 )).</p>
+
+<p>to</p>
+
+<p>-1- Requires: The expression <tt>*first = new_value</tt> must be valid.</p>
+
+<p>and change p4 from</p>
+
+<p>-4- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1) (and,
+for <tt>replace_copy()</tt>, <tt>EqualityComparable</tt>
+(20.1.1)). The ranges <tt>[first, last)</tt> and <tt>[result, result +
+(last - first))</tt> shall not overlap.</p>
+
+<p>to</p>
+
+<p>-4- Requires: The results of the expressions <tt>*first</tt> and
+<tt>new_value</tt> must be writable to the result output iterator. The
+ranges <tt>[first, last)</tt> and <tt>[result, result + (last -
+first))</tt> shall not overlap.</p>
+
+
+<p>25.2.5 Change p1 from</p>
+
+<p>-1- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1). The
+type <tt>Size</tt> is convertible to an integral type (4.7.12.3).</p>
+
+<p>to</p>
+
+<p>-1- Requires: The expression <tt>value</tt> must be is writable to
+the output iterator. The type <tt>Size</tt> is convertible to an
+integral type (4.7.12.3).</p>
+
+<p>25.2.7 Change p1 from</p>
+
+<p>-1- Requires: Type <tt>T</tt> is <tt>EqualityComparable</tt> (20.1.1).</p>
+
+<p>to</p>
+
+<p>
+-1- Requires: The value type of the iterator must be
+<tt>Assignable</tt> (23.1).
+</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+The general idea of the proposed solution is to remove the faulty
+requires clauses and let the returns and effects clauses speak for
+themselves. That is, the returns clauses contain expressions that must
+be valid, and therefore already imply the correct requirements. In
+addition, a sentence is added at the beginning of chapter 25 saying
+that expressions given as conditions must evaluate to true or false in
+a boolean context. An alternative would be to say that the type of
+these condition expressions must be literally bool, but that would be
+imposing a greater restriction that what the standard currently says
+(which is convertible to bool).
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="284"></a>284. unportable example in 20.3.7, p6</h3>
+<p><b>Section:</b> 20.5.7 [comparisons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-26</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The example in 20.5.7 [comparisons], p6 shows how to use the C
+library function <tt>strcmp()</tt> with the function pointer adapter
+<tt>ptr_fun()</tt>. But since it's unspecified whether the C library
+functions have <tt>extern "C"</tt> or <tt>extern
+"C++"</tt> linkage [17.4.2.2 [using.linkage]], and since
+function pointers with different the language linkage specifications
+(7.5 [dcl.link]) are incompatible, whether this example is
+well-formed is unspecified.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 20.5.7 [comparisons] paragraph 6 from:</p>
+<blockquote>
+ <p>[<i>Example:</i></p>
+ <pre> replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++");
+ </pre>
+ <p>replaces each <tt>C</tt> with <tt>C++</tt> in sequence <tt>v</tt>.</p>
+</blockquote>
+
+
+<p>to:</p>
+<blockquote>
+ <p>[<i>Example:</i></p>
+ <pre> int compare(const char*, const char*);
+ replace_if(v.begin(), v.end(),
+ not1(bind2nd(ptr_fun(compare), "abc")), "def");
+ </pre>
+ <p>replaces each <tt>abc</tt> with <tt>def</tt> in sequence <tt>v</tt>.</p>
+</blockquote>
+
+<p>Also, remove footnote 215 in that same paragraph.</p>
+
+<p><i>[Copenhagen: Minor change in the proposed resolution. Since this
+issue deals in part with C and C++ linkage, it was believed to be too
+confusing for the strings in the example to be "C" and "C++".
+]</i></p>
+
+
+<p><i>[Redmond: More minor changes. Got rid of the footnote (which
+seems to make a sweeping normative requirement, even though footnotes
+aren't normative), and changed the sentence after the footnote so that
+it corresponds to the new code fragment.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="285"></a>285. minor editorial errors in fstream ctors</h3>
+<p><b>Section:</b> 27.8.1.7 [ifstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-31</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.8.1.7 [ifstream.cons], p2, 27.8.1.11 [ofstream.cons], p2, and
+27.8.1.15 [fstream.cons], p2 say about the effects of each constructor:
+</p>
+
+<p>... If that function returns a null pointer, calls
+<tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>).
+</p>
+
+<p>The parenthetical note doesn't apply since the ctors cannot throw an
+exception due to the requirement in 27.4.4.1 [basic.ios.cons], p3
+that <tt>exceptions()</tt> be initialized to <tt>ios_base::goodbit</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Strike the parenthetical note from the Effects clause in each of the
+paragraphs mentioned above.
+</p>
+
+
+
+
+<hr>
+<h3><a name="286"></a>286. &lt;cstdlib&gt; requirements missing size_t typedef</h3>
+<p><b>Section:</b> 25.4 [alg.c.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.c.library">issues</a> in [alg.c.library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The &lt;cstdlib&gt; header file contains prototypes for bsearch and
+qsort (C++ Standard section 25.4 paragraphs 3 and 4) and other
+prototypes (C++ Standard section 21.4 paragraph 1 table 49) that
+require the typedef size_t. Yet size_t is not listed in the
+&lt;cstdlib&gt; synopsis table 78 in section 25.4.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the type size_t to Table 78 (section 25.4) and add
+the type size_t &lt;cstdlib&gt; to Table 97 (section C.2).
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Since size_t is in &lt;stdlib.h&gt;, it must also be in &lt;cstdlib&gt;.</p>
+
+
+
+
+
+<hr>
+<h3><a name="288"></a>288. &lt;cerrno&gt; requirements missing macro EILSEQ</h3>
+<p><b>Section:</b> 19.3 [errno] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+ISO/IEC 9899:1990/Amendment1:1994 Section 4.3 States: "The list
+of macros defined in &lt;errno.h&gt; is adjusted to include a new
+macro, EILSEQ"
+</p>
+
+<p>
+ISO/IEC 14882:1998(E) section 19.3 does not refer
+to the above amendment.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Update Table 26 (section 19.3) "Header &lt;cerrno&gt; synopsis"
+and Table 95 (section C.2) "Standard Macros" to include EILSEQ.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="291"></a>291. Underspecification of set algorithms</h3>
+<p><b>Section:</b> 25.3.5 [alg.set.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-01-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.set.operations">issues</a> in [alg.set.operations].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard library contains four algorithms that compute set
+operations on sorted ranges: <tt>set_union</tt>, <tt>set_intersection</tt>,
+<tt>set_difference</tt>, and <tt>set_symmetric_difference</tt>. Each
+of these algorithms takes two sorted ranges as inputs, and writes the
+output of the appropriate set operation to an output range. The elements
+in the output range are sorted.
+</p>
+
+<p>
+The ordinary mathematical definitions are generalized so that they
+apply to ranges containing multiple copies of a given element. Two
+elements are considered to be "the same" if, according to an
+ordering relation provided by the user, neither one is less than the
+other. So, for example, if one input range contains five copies of an
+element and another contains three, the output range of <tt>set_union</tt>
+will contain five copies, the output range of
+<tt>set_intersection</tt> will contain three, the output range of
+<tt>set_difference</tt> will contain two, and the output range of
+<tt>set_symmetric_difference</tt> will contain two.
+</p>
+
+<p>
+Because two elements can be "the same" for the purposes
+of these set algorithms, without being identical in other respects
+(consider, for example, strings under case-insensitive comparison),
+this raises a number of unanswered questions:
+</p>
+
+<ul>
+<li>If we're copying an element that's present in both of the
+input ranges, which one do we copy it from?</li>
+<li>If there are <i>n</i> copies of an element in the relevant
+input range, and the output range will contain fewer copies (say
+<i>m</i>) which ones do we choose? The first <i>m</i>, or the last
+<i>m</i>, or something else?</li>
+<li>Are these operations stable? That is, does a run of equivalent
+elements appear in the output range in the same order as as it
+appeared in the input range(s)?</li>
+</ul>
+
+<p>
+The standard should either answer these questions, or explicitly
+say that the answers are unspecified. I prefer the former option,
+since, as far as I know, all existing implementations behave the
+same way.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add the following to the end of 25.3.5.2 [set.union] paragraph 5:</p>
+<blockquote><p>
+If [first1, last1) contains <i>m</i> elements that are equivalent to
+each other and [first2, last2) contains <i>n</i> elements that are
+equivalent to them, then max(<i>m</i>, <i>n</i>) of these elements
+will be copied to the output range: all <i>m</i> of these elements
+from [first1, last1), and the last max(<i>n-m</i>, 0) of them from
+[first2, last2), in that order.
+</p></blockquote>
+
+<p>Add the following to the end of 25.3.5.3 [set.intersection] paragraph 5:</p>
+<blockquote><p>
+If [first1, last1) contains <i>m</i> elements that are equivalent to each
+other and [first2, last2) contains <i>n</i> elements that are
+equivalent to them, the first min(<i>m</i>, <i>n</i>) of those
+elements from [first1, last1) are copied to the output range.
+</p></blockquote>
+
+<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.4 [set.difference]
+paragraph 4:</p>
+<blockquote><p>
+If [first1, last1) contains <i>m</i> elements that are equivalent to each
+other and [first2, last2) contains <i>n</i> elements that are
+equivalent to them, the last max(<i>m-n</i>, 0) elements from
+[first1, last1) are copied to the output range.
+</p></blockquote>
+
+<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.5 [set.symmetric.difference]
+paragraph 4:</p>
+<blockquote><p>
+If [first1, last1) contains <i>m</i> elements that are equivalent to
+each other and [first2, last2) contains <i>n</i> elements that are
+equivalent to them, then |<i>m - n</i>| of those elements will be
+copied to the output range: the last <i>m - n</i> of these elements
+from [first1, last1) if <i>m</i> &gt; <i>n</i>, and the last <i>n -
+m</i> of these elements from [first2, last2) if <i>m</i> &lt; <i>n</i>.
+</p></blockquote>
+
+<p><i>[Santa Cruz: it's believed that this language is clearer than
+ what's in the Standard. However, it's also believed that the
+ Standard may already make these guarantees (although not quite in
+ these words). Bill and Howard will check and see whether they think
+ that some or all of these changes may be redundant. If so, we may
+ close this issue as NAD.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>For simple cases, these descriptions are equivalent to what's
+ already in the Standard. For more complicated cases, they describe
+ the behavior of existing implementations.</p>
+
+
+
+
+
+<hr>
+<h3><a name="292"></a>292. effects of a.copyfmt (a)</h3>
+<p><b>Section:</b> 27.4.4.2 [basic.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.members">issues</a> in [basic.ios.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The Effects clause of the member function <tt>copyfmt()</tt> in
+27.4.4.2, p15 doesn't consider the case where the left-hand side
+argument is identical to the argument on the right-hand side, that is
+<tt>(this == &amp;rhs)</tt>. If the two arguments are identical there
+is no need to copy any of the data members or call any callbacks
+registered with <tt>register_callback()</tt>. Also, as Howard Hinnant
+points out in message c++std-lib-8149 it appears to be incorrect to
+allow the object to fire <tt>erase_event</tt> followed by
+<tt>copyfmt_event</tt> since the callback handling the latter event
+may inadvertently attempt to access memory freed by the former.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the Effects clause in 27.4.4.2, p15 from</p>
+
+<blockquote><p>
+<b>-15- Effects:</b>Assigns to the member objects of <tt>*this</tt>
+the corresponding member objects of <tt>rhs</tt>, except that...
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+<b>-15- Effects:</b>If <tt>(this == &amp;rhs)</tt> does nothing. Otherwise
+assigns to the member objects of <tt>*this</tt> the corresponding member
+objects of <tt>rhs</tt>, except that...
+</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="294"></a>294. User defined macros and standard headers</h3>
+<p><b>Section:</b> 17.4.3.1.1 [macro.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> James Kanze <b>Date:</b> 2001-01-11</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Paragraph 2 of 17.4.3.1.1 [macro.names] reads: "A
+translation unit that includes a header shall not contain any macros
+that define names declared in that header." As I read this, it
+would mean that the following program is legal:</p>
+
+<pre> #define npos 3.14
+ #include &lt;sstream&gt;
+</pre>
+
+<p>since npos is not defined in &lt;sstream&gt;. It is, however, defined
+in &lt;string&gt;, and it is hard to imagine an implementation in
+which &lt;sstream&gt; didn't include &lt;string&gt;.</p>
+
+<p>I think that this phrase was probably formulated before it was
+decided that a standard header may freely include other standard
+headers. The phrase would be perfectly appropriate for C, for
+example. In light of 17.4.4.1 [res.on.headers] paragraph 1, however,
+it isn't stringent enough.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>For 17.4.3.1.1 [macro.names], replace the current wording, which reads:</p>
+<blockquote>
+ <p>Each name defined as a macro in a header is reserved to the
+ implementation for any use if the translation unit includes
+ the header.168)</p>
+
+ <p>A translation unit that includes a header shall not contain any
+ macros that define names declared or defined in that header. Nor shall
+ such a translation unit define macros for names lexically
+ identical to keywords.</p>
+
+ <p>168) It is not permissible to remove a library macro definition by
+ using the #undef directive.</p>
+</blockquote>
+
+<p>with the wording:</p>
+
+<blockquote>
+ <p>A translation unit that includes a standard library header shall not
+ #define or #undef names declared in any standard library header.</p>
+
+ <p>A translation unit shall not #define or #undef names lexically
+ identical to keywords.</p>
+</blockquote>
+
+<p><i>[Lillehammer: Beman provided new wording]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="295"></a>295. Is abs defined in &lt;cmath&gt;?</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Jens Maurer <b>Date:</b> 2001-01-12</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 80 lists the contents of the &lt;cmath&gt; header. It does not
+list <tt>abs()</tt>. However, 26.5, paragraph 6, which lists added
+signatures present in &lt;cmath&gt;, does say that several overloads
+of <tt>abs()</tt> should be defined in &lt;cmath&gt;.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add <tt>abs</tt> to Table 80. Also, remove the parenthetical list
+of functions "(abs(), div(), rand(), srand())" from 26.5 [numarray],
+paragraph 1.
+</p>
+
+<p><i>[Copenhagen: Modified proposed resolution so that it also gets
+rid of that vestigial list of functions in paragraph 1.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>All this DR does is fix a typo; it's uncontroversial. A
+separate question is whether we're doing the right thing in
+putting some overloads in &lt;cmath&gt; that we aren't also
+putting in &lt;cstdlib&gt;. That's issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="297"></a>297. const_mem_fun_t&lt;&gt;::argument_type should be const T*</h3>
+<p><b>Section:</b> 20.5.8 [logical.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The class templates <tt>const_mem_fun_t</tt> in 20.5.8, p8 and
+<tt>const_mem_fun1_t</tt>
+in 20.5.8, p9 derive from <tt>unary_function&lt;T*, S&gt;</tt>, and
+<tt>binary_function&lt;T*,
+A, S&gt;</tt>, respectively. Consequently, their <tt>argument_type</tt>, and
+<tt>first_argument_type</tt>
+members, respectively, are both defined to be <tt>T*</tt> (non-const).
+However, their function call member operator takes a <tt>const T*</tt>
+argument. It is my opinion that <tt>argument_type</tt> should be <tt>const
+T*</tt> instead, so that one can easily refer to it in generic code. The
+example below derived from existing code fails to compile due to the
+discrepancy:
+</p>
+
+<p><tt>template &lt;class T&gt;</tt>
+<br><tt>void foo (typename T::argument_type arg)&nbsp;&nbsp; // #1</tt>
+<br><tt>{</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; typename T::result_type (T::*pf) (typename
+T::argument_type)
+const =&nbsp;&nbsp; // #2</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;T::operator();</tt>
+<br><tt>}</tt>
+</p>
+
+<p><tt>struct X { /* ... */ };</tt></p>
+
+<p><tt>int main ()</tt>
+<br><tt>{</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; const X x;</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; foo&lt;std::const_mem_fun_t&lt;void, X&gt;
+&gt;(&amp;x);&nbsp;&nbsp;
+// #3</tt>
+<br><tt>}</tt>
+</p>
+
+<p>#1 <tt>foo()</tt> takes a plain unqualified <tt>X*</tt> as an argument
+<br>#2 the type of the pointer is incompatible with the type of the member
+function
+<br>#3 the address of a constant being passed to a function taking a non-const
+<tt>X*</tt>
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the top portion of the definition of the class template
+const_mem_fun_t in 20.5.8, p8
+</p>
+<p><tt>template &lt;class S, class T&gt; class const_mem_fun_t</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
+unary_function&lt;T*, S&gt; {</tt>
+</p>
+<p>with</p>
+<p><tt>template &lt;class S, class T&gt; class const_mem_fun_t</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
+unary_function&lt;<b>const</b> T*, S&gt; {</tt>
+</p>
+<p>Also replace the top portion of the definition of the class template
+const_mem_fun1_t in 20.5.8, p9</p>
+<p><tt>template &lt;class S, class T, class A&gt; class const_mem_fun1_t</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
+binary_function&lt;T*, A, S&gt; {</tt>
+</p>
+<p>with</p>
+<p><tt>template &lt;class S, class T, class A&gt; class const_mem_fun1_t</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
+binary_function&lt;<b>const</b> T*, A, S&gt; {</tt>
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>This is simply a contradiction: the <tt>argument_type</tt> typedef,
+and the argument type itself, are not the same.</p>
+
+
+
+
+
+<hr>
+<h3><a name="298"></a>298. ::operator delete[] requirement incorrect/insufficient</h3>
+<p><b>Section:</b> 18.5.1.2 [new.delete.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> John A. Pedretti <b>Date:</b> 2001-01-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The default behavior of <tt>operator delete[]</tt> described in 18.5.1.2, p12 -
+namely that for non-null value of <i>ptr</i>, the operator reclaims storage
+allocated by the earlier call to the default <tt>operator new[]</tt> - is not
+correct in all cases. Since the specified <tt>operator new[]</tt> default
+behavior is to call <tt>operator new</tt> (18.5.1.2, p4, p8), which can be
+replaced, along with <tt>operator delete</tt>, by the user, to implement their
+own memory management, the specified default behavior of<tt> operator
+delete[]</tt> must be to call <tt>operator delete</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 18.5.1.2, p12 from</p>
+<blockquote><p>
+<b>-12-</b> <b>Default behavior:</b></p>
+<ul>
+<li>
+For a null value of <i><tt>ptr</tt></i> , does nothing.
+</li>
+<li>
+Any other value of <i><tt>ptr</tt></i> shall be a value returned
+earlier by a call to the default <tt>operator new[](std::size_t)</tt>.
+[Footnote: The value must not have been invalidated by an intervening
+call to <tt>operator delete[](void*)</tt> (17.4.3.7 [res.on.arguments]).
+--- end footnote]
+For such a non-null value of <i><tt>ptr</tt></i> , reclaims storage
+allocated by the earlier call to the default <tt>operator new[]</tt>.
+</li>
+</ul>
+</blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+<b>-12-</b> <b>Default behavior: </b>Calls <tt>operator
+delete(</tt><i>ptr</i>)
+or <tt>operator delete(<i>ptr</i>, std::nothrow)</tt> respectively.
+</p></blockquote>
+<p>and expunge paragraph 13.</p>
+
+
+
+
+<hr>
+<h3><a name="300"></a>300. list::merge() specification incomplete</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> John Pedretti <b>Date:</b> 2001-01-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The "Effects" clause for list::merge() (23.2.3.4 [list.ops], p23)
+appears to be incomplete: it doesn't cover the case where the argument
+list is identical to *this (i.e., this == &amp;x). The requirement in the
+note in p24 (below) is that x be empty after the merge which is surely
+unintended in this case.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.2.3.4 [list.ops], replace paragraps 23-25 with:</p>
+<blockquote>
+<p>
+23 Effects: if (&amp;x == this) does nothing; otherwise, merges the two
+sorted ranges [begin(), end()) and [x.begin(), x.end()). The result
+is a range in which the elements will be sorted in non-decreasing
+order according to the ordering defined by comp; that is, for every
+iterator i in the range other than the first, the condition comp(*i,
+*(i - 1)) will be false.
+</p>
+
+<p>
+24 Notes: Stable: if (&amp;x != this), then for equivalent elements in the
+two original ranges, the elements from the original range [begin(),
+end()) always precede the elements from the original range [x.begin(),
+x.end()). If (&amp;x != this) the range [x.begin(), x.end()) is empty
+after the merge.
+</p>
+
+<p>
+25 Complexity: At most size() + x.size() - 1 applications of comp if
+(&amp;x ! = this); otherwise, no applications of comp are performed. If
+an exception is thrown other than by a comparison there are no
+effects.
+</p>
+
+</blockquote>
+
+<p><i>[Copenhagen: The original proposed resolution did not fix all of
+the problems in 23.2.3.4 [list.ops], p22-25. Three different
+paragraphs (23, 24, 25) describe the effects of <tt>merge</tt>.
+Changing p23, without changing the other two, appears to introduce
+contradictions. Additionally, "merges the argument list into the
+list" is excessively vague.]</i></p>
+
+
+<p><i>[Post-Curaçao: Robert Klarer provided new wording.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="301"></a>301. basic_string template ctor effects clause omits allocator argument</h3>
+<p><b>Section:</b> 21.3.1 [string.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.require">issues</a> in [string.require].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The effects clause for the basic_string template ctor in 21.3.1, p15
+leaves out the third argument of type Allocator. I believe this to be
+a mistake.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace</p>
+
+<blockquote>
+ <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral
+ type, equivalent to</p>
+
+ <blockquote><p><tt>basic_string(static_cast&lt;size_type&gt;(begin),
+ static_cast&lt;value_type&gt;(end))</tt></p></blockquote>
+</blockquote>
+
+<p>with</p>
+
+<blockquote>
+ <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral
+ type, equivalent to</p>
+
+ <blockquote><p><tt>basic_string(static_cast&lt;size_type&gt;(begin),
+ static_cast&lt;value_type&gt;(end), <b>a</b>)</tt></p></blockquote>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="303"></a>303. Bitset input operator underspecified</h3>
+<p><b>Section:</b> 23.3.5.3 [bitset.operators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-02-05</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 23.3.5.3, we are told that <tt>bitset</tt>'s input operator
+"Extracts up to <i>N</i> (single-byte) characters from
+<i>is</i>.", where <i>is</i> is a stream of type
+<tt>basic_istream&lt;charT, traits&gt;</tt>.
+</p>
+
+<p>
+The standard does not say what it means to extract single byte
+characters from a stream whose character type, <tt>charT</tt>, is in
+general not a single-byte character type. Existing implementations
+differ.
+</p>
+
+<p>
+A reasonable solution will probably involve <tt>widen()</tt> and/or
+<tt>narrow()</tt>, since they are the supplied mechanism for
+converting a single character between <tt>char</tt> and
+arbitrary <tt>charT</tt>.
+</p>
+
+<p>Narrowing the input characters is not the same as widening the
+literals <tt>'0'</tt> and <tt>'1'</tt>, because there may be some
+locales in which more than one wide character maps to the narrow
+character <tt>'0'</tt>. Narrowing means that alternate
+representations may be used for bitset input, widening means that
+they may not be.</p>
+
+<p>Note that for numeric input, <tt>num_get&lt;&gt;</tt>
+(22.2.2.1.2/8) compares input characters to widened version of narrow
+character literals.</p>
+
+<p>From Pete Becker, in c++std-lib-8224:</p>
+<blockquote>
+<p>
+Different writing systems can have different representations for the
+digits that represent 0 and 1. For example, in the Unicode representation
+of the Devanagari script (used in many of the Indic languages) the digit 0
+is 0x0966, and the digit 1 is 0x0967. Calling narrow would translate those
+into '0' and '1'. But Unicode also provides the ASCII values 0x0030 and
+0x0031 for for the Latin representations of '0' and '1', as well as code
+points for the same numeric values in several other scripts (Tamil has no
+character for 0, but does have the digits 1-9), and any of these values
+would also be narrowed to '0' and '1'.
+</p>
+
+<p>...</p>
+
+<p>
+It's fairly common to intermix both native and Latin
+representations of numbers in a document. So I think the rule has to be
+that if a wide character represents a digit whose value is 0 then the bit
+should be cleared; if it represents a digit whose value is 1 then the bit
+should be set; otherwise throw an exception. So in a Devanagari locale,
+both 0x0966 and 0x0030 would clear the bit, and both 0x0967 and 0x0031
+would set it. Widen can't do that. It would pick one of those two values,
+and exclude the other one.
+</p>
+
+</blockquote>
+
+<p>From Jens Maurer, in c++std-lib-8233:</p>
+
+<blockquote>
+<p>
+Whatever we decide, I would find it most surprising if
+bitset conversion worked differently from int conversion
+with regard to alternate local representations of
+numbers.
+</p>
+
+<p>Thus, I think the options are:</p>
+<ul>
+ <li> Have a new defect issue for 22.2.2.1.2/8 so that it will
+require the use of narrow().</li>
+
+ <li> Have a defect issue for bitset() which describes clearly
+that widen() is to be used.</li>
+</ul>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+ <p>Replace the first two sentences of paragraph 5 with:</p>
+
+ <blockquote><p>
+ Extracts up to <i>N</i> characters from <i>is</i>. Stores these
+ characters in a temporary object <i>str</i> of type
+ <tt>basic_string&lt;charT, traits&gt;</tt>, then evaluates the
+ expression <tt><i>x</i> = bitset&lt;N&gt;(<i>str</i>)</tt>.
+ </p></blockquote>
+
+ <p>Replace the third bullet item in paragraph 5 with:</p>
+ <ul><li>
+ the next input character is neither <tt><i>is</i>.widen(0)</tt>
+ nor <tt><i>is</i>.widen(1)</tt> (in which case the input character
+ is not extracted).
+ </li></ul>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Input for <tt>bitset</tt> should work the same way as numeric
+input. Using <tt>widen</tt> does mean that alternative digit
+representations will not be recognized, but this was a known
+consequence of the design choice.</p>
+
+
+
+
+
+<hr>
+<h3><a name="305"></a>305. Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-01-24</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>22.2.1.5/3 introduces codecvt in part with:</p>
+
+<blockquote><p>
+ codecvt&lt;wchar_t,char,mbstate_t&gt; converts between the native
+ character sets for tiny and wide characters. Instantiations on
+ mbstate_t perform conversion between encodings known to the library
+ implementor.
+</p></blockquote>
+
+<p>But 22.2.1.5.2/10 describes do_length in part with:</p>
+
+<blockquote><p>
+ ... codecvt&lt;wchar_t, char, mbstate_t&gt; ... return(s) the lesser of max and
+ (from_end-from).
+</p></blockquote>
+
+<p>
+The semantics of do_in and do_length are linked. What one does must
+be consistent with what the other does. 22.2.1.5/3 leads me to
+believe that the vendor is allowed to choose the algorithm that
+codecvt&lt;wchar_t,char,mbstate_t&gt;::do_in performs so that it makes
+his customers happy on a given platform. But 22.2.1.5.2/10 explicitly
+says what codecvt&lt;wchar_t,char,mbstate_t&gt;::do_length must
+return. And thus indirectly specifies the algorithm that
+codecvt&lt;wchar_t,char,mbstate_t&gt;::do_in must perform. I believe
+that this is not what was intended and is a defect.
+</p>
+
+<p>Discussion from the -lib reflector:
+
+<br>This proposal would have the effect of making the semantics of
+all of the virtual functions in <tt>codecvt&lt;wchar_t, char,
+mbstate_t&gt;</tt> implementation specified. Is that what we want, or
+do we want to mandate specific behavior for the base class virtuals
+and leave the implementation specified behavior for the codecvt_byname
+derived class? The tradeoff is that former allows implementors to
+write a base class that actually does something useful, while the
+latter gives users a way to get known and specified---albeit
+useless---behavior, and is consistent with the way the standard
+handles other facets. It is not clear what the original intention
+was.</p>
+
+<p>
+Nathan has suggest a compromise: a character that is a widened version
+of the characters in the basic execution character set must be
+converted to a one-byte sequence, but there is no such requirement
+for characters that are not part of the basic execution character set.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 22.2.1.5.2/5 from:
+</p>
+<p>
+The instantiations required in Table 51 (lib.locale.category), namely
+codecvt&lt;wchar_t,char,mbstate_t&gt; and
+codecvt&lt;char,char,mbstate_t&gt;, store no characters. Stores no more
+than (to_limit-to) destination elements. It always leaves the to_next
+pointer pointing one beyond the last element successfully stored.
+</p>
+<p>
+to:
+</p>
+<p>
+Stores no more than (to_limit-to) destination elements, and leaves the
+to_next pointer pointing one beyond the last element successfully
+stored. codecvt&lt;char,char,mbstate_t&gt; stores no characters.
+</p>
+
+<p>Change 22.2.1.5.2/10 from:</p>
+
+<blockquote><p>
+-10- Returns: (from_next-from) where from_next is the largest value in
+the range [from,from_end] such that the sequence of values in the
+range [from,from_next) represents max or fewer valid complete
+characters of type internT. The instantiations required in Table 51
+(21.1.1.1.1), namely codecvt&lt;wchar_t, char, mbstate_t&gt; and
+codecvt&lt;char, char, mbstate_t&gt;, return the lesser of max and
+(from_end-from).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+-10- Returns: (from_next-from) where from_next is the largest value in
+the range [from,from_end] such that the sequence of values in the range
+[from,from_next) represents max or fewer valid complete characters of
+type internT. The instantiation codecvt&lt;char, char, mbstate_t&gt; returns
+the lesser of max and (from_end-from).
+</p></blockquote>
+
+<p><i>[Redmond: Nathan suggested an alternative resolution: same as
+above, but require that, in the default encoding, a character from the
+basic execution character set would map to a single external
+character. The straw poll was 8-1 in favor of the proposed
+resolution.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The default encoding should be whatever users of a given platform
+would expect to be the most natural. This varies from platform to
+platform. In many cases there is a preexisting C library, and users
+would expect the default encoding to be whatever C uses in the default
+"C" locale. We could impose a guarantee like the one Nathan suggested
+(a character from the basic execution character set must map to a
+single external character), but this would rule out important
+encodings that are in common use: it would rule out JIS, for
+example, and it would rule out a fixed-width encoding of UCS-4.</p>
+
+<p><i>[Curaçao: fixed rationale typo at the request of Ichiro Koshida;
+"shift-JIS" changed to "JIS".]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="306"></a>306. offsetof macro and non-POD types</h3>
+<p><b>Section:</b> 18.1 [support.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 2001-02-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.types">issues</a> in [support.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Spliced together from reflector messages c++std-lib-8294 and -8295:</p>
+
+<p>18.1, paragraph 5, reads: "The macro <tt>offsetof</tt>
+accepts a restricted set of <i>type</i> arguments in this
+International Standard. <i>type</i> shall be a POD structure or a POD
+union (clause 9). The result of applying the offsetof macro to a field
+that is a static data member or a function member is
+undefined."</p>
+
+<p>For the POD requirement, it doesn't say "no diagnostic
+required" or "undefined behavior". I read 1.4 [intro.compliance], paragraph 1, to mean that a diagnostic is required.
+It's not clear whether this requirement was intended. While it's
+possible to provide such a diagnostic, the extra complication doesn't
+seem to add any value.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 18.1, paragraph 5, to "If <i>type</i> is not a POD
+structure or a POD union the results are undefined."</p>
+
+<p><i>[Copenhagen: straw poll was 7-4 in favor. It was generally
+agreed that requiring a diagnostic was inadvertent, but some LWG
+members thought that diagnostics should be required whenever
+possible.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="307"></a>307. Lack of reference typedefs in container adaptors</h3>
+<p><b>Section:</b> 23.2.3 [list] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-03-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>From reflector message c++std-lib-8330. See also lib-8317.</p>
+
+<p>
+The standard is currently inconsistent in 23.2.3.2 [list.capacity]
+paragraph 1 and 23.2.3.3 [list.modifiers] paragraph 1.
+23.2.3.3/1, for example, says:
+</p>
+
+<blockquote><p>
+-1- Any sequence supporting operations back(), push_back() and pop_back()
+can be used to instantiate stack. In particular, vector (lib.vector), list
+(lib.list) and deque (lib.deque) can be used.
+</p></blockquote>
+
+<p>But this is false: vector&lt;bool&gt; can not be used, because the
+container adaptors return a T&amp; rather than using the underlying
+container's reference type.</p>
+
+<p>This is a contradiction that can be fixed by:</p>
+
+<ol>
+<li>Modifying these paragraphs to say that vector&lt;bool&gt;
+ is an exception.</li>
+<li>Removing the vector&lt;bool&gt; specialization.</li>
+<li>Changing the return types of stack and priority_queue to use
+ reference typedef's.</li>
+</ol>
+
+<p>
+I propose 3. This does not preclude option 2 if we choose to do it
+later (see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#96">96</a>); the issues are independent. Option
+3 offers a small step towards support for proxied containers. This
+small step fixes a current contradiction, is easy for vendors to
+implement, is already implemented in at least one popular lib, and
+does not break any code.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Summary: Add reference and const_reference typedefs to queue,
+priority_queue and stack. Change return types of "value_type&amp;" to
+"reference". Change return types of "const value_type&amp;" to
+"const_reference". Details:</p>
+
+<p>Change 23.2.3.1/1 from:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class queue {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+
+ public:
+ explicit queue(const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ value_type&amp; front() { return c.front(); }
+ const value_type&amp; front() const { return c.front(); }
+ value_type&amp; back() { return c.back(); }
+ const value_type&amp; back() const { return c.back(); }
+ void push(const value_type&amp; x) { c.push_back(x); }
+ void pop() { c.pop_front(); }
+ };
+</pre>
+
+<p>to:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class queue {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::reference reference;
+ typedef typename Container::const_reference const_reference;
+ typedef typename Container::value_type value_type;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+
+ public:
+ explicit queue(const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ reference front() { return c.front(); }
+ const_reference front() const { return c.front(); }
+ reference back() { return c.back(); }
+ const_reference back() const { return c.back(); }
+ void push(const value_type&amp; x) { c.push_back(x); }
+ void pop() { c.pop_front(); }
+ };
+</pre>
+
+<p>Change 23.2.3.2/1 from:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = vector&lt;T&gt;,
+ class Compare = less&lt;typename Container::value_type&gt; &gt;
+ class priority_queue {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+ Compare comp;
+
+ public:
+ explicit priority_queue(const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+ template &lt;class InputIterator&gt;
+ priority_queue(InputIterator first, InputIterator last,
+ const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ const value_type&amp; top() const { return c.front(); }
+ void push(const value_type&amp; x);
+ void pop();
+ };
+ // no equality is provided
+ }
+</pre>
+
+<p>to:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = vector&lt;T&gt;,
+ class Compare = less&lt;typename Container::value_type&gt; &gt;
+ class priority_queue {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::reference reference;
+ typedef typename Container::const_reference const_reference;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+ Compare comp;
+
+ public:
+ explicit priority_queue(const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+ template &lt;class InputIterator&gt;
+ priority_queue(InputIterator first, InputIterator last,
+ const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ const_reference top() const { return c.front(); }
+ void push(const value_type&amp; x);
+ void pop();
+ };
+ // no equality is provided
+ }
+</pre>
+
+<p>And change 23.2.3.3/1 from:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class stack {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+
+ public:
+ explicit stack(const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ value_type&amp; top() { return c.back(); }
+ const value_type&amp; top() const { return c.back(); }
+ void push(const value_type&amp; x) { c.push_back(x); }
+ void pop() { c.pop_back(); }
+ };
+
+ template &lt;class T, class Container&gt;
+ bool operator==(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator!=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ }
+</pre>
+
+<p>to:</p>
+
+<pre> namespace std {
+ template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class stack {
+ public:
+ typedef typename Container::value_type value_type;
+ typedef typename Container::reference reference;
+ typedef typename Container::const_reference const_reference;
+ typedef typename Container::size_type size_type;
+ typedef Container container_type;
+ protected:
+ Container c;
+
+ public:
+ explicit stack(const Container&amp; = Container());
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ reference top() { return c.back(); }
+ const_reference top() const { return c.back(); }
+ void push(const value_type&amp; x) { c.push_back(x); }
+ void pop() { c.pop_back(); }
+ };
+
+ template &lt;class T, class Container&gt;
+ bool operator==(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator!=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ template &lt;class T, class Container&gt;
+ bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ }
+</pre>
+
+<p><i>[Copenhagen: This change was discussed before the IS was released
+and it was deliberately not adopted. Nevertheless, the LWG believes
+(straw poll: 10-2) that it is a genuine defect.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="308"></a>308. Table 82 mentions unrelated headers</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 82 in section 27 mentions the header &lt;cstdlib&gt; for String
+streams (27.7 [string.streams]) and the headers &lt;cstdio&gt; and
+&lt;cwchar&gt; for File streams (27.8 [file.streams]). It's not clear
+why these headers are mentioned in this context since they do not
+define any of the library entities described by the
+subclauses. According to 17.4.1.1 [contents], only such headers
+are to be listed in the summary.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove &lt;cstdlib&gt; and &lt;cwchar&gt; from
+Table 82.</p>
+
+<p><i>[Copenhagen: changed the proposed resolution slightly. The
+original proposed resolution also said to remove &lt;cstdio&gt; from
+Table 82. However, &lt;cstdio&gt; is mentioned several times within
+section 27.8 [file.streams], including 27.8.2 [c.files].]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="310"></a>310. Is errno a macro?</h3>
+<p><b>Section:</b> 17.4.1.2 [headers], 19.3 [errno] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 2001-03-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+ Exactly how should errno be declared in a conforming C++ header?
+ </p>
+
+ <p>
+ The C standard says in 7.1.4 that it is unspecified whether errno is a
+ macro or an identifier with external linkage. In some implementations
+ it can be either, depending on compile-time options. (E.g., on
+ Solaris in multi-threading mode, errno is a macro that expands to a
+ function call, but is an extern int otherwise. "Unspecified" allows
+ such variability.)
+ </p>
+
+ <p>The C++ standard:</p>
+ <ul>
+ <li>17.4.1.2 says in a note that errno must be macro in C. (false)</li>
+ <li>17.4.3.1.3 footnote 166 says errno is reserved as an external
+ name (true), and implies that it is an identifier.</li>
+ <li>19.3 simply lists errno as a macro (by what reasoning?) and goes
+ on to say that the contents of of C++ &lt;errno.h&gt; are the
+ same as in C, begging the question.</li>
+ <li>C.2, table 95 lists errno as a macro, without comment.</li>
+ </ul>
+
+ <p>I find no other references to errno.</p>
+
+ <p>We should either explicitly say that errno must be a macro, even
+ though it need not be a macro in C, or else explicitly leave it
+ unspecified. We also need to say something about namespace std.
+ A user who includes &lt;cerrno&gt; needs to know whether to write
+ <tt>errno</tt>, or <tt>::errno</tt>, or <tt>std::errno</tt>, or
+ else &lt;cerrno&gt; is useless.</p>
+
+ <p>Two acceptable fixes:</p>
+ <ul>
+ <li><p>errno must be a macro. This is trivially satisfied by adding<br>
+ &nbsp;&nbsp;#define errno (::std::errno)<br>
+ to the headers if errno is not already a macro. You then always
+ write errno without any scope qualification, and it always expands
+ to a correct reference. Since it is always a macro, you know to
+ avoid using errno as a local identifer.</p></li>
+ <li><p>errno is in the global namespace. This fix is inferior, because
+ ::errno is not guaranteed to be well-formed.</p></li>
+ </ul>
+
+ <p><i>[
+ This issue was first raised in 1999, but it slipped through
+ the cracks.
+ ]</i></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>Change the Note in section 17.4.1.2p5 from</p>
+
+ <blockquote><p>
+ Note: the names defined as macros in C include the following:
+ assert, errno, offsetof, setjmp, va_arg, va_end, and va_start.
+ </p></blockquote>
+
+ <p>to</p>
+
+ <blockquote><p>
+ Note: the names defined as macros in C include the following:
+ assert, offsetof, setjmp, va_arg, va_end, and va_start.
+ </p></blockquote>
+
+ <p>In section 19.3, change paragraph 2 from</p>
+
+ <blockquote><p>
+ The contents are the same as the Standard C library header
+ &lt;errno.h&gt;.
+ </p></blockquote>
+
+ <p>to</p>
+
+ <blockquote><p>
+ The contents are the same as the Standard C library header
+ &lt;errno.h&gt;, except that errno shall be defined as a macro.
+ </p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>C++ must not leave it up to the implementation to decide whether or
+not a name is a macro; it must explicitly specify exactly which names
+are required to be macros. The only one that really works is for it
+to be a macro.</p>
+
+<p><i>[Curaçao: additional rationale added.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="311"></a>311. Incorrect wording in basic_ostream class synopsis</h3>
+<p><b>Section:</b> 27.6.2.1 [ostream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-03-21</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream">issues</a> in [ostream].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>In 27.6.2.1 [ostream], the synopsis of class basic_ostream says:</p>
+
+<pre> // partial specializationss
+ template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;( basic_ostream&lt;char,traits&gt;&amp;,
+ const char * );
+</pre>
+
+<p>Problems:</p>
+<ul>
+<li>Too many 's's at the end of "specializationss" </li>
+<li>This is an overload, not a partial specialization</li>
+</ul>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the synopsis in 27.6.2.1 [ostream], remove the
+<i>// partial specializationss</i> comment. Also remove the same
+comment (correctly spelled, but still incorrect) from the synopsis in
+27.6.2.6.4 [ostream.inserters.character].
+</p>
+
+<p><i>[
+Pre-Redmond: added 27.6.2.6.4 [ostream.inserters.character] because of Martin's
+comment in c++std-lib-8939.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="312"></a>312. Table 27 is missing headers</h3>
+<p><b>Section:</b> 20 [utilities] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-29</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Table 27 in section 20 lists the header &lt;memory&gt; (only) for
+Memory (lib.memory) but neglects to mention the headers
+&lt;cstdlib&gt; and &lt;cstring&gt; that are discussed in 20.4.5 [meta.rel].</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add &lt;cstdlib&gt; and &lt;cstring&gt; to Table 27, in the same row
+as &lt;memory&gt;.</p>
+
+
+
+
+
+<hr>
+<h3><a name="315"></a>315. Bad "range" in list::unique complexity</h3>
+<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-05-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+23.2.3.4 [list.ops], Para 21 describes the complexity of
+list::unique as: "If the range (last - first) is not empty, exactly
+(last - first) -1 applications of the corresponding predicate,
+otherwise no applications of the predicate)".
+</p>
+
+<p>
+"(last - first)" is not a range.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the "range" from (last - first) to [first, last).
+</p>
+
+
+
+
+<hr>
+<h3><a name="316"></a>316. Vague text in Table 69</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-04</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Table 69 says this about a_uniq.insert(t):</p>
+
+<blockquote><p>
+inserts t if and only if there is no element in the container with key
+equivalent to the key of t. The bool component of the returned pair
+indicates whether the insertion takes place and the iterator component of the
+pair points to the element with key equivalent to the key of t.
+</p></blockquote>
+
+<p>The description should be more specific about exactly how the bool component
+indicates whether the insertion takes place.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the text in question to</p>
+
+<blockquote><p>
+...The bool component of the returned pair is true if and only if the insertion
+takes place...
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="317"></a>317. Instantiation vs. specialization of facets</h3>
+<p><b>Section:</b> 22 [localization] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-04</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#localization">issues</a> in [localization].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The localization section of the standard refers to specializations of
+the facet templates as instantiations even though the required facets
+are typically specialized rather than explicitly (or implicitly)
+instantiated. In the case of ctype&lt;char&gt; and
+ctype_byname&lt;char&gt; (and the wchar_t versions), these facets are
+actually required to be specialized. The terminology should be
+corrected to make it clear that the standard doesn't mandate explicit
+instantiation (the term specialization encompasses both explicit
+instantiations and specializations).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In the following paragraphs, replace all occurrences of the word
+instantiation or instantiations with specialization or specializations,
+respectively:
+</p>
+
+<blockquote><p>
+22.1.1.1.1, p4, Table 52, 22.2.1.1, p2, 22.2.1.5, p3, 22.2.1.5.1, p5,
+22.2.1.5.2, p10, 22.2.2, p2, 22.2.3.1, p1, 22.2.3.1.2, p1, p2 and p3,
+22.2.4.1, p1, 22.2.4.1.2, p1, 22,2,5, p1, 22,2,6, p2, 22.2.6.3.2, p7, and
+Footnote 242.
+</p></blockquote>
+
+<p>And change the text in 22.1.1.1.1, p4 from</p>
+
+<blockquote><p>
+ An implementation is required to provide those instantiations
+ for facet templates identified as members of a category, and
+ for those shown in Table 52:
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+ An implementation is required to provide those specializations...
+</p></blockquote>
+
+<p><i>[Nathan will review these changes, and will look for places where
+explicit specialization is necessary.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>This is a simple matter of outdated language. The language to
+describe templates was clarified during the standardization process,
+but the wording in clause 22 was never updated to reflect that
+change.</p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="318"></a>318. Misleading comment in definition of numpunct_byname</h3>
+<p><b>Section:</b> 22.2.3.2 [locale.numpunct.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-12</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The definition of the numpunct_byname template contains the following
+comment:</p>
+
+<pre> namespace std {
+ template &lt;class charT&gt;
+ class numpunct_byname : public numpunct&lt;charT&gt; {
+ // this class is specialized for char and wchar_t.
+ ...
+</pre>
+
+<p>There is no documentation of the specializations and it seems
+conceivable that an implementation will not explicitly specialize the
+template at all, but simply provide the primary template.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the comment from the text in 22.2.3.2 and from the proposed
+resolution of library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
+
+
+
+
+<hr>
+<h3><a name="319"></a>319. Storage allocation wording confuses "Required behavior", "Requires"</h3>
+<p><b>Section:</b> 18.5.1.1 [new.delete.single], 18.5.1.2 [new.delete.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2001-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.single">issues</a> in [new.delete.single].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The standard specifies 17.3.1.3 [structure.specifications] that "Required
+behavior" elements describe "the semantics of a function definition
+provided by either the implementation or a C++ program."</p>
+
+<p>The standard specifies 17.3.1.3 [structure.specifications] that "Requires"
+elements describe "the preconditions for calling the function."</p>
+
+<p>In the sections noted below, the current wording specifies
+"Required Behavior" for what are actually preconditions, and thus
+should be specified as "Requires".</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>In 18.5.1.1 [new.delete.single] Para 12 Change:</p>
+<blockquote>
+ <p>Required behavior: accept a value of ptr that is null or that was
+ returned by an earlier call ...</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>Requires: the value of ptr is null or the value returned by an
+ earlier call ...</p>
+</blockquote>
+
+<p>In 18.5.1.2 [new.delete.array] Para 11 Change:</p>
+<blockquote>
+ <p>Required behavior: accept a value of ptr that is null or that was
+ returned by an earlier call ...</p>
+</blockquote>
+<p>to:</p>
+<blockquote>
+ <p>Requires: the value of ptr is null or the value returned by an
+ earlier call ...</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="320"></a>320. list::assign overspecified</h3>
+<p><b>Section:</b> 23.2.3.1 [list.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-05-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.cons">issues</a> in [list.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 23.2.3.1 [list.cons], paragraphs 6-8 specify that list assign (both forms) have
+the "effects" of a call to erase followed by a call to insert.
+</p>
+
+<p>
+I would like to document that implementers have the freedom to implement
+assign by other methods, as long as the end result is the same and the
+exception guarantee is as good or better than the basic guarantee.
+</p>
+
+<p>
+The motivation for this is to use T's assignment operator to recycle
+existing nodes in the list instead of erasing them and reallocating
+them with new values. It is also worth noting that, with careful
+coding, most common cases of assign (everything but assignment with
+true input iterators) can elevate the exception safety to strong if
+T's assignment has a nothrow guarantee (with no extra memory cost).
+Metrowerks does this. However I do not propose that this subtlety be
+standardized. It is a QoI issue. </p>
+
+<p>Existing practise:
+Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 23.2.3.1 [list.cons]/7 from:</p>
+
+<blockquote>
+<p>Effects:</p>
+
+<pre> erase(begin(), end());
+ insert(begin(), first, last);
+</pre>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>Effects: Replaces the contents of the list with the range [first, last).</p>
+</blockquote>
+
+<p>In 23.1.1 [sequence.reqmts], in Table 67 (sequence requirements),
+add two new rows:</p>
+<pre> a.assign(i,j) void pre: i,j are not iterators into a.
+ Replaces elements in a with a copy
+ of [i, j).
+
+ a.assign(n,t) void pre: t is not a reference into a.
+ Replaces elements in a with n copies
+ of t.
+</pre>
+
+<p>Change 23.2.3.1 [list.cons]/8 from:</p>
+
+<blockquote>
+<p>Effects:</p>
+<pre> erase(begin(), end());
+ insert(begin(), n, t);
+</pre>
+</blockquote>
+<p>to:</p>
+
+<blockquote>
+<p>Effects: Replaces the contents of the list with n copies of t.</p>
+</blockquote>
+
+<p><i>[Redmond: Proposed resolution was changed slightly. Previous
+version made explicit statement about exception safety, which wasn't
+consistent with the way exception safety is expressed elsewhere.
+Also, the change in the sequence requirements is new. Without that
+change, the proposed resolution would have required that assignment of
+a subrange would have to work. That too would have been
+overspecification; it would effectively mandate that assignment use a
+temporary. Howard provided wording.
+]</i></p>
+
+
+<p><i>[Curaçao: Made editorial improvement in wording; changed
+"Replaces elements in a with copies of elements in [i, j)."
+with "Replaces the elements of a with a copy of [i, j)."
+Changes not deemed serious enough to requre rereview.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="321"></a>321. Typo in num_get</h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Kevin Djang <b>Date:</b> 2001-05-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 22.2.2.1.2 at p7 states that "A length specifier is added to
+the conversion function, if needed, as indicated in Table 56."
+However, Table 56 uses the term "length modifier", not "length
+specifier".
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 22.2.2.1.2 at p7, change the text "A length specifier is added ..."
+to be "A length modifier is added ..."
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>C uses the term "length modifier". We should be consistent.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="322"></a>322. iterator and const_iterator should have the same value type</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-05-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It's widely assumed that, if X is a container,
+iterator_traits&lt;X::iterator&gt;::value_type and
+iterator_traits&lt;X::const_iterator&gt;::value_type should both be
+X::value_type. However, this is nowhere stated. The language in
+Table 65 is not precise about the iterators' value types (it predates
+iterator_traits), and could even be interpreted as saying that
+iterator_traits&lt;X::const_iterator&gt;::value_type should be "const
+X::value_type".
+</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a>.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In Table 65 ("Container Requirements"), change the return type for
+X::iterator to "iterator type whose value type is T". Change the
+return type for X::const_iterator to "constant iterator type whose
+value type is T".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>
+This belongs as a container requirement, rather than an iterator
+requirement, because the whole notion of iterator/const_iterator
+pairs is specific to containers' iterator.
+</p>
+<p>
+It is existing practice that (for example)
+iterator_traits&lt;list&lt;int&gt;::const_iterator&gt;::value_type
+is "int", rather than "const int". This is consistent with
+the way that const pointers are handled: the standard already
+requires that iterator_traits&lt;const int*&gt;::value_type is int.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="324"></a>324. Do output iterators have value types?</h3>
+<p><b>Section:</b> 24.1.2 [output.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#output.iterators">issues</a> in [output.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>Table 73 suggests that output iterators have value types. It
+requires the expression "*a = t". Additionally, although Table 73
+never lists "a = t" or "X(a) = t" in the "expressions" column, it
+contains a note saying that "a = t" and "X(a) = t" have equivalent
+(but nowhere specified!) semantics.</p>
+
+<p>According to 24.1/9, t is supposed to be "a value of value type
+T":</p>
+
+ <blockquote><p>
+ In the following sections, a and b denote values of X, n denotes a
+ value of the difference type Distance, u, tmp, and m denote
+ identifiers, r denotes a value of X&amp;, t denotes a value of
+ value type T.
+ </p></blockquote>
+
+<p>Two other parts of the standard that are relevant to whether
+output iterators have value types:</p>
+
+<ul>
+ <li>24.1/1 says "All iterators i support the expression *i,
+ resulting in a value of some class, enumeration, or built-in type
+ T, called the value type of the iterator".</li>
+
+ <li>
+ 24.3.1/1, which says "In the case of an output iterator, the types
+ iterator_traits&lt;Iterator&gt;::difference_type
+ iterator_traits&lt;Iterator&gt;::value_type are both defined as void."
+ </li>
+</ul>
+
+<p>The first of these passages suggests that "*i" is supposed to
+return a useful value, which contradicts the note in 24.1.2/2 saying
+that the only valid use of "*i" for output iterators is in an
+expression of the form "*i = t". The second of these passages appears
+to contradict Table 73, because it suggests that "*i"'s return value
+should be void. The second passage is also broken in the case of a an
+iterator type, like non-const pointers, that satisfies both the output
+iterator requirements and the forward iterator requirements.</p>
+
+<p>What should the standard say about <tt>*i</tt>'s return value when
+i is an output iterator, and what should it say about that t is in the
+expression "*i = t"? Finally, should the standard say anything about
+output iterators' pointer and reference types?</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>24.1 p1, change</p>
+
+<blockquote>
+<p>All iterators <tt>i</tt> support the expression <tt>*i</tt>, resulting
+in a value of some class, enumeration, or built-in type <tt>T</tt>,
+called the value type of the iterator.</p>
+</blockquote>
+
+<p>to</p>
+
+<blockquote>
+<p>All input iterators <tt>i</tt> support the expression <tt>*i</tt>,
+resulting in a value of some class, enumeration, or built-in type
+<tt>T</tt>, called the value type of the iterator. All output
+iterators support the expression <tt>*i = o</tt> where <tt>o</tt> is a
+value of some type that is in the set of types that are <i>writable</i> to
+the particular iterator type of <tt>i</tt>.
+</p>
+</blockquote>
+
+<p>24.1 p9, add</p>
+
+<blockquote>
+<p><tt>o</tt> denotes a value of some type that is writable to the
+output iterator.
+</p>
+</blockquote>
+
+<p>Table 73, change</p>
+
+<blockquote>
+<pre>*a = t
+</pre>
+</blockquote>
+
+<p>to</p>
+
+<blockquote>
+<pre>*r = o
+</pre>
+</blockquote>
+
+<p>and change</p>
+
+<blockquote>
+<pre>*r++ = t
+</pre>
+</blockquote>
+
+<p>to</p>
+
+<blockquote>
+<pre>*r++ = o
+</pre>
+</blockquote>
+
+<p><i>[post-Redmond: Jeremy provided wording]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG considered two options: change all of the language that
+seems to imply that output iterators have value types, thus making it
+clear that output iterators have no value types, or else define value
+types for output iterator consistently. The LWG chose the former
+option, because it seems clear that output iterators were never
+intended to have value types. This was a deliberate design decision,
+and any language suggesting otherwise is simply a mistake.</p>
+
+<p>A future revision of the standard may wish to revisit this design
+decision.</p>
+
+
+
+
+
+<hr>
+<h3><a name="325"></a>325. Misleading text in moneypunct&lt;&gt;::do_grouping</h3>
+<p><b>Section:</b> 22.2.6.3.2 [locale.moneypunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.moneypunct.virtuals">issues</a> in [locale.moneypunct.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The Returns clause in 22.2.6.3.2, p3 says about
+moneypunct&lt;charT&gt;::do_grouping()
+</p>
+
+<blockquote><p>
+ Returns: A pattern defined identically as the result of
+ numpunct&lt;charT&gt;::do_grouping().241)
+</p></blockquote>
+
+<p>Footnote 241 then reads</p>
+
+<blockquote><p>
+ This is most commonly the value "\003" (not "3").
+</p></blockquote>
+
+<p>
+The returns clause seems to imply that the two member functions must
+return an identical value which in reality may or may not be true,
+since the facets are usually implemented in terms of struct std::lconv
+and return the value of the grouping and mon_grouping, respectively.
+The footnote also implies that the member function of the moneypunct
+facet (rather than the overridden virtual functions in moneypunct_byname)
+most commonly return "\003", which contradicts the C standard which
+specifies the value of "" for the (most common) C locale.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the text in Returns clause in 22.2.6.3.2, p3 with the following:</p>
+
+<blockquote><p>
+ Returns: A pattern defined identically as, but not necessarily
+ equal to, the result of numpunct&lt;charT&gt;::do_grouping().241)
+</p></blockquote>
+
+<p>and replace the text in Footnote 241 with the following:</p>
+
+<blockquote><p>
+ To specify grouping by 3s the value is "\003", not "3".
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+The fundamental problem is that the description of the locale facet
+virtuals serves two purposes: describing the behavior of the base
+class, and describing the meaning of and constraints on the behavior
+in arbitrary derived classes. The new wording makes that separation a
+little bit clearer. The footnote (which is nonnormative) is not
+supposed to say what the grouping is in the "C" locale or in any other
+locale. It is just a reminder that the values are interpreted as small
+integers, not ASCII characters.
+</p>
+
+
+
+
+<hr>
+<h3><a name="327"></a>327. Typo in time_get facet in table 52</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Tiki Wan <b>Date:</b> 2001-07-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#447">447</a></p>
+<p><b>Discussion:</b></p>
+<p>The <tt>wchar_t</tt> versions of <tt>time_get</tt> and
+<tt>time_get_byname</tt> are listed incorrectly in table 52,
+required instantiations. In both cases the second template
+parameter is given as OutputIterator. It should instead be
+InputIterator, since these are input facets.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In table 52, required instantiations, in
+22.1.1.1.1 [locale.category], change</p>
+<pre> time_get&lt;wchar_t, OutputIterator&gt;
+ time_get_byname&lt;wchar_t, OutputIterator&gt;
+</pre>
+<p>to</p>
+<pre> time_get&lt;wchar_t, InputIterator&gt;
+ time_get_byname&lt;wchar_t, InputIterator&gt;
+</pre>
+
+<p><i>[Redmond: Very minor change in proposed resolution. Original had
+a typo, wchart instead of wchar_t.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="328"></a>328. Bad sprintf format modifier in money_put&lt;&gt;::do_put()</h3>
+<p><b>Section:</b> 22.2.6.2.2 [locale.money.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-07</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The sprintf format string , "%.01f" (that's the digit one), in the
+description of the do_put() member functions of the money_put facet in
+22.2.6.2.2, p1 is incorrect. First, the f format specifier is wrong
+for values of type long double, and second, the precision of 01
+doesn't seem to make sense. What was most likely intended was
+"%.0Lf"., that is a precision of zero followed by the L length
+modifier.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the format string to "%.0Lf".</p>
+
+
+<p><b>Rationale:</b></p><p>Fixes an obvious typo</p>
+
+
+
+
+<hr>
+<h3><a name="329"></a>329. vector capacity, reserve and reallocation</h3>
+<p><b>Section:</b> 23.2.5.2 [vector.capacity], 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Anthony Williams <b>Date:</b> 2001-07-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.capacity">issues</a> in [vector.capacity].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There is an apparent contradiction about which circumstances can cause
+a reallocation of a vector in Section 23.2.5.2 [vector.capacity] and
+section 23.2.5.4 [vector.modifiers].
+</p>
+
+<p>23.2.5.2 [vector.capacity],p5 says:</p>
+<blockquote><p>
+Notes: Reallocation invalidates all the references, pointers, and iterators
+referring to the elements in the sequence. It is guaranteed that no
+reallocation takes place during insertions that happen after a call to
+reserve() until the time when an insertion would make the size of the vector
+greater than the size specified in the most recent call to reserve().
+</p></blockquote>
+
+<p>Which implies if I do</p>
+
+<pre> std::vector&lt;int&gt; vec;
+ vec.reserve(23);
+ vec.reserve(0);
+ vec.insert(vec.end(),1);
+</pre>
+
+<p>then the implementation may reallocate the vector for the insert,
+as the size specified in the previous call to reserve was zero.</p>
+
+<p>However, the previous paragraphs (23.2.5.2 [vector.capacity], p1-2) state:</p>
+<blockquote>
+<p>
+(capacity) Returns: The total number of elements the vector
+can hold without requiring reallocation
+</p>
+<p>
+...After reserve(), capacity() is greater or equal to the
+argument of reserve if reallocation happens; and equal to the previous value
+of capacity() otherwise...
+</p>
+</blockquote>
+
+<p>
+This implies that vec.capacity() is still 23, and so the insert()
+should not require a reallocation, as vec.size() is 0. This is backed
+up by 23.2.5.4 [vector.modifiers], p1:
+</p>
+<blockquote><p>
+(insert) Notes: Causes reallocation if the new size is greater than the old
+capacity.
+</p></blockquote>
+
+<p>
+Though this doesn't rule out reallocation if the new size is less
+than the old capacity, I think the intent is clear.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the wording of 23.2.5.2 [vector.capacity] paragraph 5 to:</p>
+
+<blockquote><p>
+Notes: Reallocation invalidates all the references, pointers, and
+iterators referring to the elements in the sequence. It is guaranteed
+that no reallocation takes place during insertions that happen after a
+call to reserve() until the time when an insertion would make the size
+of the vector greater than the value of capacity().
+</p></blockquote>
+
+<p><i>[Redmond: original proposed resolution was modified slightly. In
+the original, the guarantee was that there would be no reallocation
+until the size would be greater than the value of capacity() after the
+most recent call to reserve(). The LWG did not believe that the
+"after the most recent call to reserve()" added any useful
+information.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>There was general agreement that, when reserve() is called twice in
+succession and the argument to the second invocation is smaller than
+the argument to the first, the intent was for the second invocation to
+have no effect. Wording implying that such cases have an effect on
+reallocation guarantees was inadvertant.</p>
+
+
+
+
+
+<hr>
+<h3><a name="331"></a>331. bad declaration of destructor for ios_base::failure</h3>
+<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+With the change in 17.4.4.8 [res.on.exception.handling] to state
+ "An implementation may strengthen the exception-specification for a
+ non-virtual function by removing listed exceptions."
+(issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#119">119</a>)
+and the following declaration of ~failure() in ios_base::failure
+</p>
+<pre> namespace std {
+ class ios_base::failure : public exception {
+ public:
+ ...
+ virtual ~failure();
+ ...
+ };
+ }
+</pre>
+<p>the class failure cannot be implemented since in 18.6.1 [type.info] the destructor of class exception has an empty
+exception specification:</p>
+<pre> namespace std {
+ class exception {
+ public:
+ ...
+ virtual ~exception() throw();
+ ...
+ };
+ }
+</pre>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove the declaration of ~failure().</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The proposed resolution is consistent with the way that destructors
+of other classes derived from <tt>exception</tt> are handled.</p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="333"></a>333. does endl imply synchronization with the device?</h3>
+<p><b>Section:</b> 27.6.2.8 [ostream.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>A footnote in 27.6.2.8 [ostream.manip] states:</p>
+<blockquote><p>
+ [Footnote: The effect of executing cout &lt;&lt; endl is to insert a
+ newline character in the output sequence controlled by cout, then
+ synchronize it with any external file with which it might be
+ associated. --- end foonote]
+</p></blockquote>
+
+<p>
+Does the term "file" here refer to the external device?
+This leads to some implementation ambiguity on systems with fully
+buffered files where a newline does not cause a flush to the device.
+</p>
+
+<p>
+Choosing to sync with the device leads to significant performance
+penalties for each call to endl, while not sync-ing leads to
+errors under special circumstances.
+</p>
+
+<p>
+I could not find any other statement that explicitly defined
+the behavior one way or the other.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove footnote 300 from section 27.6.2.8 [ostream.manip].</p>
+
+
+<p><b>Rationale:</b></p>
+<p>We already have normative text saying what <tt>endl</tt> does: it
+inserts a newline character and calls <tt>flush</tt>. This footnote
+is at best redundant, at worst (as this issue says) misleading,
+because it appears to make promises about what <tt>flush</tt>
+does.</p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="334"></a>334. map::operator[] specification forces inefficient implementation</h3>
+<p><b>Section:</b> 23.3.1.2 [map.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andrea Griffini <b>Date:</b> 2001-09-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#map.access">issues</a> in [map.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current standard describes map::operator[] using a
+code example. That code example is however quite
+inefficient because it requires several useless copies
+of both the passed key_type value and of default
+constructed mapped_type instances.
+My opinion is that was not meant by the comitee to
+require all those temporary copies.
+</p>
+
+<p>Currently map::operator[] behaviour is specified as: </p>
+<pre> Returns:
+ (*((insert(make_pair(x, T()))).first)).second.
+</pre>
+
+<p>
+This specification however uses make_pair that is a
+template function of which parameters in this case
+will be deduced being of type const key_type&amp; and
+const T&amp;. This will create a pair&lt;key_type,T&gt; that
+isn't the correct type expected by map::insert so
+another copy will be required using the template
+conversion constructor available in pair to build
+the required pair&lt;const key_type,T&gt; instance.
+</p>
+
+<p>If we consider calling of key_type copy constructor
+and mapped_type default constructor and copy
+constructor as observable behaviour (as I think we
+should) then the standard is in this place requiring
+two copies of a key_type element plus a default
+construction and two copy construction of a mapped_type
+(supposing the addressed element is already present
+in the map; otherwise at least another copy
+construction for each type).
+</p>
+
+<p>A simple (half) solution would be replacing the description with:</p>
+<pre> Returns:
+ (*((insert(value_type(x, T()))).first)).second.
+</pre>
+
+<p>This will remove the wrong typed pair construction that
+requires one extra copy of both key and value.</p>
+
+<p>However still the using of map::insert requires temporary
+objects while the operation, from a logical point of view,
+doesn't require any. </p>
+
+<p>I think that a better solution would be leaving free an
+implementer to use a different approach than map::insert
+that, because of its interface, forces default constructed
+temporaries and copies in this case.
+The best solution in my opinion would be just requiring
+map::operator[] to return a reference to the mapped_type
+part of the contained element creating a default element
+with the specified key if no such an element is already
+present in the container. Also a logarithmic complexity
+requirement should be specified for the operation.
+</p>
+
+<p>
+This would allow library implementers to write alternative
+implementations not using map::insert and reaching optimal
+performance in both cases of the addressed element being
+present or absent from the map (no temporaries at all and
+just the creation of a new pair inside the container if
+the element isn't present).
+Some implementer has already taken this option but I think
+that the current wording of the standard rules that as
+non-conforming.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Replace 23.3.1.2 [map.access] paragraph 1 with
+</p>
+<blockquote>
+<p>
+-1- Effects: If there is no key equivalent to x in the map, inserts
+value_type(x, T()) into the map.
+</p>
+<p>
+-2- Returns: A reference to the mapped_type corresponding to x in *this.
+</p>
+<p>
+-3- Complexity: logarithmic.
+</p>
+</blockquote>
+
+<p><i>[This is the second option mentioned above. Howard provided
+wording. We may also wish to have a blanket statement somewhere in
+clause 17 saying that we do not intend the semantics of sample code
+fragments to be interpreted as specifing exactly how many copies are
+made. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#98">98</a> for a similar problem.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+This is the second solution described above; as noted, it is
+consistent with existing practice.
+</p>
+
+<p>Note that we now need to specify the complexity explicitly, because
+we are no longer defining <tt>operator[]</tt> in terms of
+<tt>insert</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="335"></a>335. minor issue with char_traits, table 37</h3>
+<p><b>Section:</b> 21.1.1 [char.traits.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-09-06</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 37, in 21.1.1 [char.traits.require], descibes char_traits::assign
+as:
+</p>
+<pre> X::assign(c,d) assigns c = d.
+</pre>
+
+<p>And para 1 says:</p>
+
+<blockquote><p>
+ [...] c and d denote values of type CharT [...]
+</p></blockquote>
+
+<p>
+Naturally, if c and d are <i>values</i>, then the assignment is
+(effectively) meaningless. It's clearly intended that (in the case of
+assign, at least), 'c' is intended to be a reference type.
+</p>
+
+<p>I did a quick survey of the four implementations I happened to have
+lying around, and sure enough they all have signatures:</p>
+<pre> assign( charT&amp;, const charT&amp; );
+</pre>
+
+<p>(or the equivalent). It's also described this way in Nico's book.
+(Not to mention the synopses of char_traits&lt;char&gt; in 21.1.3.1
+and char_traits&lt;wchar_t&gt; in 21.1.3.2...)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following to 21.1.1 para 1:</p>
+<blockquote><p>
+ r denotes an lvalue of CharT
+</p></blockquote>
+
+<p>and change the description of assign in the table to:</p>
+<pre> X::assign(r,d) assigns r = d
+</pre>
+
+
+
+
+
+<hr>
+<h3><a name="336"></a>336. Clause 17 lack of references to deprecated headers</h3>
+<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-09-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>From c++std-edit-873:</p>
+
+<p>17.4.1.2 [headers], Table 11. In this table, the header
+&lt;strstream&gt; is missing.</p>
+
+<p>This shows a general problem: The whole clause 17 refers quite
+often to clauses 18 through 27, but D.7 is also a part of the standard
+library (though a deprecated one).</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>To 17.4.1.2 [headers] Table 11, C++ Library Headers, add
+"&lt;strstream&gt;".</p>
+
+<p>In the following places, change "clauses 17 through 27" to "clauses
+17 through 27 and Annex D":</p>
+
+<ul>
+<li>1.2 [intro.refs] Normative references/1/footnote 1</li>
+<li>1.3 [intro.defs] Definitions/1</li>
+<li>7 [dcl.dcl] Library introduction/9</li>
+<li>17.3 [description] Method of description (Informative)/1</li>
+<li>17.3.2.1.3 [character.seq] Character sequences/1/bullet 2</li>
+<li>17.3.2.2 [functions.within.classes] Functions within classes/1</li>
+<li>17.3.2.3 [objects.within.classes] Private members/1/(2 places)</li>
+<li>17.4 [requirements] Library-wide requirements/1</li>
+<li>17.4.1.2 [headers] Headers/4</li>
+<li>17.4.3.4 [replacement.functions] Replacement functions/1</li>
+<li>17.4.4.3 [global.functions] Global or non-member functions/2</li>
+<li>17.4.4.6 [protection.within.classes] Protection within classes/1</li>
+</ul>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="337"></a>337. replace_copy_if's template parameter should be InputIterator</h3>
+<p><b>Section:</b> 25.2.5 [alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-09-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.replace">issues</a> in [alg.replace].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>From c++std-edit-876:</p>
+
+<p>
+In section 25.2.5 [alg.replace] before p4: The name of the first
+parameter of template replace_copy_if should be "InputIterator"
+instead of "Iterator". According to 17.3.2.1 [type.descriptions] p1 the
+parameter name conveys real normative meaning.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change <tt>Iterator</tt> to <tt>InputIterator</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="338"></a>338. is whitespace allowed between `-' and a digit?</h3>
+<p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-17</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+From Stage 2 processing in 22.2.2.1.2 [facet.num.get.virtuals], p8 and 9 (the
+original text or the text corrected by the proposed resolution of
+issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>) it seems clear that no whitespace is allowed
+within a number, but 22.2.3.1 [locale.numpunct], p2, which gives the
+format for integer and floating point values, says that whitespace is
+optional between a plusminus and a sign.
+</p>
+
+<p>
+The text needs to be clarified to either consistently allow or
+disallow whitespace between a plusminus and a sign. It might be
+worthwhile to consider the fact that the C library stdio facility does
+not permit whitespace embedded in numbers and neither does the C or
+C++ core language (the syntax of integer-literals is given in 2.13.1
+[lex.icon], that of floating-point-literals in 2.13.3 [lex.fcon] of the
+C++ standard).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the first part of 22.2.3.1 [locale.numpunct] paragraph 2 from:</p>
+<blockquote>
+<p>
+The syntax for number formats is as follows, where <tt>digit</tt>
+represents the radix set specified by the <tt>fmtflags</tt> argument
+value, <tt>whitespace</tt> is as determined by the facet
+<tt>ctype&lt;charT&gt;</tt> (22.2.1.1), and <tt>thousands-sep</tt> and
+<tt>decimal-point</tt> are the results of corresponding
+<tt>numpunct&lt;charT&gt;</tt> members. Integer values have the
+format:
+</p>
+<pre> integer ::= [sign] units
+ sign ::= plusminus [whitespace]
+ plusminus ::= '+' | '-'
+ units ::= digits [thousands-sep units]
+ digits ::= digit [digits]
+</pre>
+</blockquote>
+<p>to:</p>
+<blockquote>
+<p>
+The syntax for number formats is as follows, where <tt>digit</tt>
+represents the radix set specified by the <tt>fmtflags</tt> argument
+value, and <tt>thousands-sep</tt> and <tt>decimal-point</tt> are the
+results of corresponding <tt>numpunct&lt;charT&gt;</tt> members.
+Integer values have the format:
+</p>
+<pre> integer ::= [sign] units
+ sign ::= plusminus
+ plusminus ::= '+' | '-'
+ units ::= digits [thousands-sep units]
+ digits ::= digit [digits]
+</pre>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>It's not clear whether the format described in 22.2.3.1 [locale.numpunct] paragraph 2 has any normative weight: nothing in the
+standard says how, or whether, it's used. However, there's no reason
+for it to differ gratuitously from the very specific description of
+numeric processing in 22.2.2.1.2 [facet.num.get.virtuals]. The proposed
+resolution removes all mention of "whitespace" from that format.</p>
+
+
+
+
+
+<hr>
+<h3><a name="339"></a>339. definition of bitmask type restricted to clause 27</h3>
+<p><b>Section:</b> 22.2.1 [category.ctype], 17.3.2.1.2 [bitmask.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#category.ctype">issues</a> in [category.ctype].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>The ctype_category::mask type is declared to be an enum in 22.2.1
+[category.ctype] with p1 then stating that it is a bitmask type, most
+likely referring to the definition of bitmask type in 17.3.2.1.2
+[bitmask.types], p1. However, the said definition only applies to
+clause 27, making the reference in 22.2.1 somewhat dubious.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Clarify 17.3.2.1.2, p1 by changing the current text from</p>
+ <blockquote><p>
+ Several types defined in clause 27 are bitmask types. Each bitmask type
+ can be implemented as an enumerated type that overloads certain operators,
+ as an integer type, or as a bitset (23.3.5 [template.bitset]).
+ </p></blockquote>
+<p>to read</p>
+ <blockquote><p>
+ Several types defined in clauses lib.language.support through
+ lib.input.output and Annex D are bitmask types. Each bitmask type can
+ be implemented as an enumerated type that overloads certain operators,
+ as an integer type, or as a bitset (lib.template.bitset).
+ </p></blockquote>
+
+<p>
+Additionally, change the definition in 22.2.1 to adopt the same
+convention as in clause 27 by replacing the existing text with the
+following (note, in particluar, the cross-reference to 17.3.2.1.2 in
+22.2.1, p1):
+</p>
+
+<blockquote>
+<p>22.2.1 The ctype category [lib.category.ctype]</p>
+<pre>namespace std {
+ class ctype_base {
+ public:
+ typedef <b><i>T</i></b> mask;
+
+ // numeric values are for exposition only.
+ static const mask space = 1 &lt;&lt; 0;
+ static const mask print = 1 &lt;&lt; 1;
+ static const mask cntrl = 1 &lt;&lt; 2;
+ static const mask upper = 1 &lt;&lt; 3;
+ static const mask lower = 1 &lt;&lt; 4;
+ static const mask alpha = 1 &lt;&lt; 5;
+ static const mask digit = 1 &lt;&lt; 6;
+ static const mask punct = 1 &lt;&lt; 7;
+ static const mask xdigit = 1 &lt;&lt; 8;
+ static const mask alnum = alpha | digit;
+ static const mask graph = alnum | punct;
+ };
+}
+</pre>
+
+<p>The type <tt>mask</tt> is a bitmask type (17.3.2.1.2 [bitmask.types]).</p>
+</blockquote>
+
+<p><i>[Curaçao: The LWG notes that T above should be bold-italics to be
+consistent with the rest of the standard.]</i></p>
+
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="340"></a>340. interpretation of <tt>has_facet&lt;Facet&gt;(loc)</tt></h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It's unclear whether 22.1.1.1.1, p3 says that
+<tt>has_facet&lt;Facet&gt;(loc)</tt> returns true for any <tt>Facet</tt>
+from Table 51 or whether it includes Table 52 as well:
+</p>
+
+<blockquote><p>
+For any locale <tt>loc</tt> either constructed, or returned by
+locale::classic(), and any facet <tt>Facet</tt> that is a member of a
+standard category, <tt>has_facet&lt;Facet&gt;(loc)</tt> is true. Each
+locale member function which takes a <tt>locale::category</tt>
+argument operates on the corresponding set of facets.
+</p></blockquote>
+
+<p>
+It seems that it comes down to which facets are considered to be members of a
+standard category. Intuitively, I would classify all the facets in Table 52 as
+members of their respective standard categories, but there are an unbounded set
+of them...
+</p>
+
+<p>
+The paragraph implies that, for instance, <tt>has_facet&lt;num_put&lt;C,
+OutputIterator&gt; &gt;(loc)</tt> must always return true. I don't think that's
+possible. If it were, then <tt>use_facet&lt;num_put&lt;C, OutputIterator&gt;
+&gt;(loc)</tt> would have to return a reference to a distinct object for each
+valid specialization of <tt>num_put&lt;C, OutputIteratory&gt;</tt>, which is
+clearly impossible.
+</p>
+
+<p>
+On the other hand, if none of the facets in Table 52 is a member of a standard
+category then none of the locale member functions that operate on entire
+categories of facets will work properly.
+</p>
+
+<p>
+It seems that what p3 should mention that it's required (permitted?)
+to hold only for specializations of <tt>Facet</tt> from Table 52 on
+<tt>C</tt> from the set { <tt>char</tt>, <tt>wchar_t</tt> }, and
+<tt>InputIterator</tt> and <tt>OutputIterator</tt> from the set of
+{
+{i,o}<tt>streambuf_iterator</tt>&lt;{<tt>char</tt>,<tt>wchar_t</tt>}<tt>&gt;</tt>
+}.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.1.1.1 [locale.category], paragraph 3, change
+"that is a member of a standard category" to "shown in Table 51".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The facets in Table 52 are an unbounded set. Locales should not be
+required to contain an infinite number of facets.</p>
+
+<p>It's not necessary to talk about which values of InputIterator and
+OutputIterator must be supported. Table 51 already contains a
+complete list of the ones we need.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="341"></a>341. Vector reallocation and swap</h3>
+<p><b>Section:</b> 23.2.5.2 [vector.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Anthony Williams <b>Date:</b> 2001-09-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.capacity">issues</a> in [vector.capacity].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It is a common idiom to reduce the capacity of a vector by swapping it with
+an empty one:</p>
+<pre> std::vector&lt;SomeType&gt; vec;
+ // fill vec with data
+ std::vector&lt;SomeType&gt;().swap(vec);
+ // vec is now empty, with minimal capacity
+</pre>
+
+<p>However, the wording of 23.2.5.2 [vector.capacity]paragraph 5 prevents
+the capacity of a vector being reduced, following a call to
+reserve(). This invalidates the idiom, as swap() is thus prevented
+from reducing the capacity. The proposed wording for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#329">329</a> does not affect this. Consequently, the example above
+requires the temporary to be expanded to cater for the contents of
+vec, and the contents be copied across. This is a linear-time
+operation.</p>
+
+<p>However, the container requirements state that swap must have constant
+complexity (23.1 [container.requirements] note to table 65).</p>
+
+<p>This is an important issue, as reallocation affects the validity of
+references and iterators.</p>
+
+<p>If the wording of 23.2.4.2p5 is taken to be the desired intent, then
+references and iterators remain valid after a call to swap, if they refer to
+an element before the new end() of the vector into which they originally
+pointed, in which case they refer to the element at the same index position.
+Iterators and references that referred to an element whose index position
+was beyond the new end of the vector are invalidated.</p>
+
+<p>If the note to table 65 is taken as the desired intent, then there are two
+possibilities with regard to iterators and references:</p>
+
+<ol>
+<li>All Iterators and references into both vectors are invalidated.</li>
+<li>Iterators and references into either vector remain valid, and remain
+pointing to the same element. Consequently iterators and references that
+referred to one vector now refer to the other, and vice-versa.</li>
+</ol>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a new paragraph after 23.2.5.2 [vector.capacity] paragraph 5:</p>
+<blockquote>
+<pre> void swap(vector&lt;T,Allocator&gt;&amp; x);
+</pre>
+<p><b>Effects:</b> Exchanges the contents and capacity() of <tt>*this</tt>
+with that of <tt>x</tt>.</p>
+<p><b>Complexity:</b> Constant time.</p>
+</blockquote>
+
+<p><i>[This solves the problem reported for this issue. We may also
+have a problem with a circular definition of swap() for other
+containers.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+swap should be constant time. The clear intent is that it should just
+do pointer twiddling, and that it should exchange all properties of
+the two vectors, including their reallocation guarantees.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="345"></a>345. type tm in &lt;cwchar&gt;</h3>
+<p><b>Section:</b> 21.5 [c.strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Clark Nelson <b>Date:</b> 2001-10-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.strings">issues</a> in [c.strings].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>C99, and presumably amendment 1 to C90, specify that &lt;wchar.h&gt;
+declares struct tm as an incomplete type. However, table 48 in 21.5
+[c.strings] does not mention the type tm as being declared in
+&lt;cwchar&gt;. Is this omission intentional or accidental?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In section 21.5 [c.strings], add "tm" to table 48.</p>
+
+
+
+
+
+<hr>
+<h3><a name="346"></a>346. Some iterator member functions should be const</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Jeremy Siek <b>Date:</b> 2001-10-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Iterator member functions and operators that do not change the state
+of the iterator should be defined as const member functions or as
+functions that take iterators either by const reference or by
+value. The standard does not explicitly state which functions should
+be const. Since this a fairly common mistake, the following changes
+are suggested to make this explicit.</p>
+
+<p>The tables almost indicate constness properly through naming: r
+for non-const and a,b for const iterators. The following changes
+make this more explicit and also fix a couple problems.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 24.1 [iterator.requirements] Change the first section of p9 from
+"In the following sections, a and b denote values of X..." to
+"In the following sections, a and b denote values of type const X...".</p>
+
+<p>In Table 73, change</p>
+<pre> a-&gt;m U&amp; ...
+</pre>
+
+<p>to</p>
+
+<pre> a-&gt;m const U&amp; ...
+ r-&gt;m U&amp; ...
+</pre>
+
+<p>In Table 73 expression column, change</p>
+
+<pre> *a = t
+</pre>
+
+<p>to</p>
+
+<pre> *r = t
+</pre>
+
+<p><i>[Redmond: The container requirements should be reviewed to see if
+the same problem appears there.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="347"></a>347. locale::category and bitmask requirements</h3>
+<p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> P.J. Plauger, Nathan Myers <b>Date:</b> 2001-10-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 22.1.1.1.1 [locale.category] paragraph 1, the category members
+are described as bitmask elements. In fact, the bitmask requirements
+in 17.3.2.1.2 [bitmask.types] don't seem quite right: <tt>none</tt>
+and <tt>all</tt> are bitmask constants, not bitmask elements.</p>
+
+<p>In particular, the requirements for <tt>none</tt> interact poorly
+with the requirement that the LC_* constants from the C library must
+be recognizable as C++ locale category constants. LC_* values should
+not be mixed with these values to make category values.</p>
+
+<p>We have two options for the proposed resolution. Informally:
+option 1 removes the requirement that LC_* values be recognized as
+category arguments. Option 2 changes the category type so that this
+requirement is implementable, by allowing <tt>none</tt> to be some
+value such as 0x1000 instead of 0.</p>
+
+<p>Nathan writes: "I believe my proposed resolution [Option 2] merely
+re-expresses the status quo more clearly, without introducing any
+changes beyond resolving the DR.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace the first two paragraphs of 22.1.1.1 [locale.types] with:</p>
+<blockquote>
+<pre> typedef int category;
+</pre>
+
+<p>Valid category values include the <tt>locale</tt> member bitmask
+elements <tt>collate</tt>, <tt>ctype</tt>, <tt>monetary</tt>,
+<tt>numeric</tt>, <tt>time</tt>, and <tt>messages</tt>, each of which
+represents a single locale category. In addition, <tt>locale</tt> member
+bitmask constant <tt>none</tt> is defined as zero and represents no
+category. And locale member bitmask constant <tt>all</tt> is defined such that
+the expression</p>
+<pre> (collate | ctype | monetary | numeric | time | messages | all) == all
+</pre>
+<p>
+is <tt>true</tt>, and represents the union of all categories. Further
+the expression <tt>(X | Y)</tt>, where <tt>X</tt> and <tt>Y</tt> each
+represent a single category, represents the union of the two
+categories.
+</p>
+
+<p>
+<tt>locale</tt> member functions expecting a <tt>category</tt>
+argument require one of the <tt>category</tt> values defined above, or
+the union of two or more such values. Such a <tt>category</tt>
+argument identifies a set of locale categories. Each locale category,
+in turn, identifies a set of locale facets, including at least those
+shown in Table 51:
+</p>
+</blockquote>
+<p><i>[Curaçao: need input from locale experts.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+
+<p>The LWG considered, and rejected, an alternate proposal (described
+ as "Option 2" in the discussion). The main reason for rejecting it
+ was that library implementors were concerened about implementation
+ difficult, given that getting a C++ library to work smoothly with a
+ separately written C library is already a delicate business. Some
+ library implementers were also concerned about the issue of adding
+ extra locale categories.</p>
+
+<blockquote>
+<p><b>Option 2:</b> <br>
+Replace the first paragraph of 22.1.1.1 [locale.types] with:</p>
+<blockquote>
+<p>
+Valid category values include the enumerated values. In addition, the
+result of applying commutative operators | and &amp; to any two valid
+values is valid, and results in the setwise union and intersection,
+respectively, of the argument categories. The values <tt>all</tt> and
+<tt>none</tt> are defined such that for any valid value <tt>cat</tt>, the
+expressions <tt>(cat | all == all)</tt>, <tt>(cat &amp; all == cat)</tt>,
+<tt>(cat | none == cat)</tt> and <tt>(cat &amp; none == none)</tt> are
+true. For non-equal values <tt>cat1</tt> and <tt>cat2</tt> of the
+remaining enumerated values, <tt>(cat1 &amp; cat2 == none)</tt> is true.
+For any valid categories <tt>cat1</tt> and <tt>cat2</tt>, the result
+of <tt>(cat1 &amp; ~cat2)</tt> is valid, and equals the setwise union of
+those categories found in <tt>cat1</tt> but not found in <tt>cat2</tt>.
+[Footnote: it is not required that <tt>all</tt> equal the setwise union
+of the other enumerated values; implementations may add extra categories.]
+</p>
+</blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="349"></a>349. Minor typographical error in ostream_iterator</h3>
+<p><b>Section:</b> 24.5.2 [ostream.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>24.5.2 [lib.ostream.iterator] states:</p>
+<pre> [...]
+
+ private:
+ // basic_ostream&lt;charT,traits&gt;* out_stream; exposition only
+ // const char* delim; exposition only
+</pre>
+
+<p>Whilst it's clearly marked "exposition only", I suspect 'delim'
+should be of type 'const charT*'.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 24.5.2 [ostream.iterator], replace <tt>const char* delim</tt> with
+<tt>const charT* delim</tt>.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="352"></a>352. missing fpos requirements</h3>
+<p><b>Section:</b> 21.1.2 [char.traits.typedefs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<i>(1)</i>
+There are no requirements on the <tt>stateT</tt> template parameter of
+<tt>fpos</tt> listed in 27.4.3. The interface appears to require that
+the type be at least Assignable and CopyConstructible (27.4.3.1, p1),
+and I think also DefaultConstructible (to implement the operations in
+Table 88).
+</p>
+<p>
+21.1.2, p3, however, only requires that
+<tt>char_traits&lt;charT&gt;::state_type</tt> meet the requirements of
+CopyConstructible types.
+</p>
+<p>
+<i>(2)</i>
+Additionally, the <tt>stateT</tt> template argument has no
+corresponding typedef in fpos which might make it difficult to use in
+generic code.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Modify 21.1.2, p4 from
+</p>
+<p>
+ Requires: <tt>state_type</tt> shall meet the requirements of
+ CopyConstructible types (20.1.3).
+</p>
+<p>
+ Requires: state_type shall meet the requirements of Assignable
+ (23.1, p4), CopyConstructible (20.1.3), and
+ DefaultConstructible (20.1.4) types.
+</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG feels this is two issues, as indicated above. The first is
+a defect---std::basic_fstream is unimplementable without these
+additional requirements---and the proposed resolution fixes it. The
+second is questionable; who would use that typedef? The class
+template fpos is used only in a very few places, all of which know the
+state type already. Unless motivation is provided, the second should
+be considered NAD.</p>
+
+
+
+
+
+<hr>
+<h3><a name="354"></a>354. Associative container lower/upper bound requirements</h3>
+<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Hans Aberg <b>Date:</b> 2001-12-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Discussions in the thread "Associative container lower/upper bound
+requirements" on comp.std.c++ suggests that there is a defect in the
+C++ standard, Table 69 of section 23.1.2, "Associative containers",
+[lib.associative.reqmts]. It currently says:</p>
+
+<blockquote>
+<p>
+a.find(k): returns an iterator pointing to an element with the key equivalent to
+k, or a.end() if such an element is not found.
+</p>
+
+<p>
+a.lower_bound(k): returns an iterator pointing to the first element with
+key not less than k.
+</p>
+
+<p>
+a.upper_bound(k): returns an iterator pointing to the first element with
+key greater than k.
+</p>
+</blockquote>
+
+<p>
+We have "or a.end() if such an element is not found" for
+<tt>find</tt>, but not for <tt>upper_bound</tt> or
+<tt>lower_bound</tt>. As the text stands, one would be forced to
+insert a new element into the container and return an iterator to that
+in case the sought iterator does not exist, which does not seem to be
+the intention (and not possible with the "const" versions).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change Table 69 of section 23.1.2 [associative.reqmts] indicated entries
+to:</p>
+
+<blockquote>
+<p>
+a.lower_bound(k): returns an iterator pointing to the first element with
+key not less than k, or a.end() if such an element is not found.
+</p>
+
+<p>
+a.upper_bound(k): returns an iterator pointing to the first element with
+key greater than k, or a.end() if such an element is not found.
+</p>
+</blockquote>
+
+<p><i>[Curaçao: LWG reviewed PR.]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="355"></a>355. Operational semantics for a.back()</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Yaroslav Mironov <b>Date:</b> 2002-01-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>Table 68 "Optional Sequence Operations" in 23.1.1/12
+specifies operational semantics for "a.back()" as
+"*--a.end()", which may be ill-formed <i>[because calling
+operator-- on a temporary (the return) of a built-in type is
+ill-formed]</i>, provided a.end() returns a simple pointer rvalue
+(this is almost always the case for std::vector::end(), for
+example). Thus, the specification is not only incorrect, it
+demonstrates a dangerous construct: "--a.end()" may
+successfully compile and run as intended, but after changing the type
+of the container or the mode of compilation it may produce
+compile-time error. </p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the specification in table 68 "Optional Sequence
+Operations" in 23.1.1/12 for "a.back()" from</p>
+
+
+<blockquote><pre>*--a.end()
+</pre></blockquote>
+
+<p>to</p>
+
+<blockquote><pre> { iterator tmp = a.end(); --tmp; return *tmp; }
+</pre></blockquote>
+
+<p>and the specification for "a.pop_back()" from</p>
+
+<blockquote><pre>a.erase(--a.end())
+</pre></blockquote>
+
+<p>to</p>
+
+<blockquote><pre> { iterator tmp = a.end(); --tmp; a.erase(tmp); }
+</pre></blockquote>
+
+<p><i>[Curaçao: LWG changed PR from "{ X::iterator tmp =
+a.end(); return *--tmp; }" to "*a.rbegin()", and from
+"{ X::iterator tmp = a.end(); a.erase(--tmp); }" to
+"a.erase(rbegin())".]</i></p>
+
+
+<p><i>[There is a second possible defect; table 68 "Optional
+Sequence Operations" in the "Operational Semantics"
+column uses operations present only in the "Reversible
+Container" requirements, yet there is no stated dependency
+between these separate requirements tables. Ask in Santa Cruz if the
+LWG would like a new issue opened.]</i></p>
+
+
+<p><i>[Santa Cruz: the proposed resolution is even worse than what's in
+ the current standard: erase is undefined for reverse iterator. If
+ we're going to make the change, we need to define a temporary and
+ use operator--. Additionally, we don't know how prevalent this is:
+ do we need to make this change in more than one place? Martin has
+ volunteered to review the standard and see if this problem occurs
+ elsewhere.]</i></p>
+
+
+<p><i>[Oxford: Matt provided new wording to address the concerns raised
+ in Santa Cruz. It does not appear that this problem appears
+ anywhere else in clauses 23 or 24.]</i></p>
+
+
+<p><i>[Kona: In definition of operational semantics of back(), change
+"*tmp" to "return *tmp;"]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="358"></a>358. interpreting <tt>thousands_sep</tt> after a <tt>decimal_point</tt></h3>
+<p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I don't think <tt>thousands_sep</tt> is being treated correctly after
+decimal_point has been seen. Since grouping applies only to the
+integral part of the number, the first such occurrence should, IMO,
+terminate Stage 2. (If it does not terminate it, then 22.2.2.1.2, p12
+and 22.2.3.1.2, p3 need to explain how <tt>thousands_sep</tt> is to be
+interpreted in the fractional part of a number.)
+</p>
+
+<p>
+The easiest change I can think of that resolves this issue would be
+something like below.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the first sentence of 22.2.2.1.2, p9 from
+</p>
+
+<blockquote><p>
+ If discard is true then the position of the character is
+ remembered, but the character is otherwise ignored. If it is not
+ discarded, then a check is made to determine if c is allowed as
+ the next character of an input field of the conversion specifier
+ returned by stage 1. If so it is accumulated.
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+ If <tt>discard</tt> is true, then if <tt>'.'</tt> has not yet been
+ accumulated, then the position of the character is remembered, but
+ the character is otherwise ignored. Otherwise, if <tt>'.'</tt> has
+ already been accumulated, the character is discarded and Stage 2
+ terminates. ...
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>We believe this reflects the intent of the Standard. Thousands sep
+ characters after the decimal point are not useful in any locale.
+ Some formatting conventions do group digits that follow the decimal
+ point, but they usually introduce a different grouping character
+ instead of reusing the thousand sep character. If we want to add
+ support for such conventions, we need to do so explicitly.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="359"></a>359. num_put&lt;&gt;::do_put (..., bool) undocumented</h3>
+<p><b>Section:</b> 22.2.2.2.1 [facet.num.put.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>22.2.2.2.1, p1:</p>
+
+ <pre> iter_type put (iter_type out, ios_base&amp; str, char_type fill,
+ bool val) const;
+ ...
+
+ 1 Returns: do_put (out, str, fill, val).
+ </pre>
+
+<p>AFAICS, the behavior of do_put (..., bool) is not documented anywhere,
+however, 22.2.2.2.2, p23:</p>
+
+<blockquote>
+<pre>iter_type put (iter_type out, ios_base&amp; str, char_type fill,
+ bool val) const;
+</pre>
+
+
+ <p>Effects: If (str.flags() &amp; ios_base::boolalpha) == 0 then do
+ out = do_put(out, str, fill, (int)val)
+ Otherwise do</p>
+<pre> string_type s =
+ val ? use_facet&lt;ctype&lt;charT&gt; &gt;(loc).truename()
+ : use_facet&lt;ctype&lt;charT&gt; &gt;(loc).falsename();
+</pre>
+ <p>and then insert the characters of s into out. <i>out</i>.</p>
+</blockquote>
+
+<p>
+This means that the bool overload of <tt>do_put()</tt> will never be called,
+which contradicts the first paragraph. Perhaps the declaration
+should read <tt>do_put()</tt>, and not <tt>put()</tt>?
+</p>
+
+<p>
+Note also that there is no <b>Returns</b> clause for this function, which
+should probably be corrected, just as should the second occurrence
+of <i>"out."</i> in the text.
+</p>
+
+<p>
+I think the least invasive change to fix it would be something like
+the following:
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.2.2.2.2 [facet.num.put.virtuals], just above paragraph 1, remove
+ the <tt>bool</tt> overload.</p>
+
+<p>
+In 22.2.2.2.2 [facet.num.put.virtuals], p23, make the following changes
+</p>
+
+<blockquote><p>
+ Replace <tt>put()</tt> with <tt>do_put()</tt> in the declaration
+ of the member function.
+</p></blockquote>
+
+<blockquote><p>
+ Change the <b>Effects</b> clause to a <b>Returns</b> clause (to
+ avoid the requirement to call <tt>do_put(..., int)</tt> from <tt>
+ do_put (..., bool))</tt>
+ like so:
+</p></blockquote>
+
+<blockquote><p>
+ 23 <b>Returns</b>: If <tt>(str.flags() &amp;
+ ios_base::boolalpha) == 0</tt> then
+ <tt>do_put (out, str, fill, (long)val)</tt>
+ Otherwise the function obtains a string <tt>s</tt> as if by</p>
+<pre> string_type s =
+ val ? use_facet&lt;ctype&lt;charT&gt; &gt;(loc).truename()
+ : use_facet&lt;ctype&lt;charT&gt; &gt;(loc).falsename();
+</pre>
+ <p>and then inserts each character <tt>c</tt> of s into out via
+ <tt>*out++ = c</tt>
+ and returns <tt>out</tt>.</p>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p><p>
+This fixes a couple of obvious typos, and also fixes what appears to
+be a requirement of gratuitous inefficiency.
+</p>
+
+
+
+
+<hr>
+<h3><a name="360"></a>360. locale mandates inefficient implementation</h3>
+<p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+22.1.1, p7 (copied below) allows iostream formatters and extractors
+to make assumptions about the values returned from facet members.
+However, such assumptions are apparently not guaranteed to hold
+in other cases (e.g., when the facet members are being called directly
+rather than as a result of iostream calls, or between successive
+calls to the same iostream functions with no interevening calls to
+<tt>imbue()</tt>, or even when the facet member functions are called
+from other member functions of other facets). This restriction
+prevents locale from being implemented efficiently.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the first sentence in 22.1.1, p7 from</p>
+<blockquote><p>
+ In successive calls to a locale facet member function during
+ a call to an iostream inserter or extractor or a streambuf member
+ function, the returned result shall be identical. [Note: This
+ implies that such results may safely be reused without calling
+ the locale facet member function again, and that member functions
+ of iostream classes cannot safely call <tt>imbue()</tt>
+ themselves, except as specified elsewhere. --end note]
+</p></blockquote>
+
+<p>to</p>
+
+<blockquote><p>
+ In successive calls to a locale facet member function on a facet
+ object installed in the same locale, the returned result shall be
+ identical. ...
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>This change is reasonable becuase it clarifies the intent of this
+ part of the standard.</p>
+
+
+
+
+
+<hr>
+<h3><a name="362"></a>362. bind1st/bind2nd type safety</h3>
+<p><b>Section:</b> D.8 [depr.lib.binders] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Andrew Demkin <b>Date:</b> 2002-04-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.lib.binders">issues</a> in [depr.lib.binders].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The definition of bind1st() (D.8 [depr.lib.binders]) can result in
+the construction of an unsafe binding between incompatible pointer
+types. For example, given a function whose first parameter type is
+'pointer to T', it's possible without error to bind an argument of
+type 'pointer to U' when U does not derive from T:
+</p>
+<pre> foo(T*, int);
+
+ struct T {};
+ struct U {};
+
+ U u;
+
+ int* p;
+ int* q;
+
+ for_each(p, q, bind1st(ptr_fun(foo), &amp;u)); // unsafe binding
+</pre>
+
+<p>
+The definition of bind1st() includes a functional-style conversion to
+map its argument to the expected argument type of the bound function
+(see below):
+</p>
+<pre> typename Operation::first_argument_type(x)
+</pre>
+
+<p>A functional-style conversion (D.8 [depr.lib.binders]) is defined to
+be
+semantically equivalent to an explicit cast expression (D.8
+[depr.lib.binders]), which may (according to 5.4, paragraph 5) be
+interpreted
+as a reinterpret_cast, thus masking the error.
+</p>
+
+<p>The problem and proposed change also apply to D.8 [depr.lib.binders].</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add this sentence to the end of D.8 [depr.lib.binders]/1:
+ "Binders <tt>bind1st</tt> and <tt>bind2nd</tt> are deprecated in
+ favor of <tt>std::tr1::bind</tt>."</p>
+
+<p>(Notes to editor: (1) when and if tr1::bind is incorporated into
+ the standard, "std::tr1::bind" should be changed to "std::bind". (2)
+ 20.5.6 should probably be moved to Annex D.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>There is no point in fixing bind1st and bind2nd. tr1::bind is a
+ superior solution. It solves this problem and others.</p>
+
+
+
+
+
+<hr>
+<h3><a name="363"></a>363. Missing exception specification in 27.4.2.1.1</h3>
+<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown and Marc Paterno <b>Date:</b> 2002-05-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The destructor of ios_base::failure should have an empty throw
+specification, because the destructor of its base class, exception, is
+declared in this way.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the destructor to</p>
+<pre> virtual ~failure() throw();
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>Fixes an obvious glitch. This is almost editorial.</p>
+
+
+
+
+
+<hr>
+<h3><a name="364"></a>364. Inconsistent wording in 27.5.2.4.2</h3>
+<p><b>Section:</b> 27.5.2.4.2 [streambuf.virt.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.virt.buffer">issues</a> in [streambuf.virt.buffer].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+27.5.2.4.2 [streambuf.virt.buffer] paragraph 1 is inconsistent with the Effects
+clause for seekoff.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Make this paragraph, the Effects clause for setbuf, consistent in wording
+with the Effects clause for seekoff in paragraph 3 by amending paragraph 1
+to indicate the purpose of setbuf:
+</p>
+
+<p>Original text:</p>
+
+<blockquote><p>
+1 Effects: Performs an operation that is defined separately for each
+class derived from basic_streambuf in this clause (27.7.1.3, 27.8.1.4).
+</p></blockquote>
+
+<p>Proposed text:</p>
+
+<blockquote><p>
+1 Effects: Influences stream buffering in a way that is defined separately
+for each class derived from basic_streambuf in this clause
+(27.7.1.3, 27.8.1.4).
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG doesn't believe there is any normative difference between
+ the existing wording and what's in the proposed resolution, but the
+ change may make the intent clearer.</p>
+
+
+
+
+
+<hr>
+<h3><a name="365"></a>365. Lack of const-qualification in clause 27</h3>
+<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Some stream and streambuf member functions are declared non-const,
+even thought they appear only to report information rather than to
+change an object's logical state. They should be declared const. See
+document N1360 for details and rationale.
+</p>
+
+<p>The list of member functions under discussion: <tt>in_avail</tt>,
+<tt>showmanyc</tt>, <tt>tellg</tt>, <tt>tellp</tt>, <tt>is_open</tt>.</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a></p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.8.1.5, 27.8.1.7, 27.8.1.8, 27.8.1.10, 27.8.1.11, and 27.8.1.13</p>
+<p>Replace</p>
+<pre> bool is_open();
+</pre>
+<p>with</p>
+<pre> bool is_open() const;
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>Of the changes proposed in N1360, the only one that is safe is
+changing the filestreams' is_open to const. The LWG believed that
+this was NAD the first time it considered this issue (issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a>), but now thinks otherwise. The corresponding streambuf
+member function, after all,is already const.</p>
+
+<p>The other proposed changes are less safe, because some streambuf
+functions that appear merely to report a value do actually perform
+mutating operations. It's not even clear that they should be
+considered "logically const", because streambuf has two interfaces, a
+public one and a protected one. These functions may, and often do,
+change the state as exposed by the protected interface, even if the
+state exposed by the public interface is unchanged.</p>
+
+<p>Note that implementers can make this change in a binary compatible
+way by providing both overloads; this would be a conforming extension.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="369"></a>369. io stream objects and static ctors</h3>
+<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Ruslan Abdikeev <b>Date:</b> 2002-07-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Is it safe to use standard iostream objects from constructors of
+static objects? Are standard iostream objects constructed and are
+their associations established at that time?
+</p>
+
+<p>Surpisingly enough, Standard does NOT require that.</p>
+
+<p>
+27.3/2 [lib.iostream.objects] guarantees that standard iostream
+objects are constructed and their associations are established before
+the body of main() begins execution. It also refers to ios_base::Init
+class as the panacea for constructors of static objects.
+</p>
+
+<p>
+However, there's nothing in 27.3 [lib.iostream.objects],
+in 27.4.2 [lib.ios.base], and in 27.4.2.1.6 [lib.ios::Init],
+that would require implementations to allow access to standard
+iostream objects from constructors of static objects.
+</p>
+
+<p>Details:</p>
+
+<p>Core text refers to some magic object ios_base::Init, which will
+be discussed below:</p>
+
+<blockquote><p>
+ "The [standard iostream] objects are constructed, and their
+ associations are established at some time prior to or during
+ first time an object of class basic_ios&lt;charT,traits&gt;::Init
+ is constructed, and in any case before the body of main
+ begins execution." (27.3/2 [lib.iostream.objects])
+</p></blockquote>
+
+<p>
+The first <i>non-normative</i> footnote encourages implementations
+to initialize standard iostream objects earlier than required.
+</p>
+
+<p>However, the second <i>non-normative</i> footnote makes an explicit
+and unsupported claim:</p>
+
+<blockquote><p>
+ "Constructors and destructors for static objects can access these
+ [standard iostream] objects to read input from stdin or write output
+ to stdout or stderr." (27.3/2 footnote 265 [lib.iostream.objects])
+</p></blockquote>
+
+<p>
+The only bit of magic is related to that ios_base::Init class. AFAIK,
+the rationale behind ios_base::Init was to bring an instance of this
+class to each translation unit which #included &lt;iostream&gt; or
+related header. Such an inclusion would support the claim of footnote
+quoted above, because in order to use some standard iostream object it
+is necessary to #include &lt;iostream&gt;.
+</p>
+
+<p>
+However, while Standard explicitly describes ios_base::Init as
+an appropriate class for doing the trick, I failed to found a
+mention of an _instance_ of ios_base::Init in Standard.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add to 27.3 [iostream.objects], p2, immediately before the last sentence
+of the paragraph, the following two sentences:</p>
+
+<blockquote><p>
+If a translation unit includes &lt;iostream&gt;, or explicitly
+constructs an ios_base::Init object, these stream objects shall
+be constructed before dynamic initialization of non-local
+objects defined later in that translation unit, and these stream
+objects shall be destroyed after the destruction of dynamically
+initialized non-local objects defined later in that translation unit.
+</p></blockquote>
+
+<p><i>[Lillehammer: Matt provided wording.]</i></p>
+
+<p><i>[Mont Tremblant: Matt provided revised wording.]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+The original proposed resolution unconditionally required
+implementations to define an ios_base::Init object of some
+implementation-defined name in the header &lt;iostream&gt;. That's an
+overspecification. First, defining the object may be unnecessary
+and even detrimental to performance if an implementation can
+guarantee that the 8 standard iostream objects will be initialized
+before any other user-defined object in a program. Second, there
+is no need to require implementations to document the name of the
+object.</p>
+
+<p>
+The new proposed resolution gives users guidance on what they need to
+do to ensure that stream objects are constructed during startup.</p>
+
+
+
+
+
+<hr>
+<h3><a name="370"></a>370. Minor error in basic_istream::get</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-07-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Defect report for description of basic_istream::get (section
+27.6.1.3 [istream.unformatted]), paragraph 15. The description for the
+get function
+with the following signature:</p>
+
+<pre> basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp;
+ sb);
+</pre>
+
+<p>is incorrect. It reads</p>
+
+<blockquote><p>
+ Effects: Calls get(s,n,widen('\n'))
+</p></blockquote>
+
+<p>which I believe should be:</p>
+
+<blockquote><p>
+ Effects: Calls get(sb,widen('\n'))
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the <b>Effects</b> paragraph to:</p>
+<blockquote><p>
+ Effects: Calls get(sb,this-&gt;widen('\n'))
+</p></blockquote>
+
+<p><i>[Pre-Oxford: Minor correction from Howard: replaced 'widen'
+ with 'this-&gt;widen'.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p><p>Fixes an obvious typo.</p>
+
+
+
+
+<hr>
+<h3><a name="371"></a>371. Stability of multiset and multimap member functions</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Frank Compagner <b>Date:</b> 2002-07-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The requirements for multiset and multimap containers (23.1
+[lib.containers.requirements], 23.1.2 [lib.associative.reqmnts],
+23.3.2 [lib.multimap] and 23.3.4 [lib.multiset]) make no mention of
+the stability of the required (mutating) member functions. It appears
+the standard allows these functions to reorder equivalent elements of
+the container at will, yet the pervasive red-black tree implementation
+appears to provide stable behaviour.
+</p>
+
+<p>This is of most concern when considering the behaviour of erase().
+A stability requirement would guarantee the correct working of the
+following 'idiom' that removes elements based on a certain predicate
+function.
+</p>
+
+<pre> multimap&lt;int, int&gt; m;
+ multimap&lt;int, int&gt;::iterator i = m.begin();
+ while (i != m.end()) {
+ if (pred(i))
+ m.erase (i++);
+ else
+ ++i;
+ }
+</pre>
+
+<p>
+Although clause 23.1.2/8 guarantees that i remains a valid iterator
+througout this loop, absence of the stability requirement could
+potentially result in elements being skipped. This would make
+this code incorrect, and, furthermore, means that there is no way
+of erasing these elements without iterating first over the entire
+container, and second over the elements to be erased. This would
+be unfortunate, and have a negative impact on both performance and
+code simplicity.
+</p>
+
+<p>
+If the stability requirement is intended, it should be made explicit
+(probably through an extra paragraph in clause 23.1.2).
+</p>
+<p>
+If it turns out stability cannot be guaranteed, i'd argue that a
+remark or footnote is called for (also somewhere in clause 23.1.2) to
+warn against relying on stable behaviour (as demonstrated by the code
+above). If most implementations will display stable behaviour, any
+problems emerging on an implementation without stable behaviour will
+be hard to track down by users. This would also make the need for an
+erase_if() member function that much greater.
+</p>
+
+<p>This issue is somewhat related to LWG issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add the following to the end of 23.1.2 [associative.reqmts] paragraph 4:
+"For <tt>multiset</tt> and <tt>multimap</tt>, <tt>insert</tt>and <tt>erase</tt>
+ are <i>stable</i>: they preserve the relative ordering of equivalent
+ elements.</p>
+
+<p><i>[Lillehammer: Matt provided wording]</i></p>
+
+<p><i>[Joe Gottman points out that the provided wording does not address
+multimap and multiset. N1780 also addresses this issue and suggests
+wording.]</i></p>
+
+
+<p><i>[Mont Tremblant: Changed set and map to multiset and multimap.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG agrees that this guarantee is necessary for common user
+ idioms to work, and that all existing implementations provide this
+ property. Note that this resolution guarantees stability for
+ multimap and multiset, not for all associative containers in
+ general.</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="373"></a>373. Are basic_istream and basic_ostream to use (exceptions()&amp;badbit) != 0 ?</h3>
+<p><b>Section:</b> 27.6.1.2.1 [istream.formatted.reqmts], 27.6.2.6.1 [ostream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Keith Baker <b>Date:</b> 2002-07-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.reqmts">issues</a> in [istream.formatted.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+In 27.6.1.2.1 [istream.formatted.reqmts] and 27.6.2.6.1 [ostream.formatted.reqmts]
+(exception()&amp;badbit) != 0 is used in testing for rethrow, yet
+exception() is the constructor to class std::exception in 18.6.1 [type.info] that has no return type. Should member function
+exceptions() found in 27.4.4 [ios] be used instead?
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.6.1.2.1 [istream.formatted.reqmts] and 27.6.2.6.1 [ostream.formatted.reqmts], change
+"(exception()&amp;badbit) != 0" to "(exceptions()&amp;badbit) != 0".
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>Fixes an obvious typo.</p>
+
+
+
+
+
+<hr>
+<h3><a name="375"></a>375. basic_ios should be ios_base in 27.7.1.3</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In Section 27.7.1.4 [stringbuf.virtuals]: Table 90, Table 91, and paragraph
+14 all contain references to "basic_ios::" which should be
+"ios_base::".
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change all references to "basic_ios" in Table 90, Table 91, and
+paragraph 14 to "ios_base".
+</p>
+
+
+<p><b>Rationale:</b></p><p>Fixes an obvious typo.</p>
+
+
+
+
+<hr>
+<h3><a name="376"></a>376. basic_streambuf semantics</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-14</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In Section 27.7.1.4 [stringbuf.virtuals], Table 90, the implication is that
+the four conditions should be mutually exclusive, but they are not.
+The first two cases, as written, are subcases of the third.</p>
+
+<p>
+As written, it is unclear what should be the result if cases 1 and 2
+are both true, but case 3 is false.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Rewrite these conditions as:</p>
+<blockquote>
+<p>
+ (which &amp; (ios_base::in|ios_base::out)) == ios_base::in
+</p>
+
+<p>
+ (which &amp; (ios_base::in|ios_base::out)) == ios_base::out
+</p>
+
+<p>
+ (which &amp; (ios_base::in|ios_base::out)) ==
+(ios_base::in|ios_base::out)
+ and way == either ios_base::beg or ios_base::end
+</p>
+
+<p>Otherwise</p>
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>It's clear what we wanted to say, we just failed to say it. This
+ fixes it.</p>
+
+
+
+
+
+<hr>
+<h3><a name="379"></a>379. nonsensical ctype::do_widen() requirement</h3>
+<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The last sentence in 22.2.1.1.2, p11 below doesn't seem to make sense.
+</p>
+<pre> charT do_widen (char c) const;
+
+ -11- Effects: Applies the simplest reasonable transformation from
+ a char value or sequence of char values to the corresponding
+ charT value or values. The only characters for which unique
+ transformations are required are those in the basic source
+ character set (2.2). For any named ctype category with a
+ ctype&lt;charT&gt; facet ctw and valid ctype_base::mask value
+ M (is(M, c) || !ctw.is(M, do_widen(c))) is true.
+</pre>
+<p>
+Shouldn't the last sentence instead read
+</p>
+<pre> For any named ctype category with a ctype&lt;char&gt; facet ctc
+ and valid ctype_base::mask value M
+ (ctc.is(M, c) || !is(M, do_widen(c))) is true.
+</pre>
+<p>
+I.e., if the narrow character c is not a member of a class of
+characters then neither is the widened form of c. (To paraphrase
+footnote 224.)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Replace the last sentence of 22.2.1.1.2 [locale.ctype.virtuals], p11 with the
+following text:
+</p>
+<pre> For any named ctype category with a ctype&lt;char&gt; facet ctc
+ and valid ctype_base::mask value M,
+ (ctc.is(M, c) || !is(M, do_widen(c))) is true.
+</pre>
+
+<p><i>[Kona: Minor edit. Added a comma after the <i>M</i> for clarity.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes this is just a typo, and that this is the correct fix.</p>
+
+
+
+
+
+<hr>
+<h3><a name="380"></a>380. typos in codecvt tables 53 and 54</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Tables 53 and 54 in 22.2.1.5 [locale.codecvt.byname] are both titled "convert
+result values," when surely "do_in/do_out result values" must have
+been intended for Table 53 and "do_unshift result values" for Table
+54.
+</p>
+<p>
+Table 54, row 3 says that the meaning of partial is "more characters
+needed to be supplied to complete termination." The function is not
+supplied any characters, it is given a buffer which it fills with
+characters or, more precisely, destination elements (i.e., an escape
+sequence). So partial means that space for more than (to_limit - to)
+destination elements was needed to terminate a sequence given the
+value of state.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the title of Table 53 to "do_in/do_out result values" and
+the title of Table 54 to "do_unshift result values."
+</p>
+<p>
+Change the text in Table 54, row 3 (the <b>partial</b> row), under the
+heading Meaning, to "space for more than (to_limit - to) destination
+elements was needed to terminate a sequence given the value of state."
+</p>
+
+
+
+
+<hr>
+<h3><a name="381"></a>381. detection of invalid mbstate_t in codecvt</h3>
+<p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+All but one codecvt member functions that take a state_type argument
+list as one of their preconditions that the state_type argument have
+a valid value. However, according to 22.2.1.5.2, p6,
+codecvt::do_unshift() is the only codecvt member that is supposed to
+return error if the state_type object is invalid.
+</p>
+
+<p>
+It seems to me that the treatment of state_type by all codecvt member
+functions should be the same and the current requirements should be
+changed. Since the detection of invalid state_type values may be
+difficult in general or computationally expensive in some specific
+cases, I propose the following:
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a new paragraph before 22.2.1.5.2, p5, and after the function
+declaration below
+</p>
+<pre> result do_unshift(stateT&amp; state,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+</pre>
+<p>
+as follows:
+</p>
+<pre> Requires: (to &lt;= to_end) well defined and true; state initialized,
+ if at the beginning of a sequence, or else equal to the result of
+ converting the preceding characters in the sequence.
+</pre>
+<p>
+and change the text in Table 54, row 4, the <b>error</b> row, under
+the heading Meaning, from
+</p>
+<pre> state has invalid value
+</pre>
+<p>
+to
+</p>
+<pre> an unspecified error has occurred
+</pre>
+
+
+<p><b>Rationale:</b></p>
+<p>The intent is that implementations should not be required to detect
+invalid state values; such a requirement appears nowhere else. An
+invalid state value is a precondition violation, <i>i.e.</i> undefined
+behavior. Implementations that do choose to detect invalid state
+values, or that choose to detect any other kind of error, may return
+<b>error</b> as an indication.</p>
+
+
+
+
+
+<hr>
+<h3><a name="383"></a>383. Bidirectional iterator assertion typo</h3>
+<p><b>Section:</b> 24.1.4 [bidirectional.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> ysapir (submitted via comp.std.c++) <b>Date:</b> 2002-10-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bidirectional.iterators">issues</a> in [bidirectional.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Following a discussion on the boost list regarding end iterators and
+the possibility of performing operator--() on them, it seems to me
+that there is a typo in the standard. This typo has nothing to do
+with that discussion.
+</p>
+
+<p>
+I have checked this newsgroup, as well as attempted a search of the
+Active/Defect/Closed Issues List on the site for the words "s is
+derefer" so I believe this has not been proposed before. Furthermore,
+the "Lists by Index" mentions only DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a> on section
+24.1.4, and DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a> is not related to this issue.
+</p>
+
+<p>
+The standard makes the following assertion on bidirectional iterators,
+in section 24.1.4 [lib.bidirectional.iterators], Table 75:
+</p>
+
+<pre> operational assertion/note
+expression return type semantics pre/post-condition
+
+--r X&amp; pre: there exists s such
+ that r == ++s.
+ post: s is dereferenceable.
+ --(++r) == r.
+ --r == --s implies r == s.
+ &amp;r == &amp;--r.
+</pre>
+
+<p>
+(See <a href="http://aspn.activestate.com/ASPN/Mail/Message/boost/1395763">http://aspn.activestate.com/ASPN/Mail/Message/boost/1395763</a>.)
+</p>
+
+<p>
+In particular, "s is dereferenceable" seems to be in error. It seems
+that the intention was to say "r is dereferenceable".
+</p>
+
+<p>
+If it were to say "r is dereferenceable" it would
+make perfect sense. Since s must be dereferenceable prior to
+operator++, then the natural result of operator-- (to undo operator++)
+would be to make r dereferenceable. Furthermore, without other
+assertions, and basing only on precondition and postconditions, we
+could not otherwise know this. So it is also interesting information.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the guarantee to "postcondition: r is dereferenceable."
+</p>
+
+
+<p><b>Rationale:</b></p><p>Fixes an obvious typo</p>
+
+
+
+
+<hr>
+<h3><a name="384"></a>384. equal_range has unimplementable runtime complexity</h3>
+<p><b>Section:</b> 25.3.3.3 [equal.range] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Hans Bos <b>Date:</b> 2002-10-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#equal.range">issues</a> in [equal.range].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 25.3.3.3 [equal.range]
+states that at most 2 * log(last - first) + 1
+comparisons are allowed for equal_range.
+</p>
+
+<p>It is not possible to implement equal_range with these constraints.</p>
+
+<p>In a range of one element as in:</p>
+<pre> int x = 1;
+ equal_range(&amp;x, &amp;x + 1, 1)
+</pre>
+
+<p>it is easy to see that at least 2 comparison operations are needed.</p>
+
+<p>For this case at most 2 * log(1) + 1 = 1 comparison is allowed.</p>
+
+<p>I have checked a few libraries and they all use the same (nonconforming)
+algorithm for equal_range that has a complexity of</p>
+<pre> 2* log(distance(first, last)) + 2.
+</pre>
+<p>I guess this is the algorithm that the standard assumes for equal_range.</p>
+
+<p>
+It is easy to see that 2 * log(distance) + 2 comparisons are enough
+since equal range can be implemented with lower_bound and upper_bound
+(both log(distance) + 1).
+</p>
+
+<p>
+I think it is better to require something like 2log(distance) + O(1) (or
+even logarithmic as multiset::equal_range).
+Then an implementation has more room to optimize for certain cases (e.g.
+have log(distance) characteristics when at most match is found in the range
+but 2log(distance) + 4 for the worst case).
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 25.3.3.1 [lower.bound]/4, change <tt>log(last - first) + 1</tt>
+to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
+
+<p>In 25.3.3.2 [upper.bound]/4, change <tt>log(last - first) + 1</tt>
+to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
+
+<p>In 25.3.3.3 [equal.range]/4, change <tt>2*log(last - first) + 1</tt>
+to <tt>2*log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
+
+<p><i>[Matt provided wording]</i></p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG considered just saying <i>O</i>(log n) for all three, but
+ decided that threw away too much valuable information. The fact
+ that lower_bound is twice as fast as equal_range is important.
+ However, it's better to allow an arbitrary additive constant than to
+ specify an exact count. An exact count would have to
+ involve <tt>floor</tt> or <tt>ceil</tt>. It would be too easy to
+ get this wrong, and don't provide any substantial value for users.</p>
+
+
+
+
+<hr>
+<h3><a name="386"></a>386. Reverse iterator's operator[] has impossible return type</h3>
+<p><b>Section:</b> 24.4.1.3.11 [reverse.iter.op-=] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In 24.4.1.3.11 [reverse.iter.op-=], <tt>reverse_iterator&lt;&gt;::operator[]</tt>
+is specified as having a return type of <tt>reverse_iterator::reference</tt>,
+which is the same as <tt>iterator_traits&lt;Iterator&gt;::reference</tt>.
+(Where <tt>Iterator</tt> is the underlying iterator type.)</p>
+
+<p>The trouble is that <tt>Iterator</tt>'s own operator[] doesn't
+ necessarily have a return type
+ of <tt>iterator_traits&lt;Iterator&gt;::reference</tt>. Its
+ return type is merely required to be convertible
+ to <tt>Iterator</tt>'s value type. The return type specified for
+ reverse_iterator's operator[] would thus appear to be impossible.</p>
+
+<p>With the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a>, the type of
+ <tt>a[n]</tt> will continue to be required (for random access
+ iterators) to be convertible to the value type, and also <tt>a[n] =
+ t</tt> will be a valid expression. Implementations of
+ <tt>reverse_iterator</tt> will likely need to return a proxy from
+ <tt>operator[]</tt> to meet these requirements. As mentioned in the
+ comment from Dave Abrahams, the simplest way to specify that
+ <tt>reverse_iterator</tt> meet this requirement to just mandate
+ it and leave the return type of <tt>operator[]</tt> unspecified.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>In 24.4.1.2 [reverse.iter.requirements] change:</p>
+
+<blockquote>
+<pre>reference operator[](difference_type n) const;
+</pre>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<pre><b><i>unspecified</i></b> operator[](difference_type n) const; // see 24.1.5 [random.access.iterators]
+</pre>
+</blockquote>
+
+
+
+
+<p><i>[
+Comments from Dave Abrahams: IMO we should resolve 386 by just saying
+ that the return type of reverse_iterator's operator[] is
+ unspecified, allowing the random access iterator requirements to
+ impose an appropriate return type. If we accept 299's proposed
+ resolution (and I think we should), the return type will be
+ readable and writable, which is about as good as we can do.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="389"></a>389. Const overload of valarray::operator[] returns by value</h3>
+<p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a></p>
+<p><b>Discussion:</b></p>
+<p>Consider the following program:</p>
+<pre> #include &lt;iostream&gt;
+ #include &lt;ostream&gt;
+ #include &lt;vector&gt;
+ #include &lt;valarray&gt;
+ #include &lt;algorithm&gt;
+ #include &lt;iterator&gt;
+ template&lt;typename Array&gt;
+ void print(const Array&amp; a)
+ {
+ using namespace std;
+ typedef typename Array::value_type T;
+ copy(&amp;a[0], &amp;a[0] + a.size(),
+ ostream_iterator&lt;T&gt;(std::cout, " "));
+ }
+ template&lt;typename T, unsigned N&gt;
+ unsigned size(T(&amp;)[N]) { return N; }
+ int main()
+ {
+ double array[] = { 0.89, 9.3, 7, 6.23 };
+ std::vector&lt;double&gt; v(array, array + size(array));
+ std::valarray&lt;double&gt; w(array, size(array));
+ print(v); // #1
+ std::cout &lt;&lt; std::endl;
+ print(w); // #2
+ std::cout &lt;&lt; std::endl;
+ }
+</pre>
+
+<p>While the call numbered #1 succeeds, the call numbered #2 fails
+because the const version of the member function
+valarray&lt;T&gt;::operator[](size_t) returns a value instead of a
+const-reference. That seems to be so for no apparent reason, no
+benefit. Not only does that defeats users' expectation but it also
+does hinder existing software (written either in C or Fortran)
+integration within programs written in C++. There is no reason why
+subscripting an expression of type valarray&lt;T&gt; that is const-qualified
+should not return a const T&amp;.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the class synopsis in 26.5.2 [template.valarray], and in
+26.5.2.3 [valarray.access] just above paragraph 1, change</p>
+<pre> T operator[](size_t const);
+</pre>
+<p>to</p>
+<pre> const T&amp; operator[](size_t const);
+</pre>
+
+<p><i>[Kona: fixed a minor typo: put semicolon at the end of the line
+ wehre it belongs.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>Return by value seems to serve no purpose. Valaray was explicitly
+designed to have a specified layout so that it could easily be
+integrated with libraries in other languages, and return by value
+defeats that purpose. It is believed that this change will have no
+impact on allowable optimizations.</p>
+
+
+
+
+
+<hr>
+<h3><a name="391"></a>391. non-member functions specified as const</h3>
+<p><b>Section:</b> 22.1.3.2 [conversions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> James Kanze <b>Date:</b> 2002-12-10</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The specifications of toupper and tolower both specify the functions as
+const, althought they are not member functions, and are not specified as
+const in the header file synopsis in section 22.1 [locales].
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 22.1.3.2 [conversions], remove <tt>const</tt> from the function
+ declarations of std::toupper and std::tolower</p>
+
+
+<p><b>Rationale:</b></p><p>Fixes an obvious typo</p>
+
+
+
+
+<hr>
+<h3><a name="395"></a>395. inconsistencies in the definitions of rand() and random_shuffle()</h3>
+<p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> James Kanze <b>Date:</b> 2003-01-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 26.7 [c.math], the C++ standard refers to the C standard for the
+definition of rand(); in the C standard, it is written that "The
+implementation shall behave as if no library function calls the rand
+function."
+</p>
+
+<p>
+In 25.2.12 [alg.random.shuffle], there is no specification as to
+how the two parameter version of the function generates its random
+value. I believe that all current implementations in fact call rand()
+(in contradiction with the requirement avove); if an implementation does
+not call rand(), there is the question of how whatever random generator
+it does use is seeded. Something is missing.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In [lib.c.math], add a paragraph specifying that the C definition of
+rand shal be modified to say that "Unless otherwise specified, the
+implementation shall behave as if no library function calls the rand
+function."
+</p>
+
+<p>
+In [lib.alg.random.shuffle], add a sentence to the effect that "In
+the two argument form of the function, the underlying source of
+random numbers is implementation defined. [Note: in particular, an
+implementation is permitted to use <tt>rand</tt>.]
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The original proposed resolution proposed requiring the
+ two-argument from of <tt>random_shuffle</tt> to
+ use <tt>rand</tt>. We don't want to do that, because some existing
+ implementations already use something else: gcc
+ uses <tt>lrand48</tt>, for example. Using <tt>rand</tt> presents a
+ problem if the number of elements in the sequence is greater than
+ RAND_MAX.</p>
+
+
+
+
+
+<hr>
+<h3><a name="400"></a>400. redundant type cast in lib.allocator.members</h3>
+<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+20.6.1.1 [allocator.members] allocator members, contains
+the following 3 lines:
+</p>
+
+<pre> 12 Returns: new((void *) p) T( val)
+ void destroy(pointer p);
+ 13 Returns: ((T*) p)-&gt;~T()
+</pre>
+
+<p>
+The type cast "(T*) p" in the last line is redundant cause
+we know that std::allocator&lt;T&gt;::pointer is a typedef for T*.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Replace "((T*) p)" with "p".
+</p>
+
+
+<p><b>Rationale:</b></p><p>Just a typo, this is really editorial.</p>
+
+
+
+
+<hr>
+<h3><a name="401"></a>401. incorrect type casts in table 32 in lib.allocator.requirements</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I think that in par2 of [default.con.req] the last two
+lines of table 32 contain two incorrect type casts. The lines are ...
+</p>
+
+<pre> a.construct(p,t) Effect: new((void*)p) T(t)
+ a.destroy(p) Effect: ((T*)p)?-&gt;~T()
+</pre>
+
+<p>
+.... with the prerequisits coming from the preceding two paragraphs, especially
+from table 31:
+</p>
+
+<pre> alloc&lt;T&gt; a ;// an allocator for T
+ alloc&lt;T&gt;::pointer p ;// random access iterator
+ // (may be different from T*)
+ alloc&lt;T&gt;::reference r = *p;// T&amp;
+ T const&amp; t ;
+</pre>
+
+<p>
+For that two type casts ("(void*)p" and "(T*)p") to be well-formed
+this would require then conversions to T* and void* for all
+alloc&lt;T&gt;::pointer, so it would implicitely introduce extra
+requirements for alloc&lt;T&gt;::pointer, additionally to the only
+current requirement (being a random access iterator).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Accept proposed wording from
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2436.pdf">N2436</a> part 1.
+</p>
+
+<p>
+Note: Actually I would prefer to replace "((T*)p)?-&gt;dtor_name" with
+"p?-&gt;dtor_name", but AFAICS this is not possible cause of an omission
+in 13.5.6 [over.ref] (for which I have filed another DR on 29.11.2002).
+</p>
+
+<p><i>[Kona: The LWG thinks this is somewhere on the border between
+ Open and NAD. The intend is clear: <tt>construct</tt> constructs an
+ object at the location <i>p</i>. It's reading too much into the
+ description to think that literally calling <tt>new</tt> is
+ required. Tweaking this description is low priority until we can do
+ a thorough review of allocators, and, in particular, allocators with
+ non-default pointer types.]</i></p>
+
+
+<p><i>[
+Batavia: Proposed resolution changed to less code and more description.
+]</i></p>
+
+
+<p><i>[
+post Oxford: This would be rendered NAD Editorial by acceptance of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>.
+]</i></p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2387 for this issue which
+was subsequently split out into a separate paper N2436 for the purposes of voting.
+The resolution in N2436 addresses this issue. The LWG voted to accelerate this
+issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="402"></a>402. wrong new expression in [some_]allocator::construct</h3>
+<p><b>Section:</b> 20.1.2 [allocator.requirements], 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This applies to the new expression that is contained in both par12 of
+20.6.1.1 [allocator.members] and in par2 (table 32) of [default.con.req].
+I think this new expression is wrong, involving unintended side
+effects.
+</p>
+
+
+<p>20.6.1.1 [allocator.members] contains the following 3 lines:</p>
+
+<pre> 11 Returns: the largest value N for which the call allocate(N,0) might succeed.
+ void construct(pointer p, const_reference val);
+ 12 Returns: new((void *) p) T( val)
+</pre>
+
+
+<p> [default.con.req] in table 32 has the following line:</p>
+<pre> a.construct(p,t) Effect: new((void*)p) T(t)
+</pre>
+
+<p>
+.... with the prerequisits coming from the preceding two paragraphs,
+especially from table 31:
+</p>
+
+<pre> alloc&lt;T&gt; a ;// an allocator for T
+ alloc&lt;T&gt;::pointer p ;// random access iterator
+ // (may be different from T*)
+ alloc&lt;T&gt;::reference r = *p;// T&amp;
+ T const&amp; t ;
+</pre>
+
+<p>
+Cause of using "new" but not "::new", any existing "T::operator new"
+function will hide the global placement new function. When there is no
+"T::operator new" with adequate signature,
+every_alloc&lt;T&gt;::construct(..) is ill-formed, and most
+std::container&lt;T,every_alloc&lt;T&gt;&gt; use it; a workaround
+would be adding placement new and delete functions with adequate
+signature and semantic to class T, but class T might come from another
+party. Maybe even worse is the case when T has placement new and
+delete functions with adequate signature but with "unknown" semantic:
+I dont like to speculate about it, but whoever implements
+any_container&lt;T,any_alloc&gt; and wants to use construct(..)
+probably must think about it.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Replace "new" with "::new" in both cases.
+</p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="403"></a>403. basic_string::swap should not throw exceptions</h3>
+<p><b>Section:</b> 21.3.6.8 [string::swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2003-03-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::swap">issues</a> in [string::swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+std::basic_string, 21.3 [basic.string] paragraph 2 says that
+basic_string "conforms to the requirements of a Sequence, as specified
+in (23.1.1)." The sequence requirements specified in (23.1.1) to not
+include any prohibition on swap members throwing exceptions.
+</p>
+
+<p>
+Section 23.1 [container.requirements] paragraph 10 does limit conditions under
+which exceptions may be thrown, but applies only to "all container
+types defined in this clause" and so excludes basic_string::swap
+because it is defined elsewhere.
+</p>
+
+<p>
+Eric Niebler points out that 21.3 [basic.string] paragraph 5 explicitly
+permits basic_string::swap to invalidates iterators, which is
+disallowed by 23.1 [container.requirements] paragraph 10. Thus the standard would
+be contradictory if it were read or extended to read as having
+basic_string meet 23.1 [container.requirements] paragraph 10 requirements.
+</p>
+
+<p>
+Yet several LWG members have expressed the belief that the original
+intent was that basic_string::swap should not throw exceptions as
+specified by 23.1 [container.requirements] paragraph 10, and that the standard is
+unclear on this issue. The complexity of basic_string::swap is
+specified as "constant time", indicating the intent was to avoid
+copying (which could cause a bad_alloc or other exception). An
+important use of swap is to ensure that exceptions are not thrown in
+exception-safe code.
+</p>
+
+<p>
+Note: There remains long standing concern over whether or not it is
+possible to reasonably meet the 23.1 [container.requirements] paragraph 10 swap
+requirements when allocators are unequal. The specification of
+basic_string::swap exception requirements is in no way intended to
+address, prejudice, or otherwise impact that concern.
+</p>
+
+
+
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 21.3.6.8 [string::swap], add a throws clause:
+</p>
+
+<p>
+Throws: Shall not throw exceptions.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="404"></a>404. May a replacement allocation function be declared inline?</h3>
+<p><b>Section:</b> 17.4.3.4 [replacement.functions], 18.5.1 [new.delete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-04-24</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The eight basic dynamic memory allocation functions (single-object
+and array versions of ::operator new and ::operator delete, in the
+ordinary and nothrow forms) are replaceable. A C++ program may
+provide an alternative definition for any of them, which will be used
+in preference to the implementation's definition.
+</p>
+
+<p>
+Three different parts of the standard mention requirements on
+replacement functions: 17.4.3.4 [replacement.functions], 18.5.1.1 [new.delete.single]
+and 18.5.1.2 [new.delete.array], and 3.7.2 [basic.stc.auto].
+</p>
+
+<p>None of these three places say whether a replacement function may
+ be declared inline. 18.5.1.1 [new.delete.single] paragraph 2 specifies a
+ signature for the replacement function, but that's not enough:
+ the <tt>inline</tt> specifier is not part of a function's signature.
+ One might also reason from 7.1.2 [dcl.fct.spec] paragraph 2, which
+ requires that "an inline function shall be defined in every
+ translation unit in which it is used," but this may not be quite
+ specific enough either. We should either explicitly allow or
+ explicitly forbid inline replacement memory allocation
+ functions.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a new sentence to the end of 17.4.3.4 [replacement.functions] paragraph 3:
+"The program's definitions shall not be specified as <tt>inline</tt>.
+No diagnostic is required."
+</p>
+
+<p><i>[Kona: added "no diagnostic is required"]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+The fact that <tt>inline</tt> isn't mentioned appears to have been
+nothing more than an oversight. Existing implementations do not
+permit inline functions as replacement memory allocation functions.
+Providing this functionality would be difficult in some cases, and is
+believed to be of limited value.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="405"></a>405. qsort and POD</h3>
+<p><b>Section:</b> 25.4 [alg.c.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Ray Lischner <b>Date:</b> 2003-04-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.c.library">issues</a> in [alg.c.library].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 25.4 [alg.c.library] describes bsearch and qsort, from the C
+standard library. Paragraph 4 does not list any restrictions on qsort,
+but it should limit the base parameter to point to POD. Presumably,
+qsort sorts the array by copying bytes, which requires POD.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 25.4 [alg.c.library] paragraph 4, just after the declarations and
+before the nonnormative note, add these words: "both of which have the
+same behavior as the original declaration. The behavior is undefined
+unless the objects in the array pointed to by <i>base</i> are of POD
+type."
+</p>
+
+<p><i>[Something along these lines is clearly necessary. Matt
+ provided wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="406"></a>406. vector::insert(s) exception safety</h3>
+<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2003-04-27</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+There is a possible defect in the standard: the standard text was
+never intended to prevent arbitrary ForwardIterators, whose operations
+may throw exceptions, from being passed, and it also wasn't intended
+to require a temporary buffer in the case where ForwardIterators were
+passed (and I think most implementations don't use one). As is, the
+standard appears to impose requirements that aren't met by any
+existing implementation.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace 23.2.5.4 [vector.modifiers] paragraph 1 with:</p>
+<blockquote><p>
+ 1- Notes: Causes reallocation if the new size is greater than the
+ old capacity. If no reallocation happens, all the iterators and
+ references before the insertion point remain valid. If an exception
+ is thrown other than by the copy constructor or assignment operator
+ of T or by any InputIterator operation there are no effects.
+</p></blockquote>
+
+<p><i>[We probably need to say something similar for deque.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="407"></a>407. Can singular iterators be destroyed?</h3>
+<p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Clause 24.1 [iterator.requirements], paragraph 5, says that the only expression
+that is defined for a singular iterator is "an assignment of a
+non-singular value to an iterator that holds a singular value". This
+means that destroying a singular iterator (e.g. letting an automatic
+variable go out of scope) is technically undefined behavior. This
+seems overly strict, and probably unintentional.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the sentence in question to "... the only exceptions are
+destroying an iterator that holds a singular value, or the assignment
+of a non-singular value to an iterator that holds a singular value."
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="409"></a>409. Closing an fstream should clear error state</h3>
+<p><b>Section:</b> 27.8.1.9 [ifstream.members], 27.8.1.13 [ofstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+A strict reading of 27.8.1 [fstreams] shows that opening or
+closing a basic_[io]fstream does not affect the error bits. This
+means, for example, that if you read through a file up to EOF, and
+then close the stream and reopen it at the beginning of the file,
+the EOF bit in the stream's error state is still set. This is
+counterintuitive.
+</p>
+<p>
+The LWG considered this issue once before, as issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#22">22</a>,
+and put in a footnote to clarify that the strict reading was indeed
+correct. We did that because we believed the standard was
+unambiguous and consistent, and that we should not make architectural
+changes in a TC. Now that we're working on a new revision of the
+language, those considerations no longer apply.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Change 27.8.1.9 [ifstream.members], para. 3 from:</p>
+
+<blockquote><p>
+Calls rdbuf()-&gt;open(s,mode|in). If that function returns a null
+pointer, calls setstate(failbit) (which may throw ios_base::failure
+[Footnote: (lib.iostate.flags)].
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>Calls rdbuf()-&gt;open(s,mode|in). If that function
+returns a null pointer, calls setstate(failbit) (which may throw
+ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear().
+</p></blockquote>
+
+<p>Change 27.8.1.13 [ofstream.members], para. 3 from:</p>
+
+<blockquote><p>Calls rdbuf()-&gt;open(s,mode|out). If that function
+returns a null pointer, calls setstate(failbit) (which may throw
+ios_base::failure [Footnote: (lib.iostate.flags)).
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>Calls rdbuf()-&gt;open(s,mode|out). If that function
+returns a null pointer, calls setstate(failbit) (which may throw
+ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear().
+</p></blockquote>
+
+<p>Change 27.8.1.17 [fstream.members], para. 3 from:</p>
+
+<blockquote><p>Calls rdbuf()-&gt;open(s,mode), If that function returns
+a null pointer, calls setstate(failbit), (which may throw
+ios_base::failure). (lib.iostate.flags) )
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>Calls rdbuf()-&gt;open(s,mode), If that function returns
+a null pointer, calls setstate(failbit), (which may throw
+ios_base::failure). (lib.iostate.flags) ), else calls clear().
+</p></blockquote>
+
+
+
+<p><i>[Kona: the LWG agrees this is a good idea. Post-Kona: Bill
+provided wording. He suggests having open, not close, clear the error
+flags.]</i></p>
+
+
+<p><i>[Post-Sydney: Howard provided a new proposed resolution. The
+ old one didn't make sense because it proposed to fix this at the
+ level of basic_filebuf, which doesn't have access to the stream's
+ error state. Howard's proposed resolution fixes this at the level
+ of the three fstream class template instead.]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="410"></a>410. Missing semantics for stack and queue comparison operators</h3>
+<p><b>Section:</b> 23.2.3.1 [list.cons], 23.2.3.3 [list.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Hans Bos <b>Date:</b> 2003-06-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.cons">issues</a> in [list.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Sections 23.2.3.1 [list.cons] and 23.2.3.3 [list.modifiers] list
+comparison operators (==, !=, &lt;, &lt;=, &gt;, =&gt;) for queue and
+stack. Only the semantics for queue::operator== (23.2.3.1 [list.cons] par2) and queue::operator&lt; (23.2.3.1 [list.cons]
+par3) are defined.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add the following new paragraphs after 23.2.3.1 [list.cons]
+ paragraph 3:</p>
+
+<blockquote>
+
+<pre> operator!=
+</pre>
+<p>Returns: <tt>x.c != y.c</tt></p>
+
+<pre> operator&gt;
+</pre>
+<p>Returns: <tt>x.c &gt; y.c</tt></p>
+
+<pre> operator&lt;=
+</pre>
+<p>Returns: <tt>x.c &lt;= y.c</tt></p>
+
+<pre> operator&gt;=
+</pre>
+<p>Returns: <tt>x.c &gt;= y.c</tt></p>
+
+</blockquote>
+
+<p>Add the following paragraphs at the end of 23.2.3.3 [list.modifiers]:</p>
+
+<blockquote>
+
+<pre> operator==
+</pre>
+<p>Returns: <tt>x.c == y.c</tt></p>
+
+<pre> operator&lt;
+</pre>
+<p>Returns: <tt>x.c &lt; y.c</tt></p>
+
+<pre> operator!=
+</pre>
+<p>Returns: <tt>x.c != y.c</tt></p>
+
+<pre> operator&gt;
+</pre>
+<p>Returns: <tt>x.c &gt; y.c</tt></p>
+
+<pre> operator&lt;=
+</pre>
+<p>Returns: <tt>x.c &lt;= y.c</tt></p>
+
+<pre> operator&gt;=
+</pre>
+<p>Returns: <tt>x.c &gt;= y.c</tt></p>
+
+</blockquote>
+
+
+<p><i>[Kona: Matt provided wording.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>There isn't any real doubt about what these operators are
+supposed to do, but we ought to spell it out.</p>
+
+
+
+
+
+<hr>
+<h3><a name="411"></a>411. Wrong names of set member functions</h3>
+<p><b>Section:</b> 25.3.5 [alg.set.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Frey <b>Date:</b> 2003-07-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.set.operations">issues</a> in [alg.set.operations].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+25.3.5 [alg.set.operations] paragraph 1 reads:
+"The semantics of the set operations are generalized to multisets in a
+standard way by defining union() to contain the maximum number of
+occurrences of every element, intersection() to contain the minimum, and
+so on."
+</p>
+
+<p>
+This is wrong. The name of the functions are set_union() and
+set_intersection(), not union() and intersection().
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change that sentence to use the correct names.</p>
+
+
+
+
+
+<hr>
+<h3><a name="412"></a>412. Typo in 27.4.4.3</h3>
+<p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-07-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#429">429</a></p>
+<p><b>Discussion:</b></p>
+<p>
+The Effects clause in 27.4.4.3 [iostate.flags] paragraph 5 says that the
+function only throws if the respective bits are already set prior to
+the function call. That's obviously not the intent. The typo ought to
+be corrected and the text reworded as: "If (<i>state</i> &amp;
+exceptions()) == 0, returns. ..."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.4.4.3 [iostate.flags] paragraph 5, replace "If (rdstate() &amp;
+exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit))
+&amp; exceptions()) == 0".
+</p>
+
+<p><i>[Kona: the original proposed resolution wasn't quite right. We
+ really do mean rdstate(); the ambiguity is that the wording in the
+ standard doesn't make it clear whether we mean rdstate() before
+ setting the new state, or rdsate() after setting it. We intend the
+ latter, of course. Post-Kona: Martin provided wording.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="413"></a>413. Proposed resolution to LDR#64 still wrong</h3>
+<p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2003-07-13</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The second sentence of the proposed resolution says:
+</p>
+
+<p>
+"If it inserted no characters because it caught an exception thrown
+while extracting characters from sb and ..."
+</p>
+
+<p>
+However, we are not extracting from sb, but extracting from the
+basic_istream (*this) and inserting into sb. I can't really tell if
+"extracting" or "sb" is a typo.
+</p>
+
+<p><i>[
+Sydney: Definitely a real issue. We are, indeed, extracting characters
+from an istream and not from sb. The problem was there in the FDIS and
+wasn't fixed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a>. Probably what was intended was
+to have *this instead of sb. We're talking about the exception flag
+state of a basic_istream object, and there's only one basic_istream
+object in this discussion, so that would be a consistent
+interpretation. (But we need to be careful: the exception policy of
+this member function must be consistent with that of other
+extractors.) PJP will provide wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the sentence from:</p>
+
+<blockquote><p>
+If it inserted no characters because it caught an exception thrown
+while extracting characters from sb and failbit is on in exceptions(),
+then the caught exception is rethrown.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+If it inserted no characters because it caught an exception thrown
+while extracting characters from *this and failbit is on in exceptions(),
+then the caught exception is rethrown.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="414"></a>414. Which iterators are invalidated by v.erase()?</h3>
+<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-08-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Consider the following code fragment:
+</p>
+<blockquote>
+<pre>int A[8] = { 1,3,5,7,9,8,4,2 };
+std::vector&lt;int&gt; v(A, A+8);
+
+std::vector&lt;int&gt;::iterator i1 = v.begin() + 3;
+std::vector&lt;int&gt;::iterator i2 = v.begin() + 4;
+v.erase(i1);
+</pre>
+</blockquote>
+
+<p>
+Which iterators are invalidated by <tt>v.erase(i1)</tt>: i1, i2,
+both, or neither?
+</p>
+
+<p>
+On all existing implementations that I know of, the status of i1 and
+i2 is the same: both of them will be iterators that point to some
+elements of the vector (albeit not the same elements they did
+before). You won't get a crash if you use them. Depending on
+exactly what you mean by "invalidate", you might say that neither one
+has been invalidated because they still point to <i>something</i>,
+or you might say that both have been invalidated because in both
+cases the elements they point to have been changed out from under the
+iterator.
+</p>
+
+<p>
+The standard doesn't say either of those things. It says that erase
+invalidates all iterators and references "after the point of the
+erase". This doesn't include i1, since it's at the point of the
+erase instead of after it. I can't think of any sensible definition
+of invalidation by which one can say that i2 is invalidated but i1
+isn't.
+</p>
+
+<p>
+(This issue is important if you try to reason about iterator validity
+based only on the guarantees in the standard, rather than reasoning
+from typical implementation techniques. Strict debugging modes,
+which some programmers find useful, do not use typical implementation
+techniques.)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 23.2.5.4 [vector.modifiers] paragraph 3, change "Invalidates all the
+iterators and references after the point of the erase" to
+"Invalidates iterators and references at or after the point of the
+erase".
+</p>
+
+
+<p><b>Rationale:</b></p>
+<p>I believe this was essentially a typographical error, and that it
+ was taken for granted that erasing an element invalidates iterators
+ that point to it. The effects clause in question treats iterators
+ and references in parallel, and it would seem counterintuitive to
+ say that a reference to an erased value remains valid.</p>
+
+
+
+
+
+<hr>
+<h3><a name="415"></a>415. behavior of std::ws</h3>
+<p><b>Section:</b> 27.6.1.4 [istream.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+According to 27.6.1.4, the ws() manipulator is not required to construct
+the sentry object. The manipulator is also not a member function so the
+text in 27.6.1, p1 through 4 that describes the exception policy for
+istream member functions does not apply. That seems inconsistent with
+the rest of extractors and all the other input functions (i.e., ws will
+not cause a tied stream to be flushed before extraction, it doesn't check
+the stream's exceptions or catch exceptions thrown during input, and it
+doesn't affect the stream's gcount).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to 27.6.1.4 [istream.manip], immediately before the first sentence
+of paragraph 1, the following text:
+</p>
+
+ <blockquote><p>
+ Behaves as an unformatted input function (as described in
+ 27.6.1.3, paragraph 1), except that it does not count the number
+ of characters extracted and does not affect the value returned by
+ subsequent calls to is.gcount(). After constructing a sentry
+ object...
+ </p></blockquote>
+
+<p><i>[Post-Kona: Martin provided wording]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="416"></a>416. definitions of XXX_MIN and XXX_MAX macros in climits</h3>
+<p><b>Section:</b> 18.2.2 [c.limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Given two overloads of the function foo(), one taking an argument of type
+int and the other taking a long, which one will the call foo(LONG_MAX)
+resolve to? The expected answer should be foo(long), but whether that
+is true depends on the #defintion of the LONG_MAX macro, specifically
+its type. This issue is about the fact that the type of these macros
+is not actually required to be the same as the the type each respective
+limit.
+<br>
+
+Section 18.2.2 of the C++ Standard does not specify the exact types of
+the XXX_MIN and XXX_MAX macros #defined in the &lt;climits&gt; and &lt;limits.h&gt;
+headers such as INT_MAX and LONG_MAX and instead defers to the C standard.
+<br>
+
+Section 5.2.4.2.1, p1 of the C standard specifies that "The values [of
+these constants] shall be replaced by constant expressions suitable for use
+in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX,
+the following shall be replaced by expressions that have the same type as
+would an expression that is an object of the corresponding type converted
+according to the integer promotions."
+<br>
+
+The "corresponding type converted according to the integer promotions" for
+LONG_MAX is, according to 6.4.4.1, p5 of the C standard, the type of long
+converted to the first of the following set of types that can represent it:
+int, long int, long long int. So on an implementation where (sizeof(long)
+== sizeof(int)) this type is actually int, while on an implementation where
+(sizeof(long) &gt; sizeof(int)) holds this type will be long.
+<br>
+
+This is not an issue in C since the type of the macro cannot be detected
+by any conforming C program, but it presents a portability problem in C++
+where the actual type is easily detectable by overload resolution.
+
+ </p>
+<p><i>[Kona: the LWG does not believe this is a defect. The C macro
+ definitions are what they are; we've got a better
+ mechanism, <tt>std::numeric_limits</tt>, that is specified more
+ precisely than the C limit macros. At most we should add a
+ nonnormative note recommending that users who care about the exact
+ types of limit quantities should use &lt;limits&gt; instead of
+ &lt;climits&gt;.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change 18.2.2 [c.limits], paragraph 2:
+</p>
+
+<blockquote><p>
+-2- The contents are the same as the Standard C library header <tt>&lt;limits.h&gt;</tt>.
+<ins>[<i>Note:</i> The types of the macros in <tt>&lt;climits&gt;</tt> are not guaranteed
+to match the type to which they refer.<i>--end note</i>]</ins>
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="420"></a>420. is std::FILE a complete type?</h3>
+<p><b>Section:</b> 27.8.1 [fstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fstreams">issues</a> in [fstreams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+7.19.1, p2, of C99 requires that the FILE type only be declared in
+&lt;stdio.h&gt;. None of the (implementation-defined) members of the
+struct is mentioned anywhere for obvious reasons.
+</p>
+
+<p>
+C++ says in 27.8.1, p2 that FILE is a type that's defined in &lt;cstdio&gt;. Is
+it really the intent that FILE be a complete type or is an implementation
+allowed to just declare it without providing a full definition?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In the first sentence of 27.8.1 [fstreams] paragraph 2, change
+ "defined" to "declared".</p>
+
+
+<p><b>Rationale:</b></p>
+<p>We don't want to impose any restrictions beyond what the C standard
+ already says. We don't want to make anything implementation defined,
+ because that imposes new requirements in implementations.</p>
+
+
+
+
+
+<hr>
+<h3><a name="422"></a>422. explicit specializations of member functions of class templates</h3>
+<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It has been suggested that 17.4.3.1, p1 may or may not allow programs to
+explicitly specialize members of standard templates on user-defined types.
+The answer to the question might have an impact where library requirements
+are given using the "as if" rule. I.e., if programs are allowed to specialize
+member functions they will be able to detect an implementation's strict
+conformance to Effects clauses that describe the behavior of the function
+in terms of the other member function (the one explicitly specialized by
+the program) by relying on the "as if" rule.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+ Add the following sentence to 17.4.3.1 [reserved.names], p1:
+</p>
+
+<blockquote><p>
+It is undefined for a C++ program to add declarations or definitions to
+namespace std or namespaces within namespace <tt>std</tt> unless otherwise specified. A
+program may add template specializations for any standard library template to
+namespace <tt>std</tt>. Such a specialization (complete or partial) of a standard library
+template results in undefined behavior unless the declaration depends on a
+user-defined type of external linkage and unless the specialization meets the
+standard library requirements for the original template.<sup>168)</sup>
+<ins>A program has undefined behavior if it declares</ins>
+</p>
+<ul>
+<li><ins>an explicit specialization of any member function of a standard
+ library class template, or</ins></li>
+<li><ins>an explicit specialization of any member function template of a
+ standard library class or class template, or</ins></li>
+<li><ins>an explicit or partial specialization of any member class
+ template of a standard library class or class template.</ins></li>
+</ul>
+<p>
+A program may explicitly instantiate any templates in the standard library only
+if the declaration depends on the name of a user-defined type of external
+linkage and the instantiation meets the standard library requirements for the
+original template.
+</p></blockquote>
+
+<p><i>[Kona: straw poll was 6-1 that user programs should not be
+ allowed to specialize individual member functions of standard
+ library class templates, and that doing so invokes undefined
+ behavior. Post-Kona: Martin provided wording.]</i></p>
+
+
+<p><i>[Sydney: The LWG agrees that the standard shouldn't permit users
+to specialize individual member functions unless they specialize the
+whole class, but we're not sure these words say what we want them to;
+they could be read as prohibiting the specialization of any standard
+library class templates. We need to consult with CWG to make sure we
+use the right wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="425"></a>425. return value of std::get_temporary_buffer</h3>
+<p><b>Section:</b> 20.6.3 [temporary.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard is not clear about the requirements on the value returned from
+a call to get_temporary_buffer(0). In particular, it fails to specify whether
+the call should return a distinct pointer each time it is called (like
+operator new), or whether the value is unspecified (as if returned by
+malloc). The standard also fails to mention what the required behavior
+is when the argument is less than 0.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 20.4.3 [meta.help] paragraph 2 from "...or a pair of 0
+values if no storage can be obtained" to "...or a pair of 0 values if
+no storage can be obtained or if <i>n</i> &lt;= 0."</p>
+<p><i>[Kona: Matt provided wording]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="426"></a>426. search_n(), fill_n(), and generate_n() with negative n</h3>
+<p><b>Section:</b> 25.1.9 [alg.search], 25.2.6 [alg.fill], 25.2.7 [alg.generate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.search">issues</a> in [alg.search].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The complexity requirements for these function templates are incorrect
+(or don't even make sense) for negative n:</p>
+
+<p>25.1.9, p7 (search_n):
+<br>
+Complexity: At most (last1 - first1) * count applications
+of the corresponding predicate.</p>
+
+<p>25.2.5, p3 (fill_n):
+<br>
+Complexity: Exactly last - first (or n) assignments.</p>
+
+<p>25.2.6, p3 (generate_n):
+<br>
+Complexity: Exactly last - first (or n) assignments.</p>
+
+<p>
+In addition, the Requirements or the Effects clauses for the latter two
+templates don't say anything about the behavior when n is negative.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 25.1.9, p7 to</p>
+
+<blockquote><p>
+Complexity: At most (last1 - first1) * count applications
+of the corresponding predicate if count is positive,
+or 0 otherwise.
+</p></blockquote>
+
+<p>Change 25.2.5, p2 to</p>
+<blockquote><p>
+Effects: Assigns value through all the iterators in the range [first,
+last), or [first, first + n) if n is positive, none otherwise.
+</p></blockquote>
+
+<p>Change 25.2.5, p3 to:</p>
+<blockquote><p>
+Complexity: Exactly last - first (or n if n is positive,
+or 0 otherwise) assignments.
+</p></blockquote>
+
+<p>
+Change 25.2.6, p1
+to (notice the correction for the misspelled "through"):
+</p>
+<blockquote><p>
+Effects: Invokes the function object genand assigns the return
+value of gen through all the iterators in the range [first, last),
+or [first, first + n) if n is positive, or [first, first)
+otherwise.
+</p></blockquote>
+
+<p>Change 25.2.6, p3 to:</p>
+<blockquote><p>
+Complexity: Exactly last - first (or n if n is positive,
+or 0 otherwise) assignments.
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>Informally, we want to say that whenever we see a negative number
+ we treat it the same as if it were zero. We believe the above
+ changes do that (although they may not be the minimal way of saying
+ so). The LWG considered and rejected the alternative of saying that
+ negative numbers are undefined behavior.</p>
+
+
+
+
+
+<hr>
+<h3><a name="428"></a>428. string::erase(iterator) validity</h3>
+<p><b>Section:</b> 21.3.6.5 [string::erase] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::erase">issues</a> in [string::erase].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+23.1.1, p3 along with Table 67 specify as a prerequisite for a.erase(q)
+that q must be a valid dereferenceable iterator into the sequence a.
+</p>
+
+<p>
+However, 21.3.5.5, p5 describing string::erase(p) only requires that
+p be a valid iterator.
+</p>
+
+<p>
+This may be interepreted as a relaxation of the general requirement,
+which is most likely not the intent.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Remove 21.3.6.5 [string::erase] paragraph 5.</p>
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG considered two options: changing the string requirements to
+ match the general container requirements, or just removing the
+ erroneous string requirements altogether. The LWG chose the latter
+ option, on the grounds that duplicating text always risks the
+ possibility that it might be duplicated incorrectly.</p>
+
+
+
+
+
+<hr>
+<h3><a name="432"></a>432. stringbuf::overflow() makes only one write position available</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Christian W Brock <b>Date:</b> 2003-09-24</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.7.1.3 par 8 says:</p>
+<blockquote><p>
+Notes: The function can make a write position available only if
+ ( mode &amp; ios_base::out) != 0. To make a write position
+ available, the function reallocates (or initially allocates) an
+ array object with a sufficient number of elements to hold the
+ current array object (if any), plus one additional write position.
+ If ( mode &amp; ios_base::in) != 0, the function alters the read end
+ pointer egptr() to point just past the new write position (as
+ does the write end pointer epptr()).
+</p></blockquote>
+
+<p>
+The sentences "plus one additional write position." and especially
+ "(as does the write end pointer epptr())" COULD by interpreted
+ (and is interpreted by at least my library vendor) as:
+</p>
+
+<blockquote><p>
+ post-condition: epptr() == pptr()+1
+</p></blockquote>
+
+<p>
+This WOULD force sputc() to call the virtual overflow() each time.
+</p>
+
+<p>The proposed change also affects Defect Report 169.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>27.7.1.1/2 Change:</p>
+
+<blockquote><p>
+2- Notes: The function allocates no array object.
+</p></blockquote>
+
+<p>
+to:
+</p>
+
+<blockquote><p>
+2- Postcondition: str() == "".
+</p></blockquote>
+
+<p>
+27.7.1.1/3 Change:
+</p>
+
+<blockquote>
+<p>
+-3- Effects: Constructs an object of class basic_stringbuf,
+initializing the base class with basic_streambuf()
+(lib.streambuf.cons), and initializing mode with which . Then copies
+the content of str into the basic_stringbuf underlying character
+sequence and initializes the input and output sequences according to
+which. If which &amp; ios_base::out is true, initializes the output
+sequence with the underlying sequence. If which &amp; ios_base::in is
+true, initializes the input sequence with the underlying sequence.
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+-3- Effects: Constructs an object of class basic_stringbuf,
+initializing the base class with basic_streambuf()
+(lib.streambuf.cons), and initializing mode with which. Then copies
+the content of str into the basic_stringbuf underlying character
+sequence. If which &amp; ios_base::out is true, initializes the output
+sequence such that pbase() points to the first underlying character,
+epptr() points one past the last underlying character, and if (which &amp;
+ios_base::ate) is true, pptr() is set equal to
+epptr() else pptr() is set equal to pbase(). If which &amp; ios_base::in
+is true, initializes the input sequence such that eback() and gptr()
+point to the first underlying character and egptr() points one past
+the last underlying character.
+</p>
+</blockquote>
+
+<p>27.7.1.2/1 Change:</p>
+
+<blockquote>
+<p>
+-1- Returns: A basic_string object whose content is equal to the
+basic_stringbuf underlying character sequence. If the buffer is only
+created in input mode, the underlying character sequence is equal to
+the input sequence; otherwise, it is equal to the output sequence. In
+case of an empty underlying character sequence, the function returns
+basic_string&lt;charT,traits,Allocator&gt;().
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+-1- Returns: A basic_string object whose content is equal to the
+basic_stringbuf underlying character sequence. If the basic_stringbuf
+was created only in input mode, the resultant basic_string contains
+the character sequence in the range [eback(), egptr()). If the
+basic_stringbuf was created with (which &amp; ios_base::out) being true
+then the resultant basic_string contains the character sequence in the
+range [pbase(), high_mark) where high_mark represents the position one
+past the highest initialized character in the buffer. Characters can
+be initialized either through writing to the stream, or by
+constructing the basic_stringbuf with a basic_string, or by calling
+the str(basic_string) member function. In the case of calling the
+str(basic_string) member function, all characters initialized prior to
+the call are now considered uninitialized (except for those
+characters re-initialized by the new basic_string). Otherwise the
+basic_stringbuf has been created in neither input nor output mode and
+a zero length basic_string is returned.
+</p>
+</blockquote>
+
+<p>
+27.7.1.2/2 Change:
+</p>
+
+<blockquote>
+<p>
+-2- Effects: If the basic_stringbuf's underlying character sequence is
+not empty, deallocates it. Then copies the content of s into the
+basic_stringbuf underlying character sequence and initializes the
+input and output sequences according to the mode stored when creating
+the basic_stringbuf object. If (mode&amp;ios_base::out) is true, then
+initializes the output sequence with the underlying sequence. If
+(mode&amp;ios_base::in) is true, then initializes the input sequence with
+the underlying sequence.
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+-2- Effects: Copies the content of s into the basic_stringbuf
+underlying character sequence. If mode &amp; ios_base::out is true,
+initializes the output sequence such that pbase() points to the first
+underlying character, epptr() points one past the last underlying
+character, and if (mode &amp; ios_base::ate) is true,
+pptr() is set equal to epptr() else pptr() is set equal to pbase(). If
+mode &amp; ios_base::in is true, initializes the input sequence such that
+eback() and gptr() point to the first underlying character and egptr()
+points one past the last underlying character.
+</p>
+</blockquote>
+
+<p>Remove 27.2.1.2/3. (Same rationale as issue 238: incorrect and unnecessary.)</p>
+
+<p>27.7.1.3/1 Change:</p>
+
+<blockquote>
+<p>
+1- Returns: If the input sequence has a read position available,
+returns traits::to_int_type(*gptr()). Otherwise, returns
+traits::eof().
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+1- Returns: If the input sequence has a read position available,
+returns traits::to_int_type(*gptr()). Otherwise, returns
+traits::eof(). Any character in the underlying buffer which has been
+initialized is considered to be part of the input sequence.
+</p>
+</blockquote>
+
+<p>27.7.1.3/9 Change:</p>
+
+<blockquote>
+<p>
+-9- Notes: The function can make a write position available only if (
+mode &amp; ios_base::out) != 0. To make a write position available, the
+function reallocates (or initially allocates) an array object with a
+sufficient number of elements to hold the current array object (if
+any), plus one additional write position. If ( mode &amp; ios_base::in) !=
+0, the function alters the read end pointer egptr() to point just past
+the new write position (as does the write end pointer epptr()).
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+-9- The function can make a write position available only if ( mode &amp;
+ios_base::out) != 0. To make a write position available, the function
+reallocates (or initially allocates) an array object with a sufficient
+number of elements to hold the current array object (if any), plus one
+additional write position. If ( mode &amp; ios_base::in) != 0, the
+function alters the read end pointer egptr() to point just past the
+new write position.
+</p>
+</blockquote>
+
+<p>27.7.1.3/12 Change:</p>
+
+<blockquote>
+<p>
+-12- _ If (newoff + off) &lt; 0, or (xend - xbeg) &lt; (newoff + off), the
+positioning operation fails. Otherwise, the function assigns xbeg +
+newoff + off to the next pointer xnext .
+</p>
+</blockquote>
+
+<p>to:</p>
+
+<blockquote>
+<p>
+-12- _ If (newoff + off) &lt; 0, or if (newoff + off) refers to an
+uninitialized character (as defined in 27.7.1.3 [stringbuf.members]
+paragraph 1), the positioning operation fails. Otherwise, the function
+assigns xbeg + newoff + off to the next pointer xnext .
+</p>
+</blockquote>
+
+<p><i>[post-Kona: Howard provided wording. At Kona the LWG agreed that
+ something along these lines was a good idea, but the original
+ proposed resolution didn't say enough about the effect of various
+ member functions on the underlying character sequences.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The current basic_stringbuf description is over-constrained in such
+a way as to prohibit vendors from making this the high-performance
+in-memory stream it was meant to be. The fundamental problem is that
+the pointers: eback(), gptr(), egptr(), pbase(), pptr(), epptr() are
+observable from a derived client, and the current description
+restricts the range [pbase(), epptr()) from being grown geometrically.
+This change allows, but does not require, geometric growth of this
+range.</p>
+
+<p>Backwards compatibility issues: These changes will break code that
+derives from basic_stringbuf, observes epptr(), and depends upon
+[pbase(), epptr()) growing by one character on each call to overflow()
+(i.e. test suites). Otherwise there are no backwards compatibility
+issues.</p>
+
+<p>27.7.1.1/2: The non-normative note is non-binding, and if it were
+binding, would be over specification. The recommended change focuses
+on the important observable fact.</p>
+
+<p>27.7.1.1/3: This change does two things: 1. It describes exactly
+what must happen in terms of the sequences. The terms "input
+sequence" and "output sequence" are not well defined. 2. It
+introduces a common extension: open with app or ate mode. I concur
+with issue 238 that paragraph 4 is both wrong and unnecessary.</p>
+
+<p>27.7.1.2/1: This change is the crux of the efficiency issue. The
+resultant basic_string is not dependent upon epptr(), and thus
+implementors are free to grow the underlying buffer geometrically
+during overflow() *and* place epptr() at the end of that buffer.</p>
+
+<p>27.7.1.2/2: Made consistent with the proposed 27.7.1.1/3.</p>
+
+<p>27.7.1.3/1: Clarifies that characters written to the stream beyond
+the initially specified string are available for reading in an i/o
+basic_streambuf.</p>
+
+<p>27.7.1.3/9: Made normative by removing "Notes:", and removed the
+trailing parenthetical comment concerning epptr().</p>
+
+<p>27.7.1.3/12: Restricting the positioning to [xbeg, xend) is no
+longer allowable since [pbase(), epptr()) may now contain
+uninitialized characters. Positioning is only allowable over the
+initialized range.</p>
+
+
+
+
+
+<hr>
+<h3><a name="434"></a>434. bitset::to_string() hard to use</h3>
+<p><b>Section:</b> 23.3.5.2 [bitset.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.members">issues</a> in [bitset.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It has been pointed out a number of times that the bitset to_string() member
+function template is tedious to use since callers must explicitly specify the
+entire template argument list (3 arguments). At least two implementations
+provide a number of overloads of this template to make it easier to use.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In order to allow callers to specify no template arguments at all, just the
+first one (charT), or the first 2 (charT and traits), in addition to all
+three template arguments, add the following three overloads to both the
+interface (declarations only) of the class template bitset as well as to
+section 23.3.5.2, immediately after p34, the Returns clause of the existing
+to_string() member function template:</p>
+
+<pre> template &lt;class charT, class traits&gt;
+ basic_string&lt;charT, traits, allocator&lt;charT&gt; &gt;
+ to_string () const;
+
+ -34.1- Returns: to_string&lt;charT, traits, allocator&lt;charT&gt; &gt;().
+
+ template &lt;class charT&gt;
+ basic_string&lt;charT, char_traits&lt;charT&gt;, allocator&lt;charT&gt; &gt;
+ to_string () const;
+
+ -34.2- Returns: to_string&lt;charT, char_traits&lt;charT&gt;, allocator&lt;charT&gt; &gt;().
+
+ basic_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt; &gt;
+ to_string () const;
+
+ -34.3- Returns: to_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt; &gt;().
+</pre>
+
+<p><i>[Kona: the LWG agrees that this is an improvement over the
+ status quo. Dietmar thought about an alternative using a proxy
+ object but now believes that the proposed resolution above is the
+ right choice.
+]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="435"></a>435. bug in DR 25</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+It has been pointed out that the proposed resolution in DR 25 may not be
+quite up to snuff: <br>
+http://gcc.gnu.org/ml/libstdc++/2003-09/msg00147.html
+http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#25<br>
+</p>
+
+<p>
+It looks like Petur is right. The complete corrected text is copied below.
+I think we may have have been confused by the reference to 22.2.2.2.2 and
+the subsequent description of `n' which actually talks about the second
+argument to sputn(), not about the number of fill characters to pad with.
+</p>
+
+<p>
+So the question is: was the original text correct? If the intent was to
+follow classic iostreams then it most likely wasn't, since setting width()
+to less than the length of the string doesn't truncate it on output. This
+is also the behavior of most implementations (except for SGI's standard
+iostreams where the operator does truncate).
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the text in 21.3.7.9, p4 from</p>
+ <blockquote><p>
+ If bool(k) is true, inserts characters as if by calling
+ os.rdbuf()-&gt;sputn(str.data(), n), padding as described in stage 3
+ of lib.facet.num.put.virtuals, where n is the larger of os.width()
+ and str.size();
+ </p></blockquote>
+<p>to</p>
+ <blockquote><p>
+ If bool(k) is true, determines padding as described in
+ lib.facet.num.put.virtuals, and then inserts the resulting
+ sequence of characters <tt>seq</tt> as if by calling
+ <tt>os.rdbuf()-&gt;sputn(seq, n)</tt>, where <tt>n</tt> is the larger of
+ <tt>os.width()</tt> and <tt>str.size()</tt>;
+ </p></blockquote>
+
+<p><i>[Kona: it appears that neither the original wording, DR25, nor the
+ proposed resolution, is quite what we want. We want to say that
+ the string will be output, padded to os.width() if necessary. We
+ don't want to duplicate the padding rules in clause 22, because
+ they're complicated, but we need to be careful because they weren't
+ quite written with quite this case in mind. We need to say what
+ the character sequence is, and then defer to clause 22. Post-Kona:
+ Benjamin provided wording.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="436"></a>436. are cv-qualified facet types valid facets?</h3>
+<p><b>Section:</b> 22.1.1.1.2 [locale.facet] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Is "const std::ctype&lt;char&gt;" a valid template argument to has_facet, use_facet,
+and the locale template ctor? And if so, does it designate the same Facet as
+the non-const "std::ctype&lt;char&gt;?" What about "volatile std::ctype&lt;char&gt;?"
+Different implementations behave differently: some fail to compile, others
+accept such types but behave inconsistently.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 22.1.1.1.2, p1 to read:</p>
+
+<p>Template parameters in this clause which are required to be facets
+are those named Facet in declarations. A program that passes a type
+that is not a facet, or a type that refers to volatile-qualified
+facet, as an (explicit or deduced) template parameter to a locale
+function expecting a facet, is ill-formed. A const-qualified facet is
+a valid template argument to any locale function that expects a Facet
+template parameter.</p>
+
+<p><i>[Kona: changed the last sentence from a footnote to normative
+text.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="438"></a>438. Ambiguity in the "do the right thing" clause</h3>
+<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2003-10-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>Section 23.1.1 [sequence.reqmts], paragraphs 9-11, fixed up the problem
+noticed with statements like:</p>
+<pre>vector&lt;int&gt; v(10, 1);
+</pre>
+
+<p>The intent of the above statement was to construct with:</p>
+<pre>vector(size_type, const value_type&amp;);
+</pre>
+
+<p>but early implementations failed to compile as they bound to:</p>
+<pre>template &lt;class InputIterator&gt;
+vector(InputIterator f, InputIterator l);
+</pre>
+<p>instead.</p>
+
+<p>Paragraphs 9-11 say that if InputIterator is an integral type, then the
+member template constructor will have the same effect as:</p>
+<pre>vector&lt;static_cast&lt;size_type&gt;(f), static_cast&lt;value_type&gt;(l));
+</pre>
+<p>(and similarly for the other member template functions of sequences).</p>
+
+<p>There is also a note that describes one implementation technique:</p>
+<blockquote><p>
+ One way that sequence implementors can satisfy this requirement is to
+ specialize the member template for every integral type.
+</p></blockquote>
+
+<p>This might look something like:</p>
+<blockquote>
+<pre>template &lt;class T&gt;
+struct vector
+{
+ typedef unsigned size_type;
+
+ explicit vector(size_type) {}
+ vector(size_type, const T&amp;) {}
+
+ template &lt;class I&gt;
+ vector(I, I);
+
+ // ...
+};
+
+template &lt;class T&gt;
+template &lt;class I&gt;
+vector&lt;T&gt;::vector(I, I) { ... }
+
+template &lt;&gt;
+template &lt;&gt;
+vector&lt;int&gt;::vector(int, int) { ... }
+
+template &lt;&gt;
+template &lt;&gt;
+vector&lt;int&gt;::vector(unsigned, unsigned) { ... }
+
+// ...
+</pre>
+</blockquote>
+
+<p>Label this solution 'A'.</p>
+
+<p>The standard also says:</p>
+<blockquote><p>
+ Less cumbersome implementation techniques also exist.
+</p></blockquote>
+<p>
+A popular technique is to not specialize as above, but instead catch
+every call with the member template, detect the type of InputIterator,
+and then redirect to the correct logic. Something like:
+</p>
+<blockquote>
+<pre>template &lt;class T&gt;
+template &lt;class I&gt;
+vector&lt;T&gt;::vector(I f, I l)
+{
+ choose_init(f, l, int2type&lt;is_integral&lt;I&gt;::value&gt;());
+}
+
+template &lt;class T&gt;
+template &lt;class I&gt;
+vector&lt;T&gt;::choose_init(I f, I l, int2type&lt;false&gt;)
+{
+ // construct with iterators
+}
+
+template &lt;class T&gt;
+template &lt;class I&gt;
+vector&lt;T&gt;::choose_init(I f, I l, int2type&lt;true&gt;)
+{
+ size_type sz = static_cast&lt;size_type&gt;(f);
+ value_type v = static_cast&lt;value_type&gt;(l);
+ // construct with sz,v
+}
+</pre>
+</blockquote>
+
+<p>Label this solution 'B'.</p>
+
+<p>Both of these solutions solve the case the standard specifically
+mentions:</p>
+<pre>vector&lt;int&gt; v(10, 1); // ok, vector size 10, initialized to 1
+</pre>
+
+<p>
+However, (and here is the problem), the two solutions have different
+behavior in some cases where the value_type of the sequence is not an
+integral type. For example consider:
+</p>
+<blockquote><pre> pair&lt;char, char&gt; p('a', 'b');
+ vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt; d('a', 'b');
+</pre></blockquote>
+<p>
+The second line of this snippet is likely an error. Solution A catches
+the error and refuses to compile. The reason is that there is no
+specialization of the member template constructor that looks like:
+</p>
+<pre>template &lt;&gt;
+template &lt;&gt;
+vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt;::vector(char, char) { ... }
+</pre>
+
+<p>
+So the expression binds to the unspecialized member template
+constructor, and then fails (compile time) because char is not an
+InputIterator.
+</p>
+
+<p>
+Solution B compiles the above example though. 'a' is casted to an
+unsigned integral type and used to size the outer vector. 'b' is
+static casted to the inner vector using it's explicit constructor:
+</p>
+
+<pre>explicit vector(size_type n);
+</pre>
+
+<p>
+and so you end up with a static_cast&lt;size_type&gt;('a') by
+static_cast&lt;size_type&gt;('b') matrix.
+</p>
+
+<p>
+It is certainly possible that this is what the coder intended. But the
+explicit qualifier on the inner vector has been thwarted at any rate.
+</p>
+
+<p>
+The standard is not clear whether the expression:
+</p>
+
+<pre> vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt; d('a', 'b');
+</pre>
+
+<p>
+(and similar expressions) are:
+</p>
+
+<ol>
+<li> undefined behavior.</li>
+<li> illegal and must be rejected.</li>
+<li> legal and must be accepted.</li>
+</ol>
+
+<p>My preference is listed in the order presented.</p>
+
+<p>There are still other techniques for implementing the requirements of
+paragraphs 9-11, namely the "restricted template technique" (e.g.
+enable_if). This technique is the most compact and easy way of coding
+the requirements, and has the behavior of #2 (rejects the above
+expression).
+</p>
+
+<p>
+Choosing 1 would allow all implementation techniques I'm aware of.
+Choosing 2 would allow only solution 'A' and the enable_if technique.
+Choosing 3 would allow only solution 'B'.
+</p>
+
+<p>
+Possible wording for a future standard if we wanted to actively reject
+the expression above would be to change "static_cast" in paragraphs
+9-11 to "implicit_cast" where that is defined by:
+</p>
+
+<blockquote>
+<pre>template &lt;class T, class U&gt;
+inline
+T implicit_cast(const U&amp; u)
+{
+ return u;
+}
+</pre>
+</blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Replace 23.1.1 [sequence.reqmts] paragraphs 9 - 11 with:</p>
+
+<p>For every sequence defined in this clause and in clause lib.strings:</p>
+
+<ul>
+ <li>
+ <p>If the constructor</p>
+ <pre> template &lt;class InputIterator&gt;
+ X(InputIterator f, InputIterator l,
+ const allocator_type&amp; a = allocator_type())
+ </pre>
+ <p>is called with a type InputIterator that does not qualify as
+ an input iterator, then the constructor will behave as if the
+ overloaded constructor:</p>
+ <pre> X(size_type, const value_type&amp; = value_type(),
+ const allocator_type&amp; = allocator_type())
+ </pre>
+ <p>were called instead, with the arguments static_cast&lt;size_type&gt;(f), l and a, respectively.</p>
+ </li>
+
+ <li>
+ <p>If the member functions of the forms:</p>
+ <pre> template &lt;class InputIterator&gt; // such as insert()
+ rt fx1(iterator p, InputIterator f, InputIterator l);
+
+ template &lt;class InputIterator&gt; // such as append(), assign()
+ rt fx2(InputIterator f, InputIterator l);
+
+ template &lt;class InputIterator&gt; // such as replace()
+ rt fx3(iterator i1, iterator i2, InputIterator f, InputIterator l);
+ </pre>
+ <p>are called with a type InputIterator that does not qualify as
+ an input iterator, then these functions will behave as if the
+ overloaded member functions:</p>
+ <pre> rt fx1(iterator, size_type, const value_type&amp;);
+
+ rt fx2(size_type, const value_type&amp;);
+
+ rt fx3(iterator, iterator, size_type, const value_type&amp;);
+ </pre>
+ <p>were called instead, with the same arguments.</p>
+ </li>
+</ul>
+
+<p>In the previous paragraph the alternative binding will fail if f
+is not implicitly convertible to X::size_type or if l is not implicitly
+convertible to X::value_type.</p>
+
+<p>
+The extent to which an implementation determines that a type cannot be
+an input iterator is unspecified, except that as a minimum integral
+types shall not qualify as input iterators.
+</p>
+
+
+
+<p><i>[
+Kona: agreed that the current standard requires <tt>v('a', 'b')</tt>
+to be accepted, and also agreed that this is surprising behavior. The
+LWG considered several options, including something like
+implicit_cast, which doesn't appear to be quite what we want. We
+considered Howards three options: allow acceptance or rejection,
+require rejection as a compile time error, and require acceptance. By
+straw poll (1-6-1), we chose to require a compile time error.
+Post-Kona: Howard provided wording.
+]</i></p>
+
+
+<p><i>[
+Sydney: The LWG agreed with this general direction, but there was some
+discomfort with the wording in the original proposed resolution.
+Howard submitted new wording, and we will review this again in
+Redmond.
+]</i></p>
+
+
+<p><i>[Redmond: one very small change in wording: the first argument
+ is cast to size_t. This fixes the problem of something like
+ <tt>vector&lt;vector&lt;int&gt; &gt;(5, 5)</tt>, where int is not
+ implicitly convertible to the value type.]</i></p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>The proposed resolution fixes:</p>
+
+<pre> vector&lt;int&gt; v(10, 1);
+</pre>
+
+<p>
+since as integral types 10 and 1 must be disqualified as input
+iterators and therefore the (size,value) constructor is called (as
+if).</p>
+
+<p>The proposed resolution breaks:</p>
+
+<pre> vector&lt;vector&lt;T&gt; &gt; v(10, 1);
+</pre>
+
+<p>
+because the integral type 1 is not *implicitly* convertible to
+vector&lt;T&gt;. The wording above requires a diagnostic.</p>
+
+<p>
+The proposed resolution leaves the behavior of the following code
+unspecified.
+</p>
+
+<pre> struct A
+ {
+ operator int () const {return 10;}
+ };
+
+ struct B
+ {
+ B(A) {}
+ };
+
+ vector&lt;B&gt; v(A(), A());
+</pre>
+
+<p>
+The implementation may or may not detect that A is not an input
+iterator and employee the (size,value) constructor. Note though that
+in the above example if the B(A) constructor is qualified explicit,
+then the implementation must reject the constructor as A is no longer
+implicitly convertible to B.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="441"></a>441. Is fpos::state const?</h3>
+<p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In section 27.4.3.1 [fpos.members] fpos&lt;stateT&gt;::state() is declared
+non const, but in section 27.4.3 [fpos] it is declared const.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In section 27.4.3.1 [fpos.members], change the declaration of
+<tt>fpos&lt;stateT&gt;::state()</tt> to const.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="442"></a>442. sentry::operator bool() inconsistent signature</h3>
+<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-18</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In section 27.6.2.4 [ostream::sentry] paragraph 4, in description part
+basic_ostream&lt;charT, traits&gt;::sentry::operator bool() is declared
+as non const, but in section 27.6.2.3, in synopsis it is declared
+const.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In section 27.6.2.4 [ostream::sentry] paragraph 4, change the declaration
+of <tt>sentry::operator bool()</tt> to const.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="443"></a>443. filebuf::close() inconsistent use of EOF</h3>
+<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-20</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In section 27.8.1.4 [filebuf.members] par6, in effects description of
+basic_filebuf&lt;charT, traits&gt;::close(), overflow(EOF) is used twice;
+should be overflow(traits::eof()).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change overflow(EOF) to overflow(traits::eof()).
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="444"></a>444. Bad use of casts in fstream</h3>
+<p><b>Section:</b> 27.8.1 [fstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fstreams">issues</a> in [fstreams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>27.8.1.9 [ifstream.members] p1, 27.8.1.13 [ofstream.members] p1,
+27.8.1.17 [fstream.members] p1 seems have same problem as exposed in
+LWG issue
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>[Sydney: Genuine defect. 27.8.1.13 needs a cast to cast away
+ constness. The other two places are stylistic: we could change the
+ C-style casts to const_cast. Post-Sydney: Howard provided wording.
+]</i></p>
+
+
+<p>Change 27.8.1.7/1 from:</p>
+<blockquote><p>
+ Returns: (basic_filebuf&lt;charT,traits&gt;*)&amp;sb.
+</p></blockquote>
+
+<p>to:</p>
+<blockquote><p>
+ Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
+</p></blockquote>
+
+<p>Change 27.8.1.10/1 from:</p>
+<blockquote><p>
+ Returns: (basic_filebuf&lt;charT,traits&gt;*)&amp;sb.
+</p></blockquote>
+
+<p>to:</p>
+<blockquote><p>
+ Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
+</p></blockquote>
+
+<p>Change 27.8.1.13/1 from:</p>
+<blockquote><p>
+ Returns: &amp;sb.
+</p></blockquote>
+
+<p>to:</p>
+<blockquote><p>
+ Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
+</p></blockquote>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="445"></a>445. iterator_traits::reference unspecified for some iterator categories</h3>
+<p><b>Section:</b> 24.3.1 [iterator.traits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2003-12-09</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The standard places no restrictions at all on the reference type
+of input, output, or forward iterators (for forward iterators it
+only specifies that *x must be value_type&amp; and doesn't mention
+the reference type). Bidirectional iterators' reference type is
+restricted only by implication, since the base iterator's
+reference type is used as the return type of reverse_iterator's
+operator*, which must be T&amp; in order to be a conforming forward
+iterator.
+</p>
+
+<p>
+Here's what I think we ought to be able to expect from an input
+or forward iterator's reference type R, where a is an iterator
+and V is its value_type
+</p>
+
+<ul>
+ <li>
+ *a is convertible to R
+ </li>
+
+ <li>
+ R is convertible to V
+ </li>
+
+ <li>
+ static_cast&lt;V&gt;(static_cast&lt;R&gt;(*a)) is equivalent to
+ static_cast&lt;V&gt;(*a)
+ </li>
+</ul>
+
+<p>A mutable forward iterator ought to satisfy, for x of type V:</p>
+ <pre> { R r = *a; r = x; } is equivalent to *a = x;
+ </pre>
+
+<p>
+I think these requirements capture existing container iterators
+(including vector&lt;bool&gt;'s), but render istream_iterator invalid;
+its reference type would have to be changed to a constant
+reference.
+</p>
+
+
+<p>
+(Jeremy Siek) During the discussion in Sydney, it was felt that a
+simpler long term solution for this was needed. The solution proposed
+was to require <tt>reference</tt> to be the same type as <tt>*a</tt>
+and <tt>pointer</tt> to be the same type as <tt>a-&gt;</tt>. Most
+iterators in the Standard Library already meet this requirement. Some
+iterators are output iterators, and do not need to meet the
+requirement, and others are only specified through the general
+iterator requirements (which will change with this resolution). The
+sole case where there is an explicit definition of the reference type
+that will need to change is <tt>istreambuf_iterator</tt> which returns
+<tt>charT</tt> from <tt>operator*</tt> but has a reference type of
+<tt>charT&amp;</tt>. We propose changing the reference type of
+<tt>istreambuf_iterator</tt> to <tt>charT</tt>.
+</p>
+
+<p>The other option for resolving the issue with <tt>pointer</tt>,
+ mentioned in the note below, is to remove <tt>pointer</tt>
+ altogether. I prefer placing requirements on <tt>pointer</tt> to
+ removing it for two reasons. First, <tt>pointer</tt> will become
+ useful for implementing iterator adaptors and in particular,
+ <tt>reverse_iterator</tt> will become more well defined. Second,
+ removing <tt>pointer</tt> is a rather drastic and publicly-visible
+ action to take.</p>
+
+<p>The proposed resolution technically enlarges the requirements for
+iterators, which means there are existing iterators (such as
+<tt>istreambuf_iterator</tt>, and potentially some programmer-defined
+iterators) that will no longer meet the requirements. Will this break
+existing code? The scenario in which it would is if an algorithm
+implementation (say in the Standard Library) is changed to rely on
+<tt>iterator_traits::reference</tt>, and then is used with one of the
+iterators that do not have an appropriately defined
+<tt>iterator_traits::reference</tt>.
+</p>
+
+
+<p>The proposed resolution makes one other subtle change. Previously,
+it was required that output iterators have a <tt>difference_type</tt>
+and <tt>value_type</tt> of <tt>void</tt>, which means that a forward
+iterator could not be an output iterator. This is clearly a mistake,
+so I've changed the wording to say that those types may be
+<tt>void</tt>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>In 24.3.1 [iterator.traits], after:</p>
+
+<blockquote><p>
+be defined as the iterator's difference type, value type and iterator
+category, respectively.
+</p></blockquote>
+
+<p>add</p>
+
+<blockquote><p>
+In addition, the types</p>
+<pre>iterator_traits&lt;Iterator&gt;::reference
+iterator_traits&lt;Iterator&gt;::pointer
+</pre>
+<p>must be defined as the iterator's reference and pointer types, that
+is, the same type as the type of <tt>*a</tt> and <tt>a-&gt;</tt>,
+respectively.</p>
+</blockquote>
+
+<p>In 24.3.1 [iterator.traits], change:</p>
+
+<blockquote><p>
+In the case of an output iterator, the types</p>
+<pre>iterator_traits&lt;Iterator&gt;::difference_type
+iterator_traits&lt;Iterator&gt;::value_type
+</pre>
+<p>are both defined as <tt>void</tt>.</p>
+</blockquote>
+
+<p>to:</p>
+<blockquote><p>
+In the case of an output iterator, the types</p>
+<pre>iterator_traits&lt;Iterator&gt;::difference_type
+iterator_traits&lt;Iterator&gt;::value_type
+iterator_traits&lt;Iterator&gt;::reference
+iterator_traits&lt;Iterator&gt;::pointer
+</pre>
+<p>may be defined as <tt>void</tt>.</p>
+</blockquote>
+
+<p>In 24.5.3 [istreambuf.iterator], change:</p>
+<blockquote>
+<pre>typename traits::off_type, charT*, charT&amp;&gt;
+</pre>
+</blockquote>
+<p>to:</p>
+<blockquote>
+<pre>typename traits::off_type, charT*, charT&gt;
+</pre>
+</blockquote>
+
+<p><i>[
+Redmond: there was concern in Sydney that this might not be the only place
+where things were underspecified and needed to be changed. Jeremy
+reviewed iterators in the standard and confirmed that nothing else
+needed to be changed.
+]</i></p>
+
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="448"></a>448. Random Access Iterators over abstract classes</h3>
+<p><b>Section:</b> 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-01-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#random.access.iterators">issues</a> in [random.access.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 76, the random access iterator requirement table, says that the
+return type of a[n] must be "convertible to T". When an iterator's
+value_type T is an abstract class, nothing is convertible to T.
+Surely this isn't an intended restriction?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the return type to "convertible to T const&amp;".
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="449"></a>449. Library Issue 306 Goes Too Far</h3>
+<p><b>Section:</b> 18.1 [support.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2004-01-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.types">issues</a> in [support.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Original text:</p>
+<blockquote><p>
+The macro offsetof accepts a restricted set of type arguments in this
+International Standard. type shall be a POD structure or a POD union
+(clause 9). The result of applying the offsetof macro to a field that
+is a static data member or a function member is undefined."
+</p></blockquote>
+
+<p>Revised text:</p>
+<blockquote><p>
+"If type is not a POD structure or a POD union the results are undefined."
+</p></blockquote>
+
+<p>
+Looks to me like the revised text should have replaced only the second
+sentence. It doesn't make sense standing alone.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 18.1, paragraph 5, to:</p>
+
+<blockquote><p>
+The macro offsetof accepts a restricted set of type arguments in this
+International Standard. If type is not a POD structure or a POD union
+the results are undefined. The result of applying the offsetof macro
+to a field that is a static data member or a function member is
+undefined."
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="453"></a>453. basic_stringbuf::seekoff need not always fail for an empty stream</h3>
+<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<pre> pos_type basic_stringbuf::seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode);
+</pre>
+<p>
+is obliged to fail if nothing has been inserted into the stream. This
+is unnecessary and undesirable. It should be permissible to seek to
+an effective offset of zero.</p>
+
+<p><i>[
+ Sydney: Agreed that this is an annoying problem: seeking to zero should be
+ legal. Bill will provide wording.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change the sentence from:</p>
+<blockquote><p>
+For a sequence to be positioned, if its next pointer (either
+gptr() or pptr()) is a null pointer, the positioning operation
+fails.
+</p></blockquote>
+
+<p>to:</p>
+
+<blockquote><p>
+For a sequence to be positioned, if its next pointer (either
+gptr() or pptr()) is a null pointer and the new offset newoff
+is nonzero, the positioning operation fails.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="455"></a>455. cerr::tie() and wcerr::tie() are overspecified</h3>
+<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Both cerr::tie() and wcerr::tie() are obliged to be null at program
+startup. This is overspecification and overkill. It is both traditional
+and useful to tie cerr to cout, to ensure that standard output is drained
+whenever an error message is written. This behavior should at least be
+permitted if not required. Same for wcerr::tie().
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Add to the description of cerr:</p>
+<blockquote><p>
+After the object cerr is initialized, cerr.tie() returns &amp;cout.
+Its state is otherwise the same as required for basic_ios&lt;char&gt;::init
+(lib.basic.ios.cons).
+</p></blockquote>
+
+<p>Add to the description of wcerr:</p>
+
+<blockquote><p>
+After the object wcerr is initialized, wcerr.tie() returns &amp;wcout.
+Its state is otherwise the same as required for basic_ios&lt;wchar_t&gt;::init
+(lib.basic.ios.cons).
+</p></blockquote>
+
+<p><i>[Sydney: straw poll (3-1): we should <i>require</i>, not just
+ permit, cout and cerr to be tied on startup. Pre-Redmond: Bill will
+ provide wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="456"></a>456. Traditional C header files are overspecified</h3>
+<p><b>Section:</b> 17.4.1.2 [headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>The C++ Standard effectively requires that the traditional C headers
+(of the form &lt;xxx.h&gt;) be defined in terms of the newer C++
+headers (of the form &lt;cxxx&gt;). Clauses 17.4.1.2/4 and D.5 combine
+to require that:</p>
+
+<ul>
+ <li>Including the header &lt;cxxx&gt; declares a C name in namespace std.</li>
+
+ <li> Including the header &lt;xxx.h&gt; declares a C name in namespace std
+ (effectively by including &lt;cxxx&gt;), then imports it into the global
+ namespace with an individual using declaration.</li>
+</ul>
+
+<p>
+The rules were left in this form despited repeated and heated objections
+from several compiler vendors. The C headers are often beyond the direct
+control of C++ implementors. In some organizations, it's all they can do
+to get a few #ifdef __cplusplus tests added. Third-party library vendors
+can perhaps wrap the C headers. But neither of these approaches supports
+the drastic restructuring required by the C++ Standard. As a result, it is
+still widespread practice to ignore this conformance requirement, nearly
+seven years after the committee last debated this topic. Instead, what is
+often implemented is:
+</p>
+
+<ul>
+ <li> Including the header &lt;xxx.h&gt; declares a C name in the
+ global namespace.</li>
+
+ <li> Including the header &lt;cxxx&gt; declares a C name in the
+ global namespace (effectively by including &lt;xxx.h&gt;), then
+ imports it into namespace std with an individual using declaration.</li>
+</ul>
+
+<p>
+The practical benefit for implementors with the second approach is that
+they can use existing C library headers, as they are pretty much obliged
+to do. The practical cost for programmers facing a mix of implementations
+is that they have to assume weaker rules:</p>
+
+<ul>
+ <li> If you want to assuredly declare a C name in the global
+ namespace, include &lt;xxx.h&gt;. You may or may not also get the
+ declaration in namespace std.</li>
+
+ <li> If you want to assuredly declare a C name in namespace std,
+ include &lt;cxxx&gt;. You may or may not also get the declaration in
+ the global namespace.</li>
+</ul>
+
+<p>
+There also exists the <i>possibility</i> of subtle differences due to
+Koenig lookup, but there are so few non-builtin types defined in the C
+headers that I've yet to see an example of any real problems in this
+area.
+</p>
+
+<p>
+It is worth observing that the rate at which programmers fall afoul of
+these differences has remained small, at least as measured by newsgroup
+postings and our own bug reports. (By an overwhelming margin, the
+commonest problem is still that programmers include &lt;string&gt; and can't
+understand why the typename string isn't defined -- this a decade after
+the committee invented namespace std, nominally for the benefit of all
+programmers.)
+</p>
+
+<p>
+We should accept the fact that we made a serious mistake and rectify it,
+however belatedly, by explicitly allowing either of the two schemes for
+declaring C names in headers.
+</p>
+
+<p><i>[Sydney: This issue has been debated many times, and will
+ certainly have to be discussed in full committee before any action
+ can be taken. However, the preliminary sentiment of the LWG was in
+ favor of the change. (6 yes, 0 no, 2 abstain) Robert Klarer
+ suggests that we might also want to undeprecate the
+ C-style <tt>.h</tt> headers.]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add to 17.4.1.2 [headers], para. 4:
+</p>
+
+<blockquote><p>
+Except as noted in clauses 18 through 27 and Annex D, the contents of each
+header <i>cname</i> shall be the same as that of the corresponding header
+<i>name.h</i>, as specified in ISO/IEC 9899:1990 Programming Languages C (Clause
+7), or ISO/IEC:1990 Programming Languages-C AMENDMENT 1: C Integrity, (Clause
+7), as appropriate, as if by inclusion. In the C++ Standard Library, however,
+the declarations <del>and definitions</del> (except for names which are defined
+as macros in C) are within namespace scope (3.3.5) of the namespace std.
+<ins>It is unspecified whether these names are first declared within the global
+namespace scope and are then injected into namespace std by explicit
+using-declarations (7.3.3 [namespace.udecl]).</ins>
+</p></blockquote>
+
+<p>
+Change D.5 [depr.c.headers], para. 2-3:
+</p>
+
+<blockquote>
+<p>
+-2- Every C header, each of which has a name of the form <i>name.h</i>, behaves
+as if each name placed in the Standard library namespace by the corresponding
+<i>cname</i> header is <del>also</del> placed within the <ins>global</ins>
+namespace scope<ins>.</ins> <del>of the namespace <tt>std</tt> and is followed
+by an explicit <i>using-declaration</i> (7.3.3 [namespace.udecl]).</del>
+<ins>It is unspecified whether these names are first declared or defined within
+namespace scope (3.3.5 [basic.scope.namespace]) of the namespace
+<tt>std</tt> and are then injected into the global namespace scope by explicit
+using-declarations (7.3.3 [namespace.udecl]).</ins>
+</p>
+<p>
+-3- [<i>Example:</i> The header <tt>&lt;cstdlib&gt;</tt> <ins>assuredly</ins>
+provides its declarations and definitions within the namespace <tt>std</tt>.
+<ins>It may also provide these names within the global namespace.</ins> The
+header <tt>&lt;stdlib.h&gt;</tt> <del>makes these available also in</del>
+<ins>assuredly provides the same declarations and definitions within</ins> the
+global namespace, much as in the C Standard. <ins>It may also provide these
+names within the namespace <tt>std</tt>.</ins> <i>-- end example</i>]
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="457"></a>457. bitset constructor: incorrect number of initialized bits</h3>
+<p><b>Section:</b> 23.3.5.1 [bitset.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Dag Henriksson <b>Date:</b> 2004-01-30</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.cons">issues</a> in [bitset.cons].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The constructor from unsigned long says it initializes "the first M
+bit positions to the corresponding bit values in val. M is the smaller
+of N and the value CHAR_BIT * sizeof(unsigned long)."
+</p>
+
+<p>
+Object-representation vs. value-representation strikes again. CHAR_BIT *
+sizeof (unsigned long) does not give us the number of bits an unsigned long
+uses to hold the value. Thus, the first M bit position above is not
+guaranteed to have any corresponding bit values in val.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.3.5.1 [bitset.cons] paragraph 2, change "M is the smaller of
+ N and the value CHAR_BIT * sizeof (unsigned long). (249)" to
+ "<tt>M</tt> is the smaller of <tt>N</tt> and the number of bits in
+ the value representation (section 3.9 [basic.types]) of <tt>unsigned
+ long</tt>."
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="460"></a>460. Default modes missing from basic_fstream member specifications</h3>
+<p><b>Section:</b> 27.8.1 [fstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Ben Hutchings <b>Date:</b> 2004-04-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fstreams">issues</a> in [fstreams].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The second parameters of the non-default constructor and of the open
+member function for basic_fstream, named "mode", are optional
+according to the class declaration in 27.8.1.11 [lib.fstream]. The
+specifications of these members in 27.8.1.12 [lib.fstream.cons] and
+27.8.1.13 lib.fstream.members] disagree with this, though the
+constructor declaration has the "explicit" function-specifier implying
+that it is intended to be callable with one argument.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 27.8.1.15 [fstream.cons], change</p>
+<pre> explicit basic_fstream(const char* s, ios_base::openmode mode);
+</pre>
+<p>to</p>
+<pre> explicit basic_fstream(const char* s,
+ ios_base::openmode mode = ios_base::in|ios_base::out);
+</pre>
+<p>In 27.8.1.17 [fstream.members], change</p>
+<pre> void open(const char*s, ios_base::openmode mode);
+</pre>
+<p>to</p>
+<pre> void open(const char*s,
+ ios_base::openmode mode = ios_base::in|ios_base::out);
+</pre>
+
+
+
+
+
+<hr>
+<h3><a name="461"></a>461. time_get hard or impossible to implement</h3>
+<p><b>Section:</b> 22.2.5.1.2 [locale.time.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Template time_get currently contains difficult, if not impossible,
+requirements for do_date_order, do_get_time, and do_get_date. All require
+the implementation to scan a field generated by the %x or %X conversion
+specifier in strftime. Yes, do_date_order can always return no_order, but
+that doesn't help the other functions. The problem is that %x can be
+nearly anything, and it can vary widely with locales. It's horribly
+onerous to have to parse "third sunday after Michaelmas in the year of
+our Lord two thousand and three," but that's what we currently ask of
+do_get_date. More practically, it leads some people to think that if
+%x produces 10.2.04, we should know to look for dots as separators. Still
+not easy.
+</p>
+
+<p>
+Note that this is the <i>opposite</i> effect from the intent stated in the
+footnote earlier in this subclause:
+</p>
+
+<blockquote><p>
+"In other words, user confirmation is required for reliable parsing of
+user-entered dates and times, but machine-generated formats can be
+parsed reliably. This allows parsers to be aggressive about interpreting
+user variations on standard formats."
+</p></blockquote>
+
+<p>
+We should give both implementers and users an easier and more reliable
+alternative: provide a (short) list of alternative delimiters and say
+what the default date order is for no_order. For backward compatibility,
+and maximum latitude, we can permit an implementation to parse whatever
+%x or %X generates, but we shouldn't require it.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><b>In the description:</b></p>
+<pre>iter_type do_get_time(iter_type s, iter_type end, ios_base&amp; str,
+ ios_base::iostate&amp; err, tm* t) const;
+</pre>
+
+<p>
+2 Effects: Reads characters starting at suntil it has extracted those
+struct tm members, and remaining format characters, used by
+time_put&lt;&gt;::put to produce the format specified by 'X', or until it
+encounters an error or end of sequence.
+</p>
+
+<p><b>change:</b> 'X'</p>
+
+<p><b>to:</b> "%H:%M:%S"</p>
+
+
+<p>Change</p>
+<pre>iter_type do_get_date(iter_type s, iter_type end, ios_base&amp; str,
+ ios_base::iostate&amp; err, tm* t) const;
+
+4 Effects: Reads characters starting at s until it has extracted those
+struct tm members, and remaining format characters, used by
+time_put&lt;&gt;::put to produce the format specified by 'x', or until it
+encounters an error.
+</pre>
+
+<p>to</p>
+<pre>iter_type do_get_date(iter_type s, iter_type end, ios_base&amp; str,
+ ios_base::iostate&amp; err, tm* t) const;
+</pre>
+
+<p>
+4 Effects: Reads characters starting at s until it has extracted those
+struct tm members, and remaining format characters, used by
+time_put&lt;&gt;::put to produce one of the following formats, or until it
+encounters an error. The format depends on the value returned by
+date_order() as follows:
+</p>
+
+<pre> date_order() format
+
+ no_order "%m/%d/%y"
+ dmy "%d/%m/%y"
+ mdy "%m/%d/%y"
+ ymd "%y/%m/%d"
+ ydm "%y/%d/%m"
+</pre>
+<p>
+An implementation may also accept additional implementation-defined formats.
+</p>
+
+<p><i>[Redmond: agreed that this is a real problem. The solution is
+ probably to match C99's parsing rules. Bill provided wording.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="464"></a>464. Suggestion for new member functions in standard containers</h3>
+<p><b>Section:</b> 23.2.5 [vector], 23.3.1 [map] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 2004-05-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>To add slightly more convenience to vector&lt;T&gt; and map&lt;Key,T&gt; we should consider to add</p>
+<ol>
+<li> add vector&lt;T&gt;::data() member (const and non-const version)
+semantics: if( empty() ) return 0; else return buffer_;</li>
+<li> add map&lt;Key,T&gt;::at( const Key&amp; k ) member (const and non-const version)
+<i>semantics</i>: iterator i = find( k ); if( i != end() ) return *i; else throw range_error();</li>
+</ol>
+
+<p>Rationale:</p>
+
+<ul>
+<li>To obtain a pointer to the vector's buffer, one must use either
+operator[]() (which can give undefined behavior for empty vectors) or
+at() (which will then throw if the vector is empty). </li>
+<li>tr1::array&lt;T,sz&gt; already has a data() member</li>
+<li>e cannot use operator[]() when T is not DefaultDonstructible</li>
+<li>Neither when the map is const.</li>
+<li>when we want to make sure we don't add an element accidently</li>
+<li>when it should be considered an error if a key is not in the map</li>
+</ul>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 23.2.5 [vector], add the following to the <tt>vector</tt>
+ synopsis after "element access" and before "modifiers":</p>
+<pre> // <i>[lib.vector.data] data access</i>
+ pointer data();
+ const_pointer data() const;
+</pre>
+
+<p>Add a new subsection of 23.2.5 [vector]:</p>
+<blockquote>
+<p>23.2.4.x <tt>vector</tt> data access</p>
+<pre> pointer data();
+ const_pointer data() const;
+</pre>
+<p><b>Returns:</b> A pointer such that [data(), data() + size()) is a valid
+ range. For a non-empty vector, data() == &amp;front().</p>
+<p><b>Complexity:</b> Constant time.</p>
+<p><b>Throws:</b> Nothing.</p>
+</blockquote>
+
+<p>In 23.3.1 [map], add the following to the <tt>map</tt>
+synopsis immediately after the line for operator[]:</p>
+<pre> T&amp; at(const key_type&amp; x);
+ const T&amp; at(const key_type&amp; x) const;
+</pre>
+
+<p>Add the following to 23.3.1.2 [map.access]:</p>
+<blockquote>
+<pre> T&amp; at(const key_type&amp; x);
+ const T&amp; at(const key_type&amp; x) const;
+</pre>
+
+<p><b>Returns:</b> A reference to the element whose key is equivalent
+ to x, if such an element is present in the map.</p>
+<p><b>Throws:</b> <tt>out_of_range</tt> if no such element is present.</p>
+
+</blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>Neither of these additions provides any new functionality but the
+ LWG agreed that they are convenient, especially for novices. The
+ exception type chosen for <tt>at</tt>, <tt>std::out_of_range</tt>,
+ was chosen to match <tt>vector::at</tt>.</p>
+
+
+
+
+
+<hr>
+<h3><a name="465"></a>465. Contents of &lt;ciso646&gt;</h3>
+<p><b>Section:</b> 17.4.1.2 [headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Steve Clamage <b>Date:</b> 2004-06-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>C header &lt;iso646.h&gt; defines macros for some operators, such as
+not_eq for !=.</p>
+
+<p>Section 17.4.1.2 [headers] "Headers" says that except as noted in
+clauses 18 through 27, the &lt;cname&gt; C++ header contents are the same
+as the C header &lt;name.h&gt;. In particular, table 12 lists
+&lt;ciso646&gt; as a C++ header.</p>
+
+<p>I don't find any other mention of &lt;ciso646&gt;, or any mention of
+&lt;iso646.h&gt;, in clauses 17 thorough 27. That implies that the
+contents of &lt;ciso646&gt; are the same as C header &lt;iso646.h&gt;.</p>
+
+<p>Annex C (informative, not normative) in [diff.header.iso646.h] C.2.2.2
+"Header &lt;iso646.h&gt;" says that the alternative tokens are not
+defined as macros in &lt;ciso646&gt;, but does not mention the contents
+of &lt;iso646.h&gt;.</p>
+
+<p>I don't find any normative text to support C.2.2.2.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add to section 17.4.1.2 Headers [lib.headers] a new paragraph after
+ paragraph 6 (the one about functions must be functions):</p>
+
+<blockquote>
+<p>Identifiers that are keywords or operators in C++ shall not be defined
+as macros in C++ standard library headers.
+[Footnote:In particular, including the standard header &lt;iso646.h&gt;
+or &lt;ciso646&gt; has no effect. </p>
+</blockquote>
+
+<p><i>[post-Redmond: Steve provided wording.]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="467"></a>467. char_traits::lt(), compare(), and memcmp()</h3>
+<p><b>Section:</b> 21.1.3.1 [char.traits.specializations.char] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+Table 37 describes the requirements on Traits::compare() in terms of
+those on Traits::lt(). 21.1.3.1, p6 requires char_traits&lt;char&gt;::lt()
+to yield the same result as operator&lt;(char, char).
+</p>
+
+<p>
+Most, if not all, implementations of char_traits&lt;char&gt;::compare()
+call memcmp() for efficiency. However, the C standard requires both
+memcmp() and strcmp() to interpret characters under comparison as
+unsigned, regardless of the signedness of char. As a result, all
+these char_traits implementations fail to meet the requirement
+imposed by Table 37 on compare() when char is signed.
+</p>
+
+
+<p>Read email thread starting with c++std-lib-13499 for more. </p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+
+<p>Change 21.1.3.1, p6 from</p>
+<blockquote><p>
+ The two-argument members assign, eq, and lt are defined identically
+ to the built-in operators =, ==, and &lt; respectively.
+</p></blockquote>
+<p>to</p>
+<blockquote><p>
+ The two-argument member assign is defined identically to
+ the built-in operator =. The two
+ argument members eq and lt are defined identically to
+ the built-in operators == and &lt; for type unsigned char.
+</p></blockquote>
+
+<p><i>[Redmond: The LWG agreed with this general direction, but we
+ also need to change <tt>eq</tt> to be consistent with this change.
+ Post-Redmond: Martin provided wording.]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="468"></a>468. unexpected consequences of ios_base::operator void*()</h3>
+<p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>The program below is required to compile but when run it typically
+produces unexpected results due to the user-defined conversion from
+std::cout or any object derived from basic_ios to void*.
+</p>
+
+<pre> #include &lt;cassert&gt;
+ #include &lt;iostream&gt;
+
+ int main ()
+ {
+ assert (std::cin.tie () == std::cout);
+ // calls std::cout.ios::operator void*()
+ }
+</pre>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Replace std::basic_ios&lt;charT, traits&gt;::operator void*() with another
+conversion operator to some unspecified type that is guaranteed not
+to be convertible to any other type except for bool (a pointer-to-member
+might be one such suitable type). In addition, make it clear that the
+pointer type need not be a pointer to a complete type and when non-null,
+the value need not be valid.
+</p>
+
+<p>Specifically, change in [lib.ios] the signature of</p>
+<pre> operator void*() const;
+</pre>
+<p>to</p>
+<pre> operator unspecified-bool-type() const;
+</pre>
+<p>and change [lib.iostate.flags], p1 from</p>
+<pre> operator void*() const;
+</pre>
+<p>to</p>
+<pre>operator unspecified-bool-type() const;
+
+ -1- Returns: if fail() then a value that will evaluate false in a
+ boolean context; otherwise a value that will evaluate true in a
+ boolean context. The value type returned shall not be
+ convertible to int.
+
+ -2- [Note: This conversion can be used in contexts where a bool
+ is expected (e.g., an if condition); however, implicit
+ conversions (e.g., to int) that can occur with bool are not
+ allowed, eliminating some sources of user error. One possible
+ implementation choice for this type is pointer-to-member. - end
+ note]
+</pre>
+
+<p><i>[Redmond: 5-4 straw poll in favor of doing this.]</i></p>
+
+<p><i>[Lillehammer: Doug provided revised wording for
+ "unspecified-bool-type".]</i></p>
+
+
+
+
+
+
+
+
+<hr>
+<h3><a name="469"></a>469. vector&lt;bool&gt; ill-formed relational operators</h3>
+<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+The overloads of relational operators for vector&lt;bool&gt; specified
+in [lib.vector.bool] are redundant (they are semantically identical
+to those provided for the vector primary template) and may even be
+diagnosed as ill-formed (refer to Daveed Vandevoorde's explanation
+in c++std-lib-13647).
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Remove all overloads of overloads of relational operators for
+vector&lt;bool&gt; from [lib.vector.bool].
+</p>
+
+
+
+
+<hr>
+<h3><a name="474"></a>474. confusing Footnote 297</h3>
+<p><b>Section:</b> 27.6.2.6.4 [ostream.inserters.character] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.character">issues</a> in [ostream.inserters.character].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+I think Footnote 297 is confused. The paragraph it applies to seems
+quite clear in that widen() is only called if the object is not a char
+stream (i.e., not basic_ostream&lt;char&gt;), so it's irrelevant what the
+value of widen(c) is otherwise.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+I propose to strike the Footnote.
+</p>
+
+
+
+
+<hr>
+<h3><a name="475"></a>475. May the function object passed to for_each modify the elements of the iterated sequence?</h3>
+<p><b>Section:</b> 25.1.1 [alg.foreach] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Stephan T. Lavavej, Jaakko Jarvi <b>Date:</b> 2004-07-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.foreach">issues</a> in [alg.foreach].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+It is not clear whether the function object passed to for_each is allowed to
+modify the elements of the sequence being iterated over.
+</p>
+
+<p>
+for_each is classified without explanation in [lib.alg.nonmodifying], "25.1
+Non-modifying sequence operations". 'Non-modifying sequence operation' is
+never defined.
+</p>
+
+<p>
+25(5) says: "If an algorithm's Effects section says that a value pointed to
+by any iterator passed as an argument is modified, then that algorithm has
+an additional type requirement: The type of that argument shall satisfy the
+requirements of a mutable iterator (24.1)."
+</p>
+
+<p>for_each's Effects section does not mention whether arguments can be
+modified:</p>
+
+<blockquote><p>
+ "Effects: Applies f to the result of dereferencing every iterator in the
+ range [first, last), starting from first and proceeding to last - 1."
+</p></blockquote>
+
+<p>
+Every other algorithm in [lib.alg.nonmodifying] is "really" non-modifying in
+the sense that neither the algorithms themselves nor the function objects
+passed to the algorithms may modify the sequences or elements in any way.
+This DR affects only for_each.
+</p>
+
+<p>
+We suspect that for_each's classification in "non-modifying sequence
+operations" means that the algorithm itself does not inherently modify the
+sequence or the elements in the sequence, but that the function object
+passed to it may modify the elements it operates on.
+</p>
+
+<p>
+The original STL document by Stepanov and Lee explicitly prohibited the
+function object from modifying its argument.
+The "obvious" implementation of for_each found in several standard library
+implementations, however, does not impose this restriction.
+As a result, we suspect that the use of for_each with function objects that modify
+their arguments is wide-spread.
+If the restriction was reinstated, all such code would become non-conforming.
+Further, none of the other algorithms in the Standard
+could serve the purpose of for_each (transform does not guarantee the order in
+which its function object is called).
+</p>
+
+<p>
+We suggest that the standard be clarified to explicitly allow the function object
+passed to for_each modify its argument.</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add a nonnormative note to the Effects in 25.1.1 [alg.foreach]: If
+the type of 'first' satisfies the requirements of a mutable iterator,
+'f' may apply nonconstant functions through the dereferenced iterators
+passed to it.
+</p>
+
+
+
+<p><b>Rationale:</b></p>
+<p>The LWG believes that nothing in the standard prohibits function
+ objects that modify the sequence elements. The problem is that
+ for_each is in a secion entitled "nonmutating algorithms", and the
+ title may be confusing. A nonnormative note should clarify that.</p>
+
+
+
+
+
+<hr>
+<h3><a name="478"></a>478. Should forward iterator requirements table have a line for r-&gt;m?</h3>
+<p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#477">477</a></p>
+<p><b>Discussion:</b></p>
+<p>
+The Forward Iterator requirements table contains the following:
+</p>
+<pre> expression return type operational precondition
+ semantics
+ ========== ================== =========== ==========================
+ a-&gt;m U&amp; if X is mutable, (*a).m pre: (*a).m is well-defined.
+ otherwise const U&amp;
+
+ r-&gt;m U&amp; (*r).m pre: (*r).m is well-defined.
+</pre>
+
+<p>The second line may be unnecessary. Paragraph 11 of
+ [lib.iterator.requirements] says:
+</p>
+
+<blockquote><p>
+ In the following sections, a and b denote values of type const X, n
+ denotes a value of the difference type Distance, u, tmp, and m
+ denote identifiers, r denotes a value of X&amp;, t denotes a value of
+ value type T, o denotes a value of some type that is writable to
+ the output iterator.
+</p></blockquote>
+
+<p>
+Because operators can be overloaded on an iterator's const-ness, the
+current requirements allow iterators to make many of the operations
+specified using the identifiers a and b invalid for non-const
+iterators.</p>
+
+<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#477">477</a></p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>Remove the "r-&gt;m" line from the Forward Iterator requirements
+table. Change</p>
+<blockquote><p>
+ "const X"
+</p></blockquote>
+
+<p> to </p>
+
+<blockquote><p>
+ "X or const X"
+</p></blockquote>
+
+<p>in paragraph 11 of [lib.iterator.requirements].</p>
+
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+This is a defect because it constrains an lvalue to returning a modifiable lvalue.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="488"></a>488. rotate throws away useful information</h3>
+<p><b>Section:</b> 25.2.11 [alg.rotate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2004-11-22</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+rotate takes 3 iterators: first, middle and last which point into a
+sequence, and rearranges the sequence such that the subrange [middle,
+last) is now at the beginning of the sequence and the subrange [first,
+middle) follows. The return type is void.
+</p>
+
+<p>
+In many use cases of rotate, the client needs to know where the
+subrange [first, middle) starts after the rotate is performed. This
+might look like:
+</p>
+<pre> rotate(first, middle, last);
+ Iterator i = advance(first, distance(middle, last));
+</pre>
+
+<p>
+Unless the iterators are random access, the computation to find the
+start of the subrange [first, middle) has linear complexity. However,
+it is not difficult for rotate to return this information with
+negligible additional computation expense. So the client could code:
+</p>
+<pre> Iterator i = rotate(first, middle, last);
+</pre>
+
+<p>
+and the resulting program becomes significantly more efficient.
+</p>
+
+<p>
+While the backwards compatibility hit with this change is not zero, it
+is very small (similar to that of lwg <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>), and there is
+a significant benefit to the change.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>In 25 [algorithms] p2, change:</p>
+
+<blockquote><pre> template&lt;class ForwardIterator&gt;
+ <del>void</del> <ins>ForwardIterator</ins> rotate(ForwardIterator first, ForwardIterator middle,
+ ForwardIterator last);
+</pre></blockquote>
+
+<p>In 25.2.11 [alg.rotate], change:</p>
+
+<blockquote><pre> template&lt;class ForwardIterator&gt;
+ <del>void</del> <ins>ForwardIterator</ins> rotate(ForwardIterator first, ForwardIterator middle,
+ ForwardIterator last);
+</pre></blockquote>
+
+<p>In 25.2.11 [alg.rotate] insert a new paragraph after p1:</p>
+
+<blockquote>
+<p><b>Returns</b>: <tt>first + (last - middle)</tt>.</p>
+</blockquote>
+
+<p><i>[
+The LWG agrees with this idea, but has one quibble: we want to make
+sure not to give the impression that the function "advance" is
+actually called, just that the nth iterator is returned. (Calling
+advance is observable behavior, since users can specialize it for
+their own iterators.) Howard will provide wording.
+]</i></p>
+
+
+<p><i>[Howard provided wording for mid-meeting-mailing Jun. 2005.]</i></p>
+
+
+<p><i>[
+Toronto: moved to Ready.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="495"></a>495. Clause 22 template parameter requirements</h3>
+<p><b>Section:</b> 22 [localization] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2005-01-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#localization">issues</a> in [localization].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>It appears that there are no requirements specified for many of the
+template parameters in clause 22. It looks like this issue has never
+come up, except perhaps for Facet.</p>
+
+<p>Clause 22 isn't even listed in 17.3.2.1 [lib.type.descriptions],
+either, which is the wording that allows requirements on template
+parameters to be identified by name.</p>
+
+<p>So one issue is that 17.3.2.1 [lib.type.descriptions] Should be
+changed to cover clause 22. A better change, which will cover us in
+the future, would be to say that it applies to all the library
+clauses. Then if a template gets added to any library clause we are
+covered.</p>
+
+<p>charT, InputIterator, and other names with requirements defined
+elsewhere are fine, assuming the 17.3.2.1 [lib.type.descriptions] fix.
+But there are a few template arguments names which I don't think have
+requirements given elsewhere:</p>
+
+<ul>
+<li>internT and externT. The fix is to add wording saying that internT
+and externT must meet the same requirements as template arguments
+named charT.</li>
+
+<li>stateT. I'm not sure about this one. There already is some wording,
+but it seems a bit vague.</li>
+
+<li>Intl. [lib.locale.moneypunct.byname] The fix for this one is to
+rename "Intl" to "International". The name is important because other
+text identifies the requirements for the name International but not
+for Intl.</li>
+</ul>
+
+<p><b>Proposed resolution:</b></p>
+<p>Change 17.3.2.1 [type.descriptions], paragraph 1, from:</p>
+<blockquote><p>
+The Requirements subclauses may describe names that are used to
+specify constraints on template arguments.153) These names are used in
+clauses 20, 23, 25, and 26 to describe the types that may be supplied
+as arguments by a C++ program when instantiating template components
+from the library.
+</p></blockquote>
+<p>to:</p>
+<blockquote><p>
+The Requirements subclauses may describe names that are used to
+specify constraints on template arguments.153) These names are used in
+library clauses to describe the types that may be supplied as
+arguments by a C++ program when instantiating template components from
+the library.
+</p></blockquote>
+
+<p>In the front matter of class 22, locales, add:</p>
+<blockquote><p>
+Template parameter types internT and externT shall meet the
+requirements of charT (described in 21 [strings]).
+</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+ Again, a blanket clause isn't blanket enough. Also, we've got a
+ couple of names that we don't have blanket requirement statements
+ for. The only issue is what to do about stateT. This wording is
+ thin, but probably adequate.</p>
+
+
+
+
+
+<hr>
+<h3><a name="496"></a>496. Illegal use of "T" in vector&lt;bool&gt;</h3>
+<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> richard@ex-parrot.com <b>Date:</b> 2005-02-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the synopsis of the std::vector&lt;bool&gt; specialisation in 23.2.5 [vector],
+the non-template assign() function has the signature</p>
+
+<pre> void assign( size_type n, const T&amp; t );
+</pre>
+
+<p>The type, T, is not defined in this context.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Replace "T" with "value_type".</p>
+
+
+
+
+
+<hr>
+<h3><a name="497"></a>497. meaning of numeric_limits::traps for floating point types</h3>
+<p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-03-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>18.2.1.2, p59 says this much about the traps member of numeric_limits:</p>
+
+<blockquote>
+<p>static const bool traps;<br>
+-59- true if trapping is implemented for the type.204)
+<br>
+Footnote 204: Required by LIA-1.
+</p>
+</blockquote>
+
+<p>It's not clear what is meant by "is implemented" here.</p>
+
+<p>
+In the context of floating point numbers it seems reasonable to expect
+to be able to use traps to determine whether a program can "safely" use
+infinity(), quiet_NaN(), etc., in arithmetic expressions, that is
+without causing a trap (i.e., on UNIX without having to worry about
+getting a signal). When traps is true, I would expect any of the
+operations in section 7 of IEEE 754 to cause a trap (and my program
+to get a SIGFPE). So, for example, on Alpha, I would expect traps
+to be true by default (unless I compiled my program with the -ieee
+option), false by default on most other popular architectures,
+including IA64, MIPS, PA-RISC, PPC, SPARC, and x86 which require
+traps to be explicitly enabled by the program.
+</p>
+
+<p>
+Another possible interpretation of p59 is that traps should be true
+on any implementation that supports traps regardless of whether they
+are enabled by default or not. I don't think such an interpretation
+makes the traps member very useful, even though that is how traps is
+implemented on several platforms. It is also the only way to implement
+traps on platforms that allow programs to enable and disable trapping
+at runtime.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Change p59 to read:</p>
+<blockquote><p>True if, at program startup, there exists a value of the type that
+ would cause an arithmetic operation using that value to trap.</p></blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+ Real issue, since trapping can be turned on and off. Unclear what a
+ static query can say about a dynamic issue. The real advice we should
+ give users is to use cfenv for these sorts of queries. But this new
+ proposed resolution is at least consistent and slightly better than
+ nothing.</p>
+
+
+
+
+
+<hr>
+<h3><a name="505"></a>505. Result_type in random distribution requirements</h3>
+<p><b>Section:</b> 26.4.1 [rand.req], TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req">issues</a> in [rand.req].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 17: Random distribution requirements
+</p>
+<p>
+Row 1 requires that each random distribution provide a nested type "input_type";
+this type denotes the type of the values that the distribution consumes.
+</p>
+<p>
+Inspection of all distributions in [tr.rand.dist] reveals that each distribution
+provides a second typedef ("result_type") that denotes the type of the values the
+distribution produces when called.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+It seems to me that this is also a requirement
+for all distributions and should therefore be indicated as such via a new second
+row to this table 17:
+</p>
+<table border="1" cellpadding="5">
+<tbody><tr><td>X::result_type</td><td>T</td><td>---</td><td>compile-time</td></tr>
+</tbody></table>
+
+<p><i>[
+Berlin: Voted to WP. N1932 adopts the proposed resolution: see Table 5 row 1.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="507"></a>507. Missing requirement for variate_generator::operator()</h3>
+<p><b>Section:</b> 26.4 [rand], TR1 5.1.3 [tr.rand.var] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Paragraph 11 of [tr.rand.var] equires that the member template
+</p>
+<blockquote><pre>template&lt;class T&gt; result_type operator() (T value);
+</pre></blockquote>
+<p>
+return
+</p>
+<blockquote><pre>distribution()(e, value)
+</pre></blockquote>
+<p>
+However, not all distributions have an operator() with a corresponding signature.
+</p>
+
+<p><i>[
+Berlin: As a working group we voted in favor of N1932 which makes this moot:
+variate_generator has been eliminated. Then in full committee we voted to give
+this issue WP status (mistakenly).
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+We therefore recommend that we insert the following precondition before paragraph 11:
+</p>
+<blockquote><p>
+Precondition: <tt>distribution().operator()(e,value)</tt> is well-formed.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="508"></a>508. Bad parameters for ranlux64_base_01</h3>
+<p><b>Section:</b> 26.4.5 [rand.predef], TR1 5.1.5 [tr.rand.predef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The fifth of these engines with predefined parameters, ranlux64_base_01,
+appears to have an unintentional error for which there is a simple correction.
+The two pre-defined subtract_with_carry_01 engines are given as:
+</p>
+<blockquote><pre>typedef subtract_with_carry_01&lt;float, 24, 10, 24&gt; ranlux_base_01;
+typedef subtract_with_carry_01&lt;double, 48, 10, 24&gt; ranlux64_base_01;
+</pre></blockquote>
+<p>
+We demonstrate below that ranlux64_base_01 fails to meet the intent of the
+random number generation proposal, but that the simple correction to
+</p>
+<blockquote><pre>typedef subtract_with_carry_01&lt;double, 48, 5, 12&gt; ranlux64_base_01;
+</pre></blockquote>
+<p>
+does meet the intent of defining well-known good parameterizations.
+</p>
+<p>
+The ranlux64_base_01 engine as presented fails to meet the intent for
+predefined engines, stated in proposal N1398 (section E):
+</p>
+<blockquote><p>
+In order to make good random numbers available to a large number of library
+users, this proposal not only defines generic random-number engines, but also
+provides a number of predefined well-known good parameterizations for those.
+</p></blockquote>
+<p>
+The predefined ranlux_base_01 engine has been proven [1,2,3] to have a very
+long period and so meets this criterion. This property makes it suitable for
+use in the excellent discard_block engines defined subsequently. The proof
+of long period relies on the fact (proven in [1]) that 2**(w*r) - 2**(w*s)
++ 1 is prime (w, r, and s are template parameters to subtract_with_carry_01,
+as defined in [tr.rand.eng.sub1]).
+</p>
+<p>
+The ranlux64_base_01 engine as presented in [tr.rand.predef] uses w=48, r=24, s=10.
+For these numbers, the combination 2**(w*r)-2**(w*s)+1 is non-prime (though
+explicit factorization would be a challenge). In consequence, while it is
+certainly possible for some seeding states that this engine would have a very
+long period, it is not at all "well-known" that this is the case. The intent
+in the N1398 proposal involved the base of the ranlux64 engine, which finds heavy
+use in the physics community. This is isomorphic to the predefined ranlux_base_01,
+but exploits the ability of double variables to hold (at least) 48 bits of mantissa,
+to deliver 48 random bits at a time rather than 24.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+To achieve this intended behavior, the correct template parameteriztion would be:
+</p>
+<blockquote><pre>typedef subtract_with_carry_01&lt;double, 48, 5, 12&gt; ranlux64_base_01;
+</pre></blockquote>
+<p>
+The sequence of mantissa bits delivered by this is isomorphic (treating each
+double as having the bits of two floats) to that delivered by ranlux_base_01.
+</p>
+<p>
+<b>References:</b>
+</p>
+<ol>
+<li>F. James, Comput. Phys. Commun. 60(1990) 329</li>
+<li>G. Marsaglia and A. Zaman, Ann. Appl. Prob 1(1991) 462</li>
+<li>M. Luscher, Comput. Phys. Commun. 79(1994) 100-110</li>
+</ol>
+
+<p><i>[
+Berlin: Voted to WP. N1932 adopts the proposed resolution in 26.3.5,
+just above paragraph 5.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="519"></a>519. Data() undocumented</h3>
+<p><b>Section:</b> 23.2.1 [array], TR1 6.2.2 [tr.array.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>array&lt;&gt;::data()</tt> is present in the class synopsis, but not documented.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add a new section, after 6.2.2.3:
+</p>
+<blockquote><pre>T* data()
+const T* data() const;
+</pre></blockquote>
+<p>
+<b>Returns:</b> <tt>elems</tt>.
+</p>
+<p>
+Change 6.2.2.4/2 to:
+</p>
+<blockquote><p>
+In the case where <tt>N == 0</tt>, <tt>begin() == end()</tt>. The return value
+of <tt>data()</tt> is unspecified.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="520"></a>520. Result_of and pointers to data members</h3>
+<p><b>Section:</b> 20.5.11.1 [func.bind], TR1 3.6 [tr.func.bind] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the original proposal for binders, the return type of bind() when
+called with a pointer to member data as it's callable object was
+defined to be mem_fn(ptr); when Peter Dimov and I unified the
+descriptions of the TR1 function objects we hoisted the descriptions
+of return types into the INVOKE pseudo-function and into result_of.
+Unfortunately, we left pointer to member data out of result_of, so
+bind doesn't have any specified behavior when called with a pointer
+to member data.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p><i>[
+Pete and Peter will provide wording.
+]</i></p>
+
+
+<p>
+In 20.5.4 [lib.func.ret] ([tr.func.ret]) p3 add the following bullet after bullet 2:
+</p>
+<ol start="3">
+<li>If <tt>F</tt> is a member data pointer type <tt>R T::*</tt>, <tt>type</tt>
+shall be <tt><i>cv</i> R&amp;</tt> when <tt>T1</tt> is <tt><i>cv</i> U1&amp;</tt>,
+<tt>R</tt> otherwise.</li>
+</ol>
+
+<p><i>[
+Peter provided wording.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="521"></a>521. Garbled requirements for argument_type in reference_wrapper</h3>
+<p><b>Section:</b> 20.5.5 [refwrap], TR1 2.1.2 [tr.util.refwrp.refwrp] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+2.1.2/3, second bullet item currently says that reference_wrapper&lt;T&gt; is
+derived from unary_function&lt;T, R&gt; if T is:
+</p>
+<blockquote><p>
+a pointer to member function type with cv-qualifier cv and no arguments;
+the type T1 is cv T* and R is the return type of the pointer to member function;
+</p></blockquote>
+<p>
+The type of T1 can't be cv T*, 'cause that's a pointer to a pointer to member
+function. It should be a pointer to the class that T is a pointer to member of.
+Like this:
+</p>
+<blockquote><p>
+a pointer to a member function R T0::f() cv (where cv represents the member
+function's cv-qualifiers); the type T1 is cv T0*
+</p></blockquote>
+<p>
+Similarly, bullet item 2 in 2.1.2/4 should be:
+</p>
+<blockquote><p>
+a pointer to a member function R T0::f(T2) cv (where cv represents the member
+function's cv-qualifiers); the type T1 is cv T0*
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p>
+Change bullet item 2 in 2.1.2/3:
+</p>
+
+<blockquote>
+<ul>
+<li>
+a pointer to member function <del>type with cv-qualifier <tt><i>cv</i></tt> and no arguments;
+the type <tt>T1</tt> is <tt><i>cv</i> T*</tt> and <tt>R</tt> is the return
+type of the pointer to member function</del> <ins><tt>R T0::f() <i>cv</i></tt>
+(where <tt><i>cv</i></tt> represents the member function's cv-qualifiers);
+the type <tt>T1</tt> is <tt><i>cv</i> T0*</tt></ins>
+</li>
+</ul>
+</blockquote>
+
+<p>
+Change bullet item 2 in 2.1.2/4:
+</p>
+
+<blockquote>
+<ul>
+<li>
+a pointer to member function <del>with cv-qualifier <tt><i>cv</i></tt> and taking one argument
+of type <tt>T2</tt>; the type <tt>T1</tt> is <tt><i>cv</i> T*</tt> and
+<tt>R</tt> is the return type of the pointer to member function</del>
+<ins><tt>R T0::f(T2) <i>cv</i></tt> (where <tt><i>cv</i></tt> represents the member
+function's cv-qualifiers); the type <tt>T1</tt> is <tt><i>cv</i> T0*</tt></ins>
+</li>
+</ul>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="524"></a>524. regex named character classes and case-insensitivity don't mix</h3>
+<p><b>Section:</b> 28 [re] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Eric Niebler <b>Date:</b> 2005-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re">issues</a> in [re].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+This defect is also being discussed on the Boost developers list. The
+full discussion can be found here:
+http://lists.boost.org/boost/2005/07/29546.php
+</p>
+<p>
+-- Begin original message --
+</p>
+<p>
+Also, I may have found another issue, closely related to the one under
+discussion. It regards case-insensitive matching of named character
+classes. The regex_traits&lt;&gt; provides two functions for working with
+named char classes: lookup_classname and isctype. To match a char class
+such as [[:alpha:]], you pass "alpha" to lookup_classname and get a
+bitmask. Later, you pass a char and the bitmask to isctype and get a
+bool yes/no answer.
+</p>
+<p>
+But how does case-insensitivity work in this scenario? Suppose we're
+doing a case-insensitive match on [[:lower:]]. It should behave as if it
+were [[:lower:][:upper:]], right? But there doesn't seem to be enough
+smarts in the regex_traits interface to do this.
+</p>
+<p>
+Imagine I write a traits class which recognizes [[:fubar:]], and the
+"fubar" char class happens to be case-sensitive. How is the regex engine
+to know that? And how should it do a case-insensitive match of a
+character against the [[:fubar:]] char class? John, can you confirm this
+is a legitimate problem?
+</p>
+<p>
+I see two options:
+</p>
+<p>
+1) Add a bool icase parameter to lookup_classname. Then,
+lookup_classname( "upper", true ) will know to return lower|upper
+instead of just upper.
+</p>
+<p>
+2) Add a isctype_nocase function
+</p>
+<p>
+I prefer (1) because the extra computation happens at the time the
+pattern is compiled rather than when it is executed.
+</p>
+<p>
+-- End original message --
+</p>
+
+<p>
+For what it's worth, John has also expressed his preference for option
+(1) above.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="530"></a>530. Must elements of a string be contiguous?</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2005-11-15</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69">69</a>, which was incorporated into C++03, mandated
+ that the elements of a vector must be stored in contiguous memory.
+ Should the same also apply to <tt>basic_string</tt>?</p>
+
+<p>We almost require contiguity already. Clause 23.3.4 [multiset]
+ defines <tt>operator[]</tt> as <tt>data()[pos]</tt>. What's missing
+ is a similar guarantee if we access the string's elements via the
+ iterator interface.</p>
+
+<p>Given the existence of <tt>data()</tt>, and the definition of
+ <tt>operator[]</tt> and <tt>at</tt> in terms of <tt>data</tt>,
+ I don't believe it's possible to write a useful and standard-
+ conforming <tt>basic_string</tt> that isn't contiguous. I'm not
+ aware of any non-contiguous implementation. We should just require
+ it.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>Add the following text to the end of 21.3 [basic.string],
+paragraph 2. </p>
+
+<blockquote>
+ <p>The characters in a string are stored contiguously, meaning that if
+ <tt>s</tt> is a <tt>basic_string&lt;charT, Allocator&gt;</tt>, then
+ it obeys the identity
+ <tt>&amp;*(s.begin() + n) == &amp;*s.begin() + n</tt>
+ for all <tt>0 &lt;= n &lt; s.size()</tt>.
+ </p>
+</blockquote>
+
+
+<p><b>Rationale:</b></p>
+<p>
+Not standardizing this existing practice does not give implementors more
+freedom. We thought it might a decade ago. But the vendors have spoken
+both with their implementations, and with their voice at the LWG
+meetings. The implementations are going to be contiguous no matter what
+the standard says. So the standard might as well give string clients
+more design choices.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="531"></a>531. array forms of unformatted input functions</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The array forms of unformatted input functions don't seem to have well-defined
+semantics for zero-element arrays in a couple of cases. The affected ones
+(<tt>istream::get()</tt> and <tt>istream::getline()</tt>) are supposed to
+terminate when <tt>(n - 1)</tt> characters are stored, which obviously can
+never be true when <tt>(n == 0)</tt> holds to start with. See
+c++std-lib-16071.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+I suggest changing 27.6.1.3, p7 (<tt>istream::get()</tt>), bullet 1 to read:
+</p>
+ <ul>
+ <li>
+ <tt>(n &lt; 1)</tt> is true or <tt>(n - 1)</tt> characters
+ are stored;
+ </li>
+ </ul>
+<p>
+Change 27.6.1.3, p9:
+</p>
+
+<blockquote><p>
+If the function stores no characters, it calls <tt>setstate(failbit)</tt> (which
+may throw <tt>ios_base::failure</tt> (27.4.4.3)). In any case, <ins>if <tt>(n
+&gt; 0)</tt> is true</ins> it then stores a null character into the next
+successive location of the array.
+</p></blockquote>
+
+ <p>
+
+and similarly p17 (<tt>istream::getline()</tt>), bullet 3 to:
+
+ </p>
+ <ul>
+ <li>
+ <tt>(n &lt; 1)</tt> is true or <tt>(n - 1)</tt> characters
+ are stored (in which case the function calls
+ <tt>setstate(failbit)</tt>).
+ </li>
+ </ul>
+
+ <p>
+
+In addition, to clarify that <tt>istream::getline()</tt> must not store the
+terminating NUL character unless the the array has non-zero size, Robert
+Klarer suggests in c++std-lib-16082 to change 27.6.1.3, p20 to read:
+
+ </p>
+ <blockquote><p>
+
+In any case, provided <tt>(n &gt; 0)</tt> is true, it then stores a null character
+(using charT()) into the next successive location of the array.
+
+ </p></blockquote>
+
+<p><i>[
+post-Redmond: Pete noticed that the current resolution for <tt>get</tt> requires
+writing to out of bounds memory when <tt>n == 0</tt>. Martin provided fix.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="533"></a>533. typo in 2.2.3.10/1</h3>
+<p><b>Section:</b> 20.6.6.2.11 [util.smartptr.getdeleter], TR1 2.2.3.10 [tr.util.smartptr.getdeleter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-11-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.getdeleter">issues</a> in [util.smartptr.getdeleter].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I'm seeing something that looks like a typo. The Return of <tt>get_deleter</tt>
+says:
+</p>
+<blockquote><p>
+If <tt>*this</tt> <i>owns</i> a deleter <tt>d</tt>...
+</p></blockquote>
+<p>
+but <tt>get_deleter</tt> is a free function!
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Therefore, I think should be:
+</p>
+<blockquote><p>
+If <tt><del>*this</del> <ins>p</ins></tt> <i>owns</i> a deleter <tt>d</tt>...
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="534"></a>534. Missing basic_string members</h3>
+<p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2005-11-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+OK, we all know std::basic_string is bloated and already has way too
+many members. However, I propose it is missing 3 useful members that
+are often expected by users believing it is a close approximation of the
+container concept. All 3 are listed in table 71 as 'optional'
+</p>
+
+<p>
+i/ pop_back.
+</p>
+
+<p>
+This is the one I feel most strongly about, as I only just discovered it
+was missing as we are switching to a more conforming standard library
+&lt;g&gt;
+</p>
+
+<p>
+I find it particularly inconsistent to support push_back, but not
+pop_back.
+</p>
+
+<p>
+ii/ back.
+</p>
+
+<p>
+There are certainly cases where I want to examine the last character of
+a string before deciding to append, or to trim trailing path separators
+from directory names etc. *rbegin() somehow feels inelegant.
+</p>
+
+<p>
+iii/ front
+</p>
+
+<p>
+This one I don't feel strongly about, but if I can get the first two,
+this one feels that it should be added as a 'me too' for consistency.
+</p>
+
+<p>
+I believe this would be similarly useful to the data() member recently
+added to vector, or at() member added to the maps.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following members to definition of class template basic_string, 21.3p7
+</p>
+<blockquote><pre>void pop_back ()
+
+const charT &amp; front() const
+charT &amp; front()
+
+const charT &amp; back() const
+charT &amp; back()
+</pre></blockquote>
+<p>
+Add the following paragraphs to basic_string description
+</p>
+
+<p>
+21.3.4p5
+</p>
+<blockquote>
+<pre>const charT &amp; front() const
+charT &amp; front()
+</pre>
+<p>
+<i>Precondition:</i> <tt>!empty()</tt>
+</p>
+<p>
+<i>Effects:</i> Equivalent to <tt>operator[](0)</tt>.
+</p>
+</blockquote>
+
+<p>
+21.3.4p6
+</p>
+<blockquote>
+<pre>const charT &amp; back() const
+charT &amp; back()
+</pre>
+<p>
+<i>Precondition:</i> <tt>!empty()</tt>
+</p>
+<p>
+<i>Effects:</i> Equivalent to <tt>operator[]( size() - 1)</tt>.
+</p>
+</blockquote>
+
+<p>
+21.3.5.5p10
+</p>
+<blockquote>
+<pre>void pop_back ()
+</pre>
+<p>
+<i>Precondition:</i> <tt>!empty()</tt>
+</p>
+<p>
+<i>Effects:</i> Equivalent to <tt>erase( size() - 1, 1 )</tt>.
+</p>
+</blockquote>
+
+<p>
+Update Table 71: (optional sequence operations)
+Add basic_string to the list of containers for the following operations.
+</p>
+<blockquote><pre>a.front()
+a.back()
+a.push_back()
+a.pop_back()
+a[n]
+</pre></blockquote>
+
+<p><i>[
+Berlin: Has support. Alisdair provided wording.
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="535"></a>535. std::string::swap specification poorly worded</h3>
+<p><b>Section:</b> 21.3.6.8 [string::swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2005-12-14</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::swap">issues</a> in [string::swap].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+std::string::swap currently says for effects and postcondition:
+</p>
+
+<blockquote>
+<p>
+<i>Effects:</i> Swaps the contents of the two strings.
+</p>
+
+<p>
+<i>Postcondition:</i> <tt>*this</tt> contains the characters that were in <tt><i>s</i></tt>,
+<tt><i>s</i></tt> contains the characters that were in <tt>*this</tt>.
+</p>
+</blockquote>
+
+<p>
+Specifying both Effects and Postcondition seems redundant, and the postcondition
+needs to be made stronger. Users would be unhappy if the characters were not in
+the same order after the swap.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<blockquote>
+<p>
+<del><i>Effects:</i> Swaps the contents of the two strings.</del>
+</p>
+
+<p>
+<i>Postcondition:</i> <tt>*this</tt> contains the <ins>same sequence of</ins>
+characters that <del>were</del> <ins>was</ins> in <tt><i>s</i></tt>,
+<tt><i>s</i></tt> contains the <ins>same sequence of</ins> characters that
+<del>were</del> <ins>was</ins> in <tt>*this</tt>.
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="537"></a>537. Typos in the signatures in 27.6.1.3/42-43 and 27.6.2.4</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-12</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the most recent working draft, I'm still seeing:
+</p>
+
+<blockquote><pre>seekg(off_type&amp; off, ios_base::seekdir dir)
+</pre></blockquote>
+
+<p>
+and
+</p>
+
+<blockquote><pre>seekp(pos_type&amp; pos)
+
+seekp(off_type&amp; off, ios_base::seekdir dir)
+</pre></blockquote>
+
+<p>
+that is, by reference off and pos arguments.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+After 27.6.1.3p42 change:
+</p>
+
+<blockquote><pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type<del>&amp;</del> <i>off</i>, ios_base::seekdir <i>dir</i>);
+</pre></blockquote>
+
+<p>
+After 27.6.2.4p1 change:
+</p>
+
+<blockquote><pre>basic_ostream&lt;charT,traits&gt;&amp; seekp(pos_type<del>&amp;</del> <i>pos</i>);
+</pre></blockquote>
+
+<p>
+After 27.6.2.4p3 change:
+</p>
+
+<blockquote><pre>basic_ostream&lt;charT,traits&gt;&amp; seekp(off_type<del>&amp;</del> <i>off</i>, ios_base::seekdir <i>dir</i>);
+</pre></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="538"></a>538. 241 again: Does unique_copy() require CopyConstructible and Assignable?</h3>
+<p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-02-09</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I believe I botched the resolution of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">
+241 "Does unique_copy() require CopyConstructible and Assignable?"</a> which now
+has WP status.
+</p>
+
+<p>
+This talks about <tt>unique_copy</tt> requirements and currently reads:
+</p>
+
+<blockquote><p>
+-5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and
+<tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt>
+shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt> shall
+be valid. If neither <tt>InputIterator</tt> nor <tt>OutputIterator</tt> meets the
+requirements of forward iterator then the value type of <tt>InputIterator</tt>
+must be CopyConstructible (20.1.3). Otherwise CopyConstructible is not required.
+</p></blockquote>
+
+<p>
+The problem (which Paolo discovered) is that when the iterators are at their
+most restrictive (<tt>InputIterator</tt>, <tt>OutputIterator</tt>), then we want
+<tt>InputIterator::value_type</tt> to be both <tt>CopyConstructible</tt> and
+<tt>CopyAssignable</tt> (for the most efficient implementation). However this
+proposed resolution only makes it clear that it is <tt>CopyConstructible</tt>,
+and that one can assign from <tt>*<i>first</i></tt> to <tt>*<i>result</i></tt>.
+This latter requirement does not necessarily imply that you can:
+</p>
+
+<blockquote><pre>*<i>first</i> = *<i>first</i>;
+</pre></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<blockquote><p>
+-5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and
+<tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt>
+shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt>
+shall
+be valid. If neither <tt>InputIterator</tt> nor <tt>OutputIterator</tt> meets the
+requirements of forward iterator then the <del>value type</del>
+<ins><tt>value_type</tt></ins> of <tt>InputIterator</tt>
+must be CopyConstructible (20.1.3) <ins>and Assignable</ins>.
+Otherwise CopyConstructible is not required.
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="540"></a>540. shared_ptr&lt;void&gt;::operator*()</h3>
+<p><b>Section:</b> 20.6.6.2.5 [util.smartptr.shared.obs], TR1 2.2.3.5 [tr.util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared.obs">issues</a> in [util.smartptr.shared.obs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+I'm trying to reconcile the note in tr.util.smartptr.shared.obs, p6
+that talks about the operator*() member function of shared_ptr:
+</p>
+
+<blockquote><p>
+ Notes: When T is void, attempting to instantiate this member function
+ renders the program ill-formed. [Note: Instantiating shared_ptr&lt;void&gt;
+ does not necessarily result in instantiating this member function.
+ --end note]
+</p></blockquote>
+
+<p>
+with the requirement in temp.inst, p1:
+</p>
+
+<blockquote><p>
+ The implicit instantiation of a class template specialization causes
+ the implicit instantiation of the declarations, but not of the
+ definitions...
+</p></blockquote>
+
+<p>
+I assume that what the note is really trying to say is that
+"instantiating shared_ptr&lt;void&gt; *must not* result in instantiating
+this member function." That is, that this function must not be
+declared a member of shared_ptr&lt;void&gt;. Is my interpretation
+correct?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 2.2.3.5p6
+</p>
+
+<blockquote><p>
+-6- <del><i>Notes:</i></del> When <tt>T</tt> is <tt>void</tt>, <del>attempting to instantiate
+this member function renders the program ill-formed. [<i>Note:</i>
+Instantiating <tt>shared_ptr&lt;void&gt;</tt> does not necessarily result in
+instantiating this member function. <i>--end note</i>]</del> <ins>it is
+unspecified whether this member function is declared or not, and if so, what its
+return type is, except that the declaration (although not necessarily the
+definition) of the function shall be well-formed.</ins>
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="541"></a>541. shared_ptr template assignment and void</h3>
+<p><b>Section:</b> 20.6.6.2 [util.smartptr.shared], TR1 2.2.3 [tr.util.smartptr.shared] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-16</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#util.smartptr.shared">active issues</a> in [util.smartptr.shared].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared">issues</a> in [util.smartptr.shared].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Is the void specialization of the template assignment operator taking
+a shared_ptr&lt;void&gt; as an argument supposed be well-formed?
+</p>
+<p>
+I.e., is this snippet well-formed:
+</p>
+<blockquote><pre>shared_ptr&lt;void&gt; p;
+p.operator=&lt;void&gt;(p);
+</pre></blockquote>
+
+<p>
+Gcc complains about auto_ptr&lt;void&gt;::operator*() returning a reference
+to void. I suspect it's because shared_ptr has two template assignment
+operators, one of which takes auto_ptr, and the auto_ptr template gets
+implicitly instantiated in the process of overload resolution.
+</p>
+
+<p>
+The only way I see around it is to do the same trick with auto_ptr&lt;void&gt;
+operator*() as with the same operator in shared_ptr&lt;void&gt;.
+</p>
+
+<p>
+PS Strangely enough, the EDG front end doesn't mind the code, even
+though in a small test case (below) I can reproduce the error with
+it as well.
+</p>
+
+<blockquote><pre>template &lt;class T&gt;
+struct A { T&amp; operator*() { return *(T*)0; } };
+
+template &lt;class T&gt;
+struct B {
+ void operator= (const B&amp;) { }
+ template &lt;class U&gt;
+ void operator= (const B&lt;U&gt;&amp;) { }
+ template &lt;class U&gt;
+ void operator= (const A&lt;U&gt;&amp;) { }
+};
+
+int main ()
+{
+ B&lt;void&gt; b;
+ b.operator=&lt;void&gt;(b);
+}
+</pre></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In [lib.memory] change:
+</p>
+<blockquote><pre>template&lt;class X&gt; class auto_ptr;
+<ins>template&lt;&gt; class auto_ptr&lt;void&gt;;</ins>
+</pre></blockquote>
+
+<p>
+In [lib.auto.ptr]/2 add the following before the last closing brace:
+</p>
+
+<blockquote><pre>template&lt;&gt; class auto_ptr&lt;void&gt;
+{
+public:
+ typedef void element_type;
+};
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="542"></a>542. shared_ptr observers</h3>
+<p><b>Section:</b> 20.6.6.2.5 [util.smartptr.shared.obs], TR1 2.2.3.5 [tr.util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-18</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared.obs">issues</a> in [util.smartptr.shared.obs].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Peter Dimov wrote:
+To: C++ libraries mailing list
+Message c++std-lib-15614
+[...]
+The intent is for both use_count() and unique() to work in a threaded environment.
+They are intrinsically prone to race conditions, but they never return garbage.
+</p>
+
+<p>
+This is a crucial piece of information that I really wish were
+captured in the text. Having this in a non-normative note would
+have made everything crystal clear to me and probably stopped
+me from ever starting this discussion :) Instead, the sentence
+in p12 "use only for debugging and testing purposes, not for
+production code" very strongly suggests that implementations
+can and even are encouraged to return garbage (when threads
+are involved) for performance reasons.
+</p>
+<p>
+How about adding an informative note along these lines:
+</p>
+<blockquote><p>
+ Note: Implementations are encouraged to provide well-defined
+ behavior for use_count() and unique() even in the presence of
+ multiple threads.
+</p></blockquote>
+<p>
+I don't necessarily insist on the exact wording, just that we
+capture the intent.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.6.6.2.5 [util.smartptr.shared.obs] p12:
+</p>
+<blockquote><p>
+[<i>Note:</i> <tt>use_count()</tt> is not necessarily efficient. <del>Use only for
+debugging and testing purposes, not for production code.</del> --<i>end note</i>]
+</p></blockquote>
+
+<p>
+Change 20.6.6.3.5 [util.smartptr.weak.obs] p3:
+</p>
+<blockquote><p>
+[<i>Note:</i> <tt>use_count()</tt> is not necessarily efficient. <del>Use only for
+debugging and testing purposes, not for production code.</del> --<i>end note</i>]
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="543"></a>543. valarray slice default constructor</h3>
+<p><b>Section:</b> 26.5.4 [class.slice] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2005-11-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+If one explicitly constructs a slice or glice with the default
+constructor, does the standard require this slice to have any usable
+state? It says "creates a slice which specifies no elements", which
+could be interpreted two ways:
+</p>
+<ol>
+<li>There are no elements to which the slice refers (i.e. undefined).</li>
+<li>The slice specifies an array with no elements in it (i.e. defined).</li>
+</ol>
+<p>
+Here is a bit of code to illustrate:
+</p>
+<blockquote><pre>#include &lt;iostream&gt;
+#include &lt;valarray&gt;
+
+int main()
+{
+ std::valarray&lt;int&gt; v(10);
+ std::valarray&lt;int&gt; v2 = v[std::slice()];
+ std::cout &lt;&lt; "v[slice()].size() = " &lt;&lt; v2.size() &lt;&lt; '\n';
+}
+</pre></blockquote>
+
+<p>
+Is the behavior undefined? Or should the output be:
+</p>
+
+<blockquote><pre>v[slice()].size() = 0
+</pre></blockquote>
+
+<p>
+There is a similar question and wording for gslice at 26.3.6.1p1.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+
+<p><i>[Martin suggests removing the second sentence in 26.5.4.1 [cons.slice] as well.]</i></p>
+
+
+<p>
+Change 26.5.4.1 [cons.slice]:
+</p>
+
+<blockquote><p>
+1 - <del>The default constructor for <tt>slice</tt> creates a <tt>slice</tt>
+which specifies no elements.</del> <ins>The default constructor is equivalent to
+<tt>slice(0, 0, 0)</tt>.</ins> A default constructor is provided only to permit
+the declaration of arrays of slices. The constructor with arguments for a slice
+takes a start, length, and stride parameter.
+</p></blockquote>
+
+<p>
+Change 26.5.6.1 [gslice.cons]:
+</p>
+
+<blockquote><p>
+1 - <del>The default constructor creates a <tt>gslice</tt> which specifies no
+elements.</del> <ins>The default constructor is equivalent to <tt>gslice(0,
+valarray&lt;size_t&gt;(), valarray&lt;size_t&gt;())</tt>.</ins> The constructor
+with arguments builds a <tt>gslice</tt> based on a specification of start,
+lengths, and strides, as explained in the previous section.
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="545"></a>545. When is a deleter deleted?</h3>
+<p><b>Section:</b> 20.6.6.2.11 [util.smartptr.getdeleter], TR1 2.2.3.2 [tr.util.smartptr.shared.dest] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.getdeleter">issues</a> in [util.smartptr.getdeleter].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The description of ~shared_ptr doesn't say when the shared_ptr's deleter, if
+any, is destroyed. In principle there are two possibilities: it is destroyed
+unconditionally whenever ~shared_ptr is executed (which, from an implementation
+standpoint, means that the deleter is copied whenever the shared_ptr is copied),
+or it is destroyed immediately after the owned pointer is destroyed (which, from
+an implementation standpoint, means that the deleter object is shared between
+instances). We should say which it is.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add after the first sentence of 20.6.6.2.11 [util.smartptr.getdeleter]/1:
+</p>
+<blockquote>
+<p>
+The returned pointer remains valid as long as there exists a <tt>shared_ptr</tt> instance
+that owns <tt><i>d</i></tt>.
+</p>
+<p>
+[<i>Note:</i> it is unspecified whether the pointer remains valid longer than that.
+This can happen if the implementation doesn't destroy the deleter until all
+<tt>weak_ptr</tt> instances in the ownership group are destroyed. <i>-- end note</i>]
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="551"></a>551. &lt;ccomplex&gt;</h3>
+<p><b>Section:</b> 26.3.11 [cmplxh], TR1 8.3 [tr.c99.cmplxh] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Previously xxx.h was parsable by C++. But in the case of C99's &lt;complex.h&gt;
+it isn't. Otherwise we could model it just like &lt;string.h&gt;, &lt;cstring&gt;, &lt;string&gt;:
+</p>
+
+<ul>
+<li>&lt;string&gt; : C++ API in namespace std</li>
+<li>&lt;cstring&gt; : C API in namespace std</li>
+<li>&lt;string.h&gt; : C API in global namespace</li>
+</ul>
+
+<p>
+In the case of C's complex, the C API won't compile in C++. So we have:
+</p>
+
+<ul>
+<li>&lt;complex&gt; : C++ API in namespace std</li>
+<li>&lt;ccomplex&gt; : ?</li>
+<li>&lt;complex.h&gt; : ?</li>
+</ul>
+
+<p>
+The ? can't refer to the C API. TR1 currently says:
+</p>
+
+<ul>
+<li>&lt;complex&gt; : C++ API in namespace std</li>
+<li>&lt;ccomplex&gt; : C++ API in namespace std</li>
+<li>&lt;complex.h&gt; : C++ API in global namespace</li>
+</ul>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 26.3.11 [cmplxh]:
+</p>
+
+<blockquote>
+<p>
+The header behaves as if it includes the header
+<tt>&lt;ccomplex&gt;</tt><ins>.</ins><del>, and provides sufficient using
+declarations to declare in the global namespace all function and type names
+declared or defined in the neader <tt>&lt;complex&gt;</tt>.</del>
+<ins>[<i>Note:</i> <tt>&lt;complex.h&gt;</tt> does not promote any interface
+into the global namespace as there is no C interface to promote. <i>--end
+note</i>]</ins>
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="552"></a>552. random_shuffle and its generator</h3>
+<p><b>Section:</b> 25.2.12 [alg.random.shuffle] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-01-25</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+...is specified to shuffle its range by calling swap but not how
+(or even that) it's supposed to use the RandomNumberGenerator
+argument passed to it.
+</p>
+<p>
+Shouldn't we require that the generator object actually be used
+by the algorithm to obtain a series of random numbers and specify
+how many times its operator() should be invoked by the algorithm?
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="559"></a>559. numeric_limits&lt;const T&gt;</h3>
+<p><b>Section:</b> 18.2.1 [limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-19</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#limits">issues</a> in [limits].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+18.2.1 [limits], p2 requires implementations to provide specializations of the
+<code>numeric_limits</code> template for each scalar type. While this
+could be interepreted to include cv-qualified forms of such types such
+an interepretation is not reflected in the synopsis of the
+<code>&lt;limits&gt;</code> header.
+
+ </p>
+ <p>
+
+The absence of specializations of the template on cv-qualified forms
+of fundamental types makes <code>numeric_limits</code> difficult to
+use in generic code where the constness (or volatility) of a type is
+not always immediately apparent. In such contexts, the primary
+template ends up being instantiated instead of the provided
+specialization, typically yielding unexpected behavior.
+
+ </p>
+ <p>
+
+Require that specializations of <code>numeric_limits</code> on
+cv-qualified fundamental types have the same semantics as those on the
+unqualifed forms of the same types.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+Add to the synopsis of the <code>&lt;limits&gt;</code> header,
+immediately below the declaration of the primary template, the
+following:
+</p>
+
+<pre>
+template &lt;class T&gt; class numeric_limits&lt;const T&gt;;
+template &lt;class T&gt; class numeric_limits&lt;volatile T&gt;;
+template &lt;class T&gt; class numeric_limits&lt;const volatile T&gt;;
+
+</pre>
+
+ <p>
+
+Add a new paragraph to the end of 18.2.1.1 [numeric.limits], with the following
+text:
+
+ </p>
+ <p>
+
+-new-para- The value of each member of a <code>numeric_limits</code>
+specialization on a cv-qualified T is equal to the value of the same
+member of <code>numeric_limits&lt;T&gt;</code>.
+
+ </p>
+
+<p><i>[
+Portland: Martin will clarify that user-defined types get cv-specializations
+automatically.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="566"></a>566. array forms of unformatted input function undefined for zero-element arrays</h3>
+<p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The array forms of unformatted input functions don't have well-defined
+semantics for zero-element arrays in a couple of cases. The affected
+ones (<tt>istream::get()</tt> and <tt>getline()</tt>) are supposed to
+terminate when <tt>(n - 1)</tt> characters are stored, which obviously
+can never be true when <tt>(n == 0)</tt> to start with.
+
+ </p>
+
+
+<p><b>Proposed resolution:</b></p>
+ <p>
+
+I propose the following changes (references are relative to the
+Working Draft (document N1804).
+
+ </p>
+ <p>
+
+Change 27.6.1.3, p8 (<tt>istream::get()</tt>), bullet 1 as follows:
+
+ </p>
+ <blockquote>
+ <p>
+
+<ins>if <tt>(n &lt; 1)</tt> is true or </ins> <tt>(n - 1)</tt>
+characters are stored;
+
+ </p>
+ </blockquote>
+ <p>
+
+Similarly, change 27.6.1.3, p18 (<tt>istream::getline()</tt>), bullet
+3 as follows:
+
+ </p>
+ <blockquote>
+ <p>
+
+<ins><tt>(n &lt; 1)</tt> is true or </ins><tt>(n - 1)</tt> characters
+are stored (in which case the function calls
+<tt>setstate(failbit)</tt>).
+
+ </p>
+ </blockquote>
+ <p>
+
+Finally, change p21 as follows:
+
+ </p>
+ <blockquote>
+ <p>
+
+In any case, <ins>provided <tt>(n &gt; 0)</tt> is true, </ins>it then
+stores a null character (using charT()) into the next successive
+location of the array.
+
+ </p>
+ </blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="575"></a>575. the specification of ~shared_ptr is MT-unfriendly, makes implementation assumptions</h3>
+<p><b>Section:</b> 20.6.6.2.2 [util.smartptr.shared.dest], TR1 2.2.3.2 [tr.util.smartptr.shared.dest] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2006-04-23</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+[tr.util.smartptr.shared.dest] says in its second bullet:
+</p>
+
+<p>
+"If *this shares ownership with another shared_ptr instance (use_count() &gt; 1),
+decrements that instance's use count."
+</p>
+
+<p>
+The problem with this formulation is that it presupposes the existence of an
+"use count" variable that can be decremented and that is part of the state of a
+shared_ptr instance (because of the "that instance's use count".)
+</p>
+
+<p>
+This is contrary to the spirit of the rest of the specification that carefully
+avoids to require an use count variable. Instead, use_count() is specified to
+return a value, a number of instances.
+</p>
+
+<p>
+In multithreaded code, the usual implicit assumption is that a shared variable
+should not be accessed by more than one thread without explicit synchronization,
+and by introducing the concept of an "use count" variable, the current wording
+implies that two shared_ptr instances that share ownership cannot be destroyed
+simultaneously.
+</p>
+
+<p>
+In addition, if we allow the interpretation that an use count variable is part
+of shared_ptr's state, this would lead to other undesirable consequences WRT
+multiple threads. For example,
+</p>
+
+<blockquote><pre>p1 = p2;
+</pre></blockquote>
+
+<p>
+would now visibly modify the state of p2, a "write" operation, requiring a lock.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the first two bullets of [lib.util.smartptr.shared.dest]/1 to:
+</p>
+
+<blockquote>
+<ul>
+<li>If <tt>*this</tt> is <i>empty</i> <ins>or shares ownership with another
+<tt>shared_ptr</tt> instance (<tt>use_count() &gt; 1</tt>)</ins>, there are no side effects.</li>
+<li><del>If <tt>*this</tt> <i>shares ownership</i> with another <tt>shared_ptr</tt> instance
+(<tt>use_count() &gt; 1</tt>), decrements that instance's use count.</del></li>
+</ul>
+</blockquote>
+
+<p>
+Add the following paragraph after [lib.util.smartptr.shared.dest]/1:
+</p>
+
+<blockquote><p>
+[<i>Note:</i> since the destruction of <tt>*this</tt> decreases the number of instances in
+<tt>*this</tt>'s ownership group by one, all <tt>shared_ptr</tt> instances that share ownership
+with <tt>*this</tt> will report an <tt>use_count()</tt> that is one lower than its previous value
+after <tt>*this</tt> is destroyed. <i>--end note</i>]
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="576"></a>576. find_first_of is overconstrained</h3>
+<p><b>Section:</b> 25.1.4 [alg.find.first.of] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Doug Gregor <b>Date:</b> 2006-04-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find.first.of">issues</a> in [alg.find.first.of].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 25.1.4 Find First [lib.alg.find.first], the two iterator type parameters to
+find_first_of are specified to require Forward Iterators, as follows:
+</p>
+
+<blockquote><pre>template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ ForwardIterator1
+ find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+template&lt;class ForwardIterator1, class ForwardIterator2,
+ class BinaryPredicate&gt;
+ForwardIterator1
+ find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ BinaryPredicate pred);
+</pre></blockquote>
+
+<p>
+However, ForwardIterator1 need not actually be a Forward Iterator; an Input
+Iterator suffices, because we do not need the multi-pass property of the Forward
+Iterator or a true reference.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the declarations of <tt>find_first_of</tt> to:
+</p>
+
+<blockquote><pre>template&lt;class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2&gt;
+ <del>ForwardIterator1</del><ins>InputIterator1</ins>
+ find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+template&lt;class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2,
+ class BinaryPredicate&gt;
+<del>ForwardIterator1</del><ins>InputIterator1</ins>
+ find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ BinaryPredicate pred);
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="577"></a>577. upper_bound(first, last, ...) cannot return last</h3>
+<p><b>Section:</b> 25.3.3.2 [upper.bound] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-05-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+ISO/IEC 14882:2003 says:
+</p>
+
+<blockquote>
+<p>
+25.3.3.2 upper_bound
+</p>
+<p>
+<i>Returns:</i> The furthermost iterator <tt>i</tt> in the range
+<tt>[<i>first</i>, <i>last</i>)</tt> such that
+for any iterator <tt>j</tt> in the range <tt>[<i>first</i>, i)</tt> the following corresponding
+conditions hold: <tt>!(value &lt; *j)</tt> or <tt><i>comp</i>(<i>value</i>, *j) == false</tt>.
+</p>
+</blockquote>
+
+<p>
+From the description above, upper_bound cannot return last, since it's
+not in the interval [first, last). This seems to be a typo, because if
+value is greater than or equal to any other values in the range, or if
+the range is empty, returning last seems to be the intended behaviour.
+The corresponding interval for lower_bound is also [first, last].
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change [lib.upper.bound]:
+</p>
+
+<blockquote>
+<p>
+<i>Returns:</i> The furthermost iterator <tt>i</tt> in the range
+<tt>[<i>first</i>, <i>last</i><del>)</del><ins>]</ins></tt> such that
+for any iterator <tt>j</tt> in the range <tt>[<i>first</i>, i)</tt> the following corresponding
+conditions hold: <tt>!(value &lt; *j)</tt> or <tt><i>comp</i>(<i>value</i>, *j) == false</tt>.
+</p>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="578"></a>578. purpose of hint to allocator::allocate()</h3>
+<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-05-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+The description of the allocator member function
+<code>allocate()</code> requires that the <i>hint</i> argument be
+either 0 or a value previously returned from <code>allocate()</code>.
+Footnote 227 further suggests that containers may pass the address of
+an adjacent element as this argument.
+
+ </p>
+ <p>
+
+I believe that either the footnote is wrong or the normative
+requirement that the argument be a value previously returned from a
+call to <code>allocate()</code> is wrong. The latter is supported by
+the resolution to issue 20-004 proposed in c++std-lib-3736 by Nathan
+Myers. In addition, the <i>hint</i> is an ordinary void* and not the
+<code>pointer</code> type returned by <code>allocate()</code>, with
+the two types potentially being incompatible and the requirement
+impossible to satisfy.
+
+ </p>
+ <p>
+
+See also c++std-lib-14323 for some more context on where this came up
+(again).
+
+ </p>
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+Remove the requirement in 20.6.1.1, p4 that the hint be a value
+previously returned from <code>allocate()</code>. Specifically, change
+the paragraph as follows:
+
+ </p>
+<p>
+<del><i>Requires</i>: <i>hint</i> either 0 or previously obtained from member
+<code>allocate</code> and not yet passed to member <code>deallocate</code>.
+The value hint may be used by an implementation to help improve performance
+<sup>223)</sup>.</del> <ins>[<i>Note:</i> The value <i>hint</i> may be used by an
+implementation to help improve performance. -- <i>end note</i>]</ins>
+</p>
+<blockquote><p>
+<del>[Footnote: <sup>223)</sup>In a container member function, the address of an
+adjacent element is often a good choice to pass for this argument.</del>
+</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="586"></a>586. string inserter not a formatted function</h3>
+<p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+ <p>
+
+Section and paragraph numbers in this paper are relative to the
+working draft document number N2009 from 4/21/2006.
+
+ </p>
+
+ <p>
+
+The <code>basic_string</code> extractor in 21.3.7.9, p1 is clearly
+required to behave as a formatted input function, as is the
+<code>std::getline()</code> overload for string described in p7.
+
+ </p>
+ <p>
+
+However, the <code>basic_string</code> inserter described in p5 of the
+same section has no such requirement. This has implications on how the
+operator responds to exceptions thrown from <code>xsputn()</code>
+(formatted output functions are required to set <code>badbit</code>
+and swallow the exception unless <code>badbit</code> is also set in
+<code>exceptions()</code>; the string inserter doesn't have any such
+requirement).
+
+ </p>
+ <p>
+
+I don't see anything in the spec for the string inserter that would
+justify requiring it to treat exceptions differently from all other
+similar operators. (If it did, I think it should be made this explicit
+by saying that the operator "does not behave as a formatted output
+function" as has been made customary by the adoption of the resolution
+of issue 60).
+
+ </p>
+
+
+ <p><b>Proposed resolution:</b></p>
+ <p>
+
+I propose to change the Effects clause in 21.3.7.9, p5, as follows:
+
+ </p>
+ <blockquote>
+ <p>
+
+<i>Effects</i>: <del>Begins by constructing a sentry object k as if k
+were constructed by typename <code>basic_ostream&lt;charT,
+traits&gt;::sentry k (os)</code>. If <code>bool(k)</code> is
+<code>true</code>, </del><ins>Behaves as a formatted output function
+(27.6.2.5.1). After constructing a <code>sentry</code> object, if
+this object returns <code>true</code> when converted to a value of
+type <code>bool</code>, determines padding as described in
+22.2.2.2.2</ins>, then inserts the resulting sequence of characters
+<code><i>seq</i></code> as if by calling <code>os.rdbuf()-&gt;sputn(seq ,
+n)</code>, where <code><i>n</i></code> is the larger of
+<code>os.width()</code> and <code>str.size()</code>; then calls
+<code>os.width(0)</code>. <del>If the call to sputn fails, calls
+<code>os.setstate(ios_base::failbit)</code>.</del>
+
+ </p>
+ </blockquote>
+ <p>
+
+This proposed resilution assumes the resolution of issue 394 (i.e.,
+that all formatted output functions are required to set
+<code>ios_base::badbit</code> in response to any kind of streambuf
+failure), and implicitly assumes that a return value of
+<code>sputn(seq, <i>n</i>)</code> other than <code><i>n</i></code>
+indicates a failure.
+
+ </p>
+
+
+
+
+<hr>
+<h3><a name="589"></a>589. Requirements on iterators of member template functions of containers</h3>
+<p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Peter Dimov <b>Date:</b> 2006-08-02</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a></p>
+<p><b>Discussion:</b></p>
+<p>
+There appears to be no requirements on the InputIterators used in sequences in 23.1.1 in
+terms of their value_type, and the requirements in 23.1.2 appear to be overly strict
+(requires InputIterator::value_type be the same type as the container's value_type).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 23.1.1 p3:
+</p>
+
+<blockquote><p>
+In Tables 82 and 83, <tt>X</tt> denotes a sequence class, <tt>a</tt> denotes a
+value of <tt>X</tt>, <tt>i</tt> and <tt>j</tt> denote iterators satisfying input
+iterator requirements <ins>and refer to elements <ins>implicitly
+convertible to</ins> <tt>value_type</tt></ins>, <tt>[i, j)</tt> denotes a valid
+range, <tt>n</tt> denotes a value of <tt>X::size_type</tt>, <tt>p</tt> denotes a
+valid iterator to <tt>a</tt>, <tt>q</tt> denotes a valid dereferenceable
+iterator to <tt>a</tt>, <tt>[q1, q2)</tt> denotes a valid range in <tt>a</tt>,
+and <tt>t</tt> denotes a value of <tt>X::value_type</tt>.
+</p></blockquote>
+
+<p>
+Change 23.1.2 p7:
+</p>
+
+<blockquote><p>
+In Table 84, <tt>X</tt> is an associative container class, <tt>a</tt> is a value
+of <tt>X</tt>, <tt>a_uniq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports
+unique keys, and <tt>a_eq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports
+multiple keys, <tt>i</tt> and <tt>j</tt> satisfy input iterator requirements and
+refer to elements <del>of</del> <ins>implicitly convertible to</ins>
+<tt>value_type</tt>, <tt>[i, j)</tt> is a valid range, <tt>p</tt> is a valid
+iterator to <tt>a</tt>, <tt>q</tt> is a valid dereferenceable iterator to
+<tt>a</tt>, <tt>[q1, q2)</tt> is a valid range in <tt>a</tt>, <tt>t</tt> is a
+value of <tt>X::value_type</tt>, <tt>k</tt> is a value of <tt>X::key_type</tt>
+and <tt>c</tt> is a value of type <tt>X::key_compare</tt>.
+</p></blockquote>
+
+
+
+<p><b>Rationale:</b></p>
+<p>
+Concepts will probably come in and rewrite this section anyway. But just in case it is
+easy to fix this up as a safety net and as a clear statement of intent.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="593"></a>593. __STDC_CONSTANT_MACROS</h3>
+<p><b>Section:</b> 18.3 [cstdint], TR1 8.22 [tr.c99.cstdint] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter Brown <b>Date:</b> 2006-08-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#cstdint">issues</a> in [cstdint].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Clause 18.3 of the current Working Paper (N2009) deals with the new C++ headers
+&lt;cstdint&gt; and &lt;stdint.h&gt;. These are of course based on the C99 header
+&lt;stdint.h&gt;, and were part of TR1.
+</p>
+
+<p>
+Per 18.3.1/1, these headers define a number of macros and function macros.
+While the WP does not mention __STDC_CONSTANT_MACROS in this context, C99
+footnotes do mention __STDC_CONSTANT_MACROS. Further, 18.3.1/2 states that "The
+header defines all ... macros the same as C99 subclause 7.18."
+</p>
+
+<p>
+Therefore, if I wish to have the above-referenced macros and function macros
+defined, must I #define __STDC_CONSTANT_MACROS before I #include &lt;cstdint&gt;, or
+does the C++ header define these macros/function macros unconditionally?
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+To put this issue to rest for C++0X, I propose the following addition to
+18.3.1/2 of the Working Paper N2009:
+</p>
+
+<blockquote><p>
+[Note: The macros defined by &lt;cstdint&gt; are provided unconditionally: in
+particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
+(mentioned in C99 footnotes 219, 220, and 222) play no role in C++. --end note]
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="598"></a>598. Decimal: Conversion to integral should truncate, not round.</h3>
+<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p>
+<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+
+<p>
+In a private email, Daniel writes:
+</p>
+<blockquote>
+<p>
+I would like to
+ask, what where the reason for the decision to
+define the semantics of the integral conversion of the decimal types, namely
+</p>
+<pre>"operator long long() const;
+
+ Returns: Returns the result of the
+conversion of *this to the type long long, as if
+performed by the expression llrounddXX(*this)."
+</pre>
+<p>
+where XX stands for either 32, 64, or 128,
+corresponding to the proper decimal type. The
+exact meaning of llrounddXX is not given in that
+paper, so I compared it to the corresponding
+definition given in C99, 2nd edition (ISO 9899), which says in 7.12.9.7 p. 2:
+</p>
+<p>
+"The lround and llround functions round their
+argument to the nearest integer value,
+rounding halfway cases away from zero, regardless
+of the current rounding direction. [..]"
+</p>
+<p>
+Now considering the fact that integral conversion
+of the usual floating-point types ("4.9
+Floating-integral conversions") has truncation
+semantic I wonder why this conversion behaviour
+has not been transferred for the decimal types.
+</p>
+</blockquote>
+<p>
+Robert comments:
+</p>
+<p>
+Also, there is a further error in the <b>Returns:</b> clause for converting <code>decimal::decimal128</code> to <code>long long</code>. It currently calls <code>llroundd64</code>, not <code>llroundd128</code>.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the <b>Returns:</b> clause in 3.2.2.4 to:
+</p>
+<blockquote><p>
+<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd32(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
+</p></blockquote>
+<p>
+Change the <b>Returns:</b> clause in 3.2.3.4 to:
+</p>
+<blockquote><p>
+<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd64(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
+</p></blockquote>
+<p>
+Change the <b>Returns:</b> clause in 3.2.4.4 to:
+</p>
+<blockquote><p>
+<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <del><code>llroundd64(*this)</code></del> <ins><code>llroundd128(*this)</code> while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
+</p></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="599"></a>599. Decimal: Say "octets" instead of "bytes."</h3>
+<p><b>Section:</b> TRDecimal 3.1 [trdec.types.encodings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Daniel writes in a private email:
+</p>
+
+<blockquote>
+<p>
+- 3.1 'Decimal type encodings' says in its note:
+</p>
+<pre>"this implies that
+sizeof(std::decimal::decimal32) == 4,
+sizeof(std::decimal::decimal64) == 8, and
+sizeof(std::decimal::decimal128) == 16."
+</pre>
+<p>
+This is a wrong assertion, because the definition
+of 'byte' in 1.7 'The C+ + memory model' of ISO
+14882 (2nd edition) does not specify that a byte
+must be necessarily 8 bits large, which would be
+necessary to compare with the specified bit sizes
+of the types decimal32, decimal64, and decimal128.
+</p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 3.1 as follows:
+</p>
+<blockquote>
+<p>
+The three decimal encoding formats defined in IEEE-754R correspond to the three decimal floating types as follows:
+</p>
+<ul>
+<li>
+decimal32 is a <em>decimal32</em> number, which is encoded in four consecutive <del>bytes</del> <ins>octets</ins> (32 bits)
+</li>
+<li>
+decimal64 is a <em>decimal64</em> number, which is encoded in eight consecutive <del>bytes</del> <ins>octets</ins> (64 bits)
+
+</li>
+<li>
+decimal128 is a <em>decimal128</em> number, which is encoded in 16 consecutive <del>bytes</del> <ins>octets</ins> (128 bits)
+</li>
+</ul>
+<p>
+<del>[<i>Note:</i> this implies that <code>sizeof(std::decimal::decimal32) == 4</code>, <code>sizeof(std::decimal::decimal64) == 8</code>, and <code>sizeof(std::decimal::decimal128) == 16</code>. <i>--end note</i>]</del>
+</p>
+</blockquote>
+
+
+
+
+<hr>
+<h3><a name="600"></a>600. Decimal: Wrong parameters for wcstod* functions</h3>
+<p><b>Section:</b> TRDecimal 3.9 [trdec.types.cwchar] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Daniel writes:
+</p>
+<blockquote><p>
+- 3.9.1 'Additions to &lt;cwchar&gt;' provides wrong
+signatures to the wcstod32, wcstod64, and
+wcstod128 functions ([the parameters have type pointer-to-] char instead of wchar_t).
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change "3.9.1 Additions to <code>&lt;cwchar&gt;</code> synopsis" to:
+</p>
+<pre> namespace std {
+ namespace decimal {
+ // 3.9.2 wcstod functions:
+ decimal32 wcstod32 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
+ decimal64 wcstod64 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
+ decimal128 wcstod128 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
+ }
+ }
+</pre>
+
+
+
+
+<hr>
+<h3><a name="601"></a>601. Decimal: numeric_limits typos</h3>
+<p><b>Section:</b> TRDecimal 3.3 [trdec.types.limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Daniel writes in a private email:
+</p>
+
+<blockquote>
+<p>
+- 3.3 'Additions to header &lt;limits&gt;' contains two
+errors in the specialisation of numeric_limits&lt;decimal::decimal128&gt;:
+</p>
+<ol>
+<li>The static member max() returns DEC128_MIN, this should be DEC128_MAX.</li>
+<li>The static member digits is assigned to 384,
+this should be 34 (Probably mixed up with the
+max. exponent for decimal::decimal64).</li>
+</ol>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In "3.3 Additions to header <code>&lt;limits&gt;</code>" change numeric_limits&lt;decimal::decimal128&gt; as follows:
+</p>
+<pre> template&lt;&gt; class numeric_limits&lt;decimal::decimal128&gt; {
+ public:
+ static const bool is_specialized = true;
+
+ static decimal::decimal128 min() throw() { return DEC128_MIN; }
+ static decimal::decimal128 max() throw() { return <del>DEC128_MIN;</del> <ins>DEC128_MAX;</ins> }
+
+ static const int digits = <del>384</del> <ins>34</ins>;
+ /* ... */
+</pre>
+
+
+
+
+<hr>
+<h3><a name="602"></a>602. Decimal: "generic floating type" not defined.</h3>
+<p><b>Section:</b> TRDecimal 3 [trdec.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types">issues</a> in [trdec.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The document uses the term "generic floating types," but defines it nowhere.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change the first paragraph of "3 Decimal floating-point types" as follows:
+</p>
+<blockquote><p>
+This Technical Report introduces three decimal floating-point types, named
+decimal32, decimal64, and decimal128. The set of values of type decimal32 is a
+subset of the set of values of type decimal64; the set of values of the type
+decimal64 is a subset of the set of values of the type decimal128. Support for
+decimal128 is optional. <ins>These types supplement the Standard C++ types
+<code>float</code>, <code>double</code>, and <code>long double</code>, which are
+collectively described as the <i>basic floating types</i></ins>.
+</p></blockquote>
+
+
+
+
+<hr>
+<h3><a name="603"></a>603. Decimal: Trivially simplifying decimal classes.</h3>
+<p><b>Section:</b> TRDecimal 3 [trdec.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-05-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types">issues</a> in [trdec.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>In c++std-lib-17198, Martin writes:</p>
+
+<blockquote><p>
+Each of the three classes proposed in the paper (decimal32, decimal64,
+and decimal128) explicitly declares and specifies the semantics of its
+copy constructor, copy assignment operator, and destructor. Since the
+semantics of all three functions are identical to the trivial versions
+implicitly generated by the compiler in the absence of any declarations
+it is safe to drop them from the spec. This change would make the
+proposed classes consistent with other similar classes already in the
+standard (e.g., std::complex).
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change "3.2.2 Class <code>decimal32</code>" as follows:
+</p>
+<pre> namespace std {
+ namespace decimal {
+ class decimal32 {
+ public:
+ // 3.2.2.1 construct/copy/destroy:
+ decimal32();
+ <del>decimal32(const decimal32 &amp; d32);</del>
+ <del>decimal32 &amp; operator=(const decimal32 &amp; d32);</del>
+ <del>~decimal32();</del>
+ /* ... */
+</pre>
+<p>
+Change "3.2.2.1 construct/copy/destroy" as follows:
+</p>
+<pre> decimal32();
+
+ Effects: Constructs an object of type decimal32 with the value 0;
+
+ <del>decimal32(const decimal32 &amp; d32);</del>
+ <del>decimal32 &amp; operator=(const decimal32 &amp; d32);</del>
+
+ <del>Effects: Copies an object of type decimal32.</del>
+
+ <del>~decimal32();</del>
+
+ <del>Effects: Destroys an object of type decimal32.</del>
+
+</pre>
+<p>
+Change "3.2.3 Class <code>decimal64</code>" as follows:
+</p>
+<pre> namespace std {
+ namespace decimal {
+ class decimal64 {
+ public:
+ // 3.2.3.1 construct/copy/destroy:
+ decimal64();
+ <del>decimal64(const decimal64 &amp; d64);</del>
+ <del>decimal64 &amp; operator=(const decimal64 &amp; d64);</del>
+ <del>~decimal64();</del>
+ /* ... */
+</pre>
+<p>
+Change "3.2.3.1 construct/copy/destroy" as follows:
+</p>
+<pre> decimal64();
+
+ Effects: Constructs an object of type decimal64 with the value 0;
+
+ <del>decimal64(const decimal64 &amp; d64);</del>
+ <del>decimal64 &amp; operator=(const decimal64 &amp; d64);</del>
+
+ <del>Effects: Copies an object of type decimal64.</del>
+
+ <del>~decimal64();</del>
+
+ <del>Effects: Destroys an object of type decimal64.</del>
+
+</pre>
+<p>
+Change "3.2.4 Class <code>decimal128</code>" as follows:
+</p>
+<pre> namespace std {
+ namespace decimal {
+ class decimal128 {
+ public:
+ // 3.2.4.1 construct/copy/destroy:
+ decimal128();
+ <del>decimal128(const decimal128 &amp; d128);</del>
+ <del>decimal128 &amp; operator=(const decimal128 &amp; d128);</del>
+ <del>~decimal128();</del>
+ /* ... */
+</pre>
+<p>
+Change "3.2.4.1 construct/copy/destroy" as follows:
+</p>
+<pre> decimal128();
+
+ Effects: Constructs an object of type decimal128 with the value 0;
+
+ <del>decimal128(const decimal128 &amp; d128);</del>
+ <del>decimal128 &amp; operator=(const decimal128 &amp; d128);</del>
+
+ <del>Effects: Copies an object of type decimal128.</del>
+
+ <del>~decimal128();</del>
+
+ <del>Effects: Destroys an object of type decimal128.</del>
+
+</pre>
+
+
+
+
+<hr>
+<h3><a name="604"></a>604. Decimal: Storing a reference to a facet unsafe.</h3>
+<p><b>Section:</b> TRDecimal 3 [trdec.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-05-28</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types">issues</a> in [trdec.types].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In c++std-lib-17197, Martin writes:
+</p>
+<blockquote><p>
+The extended_num_get and extended_num_put facets are designed
+to store a reference to a num_get or num_put facet which the
+extended facets delegate the parsing and formatting of types
+other than decimal. One form of the extended facet's ctor (the
+default ctor and the size_t overload) obtains the reference
+from the global C++ locale while the other form takes this
+reference as an argument.
+</p></blockquote>
+<blockquote><p>
+The problem with storing a reference to a facet in another
+object (as opposed to storing the locale object in which the
+facet is installed) is that doing so bypasses the reference
+counting mechanism designed to prevent a facet that is still
+being referenced (i.e., one that is still installed in some
+locale) from being destroyed when another locale that contains
+it is destroyed. Separating a facet reference from the locale
+it comes from van make it cumbersome (and in some cases might
+even make it impossible) for programs to prevent invalidating
+the reference. (The danger of this design is highlighted in
+the paper.)
+</p></blockquote>
+<blockquote><p>
+This problem could be easily avoided by having the extended
+facets store a copy of the locale from which they would extract
+the base facet either at construction time or when needed. To
+make it possible, the forms of ctors of the extended facets that
+take a reference to the base facet would need to be changed to
+take a locale argument instead.
+</p></blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1. Change the <code>extended_num_get</code> synopsis in 3.10.2 as follows:
+</p>
+<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
+
+ /* ... */
+
+ <del>// <i>const std::num_get&lt;charT, InputIterator&gt; &amp; <b>base</b></i>; <i><b>exposition only</b></i></del>
+ <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins>
+</pre>
+<p>
+2. Change the description of the above constructor in 3.10.2.1:
+</p>
+<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
+
+</pre>
+<blockquote>
+<p>
+<b>Effects:</b> Constructs an <code>extended_num_get</code> facet as if by:
+</p>
+<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0)
+ : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>)
+ { /* ... */ }
+
+</pre>
+<p>
+<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_get</code> facet.</del>
+</p>
+</blockquote>
+<p>
+3. Change the <b>Returns:</b> clause for <code>do_get(iter_type, iter_type, ios_base &amp;, ios_base::iostate &amp;, bool &amp;) const</code>, <i>et al</i> to
+</p>
+<blockquote><p>
+<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet&lt;std::num_get&lt;charT, InputIterator&gt; &gt;(<i>baseloc</i>)</ins>.get(<i>in</i>, <i>end</i>, <i>str</i>, <i>err</i>, <i>val</i>)</code>.
+</p></blockquote>
+<p>
+4. Change the <code>extended_num_put</code> synopsis in 3.10.3 as follows:
+</p>
+<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
+
+ /* ... */
+
+ <del>// <i>const std::num_put&lt;charT, OutputIterator&gt; &amp; <b>base</b></i>; <i><b>exposition only</b></i></del>
+ <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins>
+</pre>
+<p>
+5. Change the description of the above constructor in 3.10.3.1:
+</p>
+<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
+</pre>
+<blockquote>
+<p>
+<b>Effects:</b> Constructs an <code>extended_num_put</code> facet as if by:
+</p>
+<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0)
+ : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>)
+ { /* ... */ }
+
+</pre>
+<p>
+<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_put</code> facet.</del>
+</p>
+</blockquote>
+<p>
+6. Change the <b>Returns:</b> clause for <code>do_put(iter_type, ios_base &amp;, char_type, bool &amp;) const</code>, <i>et al</i> to
+</p>
+<blockquote><p>
+<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet&lt;std::num_put&lt;charT, OutputIterator&gt; &gt;(<i>baseloc</i>)</ins>.put(<i>s</i>, <i>f</i>, <i>fill</i>, <i>val</i>)</code>.
+</p></blockquote>
+
+<p><i>[
+Redmond: We would prefer to rename "extended" to "decimal".
+]</i></p>
+
+
+
+
+
+
+<hr>
+<h3><a name="605"></a>605. Decimal: &lt;decfloat.h&gt; doesn't live here anymore.</h3>
+<p><b>Section:</b> TRDecimal 3.4 [trdec.types.cdecfloat] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a>
+ <b>Submitter:</b> Robert Klarer <b>Date:</b> 2006-10-17</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In Berlin, WG14 decided to drop the &lt;decfloat.h&gt; header. The
+contents of that header have been moved into &lt;float.h&gt;. For the
+sake of C compatibility, we should make corresponding changes.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1. Change the heading of subclause 3.4, "Headers <code>&lt;cdecfloat&gt;</code> and <code>&lt;decfloat.h&gt;</code>" to "Additions to headers <code>&lt;cfloat&gt;</code> and <code>&lt;float.h&gt;</code>."
+</p>
+<p>
+2. Change the text of subclause 3.4 as follows:
+</p>
+<blockquote>
+<p>
+<del>The standard C++ headers <code>&lt;cfloat&gt;</code> and <code>&lt;float.h&gt;</code> define characteristics of the floating-point types <code>float</code>, <code>double</code>, and <code>long double</code>. Their contents remain unchanged by this Technical Report.</del>
+</p>
+<p>
+<del>Headers <code>&lt;cdecfloat&gt;</code> and <code>&lt;decfloat.h&gt;</code> define characteristics of the decimal floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code>&lt;decfloat.h&gt;</code> defines the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code>, for compatibilty with the C programming language.</del>
+</p>
+<p>
+<ins>The header <code>&lt;cfloat&gt;</code> is described in [tr.c99.cfloat]. The header <code>&lt;float.h&gt;</code>
+is described in [tr.c99.floath]. These headers are extended by this
+Technical Report to define characteristics of the decimal
+floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code>&lt;float.h&gt;</code> is extended to define the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code> for compatibility with the C programming language.</ins>
+</p>
+</blockquote>
+<p>
+3. Change the heading of subclause 3.4.1, "Header <code>&lt;cdecfloat&gt;</code> synopsis" to "Additions to header <code>&lt;cfloat&gt;</code> synopsis."
+</p>
+<p>
+4. Change the heading of subclause 3.4.2, "Header <code>&lt;decfloat.h&gt;</code> synopsis" to "Additions to header <code>&lt;float.h&gt;</code> synopsis."
+</p>
+<p>
+5. Change the contents of 3.4.2 as follows:
+</p>
+<pre> <del>#include &lt;cdecfloat&gt;</del>
+
+ // <i>C-compatibility convenience typedefs:</i>
+
+ typedef std::decimal::decimal32 _Decimal32;
+ typedef std::decimal::decimal64 _Decimal64;
+ typedef std::decimal::decimal128 _Decimal128;
+</pre>
+
+
+
+
+
+<hr>
+<h3><a name="607"></a>607. Concern about short seed vectors</h3>
+<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Charles Karney <b>Date:</b> 2006-10-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Short seed vectors of 32-bit quantities all result in different states. However
+this is not true of seed vectors of 16-bit (or smaller) quantities. For example
+these two seeds
+</p>
+
+<blockquote><pre>unsigned short seed = {1, 2, 3};
+unsigned short seed = {1, 2, 3, 0};
+</pre></blockquote>
+
+<p>
+both pack to
+</p>
+
+<blockquote><pre>unsigned seed = {0x20001, 0x3};
+</pre></blockquote>
+
+<p>
+yielding the same state.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="608"></a>608. Unclear seed_seq construction details</h3>
+<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Charles Karney <b>Date:</b> 2006-10-26</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 26.4.7.1 [rand.util.seedseq] /6, the order of packing the inputs into b and the
+treatment of signed quantities is unclear. Better to spell it out.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="609"></a>609. missing static const</h3>
+<p><b>Section:</b> 26.4.4.2 [rand.adapt.ibits], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Walter E. Brown <b>Date:</b> 2006-11-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In preparing N2111, an error on my part resulted in the omission of the
+following line from the template synopsis in the cited section:
+</p>
+
+<blockquote><pre>static const size_t word_size = w;
+</pre></blockquote>
+
+<p>
+(This same constant is found, for example, in 26.4.3.3 [rand.eng.sub].)
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the above declaration as the first line after the comment in [rand.adapt.ibits] p4:
+</p>
+
+<blockquote><pre>// engine characteristics
+<ins>static const size_t word_size = w;</ins>
+</pre></blockquote>
+
+<p>
+and accept my apologies for the oversight.
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="610"></a>610. Suggested non-normative note for C++0x</h3>
+<p><b>Section:</b> 20.5.15.2.1 [func.wrap.func.con], TR1 3.7.2.1 [tr.func.wrap.func.con] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Scott Meyers <b>Date:</b> 2006-11-02</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+My suggestion is that implementers of both tr1::function and its
+official C++0x successor be explicitly encouraged (but not required) to
+optimize for the cases mentioned above, i.e., function pointers and
+small function objects. They could do this by using a small internal
+buffer akin to the buffer used by implementations of the small string
+optimization. (That would make this the small functor optimization --
+SFO :-}) The form of this encouragement could be a note in the standard
+akin to footnote 214 of the current standard.
+</p>
+
+<p>
+Dave Abrahams notes:
+</p>
+
+<p>
+"shall not throw exceptions" should really be "nothing," both to be more
+grammatical and to be consistent with existing wording in the standard.
+</p>
+
+<p>
+Doug Gregor comments: I think this is a good idea. Currently, implementations of
+tr1::function are required to have non-throwing constructors and assignment
+operators when the target function object is a function pointer or a
+reference_wrapper. The common case, however, is for a tr1::function to store
+either an empty function object or a member pointer + an object pointer.
+</p>
+<p>
+The function implementation in the upcoming Boost 1.34.0 uses the
+"SFO", so that the function objects for typical bind expressions like
+</p>
+<blockquote><pre>bind(&amp;X::f, this, _1, _2, _3)
+</pre></blockquote>
+
+<p>
+do not require heap allocation when stored in a boost::function. I
+believe Dinkumware's implementation also performs this optimization.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Revise 20.5.14.2.1 p6 [func.wrap.func.con] to add a note as follows:
+</p>
+
+<blockquote>
+<p>
+<i>Throws:</i> shall not throw exceptions if <tt>f</tt>'s target is a function
+pointer or a function object passed via <tt>reference_wrapper</tt>. Otherwise,
+may throw <tt>bad_alloc</tt> or any exception thrown by the copy constructor of
+the stored function object.
+</p>
+<p>
+<ins><i>Note:</i> Implementations are encouraged to avoid the use of dynamically
+allocated memory for "small" function objects, e.g., where <tt>f</tt>'s target
+is an object holding only a pointer or reference to an object and a member
+function pointer (a "bound member function").</ins>
+</p>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="611"></a>611. Standard library templates and incomplete types</h3>
+<p><b>Section:</b> 17.4.3.6 [res.on.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nicola Musatti <b>Date:</b> 2006-11-13</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In the latest available draft standard
+(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
+§ 17.4.3.6 [res.on.functions] states:
+</p>
+
+<blockquote>
+<p>
+-1- In certain cases (replacement functions, handler functions, operations on
+types used to instantiate standard library template components), the C++
+Standard Library depends on components supplied by a C++ program. If these
+components do not meet their requirements, the Standard places no requirements
+on the implementation.
+</p>
+
+<p>
+-2- In particular, the effects are undefined in the following cases:
+</p>
+<p>
+[...]
+</p>
+<ul>
+<li>if an incomplete type (3.9) is used as a template argument when
+instantiating a template component. </li>
+</ul>
+</blockquote>
+
+<p>
+This is contradicted by § 20.6.6.2/2 [util.smartptr.shared] which
+states:
+</p>
+
+<blockquote>
+<p>
+[...]
+</p>
+
+<p>
+The template parameter <tt>T</tt> of <tt>shared_ptr</tt> may be an incomplete type.
+</p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Modify the last bullet of § 17.4.3.6/2 [res.on.functions] to allow for
+exceptions:
+</p>
+
+<blockquote>
+<ul>
+<li>if an incomplete type (3.9) is used as a template argument when
+instantiating a template component<ins>, unless specifically allowed for the
+component</ins>. </li>
+</ul>
+</blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="613"></a>613. max_digits10 missing from numeric_limits</h3>
+<p><b>Section:</b> 18.2.1.5 [numeric.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-11-20</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.special">issues</a> in [numeric.special].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 18.2.1.5 [numeric.special] starts out by saying that "All members shall be provided
+for all specializations."
+</p>
+<p>
+Then it goes on to show specializations for float and bool, where one member
+is missing (max_digits10).
+</p>
+
+<p>
+Maarten Kronenburg adds:
+</p>
+
+<p>
+I agree, just adding the comment that the exact number of decimal digits
+is digits * ln(radix) / ln(10), where probably this real number is
+rounded downward for digits10, and rounded upward for max_digits10
+(when radix=10, then digits10=max_digits10).
+Why not add this exact definition also to the standard, so the user
+knows what these numbers exactly mean.
+</p>
+
+<p>
+Howard adds:
+</p>
+
+<p>
+For reference, here are the correct formulas from
+<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf">N1822</a>:
+</p>
+
+<blockquote><pre>digits10 = floor((digits-1) * log10(2))
+max_digits10 = ceil((1 + digits) * log10(2))
+</pre></blockquote>
+
+<p>
+We are also missing a statement regarding for what specializations this member has meaning.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change and add after 18.2.1.2 [numeric.limits.members], p11:
+</p>
+
+<blockquote>
+<pre>static const int max_digits10;</pre>
+<blockquote>
+<p>
+-11- Number of base 10 digits required to ensure that values which
+differ <del>by only one epsilon</del> are always differentiated.
+</p>
+<p><ins>
+-12- Meaningful for all floating point types.
+</ins></p>
+</blockquote>
+</blockquote>
+
+<p>
+Change 18.2.1.5 [numeric.special], p2:
+</p>
+
+<blockquote><pre>template&lt;&gt; class numeric_limits&lt;float&gt; {
+public:
+ static const bool is_specialized = true;
+ ...
+ static const int digits10 = 6;
+ <ins>static const int max_digits10 = 9</ins>;
+ ...
+</pre></blockquote>
+
+<p>
+Change 18.2.1.5 [numeric.special], p3:
+</p>
+
+<blockquote><pre>template&lt;&gt; class numeric_limits&lt;bool&gt; {
+public:
+ static const bool is_specialized = true;
+ ...
+ static const int digits10 = 0;
+ <ins>static const int max_digits10 = 0</ins>;
+ ...
+</pre></blockquote>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="616"></a>616. missing 'typename' in ctype_byname</h3>
+<p><b>Section:</b> 22.2.1.2 [locale.ctype.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-16</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.byname">issues</a> in [locale.ctype.byname].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 22.2.1.2 defines the ctype_byname class template. It contains the
+line
+</p>
+
+<blockquote><pre>typedef ctype&lt;charT&gt;::mask mask;
+</pre></blockquote>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+as this is a dependent type, it should obviously be
+</p>
+
+<blockquote><pre>typedef <ins>typename</ins> ctype&lt;charT&gt;::mask mask;
+</pre></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="619"></a>619. Longjmp wording problem</h3>
+<p><b>Section:</b> 18.8 [support.runtime] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Lawrence Crowl <b>Date:</b> 2007-01-12</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The wording for <tt>longjmp</tt> is confusing.
+</p>
+<p>
+18.8 [support.runtime] -4- Other runtime support
+</p>
+<blockquote><p>
+The function signature <tt>longjmp(jmp_buf jbuf, int val)</tt> has more restricted
+behavior in this International Standard. If any automatic objects would
+be destroyed by a thrown exception transferring control to another
+(destination) point in the program, then a call to <tt>longjmp(jbuf, val)</tt> that
+the throw point that transfers control to the same (destination) point has
+undefined behavior.
+</p></blockquote>
+<p>
+Someone at Google thinks that should say "then a call to <tt>longjmp(jbuf, val)</tt>
+*at* the throw point that transfers control".
+</p>
+<p>
+Bill Gibbons thinks it should say something like "If any automatic objects
+would be destroyed by an exception thrown at the point of the longjmp and
+caught only at the point of the setjmp, the behavior is undefined."
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In general, accept Bill Gibbons' recommendation,
+but add "call" to indicate that the undefined behavior
+comes from the dynamic call, not from its presence in the code.
+In 18.8 [support.runtime] paragraph 4, change
+</p>
+
+<blockquote><p>
+The function signature <tt>longjmp(jmp_buf jbuf, int val)</tt> has more
+restricted behavior in this International Standard. <del>If any automatic
+objects would be destroyed by a thrown exception transferring control to another
+(destination) point in the program, then a call to <tt>longjmp(jbuf, val)</tt>
+that the throw point that transfers control to the same (destination) point has
+undefined behavior.</del> <ins>A <tt>setjmp</tt>/<tt>longjmp</tt> call pair has
+undefined behavior if replacing the <tt>setjmp</tt> and <tt>longjmp</tt> by
+<tt>catch</tt> and <tt>throw</tt> would destroy any automatic objects.</ins>
+</p></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="628"></a>628. Inconsistent definition of basic_regex constructor</h3>
+<p><b>Section:</b> 28.8 [re.regex] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-01-23</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.regex">issues</a> in [re.regex].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 28.8 [re.regex] lists a constructor
+</p>
+
+<blockquote><pre>template&lt;class InputIterator&gt;
+basic_regex(InputIterator first, InputIterator last,
+ flag_type f = regex_constants::ECMAScript);
+</pre></blockquote>
+
+<p>
+However, in section 28.8.2 [re.regex.construct], this constructor takes a
+pair of <tt>ForwardIterator</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 28.8.2 [re.regex.construct]:
+</p>
+
+<blockquote><pre>template &lt;class <del>ForwardIterator</del> <ins>InputIterator</ins>&gt;
+ basic_regex(<del>ForwardIterator</del> <ins>InputIterator</ins> first, <del>ForwardIterator</del> <ins>InputIterator</ins> last,
+ flag_type f = regex_constants::ECMAScript);
+</pre></blockquote>
+
+
+
+
+
+
+<hr>
+<h3><a name="634"></a>634. <tt>allocator.address()</tt> doesn't work for types overloading <tt>operator&amp;</tt></h3>
+<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-02-07</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a></p>
+<p><b>Discussion:</b></p>
+
+<p>
+20.6.1.1 [allocator.members] says:
+</p>
+<blockquote>
+<pre>pointer address(reference <i>x</i>) const;</pre>
+<blockquote>
+<p>
+-1- <i>Returns:</i> <tt>&amp;<i>x</i></tt>.
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+20.6.1.1 [allocator.members] defines <tt>CopyConstructible</tt> which currently not
+only defines the semantics of copy construction, but also restricts what an overloaded
+<tt>operator&amp;</tt> may do. I believe proposals are in the works (such as concepts
+and rvalue reference) to decouple these two requirements. Indeed it is not evident
+that we should disallow overloading <tt>operator&amp;</tt> to return something other
+than the address of <tt>*this</tt>.
+</p>
+
+<p>
+An example of when you want to overload <tt>operator&amp;</tt> to return something
+other than the object's address is proxy references such as <tt>vector&lt;bool&gt;</tt>
+(or its replacement, currently code-named <tt>bit_vector</tt>). Taking the address of
+such a proxy reference should logically yield a proxy pointer, which when dereferenced,
+yields a copy of the original proxy reference again.
+</p>
+
+<p>
+On the other hand, some code truly needs the address of an object, and not a proxy
+(typically for determining the identity of an object compared to a reference object).
+<a href="http://www.boost.org/">boost</a> has long recognized this dilemma and solved it with
+<a href="http://www.boost.org/libs/utility/utility.htm#addressof"><tt>boost::addressof</tt></a>.
+It appears to me that this would be useful functionality for the default allocator. Adopting
+this definition for <tt>allocator::address</tt> would free the standard of requiring
+anything special from types which overload <tt>operator&amp;</tt>. Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>
+is expected to make use of <tt>allocator::address</tt> mandatory for containers.
+</p>
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.6.1.1 [allocator.members]:
+</p>
+
+<blockquote>
+<pre>pointer address(reference <i>x</i>) const;</pre>
+<blockquote>
+<p>
+-1- <i>Returns:</i> <del><tt>&amp;<i>x</i></tt>.</del> <ins>The actual address of object referenced by <i>x</i>,
+even in the presence of an overloaded <tt>operator&amp;</tt>.</ins>
+</p>
+</blockquote>
+
+<pre>const_pointer address(address(const_reference <i>x</i>) const;</pre>
+<blockquote>
+<p>
+-2- <i>Returns:</i> <del><tt>&amp;<i>x</i></tt>.</del> <ins>The actual address of object referenced by <i>x</i>,
+even in the presence of an overloaded <tt>operator&amp;</tt>.</ins>
+</p>
+</blockquote>
+</blockquote>
+
+<p><i>[
+post Oxford: This would be rendered NAD Editorial by acceptance of
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>.
+]</i></p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2387 for this issue which
+was subsequently split out into a separate paper N2436 for the purposes of voting.
+The resolution in N2436 addresses this issue. The LWG voted to accelerate this
+issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+
+
+<hr>
+<h3><a name="640"></a>640. 27.6.2.5.2 does not handle (unsigned) long long</h3>
+<p><b>Section:</b> 27.6.2.6.2 [ostream.inserters.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.arithmetic">issues</a> in [ostream.inserters.arithmetic].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The arithmetic inserters are described in 27.6.2.6.2 [ostream.inserters.arithmetic].
+Although the section starts with a listing of the inserters including
+the new ones:
+</p>
+
+<blockquote><pre>operator&lt;&lt;(long long val );
+operator&lt;&lt;(unsigned long long val );
+</pre></blockquote>
+
+<p>
+the text in paragraph 1, which describes the corresponding effects
+of the inserters, depending on the actual type of val, does not
+handle the types <tt>long long</tt> and <tt>unsigned long long</tt>.
+</p>
+
+<p><i>[
+Alisdair: In addition to the (unsigned) long long problem, that whole paragraph
+misses any reference to extended integral types supplied by the
+implementation - one of the additions by core a couple of working papers
+back.
+]</i></p>
+
+
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.6.2.6.2 [ostream.inserters.arithmetic]/1 change the third sentence
+</p>
+
+<blockquote>
+When val is of type <tt>bool</tt>, <tt>long</tt>, <tt>unsigned
+long</tt>, <ins>long long, unsigned long long,</ins> <tt>double</tt>,
+<tt>long double</tt>, or <tt>const void*</tt>, the formatting conversion
+occurs as if it performed the following code fragment:
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="643"></a>643. Impossible "as if" clauses</h3>
+<p><b>Section:</b> 27.8.1.1 [filebuf], 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The current standard 14882:2003(E) as well as N2134 have the
+following
+defects:
+</p>
+
+<p>
+27.8.1.1 [filebuf]/5 says:
+</p>
+
+<blockquote>
+<p>
+In order to support file I/O and multibyte/wide character conversion, conversions are performed using members of a
+facet, referred to as <tt><i>a_codecvt</i></tt> in following sections, obtained "as if" by
+</p>
+<blockquote><pre>codecvt&lt;charT,char,typename traits::state_type&gt; <i>a_codecvt</i> =
+ use_facet&lt;codecvt&lt;charT,char,typename traits::state_type&gt; &gt;(getloc());
+</pre></blockquote>
+</blockquote>
+
+<p>
+<tt>use_facet</tt> returns a <tt>const facet</tt> reference and no facet is
+copyconstructible, so the codecvt construction should fail to compile.
+</p>
+
+<p>
+A similar issue arises in 22.2.2.2.2 [facet.num.put.virtuals]/15 for <tt>num_punct</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+In 27.8.1.1 [filebuf]/5 change the "as if" code
+</p>
+
+<blockquote><pre><ins>const </ins>codecvt&lt;charT,char,typename traits::state_type&gt;<ins>&amp;</ins> <i>a_codecvt</i> =
+ use_facet&lt;codecvt&lt;charT,char,typename traits::state_type&gt; &gt;(getloc());
+</pre></blockquote>
+
+<p>
+In 22.2.2.2.2 [facet.num.put.virtuals]/15 (This is para 5 in N2134) change
+</p>
+
+<blockquote>
+<p>
+A local variable <tt><i>punct</i></tt> is initialized via
+</p>
+<blockquote><pre><ins>const </ins>numpunct&lt;charT&gt;<ins>&amp;</ins> <i>punct</i> = use_facet&lt; numpunct&lt;charT&gt; &gt;(<i>str</i>.getloc() )<ins>;</ins>
+</pre></blockquote>
+</blockquote>
+
+<p>
+(Please note also the additional provided trailing semicolon)
+</p>
+
+
+
+
+
+
+<hr>
+<h3><a name="644"></a>644. Possible typos in 'function' description</h3>
+<p><b>Section:</b> X [func.wrap.func.undef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-25</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+X [func.wrap.func.undef]
+</p>
+<p>
+The note in paragraph 2 refers to 'undefined void operators', while the
+section declares a pair of operators returning bool.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Change 20.5.15.2 [func.wrap.func]
+</p>
+
+<blockquote><pre>...
+private:
+ // X [func.wrap.func.undef], undefined operators:
+ template&lt;class Function2&gt; <del>bool</del> <ins>void</ins> operator==(const function&lt;Function2&gt;&amp;);
+ template&lt;class Function2&gt; <del>bool</del> <ins>void</ins> operator!=(const function&lt;Function2&gt;&amp;);
+};
+</pre></blockquote>
+
+<p>
+Change X [func.wrap.func.undef]
+</p>
+
+<blockquote><pre>template&lt;class Function2&gt; <del>bool</del> <ins>void</ins> operator==(const function&lt;Function2&gt;&amp;);
+template&lt;class Function2&gt; <del>bool</del> <ins>void</ins> operator!=(const function&lt;Function2&gt;&amp;);
+</pre></blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="646"></a>646. const incorrect match_result members</h3>
+<p><b>Section:</b> 28.10.4 [re.results.form] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+28.10.4 [re.results.form] (root and para 3) in N2134 defines the two function template
+members format as non-const functions, although they are declared
+as const in 28.10 [re.results]/3.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the missing <tt>const</tt> specifier to both <tt>format</tt> overloads described
+in section 28.10.4 [re.results.form].
+</p>
+
+
+
+
+
+<hr>
+<h3><a name="650"></a>650. regex_token_iterator and const correctness</h3>
+<p><b>Section:</b> 28.12.2 [re.tokiter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter">issues</a> in [re.tokiter].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Both the class definition of regex_token_iterator (28.12.2
+[re.tokiter]/6) and the latter member specifications (28.12.2.2
+[re.tokiter.comp]/1+2) declare both comparison operators as
+non-const functions. Furtheron, both dereference operators are
+unexpectedly also declared as non-const in 28.12.2 [re.tokiter]/6
+as well as in (28.12.2.3 [re.tokiter.deref]/1+2).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1) In (28.12.2 [re.tokiter]/6) change the current declarations
+</p>
+
+<blockquote><pre>bool operator==(const regex_token_iterator&amp;) <ins>const</ins>;
+bool operator!=(const regex_token_iterator&amp;) <ins>const</ins>;
+const value_type&amp; operator*() <ins>const</ins>;
+const value_type* operator-&gt;() <ins>const</ins>;
+</pre></blockquote>
+
+<p>
+2) In 28.12.2.2 [re.tokiter.comp] change the following declarations
+</p>
+
+<blockquote><pre>bool operator==(const regex_token_iterator&amp; right) <ins>const</ins>;
+bool operator!=(const regex_token_iterator&amp; right) <ins>const</ins>;
+</pre></blockquote>
+
+<p>
+3) In 28.12.2.3 [re.tokiter.deref] change the following declarations
+</p>
+
+<blockquote><pre>const value_type&amp; operator*() <ins>const</ins>;
+const value_type* operator-&gt;() <ins>const</ins>;
+</pre></blockquote>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue (which
+is to adopt the proposed wording in this issue).
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="651"></a>651. Missing preconditions for regex_token_iterator c'tors</h3>
+<p><b>Section:</b> 28.12.2.1 [re.tokiter.cnstr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter.cnstr">issues</a> in [re.tokiter.cnstr].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+The text provided in 28.12.2.1 [re.tokiter.cnstr]/2+3 describes
+the effects of the three non-default constructors of class
+template regex_token_iterator but is does not clarify which values
+are legal values for submatch/submatches. This becomes
+an issue, if one takes 28.12.2 [re.tokiter]/9 into account, which explains
+the notion of a "current match" by saying:
+</p>
+
+<blockquote><p>
+The <i>current match</i> is <tt>(*position).prefix()</tt> if <tt>subs[N]
+== -1</tt>, or <tt>(*position)[subs[N]]</tt> for any other value of
+<tt>subs[N]</tt>.
+</p></blockquote>
+
+<p>
+It's not clear to me, whether other negative values except -1
+are legal arguments or not - it seems they are not.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Add the following precondition paragraph just before the current
+28.12.2.1 [re.tokiter.cnstr]/2:
+</p>
+
+<blockquote><p>
+<i>Requires:</i> Each of the initialization values of <tt>subs</tt> must be <tt>&gt;= -1</tt>.
+</p></blockquote>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue (which
+is to adopt the proposed wording in this issue).
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="652"></a>652. regex_iterator and const correctness</h3>
+<p><b>Section:</b> 28.12.1 [re.regiter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Both the class definition of regex_iterator (28.12.1 [re.regiter]/1)
+and the latter member specification (28.12.1.2 [re.regiter.comp]/1+2)
+declare both comparison operators as
+non-const functions. Furtheron, both dereference operators are
+unexpectedly also declared as non-const in 28.12.1 [re.regiter]/1
+as well as in (28.12.1.3 [re.regiter.deref]/1+2).
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+1) In (28.12.1 [re.regiter]/1) change the current declarations
+</p>
+
+<blockquote><pre>bool operator==(const regex_iterator&amp;) <ins>const</ins>;
+bool operator!=(const regex_iterator&amp;) <ins>const</ins>;
+const value_type&amp; operator*() <ins>const</ins>;
+const value_type* operator-&gt;() <ins>const</ins>;
+</pre></blockquote>
+
+<p>
+2) In 28.12.1.3 [re.regiter.deref] change the following declarations
+</p>
+
+<blockquote><pre>const value_type&amp; operator*() <ins>const</ins>;
+const value_type* operator-&gt;() <ins>const</ins>;
+</pre></blockquote>
+
+<p>
+3) In 28.12.1.2 [re.regiter.comp] change the following declarations
+</p>
+
+<blockquote><pre>bool operator==(const regex_iterator&amp; right) <ins>const</ins>;
+bool operator!=(const regex_iterator&amp; right) <ins>const</ins>;
+</pre></blockquote>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue (which
+is to adopt the proposed wording in this issue).
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="654"></a>654. Missing IO roundtrip for random number engines</h3>
+<p><b>Section:</b> 26.4.1.3 [rand.req.eng] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req.eng">issues</a> in [rand.req.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Table 98 and para 5 in 26.4.1.3 [rand.req.eng] specify
+the IO insertion and extraction semantic of random
+number engines. It can be shown, v.i., that the specification
+of the extractor cannot guarantee to fulfill the requirement
+from para 5:
+</p>
+
+<blockquote><p>
+If a textual representation written via os &lt;&lt; x was
+subsequently read via is &gt;&gt; v, then x == v provided that
+there have been no intervening invocations of x or of v.
+</p></blockquote>
+
+<p>
+The problem is, that the extraction process described in
+table 98 misses to specify that it will initially set the
+if.fmtflags to ios_base::dec, see table 104:
+</p>
+
+<blockquote><p>
+dec: converts integer input or generates integer output
+in decimal base
+</p></blockquote>
+
+<p>
+Proof: The following small program demonstrates the violation
+of requirements (exception safety not fulfilled):
+</p>
+
+<blockquote><pre>#include &lt;cassert&gt;
+#include &lt;ostream&gt;
+#include &lt;iostream&gt;
+#include &lt;iomanip&gt;
+#include &lt;sstream&gt;
+
+class RanNumEngine {
+ int state;
+public:
+ RanNumEngine() : state(42) {}
+
+ bool operator==(RanNumEngine other) const {
+ return state == other.state;
+ }
+
+ template &lt;typename Ch, typename Tr&gt;
+ friend std::basic_ostream&lt;Ch, Tr&gt;&amp; operator&lt;&lt;(std::basic_ostream&lt;Ch, Tr&gt;&amp; os, RanNumEngine engine) {
+ Ch old = os.fill(os.widen(' ')); // Sets space character
+ std::ios_base::fmtflags f = os.flags();
+ os &lt;&lt; std::dec &lt;&lt; std::left &lt;&lt; engine.state; // Adds ios_base::dec|ios_base::left
+ os.fill(old); // Undo
+ os.flags(f);
+ return os;
+ }
+
+ template &lt;typename Ch, typename Tr&gt;
+ friend std::basic_istream&lt;Ch, Tr&gt;&amp; operator&gt;&gt;(std::basic_istream&lt;Ch, Tr&gt;&amp; is, RanNumEngine&amp; engine) {
+ // Uncomment only for the fix.
+
+ //std::ios_base::fmtflags f = is.flags();
+ //is &gt;&gt; std::dec;
+ is &gt;&gt; engine.state;
+ //is.flags(f);
+ return is;
+ }
+};
+
+int main() {
+ std::stringstream s;
+ s &lt;&lt; std::setfill('#'); // No problem
+ s &lt;&lt; std::oct; // Yikes!
+ // Here starts para 5 requirements:
+ RanNumEngine x;
+ s &lt;&lt; x;
+ RanNumEngine v;
+ s &gt;&gt; v;
+ assert(x == v); // Fails: 42 == 34
+}
+</pre></blockquote>
+
+<p>
+A second, minor issue seems to be, that the insertion
+description from table 98 unnecessarily requires the
+addition of ios_base::fixed (which only influences floating-point
+numbers). Its not entirely clear to me whether the proposed
+standard does require that the state of random number engines
+is stored in integral types or not, but I have the impression
+that this is the indent, see e.g. p. 3
+</p>
+
+<blockquote><p>
+The specification of each random number engine defines the
+size of its state in multiples of the size of its result_type.
+</p></blockquote>
+
+<p>
+If other types than integrals are supported, then I wonder why
+no requirements are specified for the precision of the stream.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="655"></a>655. Signature of generate_canonical not useful</h3>
+<p><b>Section:</b> 26.4.7.2 [rand.util.canonical] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.canonical">issues</a> in [rand.util.canonical].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 26.4.2 [rand.synopsis] we have the declaration
+</p>
+
+<blockquote><pre>template&lt;class RealType, class UniformRandomNumberGenerator,
+ size_t bits&gt;
+result_type generate_canonical(UniformRandomNumberGenerator&amp; g);
+</pre></blockquote>
+
+<p>
+Besides the "result_type" issue (already recognized by Bo Persson
+at Sun, 11 Feb 2007 05:26:47 GMT in this group) it's clear, that
+the template parameter order is not reasonably choosen: Obviously
+one always needs to specify all three parameters, although usually
+only two are required, namely the result type RealType and the
+wanted bits, because UniformRandomNumberGenerator can usually
+be deduced.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="660"></a>660. Missing Bitwise Operations</h3>
+<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-04-02</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>Section 20.5 [function.objects] provides <span id="st" name="st" class="st">function</span>
+<span id="st" name="st" class="st">objects</span> for some unary and binary
+operations, but others are missing. In a LWG reflector discussion, beginning
+with c++std-lib-18078, pros and cons of adding some of the missing operations
+were discussed. Bjarne Stroustrup commented "Why standardize what isn't used?
+Yes, I see the chicken and egg problems here, but it would be nice to see a
+couple of genuine uses before making additions."</p>
+<p>A number of libraries, including Rogue Wave, GNU, Adobe ASL, and Boost, have
+already added these functions, either publicly or for internal use. For example,
+Doug Gregor commented: "Boost will also add ... (|, &amp;, ^) in 1.35.0, because we
+need those <span id="st" name="st" class="st">function</span>
+<span id="st" name="st" class="st">objects</span> to represent various parallel
+collective operations (reductions, prefix reductions, etc.) in the new Message
+Passing Interface (MPI) library."</p>
+<p>Because the bitwise operators have the strongest use cases, the proposed
+resolution is limited to them.</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>To 20.5 [function.objects], Function objects, paragraph 2, add to the header
+&lt;functional&gt; synopsis:</p>
+<blockquote>
+ <pre>template &lt;class T&gt; struct bit_and;
+template &lt;class T&gt; struct bit_or;
+template &lt;class T&gt; struct bit_xor;</pre>
+</blockquote>
+<p>At a location in clause 20 to be determined by the Project Editor, add:</p>
+<blockquote>
+ <p>The library provides basic function object classes for all of the bitwise
+ operators in the language ([expr.bit.and], [expr.or], [exp.xor]).</p>
+ <pre>template &lt;class T&gt; struct bit_and : binary_function&lt;T,T,T&gt; {
+ T operator()(const T&amp; x , const T&amp; y ) const;
+};</pre>
+ <blockquote>
+ <p><code>operator()</code> returns<code> x &amp; y</code> .</p>
+ </blockquote>
+ <pre>template &lt;class T&gt; struct bit_or : binary_function&lt;T,T,T&gt; {
+ T operator()(const T&amp; x , const T&amp; y ) const;
+};</pre>
+ <blockquote>
+ <p><code>operator()</code> returns <code>x | y</code> .</p>
+ </blockquote>
+ <pre>template &lt;class T&gt; struct bit_xor : binary_function&lt;T,T,T&gt; {
+ T operator()(const T&amp; x , const T&amp; y ) const;
+};</pre>
+ <blockquote>
+ <p><code>operator()</code> returns <code>x ^ y</code> .</p>
+ </blockquote>
+</blockquote>
+
+
+
+
+
+<hr>
+<h3><a name="677"></a>677. Weaknesses in seed_seq::randomize [rand.util.seedseq]</h3>
+<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Charles Karney <b>Date:</b> 2007-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<tt>seed_seq::randomize</tt> provides a mechanism for initializing random number
+engines which ideally would yield "distant" states when given "close"
+seeds. The algorithm for <tt>seed_seq::randomize</tt> given in the current
+Working Draft for C++,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
+(2007-05-08), has 3 weaknesses
+</p>
+
+<ol>
+<li>
+<p> Collisions in state. Because of the way the state is initialized,
+ seeds of different lengths may result in the same state. The
+ current version of seed_seq has the following properties:</p>
+<ul>
+<li> For a given <tt>s &lt;= n</tt>, each of the 2^(32s) seed vectors results in a
+ distinct state.</li>
+</ul>
+<p>
+ The proposed algorithm (below) has the considerably stronger
+ properties:</p>
+<ul>
+<li> All of the <tt>(2^(32n)-1)/(2^32-1)</tt> seed vectors of lengths <tt>s &lt; n</tt>
+ result in distinct states.
+</li>
+<li> All of the <tt>2^(32n)</tt> seed vectors of length <tt>s == n</tt> result in
+ distinct states.
+</li>
+</ul>
+</li>
+<li>
+<p> Poor mixing of <tt>v'</tt>s entropy into the state. Consider <tt>v.size() == n</tt>
+ and hold <tt>v[n/2]</tt> thru <tt>v[n-1]</tt> fixed while varying <tt>v[0]</tt> thru <tt>v[n/2-1]</tt>,
+ a total of <tt>2^(16n)</tt> possibilities. Because of the simple recursion
+ used in <tt>seed_seq</tt>, <tt>begin[n/2]</tt> thru <tt>begin[n-1]</tt> can take on only 2^64
+ possible states.</p>
+
+<p> The proposed algorithm uses a more complex recursion which results
+ in much better mixing.</p>
+</li>
+<li> <tt>seed_seq::randomize</tt> is undefined for <tt>v.size() == 0</tt>. The proposed
+ algorithm remedies this.
+</li>
+</ol>
+<p>
+The current algorithm for <tt>seed_seq::randomize</tt> is adapted by me from the
+initialization procedure for the Mersenne Twister by Makoto Matsumoto
+and Takuji Nishimura. The weakness (2) given above was communicated to
+me by Matsumoto last year.
+</p>
+<p>
+The proposed replacement for <tt>seed_seq::randomize</tt> is due to Mutsuo Saito,
+a student of Matsumoto, and is given in the implementation of the
+SIMD-oriented Fast Mersenne Twister random number generator SFMT.
+<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/index.html">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html</a>
+<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/SFMT-src-1.2.tar.gz">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/SFMT-src-1.2.tar.gz</a>
+</p>
+<p>
+See
+Mutsuo Saito,
+An Application of Finite Field: Design and Implementation of 128-bit
+Instruction-Based Fast Pseudorandom Number Generator,
+Master's Thesis, Dept. of Math., Hiroshima University (Feb. 2007)
+<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/M062821.pdf">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/M062821.pdf</a>
+</p>
+<p>
+One change has been made here, namely to treat the case of small <tt>n</tt>
+(setting <tt>t = (n-1)/2</tt> for <tt>n &lt; 7</tt>).
+</p>
+<p>
+Since <tt>seed_seq</tt> was introduced relatively recently there is little cost
+in making this incompatible improvement to it.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="678"></a>678. Changes for [rand.req.eng]</h3>
+<p><b>Section:</b> 26.4.1.3 [rand.req.eng] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Charles Karney <b>Date:</b> 2007-05-15</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req.eng">issues</a> in [rand.req.eng].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Section 26.4.1.3 [rand.req.eng] Random number engine requirements:
+</p>
+
+<p>
+This change follows naturally from the proposed change to
+<tt>seed_seq::randomize</tt> in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>.
+</p>
+
+<p>
+In table 104 the description of <tt>X(q)</tt> contains a special treatment of
+the case <tt>q.size() == 0</tt>. This is undesirable for 4 reasons:
+</p>
+
+<ol>
+<li>It replicates the functionality provided by <tt>X()</tt>.</li>
+<li>It leads to the possibility of a collision in the state provided
+ by some other <tt>X(q)</tt> with <tt>q.size() &gt; 0</tt>.</li>
+<li>It is inconsistent with the description of the <tt>X(q)</tt> in
+paragraphs 26.4.3.1 [rand.eng.lcong] p5, 26.4.3.2 [rand.eng.mers] p8, and 26.4.3.3 [rand.eng.sub] p10 where
+there is no special treatment of <tt>q.size() == 0</tt>.</li>
+<li>The proposed replacement for <tt>seed_seq::randomize</tt> given above
+ allows for the case <tt>q.size() == 0</tt>.</li>
+</ol>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="681"></a>681. Operator functions impossible to compare are defined in [re.submatch.op]</h3>
+<p><b>Section:</b> 28.9.2 [re.submatch.op] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+In 28.9.2 [re.submatch.op] of N2284,
+operator functions numbered 31-42 seem impossible to compare. &nbsp;E.g.:
+</p>
+
+<blockquote>
+<pre>
+template &lt;class BiIter&gt;
+&nbsp; &nbsp; bool operator==(typename iterator_traits&lt;BiIter&gt;::value_type const&amp; lhs,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const sub_match&lt;BiIter&gt;&amp; rhs);
+</pre>
+<blockquote>
+<p>
+-31- <i>Returns:</i> <tt>lhs == rhs.str()</tt>.
+</p>
+</blockquote>
+</blockquote>
+
+<p>
+When <tt>char*</tt> is used as <tt>BiIter</tt>, <tt>iterator_traits&lt;BiIter&gt;::value_type</tt> would be
+<tt>char</tt>, so that <tt>lhs == rhs.str()</tt> ends up comparing a <tt>char</tt> value and an object
+of <tt>std::basic_string&lt;char&gt;</tt>. &nbsp;However, the behaviour of comparison between
+these two types is not defined in 21.3.8 [string.nonmembers] of N2284.
+&nbsp;This applies when <tt>wchar_t*</tt> is used as <tt>BiIter</tt>.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="682"></a>682. basic_regex ctor takes InputIterator or ForwardIterator?</h3>
+<p><b>Section:</b> 28.8.2 [re.regex.construct] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">Pending WP</a>
+ <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-03</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20WP">Pending WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+Looking at N2284, 28.8 [re.regex], p3 <tt>basic_regex</tt> class template synopsis shows this
+constructor:
+</p>
+<blockquote><pre>template &lt;class InputIterator&gt;
+&nbsp; &nbsp; &nbsp;basic_regex(InputIterator first, InputIterator last,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;flag_type f = regex_constants::ECMAScript);
+</pre></blockquote>
+
+<p>
+In 28.8.2 [re.regex.construct], p15, the constructor appears with this signature:
+</p>
+
+<blockquote><pre>template &lt;class ForwardIterator&gt;
+&nbsp; &nbsp; &nbsp;basic_regex(ForwardIterator first, ForwardIterator last,
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;flag_type f = regex_constants::ECMAScript);
+</pre></blockquote>
+
+<p>
+<tt>ForwardIterator</tt> is probably correct, so the synopsis is wrong.
+</p>
+
+<p><i>[
+John adds:
+]</i></p>
+
+
+<blockquote>
+<p>
+I think either could be implemented? &nbsp;Although an input iterator would
+probably require an internal copy of the string being made.
+</p>
+<p>
+I have no strong feelings either way, although I think my original intent
+was <tt>InputIterator</tt>.
+</p>
+</blockquote>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2409 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="699"></a>699. N2111 changes min/max</h3>
+<p><b>Section:</b> 26.4 [rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-07-01</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>
+changes <tt>min/max</tt> in several places in random from member
+functions to static data members. I believe this introduces
+a needless backward compatibility problem between C++0X and
+TR1. I'd like us to find new names for the static data members,
+or perhaps change <tt>min/max</tt> to <tt>constexpr</tt>s in C++0X.
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+<hr>
+<h3><a name="712"></a>712. <tt>seed_seq::size</tt> no longer useful</h3>
+<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>
+ <b>Submitter:</b> Marc Paterno <b>Date:</b> 2007-08-25</p>
+<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
+<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p>
+<p><b>Discussion:</b></p>
+<p>
+One of the motivations for incorporating <tt>seed_seq::size()</tt>
+was to simplify the wording
+in other parts of 26.4 [rand].
+As a side effect of resolving related issues,
+all such references
+to <tt>seed_seq::size()</tt> will have been excised.
+More importantly,
+the present specification is contradictory,
+as "The number of 32-bit units the object can deliver"
+is not the same as "the result of <tt>v.size()</tt>."
+</p>
+
+<p>
+See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
+for some further discussion.
+</p>
+
+
+<p><b>Proposed resolution:</b></p>
+<p>
+Adopt the proposed resolution in
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>.
+</p>
+
+
+<p><i>[
+Kona (2007): The LWG adopted the proposed resolution of N2423 for this issue.
+The LWG voted to accelerate this issue to Ready status to be voted into the WP at Kona.
+]</i></p>
+
+
+
+
+
+
+</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/PythonPoweredSmall.gif b/libstdc++-v3/doc/html/ext/pb_ds/PythonPoweredSmall.gif
index 268980706ab..268980706ab 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/PythonPoweredSmall.gif
+++ b/libstdc++-v3/doc/html/ext/pb_ds/PythonPoweredSmall.gif
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/acks.html b/libstdc++-v3/doc/html/ext/pb_ds/acks.html
index 6612a4a8184..6612a4a8184 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/acks.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/acks.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.png
index 16cc6da870d..16cc6da870d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.svg b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.svg
index 02be6241647..02be6241647 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_tag_cd.svg
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_tag_cd.svg
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_traits.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_traits.html
index 245b81c9409..245b81c9409 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_container_traits.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_container_traits.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_design.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_design.html
index 6c501e26bbd..6c501e26bbd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_design.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_design.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_examples.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_examples.html
index 6c166987fcb..6c166987fcb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_examples.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_examples.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_performance_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_performance_tests.html
index 642f8480953..642f8480953 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_performance_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_performance_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_regression_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_regression_tests.html
index 178aadf985f..178aadf985f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_regression_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_regression_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/assoc_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/assoc_tests.html
index 6e4474945d3..6e4474945d3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/assoc_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/assoc_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/associative_container_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/associative_container_tag.html
index 5c44efe231c..5c44efe231c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/associative_container_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/associative_container_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/balls_and_bins.png b/libstdc++-v3/doc/html/ext/pb_ds/balls_and_bins.png
index 529c3ae41bc..529c3ae41bc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/balls_and_bins.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/balls_and_bins.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_hash_table.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_hash_table.html
index a6c569c2bb1..a6c569c2bb1 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_hash_table.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_hash_table.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_hash_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_hash_tag.html
index 8110c0dfc4f..8110c0dfc4f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_hash_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_hash_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_invalidation_guarantee.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_invalidation_guarantee.html
index c4c242bbded..c4c242bbded 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_invalidation_guarantee.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_invalidation_guarantee.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree.html
index f66d7a9f7a6..f66d7a9f7a6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html
index 5647f551e95..5647f551e95 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree_assoc_container_const_node_iterator.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree_tag.html
index c35ecad4a2d..c35ecad4a2d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/basic_tree_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/basic_tree_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/binary_heap_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/binary_heap_tag.html
index 47f42477be3..47f42477be3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/binary_heap_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/binary_heap_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png
index 07f0953a661..07f0953a661 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png
index 76e02f134f0..76e02f134f0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png
index b8a3b237124..b8a3b237124 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/binary_priority_queue_random_int_push_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/binomial_heap_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/binomial_heap_tag.html
index 6b5e849e42b..6b5e849e42b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/binomial_heap_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/binomial_heap_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html
index e07c51e3a64..e07c51e3a64 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_max_collision_check_resize_trigger.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png
index 85b9eca4ff6..85b9eca4ff6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png
index 4f578c65b1e..4f578c65b1e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png
index d1234aa11d8..d1234aa11d8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_find_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png
index 1db2cc0c6a8..1db2cc0c6a8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png
index ca4db96f457..ca4db96f457 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png
index 0b51d9432a9..0b51d9432a9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_find_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png
index 6e494038125..6e494038125 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png
index 48fcf76c048..48fcf76c048 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png
index 39c96ad8daf..39c96ad8daf 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_random_int_subscript_timing_test_insert_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_table.html b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_table.html
index fec6bec1b51..fec6bec1b51 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_table.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_table.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_tag.html
index fb6f5935830..fb6f5935830 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/cc_hash_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/cc_hash_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png
index fde6b41bf94..fde6b41bf94 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png
index 2449e1de324..2449e1de324 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png
index 11dca77fcfe..11dca77fcfe 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/ccgp_hash_random_int_subscript_timing_test_insert_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/checked_by_tidy.gif b/libstdc++-v3/doc/html/ext/pb_ds/checked_by_tidy.gif
index 47c2c4859c5..47c2c4859c5 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/checked_by_tidy.gif
+++ b/libstdc++-v3/doc/html/ext/pb_ds/checked_by_tidy.gif
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/concepts.html b/libstdc++-v3/doc/html/ext/pb_ds/concepts.html
index 9f6c2246254..9f6c2246254 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/concepts.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/concepts.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/contact.html b/libstdc++-v3/doc/html/ext/pb_ds/contact.html
index 3d506c975c7..3d506c975c7 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/contact.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/contact.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/container_base.html b/libstdc++-v3/doc/html/ext/pb_ds/container_base.html
index a0741307e0f..a0741307e0f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/container_base.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/container_base.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/container_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/container_cd.png
index 52553278cac..52553278cac 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/container_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/container_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/container_cd.svg b/libstdc++-v3/doc/html/ext/pb_ds/container_cd.svg
index 3b5a9818967..3b5a9818967 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/container_cd.svg
+++ b/libstdc++-v3/doc/html/ext/pb_ds/container_cd.svg
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/container_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/container_tag.html
index b9f05319dc2..b9f05319dc2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/container_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/container_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/counter_lu_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/counter_lu_policy.html
index 142cca19570..142cca19570 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/counter_lu_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/counter_lu_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/design.html b/libstdc++-v3/doc/html/ext/pb_ds/design.html
index e83bd4dd20a..e83bd4dd20a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/design.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/design.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/different_underlying_dss.png b/libstdc++-v3/doc/html/ext/pb_ds/different_underlying_dss.png
index adee1263600..adee1263600 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/different_underlying_dss.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/different_underlying_dss.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/direct_mask_range_hashing.html b/libstdc++-v3/doc/html/ext/pb_ds/direct_mask_range_hashing.html
index 1a7d39b70c2..1a7d39b70c2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/direct_mask_range_hashing.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/direct_mask_range_hashing.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/direct_mod_range_hashing.html b/libstdc++-v3/doc/html/ext/pb_ds/direct_mod_range_hashing.html
index 33c99338ad1..33c99338ad1 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/direct_mod_range_hashing.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/direct_mod_range_hashing.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/disclaimer.html b/libstdc++-v3/doc/html/ext/pb_ds/disclaimer.html
index 681af4edf72..681af4edf72 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/disclaimer.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/disclaimer.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/ds_gen.html b/libstdc++-v3/doc/html/ext/pb_ds/ds_gen.html
new file mode 100644
index 00000000000..ec99c4d5f7e
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/ds_gen.html
@@ -0,0 +1,344 @@
+<!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" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>Data-Structure Genericity</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1>Data-Structure Genericity</h1>
+
+ <h2><a name="problem" id="problem">The Basic Problem</a></h2>
+
+ <p>The design attempts to address the following problem. When
+ writing a function manipulating a generic container object,
+ what is the behavior of the object? <i>E.g.</i>, suppose one
+ writes</p>
+ <pre>
+<b>template</b>&lt;<b>typename</b> Cntnr&gt;
+<b>void</b>
+some_op_sequence(Cntnr &amp;r_container)
+{
+ ...
+}
+</pre>then one needs to address the following questions in the body
+of <tt>some_op_sequence</tt>:
+
+ <ol>
+ <li>Which types and methods does <tt>Cntnr</tt> support?
+ Containers based on hash tables can be queries for the
+ hash-functor type and object; this is meaningless for
+ tree-based containers. Containers based on trees can be
+ split, joined, or can erase iterators and return the
+ following iterator; this cannot be done by hash-based
+ containers.</li>
+
+ <li>What are the guarantees of <tt>Cntnr</tt>? A container
+ based on a probing hash-table invalidates all iterators when
+ it is modified; this is not the case for containers based on
+ node-based trees. Containers based on a node-based tree can
+ be split or joined without exceptions; this is not the case
+ for containers based on vector-based trees.</li>
+
+ <li>How does the container maintain its elements? Tree-based
+ and Trie-based containers store elements by key order;
+ others, typically, do not. A container based on a splay trees
+ or lists with update policies "cache" "frequently accessed"
+ elements; containers based on most other underlying
+ data structures do not.</li>
+ </ol>
+
+ <p>The remainder of this section deals with these issues.</p>
+
+ <h2><a name="ds_hierarchy" id="ds_hierarchy">Container
+ Hierarchy</a></h2>
+
+ <p>Figure <a href="#cd">Container class hierarchy</a> shows the
+ container hierarchy.</p>
+
+ <h6 class="c1"><a name="cd" id="cd"><img src="container_cd.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Container class hierarchy.</h6>
+
+ <ol>
+ <li><a href=
+ "container_base.html"><tt>container_base</tt></a> is an
+ abstract base class for associative containers.</li>
+
+ <li>Tree-Like-Based Associative-Containers:
+
+ <ol>
+ <li><a href=
+ "basic_tree.html"><tt>basic_tree</tt></a>
+ is an abstract base class for tree-like-based
+ associative-containers</li>
+
+ <li><a href=
+ "tree.html"><tt>tree</tt></a>
+ is a concrete base class for tree-based
+ associative-containers</li>
+
+ <li><a href=
+ "trie.html"><tt>trie</tt></a>
+ is a concrete base class trie-based
+ associative-containers</li>
+ </ol>
+ </li>
+
+ <li>Hash-Based Associative-Containers:
+
+ <ol>
+ <li><a href=
+ "basic_hash_table.html"><tt>basic_hash_table</tt></a>
+ is an abstract base class for hash-based
+ associative-containers</li>
+
+ <li><a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a>
+ is a concrete collision-chaining hash-based
+ associative-containers</li>
+
+ <li><a href=
+ "gp_hash_table.html"><tt>gp_hash_table</tt></a>
+ is a concrete (general) probing hash-based
+ associative-containers</li>
+ </ol>
+ </li>
+
+ <li>List-Based Associative-Containers:
+
+ <ol>
+ <li><a href=
+ "list_update.html"><tt>list_update</tt></a> -
+ list-based update-policy associative container</li>
+ </ol>
+ </li>
+ </ol>
+
+ <p>The hierarchy is composed naturally so that commonality is
+ captured by base classes. Thus <tt><b>operator[]</b></tt> is
+ defined <a href=
+ "container_base.html"><tt>container_base</tt></a>, since
+ all containers support it. Conversely <tt>split</tt> is defined
+ in <a href=
+ "basic_tree.html"><tt>basic_tree</tt></a>,
+ since only tree-like containers support it. <a href=
+ "#container_traits">Data-Structure Tags and Traits</a> discusses how
+ to query which types and methods each container supports.</p>
+
+ <h2><a name="container_traits" id="container_traits">Data-Structure Tags and
+ Traits</a></h2>
+
+ <p>Tags and traits are very useful for manipulating generic
+ types. For example, if <tt>It</tt> is an iterator class, then
+ <tt><b>typename</b> It::iterator_category</tt> or
+ <tt><b>typename</b>
+ std::iterator_traits&lt;It&gt;::iterator_category</tt> will
+ yield its category, and <tt><b>typename</b>
+ std::iterator_traits&lt;It&gt;::value_type</tt> will yield its
+ value type.</p>
+
+ <p><tt>pb_ds</tt> contains a tag hierarchy corresponding to the
+ hierarchy in Figure <a href="#cd">Class hierarchy</a>. The tag
+ hierarchy is shown in Figure <a href=
+ "#tag_cd">Data-structure tag class hierarchy</a>.</p>
+
+ <h6 class="c1"><a name="tag_cd" id="tag_cd"><img src=
+ "assoc_container_tag_cd.png" alt="no image" /></a></h6>
+
+ <h6 class="c1">Data-structure tag class hierarchy.</h6>
+
+ <p><a href=
+ "container_base.html"><tt>container_base</tt></a>
+ publicly defines <tt>container_category</tt> as one of the classes in
+ Figure <a href="#tag_cd">Data-structure tag class
+ hierarchy</a>. Given any container <tt>Cntnr</tt>, the tag of
+ the underlying data structure can be found via
+ <tt><b>typename</b> Cntnr::container_category</tt>.</p>
+
+ <p>Additionally, a traits mechanism can be used to query a
+ container type for its attributes. Given any container
+ <tt>Cntnr</tt>, then <tt><a href=
+ "assoc_container_traits.html">__gnu_pbds::container_traits</a>&lt;Cntnr&gt;</tt>
+ is a traits class identifying the properties of the
+ container.</p>
+
+ <p>To find if a container can throw when a key is erased (which
+ is true for vector-based trees, for example), one can
+ use</p><a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::erase_can_throw</tt>,
+ for example.
+
+ <p>Some of the definitions in <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a> are
+ dependent on other definitions. <i>E.g.</i>, if <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::order_preserving</tt>
+ is <tt><b>true</b></tt> (which is the case for containers based
+ on trees and tries), then the container can be split or joined;
+ in this case, <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
+ indicates whether splits or joins can throw exceptions (which
+ is true for vector-based trees); otherwise <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
+ will yield a compilation error. (This is somewhat similar to a
+ compile-time version of the COM model [<a href=
+ "references.html#mscom">mscom</a>]).</p>
+
+ <h2><a name="find_range" id="find_range">Point-Type and
+ Range-Type Methods and Iterators</a></h2>
+
+ <h3><a name="it_unordered" id="it_unordered">Iterators in
+ Unordered Container Types</a></h3>
+
+ <p><tt>pb_ds</tt> differentiates between two types of methods
+ and iterators: point-type methods and iterators, and range-type
+ methods and iterators (see <a href=
+ "motivation.html#assoc_diff_it">Motivation::Associative
+ Containers::Differentiating between Iterator Types</a> and
+ <a href="tutorial.html#assoc_find_range">Tutorial::Associative
+ Containers::Point-Type and Range-Type Methods and
+ Iterators</a>). Each associative container's interface includes
+ the methods:</p>
+ <pre>
+const_point_iterator
+find(const_key_reference r_key) const;
+
+point_iterator
+find(const_key_reference r_key);
+
+std::pair&lt;point_iterator,<b>bool</b>&gt;
+insert(const_reference r_val);
+</pre>
+
+ <p>The relationship between these iterator types varies between
+ container types. Figure <a href=
+ "#point_iterators_cd">Point-type and range-type iterators</a>-A
+ shows the most general invariant between point-type and
+ range-type iterators: <tt>iterator</tt>, <i>e.g.</i>, can
+ always be converted to <tt>point_iterator</tt>. Figure <a href=
+ "#point_iterators_cd">Point-type and range-type iterators</a>-B
+ shows invariants for order-preserving containers: point-type
+ iterators are synonymous with range-type iterators.
+ Orthogonally, Figure <a href="#point_iterators_cd">Point-type
+ and range-type iterators</a>-C shows invariants for "set"
+ containers: iterators are synonymous with const iterators.</p>
+
+ <h6 class="c1"><a name="point_iterators_cd" id=
+ "point_iterators_cd"><img src="point_iterators_cd.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Point-type and range-type iterators.</h6>
+
+ <p>Note that point-type iterators in self-organizing containers
+ (<i>e.g.</i>, hash-based associative containers) lack movement
+ operators, such as <tt><b>operator++</b></tt> - in fact, this
+ is the reason why <tt>pb_ds</tt> differentiates from the STL's
+ design on this point.</p>
+
+ <p>Typically, one can determine an iterator's movement
+ capabilities in the STL using
+ <tt>std::iterator_traits&lt;It&gt;iterator_category</tt>, which
+ is a <tt><b>struct</b></tt> indicating the iterator's movement
+ capabilities. Unfortunately, none of the STL's predefined
+ categories reflect a pointer's <u>not</u> having any movement
+ capabilities whatsoever. Consequently, <tt>pb_ds</tt> adds a
+ type <a href=
+ "trivial_iterator_tag.html"><tt>trivial_iterator_tag</tt></a>
+ (whose name is taken from a concept in [<a href=
+ "references.html#sgi_stl">sgi_stl</a>]), which is the category
+ of iterators with no movement capabilities. All other STL tags,
+ such as <tt>forward_iterator_tag</tt> retain their common
+ use.</p>
+
+ <h3><a name="inv_guar" id="inv_guar">Invalidation
+ Guarantees</a></h3>
+
+ <p><a href=
+ "motivation.html#assoc_inv_guar">Motivation::Associative
+ Containers::Differentiating between Iterator
+ Types::Invalidation Guarantees</a> posed a problem. Given three
+ different types of associative containers, a modifying
+ operation (in that example, <tt>erase</tt>) invalidated
+ iterators in three different ways: the iterator of one
+ container remained completely valid - it could be de-referenced
+ and incremented; the iterator of a different container could
+ not even be de-referenced; the iterator of the third container
+ could be de-referenced, but its "next" iterator changed
+ unpredictably.</p>
+
+ <p>Distinguishing between find and range types allows
+ fine-grained invalidation guarantees, because these questions
+ correspond exactly to the question of whether point-type
+ iterators and range-type iterators are valid. <a href=
+ "#invalidation_guarantee_cd">Invalidation guarantees class
+ hierarchy</a> shows tags corresponding to different types of
+ invalidation guarantees.</p>
+
+ <h6 class="c1"><a name="invalidation_guarantee_cd" id=
+ "invalidation_guarantee_cd"><img src=
+ "invalidation_guarantee_cd.png" alt="no image" /></a></h6>
+
+ <h6 class="c1">Invalidation guarantees class hierarchy.</h6>
+
+ <ol>
+ <li><a href=
+ "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>
+ corresponds to a basic guarantee that a point-type iterator,
+ a found pointer, or a found reference, remains valid as long
+ as the container object is not modified.</li>
+
+ <li><a href=
+ "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>
+ corresponds to a guarantee that a point-type iterator, a
+ found pointer, or a found reference, remains valid even if
+ the container object is modified.</li>
+
+ <li><a href=
+ "range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>
+ corresponds to a guarantee that a range-type iterator remains
+ valid even if the container object is modified.</li>
+ </ol>
+
+ <p>As shown in <a href=
+ "tutorial.html#assoc_find_range">Tutorial::Associative
+ Containers::Point-Type and Range-Type Methods and
+ Iterators</a>, to find the invalidation guarantee of a
+ container, one can use</p>
+ <pre>
+<b>typename</b> <a href=
+"assoc_container_traits.html">container_traits</a>&lt;Cntnr&gt;::invalidation_guarantee
+</pre>
+
+ <p>which is one of the classes in Figure <a href=
+ "#invalidation_guarantee_cd">Invalidation guarantees class
+ hierarchy</a>.</p>
+
+ <p>Note that this hierarchy corresponds to the logic it
+ represents: if a container has range-invalidation guarantees,
+ then it must also have find invalidation guarantees;
+ correspondingly, its invalidation guarantee (in this case
+ <a href=
+ "range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>)
+ can be cast to its base class (in this case <a href=
+ "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>).
+ This means that this this hierarchy can be used easily using
+ standard metaprogramming techniques, by specializing on the
+ type of <tt>invalidation_guarantee</tt>.</p>
+
+ <p>(These types of problems were addressed, in a more general
+ setting, in [<a href=
+ "references.html#meyers96more">meyers96more</a>] - Item 2. In
+ our opinion, an invalidation-guarantee hierarchy would solve
+ these problems in all container types - not just associative
+ containers.)</p>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_1.png b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_1.png
index 9470a65b568..9470a65b568 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_1.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_1.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_2.png b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_2.png
index d2ac91c1ab0..d2ac91c1ab0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_2.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_2.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_3.png b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_3.png
index 08ecb0ffe16..08ecb0ffe16 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/embedded_lists_3.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/embedded_lists_3.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/examples.html b/libstdc++-v3/doc/html/ext/pb_ds/examples.html
index 03c7a391003..03c7a391003 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/examples.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/examples.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/exceptions.html b/libstdc++-v3/doc/html/ext/pb_ds/exceptions.html
index 3b50c27aa04..3b50c27aa04 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/exceptions.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/exceptions.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png
index d86299b7e3e..d86299b7e3e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png
index 1b31b7f27ca..1b31b7f27ca 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png
index b7082f28605..b7082f28605 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_find_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png
index b9fbe00deff..b9fbe00deff 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png
index c693ed3869b..c693ed3869b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png
index 248ff6b8872..248ff6b8872 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_find_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png
index ac4f838fe26..ac4f838fe26 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png
index 9fa08a0c2c3..9fa08a0c2c3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png
index 5f1d740b817..5f1d740b817 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_random_int_subscript_timing_test_insert_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_table.html b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_table.html
index 446359b4a89..446359b4a89 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_table.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_table.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_tag.html
index 720984fff2f..720984fff2f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/gp_hash_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/gp_hash_tag.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/hash_based_containers.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_based_containers.html
new file mode 100644
index 00000000000..21d092a76ef
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_based_containers.html
@@ -0,0 +1,835 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>Hash-Based Containers</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1>Hash Table Design</h1>
+
+ <h2><a name="overview" id="overview">Overview</a></h2>
+
+ <p>The collision-chaining hash-based container has the
+ following declaration.</p>
+ <pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Mapped,
+ <b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
+ <b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
+ <b>typename</b> Comb_Hash_Fn = <a href=
+"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
+ <b>typename</b> Resize_Policy = <i>default explained below.</i>
+ <b>bool</b> Store_Hash = <b>false</b>,
+ <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href=
+"cc_hash_table.html">cc_hash_table</a>;
+</pre>
+
+ <p>The parameters have the following meaning:</p>
+
+ <ol>
+ <li><tt>Key</tt> is the key type.</li>
+
+ <li><tt>Mapped</tt> is the mapped-policy, and is explained in
+ <a href="tutorial.html#assoc_ms">Tutorial::Associative
+ Containers::Associative Containers Others than Maps</a>.</li>
+
+ <li><tt>Hash_Fn</tt> is a key hashing functor.</li>
+
+ <li><tt>Eq_Fn</tt> is a key equivalence functor.</li>
+
+ <li><tt>Comb_Hash_Fn</tt> is a <i>range-hashing_functor</i>;
+ it describes how to translate hash values into positions
+ within the table. This is described in <a href=
+ "#hash_policies">Hash Policies</a>.</li>
+
+ <li><tt>Resize_Policy</tt> describes how a container object
+ should change its internal size. This is described in
+ <a href="#resize_policies">Resize Policies</a>.</li>
+
+ <li><tt>Store_Hash</tt> indicates whether the hash value
+ should be stored with each entry. This is described in
+ <a href="#policy_interaction">Policy Interaction</a>.</li>
+
+ <li><tt>Allocator</tt> is an allocator
+ type.</li>
+ </ol>
+
+ <p>The probing hash-based container has the following
+ declaration.</p>
+ <pre>
+<b>template</b>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Mapped,
+ <b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
+ <b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
+ <b>typename</b> Comb_Probe_Fn = <a href=
+"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
+ <b>typename</b> Probe_Fn = <i>default explained below.</i>
+ <b>typename</b> Resize_Policy = <i>default explained below.</i>
+ <b>bool</b> Store_Hash = <b>false</b>,
+ <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href=
+"gp_hash_table.html">gp_hash_table</a>;
+</pre>
+
+ <p>The parameters are identical to those of the
+ collision-chaining container, except for the following.</p>
+
+ <ol>
+ <li><tt>Comb_Probe_Fn</tt> describes how to transform a probe
+ sequence into a sequence of positions within the table.</li>
+
+ <li><tt>Probe_Fn</tt> describes a probe sequence policy.</li>
+ </ol>
+
+ <p>Some of the default template values depend on the values of
+ other parameters, and are explained in <a href=
+ "#policy_interaction">Policy Interaction</a>.</p>
+
+ <h2><a name="hash_policies" id="hash_policies">Hash
+ Policies</a></h2>
+
+ <h3><a name="general_terms" id="general_terms">General
+ Terms</a></h3>
+
+ <p>Following is an explanation of some functions which hashing
+ involves. Figure <a href=
+ "#hash_ranged_hash_range_hashing_fns">Hash functions,
+ ranged-hash functions, and range-hashing functions</a>)
+ illustrates the discussion.</p>
+
+ <h6 class="c1"><a name="hash_ranged_hash_range_hashing_fns" id=
+ "hash_ranged_hash_range_hashing_fns"><img src=
+ "hash_ranged_hash_range_hashing_fns.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Hash functions, ranged-hash functions, and
+ range-hashing functions.</h6>
+
+ <p>Let <i>U</i> be a domain (<i>e.g.</i>, the integers, or the
+ strings of 3 characters). A hash-table algorithm needs to map
+ elements of <i>U</i> "uniformly" into the range <i>[0,..., m -
+ 1]</i> (where <i>m</i> is a non-negative integral value, and
+ is, in general, time varying). <i>I.e.</i>, the algorithm needs
+ a <i>ranged-hash</i> function</p>
+
+ <p><i>f : U &times; Z<sub>+</sub> &rarr; Z<sub>+</sub></i>
+ ,</p>
+
+ <p>such that for any <i>u</i> in <i>U</i> ,</p>
+
+ <p><i>0 &le; f(u, m) &le; m - 1</i> ,</p>
+
+ <p>and which has "good uniformity" properties [<a href=
+ "references.html#knuth98sorting">knuth98sorting</a>]. One
+ common solution is to use the composition of the hash
+ function</p>
+
+ <p><i>h : U &rarr; Z<sub>+</sub></i> ,</p>
+
+ <p>which maps elements of <i>U</i> into the non-negative
+ integrals, and</p>
+
+ <p class="c2">g : Z<sub>+</sub> &times; Z<sub>+</sub> &rarr;
+ Z<sub>+</sub>,</p>
+
+ <p>which maps a non-negative hash value, and a non-negative
+ range upper-bound into a non-negative integral in the range
+ between 0 (inclusive) and the range upper bound (exclusive),
+ <i>i.e.</i>, for any <i>r</i> in <i>Z<sub>+</sub></i>,</p>
+
+ <p><i>0 &le; g(r, m) &le; m - 1</i> .</p>
+
+ <p>The resulting ranged-hash function, is</p>
+
+ <p><i><a name="ranged_hash_composed_of_hash_and_range_hashing"
+ id="ranged_hash_composed_of_hash_and_range_hashing">f(u , m) =
+ g(h(u), m)</a></i> (1) .</p>
+
+ <p>From the above, it is obvious that given <i>g</i> and
+ <i>h</i>, <i>f</i> can always be composed (however the converse
+ is not true). The STL's hash-based containers allow specifying
+ a hash function, and use a hard-wired range-hashing function;
+ the ranged-hash function is implicitly composed.</p>
+
+ <p>The above describes the case where a key is to be mapped
+ into a <i>single position</i> within a hash table, <i>e.g.</i>,
+ in a collision-chaining table. In other cases, a key is to be
+ mapped into a <i>sequence of positions</i> within a table,
+ <i>e.g.</i>, in a probing table. Similar terms apply in this
+ case: the table requires a <i>ranged probe</i> function,
+ mapping a key into a sequence of positions withing the table.
+ This is typically achieved by composing a <i>hash function</i>
+ mapping the key into a non-negative integral type, a
+ <i>probe</i> function transforming the hash value into a
+ sequence of hash values, and a <i>range-hashing</i> function
+ transforming the sequence of hash values into a sequence of
+ positions.</p>
+
+ <h3><a name="range_hashing_fns" id=
+ "range_hashing_fns">Range-Hashing Functions</a></h3>
+
+ <p>Some common choices for range-hashing functions are the
+ division, multiplication, and middle-square methods [<a href=
+ "references.html#knuth98sorting">knuth98sorting</a>], defined
+ as</p>
+
+ <p><i><a name="division_method" id="division_method">g(r, m) =
+ r mod m</a></i> (2) ,</p>
+
+ <p><i>g(r, m) = &lceil; u/v ( a r mod v ) &rceil;</i> ,</p>
+
+ <p>and</p>
+
+ <p><i>g(r, m) = &lceil; u/v ( r<sup>2</sup> mod v ) &rceil;</i>
+ ,</p>
+
+ <p>respectively, for some positive integrals <i>u</i> and
+ <i>v</i> (typically powers of 2), and some <i>a</i>. Each of
+ these range-hashing functions works best for some different
+ setting.</p>
+
+ <p>The division method <a href="#division_method">(2)</a> is a
+ very common choice. However, even this single method can be
+ implemented in two very different ways. It is possible to
+ implement <a href="#division_method">(2)</a> using the low
+ level <i>%</i> (modulo) operation (for any <i>m</i>), or the
+ low level <i>&amp;</i> (bit-mask) operation (for the case where
+ <i>m</i> is a power of 2), <i>i.e.</i>,</p>
+
+ <p><i><a name="division_method_prime_mod" id=
+ "division_method_prime_mod">g(r, m) = r % m</a></i> (3) ,</p>
+
+ <p>and</p>
+
+ <p><i><a name="division_method_bit_mask" id=
+ "division_method_bit_mask">g(r, m) = r &amp; m - 1, (m =
+ 2<sup>k</sup>)</a></i> for some <i>k)</i> (4),</p>
+
+ <p>respectively.</p>
+
+ <p>The <i>%</i> (modulo) implementation <a href=
+ "#division_method_prime_mod">(3)</a> has the advantage that for
+ <i>m</i> a prime far from a power of 2, <i>g(r, m)</i> is
+ affected by all the bits of <i>r</i> (minimizing the chance of
+ collision). It has the disadvantage of using the costly modulo
+ operation. This method is hard-wired into SGI's implementation
+ [<a href="references.html#sgi_stl">sgi_stl</a>].</p>
+
+ <p>The <i>&amp;</i> (bit-mask) implementation <a href=
+ "#division_method_bit_mask">(4)</a> has the advantage of
+ relying on the fast bit-wise and operation. It has the
+ disadvantage that for <i>g(r, m)</i> is affected only by the
+ low order bits of <i>r</i>. This method is hard-wired into
+ Dinkumware's implementation [<a href=
+ "references.html#dinkumware_stl">dinkumware_stl</a>].</p>
+
+ <h3><a name="hash_policies_ranged_hash_policies" id=
+ "hash_policies_ranged_hash_policies">Ranged-Hash
+ Functions</a></h3>
+
+ <p>In cases it is beneficial to allow the
+ client to directly specify a ranged-hash hash function. It is
+ true, that the writer of the ranged-hash function cannot rely
+ on the values of <i>m</i> having specific numerical properties
+ suitable for hashing (in the sense used in [<a href=
+ "references.html#knuth98sorting">knuth98sorting</a>]), since
+ the values of <i>m</i> are determined by a resize policy with
+ possibly orthogonal considerations.</p>
+
+ <p>There are two cases where a ranged-hash function can be
+ superior. The firs is when using perfect hashing [<a href=
+ "references.html#knuth98sorting">knuth98sorting</a>]; the
+ second is when the values of <i>m</i> can be used to estimate
+ the "general" number of distinct values required. This is
+ described in the following.</p>
+
+ <p>Let</p>
+
+ <p class="c2">s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>]</p>
+
+ <p>be a string of <i>t</i> characters, each of which is from
+ domain <i>S</i>. Consider the following ranged-hash
+ function:</p>
+
+ <p><a name="total_string_dna_hash" id=
+ "total_string_dna_hash"><i>f<sub>1</sub>(s, m) = &sum; <sub>i =
+ 0</sub><sup>t - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
+ <i>m</i></a> (5) ,</p>
+
+ <p>where <i>a</i> is some non-negative integral value. This is
+ the standard string-hashing function used in SGI's
+ implementation (with <i>a = 5</i>) [<a href=
+ "references.html#sgi_stl">sgi_stl</a>]. Its advantage is that
+ it takes into account all of the characters of the string.</p>
+
+ <p>Now assume that <i>s</i> is the string representation of a
+ of a long DNA sequence (and so <i>S = {'A', 'C', 'G',
+ 'T'}</i>). In this case, scanning the entire string might be
+ prohibitively expensive. A possible alternative might be to use
+ only the first <i>k</i> characters of the string, where</p>
+
+ <p>|S|<sup>k</sup> &ge; m ,</p>
+
+ <p><i>i.e.</i>, using the hash function</p>
+
+ <p><a name="only_k_string_dna_hash" id=
+ "only_k_string_dna_hash"><i>f<sub>2</sub>(s, m) = &sum; <sub>i
+ = 0</sub><sup>k - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
+ <i>m</i></a> , (6)</p>
+
+ <p>requiring scanning over only</p>
+
+ <p><i>k =</i> log<i><sub>4</sub>( m )</i></p>
+
+ <p>characters.</p>
+
+ <p>Other more elaborate hash-functions might scan <i>k</i>
+ characters starting at a random position (determined at each
+ resize), or scanning <i>k</i> random positions (determined at
+ each resize), <i>i.e.</i>, using</p>
+
+ <p><i>f<sub>3</sub>(s, m) = &sum; <sub>i =
+ r</sub>0</i><sup>r<sub>0</sub> + k - 1</sup> s<sub>i</sub>
+ a<sup>i</sup> mod <i>m</i> ,</p>
+
+ <p>or</p>
+
+ <p><i>f<sub>4</sub>(s, m) = &sum; <sub>i = 0</sub><sup>k -
+ 1</sup> s<sub>r</sub>i</i> a<sup>r<sub>i</sub></sup> mod
+ <i>m</i> ,</p>
+
+ <p>respectively, for <i>r<sub>0</sub>,..., r<sub>k-1</sub></i>
+ each in the (inclusive) range <i>[0,...,t-1]</i>.</p>
+
+ <p>It should be noted that the above functions cannot be
+ decomposed as <a href=
+ "#ranged_hash_composed_of_hash_and_range_hashing">(1)</a> .</p>
+
+ <h3><a name="pb_ds_imp" id="pb_ds_imp">Implementation</a></h3>
+
+ <p>This sub-subsection describes the implementation of the
+ above in <tt>pb_ds</tt>. It first explains range-hashing
+ functions in collision-chaining tables, then ranged-hash
+ functions in collision-chaining tables, then probing-based
+ tables, and, finally, lists the relevant classes in
+ <tt>pb_ds</tt>.</p>
+
+ <h4>Range-Hashing and Ranged-Hashes in Collision-Chaining
+ Tables</h4>
+
+ <p><a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a> is
+ parametrized by <tt>Hash_Fn</tt> and <tt>Comb_Hash_Fn</tt>, a
+ hash functor and a combining hash functor, respectively.</p>
+
+ <p>In general, <tt>Comb_Hash_Fn</tt> is considered a
+ range-hashing functor. <a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a>
+ synthesizes a ranged-hash function from <tt>Hash_Fn</tt> and
+ <tt>Comb_Hash_Fn</tt> (see <a href=
+ "#ranged_hash_composed_of_hash_and_range_hashing">(1)</a>
+ above). Figure <a href="#hash_range_hashing_seq_diagram">Insert
+ hash sequence diagram</a> shows an <tt>insert</tt> sequence
+ diagram for this case. The user inserts an element (point A),
+ the container transforms the key into a non-negative integral
+ using the hash functor (points B and C), and transforms the
+ result into a position using the combining functor (points D
+ and E).</p>
+
+ <h6 class="c1"><a name="hash_range_hashing_seq_diagram" id=
+ "hash_range_hashing_seq_diagram"><img src=
+ "hash_range_hashing_seq_diagram.png" alt="no image" /></a></h6>
+
+ <h6 class="c1">Insert hash sequence diagram.</h6>
+
+ <p>If <a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a>'s
+ hash-functor, <tt>Hash_Fn</tt> is instantiated by <a href=
+ "null_hash_fn.html"><tt>null_hash_fn</tt></a> (see <a href=
+ "concepts.html#concepts_null_policies">Interface::Concepts::Null
+ Policy Classes</a>), then <tt>Comb_Hash_Fn</tt> is taken to be
+ a ranged-hash function. Figure <a href=
+ "#hash_range_hashing_seq_diagram2">Insert hash sequence diagram
+ with a null hash policy</a> shows an <tt>insert</tt> sequence
+ diagram. The user inserts an element (point A), the container
+ transforms the key into a position using the combining functor
+ (points B and C).</p>
+
+ <h6 class="c1"><a name="hash_range_hashing_seq_diagram2" id=
+ "hash_range_hashing_seq_diagram2"><img src=
+ "hash_range_hashing_seq_diagram2.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Insert hash sequence diagram with a null hash
+ policy.</h6>
+
+ <h4>Probing Tables</h4>
+
+ <p><a href=
+ "gp_hash_table.html"></a><tt>gp_hash_table</tt> is
+ parametrized by <tt>Hash_Fn</tt>, <tt>Probe_Fn</tt>, and
+ <tt>Comb_Probe_Fn</tt>. As before, if <tt>Hash_Fn</tt> and
+ <tt>Probe_Fn</tt> are, respectively, <a href=
+ "null_hash_fn.html"><tt>null_hash_fn</tt></a> and <a href=
+ "null_probe_fn.html"><tt>null_probe_fn</tt></a>, then
+ <tt>Comb_Probe_Fn</tt> is a ranged-probe functor. Otherwise,
+ <tt>Hash_Fn</tt> is a hash functor, <tt>Probe_Fn</tt> is a
+ functor for offsets from a hash value, and
+ <tt>Comb_Probe_Fn</tt> transforms a probe sequence into a
+ sequence of positions within the table.</p>
+
+ <h4>Pre-Defined Policies</h4>
+
+ <p><tt>pb_ds</tt> contains some pre-defined classes
+ implementing range-hashing and probing functions:</p>
+
+ <ol>
+ <li><a href=
+ "direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+ and <a href=
+ "direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
+ are range-hashing functions based on a bit-mask and a modulo
+ operation, respectively.</li>
+
+ <li><a href=
+ "linear_probe_fn.html"><tt>linear_probe_fn</tt></a>, and
+ <a href=
+ "quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a> are
+ a linear probe and a quadratic probe function,
+ respectively.</li>
+ </ol>Figure <a href="#hash_policy_cd">Hash policy class
+ diagram</a> shows a class diagram.
+
+ <h6 class="c1"><a name="hash_policy_cd" id=
+ "hash_policy_cd"><img src="hash_policy_cd.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Hash policy class diagram.</h6>
+
+ <h2><a name="resize_policies" id="resize_policies">Resize
+ Policies</a></h2>
+
+ <h3><a name="general" id="general">General Terms</a></h3>
+
+ <p>Hash-tables, as opposed to trees, do not naturally grow or
+ shrink. It is necessary to specify policies to determine how
+ and when a hash table should change its size. Usually, resize
+ policies can be decomposed into orthogonal policies:</p>
+
+ <ol>
+ <li>A <i>size policy</i> indicating <i>how</i> a hash table
+ should grow (<i>e.g.,</i> it should multiply by powers of
+ 2).</li>
+
+ <li>A <i>trigger policy</i> indicating <i>when</i> a hash
+ table should grow (<i>e.g.,</i> a load factor is
+ exceeded).</li>
+ </ol>
+
+ <h3><a name="size_policies" id="size_policies">Size
+ Policies</a></h3>
+
+ <p>Size policies determine how a hash table changes size. These
+ policies are simple, and there are relatively few sensible
+ options. An exponential-size policy (with the initial size and
+ growth factors both powers of 2) works well with a mask-based
+ range-hashing function (see <a href=
+ "#hash_policies">Range-Hashing Policies</a>), and is the
+ hard-wired policy used by Dinkumware [<a href=
+ "references.html#dinkumware_stl">dinkumware_stl</a>]. A
+ prime-list based policy works well with a modulo-prime range
+ hashing function (see <a href="#hash_policies">Range-Hashing
+ Policies</a>), and is the hard-wired policy used by SGI's
+ implementation [<a href=
+ "references.html#sgi_stl">sgi_stl</a>].</p>
+
+ <h3><a name="trigger_policies" id="trigger_policies">Trigger
+ Policies</a></h3>
+
+ <p>Trigger policies determine when a hash table changes size.
+ Following is a description of two policies: <i>load-check</i>
+ policies, and collision-check policies.</p>
+
+ <p>Load-check policies are straightforward. The user specifies
+ two factors, <i>&alpha;<sub>min</sub></i> and
+ <i>&alpha;<sub>max</sub></i>, and the hash table maintains the
+ invariant that</p>
+
+ <p><i><a name="load_factor_min_max" id=
+ "load_factor_min_max">&alpha;<sub>min</sub> &le; (number of
+ stored elements) / (hash-table size) &le;
+ &alpha;<sub>max</sub></a></i> (1) .</p>
+
+ <p>Collision-check policies work in the opposite direction of
+ load-check policies. They focus on keeping the number of
+ collisions moderate and hoping that the size of the table will
+ not grow very large, instead of keeping a moderate load-factor
+ and hoping that the number of collisions will be small. A
+ maximal collision-check policy resizes when the longest
+ probe-sequence grows too large.</p>
+
+ <p>Consider Figure <a href="#balls_and_bins">Balls and
+ bins</a>. Let the size of the hash table be denoted by
+ <i>m</i>, the length of a probe sequence be denoted by
+ <i>k</i>, and some load factor be denoted by &alpha;. We would
+ like to calculate the minimal length of <i>k</i>, such that if
+ there were <i>&alpha; m</i> elements in the hash table, a probe
+ sequence of length <i>k</i> would be found with probability at
+ most <i>1/m</i>.</p>
+
+ <h6 class="c1"><a name="balls_and_bins" id=
+ "balls_and_bins"><img src="balls_and_bins.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Balls and bins.</h6>
+
+ <p>Denote the probability that a probe sequence of length
+ <i>k</i> appears in bin <i>i</i> by <i>p<sub>i</sub></i>, the
+ length of the probe sequence of bin <i>i</i> by
+ <i>l<sub>i</sub></i>, and assume uniform distribution. Then</p>
+
+ <p><a name="prob_of_p1" id=
+ "prob_of_p1"><i>p<sub>1</sub></i></a> = (3)</p>
+
+ <p class="c2"><b>P</b>(l<sub>1</sub> &ge; k) =</p>
+
+ <p><i><b>P</b>(l<sub>1</sub> &ge; &alpha; ( 1 + k / &alpha; - 1
+ ) &le;</i> (a)</p>
+
+ <p><i>e ^ ( - ( &alpha; ( k / &alpha; - 1 )<sup>2</sup> ) /2
+ )</i> ,</p>
+
+ <p>where (a) follows from the Chernoff bound [<a href=
+ "references.html#motwani95random">motwani95random</a>]. To
+ calculate the probability that <i>some</i> bin contains a probe
+ sequence greater than <i>k</i>, we note that the
+ <i>l<sub>i</sub></i> are negatively-dependent [<a href=
+ "references.html#dubhashi98neg">dubhashi98neg</a>]. Let
+ <i><b>I</b>(.)</i> denote the indicator function. Then</p>
+
+ <p><a name="at_least_k_i_n_some_bin" id=
+ "at_least_k_i_n_some_bin"><i><b>P</b>( exists<sub>i</sub>
+ l<sub>i</sub> &ge; k ) =</i> (3)</a></p>
+
+ <p class="c2"><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup>
+ <b>I</b>(l<sub>i</sub> &ge; k) &ge; 1 ) =</p>
+
+ <p><i><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup> <b>I</b> (
+ l<sub>i</sub> &ge; k ) &ge; m p<sub>1</sub> ( 1 + 1 / (m
+ p<sub>1</sub>) - 1 ) ) &le;</i> (a)</p>
+
+ <p class="c2">e ^ ( ( - m p<sub>1</sub> ( 1 / (m p<sub>1</sub>)
+ - 1 ) <sup>2</sup> ) / 2 ) ,</p>
+
+ <p>where (a) follows from the fact that the Chernoff bound can
+ be applied to negatively-dependent variables [<a href=
+ "references.html#dubhashi98neg">dubhashi98neg</a>]. Inserting
+ <a href="#prob_of_p1">(2)</a> into <a href=
+ "#at_least_k_i_n_some_bin">(3)</a>, and equating with
+ <i>1/m</i>, we obtain</p>
+
+ <p><i>k ~ &radic; ( 2 &alpha;</i> ln <i>2 m</i> ln<i>(m) )
+ )</i> .</p>
+
+ <h3><a name="imp_pb_ds" id="imp_pb_ds">Implementation</a></h3>
+
+ <p>This sub-subsection describes the implementation of the
+ above in <tt>pb_ds</tt>. It first describes resize policies and
+ their decomposition into trigger and size policies, then
+ describes pre-defined classes, and finally discusses controlled
+ access the policies' internals.</p>
+
+ <h4>Resize Policies and Their Decomposition</h4>
+
+ <p>Each hash-based container is parametrized by a
+ <tt>Resize_Policy</tt> parameter; the container derives
+ <tt><b>public</b></tt>ly from <tt>Resize_Policy</tt>. For
+ example:</p>
+ <pre>
+<a href="cc_hash_table.html">cc_hash_table</a>&lt;
+ <b>typename</b> Key,
+ <b>typename</b> Mapped,
+ ...
+ <b>typename</b> Resize_Policy
+ ...&gt; :
+ <b>public</b> Resize_Policy
+</pre>
+
+ <p>As a container object is modified, it continuously notifies
+ its <tt>Resize_Policy</tt> base of internal changes
+ (<i>e.g.</i>, collisions encountered and elements being
+ inserted). It queries its <tt>Resize_Policy</tt> base whether
+ it needs to be resized, and if so, to what size.</p>
+
+ <p>Figure <a href="#insert_resize_sequence_diagram1">Insert
+ resize sequence diagram</a> shows a (possible) sequence diagram
+ of an insert operation. The user inserts an element; the hash
+ table notifies its resize policy that a search has started
+ (point A); in this case, a single collision is encountered -
+ the table notifies its resize policy of this (point B); the
+ container finally notifies its resize policy that the search
+ has ended (point C); it then queries its resize policy whether
+ a resize is needed, and if so, what is the new size (points D
+ to G); following the resize, it notifies the policy that a
+ resize has completed (point H); finally, the element is
+ inserted, and the policy notified (point I).</p>
+
+ <h6 class="c1"><a name="insert_resize_sequence_diagram1" id=
+ "insert_resize_sequence_diagram1"><img src=
+ "insert_resize_sequence_diagram1.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Insert resize sequence diagram.</h6>
+
+ <p>In practice, a resize policy can be usually orthogonally
+ decomposed to a size policy and a trigger policy. Consequently,
+ the library contains a single class for instantiating a resize
+ policy: <a href=
+ "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ is parametrized by <tt>Size_Policy</tt> and
+ <tt>Trigger_Policy</tt>, derives <tt><b>public</b></tt>ly from
+ both, and acts as a standard delegate [<a href=
+ "references.html#gamma95designpatterns">gamma95designpatterns</a>]
+ to these policies.</p>
+
+ <p>Figures <a href="#insert_resize_sequence_diagram2">Standard
+ resize policy trigger sequence diagram</a> and <a href=
+ "#insert_resize_sequence_diagram3">Standard resize policy size
+ sequence diagram</a> show sequence diagrams illustrating the
+ interaction between the standard resize policy and its trigger
+ and size policies, respectively.</p>
+
+ <h6 class="c1"><a name="insert_resize_sequence_diagram2" id=
+ "insert_resize_sequence_diagram2"><img src=
+ "insert_resize_sequence_diagram2.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Standard resize policy trigger sequence
+ diagram.</h6>
+
+ <h6 class="c1"><a name="insert_resize_sequence_diagram3" id=
+ "insert_resize_sequence_diagram3"><img src=
+ "insert_resize_sequence_diagram3.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Standard resize policy size sequence
+ diagram.</h6>
+
+ <h4>Pre-Defined Policies</h4>
+
+ <p>The library includes the following
+ instantiations of size and trigger policies:</p>
+
+ <ol>
+ <li><a href=
+ "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ implements a load check trigger policy.</li>
+
+ <li><a href=
+ "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
+ implements a collision check trigger policy.</li>
+
+ <li><a href=
+ "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+ implements an exponential-size policy (which should be used
+ with mask range hashing).</li>
+
+ <li><a href=
+ "hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
+ implementing a size policy based on a sequence of primes
+ [<a href="references.html#sgi_stl">sgi_stl</a>] (which should
+ be used with mod range hashing</li>
+ </ol>
+
+ <p>Figure <a href="#resize_policy_cd">Resize policy class
+ diagram</a> gives an overall picture of the resize-related
+ classes. <a href=
+ "basic_hash_table.html"><tt>basic_hash_table</tt></a>
+ is parametrized by <tt>Resize_Policy</tt>, which it subclasses
+ publicly. This class is currently instantiated only by <a href=
+ "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.
+ <a href=
+ "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ itself is parametrized by <tt>Trigger_Policy</tt> and
+ <tt>Size_Policy</tt>. Currently, <tt>Trigger_Policy</tt> is
+ instantiated by <a href=
+ "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>,
+ or <a href=
+ "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>;
+ <tt>Size_Policy</tt> is instantiated by <a href=
+ "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>,
+ or <a href=
+ "hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>.</p>
+
+ <h6 class="c1"><a name="resize_policy_cd" id=
+ "resize_policy_cd"><img src="resize_policy_cd.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Resize policy class diagram.</h6>
+
+ <h4>Controlled Access to Policies' Internals</h4>
+
+ <p>There are cases where (controlled) access to resize
+ policies' internals is beneficial. <i>E.g.</i>, it is sometimes
+ useful to query a hash-table for the table's actual size (as
+ opposed to its <tt>size()</tt> - the number of values it
+ currently holds); it is sometimes useful to set a table's
+ initial size, externally resize it, or change load factors.</p>
+
+ <p>Clearly, supporting such methods both decreases the
+ encapsulation of hash-based containers, and increases the
+ diversity between different associative-containers' interfaces.
+ Conversely, omitting such methods can decrease containers'
+ flexibility.</p>
+
+ <p>In order to avoid, to the extent possible, the above
+ conflict, the hash-based containers themselves do not address
+ any of these questions; this is deferred to the resize policies,
+ which are easier to change or replace. Thus, for example,
+ neither <a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a> nor
+ <a href=
+ "gp_hash_table.html"><tt>gp_hash_table</tt></a>
+ contain methods for querying the actual size of the table; this
+ is deferred to <a href=
+ "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.</p>
+
+ <p>Furthermore, the policies themselves are parametrized by
+ template arguments that determine the methods they support
+ ([<a href=
+ "references.html#alexandrescu01modern">alexandrescu01modern</a>]
+ shows techniques for doing so). <a href=
+ "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ is parametrized by <tt>External_Size_Access</tt> that
+ determines whether it supports methods for querying the actual
+ size of the table or resizing it. <a href=
+ "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ is parametrized by <tt>External_Load_Access</tt> that
+ determines whether it supports methods for querying or
+ modifying the loads. <a href=
+ "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
+ is parametrized by <tt>External_Load_Access</tt> that
+ determines whether it supports methods for querying the
+ load.</p>
+
+ <p>Some operations, for example, resizing a container at
+ run time, or changing the load factors of a load-check trigger
+ policy, require the container itself to resize. As mentioned
+ above, the hash-based containers themselves do not contain
+ these types of methods, only their resize policies.
+ Consequently, there must be some mechanism for a resize policy
+ to manipulate the hash-based container. As the hash-based
+ container is a subclass of the resize policy, this is done
+ through virtual methods. Each hash-based container has a
+ <tt><b>private</b></tt> <tt><b>virtual</b></tt> method:</p>
+ <pre>
+<b>virtual void</b>
+ do_resize
+ (size_type new_size);
+</pre>
+
+ <p>which resizes the container. Implementations of
+ <tt>Resize_Policy</tt> can export public methods for resizing
+ the container externally; these methods internally call
+ <tt>do_resize</tt> to resize the table.</p>
+
+ <h2><a name="policy_interaction" id="policy_interaction">Policy
+ Interaction</a></h2>
+
+ <p>Hash-tables are unfortunately especially susceptible to
+ choice of policies. One of the more complicated aspects of this
+ is that poor combinations of good policies can form a poor
+ container. Following are some considerations.</p>
+
+ <h3><a name="policy_interaction_probe_size_trigger" id=
+ "policy_interaction_probe_size_trigger">Probe Policies, Size
+ Policies, and Trigger Policies</a></h3>
+
+ <p>Some combinations do not work well for probing containers.
+ For example, combining a quadratic probe policy with an
+ exponential size policy can yield a poor container: when an
+ element is inserted, a trigger policy might decide that there
+ is no need to resize, as the table still contains unused
+ entries; the probe sequence, however, might never reach any of
+ the unused entries.</p>
+
+ <p>Unfortunately, <tt>pb_ds</tt> cannot detect such problems at
+ compilation (they are halting reducible). It therefore defines
+ an exception class <a href=
+ "insert_error.html"><tt>insert_error</tt></a> to throw an
+ exception in this case.</p>
+
+ <h3><a name="policy_interaction_hash_trigger" id=
+ "policy_interaction_hash_trigger">Hash Policies and Trigger
+ Policies</a></h3>
+
+ <p>Some trigger policies are especially susceptible to poor
+ hash functions. Suppose, as an extreme case, that the hash
+ function transforms each key to the same hash value. After some
+ inserts, a collision detecting policy will always indicate that
+ the container needs to grow.</p>
+
+ <p>The library, therefore, by design, limits each operation to
+ one resize. For each <tt>insert</tt>, for example, it queries
+ only once whether a resize is needed.</p>
+
+ <h3><a name="policy_interaction_eq_sth_hash" id=
+ "policy_interaction_eq_sth_hash">Equivalence Functors, Storing
+ Hash Values, and Hash Functions</a></h3>
+
+ <p><a href=
+ "cc_hash_table.html"><tt>cc_hash_table</tt></a> and
+ <a href=
+ "gp_hash_table.html"><tt>gp_hash_table</tt></a> are
+ parametrized by an equivalence functor and by a
+ <tt>Store_Hash</tt> parameter. If the latter parameter is
+ <tt><b>true</b></tt>, then the container stores with each entry
+ a hash value, and uses this value in case of collisions to
+ determine whether to apply a hash value. This can lower the
+ cost of collision for some types, but increase the cost of
+ collisions for other types.</p>
+
+ <p>If a ranged-hash function or ranged probe function is
+ directly supplied, however, then it makes no sense to store the
+ hash value with each entry. <tt>pb_ds</tt>'s container will
+ fail at compilation, by design, if this is attempted.</p>
+
+ <h3><a name="policy_interaction_size_load_check" id=
+ "policy_interaction_size_load_check">Size Policies and
+ Load-Check Trigger Policies</a></h3>
+
+ <p>Assume a size policy issues an increasing sequence of sizes
+ <i>a, a q, a q<sup>1</sup>, a q<sup>2</sup>, ...</i> For
+ example, an exponential size policy might issue the sequence of
+ sizes <i>8, 16, 32, 64, ...</i></p>
+
+ <p>If a load-check trigger policy is used, with loads
+ <i>&alpha;<sub>min</sub></i> and <i>&alpha;<sub>max</sub></i>,
+ respectively, then it is a good idea to have:</p>
+
+ <ol>
+ <li><i>&alpha;<sub>max</sub> ~ 1 / q</i></li>
+
+ <li><i>&alpha;<sub>min</sub> &lt; 1 / (2 q)</i></li>
+ </ol>
+
+ <p>This will ensure that the amortized hash cost of each
+ modifying operation is at most approximately 3.</p>
+
+ <p><i>&alpha;<sub>min</sub> ~ &alpha;<sub>max</sub></i> is, in
+ any case, a bad choice, and <i>&alpha;<sub>min</sub> &gt;
+ &alpha;<sub>max</sub></i> is horrendous.</p>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_exponential_size_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_exponential_size_policy.html
index 059fa48d7f5..059fa48d7f5 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_exponential_size_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_exponential_size_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_load_check_resize_trigger.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_load_check_resize_trigger.html
index 0013e0127c0..0013e0127c0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_load_check_resize_trigger.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_load_check_resize_trigger.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_policy_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_policy_cd.png
index f3122a112fc..f3122a112fc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_policy_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_policy_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_prime_size_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_prime_size_policy.html
index cf67dabe078..cf67dabe078 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_prime_size_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_prime_size_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html
index 073c84c2bba..073c84c2bba 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png
index c552506a755..c552506a755 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png
index dbd3ee9d3c0..dbd3ee9d3c0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png
index 8c23d46da39..8c23d46da39 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_erase_mem_usage_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_find_find_timing_test.html
index 7e7f2084b08..7e7f2084b08 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html
index adee8f0b1bd..adee8f0b1bd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html
index 37a8644a496..37a8644a496 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_random_int_subscript_insert_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram.png
index 5c37407dda6..5c37407dda6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png
index 87763caacc7..87763caacc7 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_range_hashing_seq_diagram2.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png
index 5e0d7f4037b..5e0d7f4037b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_ranged_hash_range_hashing_fns.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_standard_resize_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_standard_resize_policy.html
index 70d6086d503..70d6086d503 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_standard_resize_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_standard_resize_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_text_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_text_find_find_timing_test.html
index fafa245a93f..fafa245a93f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_text_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_text_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html
index f7156b1b7a6..f7156b1b7a6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png
index 8d170db1a2a..8d170db1a2a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png
index 0be2f00fa63..0be2f00fa63 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png
index 874e7a780e6..874e7a780e6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/hash_zlob_random_int_find_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/index.html b/libstdc++-v3/doc/html/ext/pb_ds/index.html
new file mode 100644
index 00000000000..4c73c2e915a
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/index.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>Policy-Based Data Structures</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1>Policy-Based Data Structures</h1>
+
+ <h5>Ami Tavory and Vladimir Dreizin, IBM Haifa Research
+ Laboratories, and Benjamin Kosnik, Red Hat</h5>
+
+ <h5><a href="mailto:pbassoc@gmail.com">pbassoc@gmail.com</a></h5>
+
+ <p>This is a library of policy-based elementary
+ data structures: associative containers and priority queues. It
+ is designed for high-performance, flexibility, semantic safety,
+ and conformance to the corresponding containers in <tt>std</tt>
+ and std::tr1 (except for some points where it differs by
+ design).</p>
+
+ <p>The documentation is organized as follows:</p>
+
+ <ol>
+ <li>
+ <a href="introduction.html">Introductory</a>
+
+ <ol>
+ <li><a href="introduction.html">Introduction</a></li>
+
+ <li><a href="motivation.html">Motivation</a></li>
+
+ <li><a href="prerequisites.html">Usage
+ Prerequisites</a></li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="interface.html">Interface</a>
+
+ <ol>
+ <li><a href="tutorial.html">Short Tutorial</a></li>
+
+ <li><a href="concepts.html">Concepts</a></li>
+
+ <li><a href="interface.html">Specifics</a></li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="design.html">Design</a>
+
+ <ol>
+ <li>
+ <a href="assoc_design.html">Associative Containers</a>
+
+ <ol>
+ <li><a href="ds_gen.html">Data-Structure
+ Genericity and Interface</a> </li>
+
+ <li><a href="tree_based_containers.html">Tree-Based
+ Containers</a></li>
+
+ <li><a href="trie_based_containers.html">Trie-Based
+ Containers</a></li>
+
+ <li><a href="hash_based_containers.html">Hash-Based
+ Containers</a></li>
+
+ <li><a href="lu_based_containers.html">List-Based
+ Containers</a> </li>
+ </ol>
+ </li>
+
+ <li><a href="pq_design.html">Priority Queues</a></li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="examples.html">Examples</a>
+
+ <ol>
+ <li><a href="assoc_examples.html">Associative
+ Containers</a></li>
+
+ <li><a href="pq_examples.html">Priority Queues</a></li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="tests.html">Tests</a>
+
+ <ol>
+ <li>
+ <a href="assoc_tests.html">Associative Containers</a>
+
+ <ol>
+ <li><a href="assoc_regression_tests.html">Regression
+ Tests</a></li>
+
+ <li><a href=
+ "assoc_performance_tests.html">Performance
+ Tests</a></li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="pq_tests.html">Priority Queues</a>
+
+ <ol>
+ <li><a href="pq_regression_tests.html">Regression
+ Tests</a></li>
+
+ <li><a href="pq_performance_tests.html">Performance
+ Tests</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+
+ <li>
+ <a href="misc.html">Misc.</a>
+
+ <ol>
+ <li><a href="acks.html">Acknowledgments</a></li>
+
+ <li><a href="contact.html">Contact</a></li>
+
+ <li><a href="disclaimer.html">Disclaimer and
+ Copyright</a></li>
+
+ <li><a href="references.html">References</a></li>
+ </ol>
+ </li>
+ </ol>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/insert_error.html b/libstdc++-v3/doc/html/ext/pb_ds/insert_error.html
index f67160fe582..f67160fe582 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/insert_error.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/insert_error.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram1.png b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram1.png
index f64764ec931..f64764ec931 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram1.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram1.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram2.png b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram2.png
index e4645973eeb..e4645973eeb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram2.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram2.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram3.png b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram3.png
index 5535c5fe603..5535c5fe603 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/insert_resize_sequence_diagram3.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/insert_resize_sequence_diagram3.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/interface.html b/libstdc++-v3/doc/html/ext/pb_ds/interface.html
index a48a8bbadde..a48a8bbadde 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/interface.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/interface.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/introduction.html b/libstdc++-v3/doc/html/ext/pb_ds/introduction.html
index b3ccbd76aee..b3ccbd76aee 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/introduction.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/introduction.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_cd.png
index 1f9d1243c6a..1f9d1243c6a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_erase.png b/libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_erase.png
index 940a27f7142..940a27f7142 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/invalidation_guarantee_erase.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/invalidation_guarantee_erase.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/join_error.html b/libstdc++-v3/doc/html/ext/pb_ds/join_error.html
index 3441e1fb20b..3441e1fb20b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/join_error.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/join_error.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/linear_probe_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/linear_probe_fn.html
index 2141c2657ce..2141c2657ce 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/linear_probe_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/linear_probe_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/list_update.html b/libstdc++-v3/doc/html/ext/pb_ds/list_update.html
index 93785acfd9c..93785acfd9c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/list_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/list_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/list_update_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/list_update_tag.html
index a35dc8cdab8..a35dc8cdab8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/list_update_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/list_update_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/lu.png b/libstdc++-v3/doc/html/ext/pb_ds/lu.png
index 7c96dcaf665..7c96dcaf665 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/lu.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/lu.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/lu_based_containers.html b/libstdc++-v3/doc/html/ext/pb_ds/lu_based_containers.html
index c8693437d9e..c8693437d9e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/lu_based_containers.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/lu_based_containers.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/misc.html b/libstdc++-v3/doc/html/ext/pb_ds/misc.html
index 01029e13454..01029e13454 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/misc.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/misc.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/motivation.html b/libstdc++-v3/doc/html/ext/pb_ds/motivation.html
index 420fc645103..420fc645103 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/motivation.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/motivation.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/move_to_front_lu_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/move_to_front_lu_policy.html
index 35190924e1e..35190924e1e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/move_to_front_lu_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/move_to_front_lu_policy.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large.html
new file mode 100644
index 00000000000..c24acdcf248
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large.html
@@ -0,0 +1,215 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>"Multimap" Text Find Timing Test with Large Average
+ Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Find Timing Test with Large Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 100 distinct primary keys, and the ratio of secondary keys
+ to primary keys ranges to about 20.</p>
+<p>The test measures the average find-time as a function of the
+ number of values inserted. For <tt>pb_ds</tt>'s containers, it
+ finds the secondary key from a container obtained from finding
+ a primary key. For the native multimaps, it searches a range
+ obtained using <tt>std::equal_range</tt> on a primary key.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_find_timing_large.cc"><tt>multimap_text_find_timing_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the find-time scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Mapping Semantics</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_find_timing_test_large_s2p_tree">
+<div id="NTG_assoc">
+<div id="NTG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_find_timing_test_large_s2p_tree">
+<div id="NTM_assoc">
+<div id="NTM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_find_timing_test_large_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_find_timing_test_large_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_find_timing_test_large_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_find_timing_test_large_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png
index 03a62f52b04..03a62f52b04 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png
index 32a61cac9bd..32a61cac9bd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png
index 4462d289afd..4462d289afd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png
index 89e464481fd..89e464481fd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png
index 10b3980edab..10b3980edab 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png
index 20320953e0d..20320953e0d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_large_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small.html
new file mode 100644
index 00000000000..5c0b57706d5
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small.html
@@ -0,0 +1,215 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>"Multimap" Text Find Timing Test with Small Average
+ Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Find Timing Test with Small Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 400 distinct primary keys, and the ratio of secondary keys
+ to primary keys ranges from 1 to 5.</p>
+<p>The test measures the average find-time as a function of the
+ number of values inserted. For <tt>pb_ds</tt>'s containers, it
+ finds the secondary key from a container obtained from finding
+ a primary key. For the native multimaps, it searches a range
+ obtained using <tt>std::equal_range</tt> on a primary key.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_find_timing_small.cc"><tt>multimap_text_find_timing_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 400 1 1 6)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the find-time scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Mapping Semantics</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_find_timing_test_small_s2p_tree">
+<div id="NTG_assoc">
+<div id="NHG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: NHG Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_find_timing_test_small_s2p_tree">
+<div id="NTM_assoc">
+<div id="NHM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_find_timing_test_small_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_find_timing_test_small_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_find_timing_test_small_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_find_timing_test_small_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png
index 60e850937a9..60e850937a9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png
index a8fa261177b..a8fa261177b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png
index 11aa9e07b6a..11aa9e07b6a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png
index f54369b15b4..f54369b15b4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png
index b3d10612f79..b3d10612f79 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png
index 035fd9389b6..035fd9389b6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_find_timing_test_small_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html
new file mode 100644
index 00000000000..c4b1df5c301
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html
@@ -0,0 +1,210 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>Hash-List "Multimap" Text Memory Use Test with Large
+ Average Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Memory Use Test with Large Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 100 distinct primary keys. The test measures the memory use
+ as a function of the number of values inserted.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage_large.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 100 200 2100 100)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the memory scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Mapping Semantics</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_insert_mem_usage_test_large_s2p_tree">
+<div id="NTG_assoc">
+<div id="NHG_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: NHG Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_insert_mem_usage_test_large_s2p_tree">
+<div id="NTM_assoc">
+<div id="NHM_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_insert_mem_usage_test_large_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_insert_mem_usage_test_large_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_insert_mem_usage_test_large_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_insert_mem_usage_test_large_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL__Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png
index 51a3f8d61c1..51a3f8d61c1 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png
index 8af7100c6e7..8af7100c6e7 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png
index 3a938c0bb0f..3a938c0bb0f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png
index a992d8f7cfb..a992d8f7cfb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png
index 63c0c8db797..63c0c8db797 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png
index 26841bd1073..26841bd1073 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html
new file mode 100644
index 00000000000..7b710f309eb
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html
@@ -0,0 +1,212 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>Hash-List "Multimap" Text Memory Use Test with Small
+ Average Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Memory Use Test with Small Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 100 distinct primary keys, and the ratio of secondary keys
+ to primary keys ranges to about 20.</p>
+<p>The test measures the memory use as a function of the number
+ of values inserted.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage_small.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the memory scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Mapping Semantics</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_insert_mem_usage_test_small_s2p_tree">
+<div id="NTG_assoc">
+<div id="NTG_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_insert_mem_usage_test_small_s2p_tree">
+<div id="NTM_assoc">
+<div id="NHM_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_insert_mem_usage_test_small_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_insert_mem_usage_test_small_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_insert_mem_usage_test_small_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_insert_mem_usage_test_small_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL__Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png
index d3eba9da47e..d3eba9da47e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png
index 589dccdefa9..589dccdefa9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png
index 1828896ee5f..1828896ee5f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png
index 9334bc35bc7..9334bc35bc7 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png
index d7322f287a8..d7322f287a8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png
index 2f20e57e555..2f20e57e555 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large.html
new file mode 100644
index 00000000000..ecdf2a49708
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large.html
@@ -0,0 +1,212 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>"Multimap" Text Insert Timing Test with Large Average
+ Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Insert Timing Test with Large Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 100 distinct primary keys, and the ratio of secondary keys
+ to primary keys ranges to about 20.</p>
+<p>The test measures the memory use as a function of the number
+ of values inserted.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage_large.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 400 1 6 6)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the insert-time scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Mapping Semantics</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_insert_timing_test_large_s2p_tree">
+<div id="NTG_assoc">
+<div id="NTG_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_timing_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_insert_timing_test_large_s2p_tree">
+<div id="NTM_assoc">
+<div id="NHM_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_timing_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_insert_timing_test_large_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_timing_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_insert_timing_test_large_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_timing_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_insert_timing_test_large_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_timing_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_insert_timing_test_large_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL__Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_timing_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png
index 55b0bf46732..55b0bf46732 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png
index 5f89460087a..5f89460087a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png
index 02f5d0b20ae..02f5d0b20ae 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png
index 83366eb3756..83366eb3756 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png
index 2b496b48d78..2b496b48d78 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png
index 47196bff7f2..47196bff7f2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_large_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small.html b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small.html
new file mode 100644
index 00000000000..ae0bd0bb36b
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small.html
@@ -0,0 +1,217 @@
+<!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" xml:lang="en" lang="en">
+<head>
+<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+<title>"Multimap" Text Insert Timing Test with Small Average
+ Secondary-Key to Primary-Key Ratio</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<div id="page">
+<h1>"Multimap" Text Insert Timing Test with Small Average
+ Secondary-Key to Primary-Key Ratio</h1>
+<h2><a name="description" id="description">Description</a></h2>
+<p>This test inserts a number of pairs into a container. The
+ first item of each pair is a string from an arbitrary text
+ [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
+ the second is a uniform i.i.d.integer. The container is a
+ "multimap" - it considers the first member of each pair as a
+ primary key, and the second member of each pair as a secondary
+ key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>). There
+ are 400 distinct primary keys, and the ratio of secondary keys
+ to primary keys ranges from 1 to 5.</p>
+<p>The test measures the average insert-time as a function of
+ the number of values inserted. For <tt>pb_ds</tt>'s containers,
+ it inserts a primary key into the primary associative
+ container, then a secondary key into the secondary associative
+ container. For the native multimaps, it obtains a range using
+ <tt>std::equal_range</tt>, and inserts a value only if it was
+ not contained already.</p>
+<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_timing_small.cc"><tt>multimap_text_insert_timing_test</tt></a>
+ thirty_years_among_the_dead_preproc.txt 400 1 1 6)</p>
+<h2><a name="purpose" id="purpose">Purpose</a></h2>
+<p>The test checks the insert-time scalability of different
+ "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
+ Containers::Alternative to Multiple Equivalent Keys</a>).</p>
+<h2><a name="results" id="results">Results</a></h2>
+<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
+ <a href="#NTL">NTL</a> show the results for "multimaps" which
+ use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
+ <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
+ "multimaps" which use a hash-based container for primary keys,
+ in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
+ <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
+ and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
+ respectively.</p>
+<div id="NTG_res_div">
+<div id="NTG_gcc">
+<div id="NTG_multimap_text_insert_timing_test_small_s2p_tree">
+<div id="NTG_assoc">
+<div id="NTG_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_timing_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTM_res_div">
+<div id="NTM_msvc">
+<div id="NTM_multimap_text_insert_timing_test_small_s2p_tree">
+<div id="NTM_assoc">
+<div id="NHM_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_timing_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_mmap-
+<tt>std::multimap</tt></li>
+<li>
+rb_tree_mmap_lu_mtf_set-
+<a href="tree.html"><tt>tree</tt></a>
+ with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
+, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
+, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NTL_res_div">
+<div id="NTL_local">
+<div id="NTL_multimap_text_insert_timing_test_small_s2p_tree">
+<div id="NTL_assoc">
+<div id="NTL_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_timing_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHG_res_div">
+<div id="NHG_gcc">
+<div id="NHG_multimap_text_insert_timing_test_small_s2p_hash">
+<div id="NHG_assoc">
+<div id="NHG_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_timing_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+n_hash_mmap-
+<tt>__gnucxx::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHM_res_div">
+<div id="NHM_msvc">
+<div id="NHM_multimap_text_insert_timing_test_small_s2p_hash">
+<div id="NHM_assoc">
+<div id="NHM_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_timing_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
+<ol>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
+<li>
+n_hash_mmap-
+<tt>stdext::hash_multimap</tt></li>
+<li>
+cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
+<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
+with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
+, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
+ with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
+, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
+ with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
+ with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
+</li>
+</ol>
+</div><div style="width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<div id="NHL_res_div">
+<div id="NHL_local">
+<div id="NHL_multimap_text_insert_timing_test_small_s2p_hash">
+<div id="NHL_assoc">
+<div id="NHL_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_timing_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
+</div>
+</div>
+</div>
+</div>
+<h2><a name="observations" id="observations">Observations</a></h2>
+<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
+ Considerations</a>.</p>
+</div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png
index 3c2d87ecfac..3c2d87ecfac 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png
index 4af78faa524..4af78faa524 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png
index 81d5839044e..81d5839044e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png
index 368f07350c2..368f07350c2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png
index 40b5b2c4327..40b5b2c4327 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png
index 99f2d690fa5..99f2d690fa5 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small_s2p_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/node_invariant_invalidations.png b/libstdc++-v3/doc/html/ext/pb_ds/node_invariant_invalidations.png
index bbd91842ba8..bbd91842ba8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/node_invariant_invalidations.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/node_invariant_invalidations.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/node_invariants.png b/libstdc++-v3/doc/html/ext/pb_ds/node_invariants.png
index b375f5168d7..b375f5168d7 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/node_invariants.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/node_invariants.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_hash_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/null_hash_fn.html
index 5d952245975..5d952245975 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_hash_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_hash_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_lu_metadata.html b/libstdc++-v3/doc/html/ext/pb_ds/null_lu_metadata.html
index 1cbf9cc347d..1cbf9cc347d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_lu_metadata.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_lu_metadata.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_mapped_type.html b/libstdc++-v3/doc/html/ext/pb_ds/null_mapped_type.html
index 5be7359e09f..5be7359e09f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_mapped_type.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_mapped_type.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_probe_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/null_probe_fn.html
index af9379b8cf3..af9379b8cf3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_probe_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_probe_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_tree_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/null_tree_node_update.html
index 98960ed9bf9..98960ed9bf9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_tree_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_tree_node_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/null_trie_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/null_trie_node_update.html
index c6c0844bc60..c6c0844bc60 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/null_trie_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/null_trie_node_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/ov_tree_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/ov_tree_tag.html
index 8da2d50d015..8da2d50d015 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/ov_tree_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/ov_tree_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_heap_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/pairing_heap_tag.html
index 756e886b6e6..756e886b6e6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_heap_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_heap_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png
index 4168787ecad..4168787ecad 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png
index 97ca4e9daad..97ca4e9daad 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png
index 42b707965ff..42b707965ff 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_pop_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png
index 9a7ce6c361f..9a7ce6c361f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png
index cedcb4cf4b2..cedcb4cf4b2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png
index d5488efcf48..d5488efcf48 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pairing_priority_queue_text_push_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pat_trie.png b/libstdc++-v3/doc/html/ext/pb_ds/pat_trie.png
index e7129a1a67b..e7129a1a67b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pat_trie.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pat_trie.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pat_trie_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/pat_trie_tag.html
index 459546df778..459546df778 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pat_trie_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pat_trie_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/point_invalidation_guarantee.html b/libstdc++-v3/doc/html/ext/pb_ds/point_invalidation_guarantee.html
index ba2eee6dfc4..ba2eee6dfc4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/point_invalidation_guarantee.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/point_invalidation_guarantee.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_cd.png
index 25a69fc6e8b..25a69fc6e8b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_1.png b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_1.png
index c5bc8e5d6c0..c5bc8e5d6c0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_1.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_1.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_2.png b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_2.png
index c3f94ee93bc..c3f94ee93bc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/point_iterators_range_ops_2.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/point_iterators_range_ops_2.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_container_traits.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_container_traits.html
index 2ff5ed7c644..2ff5ed7c644 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_container_traits.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_container_traits.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/pq_design.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_design.html
new file mode 100644
index 00000000000..95956004527
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_design.html
@@ -0,0 +1,381 @@
+<!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" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>Priority-Queues</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1>Priority-Queue Design</h1>
+
+ <h2><a name="overview" id="overview">Overview</a></h2>
+
+ <p>The priority-queue container has the following
+ declaration:</p>
+ <pre>
+<b>template</b>&lt;
+ <b>typename</b> Value_Type,
+ <b>typename</b> Cmp_Fn = std::less&lt;Value_Type&gt;,
+ <b>typename</b> Tag = <a href="pairing_heap_tag.html">pairing_heap_tag</a>,
+ <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
+<b>class</b> <a href="priority_queue.html">priority_queue</a>;
+</pre>
+
+ <p>The parameters have the following meaning:</p>
+
+ <ol>
+ <li><tt>Value_Type</tt> is the value type.</li>
+
+ <li><tt>Cmp_Fn</tt> is a value comparison functor</li>
+
+ <li><tt>Tag</tt> specifies which underlying data structure
+ to use.</li>
+
+ <li><tt>Allocator</tt> is an allocator
+ type.</li>
+ </ol>
+
+ <p>The <tt>Tag</tt> parameter specifies which underlying
+ data structure to use. Instantiating it by <a href=
+ "pairing_heap_tag.html"><tt>pairing_heap_tag</tt></a>,
+ <a href=
+ "binary_heap_tag.html"><tt>binary_heap_tag</tt></a>,
+ <a href=
+ "binomial_heap_tag.html"><tt>binomial_heap_tag</tt></a>,
+ <a href=
+ "rc_binomial_heap_tag.html"><tt>rc_binomial_heap_tag</tt></a>,
+ or <a href=
+ "thin_heap_tag.html"><tt>thin_heap_tag</tt></a>,
+ specifies, respectively, an underlying pairing heap [<a href=
+ "references.html#fredman86pairing">fredman86pairing</a>],
+ binary heap [<a href="references.html#clrs2001">clrs2001</a>],
+ binomial heap [<a href=
+ "references.html#clrs2001">clrs2001</a>], a binomial heap with
+ a redundant binary counter [<a href=
+ "references.html#maverik_lowerbounds">maverik_lowerbounds</a>],
+ or a thin heap [<a href=
+ "references.html#kt99fat_heaps">kt99fat_heas</a>]. These are
+ explained further in <a href="#pq_imp">Implementations</a>.</p>
+
+ <p>As mentioned in <a href=
+ "tutorial.html#pq">Tutorial::Priority Queues</a>,
+ <a href=
+ "priority_queue.html"><tt>__gnu_pbds::priority_queue</tt></a>
+ shares most of the same interface with <tt>std::priority_queue</tt>.
+ <i>E.g.</i> if <tt>q</tt> is a priority queue of type
+ <tt>Q</tt>, then <tt>q.top()</tt> will return the "largest"
+ value in the container (according to <tt><b>typename</b>
+ Q::cmp_fn</tt>). <a href=
+ "priority_queue.html"><tt>__gnu_pbds::priority_queue</tt></a>
+ has a larger (and very slightly different) interface than
+ <tt>std::priority_queue</tt>, however, since typically
+ <tt>push</tt> and <tt>pop</tt> are deemed insufficient for
+ manipulating priority-queues. </p>
+
+ <p>Different settings require different priority-queue
+ implementations which are described in <a href=
+ "#pq_imp">Implementations</a>; <a href="#pq_traits">Traits</a>
+ discusses ways to differentiate between the different traits of
+ different implementations.</p>
+
+ <h2><a name="pq_it" id="pq_it">Iterators</a></h2>
+
+ <p>There are many different underlying-data structures for
+ implementing priority queues. Unfortunately, most such
+ structures are oriented towards making <tt>push</tt> and
+ <tt>top</tt> efficient, and consequently don't allow efficient
+ access of other elements: for instance, they cannot support an efficient
+ <tt>find</tt> method. In the use case where it
+ is important to both access and "do something with" an
+ arbitrary value, one would be out of luck. For example, many graph algorithms require
+ modifying a value (typically increasing it in the sense of the
+ priority queue's comparison functor).</p>
+
+ <p>In order to access and manipulate an arbitrary value in a
+ priority queue, one needs to reference the internals of the
+ priority queue from some form of an associative container -
+ this is unavoidable. Of course, in order to maintain the
+ encapsulation of the priority queue, this needs to be done in a
+ way that minimizes exposure to implementation internals.</p>
+
+ <p>In <tt>pb_ds</tt> the priority queue's <tt>insert</tt>
+ method returns an iterator, which if valid can be used for subsequent <tt>modify</tt> and
+ <tt>erase</tt> operations. This both preserves the priority
+ queue's encapsulation, and allows accessing arbitrary values (since the
+ returned iterators from the <tt>push</tt> operation can be
+ stored in some form of associative container).</p>
+
+ <p>Priority queues' iterators present a problem regarding their
+ invalidation guarantees. One assumes that calling
+ <tt><b>operator</b>++</tt> on an iterator will associate it
+ with the "next" value. Priority-queues are
+ self-organizing: each operation changes what the "next" value
+ means. Consequently, it does not make sense that <tt>push</tt>
+ will return an iterator that can be incremented - this can have
+ no possible use. Also, as in the case of hash-based containers,
+ it is awkward to define if a subsequent <tt>push</tt> operation
+ invalidates a prior returned iterator: it invalidates it in the
+ sense that its "next" value is not related to what it
+ previously considered to be its "next" value. However, it might not
+ invalidate it, in the sense that it can be
+ de-referenced and used for <tt>modify</tt> and <tt>erase</tt>
+ operations.</p>
+
+ <p>Similarly to the case of the other unordered associative
+ containers, <tt>pb_ds</tt> uses a distinction between
+ point-type and range type iterators. A priority queue's <tt>iterator</tt> can always be
+ converted to a <tt>point_iterator</tt>, and a
+ <tt>const_iterator</tt> can always be converted to a
+ <tt>const_point_iterator</tt>.</p>
+
+ <p>The following snippet demonstrates manipulating an arbitrary
+ value:</p>
+ <pre>
+<i>// A priority queue of integers.</i>
+<a href=
+"priority_queue.html">priority_queue</a>&lt;<b>int</b>&gt; p;
+
+<i>// Insert some values into the priority queue.</i>
+<a href=
+"priority_queue.html">priority_queue</a>&lt;<b>int</b>&gt;::point_iterator it = p.push(0);
+
+p.push(1);
+p.push(2);
+
+<i>// Now modify a value.</i>
+p.modify(it, 3);
+
+assert(p.top() == 3);
+</pre>
+
+ <p>(<a href="pq_examples.html#xref">Priority Queue
+ Examples::Cross-Referencing</a> shows a more detailed
+ example.)</p>
+
+ <p>It should be noted that an alternative design could embed an
+ associative container in a priority queue. Could, but most probably should not. To begin with, it should be noted that one
+ could always encapsulate a priority queue and an associative
+ container mapping values to priority queue iterators with no
+ performance loss. One cannot, however, "un-encapsulate" a
+ priority queue embedding an associative container, which might
+ lead to performance loss. Assume, that one needs to
+ associate each value with some data unrelated to priority
+ queues. Then using <tt>pb_ds</tt>'s design, one could use an
+ associative container mapping each value to a pair consisting
+ of this data and a priority queue's iterator. Using the
+ embedded method would need to use two associative
+ containers. Similar problems might arise in cases where a value
+ can reside simultaneously in many priority queues.</p>
+
+ <h2><a name="pq_imp" id="pq_imp">Implementations</a></h2>
+
+ <p>There are three main implementations of priority queues: the
+ first employs a binary heap, typically one which uses a
+ sequence; the second uses a tree (or forest of trees), which is
+ typically less structured than an associative container's tree;
+ the third simply uses an associative container. These are
+ shown, respectively, in Figures <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> A1 and A2, Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> B, and Figures <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> C.</p>
+
+ <h6 class="c1"><a name="pq_different_underlying_dss" id=
+ "pq_different_underlying_dss"><img src=
+ "pq_different_underlying_dss.png" alt="no image" /></a></h6>
+
+ <h6 class="c1">Underlying Priority-Queue Data-Structures.</h6>
+
+ <p>Roughly speaking, any value that is both pushed and popped
+ from a priority queue must incur a logarithmic expense (in the
+ amortized sense). Any priority queue implementation that would
+ avoid this, would violate known bounds on comparison-based
+ sorting (see, <i>e.g.</i>, [<a href=
+ "references.html#clrs2001">clrs2001</a>] and <a href=
+ "references.html#brodal96priority">brodal96priority</a>]).</p>
+
+ <p>Most implementations do
+ not differ in the asymptotic amortized complexity of
+ <tt>push</tt> and <tt>pop</tt> operations, but they differ in
+ the constants involved, in the complexity of other operations
+ (<i>e.g.</i>, <tt>modify</tt>), and in the worst-case
+ complexity of single operations. In general, the more
+ "structured" an implementation (<i>i.e.</i>, the more internal
+ invariants it possesses) - the higher its amortized complexity
+ of <tt>push</tt> and <tt>pop</tt> operations.</p>
+
+ <p><tt>pb_ds</tt> implements different algorithms using a
+ single class: <a href="priority_queue.html">priority_queue</a>.
+ Instantiating the <tt>Tag</tt> template parameter, "selects"
+ the implementation:</p>
+
+ <ol>
+ <li>Instantiating <tt>Tag = <a href=
+ "binary_heap_tag.html">binary_heap_tag</a></tt> creates
+ a binary heap of the form in Figures <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> A1 or A2. The former is internally
+ selected by <a href="priority_queue.html">priority_queue</a>
+ if <tt>Value_Type</tt> is instantiated by a primitive type
+ (<i>e.g.</i>, an <tt><b>int</b></tt>); the latter is
+ internally selected for all other types (<i>e.g.</i>,
+ <tt>std::string</tt>). This implementations is relatively
+ unstructured, and so has good <tt>push</tt> and <tt>pop</tt>
+ performance; it is the "best-in-kind" for primitive
+ types, <i>e.g.</i>, <tt><b>int</b></tt>s. Conversely, it has
+ high worst-case performance, and can support only linear-time
+ <tt>modify</tt> and <tt>erase</tt> operations; this is
+ explained further in <a href="#pq_traits">Traits</a>.</li>
+
+ <li>Instantiating <tt>Tag = <a href=
+ "pairing_heap_tag.html">pairing_heap_tag</a></tt>
+ creates a pairing heap of the form in Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> B. This implementations too is relatively
+ unstructured, and so has good <tt>push</tt> and <tt>pop</tt>
+ performance; it is the "best-in-kind" for non-primitive
+ types, <i>e.g.</i>, <tt>std:string</tt>s. It also has very
+ good worst-case <tt>push</tt> and <tt>join</tt> performance
+ (<i>O(1)</i>), but has high worst-case <tt>pop</tt>
+ complexity.</li>
+
+ <li>Instantiating <tt>Tag = <a href=
+ "binomial_heap_tag.html">binomial_heap_tag</a></tt>
+ creates a binomial heap of the form in Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> B. This implementations is more
+ structured than a pairing heap, and so has worse
+ <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
+ has sub-linear worst-case bounds for <tt>pop</tt>,
+ <i>e.g.</i>, and so it might be preferred in cases where
+ responsiveness is important.</li>
+
+ <li>Instantiating <tt>Tag = <a href=
+ "rc_binomial_heap_tag.html">rc_binomial_heap_tag</a></tt>
+ creates a binomial heap of the form in Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> B, accompanied by a redundant counter
+ which governs the trees. This implementations is therefore
+ more structured than a binomial heap, and so has worse
+ <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
+ guarantees <i>O(1)</i> <tt>push</tt> complexity, and so it
+ might be preferred in cases where the responsiveness of a
+ binomial heap is insufficient.</li>
+
+ <li>Instantiating <tt>Tag = <a href=
+ "thin_heap_tag.html">thin_heap_tag</a></tt> creates a
+ thin heap of the form in Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> B. This implementations too is more
+ structured than a pairing heap, and so has worse
+ <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
+ has better worst-case and identical amortized complexities
+ than a Fibonacci heap, and so might be more appropriate for
+ some graph algorithms.</li>
+ </ol>
+
+ <p><a href="pq_performance_tests.html">Priority-Queue
+ Performance Tests</a> shows some results for the above, and
+ discusses these points further.</p>
+
+ <p>Of course, one can use any order-preserving associative
+ container as a priority queue, as in Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> C, possibly by creating an adapter class
+ over the associative container (much as
+ <tt>std::priority_queue</tt> can adapt <tt>std::vector</tt>).
+ This has the advantage that no cross-referencing is necessary
+ at all; the priority queue itself is an associative container.
+ Most associative containers are too structured to compete with
+ priority queues in terms of <tt>push</tt> and <tt>pop</tt>
+ performance.</p>
+
+ <h2><a name="pq_traits" id="pq_traits">Traits</a></h2>
+
+ <p>It would be nice if all priority queues could
+ share exactly the same behavior regardless of implementation. Sadly, this is not possible. Just one for instance is in join operations: joining
+ two binary heaps might throw an exception (not corrupt
+ any of the heaps on which it operates), but joining two pairing
+ heaps is exception free.</p>
+
+ <p>Tags and traits are very useful for manipulating generic
+ types. <a href=
+ "priority_queue.html"><tt>__gnu_pbds::priority_queue</tt></a>
+ publicly defines <tt>container_category</tt> as one of the tags
+ discussed in <a href="#pq_imp">Implementations</a>. Given any
+ container <tt>Cntnr</tt>, the tag of the underlying
+ data structure can be found via <tt><b>typename</b>
+ Cntnr::container_category</tt>; this is one of the types shown in
+ Figure <a href="#pq_tag_cd">Data-structure tag class
+ hierarchy</a>.</p>
+
+ <h6 class="c1"><a name="pq_tag_cd" id=
+ "pq_tag_cd"><img src="priority_queue_tag_cd.png" alt=
+ "no image" /></a></h6>
+
+ <h6 class="c1">Data-structure tag class hierarchy.</h6>
+
+ <p>Additionally, a traits mechanism can be used to query a
+ container type for its attributes. Given any container
+ <tt>Cntnr</tt>, then <tt><a href=
+ "assoc_container_traits.html">__gnu_pbds::container_traits</a>&lt;Cntnr&gt;</tt>
+ is a traits class identifying the properties of the
+ container.</p>
+
+ <p>To find if a container might throw if two of its objects are
+ joined, one can use <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>,
+ for example.</p>
+
+ <p>Different priority-queue implementations have different invalidation guarantees. This is
+ especially important, since as explained in <a href=
+ "#pq_it">Iterators</a>, there is no way to access an arbitrary
+ value of priority queues except for iterators. Similarly to
+ associative containers, one can use
+ <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::invalidation_guarantee</tt>
+ to get the invalidation guarantee type of a priority queue.</p>
+
+ <p>It is easy to understand from Figure <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a>, what <a href=
+ "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::invalidation_guarantee</tt>
+ will be for different implementations. All implementations of
+ type <a href="#pq_different_underlying_dss">Underlying
+ Priority-Queue Data-Structures</a> B have <a href=
+ "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>:
+ the container can freely internally reorganize the nodes -
+ range-type iterators are invalidated, but point-type iterators
+ are always valid. Implementations of type <a href=
+ "#pq_different_underlying_dss">Underlying Priority-Queue
+ Data-Structures</a> A1 and A2 have <a href=
+ "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>:
+ the container can freely internally reallocate the array - both
+ point-type and range-type iterators might be invalidated.</p>
+
+ <p>This has major implications, and constitutes a good reason to avoid
+ using binary heaps. A binary heap can perform <tt>modify</tt>
+ or <tt>erase</tt> efficiently <u>given a valid point-type
+ iterator</u>. However, inn order to supply it with a valid point-type
+ iterator, one needs to iterate (linearly) over all
+ values, then supply the relevant iterator (recall that a
+ range-type iterator can always be converted to a point-type
+ iterator). This means that if the number of <tt>modify</tt> or
+ <tt>erase</tt> operations is non-negligible (say
+ super-logarithmic in the total sequence of operations) - binary
+ heaps will perform badly.</p>
+ <pre>
+
+</pre>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_different_underlying_dss.png b/libstdc++-v3/doc/html/ext/pb_ds/pq_different_underlying_dss.png
index 9d84791fc0d..9d84791fc0d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_different_underlying_dss.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_different_underlying_dss.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_examples.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_examples.html
index ee8e9305486..ee8e9305486 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_examples.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_examples.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_performance_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_performance_tests.html
index 3a6b2691208..3a6b2691208 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_performance_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_performance_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_regression_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_regression_tests.html
index 1e894ca6edb..1e894ca6edb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_regression_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_regression_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_tests.html b/libstdc++-v3/doc/html/ext/pb_ds/pq_tests.html
index de8cb447c71..de8cb447c71 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/pq_tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/prerequisites.html b/libstdc++-v3/doc/html/ext/pb_ds/prerequisites.html
index 7c888849918..7c888849918 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/prerequisites.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/prerequisites.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue.html
index 169953f6d59..169953f6d59 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html
index e9aec9ceb04..e9aec9ceb04 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png
index 68f5e2b6bdb..68f5e2b6bdb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png
index 51f8211f1d4..51f8211f1d4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png
index 4fc191c8b1c..4fc191c8b1c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_pop_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html
index 65323029bac..65323029bac 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png
index ee8c9b7d9a9..ee8c9b7d9a9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png
index dead185fa4f..dead185fa4f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png
index 0a1a8eaefbc..0a1a8eaefbc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_random_int_push_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag.html
index 4bad6ee6e82..4bad6ee6e82 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.png
index ed8d875f0f8..ed8d875f0f8 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.svg b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.svg
index be007aecb8d..be007aecb8d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_tag_cd.svg
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_tag_cd.svg
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test.html
index 4710ea96bcf..4710ea96bcf 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png
index a48bb358605..a48bb358605 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png
index 1701b4d8a61..1701b4d8a61 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png
index 0575b99c0c3..0575b99c0c3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_join_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html
index 6935957207c..6935957207c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png
index 74cbc652369..74cbc652369 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png
index 2fa9c798804..2fa9c798804 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png
index 20b66373667..20b66373667 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png
index ca901831eff..ca901831eff 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png
index 977d167186c..977d167186c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png
index bf68bf99292..bf68bf99292 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_down_timing_test_pairing_thin_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html
index 3db4639baa6..3db4639baa6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png
index d9dedc20cf4..d9dedc20cf4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png
index 31575b452d3..31575b452d3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png
index 4005547c812..4005547c812 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png
index 1aa5aba94bf..1aa5aba94bf 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png
index b878dde665c..b878dde665c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png
index 740594384cb..740594384cb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_modify_up_timing_test_pairing_thin_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html
index 8b5388e1770..8b5388e1770 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png
index 2c1918d0623..2c1918d0623 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png
index c1413fc93d6..c1413fc93d6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png
index 9717f498b7a..9717f498b7a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_pop_mem_usage_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html
index 02fe32183a4..02fe32183a4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png
index d4886ae5967..d4886ae5967 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png
index a7c5f8987ae..a7c5f8987ae 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png
index a5720402b3b..a5720402b3b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_pop_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test.html
index 67ae4b9d510..67ae4b9d510 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png
index 8895f507cfc..8895f507cfc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png
index da7297bffa9..da7297bffa9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png
index ff39ca37dd9..ff39ca37dd9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/priority_queue_text_push_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/quadratic_probe_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/quadratic_probe_fn.html
index f3209d33881..f3209d33881 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/quadratic_probe_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/quadratic_probe_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png
index 61962704f71..61962704f71 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png
index 83105202a48..83105202a48 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png
index 2206cef5a90..2206cef5a90 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/random_int_find_find_timing_test_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/range_invalidation_guarantee.html b/libstdc++-v3/doc/html/ext/pb_ds/range_invalidation_guarantee.html
index e59a257a540..e59a257a540 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/range_invalidation_guarantee.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/range_invalidation_guarantee.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/rationale_null_node_updator.png b/libstdc++-v3/doc/html/ext/pb_ds/rationale_null_node_updator.png
index 43874891517..43874891517 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/rationale_null_node_updator.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/rationale_null_node_updator.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/rb_tree_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/rb_tree_tag.html
index 600235d5e8d..600235d5e8d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/rb_tree_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/rb_tree_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/rc_binomial_heap_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/rc_binomial_heap_tag.html
index 46106f4c585..46106f4c585 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/rc_binomial_heap_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/rc_binomial_heap_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/references.html b/libstdc++-v3/doc/html/ext/pb_ds/references.html
index b96827bd37a..b96827bd37a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/references.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/references.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/resize_error.html b/libstdc++-v3/doc/html/ext/pb_ds/resize_error.html
index cb05b504fb9..cb05b504fb9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/resize_error.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/resize_error.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/resize_policy_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/resize_policy_cd.png
index 338e33c15cc..338e33c15cc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/resize_policy_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/resize_policy_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/restoring_node_invariants.png b/libstdc++-v3/doc/html/ext/pb_ds/restoring_node_invariants.png
index 33ba84bfe33..33ba84bfe33 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/restoring_node_invariants.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/restoring_node_invariants.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_probe_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_probe_fn.html
index 3d18650c3b3..3d18650c3b3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_probe_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_probe_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_range_hashing.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_range_hashing.html
index 5b1a90023a2..5b1a90023a2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_range_hashing.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_range_hashing.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_hash_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_hash_fn.html
index f8e47ab64c2..f8e47ab64c2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_hash_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_hash_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_probe_fn.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_probe_fn.html
index b0e744cd331..b0e744cd331 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_ranged_probe_fn.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_ranged_probe_fn.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_resize_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_policy.html
index 7807ace1daa..7807ace1daa 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_resize_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_resize_trigger.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_trigger.html
index d7042bc2c23..d7042bc2c23 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_resize_trigger.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_resize_trigger.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_size_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_size_policy.html
index e7f58e7e4c4..e7f58e7e4c4 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_size_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_size_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_tree_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_tree_node_update.html
index 2cfab0a24f3..2cfab0a24f3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_tree_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_tree_node_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_trie_e_access_traits.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_trie_e_access_traits.html
index b663e508758..b663e508758 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_trie_e_access_traits.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_trie_e_access_traits.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_trie_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_trie_node_update.html
index beab37cd9cd..beab37cd9cd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_trie_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_trie_node_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/sample_update_policy.html b/libstdc++-v3/doc/html/ext/pb_ds/sample_update_policy.html
index f671bcdc25a..f671bcdc25a 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/sample_update_policy.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/sample_update_policy.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/simple_list.png b/libstdc++-v3/doc/html/ext/pb_ds/simple_list.png
index 9a05d3f5e4f..9a05d3f5e4f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/simple_list.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/simple_list.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/splay_tree_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/splay_tree_tag.html
index 98c56ce695f..98c56ce695f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/splay_tree_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/splay_tree_tag.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/string_trie_e_access_traits.html b/libstdc++-v3/doc/html/ext/pb_ds/string_trie_e_access_traits.html
new file mode 100644
index 00000000000..10fa2af1c9d
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/string_trie_e_access_traits.html
@@ -0,0 +1,400 @@
+<!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" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>string_trie_e_access_traits Interface</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1><tt>string_trie_e_access_traits</tt> Interface</h1>
+
+ <p>Element access traits for string types.</p>
+
+ <p>Defined in: <a href=
+ "../../../../include/ext/pb_ds/trie_policy.hpp"><tt>trie_policy.hpp</tt></a></p>
+
+ <h2><a name="link1" id="link1">Template Parameters</a></h2>
+
+ <table class="c1" width="100%" border="1" summary=
+ "Template Parameters">
+ <tr>
+ <td width="20%" align="left"><b>Parameter</b></td>
+
+ <td width="50%" align="left"><b>Description</b></td>
+
+ <td width="30%" align="left"><b>Default Value</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="String349403" id="String349403"><b>class</b> String </a>
+</pre>
+ </td>
+
+ <td>
+ <p>String type.</p>
+ </td>
+
+ <td><tt>std::string</tt></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Min_E_Val40354618" id=
+"Min_E_Val40354618"><b>typename</b> </a><a href=
+"#String349403"><tt>String</tt></a>::value_type Min_E_Val
+</pre>
+ </td>
+
+ <td>
+ <p>Minimal element.</p>
+ </td>
+
+ <td><tt>SCHAR_MIN</tt></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Max_E_Val39885868" id=
+"Max_E_Val39885868"><b>typename</b> </a><a href=
+"#String349403"><tt>String</tt></a>::value_type Max_E_Val
+</pre>
+ </td>
+
+ <td>
+ <p>Maximal element.</p>
+ </td>
+
+ <td><tt>SCHAR_MAX</tt></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Reverse1686776" id=
+"Reverse1686776"><b>bool</b> Reverse </a>
+</pre>
+ </td>
+
+ <td>
+ <p>Indicates whether reverse iteration should be
+ used.</p>
+ </td>
+
+ <td><tt><b>false</b></tt></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Allocator35940069" id=
+"Allocator35940069"><b>class</b> Allocator </a>
+</pre>
+ </td>
+
+ <td>
+ <p>Allocator type.</p>
+ </td>
+
+ <td>
+ <pre>
+std::allocator&lt;<b>char</b>&gt;
+</pre>
+ </td>
+ </tr>
+ </table>
+
+ <h2><a name="link2" id="link2">Public Types and
+ Constants</a></h2>
+
+ <h3><a name="link3" id="link3">General Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="size_type55424436" id="size_type55424436">size_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#Allocator35940069"><tt>Allocator</tt></a>::size_type
+</pre>
+ </td>
+
+ <td>
+ <p>Size type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link4" id="link4">Key-Type Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="key_type10393186" id="key_type10393186">key_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#String349403"><tt>String</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Key type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_key_reference3185471705" id=
+"const_key_reference3185471705">const_key_reference</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#Allocator35940069"><tt>Allocator</tt></a>::<b>template</b> rebind&lt;
+ <a href=
+"#key_type10393186"><tt>key_type</tt></a>&gt;::other::const_reference
+</pre>
+ </td>
+
+ <td>
+ <p>Const key reference type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link5" id="link5">Element-Type
+ Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="reverse2186776" id="reverse2186776">reverse</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#Reverse1686776"><tt>Reverse</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p><a href="#Reverse1686776"><tt>Reverse</tt></a>
+ iteration indicator.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_iterator98626788" id=
+"const_iterator98626788">const_iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> __gnu_pbds::detail::__conditional_type&lt;
+ <a href="#Reverse1686776"><tt>Reverse</tt></a>,
+ <b>typename</b> <a href=
+"#String349403"><tt>String</tt></a>::const_reverse_iterator,
+ <b>typename</b> <a href=
+"#String349403"><tt>String</tt></a>::const_iterator&gt;::__type
+</pre>
+ </td>
+
+ <td>
+ <p>Element <tt><b>const</b></tt> iterator type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="e_type393186" id="e_type393186">e_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> std::iterator_traits&lt;<a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;::value_type
+</pre>
+ </td>
+
+ <td>
+ <p>Element type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="min_e_val52875418" id="min_e_val52875418">min_e_val</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#Min_E_Val40354618"><tt>Min_E_Val</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Minimal element.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="max_e_val52406668" id="max_e_val52406668">max_e_val</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#Max_E_Val39885868"><tt>Max_E_Val</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Maximal element.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="max_size10483336" id="max_size10483336">max_size</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#max_e_val52406668"><tt>max_e_val</tt></a> - <a href=
+"#min_e_val52875418"><tt>min_e_val</tt></a> + 1
+</pre>
+ </td>
+
+ <td>
+ <p>Number of distinct elements.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h2><a name="link6" id="link6">Public Methods</a></h2>
+
+ <h3><a name="link7" id="link7">Access Methods</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Methods">
+ <tr>
+ <td width="45%" align="left"><b>Method</b></td>
+
+ <td width="55%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>inline</b> <b>static</b> <a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>
+ begin
+ (<a href=
+"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
+</pre>
+ </td>
+
+ <td>
+ <p>Returns a <a href=
+ "#const_iterator98626788"><tt>const_iterator</tt></a> to
+ the first element of <span class=
+ "c1"><tt>r_key</tt></span>.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>inline</b> <b>static</b> <a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>
+ end
+ (<a href=
+"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
+</pre>
+ </td>
+
+ <td>
+ <p>Returns a <a href=
+ "#const_iterator98626788"><tt>const_iterator</tt></a> to
+ the after-last element of <span class=
+ "c1"><tt>r_key</tt></span>.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>inline</b> <b>static</b> <a href=
+"#size_type55424436"><tt>size_type</tt></a>
+ e_pos
+ (<a href="#e_type393186"><tt>e_type</tt></a> e)
+</pre>
+ </td>
+
+ <td>
+ <p>Maps an <span class="c1"><tt>e</tt></span>element to a
+ position.</p>
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tests.html b/libstdc++-v3/doc/html/ext/pb_ds/tests.html
index ab5d54bb4ff..ab5d54bb4ff 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tests.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tests.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_gcc.png
index 59247ec6ad9..59247ec6ad9 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_local.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_local.png
index d85980f30fb..d85980f30fb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_msvc.png
index 227164568f5..227164568f5 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_hash_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_hash_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png
index 8b6c4f0f058..8b6c4f0f058 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_local.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_local.png
index b7fdc474644..b7fdc474644 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png
index dc82a4e7e82..dc82a4e7e82 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/text_find_timing_test_tree_like_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/thin_heap_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/thin_heap_tag.html
index a8e9d4d721c..a8e9d4d721c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/thin_heap_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/thin_heap_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree.html b/libstdc++-v3/doc/html/ext/pb_ds/tree.html
index d836bda123b..d836bda123b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_based_containers.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_based_containers.html
index 7a1b554b26b..7a1b554b26b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_based_containers.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_based_containers.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_node_iterator.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_node_iterator.html
index ba09b5b4db2..ba09b5b4db2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_node_iterator.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_node_iterator.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_node_updator_policy_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_node_updator_policy_cd.png
index 5cae5781a18..5cae5781a18 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_node_updator_policy_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_node_updator_policy_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_node_update.html
index 449966b0e4f..449966b0e4f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_node_update.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test.html
index 0d7579027a3..0d7579027a3 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png
index bdb00d07a7f..bdb00d07a7f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_local.png
index 2b921743f7c..2b921743f7c 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png
index 76dcbee44fd..76dcbee44fd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_random_int_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_random_int_find_find_timing_test.html
index 9317cfc948d..9317cfc948d 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_random_int_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_random_int_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test.html
index 11db03d3ca0..11db03d3ca0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_gcc.png
index 88867eca6bd..88867eca6bd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_local.png
index 131d24a1a12..131d24a1a12 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_msvc.png
index 37ed1b2e7c0..37ed1b2e7c0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_split_join_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_split_join_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_tag.html
index e4b20607805..e4b20607805 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_find_find_timing_test.html
index 283bdf098cd..283bdf098cd 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test.html
index 6f0e26c00d6..6f0e26c00d6 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png
index 22d8f6fc213..22d8f6fc213 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png
index bb100084b3f..bb100084b3f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png
index 18b219851c2..18b219851c2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_node_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png
index 5fe063e63c2..5fe063e63c2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png
index 228de144222..228de144222 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png
index 9f13db0c093..9f13db0c093 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_pat_trie_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png
index dd85dcd7ca2..dd85dcd7ca2 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png
index cecb8a10750..cecb8a10750 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png
index 8c07313910f..8c07313910f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_insert_timing_test_vector_tree_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html
index 48d0112c6ea..48d0112c6ea 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_find_timing_test.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png
index cf5174d99c1..cf5174d99c1 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_gcc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png
index 26f71510ff0..26f71510ff0 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png
index 583a027f3dc..583a027f3dc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tree_text_lor_find_timing_test_msvc.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie.html b/libstdc++-v3/doc/html/ext/pb_ds/trie.html
index 71a86883386..71a86883386 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_based_containers.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_based_containers.html
index 8b670bc11dc..8b670bc11dc 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_based_containers.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_based_containers.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_const_node_iterator.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_const_node_iterator.html
index 0869a7c2f5b..0869a7c2f5b 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_const_node_iterator.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_const_node_iterator.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_node_iterator.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_node_iterator.html
index 55029c4cb91..55029c4cb91 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_node_iterator.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_node_iterator.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_node_updator_policy_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/trie_node_updator_policy_cd.png
index 4376929ec28..4376929ec28 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_node_updator_policy_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_node_updator_policy_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_order_statistics_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_order_statistics_node_update.html
index dcc236ff520..dcc236ff520 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_order_statistics_node_update.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_order_statistics_node_update.html
diff --git a/libstdc++-v3/doc/html/ext/pb_ds/trie_prefix_search_node_update.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_prefix_search_node_update.html
new file mode 100644
index 00000000000..da6efa2f18f
--- /dev/null
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_prefix_search_node_update.html
@@ -0,0 +1,628 @@
+<!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" xml:lang="en" lang="en">
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
+
+ <title>trie_prefix_search_node_update Interface</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ </head>
+
+<body>
+ <div id="page">
+ <h1><tt>trie_prefix_search_node_update</tt> Interface</h1>
+
+ <p>A node updater that allows tries to be searched for the
+ range of values that match a certain prefix.</p>
+
+ <p>Defined in: <a href=
+ "../../../../include/ext/pb_ds/trie_policy.hpp"><tt>trie_policy.hpp</tt></a></p>
+
+ <h2><a name="link1" id="link1">Template Parameters</a></h2>
+
+ <table class="c1" width="100%" border="1" summary=
+ "Template Parameters">
+ <tr>
+ <td width="20%" align="left"><b>Parameter</b></td>
+
+ <td width="50%" align="left"><b>Description</b></td>
+
+ <td width="30%" align="left"><b>Default Value</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Const_Node_Iterator1933878761" id=
+"Const_Node_Iterator1933878761"><b>class</b> Const_Node_Iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <p>Const node iterator type.</p>
+ </td>
+
+ <td>-</td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Node_Iterator4206909839" id=
+"Node_Iterator4206909839"><b>class</b> Node_Iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <p>Node iterator type.</p>
+ </td>
+
+ <td>-</td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="E_Access_Traits686553840" id=
+"E_Access_Traits686553840"><b>class</b> E_Access_Traits</a>
+</pre>
+ </td>
+
+ <td>
+ <p>Comparison functor.</p>
+ </td>
+
+ <td>-</td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="Allocator35940069" id=
+"Allocator35940069"><b>class</b> Allocator</a>
+</pre>
+ </td>
+
+ <td>
+ <p>Allocator type.</p>
+ </td>
+
+ <td>-</td>
+ </tr>
+ </table>
+
+ <h2><a name="link2" id="link2">Public Types and
+ Constants</a></h2>
+
+ <h3><a name="link3" id="link3">Key-Type Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="key_type10393186" id="key_type10393186">key_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+The instantiating container's key type.
+</pre>
+ </td>
+
+ <td>
+ <p>Key type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_key_reference3185471705" id=
+"const_key_reference3185471705">const_key_reference</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+The instantiating container's const key reference type.
+</pre>
+ </td>
+
+ <td>
+ <p>Const key reference.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link4" id="link4">Policy Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="e_access_traits1948190928" id=
+"e_access_traits1948190928">e_access_traits</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#E_Access_Traits686553840"><tt>E_Access_Traits</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Element access traits.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_e_iterator2450008044" id=
+"const_e_iterator2450008044">const_e_iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#e_access_traits1948190928"><tt>e_access_traits</tt></a>::const_iterator
+</pre>
+ </td>
+
+ <td>
+ <p>Const element iterator.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="allocator48440069" id="allocator48440069">allocator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#Allocator35940069"><tt>Allocator</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p><a href="#Allocator35940069"><tt>Allocator</tt></a>
+ type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link5" id="link5">General Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="size_type55424436" id="size_type55424436">size_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#allocator48440069"><tt>allocator</tt></a>::size_type
+</pre>
+ </td>
+
+ <td>
+ <p>Size type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link6" id="link6">Metadata-Type
+ Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="metadata_type2849297114" id=
+"metadata_type2849297114">metadata_type</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+__gnu_pbds::detail::null_node_metadata
+</pre>
+ </td>
+
+ <td>
+ <p>Metadata type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h3><a name="link7" id="link7">Iterator Definitions</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Types">
+ <tr>
+ <td width="30%" align="left"><b>Type</b></td>
+
+ <td width="55%" align="left"><b>Definition</b></td>
+
+ <td width="15%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_node_iterator4205924553" id=
+"const_node_iterator4205924553">const_node_iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href=
+"#Const_Node_Iterator1933878761"><tt>Const_Node_Iterator</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Const node iterator type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="node_iterator3431975247" id=
+"node_iterator3431975247">node_iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<a href="#Node_Iterator4206909839"><tt>Node_Iterator</tt></a>
+</pre>
+ </td>
+
+ <td>
+ <p>Node iterator type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="const_iterator98626788" id=
+"const_iterator98626788">const_iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>::value_type
+</pre>
+ </td>
+
+ <td>
+ <p>Const iterator type.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<a name="iterator10418194" id="iterator10418194">iterator</a>
+</pre>
+ </td>
+
+ <td>
+ <pre>
+<b>typename</b> <a href=
+"#node_iterator3431975247"><tt>node_iterator</tt></a>::value_type
+</pre>
+ </td>
+
+ <td>
+ <p>Iterator type.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h2><a name="link8" id="link8">Public Methods</a></h2>
+
+ <h3><a name="link9" id="link9">Find Methods</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Methods">
+ <tr>
+ <td width="45%" align="left"><b>Method</b></td>
+
+ <td width="55%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+std::pair&lt;
+ <a href="#const_iterator98626788"><tt>const_iterator</tt></a>,
+ <a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;
+ prefix_range
+ (<a href=
+"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key) <b>const</b>
+</pre>
+ </td>
+
+ <td>
+ <p>Finds the <tt><b>const</b></tt> <a href=
+ "#iterator10418194"><tt>iterator</tt></a> range
+ corresponding to all values whose prefixes match
+ <span class="c1"><tt>r_key</tt></span>.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+std::pair&lt;
+ <a href="#iterator10418194"><tt>iterator</tt></a>,
+ <a href="#iterator10418194"><tt>iterator</tt></a>&gt;
+ prefix_range
+ (<a href=
+"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
+</pre>
+ </td>
+
+ <td>
+ <p>Finds the <a href=
+ "#iterator10418194"><tt>iterator</tt></a> range
+ corresponding to all values whose prefixes match
+ <span class="c1"><tt>r_key</tt></span>.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+std::pair&lt;
+ <a href="#const_iterator98626788"><tt>const_iterator</tt></a>,
+ <a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;
+ prefix_range
+ (<a href=
+"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> b,
+ <a href=
+"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> e) <b>const</b>
+</pre>
+ </td>
+
+ <td>
+ <p>Finds the <tt><b>const</b></tt> <a href=
+ "#iterator10418194"><tt>iterator</tt></a> range
+ corresponding to all values whose prefixes match [b,
+ <span class="c1"><tt>e</tt></span>).</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+std::pair&lt;
+ <a href="#iterator10418194"><tt>iterator</tt></a>,
+ <a href="#iterator10418194"><tt>iterator</tt></a>&gt;
+ prefix_range
+ (<a href=
+"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> b,
+ <a href=
+"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> e)
+</pre>
+ </td>
+
+ <td>
+ <p>Finds the <a href=
+ "#iterator10418194"><tt>iterator</tt></a> range
+ corresponding to all values whose prefixes match [b,
+ <span class="c1"><tt>e</tt></span>).</p>
+ </td>
+ </tr>
+ </table>
+
+ <h2><a name="link10" id="link10">Protected Methods</a></h2>
+
+ <h3><a name="link11" id="link11">Operators</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Methods">
+ <tr>
+ <td width="45%" align="left"><b>Method</b></td>
+
+ <td width="55%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>inline</b> <b>void</b>
+ <b>operator</b>()
+ (<a href=
+"#node_iterator3431975247"><tt>node_iterator</tt></a> node_it,
+ <a href=
+"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a> end_nd_it) <b>const</b>
+</pre>
+ </td>
+
+ <td>
+ <p>Called to update a node's metadata.</p>
+ </td>
+ </tr>
+ </table>
+
+ <h2><a name="link12" id="link12">Private Methods</a></h2>
+
+ <h3><a name="link13" id="link13">Overrides</a></h3>
+
+ <table class="c1" width="100%" border="1" summary="Methods">
+ <tr>
+ <td width="45%" align="left"><b>Method</b></td>
+
+ <td width="55%" align="left"><b>Description</b></td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href=
+"#const_iterator98626788"><tt>const_iterator</tt></a>
+ end
+ () <b>const</b> = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <tt><b>const</b></tt> <a href=
+ "#iterator10418194"><tt>iterator</tt></a> associated with
+ the just-after last element.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href="#iterator10418194"><tt>iterator</tt></a>
+ end
+ () = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <a href=
+ "#iterator10418194"><tt>iterator</tt></a> associated with
+ the just-after last element.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href=
+"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
+ node_begin
+ () <b>const</b> = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <a href=
+ "#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
+ associated with the trie's root node.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href=
+"#node_iterator3431975247"><tt>node_iterator</tt></a>
+ node_begin
+ () = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <a href=
+ "#node_iterator3431975247"><tt>node_iterator</tt></a>
+ associated with the trie's root node.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href=
+"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
+ node_end
+ () <b>const</b> = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <a href=
+ "#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
+ associated with a just-after leaf node.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <a href=
+"#node_iterator3431975247"><tt>node_iterator</tt></a>
+ node_end
+ () = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Returns the <a href=
+ "#node_iterator3431975247"><tt>node_iterator</tt></a>
+ associated with a just-after leaf node.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<b>virtual</b> <b>const</b> <a href=
+"#e_access_traits1948190928"><tt>e_access_traits</tt></a> &amp;
+ get_e_access_traits
+ () <b>const</b> = 0
+</pre>
+ </td>
+
+ <td>
+ <p>Access to the cmp_fn object.</p>
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/trie_tag.html
index 6d2def4e77f..6d2def4e77f 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trie_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trivial_iterator_tag.html b/libstdc++-v3/doc/html/ext/pb_ds/trivial_iterator_tag.html
index be9813be3cb..be9813be3cb 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/trivial_iterator_tag.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/trivial_iterator_tag.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/tutorial.html b/libstdc++-v3/doc/html/ext/pb_ds/tutorial.html
index 029204b3b20..029204b3b20 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/tutorial.html
+++ b/libstdc++-v3/doc/html/ext/pb_ds/tutorial.html
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/update_policy_cd.png b/libstdc++-v3/doc/html/ext/pb_ds/update_policy_cd.png
index 115a751c350..115a751c350 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/update_policy_cd.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/update_policy_cd.png
Binary files differ
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/update_seq_diagram.png b/libstdc++-v3/doc/html/ext/pb_ds/update_seq_diagram.png
index 880a50edf8e..880a50edf8e 100644
--- a/libstdc++-v3/docs/html/ext/pb_ds/update_seq_diagram.png
+++ b/libstdc++-v3/doc/html/ext/pb_ds/update_seq_diagram.png
Binary files differ
diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html
new file mode 100644
index 00000000000..966f55a2536
--- /dev/null
+++ b/libstdc++-v3/doc/html/faq.html
@@ -0,0 +1,873 @@
+<?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>Frequently Asked Questions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk03.html" title="" /><link rel="prev" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="faq"></a>Frequently Asked Questions</h2></div><div><p class="copyright">Copyright ©
+ 2008
+
+ <a class="ulink" href="http://fsf.org" target="_top">FSF</a>
+ </p></div></div><hr /></div><div class="qandaset"><dl><dt>1. <a href="faq.html#faq.info">General Information</a></dt><dd><dl><dt>1.1. <a href="faq.html#faq.what">
+ What is libstdc++?
+ </a></dt><dt>1.2. <a href="faq.html#faq.why">
+ Why should I use libstdc++?
+ </a></dt><dt>1.3. <a href="faq.html#faq.who">
+ Who's in charge of it?
+ </a></dt><dt>1.4. <a href="faq.html#faq.when">
+ When is libstdc++ going to be finished?
+ </a></dt><dt>1.5. <a href="faq.html#faq.how">
+ How do I contribute to the effort?
+ </a></dt><dt>1.6. <a href="faq.html#faq.whereis_old">
+ What happened to the older libg++? I need that!
+ </a></dt><dt>1.7. <a href="faq.html#faq.more_questions">
+ What if I have more questions?
+ </a></dt></dl></dd><dt>2. <a href="faq.html#faq.license">License</a></dt><dd><dl><dt>2.1. <a href="faq.html#faq.license.what">
+ What are the license terms for libstdc++?
+ </a></dt><dt>2.2. <a href="faq.html#faq.license.any_program">
+ So any program which uses libstdc++ falls under the GPL?
+ </a></dt><dt>2.3. <a href="faq.html#faq.license.lgpl">
+ How is that different from the GNU {Lesser,Library} GPL?
+ </a></dt><dt>2.4. <a href="faq.html#faq.license.what_restrictions">
+ I see. So, what restrictions are there on programs that use the library?
+ </a></dt></dl></dd><dt>3. <a href="faq.html#faq.installation">Installation</a></dt><dd><dl><dt>3.1. <a href="faq.html#faq.how_to_install">How do I install libstdc++?
+ </a></dt><dt>3.2. <a href="faq.html#faq.how_to_get_sources">How does one get current libstdc++ sources?
+ </a></dt><dt>3.3. <a href="faq.html#faq.how_to_test">How do I know if it works?
+ </a></dt><dt>3.4. <a href="faq.html#faq.how_to_set_paths">How do I insure that the dynamically linked library will be found?
+ </a></dt><dt>3.5. <a href="faq.html#faq.what_is_libsupcxx">
+ What's libsupc++?
+ </a></dt><dt>3.6. <a href="faq.html#faq.size">
+ This library is HUGE!
+ </a></dt></dl></dd><dt>4. <a href="faq.html#faq.platform-specific">Platform-Specific Issues</a></dt><dd><dl><dt>4.1. <a href="faq.html#faq.other_compilers">
+ Can libstdc++ be used with non-GNU compilers?
+ </a></dt><dt>4.2. <a href="faq.html#faq.solaris_long_long">
+ No 'long long' type on Solaris?
+ </a></dt><dt>4.3. <a href="faq.html#faq.predefined">
+ _XOPEN_SOURCE and _GNU_SOURCE are always defined?
+ </a></dt><dt>4.4. <a href="faq.html#faq.darwin_ctype">
+ Mac OS X ctype.h is broken! How can I fix it?
+ </a></dt><dt>4.5. <a href="faq.html#faq.threads_i386">
+ Threading is broken on i386?
+ </a></dt><dt>4.6. <a href="faq.html#faq.atomic_mips">
+ MIPS atomic operations
+ </a></dt><dt>4.7. <a href="faq.html#faq.linux_glibc">
+ Recent GNU/Linux glibc required?
+ </a></dt><dt>4.8. <a href="faq.html#faq.freebsd_wchar">
+ Can't use wchar_t/wstring on FreeBSD
+ </a></dt></dl></dd><dt>5. <a href="faq.html#faq.known_bugs">Known Bugs</a></dt><dd><dl><dt>5.1. <a href="faq.html#faq.what_works">
+ What works already?
+ </a></dt><dt>5.2. <a href="faq.html#faq.standard_bugs">
+ Bugs in the ISO C++ language or library specification
+ </a></dt><dt>5.3. <a href="faq.html#faq.compiler_bugs">
+ Bugs in the compiler (gcc/g++) and not libstdc++
+ </a></dt></dl></dd><dt>6. <a href="faq.html#faq.known_non-bugs">Known Non-Bugs</a></dt><dd><dl><dt>6.1. <a href="faq.html#faq.stream_reopening_fails">
+ Reopening a stream fails
+ </a></dt><dt>6.2. <a href="faq.html#faq.wefcxx_verbose">
+ -Weffc++ complains too much
+ </a></dt><dt>6.3. <a href="faq.html#faq.ambiguous_overloads">
+ Ambiguous overloads after including an old-style header
+ </a></dt><dt>6.4. <a href="faq.html#faq.v2_headers">
+ The g++-3 headers are not ours
+ </a></dt><dt>6.5. <a href="faq.html#faq.boost_concept_checks">
+ Errors about *Concept and
+ constraints in the STL
+ </a></dt><dt>6.6. <a href="faq.html#faq.dlopen_crash">
+ Program crashes when using library code in a
+ dynamically-loaded library
+ </a></dt><dt>6.7. <a href="faq.html#faq.memory_leaks">
+ “Memory leaks†in containers
+ </a></dt><dt>6.8. <a href="faq.html#faq.list_size_on">
+ list::size() is O(n)!
+ </a></dt><dt>6.9. <a href="faq.html#faq.easy_to_fix">
+ Aw, that's easy to fix!
+ </a></dt></dl></dd><dt>7. <a href="faq.html#faq.misc">Miscellaneous</a></dt><dd><dl><dt>7.1. <a href="faq.html#faq.iterator_as_pod">
+ string::iterator is not char*; vector&lt;T&gt;::iterator is not T*
+ </a></dt><dt>7.2. <a href="faq.html#faq.what_is_next">
+ What's next after libstdc++?
+ </a></dt><dt>7.3. <a href="faq.html#faq.sgi_stl">
+ What about the STL from SGI?
+ </a></dt><dt>7.4. <a href="faq.html#faq.extensions_and_backwards_compat">
+ Extensions and Backward Compatibility
+ </a></dt><dt>7.5. <a href="faq.html#faq.tr1_support">
+ Does libstdc++ support TR1?
+ </a></dt><dt>7.6. <a href="faq.html#faq.get_iso_cxx">How do I get a copy of the ISO C++ Standard?
+ </a></dt><dt>7.7. <a href="faq.html#faq.what_is_abi">
+ What's an ABI and why is it so messy?
+ </a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity">
+ How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
+ </a></dt></dl></dd></dl><table border="0" summary="Q and A Set"><col align="left" width="1%" /><tbody><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.info"></a>1. General Information</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>1.1. <a href="faq.html#faq.what">
+ What is libstdc++?
+ </a></dt><dt>1.2. <a href="faq.html#faq.why">
+ Why should I use libstdc++?
+ </a></dt><dt>1.3. <a href="faq.html#faq.who">
+ Who's in charge of it?
+ </a></dt><dt>1.4. <a href="faq.html#faq.when">
+ When is libstdc++ going to be finished?
+ </a></dt><dt>1.5. <a href="faq.html#faq.how">
+ How do I contribute to the effort?
+ </a></dt><dt>1.6. <a href="faq.html#faq.whereis_old">
+ What happened to the older libg++? I need that!
+ </a></dt><dt>1.7. <a href="faq.html#faq.more_questions">
+ What if I have more questions?
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.what"></a><a id="faq.what.q"></a><p><b>1.1.</b></p></td><td align="left" valign="top"><p>
+ What is libstdc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="faq.what.a"></a></td><td align="left" valign="top"><p>
+ The GNU Standard C++ Library v3 is an ongoing project to
+ implement the ISO 14882 Standard C++ library as described in
+ chapters 17 through 27 and annex D. For those who want to see
+ exactly how far the project has come, or just want the latest
+ bleeding-edge code, the up-to-date source is available over
+ anonymous SVN, and can even be browsed over
+ the <a class="ulink" href="http://gcc.gnu.org/svn.html" target="_top">web</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.why"></a><a id="q-why"></a><p><b>1.2.</b></p></td><td align="left" valign="top"><p>
+ Why should I use libstdc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-why"></a></td><td align="left" valign="top"><p>
+ The completion of the ISO C++ standardization gave the C++
+ community a powerful set of reuseable tools in the form of the C++
+ Standard Library. However, all existing C++ implementations are
+ (as the Draft Standard used to say) “<span class="quote">incomplet and
+ incorrekt</span>â€, and many suffer from limitations of the compilers
+ that use them.
+ </p><p>
+ The GNU compiler collection
+ (<span class="command"><strong>gcc</strong></span>, <span class="command"><strong>g++</strong></span>, etc) is widely
+ considered to be one of the leading compilers in the world. Its
+ development is overseen by the
+ <a class="ulink" href="http://gcc.gnu.org/" target="_top">GCC team</a>. All of
+ the rapid development and near-legendary
+ <a class="ulink" href="http://gcc.gnu.org/buildstat.html" target="_top">portability</a>
+ that are the hallmarks of an open-source project are being
+ applied to libstdc++.
+ </p><p>
+ That means that all of the Standard classes and functions will be
+ freely available and fully compliant. (Such as
+ <code class="classname">string</code>,
+ <code class="classname">vector&lt;&gt;</code>, iostreams, and algorithms.)
+ Programmers will no longer need to “<span class="quote">roll their own</span>â€
+ nor be worried about platform-specific incompatibilities.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.who"></a><a id="q-who"></a><p><b>1.3.</b></p></td><td align="left" valign="top"><p>
+ Who's in charge of it?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-who"></a></td><td align="left" valign="top"><p>
+ The libstdc++ project is contributed to by several developers
+ all over the world, in the same way as GCC or Linux.
+ Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper,
+ Loren James Rittle, and Paolo Carlini are the lead maintainers of
+ the SVN archive.
+ </p><p>
+ Development and discussion is held on the libstdc++ mailing
+ list. Subscribing to the list, or searching the list
+ archives, is open to everyone. You can read instructions for
+ doing so on the <a class="ulink" href="http://gcc.gnu.org/libstdc++/" target="_top">homepage</a>.
+ If you have questions, ideas, code, or are just curious, sign up!
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.when"></a><a id="q-when"></a><p><b>1.4.</b></p></td><td align="left" valign="top"><p>
+ When is libstdc++ going to be finished?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-when"></a></td><td align="left" valign="top"><p>
+ Nathan Myers gave the best of all possible answers, responding to
+ a Usenet article asking this question: <span class="emphasis"><em>Sooner, if you
+ help.</em></span>
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.how"></a><a id="q-how"></a><p><b>1.5.</b></p></td><td align="left" valign="top"><p>
+ How do I contribute to the effort?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how"></a></td><td align="left" valign="top"><p>
+ Here is <a class="ulink" href="../17_intro/contribute.html" target="_top">a page devoted to
+ this topic</a>. Subscribing to the mailing list (see above, or
+ the homepage) is a very good idea if you have something to
+ contribute, or if you have spare time and want to
+ help. Contributions don't have to be in the form of source code;
+ anybody who is willing to help write documentation, for example,
+ or has found a bug in code that we all thought was working and is
+ willing to provide details, is more than welcome!
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.whereis_old"></a><a id="q-whereis_old"></a><p><b>1.6.</b></p></td><td align="left" valign="top"><p>
+ What happened to the older libg++? I need that!
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-whereis_old"></a></td><td align="left" valign="top"><p>
+ The most recent libg++ README states that libg++ is no longer
+ being actively maintained. It should not be used for new
+ projects, and is only being kicked along to support older code.
+ </p><p>
+ More information in the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">backwards compatibility documentation</a>
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.more_questions"></a><a id="q-more_questions"></a><p><b>1.7.</b></p></td><td align="left" valign="top"><p>
+ What if I have more questions?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-more_questions"></a></td><td align="left" valign="top"><p>
+ If you have read the README file, and your question remains
+ unanswered, then just ask the mailing list. At present, you do not
+ need to be subscribed to the list to send a message to it. More
+ information is available on the homepage (including how to browse
+ the list archives); to send a message to the list,
+ use <code class="email">&lt;<a class="email" href="mailto:libstdc++@gcc.gnu.org">libstdc++@gcc.gnu.org</a>&gt;</code>.
+ </p><p>
+ If you have a question that you think should be included
+ here, or if you have a question <span class="emphasis"><em>about</em></span> a question/answer
+ here, please send email to the libstdc++ mailing list, as above.
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.license"></a>2. License</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>2.1. <a href="faq.html#faq.license.what">
+ What are the license terms for libstdc++?
+ </a></dt><dt>2.2. <a href="faq.html#faq.license.any_program">
+ So any program which uses libstdc++ falls under the GPL?
+ </a></dt><dt>2.3. <a href="faq.html#faq.license.lgpl">
+ How is that different from the GNU {Lesser,Library} GPL?
+ </a></dt><dt>2.4. <a href="faq.html#faq.license.what_restrictions">
+ I see. So, what restrictions are there on programs that use the library?
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.license.what"></a><a id="q-license.what"></a><p><b>2.1.</b></p></td><td align="left" valign="top"><p>
+ What are the license terms for libstdc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.what"></a></td><td align="left" valign="top"><p>
+ See <a class="link" href="manual/bk01pt01ch01s02.html" title="License">our license description</a>
+ for these and related questions.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.license.any_program"></a><a id="q-license.any_program"></a><p><b>2.2.</b></p></td><td align="left" valign="top"><p>
+ So any program which uses libstdc++ falls under the GPL?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.any_program"></a></td><td align="left" valign="top"><p>
+ No. The special exception permits use of the library in
+ proprietary applications.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.license.lgpl"></a><a id="q-license.lgpl"></a><p><b>2.3.</b></p></td><td align="left" valign="top"><p>
+ How is that different from the GNU {Lesser,Library} GPL?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.lgpl"></a></td><td align="left" valign="top"><p>
+ The LGPL requires that users be able to replace the LGPL code with a
+ modified version; this is trivial if the library in question is a C
+ shared library. But there's no way to make that work with C++, where
+ much of the library consists of inline functions and templates, which
+ are expanded inside the code that uses the library. So to allow people
+ to replace the library code, someone using the library would have to
+ distribute their own source, rendering the LGPL equivalent to the GPL.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.license.what_restrictions"></a><a id="q-license.what_restrictions"></a><p><b>2.4.</b></p></td><td align="left" valign="top"><p>
+ I see. So, what restrictions are there on programs that use the library?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.what_restrictions"></a></td><td align="left" valign="top"><p>
+ None. We encourage such programs to be released as open source,
+ but we won't punish you or sue you if you choose otherwise.
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.installation"></a>3. Installation</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>3.1. <a href="faq.html#faq.how_to_install">How do I install libstdc++?
+ </a></dt><dt>3.2. <a href="faq.html#faq.how_to_get_sources">How does one get current libstdc++ sources?
+ </a></dt><dt>3.3. <a href="faq.html#faq.how_to_test">How do I know if it works?
+ </a></dt><dt>3.4. <a href="faq.html#faq.how_to_set_paths">How do I insure that the dynamically linked library will be found?
+ </a></dt><dt>3.5. <a href="faq.html#faq.what_is_libsupcxx">
+ What's libsupc++?
+ </a></dt><dt>3.6. <a href="faq.html#faq.size">
+ This library is HUGE!
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.how_to_install"></a><a id="q-how_to_install"></a><p><b>3.1.</b></p></td><td align="left" valign="top"><p>How do I install libstdc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_install"></a></td><td align="left" valign="top"><p>
+ Often libstdc++ comes pre-installed as an integral part of many
+ existing Linux and Unix systems, as well as many embedded
+ development tools. It may be necessary to install extra
+ development packages to get the headers, or the documentation, or
+ the source: please consult your vendor for details.
+ </p><p>
+ To build and install from the GNU GCC sources, please consult the
+ <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/install.html" target="_top">install
+ documentation</a> for detailed
+ instructions. You may wish to browse those files ahead
+ of time to get a feel for what's required.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.how_to_get_sources"></a><a id="q-how_to_get_sources"></a><p><b>3.2.</b></p></td><td align="left" valign="top"><p>How does one get current libstdc++ sources?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_get_sources"></a></td><td align="left" valign="top"><p>
+ Libstdc++ sources for all official releases can be obtained as
+ part of the GCC sources, available from various sites and
+ mirrors. A full <a class="ulink" href="http://gcc.gnu.org/mirrors.html" target="_top">list of
+ download sites</a> is provided on the main GCC site.
+ </p><p>
+ Current libstdc++ sources can always be checked out of the main
+ GCC source repository using the appropriate version control
+ tool. At this time, that tool
+ is <span class="application">Subversion</span>.
+ </p><p>
+ <span class="application">Subversion</span>, or <acronym class="acronym">SVN</acronym>, is
+ one of several revision control packages. It was selected for GNU
+ projects because it's free (speech), free (beer), and very high
+ quality. The <a class="ulink" href="http://subversion.tigris.org" target="_top"> Subversion
+ home page</a> has a better description.
+ </p><p>
+ The “<span class="quote">anonymous client checkout</span>†feature of SVN is
+ similar to anonymous FTP in that it allows anyone to retrieve
+ the latest libstdc++ sources.
+ </p><p>
+ For more information
+ see <a class="ulink" href="http://gcc.gnu.org/svn.html" target="_top"><acronym class="acronym">SVN</acronym>
+ details</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.how_to_test"></a><a id="q-how_to_test"></a><p><b>3.3.</b></p></td><td align="left" valign="top"><p>How do I know if it works?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_test"></a></td><td align="left" valign="top"><p>
+ Libstdc++ comes with its own validation testsuite, which includes
+ conformance testing, regression testing, ABI testing, and
+ performance testing. Please consult the
+ <a class="ulink" href="http://gcc.gnu.org/install/test.html" target="_top">testing
+ documentation</a> for more details.
+ </p><p>
+ If you find bugs in the testsuite programs themselves, or if you
+ think of a new test program that should be added to the suite,
+ <span class="emphasis"><em>please</em></span> write up your idea and send it to the list!
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.how_to_set_paths"></a><a id="q-how_to_set_paths"></a><p><b>3.4.</b></p></td><td align="left" valign="top"><p>How do I insure that the dynamically linked library will be found?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_set_paths"></a></td><td align="left" valign="top"><p>
+ Depending on your platform and library version, the error message might
+ be similar to one of the following:
+ </p><pre class="screen">
+ ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
+
+ /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found
+ </pre><p>
+ This doesn't mean that the shared library isn't installed, only
+ that the dynamic linker can't find it. When a dynamically-linked
+ executable is run the linker finds and loads the required shared
+ libraries by searching a pre-configured list of directories. If
+ the directory where you've installed libstdc++ is not in this list
+ then the libraries won't be found. The simplest way to fix this is
+ to use the <code class="literal">LD_LIBRARY_PATH</code> environment variable,
+ which is a colon-separated list of directories in which the linker
+ will search for shared libraries:
+ </p><pre class="screen">
+ LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
+ </pre><p>
+ The exact environment variable to use will depend on your
+ platform, e.g. DYLD_LIBRARY_PATH for Darwin,
+ LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit,
+ LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs and
+ SHLIB_PATH for HP-UX.
+ </p><p>
+ See the man pages for <span class="command"><strong>ld</strong></span>, <span class="command"><strong>ldd</strong></span>
+ and <span class="command"><strong>ldconfig</strong></span> for more information. The dynamic
+ linker has different names on different platforms but the man page
+ is usually called something such as <code class="filename">ld.so/rtld/dld.so</code>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.what_is_libsupcxx"></a><a id="q-what_is_libsupcxx"></a><p><b>3.5.</b></p></td><td align="left" valign="top"><p>
+ What's libsupc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_libsupcxx"></a></td><td align="left" valign="top"><p>
+ If the only functions from <code class="filename">libstdc++.a</code>
+ which you need are language support functions (those listed in
+ <a class="ulink" href="../18_support/howto.html" target="_top">clause 18</a> of the
+ standard, e.g., <code class="function">new</code> and
+ <code class="function">delete</code>), then try linking against
+ <code class="filename">libsupc++.a</code>, which is a subset of
+ <code class="filename">libstdc++.a</code>. (Using <span class="command"><strong>gcc</strong></span>
+ instead of <span class="command"><strong>g++</strong></span> and explicitly linking in
+ <code class="filename">libsupc++.a</code> via <code class="literal">-lsupc++</code>
+ for the final link step will do it). This library contains only
+ those support routines, one per object file. But if you are
+ using anything from the rest of the library, such as IOStreams
+ or vectors, then you'll still need pieces from
+ <code class="filename">libstdc++.a</code>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.size"></a><a id="q-size"></a><p><b>3.6.</b></p></td><td align="left" valign="top"><p>
+ This library is HUGE!
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-size"></a></td><td align="left" valign="top"><p>
+ Usually the size of libraries on disk isn't noticeable. When a
+ link editor (or simply “<span class="quote">linker</span>â€) pulls things from a
+ static archive library, only the necessary object files are copied
+ into your executable, not the entire library. Unfortunately, even
+ if you only need a single function or variable from an object file,
+ the entire object file is extracted. (There's nothing unique to C++
+ or libstdc++ about this; it's just common behavior, given here
+ for background reasons.)
+ </p><p>
+ Some of the object files which make up libstdc++.a are rather large.
+ If you create a statically-linked executable with
+ <code class="literal">-static</code>, those large object files are suddenly part
+ of your executable. Historically the best way around this was to
+ only place a very few functions (often only a single one) in each
+ source/object file; then extracting a single function is the same
+ as extracting a single .o file. For libstdc++ this is only
+ possible to a certain extent; the object files in question contain
+ template classes and template functions, pre-instantiated, and
+ splitting those up causes severe maintenance headaches.
+ </p><p>
+ On supported platforms, libstdc++ takes advantage of garbage
+ collection in the GNU linker to get a result similar to separating
+ each symbol into a separate source and object files. On these platforms,
+ GNU ld can place each function and variable into its own
+ section in a .o file. The GNU linker can then perform garbage
+ collection on unused sections; this reduces the situation to only
+ copying needed functions into the executable, as before, but all
+ happens automatically.
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.platform-specific"></a>4. Platform-Specific Issues</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>4.1. <a href="faq.html#faq.other_compilers">
+ Can libstdc++ be used with non-GNU compilers?
+ </a></dt><dt>4.2. <a href="faq.html#faq.solaris_long_long">
+ No 'long long' type on Solaris?
+ </a></dt><dt>4.3. <a href="faq.html#faq.predefined">
+ _XOPEN_SOURCE and _GNU_SOURCE are always defined?
+ </a></dt><dt>4.4. <a href="faq.html#faq.darwin_ctype">
+ Mac OS X ctype.h is broken! How can I fix it?
+ </a></dt><dt>4.5. <a href="faq.html#faq.threads_i386">
+ Threading is broken on i386?
+ </a></dt><dt>4.6. <a href="faq.html#faq.atomic_mips">
+ MIPS atomic operations
+ </a></dt><dt>4.7. <a href="faq.html#faq.linux_glibc">
+ Recent GNU/Linux glibc required?
+ </a></dt><dt>4.8. <a href="faq.html#faq.freebsd_wchar">
+ Can't use wchar_t/wstring on FreeBSD
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.other_compilers"></a><a id="q-other_compilers"></a><p><b>4.1.</b></p></td><td align="left" valign="top"><p>
+ Can libstdc++ be used with non-GNU compilers?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-other_compilers"></a></td><td align="left" valign="top"><p>
+ Perhaps.
+ </p><p>
+ Since the goal of ISO Standardization is for all C++
+ implementations to be able to share code, libstdc++ should be
+ usable under any ISO-compliant compiler, at least in theory.
+ </p><p>
+ However, the reality is that libstdc++ is targeted and optimized
+ for GCC/g++. This means that often libstdc++ uses specific,
+ non-standard features of g++ that are not present in older
+ versions of proprietary compilers. It may take as much as a year or two
+ after an official release of GCC that contains these features for
+ proprietary tools support these constructs.
+ </p><p>
+ In the near past, specific released versions of libstdc++ have
+ been known to work with versions of the EDG C++ compiler, and
+ vendor-specific proprietary C++ compilers such as the Intel ICC
+ C++ compiler.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.solaris_long_long"></a><a id="q-solaris_long_long"></a><p><b>4.2.</b></p></td><td align="left" valign="top"><p>
+ No 'long long' type on Solaris?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-solaris_long_long"></a></td><td align="left" valign="top"><p>
+ By default we try to support the C99 <span class="type">long long</span> type.
+ This requires that certain functions from your C library be present.
+ </p><p>
+ Up through release 3.0.2 the platform-specific tests performed by
+ libstdc++ were too general, resulting in a conservative approach
+ to enabling the <span class="type">long long</span> code paths. The most
+ commonly reported platform affected was Solaris.
+ </p><p>
+ This has been fixed for libstdc++ releases greater than 3.0.3.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.predefined"></a><a id="q-predefined"></a><p><b>4.3.</b></p></td><td align="left" valign="top"><p>
+ <code class="constant">_XOPEN_SOURCE</code> and <code class="constant">_GNU_SOURCE</code> are always defined?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-predefined"></a></td><td align="left" valign="top"><p>On Solaris, g++ (but not gcc) always defines the preprocessor
+ macro <code class="constant">_XOPEN_SOURCE</code>. On GNU/Linux, the same happens
+ with <code class="constant">_GNU_SOURCE</code>. (This is not an exhaustive list;
+ other macros and other platforms are also affected.)
+ </p><p>These macros are typically used in C library headers, guarding new
+ versions of functions from their older versions. The C++ standard
+ library includes the C standard library, but it requires the C90
+ version, which for backwards-compatibility reasons is often not the
+ default for many vendors.
+ </p><p>More to the point, the C++ standard requires behavior which is only
+ available on certain platforms after certain symbols are defined.
+ Usually the issue involves I/O-related typedefs. In order to
+ ensure correctness, the compiler simply predefines those symbols.
+ </p><p>Note that it's not enough to #define them only when the library is
+ being built (during installation). Since we don't have an 'export'
+ keyword, much of the library exists as headers, which means that
+ the symbols must also be defined as your programs are parsed and
+ compiled.
+ </p><p>To see which symbols are defined, look for CPLUSPLUS_CPP_SPEC in
+ the gcc config headers for your target (and try changing them to
+ see what happens when building complicated code). You can also run
+ <span class="command"><strong>g++ -E -dM - &lt; /dev/null"</strong></span> to display
+ a list of predefined macros for any particular installation.
+ </p><p>This has been discussed on the mailing lists
+ <a class="ulink" href="http://gcc.gnu.org/cgi-bin/htsearch?method=and&amp;format=builtin-long&amp;sort=score&amp;words=_XOPEN_SOURCE+Solaris" target="_top">quite a bit</a>.
+ </p><p>This method is something of a wart. We'd like to find a cleaner
+ solution, but nobody yet has contributed the time.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.darwin_ctype"></a><a id="q-darwin_ctype"></a><p><b>4.4.</b></p></td><td align="left" valign="top"><p>
+ Mac OS X <code class="filename">ctype.h</code> is broken! How can I fix it?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-darwin_ctype"></a></td><td align="left" valign="top"><p>This is a long-standing bug in the OS X support. Fortunately,
+ the patch is quite simple, and well-known.
+ <a class="ulink" href="http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html" target="_top"> Here's a
+ link to the solution</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.threads_i386"></a><a id="q-threads_i386"></a><p><b>4.5.</b></p></td><td align="left" valign="top"><p>
+ Threading is broken on i386?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-threads_i386"></a></td><td align="left" valign="top"><p>
+ </p><p>Support for atomic integer operations is/was broken on i386
+ platforms. The assembly code accidentally used opcodes that are
+ only available on the i486 and later. So if you configured GCC
+ to target, for example, i386-linux, but actually used the programs
+ on an i686, then you would encounter no problems. Only when
+ actually running the code on a i386 will the problem appear.
+ </p><p>This is fixed in 3.2.2.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.atomic_mips"></a><a id="q-atomic_mips"></a><p><b>4.6.</b></p></td><td align="left" valign="top"><p>
+ MIPS atomic operations
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-atomic_mips"></a></td><td align="left" valign="top"><p>
+ The atomic locking routines for MIPS targets requires MIPS II
+ and later. A patch went in just after the 3.3 release to
+ make mips* use the generic implementation instead. You can also
+ configure for mipsel-elf as a workaround.
+ </p><p>
+ The mips*-*-linux* port continues to use the MIPS II routines, and more
+ work in this area is expected.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.linux_glibc"></a><a id="q-linux_glibc"></a><p><b>4.7.</b></p></td><td align="left" valign="top"><p>
+ Recent GNU/Linux glibc required?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-linux_glibc"></a></td><td align="left" valign="top"><p>When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
+ 5.0.1) and later uses localization and formatting code from the system
+ C library (glibc) version 2.2.5. That version of glibc is over a
+ year old and contains necessary bugfixes. Many GNU/Linux distros make
+ glibc version 2.3.x available now.
+ </p><p>The guideline is simple: the more recent the C++ library, the
+ more recent the C library. (This is also documented in the main
+ GCC installation instructions.)
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.freebsd_wchar"></a><a id="q-freebsd_wchar"></a><p><b>4.8.</b></p></td><td align="left" valign="top"><p>
+ Can't use wchar_t/wstring on FreeBSD
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-freebsd_wchar"></a></td><td align="left" valign="top"><p>
+ Older versions of FreeBSD's C library do not have sufficient
+ support for wide character functions, and as a result the
+ libstdc++ configury decides that wchar_t support should be
+ disabled. In addition, the libstdc++ platform checks that
+ enabled <span class="type">wchar_t</span> were quite strict, and not granular
+ enough to detect when the minimal support to
+ enable <span class="type">wchar_t</span> and C++ library structures
+ like <code class="classname">wstring</code> were present. This impacted Solaris,
+ Darwin, and BSD varients, and is fixed in libstdc++ versions post 4.1.0.
+ </p><p>
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.known_bugs"></a>5. Known Bugs</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>5.1. <a href="faq.html#faq.what_works">
+ What works already?
+ </a></dt><dt>5.2. <a href="faq.html#faq.standard_bugs">
+ Bugs in the ISO C++ language or library specification
+ </a></dt><dt>5.3. <a href="faq.html#faq.compiler_bugs">
+ Bugs in the compiler (gcc/g++) and not libstdc++
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.what_works"></a><a id="q-what_works"></a><p><b>5.1.</b></p></td><td align="left" valign="top"><p>
+ What works already?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_works"></a></td><td align="left" valign="top"><p>
+ Short answer: Pretty much everything <span class="emphasis"><em>works</em></span>
+ except for some corner cases. Support for localization
+ in <code class="classname">locale</code> may be incomplete on non-GNU
+ platforms. Also dependant on the underlying platform is support
+ for <span class="type">wchar_t</span> and <span class="type">long
+ long</span> specializations, and details of thread support.
+ </p><p>
+ Long answer: See the implementation status pages for
+ <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++1998_status.html" target="_top">C++98</a>,
+ <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/tr1_status.html" target="_top">TR1</a>, and <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++0x_status.html" target="_top">C++0x</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.standard_bugs"></a><a id="q-standard_bugs"></a><p><b>5.2.</b></p></td><td align="left" valign="top"><p>
+ Bugs in the ISO C++ language or library specification
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-standard_bugs"></a></td><td align="left" valign="top"><p>
+ Unfortunately, there are some.
+ </p><p>
+ For those people who are not part of the ISO Library Group
+ (i.e., nearly all of us needing to read this page in the first
+ place), a public list of the library defects is occasionally
+ published <a class="ulink" href="http://anubis.dkuug.dk/jtc1/sc22/wg21/" target="_top">here</a>.
+ Some of these issues have resulted in code changes in libstdc++.
+ </p><p>
+ If you think you've discovered a new bug that is not listed,
+ please post a message describing your problem
+ to <code class="email">&lt;<a class="email" href="mailto:libstdc++@gcc.gnu.org">libstdc++@gcc.gnu.org</a>&gt;</code> or the Usenet group
+ comp.lang.c++.moderated.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.compiler_bugs"></a><a id="q-compiler_bugs"></a><p><b>5.3.</b></p></td><td align="left" valign="top"><p>
+ Bugs in the compiler (gcc/g++) and not libstdc++
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-compiler_bugs"></a></td><td align="left" valign="top"><p>
+ On occasion, the compiler is wrong. Please be advised that this
+ happens much less often than one would think, and avoid jumping to
+ conclusions.
+ </p><p>
+ First, examine the ISO C++ standard. Second, try another compiler
+ or an older version of the GNU compilers. Third, you can find more
+ information on the libstdc++ and the GCC mailing lists: search
+ these lists with terms describing your issue.
+ </p><p>
+ Before reporting a bug, please examine the
+ <a class="ulink" href="http://gcc.gnu.org/bugs.html" target="_top">bugs database</a> with the
+ category set to “<span class="quote">g++</span>â€.
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.known_non-bugs"></a>6. Known Non-Bugs</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>6.1. <a href="faq.html#faq.stream_reopening_fails">
+ Reopening a stream fails
+ </a></dt><dt>6.2. <a href="faq.html#faq.wefcxx_verbose">
+ -Weffc++ complains too much
+ </a></dt><dt>6.3. <a href="faq.html#faq.ambiguous_overloads">
+ Ambiguous overloads after including an old-style header
+ </a></dt><dt>6.4. <a href="faq.html#faq.v2_headers">
+ The g++-3 headers are not ours
+ </a></dt><dt>6.5. <a href="faq.html#faq.boost_concept_checks">
+ Errors about *Concept and
+ constraints in the STL
+ </a></dt><dt>6.6. <a href="faq.html#faq.dlopen_crash">
+ Program crashes when using library code in a
+ dynamically-loaded library
+ </a></dt><dt>6.7. <a href="faq.html#faq.memory_leaks">
+ “Memory leaks†in containers
+ </a></dt><dt>6.8. <a href="faq.html#faq.list_size_on">
+ list::size() is O(n)!
+ </a></dt><dt>6.9. <a href="faq.html#faq.easy_to_fix">
+ Aw, that's easy to fix!
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.stream_reopening_fails"></a><a id="q-stream_reopening_fails"></a><p><b>6.1.</b></p></td><td align="left" valign="top"><p>
+ Reopening a stream fails
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-stream_reopening_fails"></a></td><td align="left" valign="top"><p>
+ One of the most-reported non-bug reports. Executing a sequence like:
+ </p><div class="literallayout"><p><br />
+    #include &lt;fstream&gt;<br />
+    ...<br />
+    std::fstream  fs(“<span class="quote">a_file</span>â€);<br />
+    // .<br />
+    // . do things with fs...<br />
+    // .<br />
+    fs.close();<br />
+    fs.open(“<span class="quote">a_new_file</span>â€);<br />
+    </p></div><p>
+ All operations on the re-opened <code class="varname">fs</code> will fail, or at
+ least act very strangely. Yes, they often will, especially if
+ <code class="varname">fs</code> reached the EOF state on the previous file. The
+ reason is that the state flags are <span class="emphasis"><em>not</em></span> cleared
+ on a successful call to open(). The standard unfortunately did
+ not specify behavior in this case, and to everybody's great sorrow,
+ the <a class="ulink" href="../ext/howto.html#5" target="_top">proposed LWG resolution in
+ DR #22</a> is to leave the flags unchanged. You must insert a call
+ to <code class="function">fs.clear()</code> between the calls to close() and open(),
+ and then everything will work like we all expect it to work.
+ <span class="emphasis"><em>Update:</em></span> for GCC 4.0 we implemented the resolution
+ of <a class="ulink" href="../ext/howto.html#5" target="_top">DR #409</a> and open() now calls
+ <code class="function">clear()</code> on success!
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.wefcxx_verbose"></a><a id="q-wefcxx_verbose"></a><p><b>6.2.</b></p></td><td align="left" valign="top"><p>
+ -Weffc++ complains too much
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-wefcxx_verbose"></a></td><td align="left" valign="top"><p>
+ Many warnings are emitted when <code class="literal">-Weffc++</code> is used. Making
+ libstdc++ <code class="literal">-Weffc++</code>-clean is not a goal of the project,
+ for a few reasons. Mainly, that option tries to enforce
+ object-oriented programming, while the Standard Library isn't
+ necessarily trying to be OO.
+ </p><p>
+ We do, however, try to have libstdc++ sources as clean as possible. If
+ you see some simple changes that pacify <code class="literal">-Weffc++</code>
+ without other drawbacks, send us a patch.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.ambiguous_overloads"></a><a id="q-ambiguous_overloads"></a><p><b>6.3.</b></p></td><td align="left" valign="top"><p>
+ Ambiguous overloads after including an old-style header
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-ambiguous_overloads"></a></td><td align="left" valign="top"><p>
+ Another problem is the <code class="literal">rel_ops</code> namespace and the template
+ comparison operator functions contained therein. If they become
+ visible in the same namespace as other comparison functions
+ (e.g., “<span class="quote">using</span>†them and the &lt;iterator&gt; header),
+ then you will suddenly be faced with huge numbers of ambiguity
+ errors. This was discussed on the -v3 list; Nathan Myers
+ <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html" target="_top">sums
+ things up here</a>. The collisions with vector/string iterator
+ types have been fixed for 3.1.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.v2_headers"></a><a id="q-v2_headers"></a><p><b>6.4.</b></p></td><td align="left" valign="top"><p>
+ The g++-3 headers are <span class="emphasis"><em>not ours</em></span>
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-v2_headers"></a></td><td align="left" valign="top"><p>
+ If you have found an extremely broken header file which is
+ causing problems for you, look carefully before submitting a
+ "high" priority bug report (which you probably
+ shouldn't do anyhow; see the last paragraph of the page
+ describing <a class="ulink" href="http://gcc.gnu.org/bugs.html" target="_top">the GCC
+ bug database</a>).
+ </p><p>
+ If the headers are in <code class="filename">${prefix}/include/g++-3</code>, or
+ if the installed library's name looks like
+ <code class="filename">libstdc++-2.10.a</code> or
+ <code class="filename">libstdc++-libc6-2.10.so</code>, then you are using the
+ old libstdc++-v2 library, which is nonstandard and
+ unmaintained. Do not report problems with -v2 to the -v3
+ mailing list.
+ </p><p>
+ For GCC versions 3.0 and 3.1 the libstdc++ header files are
+ installed in <code class="filename">${prefix}/include/g++-v3</code> (see the
+ 'v'?). Starting with version 3.2 the headers are installed in
+ <code class="filename">${prefix}/include/c++/${version}</code> as this prevents
+ headers from previous versions being found by mistake.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.boost_concept_checks"></a><a id="q-boost_concept_checks"></a><p><b>6.5.</b></p></td><td align="left" valign="top"><p>
+ Errors about <span class="emphasis"><em>*Concept</em></span> and
+ <span class="emphasis"><em>constraints</em></span> in the STL
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-boost_concept_checks"></a></td><td align="left" valign="top"><p>
+ If you see compilation errors containing messages about
+ <span class="errortext">foo Concept </span>and something to do with a
+ <span class="errortext">constraints</span> member function, then most
+ likely you have violated one of the requirements for types used
+ during instantiation of template containers and functions. For
+ example, EqualityComparableConcept appears if your types must be
+ comparable with == and you have not provided this capability (a
+ typo, or wrong visibility, or you just plain forgot, etc).
+ </p><p>
+ More information, including how to optionally enable/disable the
+ checks, is available
+ <a class="ulink" href="../19_diagnostics/howto.html#3" target="_top">here</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.dlopen_crash"></a><a id="q-dlopen_crash"></a><p><b>6.6.</b></p></td><td align="left" valign="top"><p>
+ Program crashes when using library code in a
+ dynamically-loaded library
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-dlopen_crash"></a></td><td align="left" valign="top"><p>
+ If you are using the C++ library across dynamically-loaded
+ objects, make certain that you are passing the correct options
+ when compiling and linking:
+ </p><div class="literallayout"><p><br />
+    // compile your library components<br />
+    g++ -fPIC -c a.cc<br />
+    g++ -fPIC -c b.cc<br />
+    ...<br />
+    g++ -fPIC -c z.cc<br />
+<br />
+    // create your library<br />
+    g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o<br />
+<br />
+    // link the executable<br />
+    g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl<br />
+    </p></div></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.memory_leaks"></a><a id="q-memory_leaks"></a><p><b>6.7.</b></p></td><td align="left" valign="top"><p>
+ “<span class="quote">Memory leaks</span>†in containers
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-memory_leaks"></a></td><td align="left" valign="top"><p>
+ A few people have reported that the standard containers appear
+ to leak memory when tested with memory checkers such as
+ <a class="ulink" href="http://developer.kde.org/~sewardj/" target="_top">valgrind</a>.
+ The library's default allocators keep free memory in a pool
+ for later reuse, rather than returning it to the OS. Although
+ this memory is always reachable by the library and is never
+ lost, memory debugging tools can report it as a leak. If you
+ want to test the library for memory leaks please read
+ <a class="ulink" href="../debug.html#mem" target="_top">Tips for memory leak hunting</a>
+ first.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.list_size_on"></a><a id="q-list_size_on"></a><p><b>6.8.</b></p></td><td align="left" valign="top"><p>
+ list::size() is O(n)!
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-list_size_on"></a></td><td align="left" valign="top"><p>
+ See
+ the <a class="ulink" href="../23_containers/howto.html#6" target="_top">Containers</a>
+ chapter.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.easy_to_fix"></a><a id="q-easy_to_fix"></a><p><b>6.9.</b></p></td><td align="left" valign="top"><p>
+ Aw, that's easy to fix!
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-easy_to_fix"></a></td><td align="left" valign="top"><p>
+ If you have found a bug in the library and you think you have
+ a working fix, then send it in! The main GCC site has a page
+ on <a class="ulink" href="http://gcc.gnu.org/contribute.html" target="_top">submitting
+ patches</a> that covers the procedure, but for libstdc++ you
+ should also send the patch to our mailing list in addition to
+ the GCC patches mailing list. The libstdc++
+ <a class="ulink" href="../17_intro/contribute.html" target="_top">contributors' page</a>
+ also talks about how to submit patches.
+ </p><p>
+ In addition to the description, the patch, and the ChangeLog
+ entry, it is a Good Thing if you can additionally create a small
+ test program to test for the presence of the bug that your
+ patch fixes. Bugs have a way of being reintroduced; if an old
+ bug creeps back in, it will be caught immediately by the
+ <a class="ulink" href="#2_4" target="_top">testsuite</a> -- but only if such a test exists.
+ </p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h3 class="title"><a id="faq.misc"></a>7. Miscellaneous</h3></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>7.1. <a href="faq.html#faq.iterator_as_pod">
+ string::iterator is not char*; vector&lt;T&gt;::iterator is not T*
+ </a></dt><dt>7.2. <a href="faq.html#faq.what_is_next">
+ What's next after libstdc++?
+ </a></dt><dt>7.3. <a href="faq.html#faq.sgi_stl">
+ What about the STL from SGI?
+ </a></dt><dt>7.4. <a href="faq.html#faq.extensions_and_backwards_compat">
+ Extensions and Backward Compatibility
+ </a></dt><dt>7.5. <a href="faq.html#faq.tr1_support">
+ Does libstdc++ support TR1?
+ </a></dt><dt>7.6. <a href="faq.html#faq.get_iso_cxx">How do I get a copy of the ISO C++ Standard?
+ </a></dt><dt>7.7. <a href="faq.html#faq.what_is_abi">
+ What's an ABI and why is it so messy?
+ </a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity">
+ How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
+ </a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.iterator_as_pod"></a><a id="faq.iterator_as_pod_q"></a><p><b>7.1.</b></p></td><td align="left" valign="top"><p>
+ string::iterator is not char*; vector&lt;T&gt;::iterator is not T*
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="faq.iterator_as_pod_a"></a></td><td align="left" valign="top"><p>
+ If you have code that depends on container&lt;T&gt; iterators
+ being implemented as pointer-to-T, your code is broken. It's
+ considered a feature, not a bug, that libstdc++ points this out.
+ </p><p>
+ While there are arguments for iterators to be implemented in
+ that manner, A) they aren't very good ones in the long term,
+ and B) they were never guaranteed by the Standard anyway. The
+ type-safety achieved by making iterators a real class rather
+ than a typedef for <span class="type">T*</span> outweighs nearly all opposing
+ arguments.
+ </p><p>
+ Code which does assume that a vector iterator <code class="varname">i</code>
+ is a pointer can often be fixed by changing <code class="varname">i</code> in
+ certain expressions to <code class="varname">&amp;*i</code>. Future revisions
+ of the Standard are expected to bless this usage for
+ vector&lt;&gt; (but not for basic_string&lt;&gt;).
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.what_is_next"></a><a id="q-what_is_next"></a><p><b>7.2.</b></p></td><td align="left" valign="top"><p>
+ What's next after libstdc++?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_next"></a></td><td align="left" valign="top"><p>
+ Hopefully, not much. The goal of libstdc++ is to produce a
+ fully-compliant, fully-portable Standard Library. After that,
+ we're mostly done: there won't <span class="emphasis"><em>be</em></span> any
+ more compliance work to do.
+ </p><p>
+ There is an effort underway to add significant extensions to
+ the standard library specification. The latest version of
+ this effort is described in
+ <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">
+ The C++ Library Technical Report 1</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.sgi_stl"></a><a id="q-sgi_stl"></a><p><b>7.3.</b></p></td><td align="left" valign="top"><p>
+ What about the STL from SGI?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-sgi_stl"></a></td><td align="left" valign="top"><p>
+ The <a class="ulink" href="http://www.sgi.com/tech/stl/" target="_top">STL from SGI</a>,
+ version 3.3, was the final merge of the STL codebase. The
+ code in libstdc++ contains many fixes and changes, and
+ the SGI code is no longer under active
+ development. We expect that no future merges will take place.
+ </p><p>
+ In particular, <code class="classname">string</code> is not from SGI and makes no
+ use of their "rope" class (which is included as an
+ optional extension), nor is <code class="classname">valarray</code> and some others.
+ Classes like <code class="classname">vector&lt;&gt;</code> are, but have been
+ extensively modified.
+ </p><p>
+ More information on the evolution of libstdc++ can be found at the
+ <a class="link" href="manual/api.html" title="API Evolution and Deprecation History">API
+ evolution</a>
+ and <a class="link" href="manual/backwards.html" title="Backwards Compatibility">backwards
+ compatibility</a> documentation.
+ </p><p>
+ The FAQ for SGI's STL (one jump off of their main page) is
+ still recommended reading.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.extensions_and_backwards_compat"></a><a id="q-extensions_and_backwards_compat"></a><p><b>7.4.</b></p></td><td align="left" valign="top"><p>
+ Extensions and Backward Compatibility
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-extensions_and_backwards_compat"></a></td><td align="left" valign="top"><p>
+ See the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">link</a> on backwards compatiblity and <a class="link" href="manual/api.html" title="API Evolution and Deprecation History">link</a> on evolution.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.tr1_support"></a><a id="q-tr1_support"></a><p><b>7.5.</b></p></td><td align="left" valign="top"><p>
+ Does libstdc++ support TR1?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-tr1_support"></a></td><td align="left" valign="top"><p>
+ Yes.
+ </p><p>
+ The C++ Standard Library Technical Report adds many new features to
+ the library. The latest version of this effort is described in
+ <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">
+ Technical Report 1</a>.
+ </p><p>
+ The implementation status of TR1 in libstdc++ can be tracked <a class="link" href="manual/bk01pt01ch01.html#manual.intro.status.standard.tr1" title="C++ TR1">on the TR1 status
+ page</a>.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.get_iso_cxx"></a><a id="q-get_iso_cxx"></a><p><b>7.6.</b></p></td><td align="left" valign="top"><p>How do I get a copy of the ISO C++ Standard?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-get_iso_cxx"></a></td><td align="left" valign="top"><p>
+ Copies of the full ISO 14882 standard are available on line via
+ the ISO mirror site for committee members. Non-members, or those
+ who have not paid for the privilege of sitting on the committee
+ and sustained their two-meeting commitment for voting rights, may
+ get a copy of the standard from their respective national
+ standards organization. In the USA, this national standards
+ organization is ANSI and their website is
+ right <a class="ulink" href="http://www.ansi.org" target="_top">here</a>. (And if
+ you've already registered with them, clicking this link will take
+ you to directly to the place where you can
+ <a class="ulink" href="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003" target="_top">buy the standard on-line</a>.
+ </p><p>
+ Who is your country's member body? Visit the
+ <a class="ulink" href="http://www.iso.ch/" target="_top">ISO homepage</a> and find out!
+ </p><p>
+ The 2003 version of the standard (the 1998 version plus TC1) is
+ available in print, ISBN 0-470-84674-7.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.what_is_abi"></a><a id="q-what_is_abi"></a><p><b>7.7.</b></p></td><td align="left" valign="top"><p>
+ What's an ABI and why is it so messy?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_abi"></a></td><td align="left" valign="top"><p>
+ <acronym class="acronym">ABI</acronym> stands for “<span class="quote">Application Binary
+ Interface</span>â€. Conventionally, it refers to a great
+ mass of details about how arguments are arranged on the call
+ stack and/or in registers, and how various types are arranged
+ and padded in structs. A single CPU design may suffer
+ multiple ABIs designed by different development tool vendors
+ who made different choices, or even by the same vendor for
+ different target applications or compiler versions. In ideal
+ circumstances the CPU designer presents one ABI and all the
+ OSes and compilers use it. In practice every ABI omits
+ details that compiler implementers (consciously or
+ accidentally) must choose for themselves.
+ </p><p>
+ That ABI definition suffices for compilers to generate code so a
+ program can interact safely with an OS and its lowest-level libraries.
+ Users usually want an ABI to encompass more detail, allowing libraries
+ built with different compilers (or different releases of the same
+ compiler!) to be linked together. For C++, this includes many more
+ details than for C, and CPU designers (for good reasons elaborated
+ below) have not stepped up to publish C++ ABIs. The details include
+ virtual function implementation, struct inheritance layout, name
+ mangling, and exception handling. Such an ABI has been defined for
+ GNU C++, and is immediately useful for embedded work relying only on
+ a “<span class="quote">free-standing implementation</span>†that doesn't include (much
+ of) the standard library. It is a good basis for the work to come.
+ </p><p>
+ A useful C++ ABI must also incorporate many details of the standard
+ library implementation. For a C ABI, the layouts of a few structs
+ (such as FILE, stat, jmpbuf, and the like) and a few macros suffice.
+ For C++, the details include the complete set of names of functions
+ and types used, the offsets of class members and virtual functions,
+ and the actual definitions of all inlines. C++ exposes many more
+ library details to the caller than C does. It makes defining
+ a complete ABI a much bigger undertaking, and requires not just
+ documenting library implementation details, but carefully designing
+ those details so that future bug fixes and optimizations don't
+ force breaking the ABI.
+ </p><p>
+ There are ways to help isolate library implementation details from the
+ ABI, but they trade off against speed. Library details used in
+ inner loops (e.g., getchar) must be exposed and frozen for all
+ time, but many others may reasonably be kept hidden from user code,
+ so they may later be changed. Deciding which, and implementing
+ the decisions, must happen before you can reasonably document a
+ candidate C++ ABI that encompasses the standard library.
+ </p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.size_equals_capacity"></a><a id="q-size_equals_capacity"></a><p><b>7.8.</b></p></td><td align="left" valign="top"><p>
+ How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
+ </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-size_equals_capacity"></a></td><td align="left" valign="top"><p>
+ The standard idiom for deallocating a <code class="classname">vector&lt;T&gt;</code>'s
+ unused memory is to create a temporary copy of the vector and swap their
+ contents, e.g. for <code class="classname">vector&lt;T&gt; v</code>
+ </p><div class="literallayout"><p><br />
+     std::vector&lt;T&gt;(v).swap(v);<br />
+    </p></div><p>
+ The copy will take O(n) time and the swap is constant time.
+ </p><p>
+ See <a class="ulink" href="../21_strings/howto.html#6" target="_top">Shrink-to-fit
+ strings</a> for a similar solution for strings.
+ </p></td></tr></tbody></table></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </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/index.html b/libstdc++-v3/doc/html/index.html
new file mode 100644
index 00000000000..96ff103fb04
--- /dev/null
+++ b/libstdc++-v3/doc/html/index.html
@@ -0,0 +1,43 @@
+<html>
+
+<head>
+<title>The GNU C++ Library Documentation</title>
+</head>
+
+<body>
+
+<!-- ==================================================================== -->
+
+
+<div>
+<h1>The GNU C++ Library Documentation</h1>
+
+<p>Copyright 2008 FSF</p>
+
+<p>
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation
+ License, Version 1.2 or any later version published by the
+ Free Software Foundation; with no Invariant Sections, with no
+ Front-Cover Texts, and with no Back-Cover Texts.
+</p>
+<p>
+ This is the top level of the libstdc++ documentation tree.
+ The documentation is contained in three logically separate
+ documents, as listed in the following Table of Contents.
+</p>
+</div>
+
+<div>
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><a href="manual/spine.html">Manual</a></dt>
+<dt><a href="faq.html">Frequently Asked Questions</a></dt>
+<dt><a href="api.html">API and Source Documentation</a></dt>
+</dl>
+</div>
+
+</body>
+</html>
+
+
diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html
new file mode 100644
index 00000000000..d86bb47918b
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/abi.html
@@ -0,0 +1,493 @@
+<?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>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; ABI&#10; , &#10; version&#10; , &#10; dynamic&#10; , &#10; shared&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="internals.html" title="Porting to New Hardware or Operating Systems" /><link rel="next" href="api.html" title="API Evolution and Deprecation History" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="api.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="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p>
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.cxx_interface"></a>The C++ Interface</h3></div></div></div><p>
+ C++ applications often dependent on specific language support
+ routines, say for throwing exceptions, or catching exceptions, and
+ perhaps also dependent on features in the C++ Standard Library.
+</p><p>
+ The C++ Standard Library has many include files, types defined in
+ those include files, specific named functions, and other
+ behavior. The text of these behaviors, as written in source include
+ files, is called the Application Programing Interface, or API.
+</p><p>
+ Furthermore, C++ source that is compiled into object files is
+ transformed by the compiler: it arranges objects with specific
+ alignment and in a particular layout, mangling names according to a
+ well-defined algorithm, has specific arrangements for the support of
+ virtual functions, etc. These details are defined as the compiler
+ Application Binary Interface, or ABI. The GNU C++ compiler uses an
+ industry-standard C++ ABI starting with version 3. Details can be
+ found in the <a class="ulink" href="http://www.codesourcery.com/cxx-abi/abi.html" target="_top"> ABI
+ specification</a>.
+</p><p>
+ The GNU C++ compiler, g++, has a compiler command line option to
+ switch between various different C++ ABIs. This explicit version
+ switch is the flag <code class="code">-fabi-version</code>. In addition, some
+ g++ command line options may change the ABI as a side-effect of
+ use. Such flags include <code class="code">-fpack-struct</code> and
+ <code class="code">-fno-exceptions</code>, but include others: see the complete
+ list in the GCC manual under the heading <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code%20Gen%20Options" target="_top">Options
+ for Code Generation Conventions</a>.
+</p><p>
+ The configure options used when building a specific libstdc++
+ version may also impact the resulting library ABI. The available
+ configure options, and their impact on the library ABI, are
+ documented
+<a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html" target="_top">
+here</a>.
+</p><p> Putting all of these ideas together results in the C++ Standard
+library ABI, which is the compilation of a given library API by a
+given compiler ABI. In a nutshell:
+</p><p>
+ “<span class="quote">
+ library API + compiler ABI = library ABI
+ </span>â€
+</p><p>
+ The library ABI is mostly of interest for end-users who have
+ unresolved symbols and are linking dynamically to the C++ Standard
+ library, and who thus must be careful to compile their application
+ with a compiler that is compatible with the available C++ Standard
+ library binary. In this case, compatible is defined with the equation
+ above: given an application compiled with a given compiler ABI and
+ library API, it will work correctly with a Standard C++ Library
+ created with the same constraints.
+</p><p>
+ To use a specific version of the C++ ABI, one must use a
+ corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that
+ implements the C++ ABI in question.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.versioning"></a>Versioning</h3></div></div></div><p> The C++ interface has evolved throughout the history of the GNU
+C++ toolchain. With each release, various details have been changed so
+as to give distinct versions to the C++ interface.
+</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.goals"></a>Goals</h4></div></div></div><p>Extending existing, stable ABIs. Versioning gives subsequent stable
+releases series libraries the ability to add new symbols and add
+functionality, all the while retaining backwards compatibility with
+the previous releases in the series. Note: the reverse is not true. It
+is not possible to take binaries linked with the latest version of a
+release series (if symbols have been added) and expect the initial
+release of the series to remain link compatible.
+</p><p>Allows multiple, incompatible ABIs to coexist at the same time.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.history"></a>History</h4></div></div></div><p>
+ How can this complexity be managed? What does C++ versioning mean?
+ Because library and compiler changes often make binaries compiled
+ with one version of the GNU tools incompatible with binaries
+ compiled with other (either newer or older) versions of the same GNU
+ tools, specific techniques are used to make managing this complexity
+ easier.
+</p><p>
+ The following techniques are used:
+</p><div class="orderedlist"><ol type="1"><li><p>Release versioning on the libgcc_s.so binary. </p><p>This is implemented via file names and the ELF DT_SONAME
+ mechanism (at least on ELF systems). It is versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: libgcc_s.so.1</p></li><li><p>gcc-3.0.1: libgcc_s.so.1</p></li><li><p>gcc-3.0.2: libgcc_s.so.1</p></li><li><p>gcc-3.0.3: libgcc_s.so.1</p></li><li><p>gcc-3.0.4: libgcc_s.so.1</p></li><li><p>gcc-3.1.0: libgcc_s.so.1</p></li><li><p>gcc-3.1.1: libgcc_s.so.1</p></li><li><p>gcc-3.2.0: libgcc_s.so.1</p></li><li><p>gcc-3.2.1: libgcc_s.so.1</p></li><li><p>gcc-3.2.2: libgcc_s.so.1</p></li><li><p>gcc-3.2.3: libgcc_s.so.1</p></li><li><p>gcc-3.3.0: libgcc_s.so.1</p></li><li><p>gcc-3.3.1: libgcc_s.so.1</p></li><li><p>gcc-3.3.2: libgcc_s.so.1</p></li><li><p>gcc-3.3.3: libgcc_s.so.1</p></li><li><p>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: on m68k-linux and
+ hppa-linux this is either libgcc_s.so.1 (when configuring
+ <code class="code">--with-sjlj-exceptions</code>) or libgcc_s.so.2. For all
+ others, this is libgcc_s.so.1. </p></li></ul></div></li><li><p>Symbol versioning on the libgcc_s.so binary.</p><p>It is versioned with the following labels and version
+ definitions, where the version definition is the maximum for a
+ particular release. Labels are cumulative. If a particular release
+ is not listed, it has the same version labels as the preceeding
+ release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: GCC_3.0</p></li><li><p>gcc-3.3.0: GCC_3.3</p></li><li><p>gcc-3.3.1: GCC_3.3.1</p></li><li><p>gcc-3.3.2: GCC_3.3.2</p></li><li><p>gcc-3.3.4: GCC_3.3.4</p></li><li><p>gcc-3.4.0: GCC_3.4</p></li><li><p>gcc-3.4.2: GCC_3.4.2</p></li><li><p>gcc-3.4.4: GCC_3.4.4</p></li><li><p>gcc-4.0.0: GCC_4.0.0</p></li><li><p>gcc-4.1.0: GCC_4.1.0</p></li><li><p>gcc-4.2.0: GCC_4.2.0</p></li></ul></div></li><li><p>Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above.</p><p>It is versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: libstdc++.so.3.0.0</p></li><li><p>gcc-3.0.1: libstdc++.so.3.0.1</p></li><li><p>gcc-3.0.2: libstdc++.so.3.0.2</p></li><li><p>gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)</p></li><li><p>gcc-3.0.4: libstdc++.so.3.0.4</p></li><li><p>gcc-3.1.0: libstdc++.so.4.0.0</p></li><li><p>gcc-3.1.1: libstdc++.so.4.0.1</p></li><li><p>gcc-3.2.0: libstdc++.so.5.0.0</p></li><li><p>gcc-3.2.1: libstdc++.so.5.0.1</p></li><li><p>gcc-3.2.2: libstdc++.so.5.0.2</p></li><li><p>gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)</p></li><li><p>gcc-3.3.0: libstdc++.so.5.0.4</p></li><li><p>gcc-3.3.1: libstdc++.so.5.0.5</p></li><li><p>gcc-3.3.2: libstdc++.so.5.0.5</p></li><li><p>gcc-3.3.3: libstdc++.so.5.0.5</p></li><li><p>gcc-3.4.0: libstdc++.so.6.0.0</p></li><li><p>gcc-3.4.1: libstdc++.so.6.0.1</p></li><li><p>gcc-3.4.2: libstdc++.so.6.0.2</p></li><li><p>gcc-3.4.3: libstdc++.so.6.0.3</p></li><li><p>gcc-3.4.4: libstdc++.so.6.0.3</p></li><li><p>gcc-3.4.5: libstdc++.so.6.0.3</p></li><li><p>gcc-3.4.6: libstdc++.so.6.0.3</p></li><li><p>gcc-4.0.0: libstdc++.so.6.0.4</p></li><li><p>gcc-4.0.1: libstdc++.so.6.0.5</p></li><li><p>gcc-4.0.2: libstdc++.so.6.0.6</p></li><li><p>gcc-4.0.3: libstdc++.so.6.0.7</p></li><li><p>gcc-4.1.0: libstdc++.so.6.0.7</p></li><li><p>gcc-4.1.1: libstdc++.so.6.0.8</p></li><li><p>gcc-4.1.2: libstdc++.so.6.0.8</p></li><li><p>gcc-4.2.0: libstdc++.so.6.0.9</p></li></ul></div></li><li><p>Symbol versioning on the libstdc++.so binary.</p><p>mapfile: libstdc++/config/linker-map.gnu</p><p>It is versioned with the following labels and version
+ definitions, where the version definition is the maximum for a
+ particular release. Note, only symbol which are newly introduced
+ will use the maximum version definition. Thus, for release series
+ with the same label, but incremented version definitions, the later
+ release has both versions. (An example of this would be the
+ gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and
+ GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0
+ release.) If a particular release is not listed, it has the same
+ version labels as the preceeding release.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: (Error, not versioned)</p></li><li><p>gcc-3.0.1: (Error, not versioned)</p></li><li><p>gcc-3.0.2: (Error, not versioned)</p></li><li><p>gcc-3.0.3: (Error, not versioned)</p></li><li><p>gcc-3.0.4: (Error, not versioned)</p></li><li><p>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li><p>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li><p>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li><p>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li><p>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li><p>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li><p>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li><p>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li><p>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li><p>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li><p>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li><p>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li><p>gcc-3.4.2: GLIBCXX_3.4.2</p></li><li><p>gcc-3.4.3: GLIBCXX_3.4.3</p></li><li><p>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li><p>gcc-4.0.1: GLIBCXX_3.4.5</p></li><li><p>gcc-4.0.2: GLIBCXX_3.4.6</p></li><li><p>gcc-4.0.3: GLIBCXX_3.4.7</p></li><li><p>gcc-4.1.1: GLIBCXX_3.4.8</p></li><li><p>gcc-4.2.0: GLIBCXX_3.4.9</p></li></ul></div></li><li><p>Incremental bumping of a compiler pre-defined macro,
+ __GXX_ABI_VERSION. This macro is defined as the version of the
+ compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
+ be automatically defined whenever g++ is used (the curious can
+ test this by invoking g++ with the '-v' flag.)
+ </p><p>
+ This macro was defined in the file "lang-specs.h" in the gcc/cp directory.
+ Later versions defined it in "c-common.c" in the gcc directory, and from
+ G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the
+ '-fabi-version' command line option.
+ </p><p>
+ It is versioned as follows, where 'n' is given by '-fabi-version=n':
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.x: 100</p></li><li><p>gcc-3.1.x: 100 (Error, should be 101)</p></li><li><p>gcc-3.2.x: 102</p></li><li><p>gcc-3.3.x: 102</p></li><li><p>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 102 (when n=1)</p></li><li><p>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 1000 + n (when n&gt;1)</p></li><li><p>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 999999 (when n=0)</p></li></ul></div><p></p></li><li><p>Changes to the default compiler option for
+ <code class="code">-fabi-version</code>.
+ </p><p>
+ It is versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.x: (Error, not versioned) </p></li><li><p>gcc-3.1.x: (Error, not versioned) </p></li><li><p>gcc-3.2.x: <code class="code">-fabi-version=1</code></p></li><li><p>gcc-3.3.x: <code class="code">-fabi-version=1</code></p></li><li><p>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: <code class="code">-fabi-version=2</code></p></li></ul></div><p></p></li><li><p>Incremental bumping of a library pre-defined macro. For releases
+ before 3.4.0, the macro is __GLIBCPP__. For later releases, it's
+ __GLIBCXX__. (The libstdc++ project generously changed from CPP to
+ CXX throughout its source to allow the "C" pre-processor the CPP
+ macro namespace.) These macros are defined as the date the library
+ was released, in compressed ISO date format, as an unsigned long.
+ </p><p>
+ This macro is defined in the file "c++config" in the
+ "libstdc++/include/bits" directory. (Up to gcc-4.1.0, it was
+ changed every night by an automated script. Since gcc-4.1.0, it is
+ the same value as gcc/DATESTAMP.)
+ </p><p>
+ It is versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: 20010615</p></li><li><p>gcc-3.0.1: 20010819</p></li><li><p>gcc-3.0.2: 20011023</p></li><li><p>gcc-3.0.3: 20011220</p></li><li><p>gcc-3.0.4: 20020220</p></li><li><p>gcc-3.1.0: 20020514</p></li><li><p>gcc-3.1.1: 20020725</p></li><li><p>gcc-3.2.0: 20020814</p></li><li><p>gcc-3.2.1: 20021119</p></li><li><p>gcc-3.2.2: 20030205</p></li><li><p>gcc-3.2.3: 20030422</p></li><li><p>gcc-3.3.0: 20030513</p></li><li><p>gcc-3.3.1: 20030804</p></li><li><p>gcc-3.3.2: 20031016</p></li><li><p>gcc-3.3.3: 20040214</p></li><li><p>gcc-3.4.0: 20040419</p></li><li><p>gcc-3.4.1: 20040701</p></li><li><p>gcc-3.4.2: 20040906</p></li><li><p>gcc-3.4.3: 20041105</p></li><li><p>gcc-3.4.4: 20050519</p></li><li><p>gcc-3.4.5: 20051201</p></li><li><p>gcc-3.4.6: 20060306</p></li><li><p>gcc-4.0.0: 20050421</p></li><li><p>gcc-4.0.1: 20050707</p></li><li><p>gcc-4.0.2: 20050921</p></li><li><p>gcc-4.0.3: 20060309</p></li><li><p>gcc-4.1.0: 20060228</p></li><li><p>gcc-4.1.1: 20060524</p></li><li><p>gcc-4.1.2: 20070214</p></li><li><p>gcc-4.2.0: 20070514</p></li></ul></div><p></p></li><li><p>
+ Incremental bumping of a library pre-defined macro,
+ _GLIBCPP_VERSION. This macro is defined as the released version of
+ the library, as a string literal. This is only implemented in
+ gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it
+ is called _GLIBCXX_VERSION).
+ </p><p>
+ This macro is defined in the file "c++config" in the
+ "libstdc++/include/bits" directory and is generated
+ automatically by autoconf as part of the configure-time generation
+ of config.h.
+ </p><p>
+ It is versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: "3.0.0"</p></li><li><p>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</p></li><li><p>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</p></li><li><p>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</p></li><li><p>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</p></li><li><p>gcc-3.1.0: "3.1.0"</p></li><li><p>gcc-3.1.1: "3.1.1"</p></li><li><p>gcc-3.2.0: "3.2"</p></li><li><p>gcc-3.2.1: "3.2.1"</p></li><li><p>gcc-3.2.2: "3.2.2"</p></li><li><p>gcc-3.2.3: "3.2.3"</p></li><li><p>gcc-3.3.0: "3.3"</p></li><li><p>gcc-3.3.1: "3.3.1"</p></li><li><p>gcc-3.3.2: "3.3.2"</p></li><li><p>gcc-3.3.3: "3.3.3"</p></li><li><p>gcc-3.4.x: "version-unused"</p></li><li><p>gcc-4.0.x: "version-unused"</p></li><li><p>gcc-4.1.x: "version-unused"</p></li><li><p>gcc-4.2.x: "version-unused"</p></li></ul></div><p></p></li><li><p>
+ Matching each specific C++ compiler release to a specific set of
+ C++ include files. This is only implemented in gcc-3.1.1 releases
+ and higher.
+ </p><p>
+ All C++ includes are installed in include/c++, then nest in a
+ directory hierarchy corresponding to the C++ compiler's released
+ version. This version corresponds to the variable "gcc_version" in
+ "libstdc++/acinclude.m4," and more details can be found in that
+ file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).
+ </p><p>
+ C++ includes are versioned as follows:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>gcc-3.0.0: include/g++-v3</p></li><li><p>gcc-3.0.1: include/g++-v3</p></li><li><p>gcc-3.0.2: include/g++-v3</p></li><li><p>gcc-3.0.3: include/g++-v3</p></li><li><p>gcc-3.0.4: include/g++-v3</p></li><li><p>gcc-3.1.0: include/g++-v3</p></li><li><p>gcc-3.1.1: include/c++/3.1.1</p></li><li><p>gcc-3.2.0: include/c++/3.2</p></li><li><p>gcc-3.2.1: include/c++/3.2.1</p></li><li><p>gcc-3.2.2: include/c++/3.2.2</p></li><li><p>gcc-3.2.3: include/c++/3.2.3</p></li><li><p>gcc-3.3.0: include/c++/3.3</p></li><li><p>gcc-3.3.1: include/c++/3.3.1</p></li><li><p>gcc-3.3.2: include/c++/3.3.2</p></li><li><p>gcc-3.3.3: include/c++/3.3.3</p></li><li><p>gcc-3.4.0: include/c++/3.4.0</p></li><li><p>gcc-3.4.1: include/c++/3.4.1</p></li><li><p>gcc-3.4.2: include/c++/3.4.2</p></li><li><p>gcc-3.4.3: include/c++/3.4.3</p></li><li><p>gcc-3.4.4: include/c++/3.4.4</p></li><li><p>gcc-3.4.5: include/c++/3.4.5</p></li><li><p>gcc-3.4.6: include/c++/3.4.6</p></li><li><p>gcc-4.0.0: include/c++/4.0.0</p></li><li><p>gcc-4.0.1: include/c++/4.0.1</p></li><li><p>gcc-4.0.2: include/c++/4.0.2</p></li><li><p>gcc-4.0.3: include/c++/4.0.3</p></li><li><p>gcc-4.1.0: include/c++/4.1.0</p></li><li><p>gcc-4.1.1: include/c++/4.1.1</p></li><li><p>gcc-4.1.2: include/c++/4.1.2</p></li><li><p>gcc-4.2.0: include/c++/4.2.0</p></li></ul></div><p></p></li></ol></div><p>
+ Taken together, these techniques can accurately specify interface
+ and implementation changes in the GNU C++ tools themselves. Used
+ properly, they allow both the GNU C++ tools implementation, and
+ programs using them, an evolving yet controlled development that
+ maintains backward compatibility.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.prereq"></a>Prerequisites</h4></div></div></div><p>
+ Minimum environment that supports a versioned ABI: A supported
+ dynamic linker, a GNU linker of sufficient vintage to understand
+ demangled C++ name globbing (ld), a shared executable compiled
+ with g++, and shared libraries (libgcc_s, libstdc++) compiled by
+ a compiler (g++) with a compatible ABI. Phew.
+ </p><p>
+ On top of all that, an additional constraint: libstdc++ did not
+ attempt to version symbols (or age gracefully, really) until
+ version 3.1.0.
+ </p><p>
+ Most modern Linux and BSD versions, particularly ones using
+ gcc-3.1.x tools and more recent vintages, will meet the
+ requirements above.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.config"></a>Configuring</h4></div></div></div><p>
+ It turns out that most of the configure options that change
+ default behavior will impact the mangled names of exported
+ symbols, and thus impact versioning and compatibility.
+ </p><p>
+ For more information on configure options, including ABI
+ impacts, see:
+ http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
+ </p><p>
+ There is one flag that explicitly deals with symbol versioning:
+ --enable-symvers.
+ </p><p>
+ In particular, libstdc++/acinclude.m4 has a macro called
+ GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument
+ passed in via --enable-symvers=foo). At that point, the macro
+ attempts to make sure that all the requirement for symbol
+ versioning are in place. For more information, please consult
+ acinclude.m4.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.active"></a>Checking Active</h4></div></div></div><p>
+ When the GNU C++ library is being built with symbol versioning
+ on, you should see the following at configure time for
+ libstdc++:
+ </p><pre class="screen">
+<code class="computeroutput">
+ checking versioning on shared library symbols... gnu
+</code>
+</pre><p>
+ If you don't see this line in the configure output, or if this line
+ appears but the last word is 'no', then you are out of luck.
+</p><p>
+ If the compiler is pre-installed, a quick way to test is to compile
+ the following (or any) simple C++ file and link it to the shared
+ libstdc++ library:
+</p><pre class="programlisting">
+#include &lt;iostream&gt;
+
+int main()
+{ std::cout &lt;&lt; "hello" &lt;&lt; std::endl; return 0; }
+
+%g++ hello.cc -o hello.out
+
+%ldd hello.out
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+
+%nm hello.out
+</pre><p>
+If you see symbols in the resulting output with "GLIBCXX_3" as part
+of the name, then the executable is versioned. Here's an example:
+</p><p>
+ <code class="code">U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4</code>
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_allowed"></a>Allowed Changes</h3></div></div></div><p>
+The following will cause the library minor version number to
+increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
+</p><div class="orderedlist"><ol type="1"><li><p>Adding an exported global or static data member</p></li><li><p>Adding an exported function, static or non-virtual member function</p></li><li><p>Adding an exported symbol or symbols by additional instantiations</p></li></ol></div><p>
+Other allowed changes are possible.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_no"></a>Prohibited Changes</h3></div></div></div><p>
+The following non-exhaustive list will cause the library major version
+number to increase, say from "libstdc++.so.3.0.4" to
+"libstdc++.so.4.0.0".
+</p><div class="orderedlist"><ol type="1"><li><p>Changes in the gcc/g++ compiler ABI</p></li><li><p>Changing size of an exported symbol</p></li><li><p>Changing alignment of an exported symbol</p></li><li><p>Changing the layout of an exported symbol</p></li><li><p>Changing mangling on an exported symbol</p></li><li><p>Deleting an exported symbol</p></li><li><p>Changing the inheritance properties of a type by adding or removing
+ base classes</p></li><li><p>
+ Changing the size, alignment, or layout of types
+ specified in the C++ standard. These may not necessarily be
+ instantiated or otherwise exported in the library binary, and
+ include all the required locale facets, as well as things like
+ std::basic_streambuf, et al.
+</p></li><li><p> Adding an explicit copy constructor or destructor to a
+class that would otherwise have implicit versions. This will change
+the way the compiler deals with this class in by-value return
+statements or parameters: instead of being passing instances of this
+class in registers, the compiler will be forced to use memory. See <a class="ulink" href="http://www.codesourcery.com/cxx-abi/abi.html#calls" target="_top"> this part</a>
+ of the C++ ABI documentation for further details.
+ </p></li></ol></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.impl"></a>Implementation</h3></div></div></div><div class="orderedlist"><ol type="1"><li><p>
+ Separation of interface and implementation
+ </p><p>
+ This is accomplished by two techniques that separate the API from
+ the ABI: forcing undefined references to link against a library
+ binary for definitions.
+ </p><div class="variablelist"><dl><dt><span class="term">Include files have declarations, source files have defines</span></dt><dd><p>
+ For non-templatized types, such as much of <code class="code">class
+ locale</code>, the appropriate standard C++ include, say
+ <code class="code">locale</code>, can contain full declarations, while
+ various source files (say <code class="code"> locale.cc, locale_init.cc,
+ localename.cc</code>) contain definitions.
+ </p></dd><dt><span class="term">Extern template on required types</span></dt><dd><p>
+ For parts of the standard that have an explicit list of
+ required instantiations, the GNU extension syntax <code class="code"> extern
+ template </code> can be used to control where template
+ definitions reside. By marking required instantiations as
+ <code class="code"> extern template </code> in include files, and providing
+ explicit instantiations in the appropriate instantiation files,
+ non-inlined template functions can be versioned. This technique
+ is mostly used on parts of the standard that require <code class="code">
+ char</code> and <code class="code"> wchar_t</code> instantiations, and
+ includes <code class="code"> basic_string</code>, the locale facets, and the
+ types in <code class="code"> iostreams</code>.
+ </p></dd></dl></div><p>
+ In addition, these techniques have the additional benefit that they
+ reduce binary size, which can increase runtime performance.
+ </p></li><li><p>
+ Namespaces linking symbol definitions to export mapfiles
+ </p><p>
+ All symbols in the shared library binary are processed by a
+ linker script at build time that either allows or disallows
+ external linkage. Because of this, some symbols, regardless of
+ normal C/C++ linkage, are not visible. Symbols that are internal
+ have several appealing characteristics: by not exporting the
+ symbols, there are no relocations when the shared library is
+ started and thus this makes for faster runtime loading
+ performance by the underlying dynamic loading mechanism. In
+ addition, they have the possibility of changing without impacting
+ ABI compatibility.
+ </p><p>The following namespaces are transformed by the mapfile:</p><div class="variablelist"><dl><dt><span class="term"><code class="code">namespace std</code></span></dt><dd><p> Defaults to exporting all symbols in label
+<code class="code">GLIBCXX</code> that do not begin with an underscore, ie
+<code class="code">__test_func</code> would not be exported by default. Select
+exceptional symbols are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __gnu_cxx</code></span></dt><dd><p> Defaults to not exporting any symbols in label
+<code class="code">GLIBCXX</code>, select items are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __gnu_internal</code></span></dt><dd><p> Defaults to not exported, no items are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __cxxabiv1</code>, aliased to <code class="code"> namespace abi</code></span></dt><dd><p> Defaults to not exporting any symbols in label
+<code class="code">CXXABI</code>, select items are allowed to be visible.</p></dd></dl></div><p>
+</p></li><li><p>Freezing the API</p><p>Disallowed changes, as above, are not made on a stable release
+branch. Enforcement tends to be less strict with GNU extensions that
+standard includes.</p></li></ol></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.testing"></a>Testing</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.single"></a>Single ABI Testing</h4></div></div></div><p>
+ Testing for GNU C++ ABI changes is composed of two distinct
+ areas: testing the C++ compiler (g++) for compiler changes, and
+ testing the C++ library (libstdc++) for library changes.
+ </p><p>
+ Testing the C++ compiler ABI can be done various ways.
+ </p><p>
+ One. Intel ABI checker. More information can be obtained <a class="ulink" href="http://developer.intel.com/software/products/opensource/" target="_top">here.</a>
+ </p><p>
+Two.
+The second is yet unreleased, but has been announced on the gcc
+mailing list. It is yet unspecified if these tools will be freely
+available, and able to be included in a GNU project. Please contact
+Mark Mitchell (mark@codesourcery.com) for more details, and current
+status.
+</p><p>
+Three.
+Involves using the vlad.consistency test framework. This has also been
+discussed on the gcc mailing lists.
+</p><p>
+Testing the C++ library ABI can also be done various ways.
+</p><p>
+One.
+(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
+one with a new compiler and an old library, and the other with an old
+compiler and a new library, and look for testsuite regressions)
+</p><p>
+Details on how to set this kind of test up can be found here:
+http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
+</p><p>
+Two.
+Use the 'make check-abi' rule in the libstdc++ Makefile.
+</p><p>
+This is a proactive check the library ABI. Currently, exported symbol
+names that are either weak or defined are checked against a last known
+good baseline. Currently, this baseline is keyed off of 3.4.0
+binaries, as this was the last time the .so number was incremented. In
+addition, all exported names are demangled, and the exported objects
+are checked to make sure they are the same size as the same object in
+the baseline.
+
+Notice that each baseline is relative to a <span class="emphasis"><em>default</em></span>
+configured library and compiler: in particular, if options such as
+--enable-clocale, or --with-cpu, in case of multilibs, are used at
+configure time, the check may fail, either because of substantive
+differences or because of limitations of the current checking
+machinery.
+</p><p>
+This dataset is insufficient, yet a start. Also needed is a
+comprehensive check for all user-visible types part of the standard
+library for sizeof() and alignof() changes.
+</p><p>
+Verifying compatible layouts of objects is not even attempted. It
+should be possible to use sizeof, alignof, and offsetof to compute
+offsets for each structure and type in the standard library, saving to
+another datafile. Then, compute this in a similar way for new
+binaries, and look for differences.
+</p><p>
+Another approach might be to use the -fdump-class-hierarchy flag to
+get information. However, currently this approach gives insufficient
+data for use in library testing, as class data members, their offsets,
+and other detailed data is not displayed with this flag.
+(See g++/7470 on how this was used to find bugs.)
+</p><p>
+Perhaps there are other C++ ABI checkers. If so, please notify
+us. We'd like to know about them!
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.multi"></a>Multiple ABI Testing</h4></div></div></div><p>
+A "C" application, dynamically linked to two shared libraries, liba,
+libb. The dependent library liba is C++ shared library compiled with
+gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library
+libb is a C++ shared library compiled with gcc-3.4.x, and also uses io,
+exceptions, locale, etc.
+</p><p> As above, libone is constructed as follows: </p><pre class="programlisting">
+%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
+
+%ln -s libone.so.1.0.0 libone.so
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
+
+%ar cru libone.a a.o
+</pre><p> And, libtwo is constructed as follows: </p><pre class="programlisting">
+%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
+
+%ln -s libtwo.so.1.0.0 libtwo.so
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
+
+%ar cru libtwo.a b.o
+</pre><p> ...with the resulting libraries looking like </p><pre class="screen">
+<code class="computeroutput">
+%ldd libone.so.1.0.0
+ libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40016000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400fa000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40125000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+
+%ldd libtwo.so.1.0.0
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x40027000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400e1000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x4010c000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+</code>
+</pre><p>
+ Then, the "C" compiler is used to compile a source file that uses
+ functions from each library.
+</p><pre class="programlisting">
+gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
+</pre><p>
+ Which gives the expected:
+</p><pre class="screen">
+<code class="computeroutput">
+%ldd a.out
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
+ libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40015000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+</code>
+</pre><p>
+ This resulting binary, when executed, will be able to safely use
+ code from both liba, and the dependent libstdc++.so.6, and libb,
+ with the dependent libstdc++.so.5.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.issues"></a>Outstanding Issues</h3></div></div></div><p>
+ Some features in the C++ language make versioning especially
+ difficult. In particular, compiler generated constructs such as
+ implicit instantiations for templates, typeinfo information, and
+ virtual tables all may cause ABI leakage across shared library
+ boundaries. Because of this, mixing C++ ABI's is not recommended at
+ this time.
+</p><p>
+ For more background on this issue, see these bugzilla entries:
+</p><p>
+<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="id510592"></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="id510609"></a><p><span class="title"><i>
+ C++ ABI Reference
+ </i>. </span><span class="biblioid">
+ <a class="ulink" href="http://www.codesourcery.com/cxx-abi" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510627"></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://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510644"></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://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510662"></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/?p=/doc/816-1386&amp;a=load" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510679"></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/db/prod/solaris.9" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510696"></a><p><span class="title"><i>
+ ELF Symbol Versioning
+ </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/symbol-versioning" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id510725"></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="id510742"></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="id499374"></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></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Porting to New Hardware or Operating Systems </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html
new file mode 100644
index 00000000000..b490fe49ecd
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/algorithms.html
@@ -0,0 +1,3 @@
+<?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>Part IX. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt08ch19s02.html" title="One Past the End" /><link rel="next" href="bk01pt09pr02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IX. Algorithms</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</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"><code class="function">swap</code></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
new file mode 100644
index 00000000000..6da7e73c058
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -0,0 +1,151 @@
+<?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>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="ISO C++, api, evolution, deprecation, history" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="abi.html" title="ABI Policy and Guidelines" /><link rel="next" href="backwards.html" title="Backwards Compatibility" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="backwards.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="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p>
+A list of user-visible changes, in cronological order
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_300"></a><code class="constant">3.0</code></h3></div></div></div><p>
+Extensions moved to <code class="filename">include/ext</code>.
+ </p><p>
+Include files from the SGI/HP sources that pre-date the ISO standard
+are added. These files are placed into
+the <code class="filename">include/backward</code> directory and a deprecated warning
+is added that notifies on inclusion (<code class="literal">-Wno-deprecated</code>
+deactivates the warning.)
+</p><p>Deprecated include <code class="filename">backward/strstream</code> added.</p><p>Removal of include <code class="filename">builtinbuf.h</code>, <code class="filename">indstream.h</code>, <code class="filename">parsestream.h</code>, <code class="filename">PlotFile.h</code>, <code class="filename">SFile.h</code>, <code class="filename">stdiostream.h</code>, and <code class="filename">stream.h</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_310"></a><code class="constant">3.1</code></h3></div></div></div><p>
+ </p><p>
+Extensions from SGI/HP moved from <code class="code">namespace std</code>
+to <code class="code">namespace __gnu_cxx</code>. As part of this, the following
+new includes are
+added: <code class="filename">ext/algorithm</code>, <code class="filename">ext/functional</code>, <code class="filename">ext/iterator</code>, <code class="filename">ext/memory</code>, and <code class="filename">ext/numeric</code>.
+</p><p>
+Extensions to <code class="code">basic_filebuf</code> introduced: <code class="code">__gnu_cxx::enc_filebuf</code>, and <code class="code">__gnu_cxx::stdio_filebuf</code>.
+</p><p>
+Extensions to tree data structures added in <code class="filename">ext/rb_tree</code>.
+</p><p>
+Removal of <code class="filename">ext/tree</code>, moved to <code class="filename">backward/tree.h</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_320"></a><code class="constant">3.2</code></h3></div></div></div><p>
+ </p><p>Symbol versioning introduced for shared library.</p><p>Removal of include <code class="filename">backward/strstream.h</code>.</p><p>Allocator changes. Change <code class="code">__malloc_alloc</code> to <code class="code">malloc_allocator</code> and <code class="code">__new_alloc</code> to <code class="code">new_allocator</code>. </p><p> For GCC releases from 2.95 through the 3.1 series, defining
+ <code class="literal">__USE_MALLOC</code> on the gcc command line would change the
+ default allocation strategy to instead use <code class="code"> malloc</code> and
+ <code class="function">free</code>. See
+ <a class="ulink" href="../23_containers/howto.html#3" target="_top">this note</a>
+ for details as to why this was something needing improvement.
+ </p><p>Error handling in iostreams cleaned up, made consistent. </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_330"></a><code class="constant">3.3</code></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="api.rel_340"></a><code class="constant">3.4</code></h3></div></div></div><p>
+ </p><p>
+Large file support.
+</p><p> Extensions for generic characters and <code class="code">char_traits</code> added in <code class="filename">ext/pod_char_traits.h</code>.
+</p><p>
+Support for <code class="code">wchar_t</code> specializations of <code class="code">basic_filebuf</code> enhanced to support <code class="code">UTF-8</code> and <code class="code">Unicode</code>, depending on host. More hosts support basic <code class="code">wchar_t</code> functionality.
+</p><p>
+Support for <code class="code">char_traits</code> beyond builtin types.
+</p><p>
+Conformant <code class="code">allocator</code> class and usage in containers. As
+part of this, the following extensions are
+added: <code class="filename">ext/bitmap_allocator.h</code>, <code class="filename">ext/debug_allocator.h</code>, <code class="filename">ext/mt_allocator.h</code>, <code class="filename">ext/malloc_allocator.h</code>,<code class="filename">ext/new_allocator.h</code>, <code class="filename">ext/pool_allocator.h</code>.
+</p><p>
+This is a change from all previous versions, and may require
+source-level changes due to allocator-related changes to structures
+names and template parameters, filenames, and file locations. Some,
+like <code class="code">__simple_alloc, __allocator, __alloc, </code> and <code class="code">
+_Alloc_traits</code> have been removed.
+</p><p>Default behavior of <code class="code">std::allocator</code> has changed.</p><p>
+ Previous versions prior to 3.4 cache allocations in a memory
+ pool, instead of passing through to call the global allocation
+ operators (ie, <code class="classname">__gnu_cxx::pool_allocator</code>). More
+ recent versions default to the
+ simpler <code class="classname">__gnu_cxx::new_allocator</code>.
+</p><p> Previously, all allocators were written to the SGI
+ style, and all STL containers expected this interface. This
+ interface had a traits class called <code class="code">_Alloc_traits</code> that
+ attempted to provide more information for compile-time allocation
+ selection and optimization. This traits class had another allocator
+ wrapper, <code class="code">__simple_alloc&lt;T,A&gt;</code>, which was a
+ wrapper around another allocator, A, which itself is an allocator
+ for instances of T. But wait, there's more:
+ <code class="code">__allocator&lt;T,A&gt;</code> is another adapter. Many of
+ the provided allocator classes were SGI style: such classes can be
+ changed to a conforming interface with this wrapper:
+ <code class="code">__allocator&lt;T, __alloc&gt;</code> is thus the same as
+ <code class="code">allocator&lt;T&gt;</code>.
+ </p><p> The class <code class="classname">allocator</code> used the typedef
+ <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="id456920"></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="id408028"></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.
+</p><p>
+Macro guard for changed, from <code class="literal">_GLIBCPP_</code> to <code class="literal">_GLIBCXX_</code>.
+</p><p>
+Extension <code class="filename">ext/stdio_sync_filebuf.h</code> added.
+</p><p>
+Extension <code class="filename">ext/demangle.h</code> added.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_400"></a><code class="constant">4.0</code></h3></div></div></div><p>
+ </p><p>
+TR1 features first appear.
+</p><p>
+Extension allocator <code class="filename">ext/array_allocator.h</code> added.
+</p><p>
+Extension <code class="code">codecvt</code> specializations moved to <code class="filename">ext/codecvt_specializations.h</code>.
+</p><p>
+Removal of <code class="filename">ext/demangle.h</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_410"></a><code class="constant">4.1</code></h3></div></div></div><p>
+ </p><p>
+Removal of <code class="filename">cassert</code> from all standard headers: now has to be explicitly included for <code class="code">std::assert</code> calls.
+</p><p> Extensions for policy-based data structures first added. New includes,
+types, namespace <code class="code">pb_assoc</code>.
+</p><p> Extensions for typelists added in <code class="filename">ext/typelist.h</code>.
+</p><p> Extension for policy-based <code class="code">basic_string</code> first added: <code class="code">__gnu_cxx::__versa_string</code> in <code class="filename">ext/vstring.h</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_420"></a><code class="constant">4.2</code></h3></div></div></div><p>
+ </p><p> Default visibility attributes applied to <code class="code">namespace std</code>. Support for <code class="code">-fvisibility</code>.
+</p><p>TR1 <code class="filename">random</code>, <code class="filename">complex</code>, and C compatibility headers added.</p><p> Extensions for concurrent programming consolidated
+into <code class="filename">ext/concurrence.h</code> and <code class="filename">ext/atomicity.h</code>,
+including change of namespace to <code class="code">__gnu_cxx</code> in some
+cases. Added types
+include <code class="code">_Lock_policy</code>, <code class="code">__concurrence_lock_error</code>, <code class="code">__concurrence_unlock_error</code>, <code class="code">__mutex</code>, <code class="code">__scoped_lock</code>.</p><p> Extensions for type traits consolidated
+into <code class="filename">ext/type_traits.h</code>. Additional traits are added
+(<code class="code">__conditional_type</code>, <code class="code">__enable_if</code>, others.)
+</p><p> Extensions for policy-based data structures revised. New includes,
+types, namespace moved to <code class="code">__pb_ds</code>.
+</p><p> Extensions for debug mode modified: now nested in <code class="code">namespace
+std::__debug</code> and extensions in <code class="code">namespace
+__gnu_cxx::__debug</code>.</p><p> Extensions added: <code class="filename">ext/typelist.h</code>
+and <code class="filename">ext/throw_allocator.h</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_430"></a><code class="constant">4.3</code></h3></div></div></div><p>
+ </p><p>
+C++0X features first appear.
+</p><p>TR1 <code class="filename">regex</code> and <code class="filename">cmath</code>'s mathematical special function added.</p><p>
+Backward include edit.
+</p><div class="itemizedlist"><ul type="disc"><li><p>Removed</p><p>
+<code class="filename">algobase.h</code> <code class="filename">algo.h</code> <code class="filename">alloc.h</code> <code class="filename">bvector.h</code> <code class="filename">complex.h</code>
+<code class="filename">defalloc.h</code> <code class="filename">deque.h</code> <code class="filename">fstream.h</code> <code class="filename">function.h</code> <code class="filename">hash_map.h</code> <code class="filename">hash_set.h</code>
+<code class="filename">hashtable.h</code> <code class="filename">heap.h</code> <code class="filename">iomanip.h</code> <code class="filename">iostream.h</code> <code class="filename">istream.h</code> <code class="filename">iterator.h</code>
+<code class="filename">list.h</code> <code class="filename">map.h</code> <code class="filename">multimap.h</code> <code class="filename">multiset.h</code> <code class="filename">new.h</code> <code class="filename">ostream.h</code> <code class="filename">pair.h</code> <code class="filename">queue.h</code> <code class="filename">rope.h</code> <code class="filename">set.h</code> <code class="filename">slist.h</code> <code class="filename">stack.h</code> <code class="filename">streambuf.h</code> <code class="filename">stream.h</code> <code class="filename">tempbuf.h</code>
+<code class="filename">tree.h</code> <code class="filename">vector.h</code>
+ </p></li><li><p>Added</p><p>
+ <code class="filename">hash_map</code> and <code class="filename">hash_set</code>
+ </p></li><li><p>Added in C++0x</p><p>
+ <code class="filename">auto_ptr.h</code> and <code class="filename">binders.h</code>
+ </p></li></ul></div><p>
+Header dependency streamlining.
+</p><div class="itemizedlist"><ul type="disc"><li><p><code class="filename">algorithm</code> no longer includes <code class="filename">climits</code>, <code class="filename">cstring</code>, or <code class="filename">iosfwd</code> </p></li><li><p><code class="filename">bitset</code> no longer includes <code class="filename">istream</code> or <code class="filename">ostream</code>, adds <code class="filename">iosfwd</code> </p></li><li><p><code class="filename">functional</code> no longer includes <code class="filename">cstddef</code></p></li><li><p><code class="filename">iomanip</code> no longer includes <code class="filename">istream</code>, <code class="filename">istream</code>, or <code class="filename">functional</code>, adds <code class="filename">ioswd</code> </p></li><li><p><code class="filename">numeric</code> no longer includes <code class="filename">iterator</code></p></li><li><p><code class="filename">string</code> no longer includes <code class="filename">algorithm</code> or <code class="filename">memory</code></p></li><li><p><code class="filename">valarray</code> no longer includes <code class="filename">numeric</code> or <code class="filename">cstdlib</code></p></li><li><p><code class="filename">tr1/hashtable</code> no longer includes <code class="filename">memory</code> or <code class="filename">functional</code></p></li><li><p><code class="filename">tr1/memory</code> no longer includes <code class="filename">algorithm</code></p></li><li><p><code class="filename">tr1/random</code> no longer includes <code class="filename">algorithm</code> or <code class="filename">fstream</code></p></li></ul></div><p>
+Debug mode for <code class="filename">unordered_map</code> and <code class="filename">unordered_set</code>.
+</p><p>
+Parallel mode first appears.
+</p><p>Variadic template implementations of items in <code class="filename">tuple</code> and
+ <code class="filename">functional</code>.
+</p><p>Default <code class="code">what</code> implementations give more elaborate
+ exception strings for <code class="code">bad_cast</code>,
+ <code class="code">bad_typeid</code>, <code class="code">bad_exception</code>, and
+ <code class="code">bad_alloc</code>.
+</p><p>
+PCH binary files no longer installed. Instead, the source files are installed.
+</p><p>
+Namespace pb_ds moved to __gnu_pb_ds.
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ABI Policy and Guidelines </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Backwards Compatibility</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html
new file mode 100644
index 00000000000..007c7fe52a6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html
@@ -0,0 +1,107 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01apas02.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="bk01apas02.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</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="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Itentifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.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
+ write access to the source repository. First time contributors
+ should follow this procedure:
+</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.list"></a>Contributor Checklist</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="list.reading"></a>Reading</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ Get and read the relevant sections of the C++ language
+ specification. Copies of the full ISO 14882 standard are
+ available on line via the ISO mirror site for committee
+ members. Non-members, or those who have not paid for the
+ privilege of sitting on the committee and sustained their
+ two meeting commitment for voting rights, may get a copy of
+ the standard from their respective national standards
+ organization. In the USA, this national standards
+ organization is ANSI and their web-site is right
+ <a class="ulink" href="http://www.ansi.org" target="_top">here.</a>
+ (And if you've already registered with them, clicking this link will take you to directly to the place where you can
+ <a class="ulink" href="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003" target="_top">buy the standard on-line.)</a>
+ </p></li><li><p>
+ The library working group bugs, and known defects, can
+ be obtained here:
+ <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/" target="_top">http://www.open-std.org/jtc1/sc22/wg21 </a>
+ </p></li><li><p>
+ The newsgroup dedicated to standardization issues is
+ comp.std.c++: this FAQ for this group is quite useful and
+ can be
+ found <a class="ulink" href="http://www.jamesd.demon.co.uk/csc/faq.html" target="_top">
+ here </a>.
+ </p></li><li><p>
+ Peruse
+ the <a class="ulink" href="http://www.gnu.org/prep/standards_toc.html" target="_top">GNU
+ Coding Standards</a>, and chuckle when you hit the part
+ about “<span class="quote">Using Languages Other Than C</span>â€.
+ </p></li><li><p>
+ Be familiar with the extensions that preceded these
+ general GNU rules. These style issues for libstdc++ can be
+ found <a class="link" href="bk01apas03.html" title="Coding Style">here</a>.
+ </p></li><li><p>
+ And last but certainly not least, read the
+ library-specific information
+ found <a class="link" href="appendix_porting.html" title="Appendix B. Porting and Maintenance"> here</a>.
+ </p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="list.copyright"></a>Assignment</h3></div></div></div><p>
+ Small changes can be accepted without a copyright assignment form on
+ file. New code and additions to the library need completed copyright
+ assignment form on file at the FSF. Note: your employer may be required
+ to fill out appropriate disclaimer forms as well.
+ </p><p>
+ Historically, the libstdc++ assignment form added the following
+ question:
+ </p><p>
+ “<span class="quote">
+ Which Belgian comic book character is better, Tintin or Asterix, and
+ why?
+ </span>â€
+ </p><p>
+ While not strictly necessary, humoring the maintainers and answering
+ this question would be appreciated.
+ </p><p>
+ For more information about getting a copyright assignment, please see
+ <a class="ulink" href="http://www.gnu.org/prep/maintain/html_node/Legal-Matters.html" target="_top">Legal
+ Matters</a>.
+ </p><p>
+ Please contact Benjamin Kosnik at
+ <code class="email">&lt;<a class="email" href="mailto:bkoz+assign@redhat.com">bkoz+assign@redhat.com</a>&gt;</code> if you are confused
+ about the assignment or have general licensing questions. When
+ requesting an assignment form from
+ <code class="email">&lt;<a class="email" href="mailto:mailto:assign@gnu.org">mailto:assign@gnu.org</a>&gt;</code>, please cc the libstdc++
+ maintainer above so that progress can be monitored.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="list.getting"></a>Getting Sources</h3></div></div></div><p>
+ <a class="ulink" href="http://gcc.gnu.org/svnwrite.html" target="_top">Getting write access
+ (look for "Write after approval")</a>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="list.patches"></a>Submitting Patches</h3></div></div></div><p>
+ Every patch must have several pieces of information before it can be
+ properly evaluated. Ideally (and to ensure the fastest possible
+ response from the maintainers) it would have all of these pieces:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ A description of the bug and how your patch fixes this
+ bug. For new features a description of the feature and your
+ implementation.
+ </p></li><li><p>
+ A ChangeLog entry as plain text; see the various
+ ChangeLog files for format and content. If using you are
+ using emacs as your editor, simply position the insertion
+ point at the beginning of your change and hit CX-4a to bring
+ up the appropriate ChangeLog entry. See--magic! Similar
+ functionality also exists for vi.
+ </p></li><li><p>
+ A testsuite submission or sample program that will
+ easily and simply show the existing error or test new
+ functionality.
+ </p></li><li><p>
+ The patch itself. If you are accessing the SVN
+ repository use <span class="command"><strong>svn update; svn diff NEW</strong></span>;
+ else, use <span class="command"><strong>diff -cp OLD NEW</strong></span> ... If your
+ version of diff does not support these options, then get the
+ latest version of GNU
+ diff. The <a class="ulink" href="http://gcc.gnu.org/wiki/SvnTricks" target="_top">SVN
+ Tricks</a> wiki page has information on customising the
+ output of <code class="code">svn diff</code>.
+ </p></li><li><p>
+ When you have all these pieces, bundle them up in a
+ 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="bk01apas02.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
new file mode 100644
index 00000000000..5f86c98fd71
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/appendix_free.html
@@ -0,0 +1,116 @@
+<?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 C. Free Software Needs Free Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="backwards.html" title="Backwards Compatibility" /><link rel="next" href="bk01apd.html" title="Appendix D. GNU General Public License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. Free Software Needs Free Documentation</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="bk01apd.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</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
+these systems. Many of our most important programs do not come with
+full manuals. Documentation is an essential part of any software
+package; when an important free software package does not come with a
+free manual, that is a major gap. We have many such gaps today.
+</p><p>
+Once upon a time, many years ago, I thought I would learn Perl. I got
+a copy of a free manual, but I found it hard to read. When I asked
+Perl users about alternatives, they told me that there were better
+introductory manuals--but those were not free.
+</p><p>
+Why was this? The authors of the good manuals had written them for
+O'Reilly Associates, which published them with restrictive terms--no
+copying, no modification, source files not available--which exclude
+them from the free software community.
+</p><p>
+That wasn't the first time this sort of thing has happened, and (to
+our community's great loss) it was far from the last. Proprietary
+manual publishers have enticed a great many authors to restrict their
+manuals since then. Many times I have heard a GNU user eagerly tell
+me about a manual that he is writing, with which he expects to help
+the GNU project--and then had my hopes dashed, as he proceeded to
+explain that he had signed a contract with a publisher that would
+restrict it so that we cannot use it.
+</p><p>
+Given that writing good English is a rare skill among programmers, we
+can ill afford to lose manuals this way.
+</p><p>
+ Free documentation, like free software, is a matter of freedom,
+not price. The problem with these manuals was not that O'Reilly
+Associates charged a price for printed copies--that in itself is fine.
+(The Free Software Foundation <a class="ulink" href="http://www.gnu.org/doc/doc.html" target="_top">sells printed copies</a> of
+free GNU manuals, too.) But GNU manuals are available in source code
+form, while these manuals are available only on paper. GNU manuals
+come with permission to copy and modify; the Perl manuals do not.
+These restrictions are the problems.
+</p><p>
+The criterion for a free manual is pretty much the same as for free
+software: it is a matter of giving all users certain freedoms.
+Redistribution (including commercial redistribution) must be
+permitted, so that the manual can accompany every copy of the program,
+on-line or on paper. Permission for modification is crucial too.
+</p><p>
+As a general rule, I don't believe that it is essential for people to
+have permission to modify all sorts of articles and books. The issues
+for writings are not necessarily the same as those for software. For
+example, I don't think you or I are obliged to give permission to
+modify articles like this one, which describe our actions and our
+views.
+</p><p>
+But there is a particular reason why the freedom to modify is crucial
+for documentation for free software. When people exercise their right
+to modify the software, and add or change its features, if they are
+conscientious they will change the manual too--so they can provide
+accurate and usable documentation with the modified program. A manual
+which forbids programmers to be conscientious and finish the job, or
+more precisely requires them to write a new manual from scratch if
+they change the program, does not fill our community's needs.
+</p><p>
+While a blanket prohibition on modification is unacceptable, some
+kinds of limits on the method of modification pose no problem. For
+example, requirements to preserve the original author's copyright
+notice, the distribution terms, or the list of authors, are ok. It is
+also no problem to require modified versions to include notice that
+they were modified, even to have entire sections that may not be
+deleted or changed, as long as these sections deal with nontechnical
+topics. (Some GNU manuals have them.)
+</p><p>
+These kinds of restrictions are not a problem because, as a practical
+matter, they don't stop the conscientious programmer from adapting the
+manual to fit the modified program. In other words, they don't block
+the free software community from making full use of the manual.
+</p><p>
+However, it must be possible to modify all the <span class="emphasis"><em>technical</em></span>
+content of the manual, and then distribute the result in all the usual
+media, through all the usual channels; otherwise, the restrictions do
+block the community, the manual is not free, and so we need another
+manual.
+</p><p>
+Unfortunately, it is often hard to find someone to write another
+manual when a proprietary manual exists. The obstacle is that many
+users think that a proprietary manual is good enough--so they don't
+see the need to write a free manual. They do not see that the free
+operating system has a gap that needs filling.
+</p><p>
+Why do users think that proprietary manuals are good enough? Some
+have not considered the issue. I hope this article will do something
+to change that.
+</p><p>
+Other users consider proprietary manuals acceptable for the same
+reason so many people consider proprietary software acceptable: they
+judge in purely practical terms, not using freedom as a criterion.
+These people are entitled to their opinions, but since those opinions
+spring from values which do not include freedom, they are no guide for
+those of us who do value freedom.
+</p><p>
+Please spread the word about this issue. We continue to lose manuals
+to proprietary publishing. If we spread the word that proprietary
+manuals are not sufficient, perhaps the next person who wants to help
+GNU by writing documentation will realize, before it is too late, that
+he must above all make it free.
+</p><p>
+We can also encourage commercial publishers to sell free, copylefted
+manuals instead of proprietary ones. One way you can help this is to
+check the distribution terms of a manual before you buy it, and
+prefer copylefted manuals to non-copylefted ones.
+</p><p>
+[Note: We now maintain a <a class="ulink" href="http://www.fsf.org/licensing/doc/other-free-books.html" target="_top">web page
+that lists free books available from other publishers</a>].
+</p><p>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</p><p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice is preserved.</p><p>Report any problems or suggestions to <code class="email">&lt;<a class="email" href="mailto:webmaster@fsf.org">webmaster@fsf.org</a>&gt;</code>.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="backwards.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="bk01apd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D. GNU General Public License</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html
new file mode 100644
index 00000000000..001943516a3
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/appendix_porting.html
@@ -0,0 +1,224 @@
+<?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 B. Porting and Maintenance</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apas05.html" title="Design Notes" /><link rel="next" href="internals.html" title="Porting to New Hardware or Operating Systems" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Porting and Maintenance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas05.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</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"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> 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"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></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
+ control configure (<code class="code">configure.ac</code>,
+ <code class="code">acinclude.m4</code>) and make
+ (<code class="code">Makefile.am</code>). These additional tools
+ (<code class="code">automake</code>, and <code class="code">autoconf</code>) are further
+ described in detail in their respective manuals. All the libraries
+ in GCC try to stay in sync with each other in terms of versions of
+ the auto-tools used, so please try to play nicely with the
+ neighbors.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"></a>Overview: What Comes from Where</h3></div></div></div><pre class="screen">
+ <img src="../images/confdeps.png" alt="Dependency Graph Configure to Build Files" />
+ </pre><p>
+ 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
+ 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
+ installation names.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.scripts"></a>Storing Information in non-AC files (like configure.host)</h3></div></div></div><p>
+ Until that glorious day when we can use AC_TRY_LINK with a
+ cross-compiler, we have to hardcode the results of what the tests
+ would have shown if they could be run. So we have an inflexible
+ mess like crossconfig.m4.
+ </p><p>
+ Wouldn't it be nice if we could store that information in files
+ like configure.host, which can be modified without needing to
+ regenerate anything, and can even be tweaked without really
+ knowing how the configury all works? Perhaps break the pieces of
+ crossconfig.m4 out and place them in their appropriate
+ config/{cpu,os} directory.
+ </p><p>
+ Alas, writing macros like
+ "<code class="code">AC_DEFINE(HAVE_A_NICE_DAY)</code>" can only be done inside
+ files which are passed through autoconf. Files which are pure
+ shell script can be source'd at configure time. Files which
+ contain autoconf macros must be processed with autoconf. We could
+ still try breaking the pieces out into "config/*/cross.m4" bits,
+ for instance, but then we would need arguments to aclocal/autoconf
+ to properly find them all when generating configure. I would
+ discourage that.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.conventions"></a>Coding and Commenting Conventions</h3></div></div></div><p>
+ Most comments should use {octothorpes, shibboleths, hash marks,
+ pound signs, whatevers} rather than "dnl". Nearly all comments in
+ configure.ac should. Comments inside macros written in ancilliary
+ .m4 files should. About the only comments which should
+ <span class="emphasis"><em>not</em></span> use #, but use dnl instead, are comments
+ <span class="emphasis"><em>outside</em></span> our own macros in the ancilliary
+ files. The difference is that # comments show up in
+ <code class="code">configure</code> (which is most helpful for debugging),
+ while dnl'd lines just vanish. Since the macros in ancilliary
+ files generate code which appears in odd places, their "outside"
+ comments tend to not be useful while reading
+ <code class="code">configure</code>.
+ </p><p>
+ Do not use any <code class="code">$target*</code> variables, such as
+ <code class="code">$target_alias</code>. The single exception is in
+ configure.ac, for automake+dejagnu's sake.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.acinclude"></a>The acinclude.m4 layout</h3></div></div></div><p>
+ The nice thing about acinclude.m4/aclocal.m4 is that macros aren't
+ actually performed/called/expanded/whatever here, just loaded. So
+ we can arrange the contents however we like. As of this writing,
+ acinclude.m4 is arranged as follows:
+ </p><pre class="programlisting">
+ GLIBCXX_CHECK_HOST
+ GLIBCXX_TOPREL_CONFIGURE
+ GLIBCXX_CONFIGURE
+ </pre><p>
+ All the major variable "discovery" is done here. CXX, multilibs,
+ etc.
+ </p><pre class="programlisting">
+ fragments included from elsewhere
+ </pre><p>
+ Right now, "fragments" == "the math/linkage bits".
+ </p><pre class="programlisting">
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+</pre><p>
+ Next come extra compiler/linker feature tests. Wide character
+ support was placed here because I couldn't think of another place
+ for it. It will probably get broken apart like the math tests,
+ because we're still disabling wchars on systems which could actually
+ support them.
+</p><pre class="programlisting">
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary
+ GLIBCXX_CHECK_SETRLIMIT
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+ GLIBCXX_CHECK_POLL
+ GLIBCXX_CHECK_WRITEV
+
+ GLIBCXX_CONFIGURE_TESTSUITE
+</pre><p>
+ Feature tests which only get used in one place. Here, things used
+ only in the testsuite, plus a couple bits used in the guts of I/O.
+</p><pre class="programlisting">
+ GLIBCXX_EXPORT_INCLUDES
+ GLIBCXX_EXPORT_FLAGS
+ GLIBCXX_EXPORT_INSTALL_INFO
+</pre><p>
+ Installation variables, multilibs, working with the rest of the
+ compiler. Many of the critical variables used in the makefiles are
+ set here.
+</p><pre class="programlisting">
+ GLIBGCC_ENABLE
+ GLIBCXX_ENABLE_C99
+ GLIBCXX_ENABLE_CHEADERS
+ GLIBCXX_ENABLE_CLOCALE
+ GLIBCXX_ENABLE_CONCEPT_CHECKS
+ GLIBCXX_ENABLE_CSTDIO
+ GLIBCXX_ENABLE_CXX_FLAGS
+ GLIBCXX_ENABLE_C_MBCHAR
+ GLIBCXX_ENABLE_DEBUG
+ GLIBCXX_ENABLE_DEBUG_FLAGS
+ GLIBCXX_ENABLE_LONG_LONG
+ GLIBCXX_ENABLE_PCH
+ GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
+ GLIBCXX_ENABLE_SYMVERS
+ GLIBCXX_ENABLE_THREADS
+</pre><p>
+ All the features which can be controlled with enable/disable
+ configure options. Note how they're alphabetized now? Keep them
+ like that. :-)
+</p><pre class="programlisting">
+ AC_LC_MESSAGES
+ libtool bits
+</pre><p>
+ Things which we don't seem to use directly, but just has to be
+ present otherwise stuff magically goes wonky.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.enable"></a><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</h3></div></div></div><p>
+ All the GLIBCXX_ENABLE_FOO macros use a common helper,
+ GLIBCXX_ENABLE. (You don't have to use it, but it's easy.) The
+ helper does two things for us:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ Builds the call to the AC_ARG_ENABLE macro, with --help text
+ properly quoted and aligned. (Death to changequote!)
+ </p></li><li><p>
+ Checks the result against a list of allowed possibilities, and
+ signals a fatal error if there's no match. This means that the
+ rest of the GLIBCXX_ENABLE_FOO macro doesn't need to test for
+ strange arguments, nor do we need to protect against
+ empty/whitespace strings with the <code class="code">"x$foo" = "xbar"</code>
+ idiom.
+ </p></li></ol></div><p>Doing these things correctly takes some extra autoconf/autom4te code,
+ which made our macros nearly illegible. So all the ugliness is factored
+ out into this one helper macro.
+</p><p>Many of the macros take an argument, passed from when they are expanded
+ in configure.ac. The argument controls the default value of the
+ enable/disable switch. Previously, the arguments themselves had defaults.
+ Now they don't, because that's extra complexity with zero gain for us.
+</p><p>There are three "overloaded signatures". When reading the descriptions
+ below, keep in mind that the brackets are autoconf's quotation characters,
+ and that they will be stripped. Examples of just about everything occur
+ in acinclude.m4, if you want to look.
+</p><pre class="programlisting">
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
+</pre><div class="itemizedlist"><ul type="disc"><li><p>
+ FEATURE is the string that follows --enable. The results of the
+ test (such as it is) will be in the variable $enable_FEATURE,
+ where FEATURE has been squashed. Example:
+ <code class="code">[extra-foo]</code>, controlled by the --enable-extra-foo
+ option and stored in $enable_extra_foo.
+ </p></li><li><p>
+ DEFAULT is the value to store in $enable_FEATURE if the user does
+ not pass --enable/--disable. It should be one of the permitted
+ values passed later. Examples: <code class="code">[yes]</code>, or
+ <code class="code">[bar]</code>, or <code class="code">[$1]</code> (which passes the
+ argument given to the GLIBCXX_ENABLE_FOO macro as the
+ default).
+ </p><p>
+ For cases where we need to probe for particular models of things,
+ it is useful to have an undocumented "auto" value here (see
+ GLIBCXX_ENABLE_CLOCALE for an example).
+ </p></li><li><p>
+ HELP-ARG is any text to append to the option string itself in the
+ --help output. Examples: <code class="code">[]</code> (i.e., an empty string,
+ which appends nothing), <code class="code">[=BAR]</code>, which produces
+ <code class="code">--enable-extra-foo=BAR</code>, and
+ <code class="code">[@&lt;:@=BAR@:&gt;@]</code>, which produces
+ <code class="code">--enable-extra-foo[=BAR]</code>. See the difference? See
+ what it implies to the user?
+ </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://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_95.html#SEC95" 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
+ GLIBCXX_ENABLE. By convention, these are not full English
+ sentences. Example: [turn on extra foo]
+ </p></li></ul></div><p>
+ With no other arguments, only the standard autoconf patterns are
+ allowed: "<code class="code">--{enable,disable}-foo[={yes,no}]</code>" The
+ $enable_FEATURE variable is guaranteed to equal either "yes" or "no"
+ after the macro. If the user tries to pass something else, an
+ explanatory error message will be given, and configure will halt.
+</p><p>
+ The second signature takes a fifth argument, "<code class="code">[permit
+ a | b | c | ...]</code>"
+ This allows <span class="emphasis"><em>a</em></span> or <span class="emphasis"><em>b</em></span> or
+ ... after the equals sign in the option, and $enable_FEATURE is
+ guaranteed to equal one of them after the macro. Note that if you
+ want to allow plain --enable/--disable with no "=whatever", you must
+ include "yes" and "no" in the list of permitted values. Also note
+ that whatever you passed as DEFAULT must be in the list. If the
+ user tries to pass something not on the list, a semi-explanatory
+ error message will be given, and configure will halt. Example:
+ <code class="code">[permit generic|gnu|ieee_1003.1-2001|yes|no|auto]</code>
+</p><p>
+ The third signature takes a fifth argument. It is arbitrary shell
+ code to execute if the user actually passes the enable/disable
+ option. (If the user does not, the default is used. Duh.) No
+ argument checking at all is done in this signature. See
+ GLIBCXX_ENABLE_CXX_FLAGS for an example of handling, and an error
+ message.
+</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas05.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="internals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Notes </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Porting to New Hardware or Operating Systems</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/auto_ptr.html b/libstdc++-v3/doc/html/manual/auto_ptr.html
new file mode 100644
index 00000000000..31e35af3fb2
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/auto_ptr.html
@@ -0,0 +1,90 @@
+<?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>auto_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; auto_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="next" href="shared_ptr.html" title="shared_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">auto_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch11.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="shared_ptr.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.util.memory.auto_ptr"></a>auto_ptr</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="auto_ptr.limitations"></a>Limitations</h3></div></div></div><p>Explaining all of the fun and delicious things that can
+ happen with misuse of the <code class="classname">auto_ptr</code> class
+ template (called <acronym class="acronym">AP</acronym> here) would take some
+ time. Suffice it to say that the use of <acronym class="acronym">AP</acronym>
+ safely in the presence of copying has some subtleties.
+ </p><p>
+ The AP class is a really
+ nifty idea for a smart pointer, but it is one of the dumbest of
+ all the smart pointers -- and that's fine.
+ </p><p>
+ AP is not meant to be a supersmart solution to all resource
+ leaks everywhere. Neither is it meant to be an effective form
+ of garbage collection (although it can help, a little bit).
+ And it can <span class="emphasis"><em>not</em></span>be used for arrays!
+ </p><p>
+ <acronym class="acronym">AP</acronym> is meant to prevent nasty leaks in the
+ presence of exceptions. That's <span class="emphasis"><em>all</em></span>. This
+ code is AP-friendly:
+ </p><pre class="programlisting">
+ // Not a recommend naming scheme, but good for web-based FAQs.
+ typedef std::auto_ptr&lt;MyClass&gt; APMC;
+
+ extern function_taking_MyClass_pointer (MyClass*);
+ extern some_throwable_function ();
+
+ void func (int data)
+ {
+ APMC ap (new MyClass(data));
+
+ some_throwable_function(); // this will throw an exception
+
+ function_taking_MyClass_pointer (ap.get());
+ }
+ </pre><p>When an exception gets thrown, the instance of MyClass that's
+ been created on the heap will be <code class="function">delete</code>'d as the stack is
+ unwound past <code class="function">func()</code>.
+ </p><p>Changing that code as follows is not <acronym class="acronym">AP</acronym>-friendly:
+ </p><pre class="programlisting">
+ APMC ap (new MyClass[22]);
+ </pre><p>You will get the same problems as you would without the use
+ of <acronym class="acronym">AP</acronym>:
+ </p><pre class="programlisting">
+ char* array = new char[10]; // array new...
+ ...
+ delete array; // ...but single-object delete
+ </pre><p>
+ AP cannot tell whether the pointer you've passed at creation points
+ to one or many things. If it points to many things, you are about
+ to die. AP is trivial to write, however, so you could write your
+ own <code class="code">auto_array_ptr</code> for that situation (in fact, this has
+ been done many times; check the mailing lists, Usenet, Boost, etc).
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="auto_ptr.using"></a>Use in Containers</h3></div></div></div><p>
+ </p><p>All of the <a class="ulink" href="../23_containers/howto.html" target="_top">containers</a>
+ described in the standard library require their contained types
+ to have, among other things, a copy constructor like this:
+ </p><pre class="programlisting">
+ struct My_Type
+ {
+ My_Type (My_Type const&amp;);
+ };
+ </pre><p>
+ Note the const keyword; the object being copied shouldn't change.
+ The template class <code class="code">auto_ptr</code> (called AP here) does not
+ meet this requirement. Creating a new AP by copying an existing
+ one transfers ownership of the pointed-to object, which means that
+ the AP being copied must change, which in turn means that the
+ copy ctors of AP do not take const objects.
+ </p><p>
+ The resulting rule is simple: <span class="emphasis"><em>Never ever use a
+ container of auto_ptr objects</em></span>. The standard says that
+ “<span class="quote">undefined</span>†behavior is the result, but it is
+ guaranteed to be messy.
+ </p><p>
+ To prevent you from doing this to yourself, the
+ <a class="ulink" href="../19_diagnostics/howto.html#3" target="_top">concept checks</a> built
+ in to this implementation will issue an error if you try to
+ compile code like this:
+ </p><pre class="programlisting">
+ #include &lt;vector&gt;
+ #include &lt;memory&gt;
+
+ void f()
+ {
+ std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int;
+ }
+ </pre><p>
+Should you try this with the checks enabled, you will see an error.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt04ch11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04ch11.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="shared_ptr.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. Memory </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> shared_ptr</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html
new file mode 100644
index 00000000000..3bdf1937aad
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/backwards.html
@@ -0,0 +1,926 @@
+<?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>Backwards Compatibility</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; backwards&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="api.html" title="API Evolution and Deprecation History" /><link rel="next" href="appendix_free.html" title="Appendix C. Free Software Needs Free Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.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.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++. It was a
+separate GNU project, although reliably paired with GCC. Rumors imply
+that it had a working relationship with at least two kinds of
+dinosaur.
+</p><p>Some background: libg++ was designed and created when there was no
+ISO standard to provide guidance. Classes like linked lists are now
+provided for by <code class="classname">list&lt;T&gt;</code> and do not need to be
+created by <code class="function">genclass</code>. (For that matter, templates exist
+now and are well-supported, whereas genclass (mostly) predates them.)
+</p><p>There are other classes in libg++ that are not specified in the
+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="id390292"></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="id390324"></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>
+ and <code class="filename">istream.h</code>
+ used to define
+ <code class="code">cout</code>, <code class="code">cin</code> and so on. ISO C++ specifies that one needs to include
+ <code class="filename">iostream</code>
+ explicitly to get the required definitions.
+ </p><p> Some include adjustment may be required.</p><p>This project is no longer maintained or supported, and the sources
+archived. For the desperate,
+the <a class="ulink" href="http://gcc.gnu.org/extensions.html" target="_top">GCC extensions
+page</a> describes where to find the last libg++ source. The code is
+considered replaced and rewritten.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.second"></a>Second</h3></div></div></div><p>
+ The second generation GNU C++ library was called libstdc++, or
+ libstdc++-v2. It spans the time between libg++ and pre-ISO C++
+ standardization and is usually associated with the following GCC
+ releases: egcs 1.x, gcc 2.95, and gcc 2.96.
+</p><p>
+ The STL portions of this library are based on SGI/HP STL release 3.11.
+</p><p>
+ This project is no longer maintained or supported, and the sources
+ 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="id390424"></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>.
+ </p><p>
+ The following sections list some possible solutions to support compilers
+ that cannot ignore <code class="code">std::</code>-qualified names.
+ </p><p>
+ First, see if the compiler has a flag for this. Namespace
+ back-portability-issues are generally not a problem for g++
+ compilers that do not have libstdc++ in <code class="code">std::</code>, as the
+ compilers use <code class="code">-fno-honor-std</code> (ignore
+ <code class="code">std::</code>, <code class="code">:: = std::</code>) by default. That is,
+ the responsibility for enabling or disabling <code class="code">std::</code> is
+ on the user; the maintainer does not have to care about it. This
+ probably applies to some other compilers as well.
+ </p><p>
+ Second, experiment with a variety of pre-processor tricks.
+ </p><p>
+ By defining <code class="code">std</code> as a macro, fully-qualified namespace
+ calls become global. Volia.
+ </p><pre class="programlisting">
+#ifdef WICKEDLY_OLD_COMPILER
+# define std
+#endif
+</pre><p>
+ Thanks to Juergen Heinzl who posted this solution on gnu.gcc.help.
+ </p><p>
+ Another pre-processor based approach is to define a macro
+ <code class="code">NAMESPACE_STD</code>, which is defined to either
+ “<span class="quote"> </span>†or “<span class="quote">std</span>†based on a compile-type
+ test. On GNU systems, this can be done with autotools by means of
+ an autoconf test (see below) for <code class="code">HAVE_NAMESPACE_STD</code>,
+ then using that to set a value for the <code class="code">NAMESPACE_STD</code>
+ macro. At that point, one is able to use
+ <code class="code">NAMESPACE_STD::string</code>, which will evaluate to
+ <code class="code">std::string</code> or <code class="code">::string</code> (ie, in the
+ global namespace on systems that do not put <code class="code">string</code> in
+ <code class="code">std::</code>).
+ </p><pre class="programlisting">
+dnl @synopsis AC_CXX_NAMESPACE_STD
+dnl
+dnl If the compiler supports namespace std, define
+dnl HAVE_NAMESPACE_STD.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe &lt;luc@spaceroots.org&gt;
+dnl @version 2004-02-04
+dnl @license AllPermissive
+AC_DEFUN([AC_CXX_NAMESPACE_STD], [
+ AC_CACHE_CHECK(if g++ supports namespace std,
+ ac_cv_cxx_have_std_namespace,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;iostream&gt;
+ std::istream&amp; is = std::cin;],,
+ ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_have_std_namespace" = yes; then
+ 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="id393816"></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>
+ you cannot do <code class="code">ostream::operator&lt;&lt;(iterator)</code>
+ to print the address of the iterator =&gt; use
+ <code class="code">operator&lt;&lt; &amp;*iterator</code> instead
+ </p></li><li><p>
+ you cannot clear an iterator's reference (<code class="code">iterator =
+ 0</code>) =&gt; use <code class="code">iterator = iterator_type();</code>
+ </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="id393877"></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.).
+ </p><p>
+ This implementations of libstdc++, however, keep these functions
+ as macros, and so it is not back-portable to use fully qualified
+ names. For example:
+ </p><pre class="programlisting">
+#include &lt;cctype&gt;
+int main() { std::isspace('X'); }
+</pre><p>
+ Results in something like this:
+</p><pre class="programlisting">
+std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
+</pre><p>
+ A solution is to modify a header-file so that the compiler tells
+ <code class="filename">ctype.h</code> to define functions
+ instead of macros:
+</p><pre class="programlisting">
+// This keeps isalnum, et al from being propagated as macros.
+#if __linux__
+# define __NO_CTYPE 1
+#endif
+</pre><p>
+ Then, include <code class="filename">ctype.h</code>
+</p><p>
+ Another problem arises if you put a <code class="code">using namespace
+ std;</code> declaration at the top, and include <code class="filename">ctype.h</code>. This will result in
+ ambiguities between the definitions in the global namespace
+ (<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="id450846"></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)
+AC_TRY_COMPILE(
+[
+#include &lt;vector&gt;
+#include &lt;deque&gt;
+#include &lt;string&gt;
+
+using namespace std;
+],
+[
+deque&lt;int&gt; test_deque(3);
+test_deque.at(2);
+vector&lt;int&gt; test_vector(2);
+test_vector.at(1);
+string test_string(“<span class="quote">test_string</span>â€);
+test_string.at(3);
+],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_CONTAINER_AT)],
+[AC_MSG_RESULT(no)])
+</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="id450884"></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
+#define CPP_EOF std::char_traits&lt;char&gt;::eof()
+#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="id450902"></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).
+</p><pre class="programlisting">
+void
+clear() { _M_mutate(0, this-&gt;size(), 0); }
+</pre><pre class="programlisting">
+basic_string&amp;
+erase(size_type __pos = 0, size_type __n = npos)
+{
+ return this-&gt;replace(_M_check(__pos), _M_fold(__pos, __n),
+ _M_data(), _M_data());
+}
+</pre><p>
+ Unfortunately, ut <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="id450947"></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="id450966"></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
+ <code class="code">i/ostrstream</code> (<code class="filename">strstream</code>) interface is also provided,
+ with these caveats:
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+ <code class="code">strstream</code> is considered to be deprecated
+ </p></li><li><p>
+ <code class="code">strstream</code> is limited to <code class="code">char</code>
+ </p></li><li><p>
+ with <code class="code">ostringstream</code> you don't have to take care of
+ terminating the string or freeing its memory
+ </p></li><li><p>
+ <code class="code">istringstream</code> can be re-filled (clear();
+ str(input);)
+ </p></li></ul></div><p>
+ You can then use output-stringstreams like this:
+</p><pre class="programlisting">
+#ifdef HAVE_SSTREAM
+# include &lt;sstream&gt;
+#else
+# include &lt;strstream&gt;
+#endif
+
+#ifdef HAVE_SSTREAM
+ std::ostringstream oss;
+#else
+ std::ostrstream oss;
+#endif
+
+oss &lt;&lt; “<span class="quote">Name=</span>†&lt;&lt; m_name &lt;&lt; “<span class="quote">, number=</span>†&lt;&lt; m_number &lt;&lt; std::endl;
+...
+#ifndef HAVE_SSTREAM
+ oss &lt;&lt; std::ends; // terminate the char*-string
+#endif
+
+// str() returns char* for ostrstream and a string for ostringstream
+// this also causes ostrstream to think that the buffer's memory
+// is yours
+m_label.set_text(oss.str());
+#ifndef HAVE_SSTREAM
+ // let the ostrstream take care of freeing the memory
+ oss.freeze(false);
+#endif
+</pre><p>
+ Input-stringstreams can be used similarly:
+</p><pre class="programlisting">
+std::string input;
+...
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+
+int i;
+iss &gt;&gt; i;
+</pre><p> One (the only?) restriction is that an istrstream cannot be re-filled:
+</p><pre class="programlisting">
+std::istringstream iss(numerator);
+iss &gt;&gt; m_num;
+// this is not possible with istrstream
+iss.clear();
+iss.str(denominator);
+iss &gt;&gt; m_den;
+</pre><p>
+If you don't care about speed, you can put these conversions in
+ a template-function:
+</p><pre class="programlisting">
+template &lt;class X&gt;
+void fromString(const string&amp; input, X&amp; any)
+{
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+X temp;
+iss &gt;&gt; temp;
+if (iss.fail())
+throw runtime_error(..)
+any = temp;
+}
+</pre><p>
+ 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="id451118"></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="id451137"></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="id451156"></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
+ command-line options and macros (both of which were somewhat
+ thread-implementation and port-specific). There were no
+ guarantees related to being able to link code compiled with one
+ set of options and macro setting with another set.
+ </p><p>
+ For GCC 3.0, configuration of the threading model used with
+ libraries and user-code is performed when GCC is configured and
+ built using the --enable-threads and --disable-threads options.
+ The ABI is stable for symbol name-mangling and limited functional
+ compatibility exists between code compiled under different
+ threading models.
+ </p><p>
+ The libstdc++ library has been designed so that it can be used in
+ multithreaded applications (with libstdc++-v2 this was only true
+ of the STL parts.) The first problem is finding a
+ <span class="emphasis"><em>fast</em></span> method of implementation portable to
+ all platforms. Due to historical reasons, some of the library is
+ written against per-CPU-architecture spinlocks and other parts
+ against the gthr.h abstraction layer which is provided by gcc. A
+ minor problem that pops up every so often is different
+ interpretations of what "thread-safe" means for a
+ library (not a general program). We currently use the <a class="ulink" href="http://www.sgi.com/tech/stl/thread_safety.html" target="_top">same
+ definition that SGI</a> uses for their STL subset. However,
+ the exception for read-only containers only applies to the STL
+ components. This definition is widely-used and something similar
+ will be used in the next version of the C++ standard library.
+ </p><p>
+ Here is a small link farm to threads (no pun) in the mail
+ archives that discuss the threading problem. Each link is to the
+ first relevant message in the thread; from there you can use
+ "Thread Next" to move down the thread. This farm is in
+ latest-to-oldest order.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Our threading expert Loren gives a breakdown of <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2001-10/msg00024.html" target="_top">the
+ six situations involving threads</a> for the 3.0
+ release series.
+ </p></li><li><p>
+ <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html" target="_top">
+ This message</a> inspired a recent updating of issues with
+ threading and the SGI STL library. It also contains some
+ example POSIX-multithreaded STL code.
+ </p></li></ul></div><p>
+ (A large selection of links to older messages has been removed;
+ many of the messages from 1999 were lost in a disk crash, and the
+ few people with access to the backup tapes have been too swamped
+ with work to restore them. Many of the points have been
+ superseded anyhow.)
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.third"></a>Third</h3></div></div></div><p> The third generation GNU C++ library is called libstdc++, or
+libstdc++-v3.
+</p><p>The subset commonly known as the Standard Template Library
+ (chapters 23 through 25, mostly) is adapted from the final release
+ 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="ulink" href="../17_intro/DESIGN" target="_top">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="id516132"></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.
+</p><p>This compatibility layer is constructed by including the
+ standard C++ headers, and injecting any items in
+ <code class="code">std::</code> into the global namespace.
+ </p><p>For those of you new to ISO C++ (welcome, time travelers!), no,
+ that isn't a typo. Yes, the headers really have new names.
+ Marshall Cline's C++ FAQ Lite has a good explanation in <a class="ulink" href="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4" target="_top">item
+ [27.4]</a>.
+ </p><p> Some include adjustment may be required. What follows is an
+autoconf test that defines <code class="code">PRE_STDCXX_HEADERS</code> when they
+exist.</p><pre class="programlisting">
+# AC_HEADER_PRE_STDCXX
+AC_DEFUN([AC_HEADER_PRE_STDCXX], [
+ AC_CACHE_CHECK(for pre-ISO C++ include files,
+ ac_cv_cxx_pre_stdcxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wno-deprecated"
+
+ # Omit defalloc.h, as compilation with newer compilers is problematic.
+ AC_TRY_COMPILE([
+ #include &lt;new.h&gt;
+ #include &lt;iterator.h&gt;
+ #include &lt;alloc.h&gt;
+ #include &lt;set.h&gt;
+ #include &lt;hashtable.h&gt;
+ #include &lt;hash_set.h&gt;
+ #include &lt;fstream.h&gt;
+ #include &lt;tempbuf.h&gt;
+ #include &lt;istream.h&gt;
+ #include &lt;bvector.h&gt;
+ #include &lt;stack.h&gt;
+ #include &lt;rope.h&gt;
+ #include &lt;complex.h&gt;
+ #include &lt;ostream.h&gt;
+ #include &lt;heap.h&gt;
+ #include &lt;iostream.h&gt;
+ #include &lt;function.h&gt;
+ #include &lt;multimap.h&gt;
+ #include &lt;pair.h&gt;
+ #include &lt;stream.h&gt;
+ #include &lt;iomanip.h&gt;
+ #include &lt;slist.h&gt;
+ #include &lt;tree.h&gt;
+ #include &lt;vector.h&gt;
+ #include &lt;deque.h&gt;
+ #include &lt;multiset.h&gt;
+ #include &lt;list.h&gt;
+ #include &lt;map.h&gt;
+ #include &lt;algobase.h&gt;
+ #include &lt;hash_map.h&gt;
+ #include &lt;algo.h&gt;
+ #include &lt;queue.h&gt;
+ #include &lt;streambuf.h&gt;
+ ],,
+ ac_cv_cxx_pre_stdcxx=yes, ac_cv_cxx_pre_stdcxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_pre_stdcxx" = yes; then
+ AC_DEFINE(PRE_STDCXX_HEADERS,,[Define if pre-ISO C++ header files are present. ])
+ fi
+])
+</pre><p>Porting between pre-ISO headers and ISO headers is simple: headers
+like <code class="filename">vector.h</code> can be replaced with <code class="filename">vector</code> and a using
+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="id516213"></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
+ containers in the SGI STL.
+ </p><p> Header files <code class="filename">hash_map</code> and <code class="filename">hash_set</code> moved
+to <code class="filename">ext/hash_map</code> and <code class="filename">ext/hash_set</code>,
+respectively. At the same time, all types in these files are enclosed
+in <code class="code">namespace __gnu_cxx</code>. Later versions move deprecate
+these files, and suggest using TR1's <code class="filename">unordered_map</code>
+and <code class="filename">unordered_set</code> instead.
+</p><p>The extensions are no longer in the global or <code class="code">std</code>
+ namespaces, instead they are declared in the <code class="code">__gnu_cxx</code>
+ namespace. For maximum portability, consider defining a namespace
+ alias to use to talk about extensions, e.g.:
+ </p><pre class="programlisting">
+ #ifdef __GNUC__
+ #if __GNUC__ &lt; 3
+ #include &lt;hash_map.h&gt;
+ namespace extension { using ::hash_map; }; // inherit globals
+ #else
+ #include &lt;backward/hash_map&gt;
+ #if __GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ == 0
+ namespace extension = std; // GCC 3.0
+ #else
+ namespace extension = ::__gnu_cxx; // GCC 3.1 and later
+ #endif
+ #endif
+ #else // ... there are other compilers, right?
+ namespace extension = std;
+ #endif
+
+ extension::hash_map&lt;int,int&gt; my_map;
+ </pre><p>This is a bit cleaner than defining typedefs for all the
+ instantiations you might need.
+ </p><p>The following autoconf tests check for working HP/SGI hash containers.
+</p><pre class="programlisting">
+# AC_HEADER_EXT_HASH_MAP
+AC_DEFUN([AC_HEADER_EXT_HASH_MAP], [
+ AC_CACHE_CHECK(for ext/hash_map,
+ ac_cv_cxx_ext_hash_map,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror"
+ AC_TRY_COMPILE([#include &lt;ext/hash_map&gt;], [using __gnu_cxx::hash_map;],
+ ac_cv_cxx_ext_hash_map=yes, ac_cv_cxx_ext_hash_map=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_ext_hash_map" = yes; then
+ AC_DEFINE(HAVE_EXT_HASH_MAP,,[Define if ext/hash_map is present. ])
+ fi
+])
+</pre><pre class="programlisting">
+# AC_HEADER_EXT_HASH_SET
+AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
+ AC_CACHE_CHECK(for ext/hash_set,
+ ac_cv_cxx_ext_hash_set,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror"
+ AC_TRY_COMPILE([#include &lt;ext/hash_set&gt;], [using __gnu_cxx::hash_set;],
+ ac_cv_cxx_ext_hash_set=yes, ac_cv_cxx_ext_hash_set=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_ext_hash_set" = yes; then
+ 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="id516316"></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
+it can be left out for input-streams.
+</p><p>For output streams, “<span class="quote">nocreate</span>†is probably the default,
+unless you specify <code class="code">std::ios::trunc</code> ? To be safe, you can
+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="id516364"></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
+ standard. Not all environments use file descriptors. Of those
+ that do, not all of them use integers to represent them.
+ </p><p>
+ For a portable solution (among systems which use
+ filedescriptors), you need to implement a subclass of
+ <code class="code">std::streambuf</code> (or
+ <code class="code">std::basic_streambuf&lt;..&gt;</code>) which opens a file
+ given a descriptor, and then pass an instance of this to the
+ stream-constructor.
+ </p><p>
+ An extension is available that implements this.
+ <code class="filename">ext/stdio_filebuf.h</code> contains a derived class called
+ <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html" target="_top"><code class="code">__gnu_cxx::stdio_filebuf</code></a>.
+ This class can be constructed from a C <code class="code">FILE*</code> or a file
+ descriptor, and provides the <code class="code">fd()</code> function.
+ </p><p>
+ 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="id516428"></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">
+# AC_HEADER_STDCXX_98
+AC_DEFUN([AC_HEADER_STDCXX_98], [
+ AC_CACHE_CHECK(for ISO C++ 98 include files,
+ ac_cv_cxx_stdcxx_98,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include &lt;cassert&gt;
+ #include &lt;cctype&gt;
+ #include &lt;cerrno&gt;
+ #include &lt;cfloat&gt;
+ #include &lt;ciso646&gt;
+ #include &lt;climits&gt;
+ #include &lt;clocale&gt;
+ #include &lt;cmath&gt;
+ #include &lt;csetjmp&gt;
+ #include &lt;csignal&gt;
+ #include &lt;cstdarg&gt;
+ #include &lt;cstddef&gt;
+ #include &lt;cstdio&gt;
+ #include &lt;cstdlib&gt;
+ #include &lt;cstring&gt;
+ #include &lt;ctime&gt;
+
+ #include &lt;algorithm&gt;
+ #include &lt;bitset&gt;
+ #include &lt;complex&gt;
+ #include &lt;deque&gt;
+ #include &lt;exception&gt;
+ #include &lt;fstream&gt;
+ #include &lt;functional&gt;
+ #include &lt;iomanip&gt;
+ #include &lt;ios&gt;
+ #include &lt;iosfwd&gt;
+ #include &lt;iostream&gt;
+ #include &lt;istream&gt;
+ #include &lt;iterator&gt;
+ #include &lt;limits&gt;
+ #include &lt;list&gt;
+ #include &lt;locale&gt;
+ #include &lt;map&gt;
+ #include &lt;memory&gt;
+ #include &lt;new&gt;
+ #include &lt;numeric&gt;
+ #include &lt;ostream&gt;
+ #include &lt;queue&gt;
+ #include &lt;set&gt;
+ #include &lt;sstream&gt;
+ #include &lt;stack&gt;
+ #include &lt;stdexcept&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;string&gt;
+ #include &lt;typeinfo&gt;
+ #include &lt;utility&gt;
+ #include &lt;valarray&gt;
+ #include &lt;vector&gt;
+ ],,
+ ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_stdcxx_98" = yes; then
+ 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="id516455"></a>
+Support for C++TR1 dialect.
+</h4></div></div></div><p>Check for library coverage of the TR1 standard.
+</p><pre class="programlisting">
+# AC_HEADER_STDCXX_TR1
+AC_DEFUN([AC_HEADER_STDCXX_TR1], [
+ AC_CACHE_CHECK(for ISO C++ TR1 include files,
+ ac_cv_cxx_stdcxx_tr1,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include &lt;tr1/array&gt;
+ #include &lt;tr1/ccomplex&gt;
+ #include &lt;tr1/cctype&gt;
+ #include &lt;tr1/cfenv&gt;
+ #include &lt;tr1/cfloat&gt;
+ #include &lt;tr1/cinttypes&gt;
+ #include &lt;tr1/climits&gt;
+ #include &lt;tr1/cmath&gt;
+ #include &lt;tr1/complex&gt;
+ #include &lt;tr1/cstdarg&gt;
+ #include &lt;tr1/cstdbool&gt;
+ #include &lt;tr1/cstdint&gt;
+ #include &lt;tr1/cstdio&gt;
+ #include &lt;tr1/cstdlib&gt;
+ #include &lt;tr1/ctgmath&gt;
+ #include &lt;tr1/ctime&gt;
+ #include &lt;tr1/cwchar&gt;
+ #include &lt;tr1/cwctype&gt;
+ #include &lt;tr1/functional&gt;
+ #include &lt;tr1/memory&gt;
+ #include &lt;tr1/random&gt;
+ #include &lt;tr1/regex&gt;
+ #include &lt;tr1/tuple&gt;
+ #include &lt;tr1/type_traits&gt;
+ #include &lt;tr1/unordered_set&gt;
+ #include &lt;tr1/unordered_map&gt;
+ #include &lt;tr1/utility&gt;
+ ],,
+ ac_cv_cxx_stdcxx_tr1=yes, ac_cv_cxx_stdcxx_tr1=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_stdcxx_tr1" = yes; then
+ AC_DEFINE(STDCXX_TR1_HEADERS,,[Define if ISO C++ TR1 header files are present. ])
+ fi
+])
+</pre><p>An alternative is to check just for specific TR1 includes, such as &lt;unordered_map&gt; and &lt;unordered_set&gt;.
+</p><pre class="programlisting">
+# AC_HEADER_TR1_UNORDERED_MAP
+AC_DEFUN([AC_HEADER_TR1_UNORDERED_MAP], [
+ AC_CACHE_CHECK(for tr1/unordered_map,
+ ac_cv_cxx_tr1_unordered_map,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;tr1/unordered_map&gt;], [using std::tr1::unordered_map;],
+ ac_cv_cxx_tr1_unordered_map=yes, ac_cv_cxx_tr1_unordered_map=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_tr1_unordered_map" = yes; then
+ AC_DEFINE(HAVE_TR1_UNORDERED_MAP,,[Define if tr1/unordered_map is present. ])
+ fi
+])
+</pre><pre class="programlisting">
+# AC_HEADER_TR1_UNORDERED_SET
+AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
+ AC_CACHE_CHECK(for tr1/unordered_set,
+ ac_cv_cxx_tr1_unordered_set,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;tr1/unordered_set&gt;], [using std::tr1::unordered_set;],
+ ac_cv_cxx_tr1_unordered_set=yes, ac_cv_cxx_tr1_unordered_set=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_tr1_unordered_set" = yes; then
+ 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="id516499"></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">
+# AC_COMPILE_STDCXX_OX
+AC_DEFUN([AC_COMPILE_STDCXX_0X], [
+ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
+ ac_cv_cxx_compile_cxx0x_native,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
+ ac_cv_cxx_compile_cxx0x_cxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
+ ac_cv_cxx_compile_cxx0x_gxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
+ test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
+ test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
+ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
+ fi
+])
+</pre><p>Check for library coverage of the C++0xstandard.
+</p><pre class="programlisting">
+# AC_HEADER_STDCXX_0X
+AC_DEFUN([AC_HEADER_STDCXX_0X], [
+ AC_CACHE_CHECK(for ISO C++ 0x include files,
+ ac_cv_cxx_stdcxx_0x,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+
+ AC_TRY_COMPILE([
+ #include &lt;cassert&gt;
+ #include &lt;ccomplex&gt;
+ #include &lt;cctype&gt;
+ #include &lt;cerrno&gt;
+ #include &lt;cfenv&gt;
+ #include &lt;cfloat&gt;
+ #include &lt;cinttypes&gt;
+ #include &lt;ciso646&gt;
+ #include &lt;climits&gt;
+ #include &lt;clocale&gt;
+ #include &lt;cmath&gt;
+ #include &lt;csetjmp&gt;
+ #include &lt;csignal&gt;
+ #include &lt;cstdarg&gt;
+ #include &lt;cstdbool&gt;
+ #include &lt;cstddef&gt;
+ #include &lt;cstdint&gt;
+ #include &lt;cstdio&gt;
+ #include &lt;cstdlib&gt;
+ #include &lt;cstring&gt;
+ #include &lt;ctgmath&gt;
+ #include &lt;ctime&gt;
+ #include &lt;cwchar&gt;
+ #include &lt;cwctype&gt;
+
+ #include &lt;algorithm&gt;
+ #include &lt;array&gt;
+ #include &lt;bitset&gt;
+ #include &lt;complex&gt;
+ #include &lt;deque&gt;
+ #include &lt;exception&gt;
+ #include &lt;fstream&gt;
+ #include &lt;functional&gt;
+ #include &lt;iomanip&gt;
+ #include &lt;ios&gt;
+ #include &lt;iosfwd&gt;
+ #include &lt;iostream&gt;
+ #include &lt;istream&gt;
+ #include &lt;iterator&gt;
+ #include &lt;limits&gt;
+ #include &lt;list&gt;
+ #include &lt;locale&gt;
+ #include &lt;map&gt;
+ #include &lt;memory&gt;
+ #include &lt;new&gt;
+ #include &lt;numeric&gt;
+ #include &lt;ostream&gt;
+ #include &lt;queue&gt;
+ #include &lt;random&gt;
+ #include &lt;regex&gt;
+ #include &lt;set&gt;
+ #include &lt;sstream&gt;
+ #include &lt;stack&gt;
+ #include &lt;stdexcept&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;string&gt;
+ #include &lt;tuple&gt;
+ #include &lt;typeinfo&gt;
+ #include &lt;type_traits&gt;
+ #include &lt;unordered_map&gt;
+ #include &lt;unordered_set&gt;
+ #include &lt;utility&gt;
+ #include &lt;valarray&gt;
+ #include &lt;vector&gt;
+ ],,
+ ac_cv_cxx_stdcxx_0x=yes, ac_cv_cxx_stdcxx_0x=no)
+ AC_LANG_RESTORE
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ])
+ if test "$ac_cv_cxx_stdcxx_0x" = yes; then
+ AC_DEFINE(STDCXX_0X_HEADERS,,[Define if ISO C++ 0x header files are present. ])
+ fi
+])
+</pre><p>As is the case for TR1 support, these autoconf macros can be made for a finer-grained, per-header-file check. For &lt;unordered_map&gt;
+</p><pre class="programlisting">
+# AC_HEADER_UNORDERED_MAP
+AC_DEFUN([AC_HEADER_UNORDERED_MAP], [
+ AC_CACHE_CHECK(for unordered_map,
+ ac_cv_cxx_unordered_map,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([#include &lt;unordered_map&gt;], [using std::unordered_map;],
+ ac_cv_cxx_unordered_map=yes, ac_cv_cxx_unordered_map=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_unordered_map" = yes; then
+ AC_DEFINE(HAVE_UNORDERED_MAP,,[Define if unordered_map is present. ])
+ fi
+])
+</pre><pre class="programlisting">
+# AC_HEADER_UNORDERED_SET
+AC_DEFUN([AC_HEADER_UNORDERED_SET], [
+ AC_CACHE_CHECK(for unordered_set,
+ ac_cv_cxx_unordered_set,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([#include &lt;unordered_set&gt;], [using std::unordered_set;],
+ ac_cv_cxx_unordered_set=yes, ac_cv_cxx_unordered_set=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_unordered_set" = yes; then
+ 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="id437068"></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="id437100"></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="id437132"></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="id437165"></a><p>[<abbr class="abbrev">
+ lbl32
+ </abbr>] <span class="title"><i>
+ Migration guide for GCC-3.2
+ </i>. </span><span class="biblioid">
+ <a class="ulink" href="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html" target="_top">
+ </a>
+ . </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="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API Evolution and Deprecation History </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. Free Software Needs Free Documentation</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
new file mode 100644
index 00000000000..88b44157bd7
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
@@ -0,0 +1,340 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="prev" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="next" href="bk01pt12ch33.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="bk01pt12ch32.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Allocators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33.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
+ purposes.
+ </p><p>
+ This allocator will make use of 1 single bit to keep track of
+ whether it has been allocated or not. A bit 1 indicates free,
+ while 0 indicates allocated. This has been done so that you can
+ easily check a collection of bits for a free block. This kind of
+ Bitmapped strategy works best for single object allocations, and
+ with the STL type parameterized allocators, we do not need to
+ choose any size for the block which will be represented by a
+ single bit. This will be the size of the parameter around which
+ the allocator has been parameterized. Thus, close to optimal
+ performance will result. Hence, this should be used for node based
+ containers which call the allocate function with an argument of 1.
+ </p><p>
+ The bitmapped allocator's internal pool is exponentially growing.
+ Meaning that internally, the blocks acquired from the Free List
+ Store will double every time the bitmapped allocator runs out of
+ memory.
+ </p><p>
+ The macro <code class="literal">__GTHREADS</code> decides whether to use
+ Mutex Protection around every allocation/deallocation. The state
+ of the macro is picked up automatically from the gthr abstraction
+ layer.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.bitmap.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="bitmap.impl.free_list_store"></a>Free List Store</h4></div></div></div><p>
+ The Free List Store (referred to as FLS for the remaining part of this
+ document) is the Global memory pool that is shared by all instances of
+ the bitmapped allocator instantiated for any type. This maintains a
+ sorted order of all free memory blocks given back to it by the
+ bitmapped allocator, and is also responsible for giving memory to the
+ bitmapped allocator when it asks for more.
+ </p><p>
+ Internally, there is a Free List threshold which indicates the
+ Maximum number of free lists that the FLS can hold internally
+ (cache). Currently, this value is set at 64. So, if there are
+ more than 64 free lists coming in, then some of them will be given
+ back to the OS using operator delete so that at any given time the
+ Free List's size does not exceed 64 entries. This is done because
+ a Binary Search is used to locate an entry in a free list when a
+ request for memory comes along. Thus, the run-time complexity of
+ the search would go up given an increasing size, for 64 entries
+ however, lg(64) == 6 comparisons are enough to locate the correct
+ free list if it exists.
+ </p><p>
+ Suppose the free list size has reached it's threshold, then the
+ largest block from among those in the list and the new block will
+ be selected and given back to the OS. This is done because it
+ reduces external fragmentation, and allows the OS to use the
+ larger blocks later in an orderly fashion, possibly merging them
+ later. Also, on some systems, large blocks are obtained via calls
+ to mmap, so giving them back to free system resources becomes most
+ important.
+ </p><p>
+ The function _S_should_i_give decides the policy that determines
+ whether the current block of memory should be given to the
+ allocator for the request that it has made. That's because we may
+ not always have exact fits for the memory size that the allocator
+ requests. We do this mainly to prevent external fragmentation at
+ the cost of a little internal fragmentation. Now, the value of
+ this internal fragmentation has to be decided by this function. I
+ can see 3 possibilities right now. Please add more as and when you
+ find better strategies.
+ </p><div class="orderedlist"><ol type="1"><li><p>Equal size check. Return true only when the 2 blocks are of equal
+size.</p></li><li><p>Difference Threshold: Return true only when the _block_size is
+greater than or equal to the _required_size, and if the _BS is &gt; _RS
+by a difference of less than some THRESHOLD value, then return true,
+else return false. </p></li><li><p>Percentage Threshold. Return true only when the _block_size is
+greater than or equal to the _required_size, and if the _BS is &gt; _RS
+by a percentage of less than some THRESHOLD value, then return true,
+else return false.</p></li></ol></div><p>
+ Currently, (3) is being used with a value of 36% Maximum wastage per
+ Super Block.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.super_block"></a>Super Block</h4></div></div></div><p>
+ A super block is the block of memory acquired from the FLS from
+ which the bitmap allocator carves out memory for single objects
+ and satisfies the user's requests. These super blocks come in
+ sizes that are powers of 2 and multiples of 32
+ (_Bits_Per_Block). Yes both at the same time! That's because the
+ next super block acquired will be 2 times the previous one, and
+ also all super blocks have to be multiples of the _Bits_Per_Block
+ value.
+ </p><p>
+ How does it interact with the free list store?
+ </p><p>
+ The super block is contained in the FLS, and the FLS is responsible for
+ getting / returning Super Bocks to and from the OS using operator new
+ as defined by the C++ standard.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.super_block_data"></a>Super Block Data Layout</h4></div></div></div><p>
+ Each Super Block will be of some size that is a multiple of the
+ number of Bits Per Block. Typically, this value is chosen as
+ Bits_Per_Byte x sizeof(size_t). On an x86 system, this gives the
+ figure 8 x 4 = 32. Thus, each Super Block will be of size 32
+ x Some_Value. This Some_Value is sizeof(value_type). For now, let
+ it be called 'K'. Thus, finally, Super Block size is 32 x K bytes.
+ </p><p>
+ This value of 32 has been chosen because each size_t has 32-bits
+ and Maximum use of these can be made with such a figure.
+ </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="id510462"></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>
+ 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
+ bitmap allocator. It is this Free List Store that is responsible
+ for writing and managing this information. Actually the number of
+ bytes allocated in this case would be: 4 + 4 + (4x2) + (64x4) =
+ 272 bytes, but the first 4 bytes are an addition by the Free List
+ Store, so the Bitmap Allocator sees only 268 bytes. These first 4
+ bytes about which the bitmapped allocator is not aware hold the
+ value 268.
+ </p><p>
+ What do the remaining values represent?</p><p>
+ The 2nd 4 in the expression is the sizeof(size_t) because the
+ Bitmapped Allocator maintains a used count for each Super Block,
+ which is initially set to 0 (as indicated in the diagram). This is
+ incremented every time a block is removed from this super block
+ (allocated), and decremented whenever it is given back. So, when
+ the used count falls to 0, the whole super block will be given
+ back to the Free List Store.
+ </p><p>
+ The value 4294967295 represents the integer corresponding to the bit
+ representation of all bits set: 11111111111111111111111111111111.
+ </p><p>
+ The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits
+ x 2,
+ which is 8-bytes, or 2 x sizeof(size_t).
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.max_wasted"></a>Maximum Wasted Percentage</h4></div></div></div><p>
+ This has nothing to do with the algorithm per-se,
+ only with some vales that must be chosen correctly to ensure that the
+ allocator performs well in a real word scenario, and maintains a good
+ balance between the memory consumption and the allocation/deallocation
+ speed.
+ </p><p>
+ The formula for calculating the maximum wastage as a percentage:
+ </p><p>
+(32 x k + 1) / (2 x (32 x k + 1 + 32 x c)) x 100.
+ </p><p>
+ Where, k =&gt; The constant overhead per node. eg. for list, it is
+ 8 bytes, and for map it is 12 bytes. c =&gt; The size of the
+ base type on which the map/list is instantiated. Thus, suppose the
+ type1 is int and type2 is double, they are related by the relation
+ sizeof(double) == 2*sizeof(int). Thus, all types must have this
+ double size relation for this formula to work properly.
+ </p><p>
+ Plugging-in: For List: k = 8 and c = 4 (int and double), we get:
+ 33.376%
+ </p><p>
+For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
+ </p><p>
+ Thus, knowing these values, and based on the sizeof(value_type), we may
+ create a function that returns the Max_Wastage_Percentage for us to use.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.allocate"></a><code class="function">allocate</code></h4></div></div></div><p>
+ The allocate function is specialized for single object allocation
+ ONLY. Thus, ONLY if n == 1, will the bitmap_allocator's
+ specialized algorithm be used. Otherwise, the request is satisfied
+ directly by calling operator new.
+ </p><p>
+ Suppose n == 1, then the allocator does the following:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ Checks to see whether a free block exists somewhere in a region
+ of memory close to the last satisfied request. If so, then that
+ block is marked as allocated in the bit map and given to the
+ user. If not, then (2) is executed.
+ </p></li><li><p>
+ Is there a free block anywhere after the current block right
+ up to the end of the memory that we have? If so, that block is
+ found, and the same procedure is applied as above, and
+ returned to the user. If not, then (3) is executed.
+ </p></li><li><p>
+ Is there any block in whatever region of memory that we own
+ free? This is done by checking
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ The use count for each super block, and if that fails then
+ </p></li><li><p>
+ The individual bit-maps for each super block.
+ </p></li></ul></div><p>
+ Note: Here we are never touching any of the memory that the
+ user will be given, and we are confining all memory accesses
+ to a small region of memory! This helps reduce cache
+ misses. If this succeeds then we apply the same procedure on
+ that bit-map as (1), and return that block of memory to the
+ user. However, if this process fails, then we resort to (4).
+ </p></li><li><p>
+ This process involves Refilling the internal exponentially
+ growing memory pool. The said effect is achieved by calling
+ _S_refill_pool which does the following:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Gets more memory from the Global Free List of the Required
+ size.
+ </p></li><li><p>
+ Adjusts the size for the next call to itself.
+ </p></li><li><p>
+ Writes the appropriate headers in the bit-maps.
+ </p></li><li><p>
+ Sets the use count for that super-block just allocated to 0
+ (zero).
+ </p></li><li><p>
+ All of the above accounts to maintaining the basic invariant
+ for the allocator. If the invariant is maintained, we are
+ sure that all is well. Now, the same process is applied on
+ the newly acquired free blocks, which are dispatched
+ accordingly.
+ </p></li></ul></div></li></ol></div><p>
+Thus, you can clearly see that the allocate function is nothing but a
+combination of the next-fit and first-fit algorithm optimized ONLY for
+single object allocations.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.deallocate"></a><code class="function">deallocate</code></h4></div></div></div><p>
+ The deallocate function again is specialized for single objects ONLY.
+ For all n belonging to &gt; 1, the operator delete is called without
+ further ado, and the deallocate function returns.
+ </p><p>
+ However for n == 1, a series of steps are performed:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ We first need to locate that super-block which holds the memory
+ location given to us by the user. For that purpose, we maintain
+ a static variable _S_last_dealloc_index, which holds the index
+ into the vector of block pairs which indicates the index of the
+ last super-block from which memory was freed. We use this
+ strategy in the hope that the user will deallocate memory in a
+ region close to what he/she deallocated the last time around. If
+ the check for belongs_to succeeds, then we determine the bit-map
+ for the given pointer, and locate the index into that bit-map,
+ and mark that bit as free by setting it.
+ </p></li><li><p>
+ If the _S_last_dealloc_index does not point to the memory block
+ that we're looking for, then we do a linear search on the block
+ stored in the vector of Block Pairs. This vector in code is
+ called _S_mem_blocks. When the corresponding super-block is
+ found, we apply the same procedure as we did for (1) to mark the
+ block as free in the bit-map.
+ </p></li></ol></div><p>
+ Now, whenever a block is freed, the use count of that particular
+ super block goes down by 1. When this use count hits 0, we remove
+ that super block from the list of all valid super blocks stored in
+ the vector. While doing this, we also make sure that the basic
+ invariant is maintained by making sure that _S_last_request and
+ _S_last_dealloc_index point to valid locations within the vector.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.questions"></a>Questions</h4></div></div></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="bitmap.impl.question.1"></a>1</h5></div></div></div><p>
+Q1) The "Data Layout" section is
+cryptic. I have no idea of what you are trying to say. Layout of what?
+The free-list? Each bitmap? The Super Block?
+ </p><p>
+ The layout of a Super Block of a given
+size. In the example, a super block of size 32 x 1 is taken. The
+general formula for calculating the size of a super block is
+32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit
+systems.
+ </p></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="bitmap.impl.question.2"></a>2</h5></div></div></div><p>
+ And since I just mentioned the
+term `each bitmap', what in the world is meant by it? What does each
+bitmap manage? How does it relate to the super block? Is the Super
+Block a bitmap as well?
+ </p><p>
+ Each bitmap is part of a Super Block which is made up of 3 parts
+ as I have mentioned earlier. Re-iterating, 1. The use count,
+ 2. The bit-map for that Super Block. 3. The actual memory that
+ will be eventually given to the user. Each bitmap is a multiple
+ of 32 in size. If there are 32 x (2^3) blocks of single objects
+ to be given, there will be '32 x (2^3)' bits present. Each 32
+ bits managing the allocated / free status for 32 blocks. Since
+ each size_t contains 32-bits, one size_t can manage up to 32
+ blocks' status. Each bit-map is made up of a number of size_t,
+ whose exact number for a super-block of a given size I have just
+ mentioned.
+ </p></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="bitmap.impl.question.3"></a>3</h5></div></div></div><p>
+ How do the allocate and deallocate functions work in regard to
+ bitmaps?
+ </p><p>
+ The allocate and deallocate functions manipulate the bitmaps and
+ have nothing to do with the memory that is given to the user. As
+ I have earlier mentioned, a 1 in the bitmap's bit field
+ indicates free, while a 0 indicates allocated. This lets us
+ check 32 bits at a time to check whether there is at lease one
+ free block in those 32 blocks by testing for equality with
+ (0). Now, the allocate function will given a memory block find
+ the corresponding bit in the bitmap, and will reset it (i.e.,
+ make it re-set (0)). And when the deallocate function is called,
+ it will again set that bit after locating it to indicate that
+ that particular block corresponding to this bit in the bit-map
+ is not being used by anyone, and may be used to satisfy future
+ requests.
+ </p><p>
+ e.g.: Consider a bit-map of 64-bits as represented below:
+ 1111111111111111111111111111111111111111111111111111111111111111
+ </p><p>
+ Now, when the first request for allocation of a single object
+ comes along, the first block in address order is returned. And
+ since the bit-maps in the reverse order to that of the address
+ order, the last bit (LSB if the bit-map is considered as a
+ binary word of 64-bits) is re-set to 0.
+ </p><p>
+ The bit-map now looks like this:
+ 1111111111111111111111111111111111111111111111111111111111111110
+ </p></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.locality"></a>Locality</h4></div></div></div><p>
+ Another issue would be whether to keep the all bitmaps in a
+ separate area in memory, or to keep them near the actual blocks
+ that will be given out or allocated for the client. After some
+ testing, I've decided to keep these bitmaps close to the actual
+ blocks. This will help in 2 ways.
+ </p><div class="orderedlist"><ol type="1"><li><p>Constant time access for the bitmap themselves, since no kind of
+look up will be needed to find the correct bitmap list or it's
+equivalent.</p></li><li><p>And also this would preserve the cache as far as possible.</p></li></ol></div><p>
+ So in effect, this kind of an allocator might prove beneficial from a
+ purely cache point of view. But this allocator has been made to try and
+ roll out the defects of the node_allocator, wherein the nodes get
+ skewed about in memory, if they are not returned in the exact reverse
+ order or in the same order in which they were allocated. Also, the
+ new_allocator's book keeping overhead is too much for small objects and
+ single object allocations, though it preserves the locality of blocks
+ very well when they are returned back to the allocator.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.grow_policy"></a>Overhead and Grow Policy</h4></div></div></div><p>
+ Expected overhead per block would be 1 bit in memory. Also, once
+ the address of the free list has been found, the cost for
+ allocation/deallocation would be negligible, and is supposed to be
+ constant time. For these very reasons, it is very important to
+ minimize the linear time costs, which include finding a free list
+ with a free block while allocating, and finding the corresponding
+ free list for a block while deallocating. Therefore, I have
+ decided that the growth of the internal pool for this allocator
+ will be exponential as compared to linear for
+ node_allocator. There, linear time works well, because we are
+ mainly concerned with speed of allocation/deallocation and memory
+ consumption, whereas here, the allocation/deallocation part does
+ have some linear/logarithmic complexity components in it. Thus, to
+ try and minimize them would be a good thing to do at the cost of a
+ little bit of memory.
+ </p><p>
+ Another thing to be noted is the pool size will double every time
+ the internal pool gets exhausted, and all the free blocks have
+ been given away. The initial size of the pool would be
+ 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="bk01pt12ch32.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt12ch32.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch33.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01apas02.html b/libstdc++-v3/doc/html/manual/bk01apas02.html
new file mode 100644
index 00000000000..82562a65c37
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apas02.html
@@ -0,0 +1,96 @@
+<?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>Directory Layout and Source Conventions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="next" href="bk01apas03.html" title="Coding Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Directory Layout and Source Conventions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas03.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.organization"></a>Directory Layout and Source Conventions</h2></div></div></div><p>
+ The unpacked source directory of libstdc++ contains the files
+ needed to create the GNU C++ Library.
+ </p><div class="literallayout"><p><br />
+It has subdirectories:<br />
+<br />
+  doc<br />
+    Files in HTML and text format that document usage, quirks of the<br />
+    implementation, and contributor checklists.<br />
+<br />
+  include<br />
+    All header files for the C++ library are within this directory,<br />
+    modulo specific runtime-related files that are in the libsupc++<br />
+    directory.<br />
+<br />
+    include/std<br />
+      Files meant to be found by #include &lt;name&gt; directives in<br />
+      standard-conforming user programs.  <br />
+<br />
+    include/c<br />
+      Headers intended to directly include standard C headers. <br />
+      [NB: this can be enabled via --enable-cheaders=c]<br />
+<br />
+    include/c_global <br />
+      Headers intended to include standard C headers in<br />
+      the global namespace, and put select names into the std::<br />
+      namespace.  [NB: this is the default, and is the same as<br />
+      --enable-cheaders=c_global]<br />
+<br />
+    include/c_std <br />
+      Headers intended to include standard C headers<br />
+      already in namespace std, and put select names into the std::<br />
+      namespace.  [NB: this is the same as --enable-cheaders=c_std]<br />
+<br />
+    include/bits<br />
+      Files included by standard headers and by other files in<br />
+      the bits directory. <br />
+<br />
+    include/backward<br />
+      Headers provided for backward compatibility, such as &lt;iostream.h&gt;.<br />
+      They are not used in this library.<br />
+<br />
+    include/ext<br />
+      Headers that define extensions to the standard library.  No<br />
+      standard header refers to any of them.<br />
+<br />
+  scripts<br />
+    Scripts that are used during the configure, build, make, or test<br />
+    process.<br />
+<br />
+  src<br />
+    Files that are used in constructing the library, but are not<br />
+    installed.<br />
+<br />
+  testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]<br />
+    Test programs are here, and may be used to begin to exercise the <br />
+    library.  Support for "make check" and "make check-install" is<br />
+    complete, and runs through all the subdirectories here when this<br />
+    command is issued from the build directory.  Please note that<br />
+    "make check" requires DejaGNU 1.4 or later to be installed.  Please<br />
+    note that "make check-script" calls the script mkcheck, which<br />
+    requires bash, and which may need the paths to bash adjusted to<br />
+    work properly, as /bin/bash is assumed.<br />
+<br />
+Other subdirectories contain variant versions of certain files<br />
+that are meant to be copied or linked by the configure script.<br />
+Currently these are:<br />
+<br />
+  config/abi<br />
+  config/cpu<br />
+  config/io<br />
+  config/locale<br />
+  config/os<br />
+<br />
+In addition, two subdirectories are convenience libraries:<br />
+<br />
+  libmath<br />
+    Support routines needed for C++ math. Only needed if the<br />
+    underlying "C" implementation is non-existent, in particular<br />
+    required or optimal long double, long long, and C99 functionality.<br />
+<br />
+  libsupc++<br />
+    Contains the runtime library for C++, including exception<br />
+    handling and memory allocation and deallocation, RTTI, terminate<br />
+    handlers, etc.<br />
+<br />
+Note that glibc also has a bits/ subdirectory.  We will either<br />
+need to be careful not to collide with names in its bits/<br />
+directory; or rename bits to (e.g.) cppbits/.<br />
+<br />
+In files throughout the system, lines marked with an "XXX" indicate<br />
+a bug or incompletely-implemented feature.  Lines marked "XXX MT"<br />
+indicate a place that may require attention for multi-thread safety.<br />
+  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apas03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. Contributing </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Coding Style</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apas03.html b/libstdc++-v3/doc/html/manual/bk01apas03.html
new file mode 100644
index 00000000000..620968d2750
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apas03.html
@@ -0,0 +1,582 @@
+<?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>Coding Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas02.html" title="Directory Layout and Source Conventions" /><link rel="next" href="bk01apas04.html" title="Documentation Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Coding Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas02.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas04.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.coding_style"></a>Coding Style</h2></div></div></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="coding_style.bad_identifiers"></a>Bad Itentifiers</h3></div></div></div><p>
+ Identifiers that conflict and should be avoided.
+ </p><div class="literallayout"><p><br />
+      This is the list of names “<span class="quote">reserved to the<br />
+      implementation</span>â€Â that have been claimed by certain<br />
+      compilers and system headers of interest, and should not be used<br />
+      in the library. It will grow, of course.  We generally are<br />
+      interested in names that are not all-caps, except for those like<br />
+      "_T"<br />
+<br />
+      For Solaris:<br />
+      _B<br />
+      _C<br />
+      _L<br />
+      _N<br />
+      _P<br />
+      _S<br />
+      _U<br />
+      _X<br />
+      _E1<br />
+      ..<br />
+      _E24<br />
+<br />
+      Irix adds:<br />
+      _A<br />
+      _G<br />
+<br />
+      MS adds:<br />
+      _T<br />
+<br />
+      BSD adds:<br />
+      __used<br />
+      __unused<br />
+      __inline<br />
+      _Complex<br />
+      __istype<br />
+      __maskrune<br />
+      __tolower<br />
+      __toupper<br />
+      __wchar_t<br />
+      __wint_t<br />
+      _res<br />
+      _res_ext<br />
+      __tg_*<br />
+<br />
+      For GCC:<br />
+<br />
+      [Note that this list is out of date. It applies to the old<br />
+      name-mangling; in G++ 3.0 and higher a different name-mangling is<br />
+      used. In addition, many of the bugs relating to G++ interpreting<br />
+      these names as operators have been fixed.]<br />
+<br />
+      The full set of __* identifiers (combined from gcc/cp/lex.c and<br />
+      gcc/cplus-dem.c) that are either old or new, but are definitely <br />
+      recognized by the demangler, is:<br />
+<br />
+      __aa<br />
+      __aad<br />
+      __ad<br />
+      __addr<br />
+      __adv<br />
+      __aer<br />
+      __als<br />
+      __alshift<br />
+      __amd<br />
+      __ami<br />
+      __aml<br />
+      __amu<br />
+      __aor<br />
+      __apl<br />
+      __array<br />
+      __ars<br />
+      __arshift<br />
+      __as<br />
+      __bit_and<br />
+      __bit_ior<br />
+      __bit_not<br />
+      __bit_xor<br />
+      __call<br />
+      __cl<br />
+      __cm<br />
+      __cn<br />
+      __co<br />
+      __component<br />
+      __compound<br />
+      __cond<br />
+      __convert<br />
+      __delete<br />
+      __dl<br />
+      __dv<br />
+      __eq<br />
+      __er<br />
+      __ge<br />
+      __gt<br />
+      __indirect<br />
+      __le<br />
+      __ls<br />
+      __lt<br />
+      __max<br />
+      __md<br />
+      __method_call<br />
+      __mi<br />
+      __min<br />
+      __minus<br />
+      __ml<br />
+      __mm<br />
+      __mn<br />
+      __mult<br />
+      __mx<br />
+      __ne<br />
+      __negate<br />
+      __new<br />
+      __nop<br />
+      __nt<br />
+      __nw<br />
+      __oo<br />
+      __op<br />
+      __or<br />
+      __pl<br />
+      __plus<br />
+      __postdecrement<br />
+      __postincrement<br />
+      __pp<br />
+      __pt<br />
+      __rf<br />
+      __rm<br />
+      __rs<br />
+      __sz<br />
+      __trunc_div<br />
+      __trunc_mod<br />
+      __truth_andif<br />
+      __truth_not<br />
+      __truth_orif<br />
+      __vc<br />
+      __vd<br />
+      __vn<br />
+<br />
+      SGI badnames:<br />
+      __builtin_alloca<br />
+      __builtin_fsqrt<br />
+      __builtin_sqrt<br />
+      __builtin_fabs<br />
+      __builtin_dabs<br />
+      __builtin_cast_f2i<br />
+      __builtin_cast_i2f<br />
+      __builtin_cast_d2ll<br />
+      __builtin_cast_ll2d<br />
+      __builtin_copy_dhi2i<br />
+      __builtin_copy_i2dhi<br />
+      __builtin_copy_dlo2i<br />
+      __builtin_copy_i2dlo<br />
+      __add_and_fetch<br />
+      __sub_and_fetch<br />
+      __or_and_fetch<br />
+      __xor_and_fetch<br />
+      __and_and_fetch<br />
+      __nand_and_fetch<br />
+      __mpy_and_fetch<br />
+      __min_and_fetch<br />
+      __max_and_fetch<br />
+      __fetch_and_add<br />
+      __fetch_and_sub<br />
+      __fetch_and_or<br />
+      __fetch_and_xor<br />
+      __fetch_and_and<br />
+      __fetch_and_nand<br />
+      __fetch_and_mpy<br />
+      __fetch_and_min<br />
+      __fetch_and_max<br />
+      __lock_test_and_set<br />
+      __lock_release<br />
+      __lock_acquire<br />
+      __compare_and_swap<br />
+      __synchronize<br />
+      __high_multiply<br />
+      __unix<br />
+      __sgi<br />
+      __linux__<br />
+      __i386__<br />
+      __i486__<br />
+      __cplusplus<br />
+      __embedded_cplusplus<br />
+      // long double conversion members mangled as __opr<br />
+      // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00060.html<br />
+      _opr<br />
+    </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="coding_style.example"></a>By Example</h3></div></div></div><div class="literallayout"><p><br />
+      This library is written to appropriate C++ coding standards. As such,<br />
+      it is intended to precede the recommendations of the GNU Coding<br />
+      Standard, which can be referenced in full here:<br />
+<br />
+      http://www.gnu.org/prep/standards/standards.html#Formatting<br />
+<br />
+      The rest of this is also interesting reading, but skip the "Design<br />
+      Advice" part.<br />
+<br />
+      The GCC coding conventions are here, and are also useful:<br />
+      http://gcc.gnu.org/codingconventions.html<br />
+<br />
+      In addition, because it doesn't seem to be stated explicitly anywhere<br />
+      else, there is an 80 column source limit.<br />
+<br />
+      ChangeLog entries for member functions should use the<br />
+      classname::member function name syntax as follows:<br />
+<br />
+      1999-04-15  Dennis Ritchie  &lt;dr@att.com&gt;<br />
+<br />
+      * src/basic_file.cc (__basic_file::open): Fix thinko in<br />
+      _G_HAVE_IO_FILE_OPEN bits.<br />
+<br />
+      Notable areas of divergence from what may be previous local practice<br />
+      (particularly for GNU C) include:<br />
+<br />
+      01. Pointers and references<br />
+      char* p = "flop";<br />
+      char&amp; c = *p;<br />
+      -NOT-<br />
+      char *p = "flop";  // wrong<br />
+      char &amp;c = *p;      // wrong<br />
+      <br />
+      Reason: In C++, definitions are mixed with executable code. Here,       <br />
+      p is being initialized, not *p. This is near-universal<br />
+      practice among C++ programmers; it is normal for C hackers<br />
+      to switch spontaneously as they gain experience.<br />
+<br />
+      02. Operator names and parentheses<br />
+      operator==(type)<br />
+      -NOT-<br />
+      operator == (type)  // wrong<br />
+      <br />
+      Reason: The == is part of the function name. Separating<br />
+      it makes the declaration look like an expression. <br />
+<br />
+      03. Function names and parentheses<br />
+      void mangle()<br />
+      -NOT-<br />
+      void mangle ()  // wrong<br />
+<br />
+      Reason: no space before parentheses (except after a control-flow<br />
+      keyword) is near-universal practice for C++. It identifies the<br />
+      parentheses as the function-call operator or declarator, as <br />
+      opposed to an expression or other overloaded use of parentheses.<br />
+<br />
+      04. Template function indentation<br />
+      template&lt;typename T&gt;<br />
+      void <br />
+      template_function(args)<br />
+      { }<br />
+      -NOT-<br />
+      template&lt;class T&gt;<br />
+      void template_function(args) {};<br />
+      <br />
+      Reason: In class definitions, without indentation whitespace is<br />
+      needed both above and below the declaration to distinguish<br />
+      it visually from other members. (Also, re: "typename"<br />
+      rather than "class".)  T often could be int, which is <br />
+      not a class. ("class", here, is an anachronism.)<br />
+<br />
+      05. Template class indentation<br />
+      template&lt;typename _CharT, typename _Traits&gt;<br />
+      class basic_ios : public ios_base<br />
+      {<br />
+      public:<br />
+      // Types:<br />
+      };<br />
+      -NOT-<br />
+      template&lt;class _CharT, class _Traits&gt;<br />
+      class basic_ios : public ios_base<br />
+      {<br />
+      public:<br />
+      // Types:<br />
+      };<br />
+      -NOT-<br />
+      template&lt;class _CharT, class _Traits&gt;<br />
+      class basic_ios : public ios_base<br />
+      {<br />
+      public:<br />
+      // Types:<br />
+      };<br />
+<br />
+      06. Enumerators<br />
+      enum<br />
+      {<br />
+      space = _ISspace,<br />
+      print = _ISprint,<br />
+      cntrl = _IScntrl<br />
+      };<br />
+      -NOT-<br />
+      enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };<br />
+<br />
+      07. Member initialization lists<br />
+      All one line, separate from class name.<br />
+<br />
+      gribble::gribble() <br />
+      : _M_private_data(0), _M_more_stuff(0), _M_helper(0);<br />
+      { }<br />
+      -NOT-<br />
+      gribble::gribble() : _M_private_data(0), _M_more_stuff(0), _M_helper(0);<br />
+      { }<br />
+<br />
+      08. Try/Catch blocks<br />
+      try <br />
+      {<br />
+      //<br />
+      }   <br />
+      catch (...)<br />
+      {<br />
+      //<br />
+      }   <br />
+      -NOT-<br />
+      try {<br />
+      // <br />
+      } catch(...) { <br />
+      //<br />
+      }<br />
+<br />
+      09. Member functions declarations and definitions<br />
+      Keywords such as extern, static, export, explicit, inline, etc<br />
+      go on the line above the function name. Thus<br />
+<br />
+      virtual int   <br />
+      foo()<br />
+      -NOT-<br />
+      virtual int foo()<br />
+<br />
+      Reason: GNU coding conventions dictate return types for functions<br />
+      are on a separate line than the function name and parameter list<br />
+      for definitions. For C++, where we have member functions that can<br />
+      be either inline definitions or declarations, keeping to this<br />
+      standard allows all member function names for a given class to be<br />
+      aligned to the same margin, increasing readibility.<br />
+<br />
+<br />
+      10. Invocation of member functions with "this-&gt;"<br />
+      For non-uglified names, use this-&gt;name to call the function.<br />
+<br />
+      this-&gt;sync()<br />
+      -NOT-<br />
+      sync()<br />
+<br />
+      Reason: Koenig lookup.<br />
+<br />
+      11. Namespaces<br />
+      namespace std<br />
+      {<br />
+      blah blah blah;<br />
+      } // namespace std<br />
+<br />
+      -NOT-<br />
+<br />
+      namespace std {<br />
+      blah blah blah;<br />
+      } // namespace std<br />
+<br />
+      12. Spacing under protected and private in class declarations:<br />
+      space above, none below<br />
+      ie<br />
+<br />
+      public:<br />
+      int foo;<br />
+<br />
+      -NOT-<br />
+      public:<br />
+      <br />
+      int foo;<br />
+<br />
+      13. Spacing WRT return statements.<br />
+      no extra spacing before returns, no parenthesis<br />
+      ie<br />
+<br />
+      }<br />
+      return __ret;<br />
+<br />
+      -NOT-<br />
+      }<br />
+<br />
+      return __ret;<br />
+<br />
+      -NOT-<br />
+<br />
+      }<br />
+      return (__ret);<br />
+<br />
+<br />
+      14. Location of global variables.<br />
+      All global variables of class type, whether in the "user visable"<br />
+      space (e.g., cin) or the implementation namespace, must be defined<br />
+      as a character array with the appropriate alignment and then later<br />
+      re-initialized to the correct value.<br />
+<br />
+      This is due to startup issues on certain platforms, such as AIX.<br />
+      For more explanation and examples, see src/globals.cc. All such<br />
+      variables should be contained in that file, for simplicity.<br />
+<br />
+      15. Exception abstractions<br />
+      Use the exception abstractions found in functexcept.h, which allow<br />
+      C++ programmers to use this library with -fno-exceptions. (Even if<br />
+      that is rarely advisable, it's a necessary evil for backwards<br />
+      compatibility.)<br />
+<br />
+      16. Exception error messages<br />
+      All start with the name of the function where the exception is<br />
+      thrown, and then (optional) descriptive text is added. Example:<br />
+<br />
+      __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));<br />
+<br />
+      Reason: The verbose terminate handler prints out exception::what(),<br />
+      as well as the typeinfo for the thrown exception. As this is the<br />
+      default terminate handler, by putting location info into the<br />
+      exception string, a very useful error message is printed out for<br />
+      uncaught exceptions. So useful, in fact, that non-programmers can<br />
+      give useful error messages, and programmers can intelligently<br />
+      speculate what went wrong without even using a debugger.<br />
+<br />
+      17. The doxygen style guide to comments is a separate document,<br />
+      see index.<br />
+<br />
+      The library currently has a mixture of GNU-C and modern C++ coding<br />
+      styles. The GNU C usages will be combed out gradually.<br />
+<br />
+      Name patterns:<br />
+<br />
+      For nonstandard names appearing in Standard headers, we are constrained <br />
+      to use names that begin with underscores. This is called "uglification".<br />
+      The convention is:<br />
+<br />
+      Local and argument names:  __[a-z].*<br />
+<br />
+      Examples:  __count  __ix  __s1  <br />
+<br />
+      Type names and template formal-argument names: _[A-Z][^_].*<br />
+<br />
+      Examples:  _Helper  _CharT  _N <br />
+<br />
+      Member data and function names: _M_.*<br />
+<br />
+      Examples:  _M_num_elements  _M_initialize ()<br />
+<br />
+      Static data members, constants, and enumerations: _S_.*<br />
+<br />
+      Examples: _S_max_elements  _S_default_value<br />
+<br />
+      Don't use names in the same scope that differ only in the prefix, <br />
+      e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.<br />
+      (The most tempting of these seem to be and "_T" and "__sz".)<br />
+<br />
+      Names must never have "__" internally; it would confuse name<br />
+      unmanglers on some targets. Also, never use "__[0-9]", same reason.<br />
+<br />
+      --------------------------<br />
+<br />
+      [BY EXAMPLE]<br />
+      <br />
+      #ifndef  _HEADER_<br />
+      #define  _HEADER_ 1<br />
+<br />
+      namespace std<br />
+      {<br />
+      class gribble<br />
+      {<br />
+      public:<br />
+      gribble() throw();<br />
+<br />
+      gribble(const gribble&amp;);<br />
+<br />
+      explicit <br />
+      gribble(int __howmany);<br />
+<br />
+      gribble&amp; <br />
+      operator=(const gribble&amp;);<br />
+<br />
+      virtual <br />
+      ~gribble() throw ();<br />
+<br />
+      // Start with a capital letter, end with a period.<br />
+      inline void  <br />
+      public_member(const char* __arg) const;<br />
+<br />
+      // In-class function definitions should be restricted to one-liners.<br />
+      int <br />
+      one_line() { return 0 }<br />
+<br />
+      int <br />
+      two_lines(const char* arg) <br />
+      { return strchr(arg, 'a'); }<br />
+<br />
+      inline int <br />
+      three_lines();  // inline, but defined below.<br />
+<br />
+      // Note indentation.<br />
+      template&lt;typename _Formal_argument&gt;<br />
+      void <br />
+      public_template() const throw();<br />
+<br />
+      template&lt;typename _Iterator&gt;<br />
+      void <br />
+      other_template();<br />
+<br />
+      private:<br />
+      class _Helper;<br />
+<br />
+      int _M_private_data;<br />
+      int _M_more_stuff;<br />
+      _Helper* _M_helper;<br />
+      int _M_private_function();<br />
+<br />
+      enum _Enum <br />
+      { <br />
+      _S_one, <br />
+      _S_two <br />
+      };<br />
+<br />
+      static void <br />
+      _S_initialize_library();<br />
+      };<br />
+<br />
+      // More-or-less-standard language features described by lack, not presence.<br />
+      # ifndef _G_NO_LONGLONG<br />
+      extern long long _G_global_with_a_good_long_name;  // avoid globals!<br />
+      # endif<br />
+<br />
+      // Avoid in-class inline definitions, define separately;<br />
+      // likewise for member class definitions:<br />
+      inline int<br />
+      gribble::public_member() const<br />
+      { int __local = 0; return __local; }<br />
+<br />
+      class gribble::_Helper<br />
+      {<br />
+      int _M_stuff;<br />
+<br />
+      friend class gribble;<br />
+      };<br />
+      }<br />
+<br />
+      // Names beginning with "__": only for arguments and<br />
+      //   local variables; never use "__" in a type name, or<br />
+      //   within any name; never use "__[0-9]".<br />
+<br />
+      #endif /* _HEADER_ */<br />
+<br />
+<br />
+      namespace std <br />
+      {<br />
+      template&lt;typename T&gt;  // notice: "typename", not "class", no space<br />
+      long_return_value_type&lt;with_many, args&gt;  <br />
+      function_name(char* pointer,               // "char *pointer" is wrong.<br />
+      char* argument, <br />
+      const Reference&amp; ref)<br />
+      {<br />
+      // int a_local;  /* wrong; see below. */<br />
+      if (test) <br />
+      { <br />
+      nested code <br />
+      }<br />
+      <br />
+      int a_local = 0;  // declare variable at first use.<br />
+<br />
+      //  char a, b, *p;   /* wrong */<br />
+      char a = 'a';<br />
+      char b = a + 1;<br />
+      char* c = "abc";  // each variable goes on its own line, always.<br />
+<br />
+      // except maybe here...<br />
+      for (unsigned i = 0, mask = 1; mask; ++i, mask &lt;&lt;= 1) {<br />
+      // ...<br />
+      }<br />
+      }<br />
+      <br />
+      gribble::gribble()<br />
+      : _M_private_data(0), _M_more_stuff(0), _M_helper(0);<br />
+      { }<br />
+<br />
+      inline int <br />
+      gribble::three_lines()<br />
+      {<br />
+      // doesn't fit in one line.<br />
+      }<br />
+      } // namespace std<br />
+    </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apas04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Directory Layout and Source Conventions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Documentation Style</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apas04.html b/libstdc++-v3/doc/html/manual/bk01apas04.html
new file mode 100644
index 00000000000..ceb73d88346
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apas04.html
@@ -0,0 +1,263 @@
+<?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>Documentation Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas03.html" title="Coding Style" /><link rel="next" href="bk01apas05.html" title="Design Notes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Documentation Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas05.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
+ coreutils</a>. (GNU versions of find, xargs, and possibly
+ sed and grep are used, just because the GNU versions make
+ things very easy.)
+ </p><p>
+ To generate the pretty pictures and hierarchy
+ graphs, the
+ <a class="ulink" href="http://www.research.att.com/sw/tools/graphviz/download.html" target="_top">Graphviz</a>
+ package will need to be installed.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.rules"></a>Generating the Doxygen Files</h4></div></div></div><p>
+ The Makefile rules
+ </p><pre class="screen"><strong class="userinput"><code>make doc-html-doxygen</code></strong></pre><p>
+ and
+ </p><pre class="screen"><strong class="userinput"><code>make doc-xml-doxygen</code></strong></pre><p>
+ and
+ </p><pre class="screen"><strong class="userinput"><code>make doc-man-doxygen</code></strong></pre><p>
+ in the libstdc++ build directory generate the HTML docs, the
+ XML docs, and the man pages.
+ </p><p>
+ Careful observers will see that the Makefile rules simply call
+ a script from the source tree, <code class="filename">run_doxygen</code>, which
+ does the actual work of running Doxygen and then (most
+ importantly) massaging the output files. If for some reason
+ you prefer to not go through the Makefile, you can call this
+ script directly. (Start by passing <code class="literal">--help</code>.)
+ </p><p>
+ If you wish to tweak the Doxygen settings, do so by editing
+ <code class="filename">doc/doxygen/user.cfg.in</code>. Notes to fellow
+ library hackers are written in triple-# comments.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.markup"></a>Markup</h4></div></div></div><p>
+ In general, libstdc++ files should be formatted according to
+ the rules found in the
+ <a class="link" href="bk01apas03.html" title="Coding Style">Coding Standard</a>. Before
+ any doxygen-specific formatting tweaks are made, please try to
+ make sure that the initial formatting is sound.
+ </p><p>
+ Adding Doxygen markup to a file (informally called
+ “<span class="quote">doxygenating</span>â€) is very simple. The Doxygen manual can be
+ found
+ <a class="ulink" href="http://www.stack.nl/~dimitri/doxygen/download.html#latestman" target="_top">here</a>.
+ We try to use a very-recent version of Doxygen.
+ </p><p>
+ For classes, use
+ <code class="classname">deque</code>/<code class="classname">vector</code>/<code class="classname">list</code>
+ and <code class="classname">std::pair</code> as examples. For
+ functions, see their member functions, and the free functions
+ in <code class="filename">stl_algobase.h</code>. Member functions of
+ other container-like types should read similarly to these
+ member functions.
+ </p><p>
+ These points accompany the first list in section 3.1 of the
+ Doxygen manual:
+ </p><div class="orderedlist"><ol type="1"><li><p>Use the Javadoc style...</p></li><li><p>
+ ...not the Qt style. The intermediate *'s are preferred.
+ </p></li><li><p>
+ Use the triple-slash style only for one-line comments (the
+ “<span class="quote">brief</span>†mode). Very recent versions of Doxygen permit
+ full-mode comments in triple-slash blocks, but the
+ formatting still comes out wonky.
+ </p></li><li><p>
+ This is disgusting. Don't do this.
+ </p></li></ol></div><p>
+ Use the @-style of commands, not the !-style. Please be
+ careful about whitespace in your markup comments. Most of the
+ time it doesn't matter; doxygen absorbs most whitespace, and
+ both HTML and *roff are agnostic about whitespace. However,
+ in &lt;pre&gt; blocks and @code/@endcode sections, spacing can
+ have “<span class="quote">interesting</span>†effects.
+ </p><p>
+ Use either kind of grouping, as
+ appropriate. <code class="filename">doxygroups.cc</code> exists for this
+ purpose. See <code class="filename">stl_iterator.h</code> for a good example
+ of the “<span class="quote">other</span>†kind of grouping.
+ </p><p>
+ Please use markup tags like @p and @a when referring to things
+ such as the names of function parameters. Use @e for emphasis
+ when necessary. Use @c to refer to other standard names.
+ (Examples of all these abound in the present code.)
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="doc_style.docbook"></a>Docbook</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"></a>Prerequisites</h4></div></div></div><p>
+ Editing the DocBook sources requires an XML editor. Many
+ exist: some noteable options
+ include <span class="command"><strong>emacs</strong></span>, <span class="application">Kate</span>,
+ or <span class="application">Conglomerate</span>.
+ </p><p>
+ Some editors support special “<span class="quote">XML Validation</span>â€
+ modes that can validate the file as it is
+ produced. Recommended is the <span class="command"><strong>nXML Mode</strong></span>
+ for <span class="command"><strong>emacs</strong></span>.
+ </p><p>
+ Besides an editor, additional DocBook files and XML tools are
+ also required.
+ </p><p>
+ Access to the DocBook stylesheets and DTD is required. The
+ stylesheets are usually packaged by vendor, in something
+ like <code class="filename">docbook-style-xsl</code>. The installation
+ directory for this package corresponds to
+ the <code class="literal">XSL_STYLE_DIR</code>
+ in <code class="filename">doc/Makefile.am</code> and defaults
+ to <code class="filename">/usr/share/sgml/docbook/xsl-stylesheets</code>.
+ </p><p>
+ For procesessing XML, an XML processor and some style
+ sheets are necessary. Defaults are <span class="command"><strong>xsltproc</strong></span>
+ provided by <code class="filename">libxslt</code>.
+ </p><p>
+ For validating the XML document, you'll need
+ something like <span class="command"><strong>xmllint</strong></span> and access to the
+ DocBook DTD. These are provided
+ by a vendor package like <code class="filename">lixml2</code>.
+ </p><p>
+ For PDF output, something that transforms valid XML to PDF is
+ required. Possible solutions include <span class="command"><strong>xmlto</strong></span>,
+ <a class="ulink" href="http://xmlgraphics.apache.org/fop/" target="_top">Apache
+ FOP</a>, or <span class="command"><strong>prince</strong></span>. Other options are
+ listed on the DocBook web <a class="ulink" href="http://wiki.docbook.org/topic/DocBookPublishingTools" target="_top">pages</a>. Please
+ consult the <code class="email">&lt;<a class="email" href="mailto:libstdc++@gcc.gnu.org">libstdc++@gcc.gnu.org</a>&gt;</code> list when
+ preparing printed manuals for current best practice and suggestions.
+ </p><p>
+ Make sure that the XML documentation and markup is valid for
+ any change. This can be done easily, with the validation rules
+ in the <code class="filename">Makefile</code>, which is equivalent to doing:
+ </p><pre class="screen">
+ <strong class="userinput"><code>
+xmllint --noout --valid <code class="filename">xml/index.xml</code>
+ </code></strong>
+ </pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.rules"></a>Generating the DocBook Files</h4></div></div></div><p>
+ The Makefile rules
+ </p><pre class="screen"><strong class="userinput"><code>make doc-html</code></strong></pre><p>
+ and
+ </p><pre class="screen"><strong class="userinput"><code>make doc-pdf</code></strong></pre><p>
+ and
+ </p><pre class="screen"><strong class="userinput"><code>make doc-xml-single</code></strong></pre><p>
+ and
+ </p><pre class="screen"><strong class="userinput"><code>make doc-xml-validate</code></strong></pre><p>
+ in the libstdc++ build directory result respectively in the
+ following: the generation of an HTML version of all the
+ documentation, a PDF version of the same, a single XML
+ document, and the results of validating the XML document.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.examples"></a>File Organization and Basics</h4></div></div></div><div class="literallayout"><p><br />
+      <span class="emphasis"><em>Which files are important</em></span><br />
+<br />
+      All Docbook files are in the directory<br />
+      libstdc++-v3/doc/xml<br />
+<br />
+      Inside this directory, the files of importance:<br />
+      spine.xml   - index to documentation set<br />
+      manual/spine.xml  - index to manual<br />
+      manual/*.xml   - individual chapters and sections of the manual<br />
+      faq.xml   - index to FAQ<br />
+      api.xml   - index to source level / API <br />
+<br />
+      All *.txml files are template xml files, ie otherwise empty files with<br />
+      the correct structure, suitable for filling in with new information.<br />
+<br />
+      <span class="emphasis"><em>Cannonical Writing Style</em></span><br />
+<br />
+      class template<br />
+      function template<br />
+      member function template<br />
+      (via C++ Templates, Vandevoorde)<br />
+<br />
+      class in namespace std: allocator, not std::allocator<br />
+<br />
+      header file: iostream, not &lt;iostream&gt;<br />
+<br />
+<br />
+      <span class="emphasis"><em>General structure</em></span><br />
+<br />
+      &lt;set&gt;<br />
+      &lt;book&gt;<br />
+      &lt;/book&gt;<br />
+<br />
+      &lt;book&gt;<br />
+      &lt;chapter&gt;<br />
+      &lt;/chapter&gt;<br />
+      &lt;/book&gt;<br />
+<br />
+      &lt;book&gt; <br />
+      &lt;part&gt;<br />
+      &lt;chapter&gt;<br />
+      &lt;section&gt;<br />
+      &lt;/section&gt;<br />
+<br />
+      &lt;sect1&gt;<br />
+      &lt;/sect1&gt;<br />
+<br />
+      &lt;sect1&gt;<br />
+      &lt;sect2&gt;<br />
+      &lt;/sect2&gt;<br />
+      &lt;/sect1&gt;<br />
+      &lt;/chapter&gt;<br />
+<br />
+      &lt;chapter&gt;<br />
+      &lt;/chapter&gt;<br />
+      &lt;/part&gt;  <br />
+      &lt;/book&gt;<br />
+<br />
+      &lt;/set&gt;<br />
+    </p></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.markup"></a>Markup By Example</h4></div></div></div><div class="literallayout"><p><br />
+      HTML to XML rough equivalents<br />
+<br />
+      &lt;p&gt; &lt;para&gt;<br />
+<br />
+      &lt;pre&gt; &lt;computeroutput&gt;<br />
+      &lt;pre&gt; &lt;programlisting&gt;<br />
+      &lt;pre&gt; &lt;literallayout&gt;<br />
+<br />
+      &lt;ul&gt; &lt;itemizedlist&gt;<br />
+      &lt;ol&gt; &lt;orderedlist&gt;<br />
+      &lt;il&gt; &lt;listitem&gt;<br />
+<br />
+      &lt;dl&gt; &lt;variablelist&gt;<br />
+<br />
+      &lt;varlistentry&gt;<br />
+      &lt;dt&gt;    &lt;term&gt;<br />
+      &lt;/dt&gt;   &lt;/term&gt;<br />
+      &lt;dd&gt;     &lt;listitem&gt;<br />
+      &lt;/dt&gt;   &lt;/listitem&gt;<br />
+      &lt;/varlistentry&gt;<br />
+<br />
+      &lt;a href &lt;ulink url<br />
+      &lt;code&gt; &lt;literal&gt;<br />
+      &lt;code&gt; &lt;programlisting&gt;<br />
+<br />
+      &lt;strong&gt; &lt;emphasis&gt;<br />
+      &lt;em&gt; &lt;emphasis&gt;<br />
+      " &lt;quote&gt;<br />
+<br />
+      ctype.h &lt;filename class="headerfile"&gt;&lt;/filename&gt;<br />
+<br />
+      <br />
+      build_dir    &lt;filename class="directory"&gt;path_to_build_dir&lt;/filename&gt;<br />
+<br />
+      Finer gradations of &lt;code&gt;<br />
+<br />
+      &lt;classname&gt; &lt;classname&gt;string&lt;/classname&gt;<br />
+      &lt;classname&gt;vector&lt;&gt;&lt;/classname&gt; <br />
+      &lt;function&gt;fs.clear()&lt;/function&gt;<br />
+<br />
+      &lt;structname&gt;<br />
+<br />
+      &lt;function&gt; &lt;function&gt;clear()&lt;/function&gt;<br />
+<br />
+      &lt;type&gt; &lt;type&gt;long long&lt;/type&gt;<br />
+<br />
+      &lt;varname&gt; &lt;varname&gt;fs&lt;/varname&gt;<br />
+<br />
+      &lt;literal&gt; &lt;literal&gt;-Weffc++&lt;/literal&gt; <br />
+      &lt;literal&gt;rel_ops&lt;/literal&gt;<br />
+<br />
+      &lt;constant&gt; &lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;<br />
+      &lt;constant&gt;3.0&lt;/constant&gt;<br />
+<br />
+      &lt;filename&gt;<br />
+<br />
+      &lt;command&gt; &lt;command&gt;g++&lt;/command&gt;<br />
+<br />
+      &lt;errortext&gt; &lt;errortext&gt;foo Concept &lt;/errortext&gt;<br />
+</p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apas05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Coding Style </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design Notes</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apas05.html b/libstdc++-v3/doc/html/manual/bk01apas05.html
new file mode 100644
index 00000000000..27baae87413
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apas05.html
@@ -0,0 +1,857 @@
+<?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 Notes</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas04.html" title="Documentation Style" /><link rel="next" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design Notes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas04.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="appendix_porting.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.design_notes"></a>Design Notes</h2></div></div></div><p>
+ </p><div class="literallayout"><p><br />
+<br />
+    The Library<br />
+    -----------<br />
+<br />
+    This paper is covers two major areas:<br />
+<br />
+    - Features and policies not mentioned in the standard that<br />
+    the quality of the library implementation depends on, including<br />
+    extensions and "implementation-defined" features;<br />
+<br />
+    - Plans for required but unimplemented library features and<br />
+    optimizations to them.<br />
+<br />
+    Overhead<br />
+    --------<br />
+<br />
+    The standard defines a large library, much larger than the standard<br />
+    C library. A naive implementation would suffer substantial overhead<br />
+    in compile time, executable size, and speed, rendering it unusable<br />
+    in many (particularly embedded) applications. The alternative demands<br />
+    care in construction, and some compiler support, but there is no<br />
+    need for library subsets.<br />
+<br />
+    What are the sources of this overhead?  There are four main causes:<br />
+<br />
+    - The library is specified almost entirely as templates, which<br />
+    with current compilers must be included in-line, resulting in<br />
+    very slow builds as tens or hundreds of thousands of lines<br />
+    of function definitions are read for each user source file.<br />
+    Indeed, the entire SGI STL, as well as the dos Reis valarray,<br />
+    are provided purely as header files, largely for simplicity in<br />
+    porting. Iostream/locale is (or will be) as large again.<br />
+<br />
+    - The library is very flexible, specifying a multitude of hooks<br />
+    where users can insert their own code in place of defaults.<br />
+    When these hooks are not used, any time and code expended to<br />
+    support that flexibility is wasted.<br />
+<br />
+    - Templates are often described as causing to "code bloat". In<br />
+    practice, this refers (when it refers to anything real) to several<br />
+    independent processes. First, when a class template is manually<br />
+    instantiated in its entirely, current compilers place the definitions<br />
+    for all members in a single object file, so that a program linking<br />
+    to one member gets definitions of all. Second, template functions<br />
+    which do not actually depend on the template argument are, under<br />
+    current compilers, generated anew for each instantiation, rather<br />
+    than being shared with other instantiations. Third, some of the<br />
+    flexibility mentioned above comes from virtual functions (both in<br />
+    regular classes and template classes) which current linkers add<br />
+    to the executable file even when they manifestly cannot be called.<br />
+<br />
+    - The library is specified to use a language feature, exceptions,<br />
+    which in the current gcc compiler ABI imposes a run time and<br />
+    code space cost to handle the possibility of exceptions even when<br />
+    they are not used. Under the new ABI (accessed with -fnew-abi),<br />
+    there is a space overhead and a small reduction in code efficiency<br />
+    resulting from lost optimization opportunities associated with<br />
+    non-local branches associated with exceptions.<br />
+<br />
+    What can be done to eliminate this overhead?  A variety of coding<br />
+    techniques, and compiler, linker and library improvements and<br />
+    extensions may be used, as covered below. Most are not difficult,<br />
+    and some are already implemented in varying degrees.<br />
+<br />
+    Overhead: Compilation Time<br />
+    --------------------------<br />
+<br />
+    Providing "ready-instantiated" template code in object code archives<br />
+    allows us to avoid generating and optimizing template instantiations<br />
+    in each compilation unit which uses them. However, the number of such<br />
+    instantiations that are useful to provide is limited, and anyway this<br />
+    is not enough, by itself, to minimize compilation time. In particular,<br />
+    it does not reduce time spent parsing conforming headers.<br />
+<br />
+    Quicker header parsing will depend on library extensions and compiler<br />
+    improvements.  One approach is some variation on the techniques<br />
+    previously marketed as "pre-compiled headers", now standardized as<br />
+    support for the "export" keyword. "Exported" template definitions<br />
+    can be placed (once) in a "repository" -- really just a library, but<br />
+    of template definitions rather than object code -- to be drawn upon<br />
+    at link time when an instantiation is needed, rather than placed in<br />
+    header files to be parsed along with every compilation unit.<br />
+<br />
+    Until "export" is implemented we can put some of the lengthy template<br />
+    definitions in #if guards or alternative headers so that users can skip<br />
+    over the full definitions when they need only the ready-instantiated<br />
+    specializations.<br />
+<br />
+    To be precise, this means that certain headers which define<br />
+    templates which users normally use only for certain arguments<br />
+    can be instrumented to avoid exposing the template definitions<br />
+    to the compiler unless a macro is defined. For example, in<br />
+    &lt;string&gt;, we might have:<br />
+<br />
+    template &lt;class _CharT, ... &gt; class basic_string {<br />
+    ... // member declarations<br />
+    };<br />
+    ... // operator declarations<br />
+<br />
+    #ifdef _STRICT_ISO_<br />
+    # if _G_NO_TEMPLATE_EXPORT<br />
+    #   include &lt;bits/std_locale.h&gt;  // headers needed by definitions<br />
+    #   ...<br />
+    #   include &lt;bits/string.tcc&gt;  // member and global template definitions.<br />
+    # endif<br />
+    #endif<br />
+<br />
+    Users who compile without specifying a strict-ISO-conforming flag<br />
+    would not see many of the template definitions they now see, and rely<br />
+    instead on ready-instantiated specializations in the library. This<br />
+    technique would be useful for the following substantial components:<br />
+    string, locale/iostreams, valarray. It would *not* be useful or<br />
+    usable with the following: containers, algorithms, iterators,<br />
+    allocator. Since these constitute a large (though decreasing)<br />
+    fraction of the library, the benefit the technique offers is<br />
+    limited.<br />
+<br />
+    The language specifies the semantics of the "export" keyword, but<br />
+    the gcc compiler does not yet support it. When it does, problems<br />
+    with large template inclusions can largely disappear, given some<br />
+    minor library reorganization, along with the need for the apparatus<br />
+    described above.<br />
+<br />
+    Overhead: Flexibility Cost<br />
+    --------------------------<br />
+<br />
+    The library offers many places where users can specify operations<br />
+    to be performed by the library in place of defaults. Sometimes<br />
+    this seems to require that the library use a more-roundabout, and<br />
+    possibly slower, way to accomplish the default requirements than<br />
+    would be used otherwise.<br />
+<br />
+    The primary protection against this overhead is thorough compiler<br />
+    optimization, to crush out layers of inline function interfaces.<br />
+    Kuck &amp; Associates has demonstrated the practicality of this kind<br />
+    of optimization.<br />
+<br />
+    The second line of defense against this overhead is explicit<br />
+    specialization. By defining helper function templates, and writing<br />
+    specialized code for the default case, overhead can be eliminated<br />
+    for that case without sacrificing flexibility. This takes full<br />
+    advantage of any ability of the optimizer to crush out degenerate<br />
+    code.<br />
+<br />
+    The library specifies many virtual functions which current linkers<br />
+    load even when they cannot be called. Some minor improvements to the<br />
+    compiler and to ld would eliminate any such overhead by simply<br />
+    omitting virtual functions that the complete program does not call.<br />
+    A prototype of this work has already been done. For targets where<br />
+    GNU ld is not used, a "pre-linker" could do the same job.<br />
+<br />
+    The main areas in the standard interface where user flexibility<br />
+    can result in overhead are:<br />
+<br />
+    - Allocators:  Containers are specified to use user-definable<br />
+    allocator types and objects, making tuning for the container<br />
+    characteristics tricky.<br />
+<br />
+    - Locales: the standard specifies locale objects used to implement<br />
+    iostream operations, involving many virtual functions which use<br />
+    streambuf iterators.<br />
+<br />
+    - Algorithms and containers: these may be instantiated on any type,<br />
+    frequently duplicating code for identical operations.<br />
+<br />
+    - Iostreams and strings: users are permitted to use these on their<br />
+    own types, and specify the operations the stream must use on these<br />
+    types.<br />
+<br />
+    Note that these sources of overhead are _avoidable_. The techniques<br />
+    to avoid them are covered below.<br />
+<br />
+    Code Bloat<br />
+    ----------<br />
+<br />
+    In the SGI STL, and in some other headers, many of the templates<br />
+    are defined "inline" -- either explicitly or by their placement<br />
+    in class definitions -- which should not be inline. This is a<br />
+    source of code bloat. Matt had remarked that he was relying on<br />
+    the compiler to recognize what was too big to benefit from inlining,<br />
+    and generate it out-of-line automatically. However, this also can<br />
+    result in code bloat except where the linker can eliminate the extra<br />
+    copies.<br />
+<br />
+    Fixing these cases will require an audit of all inline functions<br />
+    defined in the library to determine which merit inlining, and moving<br />
+    the rest out of line. This is an issue mainly in chapters 23, 25, and<br />
+    27. Of course it can be done incrementally, and we should generally<br />
+    accept patches that move large functions out of line and into ".tcc"<br />
+    files, which can later be pulled into a repository. Compiler/linker<br />
+    improvements to recognize very large inline functions and move them<br />
+    out-of-line, but shared among compilation units, could make this<br />
+    work unnecessary.<br />
+<br />
+    Pre-instantiating template specializations currently produces large<br />
+    amounts of dead code which bloats statically linked programs. The<br />
+    current state of the static library, libstdc++.a, is intolerable on<br />
+    this account, and will fuel further confused speculation about a need<br />
+    for a library "subset". A compiler improvement that treats each<br />
+    instantiated function as a separate object file, for linking purposes,<br />
+    would be one solution to this problem. An alternative would be to<br />
+    split up the manual instantiation files into dozens upon dozens of<br />
+    little files, each compiled separately, but an abortive attempt at<br />
+    this was done for &lt;string&gt; and, though it is far from complete, it<br />
+    is already a nuisance. A better interim solution (just until we have<br />
+    "export") is badly needed.<br />
+<br />
+    When building a shared library, the current compiler/linker cannot<br />
+    automatically generate the instantiatiations needed. This creates a<br />
+    miserable situation; it means any time something is changed in the<br />
+    library, before a shared library can be built someone must manually<br />
+    copy the declarations of all templates that are needed by other parts<br />
+    of the library to an "instantiation" file, and add it to the build<br />
+    system to be compiled and linked to the library. This process is<br />
+    readily automated, and should be automated as soon as possible.<br />
+    Users building their own shared libraries experience identical<br />
+    frustrations.<br />
+<br />
+    Sharing common aspects of template definitions among instantiations<br />
+    can radically reduce code bloat. The compiler could help a great<br />
+    deal here by recognizing when a function depends on nothing about<br />
+    a template parameter, or only on its size, and giving the resulting<br />
+    function a link-name "equate" that allows it to be shared with other<br />
+    instantiations. Implementation code could take advantage of the<br />
+    capability by factoring out code that does not depend on the template<br />
+    argument into separate functions to be merged by the compiler.<br />
+<br />
+    Until such a compiler optimization is implemented, much can be done<br />
+    manually (if tediously) in this direction. One such optimization is<br />
+    to derive class templates from non-template classes, and move as much<br />
+    implementation as possible into the base class. Another is to partial-<br />
+    specialize certain common instantiations, such as vector&lt;T*&gt;, to share<br />
+    code for instantiations on all types T. While these techniques work,<br />
+    they are far from the complete solution that a compiler improvement<br />
+    would afford.<br />
+<br />
+    Overhead: Expensive Language Features<br />
+    -------------------------------------<br />
+<br />
+    The main "expensive" language feature used in the standard library<br />
+    is exception support, which requires compiling in cleanup code with<br />
+    static table data to locate it, and linking in library code to use<br />
+    the table. For small embedded programs the amount of such library<br />
+    code and table data is assumed by some to be excessive. Under the<br />
+    "new" ABI this perception is generally exaggerated, although in some<br />
+    cases it may actually be excessive.<br />
+<br />
+    To implement a library which does not use exceptions directly is<br />
+    not difficult given minor compiler support (to "turn off" exceptions<br />
+    and ignore exception constructs), and results in no great library<br />
+    maintenance difficulties. To be precise, given "-fno-exceptions",<br />
+    the compiler should treat "try" blocks as ordinary blocks, and<br />
+    "catch" blocks as dead code to ignore or eliminate. Compiler<br />
+    support is not strictly necessary, except in the case of "function<br />
+    try blocks"; otherwise the following macros almost suffice:<br />
+<br />
+    #define throw(X)<br />
+    #define try      if (true)<br />
+    #define catch(X) else if (false)<br />
+<br />
+    However, there may be a need to use function try blocks in the<br />
+    library implementation, and use of macros in this way can make<br />
+    correct diagnostics impossible. Furthermore, use of this scheme<br />
+    would require the library to call a function to re-throw exceptions<br />
+    from a try block. Implementing the above semantics in the compiler<br />
+    is preferable.<br />
+<br />
+    Given the support above (however implemented) it only remains to<br />
+    replace code that "throws" with a call to a well-documented "handler"<br />
+    function in a separate compilation unit which may be replaced by<br />
+    the user. The main source of exceptions that would be difficult<br />
+    for users to avoid is memory allocation failures, but users can<br />
+    define their own memory allocation primitives that never throw.<br />
+    Otherwise, the complete list of such handlers, and which library<br />
+    functions may call them, would be needed for users to be able to<br />
+    implement the necessary substitutes. (Fortunately, they have the<br />
+    source code.)<br />
+<br />
+    Opportunities<br />
+    -------------<br />
+<br />
+    The template capabilities of C++ offer enormous opportunities for<br />
+    optimizing common library operations, well beyond what would be<br />
+    considered "eliminating overhead". In particular, many operations<br />
+    done in Glibc with macros that depend on proprietary language<br />
+    extensions can be implemented in pristine Standard C++. For example,<br />
+    the chapter 25 algorithms, and even C library functions such as strchr,<br />
+    can be specialized for the case of static arrays of known (small) size.<br />
+<br />
+    Detailed optimization opportunities are identified below where<br />
+    the component where they would appear is discussed. Of course new<br />
+    opportunities will be identified during implementation.<br />
+<br />
+    Unimplemented Required Library Features<br />
+    ---------------------------------------<br />
+<br />
+    The standard specifies hundreds of components, grouped broadly by<br />
+    chapter. These are listed in excruciating detail in the CHECKLIST<br />
+    file.<br />
+<br />
+    17 general<br />
+    18 support<br />
+    19 diagnostics<br />
+    20 utilities<br />
+    21 string<br />
+    22 locale<br />
+    23 containers<br />
+    24 iterators<br />
+    25 algorithms<br />
+    26 numerics<br />
+    27 iostreams<br />
+    Annex D  backward compatibility<br />
+<br />
+    Anyone participating in implementation of the library should obtain<br />
+    a copy of the standard, ISO 14882.  People in the U.S. can obtain an<br />
+    electronic copy for US$18 from ANSI's web site. Those from other<br />
+    countries should visit http://www.iso.ch/ to find out the location<br />
+    of their country's representation in ISO, in order to know who can<br />
+    sell them a copy.<br />
+<br />
+    The emphasis in the following sections is on unimplemented features<br />
+    and optimization opportunities.<br />
+<br />
+    Chapter 17  General<br />
+    -------------------<br />
+<br />
+    Chapter 17 concerns overall library requirements.<br />
+<br />
+    The standard doesn't mention threads. A multi-thread (MT) extension<br />
+    primarily affects operators new and delete (18), allocator (20),<br />
+    string (21), locale (22), and iostreams (27). The common underlying<br />
+    support needed for this is discussed under chapter 20.<br />
+<br />
+    The standard requirements on names from the C headers create a<br />
+    lot of work, mostly done. Names in the C headers must be visible<br />
+    in the std:: and sometimes the global namespace; the names in the<br />
+    two scopes must refer to the same object. More stringent is that<br />
+    Koenig lookup implies that any types specified as defined in std::<br />
+    really are defined in std::. Names optionally implemented as<br />
+    macros in C cannot be macros in C++. (An overview may be read at<br />
+    &lt;http://www.cantrip.org/cheaders.html&gt;). The scripts "inclosure"<br />
+    and "mkcshadow", and the directories shadow/ and cshadow/, are the<br />
+    beginning of an effort to conform in this area.<br />
+<br />
+    A correct conforming definition of C header names based on underlying<br />
+    C library headers, and practical linking of conforming namespaced<br />
+    customer code with third-party C libraries depends ultimately on<br />
+    an ABI change, allowing namespaced C type names to be mangled into<br />
+    type names as if they were global, somewhat as C function names in a<br />
+    namespace, or C++ global variable names, are left unmangled. Perhaps<br />
+    another "extern" mode, such as 'extern "C-global"' would be an<br />
+    appropriate place for such type definitions. Such a type would<br />
+    affect mangling as follows:<br />
+<br />
+    namespace A {<br />
+    struct X {};<br />
+    extern "C-global" {  // or maybe just 'extern "C"'<br />
+    struct Y {};<br />
+    };<br />
+    }<br />
+    void f(A::X*);  // mangles to f__FPQ21A1X<br />
+    void f(A::Y*);  // mangles to f__FP1Y<br />
+<br />
+    (It may be that this is really the appropriate semantics for regular<br />
+    'extern "C"', and 'extern "C-global"', as an extension, would not be<br />
+    necessary.) This would allow functions declared in non-standard C headers<br />
+    (and thus fixable by neither us nor users) to link properly with functions<br />
+    declared using C types defined in properly-namespaced headers. The<br />
+    problem this solves is that C headers (which C++ programmers do persist<br />
+    in using) frequently forward-declare C struct tags without including<br />
+    the header where the type is defined, as in<br />
+<br />
+    struct tm;<br />
+    void munge(tm*);<br />
+<br />
+    Without some compiler accommodation, munge cannot be called by correct<br />
+    C++ code using a pointer to a correctly-scoped tm* value.<br />
+<br />
+    The current C headers use the preprocessor extension "#include_next",<br />
+    which the compiler complains about when run "-pedantic".<br />
+    (Incidentally, it appears that "-fpedantic" is currently ignored,<br />
+    probably a bug.)  The solution in the C compiler is to use<br />
+    "-isystem" rather than "-I", but unfortunately in g++ this seems<br />
+    also to wrap the whole header in an 'extern "C"' block, so it's<br />
+    unusable for C++ headers. The correct solution appears to be to<br />
+    allow the various special include-directory options, if not given<br />
+    an argument, to affect subsequent include-directory options additively,<br />
+    so that if one said<br />
+<br />
+    -pedantic -iprefix $(prefix) \<br />
+    -idirafter -ino-pedantic -ino-extern-c -iwithprefix -I g++-v3 \<br />
+    -iwithprefix -I g++-v3/ext<br />
+<br />
+    the compiler would search $(prefix)/g++-v3 and not report<br />
+    pedantic warnings for files found there, but treat files in<br />
+    $(prefix)/g++-v3/ext pedantically. (The undocumented semantics<br />
+    of "-isystem" in g++ stink. Can they be rescinded?  If not it<br />
+    must be replaced with something more rationally behaved.)<br />
+<br />
+    All the C headers need the treatment above; in the standard these<br />
+    headers are mentioned in various chapters. Below, I have only<br />
+    mentioned those that present interesting implementation issues.<br />
+<br />
+    The components identified as "mostly complete", below, have not been<br />
+    audited for conformance. In many cases where the library passes<br />
+    conformance tests we have non-conforming extensions that must be<br />
+    wrapped in #if guards for "pedantic" use, and in some cases renamed<br />
+    in a conforming way for continued use in the implementation regardless<br />
+    of conformance flags.<br />
+<br />
+    The STL portion of the library still depends on a header<br />
+    stl/bits/stl_config.h full of #ifdef clauses. This apparatus<br />
+    should be replaced with autoconf/automake machinery.<br />
+<br />
+    The SGI STL defines a type_traits&lt;&gt; template, specialized for<br />
+    many types in their code including the built-in numeric and<br />
+    pointer types and some library types, to direct optimizations of<br />
+    standard functions. The SGI compiler has been extended to generate<br />
+    specializations of this template automatically for user types,<br />
+    so that use of STL templates on user types can take advantage of<br />
+    these optimizations. Specializations for other, non-STL, types<br />
+    would make more optimizations possible, but extending the gcc<br />
+    compiler in the same way would be much better. Probably the next<br />
+    round of standardization will ratify this, but probably with<br />
+    changes, so it probably should be renamed to place it in the<br />
+    implementation namespace.<br />
+<br />
+    The SGI STL also defines a large number of extensions visible in<br />
+    standard headers. (Other extensions that appear in separate headers<br />
+    have been sequestered in subdirectories ext/ and backward/.)  All<br />
+    these extensions should be moved to other headers where possible,<br />
+    and in any case wrapped in a namespace (not std!), and (where kept<br />
+    in a standard header) girded about with macro guards. Some cannot be<br />
+    moved out of standard headers because they are used to implement<br />
+    standard features.  The canonical method for accommodating these<br />
+    is to use a protected name, aliased in macro guards to a user-space<br />
+    name. Unfortunately C++ offers no satisfactory template typedef<br />
+    mechanism, so very ad-hoc and unsatisfactory aliasing must be used<br />
+    instead.<br />
+<br />
+    Implementation of a template typedef mechanism should have the highest<br />
+    priority among possible extensions, on the same level as implementation<br />
+    of the template "export" feature.<br />
+<br />
+    Chapter 18  Language support<br />
+    ----------------------------<br />
+<br />
+    Headers: &lt;limits&gt; &lt;new&gt; &lt;typeinfo&gt; &lt;exception&gt;<br />
+    C headers: &lt;cstddef&gt; &lt;climits&gt; &lt;cfloat&gt;  &lt;cstdarg&gt; &lt;csetjmp&gt;<br />
+    &lt;ctime&gt;   &lt;csignal&gt; &lt;cstdlib&gt; (also 21, 25, 26)<br />
+<br />
+    This defines the built-in exceptions, rtti, numeric_limits&lt;&gt;,<br />
+    operator new and delete. Much of this is provided by the<br />
+    compiler in its static runtime library.<br />
+<br />
+    Work to do includes defining numeric_limits&lt;&gt; specializations in<br />
+    separate files for all target architectures. Values for integer types<br />
+    except for bool and wchar_t are readily obtained from the C header<br />
+    &lt;limits.h&gt;, but values for the remaining numeric types (bool, wchar_t,<br />
+    float, double, long double) must be entered manually. This is<br />
+    largely dog work except for those members whose values are not<br />
+    easily deduced from available documentation. Also, this involves<br />
+    some work in target configuration to identify the correct choice of<br />
+    file to build against and to install.<br />
+<br />
+    The definitions of the various operators new and delete must be<br />
+    made thread-safe, which depends on a portable exclusion mechanism,<br />
+    discussed under chapter 20.  Of course there is always plenty of<br />
+    room for improvements to the speed of operators new and delete.<br />
+<br />
+    &lt;cstdarg&gt;, in Glibc, defines some macros that gcc does not allow to<br />
+    be wrapped into an inline function. Probably this header will demand<br />
+    attention whenever a new target is chosen. The functions atexit(),<br />
+    exit(), and abort() in cstdlib have different semantics in C++, so<br />
+    must be re-implemented for C++.<br />
+<br />
+    Chapter 19  Diagnostics<br />
+    -----------------------<br />
+<br />
+    Headers: &lt;stdexcept&gt;<br />
+    C headers: &lt;cassert&gt; &lt;cerrno&gt;<br />
+<br />
+    This defines the standard exception objects, which are "mostly complete".<br />
+    Cygnus has a version, and now SGI provides a slightly different one.<br />
+    It makes little difference which we use.<br />
+<br />
+    The C global name "errno", which C allows to be a variable or a macro,<br />
+    is required in C++ to be a macro. For MT it must typically result in<br />
+    a function call.<br />
+<br />
+    Chapter 20  Utilities<br />
+    ---------------------<br />
+    Headers: &lt;utility&gt; &lt;functional&gt; &lt;memory&gt;<br />
+    C header: &lt;ctime&gt; (also in 18)<br />
+<br />
+    SGI STL provides "mostly complete" versions of all the components<br />
+    defined in this chapter. However, the auto_ptr&lt;&gt; implementation<br />
+    is known to be wrong. Furthermore, the standard definition of it<br />
+    is known to be unimplementable as written. A minor change to the<br />
+    standard would fix it, and auto_ptr&lt;&gt; should be adjusted to match.<br />
+<br />
+    Multi-threading affects the allocator implementation, and there must<br />
+    be configuration/installation choices for different users' MT<br />
+    requirements. Anyway, users will want to tune allocator options<br />
+    to support different target conditions, MT or no.<br />
+<br />
+    The primitives used for MT implementation should be exposed, as an<br />
+    extension, for users' own work. We need cross-CPU "mutex" support,<br />
+    multi-processor shared-memory atomic integer operations, and single-<br />
+    processor uninterruptible integer operations, and all three configurable<br />
+    to be stubbed out for non-MT use, or to use an appropriately-loaded<br />
+    dynamic library for the actual runtime environment, or statically<br />
+    compiled in for cases where the target architecture is known.<br />
+<br />
+    Chapter 21  String<br />
+    ------------------<br />
+    Headers: &lt;string&gt;<br />
+    C headers: &lt;cctype&gt; &lt;cwctype&gt; &lt;cstring&gt; &lt;cwchar&gt; (also in 27)<br />
+    &lt;cstdlib&gt; (also in 18, 25, 26)<br />
+<br />
+    We have "mostly-complete" char_traits&lt;&gt; implementations. Many of the<br />
+    char_traits&lt;char&gt; operations might be optimized further using existing<br />
+    proprietary language extensions.<br />
+<br />
+    We have a "mostly-complete" basic_string&lt;&gt; implementation. The work<br />
+    to manually instantiate char and wchar_t specializations in object<br />
+    files to improve link-time behavior is extremely unsatisfactory,<br />
+    literally tripling library-build time with no commensurate improvement<br />
+    in static program link sizes. It must be redone. (Similar work is<br />
+    needed for some components in chapters 22 and 27.)<br />
+<br />
+    Other work needed for strings is MT-safety, as discussed under the<br />
+    chapter 20 heading.<br />
+<br />
+    The standard C type mbstate_t from &lt;cwchar&gt; and used in char_traits&lt;&gt;<br />
+    must be different in C++ than in C, because in C++ the default constructor<br />
+    value mbstate_t() must be the "base" or "ground" sequence state.<br />
+    (According to the likely resolution of a recently raised Core issue,<br />
+    this may become unnecessary. However, there are other reasons to<br />
+    use a state type not as limited as whatever the C library provides.)<br />
+    If we might want to provide conversions from (e.g.) internally-<br />
+    represented EUC-wide to externally-represented Unicode, or vice-<br />
+    versa, the mbstate_t we choose will need to be more accommodating<br />
+    than what might be provided by an underlying C library.<br />
+<br />
+    There remain some basic_string template-member functions which do<br />
+    not overload properly with their non-template brethren. The infamous<br />
+    hack akin to what was done in vector&lt;&gt; is needed, to conform to<br />
+    23.1.1 para 10. The CHECKLIST items for basic_string marked 'X',<br />
+    or incomplete, are so marked for this reason.<br />
+<br />
+    Replacing the string iterators, which currently are simple character<br />
+    pointers, with class objects would greatly increase the safety of the<br />
+    client interface, and also permit a "debug" mode in which range,<br />
+    ownership, and validity are rigorously checked. The current use of<br />
+    raw pointers as string iterators is evil. vector&lt;&gt; iterators need the<br />
+    same treatment. Note that the current implementation freely mixes<br />
+    pointers and iterators, and that must be fixed before safer iterators<br />
+    can be introduced.<br />
+<br />
+    Some of the functions in &lt;cstring&gt; are different from the C version.<br />
+    generally overloaded on const and non-const argument pointers. For<br />
+    example, in &lt;cstring&gt; strchr is overloaded. The functions isupper<br />
+    etc. in &lt;cctype&gt; typically implemented as macros in C are functions<br />
+    in C++, because they are overloaded with others of the same name<br />
+    defined in &lt;locale&gt;.<br />
+<br />
+    Many of the functions required in &lt;cwctype&gt; and &lt;cwchar&gt; cannot be<br />
+    implemented using underlying C facilities on intended targets because<br />
+    such facilities only partly exist.<br />
+<br />
+    Chapter 22  Locale<br />
+    ------------------<br />
+    Headers: &lt;locale&gt;<br />
+    C headers: &lt;clocale&gt;<br />
+<br />
+    We have a "mostly complete" class locale, with the exception of<br />
+    code for constructing, and handling the names of, named locales.<br />
+    The ways that locales are named (particularly when categories<br />
+    (e.g. LC_TIME, LC_COLLATE) are different) varies among all target<br />
+    environments. This code must be written in various versions and<br />
+    chosen by configuration parameters.<br />
+<br />
+    Members of many of the facets defined in &lt;locale&gt; are stubs. Generally,<br />
+    there are two sets of facets: the base class facets (which are supposed<br />
+    to implement the "C" locale) and the "byname" facets, which are supposed<br />
+    to read files to determine their behavior. The base ctype&lt;&gt;, collate&lt;&gt;,<br />
+    and numpunct&lt;&gt; facets are "mostly complete", except that the table of<br />
+    bitmask values used for "is" operations, and corresponding mask values,<br />
+    are still defined in libio and just included/linked. (We will need to<br />
+    implement these tables independently, soon, but should take advantage<br />
+    of libio where possible.)  The num_put&lt;&gt;::put members for integer types<br />
+    are "mostly complete".<br />
+<br />
+    A complete list of what has and has not been implemented may be<br />
+    found in CHECKLIST. However, note that the current definition of<br />
+    codecvt&lt;wchar_t,char,mbstate_t&gt; is wrong. It should simply write<br />
+    out the raw bytes representing the wide characters, rather than<br />
+    trying to convert each to a corresponding single "char" value.<br />
+<br />
+    Some of the facets are more important than others. Specifically,<br />
+    the members of ctype&lt;&gt;, numpunct&lt;&gt;, num_put&lt;&gt;, and num_get&lt;&gt; facets<br />
+    are used by other library facilities defined in &lt;string&gt;, &lt;istream&gt;,<br />
+    and &lt;ostream&gt;, and the codecvt&lt;&gt; facet is used by basic_filebuf&lt;&gt;<br />
+    in &lt;fstream&gt;, so a conforming iostream implementation depends on<br />
+    these.<br />
+<br />
+    The "long long" type eventually must be supported, but code mentioning<br />
+    it should be wrapped in #if guards to allow pedantic-mode compiling.<br />
+<br />
+    Performance of num_put&lt;&gt; and num_get&lt;&gt; depend critically on<br />
+    caching computed values in ios_base objects, and on extensions<br />
+    to the interface with streambufs.<br />
+<br />
+    Specifically: retrieving a copy of the locale object, extracting<br />
+    the needed facets, and gathering data from them, for each call to<br />
+    (e.g.) operator&lt;&lt; would be prohibitively slow.  To cache format<br />
+    data for use by num_put&lt;&gt; and num_get&lt;&gt; we have a _Format_cache&lt;&gt;<br />
+    object stored in the ios_base::pword() array. This is constructed<br />
+    and initialized lazily, and is organized purely for utility. It<br />
+    is discarded when a new locale with different facets is imbued.<br />
+<br />
+    Using only the public interfaces of the iterator arguments to the<br />
+    facet functions would limit performance by forbidding "vector-style"<br />
+    character operations. The streambuf iterator optimizations are<br />
+    described under chapter 24, but facets can also bypass the streambuf<br />
+    iterators via explicit specializations and operate directly on the<br />
+    streambufs, and use extended interfaces to get direct access to the<br />
+    streambuf internal buffer arrays. These extensions are mentioned<br />
+    under chapter 27. These optimizations are particularly important<br />
+    for input parsing.<br />
+<br />
+    Unused virtual members of locale facets can be omitted, as mentioned<br />
+    above, by a smart linker.<br />
+<br />
+    Chapter 23  Containers<br />
+    ----------------------<br />
+    Headers: &lt;deque&gt; &lt;list&gt; &lt;queue&gt; &lt;stack&gt; &lt;vector&gt; &lt;map&gt; &lt;set&gt; &lt;bitset&gt;<br />
+<br />
+    All the components in chapter 23 are implemented in the SGI STL.<br />
+    They are "mostly complete"; they include a large number of<br />
+    nonconforming extensions which must be wrapped. Some of these<br />
+    are used internally and must be renamed or duplicated.<br />
+<br />
+    The SGI components are optimized for large-memory environments. For<br />
+    embedded targets, different criteria might be more appropriate. Users<br />
+    will want to be able to tune this behavior. We should provide<br />
+    ways for users to compile the library with different memory usage<br />
+    characteristics.<br />
+<br />
+    A lot more work is needed on factoring out common code from different<br />
+    specializations to reduce code size here and in chapter 25. The<br />
+    easiest fix for this would be a compiler/ABI improvement that allows<br />
+    the compiler to recognize when a specialization depends only on the<br />
+    size (or other gross quality) of a template argument, and allow the<br />
+    linker to share the code with similar specializations. In its<br />
+    absence, many of the algorithms and containers can be partial-<br />
+    specialized, at least for the case of pointers, but this only solves<br />
+    a small part of the problem. Use of a type_traits-style template<br />
+    allows a few more optimization opportunities, more if the compiler<br />
+    can generate the specializations automatically.<br />
+<br />
+    As an optimization, containers can specialize on the default allocator<br />
+    and bypass it, or take advantage of details of its implementation<br />
+    after it has been improved upon.<br />
+<br />
+    Replacing the vector iterators, which currently are simple element<br />
+    pointers, with class objects would greatly increase the safety of the<br />
+    client interface, and also permit a "debug" mode in which range,<br />
+    ownership, and validity are rigorously checked. The current use of<br />
+    pointers for iterators is evil.<br />
+<br />
+    As mentioned for chapter 24, the deque iterator is a good example of<br />
+    an opportunity to implement a "staged" iterator that would benefit<br />
+    from specializations of some algorithms.<br />
+<br />
+    Chapter 24  Iterators<br />
+    ---------------------<br />
+    Headers: &lt;iterator&gt;<br />
+<br />
+    Standard iterators are "mostly complete", with the exception of<br />
+    the stream iterators, which are not yet templatized on the<br />
+    stream type. Also, the base class template iterator&lt;&gt; appears<br />
+    to be wrong, so everything derived from it must also be wrong,<br />
+    currently.<br />
+<br />
+    The streambuf iterators (currently located in stl/bits/std_iterator.h,<br />
+    but should be under bits/) can be rewritten to take advantage of<br />
+    friendship with the streambuf implementation.<br />
+<br />
+    Matt Austern has identified opportunities where certain iterator<br />
+    types, particularly including streambuf iterators and deque<br />
+    iterators, have a "two-stage" quality, such that an intermediate<br />
+    limit can be checked much more quickly than the true limit on<br />
+    range operations. If identified with a member of iterator_traits,<br />
+    algorithms may be specialized for this case. Of course the<br />
+    iterators that have this quality can be identified by specializing<br />
+    a traits class.<br />
+<br />
+    Many of the algorithms must be specialized for the streambuf<br />
+    iterators, to take advantage of block-mode operations, in order<br />
+    to allow iostream/locale operations' performance not to suffer.<br />
+    It may be that they could be treated as staged iterators and<br />
+    take advantage of those optimizations.<br />
+<br />
+    Chapter 25  Algorithms<br />
+    ----------------------<br />
+    Headers: &lt;algorithm&gt;<br />
+    C headers: &lt;cstdlib&gt; (also in 18, 21, 26))<br />
+<br />
+    The algorithms are "mostly complete". As mentioned above, they<br />
+    are optimized for speed at the expense of code and data size.<br />
+<br />
+    Specializations of many of the algorithms for non-STL types would<br />
+    give performance improvements, but we must use great care not to<br />
+    interfere with fragile template overloading semantics for the<br />
+    standard interfaces. Conventionally the standard function template<br />
+    interface is an inline which delegates to a non-standard function<br />
+    which is then overloaded (this is already done in many places in<br />
+    the library). Particularly appealing opportunities for the sake of<br />
+    iostream performance are for copy and find applied to streambuf<br />
+    iterators or (as noted elsewhere) for staged iterators, of which<br />
+    the streambuf iterators are a good example.<br />
+<br />
+    The bsearch and qsort functions cannot be overloaded properly as<br />
+    required by the standard because gcc does not yet allow overloading<br />
+    on the extern-"C"-ness of a function pointer.<br />
+<br />
+    Chapter 26  Numerics<br />
+    --------------------<br />
+    Headers: &lt;complex&gt; &lt;valarray&gt; &lt;numeric&gt;<br />
+    C headers: &lt;cmath&gt;, &lt;cstdlib&gt; (also 18, 21, 25)<br />
+<br />
+    Numeric components: Gabriel dos Reis's valarray, Drepper's complex,<br />
+    and the few algorithms from the STL are "mostly done".  Of course<br />
+    optimization opportunities abound for the numerically literate. It<br />
+    is not clear whether the valarray implementation really conforms<br />
+    fully, in the assumptions it makes about aliasing (and lack thereof)<br />
+    in its arguments.<br />
+<br />
+    The C div() and ldiv() functions are interesting, because they are the<br />
+    only case where a C library function returns a class object by value.<br />
+    Since the C++ type div_t must be different from the underlying C type<br />
+    (which is in the wrong namespace) the underlying functions div() and<br />
+    ldiv() cannot be re-used efficiently. Fortunately they are trivial to<br />
+    re-implement.<br />
+<br />
+    Chapter 27  Iostreams<br />
+    ---------------------<br />
+    Headers: &lt;iosfwd&gt; &lt;streambuf&gt; &lt;ios&gt; &lt;ostream&gt; &lt;istream&gt; &lt;iostream&gt;<br />
+    &lt;iomanip&gt; &lt;sstream&gt; &lt;fstream&gt;<br />
+    C headers: &lt;cstdio&gt; &lt;cwchar&gt; (also in 21)<br />
+<br />
+    Iostream is currently in a very incomplete state. &lt;iosfwd&gt;, &lt;iomanip&gt;,<br />
+    ios_base, and basic_ios&lt;&gt; are "mostly complete". basic_streambuf&lt;&gt; and<br />
+    basic_ostream&lt;&gt; are well along, but basic_istream&lt;&gt; has had little work<br />
+    done. The standard stream objects, &lt;sstream&gt; and &lt;fstream&gt; have been<br />
+    started; basic_filebuf&lt;&gt; "write" functions have been implemented just<br />
+    enough to do "hello, world".<br />
+<br />
+    Most of the istream and ostream operators &lt;&lt; and &gt;&gt; (with the exception<br />
+    of the op&lt;&lt;(integer) ones) have not been changed to use locale primitives,<br />
+    sentry objects, or char_traits members.<br />
+<br />
+    All these templates should be manually instantiated for char and<br />
+    wchar_t in a way that links only used members into user programs.<br />
+<br />
+    Streambuf is fertile ground for optimization extensions. An extended<br />
+    interface giving iterator access to its internal buffer would be very<br />
+    useful for other library components.<br />
+<br />
+    Iostream operations (primarily operators &lt;&lt; and &gt;&gt;) can take advantage<br />
+    of the case where user code has not specified a locale, and bypass locale<br />
+    operations entirely. The current implementation of op&lt;&lt;/num_put&lt;&gt;::put,<br />
+    for the integer types, demonstrates how they can cache encoding details<br />
+    from the locale on each operation. There is lots more room for<br />
+    optimization in this area.<br />
+<br />
+    The definition of the relationship between the standard streams<br />
+    cout et al. and stdout et al. requires something like a "stdiobuf".<br />
+    The SGI solution of using double-indirection to actually use a<br />
+    stdio FILE object for buffering is unsatisfactory, because it<br />
+    interferes with peephole loop optimizations.<br />
+<br />
+    The &lt;sstream&gt; header work has begun. stringbuf can benefit from<br />
+    friendship with basic_string&lt;&gt; and basic_string&lt;&gt;::_Rep to use<br />
+    those objects directly as buffers, and avoid allocating and making<br />
+    copies.<br />
+<br />
+    The basic_filebuf&lt;&gt; template is a complex beast. It is specified to<br />
+    use the locale facet codecvt&lt;&gt; to translate characters between native<br />
+    files and the locale character encoding. In general this involves<br />
+    two buffers, one of "char" representing the file and another of<br />
+    "char_type", for the stream, with codecvt&lt;&gt; translating. The process<br />
+    is complicated by the variable-length nature of the translation, and<br />
+    the need to seek to corresponding places in the two representations.<br />
+    For the case of basic_filebuf&lt;char&gt;, when no translation is needed,<br />
+    a single buffer suffices. A specialized filebuf can be used to reduce<br />
+    code space overhead when no locale has been imbued. Matt Austern's<br />
+    work at SGI will be useful, perhaps directly as a source of code, or<br />
+    at least as an example to draw on.<br />
+<br />
+    Filebuf, almost uniquely (cf. operator new), depends heavily on<br />
+    underlying environmental facilities. In current releases iostream<br />
+    depends fairly heavily on libio constant definitions, but it should<br />
+    be made independent.  It also depends on operating system primitives<br />
+    for file operations. There is immense room for optimizations using<br />
+    (e.g.) mmap for reading. The shadow/ directory wraps, besides the<br />
+    standard C headers, the libio.h and unistd.h headers, for use mainly<br />
+    by filebuf. These wrappings have not been completed, though there<br />
+    is scaffolding in place.<br />
+<br />
+    The encapulation of certain C header &lt;cstdio&gt; names presents an<br />
+    interesting problem. It is possible to define an inline std::fprintf()<br />
+    implemented in terms of the 'extern "C"' vfprintf(), but there is no<br />
+    standard vfscanf() to use to implement std::fscanf(). It appears that<br />
+    vfscanf but be re-implemented in C++ for targets where no vfscanf<br />
+    extension has been defined. This is interesting in that it seems<br />
+    to be the only significant case in the C library where this kind of<br />
+    rewriting is necessary. (Of course Glibc provides the vfscanf()<br />
+    extension.)  (The functions related to exit() must be rewritten<br />
+    for other reasons.)<br />
+<br />
+<br />
+    Annex D<br />
+    -------<br />
+    Headers: &lt;strstream&gt;<br />
+<br />
+    Annex D defines many non-library features, and many minor<br />
+    modifications to various headers, and a complete header.<br />
+    It is "mostly done", except that the libstdc++-2 &lt;strstream&gt;<br />
+    header has not been adopted into the library, or checked to<br />
+    verify that it matches the draft in those details that were<br />
+    clarified by the committee. Certainly it must at least be<br />
+    moved into the std namespace.<br />
+<br />
+    We still need to wrap all the deprecated features in #if guards<br />
+    so that pedantic compile modes can detect their use.<br />
+<br />
+    Nonstandard Extensions<br />
+    ----------------------<br />
+    Headers: &lt;iostream.h&gt; &lt;strstream.h&gt; &lt;hash&gt; &lt;rbtree&gt;<br />
+    &lt;pthread_alloc&gt; &lt;stdiobuf&gt; (etc.)<br />
+<br />
+    User code has come to depend on a variety of nonstandard components<br />
+    that we must not omit. Much of this code can be adopted from<br />
+    libstdc++-v2 or from the SGI STL. This particularly includes<br />
+    &lt;iostream.h&gt;, &lt;strstream.h&gt;, and various SGI extensions such<br />
+    as &lt;hash_map.h&gt;. Many of these are already placed in the<br />
+    subdirectories ext/ and backward/. (Note that it is better to<br />
+    include them via "&lt;backward/hash_map.h&gt;" or "&lt;ext/hash_map&gt;" than<br />
+    to search the subdirectory itself via a "-I" directive.<br />
+  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_porting.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Documentation Style </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix B. Porting and Maintenance</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apd.html b/libstdc++-v3/doc/html/manual/bk01apd.html
new file mode 100644
index 00000000000..edcb2dc610f
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apd.html
@@ -0,0 +1,41 @@
+<?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 D. GNU General Public License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" 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_free.html" title="Appendix C. Free Software Needs Free Documentation" /><link rel="next" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. GNU General Public License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.gpl-2.0"></a>GNU General Public License</h1></div><div><p class="releaseinfo">Version 2, June 1991</p></div><div><p class="copyright">Copyright © 1989, 1991 Free Software Foundation, Inc.</p></div><div><div class="legalnotice"><a id="gpl-legalnotice"></a><p>
+ </p><div class="address"><p>Free Software Foundation, Inc. <br />
+   <span class="street">51 Franklin Street, Fifth Floor</span>, <br />
+   <span class="city">Boston</span>, <span class="state">MA</span> <span class="postcode">02110-1301</span><br />
+   <span class="country">USA</span><br />
+ </p></div><p>
+ </p><p>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p></div></div><div><p class="pubdate">Version 2, June 1991</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-1"></a>Preamble</h2></div></div></div><p>The licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change
+ free software - to make sure the software is free for all its users.
+ This General Public License applies to most of the Free Software
+ Foundation's software and to any other program whose authors commit
+ to using it. (Some other Free Software Foundation software is covered
+ by the GNU Library General Public License instead.) You can apply it
+ to your programs, too.</p><p>When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this
+ service if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new free
+ programs; and that you know you can do these things.</p><p>To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights. These
+ restrictions translate to certain responsibilities for you if you distribute
+ copies of the software, or if you modify it.</p><p>For example, if you distribute copies of such a program, whether gratis or
+ for a fee, you must give the recipients all the rights that you have. You
+ must make sure that they, too, receive or can get the source code. And you
+ must show them these terms so they know their rights.</p><p>We protect your rights with two steps:
+ </p><div class="orderedlist"><ol type="1"><li><p>copyright the software, and</p></li><li><p>offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.</p></li></ol></div><p>
+ </p><p>Also, for each author's protection and ours, we want to make certain that
+ everyone understands that there is no warranty for this free software. If
+ the software is modified by someone else and passed on, we want its
+ recipients to know that what they have is not the original, so that any
+ problems introduced by others will not reflect on the original authors'
+ reputations.</p><p>Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent must be
+ licensed for everyone's free use or not licensed at all.</p><p>The precise terms and conditions for copying, distribution and modification
+ follow.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_free.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="bk01apds02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. Free Software Needs Free Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apds02.html b/libstdc++-v3/doc/html/manual/bk01apds02.html
new file mode 100644
index 00000000000..5fb34dcbf66
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apds02.html
@@ -0,0 +1,129 @@
+<?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>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="next" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apd.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds03.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-2"></a>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-0"></a>Section 0</h3></div></div></div><p>This License applies to any program or other work which contains a notice
+ placed by the copyright holder saying it may be distributed under the terms
+ of this General Public License. The “<span class="quote">Program</span>â€, below, refers to any such
+ program or work, and a
+ “<span class="quote">work based on the Program</span>†means either
+ the Program or any derivative work under copyright law: that is to say, a
+ work containing the Program or a portion of it, either verbatim or with
+ modifications and/or translated into another language. (Hereinafter, translation
+ is included without limitation in the term
+ “<span class="quote">modification</span>â€.) Each licensee is addressed as “<span class="quote">you</span>â€.</p><p>Activities other than copying, distribution and modification are not covered by
+ this License; they are outside its scope. The act of running the Program is not
+ restricted, and the output from the Program is covered only if its contents
+ constitute a work based on the Program (independent of having been made by running
+ the Program). Whether that is true depends on what the Program does.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-1"></a>Section 1</h3></div></div></div><p>You may copy and distribute verbatim copies of the Program's source code as you
+ receive it, in any medium, provided that you conspicuously and appropriately
+ publish on each copy an appropriate copyright notice and disclaimer of warranty;
+ keep intact all the notices that refer to this License and to the absence of any
+ warranty; and give any other recipients of the Program a copy of this License
+ along with the Program.</p><p>You may charge a fee for the physical act of transferring a copy, and you may at
+ your option offer warranty protection in exchange for a fee.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-2"></a>Section 2</h3></div></div></div><p>You may modify your copy or copies of the Program or any portion of it, thus
+ forming a work based on the Program, and copy and distribute such modifications
+ or work under the terms of
+ <a class="link" href="bk01apds02.html#gpl-2-1" title="Section 1">Section 1</a> above, provided
+ that you also meet all of these conditions:
+ </p><div class="orderedlist"><ol type="a"><li><p>You must cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change.</p></li><li><p>You must cause any work that you distribute or publish, that in whole or
+ in part contains or is derived from the Program or any part thereof, to be
+ licensed as a whole at no charge to all third parties under the terms of
+ this License.</p></li><li><p>If the modified program normally reads commands interactively when run, you
+ must cause it, when started running for such interactive use in the most
+ ordinary way, to print or display an announcement including an appropriate
+ copyright notice and a notice that there is no warranty (or else, saying
+ that you provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy of this
+ License. (Exception: If the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program is not
+ required to print an announcement.)</p></li></ol></div><p>
+ </p><p>These requirements apply to the modified work as a whole. If identifiable sections
+ of that work are not derived from the Program, and can be reasonably considered
+ independent and separate works in themselves, then this License, and its terms,
+ do not apply to those sections when you distribute them as separate works. But when
+ you distribute the same sections as part of a whole which is a work based on the
+ Program, the distribution of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole, and thus to each and
+ every part regardless of who wrote it.</p><p>Thus, it is not the intent of this section to claim rights or contest your rights
+ to work written entirely by you; rather, the intent is to exercise the right to control
+ the distribution of derivative or collective works based on the Program.</p><p>In addition, mere aggregation of another work not based on the Program with the Program
+ (or with a work based on the Program) on a volume of a storage or distribution medium
+ does not bring the other work under the scope of this License.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-3"></a>Section 3</h3></div></div></div><p>You may copy and distribute the Program (or a work based on it, under
+ <a class="link" href="bk01apds02.html#gpl-2-2" title="Section 2">Section 2</a> in object code or executable form under the terms of
+ <a class="link" href="bk01apds02.html#gpl-2-1" title="Section 1">Sections 1</a> and
+ <a class="link" href="bk01apds02.html#gpl-2-2" title="Section 2">2</a> above provided that you also do one of the following:
+ </p><div class="orderedlist"><ol type="a"><li><p>Accompany it with the complete corresponding machine-readable source code, which
+ must be distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,</p></li><li><p>Accompany it with a written offer, valid for at least three years, to give any
+ third party, for a charge no more than your cost of physically performing source
+ distribution, a complete machine-readable copy of the corresponding source code,
+ to be distributed under the terms of Sections 1 and 2 above on a medium customarily
+ used for software interchange; or,</p></li><li><p>Accompany it with the information you received as to the offer to distribute
+ corresponding source code. (This alternative is allowed only for noncommercial
+ distribution and only if you received the program in object code or executable form
+ with such an offer, in accord with Subsection b above.)</p></li></ol></div><p>
+ </p><p>The source code for a work means the preferred form of the work for making modifications
+ to it. For an executable work, complete source code means all the source code for all modules
+ it contains, plus any associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special exception, the source
+ code distributed need not include anything that is normally distributed (in either source or
+ binary form) with the major components (compiler, kernel, and so on) of the operating system
+ on which the executable runs, unless that component itself accompanies the executable.</p><p>If distribution of executable or object code is made by offering access to copy from a
+ designated place, then offering equivalent access to copy the source code from the same place
+ counts as distribution of the source code, even though third parties are not compelled to
+ copy the source along with the object code.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-4"></a>Section 4</h3></div></div></div><p>You may not copy, modify, sublicense, or distribute the Program except as expressly provided
+ under this License. Any attempt otherwise to copy, modify, sublicense or distribute the
+ Program is void, and will automatically terminate your rights under this License. However,
+ parties who have received copies, or rights, from you under this License will not have their
+ licenses terminated so long as such parties remain in full compliance.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-5"></a>Section 5</h3></div></div></div><p>You are not required to accept this License, since you have not signed it. However, nothing
+ else grants you permission to modify or distribute the Program or its derivative works.
+ These actions are prohibited by law if you do not accept this License. Therefore, by modifying
+ or distributing the Program (or any work based on the Program), you indicate your acceptance
+ of this License to do so, and all its terms and conditions for copying, distributing or
+ modifying the Program or works based on it.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-6"></a>Section 6</h3></div></div></div><p>Each time you redistribute the Program (or any work based on the Program), the recipient
+ automatically receives a license from the original licensor to copy, distribute or modify
+ the Program subject to these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not responsible for enforcing
+ compliance by third parties to this License.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-7"></a>Section 7</h3></div></div></div><p>If, as a consequence of a court judgment or allegation of patent infringement or for any other
+ reason (not limited to patent issues), conditions are imposed on you (whether by court order,
+ agreement or otherwise) that contradict the conditions of this License, they do not excuse you
+ from the conditions of this License. If you cannot distribute so as to satisfy simultaneously
+ your obligations under this License and any other pertinent obligations, then as a consequence
+ you may not distribute the Program at all. For example, if a patent license would not permit
+ royalty-free redistribution of the Program by all those who receive copies directly or
+ indirectly through you, then the only way you could satisfy both it and this License would be
+ to refrain entirely from distribution of the Program.</p><p>If any portion of this section is held invalid or unenforceable under any particular circumstance,
+ the balance of the section is intended to apply and the section as a whole is intended to apply
+ in other circumstances.</p><p>It is not the purpose of this section to induce you to infringe any patents or other property
+ right claims or to contest validity of any such claims; this section has the sole purpose of
+ protecting the integrity of the free software distribution system, which is implemented by public
+ license practices. Many people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of that system; it is up
+ to the author/donor to decide if he or she is willing to distribute software through any other
+ system and a licensee cannot impose that choice.</p><p>This section is intended to make thoroughly clear what is believed to be a consequence of the
+ rest of this License.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-8"></a>Section 8</h3></div></div></div><p>If the distribution and/or use of the Program is restricted in certain countries either by patents
+ or by copyrighted interfaces, the original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding those countries, so that
+ distribution is permitted only in or among countries not thus excluded. In such case, this License
+ incorporates the limitation as if written in the body of this License.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-9"></a>Section 9</h3></div></div></div><p>The Free Software Foundation may publish revised and/or new versions of the General Public License
+ from time to time. Such new versions will be similar in spirit to the present version, but may differ
+ in detail to address new problems or concerns.</p><p>Each version is given a distinguishing version number. If the Program specifies a version number of
+ this License which applies to it and “<span class="quote">any later version</span>â€, you have the option of following the terms
+ and conditions either of that version or of any later version published by the Free Software
+ Foundation. If the Program does not specify a version number of this License, you may choose any
+ version ever published by the Free Software Foundation.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-10"></a>Section 10</h3></div></div></div><p>If you wish to incorporate parts of the Program into other free programs whose distribution
+ conditions are different, write to the author to ask for permission. For software which is copyrighted
+ by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions
+ for this. Our decision will be guided by the two goals of preserving the free status of all
+ derivatives of our free software and of promoting the sharing and reuse of software generally.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-11"></a>NO WARRANTY Section 11</h3></div></div></div><p>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM “<span class="quote">AS IS</span>†WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-12"></a>Section 12</h3></div></div></div><p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
+ ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
+ ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGES.</p><p>END OF TERMS AND CONDITIONS</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apd.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01apd.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apds03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix D. GNU General Public License </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> How to Apply These Terms to Your New Programs</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apds03.html b/libstdc++-v3/doc/html/manual/bk01apds03.html
new file mode 100644
index 00000000000..87b5df25ef0
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01apds03.html
@@ -0,0 +1,32 @@
+<?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>How to Apply These Terms to Your New Programs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /><link rel="next" href="bk01ape.html" title="Appendix E. GNU Free Documentation License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">How to Apply These Terms to Your New Programs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds02.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01ape.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-3"></a>How to Apply These Terms to Your New Programs</h2></div></div></div><p>If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.</p><p>To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the “<span class="quote">copyright</span>†line and a pointer to where the full notice is found.</p><p>&lt;one line to give the program's name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;</p><p>This program 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 of the License, or
+ (at your option) any later version.</p><p>This program 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.</p><p>You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</p><p>Also add information on how to contact you by electronic and paper mail.</p><p>If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:</p><p>Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type “<span class="quote">show w</span>â€.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type “<span class="quote">show c</span>†for details.</p><p>The hypothetical commands “<span class="quote">show w</span>†and “<span class="quote">show c</span>†should
+ show the appropriate parts of the General Public License. Of course, the commands you
+ use may be called something other than “<span class="quote">show w</span>†and “<span class="quote">show c</span>â€;
+ they could even be mouse-clicks or menu items--whatever suits your program.</p><p>You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a “<span class="quote">copyright disclaimer</span>†for the program, if
+ necessary. Here is a sample; alter the names:</p><p>Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ “<span class="quote">Gnomovision</span>†(which makes passes at compilers) written by James Hacker.</p><p>&lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice</p><p>This General Public License does not permit incorporating your program into
+ proprietary programs. If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library. If this is what you want to do, use the GNU Library General
+ Public License instead of this License.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apds02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01apd.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01ape.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. GNU Free Documentation License</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01ape.html b/libstdc++-v3/doc/html/manual/bk01ape.html
new file mode 100644
index 00000000000..c5a021fe152
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01ape.html
@@ -0,0 +1,393 @@
+<?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 E. GNU Free Documentation License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. GNU Free Documentation License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds03.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="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.gfdl-1.2"></a>Appendix E. GNU Free Documentation License</h2></div></div></div><p>
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation,
+ <abbr class="abbrev">Inc.</abbr> 51 Franklin <abbr class="abbrev">St</abbr>, Fifth Floor,
+ Boston, <abbr class="abbrev">MA</abbr> 02110-1301 <abbr class="abbrev">USA</abbr>. Everyone is permitted to copy and
+ distribute verbatim copies of this license document, but changing it is
+ not allowed.
+ </p><h2><a id="Preamble"></a>
+ 0. PREAMBLE
+ </h2><p>
+ The purpose of this License is to make a manual, textbook, or other
+ functional and useful document "free" in the sense of freedom: to assure
+ everyone the effective freedom to copy and redistribute it, with or
+ without modifying it, either commercially or noncommercially.
+ Secondarily, this License preserves for the author and publisher a way to
+ get credit for their work, while not being considered responsible for
+ modifications made by others.
+ </p><p>
+ This License is a kind of "copyleft", which means that derivative works of
+ the document must themselves be free in the same sense. It complements
+ the GNU General Public License, which is a copyleft license designed for
+ free software.
+ </p><p>
+ We have designed this License in order to use it for manuals for free
+ software, because free software needs free documentation: a free program
+ should come with manuals providing the same freedoms that the software
+ does. But this License is not limited to software manuals; it can be used
+ for any textual work, regardless of subject matter or whether it is
+ published as a printed book. We recommend this License principally for
+ works whose purpose is instruction or reference.</p><h2><a id="Definitions"></a>
+ 1. APPLICABILITY AND DEFINITIONS
+ </h2><p>
+ This License applies to any manual or other work, in any medium, that
+ contains a notice placed by the copyright holder saying it can be
+ distributed under the terms of this License. Such a notice grants a
+ world-wide, royalty-free license, unlimited in duration, to use that work
+ under the conditions stated herein. The "Document", below, refers to any
+ such manual or work. Any member of the public is a licensee, and is
+ addressed as "you". You accept the license if you copy, modify or
+ distribute the work in a way requiring permission under copyright
+ law.
+ </p><p>
+ A "Modified Version" of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with modifications
+ and/or translated into another language.
+ </p><p>
+ A "Secondary Section" is a named appendix or a front-matter section of the
+ Document that deals exclusively with the relationship of the publishers or
+ authors of the Document to the Document's overall subject (or to related
+ matters) and contains nothing that could fall directly within that overall
+ subject. (Thus, if the Document is in part a textbook of mathematics, a
+ Secondary Section may not explain any mathematics.) The relationship
+ could be a matter of historical connection with the subject or with
+ related matters, or of legal, commercial, philosophical, ethical or
+ political position regarding them.
+ </p><p>
+ The "Invariant Sections" are certain Secondary Sections whose titles are
+ designated, as being those of Invariant Sections, in the notice that says
+ that the Document is released under this License. If a section does not
+ fit the above definition of Secondary then it is not allowed to be
+ designated as Invariant. The Document may contain zero Invariant
+ Sections. If the Document does not identify any Invariant Sections then
+ there are none.
+ </p><p>
+ The "Cover Texts" are certain short passages of text that are listed, as
+ Front-Cover Texts or Back-Cover Texts, in the notice that says that the
+ Document is released under this License. A Front-Cover Text may be at
+ most 5 words, and a Back-Cover Text may be at most 25 words.
+ </p><p>
+ A "Transparent" copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the general
+ public, that is suitable for revising the document straightforwardly with
+ generic text editors or (for images composed of pixels) generic paint
+ programs or (for drawings) some widely available drawing editor, and that
+ is suitable for input to text formatters or for automatic translation to a
+ variety of formats suitable for input to text formatters. A copy made in
+ an otherwise Transparent file format whose markup, or absence of markup,
+ has been arranged to thwart or discourage subsequent modification by
+ readers is not Transparent. An image format is not Transparent if used
+ for any substantial amount of text. A copy that is not "Transparent" is
+ called "Opaque".
+ </p><p>
+ Examples of suitable formats for Transparent copies include plain ASCII
+ without markup, Texinfo input format, LaTeX input format, SGML or XML
+ using a publicly available DTD, and standard-conforming simple HTML,
+ PostScript or PDF designed for human modification. Examples of
+ transparent image formats include PNG, XCF and JPG. Opaque formats
+ include proprietary formats that can be read and edited only by
+ proprietary word processors, SGML or XML for which the DTD and/or
+ processing tools are not generally available, and the machine-generated
+ HTML, PostScript or PDF produced by some word processors for output
+ purposes only.
+ </p><p>
+ The "Title Page" means, for a printed book, the title page itself, plus
+ such following pages as are needed to hold, legibly, the material this
+ License requires to appear in the title page. For works in formats which
+ do not have any title page as such, "Title Page" means the text near the
+ most prominent appearance of the work's title, preceding the beginning of
+ the body of the text.
+ </p><p>
+ A section "Entitled XYZ" means a named subunit of the Document whose title
+ either is precisely XYZ or contains XYZ in parentheses following text that
+ translates XYZ in another language. (Here XYZ stands for a specific
+ section name mentioned below, such as "Acknowledgements", "Dedications",
+ "Endorsements", or "History".) To "Preserve the Title" of such a section
+ when you modify the Document means that it remains a section "Entitled
+ XYZ" according to this definition.
+ </p><p>
+ The Document may include Warranty Disclaimers next to the notice which
+ states that this License applies to the Document. These Warranty
+ Disclaimers are considered to be included by reference in this License,
+ but only as regards disclaiming warranties: any other implication that
+ these Warranty Disclaimers may have is void and has no effect on the
+ meaning of this License.
+ </p><h2><a id="VerbatimCopying"></a>
+ 2. VERBATIM COPYING
+ </h2><p>
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the copyright
+ notices, and the license notice saying this License applies to the
+ Document are reproduced in all copies, and that you add no other
+ conditions whatsoever to those of this License. You may not use technical
+ measures to obstruct or control the reading or further copying of the
+ copies you make or distribute. However, you may accept compensation in
+ exchange for copies. If you distribute a large enough number of copies
+ you must also follow the conditions in section 3.
+ </p><p>
+ You may also lend copies, under the same conditions stated above, and you
+ may publicly display copies.
+ </p><h2><a id="QuantityCopying"></a>
+ 3. COPYING IN QUANTITY
+ </h2><p>
+ If you publish printed copies (or copies in media that commonly have
+ printed covers) of the Document, numbering more than 100, and the
+ Document's license notice requires Cover Texts, you must enclose the
+ copies in covers that carry, clearly and legibly, all these Cover Texts:
+ Front-Cover Texts on the front cover, and Back-Cover Texts on the back
+ cover. Both covers must also clearly and legibly identify you as the
+ publisher of these copies. The front cover must present the full title
+ with all words of the title equally prominent and visible. You may add
+ other material on the covers in addition. Copying with changes limited to
+ the covers, as long as they preserve the title of the Document and satisfy
+ these conditions, can be treated as verbatim copying in other
+ respects.
+ </p><p>
+ If the required texts for either cover are too voluminous to fit legibly,
+ you should put the first ones listed (as many as fit reasonably) on the
+ actual cover, and continue the rest onto adjacent pages.
+ </p><p>
+ If you publish or distribute Opaque copies of the Document numbering more
+ than 100, you must either include a machine-readable Transparent copy
+ along with each Opaque copy, or state in or with each Opaque copy a
+ computer-network location from which the general network-using public has
+ access to download using public-standard network protocols a complete
+ Transparent copy of the Document, free of added material. If you use the
+ latter option, you must take reasonably prudent steps, when you begin
+ distribution of Opaque copies in quantity, to ensure that this Transparent
+ copy will remain thus accessible at the stated location until at least one
+ year after the last time you distribute an Opaque copy (directly or
+ through your agents or retailers) of that edition to the public.
+ </p><p>
+ It is requested, but not required, that you contact the authors of the
+ Document well before redistributing any large number of copies, to give
+ them a chance to provide you with an updated version of the
+ Document.
+ </p><h2><a id="Modifications"></a>
+ 4. MODIFICATIONS
+ </h2><p>
+ You may copy and distribute a Modified Version of the Document under the
+ conditions of sections 2 and 3 above, provided that you release the
+ Modified Version under precisely this License, with the Modified Version
+ filling the role of the Document, thus licensing distribution and
+ modification of the Modified Version to whoever possesses a copy of it.
+ In addition, you must do these things in the Modified Version:
+ </p><div class="orderedlist"><ol type="A"><li>
+ Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions (which
+ should, if there were any, be listed in the History section of the
+ Document). You may use the same title as a previous version if the
+ original publisher of that version gives permission.
+ </li><li>
+ List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+ </li><li>
+ State on the Title page the name of the publisher of the Modified
+ Version, as the publisher.
+ </li><li>
+ Preserve all the copyright notices of the Document.
+ </li><li>
+ Add an appropriate copyright notice for your modifications adjacent to
+ the other copyright notices.
+ </li><li>
+ Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+ </li><li>
+ Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+ </li><li>
+ Include an unaltered copy of this License.
+ </li><li>
+ Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+ </li><li>
+ Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise the
+ network locations given in the Document for previous versions it was
+ based on. These may be placed in the "History" section. You may omit
+ a network location for a work that was published at least four years
+ before the Document itself, or if the original publisher of the
+ version it refers to gives permission.
+ </li><li>
+ For any section Entitled "Acknowledgements" or "Dedications", Preserve
+ the Title of the section, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements and/or
+ dedications given therein.
+ </li><li>
+ Preserve all the Invariant Sections of the Document, unaltered in
+ their text and in their titles. Section numbers or the equivalent are
+ not considered part of the section titles.
+ </li><li>
+ Delete any section Entitled "Endorsements". Such a section may not be
+ included in the Modified Version.
+ </li><li>
+ Do not retitle any existing section to be Entitled "Endorsements" or
+ to conflict in title with any Invariant Section.
+ </li><li>
+ Preserve any Warranty Disclaimers.
+ </li></ol></div><p>
+ If the Modified Version includes new front-matter sections or appendices
+ that qualify as Secondary Sections and contain no material copied from the
+ Document, you may at your option designate some or all of these sections
+ as invariant. To do this, add their titles to the list of Invariant
+ Sections in the Modified Version's license notice. These titles must be
+ distinct from any other section titles.
+ </p><p>
+ You may add a section Entitled "Endorsements", provided it contains
+ nothing but endorsements of your Modified Version by various parties--for
+ example, statements of peer review or that the text has been approved by
+ an organization as the authoritative definition of a standard.
+ </p><p>
+ You may add a passage of up to five words as a Front-Cover Text, and a
+ passage of up to 25 words as a Back-Cover Text, to the end of the list of
+ Cover Texts in the Modified Version. Only one passage of Front-Cover Text
+ and one of Back-Cover Text may be added by (or through arrangements made
+ by) any one entity. If the Document already includes a cover text for the
+ same cover, previously added by you or by arrangement made by the same
+ entity you are acting on behalf of, you may not add another; but you may
+ replace the old one, on explicit permission from the previous publisher
+ that added the old one.
+ </p><p>
+ The author(s) and publisher(s) of the Document do not by this License give
+ permission to use their names for publicity for or to assert or imply
+ endorsement of any Modified Version.
+ </p><h2><a id="Combining"></a>
+ 5. COMBINING DOCUMENTS
+ </h2><p>
+ You may combine the Document with other documents released under this
+ License, under the terms defined in section 4 above for modified versions,
+ provided that you include in the combination all of the Invariant Sections
+ of all of the original documents, unmodified, and list them all as
+ Invariant Sections of your combined work in its license notice, and that
+ you preserve all their Warranty Disclaimers.
+ </p><p>
+ The combined work need only contain one copy of this License, and multiple
+ identical Invariant Sections may be replaced with a single copy. If there
+ are multiple Invariant Sections with the same name but different contents,
+ make the title of each such section unique by adding at the end of it, in
+ parentheses, the name of the original author or publisher of that section
+ if known, or else a unique number. Make the same adjustment to the
+ section titles in the list of Invariant Sections in the license notice of
+ the combined work.
+ </p><p>
+ In the combination, you must combine any sections Entitled "History" in
+ the various original documents, forming one section Entitled "History";
+ likewise combine any sections Entitled "Acknowledgements", and any
+ sections Entitled "Dedications". You must delete all sections Entitled
+ "Endorsements".
+ </p><h2><a id="Collections"></a>
+ 6. COLLECTIONS OF DOCUMENTS
+ </h2><p>
+ You may make a collection consisting of the Document and other documents
+ released under this License, and replace the individual copies of this
+ License in the various documents with a single copy that is included in
+ the collection, provided that you follow the rules of this License for
+ verbatim copying of each of the documents in all other respects.
+ </p><p>
+ You may extract a single document from such a collection, and distribute
+ it individually under this License, provided you insert a copy of this
+ License into the extracted document, and follow this License in all other
+ respects regarding verbatim copying of that document.
+ </p><h2><a id="Aggregation"></a>
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+ </h2><p>
+ A compilation of the Document or its derivatives with other separate and
+ independent documents or works, in or on a volume of a storage or
+ distribution medium, is called an "aggregate" if the copyright resulting
+ from the compilation is not used to limit the legal rights of the
+ compilation's users beyond what the individual works permit. When the
+ Document is included in an aggregate, this License does not apply to the
+ other works in the aggregate which are not themselves derivative works of
+ the Document.
+ </p><p>
+ If the Cover Text requirement of section 3 is applicable to these copies
+ of the Document, then if the Document is less than one half of the entire
+ aggregate, the Document's Cover Texts may be placed on covers that bracket
+ the Document within the aggregate, or the electronic equivalent of covers
+ if the Document is in electronic form. Otherwise they must appear on
+ printed covers that bracket the whole aggregate.
+ </p><h2><a id="Translation"></a>
+ 8. TRANSLATION
+ </h2><p>
+ Translation is considered a kind of modification, so you may distribute
+ translations of the Document under the terms of section 4. Replacing
+ Invariant Sections with translations requires special permission from
+ their copyright holders, but you may include translations of some or all
+ Invariant Sections in addition to the original versions of these Invariant
+ Sections. You may include a translation of this License, and all the
+ license notices in the Document, and any Warranty Disclaimers, provided
+ that you also include the original English version of this License and the
+ original versions of those notices and disclaimers. In case of a
+ disagreement between the translation and the original version of this
+ License or a notice or disclaimer, the original version will prevail.
+ </p><p>
+ If a section in the Document is Entitled "Acknowledgements",
+ "Dedications", or "History", the requirement (section 4) to Preserve its
+ Title (section 1) will typically require changing the actual title.
+ </p><h2><a id="Termination"></a>
+ 9. TERMINATION
+ </h2><p>
+ You may not copy, modify, sublicense, or distribute the Document except as
+ expressly provided for under this License. Any other attempt to copy,
+ modify, sublicense or distribute the Document is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will not
+ have their licenses terminated so long as such parties remain in full
+ compliance.
+ </p><h2><a id="FutureRevisions"></a>
+ 10. FUTURE REVISIONS OF THIS LICENSE
+ </h2><p>
+ The Free Software Foundation may publish new, revised versions of the GNU
+ Free Documentation License from time to time. Such new versions will be
+ similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns. See <a class="ulink" href="http://www.gnu.org/copyleft/" target="_top">http://www.gnu.org/copyleft/</a>.
+ </p><p>
+ Each version of the License is given a distinguishing version number. If
+ the Document specifies that a particular numbered version of this License
+ "or any later version" applies to it, you have the option of following the
+ terms and conditions either of that specified version or of any later
+ version that has been published (not as a draft) by the Free Software
+ Foundation. If the Document does not specify a version number of this
+ License, you may choose any version ever published (not as a draft) by the
+ Free Software Foundation.
+ </p><h2><a id="HowToUse"></a>
+ ADDENDUM: How to use this License for your documents
+ </h2><p>
+ To use this License in a document you have written, include a copy of the
+ License in the document and put the following copyright and license
+ notices just after the title page:
+ </p><div class="blockquote"><blockquote class="blockquote"><p>
+ Copyright (C) YEAR YOUR NAME.
+ </p><p>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2 or
+ any later version published by the Free Software Foundation; with no
+ Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
+ copy of the license is included in the section entitled "GNU Free
+ Documentation License".
+ </p></blockquote></div><p>
+ If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+ replace the "with...Texts." line with this:
+ </p><div class="blockquote"><blockquote class="blockquote"><p>
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ </p></blockquote></div><p>
+ If you have Invariant Sections without Cover Texts, or some other
+ combination of the three, merge those two alternatives to suit the
+ situation.
+ </p><p>
+ If your document contains nontrivial examples of program code, we
+ recommend releasing these examples in parallel under your choice of free
+ software license, such as the GNU General Public License, to permit their
+ use in free software.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apds03.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="../bk02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">How to Apply These Terms to Your New Programs </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/bk01pt01ch01.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html
new file mode 100644
index 00000000000..ab5c04569e7
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html
@@ -0,0 +1,6131 @@
+<?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 1. Status</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01pt01ch01s02.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="bk01pt01ch01s02.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="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.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.standard"></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="manual.intro.status.standard.1998"></a>C++ 1998</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="standard.1998"></a>Checklist</h4></div></div></div><div class="literallayout"><p><br />
+   Completion Checklist for the Standard C++ Library<br />
+   Updated: 2003-04-25<br />
+<br />
+   Status Code Legend:<br />
+    M - Missing<br />
+    S - Present as stub.<br />
+    X - Partially implemented, or buggy.<br />
+    T - Implemented, pending test/inspection.<br />
+    V - Verified to pass all available test suites.<br />
+    Q - Qualified by inspection for non-testable correctness.<br />
+    P - Portability verified.<br />
+    C - Certified.<br />
+<br />
+   Lexical notes:<br />
+   Only status codes appear in column 0.  Notes relating to conformance<br />
+   issues appear [in brackets].<br />
+<br />
+   Note that this checklist does not (yet) include all emendations<br />
+   recommended by the ISO Library Working Group:<br />
+   http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html<br />
+<br />
+   Detailed explanation of status codes:<br />
+<br />
+    M - Missing:  The name is not visible to programs that include<br />
+        the specified header, either at compile or link stage.<br />
+<br />
+    S - Present as stub:  A program can use the name, but no implementation<br />
+        is provided.  Programs that use the name link correctly, but<br />
+        cannot usefully be run.<br />
+<br />
+    X - Partially implemented, or buggy:  Some implementation has been<br />
+        provided, but it is known or believed not to conform fully.<br />
+        It may have an incorrect base class, wrong namespace, wrong<br />
+        storage class, or simply not fully implement requirements.<br />
+        However, it may be sufficiently usable to help test other<br />
+        components.<br />
+<br />
+    T - Implemented, pending test/inspection:  Implementation believed<br />
+        to be complete, and informal testing suggests it is ready for<br />
+        formal verification.<br />
+<br />
+    V - Verified, passes all test suites:  Verified to satisfy all<br />
+        generically testable conformance requirements.<br />
+<br />
+    Q - Qualified by inspection for non-testable correctness:<br />
+        Inspected, "implementation-defined" documentation accepted,<br />
+        local usability criteria satisfied, formally inspected for<br />
+        other untestable conformance.  (Untestable requirements<br />
+        include exception-safety, thread-safety, worst-case<br />
+        complexity, memory cleanliness, usefulness.)<br />
+<br />
+    P - Portability verified:  Qualified on all primary target platforms.<br />
+<br />
+    C - Certified:  Formally certified to have passed all tests,<br />
+        inspections, qualifications; approved under "signing authority"<br />
+        to be used to satisfy contractual guarantees.<br />
+<br />
+   ----------------------------------------------------------------------<br />
+       &lt;algorithm&gt;    &lt;iomanip&gt;    &lt;list&gt;      &lt;ostream&gt;     &lt;streambuf&gt;<br />
+       &lt;bitset&gt;       &lt;ios&gt;        &lt;locale&gt;    &lt;queue&gt;       &lt;string&gt;<br />
+       &lt;complex&gt;      &lt;iosfwd&gt;     &lt;map&gt;       &lt;set&gt;         &lt;typeinfo&gt;<br />
+X      &lt;deque&gt;        &lt;iostream&gt;   &lt;memory&gt;    &lt;sstream&gt;     &lt;utility&gt;<br />
+       &lt;exception&gt;    &lt;istream&gt;    &lt;new&gt;       &lt;stack&gt;       &lt;valarray&gt;<br />
+       &lt;fstream&gt;      &lt;iterator&gt;   &lt;numeric&gt;   &lt;stdexcept&gt;   &lt;vector&gt;<br />
+       &lt;functional&gt;   &lt;limits&gt;<br />
+<br />
+   [C header names must be in std:: to qualify.  Related to shadow/ dir.]<br />
+           &lt;cassert&gt; &lt;ciso646&gt; &lt;csetjmp&gt; &lt;cstdio&gt;  &lt;ctime&gt;<br />
+           &lt;cctype&gt;  &lt;climits&gt; &lt;csignal&gt; &lt;cstdlib&gt; &lt;cwchar&gt;<br />
+X          &lt;cerrno&gt;  &lt;clocale&gt; &lt;cstdarg&gt; &lt;cstring&gt; &lt;cwctype&gt;<br />
+           &lt;cfloat&gt;  &lt;cmath&gt;   &lt;cstddef&gt;<br />
+<br />
+    Macro:<br />
+X   errno,  declared  or  defined in &lt;cerrno&gt;.<br />
+<br />
+    Macro fn:<br />
+X   setjmp(jmp_buf), declared or defined in &lt;csetjmp&gt;<br />
+X   va_end(va_list), declared or defined in &lt;cstdarg&gt;<br />
+<br />
+    Types:<br />
+X   clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,<br />
+X   ptrdiff_t, sig_atomic_t, size_t,  time_t,  tm,  va_list,<br />
+X   wctrans_t, wctype_t, and wint_t.<br />
+<br />
+   1 Which  of  the functions in the C++ Standard Library are not reentrant<br />
+    subroutines is implementation-defined.<br />
+<br />
+   18.1  Types                                        [lib.support.types]<br />
+X      &lt;cstddef&gt;<br />
+X      NULL<br />
+X      offsetof<br />
+X      ptrdiff_t<br />
+X      size_t<br />
+<br />
+   18.2  Implementation properties                   [lib.support.limits]<br />
+<br />
+    &lt;limits&gt;, &lt;climits&gt;, and &lt;cfloat&gt;<br />
+<br />
+   18.2.1  Numeric limits                                    [lib.limits]<br />
+<br />
+X   template&lt;class T&gt; class numeric_limits;<br />
+<br />
+T   enum float_round_style;<br />
+T   enum float_denorm_style;<br />
+<br />
+T   template&lt;&gt; class numeric_limits&lt;bool&gt;;<br />
+<br />
+T   template&lt;&gt; class numeric_limits&lt;char&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;signed char&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;unsigned char&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;wchar_t&gt;;<br />
+<br />
+T   template&lt;&gt; class numeric_limits&lt;short&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;int&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;long&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;unsigned short&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;unsigned int&gt;;<br />
+T   template&lt;&gt; class numeric_limits&lt;unsigned long&gt;;<br />
+<br />
+X   template&lt;&gt; class numeric_limits&lt;float&gt;;<br />
+X   template&lt;&gt; class numeric_limits&lt;double&gt;;<br />
+X   template&lt;&gt; class numeric_limits&lt;long double&gt;;<br />
+<br />
+   18.2.1.1  Template class numeric_limits           [lib.numeric.limits]<br />
+T   template&lt;class T&gt; class numeric_limits {<br />
+    public:<br />
+T     static const bool is_specialized = false;<br />
+T     static T min() throw();<br />
+T     static T max() throw();<br />
+T     static const int  digits = 0;<br />
+T     static const int  digits10 = 0;<br />
+T     static const bool is_signed = false;<br />
+T     static const bool is_integer = false;<br />
+T     static const bool is_exact = false;<br />
+T     static const int  radix = 0;<br />
+T     static T epsilon() throw();<br />
+T     static T round_error() throw();<br />
+<br />
+T     static const int  min_exponent = 0;<br />
+T     static const int  min_exponent10 = 0;<br />
+T     static const int  max_exponent = 0;<br />
+T     static const int  max_exponent10 = 0;<br />
+<br />
+T     static const bool has_infinity = false;<br />
+T     static const bool has_quiet_NaN = false;<br />
+T     static const bool has_signaling_NaN = false;<br />
+T     static const float_denorm_style has_denorm = denorm_absent;<br />
+T     static const bool has_denorm_loss = false;<br />
+T     static T infinity() throw();<br />
+T     static T quiet_NaN() throw();<br />
+T     static T signaling_NaN() throw();<br />
+T     static T denorm_min() throw();<br />
+<br />
+T     static const bool is_iec559 = false;<br />
+T     static const bool is_bounded = false;<br />
+T     static const bool is_modulo = false;<br />
+<br />
+T     static const bool traps = false;<br />
+T     static const bool tinyness_before = false;<br />
+T     static const float_round_style round_style = round_toward_zero;<br />
+    };<br />
+<br />
+   18.2.1.3  Type float_round_style                     [lib.round.style]<br />
+<br />
+T   enum float_round_style {<br />
+T     round_indeterminate       = -1,<br />
+T     round_toward_zero         =  0,<br />
+T     round_to_nearest          =  1,<br />
+T     round_toward_infinity     =  2,<br />
+T     round_toward_neg_infinity =  3<br />
+    };<br />
+<br />
+   18.2.1.4  Type float_denorm_style                   [lib.denorm.style]<br />
+<br />
+T   enum float_denorm_style {<br />
+T     denorm_indeterminate = -1;<br />
+T     denorm_absent = 0;<br />
+T     denorm present = 1;<br />
+    };<br />
+<br />
+   18.2.1.5  numeric_limits specializations         [lib.numeric.special]<br />
+   <br />
+   [Note: see Note at 18.2.1.  ]<br />
+<br />
+   18.2.2  C Library                                       [lib.c.limits]<br />
+<br />
+   1 Header &lt;climits&gt; (Table 3):<br />
+      CHAR_BIT   INT_MAX    LONG_MIN     SCHAR_MIN   UCHAR_MAX   USHRT_MAX<br />
+X     CHAR_MAX   INT_MIN    MB_LEN_MAX   SHRT_MAX    UINT_MAX<br />
+      CHAR_MIN   LONG_MAX   SCHAR_MAX    SHRT_MIN    ULONG_MAX<br />
+<br />
+   3 Header &lt;cfloat&gt; (Table 4):<br />
+<br />
+    DBL_DIG          DBL_MIN_EXP      FLT_MIN_10_EXP   LDBL_MAX_10_EXP<br />
+    DBL_EPSILON      FLT_DIG          FLT_MIN_EXP      LDBL_MAX_EXP<br />
+    DBL_MANT_DIG     FLT_EPSILON      FLT_RADIX        LDBL_MIN<br />
+X   DBL_MAX          FLT_MANT_DIG     FLT_ROUNDS       LDBL_MIN_10_EXP<br />
+    DBL_MAX_10_EXP   FLT_MAX          LDBL_DIG         LDBL_MIN_EXP<br />
+    DBL_MAX_EXP      FLT_MAX_10_EXP   LDBL_EPSILON<br />
+    DBL_MIN          FLT_MAX_EXP      LDBL_MANT_DIG<br />
+    DBL_MIN_10_EXP   FLT_MIN          LDBL_MAX<br />
+<br />
+<br />
+        1 Header &lt;cstdlib&gt; (partial), Table 5:<br />
+X             EXIT_FAILURE     EXIT_SUCCESS<br />
+              abort   atexit   exit<br />
+<br />
+S    abort(void)<br />
+S    extern "C" int atexit(void (*f)(void))<br />
+S    extern "C++" int atexit(void (*f)(void))<br />
+S    exit(int status)<br />
+<br />
+   18.4  Dynamic memory management                  [lib.support.dynamic]<br />
+<br />
+   Header &lt;new&gt; synopsis<br />
+<br />
+T    class bad_alloc;<br />
+T    struct nothrow_t {};<br />
+T    extern const nothrow_t nothrow;<br />
+T    typedef void (*new_handler)();<br />
+T    new_handler set_new_handler(new_handler new_p) throw();<br />
+<br />
+T    void* operator new(std::size_t size) throw(std::bad_alloc);<br />
+T    void* operator new(std::size_t size, const std::nothrow_t&amp;) throw();<br />
+T    void  operator delete(void* ptr) throw();<br />
+T    void  operator delete(void* ptr, const std::nothrow_t&amp;) throw();<br />
+T    void* operator new[](std::size_t size) throw(std::bad_alloc);<br />
+T    void* operator new[](std::size_t size, const std::nothrow_t&amp;) throw();<br />
+T    void  operator delete[](void* ptr) throw();<br />
+T    void  operator delete[](void* ptr, const std::nothrow_t&amp;) throw();<br />
+T    void* operator new  (std::size_t size, void* ptr) throw();<br />
+T    void* operator new[](std::size_t size, void* ptr) throw();<br />
+T    void  operator delete  (void* ptr, void*) throw();<br />
+T    void  operator delete[](void* ptr, void*) throw();<br />
+<br />
+   18.4.2.1  Class bad_alloc                              [lib.bad.alloc]<br />
+<br />
+T   class bad_alloc : public exception {<br />
+    public:<br />
+T     bad_alloc() throw();<br />
+T     bad_alloc(const bad_alloc&amp;) throw();<br />
+T     bad_alloc&amp; operator=(const bad_alloc&amp;) throw();<br />
+T     virtual ~bad_alloc() throw();<br />
+T     virtual const char* what() const throw();<br />
+<br />
+<br />
+<br />
+T  new_handler set_new_handler(new_handler new_p) throw();<br />
+<br />
+<br />
+     Header &lt;typeinfo&gt; synopsis<br />
+<br />
+T    class type_info;<br />
+T    class bad_cast;<br />
+T    class bad_typeid;<br />
+<br />
+   18.5.1 - Class type_info [lib.type.info]<br />
+<br />
+T    class type_info {<br />
+    public:<br />
+T      virtual ~type_info();<br />
+T      bool operator==(const type_info&amp; rhs) const;<br />
+T      bool operator!=(const type_info&amp; rhs) const;<br />
+T      bool before(const type_info&amp; rhs) const;<br />
+T      const char* name() const;<br />
+    private:<br />
+T      type_info(const type_info&amp; rhs);<br />
+T      type_info&amp; operator=(const type_info&amp; rhs);<br />
+    };<br />
+<br />
+   18.5.2 - Class bad_cast [lib.bad.cast]<br />
+<br />
+T  bad_cast() throw();<br />
+T  virtual const char* bad_cast::what() const throw();<br />
+<br />
+   18.5.3  Class bad_typeid                              [lib.bad.typeid]<br />
+<br />
+T    class bad_typeid : public exception {<br />
+    public:<br />
+T      bad_typeid() throw();<br />
+T      bad_typeid(const bad_typeid&amp;) throw();<br />
+T      bad_typeid&amp; operator=(const bad_typeid&amp;) throw();<br />
+T      virtual ~bad_typeid() throw();<br />
+T      virtual const char* what() const throw();<br />
+    };<br />
+<br />
+   18.6  Exception handling                       [lib.support.exception]<br />
+<br />
+T      Header &lt;exception&gt; synopsis<br />
+<br />
+T    class exception;<br />
+T    class bad_exception;<br />
+<br />
+T    typedef void (*unexpected_handler)();<br />
+T    unexpected_handler set_unexpected(unexpected_handler f) throw();<br />
+T    void unexpected();<br />
+T    typedef void (*terminate_handler)();<br />
+T    terminate_handler set_terminate(terminate_handler f) throw();<br />
+T    void terminate();<br />
+T    bool uncaught_exception();<br />
+<br />
+   18.6.1  Class exception                                [lib.exception]<br />
+<br />
+T    class exception {<br />
+     public:<br />
+T      exception() throw();<br />
+T      exception(const exception&amp;) throw();<br />
+T      exception&amp; operator=(const exception&amp;) throw();<br />
+T      virtual ~exception() throw();<br />
+T      virtual const char* what() const throw();<br />
+    };<br />
+<br />
+   18.6.2.1  Class bad_exception                      [lib.bad.exception]<br />
+T    class bad_exception : public exception {<br />
+    public:<br />
+T      bad_exception() throw();<br />
+T      bad_exception(const bad_exception&amp;) throw();<br />
+T      bad_exception&amp; operator=(const bad_exception&amp;) throw();<br />
+T      virtual ~bad_exception() throw();<br />
+T      virtual const char* what() const throw();<br />
+    };<br />
+<br />
+   18.7  Other runtime support                      [lib.support.runtime]<br />
+<br />
+   1 Headers &lt;cstdarg&gt; (variable arguments),  &lt;csetjmp&gt;  (nonlocal  jumps),<br />
+    &lt;ctime&gt;  (system  clock clock(), time()), &lt;csignal&gt; (signal handling),<br />
+    and &lt;cstdlib&gt; (runtime environment getenv(), system()).<br />
+<br />
+                    Table 6--Header &lt;cstdarg&gt; synopsis<br />
+                 Macros:   va_arg    va_end   va_start<br />
+X                Type:     va_list<br />
+<br />
+                    Table 7--Header &lt;csetjmp&gt; synopsis<br />
+<br />
+                          Macro:      setjmp |<br />
+X                         Type:       jmp_buf<br />
+                          Function:   longjmp<br />
+<br />
+                     Table 8--Header &lt;ctime&gt; synopsis<br />
+<br />
+                      Macros:      CLOCKS_PER_SEC<br />
+X                     Types:       clock_t<br />
+                      Functions:   clock<br />
+<br />
+                    Table 9--Header &lt;csignal&gt; synopsis<br />
+<br />
+X        Macros:      SIGABRT        SIGILL   SIGSEGV   SIG_DFL<br />
+         SIG_IGN      SIGFPE         SIGINT   SIGTERM   SIG_ERR<br />
+         Type:        sig_atomic_t<br />
+         Functions:   raise          signal<br />
+<br />
+                   Table 10--Header &lt;cstdlib&gt; synopsis<br />
+<br />
+X                     Functions:   getenv   system<br />
+<br />
+   19.1  Exception classes                           [lib.std.exceptions]<br />
+<br />
+   Header &lt;stdexcept&gt; synopsis<br />
+<br />
+T     class logic_error;<br />
+T     class domain_error;<br />
+T     class invalid_argument;<br />
+T     class length_error;<br />
+T     class out_of_range;<br />
+T     class runtime_error;<br />
+T     class range_error;<br />
+T     class overflow_error;<br />
+T     class underflow_error;<br />
+<br />
+   19.1.1  Class logic_error                            [lib.logic.error]<br />
+T   class logic_error : public exception {<br />
+    public:<br />
+T     explicit logic_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+   19.1.2  Class domain_error                          [lib.domain.error]<br />
+<br />
+T   class domain_error : public logic_error {<br />
+    public:<br />
+T     explicit domain_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+   19.1.3  Class invalid_argument                  [lib.invalid.argument]<br />
+<br />
+T   class invalid_argument : public logic_error {<br />
+    public:<br />
+T     explicit invalid_argument(const string&amp; what_arg);<br />
+    };<br />
+<br />
+   19.1.4  Class length_error                          [lib.length.error]<br />
+<br />
+T   class length_error : public logic_error {<br />
+    public:<br />
+T     explicit length_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+   19.1.5  Class out_of_range                          [lib.out.of.range]<br />
+<br />
+T   class out_of_range : public logic_error {<br />
+    public:<br />
+T     explicit out_of_range(const string&amp; what_arg);<br />
+    };<br />
+<br />
+<br />
+   19.1.6  Class runtime_error                        [lib.runtime.error]<br />
+<br />
+T   class runtime_error : public exception {<br />
+    public:<br />
+T     explicit runtime_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+<br />
+   19.1.7  Class range_error                            [lib.range.error]<br />
+<br />
+T   class range_error : public runtime_error {<br />
+    public:<br />
+T     explicit range_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+   19.1.8  Class overflow_error                      [lib.overflow.error]<br />
+<br />
+T   class overflow_error : public runtime_error {<br />
+    public:<br />
+T     explicit overflow_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+<br />
+   19.1.9  Class underflow_error                    [lib.underflow.error]<br />
+<br />
+T   class underflow_error : public runtime_error {<br />
+    public:<br />
+T     explicit underflow_error(const string&amp; what_arg);<br />
+    };<br />
+<br />
+<br />
+   19.2  Assertions                                      [lib.assertions]<br />
+<br />
+                    Table 2--Header &lt;cassert&gt; synopsis<br />
+<br />
+X                         Macro:   assert<br />
+<br />
+   19.3  Error numbers                                        [lib.errno]<br />
+<br />
+                    Table 3--Header &lt;cerrno&gt; synopsis<br />
+<br />
+X                    |Macros:   EDOM   ERANGE   errno |<br />
+<br />
+<br />
+   20.2  Utility components                                 [lib.utility]<br />
+<br />
+   Header &lt;utility&gt; synopsis<br />
+<br />
+    // _lib.operators_, operators:<br />
+T    namespace rel_ops {<br />
+T      template&lt;class T&gt; bool operator!=(const T&amp;, const T&amp;);<br />
+T      template&lt;class T&gt; bool operator&gt; (const T&amp;, const T&amp;);<br />
+T      template&lt;class T&gt; bool operator&lt;=(const T&amp;, const T&amp;);<br />
+T      template&lt;class T&gt; bool operator&gt;=(const T&amp;, const T&amp;);<br />
+    }<br />
+    // _lib.pairs_, pairs:<br />
+T   template &lt;class T1, class T2&gt; struct pair;<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator==(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator&lt; (const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator!=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator&gt; (const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator&gt;=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt;<br />
+      bool operator&lt;=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);<br />
+T   template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(const T1&amp;, const T2&amp;);<br />
+<br />
+<br />
+   20.2.2  Pairs                                              [lib.pairs]<br />
+<br />
+T  template &lt;class T1, class T2&gt;<br />
+   struct pair {<br />
+T    typedef T1 first_type;<br />
+T    typedef T2 second_type;<br />
+<br />
+T    T1 first;<br />
+T    T2 second;<br />
+T    pair();<br />
+T    pair(const T1&amp; x, const T2&amp; y);<br />
+T    template&lt;class U, class V&gt; pair(const pair&lt;U, V&gt; &amp;p);<br />
+   };<br />
+<br />
+   20.3  Function objects                          [lib.function.objects]<br />
+<br />
+   Header &lt;functional&gt; synopsis<br />
+<br />
+    // _lib.base_, base:<br />
+V   template &lt;class Arg, class Result&gt; struct unary_function;<br />
+V   template &lt;class Arg1, class Arg2, class Result&gt; struct binary_function;<br />
+<br />
+    // _lib.arithmetic.operations_, arithmetic operations:<br />
+V   template &lt;class T&gt; struct plus;<br />
+V   template &lt;class T&gt; struct minus;<br />
+V   template &lt;class T&gt; struct multiplies;<br />
+V   template &lt;class T&gt; struct divides;<br />
+V   template &lt;class T&gt; struct modulus;<br />
+V   template &lt;class T&gt; struct negate;<br />
+    // _lib.comparisons_, comparisons:<br />
+V   template &lt;class T&gt; struct equal_to;<br />
+V   template &lt;class T&gt; struct not_equal_to;<br />
+V   template &lt;class T&gt; struct greater;<br />
+V   template &lt;class T&gt; struct less;<br />
+V   template &lt;class T&gt; struct greater_equal;<br />
+V   template &lt;class T&gt; struct less_equal;<br />
+    // _lib.logical.operations_, logical operations:<br />
+V   template &lt;class T&gt; struct logical_and;<br />
+V   template &lt;class T&gt; struct logical_or;<br />
+V   template &lt;class T&gt; struct logical_not;<br />
+    // _lib.negators_, negators:<br />
+    template &lt;class Predicate&gt; struct unary_negate;<br />
+V   template &lt;class Predicate&gt;<br />
+      unary_negate&lt;Predicate&gt;  not1(const Predicate&amp;);<br />
+V   template &lt;class Predicate&gt; struct binary_negate;<br />
+V   template &lt;class Predicate&gt;<br />
+      binary_negate&lt;Predicate&gt; not2(const Predicate&amp;);<br />
+    // _lib.binders_, binders:<br />
+V   template &lt;class Operation&gt;  class binder1st;<br />
+V   template &lt;class Operation, class T&gt;<br />
+      binder1st&lt;Operation&gt; bind1st(const Operation&amp;, const T&amp;);<br />
+V   template &lt;class Operation&gt; class binder2nd;<br />
+V   template &lt;class Operation, class T&gt;<br />
+      binder2nd&lt;Operation&gt; bind2nd(const Operation&amp;, const T&amp;);<br />
+    // _lib.function.pointer.adaptors_, adaptors:<br />
+V   template &lt;class Arg, class Result&gt; class pointer_to_unary_function;<br />
+V   template &lt;class Arg, class Result&gt;<br />
+      pointer_to_unary_function&lt;Arg,Result&gt; ptr_fun(Result (*)(Arg));<br />
+V   template &lt;class Arg1, class Arg2, class Result&gt;<br />
+      class pointer_to_binary_function;<br />
+V   template &lt;class Arg1, class Arg2, class Result&gt;<br />
+      pointer_to_binary_function&lt;Arg1,Arg2,Result&gt;<br />
+        ptr_fun(Result (*)(Arg1,Arg2));<br />
+<br />
+    // _lib.member.pointer.adaptors_, adaptors:<br />
+V   template&lt;class S, class T&gt; class mem_fun_t;<br />
+V   template&lt;class S, class T, class A&gt; class mem_fun1_t;<br />
+V   template&lt;class S, class T&gt;<br />
+        mem_fun_t&lt;S,T&gt; mem_fun(S (T::*f)());<br />
+V   template&lt;class S, class T, class A&gt;<br />
+        mem_fun1_t&lt;S,T,A&gt; mem_fun(S (T::*f)(A));<br />
+V   template&lt;class S, class T&gt; class mem_fun_ref_t;<br />
+V   template&lt;class S, class T, class A&gt; class mem_fun1_ref_t;<br />
+V   template&lt;class S, class T&gt;<br />
+        mem_fun_ref_t&lt;S,T&gt; mem_fun_ref(S (T::*f)());<br />
+V   template&lt;class S, class T, class A&gt;<br />
+        mem_fun1_ref_t&lt;S,T,A&gt; mem_fun_ref(S (T::*f)(A));<br />
+<br />
+V   template &lt;class S, class T&gt; class const_mem_fun_t;<br />
+V   template &lt;class S, class T, class A&gt; class const_mem_fun1_t;<br />
+V   template &lt;class S, class T&gt;<br />
+      const_mem_fun_t&lt;S,T&gt; mem_fun(S (T::*f)() const);<br />
+V   template &lt;class S, class T, class A&gt;<br />
+      const_mem_fun1_t&lt;S,T,A&gt; mem_fun(S (T::*f)(A) const);<br />
+V   template &lt;class S, class T&gt; class const_mem_fun_ref_t;<br />
+V   template &lt;class S, class T, class A&gt; class const_mem_fun1_ref_t;<br />
+V   template &lt;class S, class T&gt;<br />
+      const_mem_fun_ref_t&lt;S,T&gt; mem_fun_ref(S (T::*f)() const);<br />
+V   template &lt;class S, class T, class A&gt;<br />
+      const_mem_fun1_ref_t&lt;S,T,A&gt; mem_fun_ref(S (T::*f)(A) const);<br />
+   }<br />
+<br />
+   20.3.1  Base                                                [lib.base]<br />
+<br />
+V   template &lt;class Arg, class Result&gt;<br />
+    struct unary_function {<br />
+V     typedef Arg    argument_type;<br />
+V     typedef Result result_type;<br />
+    };<br />
+V   template &lt;class Arg1, class Arg2, class Result&gt;<br />
+    struct binary_function {<br />
+V     typedef Arg1   first_argument_type;<br />
+V     typedef Arg2   second_argument_type;<br />
+V     typedef Result result_type;<br />
+    };<br />
+<br />
+   20.3.2  Arithmetic operations              [lib.arithmetic.operations]<br />
+<br />
+T  template &lt;class T&gt; struct plus : binary_function&lt;T,T,T&gt; {<br />
+V   T operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct minus : binary_function&lt;T,T,T&gt; {<br />
+V   T operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct multiplies : binary_function&lt;T,T,T&gt; {<br />
+V   T operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct divides : binary_function&lt;T,T,T&gt; {<br />
+V   T operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct modulus : binary_function&lt;T,T,T&gt; {<br />
+V   T operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct negate : unary_function&lt;T,T&gt; {<br />
+V   T operator()(const T&amp; x) const;<br />
+   };<br />
+<br />
+   20.3.3  Comparisons                                  [lib.comparisons]<br />
+<br />
+T  template &lt;class T&gt; struct equal_to : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct not_equal_to : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct greater : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct less : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct greater_equal : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct less_equal : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+   20.3.4  Logical operations                    [lib.logical.operations]<br />
+<br />
+T  template &lt;class T&gt; struct logical_and : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct logical_or : binary_function&lt;T,T,bool&gt; {<br />
+V   bool operator()(const T&amp; x, const T&amp; y) const;<br />
+   };<br />
+<br />
+T  template &lt;class T&gt; struct logical_not : unary_function&lt;T,bool&gt; {<br />
+V   bool operator()(const T&amp; x) const;<br />
+   };<br />
+<br />
+   20.3.5  Negators                                        [lib.negators]<br />
+<br />
+T  template &lt;class Predicate&gt;<br />
+    class unary_negate<br />
+      : public unary_function&lt;typename Predicate::argument_type,bool&gt; {<br />
+   public:<br />
+T   explicit unary_negate(const Predicate&amp; pred);<br />
+V   bool operator()(const typename Predicate::argument_type&amp; x) const;<br />
+   };<br />
+<br />
+T  template &lt;class Predicate&gt;<br />
+    class binary_negate<br />
+      : public binary_function&lt;typename Predicate::first_argument_type,<br />
+          typename Predicate::second_argument_type, bool&gt; {<br />
+    public:<br />
+T     explicit binary_negate(const Predicate&amp; pred);<br />
+V     bool operator()(const typename Predicate::first_argument_type&amp;  x,<br />
+          const typename Predicate::second_argument_type&amp; y) const;<br />
+    };<br />
+<br />
+<br />
+   20.3.6  Binders                                          [lib.binders]<br />
+<br />
+   20.3.6.1  Template class binder1st                    [lib.binder.1st]<br />
+T   template &lt;class Operation&gt;<br />
+    class binder1st<br />
+      : public unary_function&lt;typename Operation::second_argument_type,<br />
+                              typename Operation::result_type&gt; {<br />
+    protected:<br />
+T     Operation                      op;<br />
+T     typename Operation::first_argument_type value;<br />
+    public:<br />
+V     binder1st(const Operation&amp; x,<br />
+                const typename Operation::first_argument_type&amp; y);<br />
+V     typename Operation::result_type<br />
+        operator()(const typename Operation::second_argument_type&amp; x) const;<br />
+    };<br />
+<br />
+   20.3.6.2  bind1st                                       [lib.bind.1st]<br />
+<br />
+V  template &lt;class Operation, class T&gt;<br />
+    binder1st&lt;Operation&gt; bind1st(const Operation&amp; op, const T&amp; x);<br />
+<br />
+   20.3.6.3  Template class binder2nd                    [lib.binder.2nd]<br />
+T   template &lt;class Operation&gt;<br />
+    class binder2nd<br />
+      : public unary_function&lt;typename Operation::first_argument_type,<br />
+                              typename Operation::result_type&gt; {<br />
+    protected:<br />
+T     Operation                       op;<br />
+T     typename Operation::second_argument_type value;<br />
+    public:<br />
+V     binder2nd(const Operation&amp; x,<br />
+                const typename Operation::second_argument_type&amp; y);<br />
+V     typename Operation::result_type<br />
+        operator()(const typename Operation::first_argument_type&amp; x) const;<br />
+    };<br />
+<br />
+   20.3.6.4  bind2nd                                       [lib.bind.2nd]<br />
+<br />
+T  template &lt;class Operation, class T&gt;<br />
+    binder2nd&lt;Operation&gt; bind2nd(const Operation&amp; op, const T&amp; x);<br />
+<br />
+<br />
+   20.3.7  Adaptors for pointers to       [lib.function.pointer.adaptors]<br />
+       functions<br />
+<br />
+   1 To  allow  pointers to (unary and binary) functions to work with func-<br />
+   tion adaptors the library provides:<br />
+<br />
+T   template &lt;class Arg, class Result&gt;<br />
+    class pointer_to_unary_function : public unary_function&lt;Arg, Result&gt; {<br />
+    public:<br />
+T     explicit pointer_to_unary_function(Result (*f)(Arg));<br />
+V     Result operator()(Arg x) const;<br />
+    };<br />
+<br />
+T  template &lt;class Arg, class Result&gt;<br />
+    pointer_to_unary_function&lt;Arg, Result&gt; ptr_fun(Result (*f)(Arg));<br />
+<br />
+T       template &lt;class Arg1, class Arg2, class Result&gt;<br />
+        class pointer_to_binary_function :<br />
+          public binary_function&lt;Arg1,Arg2,Result&gt; {<br />
+        public:<br />
+T         explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));<br />
+V         Result operator()(Arg1 x, Arg2 y) const;<br />
+        };<br />
+<br />
+<br />
+   20.3.8  Adaptors for pointers to         [lib.member.pointer.adaptors]<br />
+       members<br />
+<br />
+T  template &lt;class S, class T&gt; class mem_fun_t<br />
+          : public unary_function&lt;T*, S&gt; {<br />
+   public:<br />
+T   explicit mem_fun_t(S (T::*p)());<br />
+V   S operator()(T* p) const;<br />
+   };<br />
+<br />
+T   template &lt;class S, class T, class A&gt; class mem_fun1_t<br />
+          : public binary_function&lt;T*, A, S&gt; {<br />
+    public:<br />
+T     explicit mem_fun1_t(S (T::*p)(A));<br />
+V     S operator()(T* p, A x) const;<br />
+   };<br />
+<br />
+V   template&lt;class S, class T&gt; mem_fun_t&lt;S,T&gt;<br />
+       mem_fun(S (T::*f)());<br />
+V   template&lt;class S, class T, class A&gt; mem_fun1_t&lt;S,T,A&gt;<br />
+       mem_fun(S (T::*f)(A));<br />
+<br />
+T   template &lt;class S, class T&gt; class mem_fun_ref_t<br />
+          : public unary_function&lt;T, S&gt; {<br />
+    public:<br />
+T     explicit mem_fun_ref_t(S (T::*p)());<br />
+V     S operator()(T&amp; p) const;<br />
+   };<br />
+<br />
+T   template &lt;class S, class T, class A&gt; class mem_fun1_ref_t<br />
+          : public binary_function&lt;T, A, S&gt; {<br />
+    public:<br />
+T     explicit mem_fun1_ref_t(S (T::*p)(A));<br />
+V     S operator()(T&amp; p, A x) const;<br />
+   };<br />
+<br />
+T   template&lt;class S, class T&gt; mem_fun_ref_t&lt;S,T&gt;<br />
+       mem_fun_ref(S (T::*f)());<br />
+<br />
+T   template&lt;class S, class T, class A&gt; mem_fun1_ref_t&lt;S,T,A&gt;<br />
+       mem_fun_ref(S (T::*f)(A));<br />
+<br />
+T  template &lt;class S, class T&gt; class const_mem_fun_t<br />
+        : public unary_function&lt;T*, S&gt; {<br />
+   public:<br />
+T   explicit const_mem_fun_t(S (T::*p)() const);<br />
+V   S operator()(const T* p) const;<br />
+   };<br />
+<br />
+T  template &lt;class S, class T, class A&gt; class const_mem_fun1_t<br />
+        : public binary_function&lt;T*, A, S&gt; {<br />
+   public:<br />
+T   explicit const mem_fun1_t(S (T::*p)(A) const);<br />
+V   S operator()(const T* p, A x) const;<br />
+   };<br />
+<br />
+V   template&lt;class S, class T&gt; const_mem_fun_t&lt;S,T&gt;<br />
+       mem_fun(S (T::*f)() const);<br />
+V   template&lt;class S, class T, class A&gt; const_mem_fun1_t&lt;S,T,A&gt;<br />
+       mem_fun(S (T::*f)(A) const);<br />
+<br />
+T   template &lt;class S, class T&gt; class const_mem_fun_ref_t<br />
+          : public unary_function&lt;T, S&gt; {<br />
+    public:<br />
+T     explicit const_mem_fun_ref_t(S (T::*p)() const);<br />
+V     S operator()(const T&amp; p) const;<br />
+   };<br />
+<br />
+T   template &lt;class S, class T, class A&gt; class const_mem_fun1_ref_t<br />
+          : public binary_function&lt;T, A, S&gt; {<br />
+    public:<br />
+T     explicit const_mem_fun1_ref_t(S (T::*p)(A) const);<br />
+V     S operator()(const T&amp; p, A x) const;<br />
+   };<br />
+<br />
+T   template&lt;class S, class T&gt; const_mem_fun_ref_t&lt;S,T&gt;<br />
+       mem_fun_ref(S (T::*f)() const);<br />
+<br />
+T   template&lt;class S, class T, class A&gt; const_mem_fun1_ref_t&lt;S,T,A&gt;<br />
+        mem_fun_ref(S (T::*f)(A) const);<br />
+<br />
+   20.4  Memory                                              [lib.memory]<br />
+<br />
+   Header &lt;memory&gt; synopsis<br />
+<br />
+    // _lib.default.allocator_, the default allocator:<br />
+T   template &lt;class T&gt; class allocator;<br />
+T   template &lt;&gt; class allocator&lt;void&gt;;<br />
+T   template &lt;class T, class U&gt;<br />
+      bool operator==(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) throw();<br />
+T   template &lt;class T, class U&gt;<br />
+      bool operator!=(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) throw();<br />
+    // _lib.storage.iterator_, raw storage iterator:<br />
+T   template &lt;class OutputIterator, class T&gt; class raw_storage_iterator;<br />
+    // _lib.temporary.buffer_, temporary buffers:<br />
+T   template &lt;class T&gt;<br />
+      pair&lt;T*,ptrdiff_t&gt; get_temporary_buffer(ptrdiff_t n);<br />
+T   template &lt;class T&gt;<br />
+      void return_temporary_buffer(T* p);<br />
+    // _lib.specialized.algorithms_, specialized algorithms:<br />
+T   template &lt;class InputIterator, class ForwardIterator&gt;<br />
+      ForwardIterator<br />
+        uninitialized_copy(InputIterator first, InputIterator last,<br />
+                           ForwardIterator result);<br />
+T   template &lt;class ForwardIterator, class T&gt;<br />
+      void uninitialized_fill(ForwardIterator first, ForwardIterator last,<br />
+                              const T&amp; x);<br />
+T   template &lt;class ForwardIterator, class Size, class T&gt;<br />
+      void uninitialized_fill_n(ForwardIterator first, Size n, const T&amp; x);<br />
+    // _lib.auto.ptr_, pointers:<br />
+X   template&lt;class X&gt; class auto_ptr;<br />
+   }<br />
+<br />
+   20.4.1  The default allocator                  [lib.default.allocator]<br />
+<br />
+T   template &lt;class T&gt; class allocator;<br />
+    // specialize for void:<br />
+T   template &lt;&gt; class allocator&lt;void&gt; {<br />
+    public:<br />
+T     typedef void*       pointer;<br />
+T     typedef const void* const_pointer;<br />
+      // reference-to-void members are impossible.<br />
+T     typedef void  value_type;<br />
+T     template &lt;class U&gt; struct rebind { typedef allocator&lt;U&gt; other; };<br />
+    };<br />
+<br />
+T   template &lt;class T&gt; class allocator {<br />
+     public:<br />
+T     typedef size_t    size_type;<br />
+T     typedef ptrdiff_t difference_type;<br />
+T     typedef T*        pointer;<br />
+T     typedef const T*  const_pointer;<br />
+T     typedef T&amp;        reference;<br />
+T     typedef const T&amp;  const_reference;<br />
+T     typedef T         value_type;<br />
+T     template &lt;class U&gt; struct rebind { typedef allocator&lt;U&gt; other; };<br />
+T     allocator() throw();<br />
+T     allocator(const allocator&amp;) throw();<br />
+T     template &lt;class U&gt; allocator(const allocator&lt;U&gt;&amp;) throw();<br />
+T    ~allocator() throw();<br />
+T     pointer address(reference x) const;<br />
+T     const_pointer address(const_reference x) const;<br />
+T     pointer allocate(<br />
+        size_type, allocator&lt;void&gt;::const_pointer hint = 0);<br />
+T     void deallocate(pointer p, size_type n);<br />
+T     size_type max_size() const throw();<br />
+T     void construct(pointer p, const T&amp; val);<br />
+T     void destroy(pointer p);<br />
+    };<br />
+<br />
+   20.4.1.2  allocator globals                    [lib.allocator.globals]<br />
+<br />
+T  template &lt;class T1, class T2&gt;<br />
+    bool operator==(const allocator&lt;T1&gt;&amp;, const allocator&lt;T2&gt;&amp;) throw();<br />
+T  template &lt;class T1, class T2&gt;<br />
+    bool operator!=(const allocator&lt;T1&gt;&amp;, const allocator&lt;T2&gt;&amp;) throw();<br />
+<br />
+   20.4.2  Raw storage iterator                    [lib.storage.iterator]<br />
+<br />
+T   template &lt;class OutputIterator, class T&gt;<br />
+    class raw_storage_iterator<br />
+      : public iterator&lt;output_iterator_tag,void,void,void,void&gt; {<br />
+    public:<br />
+T     explicit raw_storage_iterator(OutputIterator x);<br />
+T     raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator*();<br />
+T     raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator=(const T&amp; element);<br />
+T     raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator++();<br />
+T     raw_storage_iterator&lt;OutputIterator,T&gt;  operator++(int);<br />
+    };<br />
+<br />
+   20.4.3  Temporary buffers                       [lib.temporary.buffer]<br />
+<br />
+T  template &lt;class T&gt;<br />
+    pair&lt;T*, ptrdiff_t&gt; get_temporary_buffer(ptrdiff_t n);<br />
+<br />
+T  template &lt;class T&gt; void return_temporary_buffer(T* p);<br />
+<br />
+   20.4.4  Specialized algorithms            [lib.specialized.algorithms]<br />
+<br />
+   20.4.4.1  uninitialized_copy                  [lib.uninitialized.copy]<br />
+<br />
+V  template &lt;class InputIterator, class ForwardIterator&gt;<br />
+    ForwardIterator<br />
+      uninitialized_copy(InputIterator first, InputIterator last,<br />
+                         ForwardIterator result);<br />
+<br />
+   20.4.4.2  uninitialized_fill                  [lib.uninitialized.fill]<br />
+<br />
+V  template &lt;class ForwardIterator, class T&gt;<br />
+    void uninitialized_fill(ForwardIterator first, ForwardIterator last,<br />
+                            const T&amp; x);<br />
+<br />
+   20.4.4.3  uninitialized_fill_n              [lib.uninitialized.fill.n]<br />
+<br />
+V  template &lt;class ForwardIterator, class Size, class T&gt;<br />
+    void uninitialized_fill_n(ForwardIterator first, Size n, const T&amp; x);<br />
+<br />
+   20.4.5  Template class auto_ptr                         [lib.auto.ptr]<br />
+<br />
+X   template&lt;class X&gt; class auto_ptr {<br />
+      template &lt;class Y&gt; struct auto_ptr_ref {};<br />
+    public:<br />
+T     typedef X element_type;<br />
+      // _lib.auto.ptr.cons_ construct/copy/destroy:<br />
+T     explicit auto_ptr(X* p =0) throw();<br />
+T     auto_ptr(auto_ptr&amp;) throw();<br />
+T     template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt;&amp;) throw();<br />
+T     auto_ptr&amp; operator=(auto_ptr&amp;) throw();<br />
+T     template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt;&amp;) throw();<br />
+T    ~auto_ptr() throw();<br />
+      // _lib.auto.ptr.members_ members:<br />
+T     X&amp; operator*() const throw();<br />
+T     X* operator-&gt;() const throw();<br />
+T     X* get() const throw();<br />
+T     X* release() throw();<br />
+T     void reset(X* p =0) throw();<br />
+<br />
+      // _lib.auto.ptr.conv_ conversions:<br />
+X     auto_ptr(auto_ptr_ref&lt;X&gt;) throw();<br />
+X     template&lt;class Y&gt; operator auto_ptr_ref&lt;Y&gt;() throw();<br />
+X     template&lt;class Y&gt; operator auto_ptr&lt;Y&gt;() throw();<br />
+    };<br />
+<br />
+   20.4.6  C Library                                       [lib.c.malloc]<br />
+<br />
+                    Table 7--Header &lt;cstdlib&gt; synopsis<br />
+<br />
+X                    Functions:   calloc   malloc<br />
+                                  free     realloc<br />
+<br />
+<br />
+                    Table 8--Header &lt;cstring&gt; synopsis<br />
+<br />
+X                    Macro:       NULL<br />
+X                    Type:        size_t<br />
+X                    Functions:   memchr    memcmp<br />
+X                    memcpy       memmove   memset<br />
+<br />
+                     Table 9--Header &lt;ctime&gt; synopsis<br />
+<br />
+X          Macros:   NULL<br />
+X          Types:    size_t   clock_t    time_t<br />
+X          Struct:   tm<br />
+           Functions:<br />
+X          asctime   clock    difftime   localtime   strftime<br />
+X          ctime     gmtime   mktime     time<br />
+<br />
+   21.1.1  Character traits requirements        [lib.char.traits.require]<br />
+<br />
+   2 The struct template<br />
+T  template&lt;class charT&gt; struct char_traits;<br />
+   shall be provided in the header &lt;string&gt; as a basis for  explicit spe-<br />
+   cializations.<br />
+<br />
+<br />
+   21.1.3.1  struct                [lib.char.traits.specializations.char]<br />
+       char_traits&lt;char&gt;<br />
+<br />
+T   template&lt;&gt;<br />
+    struct char_traits&lt;char&gt; {<br />
+T     typedef char        char_type;<br />
+T     typedef int         int_type;<br />
+T     typedef streamoff   off_type;<br />
+T     typedef streampos   pos_type;<br />
+T     typedef mbstate_t   state_type;<br />
+<br />
+T     static void assign(char_type&amp; c1, const char_type&amp; c2);<br />
+T     static bool eq(const char_type&amp; c1, const char_type&amp; c2);<br />
+T     static bool lt(const char_type&amp; c1, const char_type&amp; c2);<br />
+<br />
+T     static int compare(const char_type* s1, const char_type* s2, size_t n);<br />
+T     static size_t length(const char_type* s);<br />
+T     static const char_type* find(const char_type* s, size_t n,<br />
+                                   const char_type&amp; a);<br />
+T     static char_type* move(char_type* s1, const char_type* s2, size_t n);<br />
+T     static char_type* copy(char_type* s1, const char_type* s2, size_t n);<br />
+T     static char_type* assign(char_type* s, size_t n, char_type a);<br />
+<br />
+T     static int_type not_eof(const int_type&amp; c);<br />
+T     static char_type to_char_type(const int_type&amp; c);<br />
+T     static int_type to_int_type(const char_type&amp; c);<br />
+T     static bool eq_int_type(const int_type&amp; c1, const int_type&amp; c2);<br />
+T     static int_type eof();<br />
+    };<br />
+<br />
+   21.1.3.2  struct             [lib.char.traits.specializations.wchar.t]<br />
+       char_traits&lt;wchar_t&gt;<br />
+<br />
+V   template&lt;&gt;<br />
+    struct char_traits&lt;wchar_t&gt; {<br />
+V     typedef wchar_t      char_type;<br />
+V     typedef wint_t       int_type;<br />
+V     typedef streamoff   off_type;<br />
+V     typedef wstreampos   pos_type;<br />
+V     typedef mbstate_t    state_type;<br />
+<br />
+V     static void assign(char_type&amp; c1, const char_type&amp; c2);<br />
+V     static bool eq(const char_type&amp; c1, const char_type&amp; c2);<br />
+V     static bool lt(const char_type&amp; c1, const char_type&amp; c2);<br />
+<br />
+V     static int compare(const char_type* s1, const char_type* s2, size_t n);<br />
+V     static size_t length(const char_type* s);<br />
+V     static const char_type* find(const char_type* s, size_t n,<br />
+                                   const char_type&amp; a);<br />
+V     static char_type* move(char_type* s1, const char_type* s2, size_t n);<br />
+V     static char_type* copy(char_type* s1, const char_type* s2, size_t n);<br />
+V     static char_type* assign(char_type* s, size_t n, char_type a);<br />
+<br />
+V     static int_type not_eof(const int_type&amp; c);<br />
+V     static char_type to_char_type(const int_type&amp; c);<br />
+V     static int_type to_int_type(const char_type&amp; c);<br />
+V     static bool eq_int_type(const int_type&amp; c1, const int_type&amp; c2);<br />
+V     static int_type eof();<br />
+    };<br />
+<br />
+   21.2  String classes                              [lib.string.classes]<br />
+<br />
+    // _lib.char.traits_, character traits:<br />
+V   template&lt;class charT&gt;<br />
+      struct char_traits;<br />
+V   template &lt;&gt; struct char_traits&lt;char&gt;;<br />
+V   template &lt;&gt; struct char_traits&lt;wchar_t&gt;;<br />
+<br />
+    // _lib.basic.string_, basic_string:<br />
+V   template&lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+             class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_string;<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      basic_string&lt;charT,traits,Allocator&gt;<br />
+        operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                  const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      basic_string&lt;charT,traits,Allocator&gt;<br />
+        operator+(const charT* lhs,<br />
+                  const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      basic_string&lt;charT,traits,Allocator&gt;<br />
+        operator+(charT lhs, const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      basic_string&lt;charT,traits,Allocator&gt;<br />
+        operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                  const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      basic_string&lt;charT,traits,Allocator&gt;<br />
+        operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs, charT rhs);<br />
+<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator==(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator==(const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator==(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator!=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator!=(const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator!=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt; (const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt; (const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&lt;=(const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                      const charT* rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+      bool operator&gt;=(const charT* lhs,<br />
+                      const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+<br />
+    // _lib.string.special_:<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+       void swap(basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,<br />
+                 basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+     basic_istream&lt;charT,traits&gt;&amp;<br />
+      operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp; is,<br />
+                 basic_string&lt;charT,traits,Allocator&gt;&amp; str);<br />
+T   template&lt;class charT, class traits, class Allocator&gt;<br />
+     basic_ostream&lt;charT, traits&gt;&amp;<br />
+      operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os,<br />
+                 const basic_string&lt;charT,traits,Allocator&gt;&amp; str);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+     basic_istream&lt;charT,traits&gt;&amp;<br />
+       getline(basic_istream&lt;charT,traits&gt;&amp; is,<br />
+               basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+               charT delim);<br />
+V   template&lt;class charT, class traits, class Allocator&gt;<br />
+     basic_istream&lt;charT,traits&gt;&amp;<br />
+       getline(basic_istream&lt;charT,traits&gt;&amp; is,<br />
+               basic_string&lt;charT,traits,Allocator&gt;&amp; str);<br />
+V   typedef basic_string&lt;char&gt; string;<br />
+T   typedef basic_string&lt;wchar_t&gt; wstring;<br />
+   }<br />
+<br />
+   21.3  Template class basic_string                   [lib.basic.string]<br />
+<br />
+V  namespace std {<br />
+    template&lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+             class Allocator = allocator&lt;charT&gt; &gt;<br />
+    class basic_string {<br />
+    public:<br />
+      // types:<br />
+      typedef          traits                     traits_type;<br />
+      typedef typename traits::char_type          value_type;<br />
+      typedef          Allocator                  allocator_type;<br />
+      typedef typename Allocator::size_type       size_type;<br />
+      typedef typename Allocator::difference_type difference_type;<br />
+      typedef typename Allocator::reference       reference;<br />
+      typedef typename Allocator::const_reference const_reference;<br />
+      typedef typename Allocator::pointer         pointer;<br />
+      typedef typename Allocator::const_pointer   const_pointer;<br />
+      typedef implementation defined             iterator;<br />
+      typedef implementation defined             const_iterator;<br />
+      typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;<br />
+      typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+      static const size_type npos = -1;<br />
+<br />
+      // _lib.string.cons_ construct/copy/destroy:<br />
+V     explicit basic_string(const Allocator&amp; a = Allocator());<br />
+V     basic_string(const basic_string&amp; str, size_type pos = 0,<br />
+                   size_type n = npos, const Allocator&amp; a = Allocator());<br />
+V     basic_string(const charT* s,<br />
+                   size_type n, const Allocator&amp; a = Allocator());<br />
+V     basic_string(const charT* s, const Allocator&amp; a = Allocator());<br />
+V     basic_string(size_type n, charT c, const Allocator&amp; a = Allocator());<br />
+V     template&lt;class InputIterator&gt;<br />
+        basic_string(InputIterator begin, InputIterator end,<br />
+                     const Allocator&amp; a = Allocator());<br />
+V    ~basic_string();<br />
+V     basic_string&amp; operator=(const basic_string&amp; str);<br />
+V     basic_string&amp; operator=(const charT* s);<br />
+V     basic_string&amp; operator=(charT c);<br />
+      // _lib.string.iterators_ iterators:<br />
+V     iterator       begin();<br />
+V     const_iterator begin() const;<br />
+V     iterator       end();<br />
+V     const_iterator end() const;<br />
+<br />
+V     reverse_iterator       rbegin();<br />
+V     const_reverse_iterator rbegin() const;<br />
+V     reverse_iterator       rend();<br />
+V     const_reverse_iterator rend() const;<br />
+      // _lib.string.capacity_ capacity:<br />
+V     size_type size() const;<br />
+V     size_type length() const;<br />
+V     size_type max_size() const;<br />
+V     void resize(size_type n, charT c);<br />
+V     void resize(size_type n);<br />
+V     size_type capacity() const;<br />
+V     void reserve(size_type res_arg = 0);<br />
+V     void clear();<br />
+V     bool empty() const;<br />
+      // _lib.string.access_ element access:<br />
+V     const_reference operator[](size_type pos) const;<br />
+V     reference       operator[](size_type pos);<br />
+V     const_reference at(size_type n) const;<br />
+V     reference       at(size_type n);<br />
+      // _lib.string.modifiers_ modifiers:<br />
+V     basic_string&amp; operator+=(const basic_string&amp; str);<br />
+V     basic_string&amp; operator+=(const charT* s);<br />
+V     basic_string&amp; operator+=(charT c);<br />
+V     basic_string&amp; append(const basic_string&amp; str);<br />
+V     basic_string&amp; append(const basic_string&amp; str, size_type pos,<br />
+                           size_type n);<br />
+V     basic_string&amp; append(const charT* s, size_type n);<br />
+V     basic_string&amp; append(const charT* s);<br />
+V     basic_string&amp; append(size_type n, charT c);<br />
+V     template&lt;class InputIterator&gt;<br />
+        basic_string&amp; append(InputIterator first, InputIterator last);<br />
+V     void push_back(const charT);<br />
+<br />
+V     basic_string&amp; assign(const basic_string&amp;);<br />
+V     basic_string&amp; assign(const basic_string&amp; str, size_type pos,<br />
+                           size_type n);<br />
+V     basic_string&amp; assign(const charT* s, size_type n);<br />
+V     basic_string&amp; assign(const charT* s);<br />
+V     basic_string&amp; assign(size_type n, charT c);<br />
+V     template&lt;class InputIterator&gt;<br />
+        basic_string&amp; assign(InputIterator first, InputIterator last);<br />
+V     basic_string&amp; insert(size_type pos1, const basic_string&amp; str);<br />
+V     basic_string&amp; insert(size_type pos1, const basic_string&amp; str,<br />
+                           size_type pos2, size_type n);<br />
+V     basic_string&amp; insert(size_type pos, const charT* s, size_type n);<br />
+V     basic_string&amp; insert(size_type pos, const charT* s);<br />
+V     basic_string&amp; insert(size_type pos, size_type n, charT c);<br />
+V     iterator insert(iterator p, charT c);<br />
+V     void     insert(iterator p, size_type n, charT c);<br />
+V     template&lt;class InputIterator&gt;<br />
+        void insert(iterator p, InputIterator first, InputIterator last);<br />
+V     basic_string&amp; erase(size_type pos = 0, size_type n = npos);<br />
+V     iterator erase(iterator position);<br />
+V     iterator erase(iterator first, iterator last);<br />
+V     basic_string&amp; replace(size_type pos1, size_type n1,<br />
+                            const basic_string&amp; str);<br />
+V     basic_string&amp; replace(size_type pos1, size_type n1,<br />
+                            const basic_string&amp; str,<br />
+                            size_type pos2, size_type n2);<br />
+V     basic_string&amp; replace(size_type pos, size_type n1, const charT* s,<br />
+                            size_type n2);<br />
+V     basic_string&amp; replace(size_type pos, size_type n1, const charT* s);<br />
+V     basic_string&amp; replace(size_type pos, size_type n1, size_type n2,<br />
+                            charT c);<br />
+V     basic_string&amp; replace(iterator i1, iterator i2, const basic_string&amp; str);<br />
+V     basic_string&amp; replace(iterator i1, iterator i2, const charT* s,<br />
+                            size_type n);<br />
+V     basic_string&amp; replace(iterator i1, iterator i2, const charT* s);<br />
+V     basic_string&amp; replace(iterator i1, iterator i2,<br />
+                            size_type n, charT c);<br />
+V     template&lt;class InputIterator&gt;<br />
+        basic_string&amp; replace(iterator i1, iterator i2,<br />
+                              InputIterator j1, InputIterator j2);<br />
+V     size_type copy(charT* s, size_type n, size_type pos = 0) const;<br />
+V     void swap(basic_string&lt;charT,traits,Allocator&gt;&amp;);<br />
+      // _lib.string.ops_ string operations:<br />
+V     const charT* c_str() const;         // explicit<br />
+V     const charT* data() const;<br />
+V     allocator_type get_allocator() const;<br />
+V     size_type find (const basic_string&amp; str, size_type pos = 0) const;<br />
+V     size_type find (const charT* s, size_type pos, size_type n) const;<br />
+V     size_type find (const charT* s, size_type pos = 0) const;<br />
+V     size_type find (charT c, size_type pos = 0) const;<br />
+V     size_type rfind(const basic_string&amp; str, size_type pos = npos) const;<br />
+V     size_type rfind(const charT* s, size_type pos, size_type n) const;<br />
+V     size_type rfind(const charT* s, size_type pos = npos) const;<br />
+V     size_type rfind(charT c, size_type pos = npos) const;<br />
+<br />
+V     size_type find_first_of(const basic_string&amp; str,<br />
+                              size_type pos = 0) const;<br />
+V     size_type find_first_of(const charT* s,<br />
+                              size_type pos, size_type n) const;<br />
+V     size_type find_first_of(const charT* s, size_type pos = 0) const;<br />
+V     size_type find_first_of(charT c, size_type pos = 0) const;<br />
+V     size_type find_last_of (const basic_string&amp; str,<br />
+                              size_type pos = npos) const;<br />
+V     size_type find_last_of (const charT* s,<br />
+                              size_type pos, size_type n) const;<br />
+V     size_type find_last_of (const charT* s, size_type pos = npos) const;<br />
+V     size_type find_last_of (charT c, size_type pos = npos) const;<br />
+V     size_type find_first_not_of(const basic_string&amp; str,<br />
+                                  size_type pos = 0) const;<br />
+V     size_type find_first_not_of(const charT* s, size_type pos,<br />
+                                  size_type n) const;<br />
+V     size_type find_first_not_of(const charT* s, size_type pos = 0) const;<br />
+V     size_type find_first_not_of(charT c, size_type pos = 0) const;<br />
+V     size_type find_last_not_of (const basic_string&amp; str,<br />
+                                  size_type pos = npos) const;<br />
+V     size_type find_last_not_of (const charT* s, size_type pos,<br />
+                                  size_type n) const;<br />
+V     size_type find_last_not_of (const charT* s,<br />
+                                  size_type pos = npos) const;<br />
+V     size_type find_last_not_of (charT c, size_type pos = npos) const;<br />
+V     basic_string substr(size_type pos = 0, size_type n = npos) const;<br />
+V     int compare(const basic_string&amp; str) const;<br />
+V     int compare(size_type pos1, size_type n1,<br />
+                  const basic_string&amp; str) const;<br />
+V     int compare(size_type pos1, size_type n1,<br />
+                  const basic_string&amp; str,<br />
+                  size_type pos2, size_type n2) const;<br />
+V     int compare(const charT* s) const;<br />
+V     int compare(size_type pos1, size_type n1,<br />
+                  const charT* s, size_type n2 = npos) const;<br />
+    };<br />
+   }<br />
+<br />
+   21.4  Null-terminated sequence utilities               [lib.c.strings]<br />
+<br />
+                    Table 10--Header &lt;cctype&gt; synopsis<br />
+<br />
+            isalnum   isdigit   isprint   isupper    tolower<br />
+X           isalpha   isgraph   ispunct   isxdigit   toupper<br />
+            iscntrl   islower   isspace<br />
+<br />
+                   Table 11--Header &lt;cwctype&gt; synopsis<br />
+<br />
+X  Macro:     WEOF &lt;cwctype&gt;<br />
+X  Types:     wctrans_t   wctype_t   wint_t &lt;cwctype&gt;<br />
+   Functions:<br />
+X  iswalnum   iswctype    iswlower   iswspace    towctrans   wctrans<br />
+X  iswalpha   iswdigit    iswprint   iswupper    towlower    wctype<br />
+X  iswcntrl   iswgraph    iswpunct   iswxdigit   towupper<br />
+<br />
+                   Table 12--Header &lt;cstring&gt; synopsis<br />
+<br />
+X           Macro:    NULL &lt;cstring&gt;<br />
+X           Type:     size_t &lt;cstring&gt;<br />
+            Functions:<br />
+X           memchr    strcat    strcspn    strncpy   strtok<br />
+X           memcmp    strchr    strerror   strpbrk   strxfrm<br />
+X           memcpy    strcmp    strlen     strrchr<br />
+X           memmove   strcoll   strncat    strspn<br />
+X           memset    strcpy    strncmp    strstr<br />
+<br />
+                    Table 13--Header &lt;cwchar&gt; synopsis<br />
+   Macros:    NULL &lt;cwchar&gt;   WCHAR_MAX         WCHAR_MIN   WEOF &lt;cwchar&gt;<br />
+   Types:     mbstate_t       wint_t &lt;cwchar&gt;   size_t<br />
+   Functions:<br />
+X  btowc      getwchar        ungetwc           wcscpy      wcsrtombs   wmemchr<br />
+X  fgetwc     mbrlen          vfwprintf         wcscspn     wcsspn      wmemcmp<br />
+X  fgetws     mbrtowc         vswprintf         wcsftime    wcsstr      wmemcpy<br />
+X  fputwc     mbsinit         vwprintf          wcslen      wcstod      wmemmove<br />
+X  fputws     mbsrtowcs       wcrtomb           wcsncat     wcstok      wmemset<br />
+X  fwide      putwc           wcscat            wcsncmp     wcstol      wprintf<br />
+X  fwprintf   putwchar        wcschr            wcsncpy     wcstoul     wscanf<br />
+X  fwscanf    swprintf        wcscmp            wcspbrk     wcsxfrm<br />
+X  getwc      swscanf         wcscoll           wcsrchr     wctob<br />
+<br />
+                   Table 14--Header &lt;cstdlib&gt; synopsis<br />
+<br />
+               Macros:   MB_CUR_MAX<br />
+               Functions:<br />
+X              atol      mblen        strtod    wctomb<br />
+X              atof      mbstowcs     strtol    wcstombs<br />
+X              atoi      mbtowc       strtoul<br />
+<br />
+X  const char* strchr(const char* s, int c);<br />
+X       char* strchr(      char* s, int c);<br />
+<br />
+X  const char* strpbrk(const char* s1, const char* s2);<br />
+X       char* strpbrk(      char* s1, const char* s2);<br />
+<br />
+X  const char* strrchr(const char* s, int c);<br />
+X       char* strrchr(      char* s, int c);<br />
+<br />
+X  const char* strstr(const char* s1, const char* s2);<br />
+X       char* strstr(      char* s1, const char* s2);<br />
+<br />
+X  const void* memchr(const void* s, int c, size_t n);<br />
+X       void* memchr(      void* s, int c, size_t n);<br />
+<br />
+X  const wchar_t* wcschr(const wchar_t* s, wchar_t c);<br />
+X       wchar_t* wcschr(      wchar_t* s, wchar_t c);<br />
+<br />
+X  const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);<br />
+X       wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);<br />
+<br />
+X  const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);<br />
+X       wchar_t* wcsrchr(      wchar_t* s, wchar_t c);<br />
+<br />
+X  const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);<br />
+X       wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);<br />
+<br />
+X  const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);<br />
+X       wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);<br />
+<br />
+   [for initial efforts on the above, see shadow/string.h]<br />
+<br />
+   22.1  Locales                                            [lib.locales]<br />
+<br />
+   Header &lt;locale&gt; synopsis<br />
+<br />
+    // _lib.locale_, locale:<br />
+T   class locale;<br />
+T   template &lt;class Facet&gt; const Facet&amp; use_facet(const locale&amp;);<br />
+T   template &lt;class Facet&gt; bool         has_facet(const locale&amp;) throw();<br />
+<br />
+    // _lib.locale.convenience_, convenience interfaces:<br />
+T   template &lt;class charT&gt; bool isspace (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isprint (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool iscntrl (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isupper (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool islower (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isalpha (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isdigit (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool ispunct (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isxdigit(charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isalnum (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; bool isgraph (charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; charT toupper(charT c, const locale&amp; loc);<br />
+T   template &lt;class charT&gt; charT tolower(charT c, const locale&amp; loc);<br />
+    // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:<br />
+    class ctype_base;<br />
+T   template &lt;class charT&gt; class ctype;<br />
+T   template &lt;&gt;            class ctype&lt;char&gt;;             // specialization<br />
+S   template &lt;class charT&gt; class ctype_byname;<br />
+S   template &lt;&gt;            class ctype_byname&lt;char&gt;;      // specialization<br />
+T   class codecvt_base;<br />
+X   template &lt;class internT, class externT, class stateT&gt; class codecvt;<br />
+S   template &lt;class internT, class externT, class stateT&gt; class codecvt_byname;<br />
+    // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:<br />
+X   template &lt;class charT, class InputIterator&gt;  class num_get;<br />
+X   template &lt;class charT, class OutputIterator&gt; class num_put;<br />
+T   template &lt;class charT&gt; class numpunct;<br />
+S   template &lt;class charT&gt; class numpunct_byname;<br />
+    // _lib.category.collate_, collation:<br />
+T   template &lt;class charT&gt; class collate;<br />
+S   template &lt;class charT&gt; class collate_byname;<br />
+    // _lib.category.time_, date and time:<br />
+T   class time_base;<br />
+S   template &lt;class charT, class InputIterator&gt;  class time_get;<br />
+S   template &lt;class charT, class InputIterator&gt;  class time_get_byname;<br />
+S   template &lt;class charT, class OutputIterator&gt; class time_put;<br />
+S   template &lt;class charT, class OutputIterator&gt; class time_put_byname;<br />
+    // _lib.category.monetary_, money:<br />
+T   class money_base;<br />
+S   template &lt;class charT, class InputIterator&gt;  class money_get;<br />
+S   template &lt;class charT, class OutputIterator&gt; class money_put;<br />
+S   template &lt;class charT, bool Intl&gt; class moneypunct;<br />
+S   template &lt;class charT, bool Intl&gt; class moneypunct_byname;<br />
+    // _lib.category.messages_, message retrieval:<br />
+T   class messages_base;<br />
+S   template &lt;class charT&gt; class messages;<br />
+S   template &lt;class charT&gt; class messages_byname;<br />
+<br />
+<br />
+   22.1.1  Class locale                                      [lib.locale]<br />
+<br />
+X   class locale {<br />
+    public:<br />
+      // types:<br />
+T     class facet;<br />
+T     class id;<br />
+T     typedef int category;<br />
+T     static const category   // values assigned here are for exposition only<br />
+T       none     = 0,<br />
+T       collate  = 0x010, ctype    = 0x020,<br />
+T       monetary = 0x040, numeric  = 0x080,<br />
+T       time     = 0x100, messages = 0x200,<br />
+T       all = collate | ctype | monetary | numeric | time  | messages;<br />
+      // construct/copy/destroy:<br />
+T     locale() throw()<br />
+T     locale(const locale&amp; other) throw()<br />
+X     explicit locale(const char* std_name);<br />
+X     locale(const locale&amp; other, const char* std_name, category);<br />
+T     template &lt;class Facet&gt; locale(const locale&amp; other, Facet* f);<br />
+T     locale(const locale&amp; other, const locale&amp; one, category);<br />
+T    ~locale() throw();           // non-virtual<br />
+T     const locale&amp; operator=(const locale&amp; other) throw();<br />
+T     template &lt;class Facet&gt; locale combine(const locale&amp; other) const;<br />
+      // locale operations:<br />
+X     basic_string&lt;char&gt;                  name() const;<br />
+T     bool operator==(const locale&amp; other) const;<br />
+T     bool operator!=(const locale&amp; other) const;<br />
+T     template &lt;class charT, class Traits, class Allocator&gt;<br />
+        bool operator()(const basic_string&lt;charT,Traits,Allocator&gt;&amp; s1,<br />
+                        const basic_string&lt;charT,Traits,Allocator&gt;&amp; s2) const;<br />
+      // global locale objects:<br />
+T     static       locale  global(const locale&amp;);<br />
+T     static const locale&amp; classic();<br />
+    };<br />
+<br />
+   22.1.1.1  locale types                              [lib.locale.types]<br />
+<br />
+   22.1.1.1.1  Type locale::category                [lib.locale.category]<br />
+<br />
+T  typedef int category;<br />
+<br />
+T   none, collate, ctype, monetary, numeric, time, and messages<br />
+<br />
+      [required locale members]<br />
+T     collate&lt;char&gt;, collate&lt;wchar_t&gt;<br />
+T     ctype&lt;char&gt;, ctype&lt;wchar_t&gt;<br />
+T     codecvt&lt;char,char,mbstate_t&gt;,<br />
+S     codecvt&lt;wchar_t,char,mbstate_t&gt;<br />
+T     moneypunct&lt;char&gt;, moneypunct&lt;wchar_t&gt;<br />
+T     moneypunct&lt;char,true&gt;, moneypunct&lt;wchar_t,true&gt;,<br />
+S     money_get&lt;char&gt;, money_get&lt;wchar_t<br />
+S     money_put&lt;char&gt;, money_put&lt;wchar_t&gt;<br />
+T     numpunct&lt;char&gt;, numpunct&lt;wchar_t&gt;,<br />
+X     num_get&lt;char&gt;, num_get&lt;wchar_t&gt;<br />
+X     num_put&lt;char&gt;, num_put&lt;wchar_t&gt;<br />
+S     time_get&lt;char&gt;, time_get&lt;wchar_t&gt;,<br />
+S     time_put&lt;char&gt;, time_put&lt;wchar_t&gt;<br />
+S     messages&lt;char&gt;, messages&lt;wchar_t&gt;<br />
+<br />
+      [required instantiations]<br />
+S    collate_byname&lt;char&gt;, collate_byname&lt;wchar_t&gt;<br />
+S    ctype_byname&lt;char&gt;, ctype_byname&lt;wchar_t&gt;<br />
+S    codecvt_byname&lt;char,char,mbstate_t&gt;,<br />
+S    codecvt_byname&lt;wchar_t,char,mbstate_t&gt;<br />
+S    moneypunct_byname&lt;char,International&gt;,<br />
+S    moneypunct_byname&lt;wchar_t,International&gt;,<br />
+S    money_get&lt;C,InputIterator&gt;,<br />
+S    money_put&lt;C,OutputIterator&gt;<br />
+S    numpunct_byname&lt;char&gt;, numpunct_byname&lt;wchar_t&gt;<br />
+X    num_get&lt;C,InputIterator&gt;, num_put&lt;C,OutputIterator&gt;<br />
+S    time_get&lt;char,InputIterator&gt;,<br />
+S    time_get_byname&lt;char,InputIterator&gt;,<br />
+S    time_get&lt;wchar_t,OutputIterator&gt;,<br />
+S    time_get_byname&lt;wchar_t,OutputIterator&gt;,<br />
+S    time_put&lt;char,OutputIterator&gt;,<br />
+S    time_put_byname&lt;char,OutputIterator&gt;,<br />
+S    time_put&lt;wchar_t,OutputIterator&gt;<br />
+S    time_put_byname&lt;wchar_t,OutputIterator&gt;<br />
+S    messages_byname&lt;char&gt;, messages_byname&lt;wchar_t&gt;<br />
+<br />
+<br />
+   22.1.1.1.2  Class locale::facet                     [lib.locale.facet]<br />
+<br />
+T   class locale::facet {<br />
+    protected:<br />
+T     explicit facet(size_t refs = 0);<br />
+T     virtual ~facet();<br />
+    private:<br />
+T     facet(const facet&amp;);                // not defined<br />
+T     void operator=(const facet&amp;);       // not defined<br />
+    };<br />
+   }<br />
+<br />
+<br />
+   22.1.1.1.3  Class locale::id                           [lib.locale.id]<br />
+<br />
+T   class locale::id {<br />
+    public:<br />
+T     id();<br />
+    private:<br />
+T     void operator=(const id&amp;);  // not defined<br />
+T     id(const id&amp;);              // not defined<br />
+    };<br />
+   }<br />
+<br />
+<br />
+   22.2.1  The ctype category                        [lib.category.ctype]<br />
+<br />
+T   class ctype_base {<br />
+    public:<br />
+T     enum mask {         // numeric values are for exposition only.<br />
+T       space=, print=, cntrl=, upper=, lower=,<br />
+T       alpha=, digit=, punct=, xdigit=,<br />
+T       alnum=, graph=<br />
+      };<br />
+    };<br />
+<br />
+<br />
+   22.2.1.1  Template class ctype                      [lib.locale.ctype]<br />
+<br />
+T   template &lt;class charT&gt;<br />
+    class ctype : public locale::facet, public ctype_base {<br />
+    public:<br />
+T     typedef charT char_type;<br />
+T     explicit ctype(size_t refs = 0);<br />
+T     bool         is(mask m, charT c) const;<br />
+T     const charT* is(const charT* low, const charT* high, mask* vec) const;<br />
+T     const charT* scan_is(mask m,<br />
+                           const charT* low, const charT* high) const;<br />
+T     const charT* scan_not(mask m,<br />
+                            const charT* low, const charT* high) const;<br />
+T     charT        toupper(charT c) const;<br />
+T     const charT* toupper(charT* low, const charT* high) const;<br />
+T     charT        tolower(charT c) const;<br />
+T     const charT* tolower(charT* low, const charT* high) const;<br />
+T     charT        widen(char c) const;<br />
+T     const char*  widen(const char* low, const char* high, charT* to) const;<br />
+T     char         narrow(charT c, char dfault) const;<br />
+T     const charT* narrow(const charT* low, const charT*, char dfault,<br />
+                          char* to) const;<br />
+T     static locale::id id;<br />
+<br />
+    protected:<br />
+T    ~ctype();                    // virtual<br />
+T     virtual bool         do_is(mask m, charT c) const;<br />
+T     virtual const charT* do_is(const charT* low, const charT* high,<br />
+                                 mask* vec) const;<br />
+T     virtual const charT* do_scan_is(mask m,<br />
+                              const charT* low, const charT* high) const;<br />
+T     virtual const charT* do_scan_not(mask m,<br />
+                              const charT* low, const charT* high) const;<br />
+T     virtual charT        do_toupper(charT) const;<br />
+T     virtual const charT* do_toupper(charT* low, const charT* high) const;<br />
+T     virtual charT        do_tolower(charT) const;<br />
+T     virtual const charT* do_tolower(charT* low, const charT* high) const;<br />
+T     virtual charT        do_widen(char) const;<br />
+T     virtual const char*  do_widen(const char* low, const char* high,<br />
+                                    charT* dest) const;<br />
+T     virtual char         do_narrow(charT, char dfault) const;<br />
+T     virtual const charT* do_narrow(const charT* low, const charT* high,<br />
+                                     char dfault, char* dest) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.1.2  Template class ctype_byname        [lib.locale.ctype.byname]<br />
+<br />
+X   template &lt;class charT&gt;<br />
+    class ctype_byname : public ctype&lt;charT&gt; {<br />
+    public:<br />
+T     typedef ctype&lt;charT&gt;::mask mask;<br />
+S     explicit ctype_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+S    ~ctype_byname();             // virtual<br />
+S     virtual bool         do_is(mask m, charT c) const;<br />
+S     virtual const charT* do_is(const charT* low, const charT* high,<br />
+                                 mask* vec) const;<br />
+S     virtual const char*  do_scan_is(mask m,<br />
+                               const charT* low, const charT* high) const;<br />
+S     virtual const char*  do_scan_not(mask m,<br />
+                               const charT* low, const charT* high) const;<br />
+S     virtual charT        do_toupper(charT) const;<br />
+S     virtual const charT* do_toupper(charT* low, const charT* high) const;<br />
+S     virtual charT        do_tolower(charT) const;<br />
+S     virtual const charT* do_tolower(charT* low, const charT* high) const;<br />
+S     virtual charT        do_widen(char) const;<br />
+S     virtual const char*  do_widen(const char* low, const char* high,<br />
+                                    charT* dest) const;<br />
+S     virtual char         do_narrow(charT, char dfault) const;<br />
+S     virtual const charT* do_narrow(const charT* low, const charT* high,<br />
+                                     char dfault, char* dest) const;<br />
+    };<br />
+<br />
+   22.2.1.3  ctype specializations              [lib.facet.ctype.special]<br />
+<br />
+T   template &lt;&gt; class ctype&lt;char&gt;<br />
+      : public locale::facet, public ctype_base {<br />
+    public:<br />
+T     typedef char char_type;<br />
+T     explicit ctype(const mask* tab = 0, bool del = false,<br />
+                     size_t refs = 0);<br />
+T     bool is(mask m, char c) const;<br />
+T     const char* is(const char* low, const char* high, mask* vec) const;<br />
+T     const char* scan_is (mask m,<br />
+                           const char* low, const char* high) const;<br />
+T     const char* scan_not(mask m,<br />
+                           const char* low, const char* high) const;<br />
+T     char        toupper(char c) const;<br />
+T     const char* toupper(char* low, const char* high) const;<br />
+T     char        tolower(char c) const;<br />
+T     const char* tolower(char* low, const char* high) const;<br />
+T     char  widen(char c) const;<br />
+T     const char* widen(const char* low, const char* high, char* to) const;<br />
+T     char  narrow(char c, char dfault) const;<br />
+T     const char* narrow(const char* low, const char* high, char dfault,<br />
+                         char* to) const;<br />
+T     static locale::id id;<br />
+T     static const size_t table_size = IMPLEMENTATION_DEFINED;<br />
+<br />
+    protected:<br />
+T     const mask* table() const throw();<br />
+T     static const mask* classic_table() throw();<br />
+T    ~ctype();                    // virtual<br />
+T     virtual char        do_toupper(char c) const;<br />
+T     virtual const char* do_toupper(char* low, const char* high) const;<br />
+T     virtual char        do_tolower(char c) const;<br />
+T     virtual const char* do_tolower(char* low, const char* high) const;<br />
+<br />
+T     virtual char        do_widen(char c) const;<br />
+T     virtual const char* do_widen(const char* low,<br />
+                                   const char* high,<br />
+                                   char* to) const;<br />
+T     virtual char        do_narrow(char c, char dfault) const;<br />
+T     virtual const char* do_narrow(const char* low,<br />
+                                    const char* high,<br />
+                                    char dfault, char* to) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.1.4  Class                      [lib.locale.ctype.byname.special]<br />
+       ctype_byname&lt;char&gt;<br />
+<br />
+X   template &lt;&gt; class ctype_byname&lt;char&gt; : public ctype&lt;char&gt; {<br />
+    public:<br />
+S     explicit ctype_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+S    ~ctype_byname();             // virtual<br />
+S     virtual char        do_toupper(char c) const;<br />
+S     virtual const char* do_toupper(char* low, const char* high) const;<br />
+S     virtual char        do_tolower(char c) const;<br />
+S     virtual const char* do_tolower(char* low, const char* high) const;<br />
+<br />
+S     virtual char        do_widen(char c) const;<br />
+S     virtual const char* do_widen(char* low,<br />
+                                   const char* high,<br />
+                                   char* to) const;<br />
+S     virtual char        do_widen(char c) const;<br />
+S     virtual const char* do_widen(char* low, const char* high) const;<br />
+<br />
+    };<br />
+<br />
+<br />
+<br />
+   22.2.1.5  Template class codecvt                  [lib.locale.codecvt]<br />
+<br />
+T  class codecvt_base {<br />
+   public:<br />
+T   enum result { ok, partial, error, noconv };<br />
+   };<br />
+<br />
+T  template &lt;class internT, class externT, class stateT&gt;<br />
+   class codecvt : public locale::facet, public codecvt_base {<br />
+   public:<br />
+T   typedef internT  intern_type;<br />
+T   typedef externT  extern_type;<br />
+T   typedef stateT state_type;<br />
+T   explicit codecvt(size_t refs = 0)<br />
+T   result out(stateT&amp; state,<br />
+     const internT* from, const internT* from_end, const internT*&amp; from_next,<br />
+           externT*   to,       externT* to_limit, externT*&amp; to_next) const;<br />
+T   result unshift(stateT&amp; state,<br />
+           externT*   to,        externT* to_limit, externT*&amp; to_next) const;<br />
+T   result in(stateT&amp; state,<br />
+     const externT* from, const externT* from_end, const externT*&amp; from_next,<br />
+           internT*   to,       internT* to_limit, internT*&amp; to_next) const;<br />
+T   int encoding() const throw();<br />
+T   bool always_noconv() const throw();<br />
+T   int length(const stateT&amp;, const externT* from, const externT* end,<br />
+               size_t max) const;<br />
+T   int max_length() const throw();<br />
+T   static locale::id id;<br />
+<br />
+   protected:<br />
+T   ~codecvt();                   // virtual<br />
+T   virtual result do_out(stateT&amp; state,<br />
+     const internT* from, const internT* from_end, const internT*&amp; from_next,<br />
+           externT* to,         externT* to_limit, externT*&amp; to_next) const;<br />
+T   virtual result do_in(stateT&amp; state,<br />
+T    const externT* from, const externT* from_end, const externT*&amp; from_next,<br />
+           internT* to,         internT* to_limit, internT*&amp; to_next) const;<br />
+T   virtual result do_unshift(stateT&amp; state,<br />
+           externT* to,         externT* to_limit, externT*&amp; to_next) const;<br />
+T   virtual int do_encoding() const throw();<br />
+T   virtual bool do_always_noconv() const throw();<br />
+T   virtual int do_length(const stateT&amp;, const externT* from,<br />
+                          const externT* end, size_t max) const;<br />
+T   virtual int do_max_length() const throw();<br />
+   };<br />
+   }<br />
+<br />
+<br />
+   22.2.1.6  Template class                   [lib.locale.codecvt.byname]<br />
+       codecvt_byname<br />
+<br />
+X  template &lt;class internT, class externT, class stateT&gt;<br />
+   class codecvt_byname : public codecvt&lt;internT, externT, stateT&gt; {<br />
+   public:<br />
+S   explicit codecvt_byname(const char*, size_t refs = 0);<br />
+   protected:<br />
+S  ~codecvt_byname();             // virtual<br />
+S   virtual result do_out(stateT&amp; state,<br />
+      const internT* from, const internT* from_end, const internT*&amp; from_next,<br />
+            externT* to,         externT* to_limit, externT*&amp; to_next) const;<br />
+S   virtual result do_in(stateT&amp; state,<br />
+      const externT* from, const externT* from_end, const externT*&amp; from_next,<br />
+            internT* to,         internT* to_limit, internT*&amp; to_next) const;<br />
+S   virtual result do_unshift(stateT&amp; state,<br />
+            externT* to,         externT* to_limit, externT*&amp; to_next) const;<br />
+S   virtual int do_encoding() const throw();<br />
+S   virtual bool do_always_noconv() const throw();<br />
+S   virtual int do_length(const stateT&amp;, const externT* from,<br />
+                          const externT* end, size_t max) const;<br />
+S   virtual result do_unshift(stateT&amp; state,<br />
+           externT* to, externT* to_limit, externT*&amp; to_next) const;<br />
+S   virtual int do_max_length() const throw();<br />
+    };<br />
+<br />
+<br />
+   22.2.2.1  Template class num_get                  [lib.locale.num.get]<br />
+<br />
+X   template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;<br />
+    class num_get : public locale::facet {<br />
+    public:<br />
+T     typedef charT            char_type;<br />
+T     typedef InputIterator    iter_type;<br />
+T     explicit num_get(size_t refs = 0);<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, bool&amp; v)           const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp; ,<br />
+                    ios_base::iostate&amp; err, long&amp; v)           const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, unsigned short&amp; v) const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, unsigned int&amp; v)   const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, unsigned long&amp; v)  const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, float&amp; v)          const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, double&amp; v)         const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, long double&amp; v)    const;<br />
+T     iter_type get(iter_type in, iter_type end, ios_base&amp;,<br />
+                    ios_base::iostate&amp; err, void*&amp; v)          const;<br />
+T     static locale::id id;<br />
+<br />
+    protected:<br />
+T    ~num_get();                  // virtual<br />
+T     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, bool&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, long&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, unsigned short&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, unsigned int&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, unsigned long&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, float&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, double&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, long double&amp; v) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,<br />
+          ios_base::iostate&amp; err, void*&amp; v) const;<br />
+    };<br />
+<br />
+<br />
+<br />
+   22.2.2.2  Template class num_put                   [lib.locale.nm.put]<br />
+<br />
+X   template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;<br />
+    class num_put : public locale::facet {<br />
+    public:<br />
+T     typedef charT            char_type;<br />
+T     typedef OutputIterator   iter_type;<br />
+T     explicit num_put(size_t refs = 0);<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill, bool v) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill, long v) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill,<br />
+                    unsigned long v) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill,<br />
+                    double v) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill,<br />
+                    long double v) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill,<br />
+                    const void* v) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~num_put();                  // virtual<br />
+T     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               bool v) const;<br />
+T     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               long v) const;<br />
+T     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               unsigned long) const;<br />
+S     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               double v) const;<br />
+S     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               long double v) const;<br />
+T     virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,<br />
+                               const void* v) const;<br />
+    };<br />
+   }<br />
+<br />
+   22.2.3.1  Template class numpunct                [lib.locale.numpunct]<br />
+<br />
+T   template &lt;class charT&gt;<br />
+    class numpunct : public locale::facet {<br />
+    public:<br />
+T     typedef charT               char_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit numpunct(size_t refs = 0);<br />
+T     char_type    decimal_point()   const;<br />
+T     char_type    thousands_sep()   const;<br />
+T     string       grouping()        const;<br />
+T     string_type  truename()        const;<br />
+T     string_type  falsename()       const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~numpunct();                 // virtual<br />
+T     virtual char_type    do_decimal_point() const;<br />
+T     virtual char_type    do_thousands_sep() const;<br />
+T     virtual string       do_grouping()      const;<br />
+T     virtual string_type  do_truename()      const;      // for bool<br />
+T     virtual string_type  do_falsename()     const;      // for bool<br />
+    };<br />
+   }<br />
+<br />
+<br />
+<br />
+   22.2.3.2  Template class                  [lib.locale.numpunct.byname]<br />
+       numpunct_byname<br />
+<br />
+X   template &lt;class charT&gt;<br />
+    class numpunct_byname : public numpunct&lt;charT&gt; {<br />
+   // this class is specialized for char and wchar_t.<br />
+    public:<br />
+T     typedef charT                char_type;<br />
+T     typedef basic_string&lt;charT&gt;  string_type;<br />
+S     explicit numpunct_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+S    ~numpunct_byname();          // virtual<br />
+S     virtual char_type    do_decimal_point() const;<br />
+S     virtual char_type    do_thousands_sep() const;<br />
+S     virtual string       do_grouping()      const;<br />
+S     virtual string_type  do_truename()      const;      // for bool<br />
+S     virtual string_type  do_falsename()     const;      // for bool<br />
+    };<br />
+<br />
+<br />
+   22.2.4.1  Template class collate                  [lib.locale.collate]<br />
+<br />
+T   template &lt;class charT&gt;<br />
+    class collate : public locale::facet {<br />
+    public:<br />
+T     typedef charT               char_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit collate(size_t refs = 0);<br />
+T     int compare(const charT* low1, const charT* high1,<br />
+                  const charT* low2, const charT* high2) const;<br />
+T     string_type transform(const charT* low, const charT* high) const;<br />
+T     long hash(const charT* low, const charT* high) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~collate();                  // virtual<br />
+T     virtual int    do_compare(const charT* low1, const charT* high1,<br />
+                                const charT* low2, const charT* high2) const;<br />
+T     virtual string_type do_transform<br />
+                               (const charT* low, const charT* high) const;<br />
+T     virtual long   do_hash   (const charT* low, const charT* high) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.4.2  Template class                   [lib.locale.collate.byname]<br />
+       collate_byname<br />
+<br />
+X   template &lt;class charT&gt;<br />
+    class collate_byname : public collate&lt;charT&gt; {<br />
+    public:<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit collate_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+S    ~collate_byname();           // virtual<br />
+S     virtual int    do_compare(const charT* low1, const charT* high1,<br />
+                                const charT* low2, const charT* high2) const;<br />
+S     virtual string_type do_transform<br />
+                               (const charT* low, const charT* high) const;<br />
+S     virtual long   do_hash   (const charT* low, const charT* high) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.5.1  Template class time_get                [lib.locale.time.get]<br />
+<br />
+T   class time_base {<br />
+    public:<br />
+T     enum dateorder { no_order, dmy, mdy, ymd, ydm };<br />
+    };<br />
+<br />
+    [Note: semantics of time_get members are implementation-defined.<br />
+     To complete implementation requires documenting behavior.]<br />
+<br />
+X   template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;<br />
+    class time_get : public locale::facet, public time_base {<br />
+    public:<br />
+T     typedef charT            char_type;<br />
+T     typedef InputIterator    iter_type;<br />
+T     explicit time_get(size_t refs = 0);<br />
+<br />
+T     dateorder date_order()  const { return do_date_order(); }<br />
+T     iter_type get_time(iter_type s, iter_type end, ios_base&amp; f,<br />
+                         ios_base::iostate&amp; err, tm* t)  const;<br />
+T     iter_type get_date(iter_type s, iter_type end, ios_base&amp; f,<br />
+                         ios_base::iostate&amp; err, tm* t)  const;<br />
+T     iter_type get_weekday(iter_type s, iter_type end, ios_base&amp; f,<br />
+                            ios_base::iostate&amp; err, tm* t) const;<br />
+T     iter_type get_monthname(iter_type s, iter_type end, ios_base&amp; f,<br />
+                              ios_base::iostate&amp; err, tm* t) const;<br />
+T     iter_type get_year(iter_type s, iter_type end, ios_base&amp; f,<br />
+                         ios_base::iostate&amp; err, tm* t) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+     ~time_get();                 // virtual<br />
+X     virtual dateorder do_date_order()  const;<br />
+S     virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&amp;,<br />
+                                       ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_monthname(iter_type s, ios_base&amp;,<br />
+                                         ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+    };<br />
+<br />
+<br />
+<br />
+   22.2.5.2  Template class                  [lib.locale.time.get.byname]<br />
+       time_get_byname<br />
+<br />
+X   template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;<br />
+    class time_get_byname : public time_get&lt;charT, InputIterator&gt; {<br />
+    public:<br />
+T     typedef time_base::dateorder dateorder;<br />
+T     typedef InputIterator        iter_type<br />
+<br />
+S     explicit time_get_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+S    ~time_get_byname();          // virtual<br />
+S     virtual dateorder do_date_order()  const;<br />
+S     virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+T     virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&amp;,<br />
+                                       ios_base::iostate&amp; err, tm* t) const;<br />
+T     virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&amp;,<br />
+                                         ios_base::iostate&amp; err, tm* t) const;<br />
+S     virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&amp;,<br />
+                                    ios_base::iostate&amp; err, tm* t) const;<br />
+    };<br />
+   }<br />
+<br />
+   22.2.5.3  Template class time_put                [lib.locale.time.put]<br />
+<br />
+X   template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;<br />
+    class time_put : public locale::facet {<br />
+    public:<br />
+T     typedef charT            char_type;<br />
+T     typedef OutputIterator   iter_type;<br />
+T     explicit time_put(size_t refs = 0);<br />
+      // the following is implemented in terms of other member functions.<br />
+S     iter_type put(iter_type s, ios_base&amp; f, char_type fill, const tm* tmb,<br />
+                    const charT* pattern, const charT* pat_end) const;<br />
+T     iter_type put(iter_type s, ios_base&amp; f, char_type fill,<br />
+                    const tm* tmb, char format, char modifier = 0) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~time_put();                 // virtual<br />
+S     virtual iter_type do_put(iter_type s, ios_base&amp;, char_type, const tm* t,<br />
+                               char format, char modifier) const;<br />
+    };<br />
+<br />
+<br />
+<br />
+   22.2.5.4  Template class                  [lib.locale.time.put.byname]<br />
+       time_put_byname<br />
+<br />
+T   template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;<br />
+    class time_put_byname : public time_put&lt;charT, OutputIterator&gt;<br />
+    {<br />
+    public:<br />
+T     typedef charT          char_type;<br />
+T     typedef OutputIterator iter_type;<br />
+<br />
+T     explicit time_put_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+T    ~time_put_byname();          // virtual<br />
+S     virtual iter_type do_put(iter_type s, ios_base&amp;, char_type, const tm* t,<br />
+                               char format, char modifier) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.6.1  Template class money_get              [lib.locale.money.get]<br />
+<br />
+X   template &lt;class charT,<br />
+              class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;<br />
+    class money_get : public locale::facet {<br />
+    public:<br />
+T     typedef charT               char_type;<br />
+T     typedef InputIterator       iter_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit money_get(size_t refs = 0);<br />
+T     iter_type get(iter_type s, iter_type end, bool intl,<br />
+                    ios_base&amp; f, ios_base::iostate&amp; err,<br />
+                    long double&amp; units) const;<br />
+T     iter_type get(iter_type s, iter_type end, bool intl,<br />
+                    ios_base&amp; f, ios_base::iostate&amp; err,<br />
+                    string_type&amp; digits) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~money_get();                // virtual<br />
+S     virtual iter_type do_get(iter_type, iter_type, bool, ios_base&amp;,<br />
+                       ios_base::iostate&amp; err, long double&amp; units) const;<br />
+S     virtual iter_type do_get(iter_type, iter_type, bool, ios_base&amp;,<br />
+                       ios_base::iostate&amp; err, string_type&amp; digits) const;<br />
+    };<br />
+<br />
+   22.2.6.2  Template class money_put              [lib.locale.money.put]<br />
+<br />
+X   template &lt;class charT,<br />
+              class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;<br />
+    class money_put : public locale::facet {<br />
+    public:<br />
+T     typedef charT               char_type;<br />
+T     typedef OutputIterator      iter_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit money_put(size_t refs = 0);<br />
+T     iter_type put(iter_type s, bool intl, ios_base&amp; f,<br />
+                    char_type fill, long double units) const;<br />
+T     iter_type put(iter_type s, bool intl, ios_base&amp; f,<br />
+                    char_type fill, const string_type&amp; digits) const;<br />
+T     static locale::id id;<br />
+<br />
+    protected:<br />
+T    ~money_put();                // virtual<br />
+S     virtual iter_type<br />
+        do_put(iter_type, bool, ios_base&amp;, char_type fill,<br />
+               long double units) const;<br />
+S     virtual iter_type<br />
+        do_put(iter_type, bool, ios_base&amp;, char_type fill,<br />
+               const string_type&amp; digits) const;<br />
+    };<br />
+<br />
+<br />
+   22.2.6.3  Template class moneypunct            [lib.locale.moneypunct]<br />
+<br />
+T   class money_base {<br />
+    public:<br />
+T     enum part { none, space, symbol, sign, value };<br />
+T     struct pattern { char field[4]; };<br />
+    };<br />
+<br />
+X   template &lt;class charT, bool International = false&gt;<br />
+    class moneypunct : public locale::facet, public money_base {<br />
+    public:<br />
+T     typedef charT char_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit moneypunct(size_t refs = 0);<br />
+T     charT        decimal_point() const;<br />
+T     charT        thousands_sep() const;<br />
+T     string       grouping()      const;<br />
+T     string_type  curr_symbol()   const;<br />
+T     string_type  positive_sign() const;<br />
+T     string_type  negative_sign() const;<br />
+T     int          frac_digits()   const;<br />
+T     pattern      pos_format()    const;<br />
+T     pattern      neg_format()    const;<br />
+T     static locale::id id;<br />
+T     static const bool intl = International;<br />
+    protected:<br />
+T    ~moneypunct();               // virtual<br />
+S     virtual charT        do_decimal_point() const;<br />
+S     virtual charT        do_thousands_sep() const;<br />
+S     virtual string       do_grouping()      const;<br />
+S     virtual string_type  do_curr_symbol()   const;<br />
+S     virtual string_type  do_positive_sign() const;<br />
+S     virtual string_type  do_negative_sign() const;<br />
+S     virtual int          do_frac_digits()   const;<br />
+T     virtual pattern      do_pos_format()    const;<br />
+T     virtual pattern      do_neg_format()    const;<br />
+    };<br />
+   }<br />
+<br />
+   22.2.6.4  Template class                [lib.locale.moneypunct.byname]<br />
+       moneypunct_byname<br />
+<br />
+X   template &lt;class charT, bool Intl = false&gt;<br />
+    class moneypunct_byname : public moneypunct&lt;charT, Intl&gt; {<br />
+    public:<br />
+T     typedef money_base::pattern pattern;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+<br />
+T     explicit moneypunct_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+T    ~moneypunct_byname();        // virtual<br />
+S     virtual charT        do_decimal_point() const;<br />
+S     virtual charT        do_thousands_sep() const;<br />
+S     virtual string       do_grouping()      const;<br />
+S     virtual string_type  do_curr_symbol()   const;<br />
+S     virtual string_type  do_positive_sign() const;<br />
+S     virtual string_type  do_negative_sign() const;<br />
+S     virtual int          do_frac_digits()   const;<br />
+S     virtual pattern      do_pos_format()    const;<br />
+S     virtual pattern      do_neg_format()    const;<br />
+    };<br />
+<br />
+   22.2.7.1  Template class messages                [lib.locale.messages]<br />
+<br />
+T   class messages_base {<br />
+    public:<br />
+T     typedef int catalog;<br />
+    };<br />
+<br />
+X   template &lt;class charT&gt;<br />
+    class messages : public locale::facet, public messages_base {<br />
+    public:<br />
+T     typedef charT char_type;<br />
+T     typedef basic_string&lt;charT&gt; string_type;<br />
+T     explicit messages(size_t refs = 0);<br />
+T     catalog open(const basic_string&lt;char&gt;&amp; fn, const locale&amp;) const;<br />
+T     string_type  get(catalog c, int set, int msgid,<br />
+                       const string_type&amp; dfault) const;<br />
+T     void    close(catalog c) const;<br />
+T     static locale::id id;<br />
+    protected:<br />
+T    ~messages();                 // virtual<br />
+S     virtual catalog do_open(const basic_string&lt;char&gt;&amp;, const locale&amp;) const;<br />
+S     virtual string_type  do_get(catalog, int set, int msgid,<br />
+                             const string_type&amp; dfault) const;<br />
+S     virtual void    do_close(catalog) const;<br />
+    };<br />
+<br />
+   22.2.7.2  Template class                  [lib.locale.messages.byname]<br />
+       messages_byname<br />
+<br />
+<br />
+X   template &lt;class charT&gt;<br />
+    class messages_byname : public messages&lt;charT&gt; {<br />
+    public:<br />
+T     typedef messages_base::catalog catalog;<br />
+T     typedef basic_string&lt;charT&gt;    string_type;<br />
+<br />
+T     explicit messages_byname(const char*, size_t refs = 0);<br />
+    protected:<br />
+T    ~messages_byname();          // virtual<br />
+S     virtual catalog do_open(const basic_string&lt;char&gt;&amp;, const locale&amp;) const;<br />
+S     virtual string_type  do_get(catalog, int set, int msgid,<br />
+                             const string_type&amp; dfault) const;<br />
+S     virtual void    do_close(catalog) const;<br />
+    };<br />
+<br />
+<br />
+   22.3  C Library Locales                                [lib.c.locales]<br />
+<br />
+<br />
+                   Table 13--Header &lt;clocale&gt; synopsis<br />
+            Macros:<br />
+X                        LC_ALL        LC_COLLATE   LC_CTYPE<br />
+X                        LC_MONETARY   LC_NUMERIC   LC_TIME<br />
+X                        NULL<br />
+X           Struct:      lconv<br />
+X           Functions:   localeconv    setlocale<br />
+<br />
+<br />
+   23.2  Sequences                                        [lib.sequences]<br />
+<br />
+   &lt;deque&gt;, &lt;list&gt;, &lt;queue&gt;, &lt;stack&gt;, and &lt;vector&gt;.<br />
+<br />
+   Header &lt;deque&gt; synopsis<br />
+<br />
+T   template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class deque;<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(deque&lt;T,Allocator&gt;&amp; x, deque&lt;T,Allocator&gt;&amp; y);<br />
+   }<br />
+<br />
+   Header &lt;list&gt; synopsis<br />
+<br />
+T   template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class list;<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(list&lt;T,Allocator&gt;&amp; x, list&lt;T,Allocator&gt;&amp; y);<br />
+   }<br />
+<br />
+   Header &lt;queue&gt; synopsis<br />
+<br />
+   namespace std {<br />
+T   template &lt;class T, class Container = deque&lt;T&gt; &gt; class queue;<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator==(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt; (const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator!=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt; (const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt;=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt;=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container = vector&lt;T&gt;,<br />
+              class Compare = less&lt;typename Container::value_type&gt; &gt;<br />
+T   class priority_queue;<br />
+   }<br />
+<br />
+   Header &lt;stack&gt; synopsis<br />
+<br />
+   namespace std {<br />
+T   template &lt;class T, class Container = deque&lt;T&gt; &gt; class stack;<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator==(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator!=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+   }<br />
+<br />
+   Header &lt;vector&gt; synopsis<br />
+<br />
+T   template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class vector;<br />
+<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(vector&lt;T,Allocator&gt;&amp; x, vector&lt;T,Allocator&gt;&amp; y);<br />
+<br />
+T   template &lt;class Allocator&gt; class vector&lt;bool,Allocator&gt;;<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator==(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&lt; (const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator!=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&gt; (const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&gt;=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&lt;=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      void swap(vector&lt;bool,Allocator&gt;&amp; x, vector&lt;bool,Allocator&gt;&amp; y);<br />
+   }<br />
+<br />
+   23.2.1  Template class deque                               [lib.deque]<br />
+<br />
+    template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;<br />
+T   class deque {<br />
+    public:<br />
+      // types:<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef T                                     value_type;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+      // _lib.deque.cons_ construct/copy/destroy:<br />
+T     explicit deque(const Allocator&amp; = Allocator());<br />
+T     explicit deque(size_type n, const T&amp; value = T(),<br />
+          const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        deque(InputIterator first, InputIterator last,<br />
+              const Allocator&amp; = Allocator());<br />
+T     deque(const deque&lt;T,Allocator&gt;&amp; x);<br />
+T    ~deque();<br />
+T     deque&lt;T,Allocator&gt;&amp; operator=(const deque&lt;T,Allocator&gt;&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void assign(InputIterator first, InputIterator last);<br />
+T     void assign(size_type n, const T&amp; t);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // _lib.deque.capacity_ capacity:<br />
+T     size_type size() const;<br />
+T     size_type max_size() const;<br />
+T     void      resize(size_type sz, T c = T());<br />
+T     bool      empty() const;<br />
+<br />
+      // element access:<br />
+T     reference       operator[](size_type n);<br />
+T     const_reference operator[](size_type n) const;<br />
+T     reference       at(size_type n);<br />
+T     const_reference at(size_type n) const;<br />
+T     reference       front();<br />
+T     const_reference front() const;<br />
+T     reference       back();<br />
+T     const_reference back() const;<br />
+      // _lib.deque.modifiers_ modifiers:<br />
+T     void push_front(const T&amp; x);<br />
+T     void push_back(const T&amp; x);<br />
+T     iterator insert(iterator position, const T&amp; x);<br />
+T     void     insert(iterator position, size_type n, const T&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void insert (iterator position,<br />
+                     InputIterator first, InputIterator last);<br />
+T     void pop_front();<br />
+T     void pop_back();<br />
+T     iterator erase(iterator position);<br />
+T     iterator erase(iterator first, iterator last);<br />
+T     void     swap(deque&lt;T,Allocator&gt;&amp;);<br />
+T     void     clear();<br />
+    };<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const deque&lt;T,Allocator&gt;&amp; x,<br />
+                      const deque&lt;T,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(deque&lt;T,Allocator&gt;&amp; x, deque&lt;T,Allocator&gt;&amp; y);<br />
+<br />
+<br />
+   23.2.2  Template class list                                 [lib.list]<br />
+<br />
+T   template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;<br />
+    class list {<br />
+    public:<br />
+      // types:<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef T                                     value_type;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+<br />
+      // _lib.list.cons_ construct/copy/destroy:<br />
+T     explicit list(const Allocator&amp; = Allocator());<br />
+T     explicit list(size_type n, const T&amp; value = T(),<br />
+                    const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        list(InputIterator first, InputIterator last,<br />
+             const Allocator&amp; = Allocator());<br />
+T     list(const list&lt;T,Allocator&gt;&amp; x);<br />
+T    ~list();<br />
+T     list&lt;T,Allocator&gt;&amp; operator=(const list&lt;T,Allocator&gt;&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void assign(InputIterator first, InputIterator last);<br />
+T     void assign(size_type n, const T&amp; t);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // _lib.list.capacity_ capacity:<br />
+T     bool      empty() const;<br />
+T     size_type size() const;<br />
+T     size_type max_size() const;<br />
+T     void      resize(size_type sz, T c = T());<br />
+      // element access:<br />
+T     reference       front();<br />
+T     const_reference front() const;<br />
+T     reference       back();<br />
+T     const_reference back() const;<br />
+      // _lib.list.modifiers_ modifiers:<br />
+T     void push_front(const T&amp; x);<br />
+T     void pop_front();<br />
+T     void push_back(const T&amp; x);<br />
+T     void pop_back();<br />
+T     iterator insert(iterator position, const T&amp; x);<br />
+T     void     insert(iterator position, size_type n, const T&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void insert(iterator position, InputIterator first,<br />
+                    InputIterator last);<br />
+T     iterator erase(iterator position);<br />
+T     iterator erase(iterator position, iterator last);<br />
+T     void     swap(list&lt;T,Allocator&gt;&amp;);<br />
+T     void     clear();<br />
+      // _lib.list.ops_ list operations:<br />
+T     void splice(iterator position, list&lt;T,Allocator&gt;&amp; x);<br />
+T     void splice(iterator position, list&lt;T,Allocator&gt;&amp; x, iterator i);<br />
+T     void splice(iterator position, list&lt;T,Allocator&gt;&amp; x, iterator first,<br />
+                  iterator last);<br />
+T     void remove(const T&amp; value);<br />
+T     template &lt;class Predicate&gt; void remove_if(Predicate pred);<br />
+<br />
+T     void unique();<br />
+T     template &lt;class BinaryPredicate&gt;<br />
+        void unique(BinaryPredicate binary_pred);<br />
+T     void merge(list&lt;T,Allocator&gt;&amp; x);<br />
+T     template &lt;class Compare&gt; void merge(list&lt;T,Allocator&gt;&amp; x, Compare comp);<br />
+        void sort();<br />
+T     template &lt;class Compare&gt; void sort(Compare comp);<br />
+        void reverse();<br />
+    };<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(list&lt;T,Allocator&gt;&amp; x, list&lt;T,Allocator&gt;&amp; y);<br />
+<br />
+<br />
+   23.2.3.1  Template class queue                             [lib.queue]<br />
+<br />
+T   template &lt;class T, class Container = deque&lt;T&gt; &gt;<br />
+    class queue {<br />
+    public:<br />
+T     typedef typename Container::value_type            value_type;<br />
+T     typedef typename Container::size_type             size_type;<br />
+T     typedef          Container                        container_type;<br />
+    protected:<br />
+T     Container c;<br />
+    public:<br />
+T     explicit queue(const Container&amp; = Container());<br />
+<br />
+T     bool      empty() const             { return c.empty(); }<br />
+T     size_type size()  const             { return c.size(); }<br />
+T     value_type&amp;       front()           { return c.front(); }<br />
+T     const value_type&amp; front() const     { return c.front(); }<br />
+T     value_type&amp;       back()            { return c.back(); }<br />
+T     const value_type&amp; back() const      { return c.back(); }<br />
+T     void push(const value_type&amp; x)      { c.push_back(x); }<br />
+T     void pop()                          { c.pop_front(); }<br />
+    };<br />
+<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator==(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt; (const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator!=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt; (const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt;=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt;=(const queue&lt;T, Container&gt;&amp; x,<br />
+                      const queue&lt;T, Container&gt;&amp; y);<br />
+<br />
+   23.2.3.2  Template class priority_queue           [lib.priority.queue]<br />
+<br />
+T   template &lt;class T, class Container = vector&lt;T&gt;,<br />
+              class Compare = less&lt;typename Container::value_type&gt; &gt;<br />
+    class priority_queue {<br />
+    public:<br />
+T     typedef typename Container::value_type            value_type;<br />
+T     typedef typename Container::size_type             size_type;<br />
+T     typedef          Container                        container_type;<br />
+    protected:<br />
+T     Container c;<br />
+T     Compare comp;<br />
+    public:<br />
+T     explicit priority_queue(const Compare&amp; x = Compare(),<br />
+                              const Container&amp; = Container());<br />
+T     template &lt;class InputIterator&gt;<br />
+        priority_queue(InputIterator first, InputIterator last,<br />
+                       const Compare&amp; x = Compare(),<br />
+                       const Container&amp; = Container());<br />
+<br />
+T     bool      empty() const       { return c.empty(); }<br />
+T     size_type size()  const       { return c.size(); }<br />
+T     const value_type&amp; top() const { return c.front(); }<br />
+T     void push(const value_type&amp; x);<br />
+T     void pop();<br />
+    };<br />
+<br />
+   23.2.3.3  Template class stack                             [lib.stack]<br />
+<br />
+T   template &lt;class T, class Container = deque&lt;T&gt; &gt;<br />
+    class stack {<br />
+    public:<br />
+T     typedef typename Container::value_type            value_type;<br />
+T     typedef typename Container::size_type             size_type;<br />
+T     typedef          Container                        container_type;<br />
+    protected:<br />
+T     Container c;<br />
+    public:<br />
+T     explicit stack(const Container&amp; = Container());<br />
+<br />
+T     bool      empty() const             { return c.empty(); }<br />
+T     size_type size()  const             { return c.size(); }<br />
+T     value_type&amp;       top()             { return c.back(); }<br />
+T     const value_type&amp; top() const       { return c.back(); }<br />
+T     void push(const value_type&amp; x)      { c.push_back(x); }<br />
+T     void pop()                          { c.pop_back(); }<br />
+    };<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator==(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator!=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+T   template &lt;class T, class Container&gt;<br />
+      bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,<br />
+                      const stack&lt;T, Container&gt;&amp; y);<br />
+<br />
+   23.2.4  Template class vector                             [lib.vector]<br />
+<br />
+    template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;<br />
+T   class vector {<br />
+    public:<br />
+      // types:<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef T                                     value_type;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+      // _lib.vector.cons_ construct/copy/destroy:<br />
+T     explicit vector(const Allocator&amp; = Allocator());<br />
+T     explicit vector(size_type n, const T&amp; value = T(),<br />
+          const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        vector(InputIterator first, InputIterator last,<br />
+          const Allocator&amp; = Allocator());<br />
+T     vector(const vector&lt;T,Allocator&gt;&amp; x);<br />
+T    ~vector();<br />
+T     vector&lt;T,Allocator&gt;&amp; operator=(const vector&lt;T,Allocator&gt;&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void assign(InputIterator first, InputIterator last);<br />
+T     void assign(size_type n, const T&amp; u);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // _lib.vector.capacity_ capacity:<br />
+T     size_type size() const;<br />
+T     size_type max_size() const;<br />
+T     void      resize(size_type sz, T c = T());<br />
+T     size_type capacity() const;<br />
+T     bool      empty() const;<br />
+T     void      reserve(size_type n);<br />
+<br />
+      // element access:<br />
+T     reference       operator[](size_type n);<br />
+T     const_reference operator[](size_type n) const;<br />
+T     const_reference at(size_type n) const;<br />
+T     reference       at(size_type n);<br />
+T     reference       front();<br />
+T     const_reference front() const;<br />
+T     reference       back();<br />
+T     const_reference back() const;<br />
+      // _lib.vector.modifiers_ modifiers:<br />
+T     void push_back(const T&amp; x);<br />
+T     void pop_back();<br />
+T     iterator insert(iterator position, const T&amp; x);<br />
+T     void     insert(iterator position, size_type n, const T&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+          void insert(iterator position,<br />
+                      InputIterator first, InputIterator last);<br />
+T     iterator erase(iterator position);<br />
+T     iterator erase(iterator first, iterator last);<br />
+T     void     swap(vector&lt;T,Allocator&gt;&amp;);<br />
+T     void     clear();<br />
+    };<br />
+<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator==(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt; (const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator!=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt; (const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&gt;=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      bool operator&lt;=(const vector&lt;T,Allocator&gt;&amp; x,<br />
+                      const vector&lt;T,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class T, class Allocator&gt;<br />
+      void swap(vector&lt;T,Allocator&gt;&amp; x, vector&lt;T,Allocator&gt;&amp; y);<br />
+<br />
+<br />
+   23.2.5  Class vector&lt;bool&gt;                           [lib.vector.bool]<br />
+<br />
+T   template &lt;class Allocator&gt; class vector&lt;bool, Allocator&gt; {<br />
+    public:<br />
+      // types:<br />
+T     typedef bool                                  const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef bool                                  value_type;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef implementation defined                pointer;<br />
+T     typedef implementation defined                const_pointer<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+      // bit reference:<br />
+T     class reference {<br />
+       friend class vector;<br />
+T      reference();<br />
+      public:<br />
+T      ~reference();<br />
+T       operator bool() const;<br />
+T       reference&amp; operator=(const bool x);<br />
+T       reference&amp; operator=(const reference&amp; x);<br />
+T       void flip();              // flips the bit<br />
+      };<br />
+<br />
+      // construct/copy/destroy:<br />
+T     explicit vector(const Allocator&amp; = Allocator());<br />
+T     explicit vector(size_type n, const bool&amp; value = bool(),<br />
+                      const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        vector(InputIterator first, InputIterator last,<br />
+          const Allocator&amp; = Allocator());<br />
+T     vector(const vector&lt;bool,Allocator&gt;&amp; x);<br />
+T    ~vector();<br />
+T     vector&lt;bool,Allocator&gt;&amp; operator=(const vector&lt;bool,Allocator&gt;&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void assign(InputIterator first, InputIterator last);<br />
+T     void assign(size_type n, const T&amp; t);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // capacity:<br />
+T     size_type size() const;<br />
+T     size_type max_size() const;<br />
+T     void      resize(size_type sz, bool c = false);<br />
+T     size_type capacity() const;<br />
+T     bool      empty() const;<br />
+T     void      reserve(size_type n);<br />
+      // element access:<br />
+T     reference       operator[](size_type n);<br />
+T     const_reference operator[](size_type n) const;<br />
+T     const_reference at(size_type n) const;<br />
+T     reference       at(size_type n);<br />
+T     reference       front();<br />
+T     const_reference front() const;<br />
+T     reference       back();<br />
+T     const_reference back() const;<br />
+      // modifiers:<br />
+T     void push_back(const bool&amp; x);<br />
+T     void pop_back();<br />
+T     iterator insert(iterator position, const bool&amp; x);<br />
+T     void     insert (iterator position, size_type n, const bool&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+          void insert(iterator position,<br />
+                      InputIterator first, InputIterator last);<br />
+T     iterator erase(iterator position);<br />
+T     iterator erase(iterator first, iterator last);<br />
+T     void swap(vector&lt;bool,Allocator&gt;&amp;);<br />
+T     static void swap(reference x, reference y);<br />
+T     void flip();                // flips all bits<br />
+T     void clear();<br />
+    };<br />
+<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator==(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&lt; (const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator!=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&gt; (const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&gt;=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+T   template &lt;class Allocator&gt;<br />
+      bool operator&lt;=(const vector&lt;bool,Allocator&gt;&amp; x,<br />
+                      const vector&lt;bool,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class Allocator&gt;<br />
+      void swap(vector&lt;bool,Allocator&gt;&amp; x, vector&lt;bool,Allocator&gt;&amp; y);<br />
+<br />
+   23.3  Associative containers                         [lib.associative]<br />
+<br />
+ &lt;map&gt; and &lt;set&gt;:<br />
+<br />
+   Header &lt;map&gt; synopsis<br />
+<br />
+    template &lt;class Key, class T, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;<br />
+T     class map;<br />
+<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator==(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator!=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      void swap(map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;<br />
+      class multimap;<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator==(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator!=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+   }<br />
+<br />
+   Header &lt;set&gt; synopsis<br />
+<br />
+    template &lt;class Key, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;Key&gt; &gt;<br />
+T     class set;<br />
+<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator==(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator!=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      void swap(set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;Key&gt; &gt;<br />
+      class multiset;<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator==(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator!=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      void swap(multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+   }<br />
+<br />
+   23.3.1  Template class map                                   [lib.map]<br />
+<br />
+    template &lt;class Key, class T, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;<br />
+T     class map {<br />
+    public:<br />
+      // types:<br />
+T     typedef Key                                   key_type;<br />
+T     typedef T                                     mapped_type;<br />
+T     typedef pair&lt;const Key, T&gt;                    value_type;<br />
+T     typedef Compare                               key_compare;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+T     class value_compare<br />
+        : public binary_function&lt;value_type,value_type,bool&gt; {<br />
+      friend class map;<br />
+      protected:<br />
+T       Compare comp;<br />
+T       value_compare(Compare c) : comp(c) {}<br />
+      public:<br />
+T       bool operator()(const value_type&amp; x, const value_type&amp; y) const {<br />
+          return comp(x.first, y.first);<br />
+        }<br />
+      };<br />
+<br />
+      // _lib.map.cons_ construct/copy/destroy:<br />
+T     explicit map(const Compare&amp; comp = Compare(),<br />
+                   const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        map(InputIterator first, InputIterator last,<br />
+            const Compare&amp; comp = Compare(), const Allocator&amp; = Allocator());<br />
+T     map(const map&lt;Key,T,Compare,Allocator&gt;&amp; x);<br />
+T    ~map();<br />
+T     map&lt;Key,T,Compare,Allocator&gt;&amp;<br />
+        operator=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x);<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // capacity:<br />
+T     bool      empty() const;<br />
+T     size_type size() const;<br />
+T     size_type max_size() const;<br />
+      // _lib.map.access_ element access:<br />
+T     T&amp; operator[](const key_type&amp; x);<br />
+      // modifiers:<br />
+T     pair&lt;iterator, bool&gt; insert(const value_type&amp; x);<br />
+T     iterator             insert(iterator position, const value_type&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void insert(InputIterator first, InputIterator last);<br />
+T     void      erase(iterator position);<br />
+T     size_type erase(const key_type&amp; x);<br />
+T     void      erase(iterator first, iterator last);<br />
+T     void swap(map&lt;Key,T,Compare,Allocator&gt;&amp;);<br />
+T     void clear();<br />
+      // observers:<br />
+T     key_compare   key_comp() const;<br />
+T     value_compare value_comp() const;<br />
+      // _lib.map.ops_ map operations:<br />
+T     iterator       find(const key_type&amp; x);<br />
+T     const_iterator find(const key_type&amp; x) const;<br />
+T     size_type      count(const key_type&amp; x) const;<br />
+T     iterator       lower_bound(const key_type&amp; x);<br />
+T     const_iterator lower_bound(const key_type&amp; x) const;<br />
+T     iterator       upper_bound(const key_type&amp; x);<br />
+T     const_iterator upper_bound(const key_type&amp; x) const;<br />
+T     pair&lt;iterator,iterator&gt;<br />
+          equal_range(const key_type&amp; x);<br />
+T     pair&lt;const_iterator,const_iterator&gt;<br />
+          equal_range(const key_type&amp; x) const;<br />
+    };<br />
+<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator==(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator!=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      void swap(map&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                map&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+<br />
+   23.3.2  Template class multimap                         [lib.multimap]<br />
+<br />
+    template &lt;class Key, class T, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;<br />
+T   class multimap {<br />
+    public:<br />
+      // types:<br />
+T     typedef Key                                   key_type;<br />
+T     typedef T                                     mapped_type;<br />
+T     typedef pair&lt;const Key,T&gt;                     value_type;<br />
+T     typedef Compare                               key_compare;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+T     class value_compare<br />
+        : public binary_function&lt;value_type,value_type,bool&gt; {<br />
+      friend class multimap;<br />
+      protected:<br />
+T       Compare comp;<br />
+T       value_compare(Compare c) : comp(c) {}<br />
+      public:<br />
+T       bool operator()(const value_type&amp; x, const value_type&amp; y) const {<br />
+          return comp(x.first, y.first);<br />
+        }<br />
+      };<br />
+      // construct/copy/destroy:<br />
+T     explicit multimap(const Compare&amp; comp = Compare(),<br />
+                        const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        multimap(InputIterator first, InputIterator last,<br />
+                 const Compare&amp; comp = Compare(),<br />
+                 const Allocator&amp; = Allocator());<br />
+T     multimap(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x);<br />
+T    ~multimap();<br />
+T     multimap&lt;Key,T,Compare,Allocator&gt;&amp;<br />
+        operator=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x);<br />
+T     allocator_type get_allocator() const;<br />
+<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // capacity:<br />
+T     bool           empty() const;<br />
+T     size_type      size() const;<br />
+T     size_type      max_size() const;<br />
+      // modifiers:<br />
+T     iterator insert(const value_type&amp; x);<br />
+T     iterator insert(iterator position, const value_type&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void insert(InputIterator first, InputIterator last);<br />
+T     void      erase(iterator position);<br />
+T     size_type erase(const key_type&amp; x);<br />
+T     void      erase(iterator first, iterator last);<br />
+T     void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp;);<br />
+T     void clear();<br />
+      // observers:<br />
+T     key_compare    key_comp() const;<br />
+T     value_compare  value_comp() const;<br />
+      // map operations:<br />
+T     iterator       find(const key_type&amp; x);<br />
+T     const_iterator find(const key_type&amp; x) const;<br />
+T     size_type      count(const key_type&amp; x) const;<br />
+T     iterator       lower_bound(const key_type&amp; x);<br />
+T     const_iterator lower_bound(const key_type&amp; x) const;<br />
+T     iterator       upper_bound(const key_type&amp; x);<br />
+T     const_iterator upper_bound(const key_type&amp; x) const;<br />
+T     pair&lt;iterator,iterator&gt;             equal_range(const key_type&amp; x);<br />
+T     pair&lt;const_iterator,const_iterator&gt; equal_range(const key_type&amp; x) const;<br />
+    };<br />
+<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator==(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator!=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                      const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class Key, class T, class Compare, class Allocator&gt;<br />
+      void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,<br />
+                multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);<br />
+<br />
+<br />
+   23.3.3  Template class set                                   [lib.set]<br />
+<br />
+    template &lt;class Key, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;Key&gt; &gt;<br />
+T   class set {<br />
+    public:<br />
+      // types:<br />
+T     typedef Key                                   key_type;<br />
+T     typedef Key                                   value_type;<br />
+T     typedef Compare                               key_compare;<br />
+T     typedef Compare                               value_compare;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type;<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+      // _lib.set.cons_ construct/copy/destroy:<br />
+T     explicit set(const Compare&amp; comp = Compare(),<br />
+                   const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        set(InputIterator first, InputIterator last,<br />
+            const Compare&amp; comp = Compare(), const Allocator&amp; = Allocator());<br />
+T     set(const set&lt;Key,Compare,Allocator&gt;&amp; x);<br />
+T    ~set();<br />
+T     set&lt;Key,Compare,Allocator&gt;&amp;<br />
+        operator=(const set&lt;Key,Compare,Allocator&gt;&amp; x);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // capacity:<br />
+T     bool          empty() const;<br />
+T     size_type     size() const;<br />
+T     size_type     max_size() const;<br />
+      // modifiers:<br />
+T     pair&lt;iterator,bool&gt; insert(const value_type&amp; x);<br />
+T     iterator            insert(iterator position, const value_type&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+T         void insert(InputIterator first, InputIterator last);<br />
+T     void      erase(iterator position);<br />
+T     size_type erase(const key_type&amp; x);<br />
+T     void      erase(iterator first, iterator last);<br />
+T     void swap(set&lt;Key,Compare,Allocator&gt;&amp;);<br />
+T     void clear();<br />
+<br />
+      // observers:<br />
+T     key_compare   key_comp() const;<br />
+T     value_compare value_comp() const;<br />
+      // set operations:<br />
+T     iterator  find(const key_type&amp; x) const;<br />
+T     size_type count(const key_type&amp; x) const;<br />
+T     iterator  lower_bound(const key_type&amp; x) const;<br />
+T     iterator  upper_bound(const key_type&amp; x) const;<br />
+T     pair&lt;iterator,iterator&gt; equal_range(const key_type&amp; x) const;<br />
+    };<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator==(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator!=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      void swap(set&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                set&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+<br />
+   23.3.4  Template class multiset                         [lib.multiset]<br />
+<br />
+    template &lt;class Key, class Compare = less&lt;Key&gt;,<br />
+              class Allocator = allocator&lt;Key&gt; &gt;<br />
+T   class multiset {<br />
+    public:<br />
+      // types:<br />
+T     typedef Key                                   key_type;<br />
+T     typedef Key                                   value_type;<br />
+T     typedef Compare                               key_compare;<br />
+T     typedef Compare                               value_compare;<br />
+T     typedef Allocator                             allocator_type;<br />
+T     typedef typename Allocator::reference         reference;<br />
+T     typedef typename Allocator::const_reference   const_reference;<br />
+T     typedef implementation defined                iterator;<br />
+T     typedef implementation defined                const_iterator;<br />
+T     typedef implementation defined                size_type;<br />
+T     typedef implementation defined                difference_type<br />
+T     typedef typename Allocator::pointer           pointer;<br />
+T     typedef typename Allocator::const_pointer     const_pointer;<br />
+T     typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;<br />
+T     typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;<br />
+<br />
+      // construct/copy/destroy:<br />
+T     explicit multiset(const Compare&amp; comp = Compare(),<br />
+                        const Allocator&amp; = Allocator());<br />
+T     template &lt;class InputIterator&gt;<br />
+        multiset(InputIterator first, InputIterator last,<br />
+                 const Compare&amp; comp = Compare(),<br />
+                 const Allocator&amp; = Allocator());<br />
+T     multiset(const multiset&lt;Key,Compare,Allocator&gt;&amp; x);<br />
+T    ~multiset();<br />
+T     multiset&lt;Key,Compare,Allocator&gt;&amp;<br />
+          operator=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x);<br />
+T     allocator_type get_allocator() const;<br />
+      // iterators:<br />
+T     iterator               begin();<br />
+T     const_iterator         begin() const;<br />
+T     iterator               end();<br />
+T     const_iterator         end() const;<br />
+T     reverse_iterator       rbegin();<br />
+T     const_reverse_iterator rbegin() const;<br />
+T     reverse_iterator       rend();<br />
+T     const_reverse_iterator rend() const;<br />
+      // capacity:<br />
+T     bool          empty() const;<br />
+T     size_type     size() const;<br />
+T     size_type     max_size() const;<br />
+      // modifiers:<br />
+T     iterator insert(const value_type&amp; x);<br />
+T     iterator insert(iterator position, const value_type&amp; x);<br />
+T     template &lt;class InputIterator&gt;<br />
+        void insert(InputIterator first, InputIterator last);<br />
+T     void      erase(iterator position);<br />
+T     size_type erase(const key_type&amp; x);<br />
+T     void      erase(iterator first, iterator last);<br />
+T     void swap(multiset&lt;Key,Compare,Allocator&gt;&amp;);<br />
+T     void clear();<br />
+      // observers:<br />
+T     key_compare   key_comp() const;<br />
+T     value_compare value_comp() const;<br />
+      // set operations:<br />
+T     iterator  find(const key_type&amp; x) const;<br />
+T     size_type count(const key_type&amp; x) const;<br />
+T     iterator  lower_bound(const key_type&amp; x) const;<br />
+T     iterator  upper_bound(const key_type&amp; x) const;<br />
+T     pair&lt;iterator,iterator&gt; equal_range(const key_type&amp; x) const;<br />
+    };<br />
+<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator==(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator!=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&gt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      bool operator&lt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                      const multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+    // specialized algorithms:<br />
+T   template &lt;class Key, class Compare, class Allocator&gt;<br />
+      void swap(multiset&lt;Key,Compare,Allocator&gt;&amp; x,<br />
+                multiset&lt;Key,Compare,Allocator&gt;&amp; y);<br />
+<br />
+   23.3.5  Template class bitset                    [lib.template.bitset]<br />
+<br />
+   Header &lt;bitset&gt; synopsis<br />
+<br />
+T   template &lt;size_t N&gt; class bitset;<br />
+    // _lib.bitset.operators_ bitset operations:<br />
+T   template &lt;size_t N&gt;<br />
+      bitset&lt;N&gt; operator&amp;(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);<br />
+T   template &lt;size_t N&gt;<br />
+      bitset&lt;N&gt; operator|(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);<br />
+T   template &lt;size_t N&gt;<br />
+      bitset&lt;N&gt; operator^(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);<br />
+T   template &lt;class charT, class traits, size_t N&gt;<br />
+      basic_istream&lt;charT, traits&gt;&amp;<br />
+      operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, bitset&lt;N&gt;&amp; x);<br />
+T   template &lt;class charT, class traits, size_t N&gt;<br />
+      basic_ostream&lt;charT, traits&gt;&amp;<br />
+      operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os, const bitset&lt;N&gt;&amp; x);<br />
+<br />
+T   template&lt;size_t N&gt; class bitset {<br />
+    public:<br />
+      // bit reference:<br />
+T     class reference {<br />
+        friend class bitset;<br />
+T       reference();<br />
+      public:<br />
+T      ~reference();<br />
+T       reference&amp; operator=(bool x);             // for b[i] = x;<br />
+T       reference&amp; operator=(const reference&amp;);   // for b[i] = b[j];<br />
+T       bool operator~() const;                   // flips the bit<br />
+T       operator bool() const;                    // for x = b[i];<br />
+T       reference&amp; flip();                        // for b[i].flip();<br />
+      };<br />
+<br />
+      // _lib.bitset.cons_ constructors:<br />
+T     bitset();<br />
+T     bitset(unsigned long val);<br />
+T     template&lt;class charT, class traits, class Allocator&gt;<br />
+        explicit bitset(<br />
+          const basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+          typename basic_string&lt;charT,traits,Allocator&gt;::size_type pos = 0,<br />
+          typename basic_string&lt;charT,traits,Allocator&gt;::size_type n =<br />
+            basic_string&lt;charT,traits,Allocator&gt;::npos);<br />
+      // _lib.bitset.members_ bitset operations:<br />
+T     bitset&lt;N&gt;&amp; operator&amp;=(const bitset&lt;N&gt;&amp; rhs);<br />
+T     bitset&lt;N&gt;&amp; operator|=(const bitset&lt;N&gt;&amp; rhs);<br />
+T     bitset&lt;N&gt;&amp; operator^=(const bitset&lt;N&gt;&amp; rhs);<br />
+T     bitset&lt;N&gt;&amp; operator&lt;&lt;=(size_t pos);<br />
+T     bitset&lt;N&gt;&amp; operator&gt;&gt;=(size_t pos);<br />
+T     bitset&lt;N&gt;&amp; set();<br />
+T     bitset&lt;N&gt;&amp; set(size_t pos, int val = true);<br />
+T     bitset&lt;N&gt;&amp; reset();<br />
+T     bitset&lt;N&gt;&amp; reset(size_t pos);<br />
+T     bitset&lt;N&gt;  operator~() const;<br />
+T     bitset&lt;N&gt;&amp; flip();<br />
+T     bitset&lt;N&gt;&amp; flip(size_t pos);<br />
+      // element access:<br />
+T     reference operator[](size_t pos);         // for b[i];<br />
+T     unsigned long  to_ulong() const;<br />
+T     template &lt;class charT, class traits, class Allocator&gt;<br />
+        basic_string&lt;charT, traits, Allocator&gt; to_string() const;<br />
+T     size_t count() const;<br />
+T     size_t size()  const;<br />
+T     bool operator==(const bitset&lt;N&gt;&amp; rhs) const;<br />
+T     bool operator!=(const bitset&lt;N&gt;&amp; rhs) const;<br />
+T     bool test(size_t pos) const;<br />
+T     bool any() const;<br />
+T     bool none() const;<br />
+T     bitset&lt;N&gt; operator&lt;&lt;(size_t pos) const;<br />
+T     bitset&lt;N&gt; operator&gt;&gt;(size_t pos) const;<br />
+    };<br />
+<br />
+<br />
+<br />
+<br />
+   24.2  Header &lt;iterator&gt; synopsis               [lib.iterator.synopsis]<br />
+<br />
+    // _lib.iterator.primitives_, primitives:<br />
+T   template&lt;class Iterator&gt; struct iterator_traits;<br />
+T   template&lt;class T&gt; struct iterator_traits&lt;T*&gt;;<br />
+<br />
+X   template&lt;class Category, class T, class Distance = ptrdiff_t,<br />
+             class Pointer = T*, class Reference = T&amp;&gt; struct iterator;<br />
+T   struct input_iterator_tag {};<br />
+T   struct output_iterator_tag {};<br />
+T   struct forward_iterator_tag: public input_iterator_tag {};<br />
+T   struct bidirectional_iterator_tag: public forward_iterator_tag {};<br />
+T   struct random_access_iterator_tag: public bidirectional_iterator_tag {};<br />
+    // _lib.iterator.operations_, iterator operations:<br />
+T   template &lt;class InputIterator, class Distance&gt;<br />
+      void advance(InputIterator&amp; i, Distance n);<br />
+T   template &lt;class InputIterator&gt;<br />
+      typename iterator_traits&lt;InputIterator&gt;::difference_type<br />
+      distance(InputIterator first, InputIterator last);<br />
+    // _lib.predef.iterators_, predefined iterators:<br />
+X   template &lt;class Iterator&gt; class reverse_iterator;<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator==(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&lt;(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator!=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&gt;(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&gt;=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&lt;=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      typename reverse_iterator&lt;Iterator&gt;::difference_type operator-(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      reverse_iterator&lt;Iterator&gt;<br />
+        operator+(<br />
+          typename reverse_iterator&lt;Iterator&gt;::difference_type n,<br />
+          const reverse_iterator&lt;Iterator&gt;&amp; x);<br />
+<br />
+X   template &lt;class Container&gt; class back_insert_iterator;<br />
+T   template &lt;class Container&gt;<br />
+      back_insert_iterator&lt;Container&gt; back_inserter(Container&amp; x);<br />
+X   template &lt;class Container&gt; class front_insert_iterator;<br />
+T   template &lt;class Container&gt;<br />
+      front_insert_iterator&lt;Container&gt; front_inserter(Container&amp; x);<br />
+X   template &lt;class Container&gt; class insert_iterator;<br />
+T   template &lt;class Container, class Iterator&gt;<br />
+      insert_iterator&lt;Container&gt; inserter(Container&amp; x, Iterator i);<br />
+    // _lib.stream.iterators_, stream iterators:<br />
+X   template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt;,<br />
+              class Distance = ptrdiff_t&gt;<br />
+      class istream_iterator;<br />
+    template &lt;class T, class charT, class traits, class Distance&gt;<br />
+X     bool operator==(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,<br />
+                      const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);<br />
+    template &lt;class T, class charT, class traits, class Distance&gt;<br />
+X     bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,<br />
+                      const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);<br />
+X   template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt; &gt;<br />
+        class ostream_iterator;<br />
+X   template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class istreambuf_iterator;<br />
+X   template &lt;class charT, class traits&gt;<br />
+      bool operator==(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,<br />
+                      const istreambuf_iterator&lt;charT,traits&gt;&amp; b);<br />
+X   template &lt;class charT, class traits&gt;<br />
+      bool operator!=(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,<br />
+                      const istreambuf_iterator&lt;charT,traits&gt;&amp; b);<br />
+T   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class ostreambuf_iterator;<br />
+<br />
+   24.3  Iterator primitives                    [lib.iterator.primitives]<br />
+<br />
+T   template&lt;class Iterator&gt; struct iterator_traits {<br />
+T     typedef typename Iterator::difference_type difference_type;<br />
+T     typedef typename Iterator::value_type value_type;<br />
+T     typedef typename Iterator::pointer pointer;<br />
+T     typedef typename Iterator::reference reference;<br />
+T     typedef typename Iterator::iterator_category iterator_category;<br />
+    };<br />
+<br />
+T   template&lt;class T&gt; struct iterator_traits&lt;T*&gt; {<br />
+T     typedef ptrdiff_t difference_type;<br />
+T     typedef T value_type;<br />
+T     typedef T* pointer;<br />
+T     typedef T&amp; reference;<br />
+T     typedef random_access_iterator_tag iterator_category;<br />
+    };<br />
+<br />
+T   template&lt;class T&gt; struct iterator_traits&lt;const T*&gt; {<br />
+T     typedef ptrdiff_t difference_type;<br />
+T     typedef T value_type;<br />
+T     typedef const T* pointer;<br />
+T     typedef const T&amp; reference;<br />
+T     typedef random_access_iterator_tag iterator_category;<br />
+    };<br />
+<br />
+   24.3.2  Basic iterator                            [lib.iterator.basic]<br />
+<br />
+    template&lt;class Category, class T, class Distance = ptrdiff_t,<br />
+             class Pointer = T*, class Reference = T&amp;&gt;<br />
+X     struct iterator {<br />
+T         typedef T         value_type;<br />
+T         typedef Distance  difference_type;<br />
+T         typedef Pointer   pointer;<br />
+T         typedef Reference reference;<br />
+T         typedef Category  iterator_category;<br />
+    };<br />
+<br />
+   24.3.3  Standard iterator tags                 [lib.std.iterator.tags]<br />
+<br />
+T   struct input_iterator_tag {};<br />
+T   struct output_iterator_tag {};<br />
+T   struct forward_iterator_tag: public input_iterator_tag {};<br />
+T   struct bidirectional_iterator_tag: public forward_iterator_tag {};<br />
+T   struct random_access_iterator_tag: public bidirectional_iterator_tag {};<br />
+<br />
+<br />
+   24.4.1  Reverse iterators                      [lib.reverse.iterators]<br />
+<br />
+    template &lt;class Iterator&gt;<br />
+X   class reverse_iterator : public<br />
+          iterator&lt;typename iterator_traits&lt;Iterator&gt;::iterator_category,<br />
+                   typename iterator_traits&lt;Iterator&gt;::value_type,<br />
+                   typename iterator_traits&lt;Iterator&gt;::difference_type,<br />
+                   typename iterator_traits&lt;Iterator&gt;::pointer,<br />
+                   typename iterator_traits&lt;Iterator&gt;::reference&gt; {<br />
+    protected:<br />
+T     Iterator current;<br />
+    public:<br />
+T     typedef Iterator<br />
+          iterator_type;<br />
+T     typedef typename iterator_traits&lt;Iterator&gt;::difference_type<br />
+          difference_type;<br />
+T     typedef typename iterator_traits&lt;Iterator&gt;::reference<br />
+          reference;<br />
+T     typedef typename iterator_traits&lt;Iterator&gt;::pointer<br />
+          pointer;<br />
+<br />
+T     reverse_iterator();<br />
+T     explicit reverse_iterator(Iterator x);<br />
+T     template &lt;class U&gt; reverse_iterator(const reverse_iterator&lt;U&gt;&amp; u);<br />
+T     Iterator base() const;      // explicit<br />
+T     reference operator*() const;<br />
+T     pointer   operator-&gt;() const;<br />
+T     reverse_iterator&amp; operator++();<br />
+T     reverse_iterator  operator++(int);<br />
+T     reverse_iterator&amp; operator--();<br />
+T     reverse_iterator  operator--(int);<br />
+<br />
+T     reverse_iterator  operator+ (difference_type n) const;<br />
+T     reverse_iterator&amp; operator+=(difference_type n);<br />
+T     reverse_iterator  operator- (difference_type n) const;<br />
+T     reverse_iterator&amp; operator-=(difference_type n);<br />
+T     reference operator[](difference_type n) const;<br />
+    };<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator==(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&lt;(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator!=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&gt;(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&gt;=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      bool operator&lt;=(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      typename reverse_iterator&lt;Iterator&gt;::difference_type operator-(<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; y);<br />
+T   template &lt;class Iterator&gt;<br />
+      reverse_iterator&lt;Iterator&gt; operator+(<br />
+        typename reverse_iterator&lt;Iterator&gt;::difference_type n,<br />
+        const reverse_iterator&lt;Iterator&gt;&amp; x);<br />
+<br />
+<br />
+   24.4.2.1  Template class                    [lib.back.insert.iterator]<br />
+       back_insert_iterator<br />
+<br />
+    template &lt;class Container&gt;<br />
+X   class back_insert_iterator :<br />
+          public iterator&lt;output_iterator_tag,void,void,void,void&gt; {<br />
+    protected:<br />
+T     Container* container;<br />
+    public:<br />
+T     typedef Container container_type;<br />
+T     explicit back_insert_iterator(Container&amp; x);<br />
+T     back_insert_iterator&lt;Container&gt;&amp;<br />
+        operator=(typename Container::const_reference value);<br />
+<br />
+T     back_insert_iterator&lt;Container&gt;&amp; operator*();<br />
+T     back_insert_iterator&lt;Container&gt;&amp; operator++();<br />
+T     back_insert_iterator&lt;Container&gt;  operator++(int);<br />
+    };<br />
+T   template &lt;class Container&gt;<br />
+      back_insert_iterator&lt;Container&gt; back_inserter(Container&amp; x);<br />
+<br />
+<br />
+<br />
+   24.4.2.3  Template class                   [lib.front.insert.iterator]<br />
+       front_insert_iterator<br />
+<br />
+    template &lt;class Container&gt;<br />
+X   class front_insert_iterator :<br />
+          public iterator&lt;output_iterator_tag,void,void,void,void&gt; {<br />
+    protected:<br />
+T     Container* container;<br />
+    public:<br />
+T     typedef Container container_type;<br />
+T     explicit front_insert_iterator(Container&amp; x);<br />
+T     front_insert_iterator&lt;Container&gt;&amp;<br />
+        operator=(typename Container::const_reference value);<br />
+T     front_insert_iterator&lt;Container&gt;&amp; operator*();<br />
+T     front_insert_iterator&lt;Container&gt;&amp; operator++();<br />
+T     front_insert_iterator&lt;Container&gt;  operator++(int);<br />
+    };<br />
+T   template &lt;class Container&gt;<br />
+      front_insert_iterator&lt;Container&gt; front_inserter(Container&amp; x);<br />
+<br />
+<br />
+   24.4.2.5  Template class insert_iterator         [lib.insert.iterator]<br />
+<br />
+    template &lt;class Container&gt;<br />
+X   class insert_iterator :<br />
+          public iterator&lt;output_iterator_tag,void,void,void,void&gt; {<br />
+    protected:<br />
+T     Container* container;<br />
+T     typename Container::iterator iter;<br />
+    public:<br />
+T     typedef Container container_type;<br />
+T     insert_iterator(Container&amp; x, typename Container::iterator i);<br />
+T     insert_iterator&lt;Container&gt;&amp;<br />
+        operator=(typename Container::const_reference value);<br />
+T     insert_iterator&lt;Container&gt;&amp; operator*();<br />
+T     insert_iterator&lt;Container&gt;&amp; operator++();<br />
+T     insert_iterator&lt;Container&gt;&amp; operator++(int);<br />
+    };<br />
+T   template &lt;class Container, class Iterator&gt;<br />
+      insert_iterator&lt;Container&gt; inserter(Container&amp; x, Iterator i);<br />
+<br />
+   24.5.1  Template class istream_iterator         [lib.istream.iterator]<br />
+<br />
+    template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt;,<br />
+        class Distance = ptrdiff_t&gt;<br />
+X   class istream_iterator:<br />
+      public iterator&lt;input_iterator_tag, T, Distance, const T*, const T&amp;&gt; {<br />
+    public:<br />
+T     typedef charT char_type<br />
+T     typedef traits traits_type;<br />
+T     typedef basic_istream&lt;charT,traits&gt; istream_type;<br />
+T     istream_iterator();<br />
+T     istream_iterator(istream_type&amp; s);<br />
+T     istream_iterator(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x);<br />
+T    ~istream_iterator();<br />
+<br />
+T     const T&amp; operator*() const;<br />
+T     const T* operator-&gt;() const;<br />
+T     istream_iterator&lt;T,charT,traits,Distance&gt;&amp; operator++();<br />
+T     istream_iterator&lt;T,charT,traits,Distance&gt;  operator++(int);<br />
+    };<br />
+<br />
+T   template &lt;class T, class charT, class traits, class Distance&gt;<br />
+      bool operator==(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,<br />
+                      const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);<br />
+T   template &lt;class T, class charT, class traits, class Distance&gt;<br />
+      bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,<br />
+                      const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);<br />
+<br />
+<br />
+   24.5.2  Template class ostream_iterator         [lib.ostream.iterator]<br />
+<br />
+    template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class ostream_iterator:<br />
+      public iterator&lt;output_iterator_tag, void, void, void, void&gt; {<br />
+    public:<br />
+T     typedef charT char_type;<br />
+T     typedef traits traits_type;<br />
+T     typedef basic_ostream&lt;charT,traits&gt; ostream_type;<br />
+T     ostream_iterator(ostream_type&amp; s);<br />
+T     ostream_iterator(ostream_type&amp; s, const charT* delimiter);<br />
+T     ostream_iterator(const ostream_iterator&lt;T,charT,traits&gt;&amp; x);<br />
+T    ~ostream_iterator();<br />
+T     ostream_iterator&lt;T,charT,traits&gt;&amp; operator=(const T&amp; value);<br />
+<br />
+T     ostream_iterator&lt;T,charT,traits&gt;&amp; operator*();<br />
+T     ostream_iterator&lt;T,charT,traits&gt;&amp; operator++();<br />
+T     ostream_iterator&lt;T,charT,traits&gt;&amp; operator++(int);<br />
+    };<br />
+<br />
+<br />
+   24.5.3  Template class                       [lib.istreambuf.iterator]<br />
+       istreambuf_iterator<br />
+<br />
+    template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class istreambuf_iterator<br />
+       : public iterator&lt;input_iterator_tag, charT,<br />
+                         typename traits::off_type, charT*, charT&amp;&gt; {<br />
+    public:<br />
+T     typedef charT                         char_type;<br />
+T     typedef traits                        traits_type;<br />
+T     typedef typename traits::int_type     int_type;<br />
+T     typedef basic_streambuf&lt;charT,traits&gt; streambuf_type;<br />
+T     typedef basic_istream&lt;charT,traits&gt;   istream_type;<br />
+T     class proxy;                        // exposition only<br />
+T     istreambuf_iterator() throw();<br />
+T     istreambuf_iterator(istream_type&amp; s) throw();<br />
+T     istreambuf_iterator(streambuf_type* s) throw();<br />
+T     istreambuf_iterator(const proxy&amp; p) throw();<br />
+T     charT operator*() const;<br />
+T     istreambuf_iterator&lt;charT,traits&gt;&amp; operator++();<br />
+T     proxy operator++(int);<br />
+X     bool equal(istreambuf_iterator&amp; b);<br />
+    };<br />
+<br />
+T   template &lt;class charT, class traits&gt;<br />
+      bool operator==(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,<br />
+                      const istreambuf_iterator&lt;charT,traits&gt;&amp; b);<br />
+<br />
+T   template &lt;class charT, class traits&gt;<br />
+      bool operator!=(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,<br />
+                      const istreambuf_iterator&lt;charT,traits&gt;&amp; b);<br />
+<br />
+   24.5.3.1  Template class              [lib.istreambuf.iterator::proxy]<br />
+       istreambuf_iterator::proxy<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+T     class istreambuf_iterator&lt;charT, traits&gt;::proxy<br />
+    {<br />
+T     charT keep_;<br />
+T     basic_streambuf&lt;charT,traits&gt;* sbuf_;<br />
+T     proxy(charT c,<br />
+            basic_streambuf&lt;charT,traits&gt;* sbuf);<br />
+        : keep_(c), sbuf_(sbuf) {}<br />
+    public:<br />
+T     charT operator*() { return keep_; }<br />
+    };<br />
+<br />
+<br />
+<br />
+   24.5.4  Template class                       [lib.ostreambuf.iterator]<br />
+       ostreambuf_iterator<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+T   class ostreambuf_iterator:<br />
+      public iterator&lt;output_iterator_tag, void, void, void, void&gt; {<br />
+    public:<br />
+T     typedef charT                         char_type;<br />
+T     typedef traits                        traits_type;<br />
+T     typedef basic_streambuf&lt;charT,traits&gt; streambuf_type;<br />
+T     typedef basic_ostream&lt;charT,traits&gt;   ostream_type;<br />
+    public:<br />
+T     ostreambuf_iterator(ostream_type&amp; s) throw();<br />
+T     ostreambuf_iterator(streambuf_type* s) throw();<br />
+T     ostreambuf_iterator&amp; operator=(charT c);<br />
+T     ostreambuf_iterator&amp; operator*();<br />
+T     ostreambuf_iterator&amp; operator++();<br />
+T     ostreambuf_iterator&amp; operator++(int);<br />
+T     bool failed() const throw();<br />
+    };<br />
+<br />
+<br />
+   Header &lt;algorithm&gt; synopsis<br />
+<br />
+<br />
+    // _lib.alg.nonmodifying_, non-modifying sequence operations:<br />
+T   template&lt;class InputIterator, class Function&gt;<br />
+      Function for_each(InputIterator first, InputIterator last, Function f);<br />
+T   template&lt;class InputIterator, class T&gt;<br />
+      InputIterator find(InputIterator first, InputIterator last,<br />
+                         const T&amp; value);<br />
+T   template&lt;class InputIterator, class Predicate&gt;<br />
+      InputIterator find_if(InputIterator first, InputIterator last,<br />
+                            Predicate pred);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2&gt;<br />
+      ForwardIterator1<br />
+        find_end(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                 ForwardIterator2 first2, ForwardIterator2 last2);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2,<br />
+             class BinaryPredicate&gt;<br />
+      ForwardIterator1<br />
+        find_end(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                 ForwardIterator2 first2, ForwardIterator2 last2,<br />
+                 BinaryPredicate pred);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2&gt;<br />
+      ForwardIterator1<br />
+        find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                      ForwardIterator2 first2, ForwardIterator2 last2);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2,<br />
+             class BinaryPredicate&gt;<br />
+      ForwardIterator1<br />
+        find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                 ForwardIterator2 first2, ForwardIterator2 last2,<br />
+                 BinaryPredicate pred);<br />
+T   template&lt;class ForwardIterator&gt;<br />
+      ForwardIterator adjacent_find(ForwardIterator first,<br />
+                                    ForwardIterator last);<br />
+T   template&lt;class ForwardIterator, class BinaryPredicate&gt;<br />
+      ForwardIterator adjacent_find(ForwardIterator first,<br />
+          ForwardIterator last, BinaryPredicate pred);<br />
+T   template&lt;class InputIterator, class T&gt;<br />
+      typename iterator_traits&lt;InputIterator&gt;::difference_type<br />
+        count(InputIterator first, InputIterator last, const T&amp; value);<br />
+T   template&lt;class InputIterator, class Predicate&gt;<br />
+      typename iterator_traits&lt;InputIterator&gt;::difference_type<br />
+        count_if(InputIterator first, InputIterator last, Predicate pred);<br />
+T   template&lt;class InputIterator1, class InputIterator2&gt;<br />
+      pair&lt;InputIterator1, InputIterator2&gt;<br />
+        mismatch(InputIterator1 first1, InputIterator1 last1,<br />
+                 InputIterator2 first2);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class BinaryPredicate&gt;<br />
+      pair&lt;InputIterator1, InputIterator2&gt;<br />
+        mismatch(InputIterator1 first1, InputIterator1 last1,<br />
+                 InputIterator2 first2, BinaryPredicate pred);<br />
+<br />
+T   template&lt;class InputIterator1, class InputIterator2&gt;<br />
+      bool equal(InputIterator1 first1, InputIterator1 last1,<br />
+                 InputIterator2 first2);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class BinaryPredicate&gt;<br />
+      bool equal(InputIterator1 first1, InputIterator1 last1,<br />
+                 InputIterator2 first2, BinaryPredicate pred);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2&gt;<br />
+      ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                              ForwardIterator2 first2, ForwardIterator2 last2);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2,<br />
+             class BinaryPredicate&gt;<br />
+      ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,<br />
+                              ForwardIterator2 first2, ForwardIterator2 last2,<br />
+                              BinaryPredicate pred);<br />
+T   template&lt;class ForwardIterator, class Size, class T&gt;<br />
+      ForwardIterator  search_n(ForwardIterator first, ForwardIterator last,<br />
+                              Size count, const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class Size, class T, class BinaryPredicate&gt;<br />
+      ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,<br />
+                              Size count, const T&amp; value,<br />
+                              BinaryPredicate pred);<br />
+    // _lib.alg.modifying.operations_, modifying sequence operations:<br />
+    // _lib.alg.copy_, copy:<br />
+T   template&lt;class InputIterator, class OutputIterator&gt;<br />
+      OutputIterator copy(InputIterator first, InputIterator last,<br />
+                          OutputIterator result);<br />
+T   template&lt;class BidirectionalIterator1, class BidirectionalIterator2&gt;<br />
+      BidirectionalIterator2<br />
+        copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,<br />
+                      BidirectionalIterator2 result);<br />
+    // _lib.alg.swap_, swap:<br />
+T   template&lt;class T&gt; void swap(T&amp; a, T&amp; b);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2&gt;<br />
+      ForwardIterator2 swap_ranges(ForwardIterator1 first1,<br />
+          ForwardIterator1 last1, ForwardIterator2 first2);<br />
+T   template&lt;class ForwardIterator1, class ForwardIterator2&gt;<br />
+      void iter_swap(ForwardIterator1 a, ForwardIterator2 b);<br />
+T   template&lt;class InputIterator, class OutputIterator, class UnaryOperation&gt;<br />
+      OutputIterator transform(InputIterator first, InputIterator last,<br />
+                               OutputIterator result, UnaryOperation op);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+             class BinaryOperation&gt;<br />
+      OutputIterator transform(InputIterator1 first1, InputIterator1 last1,<br />
+                               InputIterator2 first2, OutputIterator result,<br />
+                               BinaryOperation binary_op);<br />
+<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      void replace(ForwardIterator first, ForwardIterator last,<br />
+                   const T&amp; old_value, const T&amp; new_value);<br />
+T   template&lt;class ForwardIterator, class Predicate, class T&gt;<br />
+      void replace_if(ForwardIterator first, ForwardIterator last,<br />
+                      Predicate pred, const T&amp; new_value);<br />
+T   template&lt;class InputIterator, class OutputIterator, class T&gt;<br />
+      OutputIterator replace_copy(InputIterator first, InputIterator last,<br />
+                                  OutputIterator result,<br />
+                                  const T&amp; old_value, const T&amp; new_value);<br />
+T   template&lt;class Iterator, class OutputIterator, class Predicate, class T&gt;<br />
+      OutputIterator replace_copy_if(Iterator first, Iterator last,<br />
+                                     OutputIterator result,<br />
+                                     Predicate pred, const T&amp; new_value);<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      void fill(ForwardIterator first, ForwardIterator last, const T&amp; value);<br />
+T   template&lt;class OutputIterator, class Size, class T&gt;<br />
+      void fill_n(OutputIterator first, Size n, const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class Generator&gt;<br />
+      void generate(ForwardIterator first, ForwardIterator last, Generator gen);<br />
+T   template&lt;class OutputIterator, class Size, class Generator&gt;<br />
+      void generate_n(OutputIterator first, Size n, Generator gen);<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      ForwardIterator remove(ForwardIterator first, ForwardIterator last,<br />
+                             const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class Predicate&gt;<br />
+      ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,<br />
+                                Predicate pred);<br />
+T   template&lt;class InputIterator, class OutputIterator, class T&gt;<br />
+      OutputIterator remove_copy(InputIterator first, InputIterator last,<br />
+                                 OutputIterator result, const T&amp; value);<br />
+T   template&lt;class InputIterator, class OutputIterator, class Predicate&gt;<br />
+      OutputIterator remove_copy_if(InputIterator first, InputIterator last,<br />
+                                    OutputIterator result, Predicate pred);<br />
+T   template&lt;class ForwardIterator&gt;<br />
+      ForwardIterator unique(ForwardIterator first, ForwardIterator last);<br />
+T   template&lt;class ForwardIterator, class BinaryPredicate&gt;<br />
+      ForwardIterator unique(ForwardIterator first, ForwardIterator last,<br />
+                             BinaryPredicate pred);<br />
+T   template&lt;class InputIterator, class OutputIterator&gt;<br />
+      OutputIterator unique_copy(InputIterator first, InputIterator last,<br />
+                                 OutputIterator result);<br />
+T   template&lt;class InputIterator, class OutputIterator, class BinaryPredicate&gt;<br />
+      OutputIterator unique_copy(InputIterator first, InputIterator last,<br />
+                                 OutputIterator result, BinaryPredicate pred);<br />
+T   template&lt;class BidirectionalIterator&gt;<br />
+      void reverse(BidirectionalIterator first, BidirectionalIterator last);<br />
+T   template&lt;class BidirectionalIterator, class OutputIterator&gt;<br />
+      OutputIterator reverse_copy(BidirectionalIterator first,<br />
+                                  BidirectionalIterator last,<br />
+                                  OutputIterator result);<br />
+<br />
+T   template&lt;class ForwardIterator&gt;<br />
+      void rotate(ForwardIterator first, ForwardIterator middle,<br />
+                  ForwardIterator last);<br />
+T   template&lt;class ForwardIterator, class OutputIterator&gt;<br />
+      OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,<br />
+                                 ForwardIterator last, OutputIterator result);<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void random_shuffle(RandomAccessIterator first,<br />
+                          RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class RandomNumberGenerator&gt;<br />
+      void random_shuffle(RandomAccessIterator first,<br />
+                          RandomAccessIterator last,<br />
+                          RandomNumberGenerator&amp; rand);<br />
+    // _lib.alg.partitions_, partitions:<br />
+T   template&lt;class BidirectionalIterator, class Predicate&gt;<br />
+      BidirectionalIterator partition(BidirectionalIterator first,<br />
+                                      BidirectionalIterator last,<br />
+                                      Predicate pred);<br />
+T   template&lt;class BidirectionalIterator, class Predicate&gt;<br />
+      BidirectionalIterator stable_partition(BidirectionalIterator first,<br />
+                                             BidirectionalIterator last,<br />
+                                             Predicate pred);<br />
+    // _lib.alg.sorting_, sorting and related operations:<br />
+    // _lib.alg.sort_, sorting:<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void sort(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void sort(RandomAccessIterator first, RandomAccessIterator last,<br />
+                Compare comp);<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void stable_sort(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void stable_sort(RandomAccessIterator first, RandomAccessIterator last,<br />
+                       Compare comp);<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void partial_sort(RandomAccessIterator first,<br />
+                        RandomAccessIterator middle,<br />
+                        RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void partial_sort(RandomAccessIterator first,<br />
+                        RandomAccessIterator middle,<br />
+                        RandomAccessIterator last, Compare comp);<br />
+T   template&lt;class InputIterator, class RandomAccessIterator&gt;<br />
+      RandomAccessIterator<br />
+        partial_sort_copy(InputIterator first, InputIterator last,<br />
+                          RandomAccessIterator result_first,<br />
+                          RandomAccessIterator result_last);<br />
+T   template&lt;class InputIterator, class RandomAccessIterator, class Compare&gt;<br />
+      RandomAccessIterator<br />
+        partial_sort_copy(InputIterator first, InputIterator last,<br />
+                          RandomAccessIterator result_first,<br />
+                          RandomAccessIterator result_last,<br />
+                          Compare comp);<br />
+<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void nth_element(RandomAccessIterator first, RandomAccessIterator nth,<br />
+                       RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void nth_element(RandomAccessIterator first, RandomAccessIterator nth,<br />
+                       RandomAccessIterator last, Compare comp);<br />
+    // _lib.alg.binary.search_, binary search:<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,<br />
+                                  const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class T, class Compare&gt;<br />
+      ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,<br />
+                                  const T&amp; value, Compare comp);<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,<br />
+                                  const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class T, class Compare&gt;<br />
+      ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,<br />
+                                  const T&amp; value, Compare comp);<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      pair&lt;ForwardIterator, ForwardIterator&gt;<br />
+        equal_range(ForwardIterator first, ForwardIterator last,<br />
+                    const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class T, class Compare&gt;<br />
+      pair&lt;ForwardIterator, ForwardIterator&gt;<br />
+        equal_range(ForwardIterator first, ForwardIterator last,<br />
+                    const T&amp; value, Compare comp);<br />
+T   template&lt;class ForwardIterator, class T&gt;<br />
+      bool binary_search(ForwardIterator first, ForwardIterator last,<br />
+                         const T&amp; value);<br />
+T   template&lt;class ForwardIterator, class T, class Compare&gt;<br />
+      bool binary_search(ForwardIterator first, ForwardIterator last,<br />
+                         const T&amp; value, Compare comp);<br />
+    // _lib.alg.merge_, merge:<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;<br />
+      OutputIterator merge(InputIterator1 first1, InputIterator1 last1,<br />
+                           InputIterator2 first2, InputIterator2 last2,<br />
+                           OutputIterator result);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+             class Compare&gt;<br />
+      OutputIterator merge(InputIterator1 first1, InputIterator1 last1,<br />
+                           InputIterator2 first2, InputIterator2 last2,<br />
+                           OutputIterator result, Compare comp);<br />
+T   template&lt;class BidirectionalIterator&gt;<br />
+      void inplace_merge(BidirectionalIterator first,<br />
+                         BidirectionalIterator middle,<br />
+                         BidirectionalIterator last);<br />
+T   template&lt;class BidirectionalIterator, class Compare&gt;<br />
+      void inplace_merge(BidirectionalIterator first,<br />
+                         BidirectionalIterator middle,<br />
+                         BidirectionalIterator last, Compare comp);<br />
+<br />
+    // _lib.alg.set.operations_, set operations:<br />
+T   template&lt;class InputIterator1, class InputIterator2&gt;<br />
+      bool includes(InputIterator1 first1, InputIterator1 last1,<br />
+                    InputIterator2 first2, InputIterator2 last2);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class Compare&gt;<br />
+      bool includes(InputIterator1 first1, InputIterator1 last1,<br />
+                    InputIterator2 first2, InputIterator2 last2, Compare comp);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;<br />
+      OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,<br />
+                               InputIterator2 first2, InputIterator2 last2,<br />
+                               OutputIterator result);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+             class Compare&gt;<br />
+      OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,<br />
+                               InputIterator2 first2, InputIterator2 last2,<br />
+                               OutputIterator result, Compare comp);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;<br />
+      OutputIterator set_intersection<br />
+          (InputIterator1 first1, InputIterator1 last1,<br />
+           InputIterator2 first2, InputIterator2 last2,<br />
+           OutputIterator result);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+             class Compare&gt;<br />
+      OutputIterator set_intersection<br />
+          (InputIterator1 first1, InputIterator1 last1,<br />
+           InputIterator2 first2, InputIterator2 last2,<br />
+           OutputIterator result, Compare comp);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;<br />
+      OutputIterator set_difference<br />
+          (InputIterator1 first1, InputIterator1 last1,<br />
+           InputIterator2 first2, InputIterator2 last2,<br />
+           OutputIterator result);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+             class Compare&gt;<br />
+      OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,<br />
+                                    InputIterator2 first2, InputIterator2 last2,<br />
+                                    OutputIterator result, Compare comp);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;<br />
+      OutputIterator<br />
+        set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,<br />
+                                 InputIterator2 first2, InputIterator2 last2,<br />
+                                 OutputIterator result);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class OutputIterator,<br />
+              class Compare&gt;<br />
+      OutputIterator<br />
+        set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,<br />
+                                 InputIterator2 first2, InputIterator2 last2,<br />
+                                 OutputIterator result, Compare comp);<br />
+    // _lib.alg.heap.operations_, heap operations:<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void push_heap(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void push_heap(RandomAccessIterator first, RandomAccessIterator last,<br />
+                     Compare comp);<br />
+<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void pop_heap(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void pop_heap(RandomAccessIterator first, RandomAccessIterator last,<br />
+                    Compare comp);<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void make_heap(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void make_heap(RandomAccessIterator first, RandomAccessIterator last,<br />
+                     Compare comp);<br />
+T   template&lt;class RandomAccessIterator&gt;<br />
+      void sort_heap(RandomAccessIterator first, RandomAccessIterator last);<br />
+T   template&lt;class RandomAccessIterator, class Compare&gt;<br />
+      void sort_heap(RandomAccessIterator first, RandomAccessIterator last,<br />
+                     Compare comp);<br />
+    // _lib.alg.min.max_, minimum and maximum:<br />
+T   template&lt;class T&gt; const T&amp; min(const T&amp; a, const T&amp; b);<br />
+T   template&lt;class T, class Compare&gt;<br />
+      const T&amp; min(const T&amp; a, const T&amp; b, Compare comp);<br />
+T   template&lt;class T&gt; const T&amp; max(const T&amp; a, const T&amp; b);<br />
+T   template&lt;class T, class Compare&gt;<br />
+      const T&amp; max(const T&amp; a, const T&amp; b, Compare comp);<br />
+T   template&lt;class ForwardIterator&gt;<br />
+      ForwardIterator min_element(ForwardIterator first, ForwardIterator last);<br />
+T   template&lt;class ForwardIterator, class Compare&gt;<br />
+      ForwardIterator min_element(ForwardIterator first, ForwardIterator last,<br />
+                                Compare comp);<br />
+T   template&lt;class ForwardIterator&gt;<br />
+      ForwardIterator max_element(ForwardIterator first, ForwardIterator last);<br />
+T   template&lt;class ForwardIterator, class Compare&gt;<br />
+      ForwardIterator max_element(ForwardIterator first, ForwardIterator last,<br />
+                                Compare comp);<br />
+T   template&lt;class InputIterator1, class InputIterator2&gt;<br />
+      bool lexicographical_compare<br />
+          (InputIterator1 first1, InputIterator1 last1,<br />
+           InputIterator2 first2, InputIterator2 last2);<br />
+T   template&lt;class InputIterator1, class InputIterator2, class Compare&gt;<br />
+      bool lexicographical_compare<br />
+          (InputIterator1 first1, InputIterator1 last1,<br />
+           InputIterator2 first2, InputIterator2 last2,<br />
+           Compare comp);<br />
+<br />
+    // _lib.alg.permutation.generators_, permutations<br />
+T   template&lt;class BidirectionalIterator&gt;<br />
+      bool next_permutation(BidirectionalIterator first,<br />
+                            BidirectionalIterator last);<br />
+T   template&lt;class BidirectionalIterator, class Compare&gt;<br />
+      bool next_permutation(BidirectionalIterator first,<br />
+                            BidirectionalIterator last, Compare comp);<br />
+T   template&lt;class BidirectionalIterator&gt;<br />
+      bool prev_permutation(BidirectionalIterator first,<br />
+                            BidirectionalIterator last);<br />
+T   template&lt;class BidirectionalIterator, class Compare&gt;<br />
+      bool prev_permutation(BidirectionalIterator first,<br />
+                            BidirectionalIterator last, Compare comp);<br />
+<br />
+<br />
+   25.4  C library algorithms                         [lib.alg.c.library]<br />
+<br />
+   1 Header &lt;cstdlib&gt; (partial, Table 2):<br />
+<br />
+                    Table 2--Header &lt;cstdlib&gt; synopsis<br />
+<br />
+                      Functions:   bsearch   qsort<br />
+<br />
+<br />
+X  extern "C" void *bsearch(const void *key, const void *base,<br />
+                          size_t nmemb, size_t size,<br />
+                          int (*compar)(const void *, const void *));<br />
+X  extern "C++" void *bsearch(const void *key, const void *base,<br />
+                          size_t nmemb, size_t size,<br />
+                          int (*compar)(const void *, const void *));<br />
+<br />
+X  extern "C" void qsort(void* base, size_t nmemb, size_t size,<br />
+                  int (*compar)(const void*, const void*));<br />
+X  extern "C++" void qsort(void* base, size_t nmemb, size_t size,<br />
+                  int (*compar)(const void*, const void*));<br />
+<br />
+<br />
+<br />
+   26.2  Complex numbers                            [lib.complex.numbers]<br />
+<br />
+<br />
+   26.2.1  Header &lt;complex&gt; synopsis               [lib.complex.synopsis]<br />
+<br />
+T   template&lt;class T&gt; class complex;<br />
+T   template&lt;&gt; class complex&lt;float&gt;;<br />
+T   template&lt;&gt; class complex&lt;double&gt;;<br />
+T   template&lt;&gt; class complex&lt;long double&gt;;<br />
+    // _lib.complex.ops_ operators:<br />
+T   template&lt;class T&gt;<br />
+      complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator==<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; bool operator==(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; bool operator!=(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T, class charT, class traits&gt;<br />
+      basic_istream&lt;charT, traits&gt;&amp;<br />
+      operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp;, complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T, class charT, class traits&gt;<br />
+      basic_ostream&lt;charT, traits&gt;&amp;<br />
+      operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+    // _lib.complex.value.ops_ values:<br />
+T   template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; T arg(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; T norm(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; conj(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;);<br />
+    // _lib.complex.transcendentals_ transcendentals:<br />
+T   template&lt;class T&gt; complex&lt;T&gt; cos  (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; cosh (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; exp  (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; log  (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; log10(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, int);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; pow(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; sin  (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; sinh (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; sqrt (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; tan  (const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; tanh (const complex&lt;T&gt;&amp;);<br />
+   }<br />
+<br />
+   26.2.2  Template class complex                           [lib.complex]<br />
+<br />
+    template&lt;class T&gt;<br />
+T   class complex {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+T     complex(const T&amp; re = T(), const T&amp; im = T());<br />
+T     complex(const complex&amp;);<br />
+T     template&lt;class X&gt; complex(const complex&lt;X&gt;&amp;);<br />
+<br />
+T     T real() const;<br />
+T     T imag() const;<br />
+<br />
+T     complex&lt;T&gt;&amp; operator= (const T&amp;);<br />
+T     complex&lt;T&gt;&amp; operator+=(const T&amp;);<br />
+T     complex&lt;T&gt;&amp; operator-=(const T&amp;);<br />
+T     complex&lt;T&gt;&amp; operator*=(const T&amp;);<br />
+T     complex&lt;T&gt;&amp; operator/=(const T&amp;);<br />
+<br />
+T     complex&amp; operator=(const complex&amp;);<br />
+T     template&lt;class X&gt; complex&lt;T&gt;&amp; operator= (const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;T&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;T&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;T&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;T&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);<br />
+    };<br />
+<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator*(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/<br />
+      (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator/(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; bool operator==(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; bool operator!=(const T&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T, class charT, class traits&gt;<br />
+      basic_istream&lt;charT, traits&gt;&amp;<br />
+      operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp;, complex&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T, class charT, class traits&gt;<br />
+      basic_ostream&lt;charT, traits&gt;&amp;<br />
+      operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp;, const complex&lt;T&gt;&amp;);<br />
+<br />
+<br />
+   26.2.3  complex specializations                  [lib.complex.special]<br />
+<br />
+T   template&lt;&gt; class complex&lt;float&gt; {<br />
+    public:<br />
+T     typedef float value_type;<br />
+<br />
+T     complex(float re = 0.0f, float im = 0.0f);<br />
+T     explicit complex(const complex&lt;double&gt;&amp;);<br />
+T     explicit complex(const complex&lt;long double&gt;&amp;);<br />
+T     float real() const;<br />
+T     float imag() const;<br />
+<br />
+T     complex&lt;float&gt;&amp; operator= (float);<br />
+T     complex&lt;float&gt;&amp; operator+=(float);<br />
+T     complex&lt;float&gt;&amp; operator-=(float);<br />
+T     complex&lt;float&gt;&amp; operator*=(float);<br />
+T     complex&lt;float&gt;&amp; operator/=(float);<br />
+<br />
+T     complex&lt;float&gt;&amp; operator=(const complex&lt;float&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;float&gt;&amp; operator= (const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;float&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;float&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;float&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;float&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);<br />
+    };<br />
+T   template&lt;&gt; class complex&lt;double&gt; {<br />
+    public:<br />
+T     typedef double value_type;<br />
+<br />
+T     complex(double re = 0.0, double im = 0.0);<br />
+T     complex(const complex&lt;float&gt;&amp;);<br />
+T     explicit complex(const complex&lt;long double&gt;&amp;);<br />
+T     double real() const;<br />
+T     double imag() const;<br />
+<br />
+T     complex&lt;double&gt;&amp; operator= (double);<br />
+T     complex&lt;double&gt;&amp; operator+=(double);<br />
+T     complex&lt;double&gt;&amp; operator-=(double);<br />
+T     complex&lt;double&gt;&amp; operator*=(double);<br />
+T     complex&lt;double&gt;&amp; operator/=(double);<br />
+<br />
+T     complex&lt;double&gt;&amp; operator=(const complex&lt;double&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;double&gt;&amp; operator= (const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;double&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;double&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;double&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;double&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);<br />
+    };<br />
+<br />
+T   template&lt;&gt; class complex&lt;long double&gt; {<br />
+    public:<br />
+T     typedef long double value_type;<br />
+<br />
+T     complex(long double re = 0.0L, long double im = 0.0L);<br />
+T     complex(const complex&lt;float&gt;&amp;);<br />
+T     complex(const complex&lt;double&gt;&amp;);<br />
+T     long double real() const;<br />
+T     long double imag() const;<br />
+<br />
+T     complex&lt;long double&gt;&amp; operator=(const complex&lt;long double&gt;&amp;);<br />
+T     complex&lt;long double&gt;&amp; operator= (long double);<br />
+T     complex&lt;long double&gt;&amp; operator+=(long double);<br />
+T     complex&lt;long double&gt;&amp; operator-=(long double);<br />
+T     complex&lt;long double&gt;&amp; operator*=(long double);<br />
+T     complex&lt;long double&gt;&amp; operator/=(long double);<br />
+<br />
+T     template&lt;class X&gt; complex&lt;long double&gt;&amp; operator= (const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;long double&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;long double&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;long double&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);<br />
+T     template&lt;class X&gt; complex&lt;long double&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);<br />
+    };<br />
+<br />
+   26.3  Numeric arrays                                    [lib.numarray]<br />
+<br />
+   26.3.1  Header &lt;valarray&gt; synopsis             [lib.valarray.synopsis]<br />
+<br />
+T   template&lt;class T&gt; class valarray;         // An array of type T<br />
+T   class slice;<br />
+T   template&lt;class T&gt; class slice_array;<br />
+T   class gslice;<br />
+T   template&lt;class T&gt; class gslice_array;<br />
+T   template&lt;class T&gt; class mask_array;       // a masked array<br />
+T   template&lt;class T&gt; class indirect_array;   // an indirected array<br />
+<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator*<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator* (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator* (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator/<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator/ (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator/ (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator%<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator% (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator% (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator+<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator+ (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator+ (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator-<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator- (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator- (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator^<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator^ (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator^ (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&amp;<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&amp; (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&amp; (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator|<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator| (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator| (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator||<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator||(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator||(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator==(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator==(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator==(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator!=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator!=(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator!=(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator&lt; (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&lt; (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&lt; (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator&gt; (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&gt; (const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&gt; (const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator&lt;=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&lt;=(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&lt;=(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt;<br />
+      valarray&lt;bool&gt; operator&gt;=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&gt;=(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;bool&gt; operator&gt;=(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; abs  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; acos (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; asin (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; atan (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; atan2<br />
+      (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; atan2(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; atan2(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; cos  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; cosh (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; exp  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; log  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; log10(const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; pow(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; pow(const valarray&lt;T&gt;&amp;, const T&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; pow(const T&amp;, const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; sin  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; sinh (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; sqrt (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; tan  (const valarray&lt;T&gt;&amp;);<br />
+T   template&lt;class T&gt; valarray&lt;T&gt; tanh (const valarray&lt;T&gt;&amp;);<br />
+   }<br />
+<br />
+<br />
+   26.3.2  Template class valarray                [lib.template.valarray]<br />
+<br />
+T   template&lt;class T&gt; class valarray {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+      // _lib.valarray.cons_ construct/destroy:<br />
+T     valarray();<br />
+T     explicit valarray(size_t);<br />
+T     valarray(const T&amp;, size_t);<br />
+T     valarray(const T*, size_t);<br />
+T     valarray(const valarray&amp;);<br />
+T     valarray(const slice_array&lt;T&gt;&amp;);<br />
+T     valarray(const gslice_array&lt;T&gt;&amp;);<br />
+T     valarray(const mask_array&lt;T&gt;&amp;);<br />
+T     valarray(const indirect_array&lt;T&gt;&amp;);<br />
+T    ~valarray();<br />
+<br />
+      // _lib.valarray.assign_ assignment:<br />
+T     valarray&lt;T&gt;&amp; operator=(const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator=(const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator=(const slice_array&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator=(const gslice_array&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator=(const mask_array&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator=(const indirect_array&lt;T&gt;&amp;);<br />
+      // _lib.valarray.access_ element access:<br />
+T     T                 operator[](size_t) const;<br />
+T     T&amp;                operator[](size_t);<br />
+      // _lib.valarray.sub_ subset operations:<br />
+T     valarray&lt;T&gt;       operator[](slice) const;<br />
+T     slice_array&lt;T&gt;    operator[](slice);<br />
+T     valarray&lt;T&gt;       operator[](const gslice&amp;) const;<br />
+T     gslice_array&lt;T&gt;   operator[](const gslice&amp;);<br />
+T     valarray&lt;T&gt;       operator[](const valarray&lt;bool&gt;&amp;) const;<br />
+T     mask_array&lt;T&gt;     operator[](const valarray&lt;bool&gt;&amp;);<br />
+T     valarray&lt;T&gt;       operator[](const valarray&lt;size_t&gt;&amp;) const;<br />
+T     indirect_array&lt;T&gt; operator[](const valarray&lt;size_t&gt;&amp;);<br />
+      // _lib.valarray.unary_ unary operators:<br />
+T     valarray&lt;T&gt; operator+() const;<br />
+T     valarray&lt;T&gt; operator-() const;<br />
+T     valarray&lt;T&gt; operator~() const;<br />
+T     valarray&lt;T&gt; operator!() const;<br />
+      // _lib.valarray.cassign_ computed assignment:<br />
+T     valarray&lt;T&gt;&amp; operator*= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator/= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator%= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator+= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator-= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator^= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&amp;= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator|= (const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&lt;&lt;=(const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&gt;&gt;=(const T&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator*= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator/= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator%= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator+= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator-= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator^= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator|= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&amp;= (const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&lt;&lt;=(const valarray&lt;T&gt;&amp;);<br />
+T     valarray&lt;T&gt;&amp; operator&gt;&gt;=(const valarray&lt;T&gt;&amp;);<br />
+      // _lib.valarray.members_ member functions:<br />
+T     size_t size() const;<br />
+T     T    sum() const;<br />
+T     T    min() const;<br />
+T     T    max() const;<br />
+<br />
+T     valarray&lt;T&gt; shift (int) const;<br />
+T     valarray&lt;T&gt; cshift(int) const;<br />
+T     valarray&lt;T&gt; apply(T func(T)) const;<br />
+T     valarray&lt;T&gt; apply(T func(const T&amp;)) const;<br />
+T     void resize(size_t sz, T c = T());<br />
+    };<br />
+   }<br />
+<br />
+<br />
+<br />
+   26.3.4  Class slice                                  [lib.class.slice]<br />
+<br />
+T   class slice {<br />
+    public:<br />
+T     slice();<br />
+T     slice(size_t, size_t, size_t);<br />
+<br />
+T     size_t start() const;<br />
+T     size_t size() const;<br />
+T     size_t stride() const;<br />
+    };<br />
+   }<br />
+<br />
+<br />
+<br />
+   26.3.5  Template class slice_array          [lib.template.slice.array]<br />
+<br />
+T   template &lt;class T&gt; class slice_array {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+T     void operator=  (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator*= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator/= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator%= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator+= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator-= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator^= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&amp;= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator|= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator=(const T&amp;);<br />
+T    ~slice_array();<br />
+    private:<br />
+T     slice_array();<br />
+T     slice_array(const slice_array&amp;);<br />
+T     slice_array&amp; operator=(const slice_array&amp;);<br />
+    };<br />
+   }<br />
+<br />
+<br />
+<br />
+   26.3.6  The gslice class                            [lib.class.gslice]<br />
+<br />
+T   class gslice {<br />
+    public:<br />
+T     gslice();<br />
+T     gslice(size_t s, const valarray&lt;size_t&gt;&amp; l, const valarray&lt;size_t&gt;&amp; d);<br />
+<br />
+T     size_t           start() const;<br />
+T     valarray&lt;size_t&gt; size() const;<br />
+T     valarray&lt;size_t&gt; stride() const;<br />
+    };<br />
+<br />
+<br />
+   26.3.7  Template class gslice_array        [lib.template.gslice.array]<br />
+<br />
+T   template &lt;class T&gt; class gslice_array {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+T     void operator=  (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator*= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator/= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator%= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator+= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator-= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator^= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&amp;= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator|= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator=(const T&amp;);<br />
+T    ~gslice_array();<br />
+    private:<br />
+T     gslice_array();<br />
+T     gslice_array(const gslice_array&amp;);<br />
+T     gslice_array&amp; operator=(const gslice_array&amp;);<br />
+    };<br />
+<br />
+<br />
+   26.3.8  Template class mask_array            [lib.template.mask.array]<br />
+<br />
+T   template &lt;class T&gt; class mask_array {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+T     void operator=  (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator*= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator/= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator%= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator+= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator-= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator^= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&amp;= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator|= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator=(const T&amp;);<br />
+T    ~mask_array();<br />
+    private:<br />
+T     mask_array();<br />
+T     mask_array(const mask_array&amp;);<br />
+T     mask_array&amp; operator=(const mask_array&amp;);<br />
+      //  remainder implementation defined<br />
+    };<br />
+<br />
+<br />
+   26.3.9  Template class                   [lib.template.indirect.array]<br />
+       indirect_array<br />
+<br />
+T   template &lt;class T&gt; class indirect_array {<br />
+    public:<br />
+T     typedef T value_type;<br />
+<br />
+T     void operator=  (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator*= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator/= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator%= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator+= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator-= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator^= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&amp;= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator|= (const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;<br />
+T     void operator=(const T&amp;);<br />
+T    ~indirect_array();<br />
+    private:<br />
+T     indirect_array();<br />
+T     indirect_array(const indirect_array&amp;);<br />
+T     indirect_array&amp; operator=(const indirect_array&amp;);<br />
+      //  remainder implementation defined<br />
+    };<br />
+<br />
+   26.4  Generalized numeric operations                 [lib.numeric.ops]<br />
+<br />
+   Header &lt;numeric&gt; synopsis<br />
+<br />
+T   template &lt;class InputIterator, class T&gt;<br />
+      T accumulate(InputIterator first, InputIterator last, T init);<br />
+<br />
+T   template &lt;class InputIterator, class T, class BinaryOperation&gt;<br />
+      T accumulate(InputIterator first, InputIterator last, T init,<br />
+                   BinaryOperation binary_op);<br />
+<br />
+T   template &lt;class InputIterator1, class InputIterator2, class T&gt;<br />
+      T inner_product(InputIterator1 first1, InputIterator1 last1,<br />
+                      InputIterator2 first2, T init);<br />
+<br />
+T   template &lt;class InputIterator1, class InputIterator2, class T,<br />
+              class BinaryOperation1, class BinaryOperation2&gt;<br />
+      T inner_product(InputIterator1 first1, InputIterator1 last1,<br />
+                      InputIterator2 first2, T init,<br />
+                      BinaryOperation1 binary_op1,<br />
+                      BinaryOperation2 binary_op2);<br />
+<br />
+T   template &lt;class InputIterator, class OutputIterator&gt;<br />
+      OutputIterator partial_sum(InputIterator first,<br />
+                                 InputIterator last,<br />
+                                 OutputIterator result);<br />
+<br />
+T   template &lt;class InputIterator, class OutputIterator,<br />
+              class BinaryOperation&gt;<br />
+      OutputIterator partial_sum(InputIterator first,<br />
+                                 InputIterator last,<br />
+                                 OutputIterator result,<br />
+                                 BinaryOperation binary_op);<br />
+<br />
+T   template &lt;class InputIterator, class OutputIterator&gt;<br />
+      OutputIterator adjacent_difference(InputIterator first,<br />
+                                         InputIterator last,<br />
+                                         OutputIterator result);<br />
+<br />
+T   template &lt;class InputIterator, class OutputIterator,<br />
+              class BinaryOperation&gt;<br />
+      OutputIterator adjacent_difference(InputIterator first,<br />
+                                         InputIterator last,<br />
+                                         OutputIterator result,<br />
+                                         BinaryOperation binary_op);<br />
+<br />
+<br />
+   26.5  C Library                                           [lib.c.math]<br />
+<br />
+                     Table 2--Header &lt;cmath&gt; synopsis<br />
+X               Macro:   HUGE_VAL<br />
+                Functions:<br />
+X               acos     cos        fmod    modf   tan<br />
+X               asin     cosh       frexp   pow    tanh<br />
+X               atan     exp        ldexp   sin<br />
+X               atan2    fabs       log     sinh<br />
+X               ceil     floor      log10   sqrt<br />
+<br />
+                    Table 3--Header &lt;cstdlib&gt; synopsis<br />
+X                     Macros:   RAND_MAX<br />
+X                     Types:    div_t      ldiv_t<br />
+                      Functions:<br />
+X                     abs       labs       srand<br />
+X                     div       ldiv       rand<br />
+<br />
+X  long   abs(long);               // labs()<br />
+X  ldiv_t div(long, long);         // ldiv()<br />
+<br />
+X  float abs  (float);<br />
+X  float acos (float);<br />
+X  float asin (float);<br />
+X  float atan (float);<br />
+X  float atan2(float, float);<br />
+X  float ceil (float);<br />
+X  float cos  (float);<br />
+X  float cosh (float);<br />
+X  float exp  (float);<br />
+X  float fabs (float);<br />
+X  float floor(float);<br />
+X  float fmod (float, float);<br />
+X  float frexp(float, int*);<br />
+X  float ldexp(float, int);<br />
+X  float log  (float);<br />
+X  float log10(float);<br />
+X  float modf (float, float*);<br />
+X  float pow  (float, float);<br />
+X  float pow  (float, int);<br />
+X  float sin  (float);<br />
+X  float sinh (float);<br />
+X  float sqrt (float);<br />
+X  float tan  (float);<br />
+X  float tanh (float);<br />
+<br />
+X  double abs(double);            // fabs()<br />
+X  double pow(double, int);<br />
+<br />
+X  long double abs  (long double);<br />
+X  long double acos (long double);<br />
+X  long double asin (long double);<br />
+X  long double atan (long double);<br />
+X  long double atan2(long double, long double);<br />
+X  long double ceil (long double);<br />
+X  long double cos  (long double);<br />
+X  long double cosh (long double);<br />
+X  long double exp  (long double);<br />
+X  long double fabs (long double);<br />
+X  long double floor(long double);<br />
+X  long double fmod (long double, long double);<br />
+X  long double frexp(long double, int*);<br />
+X  long double ldexp(long double, int);<br />
+X  long double log  (long double);<br />
+X  long double log10(long double);<br />
+X  long double modf (long double, long double*);<br />
+X  long double pow  (long double, long double);<br />
+X  long double pow  (long double, int);<br />
+X  long double sin  (long double);<br />
+X  long double sinh (long double);<br />
+X  long double sqrt (long double);<br />
+X  long double tan  (long double);<br />
+X  long double tanh (long double);<br />
+<br />
+   Header &lt;iosfwd&gt; synopsis<br />
+<br />
+X   template&lt;class charT&gt; class char_traits;<br />
+X   template&lt;&gt; class char_traits&lt;char&gt;;<br />
+X   template&lt;&gt; class char_traits&lt;wchar_t&gt;;<br />
+X   template&lt;class T&gt; class allocator;<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ios;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_streambuf;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_istream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ostream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_iostream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_stringbuf;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_istringstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_ostringstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_stringstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_filebuf;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ifstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ofstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_fstream;<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class istreambuf_iterator;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class ostreambuf_iterator;<br />
+X   typedef basic_ios&lt;char&gt;       ios;<br />
+X   typedef basic_ios&lt;wchar_t&gt;    wios;<br />
+X   typedef basic_streambuf&lt;char&gt; streambuf;<br />
+X   typedef basic_istream&lt;char&gt;   istream;<br />
+X   typedef basic_ostream&lt;char&gt;   ostream;<br />
+X   typedef basic_iostream&lt;char&gt;  iostream;<br />
+X   typedef basic_stringbuf&lt;char&gt;     stringbuf;<br />
+X   typedef basic_istringstream&lt;char&gt; istringstream;<br />
+X   typedef basic_ostringstream&lt;char&gt; ostringstream;<br />
+X   typedef basic_stringstream&lt;char&gt;  stringstream;<br />
+X   typedef basic_filebuf&lt;char&gt;  filebuf;<br />
+X   typedef basic_ifstream&lt;char&gt; ifstream;<br />
+X   typedef basic_ofstream&lt;char&gt; ofstream;<br />
+X   typedef basic_fstream&lt;char&gt;  fstream;<br />
+X   typedef basic_streambuf&lt;wchar_t&gt; wstreambuf;<br />
+X   typedef basic_istream&lt;wchar_t&gt;   wistream;<br />
+X   typedef basic_ostream&lt;wchar_t&gt;   wostream;<br />
+X   typedef basic_iostream&lt;wchar_t&gt;  wiostream;<br />
+X   typedef basic_stringbuf&lt;wchar_t&gt;     wstringbuf;<br />
+X   typedef basic_istringstream&lt;wchar_t&gt; wistringstream;<br />
+X   typedef basic_ostringstream&lt;wchar_t&gt; wostringstream;<br />
+X   typedef basic_stringstream&lt;wchar_t&gt;  wstringstream;<br />
+<br />
+X   typedef basic_filebuf&lt;wchar_t&gt;  wfilebuf;<br />
+X   typedef basic_ifstream&lt;wchar_t&gt; wifstream;<br />
+X   typedef basic_ofstream&lt;wchar_t&gt; wofstream;<br />
+X   typedef basic_fstream&lt;wchar_t&gt;  wfstream;<br />
+X   template &lt;class state&gt; class fpos;<br />
+X   typedef fpos&lt;char_traits&lt;char&gt;::state_type&gt;    streampos;<br />
+X   typedef fpos&lt;char_traits&lt;wchar_t&gt;::state_type&gt; wstreampos;<br />
+<br />
+   27.3  Standard iostream objects                 [lib.iostream.objects]<br />
+<br />
+   Header &lt;iostream&gt; synopsis<br />
+<br />
+T  [must also include &lt;istream&gt; and &lt;ostream&gt;]<br />
+T   extern istream cin;<br />
+T   extern ostream cout;<br />
+T   extern ostream cerr;<br />
+T   extern ostream clog;<br />
+<br />
+T   extern wistream wcin;<br />
+T   extern wostream wcout;<br />
+T   extern wostream wcerr;<br />
+T   extern wostream wclog;<br />
+<br />
+   27.4  Iostreams base classes                      [lib.iostreams.base]<br />
+<br />
+   Header &lt;ios&gt; synopsis<br />
+<br />
+   #include &lt;iosfwd&gt;<br />
+<br />
+T   typedef OFF_T  streamoff;<br />
+T   typedef SZ_T streamsize;<br />
+T   template &lt;class stateT&gt; class fpos;<br />
+<br />
+    class ios_base;<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ios;<br />
+   // _lib.std.ios.manip_, manipulators:<br />
+T   ios_base&amp; boolalpha  (ios_base&amp; str);<br />
+T   ios_base&amp; noboolalpha(ios_base&amp; str);<br />
+T   ios_base&amp; showbase   (ios_base&amp; str);<br />
+T   ios_base&amp; noshowbase (ios_base&amp; str);<br />
+T   ios_base&amp; showpoint  (ios_base&amp; str);<br />
+T   ios_base&amp; noshowpoint(ios_base&amp; str);<br />
+T   ios_base&amp; showpos    (ios_base&amp; str);<br />
+T   ios_base&amp; noshowpos  (ios_base&amp; str);<br />
+T   ios_base&amp; skipws     (ios_base&amp; str);<br />
+T   ios_base&amp; noskipws   (ios_base&amp; str);<br />
+T   ios_base&amp; nouppercase(ios_base&amp; str);<br />
+T   ios_base&amp; uppercase  (ios_base&amp; str);<br />
+M   ios_base&amp; unitbuf    (ios_base&amp; str);<br />
+M   ios_base&amp; nounitbuf  (ios_base&amp; str);<br />
+   // _lib.adjustfield.manip_ adjustfield:<br />
+T   ios_base&amp; internal   (ios_base&amp; str);<br />
+T   ios_base&amp; left       (ios_base&amp; str);<br />
+T   ios_base&amp; right      (ios_base&amp; str);<br />
+   // _lib.basefield.manip_ basefield:<br />
+T   ios_base&amp; dec        (ios_base&amp; str);<br />
+T   ios_base&amp; hex        (ios_base&amp; str);<br />
+T   ios_base&amp; oct        (ios_base&amp; str);<br />
+<br />
+   // _lib.floatfield.manip_ floatfield:<br />
+T   ios_base&amp; fixed      (ios_base&amp; str);<br />
+T   ios_base&amp; scientific (ios_base&amp; str);<br />
+<br />
+<br />
+   27.4.2  Class ios_base                                  [lib.ios.base]<br />
+<br />
+T   class ios_base {<br />
+    public:<br />
+      class failure;<br />
+T     typedef T1 fmtflags;<br />
+T     static const fmtflags boolalpha;<br />
+T     static const fmtflags dec;<br />
+T     static const fmtflags fixed;<br />
+T     static const fmtflags hex;<br />
+T     static const fmtflags internal;<br />
+T     static const fmtflags left;<br />
+T     static const fmtflags oct;<br />
+T     static const fmtflags right;<br />
+T     static const fmtflags scientific;<br />
+T     static const fmtflags showbase;<br />
+T     static const fmtflags showpoint;<br />
+T     static const fmtflags showpos;<br />
+T     static const fmtflags skipws;<br />
+X     static const fmtflags unitbuf;<br />
+T     static const fmtflags uppercase;<br />
+T     static const fmtflags adjustfield;<br />
+T     static const fmtflags basefield;<br />
+T     static const fmtflags floatfield;<br />
+<br />
+      typedef T2 iostate;<br />
+T     static const iostate badbit;<br />
+T     static const iostate eofbit;<br />
+T     static const iostate failbit;<br />
+T     static const iostate goodbit;<br />
+T     typedef T3 openmode;<br />
+T     static const openmode app;<br />
+T     static const openmode ate;<br />
+T     static const openmode binary;<br />
+T     static const openmode in;<br />
+T     static const openmode out;<br />
+T     static const openmode trunc;<br />
+T     typedef T4 seekdir;<br />
+T     static const seekdir beg;<br />
+T     static const seekdir cur;<br />
+T     static const seekdir end;<br />
+T     class Init;<br />
+      // _lib.fmtflags.state_ fmtflags state:<br />
+T     fmtflags flags() const;<br />
+T     fmtflags flags(fmtflags fmtfl);<br />
+T     fmtflags setf(fmtflags fmtfl);<br />
+T     fmtflags setf(fmtflags fmtfl, fmtflags mask);<br />
+T     void unsetf(fmtflags mask);<br />
+T     streamsize precision() const;<br />
+T     streamsize precision(streamsize prec);<br />
+T     streamsize width() const;<br />
+T     streamsize width(streamsize wide);<br />
+      // _lib.ios.base.locales_ locales:<br />
+T     locale imbue(const locale&amp; loc);<br />
+T     locale getloc() const;<br />
+      // _lib.ios.base.storage_ storage:<br />
+T     static int xalloc();<br />
+T     long&amp;  iword(int index);<br />
+T     void*&amp; pword(int index);<br />
+      // destructor<br />
+T     virtual ~ios_base();<br />
+      // _lib.ios.base.callback_ callbacks;<br />
+T     enum event { erase_event, imbue_event, copyfmt_event };<br />
+T     typedef void (*event_callback)(event, ios_base&amp;, int index);<br />
+T     void register_callback(event_call_back fn, int index);<br />
+T     static bool sync_with_stdio(bool sync = true);<br />
+    protected:<br />
+T     ios_base();<br />
+    };<br />
+<br />
+   27.4.2.1.1  Class ios_base::failure                 [lib.ios::failure]<br />
+<br />
+T   class ios_base::failure : public exception {<br />
+    public:<br />
+T     explicit failure(const string&amp; msg);<br />
+T     virtual ~failure();<br />
+T     virtual const char* what() const throw();<br />
+    };<br />
+<br />
+<br />
+   27.4.2.1.6  Class ios_base::Init                       [lib.ios::Init]<br />
+<br />
+T   class ios_base::Init {<br />
+    public:<br />
+T     Init();<br />
+T    ~Init();<br />
+    };<br />
+<br />
+<br />
+   27.4.3  Template class fpos                                 [lib.fpos]<br />
+<br />
+X   template &lt;class stateT&gt; class fpos {<br />
+    public:<br />
+      // _lib.fpos.members_ Members<br />
+T     stateT state() const;<br />
+T     void state(stateT);<br />
+    private;<br />
+T     stateT st; // exposition only<br />
+    };<br />
+<br />
+<br />
+   27.4.5  Template class basic_ios                             [lib.ios]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_ios : public ios_base {<br />
+    public:<br />
+<br />
+      // Types:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+T     operator void*() const<br />
+T     bool operator!() const<br />
+T     iostate rdstate() const;<br />
+T     void clear(iostate state = goodbit);<br />
+T     void setstate(iostate state);<br />
+T     bool good() const;<br />
+T     bool eof()  const;<br />
+T     bool fail() const;<br />
+T     bool bad()  const;<br />
+T     iostate exceptions() const;<br />
+T     void exceptions(iostate except);<br />
+      // _lib.basic.ios.cons_ Constructor/destructor:<br />
+T     explicit basic_ios(basic_streambuf&lt;charT,traits&gt;* sb);<br />
+T     virtual ~basic_ios();<br />
+      // _lib.basic.ios.members_ Members:<br />
+T     basic_ostream&lt;charT,traits&gt;* tie() const;<br />
+T     basic_ostream&lt;charT,traits&gt;* tie(basic_ostream&lt;charT,traits&gt;* tiestr);<br />
+T     basic_streambuf&lt;charT,traits&gt;* rdbuf() const;<br />
+T     basic_streambuf&lt;charT,traits&gt;* rdbuf(basic_streambuf&lt;charT,traits&gt;* sb);<br />
+X     basic_ios&amp; copyfmt(const basic_ios&amp; rhs);<br />
+T     char_type fill() const;<br />
+T     char_type fill(char_type ch);<br />
+      // _lib.ios.base.locales_ locales:<br />
+T     locale imbue(const locale&amp; loc);<br />
+X     char     narrow(char_type c, char dfault) const;<br />
+X     char_type widen(char c) const;<br />
+    protected:<br />
+      basic_ios();<br />
+T     void init(basic_streambuf&lt;charT,traits&gt;* sb);<br />
+   private:<br />
+T     basic_ios(const basic_ios&amp; );       // not defined<br />
+T     basic_ios&amp; operator=(const basic_ios&amp;);     // not defined<br />
+    };<br />
+<br />
+<br />
+   27.5  Stream buffers                              [lib.stream.buffers]<br />
+<br />
+   Header &lt;streambuf&gt; synopsis<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_streambuf;<br />
+T   typedef basic_streambuf&lt;char&gt;     streambuf;<br />
+T   typedef basic_streambuf&lt;wchar_t&gt; wstreambuf;<br />
+<br />
+   27.5.2  Template class                                 [lib.streambuf]<br />
+       basic_streambuf&lt;charT,traits&gt;<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_streambuf {<br />
+    public:<br />
+<br />
+      // Types:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+T     virtual ~basic_streambuf();<br />
+      // _lib.streambuf.locales_ locales:<br />
+T     locale   pubimbue(const locale &amp;loc);<br />
+T     locale   getloc() const;<br />
+      // _lib.streambuf.buffer_ buffer and positioning:<br />
+T     basic_streambuf&lt;char_type,traits&gt;*<br />
+               pubsetbuf(char_type* s, streamsize n);<br />
+T     pos_type pubseekoff(off_type off, ios_base::seekdir way,<br />
+                          ios_base::openmode which =<br />
+                              ios_base::in | ios_base::out);<br />
+T     pos_type pubseekpos(pos_type sp,<br />
+                          ios_base::openmode which =<br />
+                              ios_base::in | ios_base::out);<br />
+T     int      pubsync();<br />
+<br />
+      // Get and put areas:<br />
+      // _lib.streambuf.pub.get_ Get area:<br />
+T     streamsize in_avail();<br />
+T     int_type snextc();<br />
+T     int_type sbumpc();<br />
+T     int_type sgetc();<br />
+T     streamsize sgetn(char_type* s, streamsize n);<br />
+      // _lib.streambuf.pub.pback_ Putback:<br />
+X     int_type sputbackc(char_type c);<br />
+X     int_type sungetc();<br />
+      // _lib.streambuf.pub.put_ Put area:<br />
+T     int_type   sputc(char_type c);<br />
+X     streamsize sputn(const char_type* s, streamsize n);<br />
+    protected:<br />
+T     basic_streambuf();<br />
+      // _lib.streambuf.get.area_ Get area:<br />
+T     char_type* eback() const;<br />
+T     char_type* gptr()  const;<br />
+T     char_type* egptr() const;<br />
+T     void       gbump(int n);<br />
+T     void       setg(char_type* gbeg, char_type* gnext, char_type* gend);<br />
+      // _lib.streambuf.put.area_ Put area:<br />
+T     char_type* pbase() const;<br />
+T     char_type* pptr() const;<br />
+T     char_type* epptr() const;<br />
+T     void       pbump(int n);<br />
+T     void       setp(char_type* pbeg, char_type* pend);<br />
+      // _lib.streambuf.virtuals_ virtual functions:<br />
+      // _lib.streambuf.virt.locales_ Locales:<br />
+T     virtual void imbue(const locale &amp;loc);<br />
+      // _lib.streambuf.virt.buffer_ Buffer management and positioning:<br />
+T     virtual basic_streambuf&lt;char_type,traits&gt;*<br />
+                       setbuf(char_type* s, streamsize n);<br />
+T     virtual pos_type seekoff(off_type off, ios_base::seekdir way,<br />
+                ios_base::openmode which = ios_base::in | ios_base::out);<br />
+T     virtual pos_type seekpos(pos_type sp,<br />
+                ios_base::openmode which = ios_base::in | ios_base::out);<br />
+T     virtual int      sync();<br />
+      // _lib.streambuf.virt.get_ Get area:<br />
+T     virtual int        showmanyc();<br />
+T     virtual streamsize xsgetn(char_type* s, streamsize n);<br />
+T     virtual int_type   underflow();<br />
+T     virtual int_type   uflow();<br />
+      // _lib.streambuf.virt.pback_ Putback:<br />
+T     virtual int_type   pbackfail(int_type c = traits::eof());<br />
+      // _lib.streambuf.virt.put_ Put area:<br />
+X     virtual streamsize xsputn(const char_type* s, streamsize n);<br />
+T     virtual int_type   overflow (int_type c = traits::eof());<br />
+    };<br />
+<br />
+   27.6  Formatting and manipulators                [lib.iostream.format]<br />
+<br />
+   Header &lt;istream&gt; synopsis<br />
+<br />
+T   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_istream;<br />
+T   typedef basic_istream&lt;char&gt;     istream;<br />
+T   typedef basic_istream&lt;wchar_t&gt; wistream;<br />
+<br />
+T   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_iostream;<br />
+T   typedef basic_iostream&lt;char&gt;    iostream;<br />
+T   typedef basic_iostream&lt;wchar_t&gt; wiostream;<br />
+<br />
+X   template &lt;class charT, class traits&gt;<br />
+      basic_istream&lt;charT,traits&gt;&amp; ws(basic_istream&lt;charT,traits&gt;&amp; is);<br />
+<br />
+   Header &lt;ostream&gt; synopsis<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ostream;<br />
+T   typedef basic_ostream&lt;char&gt;     ostream;<br />
+T   typedef basic_ostream&lt;wchar_t&gt; wostream;<br />
+<br />
+T   template &lt;class charT, class traits&gt;<br />
+      basic_ostream&lt;charT,traits&gt;&amp; endl(basic_ostream&lt;charT,traits&gt;&amp; os);<br />
+T   template &lt;class charT, class traits&gt;<br />
+      basic_ostream&lt;charT,traits&gt;&amp; ends(basic_ostream&lt;charT,traits&gt;&amp; os);<br />
+T   template &lt;class charT, class traits&gt;<br />
+      basic_ostream&lt;charT,traits&gt;&amp; flush(basic_ostream&lt;charT,traits&gt;&amp; os);<br />
+<br />
+   Header &lt;iomanip&gt; synopsis<br />
+<br />
+      // Types T1, T2, ... are unspecified implementation types<br />
+T     T1 resetiosflags(ios_base::fmtflags mask);<br />
+T     T2 setiosflags  (ios_base::fmtflags mask);<br />
+T     T3 setbase(int base);<br />
+T     template&lt;charT&gt; T4 setfill(charT c);<br />
+T     T5 setprecision(int n);<br />
+T     T6 setw(int n);<br />
+<br />
+<br />
+   27.6.1.1  Template class basic_istream                   [lib.istream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+T   class basic_istream : virtual public basic_ios&lt;charT,traits&gt; {<br />
+    public:<br />
+    // Types (inherited from basic_ios (_lib.ios_)):<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.istream.cons_ Constructor/destructor:<br />
+T     explicit basic_istream(basic_streambuf&lt;charT,traits&gt;* sb);<br />
+T     virtual ~basic_istream();<br />
+      // _lib.istream::sentry_ Prefix/suffix:<br />
+T     class sentry;<br />
+<br />
+      // _lib.istream.formatted_ Formatted input:<br />
+T     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;<br />
+          (basic_istream&lt;charT,traits&gt;&amp; (*pf)(basic_istream&lt;charT,traits&gt;&amp;))<br />
+T     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;<br />
+          (basic_ios&lt;charT,traits&gt;&amp; (*pf)(basic_ios&lt;charT,traits&gt;&amp;))<br />
+T     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;<br />
+          (ios_base&amp; (*pf)(ios_base&amp;))<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(bool&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(short&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned short&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(int&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned int&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(long&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned long&amp; n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(float&amp; f);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(double&amp; f);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(long double&amp; f);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(void*&amp; p);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;<br />
+          (basic_streambuf&lt;char_type,traits&gt;* sb);<br />
+      // _lib.istream.unformatted_ Unformatted input:<br />
+T     streamsize gcount() const;<br />
+S     int_type get();<br />
+S     basic_istream&lt;charT,traits&gt;&amp; get(char_type&amp; c);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; get(char_type* s, streamsize n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; get(char_type* s, streamsize n,<br />
+                        char_type delim);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp; sb);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp; sb,<br />
+                        char_type delim);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; getline(char_type* s, streamsize n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; getline(char_type* s, streamsize n,<br />
+                        char_type delim);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; ignore<br />
+          (streamsize n = 1, int_type delim = traits::eof());<br />
+S     int_type                     peek();<br />
+S     basic_istream&lt;charT,traits&gt;&amp; read    (char_type* s, streamsize n);<br />
+S     streamsize                   readsome(char_type* s, streamsize n);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; putback(char_type c);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; unget();<br />
+S     int sync();<br />
+<br />
+S     pos_type tellg();<br />
+S     basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type);<br />
+S     basic_istream&lt;charT,traits&gt;&amp; seekg(off_type, ios_base::seekdir);<br />
+    };<br />
+<br />
+    // _lib.istream::extractors_ character extraction templates:<br />
+S   template&lt;class charT, class traits&gt;<br />
+      basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp;,<br />
+                                              charT&amp;);<br />
+S   template&lt;class traits&gt;<br />
+      basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,<br />
+                                             unsigned char&amp;);<br />
+S   template&lt;class traits&gt;<br />
+      basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,<br />
+                                             signed char&amp;);<br />
+<br />
+S   template&lt;class charT, class traits&gt;<br />
+      basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp;,<br />
+                                              charT*);<br />
+S   template&lt;class traits&gt;<br />
+      basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,<br />
+                                             unsigned char*);<br />
+S   template&lt;class traits&gt;<br />
+      basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,<br />
+                                             signed char*);<br />
+<br />
+   27.6.1.1.2  Class basic_istream::sentry          [lib.istream::sentry]<br />
+<br />
+<br />
+    template &lt;class charT,class traits = char_traits&lt;charT&gt; &gt;<br />
+S   class basic_istream&lt;charT,traits&gt;::sentry {<br />
+      typedef traits traits_type;<br />
+S     bool ok_; // exposition only<br />
+     public:<br />
+S     explicit sentry(basic_istream&lt;charT,traits&gt;&amp; is, bool noskipws = false);<br />
+S     ~sentry();<br />
+S     operator bool() const { return ok_; }<br />
+     private:<br />
+T     sentry(const sentry&amp;); //   not defined<br />
+T     sentry&amp; operator=(const sentry&amp;); //   not defined<br />
+    };<br />
+<br />
+<br />
+   27.6.1.5  Template class basic_iostream            [lib.iostreamclass]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+T   class basic_iostream :<br />
+      public basic_istream&lt;charT,traits&gt;,<br />
+      public basic_ostream&lt;charT,traits&gt; {<br />
+    public:<br />
+      // constructor/destructor<br />
+T     explicit basic_iostream(basic_streambuf&lt;charT,traits&gt;* sb);<br />
+T     virtual ~basic_iostream();<br />
+    };<br />
+<br />
+<br />
+   27.6.2.1  Template class basic_ostream                   [lib.ostream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_ostream : virtual public basic_ios&lt;charT,traits&gt; {<br />
+    public:<br />
+    // Types (inherited from basic_ios (_lib.ios_)):<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.ostream.cons_ Constructor/destructor:<br />
+T     explicit basic_ostream(basic_streambuf&lt;char_type,traits&gt;* sb);<br />
+T     virtual ~basic_ostream();<br />
+      // _lib.ostream::sentry_ Prefix/suffix:<br />
+T     class sentry;<br />
+      // _lib.ostream.formatted_ Formatted output:<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;<br />
+          (basic_ostream&lt;charT,traits&gt;&amp; (*pf)(basic_ostream&lt;charT,traits&gt;&amp;));<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;<br />
+          (basic_ios&lt;charT,traits&gt;&amp; (*pf)(basic_ios&lt;charT,traits&gt;&amp;));<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;<br />
+          (ios_base&amp; (*pf)(ios_base&amp;));<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(bool n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(short n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned short n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(int n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned int n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(long n);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned long n);<br />
+S     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(float f);<br />
+S     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(double f);<br />
+S     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(long double f);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(const void* p);<br />
+X     basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;<br />
+          (basic_streambuf&lt;char_type,traits&gt;* sb);<br />
+      // _lib.ostream.unformatted_ Unformatted output:<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; put(char_type c);<br />
+T     basic_ostream&lt;charT,traits&gt;&amp; write(const char_type* s, streamsize n);<br />
+X     basic_ostream&lt;charT,traits&gt;&amp; flush();<br />
+<br />
+      // _lib.ostream.seeks_ seeks:<br />
+S     pos_type tellp();<br />
+S     basic_ostream&lt;charT,traits&gt;&amp; seekp(pos_type);<br />
+S     basic_ostream&lt;charT,traits&gt;&amp; seekp(off_type, ios_base::seekdir);<br />
+    };<br />
+    // _lib.ostream.inserters.character_ character inserters<br />
+X   template&lt;class charT, class traits&gt;<br />
+    basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,<br />
+                                            charT);<br />
+X   template&lt;class charT, class traits&gt;<br />
+    basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,<br />
+                                            char);<br />
+    // specialization<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             char);<br />
+    // signed and unsigned<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             signed char);<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             unsigned char)<br />
+X   template&lt;class charT, class traits&gt;<br />
+      basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,<br />
+                                              const charT*);<br />
+X   template&lt;class charT, class traits&gt;<br />
+      basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,<br />
+                                              const char*);<br />
+    // partial specializationss<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             const char*);<br />
+    //  signed and unsigned<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             const signed char*);<br />
+X   template&lt;class traits&gt;<br />
+      basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,<br />
+                                             const unsigned char*);<br />
+<br />
+<br />
+   27.6.2.3  Class basic_ostream::sentry            [lib.ostream::sentry]<br />
+<br />
+    template &lt;class charT,class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_ostream&lt;charT,traits&gt;::sentry {<br />
+      bool ok_; // exposition only<br />
+     public:<br />
+X     explicit sentry(basic_ostream&lt;charT,traits&gt;&amp; os);<br />
+X     ~sentry();<br />
+X     operator bool() const { return ok_; }<br />
+     private<br />
+X     sentry(const sentry&amp;); //   not defined<br />
+X     sentry&amp; operator=(const sentry&amp;); //   not defined<br />
+    };<br />
+<br />
+   27.7  String-based streams                        [lib.string.streams]<br />
+<br />
+   Header &lt;sstream&gt; synopsis<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+                      class Allocator = allocator&lt;charT&gt; &gt;<br />
+      class basic_stringbuf;<br />
+<br />
+T   typedef basic_stringbuf&lt;char&gt;     stringbuf;<br />
+T   typedef basic_stringbuf&lt;wchar_t&gt; wstringbuf;<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+                      class Allocator = allocator&lt;charT&gt; &gt;<br />
+X     class basic_istringstream;<br />
+<br />
+T   typedef basic_istringstream&lt;char&gt;     istringstream;<br />
+T   typedef basic_istringstream&lt;wchar_t&gt; wistringstream;<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+                      class Allocator = allocator&lt;charT&gt; &gt;<br />
+X     class basic_ostringstream;<br />
+T   typedef basic_ostringstream&lt;char&gt;     ostringstream;<br />
+T   typedef basic_ostringstream&lt;wchar_t&gt; wostringstream;<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+                      class Allocator = allocator&lt;charT&gt; &gt;<br />
+X     class basic_stringstream;<br />
+T   typedef basic_stringstream&lt;char&gt;     stringstream;<br />
+T   typedef basic_stringstream&lt;wchar_t&gt; wstringstream;<br />
+<br />
+   27.7.1  Template class basic_stringbuf                 [lib.stringbuf]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+X   class basic_stringbuf : public basic_streambuf&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.stringbuf.cons_ Constructors:<br />
+S     explicit basic_stringbuf(ios_base::openmode which<br />
+                                = ios_base::in | ios_base::out);<br />
+S     explicit basic_stringbuf<br />
+          (const basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+           ios_base::openmode which = ios_base::in | ios_base::out);<br />
+      // _lib.stringbuf.members_ Get and set:<br />
+S     basic_string&lt;charT,traits,Allocator&gt; str() const;<br />
+S     void               str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);<br />
+<br />
+    protected:<br />
+      // _lib.stringbuf.virtuals_ Overridden virtual functions:<br />
+S     virtual int_type   underflow();<br />
+S     virtual int_type   pbackfail(int_type c = traits::eof());<br />
+S     virtual int_type   overflow (int_type c = traits::eof());<br />
+S     virtual  basic_streambuf&lt;charT,traits&gt;* setbuf(charT*, streamsize);<br />
+<br />
+S     virtual pos_type   seekoff(off_type off, ios_base::seekdir way,<br />
+                                 ios_base::openmode which<br />
+                                  = ios_base::in | ios_base::out);<br />
+S     virtual pos_type   seekpos(pos_type sp,<br />
+                                 ios_base::openmode which<br />
+                                  = ios_base::in | ios_base::out);<br />
+    };<br />
+<br />
+<br />
+   27.7.2  Template class basic_istringstream         [lib.istringstream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+X   class basic_istringstream : public basic_istream&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.istringstream.cons_ Constructors:<br />
+S     explicit basic_istringstream(ios_base::openmode which = ios_base::in);<br />
+S     explicit basic_istringstream(<br />
+                         const basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+                         ios_base::openmode which = ios_base::in);<br />
+<br />
+      // _lib.istringstream.members_ Members:<br />
+S     basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;<br />
+S     basic_string&lt;charT,traits,Allocator&gt; str() const;<br />
+S     void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);<br />
+   private:<br />
+   //  basic_stringbuf&lt;charT,traits,Allocator&gt; sb;   exposition only<br />
+    };<br />
+<br />
+   27.7.3  Class basic_ostringstream                  [lib.ostringstream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+X   class basic_ostringstream : public basic_ostream&lt;charT,traits&gt; {<br />
+    public:<br />
+<br />
+      // Types:<br />
+T     typedef charT            char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+      // _lib.ostringstream.cons_ Constructors/destructor:<br />
+S     explicit basic_ostringstream(ios_base::openmode which = ios_base::out);<br />
+S     explicit basic_ostringstream(<br />
+                           const basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+                           ios_base::openmode which = ios_base::out);<br />
+      // _lib.ostringstream.members_ Members:<br />
+S     basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;<br />
+S     basic_string&lt;charT,traits,Allocator&gt; str() const;<br />
+S     void    str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);<br />
+    };<br />
+<br />
+<br />
+   27.7.4  Template class basic_stringstream           [lib.stringstream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt;,<br />
+              class Allocator = allocator&lt;charT&gt; &gt;<br />
+X   class basic_stringstream<br />
+      : public basic_iostream&lt;charT,traits&gt; {<br />
+    public:<br />
+      // Types<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+      // constructors/destructors<br />
+S     explicit basic_stringstream(<br />
+          ios_base::openmode which = ios_base::out|ios_base::in);<br />
+S     explicit basic_stringstream(<br />
+          const basic_string&lt;charT,traits,Allocator&gt;&amp; str,<br />
+          ios_base::openmode which = ios_base::out|ios_base::in);<br />
+      // Members:<br />
+S     basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;<br />
+S     basic_string&lt;charT,traits,Allocator&gt; str() const;<br />
+S     void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; str);<br />
+    };<br />
+<br />
+<br />
+<br />
+   27.8.1  File streams                                    [lib.fstreams]<br />
+<br />
+<br />
+   Header &lt;fstream&gt; synopsis<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_filebuf;<br />
+T   typedef basic_filebuf&lt;char&gt;    filebuf;<br />
+T   typedef basic_filebuf&lt;wchar_t&gt; wfilebuf;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ifstream;<br />
+T   typedef basic_ifstream&lt;char&gt;    ifstream;<br />
+T   typedef basic_ifstream&lt;wchar_t&gt; wifstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_ofstream;<br />
+T   typedef basic_ofstream&lt;char&gt;    ofstream;<br />
+T   typedef basic_ofstream&lt;wchar_t&gt; wofstream;<br />
+<br />
+X   template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+      class basic_fstream;<br />
+T   typedef basic_fstream&lt;char&gt;     fstream;<br />
+T   typedef basic_fstream&lt;wchar_t&gt; wfstream;<br />
+<br />
+   27.8.1.1  Template class basic_filebuf                   [lib.filebuf]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_filebuf : public basic_streambuf&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.filebuf.cons_ Constructors/destructor:<br />
+X     basic_filebuf();<br />
+X     virtual ~basic_filebuf();<br />
+       // _lib.filebuf.members_ Members:<br />
+T     bool is_open() const;<br />
+X     basic_filebuf&lt;charT,traits&gt;* open<br />
+          (const char* s, ios_base::openmode mode);<br />
+X     basic_filebuf&lt;charT,traits&gt;* close();<br />
+    protected:<br />
+      // _lib.filebuf.virtuals_ Overridden virtual functions:<br />
+X     virtual streamsize showmanyc();<br />
+X     virtual int_type underflow();<br />
+X     virtual int_type uflow();<br />
+X     virtual int_type pbackfail(int_type c = traits::eof());<br />
+X     virtual int_type overflow (int_type c = traits::eof());<br />
+S     virtual basic_streambuf&lt;charT,traits&gt;*<br />
+                       setbuf(char_type* s, streamsize n);<br />
+S     virtual pos_type seekoff(off_type off, ios_base::seekdir way,<br />
+                               ios_base::openmode which<br />
+                                 = ios_base::in | ios_base::out);<br />
+S     virtual pos_type seekpos(pos_type sp, ios_base::openmode which<br />
+                                 = ios_base::in | ios_base::out);<br />
+S     virtual int      sync();<br />
+S     virtual void     imbue(const locale&amp; loc);<br />
+    };<br />
+<br />
+<br />
+<br />
+   27.8.1.5  Template class basic_ifstream                 [lib.ifstream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_ifstream : public basic_istream&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.ifstream.cons_ Constructors:<br />
+S     basic_ifstream();<br />
+S     explicit basic_ifstream(const char* s,<br />
+                              ios_base::openmode mode = ios_base::in);<br />
+      // _lib.ifstream.members_ Members:<br />
+S     basic_filebuf&lt;charT,traits&gt;* rdbuf() const;<br />
+S     bool is_open();<br />
+S     void open(const char* s, ios_base::openmode mode = ios_base::in);<br />
+S     void close();<br />
+    };<br />
+<br />
+<br />
+   27.8.1.8  Template class basic_ofstream                 [lib.ofstream]<br />
+<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+X   class basic_ofstream : public basic_ostream&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // _lib.ofstream.cons_ Constructors:<br />
+X     basic_ofstream();<br />
+X     explicit basic_ofstream(const char* s,<br />
+                              ios_base::openmode mode<br />
+                                = ios_base::out);<br />
+      // _lib.ofstream.members_ Members:<br />
+X     basic_filebuf&lt;charT,traits&gt;* rdbuf() const;<br />
+T     bool is_open();<br />
+X     void open(const char* s, ios_base::openmode mode = ios_base::out);<br />
+X     void close();<br />
+    };<br />
+<br />
+<br />
+   27.8.1.11  Template class basic_fstream                  [lib.fstream]<br />
+<br />
+    template &lt;class charT, class traits=char_traits&lt;charT&gt; &gt;<br />
+X   class basic_fstream<br />
+      : public basic_iostream&lt;charT,traits&gt; {<br />
+    public:<br />
+T     typedef charT                     char_type;<br />
+T     typedef typename traits::int_type int_type;<br />
+T     typedef typename traits::pos_type pos_type;<br />
+T     typedef typename traits::off_type off_type;<br />
+T     typedef traits                    traits_type;<br />
+      // constructors/destructor<br />
+S     basic_fstream();<br />
+S     explicit basic_fstream(<br />
+          const char* s,<br />
+          ios_base::openmode mode = ios_base::in|ios_base::out);<br />
+<br />
+      // Members:<br />
+S     basic_filebuf&lt;charT,traits&gt;* rdbuf() const;<br />
+S     bool is_open();<br />
+S     void open(<br />
+          const char* s,<br />
+          ios_base::openmode mode = ios_base::in|ios_base::out);<br />
+S     void close();<br />
+    };<br />
+<br />
+<br />
+<br />
+   27.8.2  C Library files                                  [lib.c.files]<br />
+<br />
+<br />
+                    Table 13--Header &lt;cstdio&gt; synopsis<br />
+    Macros:<br />
+X   BUFSIZ         L_tmpnam        SEEK_SET   TMP_MAX<br />
+X   EOF            NULL &lt;cstdio&gt;   stderr     _IOFBF<br />
+X   FILENAME_MAX   SEEK_CUR        stdin      _IOLBF<br />
+X   FOPEN_MAX      SEEK_END        stdout     _IONBF<br />
+<br />
+X   Types:         FILE            fpos_t     size_t &lt;cstdio&gt;<br />
+    Functions:<br />
+X   clearerr       fgets           fscanf     gets     rewind<br />
+X   fclose         fopen           fseek      perror   scanf     tmpnam<br />
+X   feof           fprintf         fsetpos    printf   setbuf    ungetc<br />
+X   ferror         fputc           ftell      putc     setvbuf   vprintf<br />
+X   fflush         fputs           fwrite     puts     sprintf   vfprintf<br />
+X   fgetc          fread           getc       remove   sscanf    vsprintf<br />
+X   fgetpos        freopen         getchar    putchar  rename    tmpfile<br />
+<br />
+<br />
+<br />
+<br />
+   1.5  Standard C library headers                       [depr.c.headers]<br />
+<br />
+X     &lt;assert.h&gt;   &lt;iso646.h&gt;   &lt;setjmp.h&gt;   &lt;stdio.h&gt;    &lt;wchar.h&gt;<br />
+      &lt;ctype.h&gt;    &lt;limits.h&gt;   &lt;signal.h&gt;   &lt;stdlib.h&gt;   &lt;wctype.h&gt;<br />
+      &lt;errno.h&gt;    &lt;locale.h&gt;   &lt;stdarg.h&gt;   &lt;string.h&gt;<br />
+      &lt;float.h&gt;    &lt;math.h&gt;     &lt;stddef.h&gt;   &lt;time.h&gt;<br />
+<br />
+   1.6  Old iostreams members                          [depr.ios.members]<br />
+<br />
+   [Note: these should be #ifdef'd to permit diagnostics if used.]<br />
+   namespace std {<br />
+    class ios_base {<br />
+    public:<br />
+T     typedef T1  io_state;<br />
+T     typedef T2 open_mode;<br />
+T     typedef T3  seek_dir;<br />
+T     typedef OFF_T  streamoff;<br />
+T     typedef OFF_T  streampos;<br />
+      // remainder unchanged<br />
+    };<br />
+   }<br />
+<br />
+   [Note: these should be #ifdef'd to permit diagnostics if used.]<br />
+   namespace std {<br />
+    template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+    class basic_streambuf {<br />
+    public:<br />
+T     void stossc();<br />
+      // remainder unchanged<br />
+    };<br />
+   }<br />
+<br />
+   8 An implementation may provide  the  following  member  functions  that<br />
+   overload signatures specified in clause _lib.iostreams_:<br />
+<br />
+   [Note: the following overloads should be #ifdef'd to permit<br />
+    diagnostics to be emitted, by default, if used.]<br />
+<br />
+    template&lt;class charT, class Traits&gt; class basic_ios {<br />
+    public:<br />
+M     void clear(io_state state);<br />
+M     void setstate(io_state state);<br />
+      // remainder unchanged<br />
+    };<br />
+    class ios_base {<br />
+    public:<br />
+M     void exceptions(io_state);<br />
+      // remainder unchanged<br />
+    };<br />
+    template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+    class basic_streambuf {<br />
+    public:<br />
+M     pos_type pubseekoff(off_type off, ios_base::seek_dir way,<br />
+                ios_base::open_mode which = ios_base::in | ios_base::out);<br />
+M     pos_type pubseekpos(pos_type sp,<br />
+                ios_base::open_mode which = ios_base::in | ios_base::out);<br />
+      // remainder unchanged<br />
+    };<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+    class basic_filebuf : public basic_streambuf&lt;charT,traits&gt; {<br />
+    public:<br />
+M     basic_filebuf&lt;charT,traits&gt;* open<br />
+          (const char* s, ios_base::open_mode mode);<br />
+      // remainder unchanged<br />
+    };<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+    class basic_ifstream : public basic_istream&lt;charT,traits&gt; {<br />
+    public:<br />
+M     void open(const char* s, ios_base::open_mode mode = in);<br />
+      // remainder unchanged<br />
+    };<br />
+    template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;<br />
+    class basic_ofstream : public basic_ostream&lt;charT,traits&gt; {<br />
+    public:<br />
+M     void open(const char* s, ios_base::open_mode mode = out | trunc);<br />
+      // remainder unchanged<br />
+    };<br />
+   }<br />
+<br />
+<br />
+<br />
+   1.7.1  Class strstreambuf                          [depr.strstreambuf]<br />
+<br />
+   [Note: It should be possible to adopt these components with only<br />
+    minor changes from the 2.8 version of the library.]<br />
+<br />
+M   class strstreambuf : public basic_streambuf&lt;char&gt; {<br />
+    public:<br />
+M     explicit strstreambuf(streamsize alsize_arg = 0);<br />
+M     strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));<br />
+M     strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);<br />
+M     strstreambuf(const char* gnext_arg, streamsize n);<br />
+M     strstreambuf(signed char* gnext_arg, streamsize n,<br />
+                   signed char* pbeg_arg = 0);<br />
+M     strstreambuf(const signed char* gnext_arg, streamsize n);<br />
+M     strstreambuf(unsigned char* gnext_arg, streamsize n,<br />
+                   unsigned char* pbeg_arg = 0);<br />
+M     strstreambuf(const unsigned char* gnext_arg, streamsize n);<br />
+M     virtual ~strstreambuf();<br />
+M     void  freeze(bool freezefl = true);<br />
+M     char* str();<br />
+M     int   pcount();<br />
+    protected:<br />
+M     virtual int_type overflow (int_type c = EOF);<br />
+M     virtual int_type pbackfail(int_type c = EOF);<br />
+M     virtual int_type underflow();<br />
+M     virtual pos_type seekoff(off_type off, ios_base::seekdir way,<br />
+                               ios_base::openmode which<br />
+                                = ios_base::in | ios_base::out);<br />
+M     virtual pos_type seekpos(pos_type sp, ios_base::openmode which<br />
+                                = ios_base::in | ios_base::out);<br />
+M     virtual streambuf&lt;char&gt;* setbuf(char* s, streamsize n);<br />
+   }<br />
+<br />
+   1.7.4  Class strstream                                [depr.strstream]<br />
+<br />
+M   class strstream<br />
+      : public basic_iostream&lt;char&gt; {<br />
+    public:<br />
+      // Types<br />
+M     typedef char                                char_type;<br />
+M     typedef typename char_traits&lt;char&gt;::int_type int_type<br />
+M     typedef typename char_traits&lt;char&gt;::pos_type pos_type;<br />
+M     typedef typename char_traits&lt;char&gt;::off_type off_type;<br />
+      // consturctors/destructor<br />
+M     strstream();<br />
+M     strstream(char* s, int n,<br />
+                ios_base::openmode mode = ios_base::in|ios_base::out);<br />
+M     virtual ~strstream();<br />
+      // Members:<br />
+M     strstreambuf* rdbuf() const;<br />
+M     void freeze(bool freezefl = true);<br />
+M     int pcount() const;<br />
+M     char* str();<br />
+    };<br />
+</p></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="standard.1998.specific"></a>Implementation Specific Behavior</h4></div></div></div><p>
+ The ISO standard defines the following phrase:
+ </p><div class="blockquote"><blockquote class="blockquote"><div class="variablelist"><dl><dt><span class="term">
+ <code class="code">[1.3.5] implementation-defined behavior</code>
+ </span></dt><dd><p>
+ Behavior, for a well-formed program construct and correct data, that
+ depends on the implementation <span class="emphasis"><em>and that each implementation
+ shall document</em></span>.
+ </p></dd></dl></div></blockquote></div><p>
+ We do so here, for the C++ library only. Behavior of the
+ compiler, linker, runtime loader, and other elements of "the
+ implementation" are documented elsewhere. Everything listed
+ in Annex B, Implementation Qualities, are also part of the
+ compiler, not the library.
+ </p><p>
+ For each entry, we give the section number of the standard, when
+ applicable. This list is probably incomplet and inkorrekt.
+ </p><p>
+ <span class="emphasis"><em>[1.9]/11 #3</em></span> If <code class="code">isatty(3)</code> is true, then
+ interactive stream support is implied.
+ </p><p>
+ <span class="emphasis"><em>[17.4.4.5]</em></span> Non-reentrant functions are probably best
+ discussed in the various sections on multithreading (see above).
+ </p><p><span class="emphasis"><em>[18.1]/4</em></span> The type of <code class="code">NULL</code> is described
+ <a class="ulink" href="../18_support/howto.html#1" target="_top">here</a>.
+ </p><p><span class="emphasis"><em>[18.3]/8</em></span> Even though it's listed in the library
+ sections, libstdc++ has zero control over what the cleanup code hands
+ back to the runtime loader. Talk to the compiler people. :-)
+ </p><p><span class="emphasis"><em>[18.4.2.1]/5</em></span> (bad_alloc),
+ <span class="emphasis"><em>[18.5.2]/5</em></span> (bad_cast),
+ <span class="emphasis"><em>[18.5.3]/5</em></span> (bad_typeid),
+ <span class="emphasis"><em>[18.6.1]/8</em></span> (exception),
+ <span class="emphasis"><em>[18.6.2.1]/5</em></span> (bad_exception): The <code class="code">what()</code>
+ member function of class <code class="code">std::exception</code>, and these other
+ classes publicly derived from it, simply returns the name of the
+ 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="ulink" href="../18_support/howto.html#5" target="_top">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
+ user-defined exceptions.)
+ </p><p><span class="emphasis"><em>[18.5.1]/7</em></span> The return value of
+ <code class="code">std::type_info::name()</code> is the mangled type name (see the
+ previous entry for more).
+ </p><p><span class="emphasis"><em>[20.1.5]/5</em></span> <span class="emphasis"><em>"Implementors are encouraged to
+ supply libraries that can accept allocators that encapsulate more
+ general memory models and that support non-equal instances. In such
+ implementations, any requirements imposed on allocators by containers
+ beyond those requirements that appear in Table 32, and the semantics
+ of containers and algorithms when allocator instances compare
+ non-equal, are implementation-defined."</em></span> As yet we don't
+ have any allocators which compare non-equal, so we can't describe how
+ they behave.
+ </p><p><span class="emphasis"><em>[21.1.3.1]/3,4</em></span>,
+ <span class="emphasis"><em>[21.1.3.2]/2</em></span>,
+ <span class="emphasis"><em>[23.*]'s foo::iterator</em></span>,
+ <span class="emphasis"><em>[27.*]'s foo::*_type</em></span>,
+ <span class="emphasis"><em>others...</em></span>
+ Nope, these types are called implementation-defined because you
+ shouldn't be taking advantage of their underlying types. Listing them
+ here would defeat the purpose. :-)
+ </p><p><span class="emphasis"><em>[21.1.3.1]/5</em></span> I don't really know about the mbstate_t
+ stuff... see the <a class="ulink" href="../22_locale/howto.html" target="_top">chapter 22 notes</a>
+ for what does exist.
+ </p><p><span class="emphasis"><em>[22.*]</em></span> Anything and everything we have on locale
+ implementation will be described
+ <a class="ulink" href="../22_locale/howto.html" target="_top">over here</a>.
+ </p><p><span class="emphasis"><em>[26.2.8]/9</em></span> I have no idea what
+ <code class="code">complex&lt;T&gt;</code>'s pow(0,0) returns.
+ </p><p><span class="emphasis"><em>[27.4.2.4]/2</em></span> Calling
+ <code class="code">std::ios_base::sync_with_stdio</code> after I/O has already been
+ performed on the standard stream objects will
+ flush the buffers, and
+ destroy and recreate the underlying buffer instances. Whether or not
+ the previously-written I/O is destroyed in this process depends mostly
+ on the --enable-libio choice: for stdio, if the written data is
+ already in the stdio buffer, the data may be completely safe!
+ </p><p><span class="emphasis"><em>[27.6.1.1.2]</em></span>,
+ <span class="emphasis"><em>[27.6.2.3]</em></span> The I/O sentry ctor and dtor can perform
+ additional work than the minimum required. We are not currently taking
+ advantage of this yet.
+ </p><p><span class="emphasis"><em>[27.7.1.3]/16</em></span>,
+ <span class="emphasis"><em>[27.8.1.4]/10</em></span>
+ The effects of <code class="code">pubsetbuf/setbuf</code> are described
+ <a class="ulink" href="../27_io/howto.html#2" target="_top">in this chapter</a>.
+ </p><p><span class="emphasis"><em>[27.8.1.4]/16</em></span> Calling <code class="code">fstream::sync</code> when
+ a get area exists will... whatever <code class="code">fflush()</code> does, I think.
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.standard.tr1"></a>C++ TR1</h3></div></div></div><p>
+This table is based on the table of contents of ISO/IEC DTR 19768
+Doc No: N1836=05-0096 Date: 2005-06-24
+Draft Technical Report on C++ Library Extensions
+</p><p>
+In this implementation the header names are prefixed by
+<code class="code">tr1/</code>, for instance <code class="code">&lt;tr1/functional&gt;</code>,
+<code class="code">&lt;tr1/memory&gt;</code>, and so on.
+</p><p>
+This page describes the TR1 support in mainline GCC SVN, not in any particular
+release.
+</p><div class="table"><a id="id395297"></a><p class="title"><b>Table 1.1. 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" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="5" 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">done</td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes</td></tr><tr><td align="left">2.2.3.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.6</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.7</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.8</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.9</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.10</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.5</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>3</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td align="left">3.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Additions to <code class="code">&lt;functional&gt; synopsis</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.3</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.5</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.6</td><td align="left">undefined operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>4</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>5</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td align="left">5.1</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.3</td><td align="left">Class template <code class="code">variate_generator</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.1</td><td align="left">Class template <code class="code">linear_congruential</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.2</td><td align="left">Class template <code class="code">mersenne_twister</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.3</td><td align="left">Class template <code class="code">subtract_with_carry</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.4</td><td align="left">Class template <code class="code">subtract_with_carry_01</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.5</td><td align="left">Class template <code class="code">discard_block</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.6</td><td align="left">Class template <code class="code">xor_combine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">5.1.5</td><td align="left">Engines with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7</td><td align="left">Random distribution class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.1</td><td align="left">Class template <code class="code">uniform_int</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.2</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.4</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.5</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.6</td><td align="left">Class template <code class="code">uniform_real</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.7</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.8</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.9</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2</td><td align="left">Mathematical special functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.2</td><td align="left">associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.3</td><td align="left">beta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.7</td><td align="left">confluent hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.8</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.9</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.10</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.11</td><td align="left">cylindrical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.12</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.13</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.14</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.15</td><td align="left">exponential integral</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.16</td><td align="left">Hermite polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.17</td><td align="left">hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.18</td><td align="left">Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.19</td><td align="left">Legendre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.20</td><td align="left">Riemann zeta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.21</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.22</td><td align="left">spherical associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.23</td><td align="left">spherical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.2</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>6</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">6.1</td><td align="left">Tuple types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.1</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.2</td><td align="left">Additions to header <code class="code">&lt;utility&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.4</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2</td><td align="left">Fixed size array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.1</td><td align="left">Header <code class="code">&lt;array&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.3</td><td align="left"><code class="code">array</code> size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.4</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.5</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1</td><td align="left">Unordered associative container requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1.1</td><td align="left">Exception safety guarantees</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.2</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.3</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4</td><td align="left">Unordered associative container classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.1</td><td align="left">Header <code class="code">&lt;unordered_set&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.2</td><td align="left">Header <code class="code">&lt;unordered_map&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>7</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">7.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.4</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>8</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code">&lt;complex&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Header <code class="code">&lt;ccomplex&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.3</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.4</td><td align="left">Additions to header <code class="code">&lt;cctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.5</td><td align="left">Additions to header <code class="code">&lt;ctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6</td><td align="left">Header <code class="code">&lt;cfenv&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.7</td><td align="left">Header <code class="code">&lt;fenv.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.8</td><td align="left">Additions to header <code class="code">&lt;cfloat&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.9</td><td align="left">Additions to header <code class="code">&lt;float.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.10</td><td align="left">Additions to header <code class="code">&lt;ios&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.11</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">8.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.12</td><td align="left">Header <code class="code">&lt;inttypes.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.13</td><td align="left">Additions to header <code class="code">&lt;climits&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.14</td><td align="left">Additions to header <code class="code">&lt;limits.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.15</td><td align="left">Additions to header <code class="code">&lt;locale&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.16</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">8.17</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.18</td><td align="left">Additions to header <code class="code">&lt;cstdarg&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.19</td><td align="left">Additions to header <code class="code">&lt;stdarg.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.20</td><td align="left">The header <code class="code">&lt;cstdbool&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.21</td><td align="left">The header <code class="code">&lt;stdbool.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22</td><td align="left">The header <code class="code">&lt;cstdint&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.23</td><td align="left">The header <code class="code">&lt;stdint.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24</td><td align="left">Additions to header <code class="code">&lt;cstdio&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.24.4</td><td align="left">Additions to header <code class="code">&lt;stdio.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25</td><td align="left">Additions to header <code class="code">&lt;cstdlib&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.26</td><td align="left">Additions to header <code class="code">&lt;stdlib.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.27</td><td align="left">Header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.28</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.29</td><td align="left">Additions to header <code class="code">&lt;ctime&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.30</td><td align="left">Additions to header <code class="code">&lt;cwchar&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.31</td><td align="left">Additions to header <code class="code">&lt;wchar.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32</td><td align="left">Additions to header <code class="code">&lt;cwctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.33</td><td align="left">Additions to header <code class="code">&lt;wctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+Footnotes
+</p><p>
+ The shared_ptr implementation uses some code from the
+ <a class="ulink" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">Boost
+ shared_ptr</a> library.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.standard.200x"></a>C++ 200x</h3></div></div></div><p>
+This table is based on the table of contents of ISO/IEC
+Doc No: N2461=07-0331 Date: 2007-10-22
+Working Draft, Standard for Programming Language C++
+</p><p>
+In this implementation <code class="literal">-std=gnu++0x</code> or
+<code class="literal">-std=c++0x</code> flags must be used to enable language and
+library features. The pre-defined symbol
+<code class="constant">__GXX_EXPERIMENTAL_CXX0X__</code> is used to check for the
+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="id472768"></a><p class="title"><b>Table 1.2. 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" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>20</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">20.2</td><td align="left">Utility Components</td><td align="left"> </td><td align="left"> </td><td align="left">incomplete</td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">forward/move helpers</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4</td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">20.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5 </td><td align="left">Function Objects</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left">Base</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.14</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11</td><td align="left">Template function bind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.16</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left">missing <code class="code">unique_ptr</code></td></tr><tr><td align="left">20.6.5</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes.</td></tr><tr><td align="left">20.6.6.2.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.6</td><td align="left"><code class="code">shared_ptr</code> creation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">
+ <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">N2351</a>
+ </td></tr><tr><td align="left">20.6.6.2.7</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.8</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.9</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.10</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.11</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.4</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>23</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">23.2.1</td><td align="left">Header <code class="code">&lt;array&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1</td><td align="left">Class template array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.3</td><td align="left"><code class="code">array </code>size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.4</td><td align="left"><code class="code">array </code>data</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.5</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.6</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>26</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerics</em></span></td></tr><tr><td align="left">26.4</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.3</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4</td><td align="left">Random number engine adaptor class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.1</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.2</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.3</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.4</td><td align="left">Class template <code class="code">xor_combine_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">26.4.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7</td><td align="left">Utilities</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.7.2</td><td align="left">Function template <code class="code">generate_cannonical</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8</td><td align="left">Random number generation class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Uniform distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2</td><td align="left">Bernoulli distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3</td><td align="left">Poisson distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4</td><td align="left">Normal distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5</td><td align="left">Sampling distributions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">general_pdf_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>28</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">28.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.4</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>C</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">C2.1</td><td align="left">Additions to header <code class="code">&lt;complex&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.2</td><td align="left">Header <code class="code">&lt;ccomplex&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.3</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.4</td><td align="left">Additions to header <code class="code">&lt;cctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.5</td><td align="left">Additions to header <code class="code">&lt;ctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6</td><td align="left">Header <code class="code">&lt;cfenv&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.7</td><td align="left">Header <code class="code">&lt;fenv.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.8</td><td align="left">Additions to header <code class="code">&lt;cfloat&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.9</td><td align="left">Additions to header <code class="code">&lt;float.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.10</td><td align="left">Additions to header <code class="code">&lt;ios&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.11</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">C2.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.12</td><td align="left">Header <code class="code">&lt;inttypes.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.13</td><td align="left">Additions to header <code class="code">&lt;climits&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.14</td><td align="left">Additions to header <code class="code">&lt;limits.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.15</td><td align="left">Additions to header <code class="code">&lt;locale&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.16</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">C2.17</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.18</td><td align="left">Additions to header <code class="code">&lt;cstdarg&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.19</td><td align="left">Additions to header <code class="code">&lt;stdarg.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.20</td><td align="left">The header <code class="code">&lt;cstdbool&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.21</td><td align="left">The header <code class="code">&lt;stdbool.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22</td><td align="left">The header <code class="code">&lt;cstdint&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.23</td><td align="left">The header <code class="code">&lt;stdint.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24</td><td align="left">Additions to header <code class="code">&lt;cstdio&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.24.4</td><td align="left">Additions to header <code class="code">&lt;stdio.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25</td><td align="left">Additions to header <code class="code">&lt;cstdlib&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.26</td><td align="left">Additions to header <code class="code">&lt;stdlib.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.27</td><td align="left">Header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.28</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.29</td><td align="left">Additions to header <code class="code">&lt;ctime&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.30</td><td align="left">Additions to header <code class="code">&lt;cwchar&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.31</td><td align="left">Additions to header <code class="code">&lt;wchar.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32</td><td align="left">Additions to header <code class="code">&lt;cwctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.33</td><td align="left">Additions to header <code class="code">&lt;wctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>D</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Compatibility Features</em></span></td></tr><tr><td align="left">D.6</td><td align="left">Old iostream members</td><td align="left">done</td><td align="left"> </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">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr><tr><td align="left">D.9</td><td align="left">Class template <code class="code">auto_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr></tbody></table></div></div><br class="table-break" /><p>
+Footnotes
+</p><p>
+ The shared_ptr implementation uses some code from the
+ <a class="ulink" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">Boost
+ shared_ptr</a> library.
+</p></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="bk01pt01ch01s02.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/bk01pt01ch01s02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html
new file mode 100644
index 00000000000..fe9055c8bb1
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html
@@ -0,0 +1,40 @@
+<?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>License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="next" href="bk01pt01ch01s03.html" title="Bugs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01s03.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.intro.status.license"></a>License</h2></div></div></div><p>
+ There are two licenses affecting GNU libstdc++: one for the code,
+ and one for the documentation.
+ </p><p>
+ There is a license section in the FAQ regarding common <a class="link" href="../faq.html#faq.license" title="License">questions</a>. If you have more
+ questions, ask the FSF or the <a class="ulink" href="http://gcc.gnu.org/lists.html" target="_top">gcc mailing list</a>.
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.license.gpl"></a>The Code: GPL</h3></div></div></div><p>
+ The source code is distributed under the <a class="link" href="bk01apd.html" title="Appendix D. GNU General Public License">GNU General Public License version 2</a>,
+ with the so-called “<span class="quote">Runtime Exception</span>â€
+ as follows (or see any header or implementation file):
+ </p><div class="literallayout"><p><br />
+      As a special exception, you may use this file as part of a free software<br />
+      library without restriction.  Specifically, if other files instantiate<br />
+      templates or use macros or inline functions from this file, or you compile<br />
+      this file and link it with other files to produce an executable, this<br />
+      file does not by itself cause the resulting executable to be covered by<br />
+      the GNU General Public License.  This exception does not however<br />
+      invalidate any other reasons why the executable file might be covered by<br />
+      the GNU General Public License.<br />
+    </p></div><p>
+ Hopefully that text is self-explanatory. If it isn't, you need to speak
+ to your lawyer, or the Free Software Foundation.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.license.fdl"></a>The Documentation: GPL, FDL</h3></div></div></div><p>
+ The documentation shipped with the library and made available over
+ the web, excluding the pages generated from source comments, are
+ copyrighted by the Free Software Foundation, and placed under the
+ <a class="link" href="bk01ape.html" title="Appendix E. GNU Free Documentation License"> GNU Free Documentation
+ License version 1.2</a>. There are no Front-Cover Texts, no
+ Back-Cover Texts, and no Invariant Sections.
+ </p><p>
+ For documentation generated by doxygen or other automated tools
+ via processing source code comments and markup, the original source
+ code license applies to the generated files. Thus, the doxygen
+ documents are licensed <a class="link" href="bk01apd.html" title="Appendix D. GNU General Public License">GPL</a>.
+ </p><p>
+ If you plan on making copies of the documentation, please let us know.
+ We can probably offer suggestions.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch01s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Status </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Bugs</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html
new file mode 100644
index 00000000000..cbca8f3f3f8
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html
@@ -0,0 +1,287 @@
+<?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>Bugs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01s02.html" title="License" /><link rel="next" href="bk01pt01ch02.html" title="Chapter 2. Setup" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s02.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02.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.intro.status.bugs"></a>Bugs</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.impl"></a>Implementation Bugs</h3></div></div></div><p>
+ Information on known bugs, details on efforts to fix them, and
+ fixed bugs are all available as part of the GCC bug tracking
+ system, <a class="ulink" href="http://gcc.gnu.org/bugzilla" target="_top">bugzilla</a>, with the
+ category set to <code class="literal">libstdc++</code>.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.iso"></a>Standard Bugs</h3></div></div></div><p>
+ Everybody's got issues. Even the C++ Standard Library.
+ </p><p>
+ The Library Working Group, or LWG, is the ISO subcommittee responsible
+ for making changes to the library. They periodically publish an
+ Issues List containing problems and possible solutions. As they reach
+ a consensus on proposed solutions, we often incorporate the solution.
+ </p><p>
+ Here are the issues which have resulted in code changes to the library.
+ The links are to the specific defect reports from a <span class="emphasis"><em>partial
+ copy</em></span> of the Issues List. You can read the full version online
+ at the <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/" target="_top">ISO C++
+ Committee homepage</a>, linked to on the
+ <a class="ulink" href="http://gcc.gnu.org/readings.html" target="_top">GCC "Readings"
+ page</a>. If
+ you spend a lot of time reading the issues, we recommend downloading
+ the ZIP file and reading them locally.
+ </p><p>
+ (NB: <span class="emphasis"><em>partial copy</em></span> means that not all
+ links within the lwg-*.html pages will work. Specifically,
+ links to defect reports that have not been accorded full DR
+ status will probably break. Rather than trying to mirror the
+ entire issues list on our overworked web server, we recommend
+ you go to the LWG homepage instead.)
+ </p><p>
+ If a DR is not listed here, we may simply not have gotten to
+ it yet; feel free to submit a patch. Search the include/bits
+ and src directories for appearances of
+ <code class="constant">_GLIBCXX_RESOLVE_LIB_DEFECTS</code> for examples
+ of style. Note that we usually do not make changes to the
+ code until an issue has reached <a class="ulink" href="lwg-active.html#DR" target="_top">DR</a> status.
+ </p><div class="variablelist"><dl><dt><span class="term"><a class="ulink" href="lwg-defects.html#5" target="_top">5</a>:
+ <span class="emphasis"><em>string::compare specification questionable</em></span>
+ </span></dt><dd><p>This should be two overloaded functions rather than a single function.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#17" target="_top">17</a>:
+ <span class="emphasis"><em>Bad bool parsing</em></span>
+ </span></dt><dd><p>Apparently extracting Boolean values was messed up...
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#19" target="_top">19</a>:
+ <span class="emphasis"><em>"Noconv" definition too vague</em></span>
+ </span></dt><dd><p>If <code class="code">codecvt::do_in</code> returns <code class="code">noconv</code> there are
+ no changes to the values in <code class="code">[to, to_limit)</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#22" target="_top">22</a>:
+ <span class="emphasis"><em>Member open vs flags</em></span>
+ </span></dt><dd><p>Re-opening a file stream does <span class="emphasis"><em>not</em></span> clear the state flags.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#25" target="_top">25</a>:
+ <span class="emphasis"><em>String operator&lt;&lt; uses width() value wrong</em></span>
+ </span></dt><dd><p>Padding issues.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#48" target="_top">48</a>:
+ <span class="emphasis"><em>Use of non-existent exception constructor</em></span>
+ </span></dt><dd><p>An instance of <code class="code">ios_base::failure</code> is constructed instead.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#49" target="_top">49</a>:
+ <span class="emphasis"><em>Underspecification of ios_base::sync_with_stdio</em></span>
+ </span></dt><dd><p>The return type is the <span class="emphasis"><em>previous</em></span> state of synchronization.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#50" target="_top">50</a>:
+ <span class="emphasis"><em>Copy constructor and assignment operator of ios_base</em></span>
+ </span></dt><dd><p>These members functions are declared <code class="code">private</code> and are
+ thus inaccessible. Specifying the correct semantics of
+ "copying stream state" was deemed too complicated.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#60" target="_top">60</a>:
+ <span class="emphasis"><em>What is a formatted input function?</em></span>
+ </span></dt><dd><p>This DR made many widespread changes to <code class="code">basic_istream</code>
+ and <code class="code">basic_ostream</code> all of which have been implemented.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#63" target="_top">63</a>:
+ <span class="emphasis"><em>Exception-handling policy for unformatted output</em></span>
+ </span></dt><dd><p>Make the policy consistent with that of formatted input, unformatted
+ input, and formatted output.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#68" target="_top">68</a>:
+ <span class="emphasis"><em>Extractors for char* should store null at end</em></span>
+ </span></dt><dd><p>And they do now. An editing glitch in the last item in the list of
+ [27.6.1.2.3]/7.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#74" target="_top">74</a>:
+ <span class="emphasis"><em>Garbled text for codecvt::do_max_length</em></span>
+ </span></dt><dd><p>The text of the standard was gibberish. Typos gone rampant.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#75" target="_top">75</a>:
+ <span class="emphasis"><em>Contradiction in codecvt::length's argument types</em></span>
+ </span></dt><dd><p>Change the first parameter to <code class="code">stateT&amp;</code> and implement
+ the new effects paragraph.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#83" target="_top">83</a>:
+ <span class="emphasis"><em>string::npos vs. string::max_size()</em></span>
+ </span></dt><dd><p>Safety checks on the size of the string should test against
+ <code class="code">max_size()</code> rather than <code class="code">npos</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#90" target="_top">90</a>:
+ <span class="emphasis"><em>Incorrect description of operator&gt;&gt; for strings</em></span>
+ </span></dt><dd><p>The effect contain <code class="code">isspace(c,getloc())</code> which must be
+ replaced by <code class="code">isspace(c,is.getloc())</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#91" target="_top">91</a>:
+ <span class="emphasis"><em>Description of operator&gt;&gt; and getline() for string&lt;&gt;
+ might cause endless loop</em></span>
+ </span></dt><dd><p>They behave as a formatted input function and as an unformatted
+ input function, respectively (except that <code class="code">getline</code> is
+ not required to set <code class="code">gcount</code>).
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#103" target="_top">103</a>:
+ <span class="emphasis"><em>set::iterator is required to be modifiable, but this allows
+ modification of keys.</em></span>
+ </span></dt><dd><p>For associative containers where the value type is the same as
+ the key type, both <code class="code">iterator</code> and <code class="code">const_iterator
+ </code> are constant iterators.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#109" target="_top">109</a>:
+ <span class="emphasis"><em>Missing binders for non-const sequence elements</em></span>
+ </span></dt><dd><p>The <code class="code">binder1st</code> and <code class="code">binder2nd</code> didn't have an
+ <code class="code">operator()</code> taking a non-const parameter.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#110" target="_top">110</a>:
+ <span class="emphasis"><em>istreambuf_iterator::equal not const</em></span>
+ </span></dt><dd><p>This was not a const member function. Note that the DR says to
+ replace the function with a const one; we have instead provided an
+ overloaded version with identical contents.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#117" target="_top">117</a>:
+ <span class="emphasis"><em>basic_ostream uses nonexistent num_put member functions</em></span>
+ </span></dt><dd><p><code class="code">num_put::put()</code> was overloaded on the wrong types.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#118" target="_top">118</a>:
+ <span class="emphasis"><em>basic_istream uses nonexistent num_get member functions</em></span>
+ </span></dt><dd><p>Same as 117, but for <code class="code">num_get::get()</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="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="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
+ <code class="code">seekg</code> should only set the input stream.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#167" target="_top">167</a>:
+ <span class="emphasis"><em>Improper use of traits_type::length()</em></span>
+ </span></dt><dd><p><code class="code">op&lt;&lt;</code> with a <code class="code">const char*</code> was
+ calculating an incorrect number of characters to write.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#169" target="_top">169</a>:
+ <span class="emphasis"><em>Bad efficiency of overflow() mandated</em></span>
+ </span></dt><dd><p>Grow efficiently the internal array object.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#171" target="_top">171</a>:
+ <span class="emphasis"><em>Strange seekpos() semantics due to joint position</em></span>
+ </span></dt><dd><p>Quite complex to summarize...
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#181" target="_top">181</a>:
+ <span class="emphasis"><em>make_pair() unintended behavior</em></span>
+ </span></dt><dd><p>This function used to take its arguments as reference-to-const, now
+ it copies them (pass by value).
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#195" target="_top">195</a>:
+ <span class="emphasis"><em>Should basic_istream::sentry's constructor ever set eofbit?</em></span>
+ </span></dt><dd><p>Yes, it can, specifically if EOF is reached while skipping whitespace.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#211" target="_top">211</a>:
+ <span class="emphasis"><em>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</em></span>
+ </span></dt><dd><p>If nothing is extracted into the string, <code class="code">op&gt;&gt;</code> now
+ sets <code class="code">failbit</code> (which can cause an exception, etc., etc.).
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#214" target="_top">214</a>:
+ <span class="emphasis"><em>set::find() missing const overload</em></span>
+ </span></dt><dd><p>Both <code class="code">set</code> and <code class="code">multiset</code> were missing
+ overloaded find, lower_bound, upper_bound, and equal_range functions
+ for const instances.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#231" target="_top">231</a>:
+ <span class="emphasis"><em>Precision in iostream?</em></span>
+ </span></dt><dd><p>For conversion from a floating-point type, <code class="code">str.precision()</code>
+ is specified in the conversion specification.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-active.html#233" target="_top">233</a>:
+ <span class="emphasis"><em>Insertion hints in associative containers</em></span>
+ </span></dt><dd><p>Implement N1780, first check before then check after, insert as close
+ to hint as possible.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#235" target="_top">235</a>:
+ <span class="emphasis"><em>No specification of default ctor for reverse_iterator</em></span>
+ </span></dt><dd><p>The declaration of <code class="code">reverse_iterator</code> lists a default constructor.
+ However, no specification is given what this constructor should do.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#241" target="_top">241</a>:
+ <span class="emphasis"><em>Does unique_copy() require CopyConstructible and Assignable?</em></span>
+ </span></dt><dd><p>Add a helper for forward_iterator/output_iterator, fix the existing
+ one for input_iterator/output_iterator to not rely on Assignability.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#243" target="_top">243</a>:
+ <span class="emphasis"><em>get and getline when sentry reports failure</em></span>
+ </span></dt><dd><p>Store a null character only if the character array has a non-zero size.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#251" target="_top">251</a>:
+ <span class="emphasis"><em>basic_stringbuf missing allocator_type</em></span>
+ </span></dt><dd><p>This nested typedef was originally not specified.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#253" target="_top">253</a>:
+ <span class="emphasis"><em>valarray helper functions are almost entirely useless</em></span>
+ </span></dt><dd><p>Make the copy constructor and copy-assignment operator declarations
+ public in gslice_array, indirect_array, mask_array, slice_array; provide
+ definitions.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#265" target="_top">265</a>:
+ <span class="emphasis"><em>std::pair::pair() effects overly restrictive</em></span>
+ </span></dt><dd><p>The default ctor would build its members from copies of temporaries;
+ now it simply uses their respective default ctors.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#266" target="_top">266</a>:
+ <span class="emphasis"><em>bad_exception::~bad_exception() missing Effects clause</em></span>
+ </span></dt><dd><p>The <code class="code">bad_</code>* classes no longer have destructors (they
+ are trivial), since no description of them was ever given.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#271" target="_top">271</a>:
+ <span class="emphasis"><em>basic_iostream missing typedefs</em></span>
+ </span></dt><dd><p>The typedefs it inherits from its base classes can't be used, since
+ (for example) <code class="code">basic_iostream&lt;T&gt;::traits_type</code> is ambiguous.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#275" target="_top">275</a>:
+ <span class="emphasis"><em>Wrong type in num_get::get() overloads</em></span>
+ </span></dt><dd><p>Similar to 118.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#280" target="_top">280</a>:
+ <span class="emphasis"><em>Comparison of reverse_iterator to const reverse_iterator</em></span>
+ </span></dt><dd><p>Add global functions with two template parameters.
+ (NB: not added for now a templated assignment operator)
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#292" target="_top">292</a>:
+ <span class="emphasis"><em>Effects of a.copyfmt (a)</em></span>
+ </span></dt><dd><p>If <code class="code">(this == &amp;rhs)</code> do nothing.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#300" target="_top">300</a>:
+ <span class="emphasis"><em>List::merge() specification incomplete</em></span>
+ </span></dt><dd><p>If <code class="code">(this == &amp;x)</code> do nothing.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#303" target="_top">303</a>:
+ <span class="emphasis"><em>Bitset input operator underspecified</em></span>
+ </span></dt><dd><p>Basically, compare the input character to <code class="code">is.widen(0)</code>
+ and <code class="code">is.widen(1)</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#305" target="_top">305</a>:
+ <span class="emphasis"><em>Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</em></span>
+ </span></dt><dd><p>Do not specify what <code class="code">codecvt&lt;wchar_t, char, mbstate_t&gt;::do_length</code>
+ must return.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#328" target="_top">328</a>:
+ <span class="emphasis"><em>Bad sprintf format modifier in money_put&lt;&gt;::do_put()</em></span>
+ </span></dt><dd><p>Change the format string to "%.0Lf".
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#365" target="_top">365</a>:
+ <span class="emphasis"><em>Lack of const-qualification in clause 27</em></span>
+ </span></dt><dd><p>Add const overloads of <code class="code">is_open</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#389" target="_top">389</a>:
+ <span class="emphasis"><em>Const overload of valarray::operator[] returns by value</em></span>
+ </span></dt><dd><p>Change it to return a <code class="code">const T&amp;</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#402" target="_top">402</a>:
+ <span class="emphasis"><em>Wrong new expression in [some_]allocator::construct</em></span>
+ </span></dt><dd><p>Replace "new" with "::new".
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#409" target="_top">409</a>:
+ <span class="emphasis"><em>Closing an fstream should clear the error state</em></span>
+ </span></dt><dd><p>Have <code class="code">open</code> clear the error flags.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-active.html#431" target="_top">431</a>:
+ <span class="emphasis"><em>Swapping containers with unequal allocators</em></span>
+ </span></dt><dd><p>Implement Option 3, as per N1599.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#432" target="_top">432</a>:
+ <span class="emphasis"><em>stringbuf::overflow() makes only one write position
+ available</em></span>
+ </span></dt><dd><p>Implement the resolution, beyond DR 169.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#434" target="_top">434</a>:
+ <span class="emphasis"><em>bitset::to_string() hard to use</em></span>
+ </span></dt><dd><p>Add three overloads, taking fewer template arguments.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#438" target="_top">438</a>:
+ <span class="emphasis"><em>Ambiguity in the "do the right thing" clause</em></span>
+ </span></dt><dd><p>Implement the resolution, basically cast less.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#453" target="_top">453</a>:
+ <span class="emphasis"><em>basic_stringbuf::seekoff need not always fail for an empty stream</em></span>
+ </span></dt><dd><p>Don't fail if the next pointer is null and newoff is zero.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#455" target="_top">455</a>:
+ <span class="emphasis"><em>cerr::tie() and wcerr::tie() are overspecified</em></span>
+ </span></dt><dd><p>Initialize cerr tied to cout and wcerr tied to wcout.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#464" target="_top">464</a>:
+ <span class="emphasis"><em>Suggestion for new member functions in standard containers</em></span>
+ </span></dt><dd><p>Add <code class="code">data()</code> to <code class="code">std::vector</code> and
+ <code class="code">at(const key_type&amp;)</code> to <code class="code">std::map</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#508" target="_top">508</a>:
+ <span class="emphasis"><em>Bad parameters for ranlux64_base_01</em></span>
+ </span></dt><dd><p>Fix the parameters.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-closed.html#512" target="_top">512</a>:
+ <span class="emphasis"><em>Seeding subtract_with_carry_01 from a single unsigned long</em></span>
+ </span></dt><dd><p>Construct a <code class="code">linear_congruential</code> engine and seed with it.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-closed.html#526" target="_top">526</a>:
+ <span class="emphasis"><em>Is it undefined if a function in the standard changes in
+ parameters?</em></span>
+ </span></dt><dd><p>Use &amp;value.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#538" target="_top">538</a>:
+ <span class="emphasis"><em>241 again: Does unique_copy() require CopyConstructible
+ and Assignable?</em></span>
+ </span></dt><dd><p>In case of input_iterator/output_iterator rely on Assignability of
+ input_iterator' value_type.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#541" target="_top">541</a>:
+ <span class="emphasis"><em>shared_ptr template assignment and void</em></span>
+ </span></dt><dd><p>Add an auto_ptr&lt;void&gt; specialization.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#543" target="_top">543</a>:
+ <span class="emphasis"><em>valarray slice default constructor</em></span>
+ </span></dt><dd><p>Follow the straightforward proposed resolution.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#586" target="_top">586</a>:
+ <span class="emphasis"><em>string inserter not a formatted function</em></span>
+ </span></dt><dd><p>Change it to be a formatted output function (i.e. catch exceptions).
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-active.html#596" target="_top">596</a>:
+ <span class="emphasis"><em>27.8.1.3 Table 112 omits "a+" and "a+b" modes</em></span>
+ </span></dt><dd><p>Add the missing modes to fopen_mode.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-defects.html#660" target="_top">660</a>:
+ <span class="emphasis"><em>Missing bitwise operations</em></span>
+ </span></dt><dd><p>Add the missing operations.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-active.html#693" target="_top">693</a>:
+ <span class="emphasis"><em>std::bitset::all() missing</em></span>
+ </span></dt><dd><p>Add it, consistently with the discussion.
+ </p></dd><dt><span class="term"><a class="ulink" href="lwg-active.html#695" target="_top">695</a>:
+ <span class="emphasis"><em>ctype&lt;char&gt;::classic_table() not accessible</em></span>
+ </span></dt><dd><p>Make the member functions table and classic_table public.
+ </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="bk01pt01ch01s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch02.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/bk01pt01ch02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch02.html
new file mode 100644
index 00000000000..7ddc9cabeb4
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch02.html
@@ -0,0 +1,181 @@
+<?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 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="bk01pt01ch01s03.html" title="Bugs" /><link rel="next" href="build.html" title="Build" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="build.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.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><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.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</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">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.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.intro.setup.configure"></a>Configure</h2></div></div></div><p>
+ Here are some of the non-obvious options to libstdc++'s configure.
+ Keep in mind that
+
+ <a class="ulink" href="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131" target="_top">they
+ all have opposite forms as well</a>
+ (enable/disable and with/without). The defaults are for <span class="emphasis"><em>current
+ development sources</em></span>, which may be different than those for
+ released versions.
+</p><p>The canonical way to find out the configure options that are
+ available for a given set of libstdc++ sources is to go to the
+ source directory and then type:<code class="code"> ./configure --help</code>
+</p><div class="variablelist"><dl><dt><span class="term"><code class="code">--enable-multilib</code>[default]</span></dt><dd><p>This is part of the generic multilib support for building cross
+ compilers. As such, targets like "powerpc-elf" will have
+ libstdc++ built many different ways: "-msoft-float"
+ and not, etc. A different libstdc++ will be built for each of
+ the different multilib versions. This option is on by default.
+ </p></dd><dt><span class="term"><code class="code">--enable-sjlj-exceptions</code></span></dt><dd><p>Forces old, set-jump/long-jump exception handling model. If
+ at all possible, the new, frame unwinding exception handling routines
+ should be used instead, as they significantly reduce both
+ runtime memory usage and executable size. This option can
+ change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-version-specific-runtime-libs</code></span></dt><dd><p>Specify that run-time libraries should be installed in the
+ compiler-specific subdirectory (i.e.,
+ <code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
+ instead of <code class="code">${libdir}</code>. This option is useful if you
+ intend to use several versions of gcc in parallel. In addition,
+ libstdc++'s include files will be installed in
+ <code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
+ unless you also specify
+ <code class="literal">--with-gxx-include-dir=<code class="filename">dirname</code></code> during configuration.
+ </p></dd><dt><span class="term"><code class="code">--with-gxx-include-dir=&lt;include-files dir&gt;</code></span></dt><dd><p>Adds support for named libstdc++ include directory. For instance,
+ the following puts all the libstdc++ headers into a directory
+ called "2.97-20001008" instead of the usual
+ "c++/(version)".
+ </p><pre class="programlisting">
+ --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre></dd><dt><span class="term"><code class="code">--enable-cstdio</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-cstdio=stdio'</code>
+ (described next). This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-cstdio=OPTION</code></span></dt><dd><p>Select a target-specific I/O package. At the moment, the only
+ choice is to use 'stdio', a generic "C" abstraction.
+ The default is 'stdio'.
+ </p></dd><dt><span class="term"><code class="code">--enable-clocale</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-clocale=generic'</code>
+ (described next). This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-clocale=OPTION</code></span></dt><dd><p>Select a target-specific underlying locale package. The
+ choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
+ (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
+ 'gnu' to specify a model based on functionality from the GNU C
+ library (langinfo/iconv/gettext) (from <a class="ulink" href="http://sources.redhat.com/glibc/" target="_top">glibc</a>, the GNU C
+ library), or 'generic' to use a generic "C"
+ abstraction which consists of "C" locale info.
+ </p><p>As part of the configuration process, the "C" library is
+ probed both for sufficient vintage, and installed locale
+ data. If either of these elements are not present, the C++
+ locale model default to 'generic.' On glibc-based systems of
+ version 2.2.5 and above with installed locale files, 'gnu' is
+ automatically selected.
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator</code></span></dt><dd><p>This is an abbreviated form of
+ <code class="code">'--enable-libstdcxx-allocator=auto'</code> (described
+ next). This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator=OPTION </code></span></dt><dd><p>Select a target-specific underlying std::allocator. The
+ choices are 'new' to specify a wrapper for new, 'malloc' to
+ specify a wrapper for malloc, 'mt' for a fixed power of two allocator
+ (<a class="ulink" href="ext/mt_allocator.html" target="_top">documented</a> under extensions),
+ 'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
+ This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-cheaders=OPTION</code></span></dt><dd><p>This allows the user to define the approach taken for C header
+ compatibility with C++. Options are c, c_std, and c_global.
+ These correspond to the source directory's include/c,
+ include/c_std, and include/c_global, and may also include
+ include/c_compatibility. The default is c_global.
+ </p></dd><dt><span class="term"><code class="code">--enable-threads</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-threads=yes'</code>
+ (described next). This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-threads=OPTION</code></span></dt><dd><p>Select a threading library. A full description is given in the
+ general <a class="ulink" href="http://gcc.gnu.org/install/configure.html" target="_top">compiler
+ configuration instructions</a>.
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug</code></span></dt><dd><p>Build separate debug libraries in addition to what is normally built.
+ By default, the debug libraries are compiled with
+ <code class="code"> CXXFLAGS='-g3 -O0'</code>
+ , are installed in <code class="code">${libdir}/debug</code>, and have the
+ same names and versioning information as the non-debug
+ libraries. This option is off by default.
+ </p><p>Note this make command, executed in
+ the build directory, will do much the same thing, without the
+ configuration difference and without building everything twice:
+ <code class="code">make CXXFLAGS='-g3 -O0' all</code>
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug-flags=FLAGS</code></span></dt><dd><p>This option is only valid when <code class="code"> --enable-debug </code>
+ is also specified, and applies to the debug builds only. With
+ this option, you can pass a specific string of flags to the
+ compiler to use when building the debug versions of libstdc++.
+ FLAGS is a quoted string of options, like
+ </p><pre class="programlisting">
+ --enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</pre></dd><dt><span class="term"><code class="code">--enable-cxx-flags=FLAGS</code></span></dt><dd><p>With this option, you can pass a string of -f (functionality)
+ flags to the compiler to use when building libstdc++. This
+ option can change the library ABI. FLAGS is a quoted string of
+ options, like
+ </p><pre class="programlisting">
+ --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre><p>
+ Note that the flags don't necessarily have to all be -f flags,
+ as shown, but usually those are the ones that will make sense
+ for experimentation and configure-time overriding.
+ </p><p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
+ the 'make' environment is that, if files are automatically
+ rebuilt, the same flags will be used when compiling those files
+ as well, so that everything matches.
+ </p><p>Fun flags to try might include combinations of
+ </p><pre class="programlisting">
+ -fstrict-aliasing
+ -fno-exceptions
+ -ffunction-sections
+ -fvtable-gc</pre><p>and opposite forms (-fno-) of the same. Tell us (the libstdc++
+ mailing list) if you discover more!
+ </p></dd><dt><span class="term"><code class="code">--enable-c99</code></span></dt><dd><p>The "long long" type was introduced in C99, along
+ with many other functions for wide characters, and math
+ classification macros, etc. If enabled, all C99 functions not
+ specified by the C++ standard will be put into <code class="code">namespace
+ __gnu_cxx</code>, and then all these names will
+ be injected into namespace std, so that C99 functions can be
+ used "as if" they were in the C++ standard (as they
+ will eventually be in some future revision of the standard,
+ without a doubt). By default, C99 support is on, assuming the
+ configure probes find all the necessary functions and bits
+ necessary. This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-wchar_t</code>[default]</span></dt><dd><p>Template specializations for the "wchar_t" type are
+ required for wide character conversion support. Disabling
+ wide character specializations may be expedient for initial
+ porting efforts, but builds only a subset of what is required by
+ ISO, and is not recommended. By default, this option is on.
+ This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-long-long </code></span></dt><dd><p>The "long long" type was introduced in C99. It is
+ provided as a GNU extension to C++98 in g++. This flag builds
+ support for "long long" into the library (specialized
+ templates and the like for iostreams). This option is on by default:
+ if enabled, users will have to either use the new-style "C"
+ headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
+ or add appropriate compile-time flags to all compile lines to
+ allow "C" visibility of this feature (on GNU/Linux,
+ the flag is -D_ISOC99_SOURCE, which is added automatically via
+ CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
+ This option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-fully-dynamic-string</code></span></dt><dd><p>This option enables a special version of basic_string avoiding
+ the optimization that allocates empty objects in static memory.
+ Mostly useful together with shared memory allocators, see PR
+ libstdc++/16612 for details.
+ </p></dd><dt><span class="term"><code class="code">--enable-concept-checks</code></span></dt><dd><p>This turns on additional compile-time checks for instantiated
+ library templates, in the form of specialized templates,
+ <a class="ulink" href="19_diagnostics/howto.html#3" target="_top">described here</a>. They
+ can help users discover when they break the rules of the STL, before
+ their programs run.
+ </p></dd><dt><span class="term"><code class="code">--enable-symvers[=style]</code></span></dt><dd><p>In 3.1 and later, tries to turn on symbol versioning in the
+ shared library (if a shared library has been
+ requested). Values for 'style' that are currently supported
+ are 'gnu', 'gnu-versioned-namespace', 'darwin', and
+ 'darwin-export'. Both gnu- options require that a recent
+ version of the GNU linker be in use. Both darwin options are
+ equivalent. With no style given, the configure script will try
+ to guess correct defaults for the host system, probe to see if
+ additional requirements are necessary and present for
+ activation, and if so, will turn symbol versioning on. This
+ option can change the library ABI.
+ </p></dd><dt><span class="term"><code class="code">--enable-visibility</code></span></dt><dd><p> In 4.2 and later, enables or disables visibility attributes.
+ If enabled (as by default), and the compiler seems capable of
+ passing the simple sanity checks thrown at it, adjusts items
+ in namespace std, namespace std::tr1, and namespace __gnu_cxx
+ so that -fvisibility options work.
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-pch</code></span></dt><dd><p>In 3.4 and later, tries to turn on the generation of
+ stdc++.h.gch, a pre-compiled file including all the standard
+ C++ includes. If enabled (as by default), and the compiler
+ seems capable of passing the simple sanity checks thrown at
+ it, try to build stdc++.h.gch as part of the make process.
+ In addition, this generated file is used later on (by appending <code class="code">
+ --include bits/stdc++.h </code> to CXXFLAGS) when running the
+ testsuite.
+ </p></dd><dt><span class="term"><code class="code">--disable-hosted-libstdcxx</code></span></dt><dd><p>
+ By default, a complete <span class="emphasis"><em>hosted</em></span> C++ library is
+ built. The C++ Standard also describes a
+ <span class="emphasis"><em>freestanding</em></span> environment, in which only a
+ minimal set of headers are provided. This option builds such an
+ environment.
+ </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="bk01pt01ch01s03.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="build.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Build</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html
new file mode 100644
index 00000000000..6bdc0333a32
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html
@@ -0,0 +1,99 @@
+<?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>Headers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using.html" title="Chapter 3. Using" /><link rel="next" href="bk01pt01ch03s03.html" title="Namespaces" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Headers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s03.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.intro.using.headers"></a>Headers</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.all"></a>Header Files</h3></div></div></div><p>
+ The C++ standard specifies the entire set of header files that
+ must be available to all hosted implementations. Actually, the
+ word "files" is a misnomer, since the contents of the
+ headers don't necessarily have to be in any kind of external
+ file. The only rule is that when one <code class="code">#include</code>'s a
+ header, the contents of that header become available, no matter
+ how.
+ </p><p>
+ That said, in practice files are used.
+ </p><p>
+ There are two main types of include files: header files related
+ to a specific version of the ISO C++ standard (called Standard
+ Headers), and all others (TR1, C++ ABI, and Extensions).
+ </p><p>
+ Two dialects of standard headers are supported, corresponding to
+ the 1998 standard as updated for 2003, and the draft of the
+ upcoming 200x standard.
+ </p><p>
+ C++98/03 include files. These are available in the default compilation mode, ie <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>.
+ </p><div class="table"><a id="id398035"></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">iomanip</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">limits</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="id397982"></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">ciso646</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</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, ie <code class="code">-std=c++0x</code> or <code class="code">-std=gnu++0x</code>.
+</p><p></p><div class="table"><a id="id399447"></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">iomanip</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">type_traits</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id394222"></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">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">ctgmath</code></td></tr><tr><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cuchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cfenv</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
+ In addition, TR1 includes as:
+</p><div class="table"><a id="id485624"></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/memory</code></td><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/random</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/utility</code></td></tr><tr><td align="left"><code class="filename">tr1/functional</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="id407403"></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/cmath</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdio</code></td><td align="left"><code class="filename">tr1/ctime</code></td></tr><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/cwchar</code></td></tr><tr><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/cwctype</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="id420398"></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>
+ And a large variety of extensions.
+</p><div class="table"><a id="id414207"></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/debug_allocator.h</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td></tr><tr><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/typelist.h</code></td></tr><tr><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/slist</code></td><td align="left"><code class="filename">ext/vstring.h</code></td></tr><tr><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id458275"></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/list</code></td><td align="left"><code class="filename">debug/set</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/vector</code></td></tr><tr><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id428288"></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><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">
+#include &lt;array&gt;
+#include &lt;functional&gt;
+</pre><p>Implies C++0x mode. To use the entities in &lt;array&gt;, the C++0x
+compilation mode must be used, which implies the C++0x functionality
+(and deprecations) in &lt;functional&gt; will be present.
+</p><p>Second, the other headers can be included with either dialect of
+the standard headers, although features and types specific to C++0x
+are still only enabled when in C++0x compilation mode. So, to use
+rvalue references with <code class="code">__gnu_cxx::vstring</code>, or to use the
+debug-mode versions of <code class="code">std::unordered_map</code>, one must use
+the <code class="code">std=gnu++0x</code> compiler flag. (Or <code class="code">std=c++0x</code>, of course.)
+</p><p>A special case of the second rule is the mixing of TR1 and C++0x
+facilities. It is possible (although not especially prudent) to
+include both the TR1 version and the C++0x version of header in the
+same translation unit:
+</p><pre class="programlisting">
+#include &lt;tr1/type_traits&gt;
+#include &lt;type_traits&gt;
+</pre><p> Several parts of C++0x diverge quite substantially from TR1 predecessors.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.cheaders"></a>The C Headers and <code class="code">namespace std</code></h3></div></div></div><p>
+ The standard specifies that if one includes the C-style header
+ (&lt;math.h&gt; in this case), the symbols will be available
+ in the global namespace and perhaps in
+ namespace <code class="code">std::</code> (but this is no longer a firm
+ requirement.) One the other hand, including the C++-style
+ header (&lt;cmath&gt;) guarantees that the entities will be
+ found in namespace std and perhaps in the global namespace.
+ </p><p>
+Usage of C++-style headers is recommended, as then
+C-linkage names can be disambiguated by explicit qualification, such
+as by <code class="code">std::abort</code>. In addition, the C++-style headers can
+use function overloading to provide a simpler interface to certain
+families of C-functions. For instance in &lt;cmath&gt;, the
+function <code class="code">std::sin</code> has overloads for all the builtin
+floating-point types. This means that <code class="code">std::sin</code> can be
+used uniformly, instead of a combination
+of <code class="code">std::sinf</code>, <code class="code">std::sin</code>,
+and <code class="code">std::sinl</code>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.pre"></a>Precompiled Headers</h3></div></div></div><p>There are three base header files that are provided. They can be
+used to precompile the standard headers and extensions into binary
+files that may the be used to speed compiles that use these headers.
+</p><div class="itemizedlist"><ul type="disc"><li><p>stdc++.h</p><p>Includes all standard headers. Actual content varies depending on
+language dialect.
+</p></li><li><p>stdtr1c++.h</p><p>Includes all of &lt;stdc++.h&gt;, and adds all the TR1 headers.
+</p></li><li><p>extc++.h</p><p>Includes all of &lt;stdtr1c++.h&gt;, and adds all the Extension headers.
+</p></li></ul></div><p>How to construct a .gch file from one of these base header files.</p><p>First, find the include directory for the compiler. One way to do
+this is:</p><pre class="programlisting">
+g++ -v hello.cc
+
+#include &lt;...&gt; search starts here:
+ /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0
+...
+End of search list.
+</pre><p>Then, create a precompiled header file with the same flags that
+will be used to compile other projects.</p><pre class="programlisting">
+g++ -Winvalid-pch -x c++-header -g -O2 -o ./stdc++.h.gch /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h
+</pre><p>The resulting file will be quite large: the current size is around
+thirty megabytes. </p><p>How to use the resulting file.</p><pre class="programlisting">
+g++ -I. -include stdc++.h -H -g -O2 hello.cc
+</pre><p>Verification that the PCH file is being used is easy:</p><pre class="programlisting">
+g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
+! ./stdc++.h.gch
+. /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/iostream
+. /mnt/share/bld/H-x86-gcc.20071201include/c++/4.3.0/string
+</pre><p>The exclamation point to the left of the <code class="code">stdc++.h.gch</code> listing means that the generated PCH file was used, and thus the </p><p></p><p> Detailed information about creating precompiled header files can be found in the GCC <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html" target="_top">documentation</a>.
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using.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="bk01pt01ch03s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Using </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Namespaces</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html
new file mode 100644
index 00000000000..50ea8771de3
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html
@@ -0,0 +1,61 @@
+<?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>Namespaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s02.html" title="Headers" /><link rel="next" href="bk01pt01ch03s04.html" title="Macros" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Namespaces</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s04.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.intro.using.namespaces"></a>Namespaces</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.namespaces.all"></a>Available Namespaces</h3></div></div></div><p> There are three main namespaces.
+</p><div class="itemizedlist"><ul type="disc"><li><p>std</p><p>The ISO C++ standards specify that "all library entities are defined
+within namespace std." This includes namepaces nested
+within <code class="code">namespace std</code>, such as <code class="code">namespace
+std::tr1</code>.
+</p></li><li><p>abi</p><p>Specified by the C++ ABI. This ABI specifies a number of type and
+function APIs supplemental to those required by the ISO C++ Standard,
+but necessary for interoperability.
+</p></li><li><p>__gnu_</p><p>Indicating one of several GNU extensions. Choices
+include <code class="code">__gnu_cxx</code>, <code class="code">__gnu_debug</code>, <code class="code">__gnu_parallel</code>,
+and <code class="code">__gnu_pbds</code>.
+</p></li></ul></div><p> A complete list of implementation namespaces (including namespace contents) is available in the generated source <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html" target="_top">documentation</a>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.namespaces.std"></a>namespace std</h3></div></div></div><p>
+ One standard requirement is that the library components are defined
+ in <code class="code">namespace std::</code>. Thus, in order to use these types or
+ functions, one must do one of two things:
+</p><div class="itemizedlist"><ul type="disc"><li><p>put a kind of <span class="emphasis"><em>using-declaration</em></span> in your source
+(either <code class="code">using namespace std;</code> or i.e. <code class="code">using
+std::string;</code>) This approach works well for individual source files, but
+should not be used in a global context, like header files.
+ </p></li><li><p>use a <span class="emphasis"><em>fully
+qualified name</em></span>for each library symbol
+(i.e. <code class="code">std::string</code>, <code class="code">std::cout</code>) Always can be
+used, and usually enhanced, by strategic use of typedefs. (In the
+cases where the qualified verbiage becomes unwieldy.)
+ </p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.namespaces.comp"></a>Using Namespace Composition</h3></div></div></div><p>
+Best practice in programming suggests sequestering new data or
+functionality in a sanely-named, unique namespace whenever
+possible. This is considered an advantage over dumping everything in
+the global namespace, as then name look-up can be explicitly enabled or
+disabled as above, symbols are consistently mangled without repetitive
+naming prefixes or macros, etc.
+</p><p>For instance, consider a project that defines most of its classes in <code class="code">namespace gtk</code>. It is possible to
+ adapt <code class="code">namespace gtk</code> to <code class="code">namespace std</code> by using a C++-feature called
+ <span class="emphasis"><em>namespace composition</em></span>. This is what happens if
+ a <span class="emphasis"><em>using</em></span>-declaration is put into a
+ namespace-definition: the imported symbol(s) gets imported into the
+ currently active namespace(s). For example:
+</p><pre class="programlisting">
+namespace gtk
+{
+ using std::string;
+ using std::tr1::array;
+
+ class Window { ... };
+}
+</pre><p>
+ In this example, <code class="code">std::string</code> gets imported into
+ <code class="code">namespace gtk</code>. The result is that use of
+ <code class="code">std::string</code> inside namespace gtk can just use <code class="code">string</code>, without the explicit qualification.
+ As an added bonus,
+ <code class="code">std::string</code> does not get imported into
+ the global namespace. Additionally, a more elaborate arrangement can be made for backwards compatibility and portability, whereby the
+ <code class="code">using</code>-declarations can wrapped in macros that
+ are set based on autoconf-tests to either "" or i.e. <code class="code">using
+ std::string;</code> (depending on whether the system has
+ libstdc++ in <code class="code">std::</code> or not). (ideas from
+ <code class="email">&lt;<a class="email" href="mailto:llewelly@dbritsch.dsl.xmission.com">llewelly@dbritsch.dsl.xmission.com</a>&gt;</code>, Karl Nelson <code class="email">&lt;<a class="email" href="mailto:kenelson@ece.ucdavis.edu">kenelson@ece.ucdavis.edu</a>&gt;</code>)
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch03s02.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="bk01pt01ch03s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Headers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Macros</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html
new file mode 100644
index 00000000000..48002e7e6c4
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html
@@ -0,0 +1,70 @@
+<?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>Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s03.html" title="Namespaces" /><link rel="next" href="bk01pt01ch03s05.html" title="Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s05.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.intro.using.macros"></a>Macros</h2></div></div></div><p>All pre-processor switches and configurations are all gathered
+ in the file <code class="code">c++config.h</code>, which is generated during
+ the libstdc++ configuration and build process, and included by
+ files part of the public libstdc++ API. Most of these macros
+ should not be used by consumers of libstdc++, and are reserved
+ for internal implementation use. <span class="emphasis"><em>These macros cannot be
+ redefined</em></span>. However, a select handful of these macro
+ control libstdc++ extensions and extra features, or provide
+ versioning information for the API, and are able to be used.
+ </p><p>All library macros begin with <code class="code">_GLIBCXX_</code> (except for
+ versions 3.1.x to 3.3.x, which use <code class="code">_GLIBCPP_</code>).
+ </p><p>Below is the macro which users may check for library version
+ information. </p><div class="variablelist"><dl><dt><span class="term"><code class="code">__GLIBCXX__</code></span></dt><dd><p>The current version of
+ libstdc++ in compressed ISO date format, form of an unsigned
+ long. For details on the value of this particular macro for a
+ particular release, please consult this <a class="ulink" href="abi.html" target="_top">
+ document</a>.
+ </p></dd></dl></div><p>Below are the macros which users may change with #define/#undef or
+ with -D/-U compiler flags. The default state of the symbol is
+ listed.</p><p>“<span class="quote">Configurable</span>†(or “<span class="quote">Not configurable</span>â€) means
+ that the symbol is initially chosen (or not) based on
+ --enable/--disable options at library build and configure time
+ (documented <a class="link" href="bk01pt01ch02.html#manual.intro.setup.configure" title="Configure">here</a>), with the
+ various --enable/--disable choices being translated to
+ #define/#undef).
+ </p><p> <acronym class="acronym">ABI</acronym> means that changing from the default value may
+ mean changing the <acronym class="acronym">ABI</acronym> of compiled code. In other words, these
+ choices control code which has already been compiled (i.e., in a
+ binary such as libstdc++.a/.so). If you explicitly #define or
+ #undef these macros, the <span class="emphasis"><em>headers</em></span> may see different code
+ paths, but the <span class="emphasis"><em>libraries</em></span> which you link against will not.
+ Experimenting with different values with the expectation of
+ consistent linkage requires changing the config headers before
+ building/installing the library.
+ </p><div class="variablelist"><dl><dt><span class="term"><code class="code">_GLIBCXX_DEPRECATED</code></span></dt><dd><p>
+ Defined by default. Not configurable. ABI-changing. Turning this off
+ removes older ARM-style iostreams code, and other anachronisms
+ from the API. This macro is dependent on the version of the
+ standard being tracked, and as a result may give different results for
+ <code class="code">-std=c++98</code> and <code class="code">-std=c++0x</code>. This may
+ be useful in updating old C++ code which no longer meet the
+ requirements of the language, or for checking current code
+ against new language standards.
+ </p></dd><dt><span class="term"><code class="code">_GLIBCXX_FORCE_NEW</code></span></dt><dd><p>
+ Undefined by default. When defined, memory allocation and
+ allocators controlled by libstdc++ call operator new/delete
+ without caching and pooling. Configurable via
+ <code class="code">--enable-libstdcxx-allocator</code>. ABI-changing.
+ </p></dd><dt><span class="term"><code class="code">_GLIBCXX_CONCEPT_CHECKS</code></span></dt><dd><p>
+ Undefined by default. Configurable via
+ <code class="code">--enable-concept-checks</code>. When defined, performs
+ compile-time checking on certain template instantiations to
+ detect violations of the requirements of the standard. This
+ is described in more detail <a class="ulink" href="../19_diagnostics/howto.html#3" target="_top">here</a>.
+ </p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG</code></span></dt><dd><p>
+ Undefined by default. When defined, compiles
+ user code using the <a class="ulink" href="../ext/debug.html#safe" target="_top">libstdc++ debug
+ mode</a>.
+ </p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG_PEDANTIC</code></span></dt><dd><p>
+ Undefined by default. When defined while
+ compiling with the <a class="ulink" href="../ext/debug.html#safe" target="_top">libstdc++ debug
+ mode</a>, makes the debug mode extremely picky by making the use
+ of libstdc++ extensions and libstdc++-specific behavior into
+ errors.
+ </p></dd><dt><span class="term"><code class="code">_GLIBCXX_PARALLEL</code></span></dt><dd><p>Undefined by default. When defined, compiles
+ user code using the <a class="ulink" href="../ext/parallel_mode.html" target="_top">libstdc++ parallel
+ mode</a>.
+ </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch03s03.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="bk01pt01ch03s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Namespaces </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Concurrency</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html
new file mode 100644
index 00000000000..7a9d2eb0c29
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html
@@ -0,0 +1,219 @@
+<?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>Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s04.html" title="Macros" /><link rel="next" href="bk01pt01ch03s06.html" title="Exception Safety" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s04.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s06.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.intro.using.concurrency"></a>Concurrency</h2></div></div></div><p>This section discusses issues surrounding the proper compilation
+ of multithreaded applications which use the Standard C++
+ library. This information is GCC-specific since the C++
+ standard does not address matters of multithreaded applications.
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.concurrency.prereq"></a>Prerequisites</h3></div></div></div><p>All normal disclaimers aside, multithreaded C++ application are
+ only supported when libstdc++ and all user code was built with
+ compilers which report (via <code class="code"> gcc/g++ -v </code>) the same thread
+ model and that model is not <span class="emphasis"><em>single</em></span>. As long as your
+ final application is actually single-threaded, then it should be
+ safe to mix user code built with a thread model of
+ <span class="emphasis"><em>single</em></span> with a libstdc++ and other C++ libraries built
+ with another thread model useful on the platform. Other mixes
+ may or may not work but are not considered supported. (Thus, if
+ you distribute a shared C++ library in binary form only, it may
+ be best to compile it with a GCC configured with
+ --enable-threads for maximal interchangeability and usefulness
+ with a user population that may have built GCC with either
+ --enable-threads or --disable-threads.)
+ </p><p>When you link a multithreaded application, you will probably
+ need to add a library or flag to g++. This is a very
+ non-standardized area of GCC across ports. Some ports support a
+ special flag (the spelling isn't even standardized yet) to add
+ all required macros to a compilation (if any such flags are
+ required then you must provide the flag for all compilations not
+ just linking) and link-library additions and/or replacements at
+ link time. The documentation is weak. Here is a quick summary
+ to display how ad hoc this is: On Solaris, both -pthreads and
+ -threads (with subtly different meanings) are honored. On OSF,
+ -pthread and -threads (with subtly different meanings) are
+ honored. On Linux/i386, -pthread is honored. On FreeBSD,
+ -pthread is honored. Some other ports use other switches.
+ AFAIK, none of this is properly documented anywhere other than
+ in ``gcc -dumpspecs'' (look at lib and cpp entries).
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.concurrency.thread_safety"></a>Thread Safety</h3></div></div></div><p>
+We currently use the <a class="ulink" href="http://www.sgi.com/tech/stl/thread_safety.html" target="_top">SGI STL</a> definition of thread safety.
+</p><p>The library strives to be thread-safe when all of the following
+ conditions are met:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>The system's libc is itself thread-safe,
+ </p></li><li><p>
+ The compiler in use reports a thread model other than
+ 'single'. This can be tested via output from <code class="code">gcc
+ -v</code>. Multi-thread capable versions of gcc output
+ something like this:
+ </p><pre class="programlisting">
+%gcc -v
+Using built-in specs.
+...
+Thread model: posix
+gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
+</pre><p>Look for "Thread model" lines that aren't equal to "single."</p></li><li><p>
+ Requisite command-line flags are used for atomic operations
+ and threading. Examples of this include <code class="code">-pthread</code>
+ and <code class="code">-march=native</code>, although specifics vary
+ depending on the host environment. See <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html" target="_top">Machine
+ Dependent Options</a>.
+ </p></li><li><p>
+ An implementation of atomicity.h functions
+ exists for the architecture in question. See the internals documentation for more <a class="ulink" href="../ext/concurrence.html" target="_top">details</a>.
+ </p></li></ul></div><p>The user-code must guard against concurrent method calls which may
+ access any particular library object's state. Typically, the
+ application programmer may infer what object locks must be held
+ based on the objects referenced in a method call. Without getting
+ into great detail, here is an example which requires user-level
+ locks:
+ </p><pre class="programlisting">
+ library_class_a shared_object_a;
+
+ thread_main () {
+ library_class_b *object_b = new library_class_b;
+ shared_object_a.add_b (object_b); // must hold lock for shared_object_a
+ shared_object_a.mutate (); // must hold lock for shared_object_a
+ }
+
+ // Multiple copies of thread_main() are started in independent threads.</pre><p>Under the assumption that object_a and object_b are never exposed to
+ another thread, here is an example that should not require any
+ user-level locks:
+ </p><pre class="programlisting">
+ thread_main () {
+ library_class_a object_a;
+ library_class_b *object_b = new library_class_b;
+ object_a.add_b (object_b);
+ object_a.mutate ();
+ } </pre><p>All library objects are safe to use in a multithreaded program as
+ long as each thread carefully locks out access by any other
+ thread while it uses any object visible to another thread, i.e.,
+ treat library objects like any other shared resource. In general,
+ this requirement includes both read and write access to objects;
+ unless otherwise documented as safe, do not assume that two threads
+ may access a shared standard library object at the same time.
+ </p><p>See chapters <a class="ulink" href="../17_intro/howto.html#3" target="_top">17</a> (library
+ introduction), <a class="ulink" href="../23_containers/howto.html#3" target="_top">23</a>
+ (containers), and <a class="ulink" href="../27_io/howto.html#9" target="_top">27</a> (I/O) for
+ more information.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.concurrency.atomics"></a>Atomics</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="manual.intro.using.concurrency.io"></a>IO</h3></div></div></div><p>I'll assume that you have already read the
+ <a class="ulink" href="../17_intro/howto.html#3" target="_top">general notes on library threads</a>,
+ and the
+ <a class="ulink" href="../23_containers/howto.html#3" target="_top">notes on threaded container
+ access</a> (you might not think of an I/O stream as a container, but
+ the points made there also hold here). If you have not read them,
+ please do so first.
+ </p><p>This gets a bit tricky. Please read carefully, and bear with me.
+ </p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="concurrency.io.structure"></a>Structure</h4></div></div></div><p>A wrapper
+ type called <code class="code">__basic_file</code> provides our abstraction layer
+ for the <code class="code">std::filebuf</code> classes. Nearly all decisions dealing
+ with actual input and output must be made in <code class="code">__basic_file</code>.
+ </p><p>A generic locking mechanism is somewhat in place at the filebuf layer,
+ but is not used in the current code. Providing locking at any higher
+ level is akin to providing locking within containers, and is not done
+ for the same reasons (see the links above).
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="concurrency.io.defaults"></a>Defaults</h4></div></div></div><p>The __basic_file type is simply a collection of small wrappers around
+ the C stdio layer (again, see the link under Structure). We do no
+ locking ourselves, but simply pass through to calls to <code class="code">fopen</code>,
+ <code class="code">fwrite</code>, and so forth.
+ </p><p>So, for 3.0, the question of "is multithreading safe for I/O"
+ must be answered with, "is your platform's C library threadsafe
+ for I/O?" Some are by default, some are not; many offer multiple
+ implementations of the C library with varying tradeoffs of threadsafety
+ and efficiency. You, the programmer, are always required to take care
+ with multiple threads.
+ </p><p>(As an example, the POSIX standard requires that C stdio FILE*
+ operations are atomic. POSIX-conforming C libraries (e.g, on Solaris
+ and GNU/Linux) have an internal mutex to serialize operations on
+ FILE*s. However, you still need to not do stupid things like calling
+ <code class="code">fclose(fs)</code> in one thread followed by an access of
+ <code class="code">fs</code> in another.)
+ </p><p>So, if your platform's C library is threadsafe, then your
+ <code class="code">fstream</code> I/O operations will be threadsafe at the lowest
+ level. For higher-level operations, such as manipulating the data
+ contained in the stream formatting classes (e.g., setting up callbacks
+ inside an <code class="code">std::ofstream</code>), you need to guard such accesses
+ like any other critical shared resource.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="concurrency.io.future"></a>Future</h4></div></div></div><p> A
+ second choice may be available for I/O implementations: libio. This is
+ disabled by default, and in fact will not currently work due to other
+ issues. It will be revisited, however.
+ </p><p>The libio code is a subset of the guts of the GNU libc (glibc) I/O
+ implementation. When libio is in use, the <code class="code">__basic_file</code>
+ type is basically derived from FILE. (The real situation is more
+ complex than that... it's derived from an internal type used to
+ implement FILE. See libio/libioP.h to see scary things done with
+ vtbls.) The result is that there is no "layer" of C stdio
+ to go through; the filebuf makes calls directly into the same
+ functions used to implement <code class="code">fread</code>, <code class="code">fwrite</code>,
+ and so forth, using internal data structures. (And when I say
+ "makes calls directly," I mean the function is literally
+ replaced by a jump into an internal function. Fast but frightening.
+ *grin*)
+ </p><p>Also, the libio internal locks are used. This requires pulling in
+ large chunks of glibc, such as a pthreads implementation, and is one
+ of the issues preventing widespread use of libio as the libstdc++
+ cstdio implementation.
+ </p><p>But we plan to make this work, at least as an option if not a future
+ default. Platforms running a copy of glibc with a recent-enough
+ version will see calls from libstdc++ directly into the glibc already
+ installed. For other platforms, a copy of the libio subsection will
+ be built and included in libstdc++.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="concurrency.io.alt"></a>Alternatives</h4></div></div></div><p>Don't forget that other cstdio implementations are possible. You could
+ easily write one to perform your own forms of locking, to solve your
+ "interesting" problems.
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.concurrency.containers"></a>Containers</h3></div></div></div><p>This section discusses issues surrounding the design of
+ multithreaded applications which use Standard C++ containers.
+ All information in this section is current as of the gcc 3.0
+ release and all later point releases. Although earlier gcc
+ releases had a different approach to threading configuration and
+ proper compilation, the basic code design rules presented here
+ were similar. For information on all other aspects of
+ multithreading as it relates to libstdc++, including details on
+ the proper compilation of threaded code (and compatibility between
+ threaded and non-threaded code), see Chapter 17.
+ </p><p>Two excellent pages to read when working with the Standard C++
+ containers and threads are
+ <a class="ulink" href="http://www.sgi.com/tech/stl/thread_safety.html" target="_top">SGI's
+ http://www.sgi.com/tech/stl/thread_safety.html</a> and
+ <a class="ulink" href="http://www.sgi.com/tech/stl/Allocators.html" target="_top">SGI's
+ http://www.sgi.com/tech/stl/Allocators.html</a>.
+ </p><p><span class="emphasis"><em>However, please ignore all discussions about the user-level
+ configuration of the lock implementation inside the STL
+ container-memory allocator on those pages. For the sake of this
+ discussion, libstdc++ configures the SGI STL implementation,
+ not you. This is quite different from how gcc pre-3.0 worked.
+ In particular, past advice was for people using g++ to
+ explicitly define _PTHREADS or other macros or port-specific
+ compilation options on the command line to get a thread-safe
+ STL. This is no longer required for any port and should no
+ longer be done unless you really know what you are doing and
+ assume all responsibility.</em></span>
+ </p><p>Since the container implementation of libstdc++ uses the SGI
+ code, we use the same definition of thread safety as SGI when
+ discussing design. A key point that beginners may miss is the
+ fourth major paragraph of the first page mentioned above
+ ("For most clients,"...), which points out that
+ locking must nearly always be done outside the container, by
+ client code (that'd be you, not us). There is a notable
+ exceptions to this rule. Allocators called while a container or
+ element is constructed uses an internal lock obtained and
+ released solely within libstdc++ code (in fact, this is the
+ reason STL requires any knowledge of the thread configuration).
+ </p><p>For implementing a container which does its own locking, it is
+ trivial to provide a wrapper class which obtains the lock (as
+ SGI suggests), performs the container operation, and then
+ releases the lock. This could be templatized <span class="emphasis"><em>to a certain
+ extent</em></span>, on the underlying container and/or a locking
+ mechanism. Trying to provide a catch-all general template
+ solution would probably be more trouble than it's worth.
+ </p><p>The STL implementation is currently configured to use the
+ high-speed caching memory allocator. Some people like to
+ test and/or normally run threaded programs with a different
+ default. For all details about how to globally override this
+ at application run-time see <a class="ulink" href="../ext/howto.html#3" target="_top">here</a>.
+ </p><p>There is a better way (not standardized yet): It is possible to
+ force the malloc-based allocator on a per-case-basis for some
+ application code. The library team generally believes that this
+ is a better way to tune an application for high-speed using this
+ implementation of the STL. There is
+ <a class="ulink" href="../ext/howto.html#3" target="_top">more information on allocators 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="bk01pt01ch03s04.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="bk01pt01ch03s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Macros </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Exception Safety</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html
new file mode 100644
index 00000000000..1b7bbfeb7b6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html
@@ -0,0 +1,3 @@
+<?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>Exception Safety</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s05.html" title="Concurrency" /><link rel="next" href="debug.html" title="Debugging Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Exception Safety</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s05.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="debug.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.intro.using.exception_safety"></a>Exception Safety</h2></div></div></div><p></p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch03s05.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="debug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Debugging Support</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04.html
new file mode 100644
index 00000000000..30ff3115ba1
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04.html
@@ -0,0 +1,40 @@
+<?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 4. Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02pr01.html" title="" /><link rel="next" href="bk01pt02ch04s02.html" title="Numeric Properties" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02pr01.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s02.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.support.types"></a>Chapter 4. Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch04.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></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.fundamental"></a>Fundamental Types</h2></div></div></div><p>
+ C++ has the following builtin types:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ char
+ </p></li><li><p>
+ signed char
+ </p></li><li><p>
+ unsigned char
+ </p></li><li><p>
+ signed short
+ </p></li><li><p>
+ signed int
+ </p></li><li><p>
+ signed long
+ </p></li><li><p>
+ unsigned short
+ </p></li><li><p>
+ unsigned int
+ </p></li><li><p>
+ unsigned long
+ </p></li><li><p>
+ bool
+ </p></li><li><p>
+ wchar_t
+ </p></li><li><p>
+ float
+ </p></li><li><p>
+ double
+ </p></li><li><p>
+ long double
+ </p></li></ul></div><p>
+ These fundamental types are always available, without having to
+ include a header file. These types are exactly the same in
+ either C++ or in C.
+ </p><p>
+ Specializing parts of the library on these types is prohibited:
+ instead, use a POD.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02pr01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch04s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Numeric Properties</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html
new file mode 100644
index 00000000000..29c5b7f77cb
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html
@@ -0,0 +1,49 @@
+<?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>Numeric Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="next" href="bk01pt02ch04s03.html" title="NULL" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Numeric Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s03.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.support.types.numeric_limits"></a>Numeric Properties</h2></div></div></div><p>
+ The header <code class="filename">limits</code> defines
+ traits classes to give access to various implementation
+ defined-aspects of the fundamental types. The traits classes --
+ fourteen in total -- are all specializations of the template class
+ <code class="classname">numeric_limits</code>, documented <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/structstd_1_1numeric__limits.html" target="_top">here</a>
+ and defined as follows:
+ </p><pre class="programlisting">
+ template&lt;typename T&gt;
+ struct class
+ {
+ static const bool is_specialized;
+ static T max() throw();
+ static T min() throw();
+
+ static const int digits;
+ static const int digits10;
+ static const bool is_signed;
+ static const bool is_integer;
+ static const bool is_exact;
+ static const int radix;
+ static T epsilon() throw();
+ static T round_error() throw();
+
+ static const int min_exponent;
+ static const int min_exponent10;
+ static const int max_exponent;
+ static const int max_exponent10;
+
+ static const bool has_infinity;
+ static const bool has_quiet_NaN;
+ static const bool has_signaling_NaN;
+ static const float_denorm_style has_denorm;
+ static const bool has_denorm_loss;
+ static T infinity() throw();
+ static T quiet_NaN() throw();
+ static T denorm_min() throw();
+
+ static const bool is_iec559;
+ static const bool is_bounded;
+ static const bool is_modulo;
+
+ static const bool traps;
+ static const bool tinyness_before;
+ static const float_round_style round_style;
+ };
+ </pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch04s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Types </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> NULL</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html
new file mode 100644
index 00000000000..fbfba430e22
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html
@@ -0,0 +1,29 @@
+<?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>NULL</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04s02.html" title="Numeric Properties" /><link rel="next" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">NULL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s02.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch05.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.support.types.null"></a>NULL</h2></div></div></div><p>
+ The only change that might affect people is the type of
+ <code class="constant">NULL</code>: while it is required to be a macro,
+ the definition of that macro is <span class="emphasis"><em>not</em></span> allowed
+ to be <code class="constant">(void*)0</code>, which is often used in C.
+ </p><p>
+ For <span class="command"><strong>g++</strong></span>, <code class="constant">NULL</code> is
+ </p><pre class="programlisting">#define</pre><p>'d to be
+ <code class="constant">__null</code>, a magic keyword extension of
+ <span class="command"><strong>g++</strong></span>.
+ </p><p>
+ The biggest problem of #defining <code class="constant">NULL</code> to be
+ something like “<span class="quote">0L</span>†is that the compiler will view
+ that as a long integer before it views it as a pointer, so
+ overloading won't do what you expect. (This is why
+ <span class="command"><strong>g++</strong></span> has a magic extension, so that
+ <code class="constant">NULL</code> is always a pointer.)
+ </p><p>In his book <a class="ulink" href="http://www.awprofessional.com/titles/0-201-92488-9/" target="_top"><span class="emphasis"><em>Effective
+ C++</em></span></a>, Scott Meyers points out that the best way
+ to solve this problem is to not overload on pointer-vs-integer
+ types to begin with. He also offers a way to make your own magic
+ <code class="constant">NULL</code> that will match pointers before it
+ matches integers.
+ </p><p>See
+ <a class="ulink" href="http://www.awprofessional.com/titles/0-201-31015-5/" target="_top">the
+ Effective C++ CD example</a>
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch04s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02ch04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Numeric Properties </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Dynamic Memory</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch05.html b/libstdc++-v3/doc/html/manual/bk01pt02ch05.html
new file mode 100644
index 00000000000..8e18d9d6658
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch05.html
@@ -0,0 +1,66 @@
+<?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 5. Dynamic Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch04s03.html" title="NULL" /><link rel="next" href="bk01pt02ch06.html" title="Chapter 6. Termination" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Dynamic Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s03.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06.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.support.memory"></a>Chapter 5. Dynamic Memory</h2></div></div></div><p>
+ There are six flavors each of <code class="function">new</code> and
+ <code class="function">delete</code>, so make certain that you're using the right
+ ones. Here are quickie descriptions of <code class="function">new</code>:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ single object form, throwing a
+ <code class="classname">bad_alloc</code> on errors; this is what most
+ people are used to using
+ </p></li><li><p>
+ Single object "nothrow" form, returning NULL on errors
+ </p></li><li><p>
+ Array <code class="function">new</code>, throwing
+ <code class="classname">bad_alloc</code> on errors
+ </p></li><li><p>
+ Array nothrow <code class="function">new</code>, returning
+ <code class="constant">NULL</code> on errors
+ </p></li><li><p>
+ Placement <code class="function">new</code>, which does nothing (like
+ it's supposed to)
+ </p></li><li><p>
+ Placement array <code class="function">new</code>, which also does
+ nothing
+ </p></li></ul></div><p>
+ They are distinguished by the parameters that you pass to them, like
+ any other overloaded function. The six flavors of <code class="function">delete</code>
+ are distinguished the same way, but none of them are allowed to throw
+ an exception under any circumstances anyhow. (They match up for
+ completeness' sake.)
+ </p><p>
+ Remember that it is perfectly okay to call <code class="function">delete</code> on a
+ NULL pointer! Nothing happens, by definition. That is not the
+ same thing as deleting a pointer twice.
+ </p><p>
+ By default, if one of the “<span class="quote">throwing <code class="function">new</code>s</span>†can't
+ allocate the memory requested, it tosses an instance of a
+ <code class="classname">bad_alloc</code> exception (or, technically, some class derived
+ from it). You can change this by writing your own function (called a
+ new-handler) and then registering it with <code class="function">set_new_handler()</code>:
+ </p><pre class="programlisting">
+ typedef void (*PFV)(void);
+
+ static char* safety;
+ static PFV old_handler;
+
+ void my_new_handler ()
+ {
+ delete[] safety;
+ popup_window ("Dude, you are running low on heap memory. You
+ should, like, close some windows, or something.
+ The next time you run out, we're gonna burn!");
+ set_new_handler (old_handler);
+ return;
+ }
+
+ int main ()
+ {
+ safety = new char[500000];
+ old_handler = set_new_handler (&amp;my_new_handler);
+ ...
+ }
+ </pre><p>
+ <code class="classname">bad_alloc</code> is derived from the base <code class="classname">exception</code>
+ class defined in Chapter 19.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch04s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">NULL </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Termination</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch06.html b/libstdc++-v3/doc/html/manual/bk01pt02ch06.html
new file mode 100644
index 00000000000..a47fc4c28e4
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch06.html
@@ -0,0 +1,45 @@
+<?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 6. Termination</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /><link rel="next" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Termination</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch05.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06s02.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.support.termination"></a>Chapter 6. Termination</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</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="support.termination.handlers"></a>Termination Handlers</h2></div></div></div><p>
+ Not many changes here to <code class="filename">cstdlib</code>. You should note that the
+ <code class="function">abort()</code> function does not call the
+ destructors of automatic nor static objects, so if you're
+ depending on those to do cleanup, it isn't going to happen.
+ (The functions registered with <code class="function">atexit()</code>
+ don't get called either, so you can forget about that
+ possibility, too.)
+ </p><p>
+ The good old <code class="function">exit()</code> function can be a bit
+ funky, too, until you look closer. Basically, three points to
+ remember are:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ Static objects are destroyed in reverse order of their creation.
+ </p></li><li><p>
+ Functions registered with <code class="function">atexit()</code> are called in
+ reverse order of registration, once per registration call.
+ (This isn't actually new.)
+ </p></li><li><p>
+ The previous two actions are “<span class="quote">interleaved,</span>†that is,
+ given this pseudocode:
+ </p><pre class="programlisting">
+ extern "C or C++" void f1 (void);
+ extern "C or C++" void f2 (void);
+
+ static Thing obj1;
+ atexit(f1);
+ static Thing obj2;
+ atexit(f2);
+</pre><p>
+ then at a call of <code class="function">exit()</code>,
+ <code class="varname">f2</code> will be called, then
+ <code class="varname">obj2</code> will be destroyed, then
+ <code class="varname">f1</code> will be called, and finally
+ <code class="varname">obj1</code> will be destroyed. If
+ <code class="varname">f1</code> or <code class="varname">f2</code> allow an
+ exception to propagate out of them, Bad Things happen.
+ </p></li></ol></div><p>
+ Note also that <code class="function">atexit()</code> is only required to store 32
+ functions, and the compiler/library might already be using some of
+ those slots. If you think you may run out, we recommend using
+ the <code class="function">xatexit</code>/<code class="function">xexit</code> combination from <code class="literal">libiberty</code>, which has no such limit.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch06s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. Dynamic Memory </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Verbose Terminate Handler</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html b/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html
new file mode 100644
index 00000000000..222fb043500
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html
@@ -0,0 +1,76 @@
+<?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>Verbose Terminate Handler</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="prev" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="next" href="diagnostics.html" title="Part III. Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Verbose Terminate Handler</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Termination</th><td width="20%" align="right"> <a accesskey="n" href="diagnostics.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="support.termination.verbose"></a>Verbose Terminate Handler</h2></div></div></div><p>
+ If you are having difficulty with uncaught exceptions and want a
+ little bit of help debugging the causes of the core dumps, you can
+ make use of a GNU extension, the verbose terminate handler.
+ </p><pre class="programlisting">
+#include &lt;exception&gt;
+
+int main()
+{
+ std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+ ...
+
+ throw <em class="replaceable"><code>anything</code></em>;
+}
+</pre><p>
+ The <code class="function">__verbose_terminate_handler</code> function
+ obtains the name of the current exception, attempts to demangle
+ it, and prints it to stderr. If the exception is derived from
+ <code class="classname">exception</code> then the output from
+ <code class="function">what()</code> will be included.
+ </p><p>
+ Any replacement termination function is required to kill the
+ program without returning; this one calls abort.
+ </p><p>
+ For example:
+ </p><pre class="programlisting">
+#include &lt;exception&gt;
+#include &lt;stdexcept&gt;
+
+struct argument_error : public std::runtime_error
+{
+ argument_error(const std::string&amp; s): std::runtime_error(s) { }
+};
+
+int main(int argc)
+{
+ std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+ if (argc &gt; 5)
+ throw argument_error(“<span class="quote">argc is greater than 5!</span>â€);
+ else
+ throw argc;
+}
+</pre><p>
+ With the verbose terminate handler active, this gives:
+ </p><pre class="screen">
+ <code class="computeroutput">
+ % ./a.out
+ terminate called after throwing a `int'
+ Aborted
+ % ./a.out f f f f f f f f f f f
+ terminate called after throwing an instance of `argument_error'
+ what(): argc is greater than 5!
+ Aborted
+ </code>
+ </pre><p>
+ The 'Aborted' line comes from the call to
+ <code class="function">abort()</code>, of course.
+ </p><p>
+ This is the default termination handler; nothing need be done to
+ use it. To go back to the previous “<span class="quote">silent death</span>â€
+ method, simply include <code class="filename">exception</code> and
+ <code class="filename">cstdlib</code>, and call
+ </p><pre class="programlisting">
+ std::set_terminate(std::abort);
+ </pre><p>
+ After this, all calls to <code class="function">terminate</code> will use
+ <code class="function">abort</code> as the terminate handler.
+ </p><p>
+ Note: the verbose terminate handler will attempt to write to
+ stderr. If your application closes stderr or redirects it to an
+ inappropriate location,
+ <code class="function">__verbose_terminate_handler</code> will behave in
+ an unspecified manner.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02ch06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Termination </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. Diagnostics</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
new file mode 100644
index 00000000000..46dbe2ab865
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
@@ -0,0 +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></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01pt02ch04.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="bk01pt02ch04.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="id394397"></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>
+ While we can't reproduce the contents of the Standard here (you
+ need to get your own copy from your nation's member body; see our
+ homepage for help), we can mention a couple of changes in what
+ kind of support a C++ program gets from the Standard Library.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part II. Support </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. Types</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07.html
new file mode 100644
index 00000000000..a258631cb16
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07.html
@@ -0,0 +1,16 @@
+<?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 7. Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="next" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.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.diagnostics.exceptions"></a>Chapter 7. Exceptions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt03ch07.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></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.hierarchy"></a>Exception Classes</h2></div></div></div><p>
+ All exception objects are defined in one of the standard header
+ files: <code class="filename">exception</code>,
+ <code class="filename">stdexcept</code>, <code class="filename">new</code>, and
+ <code class="filename">typeinfo</code>.
+ </p><p>
+ The base exception object is <code class="classname">exception</code>,
+ located in <code class="filename">exception</code>. This object has no
+ <code class="classname">string</code> member.
+ </p><p>
+ Derived from this are several classes that may have a
+ <code class="classname">string</code> member: a full heirarchy can be
+ found in the <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00233.html" target="_top">source documentation</a>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="diagnostics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part III. Diagnostics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Adding Data to Exceptions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html
new file mode 100644
index 00000000000..d7c892a2b82
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html
@@ -0,0 +1,20 @@
+<?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>Adding Data to Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="next" href="bk01pt03ch07s03.html" title="Cancellation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Adding Data to Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.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.diagnostics.exceptions.data"></a>Adding Data to Exceptions</h2></div></div></div><p>
+ The standard exception classes carry with them a single string as
+ data (usually describing what went wrong or where the 'throw' took
+ place). It's good to remember that you can add your own data to
+ these exceptions when extending the hierarchy:
+ </p><pre class="programlisting">
+ struct My_Exception : public std::runtime_error
+ {
+ public:
+ My_Exception (const string&amp; whatarg)
+ : std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { }
+ int errno_at_time_of_throw() const { return e; }
+ DBID id_of_thing_that_threw() const { return id; }
+ protected:
+ int e;
+ DBID id; // some user-defined type
+ };
+ </pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt03ch07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Cancellation</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html
new file mode 100644
index 00000000000..42c7b2e6482
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html
@@ -0,0 +1,4 @@
+<?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>Cancellation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /><link rel="next" href="bk01pt03ch08.html" title="Chapter 8. Concept Checking" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Cancellation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch08.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.diagnostics.exceptions.cancellation"></a>Cancellation</h2></div></div></div><p>
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt03ch07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Adding Data to Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Concept Checking</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch08.html b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html
new file mode 100644
index 00000000000..a7b50f0a456
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html
@@ -0,0 +1,39 @@
+<?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 8. Concept Checking</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="utilities.html" title="Part IV. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="utilities.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.diagnostics.concept_checking"></a>Chapter 8. Concept Checking</h2></div></div></div><p>
+ In 1999, SGI added “<span class="quote">concept checkers</span>†to their
+ implementation of the STL: code which checked the template
+ parameters of instantiated pieces of the STL, in order to insure
+ that the parameters being used met the requirements of the
+ standard. For example, the Standard requires that types passed as
+ template parameters to <code class="classname">vector</code> be
+ "Assignable" (which means what you think it means). The
+ checking was done during compilation, and none of the code was
+ executed at runtime.
+ </p><p>
+ Unfortunately, the size of the compiler files grew significantly
+ as a result. The checking code itself was cumbersome. And bugs
+ were found in it on more than one occasion.
+ </p><p>
+ The primary author of the checking code, Jeremy Siek, had already
+ started work on a replacement implementation. The new code has been
+ formally reviewed and accepted into
+ <a class="ulink" href="http://www.boost.org/libs/concept_check/concept_check.htm" target="_top">the
+ Boost libraries</a>, and we are pleased to incorporate it into the
+ GNU C++ library.
+ </p><p>
+ The new version imposes a much smaller space overhead on the generated
+ object file. The checks are also cleaner and easier to read and
+ understand.
+ </p><p>
+ They are off by default for all versions of GCC.
+ They can be enabled at configure time with
+ <a class="ulink" href="../configopts.html" target="_top"><code class="literal">--enable-concept-checks</code></a>.
+ You can enable them on a per-translation-unit basis with
+ <code class="literal">-D_GLIBCXX_CONCEPT_CHECKS</code>.
+ </p><p>
+ Please note that the upcoming C++ standard has first-class
+ support for template parameter constraints based on concepts in the core
+ language. This will obviate the need for the library-simulated concept
+ checking described above.
+ </p></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="diagnostics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="utilities.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"> Part IV. Utilities</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch09.html b/libstdc++-v3/doc/html/manual/bk01pt04ch09.html
new file mode 100644
index 00000000000..9a93f2c2708
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch09.html
@@ -0,0 +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 9. Functors</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="utilities.html" title="Part IV. Utilities" /><link rel="next" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. Functors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch10.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.util.functors"></a>Chapter 9. Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people
+ get slightly the wrong idea. In the interest of not reinventing
+ the wheel, we will refer you to the introduction to the functor
+ concept written by SGI as part of their STL, in
+ <a class="ulink" href="http://www.sgi.com/tech/stl/functors.html" target="_top">their
+ http://www.sgi.com/tech/stl/functors.html</a>.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04ch10.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part IV. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. Pairs</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch10.html b/libstdc++-v3/doc/html/manual/bk01pt04ch10.html
new file mode 100644
index 00000000000..292026954a6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch10.html
@@ -0,0 +1,39 @@
+<?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 10. Pairs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch09.html" title="Chapter 9. Functors" /><link rel="next" href="bk01pt04ch11.html" title="Chapter 11. Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. Pairs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch09.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch11.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.util.pairs"></a>Chapter 10. Pairs</h2></div></div></div><p>The <code class="code">pair&lt;T1,T2&gt;</code> is a simple and handy way to
+ carry around a pair of objects. One is of type T1, and another of
+ type T2; they may be the same type, but you don't get anything
+ extra if they are. The two members can be accessed directly, as
+ <code class="code">.first</code> and <code class="code">.second</code>.
+ </p><p>Construction is simple. The default ctor initializes each member
+ with its respective default ctor. The other simple ctor,
+ </p><pre class="programlisting">
+ pair (const T1&amp; x, const T2&amp; y);
+ </pre><p>does what you think it does, <code class="code">first</code> getting <code class="code">x</code>
+ and <code class="code">second</code> getting <code class="code">y</code>.
+ </p><p>There is a copy constructor, but it requires that your compiler
+ handle member function templates:
+ </p><pre class="programlisting">
+ template &lt;class U, class V&gt; pair (const pair&lt;U,V&gt;&amp; p);
+ </pre><p>The compiler will convert as necessary from U to T1 and from
+ V to T2 in order to perform the respective initializations.
+ </p><p>The comparison operators are done for you. Equality
+ of two <code class="code">pair&lt;T1,T2&gt;</code>s is defined as both <code class="code">first</code>
+ members comparing equal and both <code class="code">second</code> members comparing
+ equal; this simply delegates responsibility to the respective
+ <code class="code">operator==</code> functions (for types like MyClass) or builtin
+ comparisons (for types like int, char, etc).
+ </p><p>
+ The less-than operator is a bit odd the first time you see it. It
+ is defined as evaluating to:
+ </p><pre class="programlisting">
+ x.first &lt; y.first ||
+ ( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second )
+ </pre><p>The other operators are not defined using the <code class="code">rel_ops</code>
+ functions above, but their semantics are the same.
+ </p><p>Finally, there is a template function called <code class="function">make_pair</code>
+ that takes two references-to-const objects and returns an
+ instance of a pair instantiated on their respective types:
+ </p><pre class="programlisting">
+ pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
+ </pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt04ch09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04ch11.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 9. Functors </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 11. Memory</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch11.html b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html
new file mode 100644
index 00000000000..d1f0024810f
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html
@@ -0,0 +1,346 @@
+<?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 11. Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /><link rel="next" href="auto_ptr.html" title="auto_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch10.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="auto_ptr.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.util.memory"></a>Chapter 11. Memory</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.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></div><p>
+ Memory contains three general areas. First, function and operator
+ calls via <code class="function">new</code> and <code class="function">delete</code>
+ operator or member function calls. Second, allocation via
+ <code class="classname">allocator</code>. And finally, smart pointer and
+ intelligent pointer abstractions.
+ </p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.util.memory.allocator"></a>Allocators</h2></div></div></div><p>
+ Memory management for Standard Library entities is encapsulated in a
+ class template called <code class="classname">allocator</code>. The
+ <code class="classname">allocator</code> abstraction is used throughout the
+ library in <code class="classname">string</code>, container classes,
+ algorithnms, and parts of iostreams. This class, and base classes of
+ it, are the superset of available free store (“<span class="quote">heap</span>â€)
+ management classes.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.req"></a>Requirements</h3></div></div></div><p>
+ The C++ standard only gives a few directives in this area:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ When you add elements to a container, and the container must
+ allocate more memory to hold them, the container makes the
+ request via its <span class="type">Allocator</span> template
+ parameter, which is usually aliased to
+ <span class="type">allocator_type</span>. This includes adding chars
+ to the string class, which acts as a regular STL container in
+ this respect.
+ </p></li><li><p>
+ The default <span class="type">Allocator</span> argument of every
+ container-of-T is <code class="classname">allocator&lt;T&gt;</code>.
+ </p></li><li><p>
+ The interface of the <code class="classname">allocator&lt;T&gt;</code> class is
+ extremely simple. It has about 20 public declarations (nested
+ typedefs, member functions, etc), but the two which concern us most
+ are:
+ </p><pre class="programlisting">
+ T* allocate (size_type n, const void* hint = 0);
+ void deallocate (T* p, size_type n);
+ </pre><p>
+ The <code class="varname">n</code> arguments in both those
+ functions is a <span class="emphasis"><em>count</em></span> of the number of
+ <span class="type">T</span>'s to allocate space for, <span class="emphasis"><em>not their
+ total size</em></span>.
+ (This is a simplification; the real signatures use nested typedefs.)
+ </p></li><li><p>
+ The storage is obtained by calling <code class="function">::operator
+ new</code>, but it is unspecified when or how
+ often this function is called. The use of the
+ <code class="varname">hint</code> is unspecified, but intended as an
+ aid to locality if an implementation so
+ desires. <code class="constant">[20.4.1.1]/6</code>
+ </p></li></ul></div><p>
+ Complete details cam be found in the C++ standard, look in
+ <code class="constant">[20.4 Memory]</code>.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.design_issues"></a>Design Issues</h3></div></div></div><p>
+ The easiest way of fulfilling the requirements is to call
+ <code class="function">operator new</code> each time a container needs
+ memory, and to call <code class="function">operator delete</code> each time
+ the container releases memory. This method may be <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html" target="_top">slower</a>
+ than caching the allocations and re-using previously-allocated
+ memory, but has the advantage of working correctly across a wide
+ variety of hardware and operating systems, including large
+ clusters. The <code class="classname">__gnu_cxx::new_allocator</code>
+ implements the simple operator new and operator delete semantics,
+ while <code class="classname">__gnu_cxx::malloc_allocator</code>
+ implements much the same thing, only with the C language functions
+ <code class="function">std::malloc</code> and <code class="function">free</code>.
+ </p><p>
+ Another approach is to use intelligence within the allocator
+ class to cache allocations. This extra machinery can take a variety
+ of forms: a bitmap index, an index into an exponentially increasing
+ power-of-two-sized buckets, or simpler fixed-size pooling cache.
+ The cache is shared among all the containers in the program: when
+ your program's <code class="classname">std::vector&lt;int&gt;</code> gets
+ cut in half and frees a bunch of its storage, that memory can be
+ reused by the private
+ <code class="classname">std::list&lt;WonkyWidget&gt;</code> brought in from
+ a KDE library that you linked against. And operators
+ <code class="function">new</code> and <code class="function">delete</code> are not
+ always called to pass the memory on, either, which is a speed
+ bonus. Examples of allocators that use these techniques are
+ <code class="classname">__gnu_cxx::bitmap_allocator</code>,
+ <code class="classname">__gnu_cxx::pool_allocator</code>, and
+ <code class="classname">__gnu_cxx::__mt_alloc</code>.
+ </p><p>
+ Depending on the implementation techniques used, the underlying
+ operating system, and compilation environment, scaling caching
+ allocators can be tricky. In particular, order-of-destruction and
+ order-of-creation for memory pools may be difficult to pin down
+ with certainty, which may create problems when used with plugins
+ 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="id419220"></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
+ been modified to support this change.
+ </p><p>
+ The class <code class="classname">allocator</code> just has typedef,
+ constructor, and rebind members. It inherits from one of the
+ high-speed extension allocators, covered below. Thus, all
+ allocation and deallocation depends on the base class.
+ </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="id480984"></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
+ for speed.
+ </p><p>
+ Three synthetic benchmarks have been created that provide data
+ that is used to compare different C++ allocators. These tests are:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ Insertion.
+ </p><p>
+ Over multiple iterations, various STL container
+ objects have elements inserted to some maximum amount. A variety
+ of allocators are tested.
+ Test source for <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup" target="_top">sequence</a>
+ and <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup" target="_top">associative</a>
+ containers.
+ </p></li><li><p>
+ Insertion and erasure in a multi-threaded environment.
+ </p><p>
+ This test shows the ability of the allocator to reclaim memory
+ on a pre-thread basis, as well as measuring thread contention
+ for memory resources.
+ Test source
+ <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup" target="_top">here</a>.
+ </p></li><li><p>
+ A threaded producer/consumer model.
+ </p><p>
+ Test source for
+ <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup" target="_top">sequence</a>
+ and
+ <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup" target="_top">associative</a>
+ containers.
+ </p></li></ol></div><p>
+ 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="id411194"></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
+ <code class="function">allocate</code> member function may not actually
+ call the global operator new. This situation is also duplicated
+ for calls to the <code class="function">deallocate</code> member
+ function.
+ </p><p>
+ This can be confusing.
+ </p><p>
+ In particular, this can make debugging memory errors more
+ difficult, especially when using third party tools like valgrind or
+ debug versions of <code class="function">new</code>.
+ </p><p>
+ There are various ways to solve this problem. One would be to use
+ a custom allocator that just called operators
+ <code class="function">new</code> and <code class="function">delete</code>
+ directly, for every allocation. (See
+ <code class="filename">include/ext/new_allocator.h</code>, for instance.)
+ However, that option would involve changing source code to use
+ the a non-default allocator. Another option is to force the
+ default allocator to remove caching and pools, and to directly
+ allocate with every call of <code class="function">allocate</code> and
+ directly deallocate with every call of
+ <code class="function">deallocate</code>, regardless of efficiency. As it
+ turns out, this last option is also available.
+ </p><p>
+ To globally disable memory caching within the library for the
+ default allocator, merely set
+ <code class="constant">GLIBCXX_FORCE_NEW</code> (with any value) in the
+ system's environment before running the program. If your program
+ crashes with <code class="constant">GLIBCXX_FORCE_NEW</code> in the
+ environment, it likely means that you linked against objects
+ built against the older library (objects which might still using the
+ cached allocations...).
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.using"></a>Using a Specific Allocator</h3></div></div></div><p>
+ You can specify different memory management schemes on a
+ per-container basis, by overriding the default
+ <span class="type">Allocator</span> template parameter. For example, an easy
+ (but non-portable) method of specifying that only <code class="function">malloc</code> or <code class="function">free</code>
+ should be used instead of the default node allocator is:
+ </p><pre class="programlisting">
+ std::list &lt;int, __gnu_cxx::malloc_allocator&lt;int&gt; &gt; malloc_list;</pre><p>
+ Likewise, a debugging form of whichever allocator is currently in use:
+ </p><pre class="programlisting">
+ std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque;
+ </pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.custom"></a>Custom Allocators</h3></div></div></div><p>
+ Writing a portable C++ allocator would dictate that the interface
+ would look much like the one specified for
+ <code class="classname">allocator</code>. Additional member functions, but
+ not subtractions, would be permissible.
+ </p><p>
+ Probably the best place to start would be to copy one of the
+ extension allocators: say a simple one like
+ <code class="classname">new_allocator</code>.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.ext"></a>Extension Allocators</h3></div></div></div><p>
+ Several other allocators are provided as part of this
+ implementation. The location of the extension allocators and their
+ names have changed, but in all cases, functionality is
+ equivalent. Starting with gcc-3.4, all extension allocators are
+ standard style. Before this point, SGI style was the norm. Because of
+ this, the number of template arguments also changed. Here's a simple
+ chart to track the changes.
+ </p><p>
+ More details on each of these extension allocators follows.
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ <code class="classname">new_allocator</code>
+ </p><p>
+ Simply wraps <code class="function">::operator new</code>
+ and <code class="function">::operator delete</code>.
+ </p></li><li><p>
+ <code class="classname">malloc_allocator</code>
+ </p><p>
+ Simply wraps <code class="function">malloc</code> and
+ <code class="function">free</code>. There is also a hook for an
+ out-of-memory handler (for
+ <code class="function">new</code>/<code class="function">delete</code> this is
+ taken care of elsewhere).
+ </p></li><li><p>
+ <code class="classname">array_allocator</code>
+ </p><p>
+ Allows allocations of known and fixed sizes using existing
+ global or external storage allocated via construction of
+ <code class="classname">std::tr1::array</code> objects. By using this
+ allocator, fixed size containers (including
+ <code class="classname">std::string</code>) can be used without
+ instances calling <code class="function">::operator new</code> and
+ <code class="function">::operator delete</code>. This capability
+ allows the use of STL abstractions without runtime
+ complications or overhead, even in situations such as program
+ startup. For usage examples, please consult the testsuite.
+ </p></li><li><p>
+ <code class="classname">debug_allocator</code>
+ </p><p>
+ A wrapper around an arbitrary allocator A. It passes on
+ slightly increased size requests to A, and uses the extra
+ memory to store size information. When a pointer is passed
+ to <code class="function">deallocate()</code>, the stored size is
+ checked, and <code class="function">assert()</code> is used to
+ guarantee they match.
+ </p></li><li><p>
+ <code class="classname">throw_allocator</code>
+ </p><p>
+ Includes memory tracking and marking abilities as well as hooks for
+ throwing exceptinos at configurable intervals (including random,
+ all, none).
+ </p></li><li><p>
+ <code class="classname">__pool_alloc</code>
+ </p><p>
+ A high-performance, single pool allocator. The reusable
+ memory is shared among identical instantiations of this type.
+ It calls through <code class="function">::operator new</code> to
+ obtain new memory when its lists run out. If a client
+ container requests a block larger than a certain threshold
+ size, then the pool is bypassed, and the allocate/deallocate
+ request is passed to <code class="function">::operator new</code>
+ directly.
+ </p><p>
+ Older versions of this class take a boolean template
+ parameter, called <code class="varname">thr</code>, and an integer template
+ parameter, called <code class="varname">inst</code>.
+ </p><p>
+ The <code class="varname">inst</code> number is used to track additional memory
+ pools. The point of the number is to allow multiple
+ instantiations of the classes without changing the semantics at
+ all. All three of
+ </p><pre class="programlisting">
+ typedef __pool_alloc&lt;true,0&gt; normal;
+ typedef __pool_alloc&lt;true,1&gt; private;
+ typedef __pool_alloc&lt;true,42&gt; also_private;
+ </pre><p>
+ behave exactly the same way. However, the memory pool for each type
+ (and remember that different instantiations result in different types)
+ remains separate.
+ </p><p>
+ The library uses <span class="emphasis"><em>0</em></span> in all its instantiations. If you
+ wish to keep separate free lists for a particular purpose, use a
+ different number.
+ </p><p>The <code class="varname">thr</code> boolean determines whether the
+ pool should be manipulated atomically or not. When
+ <code class="varname">thr</code> = <code class="constant">true</code>, the allocator
+ is is threadsafe, while <code class="varname">thr</code> =
+ <code class="constant">false</code>, and is slightly faster but unsafe for
+ multiple threads.
+ </p><p>
+ For thread-enabled configurations, the pool is locked with a
+ single big lock. In some situations, this implementation detail
+ may result in severe performance degredation.
+ </p><p>
+ (Note that the GCC thread abstraction layer allows us to provide
+ safe zero-overhead stubs for the threading routines, if threads
+ were disabled at configuration time.)
+ </p></li><li><p>
+ <code class="classname">__mt_alloc</code>
+ </p><p>
+ A high-performance fixed-size allocator with
+ exponentially-increasing allocations. It has its own
+ documentation, found <a class="ulink" href="../ext/mt_allocator.html" target="_top">here</a>.
+ </p></li><li><p>
+ <code class="classname">bitmap_allocator</code>
+ </p><p>
+ 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="ulink" href="../ext/ballocator_doc.html" target="_top">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="id413478"></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="id415484"></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">
+ C/C++ Users Journal
+ . </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="id398891"></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="id413375"></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="id425682"></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="id420837"></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="id423539"></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">
+ </a>
+ . </span></p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt04ch10.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="auto_ptr.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. Pairs </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> auto_ptr</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch12.html b/libstdc++-v3/doc/html/manual/bk01pt04ch12.html
new file mode 100644
index 00000000000..7c316db57a6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch12.html
@@ -0,0 +1,4 @@
+<?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 12. Traits</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="strings.html" title="Part V. Strings" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. Traits</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="strings.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.util.traits"></a>Chapter 12. Traits</h2></div></div></div><p>
+ </p></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="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="strings.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"> Part V. Strings</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html
new file mode 100644
index 00000000000..bc03ae817d9
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html
@@ -0,0 +1,89 @@
+<?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 13. String Classes</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="strings.html" title="Part V. Strings" /><link rel="prev" href="strings.html" title="Part V. Strings" /><link rel="next" href="bk01pt05ch13s02.html" title="Case Sensivitity" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. String Classes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><th width="60%" align="center">Part V. Strings</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s02.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.strings.string"></a>Chapter 13. String Classes</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><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 Sensivitity</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></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.simple"></a>Simple Transformations</h2></div></div></div><p>
+ Here are Standard, simple, and portable ways to perform common
+ transformations on a <code class="code">string</code> instance, such as
+ "convert to all upper case." The word transformations
+ is especially apt, because the standard template function
+ <code class="code">transform&lt;&gt;</code> is used.
+ </p><p>
+ This code will go through some iterations. Here's a simiple
+ version:
+ </p><pre class="programlisting">
+ #include &lt;string&gt;
+ #include &lt;algorithm&gt;
+ #include &lt;cctype&gt; // old &lt;ctype.h&gt;
+
+ struct ToLower
+ {
+ char operator() (char c) const { return std::tolower(c); }
+ };
+
+ struct ToUpper
+ {
+ char operator() (char c) const { return std::toupper(c); }
+ };
+
+ int main()
+ {
+ std::string s ("Some Kind Of Initial Input Goes Here");
+
+ // Change everything into upper case
+ std::transform (s.begin(), s.end(), s.begin(), ToUpper());
+
+ // Change everything into lower case
+ std::transform (s.begin(), s.end(), s.begin(), ToLower());
+
+ // Change everything back into upper case, but store the
+ // result in a different string
+ std::string capital_s;
+ capital_s.resize(s.size());
+ std::transform (s.begin(), s.end(), capital_s.begin(), ToUpper());
+ }
+ </pre><p>
+ <span class="emphasis"><em>Note</em></span> that these calls all
+ involve the global C locale through the use of the C functions
+ <code class="code">toupper/tolower</code>. This is absolutely guaranteed to work --
+ but <span class="emphasis"><em>only</em></span> if the string contains <span class="emphasis"><em>only</em></span> characters
+ from the basic source character set, and there are <span class="emphasis"><em>only</em></span>
+ 96 of those. Which means that not even all English text can be
+ represented (certain British spellings, proper names, and so forth).
+ So, if all your input forevermore consists of only those 96
+ characters (hahahahahaha), then you're done.
+ </p><p><span class="emphasis"><em>Note</em></span> that the
+ <code class="code">ToUpper</code> and <code class="code">ToLower</code> function objects
+ are needed because <code class="code">toupper</code> and <code class="code">tolower</code>
+ are overloaded names (declared in <code class="code">&lt;cctype&gt;</code> and
+ <code class="code">&lt;locale&gt;</code>) so the template-arguments for
+ <code class="code">transform&lt;&gt;</code> cannot be deduced, as explained in
+ <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-11/msg00180.html" target="_top">this
+ message</a>.
+
+ At minimum, you can write short wrappers like
+ </p><pre class="programlisting">
+ char toLower (char c)
+ {
+ return std::tolower(c);
+ } </pre><p>The correct method is to use a facet for a particular locale
+ and call its conversion functions. These are discussed more in
+ Chapter 22; the specific part is
+ <a class="ulink" href="../22_locale/howto.html#7" target="_top">Correct Transformations</a>,
+ which shows the final version of this code. (Thanks to James Kanze
+ for assistance and suggestions on all of this.)
+ </p><p>Another common operation is trimming off excess whitespace. Much
+ like transformations, this task is trivial with the use of string's
+ <code class="code">find</code> family. These examples are broken into multiple
+ statements for readability:
+ </p><pre class="programlisting">
+ std::string str (" \t blah blah blah \n ");
+
+ // trim leading whitespace
+ string::size_type notwhite = str.find_first_not_of(" \t\n");
+ str.erase(0,notwhite);
+
+ // trim trailing whitespace
+ notwhite = str.find_last_not_of(" \t\n");
+ str.erase(notwhite+1); </pre><p>Obviously, the calls to <code class="code">find</code> could be inserted directly
+ into the calls to <code class="code">erase</code>, in case your compiler does not
+ optimize named temporaries out of existence.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="strings.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part V. Strings </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Case Sensivitity</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html
new file mode 100644
index 00000000000..603721cd88d
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html
@@ -0,0 +1,40 @@
+<?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>Case Sensivitity</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="next" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Case Sensivitity</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s03.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="strings.string.case"></a>Case Sensivitity</h2></div></div></div><p>
+ </p><p>The well-known-and-if-it-isn't-well-known-it-ought-to-be
+ <a class="ulink" href="http://www.gotw.ca/gotw/" target="_top">Guru of the Week</a>
+ discussions held on Usenet covered this topic in January of 1998.
+ Briefly, the challenge was, “<span class="quote">write a 'ci_string' class which
+ is identical to the standard 'string' class, but is
+ case-insensitive in the same way as the (common but nonstandard)
+ C function stricmp()</span>â€.
+ </p><pre class="programlisting">
+ ci_string s( "AbCdE" );
+
+ // case insensitive
+ assert( s == "abcde" );
+ assert( s == "ABCDE" );
+
+ // still case-preserving, of course
+ assert( strcmp( s.c_str(), "AbCdE" ) == 0 );
+ assert( strcmp( s.c_str(), "abcde" ) != 0 ); </pre><p>The solution is surprisingly easy. The original answer was
+ posted on Usenet, and a revised version appears in Herb Sutter's
+ book <span class="emphasis"><em>Exceptional C++</em></span> and on his website as <a class="ulink" href="http://www.gotw.ca/gotw/029.htm" target="_top">GotW 29</a>.
+ </p><p>See? Told you it was easy!</p><p>
+ <span class="emphasis"><em>Added June 2000:</em></span> The May 2000 issue of C++
+ Report contains a fascinating <a class="ulink" href="http://lafstern.org/matt/col2_new.pdf" target="_top"> article</a> by
+ Matt Austern (yes, <span class="emphasis"><em>the</em></span> Matt Austern) on why
+ case-insensitive comparisons are not as easy as they seem, and
+ why creating a class is the <span class="emphasis"><em>wrong</em></span> way to go
+ about it in production code. (The GotW answer mentions one of
+ the principle difficulties; his article mentions more.)
+ </p><p>Basically, this is "easy" only if you ignore some things,
+ things which may be too important to your program to ignore. (I chose
+ to ignore them when originally writing this entry, and am surprised
+ that nobody ever called me on it...) The GotW question and answer
+ remain useful instructional tools, however.
+ </p><p><span class="emphasis"><em>Added September 2000:</em></span> James Kanze provided a link to a
+ <a class="ulink" href="http://www.unicode.org/unicode/reports/tr21/" target="_top">Unicode
+ Technical Report discussing case handling</a>, which provides some
+ very good information.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt05ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. String Classes </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Arbitrary Character Types</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
new file mode 100644
index 00000000000..c321667a729
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
@@ -0,0 +1,57 @@
+<?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>Arbitrary Character Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s02.html" title="Case Sensivitity" /><link rel="next" href="bk01pt05ch13s04.html" title="Tokenizing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Arbitrary Character Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s02.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s04.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="strings.string.character_types"></a>Arbitrary Character Types</h2></div></div></div><p>
+ </p><p>The <code class="code">std::basic_string</code> is tantalizingly general, in that
+ it is parameterized on the type of the characters which it holds.
+ In theory, you could whip up a Unicode character class and instantiate
+ <code class="code">std::basic_string&lt;my_unicode_char&gt;</code>, or assuming
+ that integers are wider than characters on your platform, maybe just
+ declare variables of type <code class="code">std::basic_string&lt;int&gt;</code>.
+ </p><p>That's the theory. Remember however that basic_string has additional
+ type parameters, which take default arguments based on the character
+ type (called <code class="code">CharT</code> here):
+ </p><pre class="programlisting">
+ template &lt;typename CharT,
+ typename Traits = char_traits&lt;CharT&gt;,
+ typename Alloc = allocator&lt;CharT&gt; &gt;
+ class basic_string { .... };</pre><p>Now, <code class="code">allocator&lt;CharT&gt;</code> will probably Do The Right
+ Thing by default, unless you need to implement your own allocator
+ for your characters.
+ </p><p>But <code class="code">char_traits</code> takes more work. The char_traits
+ template is <span class="emphasis"><em>declared</em></span> but not <span class="emphasis"><em>defined</em></span>.
+ That means there is only
+ </p><pre class="programlisting">
+ template &lt;typename CharT&gt;
+ struct char_traits
+ {
+ static void foo (type1 x, type2 y);
+ ...
+ };</pre><p>and functions such as char_traits&lt;CharT&gt;::foo() are not
+ actually defined anywhere for the general case. The C++ standard
+ permits this, because writing such a definition to fit all possible
+ CharT's cannot be done.
+ </p><p>The C++ standard also requires that char_traits be specialized for
+ instantiations of <code class="code">char</code> and <code class="code">wchar_t</code>, and it
+ is these template specializations that permit entities like
+ <code class="code">basic_string&lt;char,char_traits&lt;char&gt;&gt;</code> to work.
+ </p><p>If you want to use character types other than char and wchar_t,
+ such as <code class="code">unsigned char</code> and <code class="code">int</code>, you will
+ need suitable specializations for them. For a time, in earlier
+ versions of GCC, there was a mostly-correct implementation that
+ let programmers be lazy but it broke under many situations, so it
+ was removed. GCC 3.4 introduced a new implementation that mostly
+ works and can be specialized even for <code class="code">int</code> and other
+ built-in types.
+ </p><p>If you want to use your own special character class, then you have
+ <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00163.html" target="_top">a lot
+ of work to do</a>, especially if you with to use i18n features
+ (facets require traits information but don't have a traits argument).
+ </p><p>Another example of how to specialize char_traits was given <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00260.html" target="_top">on the
+ mailing list</a> and at a later date was put into the file <code class="code">
+ include/ext/pod_char_traits.h</code>. We agree
+ that the way it's used with basic_string (scroll down to main())
+ doesn't look nice, but that's because <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00236.html" target="_top">the
+ nice-looking first attempt</a> turned out to <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00242.html" target="_top">not
+ be conforming C++</a>, due to the rule that CharT must be a POD.
+ (See how tricky this is?)
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt05ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Case Sensivitity </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Tokenizing</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html
new file mode 100644
index 00000000000..971887c86f6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html
@@ -0,0 +1,85 @@
+<?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>Tokenizing</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /><link rel="next" href="bk01pt05ch13s05.html" title="Shrink to Fit" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Tokenizing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s03.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s05.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="strings.string.token"></a>Tokenizing</h2></div></div></div><p>
+ </p><p>The Standard C (and C++) function <code class="code">strtok()</code> leaves a lot to
+ be desired in terms of user-friendliness. It's unintuitive, it
+ destroys the character string on which it operates, and it requires
+ you to handle all the memory problems. But it does let the client
+ code decide what to use to break the string into pieces; it allows
+ you to choose the "whitespace," so to speak.
+ </p><p>A C++ implementation lets us keep the good things and fix those
+ annoyances. The implementation here is more intuitive (you only
+ call it once, not in a loop with varying argument), it does not
+ affect the original string at all, and all the memory allocation
+ is handled for you.
+ </p><p>It's called stringtok, and it's a template function. Sources are
+ as below, in a less-portable form than it could be, to keep this
+ example simple (for example, see the comments on what kind of
+ string it will accept).
+ </p><pre class="programlisting">
+#include &lt;string&gt;
+template &lt;typename Container&gt;
+void
+stringtok(Container &amp;container, string const &amp;in,
+ const char * const delimiters = " \t\n")
+{
+ const string::size_type len = in.length();
+ string::size_type i = 0;
+
+ while (i &lt; len)
+ {
+ // Eat leading whitespace
+ i = in.find_first_not_of(delimiters, i);
+ if (i == string::npos)
+ return; // Nothing left but white space
+
+ // Find the end of the token
+ string::size_type j = in.find_first_of(delimiters, i);
+
+ // Push token
+ if (j == string::npos)
+ {
+ container.push_back(in.substr(i));
+ return;
+ }
+ else
+ container.push_back(in.substr(i, j-i));
+
+ // Set up for next loop
+ i = j + 1;
+ }
+}
+</pre><p>
+ The author uses a more general (but less readable) form of it for
+ parsing command strings and the like. If you compiled and ran this
+ code using it:
+ </p><pre class="programlisting">
+ std::list&lt;string&gt; ls;
+ stringtok (ls, " this \t is\t\n a test ");
+ for (std::list&lt;string&gt;const_iterator i = ls.begin();
+ i != ls.end(); ++i)
+ {
+ std::cerr &lt;&lt; ':' &lt;&lt; (*i) &lt;&lt; ":\n";
+ } </pre><p>You would see this as output:
+ </p><pre class="programlisting">
+ :this:
+ :is:
+ :a:
+ :test: </pre><p>with all the whitespace removed. The original <code class="code">s</code> is still
+ available for use, <code class="code">ls</code> will clean up after itself, and
+ <code class="code">ls.size()</code> will return how many tokens there were.
+ </p><p>As always, there is a price paid here, in that stringtok is not
+ as fast as strtok. The other benefits usually outweigh that, however.
+ <a class="ulink" href="stringtok_std_h.txt" target="_top">Another version of stringtok is given
+ here</a>, suggested by Chris King and tweaked by Petr Prikryl,
+ and this one uses the
+ transformation functions mentioned below. If you are comfortable
+ with reading the new function names, this version is recommended
+ as an example.
+ </p><p><span class="emphasis"><em>Added February 2001:</em></span> Mark Wilden pointed out that the
+ standard <code class="code">std::getline()</code> function can be used with standard
+ <a class="ulink" href="../27_io/howto.html" target="_top">istringstreams</a> to perform
+ tokenizing as well. Build an istringstream from the input text,
+ and then use std::getline with varying delimiters (the three-argument
+ signature) to extract tokens into a string.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt05ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Arbitrary Character Types </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Shrink to Fit</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html
new file mode 100644
index 00000000000..b5ee55ddbb2
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html
@@ -0,0 +1,15 @@
+<?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>Shrink to Fit</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s04.html" title="Tokenizing" /><link rel="next" href="bk01pt05ch13s06.html" title="CString (MFC)" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Shrink to Fit</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s04.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s06.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="strings.string.shrink"></a>Shrink to Fit</h2></div></div></div><p>
+ </p><p>From GCC 3.4 calling <code class="code">s.reserve(res)</code> on a
+ <code class="code">string s</code> with <code class="code">res &lt; s.capacity()</code> will
+ reduce the string's capacity to <code class="code">std::max(s.size(), res)</code>.
+ </p><p>This behaviour is suggested, but not required by the standard. Prior
+ to GCC 3.4 the following alternative can be used instead
+ </p><pre class="programlisting">
+ std::string(str.data(), str.size()).swap(str);
+ </pre><p>This is similar to the idiom for reducing a <code class="code">vector</code>'s
+ memory usage (see <a class="ulink" href="../faq/index.html#5_9" target="_top">FAQ 5.9</a>) but
+ the regular copy constructor cannot be used because libstdc++'s
+ <code class="code">string</code> is Copy-On-Write.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt05ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Tokenizing </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> CString (MFC)</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html
new file mode 100644
index 00000000000..4725e2c012c
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html
@@ -0,0 +1,91 @@
+<?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>CString (MFC)</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s05.html" title="Shrink to Fit" /><link rel="next" href="localization.html" title="Part VI. Localization" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CString (MFC)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s05.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="localization.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="strings.string.Cstring"></a>CString (MFC)</h2></div></div></div><p>
+ </p><p>A common lament seen in various newsgroups deals with the Standard
+ string class as opposed to the Microsoft Foundation Class called
+ CString. Often programmers realize that a standard portable
+ answer is better than a proprietary nonportable one, but in porting
+ their application from a Win32 platform, they discover that they
+ are relying on special functions offered by the CString class.
+ </p><p>Things are not as bad as they seem. In
+ <a class="ulink" href="http://gcc.gnu.org/ml/gcc/1999-04n/msg00236.html" target="_top">this
+ message</a>, Joe Buck points out a few very important things:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>The Standard <code class="code">string</code> supports all the operations
+ that CString does, with three exceptions.
+ </p></li><li><p>Two of those exceptions (whitespace trimming and case
+ conversion) are trivial to implement. In fact, we do so
+ on this page.
+ </p></li><li><p>The third is <code class="code">CString::Format</code>, which allows formatting
+ in the style of <code class="code">sprintf</code>. This deserves some mention:
+ </p></li></ul></div><p>
+ The old libg++ library had a function called form(), which did much
+ the same thing. But for a Standard solution, you should use the
+ stringstream classes. These are the bridge between the iostream
+ hierarchy and the string class, and they operate with regular
+ streams seamlessly because they inherit from the iostream
+ hierarchy. An quick example:
+ </p><pre class="programlisting">
+ #include &lt;iostream&gt;
+ #include &lt;string&gt;
+ #include &lt;sstream&gt;
+
+ string f (string&amp; incoming) // incoming is "foo N"
+ {
+ istringstream incoming_stream(incoming);
+ string the_word;
+ int the_number;
+
+ incoming_stream &gt;&gt; the_word // extract "foo"
+ &gt;&gt; the_number; // extract N
+
+ ostringstream output_stream;
+ output_stream &lt;&lt; "The word was " &lt;&lt; the_word
+ &lt;&lt; " and 3*N was " &lt;&lt; (3*the_number);
+
+ return output_stream.str();
+ } </pre><p>A serious problem with CString is a design bug in its memory
+ allocation. Specifically, quoting from that same message:
+ </p><pre class="programlisting">
+ CString suffers from a common programming error that results in
+ poor performance. Consider the following code:
+
+ CString n_copies_of (const CString&amp; foo, unsigned n)
+ {
+ CString tmp;
+ for (unsigned i = 0; i &lt; n; i++)
+ tmp += foo;
+ return tmp;
+ }
+
+ This function is O(n^2), not O(n). The reason is that each +=
+ causes a reallocation and copy of the existing string. Microsoft
+ applications are full of this kind of thing (quadratic performance
+ on tasks that can be done in linear time) -- on the other hand,
+ we should be thankful, as it's created such a big market for high-end
+ ix86 hardware. :-)
+
+ If you replace CString with string in the above function, the
+ performance is O(n).
+ </pre><p>Joe Buck also pointed out some other things to keep in mind when
+ comparing CString and the Standard string class:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>CString permits access to its internal representation; coders
+ who exploited that may have problems moving to <code class="code">string</code>.
+ </p></li><li><p>Microsoft ships the source to CString (in the files
+ MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation
+ bug and rebuild your MFC libraries.
+ <span class="emphasis"><em><span class="emphasis"><em>Note:</em></span> It looks like the CString shipped
+ with VC++6.0 has fixed this, although it may in fact have been
+ one of the VC++ SPs that did it.</em></span>
+ </p></li><li><p><code class="code">string</code> operations like this have O(n) complexity
+ <span class="emphasis"><em>if the implementors do it correctly</em></span>. The libstdc++
+ implementors did it correctly. Other vendors might not.
+ </p></li><li><p>While parts of the SGI STL are used in libstdc++, their
+ string class is not. The SGI <code class="code">string</code> is essentially
+ <code class="code">vector&lt;char&gt;</code> and does not do any reference
+ counting like libstdc++'s does. (It is O(n), though.)
+ So if you're thinking about SGI's string or rope classes,
+ you're now looking at four possibilities: CString, the
+ libstdc++ string, the SGI string, and the SGI rope, and this
+ is all before any allocator or traits customizations! (More
+ choices than you can shake a stick at -- want fries with that?)
+ </p></li></ul></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt05ch13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Shrink to Fit </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part VI. Localization</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch14.html b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html
new file mode 100644
index 00000000000..7b98960a0a0
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html
@@ -0,0 +1,422 @@
+<?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 14. Locales</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="localization.html" title="Part VI. Localization" /><link rel="next" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 14. Locales</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt06ch15.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.locales"></a>Chapter 14. Locales</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.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.locales.locale"></a>locale</h2></div></div></div><p>
+Describes the basic locale object, including nested
+classes id, facet, and the reference-counted implementation object,
+class _Impl.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.req"></a>Requirements</h3></div></div></div><p>
+Class locale is non-templatized and has two distinct types nested
+inside of it:
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+class facet
+22.1.1.1.2 Class locale::facet
+</em></span>
+</p></blockquote></div><p>
+Facets actually implement locale functionality. For instance, a facet
+called numpunct is the data objects that can be used to query for the
+thousands separator is in the German locale.
+</p><p>
+Literally, a facet is strictly defined:
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+ Dontaining the following public data member:
+ </p><p>
+ <code class="code">static locale::id id;</code>
+ </p></li><li><p>
+ Derived from another facet:
+ </p><p>
+ <code class="code">class gnu_codecvt: public std::ctype&lt;user-defined-type&gt;</code>
+ </p></li></ul></div><p>
+Of interest in this class are the memory management options explicitly
+specified as an argument to facet's constructor. Each constructor of a
+facet class takes a std::size_t __refs argument: if __refs == 0, the
+facet is deleted when the locale containing it is destroyed. If __refs
+== 1, the facet is not destroyed, even when it is no longer
+referenced.
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+class id
+22.1.1.1.3 - Class locale::id
+</em></span>
+</p></blockquote></div><p>
+Provides an index for looking up specific facets.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.design"></a>Design</h3></div></div></div><p>
+The major design challenge is fitting an object-orientated and
+non-global locale design ontop of POSIX and other relevant stanards,
+which include the Single Unix (nee X/Open.)
+</p><p>
+Because C and earlier versions of POSIX falls down so completely,
+portibility is an issue.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.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="locale.impl.c"></a>Interacting with "C" locales</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ <code class="code">`locale -a`</code> displays available locales.
+ </p><div class="blockquote"><blockquote class="blockquote"><pre class="programlisting">
+af_ZA
+ar_AE
+ar_AE.utf8
+ar_BH
+ar_BH.utf8
+ar_DZ
+ar_DZ.utf8
+ar_EG
+ar_EG.utf8
+ar_IN
+ar_IQ
+ar_IQ.utf8
+ar_JO
+ar_JO.utf8
+ar_KW
+ar_KW.utf8
+ar_LB
+ar_LB.utf8
+ar_LY
+ar_LY.utf8
+ar_MA
+ar_MA.utf8
+ar_OM
+ar_OM.utf8
+ar_QA
+ar_QA.utf8
+ar_SA
+ar_SA.utf8
+ar_SD
+ar_SD.utf8
+ar_SY
+ar_SY.utf8
+ar_TN
+ar_TN.utf8
+ar_YE
+ar_YE.utf8
+be_BY
+be_BY.utf8
+bg_BG
+bg_BG.utf8
+br_FR
+bs_BA
+C
+ca_ES
+ca_ES@euro
+ca_ES.utf8
+ca_ES.utf8@euro
+cs_CZ
+cs_CZ.utf8
+cy_GB
+da_DK
+da_DK.iso885915
+da_DK.utf8
+de_AT
+de_AT@euro
+de_AT.utf8
+de_AT.utf8@euro
+de_BE
+de_BE@euro
+de_BE.utf8
+de_BE.utf8@euro
+de_CH
+de_CH.utf8
+de_DE
+de_DE@euro
+de_DE.utf8
+de_DE.utf8@euro
+de_LU
+de_LU@euro
+de_LU.utf8
+de_LU.utf8@euro
+el_GR
+el_GR.utf8
+en_AU
+en_AU.utf8
+en_BW
+en_BW.utf8
+en_CA
+en_CA.utf8
+en_DK
+en_DK.utf8
+en_GB
+en_GB.iso885915
+en_GB.utf8
+en_HK
+en_HK.utf8
+en_IE
+en_IE@euro
+en_IE.utf8
+en_IE.utf8@euro
+en_IN
+en_NZ
+en_NZ.utf8
+en_PH
+en_PH.utf8
+en_SG
+en_SG.utf8
+en_US
+en_US.iso885915
+en_US.utf8
+en_ZA
+en_ZA.utf8
+en_ZW
+en_ZW.utf8
+es_AR
+es_AR.utf8
+es_BO
+es_BO.utf8
+es_CL
+es_CL.utf8
+es_CO
+es_CO.utf8
+es_CR
+es_CR.utf8
+es_DO
+es_DO.utf8
+es_EC
+es_EC.utf8
+es_ES
+es_ES@euro
+es_ES.utf8
+es_ES.utf8@euro
+es_GT
+es_GT.utf8
+es_HN
+es_HN.utf8
+es_MX
+es_MX.utf8
+es_NI
+es_NI.utf8
+es_PA
+es_PA.utf8
+es_PE
+es_PE.utf8
+es_PR
+es_PR.utf8
+es_PY
+es_PY.utf8
+es_SV
+es_SV.utf8
+es_US
+es_US.utf8
+es_UY
+es_UY.utf8
+es_VE
+es_VE.utf8
+et_EE
+et_EE.utf8
+eu_ES
+eu_ES@euro
+eu_ES.utf8
+eu_ES.utf8@euro
+fa_IR
+fi_FI
+fi_FI@euro
+fi_FI.utf8
+fi_FI.utf8@euro
+fo_FO
+fo_FO.utf8
+fr_BE
+fr_BE@euro
+fr_BE.utf8
+fr_BE.utf8@euro
+fr_CA
+fr_CA.utf8
+fr_CH
+fr_CH.utf8
+fr_FR
+fr_FR@euro
+fr_FR.utf8
+fr_FR.utf8@euro
+fr_LU
+fr_LU@euro
+fr_LU.utf8
+fr_LU.utf8@euro
+ga_IE
+ga_IE@euro
+ga_IE.utf8
+ga_IE.utf8@euro
+gl_ES
+gl_ES@euro
+gl_ES.utf8
+gl_ES.utf8@euro
+gv_GB
+gv_GB.utf8
+he_IL
+he_IL.utf8
+hi_IN
+hr_HR
+hr_HR.utf8
+hu_HU
+hu_HU.utf8
+id_ID
+id_ID.utf8
+is_IS
+is_IS.utf8
+it_CH
+it_CH.utf8
+it_IT
+it_IT@euro
+it_IT.utf8
+it_IT.utf8@euro
+iw_IL
+iw_IL.utf8
+ja_JP.eucjp
+ja_JP.utf8
+ka_GE
+kl_GL
+kl_GL.utf8
+ko_KR.euckr
+ko_KR.utf8
+kw_GB
+kw_GB.utf8
+lt_LT
+lt_LT.utf8
+lv_LV
+lv_LV.utf8
+mi_NZ
+mk_MK
+mk_MK.utf8
+mr_IN
+ms_MY
+ms_MY.utf8
+mt_MT
+mt_MT.utf8
+nl_BE
+nl_BE@euro
+nl_BE.utf8
+nl_BE.utf8@euro
+nl_NL
+nl_NL@euro
+nl_NL.utf8
+nl_NL.utf8@euro
+nn_NO
+nn_NO.utf8
+no_NO
+no_NO.utf8
+oc_FR
+pl_PL
+pl_PL.utf8
+POSIX
+pt_BR
+pt_BR.utf8
+pt_PT
+pt_PT@euro
+pt_PT.utf8
+pt_PT.utf8@euro
+ro_RO
+ro_RO.utf8
+ru_RU
+ru_RU.koi8r
+ru_RU.utf8
+ru_UA
+ru_UA.utf8
+se_NO
+sk_SK
+sk_SK.utf8
+sl_SI
+sl_SI.utf8
+sq_AL
+sq_AL.utf8
+sr_YU
+sr_YU@cyrillic
+sr_YU.utf8
+sr_YU.utf8@cyrillic
+sv_FI
+sv_FI@euro
+sv_FI.utf8
+sv_FI.utf8@euro
+sv_SE
+sv_SE.iso885915
+sv_SE.utf8
+ta_IN
+te_IN
+tg_TJ
+th_TH
+th_TH.utf8
+tl_PH
+tr_TR
+tr_TR.utf8
+uk_UA
+uk_UA.utf8
+ur_PK
+uz_UZ
+vi_VN
+vi_VN.tcvn
+wa_BE
+wa_BE@euro
+yi_US
+zh_CN
+zh_CN.gb18030
+zh_CN.gbk
+zh_CN.utf8
+zh_HK
+zh_HK.utf8
+zh_TW
+zh_TW.euctw
+zh_TW.utf8
+</pre></blockquote></div></li><li><p>
+ <code class="code">`locale`</code> displays environmental variables that
+ impact how locale("") will be deduced.
+ </p><div class="blockquote"><blockquote class="blockquote"><pre class="programlisting">
+LANG=en_US
+LC_CTYPE="en_US"
+LC_NUMERIC="en_US"
+LC_TIME="en_US"
+LC_COLLATE="en_US"
+LC_MONETARY="en_US"
+LC_MESSAGES="en_US"
+LC_PAPER="en_US"
+LC_NAME="en_US"
+LC_ADDRESS="en_US"
+LC_TELEPHONE="en_US"
+LC_MEASUREMENT="en_US"
+LC_IDENTIFICATION="en_US"
+LC_ALL=
+</pre></blockquote></div></li></ul></div><p>
+From Josuttis, p. 697-698, which says, that "there is only *one*
+relation (of the C++ locale mechanism) to the C locale mechanism: the
+global C locale is modified if a named C++ locale object is set as the
+global locale" (emphasis Paolo), that is:
+</p><pre class="programlisting">std::locale::global(std::locale(""));</pre><p>affects the C functions as if the following call was made:</p><pre class="programlisting">std::setlocale(LC_ALL, "");</pre><p>
+ On the other hand, there is *no* viceversa, that is, calling
+ setlocale has *no* whatsoever on the C++ locale mechanism, in
+ particular on the working of locale(""), which constructs the locale
+ object from the environment of the running program, that is, in
+ practice, the set of LC_ALL, LANG, etc. variable of the shell.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.future"></a>Future</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ Locale initialization: at what point does _S_classic, _S_global
+ get initialized? Can named locales assume this initialization
+ has already taken place?
+ </p></li><li><p>
+ Document how named locales error check when filling data
+ members. Ie, a fr_FR locale that doesn't have
+ numpunct::truename(): does it use "true"? Or is it a blank
+ string? What's the convention?
+ </p></li><li><p>
+ Explain how locale aliasing happens. When does "de_DE" use "de"
+ information? What is the rule for locales composed of just an
+ ISO language code (say, "de") and locales with both an ISO
+ language code and ISO country code (say, "de_DE").
+ </p></li><li><p>
+ What should non-required facet instantiations do? If the
+ generic implemenation 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="id389722"></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="id418042"></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="id495535"></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="id434429"></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="id434447"></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="id415318"></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="id424745"></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></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="localization.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt06ch15.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part VI. Localization </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 15. Facets aka Categories</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch15.html b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html
new file mode 100644
index 00000000000..2a3811806a7
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html
@@ -0,0 +1,74 @@
+<?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 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.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="bk01pt06ch14.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="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.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="id424267"></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
+LC_CTYPE category implements.
+</p><p>
+The two required specializations are implemented as follows:
+</p><p>
+<code class="code">
+ctype&lt;char&gt;
+</code>
+</p><p>
+This is simple specialization. Implementing this was a piece of cake.
+</p><p>
+<code class="code">
+ctype&lt;wchar_t&gt;
+</code>
+</p><p>
+This specialization, by specifying all the template parameters, pretty
+much ties the hands of implementors. As such, the implementation is
+straightforward, involving mcsrtombs for the conversions between char
+to wchar_t and wcsrtombs for conversions between wchar_t and char.
+</p><p>
+Neither of these two required specializations deals with Unicode
+characters.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.future"></a>Future</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ How to deal with the global locale issue?
+ </p></li><li><p>
+ How to deal with different types than char, wchar_t? </p></li><li><p>
+ Overlap between codecvt/ctype: narrow/widen
+ </p></li><li><p>
+ Mask typedef in codecvt_base, argument types in codecvt. what
+ is know about this type?
+ </p></li><li><p>
+ Why mask* argument in codecvt?
+ </p></li><li><p>
+ Can this be made (more) generic? is there a simple way to
+ straighten out the configure-time mess that is a by-product of
+ this class?
+ </p></li><li><p>
+ Get the ctype&lt;wchar_t&gt;::mask stuff under control. Need to
+ make some kind of static table, and not do lookup evertime
+ somebody hits the do_is... functions. Too bad we can't just
+ redefine mask for ctype&lt;wchar_t&gt;
+ </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="id428438"></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="id406217"></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="id406246"></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="id424106"></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="id424124"></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="id483804"></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="id428016"></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></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="localization.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14. Locales </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> codecvt</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch16.html b/libstdc++-v3/doc/html/manual/bk01pt07ch16.html
new file mode 100644
index 00000000000..a2bdffffd31
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch16.html
@@ -0,0 +1,37 @@
+<?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 16. Sequences</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="containers.html" title="Part VII. Containers" /><link rel="next" href="bk01pt07ch16s02.html" title="vector" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Sequences</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch16s02.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.containers.sequences"></a>Chapter 16. Sequences</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</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="containers.sequences.list"></a>list</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h3></div></div></div><p>
+ Yes it is, and that's okay. This is a decision that we preserved
+ when we imported SGI's STL implementation. The following is
+ quoted from <a class="ulink" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
+ </p><div class="blockquote"><blockquote class="blockquote"><p>
+ The size() member function, for list and slist, takes time
+ proportional to the number of elements in the list. This was a
+ deliberate tradeoff. The only way to get a constant-time
+ size() for linked lists would be to maintain an extra member
+ variable containing the list's size. This would require taking
+ extra time to update that variable (it would make splice() a
+ linear time operation, for example), and it would also make the
+ list larger. Many list algorithms don't require that extra
+ word (algorithms that do require it might do better with
+ vectors than with lists), and, when it is necessary to maintain
+ an explicit size count, it's something that users can do
+ themselves.
+ </p><p>
+ This choice is permitted by the C++ standard. The standard says
+ that size() “<span class="quote">should</span>†be constant time, and
+ “<span class="quote">should</span>†does not mean the same thing as
+ “<span class="quote">shall</span>â€. This is the officially recommended ISO
+ wording for saying that an implementation is supposed to do
+ something unless there is a good reason not to.
+ </p><p>
+ One implication of linear time size(): you should never write
+ </p><pre class="programlisting">
+ if (L.size() == 0)
+ ...
+ </pre><p>
+ Instead, you should write
+ </p><pre class="programlisting">
+ if (L.empty())
+ ...
+ </pre></blockquote></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch16s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part VII. Containers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> vector</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html b/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html
new file mode 100644
index 00000000000..deb4790d4a9
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html
@@ -0,0 +1,16 @@
+<?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>vector</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="prev" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="next" href="bk01pt07ch17.html" title="Chapter 17. Associative" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">vector</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16.html">Prev</a> </td><th width="60%" align="center">Chapter 16. Sequences</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17.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="containers.sequences.vector"></a>vector</h2></div></div></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h3></div></div></div><p>
+ In <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
+ message to the list</a>, Daniel Kostecky announced work on an
+ alternate form of <code class="code">std::vector</code> that would support
+ hints on the number of elements to be over-allocated. The design
+ was also described, along with possible implementation choices.
+ </p><p>
+ The first two alpha releases were announced <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
+ and <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
+ The releases themselves are available at
+ <a class="ulink" href="http://www.kotelna.sk/dk/sw/caphint/" target="_top">
+ http://www.kotelna.sk/dk/sw/caphint/</a>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch16.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt07ch16.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch17.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 16. Sequences </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 17. Associative</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch17.html b/libstdc++-v3/doc/html/manual/bk01pt07ch17.html
new file mode 100644
index 00000000000..ebe2fd0f557
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch17.html
@@ -0,0 +1,84 @@
+<?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 17. Associative</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch16s02.html" title="vector" /><link rel="next" href="bk01pt07ch17s02.html" title="bitset" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. Associative</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17s02.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.containers.associative"></a>Chapter 17. Associative</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</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="containers.associative.insert_hints"></a>Insertion Hints</h2></div></div></div><p>
+ Section [23.1.2], Table 69, of the C++ standard lists this
+ function for all of the associative containers (map, set, etc):
+ </p><pre class="programlisting">
+ a.insert(p,t);
+ </pre><p>
+ where 'p' is an iterator into the container 'a', and 't' is the
+ item to insert. The standard says that “<span class="quote"><code class="code">t</code> is
+ inserted as close as possible to the position just prior to
+ <code class="code">p</code>.</span>†(Library DR #233 addresses this topic,
+ referring to <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html" target="_top">N1780</a>.
+ Since version 4.2 GCC implements the resolution to DR 233, so
+ that insertions happen as close as possible to the hint. For
+ earlier releases the hint was only used as described below.
+ </p><p>
+ Here we'll describe how the hinting works in the libstdc++
+ implementation, and what you need to do in order to take
+ advantage of it. (Insertions can change from logarithmic
+ complexity to amortized constant time, if the hint is properly
+ used.) Also, since the current implementation is based on the
+ SGI STL one, these points may hold true for other library
+ implementations also, since the HP/SGI code is used in a lot of
+ places.
+ </p><p>
+ In the following text, the phrases <span class="emphasis"><em>greater
+ than</em></span> and <span class="emphasis"><em>less than</em></span> refer to the
+ results of the strict weak ordering imposed on the container by
+ its comparison object, which defaults to (basically)
+ “<span class="quote">&lt;</span>â€. Using those phrases is semantically sloppy,
+ but I didn't want to get bogged down in syntax. I assume that if
+ you are intelligent enough to use your own comparison objects,
+ you are also intelligent enough to assign “<span class="quote">greater</span>â€
+ and “<span class="quote">lesser</span>†their new meanings in the next
+ paragraph. *grin*
+ </p><p>
+ If the <code class="code">hint</code> parameter ('p' above) is equivalent to:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ <code class="code">begin()</code>, then the item being inserted should
+ have a key less than all the other keys in the container.
+ The item will be inserted at the beginning of the container,
+ becoming the new entry at <code class="code">begin()</code>.
+ </p></li><li><p>
+ <code class="code">end()</code>, then the item being inserted should have
+ a key greater than all the other keys in the container. The
+ item will be inserted at the end of the container, becoming
+ the new entry at <code class="code">end()</code>.
+ </p></li><li><p>
+ neither <code class="code">begin()</code> nor <code class="code">end()</code>, then:
+ Let <code class="code">h</code> be the entry in the container pointed to
+ by <code class="code">hint</code>, that is, <code class="code">h = *hint</code>. Then
+ the item being inserted should have a key less than that of
+ <code class="code">h</code>, and greater than that of the item preceding
+ <code class="code">h</code>. The new item will be inserted between
+ <code class="code">h</code> and <code class="code">h</code>'s predecessor.
+ </p></li></ul></div><p>
+ For <code class="code">multimap</code> and <code class="code">multiset</code>, the
+ restrictions are slightly looser: “<span class="quote">greater than</span>â€
+ should be replaced by “<span class="quote">not less than</span>â€and “<span class="quote">less
+ than</span>†should be replaced by “<span class="quote">not greater
+ than.</span>†(Why not replace greater with
+ greater-than-or-equal-to? You probably could in your head, but
+ the mathematicians will tell you that it isn't the same thing.)
+ </p><p>
+ If the conditions are not met, then the hint is not used, and the
+ insertion proceeds as if you had called <code class="code"> a.insert(t)
+ </code> instead. (<span class="emphasis"><em>Note </em></span> that GCC releases
+ prior to 3.0.2 had a bug in the case with <code class="code">hint ==
+ begin()</code> for the <code class="code">map</code> and <code class="code">set</code>
+ classes. You should not use a hint argument in those releases.)
+ </p><p>
+ This behavior goes well with other containers'
+ <code class="code">insert()</code> functions which take an iterator: if used,
+ the new item will be inserted before the iterator passed as an
+ argument, same as the other containers.
+ </p><p>
+ <span class="emphasis"><em>Note </em></span> also that the hint in this
+ implementation is a one-shot. The older insertion-with-hint
+ routines check the immediately surrounding entries to ensure that
+ the new item would in fact belong there. If the hint does not
+ point to the correct place, then no further local searching is
+ done; the search begins from scratch in logarithmic time.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch16s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch17s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">vector </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> bitset</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html b/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html
new file mode 100644
index 00000000000..6b434ce5ec1
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html
@@ -0,0 +1,105 @@
+<?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>bitset</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="prev" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="next" href="bk01pt07ch18.html" title="Chapter 18. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitset</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Associative</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch18.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="containers.associative.bitset"></a>bitset</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="associative.bitset.size_variable"></a>Size Variable</h3></div></div></div><p>
+ No, you cannot write code of the form
+ </p><pre class="programlisting">
+ #include &lt;bitset&gt;
+
+ void foo (size_t n)
+ {
+ std::bitset&lt;n&gt; bits;
+ ....
+ }
+ </pre><p>
+ because <code class="code">n</code> must be known at compile time. Your
+ compiler is correct; it is not a bug. That's the way templates
+ work. (Yes, it <span class="emphasis"><em>is</em></span> a feature.)
+ </p><p>
+ There are a couple of ways to handle this kind of thing. Please
+ consider all of them before passing judgement. They include, in
+ no particular order:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>A very large N in <code class="code">bitset&lt;N&gt;</code>.</p></li><li><p>A container&lt;bool&gt;.</p></li><li><p>Extremely weird solutions.</p></li></ul></div><p>
+ <span class="emphasis"><em>A very large N in
+ <code class="code">bitset&lt;N&gt;</code>.  </em></span> It has been
+ pointed out a few times in newsgroups that N bits only takes up
+ (N/8) bytes on most systems, and division by a factor of eight is
+ pretty impressive when speaking of memory. Half a megabyte given
+ over to a bitset (recall that there is zero space overhead for
+ housekeeping info; it is known at compile time exactly how large
+ the set is) will hold over four million bits. If you're using
+ those bits as status flags (e.g.,
+ “<span class="quote">changed</span>â€/“<span class="quote">unchanged</span>†flags), that's a
+ <span class="emphasis"><em>lot</em></span> of state.
+ </p><p>
+ You can then keep track of the “<span class="quote">maximum bit used</span>â€
+ during some testing runs on representative data, make note of how
+ many of those bits really need to be there, and then reduce N to
+ a smaller number. Leave some extra space, of course. (If you
+ plan to write code like the incorrect example above, where the
+ bitset is a local variable, then you may have to talk your
+ compiler into allowing that much stack space; there may be zero
+ space overhead, but it's all allocated inside the object.)
+ </p><p>
+ <span class="emphasis"><em>A container&lt;bool&gt;.  </em></span> The
+ Committee made provision for the space savings possible with that
+ (N/8) usage previously mentioned, so that you don't have to do
+ wasteful things like <code class="code">Container&lt;char&gt;</code> or
+ <code class="code">Container&lt;short int&gt;</code>. Specifically,
+ <code class="code">vector&lt;bool&gt;</code> is required to be specialized for
+ that space savings.
+ </p><p>
+ The problem is that <code class="code">vector&lt;bool&gt;</code> doesn't
+ behave like a normal vector anymore. There have been recent
+ journal articles which discuss the problems (the ones by Herb
+ Sutter in the May and July/August 1999 issues of C++ Report cover
+ it well). Future revisions of the ISO C++ Standard will change
+ the requirement for <code class="code">vector&lt;bool&gt;</code>
+ specialization. In the meantime, <code class="code">deque&lt;bool&gt;</code>
+ is recommended (although its behavior is sane, you probably will
+ not get the space savings, but the allocation scheme is different
+ than that of vector).
+ </p><p>
+ <span class="emphasis"><em>Extremely weird solutions.  </em></span> If
+ you have access to the compiler and linker at runtime, you can do
+ something insane, like figuring out just how many bits you need,
+ then writing a temporary source code file. That file contains an
+ instantiation of <code class="code">bitset</code> for the required number of
+ bits, inside some wrapper functions with unchanging signatures.
+ Have your program then call the compiler on that file using
+ Position Independent Code, then open the newly-created object
+ file and load those wrapper functions. You'll have an
+ instantiation of <code class="code">bitset&lt;N&gt;</code> for the exact
+ <code class="code">N</code> that you need at the time. Don't forget to delete
+ the temporary files. (Yes, this <span class="emphasis"><em>can</em></span> be, and
+ <span class="emphasis"><em>has been</em></span>, done.)
+ </p><p>
+ This would be the approach of either a visionary genius or a
+ raving lunatic, depending on your programming and management
+ style. Probably the latter.
+ </p><p>
+ Which of the above techniques you use, if any, are up to you and
+ your intended application. Some time/space profiling is
+ indicated if it really matters (don't just guess). And, if you
+ manage to do anything along the lines of the third category, the
+ author would love to hear from you...
+ </p><p>
+ Also note that the implementation of bitset used in libstdc++ has
+ <a class="ulink" href="../ext/sgiexts.html#ch23" target="_top">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
+ constructors. This is something of an accident, but you can read
+ about the problem: follow the library's “<span class="quote">Links</span>†from
+ the homepage, and from the C++ information “<span class="quote">defect
+ reflector</span>†link, select the library issues list. Issue
+ number 116 describes the problem.
+ </p><p>
+ For now you can simply make a temporary string object using the
+ constructor expression:
+ </p><pre class="programlisting">
+ std::bitset&lt;5&gt; b ( std::string(“<span class="quote">10110</span>â€) );
+ </pre><p>
+ instead of
+ </p><pre class="programlisting">
+ std::bitset&lt;5&gt; b ( “<span class="quote">10110</span>†); // invalid
+ </pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch17.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt07ch17.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch18.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 17. Associative </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 18. Interacting with C</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch18.html b/libstdc++-v3/doc/html/manual/bk01pt07ch18.html
new file mode 100644
index 00000000000..e168ed82b58
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch18.html
@@ -0,0 +1,60 @@
+<?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 18. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="iterators.html" title="Part VIII. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="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.containers.c"></a>Chapter 18. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</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="containers.c.vs_array"></a>Containers vs. Arrays</h2></div></div></div><p>
+ You're writing some code and can't decide whether to use builtin
+ arrays or some kind of container. There are compelling reasons
+ to use one of the container classes, but you're afraid that
+ you'll eventually run into difficulties, change everything back
+ to arrays, and then have to change all the code that uses those
+ data types to keep up with the change.
+ </p><p>
+ If your code makes use of the standard algorithms, this isn't as
+ scary as it sounds. The algorithms don't know, nor care, about
+ the kind of “<span class="quote">container</span>†on which they work, since
+ the algorithms are only given endpoints to work with. For the
+ container classes, these are iterators (usually
+ <code class="code">begin()</code> and <code class="code">end()</code>, but not always).
+ For builtin arrays, these are the address of the first element
+ and the <a class="ulink" href="../24_iterators/howto.html#2" target="_top">past-the-end</a> element.
+ </p><p>
+ Some very simple wrapper functions can hide all of that from the
+ rest of the code. For example, a pair of functions called
+ <code class="code">beginof</code> can be written, one that takes an array,
+ another that takes a vector. The first returns a pointer to the
+ first element, and the second returns the vector's
+ <code class="code">begin()</code> iterator.
+ </p><p>
+ The functions should be made template functions, and should also
+ be declared inline. As pointed out in the comments in the code
+ below, this can lead to <code class="code">beginof</code> being optimized out
+ of existence, so you pay absolutely nothing in terms of increased
+ code size or execution time.
+ </p><p>
+ The result is that if all your algorithm calls look like
+ </p><pre class="programlisting">
+ std::transform(beginof(foo), endof(foo), beginof(foo), SomeFunction);
+ </pre><p>
+ then the type of foo can change from an array of ints to a vector
+ of ints to a deque of ints and back again, without ever changing
+ any client code.
+ </p><p>
+ This author has a collection of such functions, called
+ “<span class="quote">*of</span>†because they all extend the builtin
+ “<span class="quote">sizeof</span>â€. It started with some Usenet discussions
+ on a transparent way to find the length of an array. A
+ simplified and much-reduced version for easier reading is <a class="ulink" href="wrappers_h.txt" target="_top">given here</a>.
+ </p><p>
+ Astute readers will notice two things at once: first, that the
+ container class is still a <code class="code">vector&lt;T&gt;</code> instead
+ of a more general <code class="code">Container&lt;T&gt;</code>. This would
+ mean that three functions for <code class="code">deque</code> would have to be
+ added, another three for <code class="code">list</code>, and so on. This is
+ due to problems with getting template resolution correct; I find
+ it easier just to give the extra three lines and avoid confusion.
+ </p><p>
+ Second, the line
+ </p><pre class="programlisting">
+ inline unsigned int lengthof (T (&amp;)[sz]) { return sz; }
+ </pre><p>
+ looks just weird! Hint: unused parameters can be left nameless.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="iterators.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"> Part VIII. Iterators</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html
new file mode 100644
index 00000000000..d95c0869a84
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html
@@ -0,0 +1,30 @@
+<?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 19. Predefined</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="iterators.html" title="Part VIII. Iterators" /><link rel="prev" href="iterators.html" title="Part VIII. Iterators" /><link rel="next" href="bk01pt08ch19s02.html" title="One Past the End" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. Predefined</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><th width="60%" align="center">Part VIII. Iterators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19s02.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.iterators.predefined"></a>Chapter 19. Predefined</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><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></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iterators.predefined.vs_pointers"></a>Iterators vs. Pointers</h2></div></div></div><p><a class="ulink" href="../faq/index.html#5_1" target="_top">FAQ 5.1</a> points out that iterators
+ are not implemented as pointers. They are a generalization of
+ pointers, but they are implemented in libstdc++ as separate classes.
+ </p><p>Keeping that simple fact in mind as you design your code will
+ prevent a whole lot of difficult-to-understand bugs.
+ </p><p>You can think of it the other way 'round, even. Since iterators
+ are a generalization, that means that <span class="emphasis"><em>pointers</em></span> are
+ <span class="emphasis"><em>iterators</em></span>, and that pointers can be used whenever an
+ iterator would be. All those functions in the Algorithms chapter
+ of the Standard will work just as well on plain arrays and their
+ pointers.
+ </p><p>That doesn't mean that when you pass in a pointer, it gets wrapped
+ into some special delegating iterator-to-pointer class with a layer
+ of overhead. (If you think that's the case anywhere, you don't
+ understand templates to begin with...) Oh, no; if you pass
+ in a pointer, then the compiler will instantiate that template
+ using T* as a type, and good old high-speed pointer arithmetic as
+ its operations, so the resulting code will be doing exactly the same
+ things as it would be doing if you had hand-coded it yourself (for
+ the 273rd time).
+ </p><p>How much overhead <span class="emphasis"><em>is</em></span> there when using an iterator class?
+ Very little. Most of the layering classes contain nothing but
+ typedefs, and typedefs are "meta-information" that simply
+ tell the compiler some nicknames; they don't create code. That
+ information gets passed down through inheritance, so while the
+ compiler has to do work looking up all the names, your runtime code
+ does not. (This has been a prime concern from the beginning.)
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="iterators.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt08ch19s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part VIII. Iterators </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> One Past the End</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html
new file mode 100644
index 00000000000..d8462d2a497
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html
@@ -0,0 +1,83 @@
+<?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>One Past the End</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="prev" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="next" href="algorithms.html" title="Part IX. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">One Past the End</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Predefined</th><td width="20%" align="right"> <a accesskey="n" href="algorithms.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="iterators.predefined.end"></a>One Past the End</h2></div></div></div><p>This starts off sounding complicated, but is actually very easy,
+ especially towards the end. Trust me.
+ </p><p>Beginners usually have a little trouble understand the whole
+ 'past-the-end' thing, until they remember their early algebra classes
+ (see, they <span class="emphasis"><em>told</em></span> you that stuff would come in handy!) and
+ the concept of half-open ranges.
+ </p><p>First, some history, and a reminder of some of the funkier rules in
+ C and C++ for builtin arrays. The following rules have always been
+ true for both languages:
+ </p><div class="orderedlist"><ol type="1"><li><p>You can point anywhere in the array, <span class="emphasis"><em>or to the first element
+ past the end of the array</em></span>. A pointer that points to one
+ past the end of the array is guaranteed to be as unique as a
+ pointer to somewhere inside the array, so that you can compare
+ such pointers safely.
+ </p></li><li><p>You can only dereference a pointer that points into an array.
+ If your array pointer points outside the array -- even to just
+ one past the end -- and you dereference it, Bad Things happen.
+ </p></li><li><p>Strictly speaking, simply pointing anywhere else invokes
+ undefined behavior. Most programs won't puke until such a
+ pointer is actually dereferenced, but the standards leave that
+ up to the platform.
+ </p></li></ol></div><p>The reason this past-the-end addressing was allowed is to make it
+ easy to write a loop to go over an entire array, e.g.,
+ while (*d++ = *s++);.
+ </p><p>So, when you think of two pointers delimiting an array, don't think
+ of them as indexing 0 through n-1. Think of them as <span class="emphasis"><em>boundary
+ markers</em></span>:
+ </p><pre class="programlisting">
+
+ beginning end
+ | |
+ | | This is bad. Always having to
+ | | remember to add or subtract one.
+ | | Off-by-one bugs very common here.
+ V V
+ array of N elements
+ |---|---|--...--|---|---|
+ | 0 | 1 | ... |N-2|N-1|
+ |---|---|--...--|---|---|
+
+ ^ ^
+ | |
+ | | This is good. This is safe. This
+ | | is guaranteed to work. Just don't
+ | | dereference 'end'.
+ beginning end
+
+ </pre><p>See? Everything between the boundary markers is part of the array.
+ Simple.
+ </p><p>Now think back to your junior-high school algebra course, when you
+ were learning how to draw graphs. Remember that a graph terminating
+ with a solid dot meant, "Everything up through this point,"
+ and a graph terminating with an open dot meant, "Everything up
+ to, but not including, this point," respectively called closed
+ and open ranges? Remember how closed ranges were written with
+ brackets, <span class="emphasis"><em>[a,b]</em></span>, and open ranges were written with parentheses,
+ <span class="emphasis"><em>(a,b)</em></span>?
+ </p><p>The boundary markers for arrays describe a <span class="emphasis"><em>half-open range</em></span>,
+ starting with (and including) the first element, and ending with (but
+ not including) the last element: <span class="emphasis"><em>[beginning,end)</em></span>. See, I
+ told you it would be simple in the end.
+ </p><p>Iterators, and everything working with iterators, follows this same
+ time-honored tradition. A container's <code class="code">begin()</code> method returns
+ an iterator referring to the first element, and its <code class="code">end()</code>
+ method returns a past-the-end iterator, which is guaranteed to be
+ unique and comparable against any other iterator pointing into the
+ middle of the container.
+ </p><p>Container constructors, container methods, and algorithms, all take
+ pairs of iterators describing a range of values on which to operate.
+ All of these ranges are half-open ranges, so you pass the beginning
+ iterator as the starting parameter, and the one-past-the-end iterator
+ as the finishing parameter.
+ </p><p>This generalizes very well. You can operate on sub-ranges quite
+ easily this way; functions accepting a <span class="emphasis"><em>[first,last)</em></span> range
+ don't know or care whether they are the boundaries of an entire {array,
+ sequence, container, whatever}, or whether they only enclose a few
+ elements from the center. This approach also makes zero-length
+ sequences very simple to recognize: if the two endpoints compare
+ equal, then the {array, sequence, container, whatever} is empty.
+ </p><p>Just don't dereference <code class="code">end()</code>.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt08ch19.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt08ch19.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. Predefined </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part IX. Algorithms</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt09ch20.html b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html
new file mode 100644
index 00000000000..da024cda864
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html
@@ -0,0 +1,13 @@
+<?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 20. Mutating</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="bk01pt09pr02.html" title="" /><link rel="next" href="numerics.html" title="Part X. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. Mutating</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09pr02.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="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.algorithms.mutating"></a>Chapter 20. Mutating</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</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="algorithms.mutating.swap"></a><code class="function">swap</code></h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="algorithms.swap.specializations"></a>Specializations</h3></div></div></div><p>If you call <code class="code"> std::swap(x,y); </code> where x and y are standard
+ containers, then the call will automatically be replaced by a call to
+ <code class="code"> x.swap(y); </code> instead.
+ </p><p>This allows member functions of each container class to take over, and
+ containers' swap functions should have O(1) complexity according to
+ the standard. (And while "should" allows implementations to
+ behave otherwise and remain compliant, this implementation does in
+ fact use constant-time swaps.) This should not be surprising, since
+ for two containers of the same type to swap contents, only some
+ internal pointers to storage need to be exchanged.
+ </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt09pr02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="algorithms.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part X. Numerics</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
new file mode 100644
index 00000000000..d5cedbdfd3f
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
@@ -0,0 +1,35 @@
+<?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></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" 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="id405802"></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:
+</p><div class="orderedlist"><ol type="1"><li><p>
+ Anything that behaves like an iterator can be used in one of
+ these algorithms. Raw pointers make great candidates, thus
+ built-in arrays are fine containers, as well as your own iterators.
+ </p></li><li><p>
+ The algorithms do not (and cannot) affect the container as a
+ whole; only the things between the two iterator endpoints. If
+ you pass a range of iterators only enclosing the middle third of
+ a container, then anything outside that range is inviolate.
+ </p></li></ol></div><p>
+ Even strings can be fed through the algorithms here, although the
+ string class has specialized versions of many of these functions
+ (for example, <code class="code">string::find()</code>). Most of the examples
+ on this page will use simple arrays of integers as a playground
+ for algorithms, just to keep things simple. The use of
+ <span class="emphasis"><em>N</em></span> as a size in the examples is to keep
+ things easy to read but probably won't be valid code. You can
+ use wrappers such as those described in the <a class="ulink" href="../23_containers/howto.html" target="_top">containers chapter</a> to
+ keep real code readable.
+ </p><p>
+ The single thing that trips people up the most is the definition
+ of <span class="emphasis"><em>range</em></span> used with iterators; the famous
+ "past-the-end" rule that everybody loves to hate. The
+ <a class="ulink" href="../24_iterators/howto.html#2" target="_top">iterators
+ chapter</a> of this document has a complete explanation of
+ this simple rule that seems to cause so much confusion. Once you
+ get <span class="emphasis"><em>range</em></span> into your head (it's not that
+ hard, honest!), then the algorithms are a cakewalk.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="algorithms.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part IX. Algorithms </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. Mutating</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch21.html b/libstdc++-v3/doc/html/manual/bk01pt10ch21.html
new file mode 100644
index 00000000000..66c31363069
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch21.html
@@ -0,0 +1,19 @@
+<?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 21. Complex</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="numerics.html" title="Part X. Numerics" /><link rel="next" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Complex</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch22.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.numerics.complex"></a>Chapter 21. Complex</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</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="numerics.complex.processing"></a>complex Processing</h2></div></div></div><p>
+ </p><p>Using <code class="code">complex&lt;&gt;</code> becomes even more comple- er, sorry,
+ <span class="emphasis"><em>complicated</em></span>, with the not-quite-gratuitously-incompatible
+ addition of complex types to the C language. David Tribble has
+ compiled a list of C++98 and C99 conflict points; his description of
+ C's new type versus those of C++ and how to get them playing together
+ nicely is
+<a class="ulink" href="http://david.tribble.com/text/cdiffs.htm#C99-complex" target="_top">here</a>.
+ </p><p><code class="code">complex&lt;&gt;</code> is intended to be instantiated with a
+ floating-point type. As long as you meet that and some other basic
+ requirements, then the resulting instantiation has all of the usual
+ math operators defined, as well as definitions of <code class="code">op&lt;&lt;</code>
+ and <code class="code">op&gt;&gt;</code> that work with iostreams: <code class="code">op&lt;&lt;</code>
+ prints <code class="code">(u,v)</code> and <code class="code">op&gt;&gt;</code> can read <code class="code">u</code>,
+ <code class="code">(u)</code>, and <code class="code">(u,v)</code>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt10ch22.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part X. Numerics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 22. Generalized Operations</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch22.html b/libstdc++-v3/doc/html/manual/bk01pt10ch22.html
new file mode 100644
index 00000000000..72b7697d16f
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch22.html
@@ -0,0 +1,26 @@
+<?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 22. Generalized Operations</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch21.html" title="Chapter 21. Complex" /><link rel="next" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Generalized Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch21.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23.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.numerics.generalized_ops"></a>Chapter 22. Generalized Operations</h2></div></div></div><p>
+ </p><p>There are four generalized functions in the &lt;numeric&gt; header
+ that follow the same conventions as those in &lt;algorithm&gt;. Each
+ of them is overloaded: one signature for common default operations,
+ and a second for fully general operations. Their names are
+ self-explanatory to anyone who works with numerics on a regular basis:
+ </p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">accumulate</code></p></li><li><p><code class="code">inner_product</code></p></li><li><p><code class="code">partial_sum</code></p></li><li><p><code class="code">adjacent_difference</code></p></li></ul></div><p>Here is a simple example of the two forms of <code class="code">accumulate</code>.
+ </p><pre class="programlisting">
+ int ar[50];
+ int someval = somefunction();
+
+ // ...initialize members of ar to something...
+
+ int sum = std::accumulate(ar,ar+50,0);
+ int sum_stuff = std::accumulate(ar,ar+50,someval);
+ int product = std::accumulate(ar,ar+50,1,std::multiplies&lt;int&gt;());
+ </pre><p>The first call adds all the members of the array, using zero as an
+ initial value for <code class="code">sum</code>. The second does the same, but uses
+ <code class="code">someval</code> as the starting value (thus, <code class="code">sum_stuff == sum +
+ someval</code>). The final call uses the second of the two signatures,
+ and multiplies all the members of the array; here we must obviously
+ use 1 as a starting value instead of 0.
+ </p><p>The other three functions have similar dual-signature forms.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch21.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt10ch23.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. Complex </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. Interacting with C</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch23.html b/libstdc++-v3/doc/html/manual/bk01pt10ch23.html
new file mode 100644
index 00000000000..0fe7854a454
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch23.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>Chapter 23. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /><link rel="next" href="bk01pt10ch23s02.html" title="C99" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 23. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch22.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23s02.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.numerics.c"></a>Chapter 23. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</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="numerics.c.array"></a>Numerics vs. Arrays</h2></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well
+ is that it is defined to be free of pointer aliasing, an assumption
+ that C89 is not allowed to make, and neither is C++98. C99 adds a new
+ keyword, <code class="code">restrict</code>, to apply to individual pointers. The
+ C++ solution is contained in the library rather than the language
+ (although many vendors can be expected to add this to their compilers
+ as an extension).
+ </p><p>That library solution is a set of two classes, five template classes,
+ and "a whole bunch" of functions. The classes are required
+ to be free of pointer aliasing, so compilers can optimize the
+ daylights out of them the same way that they have been for FORTRAN.
+ They are collectively called <code class="code">valarray</code>, although strictly
+ speaking this is only one of the five template classes, and they are
+ designed to be familiar to people who have worked with the BLAS
+ libraries before.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch22.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt10ch23s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 22. Generalized Operations </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> C99</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html
new file mode 100644
index 00000000000..5a68fb47293
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html
@@ -0,0 +1,16 @@
+<?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>C99</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="prev" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="next" href="io.html" title="Part XI. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">C99</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23.html">Prev</a> </td><th width="60%" align="center">Chapter 23. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="io.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="numerics.c.c99"></a>C99</h2></div></div></div><p>In addition to the other topics on this page, we'll note here some
+ of the C99 features that appear in libstdc++.
+ </p><p>The C99 features depend on the <code class="code">--enable-c99</code> configure flag.
+ This flag is already on by default, but it can be disabled by the
+ user. Also, the configuration machinery will disable it if the
+ necessary support for C99 (e.g., header files) cannot be found.
+ </p><p>As of GCC 3.0, C99 support includes classification functions
+ such as <code class="code">isnormal</code>, <code class="code">isgreater</code>,
+ <code class="code">isnan</code>, etc.
+ The functions used for 'long long' support such as <code class="code">strtoll</code>
+ are supported, as is the <code class="code">lldiv_t</code> typedef. Also supported
+ are the wide character functions using 'long long', like
+ <code class="code">wcstoll</code>.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch23.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt10ch23.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part XI. Input and Output</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch24.html b/libstdc++-v3/doc/html/manual/bk01pt11ch24.html
new file mode 100644
index 00000000000..2518ce435a5
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch24.html
@@ -0,0 +1,113 @@
+<?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 24. Iostream Objects</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="io.html" title="Part XI. Input and Output" /><link rel="next" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Iostream Objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25.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.objects"></a>Chapter 24. Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to
+ only include the headers you really need. Many people simply include
+ &lt;iostream&gt; when they don't need to -- and that can <span class="emphasis"><em>penalize
+ your runtime as well.</em></span> Here are some tips on which header to use
+ for which situations, starting with the simplest.
+ </p><p><span class="emphasis"><em>&lt;iosfwd&gt;</em></span> should be included whenever you simply
+ need the <span class="emphasis"><em>name</em></span> of an I/O-related class, such as
+ "ofstream" or "basic_streambuf". Like the name
+ implies, these are forward declarations. (A word to all you fellow
+ old school programmers: trying to forward declare classes like
+ "class istream;" won't work. Look in the iosfwd header if
+ you'd like to know why.) For example,
+ </p><pre class="programlisting">
+ #include &lt;iosfwd&gt;
+
+ class MyClass
+ {
+ ....
+ std::ifstream&amp; input_file;
+ };
+
+ extern std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, MyClass&amp;);
+ </pre><p><span class="emphasis"><em>&lt;ios&gt;</em></span> declares the base classes for the entire
+ I/O stream hierarchy, std::ios_base and std::basic_ios&lt;charT&gt;, the
+ counting types std::streamoff and std::streamsize, the file
+ positioning type std::fpos, and the various manipulators like
+ std::hex, std::fixed, std::noshowbase, and so forth.
+ </p><p>The ios_base class is what holds the format flags, the state flags,
+ and the functions which change them (setf(), width(), precision(),
+ etc). You can also store extra data and register callback functions
+ through ios_base, but that has been historically underused. Anything
+ which doesn't depend on the type of characters stored is consolidated
+ here.
+ </p><p>The template class basic_ios is the highest template class in the
+ hierarchy; it is the first one depending on the character type, and
+ holds all general state associated with that type: the pointer to the
+ polymorphic stream buffer, the facet information, etc.
+ </p><p><span class="emphasis"><em>&lt;streambuf&gt;</em></span> declares the template class
+ basic_streambuf, and two standard instantiations, streambuf and
+ wstreambuf. If you need to work with the vastly useful and capable
+ stream buffer classes, e.g., to create a new form of storage
+ transport, this header is the one to include.
+ </p><p><span class="emphasis"><em>&lt;istream&gt;</em></span>/<span class="emphasis"><em>&lt;ostream&gt;</em></span> are
+ the headers to include when you are using the &gt;&gt;/&lt;&lt;
+ interface, or any of the other abstract stream formatting functions.
+ For example,
+ </p><pre class="programlisting">
+ #include &lt;istream&gt;
+
+ std::ostream&amp; operator&lt;&lt; (std::ostream&amp; os, MyClass&amp; c)
+ {
+ return os &lt;&lt; c.data1() &lt;&lt; c.data2();
+ }
+ </pre><p>The std::istream and std::ostream classes are the abstract parents of
+ the various concrete implementations. If you are only using the
+ interfaces, then you only need to use the appropriate interface header.
+ </p><p><span class="emphasis"><em>&lt;iomanip&gt;</em></span> provides "extractors and inserters
+ that alter information maintained by class ios_base and its derived
+ classes," such as std::setprecision and std::setw. If you need
+ to write expressions like <code class="code">os &lt;&lt; setw(3);</code> or
+ <code class="code">is &gt;&gt; setbase(8);</code>, you must include &lt;iomanip&gt;.
+ </p><p><span class="emphasis"><em>&lt;sstream&gt;</em></span>/<span class="emphasis"><em>&lt;fstream&gt;</em></span>
+ declare the six stringstream and fstream classes. As they are the
+ standard concrete descendants of istream and ostream, you will already
+ know about them.
+ </p><p>Finally, <span class="emphasis"><em>&lt;iostream&gt;</em></span> provides the eight standard
+ global objects (cin, cout, etc). To do this correctly, this header
+ also provides the contents of the &lt;istream&gt; and &lt;ostream&gt;
+ headers, but nothing else. The contents of this header look like
+ </p><pre class="programlisting">
+ #include &lt;ostream&gt;
+ #include &lt;istream&gt;
+
+ namespace std
+ {
+ extern istream cin;
+ extern ostream cout;
+ ....
+
+ // this is explained below
+ <span class="emphasis"><em>static ios_base::Init __foo;</em></span> // not its real name
+ }
+ </pre><p>Now, the runtime penalty mentioned previously: the global objects
+ must be initialized before any of your own code uses them; this is
+ guaranteed by the standard. Like any other global object, they must
+ be initialized once and only once. This is typically done with a
+ construct like the one above, and the nested class ios_base::Init is
+ specified in the standard for just this reason.
+ </p><p>How does it work? Because the header is included before any of your
+ code, the <span class="emphasis"><em>__foo</em></span> object is constructed before any of
+ your objects. (Global objects are built in the order in which they
+ are declared, and destroyed in reverse order.) The first time the
+ constructor runs, the eight stream objects are set up.
+ </p><p>The <code class="code">static</code> keyword means that each object file compiled
+ from a source file containing &lt;iostream&gt; will have its own
+ private copy of <span class="emphasis"><em>__foo</em></span>. There is no specified order
+ of construction across object files (it's one of those pesky NP
+ problems that make life so interesting), so one copy in each object
+ file means that the stream objects are guaranteed to be set up before
+ any of your code which uses them could run, thereby meeting the
+ requirements of the standard.
+ </p><p>The penalty, of course, is that after the first copy of
+ <span class="emphasis"><em>__foo</em></span> is constructed, all the others are just wasted
+ processor time. The time spent is merely for an increment-and-test
+ inside a function call, but over several dozen or hundreds of object
+ files, that time can add up. (It's not in a tight loop, either.)
+ </p><p>The lesson? Only include &lt;iostream&gt; when you need to use one of
+ the standard objects in that source file; you'll pay less startup
+ time. Only include the header files you need to in general; your
+ compile times will go down when there's less parsing work to do.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch25.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part XI. 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 25. Stream Buffers</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch25.html b/libstdc++-v3/doc/html/manual/bk01pt11ch25.html
new file mode 100644
index 00000000000..9920f97b7f6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch25.html
@@ -0,0 +1,57 @@
+<?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 25. Stream Buffers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /><link rel="next" href="bk01pt11ch25s02.html" title="Buffering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Stream Buffers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch24.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25s02.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.streambufs"></a>Chapter 25. Stream Buffers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</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="io.streambuf.derived"></a>Derived streambuf Classes</h2></div></div></div><p>
+ </p><p>Creating your own stream buffers for I/O can be remarkably easy.
+ If you are interested in doing so, we highly recommend two very
+ excellent books:
+ <a class="ulink" href="http://www.langer.camelot.de/iostreams.html" target="_top">Standard C++
+ IOStreams and Locales</a> by Langer and Kreft, ISBN 0-201-18395-1, and
+ <a class="ulink" href="http://www.josuttis.com/libbook/" target="_top">The C++ Standard Library</a>
+ by Nicolai Josuttis, ISBN 0-201-37926-0. Both are published by
+ Addison-Wesley, who isn't paying us a cent for saying that, honest.
+ </p><p>Here is a simple example, io/outbuf1, from the Josuttis text. It
+ transforms everything sent through it to uppercase. This version
+ assumes many things about the nature of the character type being
+ used (for more information, read the books or the newsgroups):
+ </p><pre class="programlisting">
+ #include &lt;iostream&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;locale&gt;
+ #include &lt;cstdio&gt;
+
+ class outbuf : public std::streambuf
+ {
+ protected:
+ /* central output function
+ * - print characters in uppercase mode
+ */
+ virtual int_type overflow (int_type c) {
+ if (c != EOF) {
+ // convert lowercase to uppercase
+ c = std::toupper(static_cast&lt;char&gt;(c),getloc());
+
+ // and write the character to the standard output
+ if (putchar(c) == EOF) {
+ return EOF;
+ }
+ }
+ return c;
+ }
+ };
+
+ int main()
+ {
+ // create special output buffer
+ outbuf ob;
+ // initialize output stream with that output buffer
+ std::ostream out(&amp;ob);
+
+ out &lt;&lt; "31 hexadecimal: "
+ &lt;&lt; std::hex &lt;&lt; 31 &lt;&lt; std::endl;
+ return 0;
+ }
+ </pre><p>Try it yourself! More examples can be found in 3.1.x code, in
+ <code class="code">include/ext/*_filebuf.h</code>, and on
+ <a class="ulink" href="http://www.informatik.uni-konstanz.de/~kuehl/c++/iostream/" target="_top">Dietmar
+ Kühl's IOStreams page</a>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch24.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch25s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 24. Iostream Objects </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Buffering</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html
new file mode 100644
index 00000000000..3d3a8297c45
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html
@@ -0,0 +1,77 @@
+<?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>Buffering</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="prev" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="next" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Buffering</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25.html">Prev</a> </td><th width="60%" align="center">Chapter 25. Stream Buffers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch26.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="io.streambuf.buffering"></a>Buffering</h2></div></div></div><p>First, are you sure that you understand buffering? Particularly
+ the fact that C++ may not, in fact, have anything to do with it?
+ </p><p>The rules for buffering can be a little odd, but they aren't any
+ different from those of C. (Maybe that's why they can be a bit
+ odd.) Many people think that writing a newline to an output
+ stream automatically flushes the output buffer. This is true only
+ when the output stream is, in fact, a terminal and not a file
+ or some other device -- and <span class="emphasis"><em>that</em></span> may not even be true
+ since C++ says nothing about files nor terminals. All of that is
+ system-dependent. (The "newline-buffer-flushing only occurring
+ on terminals" thing is mostly true on Unix systems, though.)
+ </p><p>Some people also believe that sending <code class="code">endl</code> down an
+ output stream only writes a newline. This is incorrect; after a
+ newline is written, the buffer is also flushed. Perhaps this
+ is the effect you want when writing to a screen -- get the text
+ out as soon as possible, etc -- but the buffering is largely
+ wasted when doing this to a file:
+ </p><pre class="programlisting">
+ output &lt;&lt; "a line of text" &lt;&lt; endl;
+ output &lt;&lt; some_data_variable &lt;&lt; endl;
+ output &lt;&lt; "another line of text" &lt;&lt; endl; </pre><p>The proper thing to do in this case to just write the data out
+ and let the libraries and the system worry about the buffering.
+ If you need a newline, just write a newline:
+ </p><pre class="programlisting">
+ output &lt;&lt; "a line of text\n"
+ &lt;&lt; some_data_variable &lt;&lt; '\n'
+ &lt;&lt; "another line of text\n"; </pre><p>I have also joined the output statements into a single statement.
+ You could make the code prettier by moving the single newline to
+ the start of the quoted text on the last line, for example.
+ </p><p>If you do need to flush the buffer above, you can send an
+ <code class="code">endl</code> if you also need a newline, or just flush the buffer
+ yourself:
+ </p><pre class="programlisting">
+ output &lt;&lt; ...... &lt;&lt; flush; // can use std::flush manipulator
+ output.flush(); // or call a member fn </pre><p>On the other hand, there are times when writing to a file should
+ be like writing to standard error; no buffering should be done
+ because the data needs to appear quickly (a prime example is a
+ log file for security-related information). The way to do this is
+ just to turn off the buffering <span class="emphasis"><em>before any I/O operations at
+ all</em></span> have been done (note that opening counts as an I/O operation):
+ </p><pre class="programlisting">
+ std::ofstream os;
+ std::ifstream is;
+ int i;
+
+ os.rdbuf()-&gt;pubsetbuf(0,0);
+ is.rdbuf()-&gt;pubsetbuf(0,0);
+
+ os.open("/foo/bar/baz");
+ is.open("/qux/quux/quuux");
+ ...
+ os &lt;&lt; "this data is written immediately\n";
+ is &gt;&gt; i; // and this will probably cause a disk read </pre><p>Since all aspects of buffering are handled by a streambuf-derived
+ member, it is necessary to get at that member with <code class="code">rdbuf()</code>.
+ Then the public version of <code class="code">setbuf</code> can be called. The
+ arguments are the same as those for the Standard C I/O Library
+ function (a buffer area followed by its size).
+ </p><p>A great deal of this is implementation-dependent. For example,
+ <code class="code">streambuf</code> does not specify any actions for its own
+ <code class="code">setbuf()</code>-ish functions; the classes derived from
+ <code class="code">streambuf</code> each define behavior that "makes
+ sense" for that class: an argument of (0,0) turns off buffering
+ for <code class="code">filebuf</code> but does nothing at all for its siblings
+ <code class="code">stringbuf</code> and <code class="code">strstreambuf</code>, and specifying
+ anything other than (0,0) has varying effects.
+ User-defined classes derived from <code class="code">streambuf</code> can
+ do whatever they want. (For <code class="code">filebuf</code> and arguments for
+ <code class="code">(p,s)</code> other than zeros, libstdc++ does what you'd expect:
+ the first <code class="code">s</code> bytes of <code class="code">p</code> are used as a buffer,
+ which you must allocate and deallocate.)
+ </p><p>A last reminder: there are usually more buffers involved than
+ just those at the language/library level. Kernel buffers, disk
+ buffers, and the like will also have an effect. Inspecting and
+ changing those are system-dependent.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch25.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt11ch25.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch26.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 25. Stream Buffers </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 26. Memory Based Streams</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch26.html b/libstdc++-v3/doc/html/manual/bk01pt11ch26.html
new file mode 100644
index 00000000000..40727d60530
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch26.html
@@ -0,0 +1,34 @@
+<?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 26. Memory Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch25s02.html" title="Buffering" /><link rel="next" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 26. Memory Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25s02.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27.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.memstreams"></a>Chapter 26. Memory Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</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.memstreams.compat"></a>Compatibility With strstream</h2></div></div></div><p>
+ </p><p>Stringstreams (defined in the header <code class="code">&lt;sstream&gt;</code>)
+ are in this author's opinion one of the coolest things since
+ sliced time. An example of their use is in the Received Wisdom
+ section for Chapter 21 (Strings),
+ <a class="ulink" href="../21_strings/howto.html#1.1internal" target="_top"> describing how to
+ format strings</a>.
+ </p><p>The quick definition is: they are siblings of ifstream and ofstream,
+ and they do for <code class="code">std::string</code> what their siblings do for
+ files. All that work you put into writing <code class="code">&lt;&lt;</code> and
+ <code class="code">&gt;&gt;</code> functions for your classes now pays off
+ <span class="emphasis"><em>again!</em></span> Need to format a string before passing the string
+ to a function? Send your stuff via <code class="code">&lt;&lt;</code> to an
+ ostringstream. You've read a string as input and need to parse it?
+ Initialize an istringstream with that string, and then pull pieces
+ out of it with <code class="code">&gt;&gt;</code>. Have a stringstream and need to
+ get a copy of the string inside? Just call the <code class="code">str()</code>
+ member function.
+ </p><p>This only works if you've written your
+ <code class="code">&lt;&lt;</code>/<code class="code">&gt;&gt;</code> functions correctly, though,
+ and correctly means that they take istreams and ostreams as
+ parameters, not i<span class="emphasis"><em>f</em></span>streams and o<span class="emphasis"><em>f</em></span>streams. If they
+ take the latter, then your I/O operators will work fine with
+ file streams, but with nothing else -- including stringstreams.
+ </p><p>If you are a user of the strstream classes, you need to update
+ your code. You don't have to explicitly append <code class="code">ends</code> to
+ terminate the C-style character array, you don't have to mess with
+ "freezing" functions, and you don't have to manage the
+ memory yourself. The strstreams have been officially deprecated,
+ which means that 1) future revisions of the C++ Standard won't
+ support them, and 2) if you use them, people will laugh at you.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch25s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch27.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Buffering </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 27. File Based Streams</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27.html
new file mode 100644
index 00000000000..e35e682e769
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27.html
@@ -0,0 +1,49 @@
+<?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 27. File Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /><link rel="next" href="bk01pt11ch27s02.html" title="Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 27. File Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch26.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s02.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.filestreams"></a>Chapter 27. File Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch27.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><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</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.filestreams.copying_a_file"></a>Copying a File</h2></div></div></div><p>
+ </p><p>So you want to copy a file quickly and easily, and most important,
+ completely portably. And since this is C++, you have an open
+ ifstream (call it IN) and an open ofstream (call it OUT):
+ </p><pre class="programlisting">
+ #include &lt;fstream&gt;
+
+ std::ifstream IN ("input_file");
+ std::ofstream OUT ("output_file"); </pre><p>Here's the easiest way to get it completely wrong:
+ </p><pre class="programlisting">
+ OUT &lt;&lt; IN;</pre><p>For those of you who don't already know why this doesn't work
+ (probably from having done it before), I invite you to quickly
+ create a simple text file called "input_file" containing
+ the sentence
+ </p><pre class="programlisting">
+ The quick brown fox jumped over the lazy dog.</pre><p>surrounded by blank lines. Code it up and try it. The contents
+ of "output_file" may surprise you.
+ </p><p>Seriously, go do it. Get surprised, then come back. It's worth it.
+ </p><p>The thing to remember is that the <code class="code">basic_[io]stream</code> classes
+ handle formatting, nothing else. In particular, they break up on
+ whitespace. The actual reading, writing, and storing of data is
+ handled by the <code class="code">basic_streambuf</code> family. Fortunately, the
+ <code class="code">operator&lt;&lt;</code> is overloaded to take an ostream and
+ a pointer-to-streambuf, in order to help with just this kind of
+ "dump the data verbatim" situation.
+ </p><p>Why a <span class="emphasis"><em>pointer</em></span> to streambuf and not just a streambuf? Well,
+ the [io]streams hold pointers (or references, depending on the
+ implementation) to their buffers, not the actual
+ buffers. This allows polymorphic behavior on the part of the buffers
+ as well as the streams themselves. The pointer is easily retrieved
+ using the <code class="code">rdbuf()</code> member function. Therefore, the easiest
+ way to copy the file is:
+ </p><pre class="programlisting">
+ OUT &lt;&lt; IN.rdbuf();</pre><p>So what <span class="emphasis"><em>was</em></span> happening with OUT&lt;&lt;IN? Undefined
+ behavior, since that particular &lt;&lt; isn't defined by the Standard.
+ I have seen instances where it is implemented, but the character
+ extraction process removes all the whitespace, leaving you with no
+ blank lines and only "Thequickbrownfox...". With
+ libraries that do not define that operator, IN (or one of IN's
+ member pointers) sometimes gets converted to a void*, and the output
+ file then contains a perfect text representation of a hexadecimal
+ address (quite a big surprise). Others don't compile at all.
+ </p><p>Also note that none of this is specific to o<span class="emphasis"><em>*f*</em></span>streams.
+ The operators shown above are all defined in the parent
+ basic_ostream class and are therefore available with all possible
+ descendants.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch26.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch27s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 26. Memory Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Binary Input and Output</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html
new file mode 100644
index 00000000000..b313bcc5f19
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html
@@ -0,0 +1,95 @@
+<?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>Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="next" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s03.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.binary"></a>Binary Input and Output</h2></div></div></div><p>
+ </p><p>The first and most important thing to remember about binary I/O is
+ that opening a file with <code class="code">ios::binary</code> is not, repeat
+ <span class="emphasis"><em>not</em></span>, the only thing you have to do. It is not a silver
+ bullet, and will not allow you to use the <code class="code">&lt;&lt;/&gt;&gt;</code>
+ operators of the normal fstreams to do binary I/O.
+ </p><p>Sorry. Them's the breaks.
+ </p><p>This isn't going to try and be a complete tutorial on reading and
+ writing binary files (because "binary"
+ <a class="ulink" href="#7" target="_top">covers a lot of ground)</a>, but we will try and clear
+ up a couple of misconceptions and common errors.
+ </p><p>First, <code class="code">ios::binary</code> has exactly one defined effect, no more
+ and no less. Normal text mode has to be concerned with the newline
+ characters, and the runtime system will translate between (for
+ example) '\n' and the appropriate end-of-line sequence (LF on Unix,
+ CRLF on DOS, CR on Macintosh, etc). (There are other things that
+ normal mode does, but that's the most obvious.) Opening a file in
+ binary mode disables this conversion, so reading a CRLF sequence
+ under Windows won't accidentally get mapped to a '\n' character, etc.
+ Binary mode is not supposed to suddenly give you a bitstream, and
+ if it is doing so in your program then you've discovered a bug in
+ your vendor's compiler (or some other part of the C++ implementation,
+ possibly the runtime system).
+ </p><p>Second, using <code class="code">&lt;&lt;</code> to write and <code class="code">&gt;&gt;</code> to
+ read isn't going to work with the standard file stream classes, even
+ if you use <code class="code">skipws</code> during reading. Why not? Because
+ ifstream and ofstream exist for the purpose of <span class="emphasis"><em>formatting</em></span>,
+ not reading and writing. Their job is to interpret the data into
+ text characters, and that's exactly what you don't want to happen
+ during binary I/O.
+ </p><p>Third, using the <code class="code">get()</code> and <code class="code">put()/write()</code> member
+ functions still aren't guaranteed to help you. These are
+ "unformatted" I/O functions, but still character-based.
+ (This may or may not be what you want, see below.)
+ </p><p>Notice how all the problems here are due to the inappropriate use
+ of <span class="emphasis"><em>formatting</em></span> functions and classes to perform something
+ which <span class="emphasis"><em>requires</em></span> that formatting not be done? There are a
+ seemingly infinite number of solutions, and a few are listed here:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>“<span class="quote">Derive your own fstream-type classes and write your own
+ &lt;&lt;/&gt;&gt; operators to do binary I/O on whatever data
+ types you're using.</span>â€
+ </p><p>
+ This is a Bad Thing, because while
+ the compiler would probably be just fine with it, other humans
+ are going to be confused. The overloaded bitshift operators
+ have a well-defined meaning (formatting), and this breaks it.
+ </p></li><li><p>
+ “<span class="quote">Build the file structure in memory, then
+ <code class="code">mmap()</code> the file and copy the
+ structure.
+ </span>â€
+ </p><p>
+ Well, this is easy to make work, and easy to break, and is
+ pretty equivalent to using <code class="code">::read()</code> and
+ <code class="code">::write()</code> directly, and makes no use of the
+ iostream library at all...
+ </p></li><li><p>
+ “<span class="quote">Use streambufs, that's what they're there for.</span>â€
+ </p><p>
+ While not trivial for the beginner, this is the best of all
+ solutions. The streambuf/filebuf layer is the layer that is
+ responsible for actual I/O. If you want to use the C++
+ library for binary I/O, this is where you start.
+ </p></li></ul></div><p>How to go about using streambufs is a bit beyond the scope of this
+ document (at least for now), but while streambufs go a long way,
+ they still leave a couple of things up to you, the programmer.
+ As an example, byte ordering is completely between you and the
+ operating system, and you have to handle it yourself.
+ </p><p>Deriving a streambuf or filebuf
+ class from the standard ones, one that is specific to your data
+ types (or an abstraction thereof) is probably a good idea, and
+ lots of examples exist in journals and on Usenet. Using the
+ standard filebufs directly (either by declaring your own or by
+ using the pointer returned from an fstream's <code class="code">rdbuf()</code>)
+ is certainly feasible as well.
+ </p><p>One area that causes problems is trying to do bit-by-bit operations
+ with filebufs. C++ is no different from C in this respect: I/O
+ must be done at the byte level. If you're trying to read or write
+ a few bits at a time, you're going about it the wrong way. You
+ must read/write an integral number of bytes and then process the
+ bytes. (For example, the streambuf functions take and return
+ variables of type <code class="code">int_type</code>.)
+ </p><p>Another area of problems is opening text files in binary mode.
+ Generally, binary mode is intended for binary files, and opening
+ text files in binary mode means that you now have to deal with all of
+ those end-of-line and end-of-file problems that we mentioned before.
+ An instructive thread from comp.lang.c++.moderated delved off into
+ this topic starting more or less at
+ <a class="ulink" href="http://groups.google.com/groups?oi=djq&amp;selm=an_436187505" target="_top">this</a>
+ article and continuing to the end of the thread. (You'll have to
+ sort through some flames every couple of paragraphs, but the points
+ made are good ones.)
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch27.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt11ch27.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch27s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 27. File Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> More Binary Input and Output</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
new file mode 100644
index 00000000000..70369eab80b
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
@@ -0,0 +1,22 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27s02.html" title="Binary Input and Output" /><link rel="next" href="bk01pt11ch28.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="bk01pt11ch28.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="bk01pt11ch27.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch28.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/bk01pt11ch28.html b/libstdc++-v3/doc/html/manual/bk01pt11ch28.html
new file mode 100644
index 00000000000..1e7dd0d3eeb
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch28.html
@@ -0,0 +1,8 @@
+<?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 28. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /><link rel="next" href="bk01pt11ch28s02.html" title="Performance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 28. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s03.html">Prev</a> </td><th width="60%" align="center">Part XI. 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="bk01pt11ch28.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="bk01pt12ch38.html" title="Chapter 38. 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>.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch27s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch28s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">More 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"> Performance</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html
new file mode 100644
index 00000000000..2cce3db1a73
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html
@@ -0,0 +1,46 @@
+<?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>Performance</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="prev" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="next" href="extensions.html" title="Part XII. Extensions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Performance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28.html">Prev</a> </td><th width="60%" align="center">Chapter 28. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="extensions.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.c.sync"></a>Performance</h2></div></div></div><p>
+ Pathetic Performance? Ditch C.
+ </p><p>It sounds like a flame on C, but it isn't. Really. Calm down.
+ I'm just saying it to get your attention.
+ </p><p>Because the C++ library includes the C library, both C-style and
+ C++-style I/O have to work at the same time. For example:
+ </p><pre class="programlisting">
+ #include &lt;iostream&gt;
+ #include &lt;cstdio&gt;
+
+ std::cout &lt;&lt; "Hel";
+ std::printf ("lo, worl");
+ std::cout &lt;&lt; "d!\n";
+ </pre><p>This must do what you think it does.
+ </p><p>Alert members of the audience will immediately notice that buffering
+ is going to make a hash of the output unless special steps are taken.
+ </p><p>The special steps taken by libstdc++, at least for version 3.0,
+ involve doing very little buffering for the standard streams, leaving
+ most of the buffering to the underlying C library. (This kind of
+ thing is tricky to get right.)
+ The upside is that correctness is ensured. The downside is that
+ writing through <code class="code">cout</code> can quite easily lead to awful
+ performance when the C++ I/O library is layered on top of the C I/O
+ library (as it is for 3.0 by default). Some patches have been applied
+ which improve the situation for 3.1.
+ </p><p>However, the C and C++ standard streams only need to be kept in sync
+ when both libraries' facilities are in use. If your program only uses
+ C++ I/O, then there's no need to sync with the C streams. The right
+ thing to do in this case is to call
+ </p><pre class="programlisting">
+ #include <span class="emphasis"><em>any of the I/O headers such as ios, iostream, etc</em></span>
+
+ std::ios::sync_with_stdio(false);
+ </pre><p>You must do this before performing any I/O via the C++ stream objects.
+ Once you call this, the C++ streams will operate independently of the
+ (unused) C streams. For GCC 3.x, this means that <code class="code">cout</code> and
+ company will become fully buffered on their own.
+ </p><p>Note, by the way, that the synchronization requirement only applies to
+ the standard streams (<code class="code">cin</code>, <code class="code">cout</code>,
+ <code class="code">cerr</code>,
+ <code class="code">clog</code>, and their wide-character counterparts). File stream
+ objects that you declare yourself have no such requirement and are fully
+ buffered.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch28.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt11ch28.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 28. Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part XII. Extensions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch29.html b/libstdc++-v3/doc/html/manual/bk01pt12ch29.html
new file mode 100644
index 00000000000..03dc8ee9e50
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch29.html
@@ -0,0 +1,37 @@
+<?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 29. Compile Time Checks</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12pr03.html" title="" /><link rel="next" href="debug_mode.html" title="Chapter 30. Debug Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Compile Time Checks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12pr03.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="debug_mode.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.compile_checks"></a>Chapter 29. Compile Time Checks</h2></div></div></div><p>
+ Also known as concept checking.
+ </p><p>In 1999, SGI added <span class="emphasis"><em>concept checkers</em></span> to their implementation
+ of the STL: code which checked the template parameters of
+ instantiated pieces of the STL, in order to insure that the parameters
+ being used met the requirements of the standard. For example,
+ the Standard requires that types passed as template parameters to
+ <code class="code">vector</code> be “<span class="quote">Assignable</span>†(which means what you think
+ it means). The checking was done during compilation, and none of
+ the code was executed at runtime.
+ </p><p>Unfortunately, the size of the compiler files grew significantly
+ as a result. The checking code itself was cumbersome. And bugs
+ were found in it on more than one occasion.
+ </p><p>The primary author of the checking code, Jeremy Siek, had already
+ started work on a replacement implementation. The new code has been
+ formally reviewed and accepted into
+ <a class="ulink" href="http://www.boost.org/libs/concept_check/concept_check.htm" target="_top">the
+ Boost libraries</a>, and we are pleased to incorporate it into the
+ GNU C++ library.
+ </p><p>The new version imposes a much smaller space overhead on the generated
+ object file. The checks are also cleaner and easier to read and
+ understand.
+ </p><p>They are off by default for all versions of GCC from 3.0 to 3.4 (the
+ latest release at the time of writing).
+ They can be enabled at configure time with
+ <a class="ulink" href="../configopts.html" target="_top"><code class="literal">--enable-concept-checks</code></a>.
+ You can enable them on a per-translation-unit basis with
+ <code class="code">#define _GLIBCXX_CONCEPT_CHECKS</code> for GCC 3.4 and higher
+ (or with <code class="code">#define _GLIBCPP_CONCEPT_CHECKS</code> for versions
+ 3.1, 3.2 and 3.3).
+ </p><p>Please note that the upcoming C++ standard has first-class
+ support for template parameter constraints based on concepts in the core
+ language. This will obviate the need for the library-simulated concept
+ checking described above.
+ </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12pr03.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="debug_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 30. Debug Mode</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html
new file mode 100644
index 00000000000..c111bffff86
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html
@@ -0,0 +1,55 @@
+<?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>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="next" href="bk01pt12ch30s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s03.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.debug_mode.semantics"></a>Semantics</h2></div></div></div><p>
+ </p><p>A program that uses the C++ standard library correctly
+ will maintain the same semantics under debug mode as it had with
+ the normal (release) library. All functional and exception-handling
+ guarantees made by the normal library also hold for the debug mode
+ library, with one exception: performance guarantees made by the
+ normal library may not hold in the debug mode library. For
+ instance, erasing an element in a <code class="code">std::list</code> is a
+ constant-time operation in normal library, but in debug mode it is
+ linear in the number of iterators that reference that particular
+ list. So while your (correct) program won't change its results, it
+ is likely to execute more slowly.</p><p>libstdc++ includes many extensions to the C++ standard library. In
+ some cases the extensions are obvious, such as the hashed
+ associative containers, whereas other extensions give predictable
+ results to behavior that would otherwise be undefined, such as
+ throwing an exception when a <code class="code">std::basic_string</code> is
+ constructed from a NULL character pointer. This latter category also
+ includes implementation-defined and unspecified semantics, such as
+ the growth rate of a vector. Use of these extensions is not
+ considered incorrect, so code that relies on them will not be
+ rejected by debug mode. However, use of these extensions may affect
+ the portability of code to other implementations of the C++ standard
+ library, and is therefore somewhat hazardous. For this reason, the
+ libstdc++ debug mode offers a "pedantic" mode (similar to
+ GCC's <code class="code">-pedantic</code> compiler flag) that attempts to emulate
+ the semantics guaranteed by the C++ standard. For
+ instance, constructing a <code class="code">std::basic_string</code> with a NULL
+ character pointer would result in an exception under normal mode or
+ non-pedantic debug mode (this is a libstdc++ extension), whereas
+ under pedantic debug mode libstdc++ would signal an error. To enable
+ the pedantic debug mode, compile your program with
+ both <code class="code">-D_GLIBCXX_DEBUG</code>
+ and <code class="code">-D_GLIBCXX_DEBUG_PEDANTIC</code> .
+ (N.B. In GCC 3.4.x and 4.0.0, due to a bug,
+ <code class="code">-D_GLIBXX_DEBUG_PEDANTIC</code> was also needed. The problem has
+ been fixed in GCC 4.0.1 and later versions.) </p><p>The following library components provide extra debugging
+ capabilities in debug mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">std::basic_string</code> (no safe iterators and see note below)</p></li><li><p><code class="code">std::bitset</code></p></li><li><p><code class="code">std::deque</code></p></li><li><p><code class="code">std::list</code></p></li><li><p><code class="code">std::map</code></p></li><li><p><code class="code">std::multimap</code></p></li><li><p><code class="code">std::multiset</code></p></li><li><p><code class="code">std::set</code></p></li><li><p><code class="code">std::vector</code></p></li><li><p><code class="code">std::unordered_map</code></p></li><li><p><code class="code">std::unordered_multimap</code></p></li><li><p><code class="code">std::unordered_set</code></p></li><li><p><code class="code">std::unordered_multiset</code></p></li></ul></div><p>N.B. although there are precondition checks for some string operations,
+e.g. <code class="code">operator[]</code>,
+they will not always be run when using the <code class="code">char</code> and
+<code class="code">wchar_t</code> specialisations (<code class="code">std::string</code> and
+<code class="code">std::wstring</code>). This is because libstdc++ uses GCC's
+<code class="code">extern template</code> extension to provide explicit instantiations
+of <code class="code">std::string</code> and <code class="code">std::wstring</code>, and those
+explicit instantiations don't include the debug-mode checks. If the
+containing functions are inlined then the checks will run, so compiling
+with <code class="code">-O1</code> might be enough to enable them. Alternatively
+<code class="code">-D_GLIBCXX_EXTERN_TEMPLATE=0</code> will suppress the declarations
+of the explicit instantiations and cause the functions to be instantiated
+with the debug-mode checks included, but this is unsupported and not
+guaranteed to work. For full debug-mode support you can use the
+<code class="code">__gnu_debug::basic_string</code> debugging container directly,
+which always works correctly.
+</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug_mode.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="bk01pt12ch30s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 30. Debug Mode </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
new file mode 100644
index 00000000000..d52674bbb3d
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
@@ -0,0 +1,24 @@
+<?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>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch30s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.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.debug_mode.using"></a>Using</h2></div></div></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.using.mode"></a>Using the Debug Mode</h3></div></div></div><p>To use the libstdc++ debug mode, compile your application with the
+ compiler flag <code class="code">-D_GLIBCXX_DEBUG</code>. Note that this flag
+ changes the sizes and behavior of standard class templates such
+ as <code class="code">std::vector</code>, and therefore you can only link code
+ compiled with debug mode and code compiled without debug mode if no
+ instantiation of a container is passed between the two translation
+ units.</p><p>By default, error messages are formatted to fit on lines of about
+ 78 characters. The environment variable
+ <code class="code">GLIBCXX_DEBUG_MESSAGE_LENGTH</code> can be used to request a
+ different length.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.using.specific"></a>Using a Specific Debug Container</h3></div></div></div><p>When it is not feasible to recompile your entire application, or
+ only specific containers need checking, debugging containers are
+ available as GNU extensions. These debugging containers are
+ functionally equivalent to the standard drop-in containers used in
+ debug mode, but they are available in a separate namespace as GNU
+ extensions and may be used in programs compiled with either release
+ mode or with debug mode. The
+ following table provides the names and headers of the debugging
+ containers:
+</p><div class="table"><a id="id400605"></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" /><col /><col /></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><td class="auto-generated"> </td><td class="auto-generated"> </td></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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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="id452759"></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" /><col /><col /></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><td class="auto-generated"> </td><td class="auto-generated"> </td></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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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><td class="auto-generated"> </td><td class="auto-generated"> </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/bk01pt12ch30s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html
new file mode 100644
index 00000000000..53b2d4c3825
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html
@@ -0,0 +1,409 @@
+<?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.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s03.html" title="Using" /><link rel="next" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /></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="bk01pt12ch30s03.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="parallel_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.debug_mode.design"></a>Design</h2></div></div></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.debug_mode.design.goals"></a>Goals</h3></div></div></div><p>
+ </p><p> The libstdc++ debug mode replaces unsafe (but efficient) standard
+ containers and iterators with semantically equivalent safe standard
+ containers and iterators to aid in debugging user programs. The
+ following goals directed the design of the libstdc++ debug mode:</p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Correctness</em></span>: the libstdc++ debug mode must not change
+ the semantics of the standard library for all cases specified in
+ the ANSI/ISO C++ standard. The essence of this constraint is that
+ any valid C++ program should behave in the same manner regardless
+ of whether it is compiled with debug mode or release mode. In
+ particular, entities that are defined in namespace std in release
+ mode should remain defined in namespace std in debug mode, so that
+ legal specializations of namespace std entities will remain
+ valid. A program that is not valid C++ (e.g., invokes undefined
+ behavior) is not required to behave similarly, although the debug
+ mode will abort with a diagnostic when it detects undefined
+ behavior.</p></li><li><p><span class="emphasis"><em>Performance</em></span>: the additional of the libstdc++ debug mode
+ must not affect the performance of the library when it is compiled
+ in release mode. Performance of the libstdc++ debug mode is
+ secondary (and, in fact, will be worse than the release
+ mode).</p></li><li><p><span class="emphasis"><em>Usability</em></span>: the libstdc++ debug mode should be easy to
+ use. It should be easily incorporated into the user's development
+ environment (e.g., by requiring only a single new compiler switch)
+ and should produce reasonable diagnostics when it detects a
+ problem with the user program. Usability also involves detection
+ of errors when using the debug mode incorrectly, e.g., by linking
+ a release-compiled object against a debug-compiled object if in
+ fact the resulting program will not run correctly.</p></li><li><p><span class="emphasis"><em>Minimize recompilation</em></span>: While it is expected that
+ users recompile at least part of their program to use debug
+ mode, the amount of recompilation affects the
+ detect-compile-debug turnaround time. This indirectly affects the
+ usefulness of the debug mode, because debugging some applications
+ may require rebuilding a large amount of code, which may not be
+ feasible when the suspect code may be very localized. There are
+ several levels of conformance to this requirement, each with its
+ own usability and implementation characteristics. In general, the
+ higher-numbered conformance levels are more usable (i.e., require
+ less recompilation) but are more complicated to implement than
+ the lower-numbered conformance levels.
+ </p><div class="orderedlist"><ol type="1"><li><p><span class="emphasis"><em>Full recompilation</em></span>: The user must recompile his or
+ her entire application and all C++ libraries it depends on,
+ including the C++ standard library that ships with the
+ compiler. This must be done even if only a small part of the
+ program can use debugging features.</p></li><li><p><span class="emphasis"><em>Full user recompilation</em></span>: The user must recompile
+ his or her entire application and all C++ libraries it depends
+ on, but not the C++ standard library itself. This must be done
+ even if only a small part of the program can use debugging
+ features. This can be achieved given a full recompilation
+ system by compiling two versions of the standard library when
+ the compiler is installed and linking against the appropriate
+ one, e.g., a multilibs approach.</p></li><li><p><span class="emphasis"><em>Partial recompilation</em></span>: The user must recompile the
+ parts of his or her application and the C++ libraries it
+ depends on that will use the debugging facilities
+ directly. This means that any code that uses the debuggable
+ standard containers would need to be recompiled, but code
+ that does not use them (but may, for instance, use IOStreams)
+ would not have to be recompiled.</p></li><li><p><span class="emphasis"><em>Per-use recompilation</em></span>: The user must recompile the
+ parts of his or her application and the C++ libraries it
+ depends on where debugging should occur, and any other code
+ that interacts with those containers. This means that a set of
+ translation units that accesses a particular standard
+ container instance may either be compiled in release mode (no
+ checking) or debug mode (full checking), but must all be
+ compiled in the same way; a translation unit that does not see
+ that standard container instance need not be recompiled. This
+ also means that a translation unit <span class="emphasis"><em>A</em></span> that contains a
+ particular instantiation
+ (say, <code class="code">std::vector&lt;int&gt;</code>) compiled in release
+ mode can be linked against a translation unit <span class="emphasis"><em>B</em></span> that
+ contains the same instantiation compiled in debug mode (a
+ feature not present with partial recompilation). While this
+ behavior is technically a violation of the One Definition
+ Rule, this ability tends to be very important in
+ practice. The libstdc++ debug mode supports this level of
+ recompilation. </p></li><li><p><span class="emphasis"><em>Per-unit recompilation</em></span>: The user must only
+ recompile the translation units where checking should occur,
+ regardless of where debuggable standard containers are
+ used. This has also been dubbed "<code class="code">-g</code> mode",
+ because the <code class="code">-g</code> compiler switch works in this way,
+ emitting debugging information at a per--translation-unit
+ granularity. We believe that this level of recompilation is in
+ fact not possible if we intend to supply safe iterators, leave
+ the program semantics unchanged, and not regress in
+ performance under release mode because we cannot associate
+ extra information with an iterator (to form a safe iterator)
+ without either reserving that space in release mode
+ (performance regression) or allocating extra memory associated
+ with each iterator with <code class="code">new</code> (changes the program
+ semantics).</p></li></ol></div><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.debug_mode.design.methods"></a>Methods</h3></div></div></div><p>
+ </p><p>This section provides an overall view of the design of the
+ libstdc++ debug mode and details the relationship between design
+ decisions and the stated design goals.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.wrappers"></a>The Wrapper Model</h4></div></div></div><p>The libstdc++ debug mode uses a wrapper model where the debugging
+ versions of library components (e.g., iterators and containers) form
+ a layer on top of the release versions of the library
+ components. The debugging components first verify that the operation
+ is correct (aborting with a diagnostic if an error is found) and
+ will then forward to the underlying release-mode container that will
+ perform the actual work. This design decision ensures that we cannot
+ regress release-mode performance (because the release-mode
+ containers are left untouched) and partially enables <a class="ulink" href="#mixing" target="_top">mixing debug and release code</a> at link time,
+ although that will not be discussed at this time.</p><p>Two types of wrappers are used in the implementation of the debug
+ mode: container wrappers and iterator wrappers. The two types of
+ wrappers interact to maintain relationships between iterators and
+ their associated containers, which are necessary to detect certain
+ types of standard library usage errors such as dereferencing
+ past-the-end iterators or inserting into a container using an
+ iterator from a different container.</p><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="debug_mode.design.methods.safe_iter"></a>Safe Iterators</h5></div></div></div><p>Iterator wrappers provide a debugging layer over any iterator that
+ is attached to a particular container, and will manage the
+ information detailing the iterator's state (singular,
+ dereferenceable, etc.) and tracking the container to which the
+ iterator is attached. Because iterators have a well-defined, common
+ interface the iterator wrapper is implemented with the iterator
+ adaptor class template <code class="code">__gnu_debug::_Safe_iterator</code>,
+ which takes two template parameters:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">Iterator</code>: The underlying iterator type, which must
+ be either the <code class="code">iterator</code> or <code class="code">const_iterator</code>
+ typedef from the sequence type this iterator can reference.</p></li><li><p><code class="code">Sequence</code>: The type of sequence that this iterator
+ references. This sequence must be a safe sequence (discussed below)
+ whose <code class="code">iterator</code> or <code class="code">const_iterator</code> typedef
+ is the type of the safe iterator.</p></li></ul></div></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="debug_mode.design.methods.safe_seq"></a>Safe Sequences (Containers)</h5></div></div></div><p>Container wrappers provide a debugging layer over a particular
+ container type. Because containers vary greatly in the member
+ functions they support and the semantics of those member functions
+ (especially in the area of iterator invalidation), container
+ wrappers are tailored to the container they reference, e.g., the
+ debugging version of <code class="code">std::list</code> duplicates the entire
+ interface of <code class="code">std::list</code>, adding additional semantic
+ checks and then forwarding operations to the
+ real <code class="code">std::list</code> (a public base class of the debugging
+ version) as appropriate. However, all safe containers inherit from
+ the class template <code class="code">__gnu_debug::_Safe_sequence</code>,
+ instantiated with the type of the safe container itself (an instance
+ of the curiously recurring template pattern).</p><p>The iterators of a container wrapper will be
+ <a class="ulink" href="#safe_iterator" target="_top">safe iterators</a> that reference sequences
+ of this type and wrap the iterators provided by the release-mode
+ base class. The debugging container will use only the safe
+ iterators within its own interface (therefore requiring the user to
+ use safe iterators, although this does not change correct user
+ code) and will communicate with the release-mode base class with
+ only the underlying, unsafe, release-mode iterators that the base
+ class exports.</p><p> The debugging version of <code class="code">std::list</code> will have the
+ following basic structure:</p><pre class="programlisting">
+template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
+ class debug-list :
+ public release-list&lt;_Tp, _Allocator&gt;,
+ public __gnu_debug::_Safe_sequence&lt;debug-list&lt;_Tp, _Allocator&gt; &gt;
+ {
+ typedef release-list&lt;_Tp, _Allocator&gt; _Base;
+ typedef debug-list&lt;_Tp, _Allocator&gt; _Self;
+
+ public:
+ typedef __gnu_debug::_Safe_iterator&lt;typename _Base::iterator, _Self&gt; iterator;
+ typedef __gnu_debug::_Safe_iterator&lt;typename _Base::const_iterator, _Self&gt; const_iterator;
+
+ // duplicate std::list interface with debugging semantics
+ };
+</pre></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.precond"></a>Precondition Checking</h4></div></div></div><p>The debug mode operates primarily by checking the preconditions of
+ all standard library operations that it supports. Preconditions that
+ are always checked (regardless of whether or not we are in debug
+ mode) are checked via the <code class="code">__check_xxx</code> macros defined
+ and documented in the source
+ file <code class="code">include/debug/debug.h</code>. Preconditions that may or
+ may not be checked, depending on the debug-mode
+ macro <code class="code">_GLIBCXX_DEBUG</code>, are checked via
+ the <code class="code">__requires_xxx</code> macros defined and documented in the
+ same source file. Preconditions are validated using any additional
+ information available at run-time, e.g., the containers that are
+ associated with a particular iterator, the position of the iterator
+ within those containers, the distance between two iterators that may
+ form a valid range, etc. In the absence of suitable information,
+ e.g., an input iterator that is not a safe iterator, these
+ precondition checks will silently succeed.</p><p>The majority of precondition checks use the aforementioned macros,
+ which have the secondary benefit of having prewritten debug
+ messages that use information about the current status of the
+ objects involved (e.g., whether an iterator is singular or what
+ sequence it is attached to) along with some static information
+ (e.g., the names of the function parameters corresponding to the
+ objects involved). When not using these macros, the debug mode uses
+ either the debug-mode assertion
+ macro <code class="code">_GLIBCXX_DEBUG_ASSERT</code> , its pedantic
+ cousin <code class="code">_GLIBCXX_DEBUG_PEDASSERT</code>, or the assertion
+ check macro that supports more advance formulation of error
+ messages, <code class="code">_GLIBCXX_DEBUG_VERIFY</code>. These macros are
+ documented more thoroughly in the debug mode source code.</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.coexistence"></a>Release- and debug-mode coexistence</h4></div></div></div><p>The libstdc++ debug mode is the first debug mode we know of that
+ is able to provide the "Per-use recompilation" (4) guarantee, that
+ allows release-compiled and debug-compiled code to be linked and
+ executed together without causing unpredictable behavior. This
+ guarantee minimizes the recompilation that users are required to
+ perform, shortening the detect-compile-debug bughunting cycle
+ and making the debug mode easier to incorporate into development
+ environments by minimizing dependencies.</p><p>Achieving link- and run-time coexistence is not a trivial
+ implementation task. To achieve this goal we required a small
+ extension to the GNU C++ compiler (described in the GCC Manual for
+ C++ Extensions, see <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Strong-Using.html" target="_top">strong
+ using</a>), and a complex organization of debug- and
+ release-modes. The end result is that we have achieved per-use
+ recompilation but have had to give up some checking of the
+ <code class="code">std::basic_string</code> class template (namely, safe
+ iterators).
+</p><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.compile"></a>Compile-time coexistence of release- and debug-mode components</h5></div></div></div><p>Both the release-mode components and the debug-mode
+ components need to exist within a single translation unit so that
+ the debug versions can wrap the release versions. However, only one
+ of these components should be user-visible at any particular
+ time with the standard name, e.g., <code class="code">std::list</code>. </p><p>In release mode, we define only the release-mode version of the
+ component with its standard name and do not include the debugging
+ component at all. The release mode version is defined within the
+ namespace <code class="code">std</code>. Minus the namespace associations, this
+ method leaves the behavior of release mode completely unchanged from
+ its behavior prior to the introduction of the libstdc++ debug
+ mode. Here's an example of what this ends up looking like, in
+ C++.</p><pre class="programlisting">
+namespace std
+{
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ {
+ // ...
+ };
+} // namespace std
+</pre><p>In debug mode we include the release-mode container (which is now
+defined in in the namespace <code class="code">__norm</code>) and also the
+debug-mode container. The debug-mode container is defined within the
+namespace <code class="code">__debug</code>, which is associated with namespace
+<code class="code">std</code> via the GNU namespace association extension. This
+method allows the debug and release versions of the same component to
+coexist at compile-time and link-time without causing an unreasonable
+maintenance burden, while minimizing confusion. Again, this boils down
+to C++ code as follows:</p><pre class="programlisting">
+namespace std
+{
+ namespace __norm
+ {
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ {
+ // ...
+ };
+ } // namespace __gnu_norm
+
+ namespace __debug
+ {
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ : public __norm::list&lt;_Tp, _Alloc&gt;,
+ public __gnu_debug::_Safe_sequence&lt;list&lt;_Tp, _Alloc&gt; &gt;
+ {
+ // ...
+ };
+ } // namespace __norm
+
+ using namespace __debug __attribute__ ((strong));
+}
+</pre></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.link"></a>Link- and run-time coexistence of release- and
+ debug-mode components</h5></div></div></div><p>Because each component has a distinct and separate release and
+debug implementation, there are are no issues with link-time
+coexistence: the separate namespaces result in different mangled
+names, and thus unique linkage.</p><p>However, components that are defined and used within the C++
+standard library itself face additional constraints. For instance,
+some of the member functions of <code class="code"> std::moneypunct</code> return
+<code class="code">std::basic_string</code>. Normally, this is not a problem, but
+with a mixed mode standard library that could be using either
+debug-mode or release-mode <code class="code"> basic_string</code> objects, things
+get more complicated. As the return value of a function is not
+encoded into the mangled name, there is no way to specify a
+release-mode or a debug-mode string. In practice, this results in
+runtime errors. A simplified example of this problem is as follows.
+</p><p> Take this translation unit, compiled in debug-mode: </p><pre class="programlisting">
+// -D_GLIBCXX_DEBUG
+#include &lt;string&gt;
+
+std::string test02();
+
+std::string test01()
+{
+ return test02();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+</pre><p> ... and linked to this translation unit, compiled in release mode:</p><pre class="programlisting">
+#include &lt;string&gt;
+
+std::string
+test02()
+{
+ return std::string("toast");
+}
+</pre><p> For this reason we cannot easily provide safe iterators for
+ the <code class="code">std::basic_string</code> class template, as it is present
+ throughout the C++ standard library. For instance, locale facets
+ define typedefs that include <code class="code">basic_string</code>: in a mixed
+ debug/release program, should that typedef be based on the
+ debug-mode <code class="code">basic_string</code> or the
+ release-mode <code class="code">basic_string</code>? While the answer could be
+ "both", and the difference hidden via renaming a la the
+ debug/release containers, we must note two things about locale
+ facets:</p><div class="orderedlist"><ol type="1"><li><p>They exist as shared state: one can create a facet in one
+ translation unit and access the facet via the same type name in a
+ different translation unit. This means that we cannot have two
+ different versions of locale facets, because the types would not be
+ the same across debug/release-mode translation unit barriers.</p></li><li><p>They have virtual functions returning strings: these functions
+ mangle in the same way regardless of the mangling of their return
+ types (see above), and their precise signatures can be relied upon
+ by users because they may be overridden in derived classes.</p></li></ol></div><p>With the design of libstdc++ debug mode, we cannot effectively hide
+ the differences between debug and release-mode strings from the
+ user. Failure to hide the differences may result in unpredictable
+ behavior, and for this reason we have opted to only
+ perform <code class="code">basic_string</code> changes that do not require ABI
+ changes. The effect on users is expected to be minimal, as there are
+ simple alternatives (e.g., <code class="code">__gnu_debug::basic_string</code>),
+ and the usability benefit we gain from the ability to mix debug- and
+ release-compiled translation units is enormous.</p></div><div class="sect4" lang="en" xml:lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.alt"></a>Alternatives for Coexistence</h5></div></div></div><p>The coexistence scheme above was chosen over many alternatives,
+ including language-only solutions and solutions that also required
+ extensions to the C++ front end. The following is a partial list of
+ solutions, with justifications for our rejection of each.</p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Completely separate debug/release libraries</em></span>: This is by
+ far the simplest implementation option, where we do not allow any
+ coexistence of debug- and release-compiled translation units in a
+ program. This solution has an extreme negative affect on usability,
+ because it is quite likely that some libraries an application
+ depends on cannot be recompiled easily. This would not meet
+ our <span class="emphasis"><em>usability</em></span> or <span class="emphasis"><em>minimize recompilation</em></span> criteria
+ well.</p></li><li><p><span class="emphasis"><em>Add a <code class="code">Debug</code> boolean template parameter</em></span>:
+ Partial specialization could be used to select the debug
+ implementation when <code class="code">Debug == true</code>, and the state
+ of <code class="code">_GLIBCXX_DEBUG</code> could decide whether the
+ default <code class="code">Debug</code> argument is <code class="code">true</code>
+ or <code class="code">false</code>. This option would break conformance with the
+ C++ standard in both debug <span class="emphasis"><em>and</em></span> release modes. This would
+ not meet our <span class="emphasis"><em>correctness</em></span> criteria. </p></li><li><p><span class="emphasis"><em>Packaging a debug flag in the allocators</em></span>: We could
+ reuse the <code class="code">Allocator</code> template parameter of containers
+ by adding a sentinel wrapper <code class="code">debug&lt;&gt;</code> that
+ signals the user's intention to use debugging, and pick up
+ the <code class="code">debug&lt;&gt;</code> allocator wrapper in a partial
+ specialization. However, this has two drawbacks: first, there is a
+ conformance issue because the default allocator would not be the
+ standard-specified <code class="code">std::allocator&lt;T&gt;</code>. Secondly
+ (and more importantly), users that specify allocators instead of
+ implicitly using the default allocator would not get debugging
+ containers. Thus this solution fails the <span class="emphasis"><em>correctness</em></span>
+ criteria.</p></li><li><p><span class="emphasis"><em>Define debug containers in another namespace, and employ
+ a <code class="code">using</code> declaration (or directive)</em></span>: This is an
+ enticing option, because it would eliminate the need for
+ the <code class="code">link_name</code> extension by aliasing the
+ templates. However, there is no true template aliasing mechanism
+ is C++, because both <code class="code">using</code> directives and using
+ declarations disallow specialization. This method fails
+ the <span class="emphasis"><em>correctness</em></span> criteria.</p></li><li><p><span class="emphasis"><em> Use implementation-specific properties of anonymous
+ namespaces. </em></span>
+ See <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00004.html" target="_top"> this post
+ </a>
+ This method fails the <span class="emphasis"><em>correctness</em></span> criteria.</p></li><li><p><span class="emphasis"><em>Extension: allow reopening on namespaces</em></span>: This would
+ allow the debug mode to effectively alias the
+ namespace <code class="code">std</code> to an internal namespace, such
+ as <code class="code">__gnu_std_debug</code>, so that it is completely
+ separate from the release-mode <code class="code">std</code> namespace. While
+ this will solve some renaming problems and ensure that
+ debug- and release-compiled code cannot be mixed unsafely, it ensures that
+ debug- and release-compiled code cannot be mixed at all. For
+ instance, the program would have two <code class="code">std::cout</code>
+ objects! This solution would fails the <span class="emphasis"><em>minimize
+ recompilation</em></span> requirement, because we would only be able to
+ support option (1) or (2).</p></li><li><p><span class="emphasis"><em>Extension: use link name</em></span>: This option involves
+ complicated re-naming between debug-mode and release-mode
+ components at compile time, and then a g++ extension called <span class="emphasis"><em>
+ link name </em></span> to recover the original names at link time. There
+ are two drawbacks to this approach. One, it's very verbose,
+ relying on macro renaming at compile time and several levels of
+ include ordering. Two, ODR issues remained with container member
+ functions taking no arguments in mixed-mode settings resulting in
+ equivalent link names, <code class="code"> vector::push_back() </code> being
+ one example.
+ See <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00177.html" target="_top">link
+ name</a> </p></li></ul></div><p>Other options may exist for implementing the debug mode, many of
+ which have probably been considered and others that may still be
+ lurking. This list may be expanded over time to include other
+ options that we could have implemented, but in all cases the full
+ ramifications of the approach (as measured against the design goals
+ for a libstdc++ debug mode) should be considered first. The DejaGNU
+ testsuite includes some testcases that check for known problems with
+ some solutions (e.g., the <code class="code">using</code> declaration solution
+ that breaks user specialization), and additional testcases will be
+ added as we are able to identify other typical problem cases. These
+ test cases will serve as a benchmark by which we can compare debug
+ mode implementations.</p></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.debug_mode.design.other"></a>Other Implementations</h3></div></div></div><p>
+ </p><p> There are several existing implementations of debug modes for C++
+ standard library implementations, although none of them directly
+ supports debugging for programs using libstdc++. The existing
+ implementations include:</p><div class="itemizedlist"><ul type="disc"><li><p><a class="ulink" href="http://www.mathcs.sjsu.edu/faculty/horstman/safestl.html" target="_top">SafeSTL</a>:
+ SafeSTL was the original debugging version of the Standard Template
+ Library (STL), implemented by Cay S. Horstmann on top of the
+ Hewlett-Packard STL. Though it inspired much work in this area, it
+ has not been kept up-to-date for use with modern compilers or C++
+ standard library implementations.</p></li><li><p><a class="ulink" href="http://www.stlport.org/" target="_top">STLport</a>: STLport is a free
+ implementation of the C++ standard library derived from the <a class="ulink" href="http://www.sgi.com/tech/stl/" target="_top">SGI implementation</a>, and
+ ported to many other platforms. It includes a debug mode that uses a
+ wrapper model (that in some way inspired the libstdc++ debug mode
+ design), although at the time of this writing the debug mode is
+ somewhat incomplete and meets only the "Full user recompilation" (2)
+ recompilation guarantee by requiring the user to link against a
+ different library in debug mode vs. release mode.</p></li><li><p><a class="ulink" href="http://www.metrowerks.com/mw/default.htm" target="_top">Metrowerks
+ CodeWarrior</a>: The C++ standard library that ships with Metrowerks
+ CodeWarrior includes a debug mode. It is a full debug-mode
+ implementation (including debugging for CodeWarrior extensions) and
+ is easy to use, although it meets only the "Full recompilation" (1)
+ recompilation guarantee.</p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s03.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="parallel_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 31. Parallel Mode</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html
new file mode 100644
index 00000000000..e06362edd9f
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html
@@ -0,0 +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>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><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="start" 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="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="next" href="bk01pt12ch31s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s03.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.semantics"></a>Semantics</h2></div></div></div><p> The parallel mode STL algorithms are currently not exception-safe,
+i. e. user-defined functors must not throw exceptions.
+</p><p> Since the current GCC OpenMP implementation does not support
+OpenMP parallel regions in concurrent threads,
+it is not possible to call parallel STL algorithm in
+concurrent threads, either.
+It might work with other compilers, though.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="parallel_mode.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="bk01pt12ch31s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 31. Parallel Mode </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
new file mode 100644
index 00000000000..0bc7ae5d2ab
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
@@ -0,0 +1,26 @@
+<?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>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><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="start" 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="bk01pt12ch31s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch31s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.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.using"></a>Using</h2></div></div></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 compiler flag <code class="code">-D_GLIBCXX_PARALLEL -fopenmp</code>. This
+ will link in <code class="code">libgomp</code>, the GNU OpenMP <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libgomp" target="_top">implementation</a>,
+ whose presence is mandatory. In addition, hardware capable of atomic
+ operations is mandatory. Actually activating these atomic
+ operations may require explicit compiler flags on some targets
+ (like sparc and x86), such as <code class="code">-march=i686</code>,
+ <code class="code">-march=native</code> or <code class="code">-mcpu=v9</code>.
+</p><p>Note that the <code class="code">_GLIBCXX_PARALLEL</code> define may change the
+ sizes and behavior of standard class templates such as
+ <code class="code">std::search</code>, and therefore one can only link code
+ compiled with parallel mode and code compiled without parallel mode
+ if no instantiation of a container is passed between the two
+ translation units. Parallel mode functionality has distinct linkage,
+ and cannot be confused with normal mode symbols.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.parallel_mode.usings"></a>Using Specific Parallel Components</h3></div></div></div><p>When it is not feasible to recompile your entire application, or
+ only specific algorithms need to be parallel-aware, individual
+ parallel algorithms can be made available explicitly. These
+ parallel algorithms are functionally equivalent to the standard
+ drop-in algorithms used in parallel mode, but they are available in
+ a separate namespace as GNU extensions and may be used in programs
+ compiled with either release mode or with parallel mode. The
+ following table provides the names and headers of the parallel
+ algorithms:
+</p><div class="table"><a id="id419374"></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/bk01pt12ch31s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html
new file mode 100644
index 00000000000..99c1356d85a
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html
@@ -0,0 +1,97 @@
+<?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.73.2" /><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="start" 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="bk01pt12ch31s03.html" title="Using" /><link rel="next" href="bk01pt12ch31s05.html" title="Testing" /></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="bk01pt12ch31s03.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s05.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.design"></a>Design</h2></div></div></div><p>
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.parallel_mode.design.intro"></a>Interface Basics</h3></div></div></div><p>All parallel algorithms are intended to have signatures that are
+equivalent to the ISO C++ algorithms replaced. For instance, the
+<code class="code">std::adjacent_find</code> function is declared as:
+</p><pre class="programlisting">
+namespace std
+{
+ template&lt;typename _FIter&gt;
+ _FIter
+ adjacent_find(_FIter, _FIter);
+}
+</pre><p>
+Which means that there should be something equivalent for the parallel
+version. Indeed, this is the case:
+</p><pre class="programlisting">
+namespace std
+{
+ namespace __parallel
+ {
+ template&lt;typename _FIter&gt;
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ ...
+ }
+}
+</pre><p>But.... why the elipses?
+</p><p> The elipses in the example above represent additional overloads
+required for the parallel version of the function. These additional
+overloads are used to dispatch calls from the ISO C++ function
+signature to the appropriate parallel function (or sequential
+function, if no parallel functions are deemed worthy), based on either
+compile-time or run-time conditions.
+</p><p> Compile-time conditions are referred to as "embarrassingly
+parallel," and are denoted with the appropriate dispatch object, ie
+one of <code class="code">__gnu_parallel::sequential_tag</code>,
+<code class="code">__gnu_parallel::parallel_tag</code>,
+<code class="code">__gnu_parallel::balanced_tag</code>,
+<code class="code">__gnu_parallel::unbalanced_tag</code>,
+<code class="code">__gnu_parallel::omp_loop_tag</code>, or
+<code class="code">__gnu_parallel::omp_loop_static_tag</code>.
+</p><p> Run-time conditions depend on the hardware being used, the number
+of threads available, etc., and are denoted by the use of the enum
+<code class="code">__gnu_parallel::parallelism</code>. Values of this enum include
+<code class="code">__gnu_parallel::sequential</code>,
+<code class="code">__gnu_parallel::parallel_unbalanced</code>,
+<code class="code">__gnu_parallel::parallel_balanced</code>,
+<code class="code">__gnu_parallel::parallel_omp_loop</code>,
+<code class="code">__gnu_parallel::parallel_omp_loop_static</code>, or
+<code class="code">__gnu_parallel::parallel_taskqueue</code>.
+</p><p> Putting all this together, the general view of overloads for the
+parallel algorithms look like this:
+</p><div class="itemizedlist"><ul type="disc"><li><p>ISO C++ signature</p></li><li><p>ISO C++ signature + sequential_tag argument</p></li><li><p>ISO C++ signature + parallelism argument</p></li></ul></div><p> Please note that the implementation may use additional functions
+(designated with the <code class="code">_switch</code> suffix) to dispatch from the
+ISO C++ signature to the correct parallel version. Also, some of the
+algorithms do not have support for run-time conditions, so the last
+overload is therefore missing.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.parallel_mode.design.tuning"></a>Configuration and Tuning</h3></div></div></div><p> Some algorithm variants can be enabled/disabled/selected at compile-time.
+See <a class="ulink" href="latest-doxygen/compiletime__settings_8h.html" target="_top">
+<code class="code">&lt;compiletime_settings.h&gt;</code></a> and
+See <a class="ulink" href="latest-doxygen/compiletime__settings_8h.html" target="_top">
+<code class="code">&lt;features.h&gt;</code></a> for details.
+</p><p>
+To specify the number of threads to be used for an algorithm,
+use <code class="code">omp_set_num_threads</code>.
+To force a function to execute sequentially,
+even though parallelism is switched on in general,
+add <code class="code">__gnu_parallel::sequential_tag()</code>
+to the end of the argument list.
+</p><p>
+Parallelism always incurs some overhead. Thus, it is not
+helpful to parallelize operations on very small sets of data.
+There are measures to avoid parallelizing stuff that is not worth it.
+For each algorithm, a minimum problem size can be stated,
+usually using the variable
+<code class="code">__gnu_parallel::Settings::[algorithm]_minimal_n</code>.
+Please see <a class="ulink" href="latest-doxygen/settings_8h.html" target="_top">
+<code class="code">&lt;settings.h&gt;</code></a> for details.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.parallel_mode.design.impl"></a>Implementation Namespaces</h3></div></div></div><p> One namespace contain versions of code that are explicitly sequential:
+<code class="code">__gnu_serial</code>.
+</p><p> Two namespaces contain the parallel mode:
+<code class="code">std::__parallel</code> and <code class="code">__gnu_parallel</code>.
+</p><p> Parallel implementations of standard components, including
+template helpers to select parallelism, are defined in <code class="code">namespace
+std::__parallel</code>. For instance, <code class="code">std::transform</code> from
+&lt;algorithm&gt; has a parallel counterpart in
+<code class="code">std::__parallel::transform</code> from
+&lt;parallel/algorithm&gt;. In addition, these parallel
+implementations are injected into <code class="code">namespace
+__gnu_parallel</code> with using declarations.
+</p><p> Support and general infrastructure is in <code class="code">namespace
+__gnu_parallel</code>.
+</p><p> More information, and an organized index of types and functions
+related to the parallel mode on a per-namespace basis, can be found in
+the generated source documentation.
+</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s03.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="bk01pt12ch31s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Testing</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
new file mode 100644
index 00000000000..698ba3906de
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
@@ -0,0 +1,26 @@
+<?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.73.2" /><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="start" 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="bk01pt12ch32.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="bk01pt12ch32.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>
+ To run the conformance and regression tests with the parallel mode
+ active,
+ </p><pre class="screen">
+ <strong class="userinput"><code>make check-parallel</code></strong>
+ </pre><p>
+ The log and summary files for conformance testing are in the
+ <code class="code">testsuite/parallel</code> directory.
+ </p><p>
+ To run the performance tests with the parallel mode active,
+ </p><pre class="screen">
+ <strong class="userinput"><code>check-performance-parallel</code></strong>
+ </pre><p>
+ The result file for performance testing are in the
+ <code class="code">testsuite</code> directory, in the file
+ <code class="code">libstdc++_performance.sum</code>. In addition, the
+ policy-based containers have their own visualizations, which have
+ 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="bk01pt12ch32.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32.html
new file mode 100644
index 00000000000..444c16223e8
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32.html
@@ -0,0 +1,394 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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. 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="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.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
+ developed specifically to suit the needs of multi threaded
+ applications [hereinafter referred to as an MT application]. Over
+ time the allocator has evolved and been improved in many ways, in
+ particular it now also does a good job in single threaded
+ applications [hereinafter referred to as a ST application]. (Note:
+ In this document, when referring to single threaded applications
+ this also includes applications that are compiled with gcc without
+ thread support enabled. This is accomplished using ifdef's on
+ __GTHREADS). This allocator is tunable, very flexible, and capable
+ of high-performance.
+</p><p>
+ The aim of this document is to describe - from an application point of
+ view - the "inner workings" of the allocator.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.design_issues"></a>Design Issues</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.mt.overview"></a>Overview</h4></div></div></div><p> There are three general components to the allocator: a datum
+describing the characteristics of the memory pool, a policy class
+containing this pool that links instantiation types to common or
+individual pools, and a class inheriting from the policy class that is
+the actual allocator.
+</p><p>The datum describing pools characteristics is
+</p><pre class="programlisting">
+ template&lt;bool _Thread&gt;
+ class __pool
+</pre><p> This class is parametrized on thread support, and is explicitly
+specialized for both multiple threads (with <code class="code">bool==true</code>)
+and single threads (via <code class="code">bool==false</code>.) It is possible to
+use a custom pool datum instead of the default class that is provided.
+</p><p> There are two distinct policy classes, each of which can be used
+with either type of underlying pool datum.
+</p><pre class="programlisting">
+ template&lt;bool _Thread&gt;
+ struct __common_pool_policy
+
+ template&lt;typename _Tp, bool _Thread&gt;
+ struct __per_type_pool_policy
+</pre><p> The first policy, <code class="code">__common_pool_policy</code>, implements a
+common pool. This means that allocators that are instantiated with
+different types, say <code class="code">char</code> and <code class="code">long</code> will both
+use the same pool. This is the default policy.
+</p><p> The second policy, <code class="code">__per_type_pool_policy</code>, implements
+a separate pool for each instantiating type. Thus, <code class="code">char</code>
+and <code class="code">long</code> will use separate pools. This allows per-type
+tuning, for instance.
+</p><p> Putting this all together, the actual allocator class is
+</p><pre class="programlisting">
+ template&lt;typename _Tp, typename _Poolp = __default_policy&gt;
+ class __mt_alloc : public __mt_alloc_base&lt;_Tp&gt;, _Poolp
+</pre><p> This class has the interface required for standard library allocator
+classes, namely member functions <code class="code">allocate</code> and
+<code class="code">deallocate</code>, plus others.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.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="allocator.mt.tune"></a>Tunable Parameters</h4></div></div></div><p>Certain allocation parameters can be modified, or tuned. There
+exists a nested <code class="code">struct __pool_base::_Tune</code> that contains all
+these parameters, which include settings for
+</p><div class="itemizedlist"><ul type="disc"><li><p>Alignment</p></li><li><p>Maximum bytes before calling <code class="code">::operator new</code> directly</p></li><li><p>Minimum bytes</p></li><li><p>Size of underlying global allocations</p></li><li><p>Maximum number of supported threads</p></li><li><p>Migration of deallocations to the global free list</p></li><li><p>Shunt for global <code class="code">new</code> and <code class="code">delete</code></p></li></ul></div><p>Adjusting parameters for a given instance of an allocator can only
+happen before any allocations take place, when the allocator itself is
+initialized. For instance:
+</p><pre class="programlisting">
+#include &lt;ext/mt_allocator.h&gt;
+
+struct pod
+{
+ int i;
+ int j;
+};
+
+int main()
+{
+ typedef pod value_type;
+ typedef __gnu_cxx::__mt_alloc&lt;value_type&gt; allocator_type;
+ typedef __gnu_cxx::__pool_base::_Tune tune_type;
+
+ tune_type t_default;
+ tune_type t_opt(16, 5120, 32, 5120, 20, 10, false);
+ tune_type t_single(16, 5120, 32, 5120, 1, 10, false);
+
+ tune_type t;
+ t = allocator_type::_M_get_options();
+ allocator_type::_M_set_options(t_opt);
+ t = allocator_type::_M_get_options();
+
+ allocator_type a;
+ allocator_type::pointer p1 = a.allocate(128);
+ allocator_type::pointer p2 = a.allocate(5128);
+
+ a.deallocate(p1, 128);
+ a.deallocate(p2, 5128);
+
+ return 0;
+}
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.mt.init"></a>Initialization</h4></div></div></div><p>
+The static variables (pointers to freelists, tuning parameters etc)
+are initialized as above, or are set to the global defaults.
+</p><p>
+The very first allocate() call will always call the
+_S_initialize_once() function. In order to make sure that this
+function is called exactly once we make use of a __gthread_once call
+in MT applications and check a static bool (_S_init) in ST
+applications.
+</p><p>
+The _S_initialize() function:
+- If the GLIBCXX_FORCE_NEW environment variable is set, it sets the bool
+ _S_force_new to true and then returns. This will cause subsequent calls to
+ allocate() to return memory directly from a new() call, and deallocate will
+ only do a delete() call.
+</p><p>
+- If the GLIBCXX_FORCE_NEW environment variable is not set, both ST and MT
+ applications will:
+ - Calculate the number of bins needed. A bin is a specific power of two size
+ of bytes. I.e., by default the allocator will deal with requests of up to
+ 128 bytes (or whatever the value of _S_max_bytes is when _S_init() is
+ called). This means that there will be bins of the following sizes
+ (in bytes): 1, 2, 4, 8, 16, 32, 64, 128.
+
+ - Create the _S_binmap array. All requests are rounded up to the next
+ "large enough" bin. I.e., a request for 29 bytes will cause a block from
+ the "32 byte bin" to be returned to the application. The purpose of
+ _S_binmap is to speed up the process of finding out which bin to use.
+ I.e., the value of _S_binmap[ 29 ] is initialized to 5 (bin 5 = 32 bytes).
+</p><p>
+ - Create the _S_bin array. This array consists of bin_records. There will be
+ as many bin_records in this array as the number of bins that we calculated
+ earlier. I.e., if _S_max_bytes = 128 there will be 8 entries.
+ Each bin_record is then initialized:
+ - bin_record-&gt;first = An array of pointers to block_records. There will be
+ as many block_records pointers as there are maximum number of threads
+ (in a ST application there is only 1 thread, in a MT application there
+ are _S_max_threads).
+ This holds the pointer to the first free block for each thread in this
+ bin. I.e., if we would like to know where the first free block of size 32
+ for thread number 3 is we would look this up by: _S_bin[ 5 ].first[ 3 ]
+
+ The above created block_record pointers members are now initialized to
+ their initial values. I.e. _S_bin[ n ].first[ n ] = NULL;
+</p><p>
+- Additionally a MT application will:
+ - Create a list of free thread id's. The pointer to the first entry
+ is stored in _S_thread_freelist_first. The reason for this approach is
+ that the __gthread_self() call will not return a value that corresponds to
+ the maximum number of threads allowed but rather a process id number or
+ something else. So what we do is that we create a list of thread_records.
+ This list is _S_max_threads long and each entry holds a size_t thread_id
+ which is initialized to 1, 2, 3, 4, 5 and so on up to _S_max_threads.
+ Each time a thread calls allocate() or deallocate() we call
+ _S_get_thread_id() which looks at the value of _S_thread_key which is a
+ thread local storage pointer. If this is NULL we know that this is a newly
+ created thread and we pop the first entry from this list and saves the
+ pointer to this record in the _S_thread_key variable. The next time
+ we will get the pointer to the thread_record back and we use the
+ thread_record-&gt;thread_id as identification. I.e., the first thread that
+ calls allocate will get the first record in this list and thus be thread
+ number 1 and will then find the pointer to its first free 32 byte block
+ in _S_bin[ 5 ].first[ 1 ]
+ When we create the _S_thread_key we also define a destructor
+ (_S_thread_key_destr) which means that when the thread dies, this
+ thread_record is returned to the front of this list and the thread id
+ can then be reused if a new thread is created.
+ This list is protected by a mutex (_S_thread_freelist_mutex) which is only
+ locked when records are removed or added to the list.
+</p><p>
+ - Initialize the free and used counters of each bin_record:
+ - bin_record-&gt;free = An array of size_t. This keeps track of the number
+ of blocks on a specific thread's freelist in each bin. I.e., if a thread
+ has 12 32-byte blocks on it's freelists and allocates one of these, this
+ counter would be decreased to 11.
+
+ - bin_record-&gt;used = An array of size_t. This keeps track of the number
+ of blocks currently in use of this size by this thread. I.e., if a thread
+ has made 678 requests (and no deallocations...) of 32-byte blocks this
+ counter will read 678.
+
+ The above created arrays are now initialized with their initial values.
+ I.e. _S_bin[ n ].free[ n ] = 0;
+</p><p>
+ - Initialize the mutex of each bin_record: The bin_record-&gt;mutex
+ is used to protect the global freelist. This concept of a global
+ freelist is explained in more detail in the section "A multi
+ threaded example", but basically this mutex is locked whenever a
+ block of memory is retrieved or returned to the global freelist
+ for this specific bin. This only occurs when a number of blocks
+ are grabbed from the global list to a thread specific list or when
+ a thread decides to return some blocks to the global freelist.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.mt.deallocation"></a>Deallocation Notes</h4></div></div></div><p> Notes about deallocation. This allocator does not explicitly
+release memory. Because of this, memory debugging programs like
+valgrind or purify may notice leaks: sorry about this
+inconvenience. Operating systems will reclaim allocated memory at
+program termination anyway. If sidestepping this kind of noise is
+desired, there are three options: use an allocator, like
+<code class="code">new_allocator</code> that releases memory while debugging, use
+GLIBCXX_FORCE_NEW to bypass the allocator's internal pools, or use a
+custom pool datum that releases resources on destruction.
+</p><p>
+ On systems with the function <code class="code">__cxa_atexit</code>, the
+allocator can be forced to free all memory allocated before program
+termination with the member function
+<code class="code">__pool_type::_M_destroy</code>. However, because this member
+function relies on the precise and exactly-conforming ordering of
+static destructors, including those of a static local
+<code class="code">__pool</code> object, it should not be used, ever, on systems
+that don't have the necessary underlying support. In addition, in
+practice, forcing deallocation can be tricky, as it requires the
+<code class="code">__pool</code> object to be fully-constructed before the object
+that uses it is fully constructed. For most (but not all) STL
+containers, this works, as an instance of the allocator is constructed
+as part of a container's constructor. However, this assumption is
+implementation-specific, and subject to change. For an example of a
+pool that frees memory, see the following
+ <a class="ulink" href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
+ example.</a>
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.example_single"></a>Single Thread Example</h3></div></div></div><p>
+Let's start by describing how the data on a freelist is laid out in memory.
+This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes):
+</p><pre class="programlisting">
++----------------+
+| next* ---------|--+ (_S_bin[ 3 ].first[ 3 ] points here)
+| | |
+| | |
+| | |
++----------------+ |
+| thread_id = 3 | |
+| | |
+| | |
+| | |
++----------------+ |
+| DATA | | (A pointer to here is what is returned to the
+| | | the application when needed)
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
++----------------+ |
++----------------+ |
+| next* |&lt;-+ (If next == NULL it's the last one on the list)
+| |
+| |
+| |
++----------------+
+| thread_id = 3 |
+| |
+| |
+| |
++----------------+
+| DATA |
+| |
+| |
+| |
+| |
+| |
+| |
+| |
++----------------+
+</pre><p>
+With this in mind we simplify things a bit for a while and say that there is
+only one thread (a ST application). In this case all operations are made to
+what is referred to as the global pool - thread id 0 (No thread may be
+assigned this id since they span from 1 to _S_max_threads in a MT application).
+</p><p>
+When the application requests memory (calling allocate()) we first look at the
+requested size and if this is &gt; _S_max_bytes we call new() directly and return.
+</p><p>
+If the requested size is within limits we start by finding out from which
+bin we should serve this request by looking in _S_binmap.
+</p><p>
+A quick look at _S_bin[ bin ].first[ 0 ] tells us if there are any blocks of
+this size on the freelist (0). If this is not NULL - fine, just remove the
+block that _S_bin[ bin ].first[ 0 ] points to from the list,
+update _S_bin[ bin ].first[ 0 ] and return a pointer to that blocks data.
+</p><p>
+If the freelist is empty (the pointer is NULL) we must get memory from the
+system and build us a freelist within this memory. All requests for new memory
+is made in chunks of _S_chunk_size. Knowing the size of a block_record and
+the bytes that this bin stores we then calculate how many blocks we can create
+within this chunk, build the list, remove the first block, update the pointer
+(_S_bin[ bin ].first[ 0 ]) and return a pointer to that blocks data.
+</p><p>
+Deallocation is equally simple; the pointer is casted back to a block_record
+pointer, lookup which bin to use based on the size, add the block to the front
+of the global freelist and update the pointer as needed
+(_S_bin[ bin ].first[ 0 ]).
+</p><p>
+The decision to add deallocated blocks to the front of the freelist was made
+after a set of performance measurements that showed that this is roughly 10%
+faster than maintaining a set of "last pointers" as well.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.example_multi"></a>Multiple Thread Example</h3></div></div></div><p>
+In the ST example we never used the thread_id variable present in each block.
+Let's start by explaining the purpose of this in a MT application.
+</p><p>
+The concept of "ownership" was introduced since many MT applications
+allocate and deallocate memory to shared containers from different
+threads (such as a cache shared amongst all threads). This introduces
+a problem if the allocator only returns memory to the current threads
+freelist (I.e., there might be one thread doing all the allocation and
+thus obtaining ever more memory from the system and another thread
+that is getting a longer and longer freelist - this will in the end
+consume all available memory).
+</p><p>
+Each time a block is moved from the global list (where ownership is
+irrelevant), to a threads freelist (or when a new freelist is built
+from a chunk directly onto a threads freelist or when a deallocation
+occurs on a block which was not allocated by the same thread id as the
+one doing the deallocation) the thread id is set to the current one.
+</p><p>
+What's the use? Well, when a deallocation occurs we can now look at
+the thread id and find out if it was allocated by another thread id
+and decrease the used counter of that thread instead, thus keeping the
+free and used counters correct. And keeping the free and used counters
+corrects is very important since the relationship between these two
+variables decides if memory should be returned to the global pool or
+not when a deallocation occurs.
+</p><p>
+When the application requests memory (calling allocate()) we first
+look at the requested size and if this is &gt;_S_max_bytes we call new()
+directly and return.
+</p><p>
+If the requested size is within limits we start by finding out from which
+bin we should serve this request by looking in _S_binmap.
+</p><p>
+A call to _S_get_thread_id() returns the thread id for the calling thread
+(and if no value has been set in _S_thread_key, a new id is assigned and
+returned).
+</p><p>
+A quick look at _S_bin[ bin ].first[ thread_id ] tells us if there are
+any blocks of this size on the current threads freelist. If this is
+not NULL - fine, just remove the block that _S_bin[ bin ].first[
+thread_id ] points to from the list, update _S_bin[ bin ].first[
+thread_id ], update the free and used counters and return a pointer to
+that blocks data.
+</p><p>
+If the freelist is empty (the pointer is NULL) we start by looking at
+the global freelist (0). If there are blocks available on the global
+freelist we lock this bins mutex and move up to block_count (the
+number of blocks of this bins size that will fit into a _S_chunk_size)
+or until end of list - whatever comes first - to the current threads
+freelist and at the same time change the thread_id ownership and
+update the counters and pointers. When the bins mutex has been
+unlocked, we remove the block that _S_bin[ bin ].first[ thread_id ]
+points to from the list, update _S_bin[ bin ].first[ thread_id ],
+update the free and used counters, and return a pointer to that blocks
+data.
+</p><p>
+The reason that the number of blocks moved to the current threads
+freelist is limited to block_count is to minimize the chance that a
+subsequent deallocate() call will return the excess blocks to the
+global freelist (based on the _S_freelist_headroom calculation, see
+below).
+</p><p>
+However if there isn't any memory on the global pool we need to get
+memory from the system - this is done in exactly the same way as in a
+single threaded application with one major difference; the list built
+in the newly allocated memory (of _S_chunk_size size) is added to the
+current threads freelist instead of to the global.
+</p><p>
+The basic process of a deallocation call is simple: always add the
+block to the front of the current threads freelist and update the
+counters and pointers (as described earlier with the specific check of
+ownership that causes the used counter of the thread that originally
+allocated the block to be decreased instead of the current threads
+counter).
+</p><p>
+And here comes the free and used counters to service. Each time a
+deallocation() call is made, the length of the current threads
+freelist is compared to the amount memory in use by this thread.
+</p><p>
+Let's go back to the example of an application that has one thread
+that does all the allocations and one that deallocates. Both these
+threads use say 516 32-byte blocks that was allocated during thread
+creation for example. Their used counters will both say 516 at this
+point. The allocation thread now grabs 1000 32-byte blocks and puts
+them in a shared container. The used counter for this thread is now
+1516.
+</p><p>
+The deallocation thread now deallocates 500 of these blocks. For each
+deallocation made the used counter of the allocating thread is
+decreased and the freelist of the deallocation thread gets longer and
+longer. But the calculation made in deallocate() will limit the length
+of the freelist in the deallocation thread to _S_freelist_headroom %
+of it's used counter. In this case, when the freelist (given that the
+_S_freelist_headroom is at it's default value of 10%) exceeds 52
+(516/10) blocks will be returned to the global pool where the
+allocating thread may pick them up and reuse them.
+</p><p>
+In order to reduce lock contention (since this requires this bins
+mutex to be locked) this operation is also made in chunks of blocks
+(just like when chunks of blocks are moved from the global freelist to
+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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33.html
new file mode 100644
index 00000000000..ee96bfa38f6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33.html
@@ -0,0 +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>Chapter 33. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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. 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="bk01pt12ch33.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>
+ </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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
new file mode 100644
index 00000000000..f7a8543b8ce
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
@@ -0,0 +1,43 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33.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="bk01pt12ch33.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>
+ </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:
+</p><p>The old pre-standard <code class="code">bit_vector</code> class is present for
+ backwards compatibility. It is simply a typedef for the
+ <code class="code">vector&lt;bool&gt;</code> specialization.
+</p><p>The <code class="code">bitset</code> class has a number of extensions, described in the
+ rest of this item. First, we'll mention that this implementation of
+ <code class="code">bitset&lt;N&gt;</code> is specialized for cases where N number of
+ bits will fit into a single word of storage. If your choice of N is
+ within that range (&lt;=32 on i686-pc-linux-gnu, for example), then all
+ of the operations will be faster.
+</p><p>There are
+ versions of single-bit test, set, reset, and flip member functions which
+ do no range-checking. If we call them member functions of an instantiation
+ of "bitset&lt;N&gt;," then their names and signatures are:
+</p><pre class="programlisting">
+ bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos);
+ bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos, int val);
+ bitset&lt;N&gt;&amp; _Unchecked_reset (size_t pos);
+ bitset&lt;N&gt;&amp; _Unchecked_flip (size_t pos);
+ bool _Unchecked_test (size_t pos);
+ </pre><p>Note that these may in fact be removed in the future, although we have
+ no present plans to do so (and there doesn't seem to be any immediate
+ reason to).
+</p><p>The semantics of member function <code class="code">operator[]</code> are not specified
+ in the C++ standard. A long-standing defect report calls for sensible
+ obvious semantics, which are already implemented here: <code class="code">op[]</code>
+ on a const bitset returns a bool, and for a non-const bitset returns a
+ <code class="code">reference</code> (a nested type). However, this implementation does
+ no range-checking on the index argument, which is in keeping with other
+ containers' <code class="code">op[]</code> requirements. The defect report's proposed
+ resolution calls for range-checking to be done. We'll just wait and see...
+</p><p>Finally, two additional searching functions have been added. They return
+ the index of the first "on" bit, and the index of the first
+ "on" bit that is after <code class="code">prev</code>, respectively:
+</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="bk01pt12ch33.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt12ch33.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
new file mode 100644
index 00000000000..b89fad1d7ee
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
@@ -0,0 +1,50 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33s02.html" title="HP/SGI" /><link rel="next" href="bk01pt12ch34.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="bk01pt12ch34.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,
+ unordered_multimap containers in TR1 and the upcoming C++0x, and
+ may be removed in future releases.
+ </p><p>The SGI headers</p><pre class="programlisting">
+ &lt;hash_map&gt;
+ &lt;hash_set&gt;
+ &lt;rope&gt;
+ &lt;slist&gt;
+ &lt;rb_tree&gt;
+ </pre><p>are all here;
+ <code class="code">&lt;hash_map&gt;</code> and <code class="code">&lt;hash_set&gt;</code>
+ are deprecated but available as backwards-compatible extensions,
+ as discussed further below. <code class="code">&lt;rope&gt;</code> is the
+ SGI specialization for large strings ("rope,"
+ "large strings," get it? Love that geeky humor.)
+ <code class="code">&lt;slist&gt;</code> is a singly-linked list, for when the
+ doubly-linked <code class="code">list&lt;&gt;</code> is too much space
+ overhead, and <code class="code">&lt;rb_tree&gt;</code> exposes the red-black
+ tree classes used in the implementation of the standard maps and
+ sets.
+ </p><p>Each of the associative containers map, multimap, set, and multiset
+ have a counterpart which uses a
+ <a class="ulink" href="http://www.sgi.com/tech/stl/HashFunction.html" target="_top">hashing
+ function</a> to do the arranging, instead of a strict weak ordering
+ function. The classes take as one of their template parameters a
+ function object that will return the hash value; by default, an
+ instantiation of
+ <a class="ulink" href="http://www.sgi.com/tech/stl/hash.html" target="_top">hash</a>.
+ You should specialize this functor for your class, or define your own,
+ before trying to use one of the hashing classes.
+ </p><p>The hashing classes support all the usual associative container
+ functions, as well as some extra constructors specifying the number
+ of buckets, etc.
+ </p><p>Why would you want to use a hashing class instead of the
+ “<span class="quote">normal</span>â€implementations? Matt Austern writes:
+ </p><div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="emphasis"><em>[W]ith a well chosen hash function, hash tables
+ generally provide much better average-case performance than
+ binary search trees, and much worse worst-case performance. So
+ if your implementation has hash_map, if you don't mind using
+ nonstandard components, and if you aren't scared about the
+ 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="bk01pt12ch33.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch34.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch34.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34.html
new file mode 100644
index 00000000000..d338b35a671
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34.html
@@ -0,0 +1,38 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01pt12ch35.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. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch35.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>
+ 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:
+ </p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">identity_element</code> for addition and multiplication. *
+ </p></li><li><p>The functor <code class="code">identity</code>, whose <code class="code">operator()</code>
+ returns the argument unchanged. *
+ </p></li><li><p>Composition functors <code class="code">unary_function</code> and
+ <code class="code">binary_function</code>, and their helpers <code class="code">compose1</code>
+ and <code class="code">compose2</code>. *
+ </p></li><li><p><code class="code">select1st</code> and <code class="code">select2nd</code>, to strip pairs. *
+ </p></li><li><p><code class="code">project1st</code> and <code class="code">project2nd</code>. * </p></li><li><p>A set of functors/functions which always return the same result. They
+ are <code class="code">constant_void_fun</code>, <code class="code">constant_binary_fun</code>,
+ <code class="code">constant_unary_fun</code>, <code class="code">constant0</code>,
+ <code class="code">constant1</code>, and <code class="code">constant2</code>. * </p></li><li><p>The class <code class="code">subtractive_rng</code>. * </p></li><li><p>mem_fun adaptor helpers <code class="code">mem_fun1</code> and
+ <code class="code">mem_fun1_ref</code> are provided for backwards compatibility. </p></li></ul></div><p>
+ 20.4.1 can use several different allocators; they are described on the
+ main extensions page.
+</p><p>
+ 20.4.3 is extended with a special version of
+ <code class="code">get_temporary_buffer</code> taking a second argument. The
+ argument is a pointer, which is ignored, but can be used to specify
+ the template type (instead of using explicit function template
+ arguments like the standard version does). That is, in addition to
+</p><pre class="programlisting">
+get_temporary_buffer&lt;int&gt;(5);
+</pre><p>
+you can also use
+</p><pre class="programlisting">
+get_temporary_buffer(5, (int*)0);
+</pre><p>
+ A class <code class="code">temporary_buffer</code> is given in stl_tempbuf.h. *
+</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="bk01pt12ch35.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch35.html b/libstdc++-v3/doc/html/manual/bk01pt12ch35.html
new file mode 100644
index 00000000000..1ab65c963a7
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch35.html
@@ -0,0 +1,20 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch34.html" title="Chapter 34. Utilities" /><link rel="next" href="bk01pt12ch36.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="bk01pt12ch34.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch36.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
+ 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.,
+</p><pre class="programlisting">
+ void count (first, last, value, n);</pre><p>25.2 (mutating algorithms) is extended with two families of signatures,
+ random_sample and random_sample_n.
+</p><p>25.2.1 (copy) is extended with
+</p><pre class="programlisting">
+ copy_n (_InputIter first, _Size count, _OutputIter result);</pre><p>which copies the first 'count' elements at 'first' into 'result'.
+</p><p>25.3 (sorting 'n' heaps 'n' stuff) is extended with some helper
+ predicates. Look in the doxygen-generated pages for notes on these.
+</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">is_heap</code> tests whether or not a range is a heap.</p></li><li><p><code class="code">is_sorted</code> tests whether or not a range is sorted in
+ nondescending order.</p></li></ul></div><p>25.3.8 (lexigraphical_compare) is extended with
+</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="bk01pt12ch34.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="bk01pt12ch36.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch36.html b/libstdc++-v3/doc/html/manual/bk01pt12ch36.html
new file mode 100644
index 00000000000..81242336348
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch36.html
@@ -0,0 +1,17 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch35.html" title="Chapter 35. Algorithms" /><link rel="next" href="bk01pt12ch37.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="bk01pt12ch35.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch37.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
+ with the following functions:
+</p><pre class="programlisting">
+ power (x, n);
+ power (x, n, moniod_operation);</pre><p>Returns, in FORTRAN syntax, "x ** n" where n&gt;=0. In the
+ case of n == 0, returns the <a class="ulink" href="#ch20" target="_top">identity element</a> for the
+ monoid operation. The two-argument signature uses multiplication (for
+ a true "power" implementation), but addition is supported as well.
+ The operation functor must be associative.
+</p><p>The <code class="code">iota</code> function wins the award for Extension With the
+ Coolest Name. It "assigns sequentially increasing values to a range.
+ 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="bk01pt12ch35.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="bk01pt12ch37.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch37.html b/libstdc++-v3/doc/html/manual/bk01pt12ch37.html
new file mode 100644
index 00000000000..7c3d3cd3343
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch37.html
@@ -0,0 +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>Chapter 37. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch36.html" title="Chapter 36. Numerics" /><link rel="next" href="bk01pt12ch38.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="bk01pt12ch36.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch38.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
+ 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:
+</p><div class="itemizedlist"><ul type="disc"><li><p>input_iterator</p></li><li><p>output_iterator</p></li><li><p>forward_iterator</p></li><li><p>bidirectional_iterator</p></li><li><p>random_access_iterator</p></li></ul></div><p>24.3.4 describes iterator operation <code class="code">distance</code>, which takes
+ 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="bk01pt12ch36.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="bk01pt12ch38.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch38.html b/libstdc++-v3/doc/html/manual/bk01pt12ch38.html
new file mode 100644
index 00000000000..04ac340da8e
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch38.html
@@ -0,0 +1,48 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch37.html" title="Chapter 37. Iterators" /><link rel="next" href="bk01pt12ch39.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="bk01pt12ch37.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch39.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="bk01pt12ch38.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
+ <code class="code">std::filebuf</code>s from C stdio types such as
+ <code class="code">FILE*</code>s and POSIX file descriptors.
+ Today the recommended way to use stdio types with libstdc++
+ IOStreams is via the <code class="code">stdio_filebuf</code> class (see below),
+ but earlier releases provided slightly different mechanisms.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>3.0.x <code class="code">filebuf</code>s have another ctor with this signature:
+ <code class="code">basic_filebuf(__c_file_type*, ios_base::openmode, int_type);
+ </code>
+ This comes in very handy in a number of places, such as
+ attaching Unix sockets, pipes, and anything else which uses file
+ descriptors, into the IOStream buffering classes. The three
+ arguments are as follows:
+ </p><div class="itemizedlist"><ul type="circle"><li><p><code class="code">__c_file_type* F </code>
+ // the __c_file_type typedef usually boils down to stdio's FILE
+ </p></li><li><p><code class="code">ios_base::openmode M </code>
+ // same as all the other uses of openmode
+ </p></li><li><p><code class="code">int_type B </code>
+ // buffer size, defaults to BUFSIZ if not specified
+ </p></li></ul></div><p>
+ For those wanting to use file descriptors instead of FILE*'s, I
+ invite you to contemplate the mysteries of C's <code class="code">fdopen()</code>.
+ </p></li><li><p>In library snapshot 3.0.95 and later, <code class="code">filebuf</code>s bring
+ back an old extension: the <code class="code">fd()</code> member function. The
+ integer returned from this function can be used for whatever file
+ descriptors can be used for on your platform. Naturally, the
+ library cannot track what you do on your own with a file descriptor,
+ so if you perform any I/O directly, don't expect the library to be
+ aware of it.
+ </p></li><li><p>Beginning with 3.1, the extra <code class="code">filebuf</code> constructor and
+ the <code class="code">fd()</code> function were removed from the standard
+ filebuf. Instead, <code class="code">&lt;ext/stdio_filebuf.h&gt;</code> contains
+ a derived class called
+ <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html" target="_top"><code class="code">__gnu_cxx::stdio_filebuf</code></a>.
+ This class can be constructed from a C <code class="code">FILE*</code> or a file
+ descriptor, and provides the <code class="code">fd()</code> function.
+ </p></li></ul></div><p>If you want to access a <code class="code">filebuf</code>'s file descriptor to
+ implement file locking (e.g. using the <code class="code">fcntl()</code> system
+ call) then you might be interested in Henry Suter's
+ <a class="ulink" href="http://suter.home.cern.ch/suter/RWLock.html" target="_top">RWLock</a>
+ 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="bk01pt12ch37.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="bk01pt12ch39.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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch39.html b/libstdc++-v3/doc/html/manual/bk01pt12ch39.html
new file mode 100644
index 00000000000..666a384f507
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch39.html
@@ -0,0 +1,71 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch38.html" title="Chapter 38. Input and Output" /><link rel="next" href="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="bk01pt12ch38.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="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>
+ Transforming C++ ABI itentifiers (like RTTI symbols) into the
+ original C++ source identifiers is called
+ “<span class="quote">demangling.</span>â€
+ </p><p>
+ If you have read the <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaceabi.html" target="_top">source
+ documentation for <code class="code">namespace abi</code></a> then you are
+ aware of the cross-vendor C++ ABI in use by GCC. One of the
+ exposed functions is used for demangling,
+ <code class="code">abi::__cxa_demangle</code>.
+ </p><p>
+ In programs like <span class="command"><strong>c++filt</strong></span>, the linker, and other tools
+ have the ability to decode C++ ABI names, and now so can you.
+ </p><p>
+ (The function itself might use different demanglers, but that's the
+ whole point of abstract interfaces. If we change the implementation,
+ you won't notice.)
+ </p><p>
+ Probably the only times you'll be interested in demangling at runtime
+ are when you're seeing <code class="code">typeid</code> strings in RTTI, or when
+ you're handling the runtime-support exception classes. For example:
+ </p><pre class="programlisting">
+#include &lt;exception&gt;
+#include &lt;iostream&gt;
+#include &lt;cxxabi.h&gt;
+
+struct empty { };
+
+template &lt;typename T, int N&gt;
+ struct bar { };
+
+
+int main()
+{
+ int status;
+ char *realname;
+
+ // exception classes not in &lt;stdexcept&gt;, thrown by the implementation
+ // instead of the user
+ std::bad_exception e;
+ realname = abi::__cxa_demangle(e.what(), 0, 0, &amp;status);
+ std::cout &lt;&lt; e.what() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
+ free(realname);
+
+
+ // typeid
+ bar&lt;empty,17&gt; u;
+ const std::type_info &amp;ti = typeid(u);
+
+ realname = abi::__cxa_demangle(ti.name(), 0, 0, &amp;status);
+ std::cout &lt;&lt; ti.name() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
+ free(realname);
+
+ return 0;
+}
+ </pre><p>
+ This prints
+ </p><pre class="screen">
+ <code class="computeroutput">
+ St13bad_exception =&gt; std::bad_exception : 0
+ 3barI5emptyLi17EE =&gt; bar&lt;empty, 17&gt; : 0
+ </code>
+ </pre><p>
+ The demangler interface is described in the source documentation
+ linked to above. It is actually written in C, so you don't need to
+ 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="bk01pt12ch38.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="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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
new file mode 100644
index 00000000000..6f1f5df4b23
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
@@ -0,0 +1,38 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="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="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 Builitin 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,
+using them directly is problematic, and can result in undefined
+function calls. (An example of an undefined symbol from the use
+of <code class="code">__sync_fetch_and_add</code> on an unsupported host is a
+missing reference to <code class="code">__sync_fetch_and_add_4</code>.)
+</p><p>In addition, on some hosts the compiler intrinsics are enabled
+conditionally, via the <code class="code">-march</code> command line flag. This makes
+usage vary depending on the target hardware and the flags used during
+compile.
+</p><p> If builtins are possible, <code class="code">_GLIBCXX_ATOMIC_BUILTINS</code>
+will be defined.
+</p><p>For the following hosts, intrinsics are enabled by default.
+</p><div class="itemizedlist"><ul type="disc"><li><p>alpha</p></li><li><p>ia64</p></li><li><p>powerpc</p></li><li><p>s390</p></li></ul></div><p>For others, some form of <code class="code">-march</code> may work. On
+non-ancient x86 hardware, <code class="code">-march=native</code> usually does the
+trick.</p><p> For hosts without compiler intrinsics, but with capable
+hardware, hand-crafted assembly is selected. This is the case for the following hosts:
+</p><div class="itemizedlist"><ul type="disc"><li><p>cris</p></li><li><p>hppa</p></li><li><p>i386</p></li><li><p>i486</p></li><li><p>m48k</p></li><li><p>mips</p></li><li><p>sparc</p></li></ul></div><p>And for the rest, a simulated atomic lock via pthreads.
+</p><p> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" target="_top"> documentation</a>.
+</p><p> More details on the library fallbacks from the porting <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting.html#Thread%20safety" target="_top">section</a>.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.thread"></a>Thread Abstraction</h3></div></div></div><p>A thin layer above IEEE 1003.1 (ie pthreads) is used to abstract
+the thread interface for GCC. This layer is called "gthread," and is
+comprised of one header file that wraps the host's default thread layer with
+a POSIX-like interface.
+</p><p> The file &lt;gthr-default.h&gt; points to the deduced wrapper for
+the current host. In libstdc++ implementation files,
+&lt;bits/gthr.h&gt; is used to select the proper gthreads file.
+</p><p>Within libstdc++ sources, all calls to underlying thread functionality
+use this layer. More detail as to the specific interface can be found in the source <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/gthr_8h-source.html" target="_top">documentation</a>.
+</p><p>By design, the gthread layer is interoperable with the types,
+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="concurrency.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="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>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
new file mode 100644
index 00000000000..b67d0f7fbf5
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
@@ -0,0 +1,34 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="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:
+</p><pre class="programlisting">
+#include &lt;ext/concurrence.h&gt;
+
+namespace
+{
+ __gnu_cxx::__mutex safe_base_mutex;
+} // anonymous namespace
+
+namespace other
+{
+ void
+ foo()
+ {
+ __gnu_cxx::__scoped_lock sentry(safe_base_mutex);
+ for (int i = 0; i &lt; max; ++i)
+ {
+ _Safe_iterator_base* __old = __iter;
+ __iter = __iter-&lt;_M_next;
+ __old-&lt;_M_detach_single();
+ }
+}
+</pre><p>In this sample code, an anonymous namespace is used to keep
+the <code class="code">__mutex</code> private to the compilation unit,
+and <code class="code">__scoped_lock</code> is used to guard access to the critical
+section within the for loop, locking the mutex on creation and freeing
+the mutex as control moves out of this block.
+</p><p>Several exception classes are used to keep track of
+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="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
new file mode 100644
index 00000000000..79d6d356f2c
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
@@ -0,0 +1,21 @@
+<?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></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01pt12ch29.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="bk01pt12ch29.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="id516952"></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.
+</p><p><span class="emphasis"><em>Before</em></span> you leap in and use any of these
+extensions, be aware of two things:
+</p><div class="orderedlist"><ol type="1"><li><p>
+ Non-Standard means exactly that.
+ </p><p>
+ The behavior, and the very
+ existence, of these extensions may change with little or no
+ warning. (Ideally, the really good ones will appear in the next
+ revision of C++.) Also, other platforms, other compilers, other
+ versions of g++ or libstdc++ may not recognize these names, or
+ treat them differently, or...
+ </p></li><li><p>
+ You should know how to <a class="ulink" href="XXX" target="_top">access
+ these headers properly</a>.
+ </p></li></ol></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="extensions.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="bk01pt12ch29.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part XII. Extensions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 29. Compile Time Checks</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/build.html b/libstdc++-v3/doc/html/manual/build.html
new file mode 100644
index 00000000000..4322717cf52
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/build.html
@@ -0,0 +1,95 @@
+<?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>Build</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; build&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Build</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="test.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.intro.setup.build"></a>Build</h2></div></div></div><p>
+ Because libstdc++ is part of GCC, the primary source for
+ installation instructions is
+ <a class="ulink" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>.
+ Additional data is given here only where it applies to libstdc++.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build.prereq"></a>Prerequisites</h3></div></div></div><p>
+ The list of software needed to build the library is kept with the
+ rest of the compiler, at
+ <a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">
+ http://gcc.gnu.org/install/prerequisites.html</a>. The same page
+ also lists the tools you will need if you wish to modify the source.
+ </p><p>As of GCC 4.0.1 the minimum version of binutils required to build
+ libstdc++ is <code class="code">2.15.90.0.1.1</code>. You can get snapshots
+ (as well as releases) of binutils from
+ <a class="ulink" href="ftp://sources.redhat.com/pub/binutils" target="_top">
+ ftp://sources.redhat.com/pub/binutils</a>.
+ Older releases of libstdc++ do not require such a recent version,
+ but to take full advantage of useful space-saving features and
+ bug-fixes you should use a recent binutils if possible.
+ The configure process will automatically detect and use these
+ features if the underlying support is present.
+ </p><p>
+ Finally, a few system-specific requirements:
+ </p><div class="variablelist"><dl><dt><span class="term">linux</span></dt><dd><p>
+ If gcc 3.1.0 or later on is being used on linux, an attempt
+ will be made to use "C" library functionality necessary for
+ C++ named locale support. For gcc 3.2.1 and later, this
+ means that glibc 2.2.5 or later is required and the "C"
+ library de_DE locale information must be installed.
+ </p><p>
+ Note however that the sanity checks involving the de_DE
+ locale are skipped when an explicit --enable-clocale=gnu
+ configure option is used: only the basic checks are carried
+ out, defending against misconfigurations.
+ </p><p>
+ If the 'gnu' locale model is being used, the following
+ locales are used and tested in the libstdc++ testsuites.
+ The first column is the name of the locale, the second is
+ the character set it is expected to use.
+ </p><pre class="programlisting">
+de_DE ISO-8859-1
+de_DE@euro ISO-8859-15
+en_HK ISO-8859-1
+en_PH ISO-8859-1
+en_US ISO-8859-1
+en_US.ISO-8859-1 ISO-8859-1
+en_US.ISO-8859-15 ISO-8859-15
+en_US.UTF-8 UTF-8
+es_ES ISO-8859-1
+es_MX ISO-8859-1
+fr_FR ISO-8859-1
+fr_FR@euro ISO-8859-15
+is_IS UTF-8
+it_IT ISO-8859-1
+ja_JP.eucjp EUC-JP
+se_NO.UTF-8 UTF-8
+ta_IN UTF-8
+zh_TW BIG5
+</pre><p>Failure to have the underlying "C" library locale
+ information installed will mean that C++ named locales for the
+ above regions will not work: because of this, the libstdc++
+ testsuite will skip the named locale tests. If this isn't an
+ issue, don't worry about it. If named locales are needed, the
+ underlying locale information must be installed. Note that
+ rebuilding libstdc++ after the "C" locales are installed is not
+ necessary.
+ </p><p>
+ To install support for locales, do only one of the following:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>install all locales</p><div class="itemizedlist"><ul type="circle"><li><p>with RedHat Linux:
+ </p><p> <code class="code"> export LC_ALL=C </code>
+ </p><p> <code class="code"> rpm -e glibc-common --nodeps </code>
+ </p><p>
+ <code class="code"> rpm -i --define "_install_langs all"
+ glibc-common-2.2.5-34.i386.rpm
+ </code>
+ </p></li><li><p>
+ Instructions for other operating systems solicited.
+ </p></li></ul></div></li><li><p>install just the necessary locales</p><div class="itemizedlist"><ul type="circle"><li><p>with Debian Linux:</p><p> Add the above list, as shown, to the file
+ <code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li><p>
+ Instructions for other operating systems solicited.
+ </p></li></ul></div></li></ul></div></dd></dl></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build.configure"></a>Make</h3></div></div></div><p>If you have never done this before, you should read the basic
+ <a class="ulink" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
+ Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
+ <span class="emphasis"><em>Twice.</em></span>
+ </p><p>When building libstdc++ you'll have to configure
+ the entire <span class="emphasis"><em>gccsrcdir</em></span> directory. The full list of libstdc++
+ specific configuration options, not dependent on the specific compiler
+ release being used, can be found <a class="ulink" href="configopts.html" target="_top">here</a>.
+ </p><p>Consider possibly using --enable-languages=c++ to save time by only
+ building the C++ language parts.
+ </p><pre class="programlisting">
+ cd <span class="emphasis"><em>gccbuilddir</em></span>
+ <span class="emphasis"><em>gccsrcdir</em></span>/configure --prefix=<span class="emphasis"><em>destdir</em></span> --other-opts...</pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Test</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/codecvt.html b/libstdc++-v3/doc/html/manual/codecvt.html
new file mode 100644
index 00000000000..17230b9b3c1
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/codecvt.html
@@ -0,0 +1,379 @@
+<?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>codecvt</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; codecvt&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="next" href="messages.html" title="messages" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">codecvt</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch15.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="messages.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.localization.facet.codecvt"></a>codecvt</h2></div></div></div><p>
+The standard class codecvt attempts to address conversions between
+different character encoding schemes. In particular, the standard
+attempts to detail conversions between the implementation-defined wide
+characters (hereafter referred to as wchar_t) and the standard type
+char that is so beloved in classic “<span class="quote">C</span>†(which can now be
+referred to as narrow characters.) This document attempts to describe
+how the GNU libstdc++ implementation deals with the conversion between
+wide and narrow characters, and also presents a framework for dealing
+with the huge number of other encodings that iconv can convert,
+including Unicode and UTF8. Design issues and requirements are
+addressed, and examples of correct usage for both the required
+specializations for wide and narrow characters and the
+implementation-provided extended functionality are given.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.req"></a>Requirements</h3></div></div></div><p>
+Around page 425 of the C++ Standard, this charming heading comes into view:
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+22.2.1.5 - Template class codecvt
+</p></blockquote></div><p>
+The text around the codecvt definition gives some clues:
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-1- The class codecvt&lt;internT,externT,stateT&gt; is for use when
+converting from one codeset to another, such as from wide characters
+to multibyte characters, between wide character encodings such as
+Unicode and EUC.
+</em></span>
+</p></blockquote></div><p>
+Hmm. So, in some unspecified way, Unicode encodings and
+translations between other character sets should be handled by this
+class.
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-2- The stateT argument selects the pair of codesets being mapped between.
+</em></span>
+</p></blockquote></div><p>
+Ah ha! Another clue...
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-3- The instantiations required in the Table ??
+(lib.locale.category), namely codecvt&lt;wchar_t,char,mbstate_t&gt; and
+codecvt&lt;char,char,mbstate_t&gt;, convert the implementation-defined
+native character set. codecvt&lt;char,char,mbstate_t&gt; implements a
+degenerate conversion; it does not convert at
+all. codecvt&lt;wchar_t,char,mbstate_t&gt; converts between the native
+character sets for tiny and wide characters. Instantiations on
+mbstate_t perform conversion between encodings known to the library
+implementor. Other encodings can be converted by specializing on a
+user-defined stateT type. The stateT object can contain any state that
+is useful to communicate to or from the specialized do_convert member.
+</em></span>
+</p></blockquote></div><p>
+At this point, a couple points become clear:
+</p><p>
+One: The standard clearly implies that attempts to add non-required
+(yet useful and widely used) conversions need to do so through the
+third template parameter, stateT.</p><p>
+Two: The required conversions, by specifying mbstate_t as the third
+template parameter, imply an implementation strategy that is mostly
+(or wholly) based on the underlying C library, and the functions
+mcsrtombs and wcsrtombs in particular.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.design"></a>Design</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="codecvt.design.wchar_t_size"></a><span class="type">wchar_t</span> Size</h4></div></div></div><p>
+ The simple implementation detail of wchar_t's size seems to
+ repeatedly confound people. Many systems use a two byte,
+ unsigned integral type to represent wide characters, and use an
+ internal encoding of Unicode or UCS2. (See AIX, Microsoft NT,
+ Java, others.) Other systems, use a four byte, unsigned integral
+ type to represent wide characters, and use an internal encoding
+ of UCS4. (GNU/Linux systems using glibc, in particular.) The C
+ programming language (and thus C++) does not specify a specific
+ size for the type wchar_t.
+ </p><p>
+ Thus, portable C++ code cannot assume a byte size (or endianness) either.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="codecvt.design.unicode"></a>Support for Unicode</h4></div></div></div><p>
+ Probably the most frequently asked question about code conversion
+ is: "So dudes, what's the deal with Unicode strings?"
+ The dude part is optional, but apparently the usefulness of
+ Unicode strings is pretty widely appreciated. Sadly, this specific
+ encoding (And other useful encodings like UTF8, UCS4, ISO 8859-10,
+ etc etc etc) are not mentioned in the C++ standard.
+ </p><p>
+ A couple of comments:
+ </p><p>
+ The thought that all one needs to convert between two arbitrary
+ codesets is two types and some kind of state argument is
+ unfortunate. In particular, encodings may be stateless. The naming
+ of the third parameter as stateT is unfortunate, as what is really
+ needed is some kind of generalized type that accounts for the
+ issues that abstract encodings will need. The minimum information
+ that is required includes:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Identifiers for each of the codesets involved in the
+ conversion. For example, using the iconv family of functions
+ from the Single Unix Specification (what used to be called
+ X/Open) hosted on the GNU/Linux operating system allows
+ bi-directional mapping between far more than the following
+ tantalizing possibilities:
+ </p><p>
+ (An edited list taken from <code class="code">`iconv --list`</code> on a
+ Red Hat 6.2/Intel system:
+ </p><div class="blockquote"><blockquote class="blockquote"><pre class="programlisting">
+8859_1, 8859_9, 10646-1:1993, 10646-1:1993/UCS4, ARABIC, ARABIC7,
+ASCII, EUC-CN, EUC-JP, EUC-KR, EUC-TW, GREEK-CCIcode, GREEK, GREEK7-OLD,
+GREEK7, GREEK8, HEBREW, ISO-8859-1, ISO-8859-2, ISO-8859-3,
+ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8,
+ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14,
+ISO-8859-15, ISO-10646, ISO-10646/UCS2, ISO-10646/UCS4,
+ISO-10646/UTF-8, ISO-10646/UTF8, SHIFT-JIS, SHIFT_JIS, UCS-2, UCS-4,
+UCS2, UCS4, UNICODE, UNICODEBIG, UNICODELIcodeLE, US-ASCII, US, UTF-8,
+UTF-16, UTF8, UTF16).
+</pre></blockquote></div><p>
+For iconv-based implementations, string literals for each of the
+encodings (ie. "UCS-2" and "UTF-8") are necessary,
+although for other,
+non-iconv implementations a table of enumerated values or some other
+mechanism may be required.
+</p></li><li><p>
+ Maximum length of the identifying string literal.
+</p></li><li><p>
+ Some encodings require explicit endian-ness. As such, some kind
+ of endian marker or other byte-order marker will be necessary. See
+ "Footnotes for C/C++ developers" in Haible for more information on
+ UCS-2/Unicode endian issues. (Summary: big endian seems most likely,
+ however implementations, most notably Microsoft, vary.)
+</p></li><li><p>
+ Types representing the conversion state, for conversions involving
+ the machinery in the "C" library, or the conversion descriptor, for
+ conversions using iconv (such as the type iconv_t.) Note that the
+ conversion descriptor encodes more information than a simple encoding
+ state type.
+</p></li><li><p>
+ Conversion descriptors for both directions of encoding. (ie, both
+ UCS-2 to UTF-8 and UTF-8 to UCS-2.)
+</p></li><li><p>
+ Something to indicate if the conversion requested if valid.
+</p></li><li><p>
+ Something to represent if the conversion descriptors are valid.
+</p></li><li><p>
+ Some way to enforce strict type checking on the internal and
+ external types. As part of this, the size of the internal and
+ external types will need to be known.
+</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="codecvt.design.issues"></a>Other Issues</h4></div></div></div><p>
+In addition, multi-threaded and multi-locale environments also impact
+the design and requirements for code conversions. In particular, they
+affect the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt;
+when implemented using standard "C" functions.
+</p><p>
+Three problems arise, one big, one of medium importance, and one small.
+</p><p>
+First, the small: mcsrtombs and wcsrtombs may not be multithread-safe
+on all systems required by the GNU tools. For GNU/Linux and glibc,
+this is not an issue.
+</p><p>
+Of medium concern, in the grand scope of things, is that the functions
+used to implement this specialization work on null-terminated
+strings. Buffers, especially file buffers, may not be null-terminated,
+thus giving conversions that end prematurely or are otherwise
+incorrect. Yikes!
+</p><p>
+The last, and fundamental problem, is the assumption of a global
+locale for all the "C" functions referenced above. For something like
+C++ iostreams (where codecvt is explicitly used) the notion of
+multiple locales is fundamental. In practice, most users may not run
+into this limitation. However, as a quality of implementation issue,
+the GNU C++ library would like to offer a solution that allows
+multiple locales and or simultaneous usage with computationally
+correct results. In short, libstdc++ is trying to offer, as an
+option, a high-quality implementation, damn the additional complexity!
+</p><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
+LC_CTYPE category implements.
+</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.impl"></a>Implementation</h3></div></div></div><p>
+The two required specializations are implemented as follows:
+</p><p>
+<code class="code">
+codecvt&lt;char, char, mbstate_t&gt;
+</code>
+</p><p>
+This is a degenerate (ie, does nothing) specialization. Implementing
+this was a piece of cake.
+</p><p>
+<code class="code">
+codecvt&lt;char, wchar_t, mbstate_t&gt;
+</code>
+</p><p>
+This specialization, by specifying all the template parameters, pretty
+much ties the hands of implementors. As such, the implementation is
+straightforward, involving mcsrtombs for the conversions between char
+to wchar_t and wcsrtombs for conversions between wchar_t and char.
+</p><p>
+Neither of these two required specializations deals with Unicode
+characters. As such, libstdc++ implements a partial specialization
+of the codecvt class with and iconv wrapper class, encoding_state as the
+third template parameter.
+</p><p>
+This implementation should be standards conformant. First of all, the
+standard explicitly points out that instantiations on the third
+template parameter, stateT, are the proper way to implement
+non-required conversions. Second of all, the standard says (in Chapter
+17) that partial specializations of required classes are a-ok. Third
+of all, the requirements for the stateT type elsewhere in the standard
+(see 21.1.2 traits typedefs) only indicate that this type be copy
+constructible.
+</p><p>
+As such, the type encoding_state is defined as a non-templatized, POD
+type to be used as the third type of a codecvt instantiation. This
+type is just a wrapper class for iconv, and provides an easy interface
+to iconv functionality.
+</p><p>
+There are two constructors for encoding_state:
+</p><p>
+<code class="code">
+encoding_state() : __in_desc(0), __out_desc(0)
+</code>
+</p><p>
+This default constructor sets the internal encoding to some default
+(currently UCS4) and the external encoding to whatever is returned by
+nl_langinfo(CODESET).
+</p><p>
+<code class="code">
+encoding_state(const char* __int, const char* __ext)
+</code>
+</p><p>
+This constructor takes as parameters string literals that indicate the
+desired internal and external encoding. There are no defaults for
+either argument.
+</p><p>
+One of the issues with iconv is that the string literals identifying
+conversions are not standardized. Because of this, the thought of
+mandating and or enforcing some set of pre-determined valid
+identifiers seems iffy: thus, a more practical (and non-migraine
+inducing) strategy was implemented: end-users can specify any string
+(subject to a pre-determined length qualifier, currently 32 bytes) for
+encodings. It is up to the user to make sure that these strings are
+valid on the target system.
+</p><p>
+<code class="code">
+void
+_M_init()
+</code>
+</p><p>
+Strangely enough, this member function attempts to open conversion
+descriptors for a given encoding_state object. If the conversion
+descriptors are not valid, the conversion descriptors returned will
+not be valid and the resulting calls to the codecvt conversion
+functions will return error.
+</p><p>
+<code class="code">
+bool
+_M_good()
+</code>
+</p><p>
+Provides a way to see if the given encoding_state object has been
+properly initialized. If the string literals describing the desired
+internal and external encoding are not valid, initialization will
+fail, and this will return false. If the internal and external
+encodings are valid, but iconv_open could not allocate conversion
+descriptors, this will also return false. Otherwise, the object is
+ready to convert and will return true.
+</p><p>
+<code class="code">
+encoding_state(const encoding_state&amp;)
+</code>
+</p><p>
+As iconv allocates memory and sets up conversion descriptors, the copy
+constructor can only copy the member data pertaining to the internal
+and external code conversions, and not the conversion descriptors
+themselves.
+</p><p>
+Definitions for all the required codecvt member functions are provided
+for this specialization, and usage of codecvt&lt;internal character type,
+external character type, encoding_state&gt; is consistent with other
+codecvt usage.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.use"></a>Use</h3></div></div></div><p>A conversions involving string literal.</p><pre class="programlisting">
+ typedef codecvt_base::result result;
+ typedef unsigned short unicode_t;
+ typedef unicode_t int_type;
+ typedef char ext_type;
+ typedef encoding_state state_type;
+ typedef codecvt&lt;int_type, ext_type, state_type&gt; unicode_codecvt;
+
+ const ext_type* e_lit = "black pearl jasmine tea";
+ int size = strlen(e_lit);
+ int_type i_lit_base[24] =
+ { 25088, 27648, 24832, 25344, 27392, 8192, 28672, 25856, 24832, 29184,
+ 27648, 8192, 27136, 24832, 29440, 27904, 26880, 28160, 25856, 8192, 29696,
+ 25856, 24832, 2560
+ };
+ const int_type* i_lit = i_lit_base;
+ const ext_type* efrom_next;
+ const int_type* ifrom_next;
+ ext_type* e_arr = new ext_type[size + 1];
+ ext_type* eto_next;
+ int_type* i_arr = new int_type[size + 1];
+ int_type* ito_next;
+
+ // construct a locale object with the specialized facet.
+ locale loc(locale::classic(), new unicode_codecvt);
+ // sanity check the constructed locale has the specialized facet.
+ VERIFY( has_facet&lt;unicode_codecvt&gt;(loc) );
+ const unicode_codecvt&amp; cvt = use_facet&lt;unicode_codecvt&gt;(loc);
+ // convert between const char* and unicode strings
+ unicode_codecvt::state_type state01("UNICODE", "ISO_8859-1");
+ initialize_state(state01);
+ result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
+ i_arr, i_arr + size, ito_next);
+ VERIFY( r1 == codecvt_base::ok );
+ VERIFY( !int_traits::compare(i_arr, i_lit, size) );
+ VERIFY( efrom_next == e_lit + size );
+ VERIFY( ito_next == i_arr + size );
+</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.future"></a>Future</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ a. things that are sketchy, or remain unimplemented:
+ do_encoding, max_length and length member functions
+ are only weakly implemented. I have no idea how to do
+ this correctly, and in a generic manner. Nathan?
+</p></li><li><p>
+ b. conversions involving std::string
+ </p><div class="itemizedlist"><ul type="circle"><li><p>
+ how should operators != and == work for string of
+ different/same encoding?
+ </p></li><li><p>
+ what is equal? A byte by byte comparison or an
+ encoding then byte comparison?
+ </p></li><li><p>
+ conversions between narrow, wide, and unicode strings
+ </p></li></ul></div></li><li><p>
+ c. conversions involving std::filebuf and std::ostream
+</p><div class="itemizedlist"><ul type="circle"><li><p>
+ how to initialize the state object in a
+ standards-conformant manner?
+ </p></li><li><p>
+ how to synchronize the "C" and "C++"
+ conversion information?
+ </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="id400718"></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="id487971"></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="id452178"></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="id452196"></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="id461282"></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="id461308"></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="id494830"></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="id417572"></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="id417604"></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="id427552"></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">
+ </a>
+ . </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="bk01pt06ch15.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt06ch15.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="messages.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 15. Facets aka Categories </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> messages</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/concurrency.html b/libstdc++-v3/doc/html/manual/concurrency.html
new file mode 100644
index 00000000000..6b3705aabc2
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/concurrency.html
@@ -0,0 +1,88 @@
+<?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.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch39.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="bk01pt12ch39.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="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="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 Builitin 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
+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>
+These types can be used in a portable manner, regardless of the
+specific environment. They are carefully designed to provide optimum
+efficiency and speed, abstracting out underlying thread calls and
+accesses when compiling for single-threaded situations (even on hosts
+that support multiple threads.)
+</p><p>The enumerated type <code class="code">_Lock_policy</code> details the set of
+available locking
+policies: <code class="code">_S_single</code>, <code class="code">_S_mutex</code>,
+and <code class="code">_S_atomic</code>.
+</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">_S_single</code></p><p>Indicates single-threaded code that does not need locking.
+</p></li><li><p><code class="code">_S_mutex</code></p><p>Indicates multi-threaded code using thread-layer abstractions.
+</p></li><li><p><code class="code">_S_atomic</code></p><p>Indicates multi-threaded code using atomic operations.
+</p></li></ul></div><p>The compile-time constant <code class="code">__default_lock_policy</code> is set
+to one of the three values above, depending on characteristics of the
+host environment and the current compilation flags.
+</p><p>Two more datatypes make up the rest of the
+interface: <code class="code">__mutex</code>, and <code class="code">__scoped_lock</code>.
+</p><p>
+</p><p>The scoped lock idiom is well-discussed within the C++
+community. This version takes a <code class="code">__mutex</code> reference, and
+locks it during construction of <code class="code">__scoped_locke</code> and
+unlocks it during destruction. This is an efficient way of locking
+critical sections, while retaining exception-safety.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.atomics"></a>Interface to Atomic Functions</h3></div></div></div><p>
+Two functions and one type form the base of atomic support.
+</p><p>The type <code class="code">_Atomic_word</code> is a signed integral type
+supporting atomic operations.
+</p><p>
+The two functions functions are:
+</p><pre class="programlisting">
+_Atomic_word
+__exchange_and_add_dispatch(volatile _Atomic_word*, int);
+
+void
+__atomic_add_dispatch(volatile _Atomic_word*, int);
+</pre><p>Both of these functions are declared in the header file
+&lt;ext/atomicity.h&gt;, and are in <code class="code">namespace __gnu_cxx</code>.
+</p><div class="itemizedlist"><ul type="disc"><li><p>
+<code class="code">
+__exchange_and_add_dispatch
+</code>
+</p><p>Adds the second argument's value to the first argument. Returns the old value.
+</p></li><li><p>
+<code class="code">
+__atomic_add_dispatch
+</code>
+</p><p>Adds the second argument's value to the first argument. Has no return value.
+</p></li></ul></div><p>
+These functions forward to one of several specialized helper
+functions, depending on the circumstances. For instance,
+</p><p>
+<code class="code">
+__exchange_and_add_dispatch
+</code>
+</p><p>
+Calls through to either of:
+</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">__exchange_and_add</code>
+</p><p>Multi-thread version. Inlined if compiler-generated builtin atomics
+can be used, otherwise resolved at link time to a non-builtin code
+sequence.
+</p></li><li><p><code class="code">__exchange_and_add_single</code>
+</p><p>Single threaded version. Inlined.</p></li></ul></div><p>However, only <code class="code">__exchange_and_add_dispatch</code>
+and <code class="code">__atomic_add_dispatch</code> should be used. These functions
+can be used in a portable manner, regardless of the specific
+environment. They are carefully designed to provide optimum efficiency
+and speed, abstracting out atomic accesses when they are not required
+(even on hosts that support compiler intrinsics for atomic
+operations.)
+</p><p>
+In addition, there are two macros
+</p><p>
+<code class="code">
+_GLIBCXX_READ_MEM_BARRIER
+</code>
+</p><p>
+<code class="code">
+_GLIBCXX_WRITE_MEM_BARRIER
+</code>
+</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="bk01pt12ch39.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>
diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html
new file mode 100644
index 00000000000..cb5eb15b540
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/containers.html
@@ -0,0 +1,3 @@
+<?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>Part VII. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="messages.html" title="messages" /><link rel="next" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VII. Containers</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="bk01pt07ch16.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.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="bk01pt07ch16.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
new file mode 100644
index 00000000000..9dd254e2981
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/debug.html
@@ -0,0 +1,148 @@
+<?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>Debugging Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s06.html" title="Exception Safety" /><link rel="next" href="support.html" title="Part II. Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s06.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="support.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.intro.using.debug"></a>Debugging Support</h2></div></div></div><p>
+ There are numerous things that can be done to improve the ease with
+ which C++ binaries are debugged when using the GNU tool chain. Here
+ are some of them.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.compiler"></a>Using <span class="command"><strong>g++</strong></span></h3></div></div></div><p>
+ Compiler flags determine how debug information is transmitted
+ between compilation and debug or analysis tools.
+ </p><p>
+ The default optimizations and debug flags for a libstdc++ build
+ are <code class="code">-g -O2</code>. However, both debug and optimization
+ flags can be varied to change debugging characteristics. For
+ instance, turning off all optimization via the <code class="code">-g -O0</code>
+ flag will disable inlining, so that stepping through all
+ functions, including inlined constructors and destructors, is
+ possible. In addition,
+ <code class="code">-fno-eliminate-unused-debug-types</code> can be used when
+ additional debug information, such as nested class info, is
+ desired.
+</p><p>
+ Or, the debug format that the compiler and debugger use to
+ communicate information about source constructs can be changed via
+ <code class="code"> -gdwarf-2 </code> or <code class="code"> -gstabs </code> flags: some
+ debugging formats permit more expressive type and scope information
+ to be shown in gdb. The default debug information for a particular
+ platform can be identified via the value set by the
+ PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
+</p><p>
+ Many other options are available: please see <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options" target="_top">"Options
+ for Debugging Your Program"</a> in Using the GNU Compiler
+ Collection (GCC) for a complete list.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.req"></a>Debug Versions of Library Binary Files</h3></div></div></div><p>
+ If you would like debug symbols in libstdc++, there are two ways to
+ build libstdc++ with debug flags. The first is to run make from the
+ toplevel in a freshly-configured tree with
+</p><pre class="programlisting">
+ --enable-libstdcxx-debug
+</pre><p>and perhaps</p><pre class="programlisting">
+ --enable-libstdcxx-debug-flags='...'
+</pre><p>
+ to create a separate debug build. Both the normal build and the
+ debug build will persist, without having to specify
+ <code class="code">CXXFLAGS</code>, and the debug library will be installed in a
+ separate directory tree, in <code class="code">(prefix)/lib/debug</code>. For
+ more information, look at the <a class="ulink" href="configopts.html" target="_top">configuration options</a> document.
+</p><p>
+ A second approach is to use the configuration flags
+</p><pre class="programlisting">
+ make CXXFLAGS='-g3 -O0' all
+</pre><p>
+ This quick and dirty approach is often sufficient for quick
+ debugging tasks, when you cannot or don't want to recompile your
+ application to use the <a class="ulink" href="#safe" target="_top">debug mode</a>.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.memory"></a>Memory Leak Hunting</h3></div></div></div><p>
+ There are various third party memory tracing and debug utilities
+ that can be used to provide detailed memory allocation information
+ about C++ code. An exhaustive list of tools is not going to be
+ attempted, but includes <code class="code">mtrace</code>, <code class="code">valgrind</code>,
+ <code class="code">mudflap</code>, and the non-free commercial product
+ <code class="code">purify</code>. In addition, <code class="code">libcwd</code> has a
+ replacement for the global new and delete operators that can track
+ memory allocation and deallocation and provide useful memory
+ statistics.
+</p><p>
+ Regardless of the memory debugging tool being used, there is one
+ thing of great importance to keep in mind when debugging C++ code
+ that uses <code class="code">new</code> and <code class="code">delete</code>: there are
+ different kinds of allocation schemes that can be used by <code class="code">
+ std::allocator </code>. For implementation details, see the <a class="ulink" href="ext/mt_allocator.html" target="_top">mt allocator</a> documentation and
+ look specifically for <code class="code">GLIBCXX_FORCE_NEW</code>.
+</p><p>
+ In a nutshell, the default allocator used by <code class="code">
+ std::allocator</code> is a high-performance pool allocator, and can
+ give the mistaken impression that in a suspect executable, memory is
+ being leaked, when in reality the memory "leak" is a pool being used
+ by the library's allocator and is reclaimed after program
+ termination.
+</p><p>
+ For valgrind, there are some specific items to keep in mind. First
+ of all, use a version of valgrind that will work with current GNU
+ C++ tools: the first that can do this is valgrind 1.0.4, but later
+ versions should work at least as well. Second of all, use a
+ completely unoptimized build to avoid confusing valgrind. Third, use
+ GLIBCXX_FORCE_NEW to keep extraneous pool allocation noise from
+ cluttering debug information.
+</p><p>
+ Fourth, it may be necessary to force deallocation in other libraries
+ as well, namely the "C" library. On linux, this can be accomplished
+ with the appropriate use of the <code class="code">__cxa_atexit</code> or
+ <code class="code">atexit</code> functions.
+</p><pre class="programlisting">
+ #include &lt;cstdlib&gt;
+
+ extern "C" void __libc_freeres(void);
+
+ void do_something() { }
+
+ int main()
+ {
+ atexit(__libc_freeres);
+ do_something();
+ return 0;
+ }
+</pre><p>or, using <code class="code">__cxa_atexit</code>:</p><pre class="programlisting">
+ extern "C" void __libc_freeres(void);
+ extern "C" int __cxa_atexit(void (*func) (void *), void *arg, void *d);
+
+ void do_something() { }
+
+ int main()
+ {
+ extern void* __dso_handle __attribute__ ((__weak__));
+ __cxa_atexit((void (*) (void *)) __libc_freeres, NULL,
+ &amp;__dso_handle ? __dso_handle : NULL);
+ do_test();
+ return 0;
+ }
+</pre><p>
+ Suggested valgrind flags, given the suggestions above about setting
+ up the runtime environment, library, and test file, might be:
+</p><pre class="programlisting">
+ valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
+</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.gdb"></a>Using <span class="command"><strong>gdb</strong></span></h3></div></div></div><p>
+ </p><p>
+ Many options are available for gdb itself: please see <a class="ulink" href="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109" target="_top">
+ "GDB features for C++" </a> in the gdb documentation. Also
+ recommended: the other parts of this manual.
+</p><p>
+ These settings can either be switched on in at the gdb command line,
+ or put into a .gdbint file to establish default debugging
+ characteristics, like so:
+</p><pre class="programlisting">
+ set print pretty on
+ set print object on
+ set print static-members on
+ 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>
+ The <a class="link" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler">verbose
+ termination handler</a> gives information about uncaught
+ exceptions which are killing the program. It is described in the
+ linked-to page.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.debug_mode"></a>Debug Mode</h3></div></div></div><p> The <a class="link" href="debug_mode.html" title="Chapter 30. Debug Mode">Debug Mode</a>
+ 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="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks">Compile-Time
+ Checks</a> Extension has compile-time 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="bk01pt01ch03s06.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">Exception Safety </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</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/debug_mode.html b/libstdc++-v3/doc/html/manual/debug_mode.html
new file mode 100644
index 00000000000..fa9f7b7e3e8
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/debug_mode.html
@@ -0,0 +1,34 @@
+<?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 30. Debug Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /><link rel="next" href="bk01pt12ch30s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch29.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s02.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.debug_mode"></a>Chapter 30. Debug Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><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#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</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.debug_mode.intro"></a>Intro</h2></div></div></div><p>
+ By default, libstdc++ is built with efficiency in mind, and
+ therefore performs little or no error checking that is not
+ required by the C++ standard. This means that programs that
+ incorrectly use the C++ standard library will exhibit behavior
+ that is not portable and may not even be predictable, because they
+ tread into implementation-specific or undefined behavior. To
+ detect some of these errors before they can become problematic,
+ libstdc++ offers a debug mode that provides additional checking of
+ library facilities, and will report errors in the use of libstdc++
+ as soon as they can be detected by emitting a description of the
+ problem to standard error and aborting the program. This debug
+ mode is available with GCC 3.4.0 and later versions.
+ </p><p>
+ The libstdc++ debug mode performs checking for many areas of the
+ C++ standard, but the focus is on checking interactions among
+ standard iterators, containers, and algorithms, including:
+ </p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Safe iterators</em></span>: Iterators keep track of the
+ container whose elements they reference, so errors such as
+ incrementing a past-the-end iterator or dereferencing an iterator
+ that points to a container that has been destructed are diagnosed
+ immediately.</p></li><li><p><span class="emphasis"><em>Algorithm preconditions</em></span>: Algorithms attempt to
+ validate their input parameters to detect errors as early as
+ possible. For instance, the <code class="code">set_intersection</code>
+ algorithm requires that its iterator
+ parameters <code class="code">first1</code> and <code class="code">last1</code> form a valid
+ iterator range, and that the sequence
+ [<code class="code">first1</code>, <code class="code">last1</code>) is sorted according to
+ the same predicate that was passed
+ to <code class="code">set_intersection</code>; the libstdc++ debug mode will
+ detect an error if the sequence is not sorted or was sorted by a
+ different predicate.</p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch29.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="bk01pt12ch30s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 29. Compile Time Checks </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html
new file mode 100644
index 00000000000..4557c13d9c9
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/diagnostics.html
@@ -0,0 +1,3 @@
+<?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>Part III. Diagnostics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /><link rel="next" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part III. Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.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="bk01pt02ch06s02.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="bk01pt03ch07.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/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html
new file mode 100644
index 00000000000..bbd57bafde9
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/extensions.html
@@ -0,0 +1,3 @@
+<?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>Part XII. Extensions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt11ch28s02.html" title="Performance" /><link rel="next" href="bk01pt12pr03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XII. Extensions</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</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="bk01pt12ch29.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#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.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.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#manual.ext.parallel_mode.usings">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#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.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="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.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="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.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="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="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 Builitin 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>
diff --git a/libstdc++-v3/doc/html/manual/internals.html b/libstdc++-v3/doc/html/manual/internals.html
new file mode 100644
index 00000000000..af54578b31b
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/internals.html
@@ -0,0 +1,368 @@
+<?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>Porting to New Hardware or Operating Systems</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; internals&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="next" href="abi.html" title="ABI Policy and Guidelines" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Porting to New Hardware or Operating Systems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="abi.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="appendix.porting.internals"></a>Porting to New Hardware or Operating Systems</h2></div></div></div><p>
+</p><p>This document explains how to port libstdc++ (the GNU C++ library) to
+a new target.
+</p><p>In order to make the GNU C++ library (libstdc++) work with a new
+target, you must edit some configuration files and provide some new
+header files. Unless this is done, libstdc++ will use generic
+settings which may not be correct for your target; even if they are
+correct, they will likely be inefficient.
+ </p><p>Before you get started, make sure that you have a working C library on
+your target. The C library need not precisely comply with any
+particular standard, but should generally conform to the requirements
+imposed by the ANSI/ISO standard.
+ </p><p>In addition, you should try to verify that the C++ compiler generally
+works. It is difficult to test the C++ compiler without a working
+library, but you should at least try some minimal test cases.
+ </p><p>(Note that what we think of as a "target," the library refers to as
+a "host." The comment at the top of <code class="code">configure.ac</code> explains why.)
+ </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.os"></a>Operating System</h3></div></div></div><p>If you are porting to a new operating system (as opposed to a new chip
+using an existing operating system), you will need to create a new
+directory in the <code class="code">config/os</code> hierarchy. For example, the IRIX
+configuration files are all in <code class="code">config/os/irix</code>. There is no set
+way to organize the OS configuration directory. For example,
+<code class="code">config/os/solaris/solaris-2.6</code> and
+<code class="code">config/os/solaris/solaris-2.7</code> are used as configuration
+directories for these two versions of Solaris. On the other hand, both
+Solaris 2.7 and Solaris 2.8 use the <code class="code">config/os/solaris/solaris-2.7</code>
+directory. The important information is that there needs to be a
+directory under <code class="code">config/os</code> to store the files for your operating
+system.
+</p><p>You might have to change the <code class="code">configure.host</code> file to ensure that
+your new directory is activated. Look for the switch statement that sets
+<code class="code">os_include_dir</code>, and add a pattern to handle your operating system
+if the default will not suffice. The switch statement switches on only
+the OS portion of the standard target triplet; e.g., the <code class="code">solaris2.8</code>
+in <code class="code">sparc-sun-solaris2.8</code>. If the new directory is named after the
+OS portion of the triplet (the default), then nothing needs to be changed.
+ </p><p>The first file to create in this directory, should be called
+<code class="code">os_defines.h</code>. This file contains basic macro definitions
+that are required to allow the C++ library to work with your C library.
+ </p><p>Several libstdc++ source files unconditionally define the macro
+<code class="code">_POSIX_SOURCE</code>. On many systems, defining this macro causes
+large portions of the C library header files to be eliminated
+at preprocessing time. Therefore, you may have to <code class="code">#undef</code> this
+macro, or define other macros (like <code class="code">_LARGEFILE_SOURCE</code> or
+<code class="code">__EXTENSIONS__</code>). You won't know what macros to define or
+undefine at this point; you'll have to try compiling the library and
+seeing what goes wrong. If you see errors about calling functions
+that have not been declared, look in your C library headers to see if
+the functions are declared there, and then figure out what macros you
+need to define. You will need to add them to the
+<code class="code">CPLUSPLUS_CPP_SPEC</code> macro in the GCC configuration file for your
+target. It will not work to simply define these macros in
+<code class="code">os_defines.h</code>.
+ </p><p>At this time, there are a few libstdc++-specific macros which may be
+defined:
+ </p><p><code class="code">_GLIBCXX_USE_C99_CHECK</code> may be defined to 1 to check C99
+function declarations (which are not covered by specialization below)
+found in system headers against versions found in the library headers
+derived from the standard.
+ </p><p><code class="code">_GLIBCXX_USE_C99_DYNAMIC</code> may be defined to an expression that
+yields 0 if and only if the system headers are exposing proper support
+for C99 functions (which are not covered by specialization below). If
+defined, it must be 0 while bootstrapping the compiler/rebuilding the
+library.
+ </p><p><code class="code">_GLIBCXX_USE_C99_LONG_LONG_CHECK</code> may be defined to 1 to check
+the set of C99 long long function declarations found in system headers
+against versions found in the library headers derived from the
+standard.
+
+ </p><p><code class="code">_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC</code> may be defined to an
+expression that yields 0 if and only if the system headers are
+exposing proper support for the set of C99 long long functions. If
+defined, it must be 0 while bootstrapping the compiler/rebuilding the
+library.
+ </p><p><code class="code">_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC</code> may be defined to an
+expression that yields 0 if and only if the system headers
+are exposing proper support for the related set of macros. If defined,
+it must be 0 while bootstrapping the compiler/rebuilding the library.
+ </p><p><code class="code">_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK</code> may be defined
+to 1 to check the related set of function declarations found in system
+headers against versions found in the library headers derived from
+the standard.
+ </p><p><code class="code">_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC</code> may be defined
+to an expression that yields 0 if and only if the system headers
+are exposing proper support for the related set of functions. If defined,
+it must be 0 while bootstrapping the compiler/rebuilding the library.
+ </p><p>Finally, you should bracket the entire file in an include-guard, like
+this:
+ </p><pre class="programlisting">
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES
+...
+#endif
+</pre><p>We recommend copying an existing <code class="code">os_defines.h</code> to use as a
+starting point.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.cpu"></a>CPU</h3></div></div></div><p>If you are porting to a new chip (as opposed to a new operating system
+running on an existing chip), you will need to create a new directory in the
+<code class="code">config/cpu</code> hierarchy. Much like the <a class="link" href="internals.html#internals.os" title="Operating System">Operating system</a> setup,
+there are no strict rules on how to organize the CPU configuration
+directory, but careful naming choices will allow the configury to find your
+setup files without explicit help.
+</p><p>We recommend that for a target triplet <code class="code">&lt;CPU&gt;-&lt;vendor&gt;-&lt;OS&gt;</code>, you
+name your configuration directory <code class="code">config/cpu/&lt;CPU&gt;</code>. If you do this,
+the configury will find the directory by itself. Otherwise you will need to
+edit the <code class="code">configure.host</code> file and, in the switch statement that sets
+<code class="code">cpu_include_dir</code>, add a pattern to handle your chip.
+ </p><p>Note that some chip families share a single configuration directory, for
+example, <code class="code">alpha</code>, <code class="code">alphaev5</code>, and <code class="code">alphaev6</code> all use the
+<code class="code">config/cpu/alpha</code> directory, and there is an entry in the
+<code class="code">configure.host</code> switch statement to handle this.
+ </p><p>The <code class="code">cpu_include_dir</code> sets default locations for the files controlling
+<a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">Thread safety</a> and <a class="link" href="internals.html#internals.numeric_limits" title="Numeric Limits">Numeric limits</a>, if the defaults are not
+appropriate for your chip.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.char_types"></a>Character Types</h3></div></div></div><p>The library requires that you provide three header files to implement
+character classification, analogous to that provided by the C libraries
+<code class="code">&lt;ctype.h&gt;</code> header. You can model these on the files provided in
+<code class="code">config/os/generic</code>. However, these files will almost
+certainly need some modification.
+</p><p>The first file to write is <code class="code">ctype_base.h</code>. This file provides
+some very basic information about character classification. The libstdc++
+library assumes that your C library implements <code class="code">&lt;ctype.h&gt;</code> by using
+a table (indexed by character code) containing integers, where each of
+these integers is a bit-mask indicating whether the character is
+upper-case, lower-case, alphabetic, etc. The <code class="code">ctype_base.h</code>
+file gives the type of the integer, and the values of the various bit
+masks. You will have to peer at your own <code class="code">&lt;ctype.h&gt;</code> to figure out
+how to define the values required by this file.
+ </p><p>The <code class="code">ctype_base.h</code> header file does not need include guards.
+It should contain a single <code class="code">struct</code> definition called
+<code class="code">ctype_base</code>. This <code class="code">struct</code> should contain two type
+declarations, and one enumeration declaration, like this example, taken
+from the IRIX configuration:
+ </p><pre class="programlisting">
+ struct ctype_base
+ {
+ typedef unsigned int mask;
+ typedef int* __to_type;
+
+ enum
+ {
+ space = _ISspace,
+ print = _ISprint,
+ cntrl = _IScntrl,
+ upper = _ISupper,
+ lower = _ISlower,
+ alpha = _ISalpha,
+ digit = _ISdigit,
+ punct = _ISpunct,
+ xdigit = _ISxdigit,
+ alnum = _ISalnum,
+ graph = _ISgraph
+ };
+ };
+</pre><p>The <code class="code">mask</code> type is the type of the elements in the table. If your
+C library uses a table to map lower-case numbers to upper-case numbers,
+and vice versa, you should define <code class="code">__to_type</code> to be the type of the
+elements in that table. If you don't mind taking a minor performance
+penalty, or if your library doesn't implement <code class="code">toupper</code> and
+<code class="code">tolower</code> in this way, you can pick any pointer-to-integer type,
+but you must still define the type.
+</p><p>The enumeration should give definitions for all the values in the above
+example, using the values from your native <code class="code">&lt;ctype.h&gt;</code>. They can
+be given symbolically (as above), or numerically, if you prefer. You do
+not have to include <code class="code">&lt;ctype.h&gt;</code> in this header; it will always be
+included before <code class="code">ctype_base.h</code> is included.
+ </p><p>The next file to write is <code class="code">ctype_noninline.h</code>, which also does
+not require include guards. This file defines a few member functions
+that will be included in <code class="code">include/bits/locale_facets.h</code>. The first
+function that must be written is the <code class="code">ctype&lt;char&gt;::ctype</code>
+constructor. Here is the IRIX example:
+ </p><pre class="programlisting">
+ctype&lt;char&gt;::ctype(const mask* __table = 0, bool __del = false,
+ size_t __refs = 0)
+ : _Ctype_nois&lt;char&gt;(__refs), _M_del(__table != 0 &amp;&amp; __del),
+ _M_toupper(NULL),
+ _M_tolower(NULL),
+ _M_ctable(NULL),
+ _M_table(!__table
+ ? (const mask*) (__libc_attr._ctype_tbl-&gt;_class + 1)
+ : __table)
+ { }
+</pre><p>There are two parts of this that you might choose to alter. The first,
+and most important, is the line involving <code class="code">__libc_attr</code>. That is
+IRIX system-dependent code that gets the base of the table mapping
+character codes to attributes. You need to substitute code that obtains
+the address of this table on your system. If you want to use your
+operating system's tables to map upper-case letters to lower-case, and
+vice versa, you should initialize <code class="code">_M_toupper</code> and
+<code class="code">_M_tolower</code> with those tables, in similar fashion.
+</p><p>Now, you have to write two functions to convert from upper-case to
+lower-case, and vice versa. Here are the IRIX versions:
+ </p><pre class="programlisting">
+ char
+ ctype&lt;char&gt;::do_toupper(char __c) const
+ { return _toupper(__c); }
+
+ char
+ ctype&lt;char&gt;::do_tolower(char __c) const
+ { return _tolower(__c); }
+</pre><p>Your C library provides equivalents to IRIX's <code class="code">_toupper</code> and
+<code class="code">_tolower</code>. If you initialized <code class="code">_M_toupper</code> and
+<code class="code">_M_tolower</code> above, then you could use those tables instead.
+</p><p>Finally, you have to provide two utility functions that convert strings
+of characters. The versions provided here will always work - but you
+could use specialized routines for greater performance if you have
+machinery to do that on your system:
+ </p><pre class="programlisting">
+ const char*
+ ctype&lt;char&gt;::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low &lt; __high)
+ {
+ *__low = do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ const char*
+ ctype&lt;char&gt;::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low &lt; __high)
+ {
+ *__low = do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+</pre><p>You must also provide the <code class="code">ctype_inline.h</code> file, which
+contains a few more functions. On most systems, you can just copy
+<code class="code">config/os/generic/ctype_inline.h</code> and use it on your system.
+ </p><p>In detail, the functions provided test characters for particular
+properties; they are analogous to the functions like <code class="code">isalpha</code> and
+<code class="code">islower</code> provided by the C library.
+ </p><p>The first function is implemented like this on IRIX:
+ </p><pre class="programlisting">
+ bool
+ ctype&lt;char&gt;::
+ is(mask __m, char __c) const throw()
+ { return (_M_table)[(unsigned char)(__c)] &amp; __m; }
+</pre><p>The <code class="code">_M_table</code> is the table passed in above, in the constructor.
+This is the table that contains the bitmasks for each character. The
+implementation here should work on all systems.
+</p><p>The next function is:
+ </p><pre class="programlisting">
+ const char*
+ ctype&lt;char&gt;::
+ is(const char* __low, const char* __high, mask* __vec) const throw()
+ {
+ while (__low &lt; __high)
+ *__vec++ = (_M_table)[(unsigned char)(*__low++)];
+ return __high;
+ }
+</pre><p>This function is similar; it copies the masks for all the characters
+from <code class="code">__low</code> up until <code class="code">__high</code> into the vector given by
+<code class="code">__vec</code>.
+</p><p>The last two functions again are entirely generic:
+ </p><pre class="programlisting">
+ const char*
+ ctype&lt;char&gt;::
+ scan_is(mask __m, const char* __low, const char* __high) const throw()
+ {
+ while (__low &lt; __high &amp;&amp; !this-&gt;is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype&lt;char&gt;::
+ scan_not(mask __m, const char* __low, const char* __high) const throw()
+ {
+ while (__low &lt; __high &amp;&amp; this-&gt;is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.thread_safety"></a>Thread Safety</h3></div></div></div><p>The C++ library string functionality requires a couple of atomic
+operations to provide thread-safety. If you don't take any special
+action, the library will use stub versions of these functions that are
+not thread-safe. They will work fine, unless your applications are
+multi-threaded.
+</p><p>If you want to provide custom, safe, versions of these functions, there
+are two distinct approaches. One is to provide a version for your CPU,
+using assembly language constructs. The other is to use the
+thread-safety primitives in your operating system. In either case, you
+make a file called <code class="code">atomicity.h</code>, and the variable
+<code class="code">ATOMICITYH</code> must point to this file.
+ </p><p>If you are using the assembly-language approach, put this code in
+<code class="code">config/cpu/&lt;chip&gt;/atomicity.h</code>, where chip is the name of
+your processor (see <a class="link" href="internals.html#internals.cpu" title="CPU">CPU</a>). No additional changes are necessary to
+locate the file in this case; <code class="code">ATOMICITYH</code> will be set by default.
+ </p><p>If you are using the operating system thread-safety primitives approach,
+you can also put this code in the same CPU directory, in which case no more
+work is needed to locate the file. For examples of this approach,
+see the <code class="code">atomicity.h</code> file for IRIX or IA64.
+ </p><p>Alternatively, if the primitives are more closely related to the OS
+than they are to the CPU, you can put the <code class="code">atomicity.h</code> file in
+the <a class="link" href="internals.html#internals.os" title="Operating System">Operating system</a> directory instead. In this case, you must
+edit <code class="code">configure.host</code>, and in the switch statement that handles
+operating systems, override the <code class="code">ATOMICITYH</code> variable to point to
+the appropriate <code class="code">os_include_dir</code>. For examples of this approach,
+see the <code class="code">atomicity.h</code> file for AIX.
+ </p><p>With those bits out of the way, you have to actually write
+<code class="code">atomicity.h</code> itself. This file should be wrapped in an
+include guard named <code class="code">_GLIBCXX_ATOMICITY_H</code>. It should define one
+type, and two functions.
+ </p><p>The type is <code class="code">_Atomic_word</code>. Here is the version used on IRIX:
+ </p><pre class="programlisting">
+typedef long _Atomic_word;
+</pre><p>This type must be a signed integral type supporting atomic operations.
+If you're using the OS approach, use the same type used by your system's
+primitives. Otherwise, use the type for which your CPU provides atomic
+primitives.
+</p><p>Then, you must provide two functions. The bodies of these functions
+must be equivalent to those provided here, but using atomic operations:
+ </p><pre class="programlisting">
+ static inline _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add (_Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result = *__mem;
+ *__mem += __val;
+ return __result;
+ }
+
+ static inline void
+ __attribute__ ((__unused__))
+ __atomic_add (_Atomic_word* __mem, int __val)
+ {
+ *__mem += __val;
+ }
+</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.numeric_limits"></a>Numeric Limits</h3></div></div></div><p>The C++ library requires information about the fundamental data types,
+such as the minimum and maximum representable values of each type.
+You can define each of these values individually, but it is usually
+easiest just to indicate how many bits are used in each of the data
+types and let the library do the rest. For information about the
+macros to define, see the top of <code class="code">include/bits/std_limits.h</code>.
+</p><p>If you need to define any macros, you can do so in <code class="code">os_defines.h</code>.
+However, if all operating systems for your CPU are likely to use the
+same values, you can provide a CPU-specific file instead so that you
+do not have to provide the same definitions for each operating system.
+To take that approach, create a new file called <code class="code">cpu_limits.h</code> in
+your CPU configuration directory (see <a class="link" href="internals.html#internals.cpu" title="CPU">CPU</a>).
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="internals.libtool"></a>Libtool</h3></div></div></div><p>The C++ library is compiled, archived and linked with libtool.
+Explaining the full workings of libtool is beyond the scope of this
+document, but there are a few, particular bits that are necessary for
+porting.
+</p><p>Some parts of the libstdc++ library are compiled with the libtool
+<code class="code">--tags CXX</code> option (the C++ definitions for libtool). Therefore,
+<code class="code">ltcf-cxx.sh</code> in the top-level directory needs to have the correct
+logic to compile and archive objects equivalent to the C version of libtool,
+<code class="code">ltcf-c.sh</code>. Some libtool targets have definitions for C but not
+for C++, or C++ definitions which have not been kept up to date.
+ </p><p>The C++ run-time library contains initialization code that needs to be
+run as the library is loaded. Often, that requires linking in special
+object files when the C++ library is built as a shared library, or
+taking other system-specific actions.
+ </p><p>The libstdc++ library is linked with the C version of libtool, even
+though it is a C++ library. Therefore, the C version of libtool needs to
+ensure that the run-time library initializers are run. The usual way to
+do this is to build the library using <code class="code">gcc -shared</code>.
+ </p><p>If you need to change how the library is linked, look at
+<code class="code">ltcf-c.sh</code> in the top-level directory. Find the switch statement
+that sets <code class="code">archive_cmds</code>. Here, adjust the setting for your
+operating system.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. Porting and Maintenance </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> ABI Policy and Guidelines</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html
new file mode 100644
index 00000000000..50287fb51b8
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/intro.html
@@ -0,0 +1,3 @@
+<?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>Part I. Introduction</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="spine.html" title="The GNU C++ Library" /><link rel="next" href="bk01pt01ch01.html" title="Chapter 1. Status" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part I. Introduction</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="bk01pt01ch01.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><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.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</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">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.future">Future</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="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exception Safety</a></span></dt><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 <span class="command"><strong>g++</strong></span></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 <span class="command"><strong>gdb</strong></span></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="bk01pt01ch01.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
new file mode 100644
index 00000000000..4690e8f8861
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/io.html
@@ -0,0 +1,3 @@
+<?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>Part XI. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt10ch23s02.html" title="C99" /><link rel="next" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XI. Input and Output</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="bk01pt11ch24.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.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="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.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><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.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="bk01pt11ch24.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/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html
new file mode 100644
index 00000000000..9e6b562655e
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/iterators.html
@@ -0,0 +1,3 @@
+<?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>Part VIII. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VIII. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.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</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="bk01pt07ch17s02.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/localization.html b/libstdc++-v3/doc/html/manual/localization.html
new file mode 100644
index 00000000000..8d2d8d701fc
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/localization.html
@@ -0,0 +1,3 @@
+<?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>Part VI. Localization</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt05ch13s06.html" title="CString (MFC)" /><link rel="next" href="bk01pt06ch14.html" title="Chapter 14. Locales" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VI. Localization</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="bk01pt06ch14.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.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="bk01pt06ch14.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/messages.html b/libstdc++-v3/doc/html/manual/messages.html
new file mode 100644
index 00000000000..e59f5d11cbd
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/messages.html
@@ -0,0 +1,281 @@
+<?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>messages</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; messages&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="codecvt.html" title="codecvt" /><link rel="next" href="containers.html" title="Part VII. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">messages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="codecvt.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="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.localization.facet.messages"></a>messages</h2></div></div></div><p>
+The std::messages facet implements message retrieval functionality
+equivalent to Java's java.text.MessageFormat .using either GNU gettext
+or IEEE 1003.1-200 functions.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.req"></a>Requirements</h3></div></div></div><p>
+The std::messages facet is probably the most vaguely defined facet in
+the standard library. It's assumed that this facility was built into
+the standard library in order to convert string literals from one
+locale to the other. For instance, converting the "C" locale's
+<code class="code">const char* c = "please"</code> to a German-localized <code class="code">"bitte"</code>
+during program execution.
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+22.2.7.1 - Template class messages [lib.locale.messages]
+</p></blockquote></div><p>
+This class has three public member functions, which directly
+correspond to three protected virtual member functions.
+</p><p>
+The public member functions are:
+</p><p>
+<code class="code">catalog open(const string&amp;, const locale&amp;) const</code>
+</p><p>
+<code class="code">string_type get(catalog, int, int, const string_type&amp;) const</code>
+</p><p>
+<code class="code">void close(catalog) const</code>
+</p><p>
+While the virtual functions are:
+</p><p>
+<code class="code">catalog do_open(const string&amp;, const locale&amp;) const</code>
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-1- Returns: A value that may be passed to get() to retrieve a
+message, from the message catalog identified by the string name
+according to an implementation-defined mapping. The result can be used
+until it is passed to close(). Returns a value less than 0 if no such
+catalog can be opened.
+</em></span>
+</p></blockquote></div><p>
+<code class="code">string_type do_get(catalog, int, int, const string_type&amp;) const</code>
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-3- Requires: A catalog cat obtained from open() and not yet closed.
+-4- Returns: A message identified by arguments set, msgid, and dfault,
+according to an implementation-defined mapping. If no such message can
+be found, returns dfault.
+</em></span>
+</p></blockquote></div><p>
+<code class="code">void do_close(catalog) const</code>
+</p><div class="blockquote"><blockquote class="blockquote"><p>
+<span class="emphasis"><em>
+-5- Requires: A catalog cat obtained from open() and not yet closed.
+-6- Effects: Releases unspecified resources associated with cat.
+-7- Notes: The limit on such resources, if any, is implementation-defined.
+</em></span>
+</p></blockquote></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.design"></a>Design</h3></div></div></div><p>
+A couple of notes on the standard.
+</p><p>
+First, why is <code class="code">messages_base::catalog</code> specified as a typedef
+to int? This makes sense for implementations that use
+<code class="code">catopen</code>, but not for others. Fortunately, it's not heavily
+used and so only a minor irritant.
+</p><p>
+Second, by making the member functions <code class="code">const</code>, it is
+impossible to save state in them. Thus, storing away information used
+in the 'open' member function for use in 'get' is impossible. This is
+unfortunate.
+</p><p>
+The 'open' member function in particular seems to be oddly
+designed. The signature seems quite peculiar. Why specify a <code class="code">const
+string&amp; </code> argument, for instance, instead of just <code class="code">const
+char*</code>? Or, why specify a <code class="code">const locale&amp;</code> argument that is
+to be used in the 'get' member function? How, exactly, is this locale
+argument useful? What was the intent? It might make sense if a locale
+argument was associated with a given default message string in the
+'open' member function, for instance. Quite murky and unclear, on
+reflection.
+</p><p>
+Lastly, it seems odd that messages, which explicitly require code
+conversion, don't use the codecvt facet. Because the messages facet
+has only one template parameter, it is assumed that ctype, and not
+codecvt, is to be used to convert between character sets.
+</p><p>
+It is implicitly assumed that the locale for the default message
+string in 'get' is in the "C" locale. Thus, all source code is assumed
+to be written in English, so translations are always from "en_US" to
+other, explicitly named locales.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.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="messages.impl.models"></a>Models</h4></div></div></div><p>
+ This is a relatively simple class, on the face of it. The standard
+ specifies very little in concrete terms, so generic
+ implementations that are conforming yet do very little are the
+ norm. Adding functionality that would be useful to programmers and
+ comparable to Java's java.text.MessageFormat takes a bit of work,
+ and is highly dependent on the capabilities of the underlying
+ operating system.
+ </p><p>
+ Three different mechanisms have been provided, selectable via
+ configure flags:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ generic
+ </p><p>
+ This model does very little, and is what is used by default.
+ </p></li><li><p>
+ gnu
+ </p><p>
+ The gnu model is complete and fully tested. It's based on the
+ GNU gettext package, which is part of glibc. It uses the
+ functions <code class="code">textdomain, bindtextdomain, gettext</code> to
+ implement full functionality. Creating message catalogs is a
+ relatively straight-forward process and is lightly documented
+ below, and fully documented in gettext's distributed
+ documentation.
+ </p></li><li><p>
+ ieee_1003.1-200x
+ </p><p>
+ This is a complete, though untested, implementation based on
+ the IEEE standard. The functions <code class="code">catopen, catgets,
+ catclose</code> are used to retrieve locale-specific messages
+ given the appropriate message catalogs that have been
+ constructed for their use. Note, the script <code class="code">
+ po2msg.sed</code> that is part of the gettext distribution can
+ convert gettext catalogs into catalogs that
+ <code class="code">catopen</code> can use.
+ </p></li></ul></div><p>
+A new, standards-conformant non-virtual member function signature was
+added for 'open' so that a directory could be specified with a given
+message catalog. This simplifies calling conventions for the gnu
+model.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="messages.impl.gnu"></a>The GNU Model</h4></div></div></div><p>
+ The messages facet, because it is retrieving and converting
+ between characters sets, depends on the ctype and perhaps the
+ codecvt facet in a given locale. In addition, underlying "C"
+ library locale support is necessary for more than just the
+ <code class="code">LC_MESSAGES</code> mask: <code class="code">LC_CTYPE</code> is also
+ necessary. To avoid any unpleasantness, all bits of the "C" mask
+ (ie <code class="code">LC_ALL</code>) are set before retrieving messages.
+ </p><p>
+ Making the message catalogs can be initially tricky, but become
+ quite simple with practice. For complete info, see the gettext
+ documentation. Here's an idea of what is required:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ Make a source file with the required string literals that need
+ to be translated. See <code class="code">intl/string_literals.cc</code> for
+ an example.
+ </p></li><li><p>
+ Make initial catalog (see "4 Making the PO Template File" from
+ the gettext docs).</p><p>
+ <code class="code"> xgettext --c++ --debug string_literals.cc -o libstdc++.pot </code>
+ </p></li><li><p>Make language and country-specific locale catalogs.</p><p>
+ <code class="code">cp libstdc++.pot fr_FR.po</code>
+ </p><p>
+ <code class="code">cp libstdc++.pot de_DE.po</code>
+ </p></li><li><p>
+ Edit localized catalogs in emacs so that strings are
+ translated.
+ </p><p>
+ <code class="code">emacs fr_FR.po</code>
+ </p></li><li><p>Make the binary mo files.</p><p>
+ <code class="code">msgfmt fr_FR.po -o fr_FR.mo</code>
+ </p><p>
+ <code class="code">msgfmt de_DE.po -o de_DE.mo</code>
+ </p></li><li><p>Copy the binary files into the correct directory structure.</p><p>
+ <code class="code">cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++.mo</code>
+ </p><p>
+ <code class="code">cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++.mo</code>
+ </p></li><li><p>Use the new message catalogs.</p><p>
+ <code class="code">locale loc_de("de_DE");</code>
+ </p><p>
+ <code class="code">
+ use_facet&lt;messages&lt;char&gt; &gt;(loc_de).open("libstdc++", locale(), dir);
+ </code>
+ </p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.use"></a>Use</h3></div></div></div><p>
+ A simple example using the GNU model of message conversion.
+ </p><pre class="programlisting">
+#include &lt;iostream&gt;
+#include &lt;locale&gt;
+using namespace std;
+
+void test01()
+{
+ typedef messages&lt;char&gt;::catalog catalog;
+ const char* dir =
+ "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++/po/share/locale";
+ const locale loc_de("de_DE");
+ const messages&lt;char&gt;&amp; mssg_de = use_facet&lt;messages&lt;char&gt; &gt;(loc_de);
+
+ catalog cat_de = mssg_de.open("libstdc++", loc_de, dir);
+ string s01 = mssg_de.get(cat_de, 0, 0, "please");
+ string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
+ cout &lt;&lt; "please in german:" &lt;&lt; s01 &lt;&lt; '\n';
+ cout &lt;&lt; "thank you in german:" &lt;&lt; s02 &lt;&lt; '\n';
+ mssg_de.close(cat_de);
+}
+</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.future"></a>Future</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ Things that are sketchy, or remain unimplemented:
+ </p><div class="itemizedlist"><ul type="circle"><li><p>
+ _M_convert_from_char, _M_convert_to_char are in flux,
+ depending on how the library ends up doing character set
+ conversions. It might not be possible to do a real character
+ set based conversion, due to the fact that the template
+ parameter for messages is not enough to instantiate the
+ codecvt facet (1 supplied, need at least 2 but would prefer
+ 3).
+ </p></li><li><p>
+ There are issues with gettext needing the global locale set
+ to extract a message. This dependence on the global locale
+ makes the current "gnu" model non MT-safe. Future versions
+ of glibc, ie glibc 2.3.x will fix this, and the C++ library
+ bits are already in place.
+ </p></li></ul></div></li><li><p>
+ Development versions of the GNU "C" library, glibc 2.3 will allow
+ a more efficient, MT implementation of std::messages, and will
+ allow the removal of the _M_name_messages data member. If this is
+ done, it will change the library ABI. The C++ parts to support
+ glibc 2.3 have already been coded, but are not in use: once this
+ version of the "C" library is released, the marked parts of the
+ messages implementation can be switched over to the new "C"
+ library functionality.
+ </p></li><li><p>
+ At some point in the near future, std::numpunct will probably use
+ std::messages facilities to implement truename/falename
+ correctly. This is currently not done, but entries in
+ libstdc++.pot have already been made for "true" and "false" string
+ literals, so all that remains is the std::numpunct coding and the
+ configure/make hassles to make the installed library search its
+ own catalog. Currently the libstdc++.mo catalog is only searched
+ for the testsuite cases involving messages members.
+ </p></li><li><p> The following member functions:</p><p>
+ <code class="code">
+ catalog
+ open(const basic_string&lt;char&gt;&amp; __s, const locale&amp; __loc) const
+ </code>
+ </p><p>
+ <code class="code">
+ catalog
+ open(const basic_string&lt;char&gt;&amp;, const locale&amp;, const char*) const;
+ </code>
+ </p><p>
+ Don't actually return a "value less than 0 if no such catalog
+ can be opened" as required by the standard in the "gnu"
+ 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="id486645"></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="id420122"></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="id420151"></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="id483860"></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="id483878"></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="id428875"></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="id420793"></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="id487716"></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/j2se/1.3/docs/api" target="_top">
+ </a>
+ . </span></p></div><div class="biblioentry"><a id="id487737"></a><p><span class="title"><i>
+ GNU gettext tools, version 0.10.38, Native Language Support
+Library and Tools.
+ </i>. </span><span class="biblioid">
+ <a class="ulink" href="http://sources.redhat.com/gettext" target="_top">
+ </a>
+ . </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="codecvt.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt06ch15.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">codecvt </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part VII. Containers</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html
new file mode 100644
index 00000000000..89d8c0fb07a
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/numerics.html
@@ -0,0 +1,3 @@
+<?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>Part X. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /><link rel="next" href="bk01pt10ch21.html" title="Chapter 21. Complex" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part X. Numerics</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="bk01pt10ch21.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.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="bk01pt10ch21.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
new file mode 100644
index 00000000000..137d041e749
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/parallel_mode.html
@@ -0,0 +1,22 @@
+<?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 31. Parallel Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><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="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch30s04.html" title="Design" /><link rel="next" href="bk01pt12ch31s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 31. Parallel Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s04.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s02.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.parallel_mode"></a>Chapter 31. Parallel Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><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.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#manual.ext.parallel_mode.usings">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#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.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></div><p> The libstdc++ parallel mode is an experimental parallel
+implementation of many algorithms the C++ Standard Library.
+</p><p>
+Several of the standard algorithms, for instance
+<code class="code">std::sort</code>, are made parallel using OpenMP
+annotations. These parallel mode constructs and can be invoked by
+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="code">&lt;numeric&gt;</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">std::accumulate</code></p></li><li><p><code class="code">std::adjacent_difference</code></p></li><li><p><code class="code">std::inner_product</code></p></li><li><p><code class="code">std::partial_sum</code></p></li></ul></div><p>The following library components in the include
+<code class="code">&lt;algorithm&gt;</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">std::adjacent_find</code></p></li><li><p><code class="code">std::count</code></p></li><li><p><code class="code">std::count_if</code></p></li><li><p><code class="code">std::equal</code></p></li><li><p><code class="code">std::find</code></p></li><li><p><code class="code">std::find_if</code></p></li><li><p><code class="code">std::find_first_of</code></p></li><li><p><code class="code">std::for_each</code></p></li><li><p><code class="code">std::generate</code></p></li><li><p><code class="code">std::generate_n</code></p></li><li><p><code class="code">std::lexicographical_compare</code></p></li><li><p><code class="code">std::mismatch</code></p></li><li><p><code class="code">std::search</code></p></li><li><p><code class="code">std::search_n</code></p></li><li><p><code class="code">std::transform</code></p></li><li><p><code class="code">std::replace</code></p></li><li><p><code class="code">std::replace_if</code></p></li><li><p><code class="code">std::max_element</code></p></li><li><p><code class="code">std::merge</code></p></li><li><p><code class="code">std::min_element</code></p></li><li><p><code class="code">std::nth_element</code></p></li><li><p><code class="code">std::partial_sort</code></p></li><li><p><code class="code">std::partition</code></p></li><li><p><code class="code">std::random_shuffle</code></p></li><li><p><code class="code">std::set_union</code></p></li><li><p><code class="code">std::set_intersection</code></p></li><li><p><code class="code">std::set_symmetric_difference</code></p></li><li><p><code class="code">std::set_difference</code></p></li><li><p><code class="code">std::sort</code></p></li><li><p><code class="code">std::stable_sort</code></p></li><li><p><code class="code">std::unique_copy</code></p></li></ul></div><p>The following library components in the includes
+<code class="code">&lt;set&gt;</code> and <code class="code">&lt;map&gt;</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="code">std::(multi_)map/set&lt;T&gt;::(multi_)map/set(Iterator begin, Iterator end)</code> (bulk construction)</p></li><li><p><code class="code">std::(multi_)map/set&lt;T&gt;::insert(Iterator begin, Iterator end)</code> (bulk insertion)</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="id343037"></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="id343084"></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)
+ . </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="bk01pt12ch30s04.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="bk01pt12ch31s02.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"> Semantics</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
new file mode 100644
index 00000000000..21d38d3e3d6
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/shared_ptr.html
@@ -0,0 +1,304 @@
+<?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>shared_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; shared_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="auto_ptr.html" title="auto_ptr" /><link rel="next" href="bk01pt04ch12.html" title="Chapter 12. Traits" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">shared_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="auto_ptr.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch12.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.util.memory.shared_ptr"></a>shared_ptr</h2></div></div></div><p>
+The shared_ptr class template stores a pointer, usually obtained via new,
+and implements shared ownership semantics.
+</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.req"></a>Requirements</h3></div></div></div><p>
+ </p><p>
+ The standard deliberately doesn't require a reference-counted
+ implementation, allowing other techniques such as a
+ circular-linked-list.
+ </p><p>
+ At the time of writing the C++0x working paper doesn't mention how
+ threads affect shared_ptr, but it is likely to follow the existing
+ practice set by <code class="classname">boost::shared_ptr</code>. The
+ shared_ptr in libstdc++ is derived from Boost's, so the same rules
+ apply.
+ </p><p>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.design_issues"></a>Design Issues</h3></div></div></div><p>
+The <code class="classname">shared_ptr</code> code is kindly donated to GCC by the Boost
+project and the original authors of the code. The basic design and
+algorithms are from Boost, the notes below describe details specific to
+the GCC implementation. Names have been uglified in this implementation,
+but the design should be recognisable to anyone familiar with the Boost
+1.32 shared_ptr.
+ </p><p>
+The basic design is an abstract base class, <code class="code">_Sp_counted_base</code> that
+does the reference-counting and calls virtual functions when the count
+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="id461761"></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
+pointer of type <span class="type">_Sp_counted_base*</span> which points to the
+object that maintains the reference-counts and destroys the managed
+resource.
+ </p><div class="variablelist"><dl><dt><span class="term"><code class="classname">_Sp_counted_base&lt;Lp&gt;</code></span></dt><dd><p>
+The base of the hierarchy is parameterized on the lock policy alone.
+_Sp_counted_base doesn't depend on the type of pointer being managed,
+it only maintains the reference counts and calls virtual functions when
+the counts drop to zero. The managed object is destroyed when the last
+strong reference is dropped, but the _Sp_counted_base itself must exist
+until the last weak reference is dropped.
+ </p></dd><dt><span class="term"><code class="classname">_Sp_counted_base_impl&lt;Ptr, Deleter, Lp&gt;</code></span></dt><dd><p>
+Inherits from _Sp_counted_base and stores a pointer of type <span class="type">Ptr</span>
+and a deleter of type <code class="code">Deleter</code>. <code class="code">_Sp_deleter</code> is
+used when the user doesn't supply a custom deleter. Unlike Boost's, this
+default deleter is not "checked" because GCC already issues a warning if
+<code class="function">delete</code> is used with an incomplete type.
+This is the only derived type used by <code class="classname">shared_ptr&lt;Ptr&gt;</code>
+and it is never used by <code class="classname">shared_ptr</code>, which uses one of
+the following types, depending on how the shared_ptr is constructed.
+ </p></dd><dt><span class="term"><code class="classname">_Sp_counted_ptr&lt;Ptr, Lp&gt;</code></span></dt><dd><p>
+Inherits from _Sp_counted_base and stores a pointer of type <span class="type">Ptr</span>,
+which is passed to <code class="function">delete</code> when the last reference is dropped.
+This is the simplest form and is used when there is no custom deleter or
+allocator.
+ </p></dd><dt><span class="term"><code class="classname">_Sp_counted_deleter&lt;Ptr, Deleter, Alloc&gt;</code></span></dt><dd><p>
+Inherits from _Sp_counted_ptr and adds support for custom deleter and
+allocator. Empty Base Optimization is used for the allocator. This class
+is used even when the user only provides a custom deleter, in which case
+<code class="classname">allocator</code> is used as the allocator.
+ </p></dd><dt><span class="term"><code class="classname">_Sp_counted_ptr_inplace&lt;Tp, Alloc, Lp&gt;</code></span></dt><dd><p>
+Used by <code class="code">allocate_shared</code> and <code class="code">make_shared</code>.
+Contains aligned storage to hold an object of type <span class="type">Tp</span>,
+which is constructed in-place with placement <code class="function">new</code>.
+Has a variadic template constructor allowing any number of arguments to
+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="id360970"></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,
+boost_shared_ptr.h uses conditional compilation, based on the macros
+<code class="constant">_GLIBCXX_INCLUDE_AS_CXX0X</code> and
+<code class="constant">_GLIBCXX_INCLUDE_AS_TR1</code>, to enable and disable
+features.
+ </p><p>
+C++0x-only features are: rvalue-ref/move support, allocator support,
+aliasing constructor, make_shared &amp; allocate_shared. Additionally,
+the constructors taking <code class="classname">auto_ptr</code> parameters are
+deprecated in C++0x mode.
+ </p><p>
+The
+<a class="ulink" href="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety" target="_top">Thread
+Safety</a> section of the Boost shared_ptr documentation says "shared_ptr
+objects offer the same level of thread safety as built-in types."
+The implementation must ensure that concurrent updates to separate shared_ptr
+instances are correct even when those instances share a reference count e.g.
+</p><pre class="programlisting">
+shared_ptr&lt;A&gt; a(new A);
+shared_ptr&lt;A&gt; b(a);
+
+// Thread 1 // Thread 2
+ a.reset(); b.reset();
+</pre><p>
+The dynamically-allocated object must be destroyed by exactly one of the
+threads. Weak references make things even more interesting.
+The shared state used to implement shared_ptr must be transparent to the
+user and invariants must be preserved at all times.
+The key pieces of shared state are the strong and weak reference counts.
+Updates to these need to be atomic and visible to all threads to ensure
+correct cleanup of the managed resource (which is, after all, shared_ptr's
+job!)
+On multi-processor systems memory synchronisation may be needed so that
+reference-count updates and the destruction of the managed resource are
+race-free.
+</p><p>
+The function <code class="function">_Sp_counted_base::_M_add_ref_lock()</code>, called when
+obtaining a shared_ptr from a weak_ptr, has to test if the managed
+resource still exists and either increment the reference count or throw
+<code class="classname">bad_weak_ptr</code>.
+In a multi-threaded program there is a potential race condition if the last
+reference is dropped (and the managed resource destroyed) between testing
+the reference count and incrementing it, which could result in a shared_ptr
+pointing to invalid memory.
+</p><p>
+The Boost shared_ptr (as used in GCC) features a clever lock-free
+algorithm to avoid the race condition, but this relies on the
+processor supporting an atomic <span class="emphasis"><em>Compare-And-Swap</em></span>
+instruction. For other platforms there are fall-backs using mutex
+locks. Boost (as of version 1.35) includes several different
+implementations and the preprocessor selects one based on the
+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="id396141"></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
+<span class="type">__gnu_cxx::_Lock_policy</span>. The entire family of classes is
+parameterized on the lock policy, right up to
+<code class="classname">__shared_ptr</code>, <code class="classname">__weak_ptr</code> and
+<code class="classname">__enable_shared_from_this</code>. The actual
+<code class="classname">std::shared_ptr</code> class inherits from
+<code class="classname">__shared_ptr</code> with the lock policy parameter
+selected automatically based on the thread model and platform that
+libstdc++ is configured for, so that the best available template
+specialization will be used. This design is necessary because it would
+not be conforming for <code class="classname">shared_ptr</code> to have an
+extra template parameter, even if it had a default value. The
+available policies are:
+ </p><div class="orderedlist"><ol type="1"><li><p>
+ <span class="type">_S_Atomic</span>
+ </p><p>
+Selected when GCC supports a builtin atomic compare-and-swap operation
+on the target processor (see <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" target="_top">Atomic
+Builtins</a>.) The reference counts are maintained using a lock-free
+algorithm and GCC's atomic builtins, which provide the required memory
+synchronisation.
+ </p></li><li><p>
+ <span class="type">_S_Mutex</span>
+ </p><p>
+The _Sp_counted_base specialization for this policy contains a mutex,
+which is locked in add_ref_lock(). This policy is used when GCC's atomic
+builtins aren't available so explicit memory barriers are needed in places.
+ </p></li><li><p>
+ <span class="type">_S_Single</span>
+ </p><p>
+This policy uses a non-reentrant add_ref_lock() with no locking. It is
+used when libstdc++ is built without <code class="literal">--enable-threads</code>.
+ </p></li></ol></div><p>
+ For all three policies, reference count increments and
+ decrements are done via the functions in
+ <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="id420953"></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
+<code class="filename">tr1/boost_sp_shared_count.h</code> respectively. All other classes
+including <code class="classname">_Sp_counted_base</code> are shared by both implementations.
+</p><p>
+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="id454146"></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
+in C++0x mode, so in TR1 mode these casts rely on three non-standard
+constructors in shared_ptr and __shared_ptr.
+In C++0x mode these constructors and the related tag types are not needed.
+ </p></dd><dt><span class="term"><code class="code">enable_shared_from_this</code></span></dt><dd><p>
+The clever overload to detect a base class of type
+<code class="code">enable_shared_from_this</code> comes straight from Boost.
+There is an extra overload for <code class="code">__enable_shared_from_this</code> to
+work smoothly with <code class="code">__shared_ptr&lt;Tp, Lp&gt;</code> using any lock
+policy.
+ </p></dd><dt><span class="term"><code class="code">make_shared</code>, <code class="code">allocate_shared</code></span></dt><dd><p>
+<code class="code">make_shared</code> simply forwards to <code class="code">allocate_shared</code>
+with <code class="code">std::allocator</code> as the allocator.
+Although these functions can be implemented non-intrusively using the
+alias constructor, if they have access to the implementation then it is
+possible to save storage and reduce the number of heap allocations. The
+newly constructed object and the _Sp_counted_* can be allocated in a single
+block and the standard says implementations are "encouraged, but not required,"
+to do so. This implementation provides additional non-standard constructors
+(selected with the type <code class="code">_Sp_make_shared_tag</code>) which create an
+object of type <code class="code">_Sp_counted_ptr_inplace</code> to hold the new object.
+The returned <code class="code">shared_ptr&lt;A&gt;</code> needs to know the address of the
+new <code class="code">A</code> object embedded in the <code class="code">_Sp_counted_ptr_inplace</code>,
+but it has no way to access it.
+This implementation uses a "covert channel" to return the address of the
+embedded object when <code class="code">get_deleter&lt;_Sp_make_shared_tag&gt;()</code>
+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="id404984"></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="id398405"></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
+ paper. Issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743" target="_top">743</a>
+ might also require changes.
+ </p><p>
+ The <span class="type">_S_single</span> policy uses atomics when used in MT
+ code, because it uses the same dispatcher functions that check
+ <code class="function">__gthread_active_p()</code>. This could be
+ addressed by providing template specialisations for some members
+ of <code class="classname">_Sp_counted_base&lt;_S_single&gt;</code>.
+ </p><p>
+ Unlike Boost, this implementation does not use separate classes
+ for the pointer+deleter and pointer+deleter+allocator cases in
+ C++0x mode, combining both into _Sp_counted_deleter and using
+ <code class="classname">allocator</code> when the user doesn't specify
+ an allocator. If it was found to be beneficial an additional
+ class could easily be added. With the current implementation,
+ the _Sp_counted_deleter and __shared_count constructors taking a
+ custom deleter but no allocator are technically redundant and
+ could be removed, changing callers to always specify an
+ allocator. If a separate pointer+deleter class was added the
+ __shared_count constructor would be needed, so it has been kept
+ for now.
+ </p><p>
+ The hack used to get the address of the managed object from
+ <code class="function">_Sp_counted_ptr_inplace::_M_get_deleter()</code>
+ is accessible to users. This could be prevented if
+ <code class="function">get_deleter&lt;_Sp_make_shared_tag&gt;()</code>
+ always returned NULL, since the hack only needs to work at a
+ lower level, not in the public API. This wouldn't be difficult,
+ but hasn't been done since there is no danger of accidental
+ misuse: users already know they are relying on unsupported
+ features if they refer to implementation details such as
+ _Sp_make_shared_tag.
+ </p><p>
+ tr1::_Sp_deleter could be a private member of tr1::__shared_count but it
+ would alter the ABI.
+ </p><p>
+ Exposing the alias constructor in TR1 mode could simplify the
+ *_pointer_cast functions. Constructor could be private in TR1
+ mode, with the cast functions as friends.
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.ack"></a>Acknowledgments</h3></div></div></div><p>
+ The original authors of the Boost shared_ptr, which is really nice
+ 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="id485662"></a><p>[<abbr class="abbrev">
+ n2351
+ </abbr>] <span class="title"><i>
+ Improving shared_ptr for C++0x, Revision 2
+ </i>. </span><span class="subtitle">
+ N2351
+ . </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="id485686"></a><p>[<abbr class="abbrev">
+ n2456
+ </abbr>] <span class="title"><i>
+ C++ Standard Library Active Issues List (Revision R52)
+ </i>. </span><span class="subtitle">
+ N2456
+ . </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="id403091"></a><p>[<abbr class="abbrev">
+ n2461
+ </abbr>] <span class="title"><i>
+ Working Draft, Standard for Programming Language C++
+ </i>. </span><span class="subtitle">
+ N2461
+ . </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="id514547"></a><p>[<abbr class="abbrev">
+ boostshared_ptr
+ </abbr>] <span class="title"><i>
+ Boost C++ Libraries documentation - shared_ptr class template
+ </i>. </span><span class="subtitle">
+ N2461
+ . </span><span class="biblioid">
+ <a class="ulink" href="http://boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">shared_ptr
+ </a>
+ . </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="auto_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04ch11.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04ch12.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">auto_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 12. Traits</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html
new file mode 100644
index 00000000000..ba20f193d8e
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/spine.html
@@ -0,0 +1,7 @@
+<?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>The GNU C++ Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" 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 © 2008
+ <a class="ulink" href="http://fsf.org" target="_top">FSF</a>
+ </p></div><div><div class="legalnotice"><a id="id471282"></a><p>
+ <a class="ulink" href="17_intro/license.html" target="_top">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="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><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.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</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">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.future">Future</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="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exception Safety</a></span></dt><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 <span class="command"><strong>g++</strong></span></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 <span class="command"><strong>gdb</strong></span></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. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.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="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.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></dd><dt><span class="part"><a href="utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.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="bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="strings.html">V. Strings</a></span></dt><dd><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 Sensivitity</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></dd><dt><span class="part"><a href="localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.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></dd><dt><span class="part"><a href="containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="iterators.html">VIII. Iterators</a></span></dt><dd><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></dd><dt><span class="part"><a href="algorithms.html">IX. Algorithms</a></span></dt><dd><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"><code class="function">swap</code></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></dd><dt><span class="part"><a href="numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.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></dd><dt><span class="part"><a href="io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.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="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.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><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.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="bk01pt12ch29.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#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.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.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#manual.ext.parallel_mode.usings">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#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.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="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.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="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.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="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="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 Builitin 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. 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="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Itentifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><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"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> 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"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></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></dd><dt><span class="appendix"><a href="appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="bk01pt01ch01.html#id395297">C++ TR1 Implementation Status</a></dt><dt>1.2. <a href="bk01pt01ch01.html#id472768">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="bk01pt01ch03s02.html#id398035">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="bk01pt01ch03s02.html#id397982">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="bk01pt01ch03s02.html#id399447">C++ 200x Library Headers</a></dt><dt>3.4. <a href="bk01pt01ch03s02.html#id394222">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="bk01pt01ch03s02.html#id485624">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="bk01pt01ch03s02.html#id407403">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="bk01pt01ch03s02.html#id420398">C++ ABI Headers</a></dt><dt>3.8. <a href="bk01pt01ch03s02.html#id414207">Extension Headers</a></dt><dt>3.9. <a href="bk01pt01ch03s02.html#id458275">Extension Debug Headers</a></dt><dt>3.10. <a href="bk01pt01ch03s02.html#id428288">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id400605">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id452759">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id419374">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id510462">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="api.html#id456920">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id408028">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/strings.html b/libstdc++-v3/doc/html/manual/strings.html
new file mode 100644
index 00000000000..99d8cbed0e3
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/strings.html
@@ -0,0 +1,3 @@
+<?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>Part V. Strings</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part V. Strings</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</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 Sensivitity</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
new file mode 100644
index 00000000000..8f7e84a1364
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/support.html
@@ -0,0 +1,3 @@
+<?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>Part II. Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="debug.html" title="Debugging Support" /><link rel="next" href="bk01pt02pr01.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Support</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</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="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.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="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.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/test.html b/libstdc++-v3/doc/html/manual/test.html
new file mode 100644
index 00000000000..6e3e3718f1b
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/test.html
@@ -0,0 +1,504 @@
+<?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>Test</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; test&#10; , &#10; testsuite&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="build.html" title="Build" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="build.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.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.intro.setup.test"></a>Test</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><p>
+ The directory <span class="emphasis"><em>libsrcdir/testsuite</em></span> contains the
+ individual test cases organized in sub-directories corresponding to
+ chapters of the C++ standard (detailed below), the dejagnu test
+ harness support files, and sources to various testsuite utilities
+ that are packaged in a separate testing library.
+</p><p>
+ All test cases for functionality required by the runtime components
+ of the C++ standard (ISO 14882) are files within the following
+ directories.
+</p><pre class="programlisting">
+17_intro
+18_support
+19_diagnostics
+20_util
+21_strings
+22_locale
+23_containers
+25_algorithms
+26_numerics
+27_io
+ </pre><p>
+ In addition, the following directories include test files:
+ </p><pre class="programlisting">
+tr1 Tests for components as described by the Technical Report on Standard Library Extensions (TR1).
+backward Tests for backwards compatibility and deprecated features.
+demangle Tests for __cxa_demangle, the IA 64 C++ ABI demangler
+ext Tests for extensions.
+performance Tests for performance analysis, and performance regressions.
+thread Tests for threads.
+ </pre><p>
+ Some directories don't have test files, but instead contain
+ auxiliary information (<a class="ulink" href="#internals" target="_top">more information</a>):
+ </p><pre class="programlisting">
+config Files for the dejagnu test harness.
+lib Files for the dejagnu test harness.
+libstdc++* Files for the dejagnu test harness.
+data Sample text files for testing input and output.
+util Files for libtestc++, utilities and testing routines.
+ </pre><p>
+ Within a directory that includes test files, there may be
+ additional subdirectories, or files. Originally, test cases
+ were appended to one file that represented a particular section
+ of the chapter under test, and was named accordingly. For
+ instance, to test items related to <code class="code"> 21.3.6.1 -
+ basic_string::find [lib.string::find]</code> in the standard,
+ the following was used:
+ </p><pre class="programlisting">
+21_strings/find.cc
+ </pre><p>
+ However, that practice soon became a liability as the test cases
+ became huge and unwieldy, and testing new or extended
+ functionality (like wide characters or named locales) became
+ frustrating, leading to aggressive pruning of test cases on some
+ platforms that covered up implementation errors. Now, the test
+ suite has a policy of one file, one test case, which solves the
+ above issues and gives finer grained results and more manageable
+ error debugging. As an example, the test case quoted above
+ becomes:
+ </p><pre class="programlisting">
+21_strings/basic_string/find/char/1.cc
+21_strings/basic_string/find/char/2.cc
+21_strings/basic_string/find/char/3.cc
+21_strings/basic_string/find/wchar_t/1.cc
+21_strings/basic_string/find/wchar_t/2.cc
+21_strings/basic_string/find/wchar_t/3.cc
+ </pre><p>
+ All new tests should be written with the policy of one test
+ case, one file in mind.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.naming"></a>Naming Conventions</h3></div></div></div><p>
+ </p><p>
+ In addition, there are some special names and suffixes that are
+ used within the testsuite to designate particular kinds of
+ tests.
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ <span class="emphasis"><em>_xin.cc</em></span>
+ </p><p>
+ This test case expects some kind of interactive input in order
+ to finish or pass. At the moment, the interactive tests are not
+ run by default. Instead, they are run by hand, like:
+ </p><pre class="programlisting">
+g++ 27_io/objects/char/3_xin.cc
+cat 27_io/objects/char/3_xin.in | a.out
+ </pre></li><li><p>
+ <span class="emphasis"><em>.in</em></span>
+ </p><p>
+ This file contains the expected input for the corresponding <span class="emphasis"><em>
+ _xin.cc</em></span> test case.
+ </p></li><li><p>
+ <span class="emphasis"><em>_neg.cc</em></span>
+ </p><p>
+ This test case is expected to fail: it's a negative test. At the
+ moment, these are almost always compile time errors.
+ </p></li><li><p>
+ <span class="emphasis"><em>char</em></span>
+ </p><p>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing the <code class="code">char</code> instantiation of a
+ template.
+ </p></li><li><p>
+ <span class="emphasis"><em>wchar_t</em></span>
+ </p><p>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing the <code class="code">wchar_t</code> instantiation of
+ a template. Some hosts do not support <code class="code">wchar_t</code>
+ functionality, so for these targets, all of these tests will not
+ be run.
+ </p></li><li><p>
+ <span class="emphasis"><em>thread</em></span>
+ </p><p>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing situations where multiple threads are
+ being used.
+ </p></li><li><p>
+ <span class="emphasis"><em>performance</em></span>
+ </p><p>
+ This can either be an enclosing directory name or part of a
+ specific file name. This indicates a test that is used to
+ analyze runtime performance, for performance regression testing,
+ or for other optimization related analysis. At the moment, these
+ test cases are not run by default.
+ </p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.utils"></a>Utilities</h3></div></div></div><p>
+ </p><p>
+ The testsuite directory also contains some files that implement
+ functionality that is intended to make writing test cases easier,
+ or to avoid duplication, or to provide error checking in a way that
+ is consistent across platforms and test harnesses. A stand-alone
+ executable, called <span class="emphasis"><em>abi_check</em></span>, and a static
+ library called <span class="emphasis"><em>libtestc++</em></span> are
+ constructed. Both of these items are not installed, and only used
+ during testing.
+ </p><p>
+ These files include the following functionality:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ <span class="emphasis"><em>testsuite_abi.h</em></span>,
+ <span class="emphasis"><em>testsuite_abi.cc</em></span>,
+ <span class="emphasis"><em>testsuite_abi_check.cc</em></span>
+ </p><p>
+ Creates the executable <span class="emphasis"><em>abi_check</em></span>.
+ Used to check correctness of symbol versioning, visibility of
+ exported symbols, and compatibility on symbols in the shared
+ library, for hosts that support this feature. More information
+ can be found in the ABI documentation <a class="ulink" href="abi.html" target="_top">here</a>
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_allocator.h</em></span>,
+ <span class="emphasis"><em>testsuite_allocator.cc</em></span>
+ </p><p>
+ Contains specialized allocators that keep track of construction
+ and destruction. Also, support for overriding global new and
+ delete operators, including verification that new and delete
+ are called during execution, and that allocation over max_size
+ fails.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_character.h</em></span>
+ </p><p>
+ Contains <code class="code">std::char_traits</code> and
+ <code class="code">std::codecvt</code> specializations for a user-defined
+ POD.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_hooks.h</em></span>,
+ <span class="emphasis"><em>testsuite_hooks.cc</em></span>
+ </p><p>
+ A large number of utilities, including:
+ </p><div class="itemizedlist"><ul type="circle"><li><p>VERIFY</p></li><li><p>set_memory_limits</p></li><li><p>verify_demangle</p></li><li><p>run_tests_wrapped_locale</p></li><li><p>run_tests_wrapped_env</p></li><li><p>try_named_locale</p></li><li><p>try_mkfifo</p></li><li><p>func_callback</p></li><li><p>counter</p></li><li><p>copy_tracker</p></li><li><p>copy_constructor</p></li><li><p>assignment_operator</p></li><li><p>destructor</p></li><li><p>pod_char, pod_int and associated char_traits specializations</p></li></ul></div></li><li><p>
+ <span class="emphasis"><em>testsuite_io.h</em></span>
+ </p><p>
+ Error, exception, and constraint checking for
+ <code class="code">std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_iterators.h</em></span>
+ </p><p>
+ Wrappers for various iterators.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_performance.h</em></span>
+ </p><p>
+ A number of class abstractions for performance counters, and
+ reporting functions including:
+ </p><div class="itemizedlist"><ul type="circle"><li><p>time_counter</p></li><li><p>resource_counter</p></li><li><p>report_performance</p></li></ul></div></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.run"></a>Running the Testsuite</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.basic"></a>Basic Results</h4></div></div></div><p>
+ There are several options for running tests, including testing
+ the regression tests, testing a subset of the regression tests,
+ testing the performance tests, testing just compilation, testing
+ installed tools, etc. In addition, there is a special rule for
+ checking the exported symbols of the shared library.
+ </p><p>
+ You can check the status of the build without installing it
+ using the dejagnu harness, much like the rest of the gcc
+ tools.</p><pre class="programlisting"> make check</pre><p>in the <span class="emphasis"><em>libbuilddir</em></span> directory.</p><p>or</p><pre class="programlisting"> make check-target-libstdc++-v3</pre><p>in the <span class="emphasis"><em>gccbuilddir</em></span> directory.
+ </p><p>
+ These commands are functionally equivalent and will create a
+ 'testsuite' directory underneath
+ <span class="emphasis"><em>libbuilddir</em></span> containing the results of the
+ tests. Two results files will be generated: <span class="emphasis"><em>
+ libstdc++.sum</em></span>, which is a PASS/FAIL summary for each
+ test, and <span class="emphasis"><em>libstdc++.log</em></span> which is a log of
+ the exact command line passed to the compiler, the compiler
+ output, and the executable output (if any).
+ </p><p>
+ Archives of test results for various versions and platforms are
+ available on the GCC website in the <a class="ulink" href="http://gcc.gnu.org/gcc-4.1/buildstat.html" target="_top">build
+ status</a> section of each individual release, and are also
+ archived on a daily basis on the <a class="ulink" href="http://gcc.gnu.org/ml/gcc-testresults/current" target="_top">gcc-testresults</a>
+ mailing list. Please check either of these places for a similar
+ combination of source version, operating system, and host CPU.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.options"></a>Options</h4></div></div></div><p>
+ To debug the dejagnu test harness during runs, try invoking with a
+ specific argument to the variable RUNTESTFLAGS, as below.
+ </p><pre class="programlisting">
+make check-target-libstdc++-v3 RUNTESTFLAGS="-v"
+</pre><p>
+ or
+ </p><pre class="programlisting">
+make check-target-libstdc++-v3 RUNTESTFLAGS="-v -v"
+</pre><p>
+ To run a subset of the library tests, you will need to generate
+ the <span class="emphasis"><em>testsuite_files</em></span> file by running
+ <span class="command"><strong>make testsuite_files</strong></span> in the
+ <span class="emphasis"><em>libbuilddir/testsuite</em></span> directory, described
+ below. Edit the file to remove the tests you don't want and
+ then run the testsuite as normal.
+ </p><p>
+ There are two ways to run on a simulator: set up DEJAGNU to point to a
+ specially crafted site.exp, or pass down --target_board flags.
+ </p><p>
+ Example flags to pass down for various embedded builds are as follows:
+ </p><pre class="programlisting">
+ --target=powerpc-eabism (libgloss/sim)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=powerpc-sim"
+
+--target=calmrisc32 (libgloss/sid)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=calmrisc32-sid"
+
+--target=xscale-elf (newlib/sim)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=arm-sim"
+</pre><p>
+ Also, here is an example of how to run the libstdc++ testsuite
+ for a multilibed build directory with different ABI settings:
+ </p><pre class="programlisting">
+make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board \"unix{-mabi=32,,-mabi=64}\"'
+</pre><p>
+ You can run the tests with a compiler and library that have
+ already been installed. Make sure that the compiler (e.g.,
+ <code class="code">g++</code>) is in your <code class="code">PATH</code>. If you are
+ using shared libraries, then you must also ensure that the
+ directory containing the shared version of libstdc++ is in your
+ <code class="code">LD_LIBRARY_PATH</code>, or equivalent. If your GCC source
+ tree is at <code class="code">/path/to/gcc</code>, then you can run the tests
+ as follows:
+ </p><pre class="programlisting">
+runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
+</pre><p>
+ The testsuite will create a number of files in the directory in
+ which you run this command,. Some of those files might use the
+ same name as files created by other testsuites (like the ones
+ for GCC and G++), so you should not try to run all the
+ testsuites in parallel from the same directory.
+ </p><p>
+ In addition, there are some testing options that are mostly of
+ interest to library maintainers and system integrators. As such,
+ these tests may not work on all cpu and host combinations, and
+ may need to be executed in the
+ <span class="emphasis"><em>libbuilddir/testsuite</em></span> directory. These
+ options include, but are not necessarily limited to, the
+ following:
+ </p><pre class="programlisting">
+ make testsuite_files
+ </pre><p>
+ Five files are generated that determine what test files
+ are run. These files are:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ <span class="emphasis"><em>testsuite_files</em></span>
+ </p><p>
+ This is a list of all the test cases that will be run. Each
+ test case is on a separate line, given with an absolute path
+ from the <span class="emphasis"><em>libsrcdir/testsuite</em></span> directory.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_files_interactive</em></span>
+ </p><p>
+ This is a list of all the interactive test cases, using the
+ same format as the file list above. These tests are not run
+ by default.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_files_performance</em></span>
+ </p><p>
+ This is a list of all the performance test cases, using the
+ same format as the file list above. These tests are not run
+ by default.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_thread</em></span>
+ </p><p>
+ This file indicates that the host system can run tests which
+ incolved multiple threads.
+ </p></li><li><p>
+ <span class="emphasis"><em>testsuite_wchar_t</em></span>
+ </p><p>
+ This file indicates that the host system can run the wchar_t
+ tests, and corresponds to the macro definition <code class="code">
+ _GLIBCXX_USE_WCHAR_T</code> in the file c++config.h.
+ </p></li></ul></div><pre class="programlisting">
+ make check-abi
+ </pre><p>
+ The library ABI can be tested. This involves testing the shared
+ library against an ABI-defining previous version of symbol
+ exports.
+ </p><pre class="programlisting">
+ make check-compile
+ </pre><p>
+ This rule compiles, but does not link or execute, the
+ <span class="emphasis"><em>testsuite_files</em></span> test cases and displays the
+ output on stdout.
+ </p><pre class="programlisting">
+ make check-performance
+ </pre><p>
+ This rule runs through the
+ <span class="emphasis"><em>testsuite_files_performance</em></span> test cases and
+ collects information for performance analysis and can be used to
+ spot performance regressions. Various timing information is
+ collected, as well as number of hard page faults, and memory
+ used. This is not run by default, and the implementation is in
+ flux.
+ </p><p>
+ We are interested in any strange failures of the testsuite;
+ please email the main libstdc++ mainling list if you see
+ something odd or have questions.
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.permutations"></a>Test Permutations</h4></div></div></div><p>
+ To run the libstdc++ test suite under the <a class="link" href="debug_mode.html" title="Chapter 30. Debug Mode">debug mode</a>, edit
+ <code class="filename">libstdc++-v3/scripts/testsuite_flags</code> to add the
+ compile-time flag <code class="constant">-D_GLIBCXX_DEBUG</code> to the
+ result printed by the <code class="literal">--build-cxx</code>
+ option. Additionally, add the
+ <code class="constant">-D_GLIBCXX_DEBUG_PEDANTIC</code> flag to turn on
+ pedantic checking. The libstdc++ test suite should produce
+ precisely the same results under debug mode that it does under
+ release mode: any deviation indicates an error in either the
+ library or the test suite.
+ </p><p>
+ Or, just run the testsuites with <code class="constant">CXXFLAGS</code>
+ set to <code class="constant">-D_GLIBCXX_DEBUG</code>.
+ </p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.new_tests"></a>New Test Cases</h3></div></div></div><p>
+ The first step in making a new test case is to choose the correct
+ directory and file name, given the organization as previously
+ described.
+ </p><p>
+ All files are copyright the FSF, and GPL'd: this is very
+ important. The first copyright year should correspond to the date
+ the file was checked in to SVN.
+ </p><p>
+ As per the dejagnu instructions, always return 0 from main to
+ indicate success.
+ </p><p>
+ A bunch of utility functions and classes have already been
+ abstracted out into the testsuite utility library, <code class="code">
+ libtestc++</code>. To use this functionality, just include the
+ appropriate header file: the library or specific object files will
+ automatically be linked in as part of the testsuite run.
+ </p><p>
+ For a test that needs to take advantage of the dejagnu test
+ harness, what follows below is a list of special keyword that
+ harness uses. Basically, a test case contains dg-keywords (see
+ dg.exp) indicating what to do and what kinds of behavior are to be
+ expected. New test cases should be written with the new style
+ DejaGnu framework in mind.
+ </p><p>
+ To ease transition, here is the list of dg-keyword documentation
+ lifted from dg.exp.
+ </p><pre class="programlisting">
+# The currently supported options are:
+#
+# dg-prms-id N
+# set prms_id to N
+#
+# dg-options "options ..." [{ target selector }]
+# specify special options to pass to the tool (eg: compiler)
+#
+# dg-do do-what-keyword [{ target/xfail selector }]
+# `do-what-keyword' is tool specific and is passed unchanged to
+# ${tool}-dg-test. An example is gcc where `keyword' can be any of:
+# preprocess|compile|assemble|link|run
+# and will do one of: produce a .i, produce a .s, produce a .o,
+# produce an a.out, or produce an a.out and run it (the default is
+# compile).
+#
+# dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate an error message &lt;regexp&gt; is expected on this line
+# (the test fails if it doesn't occur)
+# Linenum=0 for general tool messages (eg: -V arg missing).
+# "." means the current line.
+#
+# dg-warning regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate a warning message &lt;regexp&gt; is expected on this line
+# (the test fails if it doesn't occur)
+#
+# dg-bogus regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate a bogus error message &lt;regexp&gt; use to occur here
+# (the test fails if it does occur)
+#
+# dg-build regexp comment [{ target/xfail selector }]
+# indicate the build use to fail for some reason
+# (errors covered here include bad assembler generated, tool crashes,
+# and link failures)
+# (the test fails if it does occur)
+#
+# dg-excess-errors comment [{ target/xfail selector }]
+# indicate excess errors are expected (any line)
+# (this should only be used sparingly and temporarily)
+#
+# dg-output regexp [{ target selector }]
+# indicate the expected output of the program is &lt;regexp&gt;
+# (there may be multiple occurrences of this, they are concatenated)
+#
+# dg-final { tcl code }
+# add some tcl code to be run at the end
+# (there may be multiple occurrences of this, they are concatenated)
+# (unbalanced braces must be \-escaped)
+#
+# "{ target selector }" is a list of expressions that determine whether the
+# test succeeds or fails for a particular target, or in some cases whether the
+# option applies for a particular target. If the case of `dg-do' it specifies
+# whether the test case is even attempted on the specified target.
+#
+# The target selector is always optional. The format is one of:
+#
+# { xfail *-*-* ... } - the test is expected to fail for the given targets
+# { target *-*-* ... } - the option only applies to the given targets
+#
+# At least one target must be specified, use *-*-* for "all targets".
+# At present it is not possible to specify both `xfail' and `target'.
+# "native" may be used in place of "*-*-*".
+
+Example 1: Testing compilation only
+// { dg-do compile }
+
+Example 2: Testing for expected warnings on line 36, which all targets fail
+// { dg-warning "string literals" "" { xfail *-*-* } 36
+
+Example 3: Testing for expected warnings on line 36
+// { dg-warning "string literals" "" { target *-*-* } 36
+
+Example 4: Testing for compilation errors on line 41
+// { dg-do compile }
+// { dg-error "no match for" "" { target *-*-* } 41 }
+
+Example 5: Testing with special command line settings, or without the
+use of pre-compiled headers, in particular the stdc++.h.gch file. Any
+options here will override the DEFAULT_CXXFLAGS and PCH_CXXFLAGS set
+up in the normal.exp file.
+// { dg-options "-O0" { target *-*-* } }
+</pre><p>
+ More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.dejagnu"></a>Test Harness Details</h3></div></div></div><p>
+ Underlying details of testing are abstracted via the GNU Dejagnu package.
+ </p><p>This is information for those looking at making changes to the testsuite
+structure, and/or needing to trace dejagnu's actions with --verbose. This
+will not be useful to people who are "merely" adding new tests to the existing
+structure.
+</p><p>The first key point when working with dejagnu is the idea of a "tool".
+Files, directories, and functions are all implicitly used when they are
+named after the tool in use. Here, the tool will always be "libstdc++".
+</p><p>The <code class="code">lib</code> subdir contains support routines. The
+<code class="code">lib/libstdc++.exp</code> file ("support library") is loaded
+automagically, and must explicitly load the others. For example, files can
+be copied from the core compiler's support directory into <code class="code">lib</code>.
+</p><p>Some routines in <code class="code">lib/libstdc++.exp</code> are callbacks, some are
+our own. Callbacks must be prefixed with the name of the tool. To easily
+distinguish the others, by convention our own routines are named "v3-*".
+</p><p>The next key point when working with dejagnu is "test files". Any
+directory whose name starts with the tool name will be searched for test files.
+(We have only one.) In those directories, any <code class="code">.exp</code> file is
+considered a test file, and will be run in turn. Our main test file is called
+<code class="code">normal.exp</code>; it runs all the tests in testsuite_files using the
+callbacks loaded from the support library.
+</p><p>The <code class="code">config</code> directory is searched for any particular "target
+board" information unique to this library. This is currently unused and sets
+only default variables.
+</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.future"></a>Future</h3></div></div></div><p>
+ </p><p>
+Shared runs need to be implemented, for targets that support shared libraries.
+</p><p>
+Diffing of expected output to standard streams needs to be finished off.
+</p><p>
+The V3 testing framework supports, or will eventually support,
+additional keywords for the purpose of easing the job of writing
+test cases. All V3-keywords are of the form <code class="code">@xxx@</code>.
+Currently plans for supported keywords include:
+</p><div class="variablelist"><dl><dt><span class="term"> <code class="code"> @require@ &lt;files&gt; </code> </span></dt><dd><p>
+ The existence of &lt;files&gt; is essential for the test to complete
+ successfully. For example, a test case foo.C using bar.baz as
+ input file could say
+ </p><pre class="programlisting">
+ // @require@ bar.baz</pre><p>
+ The special variable % stands for the rootname, e.g. the
+ file-name without its `.C' extension. Example of use (taken
+ verbatim from 27_io/filebuf.cc)
+ </p><pre class="programlisting">
+ // @require@ %-*.tst %-*.txt</pre></dd><dt><span class="term"> <code class="code"> @diff@ &lt;first-list&gt; &lt;second-list&gt; </code> </span></dt><dd><p>
+ After the test case compiles and ran successfully, diff
+ &lt;first-list&gt; against &lt;second-list&gt;, these lists should
+ have the same length. The test fails if diff returns non-zero a
+ pair of files.
+ </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="build.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Build </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html
new file mode 100644
index 00000000000..e1b5ad75810
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/using.html
@@ -0,0 +1,41 @@
+<?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 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" 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="bk01pt01ch03s02.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="bk01pt01ch03s02.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="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exception Safety</a></span></dt><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 <span class="command"><strong>g++</strong></span></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 <span class="command"><strong>gdb</strong></span></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>
+ 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
+ against it, then you will need to find that library when you run
+ the executable.
+ </p><p>
+ Methods vary for different platforms and different styles, but
+ the usual ones are printed to the screen during installation.
+ They include:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>
+ At runtime set LD_LIBRARY_PATH in your environment
+ correctly, so that the shared library for libstdc++ can be
+ found and loaded. Be certain that you understand all of the
+ other implications and behavior of LD_LIBRARY_PATH first
+ (few people do, and they get into trouble).
+ </p></li><li><p>
+ Compile the path to find the library at runtime into the
+ program. This can be done by passing certain options to
+ g++, which will in turn pass them on to the linker. The
+ exact format of the options is dependent on which linker you
+ use:
+ </p><div class="itemizedlist"><ul type="circle"><li><p>
+ GNU ld (default on Linux):<code class="literal">-Wl,--rpath,<code class="filename">destdir</code>/lib</code>
+ </p></li><li><p>
+ IRIX ld:<code class="literal">
+ -Wl,-rpath,<code class="filename">destdir</code>/lib</code>
+ </p></li><li><p>
+ Solaris ld:<code class="literal">-Wl,-R<code class="filename">destdir</code>/lib</code>
+ </p></li><li><p>
+ More...? Let us know!
+ </p></li></ul></div></li></ul></div><p>
+ Use the <span class="command"><strong>ldd</strong></span> utility to show which library the
+ system thinks it will get at runtime.
+ </p><p>
+ A libstdc++.la file is also installed, for use with Libtool. If
+ you use Libtool to create your executables, these details are
+ taken care of for you.
+ </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.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="bk01pt01ch03s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Test </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Headers</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html
new file mode 100644
index 00000000000..c7f58bf10d2
--- /dev/null
+++ b/libstdc++-v3/doc/html/manual/utilities.html
@@ -0,0 +1,3 @@
+<?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>Part IV. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="bk01pt04ch09.html" title="Chapter 9. Functors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV. Utilities</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="bk01pt04ch09.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</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.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="bk01pt04ch12.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="bk01pt04ch09.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
new file mode 100644
index 00000000000..12840aaa909
--- /dev/null
+++ b/libstdc++-v3/doc/html/spine.html
@@ -0,0 +1,5 @@
+<?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>The GNU C++ Library Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="manual/spine.html" title="The GNU C++ Library" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library Documentation</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr></table><hr /></div><div class="set" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="set-index"></a>The GNU C++ Library Documentation</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Paolo</span> <span class="surname">Carlini</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Phil</span> <span class="surname">Edwards</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Doug</span> <span class="surname">Gregor</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Dhruv</span> <span class="surname">Matani</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jason</span> <span class="surname">Merrill</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Mark</span> <span class="surname">Mitchell</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Nathan</span> <span class="surname">Myers</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Felix</span> <span class="surname">Natter</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Olsson</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Ami</span> <span class="surname">Tavory</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jonathan</span> <span class="surname">Wakely</span></h3></div></div></div><div><p class="copyright">Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ <a class="ulink" href="http://fsf.org" target="_top">FSF</a>
+ </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/bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="manual/build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/build.html#build.configure">Make</a></span></dt></dl></dd><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.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.utils">Utilities</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">New Test Cases</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.future">Future</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/bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s06.html">Exception Safety</a></span></dt><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 <span class="command"><strong>g++</strong></span></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 <span class="command"><strong>gdb</strong></span></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. 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/bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch04.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/bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="manual/utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="manual/strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s02.html">Case Sensivitity</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch25.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/bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch27.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><dt><span class="sect1"><a href="manual/bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch28.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/bk01pt12ch29.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#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.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.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#manual.ext.parallel_mode.usings">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#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.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/bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.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/bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch33.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/bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="manual/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 Builitin 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. 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/bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="manual/bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.bad_identifiers">Bad Itentifiers</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="manual/bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="manual/bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/xml/api.xml b/libstdc++-v3/doc/xml/api.xml
new file mode 100644
index 00000000000..bd38e8392cc
--- /dev/null
+++ b/libstdc++-v3/doc/xml/api.xml
@@ -0,0 +1,94 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<book>
+
+<article id="api" xreflabel="API">
+<?dbhtml filename="api.html"?>
+
+<articleinfo>
+ <title>API and Source Level Documentation</title>
+ <copyright>
+ <year>
+ 2008
+ </year>
+ <holder>
+ <ulink url="http://fsf.org">FSF
+ </ulink>
+ </holder>
+ </copyright>
+ <legalnotice>
+ <para>
+ <ulink url="17_intro/license.html">License
+ </ulink>
+ </para>
+ </legalnotice>
+</articleinfo>
+
+<para>
+The GNU C++ library sources have been specially formatted so that with the
+proper invocation of another tool (Doxygen), a set of HTML pages
+are generated from the sources files themselves. The resultant
+documentation is referred to as Source Level Documentation, and is
+useful for examining the signatures of public member functions for
+the library classes, finding out what is in a particular include
+file, looking at inheritance diagrams, etc.
+</para>
+
+<para>
+The source-level documentation for the most recent releases can be
+viewed online:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="libstdc++-html-USERS-3.4/index.html">for the 3.4 release
+ </ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="libstdc++-html-USERS-4.1/index.html">for the 4.1 release
+ </ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="libstdc++-html-USERS-4.2/index.html">for the 4.2 release
+ </ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="latest-doxygen/index.html">&quot;the latest collection&quot;
+ </ulink>
+ (For the main development tree; see the date on the first page.)
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+This generated HTML collection, as above, is also available for download in the libstdc++ snapshots directory at
+ <literal>&lt;URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/&gt;</literal>.
+ You will almost certainly need to use one of the
+ <ulink url="http://gcc.gnu.org/mirrors.html">mirror sites</ulink> to download
+ the tarball. After unpacking, simply load libstdc++-html-*/index.html
+ into a browser.
+</para>
+
+<para>
+Documentation for older releases is available for download only, not
+online viewing.
+</para>
+
+<para>
+In addition, an initial set of man pages are also available in the
+same place as the HTML collections. Start with C++Intro(3).
+</para>
+
+</article>
+
+</book>
diff --git a/libstdc++-v3/doc/xml/authors.xml b/libstdc++-v3/doc/xml/authors.xml
new file mode 100644
index 00000000000..dfcdf24d1b9
--- /dev/null
+++ b/libstdc++-v3/doc/xml/authors.xml
@@ -0,0 +1,174 @@
+<authorgroup>
+
+<!--
+ <author>
+ <firstname>Benjamin</firstname>
+ <surname>Kosnik</surname>
+
+ <affiliation>
+ <shortaffil>Red Hat</shortaffil>
+ <orgname>Red Hat, Inc.</orgname>
+ <address>
+ <email>libstdc++@gcc.gnu.org</email>
+ </address>
+ </affiliation>
+
+ <authorblurb>
+ <para>
+ </para>
+ </authorblurb>
+ </author>
+-->
+
+ <author>
+ <firstname>Paolo</firstname>
+ <surname>Carlini</surname>
+
+ <authorblurb>
+ <para>
+ TR1, LWG Active, Closed, Defects lists.
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Phil</firstname>
+ <surname>Edwards</surname>
+
+ <authorblurb>
+ <para>
+ Originating author, started HOWTO and FAQ, worked on sections
+ Demangling, Macros, Strings, Iterators, Backwards
+ Compatibility, SGI Extensions, Configure, Build, Install.
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Doug</firstname>
+ <surname>Gregor</surname>
+
+ <authorblurb>
+ <para>
+ Debug Mode, TR1 function objects
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Benjamin</firstname>
+ <surname>Kosnik</surname>
+
+ <authorblurb>
+ <para>
+ Allocators, ABI, API evolution and deprecation history,
+ Backwards Compatibility, Thread, Debug Support, Locales,
+ Facets, Parallel Mode, Headers, Namespaces, Construction and
+ Structure, DocBook conversion and layout.
+ </para>
+ </authorblurb>
+ </author>
+
+
+ <author>
+ <firstname>Dhruv</firstname>
+ <surname>Matani</surname>
+
+ <authorblurb>
+ <para>
+ bitmap_allocator
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Jason</firstname>
+ <surname>Merrill</surname>
+
+ <authorblurb>
+ <para>
+ License, __verbose_terminate_handler
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Mark</firstname>
+ <surname>Mitchell</surname>
+
+ <authorblurb>
+ <para>
+ Porting
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Nathan</firstname>
+ <surname>Myers</surname>
+
+ <authorblurb>
+ <para>
+ Referenced counted string, C++1998 implementation status.
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Felix</firstname>
+ <surname>Natter</surname>
+
+ <authorblurb>
+ <para>
+ Namespace composition, Backwards Compatibility.
+ </para>
+ </authorblurb>
+ </author>
+
+
+ <author>
+ <firstname>Stefan</firstname>
+ <surname>Olsson</surname>
+
+ <authorblurb>
+ <para>
+ mt_allocator
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Johannes</firstname>
+ <surname>Singler</surname>
+
+ <authorblurb>
+ <para>
+ Parallel mode
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Ami</firstname>
+ <surname>Tavory</surname>
+
+ <authorblurb>
+ <para>
+ Policy Based Datastructures, Associative Containers, Unordered
+ Containers.
+ </para>
+ </authorblurb>
+ </author>
+
+ <author>
+ <firstname>Jonathan</firstname>
+ <surname>Wakely</surname>
+
+ <authorblurb>
+ <para>
+ shared_ptr, markup editing and styling
+ </para>
+ </authorblurb>
+ </author>
+
+</authorgroup>
diff --git a/libstdc++-v3/doc/xml/book.txml b/libstdc++-v3/doc/xml/book.txml
new file mode 100644
index 00000000000..990ca3bea20
--- /dev/null
+++ b/libstdc++-v3/doc/xml/book.txml
@@ -0,0 +1,33 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<book id="api" xreflabel="Source Level Documentation">
+<title>Source Level Documentation</title>
+
+<bookinfo>
+ <copyright>
+ <year>2007</year>
+ <holder>
+ <ulink url="fsf.org">FSF
+ </ulink>
+ </holder>
+ </copyright>
+ <legalnotice>
+ <para>
+ <ulink url="17_intro/license.html">License
+ </ulink>
+ </para>
+ </legalnotice>
+</bookinfo>
+
+<part>
+<title></title>
+ <chapter>
+ <title></title>
+ <para></para>
+ </chapter>
+</part>
+
+</book>
diff --git a/libstdc++-v3/doc/xml/chapter.txml b/libstdc++-v3/doc/xml/chapter.txml
new file mode 100644
index 00000000000..9cf5b74e855
--- /dev/null
+++ b/libstdc++-v3/doc/xml/chapter.txml
@@ -0,0 +1,54 @@
+<?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.intro" xreflabel="Introduction">
+
+<chapterinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</chapterinfo>
+
+<title>Introduction</title>
+
+<sect1 id="manual.intro.status" xreflabel="Status">
+ <title>Status</title>
+ <para>
+ The GNU C++ ...
+ </para>
+</sect1>
+
+<sect1 id="manual.intro.setup" xreflabel="Setup">
+ <title>Setup</title>
+ <para>
+ The GNU C++ ...
+ </para>
+ <sect2 id="manual.intro.setup.next1" xreflabel="Next1">
+ <title>Next1</title>
+ <para>
+ The GNU C++ ...
+ </para>
+ </sect2>
+ <sect2 id="manual.intro.setup.next2" xreflabel="Next2">
+ <title>Next2</title>
+ <para>
+ The GNU C++ ...
+ </para>
+ </sect2>
+</sect1>
+
+<sect1 id="manual.intro.using" xreflabel="Using">
+ <title>Using</title>
+ <para>
+ The GNU C++ ...
+ </para>
+</sect1>
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/class.txml b/libstdc++-v3/doc/xml/class.txml
new file mode 100644
index 00000000000..4e628f8c7c6
--- /dev/null
+++ b/libstdc++-v3/doc/xml/class.txml
@@ -0,0 +1,154 @@
+<sect1 id="manual.util.memory.allocator" xreflabel="allocator">
+<?dbhtml filename="allocator.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ allocator
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>allocator</title>
+
+<para>
+</para>
+
+<sect2 id="allocator.req" xreflabel="allocator.req">
+<title>Requirements</title>
+
+ <para>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ </para>
+</sect2>
+
+<sect2 id="allocator.design_issues" xreflabel="allocator.design_issues">
+<title>Design Issues</title>
+
+ <para>
+ </para>
+
+ <para>
+ </para>
+</sect2>
+
+<sect2 id="allocator.impl" xreflabel="allocator.impl">
+<title>Implementation</title>
+
+ <sect3>
+ <title>Interface Design</title>
+
+ <para>
+ </para>
+
+ <para>
+ </para>
+ </sect3>
+
+ <sect3>
+ <title>Selecting Default Allocation Strategy</title>
+
+ <para>
+ </para>
+
+ <orderedlist>
+ <listitem>
+ </listitem>
+
+ <listitem>
+ </listitem>
+
+ <listitem>
+ </listitem>
+ </orderedlist>
+ </sect3>
+
+ <sect3>
+ <title>Disabling Memory Caching</title>
+
+ <para>
+ </para>
+
+ <para>
+ </para>
+ </sect3>
+</sect2>
+
+<sect2 id="allocator.using" xreflabel="allocator.using">
+<title>Using</title>
+
+ <para>
+ </para>
+</sect2>
+
+<sect2 id="allocator.custom" xreflabel="allocator.custom">
+<title>Custom Allocators</title>
+
+ <para>
+ </para>
+
+ <para>
+ </para>
+</sect2>
+
+<bibliography id="allocator.biblio" xreflabel="allocator.biblio">
+<title>Bibliography</title>
+
+<!--
+ <biblioentry>
+ <abbrev>
+ </abbrev>
+
+ <title>
+ </title>
+
+ <editor>
+ <firstname></firstname>
+ <surname></surname>
+ </editor>
+
+ <author>
+ <surname></surname>
+ <firstname></firstname>
+ </author>
+
+ <copyright>
+ <year></year>
+ <holder></holder>
+ </copyright>
+ <pagenums></pagenums>
+
+ <publisher>
+ <publishername>
+ </publishername>
+ </publisher>
+
+ <biblioid>
+ <ulink url="">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+-->
+
+ <biblioentry>
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml
new file mode 100644
index 00000000000..629d1ec12a6
--- /dev/null
+++ b/libstdc++-v3/doc/xml/faq.xml
@@ -0,0 +1,1254 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<book>
+
+<article id="faq" xreflabel="Frequently Asked Questions">
+<?dbhtml filename="faq.html"?>
+
+<articleinfo>
+ <title>Frequently Asked Questions</title>
+ <copyright>
+ <year>
+ 2008
+ </year>
+ <holder>
+ <ulink url="http://fsf.org">FSF</ulink>
+ </holder>
+ </copyright>
+</articleinfo>
+
+<!-- FAQ starts here -->
+<qandaset>
+
+<!-- General Information -->
+<qandadiv id="faq.info" xreflabel="General Information">
+<title>General Information</title>
+
+<qandaentry id="faq.what">
+ <question id="faq.what.q">
+ <para>
+ What is libstdc++?
+ </para>
+ </question>
+ <answer id="faq.what.a">
+ <para>
+ The GNU Standard C++ Library v3 is an ongoing project to
+ implement the ISO 14882 Standard C++ library as described in
+ chapters 17 through 27 and annex D. For those who want to see
+ exactly how far the project has come, or just want the latest
+ bleeding-edge code, the up-to-date source is available over
+ anonymous SVN, and can even be browsed over
+ the <ulink url="http://gcc.gnu.org/svn.html">web</ulink>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.why">
+ <question id="q-why">
+ <para>
+ Why should I use libstdc++?
+ </para>
+ </question>
+ <answer id="a-why">
+ <para>
+ The completion of the ISO C++ standardization gave the C++
+ community a powerful set of reuseable tools in the form of the C++
+ Standard Library. However, all existing C++ implementations are
+ (as the Draft Standard used to say) <quote>incomplet and
+ incorrekt</quote>, and many suffer from limitations of the compilers
+ that use them.
+ </para>
+ <para>
+ The GNU compiler collection
+ (<command>gcc</command>, <command>g++</command>, etc) is widely
+ considered to be one of the leading compilers in the world. Its
+ development is overseen by the
+ <ulink url="http://gcc.gnu.org/">GCC team</ulink>. All of
+ the rapid development and near-legendary
+ <ulink url="http://gcc.gnu.org/buildstat.html">portability</ulink>
+ that are the hallmarks of an open-source project are being
+ applied to libstdc++.
+ </para>
+ <para>
+ That means that all of the Standard classes and functions will be
+ freely available and fully compliant. (Such as
+ <classname>string</classname>,
+ <classname>vector&lt;&gt;</classname>, iostreams, and algorithms.)
+ Programmers will no longer need to <quote>roll their own</quote>
+ nor be worried about platform-specific incompatibilities.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.who">
+ <question id="q-who">
+ <para>
+ Who's in charge of it?
+ </para>
+ </question>
+ <answer id="a-who">
+ <para>
+ The libstdc++ project is contributed to by several developers
+ all over the world, in the same way as GCC or Linux.
+ Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper,
+ Loren James Rittle, and Paolo Carlini are the lead maintainers of
+ the SVN archive.
+ </para>
+ <para>
+ Development and discussion is held on the libstdc++ mailing
+ list. Subscribing to the list, or searching the list
+ archives, is open to everyone. You can read instructions for
+ doing so on the <ulink url="http://gcc.gnu.org/libstdc++/">homepage</ulink>.
+ If you have questions, ideas, code, or are just curious, sign up!
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.when">
+ <question id="q-when">
+ <para>
+ When is libstdc++ going to be finished?
+ </para>
+ </question>
+ <answer id="a-when">
+ <para>
+ Nathan Myers gave the best of all possible answers, responding to
+ a Usenet article asking this question: <emphasis>Sooner, if you
+ help.</emphasis>
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.how">
+ <question id="q-how">
+ <para>
+ How do I contribute to the effort?
+ </para>
+ </question>
+ <answer id="a-how">
+ <para>
+ Here is <ulink url="../17_intro/contribute.html">a page devoted to
+ this topic</ulink>. Subscribing to the mailing list (see above, or
+ the homepage) is a very good idea if you have something to
+ contribute, or if you have spare time and want to
+ help. Contributions don't have to be in the form of source code;
+ anybody who is willing to help write documentation, for example,
+ or has found a bug in code that we all thought was working and is
+ willing to provide details, is more than welcome!
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.whereis_old">
+ <question id="q-whereis_old">
+ <para>
+ What happened to the older libg++? I need that!
+ </para>
+ </question>
+ <answer id="a-whereis_old">
+ <para>
+ The most recent libg++ README states that libg++ is no longer
+ being actively maintained. It should not be used for new
+ projects, and is only being kicked along to support older code.
+ </para>
+ <para>
+ More information in the <link linkend="manual.appendix.porting.backwards">backwards compatibility documentation</link>
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.more_questions">
+ <question id="q-more_questions">
+ <para>
+ What if I have more questions?
+ </para>
+ </question>
+ <answer id="a-more_questions">
+ <para>
+ If you have read the README file, and your question remains
+ unanswered, then just ask the mailing list. At present, you do not
+ need to be subscribed to the list to send a message to it. More
+ information is available on the homepage (including how to browse
+ the list archives); to send a message to the list,
+ use <email>libstdc++@gcc.gnu.org</email>.
+ </para>
+
+ <para>
+ If you have a question that you think should be included
+ here, or if you have a question <emphasis>about</emphasis> a question/answer
+ here, please send email to the libstdc++ mailing list, as above.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+<!-- License -->
+<qandadiv id="faq.license" xreflabel="License QA">
+<title>License</title>
+
+<qandaentry id="faq.license.what">
+ <question id="q-license.what">
+ <para>
+ What are the license terms for libstdc++?
+ </para>
+ </question>
+ <answer id="a-license.what">
+ <para>
+ See <link linkend="manual.intro.status.license">our license description</link>
+ for these and related questions.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.license.any_program">
+ <question id="q-license.any_program">
+ <para>
+ So any program which uses libstdc++ falls under the GPL?
+ </para>
+ </question>
+ <answer id="a-license.any_program">
+ <para>
+ No. The special exception permits use of the library in
+ proprietary applications.
+ </para>
+ </answer>
+</qandaentry>
+
+
+<qandaentry id="faq.license.lgpl">
+ <question id="q-license.lgpl">
+ <para>
+ How is that different from the GNU {Lesser,Library} GPL?
+ </para>
+ </question>
+ <answer id="a-license.lgpl">
+ <para>
+ The LGPL requires that users be able to replace the LGPL code with a
+ modified version; this is trivial if the library in question is a C
+ shared library. But there's no way to make that work with C++, where
+ much of the library consists of inline functions and templates, which
+ are expanded inside the code that uses the library. So to allow people
+ to replace the library code, someone using the library would have to
+ distribute their own source, rendering the LGPL equivalent to the GPL.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.license.what_restrictions">
+ <question id="q-license.what_restrictions">
+ <para>
+ I see. So, what restrictions are there on programs that use the library?
+ </para>
+ </question>
+ <answer id="a-license.what_restrictions">
+ <para>
+ None. We encourage such programs to be released as open source,
+ but we won't punish you or sue you if you choose otherwise.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+<!-- Installation -->
+<qandadiv id="faq.installation" xreflabel="Installation">
+<title>Installation</title>
+
+<qandaentry id="faq.how_to_install">
+ <question id="q-how_to_install">
+ <para>How do I install libstdc++?
+ </para>
+ </question>
+ <answer id="a-how_to_install">
+ <para>
+ Often libstdc++ comes pre-installed as an integral part of many
+ existing Linux and Unix systems, as well as many embedded
+ development tools. It may be necessary to install extra
+ development packages to get the headers, or the documentation, or
+ the source: please consult your vendor for details.
+ </para>
+ <para>
+ To build and install from the GNU GCC sources, please consult the
+ <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/install.html">install
+ documentation</ulink> for detailed
+ instructions. You may wish to browse those files ahead
+ of time to get a feel for what's required.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.how_to_get_sources">
+ <question id="q-how_to_get_sources">
+ <para>How does one get current libstdc++ sources?
+ </para>
+ </question>
+ <answer id="a-how_to_get_sources">
+ <para>
+ Libstdc++ sources for all official releases can be obtained as
+ part of the GCC sources, available from various sites and
+ mirrors. A full <ulink url="http://gcc.gnu.org/mirrors.html">list of
+ download sites</ulink> is provided on the main GCC site.
+ </para>
+ <para>
+ Current libstdc++ sources can always be checked out of the main
+ GCC source repository using the appropriate version control
+ tool. At this time, that tool
+ is <application>Subversion</application>.
+ </para>
+ <para>
+ <application>Subversion</application>, or <acronym>SVN</acronym>, is
+ one of several revision control packages. It was selected for GNU
+ projects because it's free (speech), free (beer), and very high
+ quality. The <ulink url="http://subversion.tigris.org"> Subversion
+ home page</ulink> has a better description.
+ </para>
+ <para>
+ The <quote>anonymous client checkout</quote> feature of SVN is
+ similar to anonymous FTP in that it allows anyone to retrieve
+ the latest libstdc++ sources.
+ </para>
+ <para>
+ For more information
+ see <ulink url="http://gcc.gnu.org/svn.html"><acronym>SVN</acronym>
+ details</ulink>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.how_to_test">
+ <question id="q-how_to_test">
+ <para>How do I know if it works?
+ </para>
+ </question>
+ <answer id="a-how_to_test">
+ <para>
+ Libstdc++ comes with its own validation testsuite, which includes
+ conformance testing, regression testing, ABI testing, and
+ performance testing. Please consult the
+ <ulink url="http://gcc.gnu.org/install/test.html">testing
+ documentation</ulink> for more details.
+ </para>
+ <para>
+ If you find bugs in the testsuite programs themselves, or if you
+ think of a new test program that should be added to the suite,
+ <emphasis>please</emphasis> write up your idea and send it to the list!
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.how_to_set_paths">
+ <question id="q-how_to_set_paths">
+ <para>How do I insure that the dynamically linked library will be found?
+ </para>
+ </question>
+ <answer id="a-how_to_set_paths">
+ <para>
+ Depending on your platform and library version, the error message might
+ be similar to one of the following:
+ </para>
+
+ <screen>
+ ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
+
+ /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found
+ </screen>
+
+ <para>
+ This doesn't mean that the shared library isn't installed, only
+ that the dynamic linker can't find it. When a dynamically-linked
+ executable is run the linker finds and loads the required shared
+ libraries by searching a pre-configured list of directories. If
+ the directory where you've installed libstdc++ is not in this list
+ then the libraries won't be found. The simplest way to fix this is
+ to use the <literal>LD_LIBRARY_PATH</literal> environment variable,
+ which is a colon-separated list of directories in which the linker
+ will search for shared libraries:
+ </para>
+
+ <screen>
+ LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
+ </screen>
+
+ <para>
+ The exact environment variable to use will depend on your
+ platform, e.g. DYLD_LIBRARY_PATH for Darwin,
+ LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit,
+ LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs and
+ SHLIB_PATH for HP-UX.
+ </para>
+ <para>
+ See the man pages for <command>ld</command>, <command>ldd</command>
+ and <command>ldconfig</command> for more information. The dynamic
+ linker has different names on different platforms but the man page
+ is usually called something such as <filename>ld.so/rtld/dld.so</filename>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.what_is_libsupcxx">
+ <question id="q-what_is_libsupcxx">
+ <para>
+ What's libsupc++?
+ </para>
+ </question>
+ <answer id="a-what_is_libsupcxx">
+ <para>
+ If the only functions from <filename>libstdc++.a</filename>
+ which you need are language support functions (those listed in
+ <ulink url="../18_support/howto.html">clause 18</ulink> of the
+ standard, e.g., <function>new</function> and
+ <function>delete</function>), then try linking against
+ <filename>libsupc++.a</filename>, which is a subset of
+ <filename>libstdc++.a</filename>. (Using <command>gcc</command>
+ instead of <command>g++</command> and explicitly linking in
+ <filename>libsupc++.a</filename> via <literal>-lsupc++</literal>
+ for the final link step will do it). This library contains only
+ those support routines, one per object file. But if you are
+ using anything from the rest of the library, such as IOStreams
+ or vectors, then you'll still need pieces from
+ <filename>libstdc++.a</filename>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.size">
+ <question id="q-size">
+ <para>
+ This library is HUGE!
+ </para>
+ </question>
+ <answer id="a-size">
+ <para>
+ Usually the size of libraries on disk isn't noticeable. When a
+ link editor (or simply <quote>linker</quote>) pulls things from a
+ static archive library, only the necessary object files are copied
+ into your executable, not the entire library. Unfortunately, even
+ if you only need a single function or variable from an object file,
+ the entire object file is extracted. (There's nothing unique to C++
+ or libstdc++ about this; it's just common behavior, given here
+ for background reasons.)
+ </para>
+ <para>
+ Some of the object files which make up libstdc++.a are rather large.
+ If you create a statically-linked executable with
+ <literal>-static</literal>, those large object files are suddenly part
+ of your executable. Historically the best way around this was to
+ only place a very few functions (often only a single one) in each
+ source/object file; then extracting a single function is the same
+ as extracting a single .o file. For libstdc++ this is only
+ possible to a certain extent; the object files in question contain
+ template classes and template functions, pre-instantiated, and
+ splitting those up causes severe maintenance headaches.
+ </para>
+ <para>
+ On supported platforms, libstdc++ takes advantage of garbage
+ collection in the GNU linker to get a result similar to separating
+ each symbol into a separate source and object files. On these platforms,
+ GNU ld can place each function and variable into its own
+ section in a .o file. The GNU linker can then perform garbage
+ collection on unused sections; this reduces the situation to only
+ copying needed functions into the executable, as before, but all
+ happens automatically.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+
+<!-- Platorm-Specific Issues -->
+<qandadiv id="faq.platform-specific" xreflabel="Platform-Specific Issues">
+<title>Platform-Specific Issues</title>
+
+<qandaentry id="faq.other_compilers">
+ <question id="q-other_compilers">
+ <para>
+ Can libstdc++ be used with non-GNU compilers?
+ </para>
+ </question>
+ <answer id="a-other_compilers">
+ <para>
+ Perhaps.
+ </para>
+ <para>
+ Since the goal of ISO Standardization is for all C++
+ implementations to be able to share code, libstdc++ should be
+ usable under any ISO-compliant compiler, at least in theory.
+ </para>
+ <para>
+ However, the reality is that libstdc++ is targeted and optimized
+ for GCC/g++. This means that often libstdc++ uses specific,
+ non-standard features of g++ that are not present in older
+ versions of proprietary compilers. It may take as much as a year or two
+ after an official release of GCC that contains these features for
+ proprietary tools support these constructs.
+ </para>
+ <para>
+ In the near past, specific released versions of libstdc++ have
+ been known to work with versions of the EDG C++ compiler, and
+ vendor-specific proprietary C++ compilers such as the Intel ICC
+ C++ compiler.
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.solaris_long_long">
+ <question id="q-solaris_long_long">
+ <para>
+ No 'long long' type on Solaris?
+ </para>
+ </question>
+ <answer id="a-solaris_long_long">
+ <para>
+ By default we try to support the C99 <type>long long</type> type.
+ This requires that certain functions from your C library be present.
+ </para>
+ <para>
+ Up through release 3.0.2 the platform-specific tests performed by
+ libstdc++ were too general, resulting in a conservative approach
+ to enabling the <type>long long</type> code paths. The most
+ commonly reported platform affected was Solaris.
+ </para>
+ <para>
+ This has been fixed for libstdc++ releases greater than 3.0.3.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.predefined">
+ <question id="q-predefined">
+ <para>
+ <constant>_XOPEN_SOURCE</constant> and <constant>_GNU_SOURCE</constant> are always defined?
+ </para>
+ </question>
+ <answer id="a-predefined">
+ <para>On Solaris, g++ (but not gcc) always defines the preprocessor
+ macro <constant>_XOPEN_SOURCE</constant>. On GNU/Linux, the same happens
+ with <constant>_GNU_SOURCE</constant>. (This is not an exhaustive list;
+ other macros and other platforms are also affected.)
+ </para>
+ <para>These macros are typically used in C library headers, guarding new
+ versions of functions from their older versions. The C++ standard
+ library includes the C standard library, but it requires the C90
+ version, which for backwards-compatibility reasons is often not the
+ default for many vendors.
+ </para>
+ <para>More to the point, the C++ standard requires behavior which is only
+ available on certain platforms after certain symbols are defined.
+ Usually the issue involves I/O-related typedefs. In order to
+ ensure correctness, the compiler simply predefines those symbols.
+ </para>
+ <para>Note that it's not enough to #define them only when the library is
+ being built (during installation). Since we don't have an 'export'
+ keyword, much of the library exists as headers, which means that
+ the symbols must also be defined as your programs are parsed and
+ compiled.
+ </para>
+ <para>To see which symbols are defined, look for CPLUSPLUS_CPP_SPEC in
+ the gcc config headers for your target (and try changing them to
+ see what happens when building complicated code). You can also run
+ <command>g++ -E -dM - &lt; /dev/null&quot;</command> to display
+ a list of predefined macros for any particular installation.
+ </para>
+ <para>This has been discussed on the mailing lists
+ <ulink url="http://gcc.gnu.org/cgi-bin/htsearch?method=and&amp;format=builtin-long&amp;sort=score&amp;words=_XOPEN_SOURCE+Solaris">quite a bit</ulink>.
+ </para>
+ <para>This method is something of a wart. We'd like to find a cleaner
+ solution, but nobody yet has contributed the time.
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.darwin_ctype">
+ <question id="q-darwin_ctype">
+ <para>
+ Mac OS X <filename class="headerfile">ctype.h</filename> is broken! How can I fix it?
+ </para>
+ </question>
+ <answer id="a-darwin_ctype">
+ <para>This is a long-standing bug in the OS X support. Fortunately,
+ the patch is quite simple, and well-known.
+ <ulink url="http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html"> Here's a
+ link to the solution</ulink>.
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.threads_i386">
+ <question id="q-threads_i386">
+ <para>
+ Threading is broken on i386?
+ </para>
+ </question>
+ <answer id="a-threads_i386">
+ <para>
+ </para>
+ <para>Support for atomic integer operations is/was broken on i386
+ platforms. The assembly code accidentally used opcodes that are
+ only available on the i486 and later. So if you configured GCC
+ to target, for example, i386-linux, but actually used the programs
+ on an i686, then you would encounter no problems. Only when
+ actually running the code on a i386 will the problem appear.
+ </para>
+ <para>This is fixed in 3.2.2.
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.atomic_mips">
+ <question id="q-atomic_mips">
+ <para>
+ MIPS atomic operations
+ </para>
+ </question>
+ <answer id="a-atomic_mips">
+ <para>
+ The atomic locking routines for MIPS targets requires MIPS II
+ and later. A patch went in just after the 3.3 release to
+ make mips* use the generic implementation instead. You can also
+ configure for mipsel-elf as a workaround.
+ </para>
+ <para>
+ The mips*-*-linux* port continues to use the MIPS II routines, and more
+ work in this area is expected.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.linux_glibc">
+ <question id="q-linux_glibc">
+ <para>
+ Recent GNU/Linux glibc required?
+ </para>
+ </question>
+ <answer id="a-linux_glibc">
+ <para>When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
+ 5.0.1) and later uses localization and formatting code from the system
+ C library (glibc) version 2.2.5. That version of glibc is over a
+ year old and contains necessary bugfixes. Many GNU/Linux distros make
+ glibc version 2.3.x available now.
+ </para>
+ <para>The guideline is simple: the more recent the C++ library, the
+ more recent the C library. (This is also documented in the main
+ GCC installation instructions.)
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.freebsd_wchar">
+ <question id="q-freebsd_wchar">
+ <para>
+ Can't use wchar_t/wstring on FreeBSD
+ </para>
+ </question>
+ <answer id="a-freebsd_wchar">
+ <para>
+ Older versions of FreeBSD's C library do not have sufficient
+ support for wide character functions, and as a result the
+ libstdc++ configury decides that wchar_t support should be
+ disabled. In addition, the libstdc++ platform checks that
+ enabled <type>wchar_t</type> were quite strict, and not granular
+ enough to detect when the minimal support to
+ enable <type>wchar_t</type> and C++ library structures
+ like <classname>wstring</classname> were present. This impacted Solaris,
+ Darwin, and BSD varients, and is fixed in libstdc++ versions post 4.1.0.
+ </para>
+ <para>
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+
+<!-- Known Bugs -->
+<qandadiv id="faq.known_bugs" xreflabel="Known Bugs">
+<title>Known Bugs</title>
+
+<qandaentry id="faq.what_works">
+ <question id="q-what_works">
+ <para>
+ What works already?
+ </para>
+ </question>
+ <answer id="a-what_works">
+ <para>
+ Short answer: Pretty much everything <emphasis>works</emphasis>
+ except for some corner cases. Support for localization
+ in <classname>locale</classname> may be incomplete on non-GNU
+ platforms. Also dependant on the underlying platform is support
+ for <type>wchar_t</type> and <type>long
+ long</type> specializations, and details of thread support.
+ </para>
+ <para>
+ Long answer: See the implementation status pages for
+ <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++1998_status.html">C++98</ulink>,
+ <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/tr1_status.html">TR1</ulink>, and <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++0x_status.html">C++0x</ulink>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.standard_bugs">
+ <question id="q-standard_bugs">
+ <para>
+ Bugs in the ISO C++ language or library specification
+ </para>
+ </question>
+ <answer id="a-standard_bugs">
+ <para>
+ Unfortunately, there are some.
+ </para>
+ <para>
+ For those people who are not part of the ISO Library Group
+ (i.e., nearly all of us needing to read this page in the first
+ place), a public list of the library defects is occasionally
+ published <ulink url="http://anubis.dkuug.dk/jtc1/sc22/wg21/">here</ulink>.
+ Some of these issues have resulted in code changes in libstdc++.
+ </para>
+ <para>
+ If you think you've discovered a new bug that is not listed,
+ please post a message describing your problem
+ to <email>libstdc++@gcc.gnu.org</email> or the Usenet group
+ comp.lang.c++.moderated.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.compiler_bugs">
+ <question id="q-compiler_bugs">
+ <para>
+ Bugs in the compiler (gcc/g++) and not libstdc++
+ </para>
+ </question>
+ <answer id="a-compiler_bugs">
+ <para>
+ On occasion, the compiler is wrong. Please be advised that this
+ happens much less often than one would think, and avoid jumping to
+ conclusions.
+ </para>
+ <para>
+ First, examine the ISO C++ standard. Second, try another compiler
+ or an older version of the GNU compilers. Third, you can find more
+ information on the libstdc++ and the GCC mailing lists: search
+ these lists with terms describing your issue.
+ </para>
+ <para>
+ Before reporting a bug, please examine the
+ <ulink url="http://gcc.gnu.org/bugs.html">bugs database</ulink> with the
+ category set to <quote>g++</quote>.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+<!-- Known Non-Bugs -->
+<qandadiv id="faq.known_non-bugs" xreflabel="Known Non-Bugs">
+<title>Known Non-Bugs</title>
+
+<qandaentry id="faq.stream_reopening_fails">
+ <question id="q-stream_reopening_fails">
+ <para>
+ Reopening a stream fails
+ </para>
+ </question>
+ <answer id="a-stream_reopening_fails">
+ <para>
+ One of the most-reported non-bug reports. Executing a sequence like:
+ </para>
+
+ <literallayout>
+ #include &lt;fstream&gt;
+ ...
+ std::fstream fs(<quote>a_file</quote>);
+ // .
+ // . do things with fs...
+ // .
+ fs.close();
+ fs.open(<quote>a_new_file</quote>);
+ </literallayout>
+
+ <para>
+ All operations on the re-opened <varname>fs</varname> will fail, or at
+ least act very strangely. Yes, they often will, especially if
+ <varname>fs</varname> reached the EOF state on the previous file. The
+ reason is that the state flags are <emphasis>not</emphasis> cleared
+ on a successful call to open(). The standard unfortunately did
+ not specify behavior in this case, and to everybody's great sorrow,
+ the <ulink url="../ext/howto.html#5">proposed LWG resolution in
+ DR #22</ulink> is to leave the flags unchanged. You must insert a call
+ to <function>fs.clear()</function> between the calls to close() and open(),
+ and then everything will work like we all expect it to work.
+ <emphasis>Update:</emphasis> for GCC 4.0 we implemented the resolution
+ of <ulink url="../ext/howto.html#5">DR #409</ulink> and open() now calls
+ <function>clear()</function> on success!
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.wefcxx_verbose">
+ <question id="q-wefcxx_verbose">
+ <para>
+ -Weffc++ complains too much
+ </para>
+ </question>
+ <answer id="a-wefcxx_verbose">
+ <para>
+ Many warnings are emitted when <literal>-Weffc++</literal> is used. Making
+ libstdc++ <literal>-Weffc++</literal>-clean is not a goal of the project,
+ for a few reasons. Mainly, that option tries to enforce
+ object-oriented programming, while the Standard Library isn't
+ necessarily trying to be OO.
+ </para>
+ <para>
+ We do, however, try to have libstdc++ sources as clean as possible. If
+ you see some simple changes that pacify <literal>-Weffc++</literal>
+ without other drawbacks, send us a patch.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.ambiguous_overloads">
+ <question id="q-ambiguous_overloads">
+ <para>
+ Ambiguous overloads after including an old-style header
+ </para>
+ </question>
+ <answer id="a-ambiguous_overloads">
+ <para>
+ Another problem is the <literal>rel_ops</literal> namespace and the template
+ comparison operator functions contained therein. If they become
+ visible in the same namespace as other comparison functions
+ (e.g., <quote>using</quote> them and the &lt;iterator&gt; header),
+ then you will suddenly be faced with huge numbers of ambiguity
+ errors. This was discussed on the -v3 list; Nathan Myers
+ <ulink url="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html">sums
+ things up here</ulink>. The collisions with vector/string iterator
+ types have been fixed for 3.1.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.v2_headers">
+ <question id="q-v2_headers">
+ <para>
+ The g++-3 headers are <emphasis>not ours</emphasis>
+ </para>
+ </question>
+ <answer id="a-v2_headers">
+ <para>
+ If you have found an extremely broken header file which is
+ causing problems for you, look carefully before submitting a
+ &quot;high&quot; priority bug report (which you probably
+ shouldn't do anyhow; see the last paragraph of the page
+ describing <ulink url="http://gcc.gnu.org/bugs.html">the GCC
+ bug database</ulink>).
+ </para>
+ <para>
+ If the headers are in <filename>${prefix}/include/g++-3</filename>, or
+ if the installed library's name looks like
+ <filename>libstdc++-2.10.a</filename> or
+ <filename>libstdc++-libc6-2.10.so</filename>, then you are using the
+ old libstdc++-v2 library, which is nonstandard and
+ unmaintained. Do not report problems with -v2 to the -v3
+ mailing list.
+ </para>
+ <para>
+ For GCC versions 3.0 and 3.1 the libstdc++ header files are
+ installed in <filename>${prefix}/include/g++-v3</filename> (see the
+ 'v'?). Starting with version 3.2 the headers are installed in
+ <filename>${prefix}/include/c++/${version}</filename> as this prevents
+ headers from previous versions being found by mistake.
+ </para>
+
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.boost_concept_checks">
+ <question id="q-boost_concept_checks">
+ <para>
+ Errors about <emphasis>*Concept</emphasis> and
+ <emphasis>constraints</emphasis> in the STL
+ </para>
+ </question>
+ <answer id="a-boost_concept_checks">
+ <para>
+ If you see compilation errors containing messages about
+ <errortext>foo Concept </errortext>and something to do with a
+ <errortext>constraints</errortext> member function, then most
+ likely you have violated one of the requirements for types used
+ during instantiation of template containers and functions. For
+ example, EqualityComparableConcept appears if your types must be
+ comparable with == and you have not provided this capability (a
+ typo, or wrong visibility, or you just plain forgot, etc).
+ </para>
+ <para>
+ More information, including how to optionally enable/disable the
+ checks, is available
+ <ulink url="../19_diagnostics/howto.html#3">here</ulink>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.dlopen_crash">
+ <question id="q-dlopen_crash">
+ <para>
+ Program crashes when using library code in a
+ dynamically-loaded library
+ </para>
+ </question>
+ <answer id="a-dlopen_crash">
+ <para>
+ If you are using the C++ library across dynamically-loaded
+ objects, make certain that you are passing the correct options
+ when compiling and linking:
+ </para>
+
+ <literallayout>
+ // compile your library components
+ g++ -fPIC -c a.cc
+ g++ -fPIC -c b.cc
+ ...
+ g++ -fPIC -c z.cc
+
+ // create your library
+ g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
+
+ // link the executable
+ g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl
+ </literallayout>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.memory_leaks">
+ <question id="q-memory_leaks">
+ <para>
+ <quote>Memory leaks</quote> in containers
+ </para>
+ </question>
+ <answer id="a-memory_leaks">
+ <para>
+ A few people have reported that the standard containers appear
+ to leak memory when tested with memory checkers such as
+ <ulink url="http://developer.kde.org/~sewardj/">valgrind</ulink>.
+ The library's default allocators keep free memory in a pool
+ for later reuse, rather than returning it to the OS. Although
+ this memory is always reachable by the library and is never
+ lost, memory debugging tools can report it as a leak. If you
+ want to test the library for memory leaks please read
+ <ulink url="../debug.html#mem">Tips for memory leak hunting</ulink>
+ first.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.list_size_on">
+ <question id="q-list_size_on">
+ <para>
+ list::size() is O(n)!
+ </para>
+ </question>
+ <answer id="a-list_size_on">
+ <para>
+ See
+ the <ulink url="../23_containers/howto.html#6">Containers</ulink>
+ chapter.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.easy_to_fix">
+ <question id="q-easy_to_fix">
+ <para>
+ Aw, that's easy to fix!
+ </para>
+ </question>
+ <answer id="a-easy_to_fix">
+ <para>
+ If you have found a bug in the library and you think you have
+ a working fix, then send it in! The main GCC site has a page
+ on <ulink url="http://gcc.gnu.org/contribute.html">submitting
+ patches</ulink> that covers the procedure, but for libstdc++ you
+ should also send the patch to our mailing list in addition to
+ the GCC patches mailing list. The libstdc++
+ <ulink url="../17_intro/contribute.html">contributors' page</ulink>
+ also talks about how to submit patches.
+ </para>
+ <para>
+ In addition to the description, the patch, and the ChangeLog
+ entry, it is a Good Thing if you can additionally create a small
+ test program to test for the presence of the bug that your
+ patch fixes. Bugs have a way of being reintroduced; if an old
+ bug creeps back in, it will be caught immediately by the
+ <ulink url="#2_4">testsuite</ulink> -- but only if such a test exists.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+
+<!-- Miscellaneous -->
+<qandadiv id="faq.misc" xreflabel="Miscellaneous">
+<title>Miscellaneous</title>
+
+<qandaentry id="faq.iterator_as_pod">
+ <question id="faq.iterator_as_pod_q">
+ <para>
+ string::iterator is not char*; vector&lt;T&gt;::iterator is not T*
+ </para>
+ </question>
+ <answer id="faq.iterator_as_pod_a">
+ <para>
+ If you have code that depends on container&lt;T&gt; iterators
+ being implemented as pointer-to-T, your code is broken. It's
+ considered a feature, not a bug, that libstdc++ points this out.
+ </para>
+ <para>
+ While there are arguments for iterators to be implemented in
+ that manner, A) they aren't very good ones in the long term,
+ and B) they were never guaranteed by the Standard anyway. The
+ type-safety achieved by making iterators a real class rather
+ than a typedef for <type>T*</type> outweighs nearly all opposing
+ arguments.
+ </para>
+ <para>
+ Code which does assume that a vector iterator <varname>i</varname>
+ is a pointer can often be fixed by changing <varname>i</varname> in
+ certain expressions to <varname>&amp;*i</varname>. Future revisions
+ of the Standard are expected to bless this usage for
+ vector&lt;&gt; (but not for basic_string&lt;&gt;).
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.what_is_next">
+ <question id="q-what_is_next">
+ <para>
+ What's next after libstdc++?
+ </para>
+ </question>
+ <answer id="a-what_is_next">
+ <para>
+ Hopefully, not much. The goal of libstdc++ is to produce a
+ fully-compliant, fully-portable Standard Library. After that,
+ we're mostly done: there won't <emphasis>be</emphasis> any
+ more compliance work to do.
+ </para>
+ <para>
+ There is an effort underway to add significant extensions to
+ the standard library specification. The latest version of
+ this effort is described in
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
+ The C++ Library Technical Report 1</ulink>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.sgi_stl">
+ <question id="q-sgi_stl">
+ <para>
+ What about the STL from SGI?
+ </para>
+ </question>
+ <answer id="a-sgi_stl">
+ <para>
+ The <ulink url="http://www.sgi.com/tech/stl/">STL from SGI</ulink>,
+ version 3.3, was the final merge of the STL codebase. The
+ code in libstdc++ contains many fixes and changes, and
+ the SGI code is no longer under active
+ development. We expect that no future merges will take place.
+ </para>
+ <para>
+ In particular, <classname>string</classname> is not from SGI and makes no
+ use of their &quot;rope&quot; class (which is included as an
+ optional extension), nor is <classname>valarray</classname> and some others.
+ Classes like <classname>vector&lt;&gt;</classname> are, but have been
+ extensively modified.
+ </para>
+ <para>
+ More information on the evolution of libstdc++ can be found at the
+ <link linkend="appendix.porting.api">API
+ evolution</link>
+ and <link linkend="manual.appendix.porting.backwards">backwards
+ compatibility</link> documentation.
+ </para>
+ <para>
+ The FAQ for SGI's STL (one jump off of their main page) is
+ still recommended reading.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.extensions_and_backwards_compat">
+ <question id="q-extensions_and_backwards_compat">
+ <para>
+ Extensions and Backward Compatibility
+ </para>
+ </question>
+ <answer id="a-extensions_and_backwards_compat">
+ <para>
+ See the <link linkend="manual.appendix.porting.backwards">link</link> on backwards compatiblity and <link linkend="appendix.porting.api">link</link> on evolution.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.tr1_support">
+ <question id="q-tr1_support">
+ <para>
+ Does libstdc++ support TR1?
+ </para>
+ </question>
+ <answer id="a-tr1_support">
+ <para>
+ Yes.
+ </para>
+ <para>
+ The C++ Standard Library Technical Report adds many new features to
+ the library. The latest version of this effort is described in
+ <ulink url=
+ "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
+ Technical Report 1</ulink>.
+ </para>
+ <para>
+ The implementation status of TR1 in libstdc++ can be tracked <link
+ linkend="manual.intro.status.standard.tr1">on the TR1 status
+ page</link>.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.get_iso_cxx">
+ <question id="q-get_iso_cxx">
+ <para>How do I get a copy of the ISO C++ Standard?
+ </para>
+ </question>
+ <answer id="a-get_iso_cxx">
+ <para>
+ Copies of the full ISO 14882 standard are available on line via
+ the ISO mirror site for committee members. Non-members, or those
+ who have not paid for the privilege of sitting on the committee
+ and sustained their two-meeting commitment for voting rights, may
+ get a copy of the standard from their respective national
+ standards organization. In the USA, this national standards
+ organization is ANSI and their website is
+ right <ulink url="http://www.ansi.org">here</ulink>. (And if
+ you've already registered with them, clicking this link will take
+ you to directly to the place where you can
+ <ulink url="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003">buy the standard on-line</ulink>.
+ </para>
+ <para>
+ Who is your country's member body? Visit the
+ <ulink url="http://www.iso.ch/">ISO homepage</ulink> and find out!
+ </para>
+ <para>
+ The 2003 version of the standard (the 1998 version plus TC1) is
+ available in print, ISBN 0-470-84674-7.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.what_is_abi">
+ <question id="q-what_is_abi">
+ <para>
+ What's an ABI and why is it so messy?
+ </para>
+ </question>
+ <answer id="a-what_is_abi">
+ <para>
+ <acronym>ABI</acronym> stands for <quote>Application Binary
+ Interface</quote>. Conventionally, it refers to a great
+ mass of details about how arguments are arranged on the call
+ stack and/or in registers, and how various types are arranged
+ and padded in structs. A single CPU design may suffer
+ multiple ABIs designed by different development tool vendors
+ who made different choices, or even by the same vendor for
+ different target applications or compiler versions. In ideal
+ circumstances the CPU designer presents one ABI and all the
+ OSes and compilers use it. In practice every ABI omits
+ details that compiler implementers (consciously or
+ accidentally) must choose for themselves.
+ </para>
+ <para>
+ That ABI definition suffices for compilers to generate code so a
+ program can interact safely with an OS and its lowest-level libraries.
+ Users usually want an ABI to encompass more detail, allowing libraries
+ built with different compilers (or different releases of the same
+ compiler!) to be linked together. For C++, this includes many more
+ details than for C, and CPU designers (for good reasons elaborated
+ below) have not stepped up to publish C++ ABIs. The details include
+ virtual function implementation, struct inheritance layout, name
+ mangling, and exception handling. Such an ABI has been defined for
+ GNU C++, and is immediately useful for embedded work relying only on
+ a <quote>free-standing implementation</quote> that doesn't include (much
+ of) the standard library. It is a good basis for the work to come.
+ </para>
+ <para>
+ A useful C++ ABI must also incorporate many details of the standard
+ library implementation. For a C ABI, the layouts of a few structs
+ (such as FILE, stat, jmpbuf, and the like) and a few macros suffice.
+ For C++, the details include the complete set of names of functions
+ and types used, the offsets of class members and virtual functions,
+ and the actual definitions of all inlines. C++ exposes many more
+ library details to the caller than C does. It makes defining
+ a complete ABI a much bigger undertaking, and requires not just
+ documenting library implementation details, but carefully designing
+ those details so that future bug fixes and optimizations don't
+ force breaking the ABI.
+ </para>
+ <para>
+ There are ways to help isolate library implementation details from the
+ ABI, but they trade off against speed. Library details used in
+ inner loops (e.g., getchar) must be exposed and frozen for all
+ time, but many others may reasonably be kept hidden from user code,
+ so they may later be changed. Deciding which, and implementing
+ the decisions, must happen before you can reasonably document a
+ candidate C++ ABI that encompasses the standard library.
+ </para>
+ </answer>
+</qandaentry>
+
+<qandaentry id="faq.size_equals_capacity">
+ <question id="q-size_equals_capacity">
+ <para>
+ How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
+ </para>
+ </question>
+ <answer id="a-size_equals_capacity">
+ <para>
+ The standard idiom for deallocating a <classname>vector&lt;T&gt;</classname>'s
+ unused memory is to create a temporary copy of the vector and swap their
+ contents, e.g. for <classname>vector&lt;T&gt; v</classname>
+ </para>
+ <literallayout>
+ std::vector&lt;T&gt;(v).swap(v);
+ </literallayout>
+ <para>
+ The copy will take O(n) time and the swap is constant time.
+ </para>
+ <para>
+ See <ulink url="../21_strings/howto.html#6">Shrink-to-fit
+ strings</ulink> for a similar solution for strings.
+ </para>
+ </answer>
+</qandaentry>
+
+</qandadiv>
+
+
+<!-- FAQ ends here -->
+</qandaset>
+
+</article>
+
+</book> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/gnu/fdl-1.2.xml b/libstdc++-v3/doc/xml/gnu/fdl-1.2.xml
new file mode 100644
index 00000000000..2eecfbb948a
--- /dev/null
+++ b/libstdc++-v3/doc/xml/gnu/fdl-1.2.xml
@@ -0,0 +1,502 @@
+<appendix id="appendix.gfdl-1.2">
+ <title>GNU Free Documentation License</title>
+ <para>
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation,
+ <abbrev>Inc.</abbrev> 51 Franklin <abbrev>St</abbrev>, Fifth Floor,
+ Boston, <abbrev>MA</abbrev> 02110-1301 <abbrev
+ role="initialism">USA</abbrev>. Everyone is permitted to copy and
+ distribute verbatim copies of this license document, but changing it is
+ not allowed.
+ </para>
+ <bridgehead id="Preamble" renderas="sect1">
+ 0. PREAMBLE
+ </bridgehead>
+ <para>
+ The purpose of this License is to make a manual, textbook, or other
+ functional and useful document "free" in the sense of freedom: to assure
+ everyone the effective freedom to copy and redistribute it, with or
+ without modifying it, either commercially or noncommercially.
+ Secondarily, this License preserves for the author and publisher a way to
+ get credit for their work, while not being considered responsible for
+ modifications made by others.
+ </para>
+ <para>
+ This License is a kind of "copyleft", which means that derivative works of
+ the document must themselves be free in the same sense. It complements
+ the GNU General Public License, which is a copyleft license designed for
+ free software.
+ </para>
+ <para>
+ We have designed this License in order to use it for manuals for free
+ software, because free software needs free documentation: a free program
+ should come with manuals providing the same freedoms that the software
+ does. But this License is not limited to software manuals; it can be used
+ for any textual work, regardless of subject matter or whether it is
+ published as a printed book. We recommend this License principally for
+ works whose purpose is instruction or reference.</para>
+ <bridgehead id="Definitions" renderas="sect1">
+ 1. APPLICABILITY AND DEFINITIONS
+ </bridgehead>
+ <para>
+ This License applies to any manual or other work, in any medium, that
+ contains a notice placed by the copyright holder saying it can be
+ distributed under the terms of this License. Such a notice grants a
+ world-wide, royalty-free license, unlimited in duration, to use that work
+ under the conditions stated herein. The "Document", below, refers to any
+ such manual or work. Any member of the public is a licensee, and is
+ addressed as "you". You accept the license if you copy, modify or
+ distribute the work in a way requiring permission under copyright
+ law.
+ </para>
+ <para>
+ A "Modified Version" of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with modifications
+ and/or translated into another language.
+ </para>
+ <para>
+ A "Secondary Section" is a named appendix or a front-matter section of the
+ Document that deals exclusively with the relationship of the publishers or
+ authors of the Document to the Document's overall subject (or to related
+ matters) and contains nothing that could fall directly within that overall
+ subject. (Thus, if the Document is in part a textbook of mathematics, a
+ Secondary Section may not explain any mathematics.) The relationship
+ could be a matter of historical connection with the subject or with
+ related matters, or of legal, commercial, philosophical, ethical or
+ political position regarding them.
+ </para>
+ <para>
+ The "Invariant Sections" are certain Secondary Sections whose titles are
+ designated, as being those of Invariant Sections, in the notice that says
+ that the Document is released under this License. If a section does not
+ fit the above definition of Secondary then it is not allowed to be
+ designated as Invariant. The Document may contain zero Invariant
+ Sections. If the Document does not identify any Invariant Sections then
+ there are none.
+ </para>
+ <para>
+ The "Cover Texts" are certain short passages of text that are listed, as
+ Front-Cover Texts or Back-Cover Texts, in the notice that says that the
+ Document is released under this License. A Front-Cover Text may be at
+ most 5 words, and a Back-Cover Text may be at most 25 words.
+ </para>
+ <para>
+ A "Transparent" copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the general
+ public, that is suitable for revising the document straightforwardly with
+ generic text editors or (for images composed of pixels) generic paint
+ programs or (for drawings) some widely available drawing editor, and that
+ is suitable for input to text formatters or for automatic translation to a
+ variety of formats suitable for input to text formatters. A copy made in
+ an otherwise Transparent file format whose markup, or absence of markup,
+ has been arranged to thwart or discourage subsequent modification by
+ readers is not Transparent. An image format is not Transparent if used
+ for any substantial amount of text. A copy that is not "Transparent" is
+ called "Opaque".
+ </para>
+ <para>
+ Examples of suitable formats for Transparent copies include plain ASCII
+ without markup, Texinfo input format, LaTeX input format, SGML or XML
+ using a publicly available DTD, and standard-conforming simple HTML,
+ PostScript or PDF designed for human modification. Examples of
+ transparent image formats include PNG, XCF and JPG. Opaque formats
+ include proprietary formats that can be read and edited only by
+ proprietary word processors, SGML or XML for which the DTD and/or
+ processing tools are not generally available, and the machine-generated
+ HTML, PostScript or PDF produced by some word processors for output
+ purposes only.
+ </para>
+ <para>
+ The "Title Page" means, for a printed book, the title page itself, plus
+ such following pages as are needed to hold, legibly, the material this
+ License requires to appear in the title page. For works in formats which
+ do not have any title page as such, "Title Page" means the text near the
+ most prominent appearance of the work's title, preceding the beginning of
+ the body of the text.
+ </para>
+ <para>
+ A section "Entitled XYZ" means a named subunit of the Document whose title
+ either is precisely XYZ or contains XYZ in parentheses following text that
+ translates XYZ in another language. (Here XYZ stands for a specific
+ section name mentioned below, such as "Acknowledgements", "Dedications",
+ "Endorsements", or "History".) To "Preserve the Title" of such a section
+ when you modify the Document means that it remains a section "Entitled
+ XYZ" according to this definition.
+ </para>
+ <para>
+ The Document may include Warranty Disclaimers next to the notice which
+ states that this License applies to the Document. These Warranty
+ Disclaimers are considered to be included by reference in this License,
+ but only as regards disclaiming warranties: any other implication that
+ these Warranty Disclaimers may have is void and has no effect on the
+ meaning of this License.
+ </para>
+ <bridgehead id="VerbatimCopying" renderas="sect1">
+ 2. VERBATIM COPYING
+ </bridgehead>
+ <para>
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the copyright
+ notices, and the license notice saying this License applies to the
+ Document are reproduced in all copies, and that you add no other
+ conditions whatsoever to those of this License. You may not use technical
+ measures to obstruct or control the reading or further copying of the
+ copies you make or distribute. However, you may accept compensation in
+ exchange for copies. If you distribute a large enough number of copies
+ you must also follow the conditions in section 3.
+ </para>
+ <para>
+ You may also lend copies, under the same conditions stated above, and you
+ may publicly display copies.
+ </para>
+ <bridgehead id="QuantityCopying" renderas="sect1">
+ 3. COPYING IN QUANTITY
+ </bridgehead>
+ <para>
+ If you publish printed copies (or copies in media that commonly have
+ printed covers) of the Document, numbering more than 100, and the
+ Document's license notice requires Cover Texts, you must enclose the
+ copies in covers that carry, clearly and legibly, all these Cover Texts:
+ Front-Cover Texts on the front cover, and Back-Cover Texts on the back
+ cover. Both covers must also clearly and legibly identify you as the
+ publisher of these copies. The front cover must present the full title
+ with all words of the title equally prominent and visible. You may add
+ other material on the covers in addition. Copying with changes limited to
+ the covers, as long as they preserve the title of the Document and satisfy
+ these conditions, can be treated as verbatim copying in other
+ respects.
+ </para>
+ <para>
+ If the required texts for either cover are too voluminous to fit legibly,
+ you should put the first ones listed (as many as fit reasonably) on the
+ actual cover, and continue the rest onto adjacent pages.
+ </para>
+ <para>
+ If you publish or distribute Opaque copies of the Document numbering more
+ than 100, you must either include a machine-readable Transparent copy
+ along with each Opaque copy, or state in or with each Opaque copy a
+ computer-network location from which the general network-using public has
+ access to download using public-standard network protocols a complete
+ Transparent copy of the Document, free of added material. If you use the
+ latter option, you must take reasonably prudent steps, when you begin
+ distribution of Opaque copies in quantity, to ensure that this Transparent
+ copy will remain thus accessible at the stated location until at least one
+ year after the last time you distribute an Opaque copy (directly or
+ through your agents or retailers) of that edition to the public.
+ </para>
+ <para>
+ It is requested, but not required, that you contact the authors of the
+ Document well before redistributing any large number of copies, to give
+ them a chance to provide you with an updated version of the
+ Document.
+ </para>
+ <bridgehead id="Modifications" renderas="sect1">
+ 4. MODIFICATIONS
+ </bridgehead>
+ <para>
+ You may copy and distribute a Modified Version of the Document under the
+ conditions of sections 2 and 3 above, provided that you release the
+ Modified Version under precisely this License, with the Modified Version
+ filling the role of the Document, thus licensing distribution and
+ modification of the Modified Version to whoever possesses a copy of it.
+ In addition, you must do these things in the Modified Version:
+ </para>
+ <orderedlist numeration="upperalpha">
+ <listitem>
+ <simpara>
+ Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions (which
+ should, if there were any, be listed in the History section of the
+ Document). You may use the same title as a previous version if the
+ original publisher of that version gives permission.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ State on the Title page the name of the publisher of the Modified
+ Version, as the publisher.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve all the copyright notices of the Document.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add an appropriate copyright notice for your modifications adjacent to
+ the other copyright notices.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Include an unaltered copy of this License.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise the
+ network locations given in the Document for previous versions it was
+ based on. These may be placed in the "History" section. You may omit
+ a network location for a work that was published at least four years
+ before the Document itself, or if the original publisher of the
+ version it refers to gives permission.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ For any section Entitled "Acknowledgements" or "Dedications", Preserve
+ the Title of the section, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements and/or
+ dedications given therein.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve all the Invariant Sections of the Document, unaltered in
+ their text and in their titles. Section numbers or the equivalent are
+ not considered part of the section titles.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Delete any section Entitled "Endorsements". Such a section may not be
+ included in the Modified Version.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Do not retitle any existing section to be Entitled "Endorsements" or
+ to conflict in title with any Invariant Section.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preserve any Warranty Disclaimers.
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ If the Modified Version includes new front-matter sections or appendices
+ that qualify as Secondary Sections and contain no material copied from the
+ Document, you may at your option designate some or all of these sections
+ as invariant. To do this, add their titles to the list of Invariant
+ Sections in the Modified Version's license notice. These titles must be
+ distinct from any other section titles.
+ </para>
+ <para>
+ You may add a section Entitled "Endorsements", provided it contains
+ nothing but endorsements of your Modified Version by various parties--for
+ example, statements of peer review or that the text has been approved by
+ an organization as the authoritative definition of a standard.
+ </para>
+ <para>
+ You may add a passage of up to five words as a Front-Cover Text, and a
+ passage of up to 25 words as a Back-Cover Text, to the end of the list of
+ Cover Texts in the Modified Version. Only one passage of Front-Cover Text
+ and one of Back-Cover Text may be added by (or through arrangements made
+ by) any one entity. If the Document already includes a cover text for the
+ same cover, previously added by you or by arrangement made by the same
+ entity you are acting on behalf of, you may not add another; but you may
+ replace the old one, on explicit permission from the previous publisher
+ that added the old one.
+ </para>
+ <para>
+ The author(s) and publisher(s) of the Document do not by this License give
+ permission to use their names for publicity for or to assert or imply
+ endorsement of any Modified Version.
+ </para>
+ <bridgehead id="Combining" renderas="sect1">
+ 5. COMBINING DOCUMENTS
+ </bridgehead>
+ <para>
+ You may combine the Document with other documents released under this
+ License, under the terms defined in section 4 above for modified versions,
+ provided that you include in the combination all of the Invariant Sections
+ of all of the original documents, unmodified, and list them all as
+ Invariant Sections of your combined work in its license notice, and that
+ you preserve all their Warranty Disclaimers.
+ </para>
+ <para>
+ The combined work need only contain one copy of this License, and multiple
+ identical Invariant Sections may be replaced with a single copy. If there
+ are multiple Invariant Sections with the same name but different contents,
+ make the title of each such section unique by adding at the end of it, in
+ parentheses, the name of the original author or publisher of that section
+ if known, or else a unique number. Make the same adjustment to the
+ section titles in the list of Invariant Sections in the license notice of
+ the combined work.
+ </para>
+ <para>
+ In the combination, you must combine any sections Entitled "History" in
+ the various original documents, forming one section Entitled "History";
+ likewise combine any sections Entitled "Acknowledgements", and any
+ sections Entitled "Dedications". You must delete all sections Entitled
+ "Endorsements".
+ </para>
+ <bridgehead id="Collections" renderas="sect1">
+ 6. COLLECTIONS OF DOCUMENTS
+ </bridgehead>
+ <para>
+ You may make a collection consisting of the Document and other documents
+ released under this License, and replace the individual copies of this
+ License in the various documents with a single copy that is included in
+ the collection, provided that you follow the rules of this License for
+ verbatim copying of each of the documents in all other respects.
+ </para>
+ <para>
+ You may extract a single document from such a collection, and distribute
+ it individually under this License, provided you insert a copy of this
+ License into the extracted document, and follow this License in all other
+ respects regarding verbatim copying of that document.
+ </para>
+ <bridgehead id="Aggregation" renderas="sect1">
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+ </bridgehead>
+ <para>
+ A compilation of the Document or its derivatives with other separate and
+ independent documents or works, in or on a volume of a storage or
+ distribution medium, is called an "aggregate" if the copyright resulting
+ from the compilation is not used to limit the legal rights of the
+ compilation's users beyond what the individual works permit. When the
+ Document is included in an aggregate, this License does not apply to the
+ other works in the aggregate which are not themselves derivative works of
+ the Document.
+ </para>
+ <para>
+ If the Cover Text requirement of section 3 is applicable to these copies
+ of the Document, then if the Document is less than one half of the entire
+ aggregate, the Document's Cover Texts may be placed on covers that bracket
+ the Document within the aggregate, or the electronic equivalent of covers
+ if the Document is in electronic form. Otherwise they must appear on
+ printed covers that bracket the whole aggregate.
+ </para>
+ <bridgehead id="Translation" renderas="sect1">
+ 8. TRANSLATION
+ </bridgehead>
+ <para>
+ Translation is considered a kind of modification, so you may distribute
+ translations of the Document under the terms of section 4. Replacing
+ Invariant Sections with translations requires special permission from
+ their copyright holders, but you may include translations of some or all
+ Invariant Sections in addition to the original versions of these Invariant
+ Sections. You may include a translation of this License, and all the
+ license notices in the Document, and any Warranty Disclaimers, provided
+ that you also include the original English version of this License and the
+ original versions of those notices and disclaimers. In case of a
+ disagreement between the translation and the original version of this
+ License or a notice or disclaimer, the original version will prevail.
+ </para>
+ <para>
+ If a section in the Document is Entitled "Acknowledgements",
+ "Dedications", or "History", the requirement (section 4) to Preserve its
+ Title (section 1) will typically require changing the actual title.
+ </para>
+ <bridgehead id="Termination" renderas="sect1">
+ 9. TERMINATION
+ </bridgehead>
+ <para>
+ You may not copy, modify, sublicense, or distribute the Document except as
+ expressly provided for under this License. Any other attempt to copy,
+ modify, sublicense or distribute the Document is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will not
+ have their licenses terminated so long as such parties remain in full
+ compliance.
+ </para>
+ <bridgehead id="FutureRevisions" renderas="sect1">
+ 10. FUTURE REVISIONS OF THIS LICENSE
+ </bridgehead>
+ <para>
+ The Free Software Foundation may publish new, revised versions of the GNU
+ Free Documentation License from time to time. Such new versions will be
+ similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns. See <ulink
+ url="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</ulink>.
+ </para>
+ <para>
+ Each version of the License is given a distinguishing version number. If
+ the Document specifies that a particular numbered version of this License
+ "or any later version" applies to it, you have the option of following the
+ terms and conditions either of that specified version or of any later
+ version that has been published (not as a draft) by the Free Software
+ Foundation. If the Document does not specify a version number of this
+ License, you may choose any version ever published (not as a draft) by the
+ Free Software Foundation.
+ </para>
+ <bridgehead id="HowToUse" renderas="sect1">
+ ADDENDUM: How to use this License for your documents
+ </bridgehead>
+ <para>
+ To use this License in a document you have written, include a copy of the
+ License in the document and put the following copyright and license
+ notices just after the title page:
+ </para>
+ <blockquote>
+ <para>
+ Copyright (C) YEAR YOUR NAME.
+ </para>
+ <para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2 or
+ any later version published by the Free Software Foundation; with no
+ Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
+ copy of the license is included in the section entitled "GNU Free
+ Documentation License".
+ </para>
+ </blockquote>
+ <para>
+ If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+ replace the "with...Texts." line with this:
+ </para>
+ <blockquote>
+ <para>
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ </para>
+ </blockquote>
+ <para>
+ If you have Invariant Sections without Cover Texts, or some other
+ combination of the three, merge those two alternatives to suit the
+ situation.
+ </para>
+ <para>
+ If your document contains nontrivial examples of program code, we
+ recommend releasing these examples in parallel under your choice of free
+ software license, such as the GNU General Public License, to permit their
+ use in free software.
+ </para>
+</appendix>
diff --git a/libstdc++-v3/doc/xml/gnu/gpl-2.0.xml b/libstdc++-v3/doc/xml/gnu/gpl-2.0.xml
new file mode 100644
index 00000000000..151a9523f07
--- /dev/null
+++ b/libstdc++-v3/doc/xml/gnu/gpl-2.0.xml
@@ -0,0 +1,366 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<appendix id="appendix.gpl-2.0">
+ <appendixinfo>
+ <title>GNU General Public License</title>
+ <pubdate>Version 2, June 1991</pubdate>
+ <copyright>
+ <year>1989, 1991</year>
+ <holder>Free Software Foundation, Inc.</holder>
+ </copyright>
+ <legalnotice id="gpl-legalnotice">
+ <para>
+ <address>Free Software Foundation, Inc.
+ <street>51 Franklin Street, Fifth Floor</street>,
+ <city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>
+ <country>USA</country>
+ </address>
+ </para>
+ <para>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</para>
+ </legalnotice>
+ <releaseinfo>Version 2, June 1991</releaseinfo>
+ </appendixinfo>
+ <title>GNU General Public License</title>
+ <section id="gpl-1">
+ <title>Preamble</title>
+ <para>The licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change
+ free software - to make sure the software is free for all its users.
+ This General Public License applies to most of the Free Software
+ Foundation&apos;s software and to any other program whose authors commit
+ to using it. (Some other Free Software Foundation software is covered
+ by the GNU Library General Public License instead.) You can apply it
+ to your programs, too.</para>
+
+ <para>When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this
+ service if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new free
+ programs; and that you know you can do these things.</para>
+
+ <para>To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights. These
+ restrictions translate to certain responsibilities for you if you distribute
+ copies of the software, or if you modify it.</para>
+
+ <para>For example, if you distribute copies of such a program, whether gratis or
+ for a fee, you must give the recipients all the rights that you have. You
+ must make sure that they, too, receive or can get the source code. And you
+ must show them these terms so they know their rights.</para>
+
+ <para>We protect your rights with two steps:
+ <orderedlist>
+ <listitem>
+ <para>copyright the software, and</para>
+ </listitem>
+ <listitem>
+ <para>offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.</para>
+ </listitem>
+ </orderedlist>
+ </para>
+
+ <para>Also, for each author&apos;s protection and ours, we want to make certain that
+ everyone understands that there is no warranty for this free software. If
+ the software is modified by someone else and passed on, we want its
+ recipients to know that what they have is not the original, so that any
+ problems introduced by others will not reflect on the original authors&apos;
+ reputations.</para>
+
+ <para>Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent must be
+ licensed for everyone&apos;s free use or not licensed at all.</para>
+
+ <para>The precise terms and conditions for copying, distribution and modification
+ follow.</para>
+ </section>
+ <section id="gpl-2">
+ <title>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title>
+ <section id="gpl-2-0">
+ <title>Section 0</title>
+ <para>This License applies to any program or other work which contains a notice
+ placed by the copyright holder saying it may be distributed under the terms
+ of this General Public License. The <quote>Program</quote>, below, refers to any such
+ program or work, and a
+ <quote>work based on the Program</quote> means either
+ the Program or any derivative work under copyright law: that is to say, a
+ work containing the Program or a portion of it, either verbatim or with
+ modifications and/or translated into another language. (Hereinafter, translation
+ is included without limitation in the term
+ <quote>modification</quote>.) Each licensee is addressed as <quote>you</quote>.</para>
+
+ <para>Activities other than copying, distribution and modification are not covered by
+ this License; they are outside its scope. The act of running the Program is not
+ restricted, and the output from the Program is covered only if its contents
+ constitute a work based on the Program (independent of having been made by running
+ the Program). Whether that is true depends on what the Program does.</para>
+ </section>
+ <section id="gpl-2-1">
+ <title>Section 1</title>
+ <para>You may copy and distribute verbatim copies of the Program&apos;s source code as you
+ receive it, in any medium, provided that you conspicuously and appropriately
+ publish on each copy an appropriate copyright notice and disclaimer of warranty;
+ keep intact all the notices that refer to this License and to the absence of any
+ warranty; and give any other recipients of the Program a copy of this License
+ along with the Program.</para>
+
+ <para>You may charge a fee for the physical act of transferring a copy, and you may at
+ your option offer warranty protection in exchange for a fee.</para>
+ </section>
+ <section id="gpl-2-2">
+ <title>Section 2</title>
+ <para>You may modify your copy or copies of the Program or any portion of it, thus
+ forming a work based on the Program, and copy and distribute such modifications
+ or work under the terms of
+ <link linkend="gpl-2-1">Section 1</link> above, provided
+ that you also meet all of these conditions:
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>You must cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change.</para>
+ </listitem>
+ <listitem>
+ <para>You must cause any work that you distribute or publish, that in whole or
+ in part contains or is derived from the Program or any part thereof, to be
+ licensed as a whole at no charge to all third parties under the terms of
+ this License.</para>
+ </listitem>
+ <listitem>
+ <para>If the modified program normally reads commands interactively when run, you
+ must cause it, when started running for such interactive use in the most
+ ordinary way, to print or display an announcement including an appropriate
+ copyright notice and a notice that there is no warranty (or else, saying
+ that you provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy of this
+ License. (Exception: If the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program is not
+ required to print an announcement.)</para>
+ </listitem>
+ </orderedlist>
+ </para>
+
+ <para>These requirements apply to the modified work as a whole. If identifiable sections
+ of that work are not derived from the Program, and can be reasonably considered
+ independent and separate works in themselves, then this License, and its terms,
+ do not apply to those sections when you distribute them as separate works. But when
+ you distribute the same sections as part of a whole which is a work based on the
+ Program, the distribution of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole, and thus to each and
+ every part regardless of who wrote it.</para>
+
+ <para>Thus, it is not the intent of this section to claim rights or contest your rights
+ to work written entirely by you; rather, the intent is to exercise the right to control
+ the distribution of derivative or collective works based on the Program.</para>
+
+ <para>In addition, mere aggregation of another work not based on the Program with the Program
+ (or with a work based on the Program) on a volume of a storage or distribution medium
+ does not bring the other work under the scope of this License.</para>
+ </section>
+ <section id="gpl-2-3">
+ <title>Section 3</title>
+ <para>You may copy and distribute the Program (or a work based on it, under
+ <link linkend="gpl-2-2">Section 2</link> in object code or executable form under the terms of
+ <link linkend="gpl-2-1">Sections 1</link> and
+ <link linkend="gpl-2-2">2</link> above provided that you also do one of the following:
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>Accompany it with the complete corresponding machine-readable source code, which
+ must be distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,</para>
+ </listitem>
+ <listitem>
+ <para>Accompany it with a written offer, valid for at least three years, to give any
+ third party, for a charge no more than your cost of physically performing source
+ distribution, a complete machine-readable copy of the corresponding source code,
+ to be distributed under the terms of Sections 1 and 2 above on a medium customarily
+ used for software interchange; or,</para>
+ </listitem>
+ <listitem>
+ <para>Accompany it with the information you received as to the offer to distribute
+ corresponding source code. (This alternative is allowed only for noncommercial
+ distribution and only if you received the program in object code or executable form
+ with such an offer, in accord with Subsection b above.)</para>
+ </listitem>
+ </orderedlist>
+ </para>
+
+ <para>The source code for a work means the preferred form of the work for making modifications
+ to it. For an executable work, complete source code means all the source code for all modules
+ it contains, plus any associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special exception, the source
+ code distributed need not include anything that is normally distributed (in either source or
+ binary form) with the major components (compiler, kernel, and so on) of the operating system
+ on which the executable runs, unless that component itself accompanies the executable.</para>
+
+ <para>If distribution of executable or object code is made by offering access to copy from a
+ designated place, then offering equivalent access to copy the source code from the same place
+ counts as distribution of the source code, even though third parties are not compelled to
+ copy the source along with the object code.</para>
+ </section>
+ <section id="gpl-2-4">
+ <title>Section 4</title>
+ <para>You may not copy, modify, sublicense, or distribute the Program except as expressly provided
+ under this License. Any attempt otherwise to copy, modify, sublicense or distribute the
+ Program is void, and will automatically terminate your rights under this License. However,
+ parties who have received copies, or rights, from you under this License will not have their
+ licenses terminated so long as such parties remain in full compliance.</para>
+ </section>
+ <section id="gpl-2-5">
+ <title>Section 5</title>
+ <para>You are not required to accept this License, since you have not signed it. However, nothing
+ else grants you permission to modify or distribute the Program or its derivative works.
+ These actions are prohibited by law if you do not accept this License. Therefore, by modifying
+ or distributing the Program (or any work based on the Program), you indicate your acceptance
+ of this License to do so, and all its terms and conditions for copying, distributing or
+ modifying the Program or works based on it.</para>
+ </section>
+ <section id="gpl-2-6">
+ <title>Section 6</title>
+ <para>Each time you redistribute the Program (or any work based on the Program), the recipient
+ automatically receives a license from the original licensor to copy, distribute or modify
+ the Program subject to these terms and conditions. You may not impose any further restrictions
+ on the recipients&apos; exercise of the rights granted herein. You are not responsible for enforcing
+ compliance by third parties to this License.</para>
+ </section>
+ <section id="gpl-2-7">
+ <title>Section 7</title>
+ <para>If, as a consequence of a court judgment or allegation of patent infringement or for any other
+ reason (not limited to patent issues), conditions are imposed on you (whether by court order,
+ agreement or otherwise) that contradict the conditions of this License, they do not excuse you
+ from the conditions of this License. If you cannot distribute so as to satisfy simultaneously
+ your obligations under this License and any other pertinent obligations, then as a consequence
+ you may not distribute the Program at all. For example, if a patent license would not permit
+ royalty-free redistribution of the Program by all those who receive copies directly or
+ indirectly through you, then the only way you could satisfy both it and this License would be
+ to refrain entirely from distribution of the Program.</para>
+
+ <para>If any portion of this section is held invalid or unenforceable under any particular circumstance,
+ the balance of the section is intended to apply and the section as a whole is intended to apply
+ in other circumstances.</para>
+
+ <para>It is not the purpose of this section to induce you to infringe any patents or other property
+ right claims or to contest validity of any such claims; this section has the sole purpose of
+ protecting the integrity of the free software distribution system, which is implemented by public
+ license practices. Many people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of that system; it is up
+ to the author/donor to decide if he or she is willing to distribute software through any other
+ system and a licensee cannot impose that choice.</para>
+
+ <para>This section is intended to make thoroughly clear what is believed to be a consequence of the
+ rest of this License.</para>
+ </section>
+ <section id="gpl-2-8">
+ <title>Section 8</title>
+ <para>If the distribution and/or use of the Program is restricted in certain countries either by patents
+ or by copyrighted interfaces, the original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding those countries, so that
+ distribution is permitted only in or among countries not thus excluded. In such case, this License
+ incorporates the limitation as if written in the body of this License.</para>
+ </section>
+ <section id="gpl-2-9">
+ <title>Section 9</title>
+ <para>The Free Software Foundation may publish revised and/or new versions of the General Public License
+ from time to time. Such new versions will be similar in spirit to the present version, but may differ
+ in detail to address new problems or concerns.</para>
+
+ <para>Each version is given a distinguishing version number. If the Program specifies a version number of
+ this License which applies to it and <quote>any later version</quote>, you have the option of following the terms
+ and conditions either of that version or of any later version published by the Free Software
+ Foundation. If the Program does not specify a version number of this License, you may choose any
+ version ever published by the Free Software Foundation.</para>
+ </section>
+ <section id="gpl-2-10">
+ <title>Section 10</title>
+ <para>If you wish to incorporate parts of the Program into other free programs whose distribution
+ conditions are different, write to the author to ask for permission. For software which is copyrighted
+ by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions
+ for this. Our decision will be guided by the two goals of preserving the free status of all
+ derivatives of our free software and of promoting the sharing and reuse of software generally.</para>
+ </section>
+ <section id="gpl-2-11">
+ <title>NO WARRANTY Section 11</title>
+ <para>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM <quote>AS IS</quote> WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</para>
+ </section>
+ <section id="gpl-2-12">
+ <title>Section 12</title>
+ <para>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
+ ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
+ ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGES.</para>
+
+ <para>END OF TERMS AND CONDITIONS</para>
+ </section>
+ </section>
+ <section id="gpl-3">
+ <title>How to Apply These Terms to Your New Programs</title>
+ <para>If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.</para>
+
+ <para>To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the <quote>copyright</quote> line and a pointer to where the full notice is found.</para>
+
+ <para>&lt;one line to give the program&apos;s name and a brief idea of what it does.&gt;
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;</para>
+
+ <para>This program 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 of the License, or
+ (at your option) any later version.</para>
+
+ <para>This program 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.</para>
+
+ <para>You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</para>
+
+ <para>Also add information on how to contact you by electronic and paper mail.</para>
+
+ <para>If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:</para>
+
+ <para>Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type <quote>show w</quote>.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type <quote>show c</quote> for details.</para>
+
+ <para>The hypothetical commands <quote>show w</quote> and <quote>show c</quote> should
+ show the appropriate parts of the General Public License. Of course, the commands you
+ use may be called something other than <quote>show w</quote> and <quote>show c</quote>;
+ they could even be mouse-clicks or menu items--whatever suits your program.</para>
+
+ <para>You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a <quote>copyright disclaimer</quote> for the program, if
+ necessary. Here is a sample; alter the names:</para>
+
+ <para>Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ <quote>Gnomovision</quote> (which makes passes at compilers) written by James Hacker.</para>
+
+ <para>&lt;signature of Ty Coon&gt;, 1 April 1989
+ Ty Coon, President of Vice</para>
+
+ <para>This General Public License does not permit incorporating your program into
+ proprietary programs. If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library. If this is what you want to do, use the GNU Library General
+ Public License instead of this License.</para>
+ </section>
+</appendix>
diff --git a/libstdc++-v3/doc/xml/gnu/gpl-3.0.xml b/libstdc++-v3/doc/xml/gnu/gpl-3.0.xml
new file mode 100644
index 00000000000..317b8559617
--- /dev/null
+++ b/libstdc++-v3/doc/xml/gnu/gpl-3.0.xml
@@ -0,0 +1,836 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<appendix>
+ <title>
+ <acronym>GNU</acronym> General Public License version 3
+ </title>
+ <para>
+ Version 3, 29 June 2007
+ </para>
+ <para>
+ Copyright &copy; 2007 Free Software Foundation, Inc.
+ <ulink url="http://fsf.org/">http://fsf.org/</ulink>
+ </para>
+ <para>
+ Everyone is permitted to copy and distribute verbatim copies of this license
+ document, but changing it is not allowed.
+ </para>
+ <bridgehead id="Preamble" renderas="sect1">
+ Preamble
+ </bridgehead>
+ <para>
+ The <acronym>GNU</acronym> General Public License is a free, copyleft
+ license for software and other kinds of works.
+ </para>
+ <para>
+ The licenses for most software and other practical works are designed to
+ take away your freedom to share and change the works. By contrast, the
+ <acronym>GNU</acronym> General Public License is intended to guarantee your
+ freedom to share and change all versions of a program&mdash;to make sure it
+ remains free software for all its users. We, the Free Software Foundation,
+ use the <acronym>GNU</acronym> General Public License for most of our
+ software; it applies also to any other work released this way by its
+ authors. You can apply it to your programs, too.
+ </para>
+ <para>
+ When we speak of free software, we are referring to freedom, not price. Our
+ General Public Licenses are designed to make sure that you have the freedom
+ to distribute copies of free software (and charge for them if you wish),
+ that you receive source code or can get it if you want it, that you can
+ change the software or use pieces of it in new free programs, and that you
+ know you can do these things.
+ </para>
+ <para>
+ To protect your rights, we need to prevent others from denying you these
+ rights or asking you to surrender the rights. Therefore, you have certain
+ responsibilities if you distribute copies of the software, or if you modify
+ it: responsibilities to respect the freedom of others.
+ </para>
+ <para>
+ For example, if you distribute copies of such a program, whether gratis or
+ for a fee, you must pass on to the recipients the same freedoms that you
+ received. You must make sure that they, too, receive or can get the source
+ code. And you must show them these terms so they know their rights.
+ </para>
+ <para>
+ Developers that use the <acronym>GNU</acronym> <acronym>GPL</acronym>
+ protect your rights with two steps: (1) assert copyright on the software,
+ and (2) offer you this License giving you legal permission to copy,
+ distribute and/or modify it.
+ </para>
+ <para>
+ For the developers&rsquo; and authors&rsquo; protection, the
+ <acronym>GPL</acronym> clearly explains that there is no warranty for this
+ free software. For both users&rsquo; and authors&rsquo; sake, the
+ <acronym>GPL</acronym> requires that modified versions be marked as changed,
+ so that their problems will not be attributed erroneously to authors of
+ previous versions.
+ </para>
+ <para>
+ Some devices are designed to deny users access to install or run modified
+ versions of the software inside them, although the manufacturer can do so.
+ This is fundamentally incompatible with the aim of protecting users&rsquo;
+ freedom to change the software. The systematic pattern of such abuse occurs
+ in the area of products for individuals to use, which is precisely where it
+ is most unacceptable. Therefore, we have designed this version of the
+ <acronym>GPL</acronym> to prohibit the practice for those products. If such
+ problems arise substantially in other domains, we stand ready to extend this
+ provision to those domains in future versions of the <acronym>GPL</acronym>,
+ as needed to protect the freedom of users.
+ </para>
+ <para>
+ Finally, every program is threatened constantly by software patents. States
+ should not allow patents to restrict development and use of software on
+ general-purpose computers, but in those that do, we wish to avoid the
+ special danger that patents applied to a free program could make it
+ effectively proprietary. To prevent this, the <acronym>GPL</acronym>
+ assures that patents cannot be used to render the program non-free.
+ </para>
+ <para>
+ The precise terms and conditions for copying, distribution and modification
+ follow.
+ </para>
+ <bridgehead>
+ TERMS AND CONDITIONS
+ </bridgehead>
+ <bridgehead id="Definitions" renderas="sect1">
+ 0. Definitions.
+ </bridgehead>
+ <para>
+ &ldquo;This License&rdquo; refers to version 3 of the <acronym>GNU</acronym>
+ General Public License.
+ </para>
+ <para>
+ &ldquo;Copyright&rdquo; also means copyright-like laws that apply to other
+ kinds of works, such as semiconductor masks.
+ </para>
+ <para>
+ &ldquo;The Program&rdquo; refers to any copyrightable work licensed under
+ this License. Each licensee is addressed as &ldquo;you&rdquo;.
+ &ldquo;Licensees&rdquo; and &ldquo;recipients&rdquo; may be individuals or
+ organizations.
+ </para>
+ <para>
+ To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of
+ the work in a fashion requiring copyright permission, other than the making
+ of an exact copy. The resulting work is called a &ldquo;modified
+ version&rdquo; of the earlier work or a work &ldquo;based on&rdquo; the
+ earlier work.
+ </para>
+ <para>
+ A &ldquo;covered work&rdquo; means either the unmodified Program or a work
+ based on the Program.
+ </para>
+ <para>
+ To &ldquo;propagate&rdquo; a work means to do anything with it that, without
+ permission, would make you directly or secondarily liable for infringement
+ under applicable copyright law, except executing it on a computer or
+ modifying a private copy. Propagation includes copying, distribution (with
+ or without modification), making available to the public, and in some
+ countries other activities as well.
+ </para>
+ <para>
+ To &ldquo;convey&rdquo; a work means any kind of propagation that enables
+ other parties to make or receive copies. Mere interaction with a user
+ through a computer network, with no transfer of a copy, is not conveying.
+ </para>
+ <para>
+ An interactive user interface displays &ldquo;Appropriate Legal
+ Notices&rdquo; to the extent that it includes a convenient and prominently
+ visible feature that (1) displays an appropriate copyright notice, and (2)
+ tells the user that there is no warranty for the work (except to the extent
+ that warranties are provided), that licensees may convey the work under this
+ License, and how to view a copy of this License. If the interface presents
+ a list of user commands or options, such as a menu, a prominent item in the
+ list meets this criterion.
+ </para>
+ <bridgehead id="SourceCode" renderas="sect1">
+ 1. Source Code.
+ </bridgehead>
+ <para>
+ The &ldquo;source code&rdquo; for a work means the preferred form of the
+ work for making modifications to it. &ldquo;Object code&rdquo; means any
+ non-source form of a work.
+ </para>
+ <para>
+ A &ldquo;Standard Interface&rdquo; means an interface that either is an
+ official standard defined by a recognized standards body, or, in the case of
+ interfaces specified for a particular programming language, one that is
+ widely used among developers working in that language.
+ </para>
+ <para>
+ The &ldquo;System Libraries&rdquo; of an executable work include anything,
+ other than the work as a whole, that (a) is included in the normal form of
+ packaging a Major Component, but which is not part of that Major Component,
+ and (b) serves only to enable use of the work with that Major Component, or
+ to implement a Standard Interface for which an implementation is available
+ to the public in source code form. A &ldquo;Major Component&rdquo;, in this
+ context, means a major essential component (kernel, window system, and so
+ on) of the specific operating system (if any) on which the executable work
+ runs, or a compiler used to produce the work, or an object code interpreter
+ used to run it.
+ </para>
+ <para>
+ The &ldquo;Corresponding Source&rdquo; for a work in object code form means
+ all the source code needed to generate, install, and (for an executable
+ work) run the object code and to modify the work, including scripts to
+ control those activities. However, it does not include the work&rsquo;s
+ System Libraries, or general-purpose tools or generally available free
+ programs which are used unmodified in performing those activities but which
+ are not part of the work. For example, Corresponding Source includes
+ interface definition files associated with source files for the work, and
+ the source code for shared libraries and dynamically linked subprograms that
+ the work is specifically designed to require, such as by intimate data
+ communication or control flow between those subprograms and other parts of
+ the work.
+ </para>
+ <para>
+ The Corresponding Source need not include anything that users can regenerate
+ automatically from other parts of the Corresponding Source.
+ </para>
+ <para>
+ The Corresponding Source for a work in source code form is that same work.
+ </para>
+ <bridgehead id="BasicPermissions" renderas="sect1">
+ 2. Basic Permissions.
+ </bridgehead>
+ <para>
+ All rights granted under this License are granted for the term of copyright
+ on the Program, and are irrevocable provided the stated conditions are met.
+ This License explicitly affirms your unlimited permission to run the
+ unmodified Program. The output from running a covered work is covered by
+ this License only if the output, given its content, constitutes a covered
+ work. This License acknowledges your rights of fair use or other
+ equivalent, as provided by copyright law.
+ </para>
+ <para>
+ You may make, run and propagate covered works that you do not convey,
+ without conditions so long as your license otherwise remains in force. You
+ may convey covered works to others for the sole purpose of having them make
+ modifications exclusively for you, or provide you with facilities for
+ running those works, provided that you comply with the terms of this License
+ in conveying all material for which you do not control copyright. Those
+ thus making or running the covered works for you must do so exclusively on
+ your behalf, under your direction and control, on terms that prohibit them
+ from making any copies of your copyrighted material outside their
+ relationship with you.
+ </para>
+ <para>
+ Conveying under any other circumstances is permitted solely under the
+ conditions stated below. Sublicensing is not allowed; section 10 makes it
+ unnecessary.
+ </para>
+ <bridgehead id="Protecting" renderas="sect1">
+ 3. Protecting Users&rsquo; Legal Rights From Anti-Circumvention Law.
+ </bridgehead>
+ <para>
+ No covered work shall be deemed part of an effective technological measure
+ under any applicable law fulfilling obligations under article 11 of the WIPO
+ copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
+ restricting circumvention of such measures.
+ </para>
+ <para>
+ When you convey a covered work, you waive any legal power to forbid
+ circumvention of technological measures to the extent such circumvention is
+ effected by exercising rights under this License with respect to the covered
+ work, and you disclaim any intention to limit operation or modification of
+ the work as a means of enforcing, against the work&rsquo;s users, your or
+ third parties&rsquo; legal rights to forbid circumvention of technological
+ measures.
+ </para>
+ <bridgehead id="ConveyingVerbatim" renderas="sect1">
+ 4. Conveying Verbatim Copies.
+ </bridgehead>
+ <para>
+ You may convey verbatim copies of the Program&rsquo;s source code as you
+ receive it, in any medium, provided that you conspicuously and appropriately
+ publish on each copy an appropriate copyright notice; keep intact all
+ notices stating that this License and any non-permissive terms added in
+ accord with section 7 apply to the code; keep intact all notices of the
+ absence of any warranty; and give all recipients a copy of this License
+ along with the Program.
+ </para>
+ <para>
+ You may charge any price or no price for each copy that you convey, and you
+ may offer support or warranty protection for a fee.
+ </para>
+ <bridgehead id="ConveyingModified" renderas="sect1">
+ 5. Conveying Modified Source Versions.
+ </bridgehead>
+ <para>
+ You may convey a work based on the Program, or the modifications to produce
+ it from the Program, in the form of source code under the terms of section
+ 4, provided that you also meet all of these conditions:
+ </para>
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>
+ The work must carry prominent notices stating that you modified it, and
+ giving a relevant date.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The work must carry prominent notices stating that it is released under
+ this License and any conditions added under section 7. This requirement
+ modifies the requirement in section 4 to &ldquo;keep intact all
+ notices&rdquo;.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ You must license the entire work, as a whole, under this License to
+ anyone who comes into possession of a copy. This License will therefore
+ apply, along with any applicable section 7 additional terms, to the
+ whole of the work, and all its parts, regardless of how they are
+ packaged. This License gives no permission to license the work in any
+ other way, but it does not invalidate such permission if you have
+ separately received it.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your work need
+ not make them do so.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ A compilation of a covered work with other separate and independent works,
+ which are not by their nature extensions of the covered work, and which are
+ not combined with it such as to form a larger program, in or on a volume of
+ a storage or distribution medium, is called an &ldquo;aggregate&rdquo; if
+ the compilation and its resulting copyright are not used to limit the access
+ or legal rights of the compilation&rsquo;s users beyond what the individual works
+ permit. Inclusion of a covered work in an aggregate does not cause
+ this License to apply to the other parts of the aggregate.
+ </para>
+ <bridgehead id="ConveyingNonSource" renderas="sect1">
+ 6. Conveying Non-Source Forms.
+ </bridgehead>
+ <para>
+ You may convey a covered work in object code form under the terms of
+ sections 4 and 5, provided that you also convey the machine-readable
+ Corresponding Source under the terms of this License, in one of these ways:
+ </para>
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>
+ Convey the object code in, or embodied in, a physical product (including
+ a physical distribution medium), accompanied by the Corresponding Source
+ fixed on a durable physical medium customarily used for software
+ interchange.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Convey the object code in, or embodied in, a physical product (including
+ a physical distribution medium), accompanied by a written offer, valid
+ for at least three years and valid for as long as you offer spare parts
+ or customer support for that product model, to give anyone who possesses
+ the object code either (1) a copy of the Corresponding Source for all
+ the software in the product that is covered by this License, on a
+ durable physical medium customarily used for software interchange, for a
+ price no more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the Corresponding Source from
+ a network server at no charge.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Convey individual copies of the object code with a copy of the written
+ offer to provide the Corresponding Source. This alternative is allowed
+ only occasionally and noncommercially, and only if you received the
+ object code with such an offer, in accord with subsection 6b.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Convey the object code by offering access from a designated place
+ (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to copy
+ the object code is a network server, the Corresponding Source may be on
+ a different server (operated by you or a third party) that supports
+ equivalent copying facilities, provided you maintain clear directions
+ next to the object code saying where to find the Corresponding Source.
+ Regardless of what server hosts the Corresponding Source, you remain
+ obligated to ensure that it is available for as long as needed to
+ satisfy these requirements.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Convey the object code using peer-to-peer transmission, provided you
+ inform other peers where the object code and Corresponding Source of the
+ work are being offered to the general public at no charge under
+ subsection 6d.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ A separable portion of the object code, whose source code is excluded from
+ the Corresponding Source as a System Library, need not be included in
+ conveying the object code work.
+ </para>
+ <para>
+ A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;,
+ which means any tangible personal property which is normally used for
+ personal, family, or household purposes, or (2) anything designed or sold
+ for incorporation into a dwelling. In determining whether a product is a
+ consumer product, doubtful cases shall be resolved in favor of coverage.
+ For a particular product received by a particular user, &ldquo;normally
+ used&rdquo; refers to a typical or common use of that class of product,
+ regardless of the status of the particular user or of the way in which the
+ particular user actually uses, or expects or is expected to use, the
+ product. A product is a consumer product regardless of whether the product
+ has substantial commercial, industrial or non-consumer uses, unless such
+ uses represent the only significant mode of use of the product.
+ </para>
+ <para>
+ &ldquo;Installation Information&rdquo; for a User Product means any methods,
+ procedures, authorization keys, or other information required to install and
+ execute modified versions of a covered work in that User Product from a
+ modified version of its Corresponding Source. The information must suffice
+ to ensure that the continued functioning of the modified object code is in
+ no case prevented or interfered with solely because modification has been
+ made.
+ </para>
+ <para>
+ If you convey an object code work under this section in, or with, or
+ specifically for use in, a User Product, and the conveying occurs as part of
+ a transaction in which the right of possession and use of the User Product
+ is transferred to the recipient in perpetuity or for a fixed term
+ (regardless of how the transaction is characterized), the Corresponding
+ Source conveyed under this section must be accompanied by the Installation
+ Information. But this requirement does not apply if neither you nor any
+ third party retains the ability to install modified object code on the User
+ Product (for example, the work has been installed in
+ <acronym>ROM</acronym>).
+ </para>
+ <para>
+ The requirement to provide Installation Information does not include a
+ requirement to continue to provide support service, warranty, or updates for
+ a work that has been modified or installed by the recipient, or for the User
+ Product in which it has been modified or installed. Access to a network may
+ be denied when the modification itself materially and adversely affects the
+ operation of the network or violates the rules and protocols for
+ communication across the network.
+ </para>
+ <para>
+ Corresponding Source conveyed, and Installation Information provided, in
+ accord with this section must be in a format that is publicly documented
+ (and with an implementation available to the public in source code form),
+ and must require no special password or key for unpacking, reading or
+ copying.
+ </para>
+ <bridgehead id="AdditionalTerms" renderas="sect1">
+ 7. Additional Terms.
+ </bridgehead>
+ <para>
+ &ldquo;Additional permissions&rdquo; are terms that supplement the terms of
+ this License by making exceptions from one or more of its conditions.
+ Additional permissions that are applicable to the entire Program shall be
+ treated as though they were included in this License, to the extent that
+ they are valid under applicable law. If additional permissions apply only
+ to part of the Program, that part may be used separately under those
+ permissions, but the entire Program remains governed by this License
+ without regard to the additional permissions.
+ </para>
+ <para>
+ When you convey a copy of a covered work, you may at your option remove any
+ additional permissions from that copy, or from any part of it. (Additional
+ permissions may be written to require their own removal in certain cases
+ when you modify the work.) You may place additional permissions on
+ material, added by you to a covered work, for which you have or can give
+ appropriate copyright permission.
+ </para>
+ <para>
+ Notwithstanding any other provision of this License, for material you add
+ to a covered work, you may (if authorized by the copyright holders of that
+ material) supplement the terms of this License with terms:
+ </para>
+ <orderedlist numeration="loweralpha">
+ <listitem>
+ <para>
+ Disclaiming warranty or limiting liability differently from the terms
+ of sections 15 and 16 of this License; or
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Requiring preservation of specified reasonable legal notices or author
+ attributions in that material or in the Appropriate Legal Notices
+ displayed by works containing it; or
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Declining to grant rights under trademark law for use of some trade
+ names, trademarks, or service marks; or
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Requiring indemnification of licensors and authors of that material by
+ anyone who conveys the material (or modified versions of it) with
+ contractual assumptions of liability to the recipient, for any
+ liability that these contractual assumptions directly impose on those
+ licensors and authors.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ All other non-permissive additional terms are considered &ldquo;further
+ restrictions&rdquo; within the meaning of section 10. If the Program as
+ you received it, or any part of it, contains a notice stating that it is
+ governed by this License along with a term that is a further restriction,
+ you may remove that term. If a license document contains a further
+ restriction but permits relicensing or conveying under this License, you
+ may add to a covered work material governed by the terms of that license
+ document, provided that the further restriction does not survive such
+ relicensing or conveying.
+ </para>
+ <para>
+ If you add terms to a covered work in accord with this section, you must
+ place, in the relevant source files, a statement of the additional terms
+ that apply to those files, or a notice indicating where to find the
+ applicable terms.
+ </para>
+ <para>
+ Additional terms, permissive or non-permissive, may be stated in the form
+ of a separately written license, or stated as exceptions; the above
+ requirements apply either way.
+ </para>
+ <bridgehead id="Termination" renderas="sect1">
+ 8. Termination.
+ </bridgehead>
+ <para>
+ You may not propagate or modify a covered work except as expressly provided
+ under this License. Any attempt otherwise to propagate or modify it is
+ void, and will automatically terminate your rights under this License
+ (including any patent licenses granted under the third paragraph of section
+ 11).
+ </para>
+ <para>
+ However, if you cease all violation of this License, then your license from
+ a particular copyright holder is reinstated (a) provisionally, unless and
+ until the copyright holder explicitly and finally terminates your license,
+ and (b) permanently, if the copyright holder fails to notify you of the
+ violation by some reasonable means prior to 60 days after the cessation.
+ </para>
+ <para>
+ Moreover, your license from a particular copyright holder is reinstated
+ permanently if the copyright holder notifies you of the violation by some
+ reasonable means, this is the first time you have received notice of
+ violation of this License (for any work) from that copyright holder, and
+ you cure the violation prior to 30 days after your receipt of the notice.
+ </para>
+ <para>
+ Termination of your rights under this section does not terminate the
+ licenses of parties who have received copies or rights from you under this
+ License. If your rights have been terminated and not permanently
+ reinstated, you do not qualify to receive new licenses for the same
+ material under section 10.
+ </para>
+ <bridgehead id="AcceptanceNotRequired" renderas="sect1">
+ 9. Acceptance Not Required for Having Copies.
+ </bridgehead>
+ <para>
+ You are not required to accept this License in order to receive or run a
+ copy of the Program. Ancillary propagation of a covered work occurring
+ solely as a consequence of using peer-to-peer transmission to receive a
+ copy likewise does not require acceptance. However, nothing other than
+ this License grants you permission to propagate or modify any covered work.
+ These actions infringe copyright if you do not accept this License.
+ Therefore, by modifying or propagating a covered work, you indicate your
+ acceptance of this License to do so.
+ </para>
+ <bridgehead id="AutomaticDownstream" renderas="sect1">
+ 10. Automatic Licensing of Downstream Recipients.
+ </bridgehead>
+ <para>
+ Each time you convey a covered work, the recipient automatically receives a
+ license from the original licensors, to run, modify and propagate that
+ work, subject to this License. You are not responsible for enforcing
+ compliance by third parties with this License.
+ </para>
+ <para>
+ An &ldquo;entity transaction&rdquo; is a transaction transferring control
+ of an organization, or substantially all assets of one, or subdividing an
+ organization, or merging organizations. If propagation of a covered work
+ results from an entity transaction, each party to that transaction who
+ receives a copy of the work also receives whatever licenses to the work the
+ party&rsquo;s predecessor in interest had or could give under the previous
+ paragraph, plus a right to possession of the Corresponding Source of the
+ work from the predecessor in interest, if the predecessor has it or can get
+ it with reasonable efforts.
+ </para>
+ <para>
+ You may not impose any further restrictions on the exercise of the rights
+ granted or affirmed under this License. For example, you may not impose a
+ license fee, royalty, or other charge for exercise of rights granted under
+ this License, and you may not initiate litigation (including a cross-claim
+ or counterclaim in a lawsuit) alleging that any patent claim is infringed
+ by making, using, selling, offering for sale, or importing the Program or
+ any portion of it.
+ </para>
+ <bridgehead id="Patents" renderas="sect1">
+ 11. Patents.
+ </bridgehead>
+ <para>
+ A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under
+ this License of the Program or a work on which the Program is based. The
+ work thus licensed is called the contributor&rsquo;s &ldquo;contributor
+ version&rdquo;.
+ </para>
+ <para>
+ A contributor&rsquo;s &ldquo;essential patent claims&rdquo; are all patent
+ claims owned or controlled by the contributor, whether already acquired or
+ hereafter acquired, that would be infringed by some manner, permitted by
+ this License, of making, using, or selling its contributor version, but do
+ not include claims that would be infringed only as a consequence of further
+ modification of the contributor version. For purposes of this definition,
+ &ldquo;control&rdquo; includes the right to grant patent sublicenses in a
+ manner consistent with the requirements of this License.
+ </para>
+ <para>
+ Each contributor grants you a non-exclusive, worldwide, royalty-free patent
+ license under the contributor&rsquo;s essential patent claims, to make, use,
+ sell, offer for sale, import and otherwise run, modify and propagate the
+ contents of its contributor version.
+ </para>
+ <para>
+ In the following three paragraphs, a &ldquo;patent license&rdquo; is any
+ express agreement or commitment, however denominated, not to enforce a
+ patent (such as an express permission to practice a patent or covenant not
+ to sue for patent infringement). To &ldquo;grant&rdquo; such a patent
+ license to a party means to make such an agreement or commitment not to
+ enforce a patent against the party.
+ </para>
+ <para>
+ If you convey a covered work, knowingly relying on a patent license, and the
+ Corresponding Source of the work is not available for anyone to copy, free
+ of charge and under the terms of this License, through a publicly available
+ network server or other readily accessible means, then you must either (1)
+ cause the Corresponding Source to be so available, or (2) arrange to deprive
+ yourself of the benefit of the patent license for this particular work, or
+ (3) arrange, in a manner consistent with the requirements of this License,
+ to extend the patent license to downstream recipients. &ldquo;Knowingly
+ relying&rdquo; means you have actual knowledge that, but for the patent
+ license, your conveying the covered work in a country, or your
+ recipient&rsquo;s use of the covered work in a country, would infringe one
+ or more identifiable patents in that country that you have reason to believe
+ are valid.
+ </para>
+ <para>
+ If, pursuant to or in connection with a single transaction or arrangement,
+ you convey, or propagate by procuring conveyance of, a covered work, and
+ grant a patent license to some of the parties receiving the covered work
+ authorizing them to use, propagate, modify or convey a specific copy of the
+ covered work, then the patent license you grant is automatically extended to
+ all recipients of the covered work and works based on it.
+ </para>
+ <para>
+ A patent license is &ldquo;discriminatory&rdquo; if it does not include
+ within the scope of its coverage, prohibits the exercise of, or is
+ conditioned on the non-exercise of one or more of the rights that are
+ specifically granted under this License. You may not convey a covered work
+ if you are a party to an arrangement with a third party that is in the
+ business of distributing software, under which you make payment to the third
+ party based on the extent of your activity of conveying the work, and under
+ which the third party grants, to any of the parties who would receive the
+ covered work from you, a discriminatory patent license (a) in connection
+ with copies of the covered work conveyed by you (or copies made from those
+ copies), or (b) primarily for and in connection with specific products or
+ compilations that contain the covered work, unless you entered into that
+ arrangement, or that patent license was granted, prior to 28 March 2007.
+ </para>
+ <para>
+ Nothing in this License shall be construed as excluding or limiting any
+ implied license or other defenses to infringement that may otherwise be
+ available to you under applicable patent law.
+ </para>
+ <bridgehead id="NoSurrender" renderas="sect1">
+ 12. No Surrender of Others&rsquo; Freedom.
+ </bridgehead>
+ <para>
+ If conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot convey a
+ covered work so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you may
+ not convey it at all. For example, if you agree to terms that obligate you
+ to collect a royalty for further conveying from those to whom you convey the
+ Program, the only way you could satisfy both those terms and this License
+ would be to refrain entirely from conveying the Program.
+ </para>
+ <bridgehead id="UsedWithAGPL" renderas="sect1">
+ 13. Use with the <acronym>GNU</acronym> Affero General Public License.
+ </bridgehead>
+ <para>
+ Notwithstanding any other provision of this License, you have permission to
+ link or combine any covered work with a work licensed under version 3 of the
+ <acronym>GNU</acronym> Affero General Public License into a single combined
+ work, and to convey the resulting work. The terms of this License will
+ continue to apply to the part which is the covered work, but the special
+ requirements of the <acronym>GNU</acronym> Affero General Public License,
+ section 13, concerning interaction through a network will apply to the
+ combination as such.
+ </para>
+ <bridgehead id="RevisedVersions" renderas="sect1">
+ 14. Revised Versions of this License.
+ </bridgehead>
+ <para>
+ The Free Software Foundation may publish revised and/or new versions of the
+ <acronym>GNU</acronym> General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may differ in
+ detail to address new problems or concerns.
+ </para>
+ <para>
+ Each version is given a distinguishing version number. If the Program
+ specifies that a certain numbered version of the <acronym>GNU</acronym>
+ General Public License &ldquo;or any later version&rdquo; applies to it, you
+ have the option of following the terms and conditions either of that
+ numbered version or of any later version published by the Free Software
+ Foundation. If the Program does not specify a version number of the
+ <acronym>GNU</acronym> General Public License, you may choose any version
+ ever published by the Free Software Foundation.
+ </para>
+ <para>
+ If the Program specifies that a proxy can decide which future versions of
+ the <acronym>GNU</acronym> General Public License can be used, that
+ proxy&rsquo;s public statement of acceptance of a version permanently
+ authorizes you to choose that version for the Program.
+ </para>
+ <para>
+ Later license versions may give you additional or different permissions.
+ However, no additional obligations are imposed on any author or copyright
+ holder as a result of your choosing to follow a later version.
+ </para>
+ <bridgehead id="WarrantyDisclaimer" renderas="sect1">
+ 15. Disclaimer of Warranty.
+ </bridgehead>
+ <para>
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+ LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF
+ ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+ </para>
+ <bridgehead id="LiabilityLimitation" renderas="sect1">
+ 16. Limitation of Liability.
+ </bridgehead>
+ <para>
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE
+ PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
+ OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
+ OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGES.
+ </para>
+ <bridgehead id="InterpretationSecs1516" renderas="sect1">
+ 17. Interpretation of Sections 15 and 16.
+ </bridgehead>
+ <para>
+ If the disclaimer of warranty and limitation of liability provided above
+ cannot be given local legal effect according to their terms, reviewing
+ courts shall apply local law that most closely approximates an absolute
+ 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.
+ </para>
+ <bridgehead>
+ END OF TERMS AND CONDITIONS
+ </bridgehead>
+ <bridgehead id="HowToApply" renderas="sect1">
+ How to Apply These Terms to Your New Programs
+ </bridgehead>
+ <para>
+ If you develop a new program, and you want it to be of the greatest possible
+ use to the public, the best way to achieve this is to make it free software
+ which everyone can redistribute and change under these terms.
+ </para>
+ <para>
+ To do so, attach the following notices to the program. It is safest to
+ attach them to the start of each source file to most effectively state the
+ exclusion of warranty; and each file should have at least the
+ &ldquo;copyright&rdquo; line and a pointer to where the full notice is
+ found.
+ </para>
+ <screen>
+<replaceable>one line to give the program&rsquo;s name and a brief idea of what it does.</replaceable>
+Copyright (C) <replaceable>year</replaceable> <replaceable>name of author</replaceable>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the <acronym>GNU</acronym> General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program 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
+<acronym>GNU</acronym> General Public License for more details.
+
+You should have received a copy of the <acronym>GNU</acronym> General Public License
+along with this program. If not, see <ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>.
+ </screen>
+ <para>
+ Also add information on how to contact you by electronic and paper mail.
+ </para>
+ <para>
+ If the program does terminal interaction, make it output a short notice like
+ this when it starts in an interactive mode:
+ </para>
+ <screen>
+<replaceable>program</replaceable> Copyright (C) <replaceable>year</replaceable> <replaceable>name of author</replaceable>
+This program comes with ABSOLUTELY NO WARRANTY; for details type &lsquo;<literal>show w</literal>&rsquo;.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type &lsquo;<literal>show c</literal>&rsquo; for details.
+ </screen>
+ <para>
+ The hypothetical commands &lsquo;<literal>show w</literal>&rsquo; and
+ &lsquo;<literal>show c</literal>&rsquo; should show the appropriate parts of
+ the General Public License. Of course, your program&rsquo;s commands might be
+ different; for a GUI interface, you would use an &ldquo;about box&rdquo;.
+ </para>
+ <para>
+ You should also get your employer (if you work as a programmer) or school,
+ if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if
+ necessary. For more information on this, and how to apply and follow the
+ <acronym>GNU</acronym> <acronym>GPL</acronym>, see
+ <ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>.
+ </para>
+ <para>
+ The <acronym>GNU</acronym> General Public License does not permit
+ incorporating your program into proprietary programs. If your program is a
+ subroutine library, you may consider it more useful to permit linking
+ proprietary applications with the library. If this is what you want to do,
+ use the <acronym>GNU</acronym> Lesser General Public License instead of this
+ License. But first, please read <ulink
+ url="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</ulink>.
+ </para>
+</appendix>
diff --git a/libstdc++-v3/docs/html/17_intro/confdeps.dot b/libstdc++-v3/doc/xml/images/confdeps.dot
index a62d28ce9dd..a62d28ce9dd 100644
--- a/libstdc++-v3/docs/html/17_intro/confdeps.dot
+++ b/libstdc++-v3/doc/xml/images/confdeps.dot
diff --git a/libstdc++-v3/docs/html/17_intro/confdeps.png b/libstdc++-v3/doc/xml/images/confdeps.png
index 5075aa869b1..5075aa869b1 100644
--- a/libstdc++-v3/docs/html/17_intro/confdeps.png
+++ b/libstdc++-v3/doc/xml/images/confdeps.png
Binary files differ
diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml
new file mode 100644
index 00000000000..c11da9507db
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/abi.xml
@@ -0,0 +1,1130 @@
+<sect1 id="appendix.porting.abi" xreflabel="abi">
+<?dbhtml filename="abi.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ ABI
+ </keyword>
+ <keyword>
+ version
+ </keyword>
+ <keyword>
+ dynamic
+ </keyword>
+ <keyword>
+ shared
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>ABI Policy and Guidelines</title>
+
+<para>
+</para>
+
+<sect2 id="abi.cxx_interface" xreflabel="abi.cxx_interface">
+<title>The C++ Interface</title>
+
+<para>
+ C++ applications often dependent on specific language support
+ routines, say for throwing exceptions, or catching exceptions, and
+ perhaps also dependent on features in the C++ Standard Library.
+</para>
+
+<para>
+ The C++ Standard Library has many include files, types defined in
+ those include files, specific named functions, and other
+ behavior. The text of these behaviors, as written in source include
+ files, is called the Application Programing Interface, or API.
+</para>
+
+<para>
+ Furthermore, C++ source that is compiled into object files is
+ transformed by the compiler: it arranges objects with specific
+ alignment and in a particular layout, mangling names according to a
+ well-defined algorithm, has specific arrangements for the support of
+ virtual functions, etc. These details are defined as the compiler
+ Application Binary Interface, or ABI. The GNU C++ compiler uses an
+ industry-standard C++ ABI starting with version 3. Details can be
+ found in the <ulink
+ url="http://www.codesourcery.com/cxx-abi/abi.html"> ABI
+ specification</ulink>.
+</para>
+
+<para>
+ The GNU C++ compiler, g++, has a compiler command line option to
+ switch between various different C++ ABIs. This explicit version
+ switch is the flag <code>-fabi-version</code>. In addition, some
+ g++ command line options may change the ABI as a side-effect of
+ use. Such flags include <code>-fpack-struct</code> and
+ <code>-fno-exceptions</code>, but include others: see the complete
+ list in the GCC manual under the heading <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code%20Gen%20Options">Options
+ for Code Generation Conventions</ulink>.
+</para>
+
+<para>
+ The configure options used when building a specific libstdc++
+ version may also impact the resulting library ABI. The available
+ configure options, and their impact on the library ABI, are
+ documented
+<ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
+here</ulink>.
+</para>
+
+<para> Putting all of these ideas together results in the C++ Standard
+library ABI, which is the compilation of a given library API by a
+given compiler ABI. In a nutshell:
+</para>
+
+<para>
+ <quote>
+ library API + compiler ABI = library ABI
+ </quote>
+</para>
+
+<para>
+ The library ABI is mostly of interest for end-users who have
+ unresolved symbols and are linking dynamically to the C++ Standard
+ library, and who thus must be careful to compile their application
+ with a compiler that is compatible with the available C++ Standard
+ library binary. In this case, compatible is defined with the equation
+ above: given an application compiled with a given compiler ABI and
+ library API, it will work correctly with a Standard C++ Library
+ created with the same constraints.
+</para>
+
+<para>
+ To use a specific version of the C++ ABI, one must use a
+ corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that
+ implements the C++ ABI in question.
+</para>
+
+</sect2>
+
+<sect2 id="abi.versioning" xreflabel="abi.versioning">
+<title>Versioning</title>
+
+<para> The C++ interface has evolved throughout the history of the GNU
+C++ toolchain. With each release, various details have been changed so
+as to give distinct versions to the C++ interface.
+</para>
+
+ <sect3 id="abi.versioning.goals" xreflabel="abi.versioning.goals">
+ <title>Goals</title>
+
+<para>Extending existing, stable ABIs. Versioning gives subsequent stable
+releases series libraries the ability to add new symbols and add
+functionality, all the while retaining backwards compatibility with
+the previous releases in the series. Note: the reverse is not true. It
+is not possible to take binaries linked with the latest version of a
+release series (if symbols have been added) and expect the initial
+release of the series to remain link compatible.
+</para>
+
+<para>Allows multiple, incompatible ABIs to coexist at the same time.
+</para>
+ </sect3>
+
+ <sect3 id="abi.versioning.history" xreflabel="abi.versioning.history">
+ <title>History</title>
+
+<para>
+ How can this complexity be managed? What does C++ versioning mean?
+ Because library and compiler changes often make binaries compiled
+ with one version of the GNU tools incompatible with binaries
+ compiled with other (either newer or older) versions of the same GNU
+ tools, specific techniques are used to make managing this complexity
+ easier.
+</para>
+
+<para>
+ The following techniques are used:
+</para>
+
+ <orderedlist>
+
+ <listitem><para>Release versioning on the libgcc_s.so binary. </para>
+
+ <para>This is implemented via file names and the ELF DT_SONAME
+ mechanism (at least on ELF systems). It is versioned as follows:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.0.1: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.0.2: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.0.3: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.0.4: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.1.0: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.1.1: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.2.0: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.2.1: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.2.2: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.2.3: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.3.0: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.3.1: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.3.2: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.3.3: libgcc_s.so.1</para></listitem>
+ <listitem><para>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: on m68k-linux and
+ hppa-linux this is either libgcc_s.so.1 (when configuring
+ <code>--with-sjlj-exceptions</code>) or libgcc_s.so.2. For all
+ others, this is libgcc_s.so.1. </para>
+ </listitem>
+ </itemizedlist>
+
+ </listitem>
+
+ <listitem><para>Symbol versioning on the libgcc_s.so binary.</para>
+
+ <para>It is versioned with the following labels and version
+ definitions, where the version definition is the maximum for a
+ particular release. Labels are cumulative. If a particular release
+ is not listed, it has the same version labels as the preceeding
+ release.</para>
+
+ <para>This corresponds to the mapfile: gcc/libgcc-std.ver</para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: GCC_3.0</para></listitem>
+ <listitem><para>gcc-3.3.0: GCC_3.3</para></listitem>
+ <listitem><para>gcc-3.3.1: GCC_3.3.1</para></listitem>
+ <listitem><para>gcc-3.3.2: GCC_3.3.2</para></listitem>
+ <listitem><para>gcc-3.3.4: GCC_3.3.4</para></listitem>
+ <listitem><para>gcc-3.4.0: GCC_3.4</para></listitem>
+ <listitem><para>gcc-3.4.2: GCC_3.4.2</para></listitem>
+ <listitem><para>gcc-3.4.4: GCC_3.4.4</para></listitem>
+ <listitem><para>gcc-4.0.0: GCC_4.0.0</para></listitem>
+ <listitem><para>gcc-4.1.0: GCC_4.1.0</para></listitem>
+ <listitem><para>gcc-4.2.0: GCC_4.2.0</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem><para>Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above.</para>
+
+ <para>It is versioned as follows:
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: libstdc++.so.3.0.0</para></listitem>
+ <listitem><para>gcc-3.0.1: libstdc++.so.3.0.1</para></listitem>
+ <listitem><para>gcc-3.0.2: libstdc++.so.3.0.2</para></listitem>
+ <listitem><para>gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)</para></listitem>
+ <listitem><para>gcc-3.0.4: libstdc++.so.3.0.4</para></listitem>
+ <listitem><para>gcc-3.1.0: libstdc++.so.4.0.0</para></listitem>
+ <listitem><para>gcc-3.1.1: libstdc++.so.4.0.1</para></listitem>
+ <listitem><para>gcc-3.2.0: libstdc++.so.5.0.0</para></listitem>
+ <listitem><para>gcc-3.2.1: libstdc++.so.5.0.1</para></listitem>
+ <listitem><para>gcc-3.2.2: libstdc++.so.5.0.2</para></listitem>
+ <listitem><para>gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)</para></listitem>
+ <listitem><para>gcc-3.3.0: libstdc++.so.5.0.4</para></listitem>
+ <listitem><para>gcc-3.3.1: libstdc++.so.5.0.5</para></listitem>
+ <listitem><para>gcc-3.3.2: libstdc++.so.5.0.5</para></listitem>
+ <listitem><para>gcc-3.3.3: libstdc++.so.5.0.5</para></listitem>
+ <listitem><para>gcc-3.4.0: libstdc++.so.6.0.0</para></listitem>
+ <listitem><para>gcc-3.4.1: libstdc++.so.6.0.1</para></listitem>
+ <listitem><para>gcc-3.4.2: libstdc++.so.6.0.2</para></listitem>
+ <listitem><para>gcc-3.4.3: libstdc++.so.6.0.3</para></listitem>
+ <listitem><para>gcc-3.4.4: libstdc++.so.6.0.3</para></listitem>
+ <listitem><para>gcc-3.4.5: libstdc++.so.6.0.3</para></listitem>
+ <listitem><para>gcc-3.4.6: libstdc++.so.6.0.3</para></listitem>
+ <listitem><para>gcc-4.0.0: libstdc++.so.6.0.4</para></listitem>
+ <listitem><para>gcc-4.0.1: libstdc++.so.6.0.5</para></listitem>
+ <listitem><para>gcc-4.0.2: libstdc++.so.6.0.6</para></listitem>
+ <listitem><para>gcc-4.0.3: libstdc++.so.6.0.7</para></listitem>
+ <listitem><para>gcc-4.1.0: libstdc++.so.6.0.7</para></listitem>
+ <listitem><para>gcc-4.1.1: libstdc++.so.6.0.8</para></listitem>
+ <listitem><para>gcc-4.1.2: libstdc++.so.6.0.8</para></listitem>
+ <listitem><para>gcc-4.2.0: libstdc++.so.6.0.9</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem><para>Symbol versioning on the libstdc++.so binary.</para>
+
+ <para>mapfile: libstdc++/config/linker-map.gnu</para>
+ <para>It is versioned with the following labels and version
+ definitions, where the version definition is the maximum for a
+ particular release. Note, only symbol which are newly introduced
+ will use the maximum version definition. Thus, for release series
+ with the same label, but incremented version definitions, the later
+ release has both versions. (An example of this would be the
+ gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and
+ GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0
+ release.) If a particular release is not listed, it has the same
+ version labels as the preceeding release.
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: (Error, not versioned)</para></listitem>
+ <listitem><para>gcc-3.0.1: (Error, not versioned)</para></listitem>
+ <listitem><para>gcc-3.0.2: (Error, not versioned)</para></listitem>
+ <listitem><para>gcc-3.0.3: (Error, not versioned)</para></listitem>
+ <listitem><para>gcc-3.0.4: (Error, not versioned)</para></listitem>
+ <listitem><para>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</para></listitem>
+ <listitem><para>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</para></listitem>
+ <listitem><para>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</para></listitem>
+ <listitem><para>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</para></listitem>
+ <listitem><para>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem>
+ <listitem><para>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</para></listitem>
+ <listitem><para>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</para></listitem>
+ <listitem><para>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem>
+ <listitem><para>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem>
+ <listitem><para>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</para></listitem>
+ <listitem><para>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</para></listitem>
+ <listitem><para>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</para></listitem>
+ <listitem><para>gcc-3.4.2: GLIBCXX_3.4.2</para></listitem>
+ <listitem><para>gcc-3.4.3: GLIBCXX_3.4.3</para></listitem>
+ <listitem><para>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</para></listitem>
+ <listitem><para>gcc-4.0.1: GLIBCXX_3.4.5</para></listitem>
+ <listitem><para>gcc-4.0.2: GLIBCXX_3.4.6</para></listitem>
+ <listitem><para>gcc-4.0.3: GLIBCXX_3.4.7</para></listitem>
+ <listitem><para>gcc-4.1.1: GLIBCXX_3.4.8</para></listitem>
+ <listitem><para>gcc-4.2.0: GLIBCXX_3.4.9</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Incremental bumping of a compiler pre-defined macro,
+ __GXX_ABI_VERSION. This macro is defined as the version of the
+ compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
+ be automatically defined whenever g++ is used (the curious can
+ test this by invoking g++ with the '-v' flag.)
+ </para>
+
+ <para>
+ This macro was defined in the file "lang-specs.h" in the gcc/cp directory.
+ Later versions defined it in "c-common.c" in the gcc directory, and from
+ G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the
+ '-fabi-version' command line option.
+ </para>
+
+ <para>
+ It is versioned as follows, where 'n' is given by '-fabi-version=n':
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.x: 100</para></listitem>
+ <listitem><para>gcc-3.1.x: 100 (Error, should be 101)</para></listitem>
+ <listitem><para>gcc-3.2.x: 102</para></listitem>
+ <listitem><para>gcc-3.3.x: 102</para></listitem>
+ <listitem><para>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 102 (when n=1)</para></listitem>
+ <listitem><para>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 1000 + n (when n&gt;1)</para></listitem>
+ <listitem><para>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 999999 (when n=0)</para></listitem>
+ </itemizedlist>
+ <para></para>
+ </listitem>
+
+ <listitem>
+ <para>Changes to the default compiler option for
+ <code>-fabi-version</code>.
+ </para>
+ <para>
+ It is versioned as follows:
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.x: (Error, not versioned) </para></listitem>
+ <listitem><para>gcc-3.1.x: (Error, not versioned) </para></listitem>
+ <listitem><para>gcc-3.2.x: <code>-fabi-version=1</code></para></listitem>
+ <listitem><para>gcc-3.3.x: <code>-fabi-version=1</code></para></listitem>
+ <listitem><para>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: <code>-fabi-version=2</code></para></listitem>
+ </itemizedlist>
+ <para></para>
+ </listitem>
+
+ <listitem>
+ <para>Incremental bumping of a library pre-defined macro. For releases
+ before 3.4.0, the macro is __GLIBCPP__. For later releases, it's
+ __GLIBCXX__. (The libstdc++ project generously changed from CPP to
+ CXX throughout its source to allow the "C" pre-processor the CPP
+ macro namespace.) These macros are defined as the date the library
+ was released, in compressed ISO date format, as an unsigned long.
+ </para>
+
+ <para>
+ This macro is defined in the file "c++config" in the
+ "libstdc++/include/bits" directory. (Up to gcc-4.1.0, it was
+ changed every night by an automated script. Since gcc-4.1.0, it is
+ the same value as gcc/DATESTAMP.)
+ </para>
+ <para>
+ It is versioned as follows:
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: 20010615</para></listitem>
+ <listitem><para>gcc-3.0.1: 20010819</para></listitem>
+ <listitem><para>gcc-3.0.2: 20011023</para></listitem>
+ <listitem><para>gcc-3.0.3: 20011220</para></listitem>
+ <listitem><para>gcc-3.0.4: 20020220</para></listitem>
+ <listitem><para>gcc-3.1.0: 20020514</para></listitem>
+ <listitem><para>gcc-3.1.1: 20020725</para></listitem>
+ <listitem><para>gcc-3.2.0: 20020814</para></listitem>
+ <listitem><para>gcc-3.2.1: 20021119</para></listitem>
+ <listitem><para>gcc-3.2.2: 20030205</para></listitem>
+ <listitem><para>gcc-3.2.3: 20030422</para></listitem>
+ <listitem><para>gcc-3.3.0: 20030513</para></listitem>
+ <listitem><para>gcc-3.3.1: 20030804</para></listitem>
+ <listitem><para>gcc-3.3.2: 20031016</para></listitem>
+ <listitem><para>gcc-3.3.3: 20040214</para></listitem>
+ <listitem><para>gcc-3.4.0: 20040419</para></listitem>
+ <listitem><para>gcc-3.4.1: 20040701</para></listitem>
+ <listitem><para>gcc-3.4.2: 20040906</para></listitem>
+ <listitem><para>gcc-3.4.3: 20041105</para></listitem>
+ <listitem><para>gcc-3.4.4: 20050519</para></listitem>
+ <listitem><para>gcc-3.4.5: 20051201</para></listitem>
+ <listitem><para>gcc-3.4.6: 20060306</para></listitem>
+ <listitem><para>gcc-4.0.0: 20050421</para></listitem>
+ <listitem><para>gcc-4.0.1: 20050707</para></listitem>
+ <listitem><para>gcc-4.0.2: 20050921</para></listitem>
+ <listitem><para>gcc-4.0.3: 20060309</para></listitem>
+ <listitem><para>gcc-4.1.0: 20060228</para></listitem>
+ <listitem><para>gcc-4.1.1: 20060524</para></listitem>
+ <listitem><para>gcc-4.1.2: 20070214</para></listitem>
+ <listitem><para>gcc-4.2.0: 20070514</para></listitem>
+ </itemizedlist>
+ <para></para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Incremental bumping of a library pre-defined macro,
+ _GLIBCPP_VERSION. This macro is defined as the released version of
+ the library, as a string literal. This is only implemented in
+ gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it
+ is called _GLIBCXX_VERSION).
+ </para>
+
+ <para>
+ This macro is defined in the file "c++config" in the
+ "libstdc++/include/bits" directory and is generated
+ automatically by autoconf as part of the configure-time generation
+ of config.h.
+ </para>
+
+ <para>
+ It is versioned as follows:
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: "3.0.0"</para></listitem>
+ <listitem><para>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</para></listitem>
+ <listitem><para>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</para></listitem>
+ <listitem><para>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</para></listitem>
+ <listitem><para>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</para></listitem>
+ <listitem><para>gcc-3.1.0: "3.1.0"</para></listitem>
+ <listitem><para>gcc-3.1.1: "3.1.1"</para></listitem>
+ <listitem><para>gcc-3.2.0: "3.2"</para></listitem>
+ <listitem><para>gcc-3.2.1: "3.2.1"</para></listitem>
+ <listitem><para>gcc-3.2.2: "3.2.2"</para></listitem>
+ <listitem><para>gcc-3.2.3: "3.2.3"</para></listitem>
+ <listitem><para>gcc-3.3.0: "3.3"</para></listitem>
+ <listitem><para>gcc-3.3.1: "3.3.1"</para></listitem>
+ <listitem><para>gcc-3.3.2: "3.3.2"</para></listitem>
+ <listitem><para>gcc-3.3.3: "3.3.3"</para></listitem>
+ <listitem><para>gcc-3.4.x: "version-unused"</para></listitem>
+ <listitem><para>gcc-4.0.x: "version-unused"</para></listitem>
+ <listitem><para>gcc-4.1.x: "version-unused"</para></listitem>
+ <listitem><para>gcc-4.2.x: "version-unused"</para></listitem>
+ </itemizedlist>
+ <para></para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Matching each specific C++ compiler release to a specific set of
+ C++ include files. This is only implemented in gcc-3.1.1 releases
+ and higher.
+ </para>
+ <para>
+ All C++ includes are installed in include/c++, then nest in a
+ directory hierarchy corresponding to the C++ compiler's released
+ version. This version corresponds to the variable "gcc_version" in
+ "libstdc++/acinclude.m4," and more details can be found in that
+ file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).
+ </para>
+ <para>
+ C++ includes are versioned as follows:
+ </para>
+ <itemizedlist>
+ <listitem><para>gcc-3.0.0: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.0.1: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.0.2: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.0.3: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.0.4: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.1.0: include/g++-v3</para></listitem>
+ <listitem><para>gcc-3.1.1: include/c++/3.1.1</para></listitem>
+ <listitem><para>gcc-3.2.0: include/c++/3.2</para></listitem>
+ <listitem><para>gcc-3.2.1: include/c++/3.2.1</para></listitem>
+ <listitem><para>gcc-3.2.2: include/c++/3.2.2</para></listitem>
+ <listitem><para>gcc-3.2.3: include/c++/3.2.3</para></listitem>
+ <listitem><para>gcc-3.3.0: include/c++/3.3</para></listitem>
+ <listitem><para>gcc-3.3.1: include/c++/3.3.1</para></listitem>
+ <listitem><para>gcc-3.3.2: include/c++/3.3.2</para></listitem>
+ <listitem><para>gcc-3.3.3: include/c++/3.3.3</para></listitem>
+ <listitem><para>gcc-3.4.0: include/c++/3.4.0</para></listitem>
+ <listitem><para>gcc-3.4.1: include/c++/3.4.1</para></listitem>
+ <listitem><para>gcc-3.4.2: include/c++/3.4.2</para></listitem>
+ <listitem><para>gcc-3.4.3: include/c++/3.4.3</para></listitem>
+ <listitem><para>gcc-3.4.4: include/c++/3.4.4</para></listitem>
+ <listitem><para>gcc-3.4.5: include/c++/3.4.5</para></listitem>
+ <listitem><para>gcc-3.4.6: include/c++/3.4.6</para></listitem>
+ <listitem><para>gcc-4.0.0: include/c++/4.0.0</para></listitem>
+ <listitem><para>gcc-4.0.1: include/c++/4.0.1</para></listitem>
+ <listitem><para>gcc-4.0.2: include/c++/4.0.2</para></listitem>
+ <listitem><para>gcc-4.0.3: include/c++/4.0.3</para></listitem>
+ <listitem><para>gcc-4.1.0: include/c++/4.1.0</para></listitem>
+ <listitem><para>gcc-4.1.1: include/c++/4.1.1</para></listitem>
+ <listitem><para>gcc-4.1.2: include/c++/4.1.2</para></listitem>
+ <listitem><para>gcc-4.2.0: include/c++/4.2.0</para></listitem>
+ </itemizedlist>
+ <para></para>
+ </listitem>
+ </orderedlist>
+
+<para>
+ Taken together, these techniques can accurately specify interface
+ and implementation changes in the GNU C++ tools themselves. Used
+ properly, they allow both the GNU C++ tools implementation, and
+ programs using them, an evolving yet controlled development that
+ maintains backward compatibility.
+</para>
+
+
+ </sect3>
+
+ <sect3 id="abi.versioning.prereq" xreflabel="abi.versioning.prereq">
+ <title>Prerequisites</title>
+ <para>
+ Minimum environment that supports a versioned ABI: A supported
+ dynamic linker, a GNU linker of sufficient vintage to understand
+ demangled C++ name globbing (ld), a shared executable compiled
+ with g++, and shared libraries (libgcc_s, libstdc++) compiled by
+ a compiler (g++) with a compatible ABI. Phew.
+ </para>
+
+ <para>
+ On top of all that, an additional constraint: libstdc++ did not
+ attempt to version symbols (or age gracefully, really) until
+ version 3.1.0.
+ </para>
+
+ <para>
+ Most modern Linux and BSD versions, particularly ones using
+ gcc-3.1.x tools and more recent vintages, will meet the
+ requirements above.
+ </para>
+ </sect3>
+
+ <sect3 id="abi.versioning.config" xreflabel="abi.versioning.config">
+ <title>Configuring</title>
+
+ <para>
+ It turns out that most of the configure options that change
+ default behavior will impact the mangled names of exported
+ symbols, and thus impact versioning and compatibility.
+ </para>
+
+ <para>
+ For more information on configure options, including ABI
+ impacts, see:
+ http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
+ </para>
+
+ <para>
+ There is one flag that explicitly deals with symbol versioning:
+ --enable-symvers.
+ </para>
+
+ <para>
+ In particular, libstdc++/acinclude.m4 has a macro called
+ GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument
+ passed in via --enable-symvers=foo). At that point, the macro
+ attempts to make sure that all the requirement for symbol
+ versioning are in place. For more information, please consult
+ acinclude.m4.
+ </para>
+ </sect3>
+
+ <sect3 id="abi.versioning.active" xreflabel="abi.versioning.active">
+ <title>Checking Active</title>
+
+ <para>
+ When the GNU C++ library is being built with symbol versioning
+ on, you should see the following at configure time for
+ libstdc++:
+ </para>
+
+<screen>
+<computeroutput>
+ checking versioning on shared library symbols... gnu
+</computeroutput>
+</screen>
+
+<para>
+ If you don't see this line in the configure output, or if this line
+ appears but the last word is 'no', then you are out of luck.
+</para>
+
+<para>
+ If the compiler is pre-installed, a quick way to test is to compile
+ the following (or any) simple C++ file and link it to the shared
+ libstdc++ library:
+</para>
+
+<programlisting>
+#include &lt;iostream&gt;
+
+int main()
+{ std::cout &lt;&lt; "hello" &lt;&lt; std::endl; return 0; }
+
+%g++ hello.cc -o hello.out
+
+%ldd hello.out
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+
+%nm hello.out
+</programlisting>
+
+<para>
+If you see symbols in the resulting output with "GLIBCXX_3" as part
+of the name, then the executable is versioned. Here's an example:
+</para>
+
+<para>
+ <code>U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4</code>
+</para>
+
+ </sect3>
+</sect2>
+
+<sect2 id="abi.changes_allowed" xreflabel="abi.changes_allowed">
+<title>Allowed Changes</title>
+
+<para>
+The following will cause the library minor version number to
+increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
+</para>
+<orderedlist>
+ <listitem><para>Adding an exported global or static data member</para></listitem>
+ <listitem><para>Adding an exported function, static or non-virtual member function</para></listitem>
+ <listitem><para>Adding an exported symbol or symbols by additional instantiations</para></listitem>
+</orderedlist>
+<para>
+Other allowed changes are possible.
+</para>
+
+</sect2>
+
+<sect2 id="abi.changes_no" xreflabel="abi.changes_no">
+<title>Prohibited Changes</title>
+
+<para>
+The following non-exhaustive list will cause the library major version
+number to increase, say from "libstdc++.so.3.0.4" to
+"libstdc++.so.4.0.0".
+</para>
+
+<orderedlist>
+ <listitem><para>Changes in the gcc/g++ compiler ABI</para></listitem>
+<listitem><para>Changing size of an exported symbol</para></listitem>
+<listitem><para>Changing alignment of an exported symbol</para></listitem>
+<listitem><para>Changing the layout of an exported symbol</para></listitem>
+<listitem><para>Changing mangling on an exported symbol</para></listitem>
+<listitem><para>Deleting an exported symbol</para></listitem>
+<listitem><para>Changing the inheritance properties of a type by adding or removing
+ base classes</para></listitem>
+<listitem><para>
+ Changing the size, alignment, or layout of types
+ specified in the C++ standard. These may not necessarily be
+ instantiated or otherwise exported in the library binary, and
+ include all the required locale facets, as well as things like
+ std::basic_streambuf, et al.
+</para></listitem>
+
+<listitem><para> Adding an explicit copy constructor or destructor to a
+class that would otherwise have implicit versions. This will change
+the way the compiler deals with this class in by-value return
+statements or parameters: instead of being passing instances of this
+class in registers, the compiler will be forced to use memory. See <ulink url="http://www.codesourcery.com/cxx-abi/abi.html#calls"> this part</ulink>
+ of the C++ ABI documentation for further details.
+ </para></listitem>
+
+</orderedlist>
+
+</sect2>
+
+
+
+<sect2 id="abi.impl" xreflabel="abi.impl">
+<title>Implementation</title>
+
+<orderedlist>
+ <listitem>
+ <para>
+ Separation of interface and implementation
+ </para>
+ <para>
+ This is accomplished by two techniques that separate the API from
+ the ABI: forcing undefined references to link against a library
+ binary for definitions.
+ </para>
+
+<variablelist>
+ <varlistentry>
+ <term>Include files have declarations, source files have defines</term>
+
+ <listitem>
+ <para>
+ For non-templatized types, such as much of <code>class
+ locale</code>, the appropriate standard C++ include, say
+ <code>locale</code>, can contain full declarations, while
+ various source files (say <code> locale.cc, locale_init.cc,
+ localename.cc</code>) contain definitions.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Extern template on required types</term>
+
+ <listitem>
+ <para>
+ For parts of the standard that have an explicit list of
+ required instantiations, the GNU extension syntax <code> extern
+ template </code> can be used to control where template
+ definitions reside. By marking required instantiations as
+ <code> extern template </code> in include files, and providing
+ explicit instantiations in the appropriate instantiation files,
+ non-inlined template functions can be versioned. This technique
+ is mostly used on parts of the standard that require <code>
+ char</code> and <code> wchar_t</code> instantiations, and
+ includes <code> basic_string</code>, the locale facets, and the
+ types in <code> iostreams</code>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <para>
+ In addition, these techniques have the additional benefit that they
+ reduce binary size, which can increase runtime performance.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Namespaces linking symbol definitions to export mapfiles
+ </para>
+ <para>
+ All symbols in the shared library binary are processed by a
+ linker script at build time that either allows or disallows
+ external linkage. Because of this, some symbols, regardless of
+ normal C/C++ linkage, are not visible. Symbols that are internal
+ have several appealing characteristics: by not exporting the
+ symbols, there are no relocations when the shared library is
+ started and thus this makes for faster runtime loading
+ performance by the underlying dynamic loading mechanism. In
+ addition, they have the possibility of changing without impacting
+ ABI compatibility.
+ </para>
+
+<para>The following namespaces are transformed by the mapfile:</para>
+
+<variablelist>
+
+ <varlistentry>
+<term><code>namespace std</code></term>
+<listitem><para> Defaults to exporting all symbols in label
+<code>GLIBCXX</code> that do not begin with an underscore, ie
+<code>__test_func</code> would not be exported by default. Select
+exceptional symbols are allowed to be visible.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+<term><code>namespace __gnu_cxx</code></term>
+<listitem><para> Defaults to not exporting any symbols in label
+<code>GLIBCXX</code>, select items are allowed to be visible.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+<term><code>namespace __gnu_internal</code></term>
+<listitem><para> Defaults to not exported, no items are allowed to be visible.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+<term><code>namespace __cxxabiv1</code>, aliased to <code> namespace abi</code></term>
+<listitem><para> Defaults to not exporting any symbols in label
+<code>CXXABI</code>, select items are allowed to be visible.</para></listitem>
+ </varlistentry>
+
+</variablelist>
+<para>
+</para>
+</listitem>
+
+ <listitem><para>Freezing the API</para>
+ <para>Disallowed changes, as above, are not made on a stable release
+branch. Enforcement tends to be less strict with GNU extensions that
+standard includes.</para>
+</listitem>
+</orderedlist>
+
+</sect2>
+
+<sect2 id="abi.testing" xreflabel="abi.testing">
+<title>Testing</title>
+
+ <sect3 id="abi.testing.single" xreflabel="abi.testing.single">
+ <title>Single ABI Testing</title>
+
+ <para>
+ Testing for GNU C++ ABI changes is composed of two distinct
+ areas: testing the C++ compiler (g++) for compiler changes, and
+ testing the C++ library (libstdc++) for library changes.
+ </para>
+
+ <para>
+ Testing the C++ compiler ABI can be done various ways.
+ </para>
+
+ <para>
+ One. Intel ABI checker. More information can be obtained <ulink
+ url="http://developer.intel.com/software/products/opensource/">here.</ulink>
+ </para>
+
+<para>
+Two.
+The second is yet unreleased, but has been announced on the gcc
+mailing list. It is yet unspecified if these tools will be freely
+available, and able to be included in a GNU project. Please contact
+Mark Mitchell (mark@codesourcery.com) for more details, and current
+status.
+</para>
+
+<para>
+Three.
+Involves using the vlad.consistency test framework. This has also been
+discussed on the gcc mailing lists.
+</para>
+
+<para>
+Testing the C++ library ABI can also be done various ways.
+</para>
+
+<para>
+One.
+(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
+one with a new compiler and an old library, and the other with an old
+compiler and a new library, and look for testsuite regressions)
+</para>
+
+<para>
+Details on how to set this kind of test up can be found here:
+http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
+</para>
+
+<para>
+Two.
+Use the 'make check-abi' rule in the libstdc++ Makefile.
+</para>
+
+<para>
+This is a proactive check the library ABI. Currently, exported symbol
+names that are either weak or defined are checked against a last known
+good baseline. Currently, this baseline is keyed off of 3.4.0
+binaries, as this was the last time the .so number was incremented. In
+addition, all exported names are demangled, and the exported objects
+are checked to make sure they are the same size as the same object in
+the baseline.
+
+Notice that each baseline is relative to a <emphasis>default</emphasis>
+configured library and compiler: in particular, if options such as
+--enable-clocale, or --with-cpu, in case of multilibs, are used at
+configure time, the check may fail, either because of substantive
+differences or because of limitations of the current checking
+machinery.
+</para>
+
+<para>
+This dataset is insufficient, yet a start. Also needed is a
+comprehensive check for all user-visible types part of the standard
+library for sizeof() and alignof() changes.
+</para>
+
+<para>
+Verifying compatible layouts of objects is not even attempted. It
+should be possible to use sizeof, alignof, and offsetof to compute
+offsets for each structure and type in the standard library, saving to
+another datafile. Then, compute this in a similar way for new
+binaries, and look for differences.
+</para>
+
+<para>
+Another approach might be to use the -fdump-class-hierarchy flag to
+get information. However, currently this approach gives insufficient
+data for use in library testing, as class data members, their offsets,
+and other detailed data is not displayed with this flag.
+(See g++/7470 on how this was used to find bugs.)
+</para>
+
+<para>
+Perhaps there are other C++ ABI checkers. If so, please notify
+us. We'd like to know about them!
+</para>
+
+ </sect3>
+ <sect3 id="abi.testing.multi" xreflabel="abi.testing.multi">
+ <title>Multiple ABI Testing</title>
+<para>
+A "C" application, dynamically linked to two shared libraries, liba,
+libb. The dependent library liba is C++ shared library compiled with
+gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library
+libb is a C++ shared library compiled with gcc-3.4.x, and also uses io,
+exceptions, locale, etc.
+</para>
+
+<para> As above, libone is constructed as follows: </para>
+<programlisting>
+%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
+
+%ln -s libone.so.1.0.0 libone.so
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
+
+%ar cru libone.a a.o
+</programlisting>
+
+<para> And, libtwo is constructed as follows: </para>
+
+<programlisting>
+%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
+
+%ln -s libtwo.so.1.0.0 libtwo.so
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
+
+%ar cru libtwo.a b.o
+</programlisting>
+
+<para> ...with the resulting libraries looking like </para>
+
+<screen>
+<computeroutput>
+%ldd libone.so.1.0.0
+ libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40016000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400fa000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40125000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+
+%ldd libtwo.so.1.0.0
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x40027000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400e1000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x4010c000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+</computeroutput>
+</screen>
+
+<para>
+ Then, the "C" compiler is used to compile a source file that uses
+ functions from each library.
+</para>
+<programlisting>
+gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
+</programlisting>
+
+<para>
+ Which gives the expected:
+</para>
+
+<screen>
+<computeroutput>
+%ldd a.out
+ libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
+ libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40015000)
+ libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
+ libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
+ libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
+ /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
+</computeroutput>
+</screen>
+
+<para>
+ This resulting binary, when executed, will be able to safely use
+ code from both liba, and the dependent libstdc++.so.6, and libb,
+ with the dependent libstdc++.so.5.
+</para>
+ </sect3>
+</sect2>
+
+<sect2 id="abi.issues" xreflabel="abi.issues">
+<title>Outstanding Issues</title>
+
+<para>
+ Some features in the C++ language make versioning especially
+ difficult. In particular, compiler generated constructs such as
+ implicit instantiations for templates, typeinfo information, and
+ virtual tables all may cause ABI leakage across shared library
+ boundaries. Because of this, mixing C++ ABI's is not recommended at
+ this time.
+</para>
+
+<para>
+ For more background on this issue, see these bugzilla entries:
+</para>
+
+<para>
+<ulink url="http://gcc.gnu.org/PR24660">24660: versioning weak symbols in libstdc++</ulink>
+</para>
+
+<para>
+<ulink url="http://gcc.gnu.org/PR19664">19664: libstdc++ headers should have pop/push of the visibility around the declarations</ulink>
+</para>
+
+</sect2>
+
+<bibliography id="abi.biblio" xreflabel="abi.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ ABIcheck, a vague idea of checking ABI compatibility
+ </title>
+
+ <biblioid>
+ <ulink url="http://abicheck.sourceforge.net/">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ C++ ABI Reference
+ </title>
+
+ <biblioid>
+ <ulink url="http://www.codesourcery.com/cxx-abi">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Intel® Compilers for Linux* -Compatibility with the GNU Compilers
+ </title>
+
+ <biblioid>
+ <ulink url="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Intel® Compilers for Linux* -Compatibility with the GNU Compilers
+ </title>
+
+ <biblioid>
+ <ulink url="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
+ </title>
+
+ <biblioid>
+ <ulink url="http://docs.sun.com/?p=/doc/816-1386&amp;a=load">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>
+ Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
+ </title>
+
+ <biblioid>
+ <ulink url="http://docs.sun.com/db/prod/solaris.9">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ELF Symbol Versioning
+ </title>
+
+ <author>
+ <firstname>Ulrich</firstname>
+ <surname>Drepper</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://people.redhat.com/drepper/symbol-versioning">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ C++ ABI for the ARM Architecture
+ </title>
+
+ <biblioid>
+ <ulink url="http://www.arm.com/miscPDFs/8033.pdf">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Dynamic Shared Objects: Survey and Issues
+ </title>
+ <subtitle>
+ ISO C++ J16/06-0046
+ </subtitle>
+
+ <author>
+ <firstname>Benjamin</firstname>
+ <surname>Kosnik</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Versioning With Namespaces
+ </title>
+ <subtitle>
+ ISO C++ J16/06-0083
+ </subtitle>
+
+ <author>
+ <firstname>Benjamin</firstname>
+ <surname>Kosnik</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/algorithms.xml b/libstdc++-v3/doc/xml/manual/algorithms.xml
new file mode 100644
index 00000000000..6f1a16af24f
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/algorithms.xml
@@ -0,0 +1,104 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.algorithms" xreflabel="Algorithms">
+<?dbhtml filename="algorithms.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ <keyword>
+ algorithm
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Algorithms</title>
+
+<preface>
+ <title></title>
+<para>
+ The neatest accomplishment of the algorithms chapter is that all the
+ work is done via iterators, not containers directly. This means two
+ important things:
+</para>
+<orderedlist>
+ <listitem>
+ <para>
+ Anything that behaves like an iterator can be used in one of
+ these algorithms. Raw pointers make great candidates, thus
+ built-in arrays are fine containers, as well as your own iterators.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The algorithms do not (and cannot) affect the container as a
+ whole; only the things between the two iterator endpoints. If
+ you pass a range of iterators only enclosing the middle third of
+ a container, then anything outside that range is inviolate.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ Even strings can be fed through the algorithms here, although the
+ string class has specialized versions of many of these functions
+ (for example, <code>string::find()</code>). Most of the examples
+ on this page will use simple arrays of integers as a playground
+ for algorithms, just to keep things simple. The use of
+ <emphasis>N</emphasis> as a size in the examples is to keep
+ things easy to read but probably won't be valid code. You can
+ use wrappers such as those described in the <ulink
+ url="../23_containers/howto.html">containers chapter</ulink> to
+ keep real code readable.
+ </para>
+ <para>
+ The single thing that trips people up the most is the definition
+ of <emphasis>range</emphasis> used with iterators; the famous
+ &quot;past-the-end&quot; rule that everybody loves to hate. The
+ <ulink url="../24_iterators/howto.html#2">iterators
+ chapter</ulink> of this document has a complete explanation of
+ this simple rule that seems to cause so much confusion. Once you
+ get <emphasis>range</emphasis> into your head (it's not that
+ hard, honest!), then the algorithms are a cakewalk.
+ </para>
+</preface>
+
+<!-- Chapter 01 : Non Modifying -->
+
+<!-- Chapter 02 : Mutating -->
+<chapter id="manual.algorithms.mutating" xreflabel="Mutating">
+ <title>Mutating</title>
+
+ <sect1 id="algorithms.mutating.swap" xreflabel="swap">
+ <title><function>swap</function></title>
+
+ <sect2 id="algorithms.swap.specializations" xreflabel="Specializations">
+ <title>Specializations</title>
+
+ <para>If you call <code> std::swap(x,y); </code> where x and y are standard
+ containers, then the call will automatically be replaced by a call to
+ <code> x.swap(y); </code> instead.
+ </para>
+ <para>This allows member functions of each container class to take over, and
+ containers' swap functions should have O(1) complexity according to
+ the standard. (And while &quot;should&quot; allows implementations to
+ behave otherwise and remain compliant, this implementation does in
+ fact use constant-time swaps.) This should not be surprising, since
+ for two containers of the same type to swap contents, only some
+ internal pointers to storage need to be exchanged.
+ </para>
+
+ </sect2>
+ </sect1>
+</chapter>
+
+<!-- Chapter 03 : Sorting -->
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/allocator.xml b/libstdc++-v3/doc/xml/manual/allocator.xml
new file mode 100644
index 00000000000..213d82b7e59
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/allocator.xml
@@ -0,0 +1,659 @@
+<sect1 id="manual.util.memory.allocator" xreflabel="Allocator">
+<?dbhtml filename="allocator.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ allocator
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Allocators</title>
+
+<para>
+ Memory management for Standard Library entities is encapsulated in a
+ class template called <classname>allocator</classname>. The
+ <classname>allocator</classname> abstraction is used throughout the
+ library in <classname>string</classname>, container classes,
+ algorithnms, and parts of iostreams. This class, and base classes of
+ it, are the superset of available free store (<quote>heap</quote>)
+ management classes.
+</para>
+
+<sect2 id="allocator.req" xreflabel="allocator.req">
+<title>Requirements</title>
+
+ <para>
+ The C++ standard only gives a few directives in this area:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ When you add elements to a container, and the container must
+ allocate more memory to hold them, the container makes the
+ request via its <type>Allocator</type> template
+ parameter, which is usually aliased to
+ <type>allocator_type</type>. This includes adding chars
+ to the string class, which acts as a regular STL container in
+ this respect.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The default <type>Allocator</type> argument of every
+ container-of-T is <classname>allocator&lt;T&gt;</classname>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The interface of the <classname>allocator&lt;T&gt;</classname> class is
+ extremely simple. It has about 20 public declarations (nested
+ typedefs, member functions, etc), but the two which concern us most
+ are:
+ </para>
+ <programlisting>
+ T* allocate (size_type n, const void* hint = 0);
+ void deallocate (T* p, size_type n);
+ </programlisting>
+
+ <para>
+ The <varname>n</varname> arguments in both those
+ functions is a <emphasis>count</emphasis> of the number of
+ <type>T</type>'s to allocate space for, <emphasis>not their
+ total size</emphasis>.
+ (This is a simplification; the real signatures use nested typedefs.)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The storage is obtained by calling <function>::operator
+ new</function>, but it is unspecified when or how
+ often this function is called. The use of the
+ <varname>hint</varname> is unspecified, but intended as an
+ aid to locality if an implementation so
+ desires. <constant>[20.4.1.1]/6</constant>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Complete details cam be found in the C++ standard, look in
+ <constant>[20.4 Memory]</constant>.
+ </para>
+
+</sect2>
+
+<sect2 id="allocator.design_issues" xreflabel="allocator.design_issues">
+<title>Design Issues</title>
+
+ <para>
+ The easiest way of fulfilling the requirements is to call
+ <function>operator new</function> each time a container needs
+ memory, and to call <function>operator delete</function> each time
+ the container releases memory. This method may be <ulink
+ url="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html">slower</ulink>
+ than caching the allocations and re-using previously-allocated
+ memory, but has the advantage of working correctly across a wide
+ variety of hardware and operating systems, including large
+ clusters. The <classname>__gnu_cxx::new_allocator</classname>
+ implements the simple operator new and operator delete semantics,
+ while <classname>__gnu_cxx::malloc_allocator</classname>
+ implements much the same thing, only with the C language functions
+ <function>std::malloc</function> and <function>free</function>.
+ </para>
+
+ <para>
+ Another approach is to use intelligence within the allocator
+ class to cache allocations. This extra machinery can take a variety
+ of forms: a bitmap index, an index into an exponentially increasing
+ power-of-two-sized buckets, or simpler fixed-size pooling cache.
+ The cache is shared among all the containers in the program: when
+ your program's <classname>std::vector&lt;int&gt;</classname> gets
+ cut in half and frees a bunch of its storage, that memory can be
+ reused by the private
+ <classname>std::list&lt;WonkyWidget&gt;</classname> brought in from
+ a KDE library that you linked against. And operators
+ <function>new</function> and <function>delete</function> are not
+ always called to pass the memory on, either, which is a speed
+ bonus. Examples of allocators that use these techniques are
+ <classname>__gnu_cxx::bitmap_allocator</classname>,
+ <classname>__gnu_cxx::pool_allocator</classname>, and
+ <classname>__gnu_cxx::__mt_alloc</classname>.
+ </para>
+
+ <para>
+ Depending on the implementation techniques used, the underlying
+ operating system, and compilation environment, scaling caching
+ allocators can be tricky. In particular, order-of-destruction and
+ order-of-creation for memory pools may be difficult to pin down
+ with certainty, which may create problems when used with plugins
+ or loading and unloading shared objects in memory. As such, using
+ caching allocators on systems that do not support
+ <function>abi::__cxa_atexit</function> is not recommended.
+ </para>
+
+</sect2>
+
+<sect2 id="allocator.impl" xreflabel="allocator.impl">
+<title>Implementation</title>
+
+ <sect3>
+ <title>Interface Design</title>
+
+ <para>
+ 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
+ been modified to support this change.
+ </para>
+
+ <para>
+ The class <classname>allocator</classname> just has typedef,
+ constructor, and rebind members. It inherits from one of the
+ high-speed extension allocators, covered below. Thus, all
+ allocation and deallocation depends on the base class.
+ </para>
+
+ <para>
+ The base class that <classname>allocator</classname> is derived from
+ may not be user-configurable.
+</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Selecting Default Allocation Policy</title>
+
+ <para>
+ 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
+ for speed.
+ </para>
+
+ <para>
+ Three synthetic benchmarks have been created that provide data
+ that is used to compare different C++ allocators. These tests are:
+ </para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ Insertion.
+ </para>
+ <para>
+ Over multiple iterations, various STL container
+ objects have elements inserted to some maximum amount. A variety
+ of allocators are tested.
+ Test source for <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</ulink>
+ and <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</ulink>
+ containers.
+ </para>
+
+ </listitem>
+
+ <listitem>
+ <para>
+ Insertion and erasure in a multi-threaded environment.
+ </para>
+ <para>
+ This test shows the ability of the allocator to reclaim memory
+ on a pre-thread basis, as well as measuring thread contention
+ for memory resources.
+ Test source
+ <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</ulink>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ A threaded producer/consumer model.
+ </para>
+ <para>
+ Test source for
+ <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</ulink>
+ and
+ <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</ulink>
+ containers.
+ </para>
+ </listitem>
+ </orderedlist>
+
+ <para>
+ The current default choice for
+ <classname>allocator</classname> is
+ <classname>__gnu_cxx::new_allocator</classname>.
+ </para>
+
+ </sect3>
+
+ <sect3>
+ <title>Disabling Memory Caching</title>
+
+ <para>
+ In use, <classname>allocator</classname> may allocate and
+ deallocate using implementation-specified strategies and
+ heuristics. Because of this, every call to an allocator object's
+ <function>allocate</function> member function may not actually
+ call the global operator new. This situation is also duplicated
+ for calls to the <function>deallocate</function> member
+ function.
+ </para>
+
+ <para>
+ This can be confusing.
+ </para>
+
+ <para>
+ In particular, this can make debugging memory errors more
+ difficult, especially when using third party tools like valgrind or
+ debug versions of <function>new</function>.
+ </para>
+
+ <para>
+ There are various ways to solve this problem. One would be to use
+ a custom allocator that just called operators
+ <function>new</function> and <function>delete</function>
+ directly, for every allocation. (See
+ <filename>include/ext/new_allocator.h</filename>, for instance.)
+ However, that option would involve changing source code to use
+ the a non-default allocator. Another option is to force the
+ default allocator to remove caching and pools, and to directly
+ allocate with every call of <function>allocate</function> and
+ directly deallocate with every call of
+ <function>deallocate</function>, regardless of efficiency. As it
+ turns out, this last option is also available.
+ </para>
+
+
+ <para>
+ To globally disable memory caching within the library for the
+ default allocator, merely set
+ <constant>GLIBCXX_FORCE_NEW</constant> (with any value) in the
+ system's environment before running the program. If your program
+ crashes with <constant>GLIBCXX_FORCE_NEW</constant> in the
+ environment, it likely means that you linked against objects
+ built against the older library (objects which might still using the
+ cached allocations...).
+ </para>
+
+ </sect3>
+
+</sect2>
+
+<sect2 id="allocator.using" xreflabel="allocator.using">
+<title>Using a Specific Allocator</title>
+
+ <para>
+ You can specify different memory management schemes on a
+ per-container basis, by overriding the default
+ <type>Allocator</type> template parameter. For example, an easy
+ (but non-portable) method of specifying that only <function>malloc</function> or <function>free</function>
+ should be used instead of the default node allocator is:
+ </para>
+ <programlisting>
+ std::list &lt;int, __gnu_cxx::malloc_allocator&lt;int&gt; &gt; malloc_list;</programlisting>
+ <para>
+ Likewise, a debugging form of whichever allocator is currently in use:
+ </para>
+ <programlisting>
+ std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque;
+ </programlisting>
+</sect2>
+
+<sect2 id="allocator.custom" xreflabel="allocator.custom">
+<title>Custom Allocators</title>
+
+ <para>
+ Writing a portable C++ allocator would dictate that the interface
+ would look much like the one specified for
+ <classname>allocator</classname>. Additional member functions, but
+ not subtractions, would be permissible.
+ </para>
+
+ <para>
+ Probably the best place to start would be to copy one of the
+ extension allocators: say a simple one like
+ <classname>new_allocator</classname>.
+ </para>
+
+</sect2>
+
+<sect2 id="allocator.ext" xreflabel="allocator.ext">
+<title>Extension Allocators</title>
+
+ <para>
+ Several other allocators are provided as part of this
+ implementation. The location of the extension allocators and their
+ names have changed, but in all cases, functionality is
+ equivalent. Starting with gcc-3.4, all extension allocators are
+ standard style. Before this point, SGI style was the norm. Because of
+ this, the number of template arguments also changed. Here's a simple
+ chart to track the changes.
+ </para>
+
+ <para>
+ More details on each of these extension allocators follows.
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ <classname>new_allocator</classname>
+ </para>
+ <para>
+ Simply wraps <function>::operator new</function>
+ and <function>::operator delete</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <classname>malloc_allocator</classname>
+ </para>
+ <para>
+ Simply wraps <function>malloc</function> and
+ <function>free</function>. There is also a hook for an
+ out-of-memory handler (for
+ <function>new</function>/<function>delete</function> this is
+ taken care of elsewhere).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <classname>array_allocator</classname>
+ </para>
+ <para>
+ Allows allocations of known and fixed sizes using existing
+ global or external storage allocated via construction of
+ <classname>std::tr1::array</classname> objects. By using this
+ allocator, fixed size containers (including
+ <classname>std::string</classname>) can be used without
+ instances calling <function>::operator new</function> and
+ <function>::operator delete</function>. This capability
+ allows the use of STL abstractions without runtime
+ complications or overhead, even in situations such as program
+ startup. For usage examples, please consult the testsuite.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <classname>debug_allocator</classname>
+ </para>
+ <para>
+ A wrapper around an arbitrary allocator A. It passes on
+ slightly increased size requests to A, and uses the extra
+ memory to store size information. When a pointer is passed
+ to <function>deallocate()</function>, the stored size is
+ checked, and <function>assert()</function> is used to
+ guarantee they match.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <classname>throw_allocator</classname>
+ </para>
+ <para>
+ Includes memory tracking and marking abilities as well as hooks for
+ throwing exceptinos at configurable intervals (including random,
+ all, none).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <classname>__pool_alloc</classname>
+ </para>
+ <para>
+ A high-performance, single pool allocator. The reusable
+ memory is shared among identical instantiations of this type.
+ It calls through <function>::operator new</function> to
+ obtain new memory when its lists run out. If a client
+ container requests a block larger than a certain threshold
+ size, then the pool is bypassed, and the allocate/deallocate
+ request is passed to <function>::operator new</function>
+ directly.
+ </para>
+
+ <para>
+ Older versions of this class take a boolean template
+ parameter, called <varname>thr</varname>, and an integer template
+ parameter, called <varname>inst</varname>.
+ </para>
+
+ <para>
+ The <varname>inst</varname> number is used to track additional memory
+ pools. The point of the number is to allow multiple
+ instantiations of the classes without changing the semantics at
+ all. All three of
+ </para>
+
+ <programlisting>
+ typedef __pool_alloc&lt;true,0&gt; normal;
+ typedef __pool_alloc&lt;true,1&gt; private;
+ typedef __pool_alloc&lt;true,42&gt; also_private;
+ </programlisting>
+ <para>
+ behave exactly the same way. However, the memory pool for each type
+ (and remember that different instantiations result in different types)
+ remains separate.
+ </para>
+ <para>
+ The library uses <emphasis>0</emphasis> in all its instantiations. If you
+ wish to keep separate free lists for a particular purpose, use a
+ different number.
+ </para>
+ <para>The <varname>thr</varname> boolean determines whether the
+ pool should be manipulated atomically or not. When
+ <varname>thr</varname> = <constant>true</constant>, the allocator
+ is is threadsafe, while <varname>thr</varname> =
+ <constant>false</constant>, and is slightly faster but unsafe for
+ multiple threads.
+ </para>
+
+ <para>
+ For thread-enabled configurations, the pool is locked with a
+ single big lock. In some situations, this implementation detail
+ may result in severe performance degredation.
+ </para>
+
+ <para>
+ (Note that the GCC thread abstraction layer allows us to provide
+ safe zero-overhead stubs for the threading routines, if threads
+ were disabled at configuration time.)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <classname>__mt_alloc</classname>
+ </para>
+ <para>
+ A high-performance fixed-size allocator with
+ exponentially-increasing allocations. It has its own
+ documentation, found <ulink
+ url="../ext/mt_allocator.html">here</ulink>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <classname>bitmap_allocator</classname>
+ </para>
+ <para>
+ 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 <ulink
+ url="../ext/ballocator_doc.html">here</ulink>.
+ </para>
+ </listitem>
+ </orderedlist>
+</sect2>
+
+
+<bibliography id="allocator.biblio" xreflabel="allocator.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 14882:1998 Programming languages - C++
+ </title>
+
+ <abbrev>
+ isoc++_1998
+ </abbrev>
+ <pagenums>20.4 Memory</pagenums>
+ </biblioentry>
+
+ <biblioentry>
+ <title>The Standard Librarian: What Are Allocators Good
+ </title>
+
+ <abbrev>
+ austernm
+ </abbrev>
+
+ <author>
+ <firstname>Matt</firstname>
+ <surname>Austern</surname>
+ </author>
+
+ <publisher>
+ <publishername>
+ C/C++ Users Journal
+ </publishername>
+ </publisher>
+
+ <biblioid>
+ <ulink url="http://www.cuj.com/documents/s=8000/cujcexp1812austern/">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>The Hoard Memory Allocator</title>
+
+ <abbrev>
+ emeryb
+ </abbrev>
+
+ <author>
+ <firstname>Emery</firstname>
+ <surname>Berger</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://www.cs.umass.edu/~emery/hoard/">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>Reconsidering Custom Memory Allocation</title>
+
+ <abbrev>
+ bergerzorn
+ </abbrev>
+
+ <author>
+ <firstname>Emery</firstname>
+ <surname>Berger</surname>
+ </author>
+ <author>
+ <firstname>Ben</firstname>
+ <surname>Zorn</surname>
+ </author>
+ <author>
+ <firstname>Kathryn</firstname>
+ <surname>McKinley</surname>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+ <holder>OOPSLA</holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>Allocator Types</title>
+
+ <abbrev>
+ kreftlanger
+ </abbrev>
+
+ <author>
+ <firstname>Klaus</firstname>
+ <surname>Kreft</surname>
+ </author>
+ <author>
+ <firstname>Angelika</firstname>
+ <surname>Langer</surname>
+ </author>
+
+ <publisher>
+ <publishername>
+ C/C++ Users Journal
+ </publishername>
+ </publisher>
+
+ <biblioid>
+ <ulink url="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>The C++ Programming Language</title>
+
+ <abbrev>
+ tcpl
+ </abbrev>
+
+ <author>
+ <firstname>Bjarne</firstname>
+ <surname>Stroustrup</surname>
+ </author>
+ <copyright>
+ <year>2000</year>
+ <holder></holder>
+ </copyright>
+ <pagenums>19.4 Allocators</pagenums>
+
+ <publisher>
+ <publishername>
+ Addison Wesley
+ </publishername>
+ </publisher>
+ </biblioentry>
+
+ <biblioentry>
+ <title>Yalloc: A Recycling C++ Allocator</title>
+
+ <abbrev>
+ yenf
+ </abbrev>
+
+ <author>
+ <firstname>Felix</firstname>
+ <surname>Yen</surname>
+ </author>
+ <copyright>
+ <year></year>
+ <holder></holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://home.earthlink.net/~brimar/yalloc/">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+</bibliography>
+
+</sect1>
diff --git a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
new file mode 100644
index 00000000000..543296a8d5d
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
@@ -0,0 +1,2146 @@
+<?xml version='1.0'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<appendix id="appendix.contrib" xreflabel="Contributing">
+<?dbhtml filename="appendix_contributing.html"?>
+
+<appendixinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</appendixinfo>
+
+<title>Contributing</title>
+
+<para>
+ The GNU C++ Library follows an open development model. Active
+ contributors are assigned maintainer-ship responsibility, and given
+ write access to the source repository. First time contributors
+ should follow this procedure:
+</para>
+
+<sect1 id="contrib.list" xreflabel="Contributor Checklist">
+ <title>Contributor Checklist</title>
+
+ <sect2 id="list.reading" xreflabel="list.reading">
+ <title>Reading</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Get and read the relevant sections of the C++ language
+ specification. Copies of the full ISO 14882 standard are
+ available on line via the ISO mirror site for committee
+ members. Non-members, or those who have not paid for the
+ privilege of sitting on the committee and sustained their
+ two meeting commitment for voting rights, may get a copy of
+ the standard from their respective national standards
+ organization. In the USA, this national standards
+ organization is ANSI and their web-site is right
+ <ulink url="http://www.ansi.org">here.</ulink>
+ (And if you've already registered with them, clicking this link will take you to directly to the place where you can
+ <ulink url="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003">buy the standard on-line.)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The library working group bugs, and known defects, can
+ be obtained here:
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21 </ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The newsgroup dedicated to standardization issues is
+ comp.std.c++: this FAQ for this group is quite useful and
+ can be
+ found <ulink url="http://www.jamesd.demon.co.uk/csc/faq.html">
+ here </ulink>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Peruse
+ the <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU
+ Coding Standards</ulink>, and chuckle when you hit the part
+ about <quote>Using Languages Other Than C</quote>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Be familiar with the extensions that preceded these
+ general GNU rules. These style issues for libstdc++ can be
+ found <link linkend="contrib.coding_style">here</link>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ And last but certainly not least, read the
+ library-specific information
+ found <link linkend="appendix.porting"> here</link>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+ <sect2 id="list.copyright" xreflabel="list.copyright">
+ <title>Assignment</title>
+ <para>
+ Small changes can be accepted without a copyright assignment form on
+ file. New code and additions to the library need completed copyright
+ assignment form on file at the FSF. Note: your employer may be required
+ to fill out appropriate disclaimer forms as well.
+ </para>
+
+ <para>
+ Historically, the libstdc++ assignment form added the following
+ question:
+ </para>
+
+ <para>
+ <quote>
+ Which Belgian comic book character is better, Tintin or Asterix, and
+ why?
+ </quote>
+ </para>
+
+ <para>
+ While not strictly necessary, humoring the maintainers and answering
+ this question would be appreciated.
+ </para>
+
+ <para>
+ For more information about getting a copyright assignment, please see
+ <ulink url="http://www.gnu.org/prep/maintain/html_node/Legal-Matters.html">Legal
+ Matters</ulink>.
+ </para>
+
+ <para>
+ Please contact Benjamin Kosnik at
+ <email>bkoz+assign@redhat.com</email> if you are confused
+ about the assignment or have general licensing questions. When
+ requesting an assignment form from
+ <email>mailto:assign@gnu.org</email>, please cc the libstdc++
+ maintainer above so that progress can be monitored.
+ </para>
+ </sect2>
+
+ <sect2 id="list.getting" xreflabel="list.getting">
+ <title>Getting Sources</title>
+ <para>
+ <ulink url="http://gcc.gnu.org/svnwrite.html">Getting write access
+ (look for &quot;Write after approval&quot;)</ulink>
+ </para>
+ </sect2>
+
+ <sect2 id="list.patches" xreflabel="list.patches">
+ <title>Submitting Patches</title>
+
+ <para>
+ Every patch must have several pieces of information before it can be
+ properly evaluated. Ideally (and to ensure the fastest possible
+ response from the maintainers) it would have all of these pieces:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ A description of the bug and how your patch fixes this
+ bug. For new features a description of the feature and your
+ implementation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ A ChangeLog entry as plain text; see the various
+ ChangeLog files for format and content. If using you are
+ using emacs as your editor, simply position the insertion
+ point at the beginning of your change and hit CX-4a to bring
+ up the appropriate ChangeLog entry. See--magic! Similar
+ functionality also exists for vi.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ A testsuite submission or sample program that will
+ easily and simply show the existing error or test new
+ functionality.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The patch itself. If you are accessing the SVN
+ repository use <command>svn update; svn diff NEW</command>;
+ else, use <command>diff -cp OLD NEW</command> ... If your
+ version of diff does not support these options, then get the
+ latest version of GNU
+ diff. The <ulink url="http://gcc.gnu.org/wiki/SvnTricks">SVN
+ Tricks</ulink> wiki page has information on customising the
+ output of <code>svn diff</code>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ When you have all these pieces, bundle them up in a
+ mail message and send it to libstdc++@gcc.gnu.org. All
+ patches and related discussion should be sent to the
+ libstdc++ mailing list.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+
+</sect1>
+
+<sect1 id="contrib.organization" xreflabel="Source Organization">
+ <title>Directory Layout and Source Conventions</title>
+
+ <para>
+ The unpacked source directory of libstdc++ contains the files
+ needed to create the GNU C++ Library.
+ </para>
+
+ <literallayout>
+It has subdirectories:
+
+ doc
+ Files in HTML and text format that document usage, quirks of the
+ implementation, and contributor checklists.
+
+ include
+ All header files for the C++ library are within this directory,
+ modulo specific runtime-related files that are in the libsupc++
+ directory.
+
+ include/std
+ Files meant to be found by #include &lt;name&gt; directives in
+ standard-conforming user programs.
+
+ include/c
+ Headers intended to directly include standard C headers.
+ [NB: this can be enabled via --enable-cheaders=c]
+
+ include/c_global
+ Headers intended to include standard C headers in
+ the global namespace, and put select names into the std::
+ namespace. [NB: this is the default, and is the same as
+ --enable-cheaders=c_global]
+
+ include/c_std
+ Headers intended to include standard C headers
+ already in namespace std, and put select names into the std::
+ namespace. [NB: this is the same as --enable-cheaders=c_std]
+
+ include/bits
+ Files included by standard headers and by other files in
+ the bits directory.
+
+ include/backward
+ Headers provided for backward compatibility, such as &lt;iostream.h&gt;.
+ They are not used in this library.
+
+ include/ext
+ Headers that define extensions to the standard library. No
+ standard header refers to any of them.
+
+ scripts
+ Scripts that are used during the configure, build, make, or test
+ process.
+
+ src
+ Files that are used in constructing the library, but are not
+ installed.
+
+ testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]
+ Test programs are here, and may be used to begin to exercise the
+ library. Support for "make check" and "make check-install" is
+ complete, and runs through all the subdirectories here when this
+ command is issued from the build directory. Please note that
+ "make check" requires DejaGNU 1.4 or later to be installed. Please
+ note that "make check-script" calls the script mkcheck, which
+ requires bash, and which may need the paths to bash adjusted to
+ work properly, as /bin/bash is assumed.
+
+Other subdirectories contain variant versions of certain files
+that are meant to be copied or linked by the configure script.
+Currently these are:
+
+ config/abi
+ config/cpu
+ config/io
+ config/locale
+ config/os
+
+In addition, two subdirectories are convenience libraries:
+
+ libmath
+ Support routines needed for C++ math. Only needed if the
+ underlying "C" implementation is non-existent, in particular
+ required or optimal long double, long long, and C99 functionality.
+
+ libsupc++
+ Contains the runtime library for C++, including exception
+ handling and memory allocation and deallocation, RTTI, terminate
+ handlers, etc.
+
+Note that glibc also has a bits/ subdirectory. We will either
+need to be careful not to collide with names in its bits/
+directory; or rename bits to (e.g.) cppbits/.
+
+In files throughout the system, lines marked with an "XXX" indicate
+a bug or incompletely-implemented feature. Lines marked "XXX MT"
+indicate a place that may require attention for multi-thread safety.
+ </literallayout>
+
+</sect1>
+
+<sect1 id="contrib.coding_style" xreflabel="Coding Style">
+ <title>Coding Style</title>
+ <para>
+ </para>
+ <sect2 id="coding_style.bad_identifiers" xreflabel="coding_style.bad">
+ <title>Bad Itentifiers</title>
+ <para>
+ Identifiers that conflict and should be avoided.
+ </para>
+
+ <literallayout>
+ This is the list of names <quote>reserved to the
+ implementation</quote> that have been claimed by certain
+ compilers and system headers of interest, and should not be used
+ in the library. It will grow, of course. We generally are
+ interested in names that are not all-caps, except for those like
+ "_T"
+
+ For Solaris:
+ _B
+ _C
+ _L
+ _N
+ _P
+ _S
+ _U
+ _X
+ _E1
+ ..
+ _E24
+
+ Irix adds:
+ _A
+ _G
+
+ MS adds:
+ _T
+
+ BSD adds:
+ __used
+ __unused
+ __inline
+ _Complex
+ __istype
+ __maskrune
+ __tolower
+ __toupper
+ __wchar_t
+ __wint_t
+ _res
+ _res_ext
+ __tg_*
+
+ For GCC:
+
+ [Note that this list is out of date. It applies to the old
+ name-mangling; in G++ 3.0 and higher a different name-mangling is
+ used. In addition, many of the bugs relating to G++ interpreting
+ these names as operators have been fixed.]
+
+ The full set of __* identifiers (combined from gcc/cp/lex.c and
+ gcc/cplus-dem.c) that are either old or new, but are definitely
+ recognized by the demangler, is:
+
+ __aa
+ __aad
+ __ad
+ __addr
+ __adv
+ __aer
+ __als
+ __alshift
+ __amd
+ __ami
+ __aml
+ __amu
+ __aor
+ __apl
+ __array
+ __ars
+ __arshift
+ __as
+ __bit_and
+ __bit_ior
+ __bit_not
+ __bit_xor
+ __call
+ __cl
+ __cm
+ __cn
+ __co
+ __component
+ __compound
+ __cond
+ __convert
+ __delete
+ __dl
+ __dv
+ __eq
+ __er
+ __ge
+ __gt
+ __indirect
+ __le
+ __ls
+ __lt
+ __max
+ __md
+ __method_call
+ __mi
+ __min
+ __minus
+ __ml
+ __mm
+ __mn
+ __mult
+ __mx
+ __ne
+ __negate
+ __new
+ __nop
+ __nt
+ __nw
+ __oo
+ __op
+ __or
+ __pl
+ __plus
+ __postdecrement
+ __postincrement
+ __pp
+ __pt
+ __rf
+ __rm
+ __rs
+ __sz
+ __trunc_div
+ __trunc_mod
+ __truth_andif
+ __truth_not
+ __truth_orif
+ __vc
+ __vd
+ __vn
+
+ SGI badnames:
+ __builtin_alloca
+ __builtin_fsqrt
+ __builtin_sqrt
+ __builtin_fabs
+ __builtin_dabs
+ __builtin_cast_f2i
+ __builtin_cast_i2f
+ __builtin_cast_d2ll
+ __builtin_cast_ll2d
+ __builtin_copy_dhi2i
+ __builtin_copy_i2dhi
+ __builtin_copy_dlo2i
+ __builtin_copy_i2dlo
+ __add_and_fetch
+ __sub_and_fetch
+ __or_and_fetch
+ __xor_and_fetch
+ __and_and_fetch
+ __nand_and_fetch
+ __mpy_and_fetch
+ __min_and_fetch
+ __max_and_fetch
+ __fetch_and_add
+ __fetch_and_sub
+ __fetch_and_or
+ __fetch_and_xor
+ __fetch_and_and
+ __fetch_and_nand
+ __fetch_and_mpy
+ __fetch_and_min
+ __fetch_and_max
+ __lock_test_and_set
+ __lock_release
+ __lock_acquire
+ __compare_and_swap
+ __synchronize
+ __high_multiply
+ __unix
+ __sgi
+ __linux__
+ __i386__
+ __i486__
+ __cplusplus
+ __embedded_cplusplus
+ // long double conversion members mangled as __opr
+ // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00060.html
+ _opr
+ </literallayout>
+ </sect2>
+
+ <sect2 id="coding_style.example" xreflabel="coding_style.example">
+ <title>By Example</title>
+ <literallayout>
+ This library is written to appropriate C++ coding standards. As such,
+ it is intended to precede the recommendations of the GNU Coding
+ Standard, which can be referenced in full here:
+
+ http://www.gnu.org/prep/standards/standards.html#Formatting
+
+ The rest of this is also interesting reading, but skip the "Design
+ Advice" part.
+
+ The GCC coding conventions are here, and are also useful:
+ http://gcc.gnu.org/codingconventions.html
+
+ In addition, because it doesn't seem to be stated explicitly anywhere
+ else, there is an 80 column source limit.
+
+ ChangeLog entries for member functions should use the
+ classname::member function name syntax as follows:
+
+ 1999-04-15 Dennis Ritchie &lt;dr@att.com&gt;
+
+ * src/basic_file.cc (__basic_file::open): Fix thinko in
+ _G_HAVE_IO_FILE_OPEN bits.
+
+ Notable areas of divergence from what may be previous local practice
+ (particularly for GNU C) include:
+
+ 01. Pointers and references
+ char* p = "flop";
+ char&amp; c = *p;
+ -NOT-
+ char *p = "flop"; // wrong
+ char &amp;c = *p; // wrong
+
+ Reason: In C++, definitions are mixed with executable code. Here,
+ p is being initialized, not *p. This is near-universal
+ practice among C++ programmers; it is normal for C hackers
+ to switch spontaneously as they gain experience.
+
+ 02. Operator names and parentheses
+ operator==(type)
+ -NOT-
+ operator == (type) // wrong
+
+ Reason: The == is part of the function name. Separating
+ it makes the declaration look like an expression.
+
+ 03. Function names and parentheses
+ void mangle()
+ -NOT-
+ void mangle () // wrong
+
+ Reason: no space before parentheses (except after a control-flow
+ keyword) is near-universal practice for C++. It identifies the
+ parentheses as the function-call operator or declarator, as
+ opposed to an expression or other overloaded use of parentheses.
+
+ 04. Template function indentation
+ template&lt;typename T&gt;
+ void
+ template_function(args)
+ { }
+ -NOT-
+ template&lt;class T&gt;
+ void template_function(args) {};
+
+ Reason: In class definitions, without indentation whitespace is
+ needed both above and below the declaration to distinguish
+ it visually from other members. (Also, re: "typename"
+ rather than "class".) T often could be int, which is
+ not a class. ("class", here, is an anachronism.)
+
+ 05. Template class indentation
+ template&lt;typename _CharT, typename _Traits&gt;
+ class basic_ios : public ios_base
+ {
+ public:
+ // Types:
+ };
+ -NOT-
+ template&lt;class _CharT, class _Traits&gt;
+ class basic_ios : public ios_base
+ {
+ public:
+ // Types:
+ };
+ -NOT-
+ template&lt;class _CharT, class _Traits&gt;
+ class basic_ios : public ios_base
+ {
+ public:
+ // Types:
+ };
+
+ 06. Enumerators
+ enum
+ {
+ space = _ISspace,
+ print = _ISprint,
+ cntrl = _IScntrl
+ };
+ -NOT-
+ enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };
+
+ 07. Member initialization lists
+ All one line, separate from class name.
+
+ gribble::gribble()
+ : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
+ { }
+ -NOT-
+ gribble::gribble() : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
+ { }
+
+ 08. Try/Catch blocks
+ try
+ {
+ //
+ }
+ catch (...)
+ {
+ //
+ }
+ -NOT-
+ try {
+ //
+ } catch(...) {
+ //
+ }
+
+ 09. Member functions declarations and definitions
+ Keywords such as extern, static, export, explicit, inline, etc
+ go on the line above the function name. Thus
+
+ virtual int
+ foo()
+ -NOT-
+ virtual int foo()
+
+ Reason: GNU coding conventions dictate return types for functions
+ are on a separate line than the function name and parameter list
+ for definitions. For C++, where we have member functions that can
+ be either inline definitions or declarations, keeping to this
+ standard allows all member function names for a given class to be
+ aligned to the same margin, increasing readibility.
+
+
+ 10. Invocation of member functions with "this-&gt;"
+ For non-uglified names, use this-&gt;name to call the function.
+
+ this-&gt;sync()
+ -NOT-
+ sync()
+
+ Reason: Koenig lookup.
+
+ 11. Namespaces
+ namespace std
+ {
+ blah blah blah;
+ } // namespace std
+
+ -NOT-
+
+ namespace std {
+ blah blah blah;
+ } // namespace std
+
+ 12. Spacing under protected and private in class declarations:
+ space above, none below
+ ie
+
+ public:
+ int foo;
+
+ -NOT-
+ public:
+
+ int foo;
+
+ 13. Spacing WRT return statements.
+ no extra spacing before returns, no parenthesis
+ ie
+
+ }
+ return __ret;
+
+ -NOT-
+ }
+
+ return __ret;
+
+ -NOT-
+
+ }
+ return (__ret);
+
+
+ 14. Location of global variables.
+ All global variables of class type, whether in the "user visable"
+ space (e.g., cin) or the implementation namespace, must be defined
+ as a character array with the appropriate alignment and then later
+ re-initialized to the correct value.
+
+ This is due to startup issues on certain platforms, such as AIX.
+ For more explanation and examples, see src/globals.cc. All such
+ variables should be contained in that file, for simplicity.
+
+ 15. Exception abstractions
+ Use the exception abstractions found in functexcept.h, which allow
+ C++ programmers to use this library with -fno-exceptions. (Even if
+ that is rarely advisable, it's a necessary evil for backwards
+ compatibility.)
+
+ 16. Exception error messages
+ All start with the name of the function where the exception is
+ thrown, and then (optional) descriptive text is added. Example:
+
+ __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
+
+ Reason: The verbose terminate handler prints out exception::what(),
+ as well as the typeinfo for the thrown exception. As this is the
+ default terminate handler, by putting location info into the
+ exception string, a very useful error message is printed out for
+ uncaught exceptions. So useful, in fact, that non-programmers can
+ give useful error messages, and programmers can intelligently
+ speculate what went wrong without even using a debugger.
+
+ 17. The doxygen style guide to comments is a separate document,
+ see index.
+
+ The library currently has a mixture of GNU-C and modern C++ coding
+ styles. The GNU C usages will be combed out gradually.
+
+ Name patterns:
+
+ For nonstandard names appearing in Standard headers, we are constrained
+ to use names that begin with underscores. This is called "uglification".
+ The convention is:
+
+ Local and argument names: __[a-z].*
+
+ Examples: __count __ix __s1
+
+ Type names and template formal-argument names: _[A-Z][^_].*
+
+ Examples: _Helper _CharT _N
+
+ Member data and function names: _M_.*
+
+ Examples: _M_num_elements _M_initialize ()
+
+ Static data members, constants, and enumerations: _S_.*
+
+ Examples: _S_max_elements _S_default_value
+
+ Don't use names in the same scope that differ only in the prefix,
+ e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
+ (The most tempting of these seem to be and "_T" and "__sz".)
+
+ Names must never have "__" internally; it would confuse name
+ unmanglers on some targets. Also, never use "__[0-9]", same reason.
+
+ --------------------------
+
+ [BY EXAMPLE]
+
+ #ifndef _HEADER_
+ #define _HEADER_ 1
+
+ namespace std
+ {
+ class gribble
+ {
+ public:
+ gribble() throw();
+
+ gribble(const gribble&amp;);
+
+ explicit
+ gribble(int __howmany);
+
+ gribble&amp;
+ operator=(const gribble&amp;);
+
+ virtual
+ ~gribble() throw ();
+
+ // Start with a capital letter, end with a period.
+ inline void
+ public_member(const char* __arg) const;
+
+ // In-class function definitions should be restricted to one-liners.
+ int
+ one_line() { return 0 }
+
+ int
+ two_lines(const char* arg)
+ { return strchr(arg, 'a'); }
+
+ inline int
+ three_lines(); // inline, but defined below.
+
+ // Note indentation.
+ template&lt;typename _Formal_argument&gt;
+ void
+ public_template() const throw();
+
+ template&lt;typename _Iterator&gt;
+ void
+ other_template();
+
+ private:
+ class _Helper;
+
+ int _M_private_data;
+ int _M_more_stuff;
+ _Helper* _M_helper;
+ int _M_private_function();
+
+ enum _Enum
+ {
+ _S_one,
+ _S_two
+ };
+
+ static void
+ _S_initialize_library();
+ };
+
+ // More-or-less-standard language features described by lack, not presence.
+ # ifndef _G_NO_LONGLONG
+ extern long long _G_global_with_a_good_long_name; // avoid globals!
+ # endif
+
+ // Avoid in-class inline definitions, define separately;
+ // likewise for member class definitions:
+ inline int
+ gribble::public_member() const
+ { int __local = 0; return __local; }
+
+ class gribble::_Helper
+ {
+ int _M_stuff;
+
+ friend class gribble;
+ };
+ }
+
+ // Names beginning with "__": only for arguments and
+ // local variables; never use "__" in a type name, or
+ // within any name; never use "__[0-9]".
+
+ #endif /* _HEADER_ */
+
+
+ namespace std
+ {
+ template&lt;typename T&gt; // notice: "typename", not "class", no space
+ long_return_value_type&lt;with_many, args&gt;
+ function_name(char* pointer, // "char *pointer" is wrong.
+ char* argument,
+ const Reference&amp; ref)
+ {
+ // int a_local; /* wrong; see below. */
+ if (test)
+ {
+ nested code
+ }
+
+ int a_local = 0; // declare variable at first use.
+
+ // char a, b, *p; /* wrong */
+ char a = 'a';
+ char b = a + 1;
+ char* c = "abc"; // each variable goes on its own line, always.
+
+ // except maybe here...
+ for (unsigned i = 0, mask = 1; mask; ++i, mask &lt;&lt;= 1) {
+ // ...
+ }
+ }
+
+ gribble::gribble()
+ : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
+ { }
+
+ inline int
+ gribble::three_lines()
+ {
+ // doesn't fit in one line.
+ }
+ } // namespace std
+ </literallayout>
+ </sect2>
+</sect1>
+
+<sect1 id="contrib.doc_style" xreflabel="Documentation Style">
+ <title>Documentation Style</title>
+ <sect2 id="doc_style.doxygen" xreflabel="doc_style.doxygen">
+ <title>Doxygen</title>
+ <sect3 id="doxygen.prereq" xreflabel="doxygen.prereq">
+ <title>Prerequisites</title>
+ <para>
+ Prerequisite tools are Bash 2.x,
+ <ulink url="http://www.doxygen.org/">Doxygen</ulink>, and
+ the <ulink url="http://www.gnu.org/software/coreutils/">GNU
+ coreutils</ulink>. (GNU versions of find, xargs, and possibly
+ sed and grep are used, just because the GNU versions make
+ things very easy.)
+ </para>
+
+ <para>
+ To generate the pretty pictures and hierarchy
+ graphs, the
+ <ulink url="http://www.research.att.com/sw/tools/graphviz/download.html">Graphviz</ulink>
+ package will need to be installed.
+ </para>
+ </sect3>
+
+ <sect3 id="doxygen.rules" xreflabel="doxygen.rules">
+ <title>Generating the Doxygen Files</title>
+ <para>
+ The Makefile rules
+ </para>
+ <screen><userinput>make doc-html-doxygen</userinput></screen>
+ <para>
+ and
+ </para>
+ <screen><userinput>make doc-xml-doxygen</userinput></screen>
+ <para>
+ and
+ </para>
+ <screen><userinput>make doc-man-doxygen</userinput></screen>
+ <para>
+ in the libstdc++ build directory generate the HTML docs, the
+ XML docs, and the man pages.
+ </para>
+
+ <para>
+ Careful observers will see that the Makefile rules simply call
+ a script from the source tree, <filename>run_doxygen</filename>, which
+ does the actual work of running Doxygen and then (most
+ importantly) massaging the output files. If for some reason
+ you prefer to not go through the Makefile, you can call this
+ script directly. (Start by passing <literal>--help</literal>.)
+ </para>
+
+ <para>
+ If you wish to tweak the Doxygen settings, do so by editing
+ <filename>doc/doxygen/user.cfg.in</filename>. Notes to fellow
+ library hackers are written in triple-# comments.
+ </para>
+
+ </sect3>
+
+ <sect3 id="doxygen.markup" xreflabel="doxygen.markup">
+ <title>Markup</title>
+
+ <para>
+ In general, libstdc++ files should be formatted according to
+ the rules found in the
+ <link linkend="contrib.coding_style">Coding Standard</link>. Before
+ any doxygen-specific formatting tweaks are made, please try to
+ make sure that the initial formatting is sound.
+ </para>
+
+ <para>
+ Adding Doxygen markup to a file (informally called
+ <quote>doxygenating</quote>) is very simple. The Doxygen manual can be
+ found
+ <ulink url="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">here</ulink>.
+ We try to use a very-recent version of Doxygen.
+ </para>
+
+ <para>
+ For classes, use
+ <classname>deque</classname>/<classname>vector</classname>/<classname>list</classname>
+ and <classname>std::pair</classname> as examples. For
+ functions, see their member functions, and the free functions
+ in <filename>stl_algobase.h</filename>. Member functions of
+ other container-like types should read similarly to these
+ member functions.
+ </para>
+
+ <para>
+ These points accompany the first list in section 3.1 of the
+ Doxygen manual:
+ </para>
+
+ <orderedlist>
+ <listitem><para>Use the Javadoc style...</para></listitem>
+ <listitem>
+ <para>
+ ...not the Qt style. The intermediate *'s are preferred.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Use the triple-slash style only for one-line comments (the
+ <quote>brief</quote> mode). Very recent versions of Doxygen permit
+ full-mode comments in triple-slash blocks, but the
+ formatting still comes out wonky.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ This is disgusting. Don't do this.
+ </para>
+ </listitem>
+ </orderedlist>
+
+ <para>
+ Use the @-style of commands, not the !-style. Please be
+ careful about whitespace in your markup comments. Most of the
+ time it doesn't matter; doxygen absorbs most whitespace, and
+ both HTML and *roff are agnostic about whitespace. However,
+ in &lt;pre&gt; blocks and @code/@endcode sections, spacing can
+ have <quote>interesting</quote> effects.
+ </para>
+
+ <para>
+ Use either kind of grouping, as
+ appropriate. <filename>doxygroups.cc</filename> exists for this
+ purpose. See <filename>stl_iterator.h</filename> for a good example
+ of the <quote>other</quote> kind of grouping.
+ </para>
+
+ <para>
+ Please use markup tags like @p and @a when referring to things
+ such as the names of function parameters. Use @e for emphasis
+ when necessary. Use @c to refer to other standard names.
+ (Examples of all these abound in the present code.)
+ </para>
+
+ </sect3>
+
+ </sect2>
+
+ <sect2 id="doc_style.docbook" xreflabel="doc_style.docbook">
+ <title>Docbook</title>
+
+ <sect3 id="docbook.prereq" xreflabel="docbook.prereq">
+ <title>Prerequisites</title>
+ <para>
+ Editing the DocBook sources requires an XML editor. Many
+ exist: some noteable options
+ include <command>emacs</command>, <application>Kate</application>,
+ or <application>Conglomerate</application>.
+ </para>
+
+ <para>
+ Some editors support special <quote>XML Validation</quote>
+ modes that can validate the file as it is
+ produced. Recommended is the <command>nXML Mode</command>
+ for <command>emacs</command>.
+ </para>
+
+ <para>
+ Besides an editor, additional DocBook files and XML tools are
+ also required.
+ </para>
+
+ <para>
+ Access to the DocBook stylesheets and DTD is required. The
+ stylesheets are usually packaged by vendor, in something
+ like <filename>docbook-style-xsl</filename>. The installation
+ directory for this package corresponds to
+ the <literal>XSL_STYLE_DIR</literal>
+ in <filename>doc/Makefile.am</filename> and defaults
+ to <filename class="directory">/usr/share/sgml/docbook/xsl-stylesheets</filename>.
+ </para>
+
+ <para>
+ For procesessing XML, an XML processor and some style
+ sheets are necessary. Defaults are <command>xsltproc</command>
+ provided by <filename>libxslt</filename>.
+ </para>
+
+ <para>
+ For validating the XML document, you'll need
+ something like <command>xmllint</command> and access to the
+ DocBook DTD. These are provided
+ by a vendor package like <filename>lixml2</filename>.
+ </para>
+
+ <para>
+ For PDF output, something that transforms valid XML to PDF is
+ required. Possible solutions include <command>xmlto</command>,
+ <ulink url="http://xmlgraphics.apache.org/fop/">Apache
+ FOP</ulink>, or <command>prince</command>. Other options are
+ listed on the DocBook web <ulink
+ url="http://wiki.docbook.org/topic/DocBookPublishingTools">pages</ulink>. Please
+ consult the <email>libstdc++@gcc.gnu.org</email> list when
+ preparing printed manuals for current best practice and suggestions.
+ </para>
+
+ <para>
+ Make sure that the XML documentation and markup is valid for
+ any change. This can be done easily, with the validation rules
+ in the <filename>Makefile</filename>, which is equivalent to doing:
+ </para>
+
+ <screen>
+ <userinput>
+xmllint --noout --valid <filename>xml/index.xml</filename>
+ </userinput>
+ </screen>
+ </sect3>
+
+ <sect3 id="docbook.rules" xreflabel="docbook.rules">
+ <title>Generating the DocBook Files</title>
+
+ <para>
+ The Makefile rules
+ </para>
+ <screen><userinput>make doc-html</userinput></screen>
+ <para>
+ and
+ </para>
+ <screen><userinput>make doc-pdf</userinput></screen>
+ <para>
+ and
+ </para>
+ <screen><userinput>make doc-xml-single</userinput></screen>
+ <para>
+ and
+ </para>
+ <screen><userinput>make doc-xml-validate</userinput></screen>
+
+ <para>
+ in the libstdc++ build directory result respectively in the
+ following: the generation of an HTML version of all the
+ documentation, a PDF version of the same, a single XML
+ document, and the results of validating the XML document.
+ </para>
+ </sect3>
+
+ <sect3 id="docbook.examples" xreflabel="docbook.examples">
+ <title>File Organization and Basics</title>
+
+ <literallayout>
+ <emphasis>Which files are important</emphasis>
+
+ All Docbook files are in the directory
+ libstdc++-v3/doc/xml
+
+ Inside this directory, the files of importance:
+ spine.xml - index to documentation set
+ manual/spine.xml - index to manual
+ manual/*.xml - individual chapters and sections of the manual
+ faq.xml - index to FAQ
+ api.xml - index to source level / API
+
+ All *.txml files are template xml files, ie otherwise empty files with
+ the correct structure, suitable for filling in with new information.
+
+ <emphasis>Cannonical Writing Style</emphasis>
+
+ class template
+ function template
+ member function template
+ (via C++ Templates, Vandevoorde)
+
+ class in namespace std: allocator, not std::allocator
+
+ header file: iostream, not &lt;iostream&gt;
+
+
+ <emphasis>General structure</emphasis>
+
+ &lt;set&gt;
+ &lt;book&gt;
+ &lt;/book&gt;
+
+ &lt;book&gt;
+ &lt;chapter&gt;
+ &lt;/chapter&gt;
+ &lt;/book&gt;
+
+ &lt;book&gt;
+ &lt;part&gt;
+ &lt;chapter&gt;
+ &lt;section&gt;
+ &lt;/section&gt;
+
+ &lt;sect1&gt;
+ &lt;/sect1&gt;
+
+ &lt;sect1&gt;
+ &lt;sect2&gt;
+ &lt;/sect2&gt;
+ &lt;/sect1&gt;
+ &lt;/chapter&gt;
+
+ &lt;chapter&gt;
+ &lt;/chapter&gt;
+ &lt;/part&gt;
+ &lt;/book&gt;
+
+ &lt;/set&gt;
+ </literallayout>
+ </sect3>
+
+ <sect3 id="docbook.markup" xreflabel="docbook.markup">
+ <title>Markup By Example</title>
+
+ <literallayout>
+ HTML to XML rough equivalents
+
+ &lt;p&gt; &lt;para&gt;
+
+ &lt;pre&gt; &lt;computeroutput&gt;
+ &lt;pre&gt; &lt;programlisting&gt;
+ &lt;pre&gt; &lt;literallayout&gt;
+
+ &lt;ul&gt; &lt;itemizedlist&gt;
+ &lt;ol&gt; &lt;orderedlist&gt;
+ &lt;il&gt; &lt;listitem&gt;
+
+ &lt;dl&gt; &lt;variablelist&gt;
+
+ &lt;varlistentry&gt;
+ &lt;dt&gt; &lt;term&gt;
+ &lt;/dt&gt; &lt;/term&gt;
+ &lt;dd&gt; &lt;listitem&gt;
+ &lt;/dt&gt; &lt;/listitem&gt;
+ &lt;/varlistentry&gt;
+
+ &lt;a href &lt;ulink url
+ &lt;code&gt; &lt;literal&gt;
+ &lt;code&gt; &lt;programlisting&gt;
+
+ &lt;strong&gt; &lt;emphasis&gt;
+ &lt;em&gt; &lt;emphasis&gt;
+ &quot; &lt;quote&gt;
+
+ ctype.h &lt;filename class="headerfile"&gt;&lt;/filename&gt;
+
+
+ build_dir &lt;filename class="directory"&gt;path_to_build_dir&lt;/filename&gt;
+
+ Finer gradations of &lt;code&gt;
+
+ &lt;classname&gt; &lt;classname&gt;string&lt;/classname&gt;
+ &lt;classname&gt;vector&lt;&gt;&lt;/classname&gt;
+ &lt;function&gt;fs.clear()&lt;/function&gt;
+
+ &lt;structname&gt;
+
+ &lt;function&gt; &lt;function&gt;clear()&lt;/function&gt;
+
+ &lt;type&gt; &lt;type&gt;long long&lt;/type&gt;
+
+ &lt;varname&gt; &lt;varname&gt;fs&lt;/varname&gt;
+
+ &lt;literal&gt; &lt;literal&gt;-Weffc++&lt;/literal&gt;
+ &lt;literal&gt;rel_ops&lt;/literal&gt;
+
+ &lt;constant&gt; &lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;
+ &lt;constant&gt;3.0&lt;/constant&gt;
+
+ &lt;filename&gt;
+
+ &lt;command&gt; &lt;command&gt;g++&lt;/command&gt;
+
+ &lt;errortext&gt; &lt;errortext&gt;foo Concept &lt;/errortext&gt;
+</literallayout>
+ </sect3>
+ </sect2>
+
+</sect1>
+
+<sect1 id="contrib.design_notes" xreflabel="Design Notes">
+ <title>Design Notes</title>
+ <para>
+ </para>
+
+ <literallayout>
+
+ The Library
+ -----------
+
+ This paper is covers two major areas:
+
+ - Features and policies not mentioned in the standard that
+ the quality of the library implementation depends on, including
+ extensions and "implementation-defined" features;
+
+ - Plans for required but unimplemented library features and
+ optimizations to them.
+
+ Overhead
+ --------
+
+ The standard defines a large library, much larger than the standard
+ C library. A naive implementation would suffer substantial overhead
+ in compile time, executable size, and speed, rendering it unusable
+ in many (particularly embedded) applications. The alternative demands
+ care in construction, and some compiler support, but there is no
+ need for library subsets.
+
+ What are the sources of this overhead? There are four main causes:
+
+ - The library is specified almost entirely as templates, which
+ with current compilers must be included in-line, resulting in
+ very slow builds as tens or hundreds of thousands of lines
+ of function definitions are read for each user source file.
+ Indeed, the entire SGI STL, as well as the dos Reis valarray,
+ are provided purely as header files, largely for simplicity in
+ porting. Iostream/locale is (or will be) as large again.
+
+ - The library is very flexible, specifying a multitude of hooks
+ where users can insert their own code in place of defaults.
+ When these hooks are not used, any time and code expended to
+ support that flexibility is wasted.
+
+ - Templates are often described as causing to "code bloat". In
+ practice, this refers (when it refers to anything real) to several
+ independent processes. First, when a class template is manually
+ instantiated in its entirely, current compilers place the definitions
+ for all members in a single object file, so that a program linking
+ to one member gets definitions of all. Second, template functions
+ which do not actually depend on the template argument are, under
+ current compilers, generated anew for each instantiation, rather
+ than being shared with other instantiations. Third, some of the
+ flexibility mentioned above comes from virtual functions (both in
+ regular classes and template classes) which current linkers add
+ to the executable file even when they manifestly cannot be called.
+
+ - The library is specified to use a language feature, exceptions,
+ which in the current gcc compiler ABI imposes a run time and
+ code space cost to handle the possibility of exceptions even when
+ they are not used. Under the new ABI (accessed with -fnew-abi),
+ there is a space overhead and a small reduction in code efficiency
+ resulting from lost optimization opportunities associated with
+ non-local branches associated with exceptions.
+
+ What can be done to eliminate this overhead? A variety of coding
+ techniques, and compiler, linker and library improvements and
+ extensions may be used, as covered below. Most are not difficult,
+ and some are already implemented in varying degrees.
+
+ Overhead: Compilation Time
+ --------------------------
+
+ Providing "ready-instantiated" template code in object code archives
+ allows us to avoid generating and optimizing template instantiations
+ in each compilation unit which uses them. However, the number of such
+ instantiations that are useful to provide is limited, and anyway this
+ is not enough, by itself, to minimize compilation time. In particular,
+ it does not reduce time spent parsing conforming headers.
+
+ Quicker header parsing will depend on library extensions and compiler
+ improvements. One approach is some variation on the techniques
+ previously marketed as "pre-compiled headers", now standardized as
+ support for the "export" keyword. "Exported" template definitions
+ can be placed (once) in a "repository" -- really just a library, but
+ of template definitions rather than object code -- to be drawn upon
+ at link time when an instantiation is needed, rather than placed in
+ header files to be parsed along with every compilation unit.
+
+ Until "export" is implemented we can put some of the lengthy template
+ definitions in #if guards or alternative headers so that users can skip
+ over the full definitions when they need only the ready-instantiated
+ specializations.
+
+ To be precise, this means that certain headers which define
+ templates which users normally use only for certain arguments
+ can be instrumented to avoid exposing the template definitions
+ to the compiler unless a macro is defined. For example, in
+ &lt;string&gt;, we might have:
+
+ template &lt;class _CharT, ... &gt; class basic_string {
+ ... // member declarations
+ };
+ ... // operator declarations
+
+ #ifdef _STRICT_ISO_
+ # if _G_NO_TEMPLATE_EXPORT
+ # include &lt;bits/std_locale.h&gt; // headers needed by definitions
+ # ...
+ # include &lt;bits/string.tcc&gt; // member and global template definitions.
+ # endif
+ #endif
+
+ Users who compile without specifying a strict-ISO-conforming flag
+ would not see many of the template definitions they now see, and rely
+ instead on ready-instantiated specializations in the library. This
+ technique would be useful for the following substantial components:
+ string, locale/iostreams, valarray. It would *not* be useful or
+ usable with the following: containers, algorithms, iterators,
+ allocator. Since these constitute a large (though decreasing)
+ fraction of the library, the benefit the technique offers is
+ limited.
+
+ The language specifies the semantics of the "export" keyword, but
+ the gcc compiler does not yet support it. When it does, problems
+ with large template inclusions can largely disappear, given some
+ minor library reorganization, along with the need for the apparatus
+ described above.
+
+ Overhead: Flexibility Cost
+ --------------------------
+
+ The library offers many places where users can specify operations
+ to be performed by the library in place of defaults. Sometimes
+ this seems to require that the library use a more-roundabout, and
+ possibly slower, way to accomplish the default requirements than
+ would be used otherwise.
+
+ The primary protection against this overhead is thorough compiler
+ optimization, to crush out layers of inline function interfaces.
+ Kuck &amp; Associates has demonstrated the practicality of this kind
+ of optimization.
+
+ The second line of defense against this overhead is explicit
+ specialization. By defining helper function templates, and writing
+ specialized code for the default case, overhead can be eliminated
+ for that case without sacrificing flexibility. This takes full
+ advantage of any ability of the optimizer to crush out degenerate
+ code.
+
+ The library specifies many virtual functions which current linkers
+ load even when they cannot be called. Some minor improvements to the
+ compiler and to ld would eliminate any such overhead by simply
+ omitting virtual functions that the complete program does not call.
+ A prototype of this work has already been done. For targets where
+ GNU ld is not used, a "pre-linker" could do the same job.
+
+ The main areas in the standard interface where user flexibility
+ can result in overhead are:
+
+ - Allocators: Containers are specified to use user-definable
+ allocator types and objects, making tuning for the container
+ characteristics tricky.
+
+ - Locales: the standard specifies locale objects used to implement
+ iostream operations, involving many virtual functions which use
+ streambuf iterators.
+
+ - Algorithms and containers: these may be instantiated on any type,
+ frequently duplicating code for identical operations.
+
+ - Iostreams and strings: users are permitted to use these on their
+ own types, and specify the operations the stream must use on these
+ types.
+
+ Note that these sources of overhead are _avoidable_. The techniques
+ to avoid them are covered below.
+
+ Code Bloat
+ ----------
+
+ In the SGI STL, and in some other headers, many of the templates
+ are defined "inline" -- either explicitly or by their placement
+ in class definitions -- which should not be inline. This is a
+ source of code bloat. Matt had remarked that he was relying on
+ the compiler to recognize what was too big to benefit from inlining,
+ and generate it out-of-line automatically. However, this also can
+ result in code bloat except where the linker can eliminate the extra
+ copies.
+
+ Fixing these cases will require an audit of all inline functions
+ defined in the library to determine which merit inlining, and moving
+ the rest out of line. This is an issue mainly in chapters 23, 25, and
+ 27. Of course it can be done incrementally, and we should generally
+ accept patches that move large functions out of line and into ".tcc"
+ files, which can later be pulled into a repository. Compiler/linker
+ improvements to recognize very large inline functions and move them
+ out-of-line, but shared among compilation units, could make this
+ work unnecessary.
+
+ Pre-instantiating template specializations currently produces large
+ amounts of dead code which bloats statically linked programs. The
+ current state of the static library, libstdc++.a, is intolerable on
+ this account, and will fuel further confused speculation about a need
+ for a library "subset". A compiler improvement that treats each
+ instantiated function as a separate object file, for linking purposes,
+ would be one solution to this problem. An alternative would be to
+ split up the manual instantiation files into dozens upon dozens of
+ little files, each compiled separately, but an abortive attempt at
+ this was done for &lt;string&gt; and, though it is far from complete, it
+ is already a nuisance. A better interim solution (just until we have
+ "export") is badly needed.
+
+ When building a shared library, the current compiler/linker cannot
+ automatically generate the instantiatiations needed. This creates a
+ miserable situation; it means any time something is changed in the
+ library, before a shared library can be built someone must manually
+ copy the declarations of all templates that are needed by other parts
+ of the library to an "instantiation" file, and add it to the build
+ system to be compiled and linked to the library. This process is
+ readily automated, and should be automated as soon as possible.
+ Users building their own shared libraries experience identical
+ frustrations.
+
+ Sharing common aspects of template definitions among instantiations
+ can radically reduce code bloat. The compiler could help a great
+ deal here by recognizing when a function depends on nothing about
+ a template parameter, or only on its size, and giving the resulting
+ function a link-name "equate" that allows it to be shared with other
+ instantiations. Implementation code could take advantage of the
+ capability by factoring out code that does not depend on the template
+ argument into separate functions to be merged by the compiler.
+
+ Until such a compiler optimization is implemented, much can be done
+ manually (if tediously) in this direction. One such optimization is
+ to derive class templates from non-template classes, and move as much
+ implementation as possible into the base class. Another is to partial-
+ specialize certain common instantiations, such as vector&lt;T*&gt;, to share
+ code for instantiations on all types T. While these techniques work,
+ they are far from the complete solution that a compiler improvement
+ would afford.
+
+ Overhead: Expensive Language Features
+ -------------------------------------
+
+ The main "expensive" language feature used in the standard library
+ is exception support, which requires compiling in cleanup code with
+ static table data to locate it, and linking in library code to use
+ the table. For small embedded programs the amount of such library
+ code and table data is assumed by some to be excessive. Under the
+ "new" ABI this perception is generally exaggerated, although in some
+ cases it may actually be excessive.
+
+ To implement a library which does not use exceptions directly is
+ not difficult given minor compiler support (to "turn off" exceptions
+ and ignore exception constructs), and results in no great library
+ maintenance difficulties. To be precise, given "-fno-exceptions",
+ the compiler should treat "try" blocks as ordinary blocks, and
+ "catch" blocks as dead code to ignore or eliminate. Compiler
+ support is not strictly necessary, except in the case of "function
+ try blocks"; otherwise the following macros almost suffice:
+
+ #define throw(X)
+ #define try if (true)
+ #define catch(X) else if (false)
+
+ However, there may be a need to use function try blocks in the
+ library implementation, and use of macros in this way can make
+ correct diagnostics impossible. Furthermore, use of this scheme
+ would require the library to call a function to re-throw exceptions
+ from a try block. Implementing the above semantics in the compiler
+ is preferable.
+
+ Given the support above (however implemented) it only remains to
+ replace code that "throws" with a call to a well-documented "handler"
+ function in a separate compilation unit which may be replaced by
+ the user. The main source of exceptions that would be difficult
+ for users to avoid is memory allocation failures, but users can
+ define their own memory allocation primitives that never throw.
+ Otherwise, the complete list of such handlers, and which library
+ functions may call them, would be needed for users to be able to
+ implement the necessary substitutes. (Fortunately, they have the
+ source code.)
+
+ Opportunities
+ -------------
+
+ The template capabilities of C++ offer enormous opportunities for
+ optimizing common library operations, well beyond what would be
+ considered "eliminating overhead". In particular, many operations
+ done in Glibc with macros that depend on proprietary language
+ extensions can be implemented in pristine Standard C++. For example,
+ the chapter 25 algorithms, and even C library functions such as strchr,
+ can be specialized for the case of static arrays of known (small) size.
+
+ Detailed optimization opportunities are identified below where
+ the component where they would appear is discussed. Of course new
+ opportunities will be identified during implementation.
+
+ Unimplemented Required Library Features
+ ---------------------------------------
+
+ The standard specifies hundreds of components, grouped broadly by
+ chapter. These are listed in excruciating detail in the CHECKLIST
+ file.
+
+ 17 general
+ 18 support
+ 19 diagnostics
+ 20 utilities
+ 21 string
+ 22 locale
+ 23 containers
+ 24 iterators
+ 25 algorithms
+ 26 numerics
+ 27 iostreams
+ Annex D backward compatibility
+
+ Anyone participating in implementation of the library should obtain
+ a copy of the standard, ISO 14882. People in the U.S. can obtain an
+ electronic copy for US$18 from ANSI's web site. Those from other
+ countries should visit http://www.iso.ch/ to find out the location
+ of their country's representation in ISO, in order to know who can
+ sell them a copy.
+
+ The emphasis in the following sections is on unimplemented features
+ and optimization opportunities.
+
+ Chapter 17 General
+ -------------------
+
+ Chapter 17 concerns overall library requirements.
+
+ The standard doesn't mention threads. A multi-thread (MT) extension
+ primarily affects operators new and delete (18), allocator (20),
+ string (21), locale (22), and iostreams (27). The common underlying
+ support needed for this is discussed under chapter 20.
+
+ The standard requirements on names from the C headers create a
+ lot of work, mostly done. Names in the C headers must be visible
+ in the std:: and sometimes the global namespace; the names in the
+ two scopes must refer to the same object. More stringent is that
+ Koenig lookup implies that any types specified as defined in std::
+ really are defined in std::. Names optionally implemented as
+ macros in C cannot be macros in C++. (An overview may be read at
+ &lt;http://www.cantrip.org/cheaders.html&gt;). The scripts "inclosure"
+ and "mkcshadow", and the directories shadow/ and cshadow/, are the
+ beginning of an effort to conform in this area.
+
+ A correct conforming definition of C header names based on underlying
+ C library headers, and practical linking of conforming namespaced
+ customer code with third-party C libraries depends ultimately on
+ an ABI change, allowing namespaced C type names to be mangled into
+ type names as if they were global, somewhat as C function names in a
+ namespace, or C++ global variable names, are left unmangled. Perhaps
+ another "extern" mode, such as 'extern "C-global"' would be an
+ appropriate place for such type definitions. Such a type would
+ affect mangling as follows:
+
+ namespace A {
+ struct X {};
+ extern "C-global" { // or maybe just 'extern "C"'
+ struct Y {};
+ };
+ }
+ void f(A::X*); // mangles to f__FPQ21A1X
+ void f(A::Y*); // mangles to f__FP1Y
+
+ (It may be that this is really the appropriate semantics for regular
+ 'extern "C"', and 'extern "C-global"', as an extension, would not be
+ necessary.) This would allow functions declared in non-standard C headers
+ (and thus fixable by neither us nor users) to link properly with functions
+ declared using C types defined in properly-namespaced headers. The
+ problem this solves is that C headers (which C++ programmers do persist
+ in using) frequently forward-declare C struct tags without including
+ the header where the type is defined, as in
+
+ struct tm;
+ void munge(tm*);
+
+ Without some compiler accommodation, munge cannot be called by correct
+ C++ code using a pointer to a correctly-scoped tm* value.
+
+ The current C headers use the preprocessor extension "#include_next",
+ which the compiler complains about when run "-pedantic".
+ (Incidentally, it appears that "-fpedantic" is currently ignored,
+ probably a bug.) The solution in the C compiler is to use
+ "-isystem" rather than "-I", but unfortunately in g++ this seems
+ also to wrap the whole header in an 'extern "C"' block, so it's
+ unusable for C++ headers. The correct solution appears to be to
+ allow the various special include-directory options, if not given
+ an argument, to affect subsequent include-directory options additively,
+ so that if one said
+
+ -pedantic -iprefix $(prefix) \
+ -idirafter -ino-pedantic -ino-extern-c -iwithprefix -I g++-v3 \
+ -iwithprefix -I g++-v3/ext
+
+ the compiler would search $(prefix)/g++-v3 and not report
+ pedantic warnings for files found there, but treat files in
+ $(prefix)/g++-v3/ext pedantically. (The undocumented semantics
+ of "-isystem" in g++ stink. Can they be rescinded? If not it
+ must be replaced with something more rationally behaved.)
+
+ All the C headers need the treatment above; in the standard these
+ headers are mentioned in various chapters. Below, I have only
+ mentioned those that present interesting implementation issues.
+
+ The components identified as "mostly complete", below, have not been
+ audited for conformance. In many cases where the library passes
+ conformance tests we have non-conforming extensions that must be
+ wrapped in #if guards for "pedantic" use, and in some cases renamed
+ in a conforming way for continued use in the implementation regardless
+ of conformance flags.
+
+ The STL portion of the library still depends on a header
+ stl/bits/stl_config.h full of #ifdef clauses. This apparatus
+ should be replaced with autoconf/automake machinery.
+
+ The SGI STL defines a type_traits&lt;&gt; template, specialized for
+ many types in their code including the built-in numeric and
+ pointer types and some library types, to direct optimizations of
+ standard functions. The SGI compiler has been extended to generate
+ specializations of this template automatically for user types,
+ so that use of STL templates on user types can take advantage of
+ these optimizations. Specializations for other, non-STL, types
+ would make more optimizations possible, but extending the gcc
+ compiler in the same way would be much better. Probably the next
+ round of standardization will ratify this, but probably with
+ changes, so it probably should be renamed to place it in the
+ implementation namespace.
+
+ The SGI STL also defines a large number of extensions visible in
+ standard headers. (Other extensions that appear in separate headers
+ have been sequestered in subdirectories ext/ and backward/.) All
+ these extensions should be moved to other headers where possible,
+ and in any case wrapped in a namespace (not std!), and (where kept
+ in a standard header) girded about with macro guards. Some cannot be
+ moved out of standard headers because they are used to implement
+ standard features. The canonical method for accommodating these
+ is to use a protected name, aliased in macro guards to a user-space
+ name. Unfortunately C++ offers no satisfactory template typedef
+ mechanism, so very ad-hoc and unsatisfactory aliasing must be used
+ instead.
+
+ Implementation of a template typedef mechanism should have the highest
+ priority among possible extensions, on the same level as implementation
+ of the template "export" feature.
+
+ Chapter 18 Language support
+ ----------------------------
+
+ Headers: &lt;limits&gt; &lt;new&gt; &lt;typeinfo&gt; &lt;exception&gt;
+ C headers: &lt;cstddef&gt; &lt;climits&gt; &lt;cfloat&gt; &lt;cstdarg&gt; &lt;csetjmp&gt;
+ &lt;ctime&gt; &lt;csignal&gt; &lt;cstdlib&gt; (also 21, 25, 26)
+
+ This defines the built-in exceptions, rtti, numeric_limits&lt;&gt;,
+ operator new and delete. Much of this is provided by the
+ compiler in its static runtime library.
+
+ Work to do includes defining numeric_limits&lt;&gt; specializations in
+ separate files for all target architectures. Values for integer types
+ except for bool and wchar_t are readily obtained from the C header
+ &lt;limits.h&gt;, but values for the remaining numeric types (bool, wchar_t,
+ float, double, long double) must be entered manually. This is
+ largely dog work except for those members whose values are not
+ easily deduced from available documentation. Also, this involves
+ some work in target configuration to identify the correct choice of
+ file to build against and to install.
+
+ The definitions of the various operators new and delete must be
+ made thread-safe, which depends on a portable exclusion mechanism,
+ discussed under chapter 20. Of course there is always plenty of
+ room for improvements to the speed of operators new and delete.
+
+ &lt;cstdarg&gt;, in Glibc, defines some macros that gcc does not allow to
+ be wrapped into an inline function. Probably this header will demand
+ attention whenever a new target is chosen. The functions atexit(),
+ exit(), and abort() in cstdlib have different semantics in C++, so
+ must be re-implemented for C++.
+
+ Chapter 19 Diagnostics
+ -----------------------
+
+ Headers: &lt;stdexcept&gt;
+ C headers: &lt;cassert&gt; &lt;cerrno&gt;
+
+ This defines the standard exception objects, which are "mostly complete".
+ Cygnus has a version, and now SGI provides a slightly different one.
+ It makes little difference which we use.
+
+ The C global name "errno", which C allows to be a variable or a macro,
+ is required in C++ to be a macro. For MT it must typically result in
+ a function call.
+
+ Chapter 20 Utilities
+ ---------------------
+ Headers: &lt;utility&gt; &lt;functional&gt; &lt;memory&gt;
+ C header: &lt;ctime&gt; (also in 18)
+
+ SGI STL provides "mostly complete" versions of all the components
+ defined in this chapter. However, the auto_ptr&lt;&gt; implementation
+ is known to be wrong. Furthermore, the standard definition of it
+ is known to be unimplementable as written. A minor change to the
+ standard would fix it, and auto_ptr&lt;&gt; should be adjusted to match.
+
+ Multi-threading affects the allocator implementation, and there must
+ be configuration/installation choices for different users' MT
+ requirements. Anyway, users will want to tune allocator options
+ to support different target conditions, MT or no.
+
+ The primitives used for MT implementation should be exposed, as an
+ extension, for users' own work. We need cross-CPU "mutex" support,
+ multi-processor shared-memory atomic integer operations, and single-
+ processor uninterruptible integer operations, and all three configurable
+ to be stubbed out for non-MT use, or to use an appropriately-loaded
+ dynamic library for the actual runtime environment, or statically
+ compiled in for cases where the target architecture is known.
+
+ Chapter 21 String
+ ------------------
+ Headers: &lt;string&gt;
+ C headers: &lt;cctype&gt; &lt;cwctype&gt; &lt;cstring&gt; &lt;cwchar&gt; (also in 27)
+ &lt;cstdlib&gt; (also in 18, 25, 26)
+
+ We have "mostly-complete" char_traits&lt;&gt; implementations. Many of the
+ char_traits&lt;char&gt; operations might be optimized further using existing
+ proprietary language extensions.
+
+ We have a "mostly-complete" basic_string&lt;&gt; implementation. The work
+ to manually instantiate char and wchar_t specializations in object
+ files to improve link-time behavior is extremely unsatisfactory,
+ literally tripling library-build time with no commensurate improvement
+ in static program link sizes. It must be redone. (Similar work is
+ needed for some components in chapters 22 and 27.)
+
+ Other work needed for strings is MT-safety, as discussed under the
+ chapter 20 heading.
+
+ The standard C type mbstate_t from &lt;cwchar&gt; and used in char_traits&lt;&gt;
+ must be different in C++ than in C, because in C++ the default constructor
+ value mbstate_t() must be the "base" or "ground" sequence state.
+ (According to the likely resolution of a recently raised Core issue,
+ this may become unnecessary. However, there are other reasons to
+ use a state type not as limited as whatever the C library provides.)
+ If we might want to provide conversions from (e.g.) internally-
+ represented EUC-wide to externally-represented Unicode, or vice-
+ versa, the mbstate_t we choose will need to be more accommodating
+ than what might be provided by an underlying C library.
+
+ There remain some basic_string template-member functions which do
+ not overload properly with their non-template brethren. The infamous
+ hack akin to what was done in vector&lt;&gt; is needed, to conform to
+ 23.1.1 para 10. The CHECKLIST items for basic_string marked 'X',
+ or incomplete, are so marked for this reason.
+
+ Replacing the string iterators, which currently are simple character
+ pointers, with class objects would greatly increase the safety of the
+ client interface, and also permit a "debug" mode in which range,
+ ownership, and validity are rigorously checked. The current use of
+ raw pointers as string iterators is evil. vector&lt;&gt; iterators need the
+ same treatment. Note that the current implementation freely mixes
+ pointers and iterators, and that must be fixed before safer iterators
+ can be introduced.
+
+ Some of the functions in &lt;cstring&gt; are different from the C version.
+ generally overloaded on const and non-const argument pointers. For
+ example, in &lt;cstring&gt; strchr is overloaded. The functions isupper
+ etc. in &lt;cctype&gt; typically implemented as macros in C are functions
+ in C++, because they are overloaded with others of the same name
+ defined in &lt;locale&gt;.
+
+ Many of the functions required in &lt;cwctype&gt; and &lt;cwchar&gt; cannot be
+ implemented using underlying C facilities on intended targets because
+ such facilities only partly exist.
+
+ Chapter 22 Locale
+ ------------------
+ Headers: &lt;locale&gt;
+ C headers: &lt;clocale&gt;
+
+ We have a "mostly complete" class locale, with the exception of
+ code for constructing, and handling the names of, named locales.
+ The ways that locales are named (particularly when categories
+ (e.g. LC_TIME, LC_COLLATE) are different) varies among all target
+ environments. This code must be written in various versions and
+ chosen by configuration parameters.
+
+ Members of many of the facets defined in &lt;locale&gt; are stubs. Generally,
+ there are two sets of facets: the base class facets (which are supposed
+ to implement the "C" locale) and the "byname" facets, which are supposed
+ to read files to determine their behavior. The base ctype&lt;&gt;, collate&lt;&gt;,
+ and numpunct&lt;&gt; facets are "mostly complete", except that the table of
+ bitmask values used for "is" operations, and corresponding mask values,
+ are still defined in libio and just included/linked. (We will need to
+ implement these tables independently, soon, but should take advantage
+ of libio where possible.) The num_put&lt;&gt;::put members for integer types
+ are "mostly complete".
+
+ A complete list of what has and has not been implemented may be
+ found in CHECKLIST. However, note that the current definition of
+ codecvt&lt;wchar_t,char,mbstate_t&gt; is wrong. It should simply write
+ out the raw bytes representing the wide characters, rather than
+ trying to convert each to a corresponding single "char" value.
+
+ Some of the facets are more important than others. Specifically,
+ the members of ctype&lt;&gt;, numpunct&lt;&gt;, num_put&lt;&gt;, and num_get&lt;&gt; facets
+ are used by other library facilities defined in &lt;string&gt;, &lt;istream&gt;,
+ and &lt;ostream&gt;, and the codecvt&lt;&gt; facet is used by basic_filebuf&lt;&gt;
+ in &lt;fstream&gt;, so a conforming iostream implementation depends on
+ these.
+
+ The "long long" type eventually must be supported, but code mentioning
+ it should be wrapped in #if guards to allow pedantic-mode compiling.
+
+ Performance of num_put&lt;&gt; and num_get&lt;&gt; depend critically on
+ caching computed values in ios_base objects, and on extensions
+ to the interface with streambufs.
+
+ Specifically: retrieving a copy of the locale object, extracting
+ the needed facets, and gathering data from them, for each call to
+ (e.g.) operator&lt;&lt; would be prohibitively slow. To cache format
+ data for use by num_put&lt;&gt; and num_get&lt;&gt; we have a _Format_cache&lt;&gt;
+ object stored in the ios_base::pword() array. This is constructed
+ and initialized lazily, and is organized purely for utility. It
+ is discarded when a new locale with different facets is imbued.
+
+ Using only the public interfaces of the iterator arguments to the
+ facet functions would limit performance by forbidding "vector-style"
+ character operations. The streambuf iterator optimizations are
+ described under chapter 24, but facets can also bypass the streambuf
+ iterators via explicit specializations and operate directly on the
+ streambufs, and use extended interfaces to get direct access to the
+ streambuf internal buffer arrays. These extensions are mentioned
+ under chapter 27. These optimizations are particularly important
+ for input parsing.
+
+ Unused virtual members of locale facets can be omitted, as mentioned
+ above, by a smart linker.
+
+ Chapter 23 Containers
+ ----------------------
+ Headers: &lt;deque&gt; &lt;list&gt; &lt;queue&gt; &lt;stack&gt; &lt;vector&gt; &lt;map&gt; &lt;set&gt; &lt;bitset&gt;
+
+ All the components in chapter 23 are implemented in the SGI STL.
+ They are "mostly complete"; they include a large number of
+ nonconforming extensions which must be wrapped. Some of these
+ are used internally and must be renamed or duplicated.
+
+ The SGI components are optimized for large-memory environments. For
+ embedded targets, different criteria might be more appropriate. Users
+ will want to be able to tune this behavior. We should provide
+ ways for users to compile the library with different memory usage
+ characteristics.
+
+ A lot more work is needed on factoring out common code from different
+ specializations to reduce code size here and in chapter 25. The
+ easiest fix for this would be a compiler/ABI improvement that allows
+ the compiler to recognize when a specialization depends only on the
+ size (or other gross quality) of a template argument, and allow the
+ linker to share the code with similar specializations. In its
+ absence, many of the algorithms and containers can be partial-
+ specialized, at least for the case of pointers, but this only solves
+ a small part of the problem. Use of a type_traits-style template
+ allows a few more optimization opportunities, more if the compiler
+ can generate the specializations automatically.
+
+ As an optimization, containers can specialize on the default allocator
+ and bypass it, or take advantage of details of its implementation
+ after it has been improved upon.
+
+ Replacing the vector iterators, which currently are simple element
+ pointers, with class objects would greatly increase the safety of the
+ client interface, and also permit a "debug" mode in which range,
+ ownership, and validity are rigorously checked. The current use of
+ pointers for iterators is evil.
+
+ As mentioned for chapter 24, the deque iterator is a good example of
+ an opportunity to implement a "staged" iterator that would benefit
+ from specializations of some algorithms.
+
+ Chapter 24 Iterators
+ ---------------------
+ Headers: &lt;iterator&gt;
+
+ Standard iterators are "mostly complete", with the exception of
+ the stream iterators, which are not yet templatized on the
+ stream type. Also, the base class template iterator&lt;&gt; appears
+ to be wrong, so everything derived from it must also be wrong,
+ currently.
+
+ The streambuf iterators (currently located in stl/bits/std_iterator.h,
+ but should be under bits/) can be rewritten to take advantage of
+ friendship with the streambuf implementation.
+
+ Matt Austern has identified opportunities where certain iterator
+ types, particularly including streambuf iterators and deque
+ iterators, have a "two-stage" quality, such that an intermediate
+ limit can be checked much more quickly than the true limit on
+ range operations. If identified with a member of iterator_traits,
+ algorithms may be specialized for this case. Of course the
+ iterators that have this quality can be identified by specializing
+ a traits class.
+
+ Many of the algorithms must be specialized for the streambuf
+ iterators, to take advantage of block-mode operations, in order
+ to allow iostream/locale operations' performance not to suffer.
+ It may be that they could be treated as staged iterators and
+ take advantage of those optimizations.
+
+ Chapter 25 Algorithms
+ ----------------------
+ Headers: &lt;algorithm&gt;
+ C headers: &lt;cstdlib&gt; (also in 18, 21, 26))
+
+ The algorithms are "mostly complete". As mentioned above, they
+ are optimized for speed at the expense of code and data size.
+
+ Specializations of many of the algorithms for non-STL types would
+ give performance improvements, but we must use great care not to
+ interfere with fragile template overloading semantics for the
+ standard interfaces. Conventionally the standard function template
+ interface is an inline which delegates to a non-standard function
+ which is then overloaded (this is already done in many places in
+ the library). Particularly appealing opportunities for the sake of
+ iostream performance are for copy and find applied to streambuf
+ iterators or (as noted elsewhere) for staged iterators, of which
+ the streambuf iterators are a good example.
+
+ The bsearch and qsort functions cannot be overloaded properly as
+ required by the standard because gcc does not yet allow overloading
+ on the extern-"C"-ness of a function pointer.
+
+ Chapter 26 Numerics
+ --------------------
+ Headers: &lt;complex&gt; &lt;valarray&gt; &lt;numeric&gt;
+ C headers: &lt;cmath&gt;, &lt;cstdlib&gt; (also 18, 21, 25)
+
+ Numeric components: Gabriel dos Reis's valarray, Drepper's complex,
+ and the few algorithms from the STL are "mostly done". Of course
+ optimization opportunities abound for the numerically literate. It
+ is not clear whether the valarray implementation really conforms
+ fully, in the assumptions it makes about aliasing (and lack thereof)
+ in its arguments.
+
+ The C div() and ldiv() functions are interesting, because they are the
+ only case where a C library function returns a class object by value.
+ Since the C++ type div_t must be different from the underlying C type
+ (which is in the wrong namespace) the underlying functions div() and
+ ldiv() cannot be re-used efficiently. Fortunately they are trivial to
+ re-implement.
+
+ Chapter 27 Iostreams
+ ---------------------
+ Headers: &lt;iosfwd&gt; &lt;streambuf&gt; &lt;ios&gt; &lt;ostream&gt; &lt;istream&gt; &lt;iostream&gt;
+ &lt;iomanip&gt; &lt;sstream&gt; &lt;fstream&gt;
+ C headers: &lt;cstdio&gt; &lt;cwchar&gt; (also in 21)
+
+ Iostream is currently in a very incomplete state. &lt;iosfwd&gt;, &lt;iomanip&gt;,
+ ios_base, and basic_ios&lt;&gt; are "mostly complete". basic_streambuf&lt;&gt; and
+ basic_ostream&lt;&gt; are well along, but basic_istream&lt;&gt; has had little work
+ done. The standard stream objects, &lt;sstream&gt; and &lt;fstream&gt; have been
+ started; basic_filebuf&lt;&gt; "write" functions have been implemented just
+ enough to do "hello, world".
+
+ Most of the istream and ostream operators &lt;&lt; and &gt;&gt; (with the exception
+ of the op&lt;&lt;(integer) ones) have not been changed to use locale primitives,
+ sentry objects, or char_traits members.
+
+ All these templates should be manually instantiated for char and
+ wchar_t in a way that links only used members into user programs.
+
+ Streambuf is fertile ground for optimization extensions. An extended
+ interface giving iterator access to its internal buffer would be very
+ useful for other library components.
+
+ Iostream operations (primarily operators &lt;&lt; and &gt;&gt;) can take advantage
+ of the case where user code has not specified a locale, and bypass locale
+ operations entirely. The current implementation of op&lt;&lt;/num_put&lt;&gt;::put,
+ for the integer types, demonstrates how they can cache encoding details
+ from the locale on each operation. There is lots more room for
+ optimization in this area.
+
+ The definition of the relationship between the standard streams
+ cout et al. and stdout et al. requires something like a "stdiobuf".
+ The SGI solution of using double-indirection to actually use a
+ stdio FILE object for buffering is unsatisfactory, because it
+ interferes with peephole loop optimizations.
+
+ The &lt;sstream&gt; header work has begun. stringbuf can benefit from
+ friendship with basic_string&lt;&gt; and basic_string&lt;&gt;::_Rep to use
+ those objects directly as buffers, and avoid allocating and making
+ copies.
+
+ The basic_filebuf&lt;&gt; template is a complex beast. It is specified to
+ use the locale facet codecvt&lt;&gt; to translate characters between native
+ files and the locale character encoding. In general this involves
+ two buffers, one of "char" representing the file and another of
+ "char_type", for the stream, with codecvt&lt;&gt; translating. The process
+ is complicated by the variable-length nature of the translation, and
+ the need to seek to corresponding places in the two representations.
+ For the case of basic_filebuf&lt;char&gt;, when no translation is needed,
+ a single buffer suffices. A specialized filebuf can be used to reduce
+ code space overhead when no locale has been imbued. Matt Austern's
+ work at SGI will be useful, perhaps directly as a source of code, or
+ at least as an example to draw on.
+
+ Filebuf, almost uniquely (cf. operator new), depends heavily on
+ underlying environmental facilities. In current releases iostream
+ depends fairly heavily on libio constant definitions, but it should
+ be made independent. It also depends on operating system primitives
+ for file operations. There is immense room for optimizations using
+ (e.g.) mmap for reading. The shadow/ directory wraps, besides the
+ standard C headers, the libio.h and unistd.h headers, for use mainly
+ by filebuf. These wrappings have not been completed, though there
+ is scaffolding in place.
+
+ The encapulation of certain C header &lt;cstdio&gt; names presents an
+ interesting problem. It is possible to define an inline std::fprintf()
+ implemented in terms of the 'extern "C"' vfprintf(), but there is no
+ standard vfscanf() to use to implement std::fscanf(). It appears that
+ vfscanf but be re-implemented in C++ for targets where no vfscanf
+ extension has been defined. This is interesting in that it seems
+ to be the only significant case in the C library where this kind of
+ rewriting is necessary. (Of course Glibc provides the vfscanf()
+ extension.) (The functions related to exit() must be rewritten
+ for other reasons.)
+
+
+ Annex D
+ -------
+ Headers: &lt;strstream&gt;
+
+ Annex D defines many non-library features, and many minor
+ modifications to various headers, and a complete header.
+ It is "mostly done", except that the libstdc++-2 &lt;strstream&gt;
+ header has not been adopted into the library, or checked to
+ verify that it matches the draft in those details that were
+ clarified by the committee. Certainly it must at least be
+ moved into the std namespace.
+
+ We still need to wrap all the deprecated features in #if guards
+ so that pedantic compile modes can detect their use.
+
+ Nonstandard Extensions
+ ----------------------
+ Headers: &lt;iostream.h&gt; &lt;strstream.h&gt; &lt;hash&gt; &lt;rbtree&gt;
+ &lt;pthread_alloc&gt; &lt;stdiobuf&gt; (etc.)
+
+ User code has come to depend on a variety of nonstandard components
+ that we must not omit. Much of this code can be adopted from
+ libstdc++-v2 or from the SGI STL. This particularly includes
+ &lt;iostream.h&gt;, &lt;strstream.h&gt;, and various SGI extensions such
+ as &lt;hash_map.h&gt;. Many of these are already placed in the
+ subdirectories ext/ and backward/. (Note that it is better to
+ include them via "&lt;backward/hash_map.h&gt;" or "&lt;ext/hash_map&gt;" than
+ to search the subdirectory itself via a "-I" directive.
+ </literallayout>
+</sect1>
+
+</appendix>
diff --git a/libstdc++-v3/doc/xml/manual/appendix_free.xml b/libstdc++-v3/doc/xml/manual/appendix_free.xml
new file mode 100644
index 00000000000..038d4558e6e
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/appendix_free.xml
@@ -0,0 +1,176 @@
+<?xml version='1.0'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<appendix id="appendix.free" xreflabel="Free">
+<?dbhtml filename="appendix_free.html"?>
+
+<appendixinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</appendixinfo>
+
+<title>Free Software Needs Free Documentation</title>
+
+<para>
+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
+these systems. Many of our most important programs do not come with
+full manuals. Documentation is an essential part of any software
+package; when an important free software package does not come with a
+free manual, that is a major gap. We have many such gaps today.
+</para>
+
+<para>
+Once upon a time, many years ago, I thought I would learn Perl. I got
+a copy of a free manual, but I found it hard to read. When I asked
+Perl users about alternatives, they told me that there were better
+introductory manuals--but those were not free.
+</para>
+
+<para>
+Why was this? The authors of the good manuals had written them for
+O'Reilly Associates, which published them with restrictive terms--no
+copying, no modification, source files not available--which exclude
+them from the free software community.
+</para>
+
+<para>
+That wasn't the first time this sort of thing has happened, and (to
+our community's great loss) it was far from the last. Proprietary
+manual publishers have enticed a great many authors to restrict their
+manuals since then. Many times I have heard a GNU user eagerly tell
+me about a manual that he is writing, with which he expects to help
+the GNU project--and then had my hopes dashed, as he proceeded to
+explain that he had signed a contract with a publisher that would
+restrict it so that we cannot use it.
+</para>
+
+<para>
+Given that writing good English is a rare skill among programmers, we
+can ill afford to lose manuals this way.
+</para>
+
+<para>
+ Free documentation, like free software, is a matter of freedom,
+not price. The problem with these manuals was not that O'Reilly
+Associates charged a price for printed copies--that in itself is fine.
+(The Free Software Foundation <ulink url="http://www.gnu.org/doc/doc.html">sells printed copies</ulink> of
+free GNU manuals, too.) But GNU manuals are available in source code
+form, while these manuals are available only on paper. GNU manuals
+come with permission to copy and modify; the Perl manuals do not.
+These restrictions are the problems.
+</para>
+
+<para>
+The criterion for a free manual is pretty much the same as for free
+software: it is a matter of giving all users certain freedoms.
+Redistribution (including commercial redistribution) must be
+permitted, so that the manual can accompany every copy of the program,
+on-line or on paper. Permission for modification is crucial too.
+</para>
+
+<para>
+As a general rule, I don't believe that it is essential for people to
+have permission to modify all sorts of articles and books. The issues
+for writings are not necessarily the same as those for software. For
+example, I don't think you or I are obliged to give permission to
+modify articles like this one, which describe our actions and our
+views.
+</para>
+
+<para>
+But there is a particular reason why the freedom to modify is crucial
+for documentation for free software. When people exercise their right
+to modify the software, and add or change its features, if they are
+conscientious they will change the manual too--so they can provide
+accurate and usable documentation with the modified program. A manual
+which forbids programmers to be conscientious and finish the job, or
+more precisely requires them to write a new manual from scratch if
+they change the program, does not fill our community's needs.
+</para>
+
+<para>
+While a blanket prohibition on modification is unacceptable, some
+kinds of limits on the method of modification pose no problem. For
+example, requirements to preserve the original author's copyright
+notice, the distribution terms, or the list of authors, are ok. It is
+also no problem to require modified versions to include notice that
+they were modified, even to have entire sections that may not be
+deleted or changed, as long as these sections deal with nontechnical
+topics. (Some GNU manuals have them.)
+</para>
+
+<para>
+These kinds of restrictions are not a problem because, as a practical
+matter, they don't stop the conscientious programmer from adapting the
+manual to fit the modified program. In other words, they don't block
+the free software community from making full use of the manual.
+</para>
+
+<para>
+However, it must be possible to modify all the <emphasis>technical</emphasis>
+content of the manual, and then distribute the result in all the usual
+media, through all the usual channels; otherwise, the restrictions do
+block the community, the manual is not free, and so we need another
+manual.
+</para>
+
+<para>
+Unfortunately, it is often hard to find someone to write another
+manual when a proprietary manual exists. The obstacle is that many
+users think that a proprietary manual is good enough--so they don't
+see the need to write a free manual. They do not see that the free
+operating system has a gap that needs filling.
+</para>
+
+<para>
+Why do users think that proprietary manuals are good enough? Some
+have not considered the issue. I hope this article will do something
+to change that.
+</para>
+
+<para>
+Other users consider proprietary manuals acceptable for the same
+reason so many people consider proprietary software acceptable: they
+judge in purely practical terms, not using freedom as a criterion.
+These people are entitled to their opinions, but since those opinions
+spring from values which do not include freedom, they are no guide for
+those of us who do value freedom.
+</para>
+
+<para>
+Please spread the word about this issue. We continue to lose manuals
+to proprietary publishing. If we spread the word that proprietary
+manuals are not sufficient, perhaps the next person who wants to help
+GNU by writing documentation will realize, before it is too late, that
+he must above all make it free.
+</para>
+
+<para>
+We can also encourage commercial publishers to sell free, copylefted
+manuals instead of proprietary ones. One way you can help this is to
+check the distribution terms of a manual before you buy it, and
+prefer copylefted manuals to non-copylefted ones.
+</para>
+<para>
+[Note: We now maintain a <ulink url="http://www.fsf.org/licensing/doc/other-free-books.html">web page
+that lists free books available from other publishers</ulink>].
+</para>
+
+<para>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</para>
+
+<para>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice is preserved.</para>
+
+<para>Report any problems or suggestions to <email>webmaster@fsf.org</email>.</para>
+
+</appendix>
diff --git a/libstdc++-v3/doc/xml/manual/appendix_porting.xml b/libstdc++-v3/doc/xml/manual/appendix_porting.xml
new file mode 100644
index 00000000000..faa24125013
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/appendix_porting.xml
@@ -0,0 +1,47 @@
+<?xml version='1.0'?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<appendix id="appendix.porting" xreflabel="Porting">
+<?dbhtml filename="appendix_porting.html"?>
+
+<appendixinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</appendixinfo>
+
+<title>Porting and Maintenance</title>
+
+ <!-- Hacking the Build System -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="build_hacking.xml">
+ </xi:include>
+
+ <!-- Internals: Porting to New Hardware or Operating Systems -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="internals.xml">
+ </xi:include>
+
+ <!-- ABI Policy and Guidelines -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="abi.xml">
+ </xi:include>
+
+ <!-- API Evolution and Deprecation History -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="evolution.xml">
+ </xi:include>
+
+ <!-- Backwards Compatibility -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="backwards_compatibility.xml">
+ </xi:include>
+
+</appendix>
diff --git a/libstdc++-v3/doc/xml/manual/auto_ptr.xml b/libstdc++-v3/doc/xml/manual/auto_ptr.xml
new file mode 100644
index 00000000000..a7a0e97bc6c
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/auto_ptr.xml
@@ -0,0 +1,133 @@
+<sect1 id="manual.util.memory.auto_ptr" xreflabel="auto_ptr">
+<?dbhtml filename="auto_ptr.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ auto_ptr
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>auto_ptr</title>
+
+<sect2 id="auto_ptr.limitations" xreflabel="auto_ptr.limitations">
+<title>Limitations</title>
+
+ <para>Explaining all of the fun and delicious things that can
+ happen with misuse of the <classname>auto_ptr</classname> class
+ template (called <acronym>AP</acronym> here) would take some
+ time. Suffice it to say that the use of <acronym>AP</acronym>
+ safely in the presence of copying has some subtleties.
+ </para>
+ <para>
+ The AP class is a really
+ nifty idea for a smart pointer, but it is one of the dumbest of
+ all the smart pointers -- and that's fine.
+ </para>
+ <para>
+ AP is not meant to be a supersmart solution to all resource
+ leaks everywhere. Neither is it meant to be an effective form
+ of garbage collection (although it can help, a little bit).
+ And it can <emphasis>not</emphasis>be used for arrays!
+ </para>
+ <para>
+ <acronym>AP</acronym> is meant to prevent nasty leaks in the
+ presence of exceptions. That's <emphasis>all</emphasis>. This
+ code is AP-friendly:
+ </para>
+ <programlisting>
+ // Not a recommend naming scheme, but good for web-based FAQs.
+ typedef std::auto_ptr&lt;MyClass&gt; APMC;
+
+ extern function_taking_MyClass_pointer (MyClass*);
+ extern some_throwable_function ();
+
+ void func (int data)
+ {
+ APMC ap (new MyClass(data));
+
+ some_throwable_function(); // this will throw an exception
+
+ function_taking_MyClass_pointer (ap.get());
+ }
+ </programlisting>
+ <para>When an exception gets thrown, the instance of MyClass that's
+ been created on the heap will be <function>delete</function>'d as the stack is
+ unwound past <function>func()</function>.
+ </para>
+ <para>Changing that code as follows is not <acronym>AP</acronym>-friendly:
+ </para>
+ <programlisting>
+ APMC ap (new MyClass[22]);
+ </programlisting>
+ <para>You will get the same problems as you would without the use
+ of <acronym>AP</acronym>:
+ </para>
+ <programlisting>
+ char* array = new char[10]; // array new...
+ ...
+ delete array; // ...but single-object delete
+ </programlisting>
+ <para>
+ AP cannot tell whether the pointer you've passed at creation points
+ to one or many things. If it points to many things, you are about
+ to die. AP is trivial to write, however, so you could write your
+ own <code>auto_array_ptr</code> for that situation (in fact, this has
+ been done many times; check the mailing lists, Usenet, Boost, etc).
+ </para>
+</sect2>
+
+<sect2 id="auto_ptr.using" xreflabel="auto_ptr.using">
+<title>Use in Containers</title>
+
+ <para>
+ </para>
+ <para>All of the <ulink url="../23_containers/howto.html">containers</ulink>
+ described in the standard library require their contained types
+ to have, among other things, a copy constructor like this:
+ </para>
+ <programlisting>
+ struct My_Type
+ {
+ My_Type (My_Type const&amp;);
+ };
+ </programlisting>
+ <para>
+ Note the const keyword; the object being copied shouldn't change.
+ The template class <code>auto_ptr</code> (called AP here) does not
+ meet this requirement. Creating a new AP by copying an existing
+ one transfers ownership of the pointed-to object, which means that
+ the AP being copied must change, which in turn means that the
+ copy ctors of AP do not take const objects.
+ </para>
+ <para>
+ The resulting rule is simple: <emphasis>Never ever use a
+ container of auto_ptr objects</emphasis>. The standard says that
+ <quote>undefined</quote> behavior is the result, but it is
+ guaranteed to be messy.
+ </para>
+ <para>
+ To prevent you from doing this to yourself, the
+ <ulink url="../19_diagnostics/howto.html#3">concept checks</ulink> built
+ in to this implementation will issue an error if you try to
+ compile code like this:
+ </para>
+ <programlisting>
+ #include &lt;vector&gt;
+ #include &lt;memory&gt;
+
+ void f()
+ {
+ std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int;
+ }
+ </programlisting>
+ <para>
+Should you try this with the checks enabled, you will see an error.
+ </para>
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml b/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml
new file mode 100644
index 00000000000..49a0ca813b6
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml
@@ -0,0 +1,1315 @@
+<sect1 id="manual.appendix.porting.backwards" xreflabel="backwards">
+<?dbhtml filename="backwards.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ backwards
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Backwards Compatibility</title>
+
+<sect2 id="backwards.first" xreflabel="backwards.first">
+<title>First</title>
+
+<para>The first generation GNU C++ library was called libg++. It was a
+separate GNU project, although reliably paired with GCC. Rumors imply
+that it had a working relationship with at least two kinds of
+dinosaur.
+</para>
+
+<para>Some background: libg++ was designed and created when there was no
+ISO standard to provide guidance. Classes like linked lists are now
+provided for by <classname>list&lt;T&gt;</classname> and do not need to be
+created by <function>genclass</function>. (For that matter, templates exist
+now and are well-supported, whereas genclass (mostly) predates them.)
+</para>
+
+<para>There are other classes in libg++ that are not specified in the
+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
+<quote>obvious</quote> classes didn't get included.
+</para>
+
+<para>Known Issues include many of the limitations of its immediate ancestor.</para>
+
+<para>Portability notes and known implementation limitations are as follows.</para>
+
+<sect3>
+ <title>No <code>ios_base</code></title>
+
+<para> At least some older implementations don't have <code>std::ios_base</code>, so you should use <code>std::ios::badbit</code>, <code>std::ios::failbit</code> and <code>std::ios::eofbit</code> and <code>std::ios::goodbit</code>.
+</para>
+</sect3>
+
+<sect3>
+<title>No <code>cout</code> in <code>ostream.h</code>, no <code>cin</code> in <code>istream.h</code></title>
+
+<para>
+ In earlier versions of the standard,
+ <filename class="headerfile">fstream.h</filename>,
+ <filename class="headerfile">ostream.h</filename>
+ and <filename class="headerfile">istream.h</filename>
+ used to define
+ <code>cout</code>, <code>cin</code> and so on. ISO C++ specifies that one needs to include
+ <filename class="headerfile">iostream</filename>
+ explicitly to get the required definitions.
+ </para>
+<para> Some include adjustment may be required.</para>
+
+<para>This project is no longer maintained or supported, and the sources
+archived. For the desperate,
+the <ulink url="http://gcc.gnu.org/extensions.html">GCC extensions
+page</ulink> describes where to find the last libg++ source. The code is
+considered replaced and rewritten.
+</para>
+</sect3>
+</sect2>
+
+<sect2 id="backwards.second" xreflabel="backwards.second">
+<title>Second</title>
+
+<para>
+ The second generation GNU C++ library was called libstdc++, or
+ libstdc++-v2. It spans the time between libg++ and pre-ISO C++
+ standardization and is usually associated with the following GCC
+ releases: egcs 1.x, gcc 2.95, and gcc 2.96.
+</para>
+
+<para>
+ The STL portions of this library are based on SGI/HP STL release 3.11.
+</para>
+
+<para>
+ This project is no longer maintained or supported, and the sources
+ archived. The code is considered replaced and rewritten.
+</para>
+
+<para>
+ Portability notes and known implementation limitations are as follows.
+</para>
+
+<sect3>
+ <title>Namespace <code>std::</code> not supported</title>
+
+ <para>
+ Some care is required to support C++ compiler and or library
+ implementation that do not have the standard library in
+ <code>namespace std</code>.
+ </para>
+
+ <para>
+ The following sections list some possible solutions to support compilers
+ that cannot ignore <code>std::</code>-qualified names.
+ </para>
+
+ <para>
+ First, see if the compiler has a flag for this. Namespace
+ back-portability-issues are generally not a problem for g++
+ compilers that do not have libstdc++ in <code>std::</code>, as the
+ compilers use <code>-fno-honor-std</code> (ignore
+ <code>std::</code>, <code>:: = std::</code>) by default. That is,
+ the responsibility for enabling or disabling <code>std::</code> is
+ on the user; the maintainer does not have to care about it. This
+ probably applies to some other compilers as well.
+ </para>
+
+ <para>
+ Second, experiment with a variety of pre-processor tricks.
+ </para>
+
+ <para>
+ By defining <code>std</code> as a macro, fully-qualified namespace
+ calls become global. Volia.
+ </para>
+
+<programlisting>
+#ifdef WICKEDLY_OLD_COMPILER
+# define std
+#endif
+</programlisting>
+
+ <para>
+ Thanks to Juergen Heinzl who posted this solution on gnu.gcc.help.
+ </para>
+
+ <para>
+ Another pre-processor based approach is to define a macro
+ <code>NAMESPACE_STD</code>, which is defined to either
+ <quote> </quote> or <quote>std</quote> based on a compile-type
+ test. On GNU systems, this can be done with autotools by means of
+ an autoconf test (see below) for <code>HAVE_NAMESPACE_STD</code>,
+ then using that to set a value for the <code>NAMESPACE_STD</code>
+ macro. At that point, one is able to use
+ <code>NAMESPACE_STD::string</code>, which will evaluate to
+ <code>std::string</code> or <code>::string</code> (ie, in the
+ global namespace on systems that do not put <code>string</code> in
+ <code>std::</code>).
+ </para>
+
+<programlisting>
+dnl @synopsis AC_CXX_NAMESPACE_STD
+dnl
+dnl If the compiler supports namespace std, define
+dnl HAVE_NAMESPACE_STD.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe &lt;luc@spaceroots.org&gt;
+dnl @version 2004-02-04
+dnl @license AllPermissive
+AC_DEFUN([AC_CXX_NAMESPACE_STD], [
+ AC_CACHE_CHECK(if g++ supports namespace std,
+ ac_cv_cxx_have_std_namespace,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;iostream&gt;
+ std::istream&amp; is = std::cin;],,
+ ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_have_std_namespace" = yes; then
+ AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
+ fi
+])
+</programlisting>
+</sect3>
+
+<sect3>
+<title>Illegal iterator usage</title>
+<para>
+ The following illustrate implementation-allowed illegal iterator
+ use, and then correct use.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ you cannot do <code>ostream::operator&lt;&lt;(iterator)</code>
+ to print the address of the iterator =&gt; use
+ <code>operator&lt;&lt; &amp;*iterator</code> instead
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ you cannot clear an iterator's reference (<code>iterator =
+ 0</code>) =&gt; use <code>iterator = iterator_type();</code>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>if (iterator)</code> won't work any more =&gt; use
+ <code>if (iterator != iterator_type())</code>
+ </para>
+ </listitem>
+</itemizedlist>
+</sect3>
+
+<sect3>
+ <title><code>isspace</code> from <filename class="headerfile">cctype</filename> is a macro
+ </title>
+
+ <para>
+ Glibc 2.0.x and 2.1.x define <filename
+ class="headerfile">ctype.h</filename> functionality as macros
+ (isspace, isalpha etc.).
+ </para>
+
+ <para>
+ This implementations of libstdc++, however, keep these functions
+ as macros, and so it is not back-portable to use fully qualified
+ names. For example:
+ </para>
+
+<programlisting>
+#include &lt;cctype&gt;
+int main() { std::isspace('X'); }
+</programlisting>
+
+<para>
+ Results in something like this:
+</para>
+
+<programlisting>
+std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
+</programlisting>
+
+<para>
+ A solution is to modify a header-file so that the compiler tells
+ <filename class="headerfile">ctype.h</filename> to define functions
+ instead of macros:
+</para>
+
+<programlisting>
+// This keeps isalnum, et al from being propagated as macros.
+#if __linux__
+# define __NO_CTYPE 1
+#endif
+</programlisting>
+
+<para>
+ Then, include <filename class="headerfile">ctype.h</filename>
+</para>
+
+<para>
+ Another problem arises if you put a <code>using namespace
+ std;</code> declaration at the top, and include <filename
+ class="headerfile">ctype.h</filename>. This will result in
+ ambiguities between the definitions in the global namespace
+ (<filename class="headerfile">ctype.h</filename>) and the
+ definitions in namespace <code>std::</code>
+ (<code>&lt;cctype&gt;</code>).
+</para>
+</sect3>
+
+<sect3>
+<title>No <code>vector::at</code>, <code>deque::at</code>, <code>string::at</code></title>
+
+<para>
+ One solution is to add an autoconf-test for this:
+</para>
+
+<programlisting>
+AC_MSG_CHECKING(for container::at)
+AC_TRY_COMPILE(
+[
+#include &lt;vector&gt;
+#include &lt;deque&gt;
+#include &lt;string&gt;
+
+using namespace std;
+],
+[
+deque&lt;int&gt; test_deque(3);
+test_deque.at(2);
+vector&lt;int&gt; test_vector(2);
+test_vector.at(1);
+string test_string(<quote>test_string</quote>);
+test_string.at(3);
+],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_CONTAINER_AT)],
+[AC_MSG_RESULT(no)])
+</programlisting>
+
+<para>
+ If you are using other (non-GNU) compilers it might be a good idea
+ to check for <code>string::at</code> separately.
+</para>
+
+</sect3>
+
+<sect3>
+<title>No <code>std::char_traits&lt;char&gt;::eof</code></title>
+
+<para>
+ Use some kind of autoconf test, plus this:
+</para>
+
+<programlisting>
+#ifdef HAVE_CHAR_TRAITS
+#define CPP_EOF std::char_traits&lt;char&gt;::eof()
+#else
+#define CPP_EOF EOF
+#endif
+</programlisting>
+
+</sect3>
+
+<sect3>
+<title>No <code>string::clear</code></title>
+
+<para>
+ There are two functions for deleting the contents of a string:
+ <code>clear</code> and <code>erase</code> (the latter returns the
+ string).
+</para>
+
+<programlisting>
+void
+clear() { _M_mutate(0, this-&gt;size(), 0); }
+</programlisting>
+
+<programlisting>
+basic_string&amp;
+erase(size_type __pos = 0, size_type __n = npos)
+{
+ return this-&gt;replace(_M_check(__pos), _M_fold(__pos, __n),
+ _M_data(), _M_data());
+}
+</programlisting>
+
+<para>
+ Unfortunately, ut <code>clear</code> is not implemented in this
+ version, so you should use <code>erase</code> (which is probably
+ faster than <code>operator=(charT*)</code>).
+</para>
+</sect3>
+
+<sect3>
+<title>
+ Removal of <code>ostream::form</code> and <code>istream::scan</code>
+ extensions
+</title>
+
+<para>
+ These are no longer supported. Please use stringstreams instead.
+</para>
+</sect3>
+
+<sect3>
+<title>No <code>basic_stringbuf</code>, <code>basic_stringstream</code></title>
+
+<para>
+ Although the ISO standard <code>i/ostringstream</code>-classes are
+ provided, (<filename class="headerfile">sstream</filename>), for
+ compatibility with older implementations the pre-ISO
+ <code>i/ostrstream</code> (<filename
+ class="headerfile">strstream</filename>) interface is also provided,
+ with these caveats:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <code>strstream</code> is considered to be deprecated
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>strstream</code> is limited to <code>char</code>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ with <code>ostringstream</code> you don't have to take care of
+ terminating the string or freeing its memory
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>istringstream</code> can be re-filled (clear();
+ str(input);)
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+ You can then use output-stringstreams like this:
+</para>
+
+<programlisting>
+#ifdef HAVE_SSTREAM
+# include &lt;sstream&gt;
+#else
+# include &lt;strstream&gt;
+#endif
+
+#ifdef HAVE_SSTREAM
+ std::ostringstream oss;
+#else
+ std::ostrstream oss;
+#endif
+
+oss &lt;&lt; <quote>Name=</quote> &lt;&lt; m_name &lt;&lt; <quote>, number=</quote> &lt;&lt; m_number &lt;&lt; std::endl;
+...
+#ifndef HAVE_SSTREAM
+ oss &lt;&lt; std::ends; // terminate the char*-string
+#endif
+
+// str() returns char* for ostrstream and a string for ostringstream
+// this also causes ostrstream to think that the buffer's memory
+// is yours
+m_label.set_text(oss.str());
+#ifndef HAVE_SSTREAM
+ // let the ostrstream take care of freeing the memory
+ oss.freeze(false);
+#endif
+</programlisting>
+
+<para>
+ Input-stringstreams can be used similarly:
+</para>
+
+<programlisting>
+std::string input;
+...
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+
+int i;
+iss &gt;&gt; i;
+</programlisting>
+
+<para> One (the only?) restriction is that an istrstream cannot be re-filled:
+</para>
+
+<programlisting>
+std::istringstream iss(numerator);
+iss &gt;&gt; m_num;
+// this is not possible with istrstream
+iss.clear();
+iss.str(denominator);
+iss &gt;&gt; m_den;
+</programlisting>
+
+<para>
+If you don't care about speed, you can put these conversions in
+ a template-function:
+</para>
+<programlisting>
+template &lt;class X&gt;
+void fromString(const string&amp; input, X&amp; any)
+{
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+X temp;
+iss &gt;&gt; temp;
+if (iss.fail())
+throw runtime_error(..)
+any = temp;
+}
+</programlisting>
+
+<para>
+ Another example of using stringstreams is in <link
+ linkend="strings.string.shrink">this howto</link>.
+</para>
+
+<para> There is additional information in the libstdc++-v2 info files, in
+particular <quote>info iostream</quote>.
+</para>
+</sect3>
+
+<sect3>
+ <title>Little or no wide character support</title>
+ <para>
+ Classes <classname>wstring</classname> and
+ <classname>char_traits&lt;wchar_t&gt;</classname> are
+ not supported.
+ </para>
+</sect3>
+
+<sect3>
+ <title>No templatized iostreams</title>
+ <para>
+ Classes <classname>wfilebuf</classname> and
+ <classname>wstringstream</classname> are not supported.
+ </para>
+</sect3>
+
+<sect3>
+<title>Thread safety issues</title>
+
+ <para>
+ 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
+ command-line options and macros (both of which were somewhat
+ thread-implementation and port-specific). There were no
+ guarantees related to being able to link code compiled with one
+ set of options and macro setting with another set.
+ </para>
+
+ <para>
+ For GCC 3.0, configuration of the threading model used with
+ libraries and user-code is performed when GCC is configured and
+ built using the --enable-threads and --disable-threads options.
+ The ABI is stable for symbol name-mangling and limited functional
+ compatibility exists between code compiled under different
+ threading models.
+ </para>
+
+ <para>
+ The libstdc++ library has been designed so that it can be used in
+ multithreaded applications (with libstdc++-v2 this was only true
+ of the STL parts.) The first problem is finding a
+ <emphasis>fast</emphasis> method of implementation portable to
+ all platforms. Due to historical reasons, some of the library is
+ written against per-CPU-architecture spinlocks and other parts
+ against the gthr.h abstraction layer which is provided by gcc. A
+ minor problem that pops up every so often is different
+ interpretations of what &quot;thread-safe&quot; means for a
+ library (not a general program). We currently use the <ulink
+ url="http://www.sgi.com/tech/stl/thread_safety.html">same
+ definition that SGI</ulink> uses for their STL subset. However,
+ the exception for read-only containers only applies to the STL
+ components. This definition is widely-used and something similar
+ will be used in the next version of the C++ standard library.
+ </para>
+
+ <para>
+ Here is a small link farm to threads (no pun) in the mail
+ archives that discuss the threading problem. Each link is to the
+ first relevant message in the thread; from there you can use
+ &quot;Thread Next&quot; to move down the thread. This farm is in
+ latest-to-oldest order.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Our threading expert Loren gives a breakdown of <ulink
+ url="http://gcc.gnu.org/ml/libstdc++/2001-10/msg00024.html">the
+ six situations involving threads</ulink> for the 3.0
+ release series.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html">
+ This message</ulink> inspired a recent updating of issues with
+ threading and the SGI STL library. It also contains some
+ example POSIX-multithreaded STL code.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ (A large selection of links to older messages has been removed;
+ many of the messages from 1999 were lost in a disk crash, and the
+ few people with access to the backup tapes have been too swamped
+ with work to restore them. Many of the points have been
+ superseded anyhow.)
+ </para>
+</sect3>
+
+</sect2>
+
+<sect2 id="backwards.third" xreflabel="backwards.third">
+<title>Third</title>
+
+<para> The third generation GNU C++ library is called libstdc++, or
+libstdc++-v3.
+</para>
+
+ <para>The subset commonly known as the Standard Template Library
+ (chapters 23 through 25, mostly) is adapted from the final release
+ of the SGI STL (version 3.3), with extensive changes.
+ </para>
+
+ <para>A more formal description of the V3 goals can be found in the
+ official <ulink url="../17_intro/DESIGN">design document</ulink>.
+ </para>
+
+<para>Portability notes and known implementation limitations are as follows.</para>
+
+<sect3>
+<title>Pre-ISO headers moved to backwards or removed</title>
+
+<para> The pre-ISO C++ headers
+ (<code>iostream.h</code>, <code>defalloc.h</code> etc.) are
+ available, unlike previous libstdc++ versions, but inclusion
+ generates a warning that you are using deprecated headers.
+</para>
+
+ <para>This compatibility layer is constructed by including the
+ standard C++ headers, and injecting any items in
+ <code>std::</code> into the global namespace.
+ </para>
+ <para>For those of you new to ISO C++ (welcome, time travelers!), no,
+ that isn't a typo. Yes, the headers really have new names.
+ Marshall Cline's C++ FAQ Lite has a good explanation in <ulink url="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4">item
+ [27.4]</ulink>.
+ </para>
+
+<para> Some include adjustment may be required. What follows is an
+autoconf test that defines <code>PRE_STDCXX_HEADERS</code> when they
+exist.</para>
+
+<programlisting>
+# AC_HEADER_PRE_STDCXX
+AC_DEFUN([AC_HEADER_PRE_STDCXX], [
+ AC_CACHE_CHECK(for pre-ISO C++ include files,
+ ac_cv_cxx_pre_stdcxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Wno-deprecated"
+
+ # Omit defalloc.h, as compilation with newer compilers is problematic.
+ AC_TRY_COMPILE([
+ #include &lt;new.h&gt;
+ #include &lt;iterator.h&gt;
+ #include &lt;alloc.h&gt;
+ #include &lt;set.h&gt;
+ #include &lt;hashtable.h&gt;
+ #include &lt;hash_set.h&gt;
+ #include &lt;fstream.h&gt;
+ #include &lt;tempbuf.h&gt;
+ #include &lt;istream.h&gt;
+ #include &lt;bvector.h&gt;
+ #include &lt;stack.h&gt;
+ #include &lt;rope.h&gt;
+ #include &lt;complex.h&gt;
+ #include &lt;ostream.h&gt;
+ #include &lt;heap.h&gt;
+ #include &lt;iostream.h&gt;
+ #include &lt;function.h&gt;
+ #include &lt;multimap.h&gt;
+ #include &lt;pair.h&gt;
+ #include &lt;stream.h&gt;
+ #include &lt;iomanip.h&gt;
+ #include &lt;slist.h&gt;
+ #include &lt;tree.h&gt;
+ #include &lt;vector.h&gt;
+ #include &lt;deque.h&gt;
+ #include &lt;multiset.h&gt;
+ #include &lt;list.h&gt;
+ #include &lt;map.h&gt;
+ #include &lt;algobase.h&gt;
+ #include &lt;hash_map.h&gt;
+ #include &lt;algo.h&gt;
+ #include &lt;queue.h&gt;
+ #include &lt;streambuf.h&gt;
+ ],,
+ ac_cv_cxx_pre_stdcxx=yes, ac_cv_cxx_pre_stdcxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_pre_stdcxx" = yes; then
+ AC_DEFINE(PRE_STDCXX_HEADERS,,[Define if pre-ISO C++ header files are present. ])
+ fi
+])
+</programlisting>
+
+<para>Porting between pre-ISO headers and ISO headers is simple: headers
+like <filename class="headerfile">vector.h</filename> can be replaced with <filename class="headerfile">vector</filename> and a using
+directive <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.
+</para>
+</sect3>
+
+<sect3>
+<title>Extension headers hash_map, hash_set moved to ext or backwards</title>
+
+ <para>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
+ containers in the SGI STL.
+ </para>
+<para> Header files <filename class="headerfile">hash_map</filename> and <filename class="headerfile">hash_set</filename> moved
+to <filename class="headerfile">ext/hash_map</filename> and <filename class="headerfile">ext/hash_set</filename>,
+respectively. At the same time, all types in these files are enclosed
+in <code>namespace __gnu_cxx</code>. Later versions move deprecate
+these files, and suggest using TR1's <filename class="headerfile">unordered_map</filename>
+and <filename class="headerfile">unordered_set</filename> instead.
+</para>
+
+ <para>The extensions are no longer in the global or <code>std</code>
+ namespaces, instead they are declared in the <code>__gnu_cxx</code>
+ namespace. For maximum portability, consider defining a namespace
+ alias to use to talk about extensions, e.g.:
+ </para>
+ <programlisting>
+ #ifdef __GNUC__
+ #if __GNUC__ &lt; 3
+ #include &lt;hash_map.h&gt;
+ namespace extension { using ::hash_map; }; // inherit globals
+ #else
+ #include &lt;backward/hash_map&gt;
+ #if __GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ == 0
+ namespace extension = std; // GCC 3.0
+ #else
+ namespace extension = ::__gnu_cxx; // GCC 3.1 and later
+ #endif
+ #endif
+ #else // ... there are other compilers, right?
+ namespace extension = std;
+ #endif
+
+ extension::hash_map&lt;int,int&gt; my_map;
+ </programlisting>
+ <para>This is a bit cleaner than defining typedefs for all the
+ instantiations you might need.
+ </para>
+
+
+<para>The following autoconf tests check for working HP/SGI hash containers.
+</para>
+
+<programlisting>
+# AC_HEADER_EXT_HASH_MAP
+AC_DEFUN([AC_HEADER_EXT_HASH_MAP], [
+ AC_CACHE_CHECK(for ext/hash_map,
+ ac_cv_cxx_ext_hash_map,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror"
+ AC_TRY_COMPILE([#include &lt;ext/hash_map&gt;], [using __gnu_cxx::hash_map;],
+ ac_cv_cxx_ext_hash_map=yes, ac_cv_cxx_ext_hash_map=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_ext_hash_map" = yes; then
+ AC_DEFINE(HAVE_EXT_HASH_MAP,,[Define if ext/hash_map is present. ])
+ fi
+])
+</programlisting>
+
+<programlisting>
+# AC_HEADER_EXT_HASH_SET
+AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
+ AC_CACHE_CHECK(for ext/hash_set,
+ ac_cv_cxx_ext_hash_set,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -Werror"
+ AC_TRY_COMPILE([#include &lt;ext/hash_set&gt;], [using __gnu_cxx::hash_set;],
+ ac_cv_cxx_ext_hash_set=yes, ac_cv_cxx_ext_hash_set=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_ext_hash_set" = yes; then
+ AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
+ fi
+])
+</programlisting>
+</sect3>
+
+<sect3>
+<title>No <code>ios::nocreate/ios::noreplace</code>.
+</title>
+
+<para> The existence of <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
+it can be left out for input-streams.
+</para>
+
+<para>For output streams, <quote>nocreate</quote> is probably the default,
+unless you specify <code>std::ios::trunc</code> ? To be safe, you can
+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>app</code>, <code>ate</code>
+and <code>trunc</code> (except for <code>app</code> ?).
+</para>
+</sect3>
+
+<sect3>
+<title>
+No <code>stream::attach(int fd)</code>
+</title>
+
+<para>
+ Phil Edwards writes: It was considered and rejected for the ISO
+ standard. Not all environments use file descriptors. Of those
+ that do, not all of them use integers to represent them.
+ </para>
+
+<para>
+ For a portable solution (among systems which use
+ filedescriptors), you need to implement a subclass of
+ <code>std::streambuf</code> (or
+ <code>std::basic_streambuf&lt;..&gt;</code>) which opens a file
+ given a descriptor, and then pass an instance of this to the
+ stream-constructor.
+ </para>
+
+<para>
+ An extension is available that implements this.
+ <filename class="headerfile">ext/stdio_filebuf.h</filename> contains a derived class called
+ <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html"><code>__gnu_cxx::stdio_filebuf</code></ulink>.
+ This class can be constructed from a C <code>FILE*</code> or a file
+ descriptor, and provides the <code>fd()</code> function.
+ </para>
+
+<para>
+ For another example of this, refer to
+ <ulink url="http://www.josuttis.com/cppcode/fdstream.html">fdstream example</ulink>
+ by Nicolai Josuttis.
+</para>
+</sect3>
+
+<sect3>
+<title>
+Support for C++98 dialect.
+</title>
+
+<para>Check for complete library coverage of the C++1998/2003 standard.
+</para>
+
+<programlisting>
+# AC_HEADER_STDCXX_98
+AC_DEFUN([AC_HEADER_STDCXX_98], [
+ AC_CACHE_CHECK(for ISO C++ 98 include files,
+ ac_cv_cxx_stdcxx_98,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include &lt;cassert&gt;
+ #include &lt;cctype&gt;
+ #include &lt;cerrno&gt;
+ #include &lt;cfloat&gt;
+ #include &lt;ciso646&gt;
+ #include &lt;climits&gt;
+ #include &lt;clocale&gt;
+ #include &lt;cmath&gt;
+ #include &lt;csetjmp&gt;
+ #include &lt;csignal&gt;
+ #include &lt;cstdarg&gt;
+ #include &lt;cstddef&gt;
+ #include &lt;cstdio&gt;
+ #include &lt;cstdlib&gt;
+ #include &lt;cstring&gt;
+ #include &lt;ctime&gt;
+
+ #include &lt;algorithm&gt;
+ #include &lt;bitset&gt;
+ #include &lt;complex&gt;
+ #include &lt;deque&gt;
+ #include &lt;exception&gt;
+ #include &lt;fstream&gt;
+ #include &lt;functional&gt;
+ #include &lt;iomanip&gt;
+ #include &lt;ios&gt;
+ #include &lt;iosfwd&gt;
+ #include &lt;iostream&gt;
+ #include &lt;istream&gt;
+ #include &lt;iterator&gt;
+ #include &lt;limits&gt;
+ #include &lt;list&gt;
+ #include &lt;locale&gt;
+ #include &lt;map&gt;
+ #include &lt;memory&gt;
+ #include &lt;new&gt;
+ #include &lt;numeric&gt;
+ #include &lt;ostream&gt;
+ #include &lt;queue&gt;
+ #include &lt;set&gt;
+ #include &lt;sstream&gt;
+ #include &lt;stack&gt;
+ #include &lt;stdexcept&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;string&gt;
+ #include &lt;typeinfo&gt;
+ #include &lt;utility&gt;
+ #include &lt;valarray&gt;
+ #include &lt;vector&gt;
+ ],,
+ ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_stdcxx_98" = yes; then
+ AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
+ fi
+])
+</programlisting>
+</sect3>
+
+<sect3>
+<title>
+Support for C++TR1 dialect.
+</title>
+
+<para>Check for library coverage of the TR1 standard.
+</para>
+
+<programlisting>
+# AC_HEADER_STDCXX_TR1
+AC_DEFUN([AC_HEADER_STDCXX_TR1], [
+ AC_CACHE_CHECK(for ISO C++ TR1 include files,
+ ac_cv_cxx_stdcxx_tr1,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include &lt;tr1/array&gt;
+ #include &lt;tr1/ccomplex&gt;
+ #include &lt;tr1/cctype&gt;
+ #include &lt;tr1/cfenv&gt;
+ #include &lt;tr1/cfloat&gt;
+ #include &lt;tr1/cinttypes&gt;
+ #include &lt;tr1/climits&gt;
+ #include &lt;tr1/cmath&gt;
+ #include &lt;tr1/complex&gt;
+ #include &lt;tr1/cstdarg&gt;
+ #include &lt;tr1/cstdbool&gt;
+ #include &lt;tr1/cstdint&gt;
+ #include &lt;tr1/cstdio&gt;
+ #include &lt;tr1/cstdlib&gt;
+ #include &lt;tr1/ctgmath&gt;
+ #include &lt;tr1/ctime&gt;
+ #include &lt;tr1/cwchar&gt;
+ #include &lt;tr1/cwctype&gt;
+ #include &lt;tr1/functional&gt;
+ #include &lt;tr1/memory&gt;
+ #include &lt;tr1/random&gt;
+ #include &lt;tr1/regex&gt;
+ #include &lt;tr1/tuple&gt;
+ #include &lt;tr1/type_traits&gt;
+ #include &lt;tr1/unordered_set&gt;
+ #include &lt;tr1/unordered_map&gt;
+ #include &lt;tr1/utility&gt;
+ ],,
+ ac_cv_cxx_stdcxx_tr1=yes, ac_cv_cxx_stdcxx_tr1=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_stdcxx_tr1" = yes; then
+ AC_DEFINE(STDCXX_TR1_HEADERS,,[Define if ISO C++ TR1 header files are present. ])
+ fi
+])
+</programlisting>
+
+<para>An alternative is to check just for specific TR1 includes, such as &lt;unordered_map&gt; and &lt;unordered_set&gt;.
+</para>
+
+<programlisting>
+# AC_HEADER_TR1_UNORDERED_MAP
+AC_DEFUN([AC_HEADER_TR1_UNORDERED_MAP], [
+ AC_CACHE_CHECK(for tr1/unordered_map,
+ ac_cv_cxx_tr1_unordered_map,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;tr1/unordered_map&gt;], [using std::tr1::unordered_map;],
+ ac_cv_cxx_tr1_unordered_map=yes, ac_cv_cxx_tr1_unordered_map=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_tr1_unordered_map" = yes; then
+ AC_DEFINE(HAVE_TR1_UNORDERED_MAP,,[Define if tr1/unordered_map is present. ])
+ fi
+])
+</programlisting>
+
+<programlisting>
+# AC_HEADER_TR1_UNORDERED_SET
+AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
+ AC_CACHE_CHECK(for tr1/unordered_set,
+ ac_cv_cxx_tr1_unordered_set,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include &lt;tr1/unordered_set&gt;], [using std::tr1::unordered_set;],
+ ac_cv_cxx_tr1_unordered_set=yes, ac_cv_cxx_tr1_unordered_set=no)
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_tr1_unordered_set" = yes; then
+ AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
+ fi
+])
+</programlisting>
+</sect3>
+
+
+<sect3>
+<title>
+Support for C++0x dialect.
+</title>
+
+<para>Check for baseline language coverage in the compiler for the C++0xstandard.
+</para>
+
+<programlisting>
+# AC_COMPILE_STDCXX_OX
+AC_DEFUN([AC_COMPILE_STDCXX_0X], [
+ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
+ ac_cv_cxx_compile_cxx0x_native,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
+ ac_cv_cxx_compile_cxx0x_cxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
+ ac_cv_cxx_compile_cxx0x_gxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([
+ template &lt;typename T&gt;
+ struct check
+ {
+ static_assert(sizeof(int) &lt;= sizeof(T), "not big enough");
+ };
+
+ typedef check&lt;check&lt;bool&gt;&gt; right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check&lt;int&gt; check_type;
+ check_type c;
+ check_type&amp;&amp; cr = c;],,
+ ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
+ test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
+ test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
+ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
+ fi
+])
+</programlisting>
+
+
+<para>Check for library coverage of the C++0xstandard.
+</para>
+
+<programlisting>
+# AC_HEADER_STDCXX_0X
+AC_DEFUN([AC_HEADER_STDCXX_0X], [
+ AC_CACHE_CHECK(for ISO C++ 0x include files,
+ ac_cv_cxx_stdcxx_0x,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+
+ AC_TRY_COMPILE([
+ #include &lt;cassert&gt;
+ #include &lt;ccomplex&gt;
+ #include &lt;cctype&gt;
+ #include &lt;cerrno&gt;
+ #include &lt;cfenv&gt;
+ #include &lt;cfloat&gt;
+ #include &lt;cinttypes&gt;
+ #include &lt;ciso646&gt;
+ #include &lt;climits&gt;
+ #include &lt;clocale&gt;
+ #include &lt;cmath&gt;
+ #include &lt;csetjmp&gt;
+ #include &lt;csignal&gt;
+ #include &lt;cstdarg&gt;
+ #include &lt;cstdbool&gt;
+ #include &lt;cstddef&gt;
+ #include &lt;cstdint&gt;
+ #include &lt;cstdio&gt;
+ #include &lt;cstdlib&gt;
+ #include &lt;cstring&gt;
+ #include &lt;ctgmath&gt;
+ #include &lt;ctime&gt;
+ #include &lt;cwchar&gt;
+ #include &lt;cwctype&gt;
+
+ #include &lt;algorithm&gt;
+ #include &lt;array&gt;
+ #include &lt;bitset&gt;
+ #include &lt;complex&gt;
+ #include &lt;deque&gt;
+ #include &lt;exception&gt;
+ #include &lt;fstream&gt;
+ #include &lt;functional&gt;
+ #include &lt;iomanip&gt;
+ #include &lt;ios&gt;
+ #include &lt;iosfwd&gt;
+ #include &lt;iostream&gt;
+ #include &lt;istream&gt;
+ #include &lt;iterator&gt;
+ #include &lt;limits&gt;
+ #include &lt;list&gt;
+ #include &lt;locale&gt;
+ #include &lt;map&gt;
+ #include &lt;memory&gt;
+ #include &lt;new&gt;
+ #include &lt;numeric&gt;
+ #include &lt;ostream&gt;
+ #include &lt;queue&gt;
+ #include &lt;random&gt;
+ #include &lt;regex&gt;
+ #include &lt;set&gt;
+ #include &lt;sstream&gt;
+ #include &lt;stack&gt;
+ #include &lt;stdexcept&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;string&gt;
+ #include &lt;tuple&gt;
+ #include &lt;typeinfo&gt;
+ #include &lt;type_traits&gt;
+ #include &lt;unordered_map&gt;
+ #include &lt;unordered_set&gt;
+ #include &lt;utility&gt;
+ #include &lt;valarray&gt;
+ #include &lt;vector&gt;
+ ],,
+ ac_cv_cxx_stdcxx_0x=yes, ac_cv_cxx_stdcxx_0x=no)
+ AC_LANG_RESTORE
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ])
+ if test "$ac_cv_cxx_stdcxx_0x" = yes; then
+ AC_DEFINE(STDCXX_0X_HEADERS,,[Define if ISO C++ 0x header files are present. ])
+ fi
+])
+</programlisting>
+
+<para>As is the case for TR1 support, these autoconf macros can be made for a finer-grained, per-header-file check. For &lt;unordered_map&gt;
+</para>
+
+<programlisting>
+# AC_HEADER_UNORDERED_MAP
+AC_DEFUN([AC_HEADER_UNORDERED_MAP], [
+ AC_CACHE_CHECK(for unordered_map,
+ ac_cv_cxx_unordered_map,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([#include &lt;unordered_map&gt;], [using std::unordered_map;],
+ ac_cv_cxx_unordered_map=yes, ac_cv_cxx_unordered_map=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_unordered_map" = yes; then
+ AC_DEFINE(HAVE_UNORDERED_MAP,,[Define if unordered_map is present. ])
+ fi
+])
+</programlisting>
+
+<programlisting>
+# AC_HEADER_UNORDERED_SET
+AC_DEFUN([AC_HEADER_UNORDERED_SET], [
+ AC_CACHE_CHECK(for unordered_set,
+ ac_cv_cxx_unordered_set,
+ [AC_REQUIRE([AC_COMPILE_STDCXX_0X])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([#include &lt;unordered_set&gt;], [using std::unordered_set;],
+ ac_cv_cxx_unordered_set=yes, ac_cv_cxx_unordered_set=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test "$ac_cv_cxx_unordered_set" = yes; then
+ AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
+ fi
+])
+</programlisting>
+</sect3>
+
+<sect3>
+<title>
+ Container::iterator_type is not necessarily Container::value_type*
+</title>
+
+<para>
+ This is a change in behavior from the previous version. Now, most
+ <type>iterator_type</type> typedefs in container classes are POD
+ objects, not <type>value_type</type> pointers.
+</para>
+</sect3>
+
+</sect2>
+
+<bibliography id="backwards.biblio" xreflabel="backwards.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <abbrev>
+ kegel41
+ </abbrev>
+
+ <title>
+ Migrating to GCC 4.1
+ </title>
+
+ <author>
+ <firstname>Dan</firstname>
+ <surname>Kegel</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://www.kegel.com/gcc/gcc4.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <abbrev>
+ kegel41
+ </abbrev>
+
+ <title>
+ Building the Whole Debian Archive with GCC 4.1: A Summary
+ </title>
+
+ <author>
+ <firstname>Martin</firstname>
+ <surname>Michlmayr</surname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://lists.debian.org/debian-gcc/2006/03/msg00405.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <abbrev>
+ lbl32
+ </abbrev>
+
+ <title>
+ Migration guide for GCC-3.2
+ </title>
+
+ <biblioid>
+ <ulink url="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml b/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
new file mode 100644
index 00000000000..e05fc16c56a
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
@@ -0,0 +1,559 @@
+<sect1 id="manual.ext.allocator.bitmap" xreflabel="mt allocator">
+<?dbhtml filename="bitmap_allocator.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ allocator
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>bitmap_allocator</title>
+
+<para>
+</para>
+
+<sect2 id="allocator.bitmap.design" xreflabel="allocator.bitmap.design">
+<title>Design</title>
+
+ <para>
+ 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
+ purposes.
+ </para>
+ <para>
+ This allocator will make use of 1 single bit to keep track of
+ whether it has been allocated or not. A bit 1 indicates free,
+ while 0 indicates allocated. This has been done so that you can
+ easily check a collection of bits for a free block. This kind of
+ Bitmapped strategy works best for single object allocations, and
+ with the STL type parameterized allocators, we do not need to
+ choose any size for the block which will be represented by a
+ single bit. This will be the size of the parameter around which
+ the allocator has been parameterized. Thus, close to optimal
+ performance will result. Hence, this should be used for node based
+ containers which call the allocate function with an argument of 1.
+ </para>
+
+ <para>
+ The bitmapped allocator's internal pool is exponentially growing.
+ Meaning that internally, the blocks acquired from the Free List
+ Store will double every time the bitmapped allocator runs out of
+ memory.
+ </para>
+
+ <para>
+ The macro <literal>__GTHREADS</literal> decides whether to use
+ Mutex Protection around every allocation/deallocation. The state
+ of the macro is picked up automatically from the gthr abstraction
+ layer.
+ </para>
+
+</sect2>
+
+<sect2 id="allocator.bitmap.impl" xreflabel="allocator.bitmap.impl">
+<title>Implementation</title>
+
+<sect3 id="bitmap.impl.free_list_store" xreflabel="Free List Store">
+ <title>Free List Store</title>
+
+ <para>
+ The Free List Store (referred to as FLS for the remaining part of this
+ document) is the Global memory pool that is shared by all instances of
+ the bitmapped allocator instantiated for any type. This maintains a
+ sorted order of all free memory blocks given back to it by the
+ bitmapped allocator, and is also responsible for giving memory to the
+ bitmapped allocator when it asks for more.
+ </para>
+ <para>
+ Internally, there is a Free List threshold which indicates the
+ Maximum number of free lists that the FLS can hold internally
+ (cache). Currently, this value is set at 64. So, if there are
+ more than 64 free lists coming in, then some of them will be given
+ back to the OS using operator delete so that at any given time the
+ Free List's size does not exceed 64 entries. This is done because
+ a Binary Search is used to locate an entry in a free list when a
+ request for memory comes along. Thus, the run-time complexity of
+ the search would go up given an increasing size, for 64 entries
+ however, lg(64) == 6 comparisons are enough to locate the correct
+ free list if it exists.
+ </para>
+ <para>
+ Suppose the free list size has reached it's threshold, then the
+ largest block from among those in the list and the new block will
+ be selected and given back to the OS. This is done because it
+ reduces external fragmentation, and allows the OS to use the
+ larger blocks later in an orderly fashion, possibly merging them
+ later. Also, on some systems, large blocks are obtained via calls
+ to mmap, so giving them back to free system resources becomes most
+ important.
+ </para>
+ <para>
+ The function _S_should_i_give decides the policy that determines
+ whether the current block of memory should be given to the
+ allocator for the request that it has made. That's because we may
+ not always have exact fits for the memory size that the allocator
+ requests. We do this mainly to prevent external fragmentation at
+ the cost of a little internal fragmentation. Now, the value of
+ this internal fragmentation has to be decided by this function. I
+ can see 3 possibilities right now. Please add more as and when you
+ find better strategies.
+ </para>
+
+<orderedlist>
+ <listitem><para>Equal size check. Return true only when the 2 blocks are of equal
+size.</para></listitem>
+ <listitem><para>Difference Threshold: Return true only when the _block_size is
+greater than or equal to the _required_size, and if the _BS is &gt; _RS
+by a difference of less than some THRESHOLD value, then return true,
+else return false. </para></listitem>
+ <listitem><para>Percentage Threshold. Return true only when the _block_size is
+greater than or equal to the _required_size, and if the _BS is &gt; _RS
+by a percentage of less than some THRESHOLD value, then return true,
+else return false.</para></listitem>
+</orderedlist>
+
+ <para>
+ Currently, (3) is being used with a value of 36% Maximum wastage per
+ Super Block.
+ </para>
+</sect3>
+
+<sect3 id="bitmap.impl.super_block" xreflabel="Super Block">
+ <title>Super Block</title>
+
+ <para>
+ A super block is the block of memory acquired from the FLS from
+ which the bitmap allocator carves out memory for single objects
+ and satisfies the user's requests. These super blocks come in
+ sizes that are powers of 2 and multiples of 32
+ (_Bits_Per_Block). Yes both at the same time! That's because the
+ next super block acquired will be 2 times the previous one, and
+ also all super blocks have to be multiples of the _Bits_Per_Block
+ value.
+ </para>
+ <para>
+ How does it interact with the free list store?
+ </para>
+ <para>
+ The super block is contained in the FLS, and the FLS is responsible for
+ getting / returning Super Bocks to and from the OS using operator new
+ as defined by the C++ standard.
+ </para>
+</sect3>
+
+<sect3 id="bitmap.impl.super_block_data" xreflabel="Super Block Data">
+ <title>Super Block Data Layout</title>
+ <para>
+ Each Super Block will be of some size that is a multiple of the
+ number of Bits Per Block. Typically, this value is chosen as
+ Bits_Per_Byte x sizeof(size_t). On an x86 system, this gives the
+ figure 8 x 4 = 32. Thus, each Super Block will be of size 32
+ x Some_Value. This Some_Value is sizeof(value_type). For now, let
+ it be called 'K'. Thus, finally, Super Block size is 32 x K bytes.
+ </para>
+ <para>
+ This value of 32 has been chosen because each size_t has 32-bits
+ and Maximum use of these can be made with such a figure.
+ </para>
+ <para>
+ 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).
+ </para>
+
+<table frame='all'>
+<title>Bitmap Allocator Memory Map</title>
+<tgroup cols='5' 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>
+
+<tbody>
+ <row>
+ <entry>268</entry>
+ <entry>0</entry>
+ <entry>4294967295</entry>
+ <entry>4294967295</entry>
+ <entry>Data -&gt; Space for 64 ints</entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+ <para>
+ 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
+ bitmap allocator. It is this Free List Store that is responsible
+ for writing and managing this information. Actually the number of
+ bytes allocated in this case would be: 4 + 4 + (4x2) + (64x4) =
+ 272 bytes, but the first 4 bytes are an addition by the Free List
+ Store, so the Bitmap Allocator sees only 268 bytes. These first 4
+ bytes about which the bitmapped allocator is not aware hold the
+ value 268.
+ </para>
+
+ <para>
+ What do the remaining values represent?</para>
+ <para>
+ The 2nd 4 in the expression is the sizeof(size_t) because the
+ Bitmapped Allocator maintains a used count for each Super Block,
+ which is initially set to 0 (as indicated in the diagram). This is
+ incremented every time a block is removed from this super block
+ (allocated), and decremented whenever it is given back. So, when
+ the used count falls to 0, the whole super block will be given
+ back to the Free List Store.
+ </para>
+ <para>
+ The value 4294967295 represents the integer corresponding to the bit
+ representation of all bits set: 11111111111111111111111111111111.
+ </para>
+ <para>
+ The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits
+ x 2,
+ which is 8-bytes, or 2 x sizeof(size_t).
+ </para>
+</sect3>
+
+<sect3 id="bitmap.impl.max_wasted" xreflabel="Max Wasted Percentage">
+ <title>Maximum Wasted Percentage</title>
+
+ <para>
+ This has nothing to do with the algorithm per-se,
+ only with some vales that must be chosen correctly to ensure that the
+ allocator performs well in a real word scenario, and maintains a good
+ balance between the memory consumption and the allocation/deallocation
+ speed.
+ </para>
+ <para>
+ The formula for calculating the maximum wastage as a percentage:
+ </para>
+
+ <para>
+(32 x k + 1) / (2 x (32 x k + 1 + 32 x c)) x 100.
+ </para>
+
+ <para>
+ Where, k =&gt; The constant overhead per node. eg. for list, it is
+ 8 bytes, and for map it is 12 bytes. c =&gt; The size of the
+ base type on which the map/list is instantiated. Thus, suppose the
+ type1 is int and type2 is double, they are related by the relation
+ sizeof(double) == 2*sizeof(int). Thus, all types must have this
+ double size relation for this formula to work properly.
+ </para>
+ <para>
+ Plugging-in: For List: k = 8 and c = 4 (int and double), we get:
+ 33.376%
+ </para>
+
+ <para>
+For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
+ </para>
+ <para>
+ Thus, knowing these values, and based on the sizeof(value_type), we may
+ create a function that returns the Max_Wastage_Percentage for us to use.
+ </para>
+
+</sect3>
+
+<sect3 id="bitmap.impl.allocate" xreflabel="Allocate">
+ <title><function>allocate</function></title>
+
+ <para>
+ The allocate function is specialized for single object allocation
+ ONLY. Thus, ONLY if n == 1, will the bitmap_allocator's
+ specialized algorithm be used. Otherwise, the request is satisfied
+ directly by calling operator new.
+ </para>
+ <para>
+ Suppose n == 1, then the allocator does the following:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Checks to see whether a free block exists somewhere in a region
+ of memory close to the last satisfied request. If so, then that
+ block is marked as allocated in the bit map and given to the
+ user. If not, then (2) is executed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Is there a free block anywhere after the current block right
+ up to the end of the memory that we have? If so, that block is
+ found, and the same procedure is applied as above, and
+ returned to the user. If not, then (3) is executed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Is there any block in whatever region of memory that we own
+ free? This is done by checking
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The use count for each super block, and if that fails then
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The individual bit-maps for each super block.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Note: Here we are never touching any of the memory that the
+ user will be given, and we are confining all memory accesses
+ to a small region of memory! This helps reduce cache
+ misses. If this succeeds then we apply the same procedure on
+ that bit-map as (1), and return that block of memory to the
+ user. However, if this process fails, then we resort to (4).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ This process involves Refilling the internal exponentially
+ growing memory pool. The said effect is achieved by calling
+ _S_refill_pool which does the following:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Gets more memory from the Global Free List of the Required
+ size.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Adjusts the size for the next call to itself.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Writes the appropriate headers in the bit-maps.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Sets the use count for that super-block just allocated to 0
+ (zero).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ All of the above accounts to maintaining the basic invariant
+ for the allocator. If the invariant is maintained, we are
+ sure that all is well. Now, the same process is applied on
+ the newly acquired free blocks, which are dispatched
+ accordingly.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+</orderedlist>
+
+<para>
+Thus, you can clearly see that the allocate function is nothing but a
+combination of the next-fit and first-fit algorithm optimized ONLY for
+single object allocations.
+</para>
+
+</sect3>
+
+<sect3 id="bitmap.impl.deallocate" xreflabel="Deallocate">
+ <title><function>deallocate</function></title>
+ <para>
+ The deallocate function again is specialized for single objects ONLY.
+ For all n belonging to &gt; 1, the operator delete is called without
+ further ado, and the deallocate function returns.
+ </para>
+ <para>
+ However for n == 1, a series of steps are performed:
+ </para>
+
+ <orderedlist>
+ <listitem><para>
+ We first need to locate that super-block which holds the memory
+ location given to us by the user. For that purpose, we maintain
+ a static variable _S_last_dealloc_index, which holds the index
+ into the vector of block pairs which indicates the index of the
+ last super-block from which memory was freed. We use this
+ strategy in the hope that the user will deallocate memory in a
+ region close to what he/she deallocated the last time around. If
+ the check for belongs_to succeeds, then we determine the bit-map
+ for the given pointer, and locate the index into that bit-map,
+ and mark that bit as free by setting it.
+ </para></listitem>
+ <listitem><para>
+ If the _S_last_dealloc_index does not point to the memory block
+ that we're looking for, then we do a linear search on the block
+ stored in the vector of Block Pairs. This vector in code is
+ called _S_mem_blocks. When the corresponding super-block is
+ found, we apply the same procedure as we did for (1) to mark the
+ block as free in the bit-map.
+ </para></listitem>
+ </orderedlist>
+
+ <para>
+ Now, whenever a block is freed, the use count of that particular
+ super block goes down by 1. When this use count hits 0, we remove
+ that super block from the list of all valid super blocks stored in
+ the vector. While doing this, we also make sure that the basic
+ invariant is maintained by making sure that _S_last_request and
+ _S_last_dealloc_index point to valid locations within the vector.
+ </para>
+</sect3>
+
+<sect3 id="bitmap.impl.questions" xreflabel="Questions">
+ <title>Questions</title>
+
+ <sect4 id="bitmap.impl.question.1" xreflabel="Question 1">
+ <title>1</title>
+ <para>
+Q1) The "Data Layout" section is
+cryptic. I have no idea of what you are trying to say. Layout of what?
+The free-list? Each bitmap? The Super Block?
+ </para>
+ <para>
+ The layout of a Super Block of a given
+size. In the example, a super block of size 32 x 1 is taken. The
+general formula for calculating the size of a super block is
+32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit
+systems.
+ </para>
+ </sect4>
+
+ <sect4 id="bitmap.impl.question.2" xreflabel="Question 2">
+ <title>2</title>
+ <para>
+ And since I just mentioned the
+term `each bitmap', what in the world is meant by it? What does each
+bitmap manage? How does it relate to the super block? Is the Super
+Block a bitmap as well?
+ </para>
+ <para>
+ Each bitmap is part of a Super Block which is made up of 3 parts
+ as I have mentioned earlier. Re-iterating, 1. The use count,
+ 2. The bit-map for that Super Block. 3. The actual memory that
+ will be eventually given to the user. Each bitmap is a multiple
+ of 32 in size. If there are 32 x (2^3) blocks of single objects
+ to be given, there will be '32 x (2^3)' bits present. Each 32
+ bits managing the allocated / free status for 32 blocks. Since
+ each size_t contains 32-bits, one size_t can manage up to 32
+ blocks' status. Each bit-map is made up of a number of size_t,
+ whose exact number for a super-block of a given size I have just
+ mentioned.
+ </para>
+ </sect4>
+
+ <sect4 id="bitmap.impl.question.3" xreflabel="Question 3">
+ <title>3</title>
+ <para>
+ How do the allocate and deallocate functions work in regard to
+ bitmaps?
+ </para>
+ <para>
+ The allocate and deallocate functions manipulate the bitmaps and
+ have nothing to do with the memory that is given to the user. As
+ I have earlier mentioned, a 1 in the bitmap's bit field
+ indicates free, while a 0 indicates allocated. This lets us
+ check 32 bits at a time to check whether there is at lease one
+ free block in those 32 blocks by testing for equality with
+ (0). Now, the allocate function will given a memory block find
+ the corresponding bit in the bitmap, and will reset it (i.e.,
+ make it re-set (0)). And when the deallocate function is called,
+ it will again set that bit after locating it to indicate that
+ that particular block corresponding to this bit in the bit-map
+ is not being used by anyone, and may be used to satisfy future
+ requests.
+ </para>
+ <para>
+ e.g.: Consider a bit-map of 64-bits as represented below:
+ 1111111111111111111111111111111111111111111111111111111111111111
+ </para>
+
+ <para>
+ Now, when the first request for allocation of a single object
+ comes along, the first block in address order is returned. And
+ since the bit-maps in the reverse order to that of the address
+ order, the last bit (LSB if the bit-map is considered as a
+ binary word of 64-bits) is re-set to 0.
+ </para>
+
+ <para>
+ The bit-map now looks like this:
+ 1111111111111111111111111111111111111111111111111111111111111110
+ </para>
+ </sect4>
+</sect3>
+
+<sect3 id="bitmap.impl.locality" xreflabel="Locality">
+ <title>Locality</title>
+ <para>
+ Another issue would be whether to keep the all bitmaps in a
+ separate area in memory, or to keep them near the actual blocks
+ that will be given out or allocated for the client. After some
+ testing, I've decided to keep these bitmaps close to the actual
+ blocks. This will help in 2 ways.
+ </para>
+
+ <orderedlist>
+ <listitem><para>Constant time access for the bitmap themselves, since no kind of
+look up will be needed to find the correct bitmap list or it's
+equivalent.</para></listitem>
+ <listitem><para>And also this would preserve the cache as far as possible.</para></listitem>
+ </orderedlist>
+
+ <para>
+ So in effect, this kind of an allocator might prove beneficial from a
+ purely cache point of view. But this allocator has been made to try and
+ roll out the defects of the node_allocator, wherein the nodes get
+ skewed about in memory, if they are not returned in the exact reverse
+ order or in the same order in which they were allocated. Also, the
+ new_allocator's book keeping overhead is too much for small objects and
+ single object allocations, though it preserves the locality of blocks
+ very well when they are returned back to the allocator.
+ </para>
+</sect3>
+
+<sect3 id="bitmap.impl.grow_policy" xreflabel="Grow Policy">
+ <title>Overhead and Grow Policy</title>
+ <para>
+ Expected overhead per block would be 1 bit in memory. Also, once
+ the address of the free list has been found, the cost for
+ allocation/deallocation would be negligible, and is supposed to be
+ constant time. For these very reasons, it is very important to
+ minimize the linear time costs, which include finding a free list
+ with a free block while allocating, and finding the corresponding
+ free list for a block while deallocating. Therefore, I have
+ decided that the growth of the internal pool for this allocator
+ will be exponential as compared to linear for
+ node_allocator. There, linear time works well, because we are
+ mainly concerned with speed of allocation/deallocation and memory
+ consumption, whereas here, the allocation/deallocation part does
+ have some linear/logarithmic complexity components in it. Thus, to
+ try and minimize them would be a good thing to do at the cost of a
+ little bit of memory.
+ </para>
+
+ <para>
+ Another thing to be noted is the pool size will double every time
+ the internal pool gets exhausted, and all the free blocks have
+ been given away. The initial size of the pool would be
+ 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.
+ </para>
+</sect3>
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/build.xml b/libstdc++-v3/doc/xml/manual/build.xml
new file mode 100644
index 00000000000..d5d78291f43
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/build.xml
@@ -0,0 +1,182 @@
+<sect1 id="manual.intro.setup.build" xreflabel="Building">
+<?dbhtml filename="build.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ build
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Build</title>
+
+<para>
+ Because libstdc++ is part of GCC, the primary source for
+ installation instructions is
+ <ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
+ Additional data is given here only where it applies to libstdc++.
+</para>
+
+<sect2 id="build.prereq" xreflabel="build.prereq">
+<title>Prerequisites</title>
+ <para>
+ The list of software needed to build the library is kept with the
+ rest of the compiler, at
+ <ulink url="http://gcc.gnu.org/install/prerequisites.html">
+ http://gcc.gnu.org/install/prerequisites.html</ulink>. The same page
+ also lists the tools you will need if you wish to modify the source.
+ </para>
+
+ <para>As of GCC 4.0.1 the minimum version of binutils required to build
+ libstdc++ is <code>2.15.90.0.1.1</code>. You can get snapshots
+ (as well as releases) of binutils from
+ <ulink url="ftp://sources.redhat.com/pub/binutils">
+ ftp://sources.redhat.com/pub/binutils</ulink>.
+ Older releases of libstdc++ do not require such a recent version,
+ but to take full advantage of useful space-saving features and
+ bug-fixes you should use a recent binutils if possible.
+ The configure process will automatically detect and use these
+ features if the underlying support is present.
+ </para>
+
+ <para>
+ Finally, a few system-specific requirements:
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term>linux</term>
+
+ <listitem>
+ <para>
+ If gcc 3.1.0 or later on is being used on linux, an attempt
+ will be made to use "C" library functionality necessary for
+ C++ named locale support. For gcc 3.2.1 and later, this
+ means that glibc 2.2.5 or later is required and the "C"
+ library de_DE locale information must be installed.
+ </para>
+
+ <para>
+ Note however that the sanity checks involving the de_DE
+ locale are skipped when an explicit --enable-clocale=gnu
+ configure option is used: only the basic checks are carried
+ out, defending against misconfigurations.
+ </para>
+
+ <para>
+ If the 'gnu' locale model is being used, the following
+ locales are used and tested in the libstdc++ testsuites.
+ The first column is the name of the locale, the second is
+ the character set it is expected to use.
+ </para>
+<programlisting>
+de_DE ISO-8859-1
+de_DE@euro ISO-8859-15
+en_HK ISO-8859-1
+en_PH ISO-8859-1
+en_US ISO-8859-1
+en_US.ISO-8859-1 ISO-8859-1
+en_US.ISO-8859-15 ISO-8859-15
+en_US.UTF-8 UTF-8
+es_ES ISO-8859-1
+es_MX ISO-8859-1
+fr_FR ISO-8859-1
+fr_FR@euro ISO-8859-15
+is_IS UTF-8
+it_IT ISO-8859-1
+ja_JP.eucjp EUC-JP
+se_NO.UTF-8 UTF-8
+ta_IN UTF-8
+zh_TW BIG5
+</programlisting>
+ <para>Failure to have the underlying "C" library locale
+ information installed will mean that C++ named locales for the
+ above regions will not work: because of this, the libstdc++
+ testsuite will skip the named locale tests. If this isn't an
+ issue, don't worry about it. If named locales are needed, the
+ underlying locale information must be installed. Note that
+ rebuilding libstdc++ after the "C" locales are installed is not
+ necessary.
+ </para>
+
+ <para>
+ To install support for locales, do only one of the following:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>install all locales</para>
+ <itemizedlist>
+ <listitem>
+ <para>with RedHat Linux:
+ </para>
+ <para> <code> export LC_ALL=C </code>
+ </para>
+ <para> <code> rpm -e glibc-common --nodeps </code>
+ </para>
+ <para>
+ <code> rpm -i --define "_install_langs all"
+ glibc-common-2.2.5-34.i386.rpm
+ </code>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Instructions for other operating systems solicited.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>install just the necessary locales</para>
+ <itemizedlist>
+ <listitem>
+ <para>with Debian Linux:</para>
+ <para> Add the above list, as shown, to the file
+ <code>/etc/locale.gen</code> </para>
+ <para> run <code>/usr/sbin/locale-gen</code> </para>
+ </listitem>
+ <listitem>
+ <para>on most Unix-like operating systems:</para>
+ <para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
+ <para>(repeat for each entry in the above list) </para>
+ </listitem>
+ <listitem>
+ <para>
+ Instructions for other operating systems solicited.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+</sect2>
+
+<sect2 id="build.configure" xreflabel="build.make">
+<title>Make</title>
+ <para>If you have never done this before, you should read the basic
+ <ulink url="http://gcc.gnu.org/install/">GCC Installation
+ Instructions</ulink> first. Read <emphasis>all of them</emphasis>.
+ <emphasis>Twice.</emphasis>
+ </para>
+ <para>When building libstdc++ you'll have to configure
+ the entire <emphasis>gccsrcdir</emphasis> directory. The full list of libstdc++
+ specific configuration options, not dependent on the specific compiler
+ release being used, can be found <ulink url="configopts.html">here</ulink>.
+ </para>
+ <para>Consider possibly using --enable-languages=c++ to save time by only
+ building the C++ language parts.
+ </para>
+
+ <programlisting>
+ cd <emphasis>gccbuilddir</emphasis>
+ <emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...</programlisting>
+</sect2>
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/build_hacking.xml b/libstdc++-v3/doc/xml/manual/build_hacking.xml
new file mode 100644
index 00000000000..b420f4f0706
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/build_hacking.xml
@@ -0,0 +1,354 @@
+<sect1 id="appendix.porting.build_hacking" xreflabel="build_hacking">
+<?dbhtml filename="build_hacking.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ BUILD_HACKING
+ </keyword>
+ <keyword>
+ version
+ </keyword>
+ <keyword>
+ dynamic
+ </keyword>
+ <keyword>
+ shared
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Configure and Build Hacking</title>
+
+<sect2 id="build_hacking.prereq" xreflabel="build_hacking.prereq">
+ <title>Prerequisites</title>
+ <para>
+ As noted <ulink
+ url="http://gcc.gnu.org/install/prerequisites.html">previously</ulink>,
+ certain other tools are necessary for hacking on files that
+ control configure (<code>configure.ac</code>,
+ <code>acinclude.m4</code>) and make
+ (<code>Makefile.am</code>). These additional tools
+ (<code>automake</code>, and <code>autoconf</code>) are further
+ described in detail in their respective manuals. All the libraries
+ in GCC try to stay in sync with each other in terms of versions of
+ the auto-tools used, so please try to play nicely with the
+ neighbors.
+ </para>
+</sect2>
+
+<sect2 id="build_hacking.map" xreflabel="build_hacking.map">
+ <title>Overview: What Comes from Where</title>
+
+ <screen>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="../images/confdeps.png"/>
+ </imageobject>
+ <textobject>
+ <phrase>Dependency Graph Configure to Build Files</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </screen>
+
+ <para>
+ Regenerate all generated files by using the command sequence
+ <code>"autoreconf"</code> at the top level of the libstdc++ source
+ directory. The following will also work, but is much more complex:
+ <code>"aclocal-1.7 &amp;&amp; autoconf-2.59 &amp;&amp;
+ autoheader-2.59 &amp;&amp; automake-1.7"</code> The version
+ numbers may be absent entirely or otherwise vary depending on
+ <ulink url="http://gcc.gnu.org/install/prerequisites.html">the
+ current requirements</ulink> and your vendor's choice of
+ installation names.
+ </para>
+</sect2>
+
+<sect2 id="build_hacking.scripts" xreflabel="build_hacking.scripts">
+ <title>Storing Information in non-AC files (like configure.host)</title>
+
+ <para>
+ Until that glorious day when we can use AC_TRY_LINK with a
+ cross-compiler, we have to hardcode the results of what the tests
+ would have shown if they could be run. So we have an inflexible
+ mess like crossconfig.m4.
+ </para>
+
+ <para>
+ Wouldn't it be nice if we could store that information in files
+ like configure.host, which can be modified without needing to
+ regenerate anything, and can even be tweaked without really
+ knowing how the configury all works? Perhaps break the pieces of
+ crossconfig.m4 out and place them in their appropriate
+ config/{cpu,os} directory.
+ </para>
+
+ <para>
+ Alas, writing macros like
+ "<code>AC_DEFINE(HAVE_A_NICE_DAY)</code>" can only be done inside
+ files which are passed through autoconf. Files which are pure
+ shell script can be source'd at configure time. Files which
+ contain autoconf macros must be processed with autoconf. We could
+ still try breaking the pieces out into "config/*/cross.m4" bits,
+ for instance, but then we would need arguments to aclocal/autoconf
+ to properly find them all when generating configure. I would
+ discourage that.
+</para>
+</sect2>
+
+<sect2 id="build_hacking.conventions" xreflabel="build_hacking.conventions">
+ <title>Coding and Commenting Conventions</title>
+
+ <para>
+ Most comments should use {octothorpes, shibboleths, hash marks,
+ pound signs, whatevers} rather than "dnl". Nearly all comments in
+ configure.ac should. Comments inside macros written in ancilliary
+ .m4 files should. About the only comments which should
+ <emphasis>not</emphasis> use #, but use dnl instead, are comments
+ <emphasis>outside</emphasis> our own macros in the ancilliary
+ files. The difference is that # comments show up in
+ <code>configure</code> (which is most helpful for debugging),
+ while dnl'd lines just vanish. Since the macros in ancilliary
+ files generate code which appears in odd places, their "outside"
+ comments tend to not be useful while reading
+ <code>configure</code>.
+ </para>
+
+ <para>
+ Do not use any <code>$target*</code> variables, such as
+ <code>$target_alias</code>. The single exception is in
+ configure.ac, for automake+dejagnu's sake.
+ </para>
+</sect2>
+
+<sect2 id="build_hacking.acinclude" xreflabel="build_hacking.acinclude">
+ <title>The acinclude.m4 layout</title>
+ <para>
+ The nice thing about acinclude.m4/aclocal.m4 is that macros aren't
+ actually performed/called/expanded/whatever here, just loaded. So
+ we can arrange the contents however we like. As of this writing,
+ acinclude.m4 is arranged as follows:
+ </para>
+ <programlisting>
+ GLIBCXX_CHECK_HOST
+ GLIBCXX_TOPREL_CONFIGURE
+ GLIBCXX_CONFIGURE
+ </programlisting>
+ <para>
+ All the major variable "discovery" is done here. CXX, multilibs,
+ etc.
+ </para>
+ <programlisting>
+ fragments included from elsewhere
+ </programlisting>
+ <para>
+ Right now, "fragments" == "the math/linkage bits".
+ </para>
+<programlisting>
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
+</programlisting>
+<para>
+ Next come extra compiler/linker feature tests. Wide character
+ support was placed here because I couldn't think of another place
+ for it. It will probably get broken apart like the math tests,
+ because we're still disabling wchars on systems which could actually
+ support them.
+</para>
+<programlisting>
+ GLIBCXX_CHECK_SETRLIMIT_ancilliary
+ GLIBCXX_CHECK_SETRLIMIT
+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
+ GLIBCXX_CHECK_POLL
+ GLIBCXX_CHECK_WRITEV
+
+ GLIBCXX_CONFIGURE_TESTSUITE
+</programlisting>
+<para>
+ Feature tests which only get used in one place. Here, things used
+ only in the testsuite, plus a couple bits used in the guts of I/O.
+</para>
+<programlisting>
+ GLIBCXX_EXPORT_INCLUDES
+ GLIBCXX_EXPORT_FLAGS
+ GLIBCXX_EXPORT_INSTALL_INFO
+</programlisting>
+<para>
+ Installation variables, multilibs, working with the rest of the
+ compiler. Many of the critical variables used in the makefiles are
+ set here.
+</para>
+<programlisting>
+ GLIBGCC_ENABLE
+ GLIBCXX_ENABLE_C99
+ GLIBCXX_ENABLE_CHEADERS
+ GLIBCXX_ENABLE_CLOCALE
+ GLIBCXX_ENABLE_CONCEPT_CHECKS
+ GLIBCXX_ENABLE_CSTDIO
+ GLIBCXX_ENABLE_CXX_FLAGS
+ GLIBCXX_ENABLE_C_MBCHAR
+ GLIBCXX_ENABLE_DEBUG
+ GLIBCXX_ENABLE_DEBUG_FLAGS
+ GLIBCXX_ENABLE_LONG_LONG
+ GLIBCXX_ENABLE_PCH
+ GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
+ GLIBCXX_ENABLE_SYMVERS
+ GLIBCXX_ENABLE_THREADS
+</programlisting>
+<para>
+ All the features which can be controlled with enable/disable
+ configure options. Note how they're alphabetized now? Keep them
+ like that. :-)
+</para>
+<programlisting>
+ AC_LC_MESSAGES
+ libtool bits
+</programlisting>
+<para>
+ Things which we don't seem to use directly, but just has to be
+ present otherwise stuff magically goes wonky.
+</para>
+
+</sect2>
+
+<sect2 id="build_hacking.enable" xreflabel="build_hacking.enable">
+ <title><constant>GLIBCXX_ENABLE</constant>, the <literal>--enable</literal> maker</title>
+
+ <para>
+ All the GLIBCXX_ENABLE_FOO macros use a common helper,
+ GLIBCXX_ENABLE. (You don't have to use it, but it's easy.) The
+ helper does two things for us:
+ </para>
+
+<orderedlist>
+ <listitem>
+ <para>
+ Builds the call to the AC_ARG_ENABLE macro, with --help text
+ properly quoted and aligned. (Death to changequote!)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Checks the result against a list of allowed possibilities, and
+ signals a fatal error if there's no match. This means that the
+ rest of the GLIBCXX_ENABLE_FOO macro doesn't need to test for
+ strange arguments, nor do we need to protect against
+ empty/whitespace strings with the <code>"x$foo" = "xbar"</code>
+ idiom.
+ </para>
+ </listitem>
+</orderedlist>
+
+<para>Doing these things correctly takes some extra autoconf/autom4te code,
+ which made our macros nearly illegible. So all the ugliness is factored
+ out into this one helper macro.
+</para>
+
+<para>Many of the macros take an argument, passed from when they are expanded
+ in configure.ac. The argument controls the default value of the
+ enable/disable switch. Previously, the arguments themselves had defaults.
+ Now they don't, because that's extra complexity with zero gain for us.
+</para>
+
+<para>There are three "overloaded signatures". When reading the descriptions
+ below, keep in mind that the brackets are autoconf's quotation characters,
+ and that they will be stripped. Examples of just about everything occur
+ in acinclude.m4, if you want to look.
+</para>
+
+<programlisting>
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
+ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
+</programlisting>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ FEATURE is the string that follows --enable. The results of the
+ test (such as it is) will be in the variable $enable_FEATURE,
+ where FEATURE has been squashed. Example:
+ <code>[extra-foo]</code>, controlled by the --enable-extra-foo
+ option and stored in $enable_extra_foo.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ DEFAULT is the value to store in $enable_FEATURE if the user does
+ not pass --enable/--disable. It should be one of the permitted
+ values passed later. Examples: <code>[yes]</code>, or
+ <code>[bar]</code>, or <code>[$1]</code> (which passes the
+ argument given to the GLIBCXX_ENABLE_FOO macro as the
+ default).
+ </para>
+ <para>
+ For cases where we need to probe for particular models of things,
+ it is useful to have an undocumented "auto" value here (see
+ GLIBCXX_ENABLE_CLOCALE for an example).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ HELP-ARG is any text to append to the option string itself in the
+ --help output. Examples: <code>[]</code> (i.e., an empty string,
+ which appends nothing), <code>[=BAR]</code>, which produces
+ <code>--enable-extra-foo=BAR</code>, and
+ <code>[@&lt;:@=BAR@:&gt;@]</code>, which produces
+ <code>--enable-extra-foo[=BAR]</code>. See the difference? See
+ what it implies to the user?
+ </para>
+ <para>
+ 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 <ulink
+ url="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_95.html#SEC95"><emphasis>quadrigraphs</emphasis></ulink>
+ and you should use them whenever necessary.
+ </para>
+ </listitem>
+ <listitem>
+ <para>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
+ GLIBCXX_ENABLE. By convention, these are not full English
+ sentences. Example: [turn on extra foo]
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+ With no other arguments, only the standard autoconf patterns are
+ allowed: "<code>--{enable,disable}-foo[={yes,no}]</code>" The
+ $enable_FEATURE variable is guaranteed to equal either "yes" or "no"
+ after the macro. If the user tries to pass something else, an
+ explanatory error message will be given, and configure will halt.
+</para>
+
+<para>
+ The second signature takes a fifth argument, "<code>[permit
+ a | b | c | ...]</code>"
+ This allows <emphasis>a</emphasis> or <emphasis>b</emphasis> or
+ ... after the equals sign in the option, and $enable_FEATURE is
+ guaranteed to equal one of them after the macro. Note that if you
+ want to allow plain --enable/--disable with no "=whatever", you must
+ include "yes" and "no" in the list of permitted values. Also note
+ that whatever you passed as DEFAULT must be in the list. If the
+ user tries to pass something not on the list, a semi-explanatory
+ error message will be given, and configure will halt. Example:
+ <code>[permit generic|gnu|ieee_1003.1-2001|yes|no|auto]</code>
+</para>
+
+<para>
+ The third signature takes a fifth argument. It is arbitrary shell
+ code to execute if the user actually passes the enable/disable
+ option. (If the user does not, the default is used. Duh.) No
+ argument checking at all is done in this signature. See
+ GLIBCXX_ENABLE_CXX_FLAGS for an example of handling, and an error
+ message.
+</para>
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/codecvt.xml b/libstdc++-v3/doc/xml/manual/codecvt.xml
new file mode 100644
index 00000000000..4c14d6253f0
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/codecvt.xml
@@ -0,0 +1,730 @@
+<sect1 id="manual.localization.facet.codecvt" xreflabel="codecvt">
+<?dbhtml filename="codecvt.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ codecvt
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>codecvt</title>
+
+<para>
+The standard class codecvt attempts to address conversions between
+different character encoding schemes. In particular, the standard
+attempts to detail conversions between the implementation-defined wide
+characters (hereafter referred to as wchar_t) and the standard type
+char that is so beloved in classic <quote>C</quote> (which can now be
+referred to as narrow characters.) This document attempts to describe
+how the GNU libstdc++ implementation deals with the conversion between
+wide and narrow characters, and also presents a framework for dealing
+with the huge number of other encodings that iconv can convert,
+including Unicode and UTF8. Design issues and requirements are
+addressed, and examples of correct usage for both the required
+specializations for wide and narrow characters and the
+implementation-provided extended functionality are given.
+</para>
+
+<sect2 id="facet.codecvt.req" xreflabel="facet.codecvt.req">
+<title>Requirements</title>
+
+<para>
+Around page 425 of the C++ Standard, this charming heading comes into view:
+</para>
+
+<blockquote>
+<para>
+22.2.1.5 - Template class codecvt
+</para>
+</blockquote>
+
+<para>
+The text around the codecvt definition gives some clues:
+</para>
+
+<blockquote>
+<para>
+<emphasis>
+-1- The class codecvt&lt;internT,externT,stateT&gt; is for use when
+converting from one codeset to another, such as from wide characters
+to multibyte characters, between wide character encodings such as
+Unicode and EUC.
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+Hmm. So, in some unspecified way, Unicode encodings and
+translations between other character sets should be handled by this
+class.
+</para>
+
+<blockquote>
+<para>
+<emphasis>
+-2- The stateT argument selects the pair of codesets being mapped between.
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+Ah ha! Another clue...
+</para>
+
+<blockquote>
+<para>
+<emphasis>
+-3- The instantiations required in the Table ??
+(lib.locale.category), namely codecvt&lt;wchar_t,char,mbstate_t&gt; and
+codecvt&lt;char,char,mbstate_t&gt;, convert the implementation-defined
+native character set. codecvt&lt;char,char,mbstate_t&gt; implements a
+degenerate conversion; it does not convert at
+all. codecvt&lt;wchar_t,char,mbstate_t&gt; converts between the native
+character sets for tiny and wide characters. Instantiations on
+mbstate_t perform conversion between encodings known to the library
+implementor. Other encodings can be converted by specializing on a
+user-defined stateT type. The stateT object can contain any state that
+is useful to communicate to or from the specialized do_convert member.
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+At this point, a couple points become clear:
+</para>
+
+<para>
+One: The standard clearly implies that attempts to add non-required
+(yet useful and widely used) conversions need to do so through the
+third template parameter, stateT.</para>
+
+<para>
+Two: The required conversions, by specifying mbstate_t as the third
+template parameter, imply an implementation strategy that is mostly
+(or wholly) based on the underlying C library, and the functions
+mcsrtombs and wcsrtombs in particular.</para>
+</sect2>
+
+<sect2 id="facet.codecvt.design" xreflabel="facet.codecvt.design">
+<title>Design</title>
+
+<sect3 id="codecvt.design.wchar_t_size" xreflabel="codecvt.design.wchar_t_size">
+ <title><type>wchar_t</type> Size</title>
+
+ <para>
+ The simple implementation detail of wchar_t's size seems to
+ repeatedly confound people. Many systems use a two byte,
+ unsigned integral type to represent wide characters, and use an
+ internal encoding of Unicode or UCS2. (See AIX, Microsoft NT,
+ Java, others.) Other systems, use a four byte, unsigned integral
+ type to represent wide characters, and use an internal encoding
+ of UCS4. (GNU/Linux systems using glibc, in particular.) The C
+ programming language (and thus C++) does not specify a specific
+ size for the type wchar_t.
+ </para>
+
+ <para>
+ Thus, portable C++ code cannot assume a byte size (or endianness) either.
+ </para>
+ </sect3>
+
+<sect3 id="codecvt.design.unicode" xreflabel="codecvt.design.unicode">
+ <title>Support for Unicode</title>
+ <para>
+ Probably the most frequently asked question about code conversion
+ is: &quot;So dudes, what's the deal with Unicode strings?&quot;
+ The dude part is optional, but apparently the usefulness of
+ Unicode strings is pretty widely appreciated. Sadly, this specific
+ encoding (And other useful encodings like UTF8, UCS4, ISO 8859-10,
+ etc etc etc) are not mentioned in the C++ standard.
+ </para>
+
+ <para>
+ A couple of comments:
+ </para>
+
+ <para>
+ The thought that all one needs to convert between two arbitrary
+ codesets is two types and some kind of state argument is
+ unfortunate. In particular, encodings may be stateless. The naming
+ of the third parameter as stateT is unfortunate, as what is really
+ needed is some kind of generalized type that accounts for the
+ issues that abstract encodings will need. The minimum information
+ that is required includes:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Identifiers for each of the codesets involved in the
+ conversion. For example, using the iconv family of functions
+ from the Single Unix Specification (what used to be called
+ X/Open) hosted on the GNU/Linux operating system allows
+ bi-directional mapping between far more than the following
+ tantalizing possibilities:
+ </para>
+
+ <para>
+ (An edited list taken from <code>`iconv --list`</code> on a
+ Red Hat 6.2/Intel system:
+ </para>
+
+<blockquote>
+<programlisting>
+8859_1, 8859_9, 10646-1:1993, 10646-1:1993/UCS4, ARABIC, ARABIC7,
+ASCII, EUC-CN, EUC-JP, EUC-KR, EUC-TW, GREEK-CCIcode, GREEK, GREEK7-OLD,
+GREEK7, GREEK8, HEBREW, ISO-8859-1, ISO-8859-2, ISO-8859-3,
+ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8,
+ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14,
+ISO-8859-15, ISO-10646, ISO-10646/UCS2, ISO-10646/UCS4,
+ISO-10646/UTF-8, ISO-10646/UTF8, SHIFT-JIS, SHIFT_JIS, UCS-2, UCS-4,
+UCS2, UCS4, UNICODE, UNICODEBIG, UNICODELIcodeLE, US-ASCII, US, UTF-8,
+UTF-16, UTF8, UTF16).
+</programlisting>
+</blockquote>
+
+<para>
+For iconv-based implementations, string literals for each of the
+encodings (ie. &quot;UCS-2&quot; and &quot;UTF-8&quot;) are necessary,
+although for other,
+non-iconv implementations a table of enumerated values or some other
+mechanism may be required.
+</para>
+</listitem>
+
+<listitem><para>
+ Maximum length of the identifying string literal.
+</para></listitem>
+
+<listitem><para>
+ Some encodings require explicit endian-ness. As such, some kind
+ of endian marker or other byte-order marker will be necessary. See
+ &quot;Footnotes for C/C++ developers&quot; in Haible for more information on
+ UCS-2/Unicode endian issues. (Summary: big endian seems most likely,
+ however implementations, most notably Microsoft, vary.)
+</para></listitem>
+
+<listitem><para>
+ Types representing the conversion state, for conversions involving
+ the machinery in the &quot;C&quot; library, or the conversion descriptor, for
+ conversions using iconv (such as the type iconv_t.) Note that the
+ conversion descriptor encodes more information than a simple encoding
+ state type.
+</para></listitem>
+
+<listitem><para>
+ Conversion descriptors for both directions of encoding. (ie, both
+ UCS-2 to UTF-8 and UTF-8 to UCS-2.)
+</para></listitem>
+
+<listitem><para>
+ Something to indicate if the conversion requested if valid.
+</para></listitem>
+
+<listitem><para>
+ Something to represent if the conversion descriptors are valid.
+</para></listitem>
+
+<listitem><para>
+ Some way to enforce strict type checking on the internal and
+ external types. As part of this, the size of the internal and
+ external types will need to be known.
+</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3 id="codecvt.design.issues" xreflabel="codecvt.design.issues">
+ <title>Other Issues</title>
+<para>
+In addition, multi-threaded and multi-locale environments also impact
+the design and requirements for code conversions. In particular, they
+affect the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt;
+when implemented using standard &quot;C&quot; functions.
+</para>
+
+<para>
+Three problems arise, one big, one of medium importance, and one small.
+</para>
+
+<para>
+First, the small: mcsrtombs and wcsrtombs may not be multithread-safe
+on all systems required by the GNU tools. For GNU/Linux and glibc,
+this is not an issue.
+</para>
+
+<para>
+Of medium concern, in the grand scope of things, is that the functions
+used to implement this specialization work on null-terminated
+strings. Buffers, especially file buffers, may not be null-terminated,
+thus giving conversions that end prematurely or are otherwise
+incorrect. Yikes!
+</para>
+
+<para>
+The last, and fundamental problem, is the assumption of a global
+locale for all the &quot;C&quot; functions referenced above. For something like
+C++ iostreams (where codecvt is explicitly used) the notion of
+multiple locales is fundamental. In practice, most users may not run
+into this limitation. However, as a quality of implementation issue,
+the GNU C++ library would like to offer a solution that allows
+multiple locales and or simultaneous usage with computationally
+correct results. In short, libstdc++ is trying to offer, as an
+option, a high-quality implementation, damn the additional complexity!
+</para>
+
+<para>
+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
+LC_CTYPE category implements.
+</para>
+
+</sect3>
+
+</sect2>
+
+<sect2 id="facet.codecvt.impl" xreflabel="facet.codecvt.impl">
+<title>Implementation</title>
+
+<para>
+The two required specializations are implemented as follows:
+</para>
+
+<para>
+<code>
+codecvt&lt;char, char, mbstate_t&gt;
+</code>
+</para>
+<para>
+This is a degenerate (ie, does nothing) specialization. Implementing
+this was a piece of cake.
+</para>
+
+<para>
+<code>
+codecvt&lt;char, wchar_t, mbstate_t&gt;
+</code>
+</para>
+
+<para>
+This specialization, by specifying all the template parameters, pretty
+much ties the hands of implementors. As such, the implementation is
+straightforward, involving mcsrtombs for the conversions between char
+to wchar_t and wcsrtombs for conversions between wchar_t and char.
+</para>
+
+<para>
+Neither of these two required specializations deals with Unicode
+characters. As such, libstdc++ implements a partial specialization
+of the codecvt class with and iconv wrapper class, encoding_state as the
+third template parameter.
+</para>
+
+<para>
+This implementation should be standards conformant. First of all, the
+standard explicitly points out that instantiations on the third
+template parameter, stateT, are the proper way to implement
+non-required conversions. Second of all, the standard says (in Chapter
+17) that partial specializations of required classes are a-ok. Third
+of all, the requirements for the stateT type elsewhere in the standard
+(see 21.1.2 traits typedefs) only indicate that this type be copy
+constructible.
+</para>
+
+<para>
+As such, the type encoding_state is defined as a non-templatized, POD
+type to be used as the third type of a codecvt instantiation. This
+type is just a wrapper class for iconv, and provides an easy interface
+to iconv functionality.
+</para>
+
+<para>
+There are two constructors for encoding_state:
+</para>
+
+<para>
+<code>
+encoding_state() : __in_desc(0), __out_desc(0)
+</code>
+</para>
+<para>
+This default constructor sets the internal encoding to some default
+(currently UCS4) and the external encoding to whatever is returned by
+nl_langinfo(CODESET).
+</para>
+
+<para>
+<code>
+encoding_state(const char* __int, const char* __ext)
+</code>
+</para>
+
+<para>
+This constructor takes as parameters string literals that indicate the
+desired internal and external encoding. There are no defaults for
+either argument.
+</para>
+
+<para>
+One of the issues with iconv is that the string literals identifying
+conversions are not standardized. Because of this, the thought of
+mandating and or enforcing some set of pre-determined valid
+identifiers seems iffy: thus, a more practical (and non-migraine
+inducing) strategy was implemented: end-users can specify any string
+(subject to a pre-determined length qualifier, currently 32 bytes) for
+encodings. It is up to the user to make sure that these strings are
+valid on the target system.
+</para>
+
+<para>
+<code>
+void
+_M_init()
+</code>
+</para>
+<para>
+Strangely enough, this member function attempts to open conversion
+descriptors for a given encoding_state object. If the conversion
+descriptors are not valid, the conversion descriptors returned will
+not be valid and the resulting calls to the codecvt conversion
+functions will return error.
+</para>
+
+<para>
+<code>
+bool
+_M_good()
+</code>
+</para>
+
+<para>
+Provides a way to see if the given encoding_state object has been
+properly initialized. If the string literals describing the desired
+internal and external encoding are not valid, initialization will
+fail, and this will return false. If the internal and external
+encodings are valid, but iconv_open could not allocate conversion
+descriptors, this will also return false. Otherwise, the object is
+ready to convert and will return true.
+</para>
+
+<para>
+<code>
+encoding_state(const encoding_state&amp;)
+</code>
+</para>
+
+<para>
+As iconv allocates memory and sets up conversion descriptors, the copy
+constructor can only copy the member data pertaining to the internal
+and external code conversions, and not the conversion descriptors
+themselves.
+</para>
+
+<para>
+Definitions for all the required codecvt member functions are provided
+for this specialization, and usage of codecvt&lt;internal character type,
+external character type, encoding_state&gt; is consistent with other
+codecvt usage.
+</para>
+
+</sect2>
+
+<sect2 id="facet.codecvt.use" xreflabel="facet.codecvt.use">
+<title>Use</title>
+<para>A conversions involving string literal.</para>
+
+<programlisting>
+ typedef codecvt_base::result result;
+ typedef unsigned short unicode_t;
+ typedef unicode_t int_type;
+ typedef char ext_type;
+ typedef encoding_state state_type;
+ typedef codecvt&lt;int_type, ext_type, state_type&gt; unicode_codecvt;
+
+ const ext_type* e_lit = "black pearl jasmine tea";
+ int size = strlen(e_lit);
+ int_type i_lit_base[24] =
+ { 25088, 27648, 24832, 25344, 27392, 8192, 28672, 25856, 24832, 29184,
+ 27648, 8192, 27136, 24832, 29440, 27904, 26880, 28160, 25856, 8192, 29696,
+ 25856, 24832, 2560
+ };
+ const int_type* i_lit = i_lit_base;
+ const ext_type* efrom_next;
+ const int_type* ifrom_next;
+ ext_type* e_arr = new ext_type[size + 1];
+ ext_type* eto_next;
+ int_type* i_arr = new int_type[size + 1];
+ int_type* ito_next;
+
+ // construct a locale object with the specialized facet.
+ locale loc(locale::classic(), new unicode_codecvt);
+ // sanity check the constructed locale has the specialized facet.
+ VERIFY( has_facet&lt;unicode_codecvt&gt;(loc) );
+ const unicode_codecvt&amp; cvt = use_facet&lt;unicode_codecvt&gt;(loc);
+ // convert between const char* and unicode strings
+ unicode_codecvt::state_type state01("UNICODE", "ISO_8859-1");
+ initialize_state(state01);
+ result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
+ i_arr, i_arr + size, ito_next);
+ VERIFY( r1 == codecvt_base::ok );
+ VERIFY( !int_traits::compare(i_arr, i_lit, size) );
+ VERIFY( efrom_next == e_lit + size );
+ VERIFY( ito_next == i_arr + size );
+</programlisting>
+
+</sect2>
+
+<sect2 id="facet.codecvt.future" xreflabel="facet.codecvt.future">
+<title>Future</title>
+<itemizedlist>
+<listitem>
+ <para>
+ a. things that are sketchy, or remain unimplemented:
+ do_encoding, max_length and length member functions
+ are only weakly implemented. I have no idea how to do
+ this correctly, and in a generic manner. Nathan?
+</para>
+</listitem>
+
+<listitem>
+ <para>
+ b. conversions involving std::string
+ </para>
+ <itemizedlist>
+ <listitem><para>
+ how should operators != and == work for string of
+ different/same encoding?
+ </para></listitem>
+
+ <listitem><para>
+ what is equal? A byte by byte comparison or an
+ encoding then byte comparison?
+ </para></listitem>
+
+ <listitem><para>
+ conversions between narrow, wide, and unicode strings
+ </para></listitem>
+ </itemizedlist>
+</listitem>
+<listitem><para>
+ c. conversions involving std::filebuf and std::ostream
+</para>
+ <itemizedlist>
+ <listitem><para>
+ how to initialize the state object in a
+ standards-conformant manner?
+ </para></listitem>
+
+ <listitem><para>
+ how to synchronize the &quot;C&quot; and &quot;C++&quot;
+ conversion information?
+ </para></listitem>
+
+ <listitem><para>
+ wchar_t/char internal buffers and conversions between
+ internal/external buffers?
+ </para></listitem>
+ </itemizedlist>
+</listitem>
+</itemizedlist>
+</sect2>
+
+
+<bibliography id="facet.codecvt.biblio" xreflabel="facet.codecvt.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ The GNU C Library
+ </title>
+
+ <author>
+ <surname>McGrath</surname>
+ <firstname>Roland</firstname>
+ </author>
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder>FSF</holder>
+ </copyright>
+ <pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Correspondence
+ </title>
+
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+ <holder></holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 14882:1998 Programming languages - C++
+ </title>
+
+ <copyright>
+ <year>1998</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 9899:1999 Programming languages - C
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>
+ The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://www.opennc.org/austin/docreg.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The C++ Programming Language, Special Edition
+ </title>
+
+ <author>
+ <surname>Stroustrup</surname>
+ <firstname>Bjarne</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley, Inc.</holder>
+ </copyright>
+ <pagenums>Appendix D</pagenums>
+
+ <publisher>
+ <publishername>
+ Addison Wesley
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>
+ Standard C++ IOStreams and Locales
+ </title>
+ <subtitle>
+ Advanced Programmer's Guide and Reference
+ </subtitle>
+
+ <author>
+ <surname>Langer</surname>
+ <firstname>Angelika</firstname>
+ </author>
+
+ <author>
+ <surname>Kreft</surname>
+ <firstname>Klaus</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley Longman, Inc.</holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Addison Wesley Longman
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ A brief description of Normative Addendum 1
+ </title>
+
+ <author>
+ <surname>Feather</surname>
+ <firstname>Clive</firstname>
+ </author>
+
+ <pagenums>Extended Character Sets</pagenums>
+ <biblioid>
+ <ulink url="http://www.lysator.liu.se/c/na1.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The Unicode HOWTO
+ </title>
+
+ <author>
+ <surname>Haible</surname>
+ <firstname>Bruno</firstname>
+ </author>
+
+ <biblioid>
+ <ulink url="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ UTF-8 and Unicode FAQ for Unix/Linux
+ </title>
+
+ <author>
+ <surname>Khun</surname>
+ <firstname>Markus</firstname>
+ </author>
+
+ <biblioid>
+ <ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/concurrency.xml b/libstdc++-v3/doc/xml/manual/concurrency.xml
new file mode 100644
index 00000000000..5740e424373
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/concurrency.xml
@@ -0,0 +1,334 @@
+<?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.concurrency" xreflabel="Concurrency Extensions">
+<?dbhtml filename="concurrency.html"?>
+
+<chapterinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</chapterinfo>
+
+<title>Concurrency</title>
+
+<sect1 id="manual.ext.concurrency.design" xreflabel="Design">
+ <title>Design</title>
+
+ <sect2 id="manual.ext.concurrency.design.threads" xreflabel="Threads API">
+ <title>Interface to Locks and Mutexes</title>
+
+<para>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>namespace __gnu_cxx</code>.
+</para>
+
+<para>
+These types can be used in a portable manner, regardless of the
+specific environment. They are carefully designed to provide optimum
+efficiency and speed, abstracting out underlying thread calls and
+accesses when compiling for single-threaded situations (even on hosts
+that support multiple threads.)
+</para>
+
+<para>The enumerated type <code>_Lock_policy</code> details the set of
+available locking
+policies: <code>_S_single</code>, <code>_S_mutex</code>,
+and <code>_S_atomic</code>.
+</para>
+
+<itemizedlist>
+<listitem><para><code>_S_single</code></para>
+<para>Indicates single-threaded code that does not need locking.
+</para>
+
+</listitem>
+<listitem><para><code>_S_mutex</code></para>
+<para>Indicates multi-threaded code using thread-layer abstractions.
+</para>
+</listitem>
+<listitem><para><code>_S_atomic</code></para>
+<para>Indicates multi-threaded code using atomic operations.
+</para>
+</listitem>
+</itemizedlist>
+
+<para>The compile-time constant <code>__default_lock_policy</code> is set
+to one of the three values above, depending on characteristics of the
+host environment and the current compilation flags.
+</para>
+
+<para>Two more datatypes make up the rest of the
+interface: <code>__mutex</code>, and <code>__scoped_lock</code>.
+</para>
+
+<para>
+</para>
+
+<para>The scoped lock idiom is well-discussed within the C++
+community. This version takes a <code>__mutex</code> reference, and
+locks it during construction of <code>__scoped_locke</code> and
+unlocks it during destruction. This is an efficient way of locking
+critical sections, while retaining exception-safety.
+</para>
+ </sect2>
+
+ <sect2 id="manual.ext.concurrency.design.atomics" xreflabel="Atomic API">
+ <title>Interface to Atomic Functions</title>
+
+
+<para>
+Two functions and one type form the base of atomic support.
+</para>
+
+
+<para>The type <code>_Atomic_word</code> is a signed integral type
+supporting atomic operations.
+</para>
+
+<para>
+The two functions functions are:
+</para>
+
+<programlisting>
+_Atomic_word
+__exchange_and_add_dispatch(volatile _Atomic_word*, int);
+
+void
+__atomic_add_dispatch(volatile _Atomic_word*, int);
+</programlisting>
+
+<para>Both of these functions are declared in the header file
+&lt;ext/atomicity.h&gt;, and are in <code>namespace __gnu_cxx</code>.
+</para>
+
+<itemizedlist>
+<listitem><para>
+<code>
+__exchange_and_add_dispatch
+</code>
+</para>
+<para>Adds the second argument's value to the first argument. Returns the old value.
+</para>
+</listitem>
+<listitem><para>
+<code>
+__atomic_add_dispatch
+</code>
+</para>
+<para>Adds the second argument's value to the first argument. Has no return value.
+</para>
+</listitem>
+</itemizedlist>
+
+<para>
+These functions forward to one of several specialized helper
+functions, depending on the circumstances. For instance,
+</para>
+
+<para>
+<code>
+__exchange_and_add_dispatch
+</code>
+</para>
+
+<para>
+Calls through to either of:
+</para>
+
+<itemizedlist>
+<listitem><para><code>__exchange_and_add</code>
+</para>
+<para>Multi-thread version. Inlined if compiler-generated builtin atomics
+can be used, otherwise resolved at link time to a non-builtin code
+sequence.
+</para>
+</listitem>
+
+<listitem><para><code>__exchange_and_add_single</code>
+</para>
+<para>Single threaded version. Inlined.</para>
+</listitem>
+</itemizedlist>
+
+<para>However, only <code>__exchange_and_add_dispatch</code>
+and <code>__atomic_add_dispatch</code> should be used. These functions
+can be used in a portable manner, regardless of the specific
+environment. They are carefully designed to provide optimum efficiency
+and speed, abstracting out atomic accesses when they are not required
+(even on hosts that support compiler intrinsics for atomic
+operations.)
+</para>
+
+<para>
+In addition, there are two macros
+</para>
+
+<para>
+<code>
+_GLIBCXX_READ_MEM_BARRIER
+</code>
+</para>
+<para>
+<code>
+_GLIBCXX_WRITE_MEM_BARRIER
+</code>
+</para>
+
+<para>
+Which expand to the appropriate write and read barrier required by the
+host hardware and operating system.
+</para>
+ </sect2>
+
+</sect1>
+
+
+<sect1 id="manual.ext.concurrency.impl" xreflabel="Implementation">
+ <title>Implementation</title>
+ <sect2 id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F">
+ <title>Using Builitin Atomic Functions</title>
+
+<para>The functions for atomic operations described above are either
+implemented via compiler intrinsics (if the underlying host is
+capable) or by library fallbacks.</para>
+
+<para>Compiler intrinsics (builtins) are always preferred. However, as
+the compiler builtins for atomics are not universally implemented,
+using them directly is problematic, and can result in undefined
+function calls. (An example of an undefined symbol from the use
+of <code>__sync_fetch_and_add</code> on an unsupported host is a
+missing reference to <code>__sync_fetch_and_add_4</code>.)
+</para>
+
+<para>In addition, on some hosts the compiler intrinsics are enabled
+conditionally, via the <code>-march</code> command line flag. This makes
+usage vary depending on the target hardware and the flags used during
+compile.
+</para>
+
+<para> If builtins are possible, <code>_GLIBCXX_ATOMIC_BUILTINS</code>
+will be defined.
+</para>
+
+
+<para>For the following hosts, intrinsics are enabled by default.
+</para>
+
+<itemizedlist>
+ <listitem><para>alpha</para></listitem>
+ <listitem><para>ia64</para></listitem>
+ <listitem><para>powerpc</para></listitem>
+ <listitem><para>s390</para></listitem>
+</itemizedlist>
+
+<para>For others, some form of <code>-march</code> may work. On
+non-ancient x86 hardware, <code>-march=native</code> usually does the
+trick.</para>
+
+<para> For hosts without compiler intrinsics, but with capable
+hardware, hand-crafted assembly is selected. This is the case for the following hosts:
+</para>
+
+<itemizedlist>
+ <listitem><para>cris</para></listitem>
+ <listitem><para>hppa</para></listitem>
+ <listitem><para>i386</para></listitem>
+ <listitem><para>i486</para></listitem>
+ <listitem><para>m48k</para></listitem>
+ <listitem><para>mips</para></listitem>
+ <listitem><para>sparc</para></listitem>
+</itemizedlist>
+
+<para>And for the rest, a simulated atomic lock via pthreads.
+</para>
+
+<para> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html"> documentation</ulink>.
+</para>
+
+<para> More details on the library fallbacks from the porting <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting.html#Thread%20safety">section</ulink>.
+</para>
+
+
+ </sect2>
+ <sect2 id="manual.ext.concurrency.impl.thread" xreflabel="Pthread">
+ <title>Thread Abstraction</title>
+
+<para>A thin layer above IEEE 1003.1 (ie pthreads) is used to abstract
+the thread interface for GCC. This layer is called "gthread," and is
+comprised of one header file that wraps the host's default thread layer with
+a POSIX-like interface.
+</para>
+
+<para> The file &lt;gthr-default.h&gt; points to the deduced wrapper for
+the current host. In libstdc++ implementation files,
+&lt;bits/gthr.h&gt; is used to select the proper gthreads file.
+</para>
+
+<para>Within libstdc++ sources, all calls to underlying thread functionality
+use this layer. More detail as to the specific interface can be found in the source <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/gthr_8h-source.html">documentation</ulink>.
+</para>
+
+<para>By design, the gthread layer is interoperable with the types,
+functions, and usage found in the usual &lt;pthread.h&gt; file,
+including <code>pthread_t</code>, <code>pthread_once_t</code>, <code>pthread_create</code>,
+etc.
+</para>
+
+ </sect2>
+</sect1>
+
+<sect1 id="manual.ext.concurrency.use" xreflabel="Use">
+
+ <title>Use</title>
+
+<para>Typical usage of the last two constructs is demonstrated as follows:
+</para>
+
+<programlisting>
+#include &lt;ext/concurrence.h&gt;
+
+namespace
+{
+ __gnu_cxx::__mutex safe_base_mutex;
+} // anonymous namespace
+
+namespace other
+{
+ void
+ foo()
+ {
+ __gnu_cxx::__scoped_lock sentry(safe_base_mutex);
+ for (int i = 0; i &lt; max; ++i)
+ {
+ _Safe_iterator_base* __old = __iter;
+ __iter = __iter-&lt;_M_next;
+ __old-&lt;_M_detach_single();
+ }
+}
+</programlisting>
+
+<para>In this sample code, an anonymous namespace is used to keep
+the <code>__mutex</code> private to the compilation unit,
+and <code>__scoped_lock</code> is used to guard access to the critical
+section within the for loop, locking the mutex on creation and freeing
+the mutex as control moves out of this block.
+</para>
+
+<para>Several exception classes are used to keep track of
+concurrence-related errors. These classes
+are: <code>__concurrence_lock_error</code>, <code>__concurrence_unlock_error</code>, <code>__concurrence_wait_error</code>,
+and <code>__concurrence_broadcast_error</code>.
+</para>
+
+
+</sect1>
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/manual/configure.xml b/libstdc++-v3/doc/xml/manual/configure.xml
new file mode 100644
index 00000000000..a47635cd029
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/configure.xml
@@ -0,0 +1,318 @@
+<sect1 id="manual.intro.setup.configure" xreflabel="Configuring">
+<?dbhtml filename="configure.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ configure
+ </keyword>
+ <keyword>
+ options
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Configure</title>
+
+<para>
+ Here are some of the non-obvious options to libstdc++'s configure.
+ Keep in mind that
+ <!-- This SECnn should be the "Choosing Package Options" section. -->
+ <ulink url="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131">they
+ all have opposite forms as well</ulink>
+ (enable/disable and with/without). The defaults are for <emphasis>current
+ development sources</emphasis>, which may be different than those for
+ released versions.
+</para>
+<para>The canonical way to find out the configure options that are
+ available for a given set of libstdc++ sources is to go to the
+ source directory and then type:<code> ./configure --help</code>
+</para>
+
+<variablelist>
+ <varlistentry><term><code>--enable-multilib</code>[default]</term>
+ <listitem><para>This is part of the generic multilib support for building cross
+ compilers. As such, targets like &quot;powerpc-elf&quot; will have
+ libstdc++ built many different ways: &quot;-msoft-float&quot;
+ and not, etc. A different libstdc++ will be built for each of
+ the different multilib versions. This option is on by default.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-sjlj-exceptions</code></term>
+ <listitem><para>Forces old, set-jump/long-jump exception handling model. If
+ at all possible, the new, frame unwinding exception handling routines
+ should be used instead, as they significantly reduce both
+ runtime memory usage and executable size. This option can
+ change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
+ <listitem><para>Specify that run-time libraries should be installed in the
+ compiler-specific subdirectory (i.e.,
+ <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
+ instead of <code>${libdir}</code>. This option is useful if you
+ intend to use several versions of gcc in parallel. In addition,
+ libstdc++'s include files will be installed in
+ <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
+ unless you also specify
+ <literal>--with-gxx-include-dir=<filename class="directory">dirname</filename></literal> during configuration.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></term>
+ <listitem><para>Adds support for named libstdc++ include directory. For instance,
+ the following puts all the libstdc++ headers into a directory
+ called &quot;2.97-20001008&quot; instead of the usual
+ &quot;c++/(version)&quot;.
+ </para>
+ <programlisting>
+ --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</programlisting> </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-cstdio</code></term>
+ <listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
+ (described next). This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-cstdio=OPTION</code></term>
+ <listitem><para>Select a target-specific I/O package. At the moment, the only
+ choice is to use 'stdio', a generic &quot;C&quot; abstraction.
+ The default is 'stdio'.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-clocale</code></term>
+ <listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
+ (described next). This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-clocale=OPTION</code></term>
+ <listitem><para>Select a target-specific underlying locale package. The
+ choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
+ (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
+ 'gnu' to specify a model based on functionality from the GNU C
+ library (langinfo/iconv/gettext) (from <ulink url="http://sources.redhat.com/glibc/">glibc</ulink>, the GNU C
+ library), or 'generic' to use a generic &quot;C&quot;
+ abstraction which consists of &quot;C&quot; locale info.
+ </para>
+
+ <para>As part of the configuration process, the "C" library is
+ probed both for sufficient vintage, and installed locale
+ data. If either of these elements are not present, the C++
+ locale model default to 'generic.' On glibc-based systems of
+ version 2.2.5 and above with installed locale files, 'gnu' is
+ automatically selected.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-libstdcxx-allocator</code></term>
+ <listitem><para>This is an abbreviated form of
+ <code>'--enable-libstdcxx-allocator=auto'</code> (described
+ next). This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term>
+ <listitem><para>Select a target-specific underlying std::allocator. The
+ choices are 'new' to specify a wrapper for new, 'malloc' to
+ specify a wrapper for malloc, 'mt' for a fixed power of two allocator
+ (<ulink url="ext/mt_allocator.html">documented</ulink> under extensions),
+ 'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
+ This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-cheaders=OPTION</code></term>
+ <listitem><para>This allows the user to define the approach taken for C header
+ compatibility with C++. Options are c, c_std, and c_global.
+ These correspond to the source directory's include/c,
+ include/c_std, and include/c_global, and may also include
+ include/c_compatibility. The default is c_global.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-threads</code></term>
+ <listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code>
+ (described next). This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-threads=OPTION</code></term>
+ <listitem><para>Select a threading library. A full description is given in the
+ general <ulink url="http://gcc.gnu.org/install/configure.html">compiler
+ configuration instructions</ulink>.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-libstdcxx-debug</code></term>
+ <listitem><para>Build separate debug libraries in addition to what is normally built.
+ By default, the debug libraries are compiled with
+ <code> CXXFLAGS='-g3 -O0'</code>
+ , are installed in <code>${libdir}/debug</code>, and have the
+ same names and versioning information as the non-debug
+ libraries. This option is off by default.
+ </para>
+ <para>Note this make command, executed in
+ the build directory, will do much the same thing, without the
+ configuration difference and without building everything twice:
+ <code>make CXXFLAGS='-g3 -O0' all</code>
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term>
+
+ <listitem><para>This option is only valid when <code> --enable-debug </code>
+ is also specified, and applies to the debug builds only. With
+ this option, you can pass a specific string of flags to the
+ compiler to use when building the debug versions of libstdc++.
+ FLAGS is a quoted string of options, like
+ </para>
+ <programlisting>
+ --enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</programlisting>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term>
+ <listitem><para>With this option, you can pass a string of -f (functionality)
+ flags to the compiler to use when building libstdc++. This
+ option can change the library ABI. FLAGS is a quoted string of
+ options, like
+ </para>
+ <programlisting>
+ --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting>
+ <para>
+ Note that the flags don't necessarily have to all be -f flags,
+ as shown, but usually those are the ones that will make sense
+ for experimentation and configure-time overriding.
+ </para>
+ <para>The advantage of --enable-cxx-flags over setting CXXFLAGS in
+ the 'make' environment is that, if files are automatically
+ rebuilt, the same flags will be used when compiling those files
+ as well, so that everything matches.
+ </para>
+ <para>Fun flags to try might include combinations of
+ </para>
+ <programlisting>
+ -fstrict-aliasing
+ -fno-exceptions
+ -ffunction-sections
+ -fvtable-gc</programlisting>
+ <para>and opposite forms (-fno-) of the same. Tell us (the libstdc++
+ mailing list) if you discover more!
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-c99</code></term>
+ <listitem><para>The &quot;long long&quot; type was introduced in C99, along
+ with many other functions for wide characters, and math
+ classification macros, etc. If enabled, all C99 functions not
+ specified by the C++ standard will be put into <code>namespace
+ __gnu_cxx</code>, and then all these names will
+ be injected into namespace std, so that C99 functions can be
+ used &quot;as if&quot; they were in the C++ standard (as they
+ will eventually be in some future revision of the standard,
+ without a doubt). By default, C99 support is on, assuming the
+ configure probes find all the necessary functions and bits
+ necessary. This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-wchar_t</code>[default]</term>
+ <listitem><para>Template specializations for the &quot;wchar_t&quot; type are
+ required for wide character conversion support. Disabling
+ wide character specializations may be expedient for initial
+ porting efforts, but builds only a subset of what is required by
+ ISO, and is not recommended. By default, this option is on.
+ This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-long-long </code></term>
+ <listitem><para>The &quot;long long&quot; type was introduced in C99. It is
+ provided as a GNU extension to C++98 in g++. This flag builds
+ support for &quot;long long&quot; into the library (specialized
+ templates and the like for iostreams). This option is on by default:
+ if enabled, users will have to either use the new-style &quot;C&quot;
+ headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
+ or add appropriate compile-time flags to all compile lines to
+ allow &quot;C&quot; visibility of this feature (on GNU/Linux,
+ the flag is -D_ISOC99_SOURCE, which is added automatically via
+ CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
+ This option can change the library ABI.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-fully-dynamic-string</code></term>
+ <listitem><para>This option enables a special version of basic_string avoiding
+ the optimization that allocates empty objects in static memory.
+ Mostly useful together with shared memory allocators, see PR
+ libstdc++/16612 for details.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-concept-checks</code></term>
+ <listitem><para>This turns on additional compile-time checks for instantiated
+ library templates, in the form of specialized templates,
+ <ulink url="19_diagnostics/howto.html#3">described here</ulink>. They
+ can help users discover when they break the rules of the STL, before
+ their programs run.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-symvers[=style]</code></term>
+
+ <listitem><para>In 3.1 and later, tries to turn on symbol versioning in the
+ shared library (if a shared library has been
+ requested). Values for 'style' that are currently supported
+ are 'gnu', 'gnu-versioned-namespace', 'darwin', and
+ 'darwin-export'. Both gnu- options require that a recent
+ version of the GNU linker be in use. Both darwin options are
+ equivalent. With no style given, the configure script will try
+ to guess correct defaults for the host system, probe to see if
+ additional requirements are necessary and present for
+ activation, and if so, will turn symbol versioning on. This
+ option can change the library ABI.
+ </para>
+
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-visibility</code></term>
+ <listitem><para> In 4.2 and later, enables or disables visibility attributes.
+ If enabled (as by default), and the compiler seems capable of
+ passing the simple sanity checks thrown at it, adjusts items
+ in namespace std, namespace std::tr1, and namespace __gnu_cxx
+ so that -fvisibility options work.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--enable-libstdcxx-pch</code></term>
+ <listitem><para>In 3.4 and later, tries to turn on the generation of
+ stdc++.h.gch, a pre-compiled file including all the standard
+ C++ includes. If enabled (as by default), and the compiler
+ seems capable of passing the simple sanity checks thrown at
+ it, try to build stdc++.h.gch as part of the make process.
+ In addition, this generated file is used later on (by appending <code>
+ --include bits/stdc++.h </code> to CXXFLAGS) when running the
+ testsuite.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>--disable-hosted-libstdcxx</code></term>
+ <listitem>
+ <para>
+ By default, a complete <emphasis>hosted</emphasis> C++ library is
+ built. The C++ Standard also describes a
+ <emphasis>freestanding</emphasis> environment, in which only a
+ minimal set of headers are provided. This option builds such an
+ environment.
+ </para>
+ </listitem></varlistentry>
+</variablelist>
+
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/containers.xml b/libstdc++-v3/doc/xml/manual/containers.xml
new file mode 100644
index 00000000000..a13d52734a4
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/containers.xml
@@ -0,0 +1,441 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.containers" xreflabel="Containers">
+<?dbhtml filename="containers.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Containers</title>
+
+<!-- Chapter 01 : Sequences -->
+<chapter id="manual.containers.sequences" xreflabel="Sequences">
+ <title>Sequences</title>
+
+<sect1 id="containers.sequences.list" xreflabel="list">
+ <title>list</title>
+ <sect2 id="sequences.list.size" xreflabel="list::size() is O(n)">
+ <title>list::size() is O(n)</title>
+ <para>
+ Yes it is, and that's okay. This is a decision that we preserved
+ when we imported SGI's STL implementation. The following is
+ quoted from <ulink
+ url="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</ulink>:
+ </para>
+ <blockquote>
+ <para>
+ The size() member function, for list and slist, takes time
+ proportional to the number of elements in the list. This was a
+ deliberate tradeoff. The only way to get a constant-time
+ size() for linked lists would be to maintain an extra member
+ variable containing the list's size. This would require taking
+ extra time to update that variable (it would make splice() a
+ linear time operation, for example), and it would also make the
+ list larger. Many list algorithms don't require that extra
+ word (algorithms that do require it might do better with
+ vectors than with lists), and, when it is necessary to maintain
+ an explicit size count, it's something that users can do
+ themselves.
+ </para>
+ <para>
+ This choice is permitted by the C++ standard. The standard says
+ that size() <quote>should</quote> be constant time, and
+ <quote>should</quote> does not mean the same thing as
+ <quote>shall</quote>. This is the officially recommended ISO
+ wording for saying that an implementation is supposed to do
+ something unless there is a good reason not to.
+ </para>
+ <para>
+ One implication of linear time size(): you should never write
+ </para>
+ <programlisting>
+ if (L.size() == 0)
+ ...
+ </programlisting>
+
+ <para>
+ Instead, you should write
+ </para>
+
+ <programlisting>
+ if (L.empty())
+ ...
+ </programlisting>
+ </blockquote>
+ </sect2>
+</sect1>
+
+<sect1 id="containers.sequences.vector" xreflabel="vector">
+ <title>vector</title>
+ <para>
+ </para>
+ <sect2 id="sequences.vector.management" xreflabel="Space Overhead Management">
+ <title>Space Overhead Management</title>
+ <para>
+ In <ulink
+ url="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
+ message to the list</ulink>, Daniel Kostecky announced work on an
+ alternate form of <code>std::vector</code> that would support
+ hints on the number of elements to be over-allocated. The design
+ was also described, along with possible implementation choices.
+ </para>
+ <para>
+ The first two alpha releases were announced <ulink
+ url="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</ulink>
+ and <ulink
+ url="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</ulink>.
+ The releases themselves are available at
+ <ulink url="http://www.kotelna.sk/dk/sw/caphint/">
+ http://www.kotelna.sk/dk/sw/caphint/</ulink>.
+ </para>
+
+ </sect2></sect1>
+</chapter>
+
+<!-- Chapter 02 : Associative -->
+<chapter id="manual.containers.associative" xreflabel="Associative">
+ <title>Associative</title>
+
+ <sect1 id="containers.associative.insert_hints" xreflabel="Insertion Hints">
+ <title>Insertion Hints</title>
+ <para>
+ Section [23.1.2], Table 69, of the C++ standard lists this
+ function for all of the associative containers (map, set, etc):
+ </para>
+ <programlisting>
+ a.insert(p,t);
+ </programlisting>
+ <para>
+ where 'p' is an iterator into the container 'a', and 't' is the
+ item to insert. The standard says that <quote><code>t</code> is
+ inserted as close as possible to the position just prior to
+ <code>p</code>.</quote> (Library DR #233 addresses this topic,
+ referring to <ulink
+ url='http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html'>N1780</ulink>.
+ Since version 4.2 GCC implements the resolution to DR 233, so
+ that insertions happen as close as possible to the hint. For
+ earlier releases the hint was only used as described below.
+ </para>
+ <para>
+ Here we'll describe how the hinting works in the libstdc++
+ implementation, and what you need to do in order to take
+ advantage of it. (Insertions can change from logarithmic
+ complexity to amortized constant time, if the hint is properly
+ used.) Also, since the current implementation is based on the
+ SGI STL one, these points may hold true for other library
+ implementations also, since the HP/SGI code is used in a lot of
+ places.
+ </para>
+ <para>
+ In the following text, the phrases <emphasis>greater
+ than</emphasis> and <emphasis>less than</emphasis> refer to the
+ results of the strict weak ordering imposed on the container by
+ its comparison object, which defaults to (basically)
+ <quote>&lt;</quote>. Using those phrases is semantically sloppy,
+ but I didn't want to get bogged down in syntax. I assume that if
+ you are intelligent enough to use your own comparison objects,
+ you are also intelligent enough to assign <quote>greater</quote>
+ and <quote>lesser</quote> their new meanings in the next
+ paragraph. *grin*
+ </para>
+ <para>
+ If the <code>hint</code> parameter ('p' above) is equivalent to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>begin()</code>, then the item being inserted should
+ have a key less than all the other keys in the container.
+ The item will be inserted at the beginning of the container,
+ becoming the new entry at <code>begin()</code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>end()</code>, then the item being inserted should have
+ a key greater than all the other keys in the container. The
+ item will be inserted at the end of the container, becoming
+ the new entry at <code>end()</code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ neither <code>begin()</code> nor <code>end()</code>, then:
+ Let <code>h</code> be the entry in the container pointed to
+ by <code>hint</code>, that is, <code>h = *hint</code>. Then
+ the item being inserted should have a key less than that of
+ <code>h</code>, and greater than that of the item preceding
+ <code>h</code>. The new item will be inserted between
+ <code>h</code> and <code>h</code>'s predecessor.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For <code>multimap</code> and <code>multiset</code>, the
+ restrictions are slightly looser: <quote>greater than</quote>
+ should be replaced by <quote>not less than</quote>and <quote>less
+ than</quote> should be replaced by <quote>not greater
+ than.</quote> (Why not replace greater with
+ greater-than-or-equal-to? You probably could in your head, but
+ the mathematicians will tell you that it isn't the same thing.)
+ </para>
+ <para>
+ If the conditions are not met, then the hint is not used, and the
+ insertion proceeds as if you had called <code> a.insert(t)
+ </code> instead. (<emphasis>Note </emphasis> that GCC releases
+ prior to 3.0.2 had a bug in the case with <code>hint ==
+ begin()</code> for the <code>map</code> and <code>set</code>
+ classes. You should not use a hint argument in those releases.)
+ </para>
+ <para>
+ This behavior goes well with other containers'
+ <code>insert()</code> functions which take an iterator: if used,
+ the new item will be inserted before the iterator passed as an
+ argument, same as the other containers.
+ </para>
+ <para>
+ <emphasis>Note </emphasis> also that the hint in this
+ implementation is a one-shot. The older insertion-with-hint
+ routines check the immediately surrounding entries to ensure that
+ the new item would in fact belong there. If the hint does not
+ point to the correct place, then no further local searching is
+ done; the search begins from scratch in logarithmic time.
+ </para>
+ </sect1>
+
+
+ <sect1 id="containers.associative.bitset" xreflabel="bitset">
+ <title>bitset</title>
+ <sect2 id="associative.bitset.size_variable" xreflabel="Variable">
+ <title>Size Variable</title>
+ <para>
+ No, you cannot write code of the form
+ </para>
+ <!-- Careful, the leading spaces in PRE show up directly. -->
+ <programlisting>
+ #include &lt;bitset&gt;
+
+ void foo (size_t n)
+ {
+ std::bitset&lt;n&gt; bits;
+ ....
+ }
+ </programlisting>
+ <para>
+ because <code>n</code> must be known at compile time. Your
+ compiler is correct; it is not a bug. That's the way templates
+ work. (Yes, it <emphasis>is</emphasis> a feature.)
+ </para>
+ <para>
+ There are a couple of ways to handle this kind of thing. Please
+ consider all of them before passing judgement. They include, in
+ no particular order:
+ </para>
+ <itemizedlist>
+ <listitem><para>A very large N in <code>bitset&lt;N&gt;</code>.</para></listitem>
+ <listitem><para>A container&lt;bool&gt;.</para></listitem>
+ <listitem><para>Extremely weird solutions.</para></listitem>
+ </itemizedlist>
+ <para>
+ <emphasis>A very large N in
+ <code>bitset&lt;N&gt;</code>.&nbsp;&nbsp;</emphasis> It has been
+ pointed out a few times in newsgroups that N bits only takes up
+ (N/8) bytes on most systems, and division by a factor of eight is
+ pretty impressive when speaking of memory. Half a megabyte given
+ over to a bitset (recall that there is zero space overhead for
+ housekeeping info; it is known at compile time exactly how large
+ the set is) will hold over four million bits. If you're using
+ those bits as status flags (e.g.,
+ <quote>changed</quote>/<quote>unchanged</quote> flags), that's a
+ <emphasis>lot</emphasis> of state.
+ </para>
+ <para>
+ You can then keep track of the <quote>maximum bit used</quote>
+ during some testing runs on representative data, make note of how
+ many of those bits really need to be there, and then reduce N to
+ a smaller number. Leave some extra space, of course. (If you
+ plan to write code like the incorrect example above, where the
+ bitset is a local variable, then you may have to talk your
+ compiler into allowing that much stack space; there may be zero
+ space overhead, but it's all allocated inside the object.)
+ </para>
+ <para>
+ <emphasis>A container&lt;bool&gt;.&nbsp;&nbsp;</emphasis> The
+ Committee made provision for the space savings possible with that
+ (N/8) usage previously mentioned, so that you don't have to do
+ wasteful things like <code>Container&lt;char&gt;</code> or
+ <code>Container&lt;short int&gt;</code>. Specifically,
+ <code>vector&lt;bool&gt;</code> is required to be specialized for
+ that space savings.
+ </para>
+ <para>
+ The problem is that <code>vector&lt;bool&gt;</code> doesn't
+ behave like a normal vector anymore. There have been recent
+ journal articles which discuss the problems (the ones by Herb
+ Sutter in the May and July/August 1999 issues of C++ Report cover
+ it well). Future revisions of the ISO C++ Standard will change
+ the requirement for <code>vector&lt;bool&gt;</code>
+ specialization. In the meantime, <code>deque&lt;bool&gt;</code>
+ is recommended (although its behavior is sane, you probably will
+ not get the space savings, but the allocation scheme is different
+ than that of vector).
+ </para>
+ <para>
+ <emphasis>Extremely weird solutions.&nbsp;&nbsp;</emphasis> If
+ you have access to the compiler and linker at runtime, you can do
+ something insane, like figuring out just how many bits you need,
+ then writing a temporary source code file. That file contains an
+ instantiation of <code>bitset</code> for the required number of
+ bits, inside some wrapper functions with unchanging signatures.
+ Have your program then call the compiler on that file using
+ Position Independent Code, then open the newly-created object
+ file and load those wrapper functions. You'll have an
+ instantiation of <code>bitset&lt;N&gt;</code> for the exact
+ <code>N</code> that you need at the time. Don't forget to delete
+ the temporary files. (Yes, this <emphasis>can</emphasis> be, and
+ <emphasis>has been</emphasis>, done.)
+ </para>
+ <!-- I wonder if this next paragraph will get me in trouble... -->
+ <para>
+ This would be the approach of either a visionary genius or a
+ raving lunatic, depending on your programming and management
+ style. Probably the latter.
+ </para>
+ <para>
+ Which of the above techniques you use, if any, are up to you and
+ your intended application. Some time/space profiling is
+ indicated if it really matters (don't just guess). And, if you
+ manage to do anything along the lines of the third category, the
+ author would love to hear from you...
+ </para>
+ <para>
+ Also note that the implementation of bitset used in libstdc++ has
+ <ulink url="../ext/sgiexts.html#ch23">some extensions</ulink>.
+ </para>
+
+ </sect2>
+ <sect2 id="associative.bitset.type_string" xreflabel="Type String">
+ <title>Type String</title>
+ <para>
+ </para>
+ <para>
+ Bitmasks do not take char* nor const char* arguments in their
+ constructors. This is something of an accident, but you can read
+ about the problem: follow the library's <quote>Links</quote> from
+ the homepage, and from the C++ information <quote>defect
+ reflector</quote> link, select the library issues list. Issue
+ number 116 describes the problem.
+ </para>
+ <para>
+ For now you can simply make a temporary string object using the
+ constructor expression:
+ </para>
+ <programlisting>
+ std::bitset&lt;5&gt; b ( std::string(<quote>10110</quote>) );
+ </programlisting>
+
+ <para>
+ instead of
+ </para>
+
+ <programlisting>
+ std::bitset&lt;5&gt; b ( <quote>10110</quote> ); // invalid
+ </programlisting>
+ </sect2>
+ </sect1>
+
+</chapter>
+
+<!-- Chapter 03 : Interacting with C -->
+<chapter id="manual.containers.c" xreflabel="Interacting with C">
+ <title>Interacting with C</title>
+
+ <sect1 id="containers.c.vs_array" xreflabel="Containers vs. Arrays">
+ <title>Containers vs. Arrays</title>
+ <para>
+ You're writing some code and can't decide whether to use builtin
+ arrays or some kind of container. There are compelling reasons
+ to use one of the container classes, but you're afraid that
+ you'll eventually run into difficulties, change everything back
+ to arrays, and then have to change all the code that uses those
+ data types to keep up with the change.
+ </para>
+ <para>
+ If your code makes use of the standard algorithms, this isn't as
+ scary as it sounds. The algorithms don't know, nor care, about
+ the kind of <quote>container</quote> on which they work, since
+ the algorithms are only given endpoints to work with. For the
+ container classes, these are iterators (usually
+ <code>begin()</code> and <code>end()</code>, but not always).
+ For builtin arrays, these are the address of the first element
+ and the <ulink
+ url="../24_iterators/howto.html#2">past-the-end</ulink> element.
+ </para>
+ <para>
+ Some very simple wrapper functions can hide all of that from the
+ rest of the code. For example, a pair of functions called
+ <code>beginof</code> can be written, one that takes an array,
+ another that takes a vector. The first returns a pointer to the
+ first element, and the second returns the vector's
+ <code>begin()</code> iterator.
+ </para>
+ <para>
+ The functions should be made template functions, and should also
+ be declared inline. As pointed out in the comments in the code
+ below, this can lead to <code>beginof</code> being optimized out
+ of existence, so you pay absolutely nothing in terms of increased
+ code size or execution time.
+ </para>
+ <para>
+ The result is that if all your algorithm calls look like
+ </para>
+ <programlisting>
+ std::transform(beginof(foo), endof(foo), beginof(foo), SomeFunction);
+ </programlisting>
+ <para>
+ then the type of foo can change from an array of ints to a vector
+ of ints to a deque of ints and back again, without ever changing
+ any client code.
+ </para>
+ <para>
+ This author has a collection of such functions, called
+ <quote>*of</quote> because they all extend the builtin
+ <quote>sizeof</quote>. It started with some Usenet discussions
+ on a transparent way to find the length of an array. A
+ simplified and much-reduced version for easier reading is <ulink
+ url="wrappers_h.txt">given here</ulink>.
+ </para>
+ <para>
+ Astute readers will notice two things at once: first, that the
+ container class is still a <code>vector&lt;T&gt;</code> instead
+ of a more general <code>Container&lt;T&gt;</code>. This would
+ mean that three functions for <code>deque</code> would have to be
+ added, another three for <code>list</code>, and so on. This is
+ due to problems with getting template resolution correct; I find
+ it easier just to give the extra three lines and avoid confusion.
+ </para>
+ <para>
+ Second, the line
+ </para>
+ <programlisting>
+ inline unsigned int lengthof (T (&amp;)[sz]) { return sz; }
+ </programlisting>
+ <para>
+ looks just weird! Hint: unused parameters can be left nameless.
+ </para>
+ </sect1>
+
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/ctype.xml b/libstdc++-v3/doc/xml/manual/ctype.xml
new file mode 100644
index 00000000000..8ecd7b9c3d2
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/ctype.xml
@@ -0,0 +1,259 @@
+<sect1 id="manual.localization.facet.ctype" xreflabel="ctype">
+<?dbhtml filename="ctype.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ ctype
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>ctype</title>
+
+<sect2 id="facet.ctype.impl" xreflabel="facet.ctype.impl">
+<title>Implementation</title>
+
+ <sect3>
+ <title>Specializations</title>
+
+<para>
+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
+LC_CTYPE category implements.
+</para>
+
+<para>
+The two required specializations are implemented as follows:
+</para>
+
+<para>
+<code>
+ctype&lt;char&gt;
+</code>
+</para>
+<para>
+This is simple specialization. Implementing this was a piece of cake.
+</para>
+
+<para>
+<code>
+ctype&lt;wchar_t&gt;
+</code>
+</para>
+<para>
+This specialization, by specifying all the template parameters, pretty
+much ties the hands of implementors. As such, the implementation is
+straightforward, involving mcsrtombs for the conversions between char
+to wchar_t and wcsrtombs for conversions between wchar_t and char.
+</para>
+
+<para>
+Neither of these two required specializations deals with Unicode
+characters.
+</para>
+
+ </sect3>
+</sect2>
+
+<sect2 id="facet.ctype.future" xreflabel="facet.ctype.future">
+<title>Future</title>
+
+
+<itemizedlist>
+ <listitem>
+ <para>
+ How to deal with the global locale issue?
+ </para></listitem>
+
+ <listitem>
+ <para>
+ How to deal with different types than char, wchar_t? </para></listitem>
+
+ <listitem><para>
+ Overlap between codecvt/ctype: narrow/widen
+ </para></listitem>
+
+ <listitem>
+ <para>
+ Mask typedef in codecvt_base, argument types in codecvt. what
+ is know about this type?
+ </para></listitem>
+
+ <listitem>
+ <para>
+ Why mask* argument in codecvt?
+ </para></listitem>
+
+ <listitem>
+ <para>
+ Can this be made (more) generic? is there a simple way to
+ straighten out the configure-time mess that is a by-product of
+ this class?
+ </para></listitem>
+
+ <listitem>
+ <para>
+ Get the ctype&lt;wchar_t&gt;::mask stuff under control. Need to
+ make some kind of static table, and not do lookup evertime
+ somebody hits the do_is... functions. Too bad we can't just
+ redefine mask for ctype&lt;wchar_t&gt;
+ </para></listitem>
+
+ <listitem>
+ <para>
+ Rename abstract base class. See if just smash-overriding is a
+ better approach. Clarify, add sanity to naming.
+ </para>
+ </listitem>
+
+</itemizedlist>
+
+
+</sect2>
+
+
+<bibliography id="facet.ctype.biblio" xreflabel="facet.ctype.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ The GNU C Library
+ </title>
+
+ <author>
+ <surname>McGrath</surname>
+ <firstname>Roland</firstname>
+ </author>
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder>FSF</holder>
+ </copyright>
+ <pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Correspondence
+ </title>
+
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+ <holder></holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 14882:1998 Programming languages - C++
+ </title>
+
+ <copyright>
+ <year>1998</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 9899:1999 Programming languages - C
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>
+ The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://www.opennc.org/austin/docreg.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The C++ Programming Language, Special Edition
+ </title>
+
+ <author>
+ <surname>Stroustrup</surname>
+ <firstname>Bjarne</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley, Inc.</holder>
+ </copyright>
+ <pagenums>Appendix D</pagenums>
+
+ <publisher>
+ <publishername>
+ Addison Wesley
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>
+ Standard C++ IOStreams and Locales
+ </title>
+ <subtitle>
+ Advanced Programmer's Guide and Reference
+ </subtitle>
+
+ <author>
+ <surname>Langer</surname>
+ <firstname>Angelika</firstname>
+ </author>
+
+ <author>
+ <surname>Kreft</surname>
+ <firstname>Klaus</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley Longman, Inc.</holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Addison Wesley Longman
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/debug.xml b/libstdc++-v3/doc/xml/manual/debug.xml
new file mode 100644
index 00000000000..b52a2469161
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/debug.xml
@@ -0,0 +1,245 @@
+<sect1 id="manual.intro.using.debug" xreflabel="Debugging Support">
+<?dbhtml filename="debug.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ debug
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Debugging Support</title>
+
+<para>
+ There are numerous things that can be done to improve the ease with
+ which C++ binaries are debugged when using the GNU tool chain. Here
+ are some of them.
+</para>
+
+<sect2 id="debug.compiler" xreflabel="debug.compiler">
+<title>Using <command>g++</command></title>
+ <para>
+ Compiler flags determine how debug information is transmitted
+ between compilation and debug or analysis tools.
+ </para>
+
+ <para>
+ The default optimizations and debug flags for a libstdc++ build
+ are <code>-g -O2</code>. However, both debug and optimization
+ flags can be varied to change debugging characteristics. For
+ instance, turning off all optimization via the <code>-g -O0</code>
+ flag will disable inlining, so that stepping through all
+ functions, including inlined constructors and destructors, is
+ possible. In addition,
+ <code>-fno-eliminate-unused-debug-types</code> can be used when
+ additional debug information, such as nested class info, is
+ desired.
+</para>
+
+<para>
+ Or, the debug format that the compiler and debugger use to
+ communicate information about source constructs can be changed via
+ <code> -gdwarf-2 </code> or <code> -gstabs </code> flags: some
+ debugging formats permit more expressive type and scope information
+ to be shown in gdb. The default debug information for a particular
+ platform can be identified via the value set by the
+ PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
+</para>
+
+<para>
+ Many other options are available: please see <ulink
+ url="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options">"Options
+ for Debugging Your Program"</ulink> in Using the GNU Compiler
+ Collection (GCC) for a complete list.
+</para>
+</sect2>
+
+<sect2 id="debug.req" xreflabel="debug.req">
+<title>Debug Versions of Library Binary Files</title>
+
+<para>
+ If you would like debug symbols in libstdc++, there are two ways to
+ build libstdc++ with debug flags. The first is to run make from the
+ toplevel in a freshly-configured tree with
+</para>
+<programlisting>
+ --enable-libstdcxx-debug
+</programlisting>
+<para>and perhaps</para>
+<programlisting>
+ --enable-libstdcxx-debug-flags='...'
+</programlisting>
+<para>
+ to create a separate debug build. Both the normal build and the
+ debug build will persist, without having to specify
+ <code>CXXFLAGS</code>, and the debug library will be installed in a
+ separate directory tree, in <code>(prefix)/lib/debug</code>. For
+ more information, look at the <ulink
+ url="configopts.html">configuration options</ulink> document.
+</para>
+
+<para>
+ A second approach is to use the configuration flags
+</para>
+<programlisting>
+ make CXXFLAGS='-g3 -O0' all
+</programlisting>
+
+<para>
+ This quick and dirty approach is often sufficient for quick
+ debugging tasks, when you cannot or don't want to recompile your
+ application to use the <ulink url="#safe">debug mode</ulink>.</para>
+</sect2>
+
+<sect2 id="debug.memory" xreflabel="debug.memory">
+<title>Memory Leak Hunting</title>
+
+<para>
+ There are various third party memory tracing and debug utilities
+ that can be used to provide detailed memory allocation information
+ about C++ code. An exhaustive list of tools is not going to be
+ attempted, but includes <code>mtrace</code>, <code>valgrind</code>,
+ <code>mudflap</code>, and the non-free commercial product
+ <code>purify</code>. In addition, <code>libcwd</code> has a
+ replacement for the global new and delete operators that can track
+ memory allocation and deallocation and provide useful memory
+ statistics.
+</para>
+
+<para>
+ Regardless of the memory debugging tool being used, there is one
+ thing of great importance to keep in mind when debugging C++ code
+ that uses <code>new</code> and <code>delete</code>: there are
+ different kinds of allocation schemes that can be used by <code>
+ std::allocator </code>. For implementation details, see the <ulink
+ url="ext/mt_allocator.html">mt allocator</ulink> documentation and
+ look specifically for <code>GLIBCXX_FORCE_NEW</code>.
+</para>
+
+<para>
+ In a nutshell, the default allocator used by <code>
+ std::allocator</code> is a high-performance pool allocator, and can
+ give the mistaken impression that in a suspect executable, memory is
+ being leaked, when in reality the memory "leak" is a pool being used
+ by the library's allocator and is reclaimed after program
+ termination.
+</para>
+
+<para>
+ For valgrind, there are some specific items to keep in mind. First
+ of all, use a version of valgrind that will work with current GNU
+ C++ tools: the first that can do this is valgrind 1.0.4, but later
+ versions should work at least as well. Second of all, use a
+ completely unoptimized build to avoid confusing valgrind. Third, use
+ GLIBCXX_FORCE_NEW to keep extraneous pool allocation noise from
+ cluttering debug information.
+</para>
+
+<para>
+ Fourth, it may be necessary to force deallocation in other libraries
+ as well, namely the "C" library. On linux, this can be accomplished
+ with the appropriate use of the <code>__cxa_atexit</code> or
+ <code>atexit</code> functions.
+</para>
+
+<programlisting>
+ #include &lt;cstdlib&gt;
+
+ extern "C" void __libc_freeres(void);
+
+ void do_something() { }
+
+ int main()
+ {
+ atexit(__libc_freeres);
+ do_something();
+ return 0;
+ }
+</programlisting>
+
+
+<para>or, using <code>__cxa_atexit</code>:</para>
+
+<programlisting>
+ extern "C" void __libc_freeres(void);
+ extern "C" int __cxa_atexit(void (*func) (void *), void *arg, void *d);
+
+ void do_something() { }
+
+ int main()
+ {
+ extern void* __dso_handle __attribute__ ((__weak__));
+ __cxa_atexit((void (*) (void *)) __libc_freeres, NULL,
+ &amp;__dso_handle ? __dso_handle : NULL);
+ do_test();
+ return 0;
+ }
+</programlisting>
+
+<para>
+ Suggested valgrind flags, given the suggestions above about setting
+ up the runtime environment, library, and test file, might be:
+</para>
+<programlisting>
+ valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
+</programlisting>
+
+</sect2>
+
+<sect2 id="debug.gdb" xreflabel="debug.gdb">
+<title>Using <command>gdb</command></title>
+ <para>
+ </para>
+
+<para>
+ Many options are available for gdb itself: please see <ulink
+ url="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109">
+ "GDB features for C++" </ulink> in the gdb documentation. Also
+ recommended: the other parts of this manual.
+</para>
+
+<para>
+ These settings can either be switched on in at the gdb command line,
+ or put into a .gdbint file to establish default debugging
+ characteristics, like so:
+</para>
+
+<programlisting>
+ set print pretty on
+ set print object on
+ set print static-members on
+ set print vtbl on
+ set print demangle on
+ set demangle-style gnu-v3
+</programlisting>
+</sect2>
+
+<sect2 id="debug.exceptions" xreflabel="debug.exceptions">
+<title>Tracking uncaught exceptions</title>
+<para>
+ The <link linkend="support.termination.verbose">verbose
+ termination handler</link> gives information about uncaught
+ exceptions which are killing the program. It is described in the
+ linked-to page.
+</para>
+</sect2>
+
+<sect2 id="debug.debug_mode" xreflabel="debug.debug_mode">
+<title>Debug Mode</title>
+ <para> The <link linkend="manual.ext.debug_mode">Debug Mode</link>
+ has compile and run-time checks for many containers.
+ </para>
+</sect2>
+
+<sect2 id="debug.compile_time_checks" xreflabel="debug.compile_time_checks">
+<title>Compile Time Checking</title>
+ <para> The <link linkend="manual.ext.compile_checks">Compile-Time
+ Checks</link> Extension has compile-time checks for many algorithms.
+ </para>
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/debug_mode.xml b/libstdc++-v3/doc/xml/manual/debug_mode.xml
new file mode 100644
index 00000000000..e5f3becd590
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/debug_mode.xml
@@ -0,0 +1,888 @@
+<?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.debug_mode" xreflabel="Debug Mode">
+<?dbhtml filename="debug_mode.html"?>
+
+<chapterinfo>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ <keyword>
+ debug
+ </keyword>
+ </keywordset>
+</chapterinfo>
+
+<title>Debug Mode</title>
+
+<sect1 id="manual.ext.debug_mode.intro" xreflabel="Intro">
+ <title>Intro</title>
+ <para>
+ By default, libstdc++ is built with efficiency in mind, and
+ therefore performs little or no error checking that is not
+ required by the C++ standard. This means that programs that
+ incorrectly use the C++ standard library will exhibit behavior
+ that is not portable and may not even be predictable, because they
+ tread into implementation-specific or undefined behavior. To
+ detect some of these errors before they can become problematic,
+ libstdc++ offers a debug mode that provides additional checking of
+ library facilities, and will report errors in the use of libstdc++
+ as soon as they can be detected by emitting a description of the
+ problem to standard error and aborting the program. This debug
+ mode is available with GCC 3.4.0 and later versions.
+ </para>
+
+ <para>
+ The libstdc++ debug mode performs checking for many areas of the
+ C++ standard, but the focus is on checking interactions among
+ standard iterators, containers, and algorithms, including:
+ </para>
+
+ <itemizedlist>
+ <listitem><para><emphasis>Safe iterators</emphasis>: Iterators keep track of the
+ container whose elements they reference, so errors such as
+ incrementing a past-the-end iterator or dereferencing an iterator
+ that points to a container that has been destructed are diagnosed
+ immediately.</para></listitem>
+
+ <listitem><para><emphasis>Algorithm preconditions</emphasis>: Algorithms attempt to
+ validate their input parameters to detect errors as early as
+ possible. For instance, the <code>set_intersection</code>
+ algorithm requires that its iterator
+ parameters <code>first1</code> and <code>last1</code> form a valid
+ iterator range, and that the sequence
+ [<code>first1</code>, <code>last1</code>) is sorted according to
+ the same predicate that was passed
+ to <code>set_intersection</code>; the libstdc++ debug mode will
+ detect an error if the sequence is not sorted or was sorted by a
+ different predicate.</para></listitem>
+ </itemizedlist>
+
+</sect1>
+
+<sect1 id="manual.ext.debug_mode.semantics" xreflabel="Semantics">
+ <title>Semantics</title>
+ <para>
+ </para>
+
+<para>A program that uses the C++ standard library correctly
+ will maintain the same semantics under debug mode as it had with
+ the normal (release) library. All functional and exception-handling
+ guarantees made by the normal library also hold for the debug mode
+ library, with one exception: performance guarantees made by the
+ normal library may not hold in the debug mode library. For
+ instance, erasing an element in a <code>std::list</code> is a
+ constant-time operation in normal library, but in debug mode it is
+ linear in the number of iterators that reference that particular
+ list. So while your (correct) program won't change its results, it
+ is likely to execute more slowly.</para>
+
+<para>libstdc++ includes many extensions to the C++ standard library. In
+ some cases the extensions are obvious, such as the hashed
+ associative containers, whereas other extensions give predictable
+ results to behavior that would otherwise be undefined, such as
+ throwing an exception when a <code>std::basic_string</code> is
+ constructed from a NULL character pointer. This latter category also
+ includes implementation-defined and unspecified semantics, such as
+ the growth rate of a vector. Use of these extensions is not
+ considered incorrect, so code that relies on them will not be
+ rejected by debug mode. However, use of these extensions may affect
+ the portability of code to other implementations of the C++ standard
+ library, and is therefore somewhat hazardous. For this reason, the
+ libstdc++ debug mode offers a "pedantic" mode (similar to
+ GCC's <code>-pedantic</code> compiler flag) that attempts to emulate
+ the semantics guaranteed by the C++ standard. For
+ instance, constructing a <code>std::basic_string</code> with a NULL
+ character pointer would result in an exception under normal mode or
+ non-pedantic debug mode (this is a libstdc++ extension), whereas
+ under pedantic debug mode libstdc++ would signal an error. To enable
+ the pedantic debug mode, compile your program with
+ both <code>-D_GLIBCXX_DEBUG</code>
+ and <code>-D_GLIBCXX_DEBUG_PEDANTIC</code> .
+ (N.B. In GCC 3.4.x and 4.0.0, due to a bug,
+ <code>-D_GLIBXX_DEBUG_PEDANTIC</code> was also needed. The problem has
+ been fixed in GCC 4.0.1 and later versions.) </para>
+
+<para>The following library components provide extra debugging
+ capabilities in debug mode:</para>
+<itemizedlist>
+ <listitem><para><code>std::basic_string</code> (no safe iterators and see note below)</para></listitem>
+ <listitem><para><code>std::bitset</code></para></listitem>
+ <listitem><para><code>std::deque</code></para></listitem>
+ <listitem><para><code>std::list</code></para></listitem>
+ <listitem><para><code>std::map</code></para></listitem>
+ <listitem><para><code>std::multimap</code></para></listitem>
+ <listitem><para><code>std::multiset</code></para></listitem>
+ <listitem><para><code>std::set</code></para></listitem>
+ <listitem><para><code>std::vector</code></para></listitem>
+ <listitem><para><code>std::unordered_map</code></para></listitem>
+ <listitem><para><code>std::unordered_multimap</code></para></listitem>
+ <listitem><para><code>std::unordered_set</code></para></listitem>
+ <listitem><para><code>std::unordered_multiset</code></para></listitem>
+</itemizedlist>
+
+<para>N.B. although there are precondition checks for some string operations,
+e.g. <code>operator[]</code>,
+they will not always be run when using the <code>char</code> and
+<code>wchar_t</code> specialisations (<code>std::string</code> and
+<code>std::wstring</code>). This is because libstdc++ uses GCC's
+<code>extern template</code> extension to provide explicit instantiations
+of <code>std::string</code> and <code>std::wstring</code>, and those
+explicit instantiations don't include the debug-mode checks. If the
+containing functions are inlined then the checks will run, so compiling
+with <code>-O1</code> might be enough to enable them. Alternatively
+<code>-D_GLIBCXX_EXTERN_TEMPLATE=0</code> will suppress the declarations
+of the explicit instantiations and cause the functions to be instantiated
+with the debug-mode checks included, but this is unsupported and not
+guaranteed to work. For full debug-mode support you can use the
+<code>__gnu_debug::basic_string</code> debugging container directly,
+which always works correctly.
+</para>
+
+</sect1>
+
+<sect1 id="manual.ext.debug_mode.using" xreflabel="Using">
+ <title>Using</title>
+ <para>
+ </para>
+<sect2 id="debug_mode.using.mode" xreflabel="Using Mode">
+ <title>Using the Debug Mode</title>
+
+<para>To use the libstdc++ debug mode, compile your application with the
+ compiler flag <code>-D_GLIBCXX_DEBUG</code>. Note that this flag
+ changes the sizes and behavior of standard class templates such
+ as <code>std::vector</code>, and therefore you can only link code
+ compiled with debug mode and code compiled without debug mode if no
+ instantiation of a container is passed between the two translation
+ units.</para>
+
+<para>By default, error messages are formatted to fit on lines of about
+ 78 characters. The environment variable
+ <code>GLIBCXX_DEBUG_MESSAGE_LENGTH</code> can be used to request a
+ different length.</para>
+
+</sect2>
+
+<sect2 id="debug_mode.using.specific" xreflabel="Using Specific">
+ <title>Using a Specific Debug Container</title>
+<para>When it is not feasible to recompile your entire application, or
+ only specific containers need checking, debugging containers are
+ available as GNU extensions. These debugging containers are
+ functionally equivalent to the standard drop-in containers used in
+ debug mode, but they are available in a separate namespace as GNU
+ extensions and may be used in programs compiled with either release
+ mode or with debug mode. The
+ following table provides the names and headers of the debugging
+ containers:
+</para>
+
+<table frame='all'>
+<title>Debugging Containers</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>
+
+<thead>
+ <row>
+ <entry>Container</entry>
+ <entry>Header</entry>
+ <entry>Debug container</entry>
+ <entry>Debug header</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><classname>std::bitset</classname></entry>
+ <entry><filename class="headerfile">bitset</filename></entry>
+ <entry><classname>__gnu_debug::bitset</classname></entry>
+ <entry><filename class="headerfile">bitset</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::deque</classname></entry>
+ <entry><filename class="headerfile">deque</filename></entry>
+ <entry><classname>__gnu_debug::deque</classname></entry>
+ <entry><filename class="headerfile">deque</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::list</classname></entry>
+ <entry><filename class="headerfile">list</filename></entry>
+ <entry><classname>__gnu_debug::list</classname></entry>
+ <entry><filename class="headerfile">list</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::map</classname></entry>
+ <entry><filename class="headerfile">map</filename></entry>
+ <entry><classname>__gnu_debug::map</classname></entry>
+ <entry><filename class="headerfile">map</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::multimap</classname></entry>
+ <entry><filename class="headerfile">map</filename></entry>
+ <entry><classname>__gnu_debug::multimap</classname></entry>
+ <entry><filename class="headerfile">map</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::multiset</classname></entry>
+ <entry><filename class="headerfile">set</filename></entry>
+ <entry><classname>__gnu_debug::multiset</classname></entry>
+ <entry><filename class="headerfile">set</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::set</classname></entry>
+ <entry><filename class="headerfile">set</filename></entry>
+ <entry><classname>__gnu_debug::set</classname></entry>
+ <entry><filename class="headerfile">set</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::string</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ <entry><classname>__gnu_debug::string</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::wstring</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ <entry><classname>__gnu_debug::wstring</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::basic_string</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ <entry><classname>__gnu_debug::basic_string</classname></entry>
+ <entry><filename class="headerfile">string</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::vector</classname></entry>
+ <entry><filename class="headerfile">vector</filename></entry>
+ <entry><classname>__gnu_debug::vector</classname></entry>
+ <entry><filename class="headerfile">vector</filename></entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+<para>In addition, when compiling in C++0x mode, these additional
+containers have additional debug capability.
+</para>
+
+<table frame='all'>
+<title>Debugging Containers C++0x</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>
+
+<thead>
+ <row>
+ <entry>Container</entry>
+ <entry>Header</entry>
+ <entry>Debug container</entry>
+ <entry>Debug header</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><classname>std::unordered_map</classname></entry>
+ <entry><filename class="headerfile">unordered_map</filename></entry>
+ <entry><classname>__gnu_debug::unordered_map</classname></entry>
+ <entry><filename class="headerfile">unordered_map</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::unordered_multimap</classname></entry>
+ <entry><filename class="headerfile">unordered_map</filename></entry>
+ <entry><classname>__gnu_debug::unordered_multimap</classname></entry>
+ <entry><filename class="headerfile">unordered_map</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::unordered_set</classname></entry>
+ <entry><filename class="headerfile">unordered_set</filename></entry>
+ <entry><classname>__gnu_debug::unordered_set</classname></entry>
+ <entry><filename class="headerfile">unordered_set</filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::unordered_multiset</classname></entry>
+ <entry><filename class="headerfile">unordered_set</filename></entry>
+ <entry><classname>__gnu_debug::unordered_multiset</classname></entry>
+ <entry><filename class="headerfile">unordered_set</filename></entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+</sect2>
+</sect1>
+
+<sect1 id="manual.ext.debug_mode.design" xreflabel="Design">
+ <title>Design</title>
+ <para>
+ </para>
+ <sect2 id="manual.ext.debug_mode.design.goals" xreflabel="Goals">
+ <title>Goals</title>
+ <para>
+ </para>
+<para> The libstdc++ debug mode replaces unsafe (but efficient) standard
+ containers and iterators with semantically equivalent safe standard
+ containers and iterators to aid in debugging user programs. The
+ following goals directed the design of the libstdc++ debug mode:</para>
+
+ <itemizedlist>
+
+ <listitem><para><emphasis>Correctness</emphasis>: the libstdc++ debug mode must not change
+ the semantics of the standard library for all cases specified in
+ the ANSI/ISO C++ standard. The essence of this constraint is that
+ any valid C++ program should behave in the same manner regardless
+ of whether it is compiled with debug mode or release mode. In
+ particular, entities that are defined in namespace std in release
+ mode should remain defined in namespace std in debug mode, so that
+ legal specializations of namespace std entities will remain
+ valid. A program that is not valid C++ (e.g., invokes undefined
+ behavior) is not required to behave similarly, although the debug
+ mode will abort with a diagnostic when it detects undefined
+ behavior.</para></listitem>
+
+ <listitem><para><emphasis>Performance</emphasis>: the additional of the libstdc++ debug mode
+ must not affect the performance of the library when it is compiled
+ in release mode. Performance of the libstdc++ debug mode is
+ secondary (and, in fact, will be worse than the release
+ mode).</para></listitem>
+
+ <listitem><para><emphasis>Usability</emphasis>: the libstdc++ debug mode should be easy to
+ use. It should be easily incorporated into the user's development
+ environment (e.g., by requiring only a single new compiler switch)
+ and should produce reasonable diagnostics when it detects a
+ problem with the user program. Usability also involves detection
+ of errors when using the debug mode incorrectly, e.g., by linking
+ a release-compiled object against a debug-compiled object if in
+ fact the resulting program will not run correctly.</para></listitem>
+
+ <listitem><para><emphasis>Minimize recompilation</emphasis>: While it is expected that
+ users recompile at least part of their program to use debug
+ mode, the amount of recompilation affects the
+ detect-compile-debug turnaround time. This indirectly affects the
+ usefulness of the debug mode, because debugging some applications
+ may require rebuilding a large amount of code, which may not be
+ feasible when the suspect code may be very localized. There are
+ several levels of conformance to this requirement, each with its
+ own usability and implementation characteristics. In general, the
+ higher-numbered conformance levels are more usable (i.e., require
+ less recompilation) but are more complicated to implement than
+ the lower-numbered conformance levels.
+ <orderedlist>
+ <listitem><para><emphasis>Full recompilation</emphasis>: The user must recompile his or
+ her entire application and all C++ libraries it depends on,
+ including the C++ standard library that ships with the
+ compiler. This must be done even if only a small part of the
+ program can use debugging features.</para></listitem>
+
+ <listitem><para><emphasis>Full user recompilation</emphasis>: The user must recompile
+ his or her entire application and all C++ libraries it depends
+ on, but not the C++ standard library itself. This must be done
+ even if only a small part of the program can use debugging
+ features. This can be achieved given a full recompilation
+ system by compiling two versions of the standard library when
+ the compiler is installed and linking against the appropriate
+ one, e.g., a multilibs approach.</para></listitem>
+
+ <listitem><para><emphasis>Partial recompilation</emphasis>: The user must recompile the
+ parts of his or her application and the C++ libraries it
+ depends on that will use the debugging facilities
+ directly. This means that any code that uses the debuggable
+ standard containers would need to be recompiled, but code
+ that does not use them (but may, for instance, use IOStreams)
+ would not have to be recompiled.</para></listitem>
+
+ <listitem><para><emphasis>Per-use recompilation</emphasis>: The user must recompile the
+ parts of his or her application and the C++ libraries it
+ depends on where debugging should occur, and any other code
+ that interacts with those containers. This means that a set of
+ translation units that accesses a particular standard
+ container instance may either be compiled in release mode (no
+ checking) or debug mode (full checking), but must all be
+ compiled in the same way; a translation unit that does not see
+ that standard container instance need not be recompiled. This
+ also means that a translation unit <emphasis>A</emphasis> that contains a
+ particular instantiation
+ (say, <code>std::vector&lt;int&gt;</code>) compiled in release
+ mode can be linked against a translation unit <emphasis>B</emphasis> that
+ contains the same instantiation compiled in debug mode (a
+ feature not present with partial recompilation). While this
+ behavior is technically a violation of the One Definition
+ Rule, this ability tends to be very important in
+ practice. The libstdc++ debug mode supports this level of
+ recompilation. </para></listitem>
+
+ <listitem><para><emphasis>Per-unit recompilation</emphasis>: The user must only
+ recompile the translation units where checking should occur,
+ regardless of where debuggable standard containers are
+ used. This has also been dubbed "<code>-g</code> mode",
+ because the <code>-g</code> compiler switch works in this way,
+ emitting debugging information at a per--translation-unit
+ granularity. We believe that this level of recompilation is in
+ fact not possible if we intend to supply safe iterators, leave
+ the program semantics unchanged, and not regress in
+ performance under release mode because we cannot associate
+ extra information with an iterator (to form a safe iterator)
+ without either reserving that space in release mode
+ (performance regression) or allocating extra memory associated
+ with each iterator with <code>new</code> (changes the program
+ semantics).</para></listitem>
+ </orderedlist>
+ </para></listitem>
+ </itemizedlist>
+ </sect2>
+
+ <sect2 id="manual.ext.debug_mode.design.methods" xreflabel="Methods">
+ <title>Methods</title>
+ <para>
+ </para>
+<para>This section provides an overall view of the design of the
+ libstdc++ debug mode and details the relationship between design
+ decisions and the stated design goals.</para>
+
+ <sect3 id="debug_mode.design.methods.wrappers" xreflabel="Method Wrapper">
+ <title>The Wrapper Model</title>
+<para>The libstdc++ debug mode uses a wrapper model where the debugging
+ versions of library components (e.g., iterators and containers) form
+ a layer on top of the release versions of the library
+ components. The debugging components first verify that the operation
+ is correct (aborting with a diagnostic if an error is found) and
+ will then forward to the underlying release-mode container that will
+ perform the actual work. This design decision ensures that we cannot
+ regress release-mode performance (because the release-mode
+ containers are left untouched) and partially enables <ulink url="#mixing">mixing debug and release code</ulink> at link time,
+ although that will not be discussed at this time.</para>
+
+<para>Two types of wrappers are used in the implementation of the debug
+ mode: container wrappers and iterator wrappers. The two types of
+ wrappers interact to maintain relationships between iterators and
+ their associated containers, which are necessary to detect certain
+ types of standard library usage errors such as dereferencing
+ past-the-end iterators or inserting into a container using an
+ iterator from a different container.</para>
+
+ <sect4 id="debug_mode.design.methods.safe_iter" xreflabel="Method Safe Iter">
+ <title>Safe Iterators</title>
+<para>Iterator wrappers provide a debugging layer over any iterator that
+ is attached to a particular container, and will manage the
+ information detailing the iterator's state (singular,
+ dereferenceable, etc.) and tracking the container to which the
+ iterator is attached. Because iterators have a well-defined, common
+ interface the iterator wrapper is implemented with the iterator
+ adaptor class template <code>__gnu_debug::_Safe_iterator</code>,
+ which takes two template parameters:</para>
+
+<itemizedlist>
+ <listitem><para><code>Iterator</code>: The underlying iterator type, which must
+ be either the <code>iterator</code> or <code>const_iterator</code>
+ typedef from the sequence type this iterator can reference.</para></listitem>
+
+ <listitem><para><code>Sequence</code>: The type of sequence that this iterator
+ references. This sequence must be a safe sequence (discussed below)
+ whose <code>iterator</code> or <code>const_iterator</code> typedef
+ is the type of the safe iterator.</para></listitem>
+</itemizedlist>
+ </sect4>
+
+ <sect4 id="debug_mode.design.methods.safe_seq" xreflabel="Method Safe Seq">
+ <title>Safe Sequences (Containers)</title>
+
+<para>Container wrappers provide a debugging layer over a particular
+ container type. Because containers vary greatly in the member
+ functions they support and the semantics of those member functions
+ (especially in the area of iterator invalidation), container
+ wrappers are tailored to the container they reference, e.g., the
+ debugging version of <code>std::list</code> duplicates the entire
+ interface of <code>std::list</code>, adding additional semantic
+ checks and then forwarding operations to the
+ real <code>std::list</code> (a public base class of the debugging
+ version) as appropriate. However, all safe containers inherit from
+ the class template <code>__gnu_debug::_Safe_sequence</code>,
+ instantiated with the type of the safe container itself (an instance
+ of the curiously recurring template pattern).</para>
+
+<para>The iterators of a container wrapper will be
+ <ulink url="#safe_iterator">safe iterators</ulink> that reference sequences
+ of this type and wrap the iterators provided by the release-mode
+ base class. The debugging container will use only the safe
+ iterators within its own interface (therefore requiring the user to
+ use safe iterators, although this does not change correct user
+ code) and will communicate with the release-mode base class with
+ only the underlying, unsafe, release-mode iterators that the base
+ class exports.</para>
+
+<para> The debugging version of <code>std::list</code> will have the
+ following basic structure:</para>
+
+<programlisting>
+template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
+ class debug-list :
+ public release-list&lt;_Tp, _Allocator&gt;,
+ public __gnu_debug::_Safe_sequence&lt;debug-list&lt;_Tp, _Allocator&gt; &gt;
+ {
+ typedef release-list&lt;_Tp, _Allocator&gt; _Base;
+ typedef debug-list&lt;_Tp, _Allocator&gt; _Self;
+
+ public:
+ typedef __gnu_debug::_Safe_iterator&lt;typename _Base::iterator, _Self&gt; iterator;
+ typedef __gnu_debug::_Safe_iterator&lt;typename _Base::const_iterator, _Self&gt; const_iterator;
+
+ // duplicate std::list interface with debugging semantics
+ };
+</programlisting>
+ </sect4>
+ </sect3>
+
+ <sect3 id="debug_mode.design.methods.precond" xreflabel="Precondition check">
+ <title>Precondition Checking</title>
+<para>The debug mode operates primarily by checking the preconditions of
+ all standard library operations that it supports. Preconditions that
+ are always checked (regardless of whether or not we are in debug
+ mode) are checked via the <code>__check_xxx</code> macros defined
+ and documented in the source
+ file <code>include/debug/debug.h</code>. Preconditions that may or
+ may not be checked, depending on the debug-mode
+ macro <code>_GLIBCXX_DEBUG</code>, are checked via
+ the <code>__requires_xxx</code> macros defined and documented in the
+ same source file. Preconditions are validated using any additional
+ information available at run-time, e.g., the containers that are
+ associated with a particular iterator, the position of the iterator
+ within those containers, the distance between two iterators that may
+ form a valid range, etc. In the absence of suitable information,
+ e.g., an input iterator that is not a safe iterator, these
+ precondition checks will silently succeed.</para>
+
+<para>The majority of precondition checks use the aforementioned macros,
+ which have the secondary benefit of having prewritten debug
+ messages that use information about the current status of the
+ objects involved (e.g., whether an iterator is singular or what
+ sequence it is attached to) along with some static information
+ (e.g., the names of the function parameters corresponding to the
+ objects involved). When not using these macros, the debug mode uses
+ either the debug-mode assertion
+ macro <code>_GLIBCXX_DEBUG_ASSERT</code> , its pedantic
+ cousin <code>_GLIBCXX_DEBUG_PEDASSERT</code>, or the assertion
+ check macro that supports more advance formulation of error
+ messages, <code>_GLIBCXX_DEBUG_VERIFY</code>. These macros are
+ documented more thoroughly in the debug mode source code.</para>
+ </sect3>
+
+ <sect3 id="debug_mode.design.methods.coexistence" xreflabel="Coexistence">
+ <title>Release- and debug-mode coexistence</title>
+<para>The libstdc++ debug mode is the first debug mode we know of that
+ is able to provide the "Per-use recompilation" (4) guarantee, that
+ allows release-compiled and debug-compiled code to be linked and
+ executed together without causing unpredictable behavior. This
+ guarantee minimizes the recompilation that users are required to
+ perform, shortening the detect-compile-debug bughunting cycle
+ and making the debug mode easier to incorporate into development
+ environments by minimizing dependencies.</para>
+
+<para>Achieving link- and run-time coexistence is not a trivial
+ implementation task. To achieve this goal we required a small
+ extension to the GNU C++ compiler (described in the GCC Manual for
+ C++ Extensions, see <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Strong-Using.html">strong
+ using</ulink>), and a complex organization of debug- and
+ release-modes. The end result is that we have achieved per-use
+ recompilation but have had to give up some checking of the
+ <code>std::basic_string</code> class template (namely, safe
+ iterators).
+</para>
+
+ <sect4 id="methods.coexistence.compile" xreflabel="Compile">
+ <title>Compile-time coexistence of release- and debug-mode components</title>
+
+<para>Both the release-mode components and the debug-mode
+ components need to exist within a single translation unit so that
+ the debug versions can wrap the release versions. However, only one
+ of these components should be user-visible at any particular
+ time with the standard name, e.g., <code>std::list</code>. </para>
+
+<para>In release mode, we define only the release-mode version of the
+ component with its standard name and do not include the debugging
+ component at all. The release mode version is defined within the
+ namespace <code>std</code>. Minus the namespace associations, this
+ method leaves the behavior of release mode completely unchanged from
+ its behavior prior to the introduction of the libstdc++ debug
+ mode. Here's an example of what this ends up looking like, in
+ C++.</para>
+
+<programlisting>
+namespace std
+{
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ {
+ // ...
+ };
+} // namespace std
+</programlisting>
+
+<para>In debug mode we include the release-mode container (which is now
+defined in in the namespace <code>__norm</code>) and also the
+debug-mode container. The debug-mode container is defined within the
+namespace <code>__debug</code>, which is associated with namespace
+<code>std</code> via the GNU namespace association extension. This
+method allows the debug and release versions of the same component to
+coexist at compile-time and link-time without causing an unreasonable
+maintenance burden, while minimizing confusion. Again, this boils down
+to C++ code as follows:</para>
+
+<programlisting>
+namespace std
+{
+ namespace __norm
+ {
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ {
+ // ...
+ };
+ } // namespace __gnu_norm
+
+ namespace __debug
+ {
+ template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
+ class list
+ : public __norm::list&lt;_Tp, _Alloc&gt;,
+ public __gnu_debug::_Safe_sequence&lt;list&lt;_Tp, _Alloc&gt; &gt;
+ {
+ // ...
+ };
+ } // namespace __norm
+
+ using namespace __debug __attribute__ ((strong));
+}
+</programlisting>
+ </sect4>
+
+ <sect4 id="methods.coexistence.link" xreflabel="Link">
+ <title>Link- and run-time coexistence of release- and
+ debug-mode components</title>
+
+<para>Because each component has a distinct and separate release and
+debug implementation, there are are no issues with link-time
+coexistence: the separate namespaces result in different mangled
+names, and thus unique linkage.</para>
+
+<para>However, components that are defined and used within the C++
+standard library itself face additional constraints. For instance,
+some of the member functions of <code> std::moneypunct</code> return
+<code>std::basic_string</code>. Normally, this is not a problem, but
+with a mixed mode standard library that could be using either
+debug-mode or release-mode <code> basic_string</code> objects, things
+get more complicated. As the return value of a function is not
+encoded into the mangled name, there is no way to specify a
+release-mode or a debug-mode string. In practice, this results in
+runtime errors. A simplified example of this problem is as follows.
+</para>
+
+<para> Take this translation unit, compiled in debug-mode: </para>
+<programlisting>
+// -D_GLIBCXX_DEBUG
+#include &lt;string&gt;
+
+std::string test02();
+
+std::string test01()
+{
+ return test02();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+</programlisting>
+
+<para> ... and linked to this translation unit, compiled in release mode:</para>
+
+<programlisting>
+#include &lt;string&gt;
+
+std::string
+test02()
+{
+ return std::string("toast");
+}
+</programlisting>
+
+<para> For this reason we cannot easily provide safe iterators for
+ the <code>std::basic_string</code> class template, as it is present
+ throughout the C++ standard library. For instance, locale facets
+ define typedefs that include <code>basic_string</code>: in a mixed
+ debug/release program, should that typedef be based on the
+ debug-mode <code>basic_string</code> or the
+ release-mode <code>basic_string</code>? While the answer could be
+ "both", and the difference hidden via renaming a la the
+ debug/release containers, we must note two things about locale
+ facets:</para>
+
+<orderedlist>
+ <listitem><para>They exist as shared state: one can create a facet in one
+ translation unit and access the facet via the same type name in a
+ different translation unit. This means that we cannot have two
+ different versions of locale facets, because the types would not be
+ the same across debug/release-mode translation unit barriers.</para></listitem>
+
+ <listitem><para>They have virtual functions returning strings: these functions
+ mangle in the same way regardless of the mangling of their return
+ types (see above), and their precise signatures can be relied upon
+ by users because they may be overridden in derived classes.</para></listitem>
+</orderedlist>
+
+<para>With the design of libstdc++ debug mode, we cannot effectively hide
+ the differences between debug and release-mode strings from the
+ user. Failure to hide the differences may result in unpredictable
+ behavior, and for this reason we have opted to only
+ perform <code>basic_string</code> changes that do not require ABI
+ changes. The effect on users is expected to be minimal, as there are
+ simple alternatives (e.g., <code>__gnu_debug::basic_string</code>),
+ and the usability benefit we gain from the ability to mix debug- and
+ release-compiled translation units is enormous.</para>
+ </sect4>
+
+ <sect4 id="methods.coexistence.alt" xreflabel="Alternatives">
+<title>Alternatives for Coexistence</title>
+
+<para>The coexistence scheme above was chosen over many alternatives,
+ including language-only solutions and solutions that also required
+ extensions to the C++ front end. The following is a partial list of
+ solutions, with justifications for our rejection of each.</para>
+
+<itemizedlist>
+ <listitem><para><emphasis>Completely separate debug/release libraries</emphasis>: This is by
+ far the simplest implementation option, where we do not allow any
+ coexistence of debug- and release-compiled translation units in a
+ program. This solution has an extreme negative affect on usability,
+ because it is quite likely that some libraries an application
+ depends on cannot be recompiled easily. This would not meet
+ our <emphasis>usability</emphasis> or <emphasis>minimize recompilation</emphasis> criteria
+ well.</para></listitem>
+
+ <listitem><para><emphasis>Add a <code>Debug</code> boolean template parameter</emphasis>:
+ Partial specialization could be used to select the debug
+ implementation when <code>Debug == true</code>, and the state
+ of <code>_GLIBCXX_DEBUG</code> could decide whether the
+ default <code>Debug</code> argument is <code>true</code>
+ or <code>false</code>. This option would break conformance with the
+ C++ standard in both debug <emphasis>and</emphasis> release modes. This would
+ not meet our <emphasis>correctness</emphasis> criteria. </para></listitem>
+
+ <listitem><para><emphasis>Packaging a debug flag in the allocators</emphasis>: We could
+ reuse the <code>Allocator</code> template parameter of containers
+ by adding a sentinel wrapper <code>debug&lt;&gt;</code> that
+ signals the user's intention to use debugging, and pick up
+ the <code>debug&lt;&gt;</code> allocator wrapper in a partial
+ specialization. However, this has two drawbacks: first, there is a
+ conformance issue because the default allocator would not be the
+ standard-specified <code>std::allocator&lt;T&gt;</code>. Secondly
+ (and more importantly), users that specify allocators instead of
+ implicitly using the default allocator would not get debugging
+ containers. Thus this solution fails the <emphasis>correctness</emphasis>
+ criteria.</para></listitem>
+
+ <listitem><para><emphasis>Define debug containers in another namespace, and employ
+ a <code>using</code> declaration (or directive)</emphasis>: This is an
+ enticing option, because it would eliminate the need for
+ the <code>link_name</code> extension by aliasing the
+ templates. However, there is no true template aliasing mechanism
+ is C++, because both <code>using</code> directives and using
+ declarations disallow specialization. This method fails
+ the <emphasis>correctness</emphasis> criteria.</para></listitem>
+
+ <listitem><para><emphasis> Use implementation-specific properties of anonymous
+ namespaces. </emphasis>
+ See <ulink url="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00004.html"> this post
+ </ulink>
+ This method fails the <emphasis>correctness</emphasis> criteria.</para></listitem>
+
+ <listitem><para><emphasis>Extension: allow reopening on namespaces</emphasis>: This would
+ allow the debug mode to effectively alias the
+ namespace <code>std</code> to an internal namespace, such
+ as <code>__gnu_std_debug</code>, so that it is completely
+ separate from the release-mode <code>std</code> namespace. While
+ this will solve some renaming problems and ensure that
+ debug- and release-compiled code cannot be mixed unsafely, it ensures that
+ debug- and release-compiled code cannot be mixed at all. For
+ instance, the program would have two <code>std::cout</code>
+ objects! This solution would fails the <emphasis>minimize
+ recompilation</emphasis> requirement, because we would only be able to
+ support option (1) or (2).</para></listitem>
+
+ <listitem><para><emphasis>Extension: use link name</emphasis>: This option involves
+ complicated re-naming between debug-mode and release-mode
+ components at compile time, and then a g++ extension called <emphasis>
+ link name </emphasis> to recover the original names at link time. There
+ are two drawbacks to this approach. One, it's very verbose,
+ relying on macro renaming at compile time and several levels of
+ include ordering. Two, ODR issues remained with container member
+ functions taking no arguments in mixed-mode settings resulting in
+ equivalent link names, <code> vector::push_back() </code> being
+ one example.
+ See <ulink url="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00177.html">link
+ name</ulink> </para></listitem>
+</itemizedlist>
+
+<para>Other options may exist for implementing the debug mode, many of
+ which have probably been considered and others that may still be
+ lurking. This list may be expanded over time to include other
+ options that we could have implemented, but in all cases the full
+ ramifications of the approach (as measured against the design goals
+ for a libstdc++ debug mode) should be considered first. The DejaGNU
+ testsuite includes some testcases that check for known problems with
+ some solutions (e.g., the <code>using</code> declaration solution
+ that breaks user specialization), and additional testcases will be
+ added as we are able to identify other typical problem cases. These
+ test cases will serve as a benchmark by which we can compare debug
+ mode implementations.</para>
+ </sect4>
+ </sect3>
+ </sect2>
+
+ <sect2 id="manual.ext.debug_mode.design.other" xreflabel="Other">
+ <title>Other Implementations</title>
+ <para>
+ </para>
+<para> There are several existing implementations of debug modes for C++
+ standard library implementations, although none of them directly
+ supports debugging for programs using libstdc++. The existing
+ implementations include:</para>
+<itemizedlist>
+ <listitem><para><ulink url="http://www.mathcs.sjsu.edu/faculty/horstman/safestl.html">SafeSTL</ulink>:
+ SafeSTL was the original debugging version of the Standard Template
+ Library (STL), implemented by Cay S. Horstmann on top of the
+ Hewlett-Packard STL. Though it inspired much work in this area, it
+ has not been kept up-to-date for use with modern compilers or C++
+ standard library implementations.</para></listitem>
+
+ <listitem><para><ulink url="http://www.stlport.org/">STLport</ulink>: STLport is a free
+ implementation of the C++ standard library derived from the <ulink url="http://www.sgi.com/tech/stl/">SGI implementation</ulink>, and
+ ported to many other platforms. It includes a debug mode that uses a
+ wrapper model (that in some way inspired the libstdc++ debug mode
+ design), although at the time of this writing the debug mode is
+ somewhat incomplete and meets only the "Full user recompilation" (2)
+ recompilation guarantee by requiring the user to link against a
+ different library in debug mode vs. release mode.</para></listitem>
+
+ <listitem><para><ulink url="http://www.metrowerks.com/mw/default.htm">Metrowerks
+ CodeWarrior</ulink>: The C++ standard library that ships with Metrowerks
+ CodeWarrior includes a debug mode. It is a full debug-mode
+ implementation (including debugging for CodeWarrior extensions) and
+ is easy to use, although it meets only the "Full recompilation" (1)
+ recompilation guarantee.</para></listitem>
+</itemizedlist>
+
+ </sect2>
+</sect1>
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/manual/diagnostics.xml b/libstdc++-v3/doc/xml/manual/diagnostics.xml
new file mode 100644
index 00000000000..f43614c861e
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/diagnostics.xml
@@ -0,0 +1,126 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.diagnostics" xreflabel="Diagnostics">
+<?dbhtml filename="diagnostics.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Diagnostics</title>
+
+<chapter id="manual.diagnostics.exceptions" xreflabel="Exceptions">
+ <title>Exceptions</title>
+
+ <sect1 id="manual.diagnostics.exceptions.hierarchy" xreflabel="Exception Classes">
+ <title>Exception Classes</title>
+ <para>
+ All exception objects are defined in one of the standard header
+ files: <filename>exception</filename>,
+ <filename>stdexcept</filename>, <filename>new</filename>, and
+ <filename>typeinfo</filename>.
+ </para>
+
+ <para>
+ The base exception object is <classname>exception</classname>,
+ located in <filename>exception</filename>. This object has no
+ <classname>string</classname> member.
+ </para>
+
+ <para>
+ Derived from this are several classes that may have a
+ <classname>string</classname> member: a full heirarchy can be
+ found in the <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00233.html">source documentation</ulink>.
+ </para>
+
+ </sect1>
+ <sect1 id="manual.diagnostics.exceptions.data" xreflabel="Adding Data to Exceptions">
+ <title>Adding Data to Exceptions</title>
+ <para>
+ The standard exception classes carry with them a single string as
+ data (usually describing what went wrong or where the 'throw' took
+ place). It's good to remember that you can add your own data to
+ these exceptions when extending the hierarchy:
+ </para>
+ <programlisting>
+ struct My_Exception : public std::runtime_error
+ {
+ public:
+ My_Exception (const string&amp; whatarg)
+ : std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { }
+ int errno_at_time_of_throw() const { return e; }
+ DBID id_of_thing_that_threw() const { return id; }
+ protected:
+ int e;
+ DBID id; // some user-defined type
+ };
+ </programlisting>
+
+ </sect1>
+ <sect1 id="manual.diagnostics.exceptions.cancellation" xreflabel="Cancellation">
+ <title>Cancellation</title>
+ <para>
+ </para>
+ </sect1>
+</chapter>
+
+<chapter id="manual.diagnostics.concept_checking" xreflabel="Concept Checking">
+ <title>Concept Checking</title>
+ <para>
+ In 1999, SGI added <quote>concept checkers</quote> to their
+ implementation of the STL: code which checked the template
+ parameters of instantiated pieces of the STL, in order to insure
+ that the parameters being used met the requirements of the
+ standard. For example, the Standard requires that types passed as
+ template parameters to <classname>vector</classname> be
+ &quot;Assignable&quot; (which means what you think it means). The
+ checking was done during compilation, and none of the code was
+ executed at runtime.
+ </para>
+ <para>
+ Unfortunately, the size of the compiler files grew significantly
+ as a result. The checking code itself was cumbersome. And bugs
+ were found in it on more than one occasion.
+ </para>
+ <para>
+ The primary author of the checking code, Jeremy Siek, had already
+ started work on a replacement implementation. The new code has been
+ formally reviewed and accepted into
+ <ulink url="http://www.boost.org/libs/concept_check/concept_check.htm">the
+ Boost libraries</ulink>, and we are pleased to incorporate it into the
+ GNU C++ library.
+ </para>
+ <para>
+ The new version imposes a much smaller space overhead on the generated
+ object file. The checks are also cleaner and easier to read and
+ understand.
+ </para>
+
+ <para>
+ They are off by default for all versions of GCC.
+ They can be enabled at configure time with
+ <ulink url="../configopts.html"><literal>--enable-concept-checks</literal></ulink>.
+ You can enable them on a per-translation-unit basis with
+ <literal>-D_GLIBCXX_CONCEPT_CHECKS</literal>.
+ </para>
+
+ <para>
+ Please note that the upcoming C++ standard has first-class
+ support for template parameter constraints based on concepts in the core
+ language. This will obviate the need for the library-simulated concept
+ checking described above.
+ </para>
+
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml
new file mode 100644
index 00000000000..296e228311a
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/evolution.xml
@@ -0,0 +1,452 @@
+<sect1 id="appendix.porting.api" xreflabel="api">
+<?dbhtml filename="api.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>ISO C++</keyword>
+ <keyword>api</keyword>
+ <keyword>evolution</keyword>
+ <keyword>deprecation</keyword>
+ <keyword>history</keyword>
+ </keywordset>
+</sect1info>
+
+<title>API Evolution and Deprecation History</title>
+
+<para>
+A list of user-visible changes, in cronological order
+</para>
+
+<sect2 id="api.rel_300" xreflabel="api.rel_300">
+<title><constant>3.0</constant></title>
+
+ <para>
+Extensions moved to <filename class="directory">include/ext</filename>.
+ </para>
+
+<para>
+Include files from the SGI/HP sources that pre-date the ISO standard
+are added. These files are placed into
+the <filename class="directory">include/backward</filename> directory and a deprecated warning
+is added that notifies on inclusion (<literal>-Wno-deprecated</literal>
+deactivates the warning.)
+</para>
+
+<para>Deprecated include <filename class="headerfile">backward/strstream</filename> added.</para>
+
+<para>Removal of include <filename class="headerfile">builtinbuf.h</filename>, <filename class="headerfile">indstream.h</filename>, <filename class="headerfile">parsestream.h</filename>, <filename class="headerfile">PlotFile.h</filename>, <filename class="headerfile">SFile.h</filename>, <filename class="headerfile">stdiostream.h</filename>, and <filename class="headerfile">stream.h</filename>.
+</para>
+
+
+
+</sect2>
+
+<sect2 id="api.rel_310" xreflabel="api.rel_310">
+<title><constant>3.1</constant></title>
+ <para>
+ </para>
+
+<para>
+Extensions from SGI/HP moved from <code>namespace std</code>
+to <code>namespace __gnu_cxx</code>. As part of this, the following
+new includes are
+added: <filename class="headerfile">ext/algorithm</filename>, <filename class="headerfile">ext/functional</filename>, <filename class="headerfile">ext/iterator</filename>, <filename class="headerfile">ext/memory</filename>, and <filename class="headerfile">ext/numeric</filename>.
+</para>
+
+<para>
+Extensions to <code>basic_filebuf</code> introduced: <code>__gnu_cxx::enc_filebuf</code>, and <code>__gnu_cxx::stdio_filebuf</code>.
+</para>
+
+<para>
+Extensions to tree data structures added in <filename class="headerfile">ext/rb_tree</filename>.
+</para>
+
+<para>
+Removal of <filename class="headerfile">ext/tree</filename>, moved to <filename class="headerfile">backward/tree.h</filename>.
+</para>
+
+</sect2>
+
+<sect2 id="api.rel_320" xreflabel="api.rel_320">
+<title><constant>3.2</constant></title>
+ <para>
+ </para>
+<para>Symbol versioning introduced for shared library.</para>
+
+<para>Removal of include <filename class="headerfile">backward/strstream.h</filename>.</para>
+
+<para>Allocator changes. Change <code>__malloc_alloc</code> to <code>malloc_allocator</code> and <code>__new_alloc</code> to <code>new_allocator</code>. </para>
+
+ <para> For GCC releases from 2.95 through the 3.1 series, defining
+ <literal>__USE_MALLOC</literal> on the gcc command line would change the
+ default allocation strategy to instead use <code> malloc</code> and
+ <function>free</function>. See
+ <ulink url="../23_containers/howto.html#3">this note</ulink>
+ for details as to why this was something needing improvement.
+ </para>
+
+
+<para>Error handling in iostreams cleaned up, made consistent. </para>
+
+
+</sect2>
+
+<sect2 id="api.rel_330" xreflabel="api.rel_330">
+<title><constant>3.3</constant></title>
+ <para>
+ </para>
+</sect2>
+
+<sect2 id="api.rel_340" xreflabel="api.rel_340">
+<title><constant>3.4</constant></title>
+ <para>
+ </para>
+<para>
+Large file support.
+</para>
+
+<para> Extensions for generic characters and <code>char_traits</code> added in <filename class="headerfile">ext/pod_char_traits.h</filename>.
+</para>
+
+<para>
+Support for <code>wchar_t</code> specializations of <code>basic_filebuf</code> enhanced to support <code>UTF-8</code> and <code>Unicode</code>, depending on host. More hosts support basic <code>wchar_t</code> functionality.
+</para>
+
+<para>
+Support for <code>char_traits</code> beyond builtin types.
+</para>
+
+<para>
+Conformant <code>allocator</code> class and usage in containers. As
+part of this, the following extensions are
+added: <filename class="headerfile">ext/bitmap_allocator.h</filename>, <filename class="headerfile">ext/debug_allocator.h</filename>, <filename class="headerfile">ext/mt_allocator.h</filename>, <filename class="headerfile">ext/malloc_allocator.h</filename>,<filename class="headerfile">ext/new_allocator.h</filename>, <filename class="headerfile">ext/pool_allocator.h</filename>.
+</para>
+
+<para>
+This is a change from all previous versions, and may require
+source-level changes due to allocator-related changes to structures
+names and template parameters, filenames, and file locations. Some,
+like <code>__simple_alloc, __allocator, __alloc, </code> and <code>
+_Alloc_traits</code> have been removed.
+</para>
+
+<para>Default behavior of <code>std::allocator</code> has changed.</para>
+
+<para>
+ Previous versions prior to 3.4 cache allocations in a memory
+ pool, instead of passing through to call the global allocation
+ operators (ie, <classname>__gnu_cxx::pool_allocator</classname>). More
+ recent versions default to the
+ simpler <classname>__gnu_cxx::new_allocator</classname>.
+</para>
+
+<para> Previously, all allocators were written to the SGI
+ style, and all STL containers expected this interface. This
+ interface had a traits class called <code>_Alloc_traits</code> that
+ attempted to provide more information for compile-time allocation
+ selection and optimization. This traits class had another allocator
+ wrapper, <code>__simple_alloc&lt;T,A&gt;</code>, which was a
+ wrapper around another allocator, A, which itself is an allocator
+ for instances of T. But wait, there's more:
+ <code>__allocator&lt;T,A&gt;</code> is another adapter. Many of
+ the provided allocator classes were SGI style: such classes can be
+ changed to a conforming interface with this wrapper:
+ <code>__allocator&lt;T, __alloc&gt;</code> is thus the same as
+ <code>allocator&lt;T&gt;</code>.
+ </para>
+
+ <para> The class <classname>allocator</classname> used the typedef
+ <type>__alloc</type> to select an underlying allocator that
+ satisfied memory allocation requests. The selection of this
+ underlying allocator was not user-configurable.
+ </para>
+
+<table frame='all'>
+<title>Extension Allocators</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>
+
+ <thead>
+ <row>
+ <entry>Allocator (3.4)</entry>
+ <entry>Header (3.4)</entry>
+ <entry>Allocator (3.[0-3])</entry>
+ <entry>Header (3.[0-3])</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><classname>__gnu_cxx::new_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/new_allocator.h</filename></entry>
+ <entry><classname>std::__new_alloc</classname></entry>
+ <entry><filename class="headerfile">memory</filename></entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::malloc_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/malloc_allocator.h</filename></entry>
+ <entry><classname>std::__malloc_alloc_template&lt;int&gt;</classname></entry>
+ <entry><filename class="headerfile">memory</filename></entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::debug_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/debug_allocator.h</filename></entry>
+ <entry><classname>std::debug_alloc&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">memory</filename></entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::__pool_alloc&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/pool_allocator.h</filename></entry>
+ <entry><classname>std::__default_alloc_template&lt;bool,int&gt;</classname></entry>
+ <entry><filename class="headerfile">memory</filename></entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::__mt_alloc&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/mt_allocator.h</filename></entry>
+ <entry> </entry>
+ <entry> </entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::bitmap_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/bitmap_allocator.h</filename></entry>
+ <entry> </entry>
+ <entry> </entry>
+ </row>
+ </tbody>
+</tgroup>
+</table>
+
+ <para> 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.
+ </para>
+
+<table frame='all'>
+<title>Extension Allocators Continued</title>
+<tgroup cols='3' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+<colspec colname='c3'></colspec>
+
+<thead>
+ <row>
+ <entry>Allocator</entry>
+ <entry>Include</entry>
+ <entry>Version</entry>
+ </row>
+</thead>
+
+<tbody>
+ <row>
+ <entry><classname>__gnu_cxx::array_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/array_allocator.h</filename></entry>
+ <entry>4.0.0</entry>
+ </row>
+ <row>
+ <entry><classname>__gnu_cxx::throw_allocator&lt;T&gt;</classname></entry>
+ <entry><filename class="headerfile">ext/throw_allocator.h</filename></entry>
+ <entry>4.2.0</entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+
+<para>
+Debug mode first appears.
+</para>
+
+<para>
+Precompiled header support <acronym>PCH</acronym> support.
+</para>
+
+<para>
+Macro guard for changed, from <literal>_GLIBCPP_</literal> to <literal>_GLIBCXX_</literal>.
+</para>
+
+<para>
+Extension <filename class="headerfile">ext/stdio_sync_filebuf.h</filename> added.
+</para>
+
+<para>
+Extension <filename class="headerfile">ext/demangle.h</filename> added.
+</para>
+
+
+</sect2>
+
+<sect2 id="api.rel_400" xreflabel="api.rel_400">
+<title><constant>4.0</constant></title>
+ <para>
+ </para>
+<para>
+TR1 features first appear.
+</para>
+
+<para>
+Extension allocator <filename class="headerfile">ext/array_allocator.h</filename> added.
+</para>
+
+<para>
+Extension <code>codecvt</code> specializations moved to <filename class="headerfile">ext/codecvt_specializations.h</filename>.
+</para>
+
+<para>
+Removal of <filename class="headerfile">ext/demangle.h</filename>.
+</para>
+
+
+</sect2>
+
+<sect2 id="api.rel_410" xreflabel="api.rel_410">
+<title><constant>4.1</constant></title>
+ <para>
+ </para>
+
+
+<para>
+Removal of <filename class="headerfile">cassert</filename> from all standard headers: now has to be explicitly included for <code>std::assert</code> calls.
+</para>
+
+<para> Extensions for policy-based data structures first added. New includes,
+types, namespace <code>pb_assoc</code>.
+</para>
+
+
+
+<para> Extensions for typelists added in <filename class="headerfile">ext/typelist.h</filename>.
+</para>
+
+<para> Extension for policy-based <code>basic_string</code> first added: <code>__gnu_cxx::__versa_string</code> in <filename class="headerfile">ext/vstring.h</filename>.
+</para>
+
+</sect2>
+
+<sect2 id="api.rel_420" xreflabel="api.rel_420">
+<title><constant>4.2</constant></title>
+ <para>
+ </para>
+
+
+<para> Default visibility attributes applied to <code>namespace std</code>. Support for <code>-fvisibility</code>.
+</para>
+
+<para>TR1 <filename class="headerfile">random</filename>, <filename class="headerfile">complex</filename>, and C compatibility headers added.</para>
+
+<para> Extensions for concurrent programming consolidated
+into <filename class="headerfile">ext/concurrence.h</filename> and <filename class="headerfile">ext/atomicity.h</filename>,
+including change of namespace to <code>__gnu_cxx</code> in some
+cases. Added types
+include <code>_Lock_policy</code>, <code>__concurrence_lock_error</code>, <code>__concurrence_unlock_error</code>, <code>__mutex</code>, <code>__scoped_lock</code>.</para>
+
+<para> Extensions for type traits consolidated
+into <filename class="headerfile">ext/type_traits.h</filename>. Additional traits are added
+(<code>__conditional_type</code>, <code>__enable_if</code>, others.)
+</para>
+
+<para> Extensions for policy-based data structures revised. New includes,
+types, namespace moved to <code>__pb_ds</code>.
+</para>
+
+<para> Extensions for debug mode modified: now nested in <code>namespace
+std::__debug</code> and extensions in <code>namespace
+__gnu_cxx::__debug</code>.</para>
+
+<para> Extensions added: <filename class="headerfile">ext/typelist.h</filename>
+and <filename class="headerfile">ext/throw_allocator.h</filename>.
+</para>
+
+</sect2>
+
+<sect2 id="api.rel_430" xreflabel="api.rel_430">
+<title><constant>4.3</constant></title>
+ <para>
+ </para>
+
+
+<para>
+C++0X features first appear.
+</para>
+
+<para>TR1 <filename class="headerfile">regex</filename> and <filename class="headerfile">cmath</filename>'s mathematical special function added.</para>
+
+<para>
+Backward include edit.
+</para>
+<itemizedlist>
+ <listitem>
+ <para>Removed</para>
+ <para>
+<filename class="headerfile">algobase.h</filename> <filename class="headerfile">algo.h</filename> <filename class="headerfile">alloc.h</filename> <filename class="headerfile">bvector.h</filename> <filename class="headerfile">complex.h</filename>
+<filename class="headerfile">defalloc.h</filename> <filename class="headerfile">deque.h</filename> <filename class="headerfile">fstream.h</filename> <filename class="headerfile">function.h</filename> <filename class="headerfile">hash_map.h</filename> <filename class="headerfile">hash_set.h</filename>
+<filename class="headerfile">hashtable.h</filename> <filename class="headerfile">heap.h</filename> <filename class="headerfile">iomanip.h</filename> <filename class="headerfile">iostream.h</filename> <filename class="headerfile">istream.h</filename> <filename class="headerfile">iterator.h</filename>
+<filename class="headerfile">list.h</filename> <filename class="headerfile">map.h</filename> <filename class="headerfile">multimap.h</filename> <filename class="headerfile">multiset.h</filename> <filename class="headerfile">new.h</filename> <filename class="headerfile">ostream.h</filename> <filename class="headerfile">pair.h</filename> <filename class="headerfile">queue.h</filename> <filename class="headerfile">rope.h</filename> <filename class="headerfile">set.h</filename> <filename class="headerfile">slist.h</filename> <filename class="headerfile">stack.h</filename> <filename class="headerfile">streambuf.h</filename> <filename class="headerfile">stream.h</filename> <filename class="headerfile">tempbuf.h</filename>
+<filename class="headerfile">tree.h</filename> <filename class="headerfile">vector.h</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Added</para>
+ <para>
+ <filename class="headerfile">hash_map</filename> and <filename class="headerfile">hash_set</filename>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Added in C++0x</para>
+ <para>
+ <filename class="headerfile">auto_ptr.h</filename> and <filename class="headerfile">binders.h</filename>
+ </para>
+ </listitem>
+
+</itemizedlist>
+
+<para>
+Header dependency streamlining.
+</para>
+
+<itemizedlist>
+ <listitem><para><filename class="headerfile">algorithm</filename> no longer includes <filename class="headerfile">climits</filename>, <filename class="headerfile">cstring</filename>, or <filename class="headerfile">iosfwd</filename> </para></listitem>
+ <listitem><para><filename class="headerfile">bitset</filename> no longer includes <filename class="headerfile">istream</filename> or <filename class="headerfile">ostream</filename>, adds <filename class="headerfile">iosfwd</filename> </para></listitem>
+ <listitem><para><filename class="headerfile">functional</filename> no longer includes <filename class="headerfile">cstddef</filename></para></listitem>
+ <listitem><para><filename class="headerfile">iomanip</filename> no longer includes <filename class="headerfile">istream</filename>, <filename class="headerfile">istream</filename>, or <filename class="headerfile">functional</filename>, adds <filename class="headerfile">ioswd</filename> </para></listitem>
+ <listitem><para><filename class="headerfile">numeric</filename> no longer includes <filename class="headerfile">iterator</filename></para></listitem>
+ <listitem><para><filename class="headerfile">string</filename> no longer includes <filename class="headerfile">algorithm</filename> or <filename class="headerfile">memory</filename></para></listitem>
+
+ <listitem><para><filename class="headerfile">valarray</filename> no longer includes <filename class="headerfile">numeric</filename> or <filename class="headerfile">cstdlib</filename></para></listitem>
+ <listitem><para><filename class="headerfile">tr1/hashtable</filename> no longer includes <filename class="headerfile">memory</filename> or <filename class="headerfile">functional</filename></para></listitem>
+ <listitem><para><filename class="headerfile">tr1/memory</filename> no longer includes <filename class="headerfile">algorithm</filename></para></listitem>
+ <listitem><para><filename class="headerfile">tr1/random</filename> no longer includes <filename class="headerfile">algorithm</filename> or <filename class="headerfile">fstream</filename></para></listitem>
+</itemizedlist>
+
+<para>
+Debug mode for <filename class="headerfile">unordered_map</filename> and <filename class="headerfile">unordered_set</filename>.
+</para>
+
+<para>
+Parallel mode first appears.
+</para>
+
+<para>Variadic template implementations of items in <filename class="headerfile">tuple</filename> and
+ <filename class="headerfile">functional</filename>.
+</para>
+
+<para>Default <code>what</code> implementations give more elaborate
+ exception strings for <code>bad_cast</code>,
+ <code>bad_typeid</code>, <code>bad_exception</code>, and
+ <code>bad_alloc</code>.
+</para>
+
+<para>
+PCH binary files no longer installed. Instead, the source files are installed.
+</para>
+
+<para>
+Namespace pb_ds moved to __gnu_pb_ds.
+</para>
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/extensions.xml b/libstdc++-v3/doc/xml/manual/extensions.xml
new file mode 100644
index 00000000000..517d3bba39f
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/extensions.xml
@@ -0,0 +1,577 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.ext" xreflabel="Extensions">
+<?dbhtml filename="extensions.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Extensions</title>
+
+<preface>
+ <title></title>
+<para>
+ 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.
+</para>
+<para><emphasis>Before</emphasis> you leap in and use any of these
+extensions, be aware of two things:
+</para>
+<orderedlist>
+ <listitem>
+ <para>
+ Non-Standard means exactly that.
+ </para>
+ <para>
+ The behavior, and the very
+ existence, of these extensions may change with little or no
+ warning. (Ideally, the really good ones will appear in the next
+ revision of C++.) Also, other platforms, other compilers, other
+ versions of g++ or libstdc++ may not recognize these names, or
+ treat them differently, or...
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ You should know how to <ulink url="XXX">access
+ these headers properly</ulink>.
+ </para>
+ </listitem>
+</orderedlist>
+</preface>
+
+<!-- Chapter 01 : Compile Time Checks -->
+<chapter id="manual.ext.compile_checks" xreflabel="Compile Time Checks">
+ <title>Compile Time Checks</title>
+ <para>
+ Also known as concept checking.
+ </para>
+ <para>In 1999, SGI added <emphasis>concept checkers</emphasis> to their implementation
+ of the STL: code which checked the template parameters of
+ instantiated pieces of the STL, in order to insure that the parameters
+ being used met the requirements of the standard. For example,
+ the Standard requires that types passed as template parameters to
+ <code>vector</code> be <quote>Assignable</quote> (which means what you think
+ it means). The checking was done during compilation, and none of
+ the code was executed at runtime.
+ </para>
+ <para>Unfortunately, the size of the compiler files grew significantly
+ as a result. The checking code itself was cumbersome. And bugs
+ were found in it on more than one occasion.
+ </para>
+ <para>The primary author of the checking code, Jeremy Siek, had already
+ started work on a replacement implementation. The new code has been
+ formally reviewed and accepted into
+ <ulink url="http://www.boost.org/libs/concept_check/concept_check.htm">the
+ Boost libraries</ulink>, and we are pleased to incorporate it into the
+ GNU C++ library.
+ </para>
+ <para>The new version imposes a much smaller space overhead on the generated
+ object file. The checks are also cleaner and easier to read and
+ understand.
+ </para>
+ <para>They are off by default for all versions of GCC from 3.0 to 3.4 (the
+ latest release at the time of writing).
+ They can be enabled at configure time with
+ <ulink url="../configopts.html"><literal>--enable-concept-checks</literal></ulink>.
+ You can enable them on a per-translation-unit basis with
+ <code>#define _GLIBCXX_CONCEPT_CHECKS</code> for GCC 3.4 and higher
+ (or with <code>#define _GLIBCPP_CONCEPT_CHECKS</code> for versions
+ 3.1, 3.2 and 3.3).
+ </para>
+
+ <para>Please note that the upcoming C++ standard has first-class
+ support for template parameter constraints based on concepts in the core
+ language. This will obviate the need for the library-simulated concept
+ checking described above.
+ </para>
+
+</chapter>
+
+<!-- Chapter 02 : Debug Mode -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="debug_mode.xml">
+</xi:include>
+
+<!-- Chapter 03 : Parallel Mode -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="parallel_mode.xml">
+</xi:include>
+
+<!-- Chapter 04 : Allocators -->
+<chapter id="manual.ext.allocator" xreflabel="Allocators">
+ <title>Allocators</title>
+
+ <!-- Section 01 : __mt_alloc -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="mt_allocator.xml">
+ </xi:include>
+
+ <!-- Section 02 : bitmap_allocator -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="bitmap_allocator.xml">
+ </xi:include>
+
+</chapter>
+
+<!-- Chapter 05 : Containers -->
+<chapter id="manual.ext.containers" xreflabel="Containers">
+ <title>Containers</title>
+ <para>
+ </para>
+ <sect1 id="manual.ext.containers.pbds" xreflabel="Policy Based Data Structures">
+ <title>Policy Based Data Structures</title>
+ <para>
+ <ulink
+ url="http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/index.html">More details here</ulink>.
+ </para>
+ </sect1>
+
+ <sect1 id="manual.ext.containers.sgi" xreflabel="SGI ext">
+ <title>HP/SGI</title>
+ <para>
+ </para>
+
+<para>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:
+</para>
+<para>The old pre-standard <code>bit_vector</code> class is present for
+ backwards compatibility. It is simply a typedef for the
+ <code>vector&lt;bool&gt;</code> specialization.
+</para>
+<para>The <code>bitset</code> class has a number of extensions, described in the
+ rest of this item. First, we'll mention that this implementation of
+ <code>bitset&lt;N&gt;</code> is specialized for cases where N number of
+ bits will fit into a single word of storage. If your choice of N is
+ within that range (&lt;=32 on i686-pc-linux-gnu, for example), then all
+ of the operations will be faster.
+</para>
+<para>There are
+ versions of single-bit test, set, reset, and flip member functions which
+ do no range-checking. If we call them member functions of an instantiation
+ of &quot;bitset&lt;N&gt;,&quot; then their names and signatures are:
+</para>
+ <programlisting>
+ bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos);
+ bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos, int val);
+ bitset&lt;N&gt;&amp; _Unchecked_reset (size_t pos);
+ bitset&lt;N&gt;&amp; _Unchecked_flip (size_t pos);
+ bool _Unchecked_test (size_t pos);
+ </programlisting>
+ <para>Note that these may in fact be removed in the future, although we have
+ no present plans to do so (and there doesn't seem to be any immediate
+ reason to).
+</para>
+<para>The semantics of member function <code>operator[]</code> are not specified
+ in the C++ standard. A long-standing defect report calls for sensible
+ obvious semantics, which are already implemented here: <code>op[]</code>
+ on a const bitset returns a bool, and for a non-const bitset returns a
+ <code>reference</code> (a nested type). However, this implementation does
+ no range-checking on the index argument, which is in keeping with other
+ containers' <code>op[]</code> requirements. The defect report's proposed
+ resolution calls for range-checking to be done. We'll just wait and see...
+</para>
+<para>Finally, two additional searching functions have been added. They return
+ the index of the first &quot;on&quot; bit, and the index of the first
+ &quot;on&quot; bit that is after <code>prev</code>, respectively:
+</para>
+ <programlisting>
+ size_t _Find_first() const;
+ size_t _Find_next (size_t prev) const;</programlisting>
+<para>The same caveat given for the _Unchecked_* functions applies here also.
+</para>
+ </sect1>
+
+
+ <sect1 id="manual.ext.containers.deprecated_sgi" xreflabel="SGI ext dep">
+ <title>Deprecated HP/SGI</title>
+
+ <para>
+ The SGI hashing classes <classname>hash_set</classname> and
+ <classname>hash_set</classname> have been deprecated by the
+ unordered_set, unordered_multiset, unordered_map,
+ unordered_multimap containers in TR1 and the upcoming C++0x, and
+ may be removed in future releases.
+ </para>
+
+ <para>The SGI headers</para>
+ <programlisting>
+ &lt;hash_map&gt;
+ &lt;hash_set&gt;
+ &lt;rope&gt;
+ &lt;slist&gt;
+ &lt;rb_tree&gt;
+ </programlisting>
+ <para>are all here;
+ <code>&lt;hash_map&gt;</code> and <code>&lt;hash_set&gt;</code>
+ are deprecated but available as backwards-compatible extensions,
+ as discussed further below. <code>&lt;rope&gt;</code> is the
+ SGI specialization for large strings (&quot;rope,&quot;
+ &quot;large strings,&quot; get it? Love that geeky humor.)
+ <code>&lt;slist&gt;</code> is a singly-linked list, for when the
+ doubly-linked <code>list&lt;&gt;</code> is too much space
+ overhead, and <code>&lt;rb_tree&gt;</code> exposes the red-black
+ tree classes used in the implementation of the standard maps and
+ sets.
+ </para>
+ <para>Each of the associative containers map, multimap, set, and multiset
+ have a counterpart which uses a
+ <ulink url="http://www.sgi.com/tech/stl/HashFunction.html">hashing
+ function</ulink> to do the arranging, instead of a strict weak ordering
+ function. The classes take as one of their template parameters a
+ function object that will return the hash value; by default, an
+ instantiation of
+ <ulink url="http://www.sgi.com/tech/stl/hash.html">hash</ulink>.
+ You should specialize this functor for your class, or define your own,
+ before trying to use one of the hashing classes.
+ </para>
+ <para>The hashing classes support all the usual associative container
+ functions, as well as some extra constructors specifying the number
+ of buckets, etc.
+ </para>
+ <para>Why would you want to use a hashing class instead of the
+ <quote>normal</quote>implementations? Matt Austern writes:
+ </para>
+ <blockquote>
+ <para>
+ <emphasis>[W]ith a well chosen hash function, hash tables
+ generally provide much better average-case performance than
+ binary search trees, and much worse worst-case performance. So
+ if your implementation has hash_map, if you don't mind using
+ nonstandard components, and if you aren't scared about the
+ possibility of pathological cases, you'll probably get better
+ performance from hash_map.
+ </emphasis>
+ </para>
+ </blockquote>
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 06 : Utilities -->
+<chapter id="manual.ext.util" xreflabel="Utilities">
+ <title>Utilities</title>
+ <para>
+ 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:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para><code>identity_element</code> for addition and multiplication. *
+ </para>
+ </listitem>
+ <listitem>
+ <para>The functor <code>identity</code>, whose <code>operator()</code>
+ returns the argument unchanged. *
+ </para>
+ </listitem>
+ <listitem>
+ <para>Composition functors <code>unary_function</code> and
+ <code>binary_function</code>, and their helpers <code>compose1</code>
+ and <code>compose2</code>. *
+ </para>
+ </listitem>
+ <listitem>
+ <para><code>select1st</code> and <code>select2nd</code>, to strip pairs. *
+ </para>
+ </listitem>
+ <listitem><para><code>project1st</code> and <code>project2nd</code>. * </para></listitem>
+ <listitem><para>A set of functors/functions which always return the same result. They
+ are <code>constant_void_fun</code>, <code>constant_binary_fun</code>,
+ <code>constant_unary_fun</code>, <code>constant0</code>,
+ <code>constant1</code>, and <code>constant2</code>. * </para></listitem>
+ <listitem><para>The class <code>subtractive_rng</code>. * </para></listitem>
+ <listitem><para>mem_fun adaptor helpers <code>mem_fun1</code> and
+ <code>mem_fun1_ref</code> are provided for backwards compatibility. </para></listitem>
+</itemizedlist>
+<para>
+ 20.4.1 can use several different allocators; they are described on the
+ main extensions page.
+</para>
+<para>
+ 20.4.3 is extended with a special version of
+ <code>get_temporary_buffer</code> taking a second argument. The
+ argument is a pointer, which is ignored, but can be used to specify
+ the template type (instead of using explicit function template
+ arguments like the standard version does). That is, in addition to
+</para>
+<programlisting>
+get_temporary_buffer&lt;int&gt;(5);
+</programlisting>
+
+<para>
+you can also use
+</para>
+
+<programlisting>
+get_temporary_buffer(5, (int*)0);
+</programlisting>
+<para>
+ A class <code>temporary_buffer</code> is given in stl_tempbuf.h. *
+</para>
+<para>
+ The specialized algorithms of section 20.4.4 are extended with
+ <code>uninitialized_copy_n</code>. *
+</para>
+
+</chapter>
+
+<!-- Chapter 07 : Algorithms -->
+<chapter id="manual.ext.algorithms" xreflabel="Algorithms">
+ <title>Algorithms</title>
+<para>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.,
+</para>
+ <programlisting>
+ void count (first, last, value, n);</programlisting>
+<para>25.2 (mutating algorithms) is extended with two families of signatures,
+ random_sample and random_sample_n.
+</para>
+<para>25.2.1 (copy) is extended with
+</para>
+ <programlisting>
+ copy_n (_InputIter first, _Size count, _OutputIter result);</programlisting>
+<para>which copies the first 'count' elements at 'first' into 'result'.
+</para>
+<para>25.3 (sorting 'n' heaps 'n' stuff) is extended with some helper
+ predicates. Look in the doxygen-generated pages for notes on these.
+</para>
+ <itemizedlist>
+ <listitem><para><code>is_heap</code> tests whether or not a range is a heap.</para></listitem>
+ <listitem><para><code>is_sorted</code> tests whether or not a range is sorted in
+ nondescending order.</para></listitem>
+ </itemizedlist>
+<para>25.3.8 (lexigraphical_compare) is extended with
+</para>
+ <programlisting>
+ lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
+ _InputIter2 first2, _InputIter2 last2)</programlisting>
+<para>which does... what?
+</para>
+
+</chapter>
+
+<!-- Chapter 08 : Numerics -->
+<chapter id="manual.ext.numerics" xreflabel="Numerics">
+ <title>Numerics</title>
+<para>26.4, the generalized numeric operations such as accumulate, are extended
+ with the following functions:
+</para>
+ <programlisting>
+ power (x, n);
+ power (x, n, moniod_operation);</programlisting>
+<para>Returns, in FORTRAN syntax, &quot;x ** n&quot; where n&gt;=0. In the
+ case of n == 0, returns the <ulink url="#ch20">identity element</ulink> for the
+ monoid operation. The two-argument signature uses multiplication (for
+ a true &quot;power&quot; implementation), but addition is supported as well.
+ The operation functor must be associative.
+</para>
+<para>The <code>iota</code> function wins the award for Extension With the
+ Coolest Name. It &quot;assigns sequentially increasing values to a range.
+ That is, it assigns value to *first, value + 1 to *(first + 1) and so
+ on.&quot; Quoted from SGI documentation.
+</para>
+ <programlisting>
+ void iota(_ForwardIter first, _ForwardIter last, _Tp value);</programlisting>
+</chapter>
+
+<!-- Chapter 09 : Iterators -->
+<chapter id="manual.ext.iterators" xreflabel="Iterators">
+ <title>Iterators</title>
+<para>24.3.2 describes <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:
+</para>
+ <itemizedlist>
+ <listitem><para>input_iterator</para></listitem>
+ <listitem><para>output_iterator</para></listitem>
+ <listitem><para>forward_iterator</para></listitem>
+ <listitem><para>bidirectional_iterator</para></listitem>
+ <listitem><para>random_access_iterator</para></listitem>
+ </itemizedlist>
+<para>24.3.4 describes iterator operation <code>distance</code>, which takes
+ 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.
+</para>
+
+</chapter>
+
+<!-- Chapter 08 : IO -->
+<chapter id="manual.ext.io" xreflabel="IO">
+ <title>Input and Output</title>
+
+ <para>
+ Extensions allowing <code>filebuf</code>s to be constructed from
+ "C" types like FILE*s and file descriptors.
+ </para>
+
+ <sect1 id="manual.ext.io.filebuf_derived" xreflabel="Derived filebufs">
+ <title>Derived filebufs</title>
+
+ <para>The v2 library included non-standard extensions to construct
+ <code>std::filebuf</code>s from C stdio types such as
+ <code>FILE*</code>s and POSIX file descriptors.
+ Today the recommended way to use stdio types with libstdc++
+ IOStreams is via the <code>stdio_filebuf</code> class (see below),
+ but earlier releases provided slightly different mechanisms.
+ </para>
+ <itemizedlist>
+ <listitem><para>3.0.x <code>filebuf</code>s have another ctor with this signature:
+ <code>basic_filebuf(__c_file_type*, ios_base::openmode, int_type);
+ </code>
+ This comes in very handy in a number of places, such as
+ attaching Unix sockets, pipes, and anything else which uses file
+ descriptors, into the IOStream buffering classes. The three
+ arguments are as follows:
+ <itemizedlist>
+ <listitem><para><code>__c_file_type* F </code>
+ // the __c_file_type typedef usually boils down to stdio's FILE
+ </para></listitem>
+ <listitem><para><code>ios_base::openmode M </code>
+ // same as all the other uses of openmode
+ </para></listitem>
+ <listitem><para><code>int_type B </code>
+ // buffer size, defaults to BUFSIZ if not specified
+ </para></listitem>
+ </itemizedlist>
+ For those wanting to use file descriptors instead of FILE*'s, I
+ invite you to contemplate the mysteries of C's <code>fdopen()</code>.
+ </para></listitem>
+ <listitem><para>In library snapshot 3.0.95 and later, <code>filebuf</code>s bring
+ back an old extension: the <code>fd()</code> member function. The
+ integer returned from this function can be used for whatever file
+ descriptors can be used for on your platform. Naturally, the
+ library cannot track what you do on your own with a file descriptor,
+ so if you perform any I/O directly, don't expect the library to be
+ aware of it.
+ </para></listitem>
+ <listitem><para>Beginning with 3.1, the extra <code>filebuf</code> constructor and
+ the <code>fd()</code> function were removed from the standard
+ filebuf. Instead, <code>&lt;ext/stdio_filebuf.h&gt;</code> contains
+ a derived class called
+ <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html"><code>__gnu_cxx::stdio_filebuf</code></ulink>.
+ This class can be constructed from a C <code>FILE*</code> or a file
+ descriptor, and provides the <code>fd()</code> function.
+ </para></listitem>
+ </itemizedlist>
+ <para>If you want to access a <code>filebuf</code>'s file descriptor to
+ implement file locking (e.g. using the <code>fcntl()</code> system
+ call) then you might be interested in Henry Suter's
+ <ulink url="http://suter.home.cern.ch/suter/RWLock.html">RWLock</ulink>
+ class.
+ </para>
+
+ <para>
+ </para>
+ </sect1>
+</chapter>
+
+<!-- Chapter 11 : Demangling -->
+<chapter id="manual.ext.demangle" xreflabel="Demangling">
+ <title>Demangling</title>
+ <para>
+ Transforming C++ ABI itentifiers (like RTTI symbols) into the
+ original C++ source identifiers is called
+ <quote>demangling.</quote>
+ </para>
+ <para>
+ If you have read the <ulink
+ url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaceabi.html">source
+ documentation for <code>namespace abi</code></ulink> then you are
+ aware of the cross-vendor C++ ABI in use by GCC. One of the
+ exposed functions is used for demangling,
+ <code>abi::__cxa_demangle</code>.
+ </para>
+ <para>
+ In programs like <command>c++filt</command>, the linker, and other tools
+ have the ability to decode C++ ABI names, and now so can you.
+ </para>
+ <para>
+ (The function itself might use different demanglers, but that's the
+ whole point of abstract interfaces. If we change the implementation,
+ you won't notice.)
+ </para>
+ <para>
+ Probably the only times you'll be interested in demangling at runtime
+ are when you're seeing <code>typeid</code> strings in RTTI, or when
+ you're handling the runtime-support exception classes. For example:
+ </para>
+ <programlisting>
+#include &lt;exception&gt;
+#include &lt;iostream&gt;
+#include &lt;cxxabi.h&gt;
+
+struct empty { };
+
+template &lt;typename T, int N&gt;
+ struct bar { };
+
+
+int main()
+{
+ int status;
+ char *realname;
+
+ // exception classes not in &lt;stdexcept&gt;, thrown by the implementation
+ // instead of the user
+ std::bad_exception e;
+ realname = abi::__cxa_demangle(e.what(), 0, 0, &amp;status);
+ std::cout &lt;&lt; e.what() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
+ free(realname);
+
+
+ // typeid
+ bar&lt;empty,17&gt; u;
+ const std::type_info &amp;ti = typeid(u);
+
+ realname = abi::__cxa_demangle(ti.name(), 0, 0, &amp;status);
+ std::cout &lt;&lt; ti.name() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
+ free(realname);
+
+ return 0;
+}
+ </programlisting>
+ <para>
+ This prints
+ </para>
+
+ <screen>
+ <computeroutput>
+ St13bad_exception =&gt; std::bad_exception : 0
+ 3barI5emptyLi17EE =&gt; bar&lt;empty, 17&gt; : 0
+ </computeroutput>
+ </screen>
+
+ <para>
+ The demangler interface is described in the source documentation
+ linked to above. It is actually written in C, so you don't need to
+ 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.)
+ </para>
+</chapter>
+
+<!-- Chapter 12 : Concurrency -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="concurrency.xml">
+</xi:include>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/internals.xml b/libstdc++-v3/doc/xml/manual/internals.xml
new file mode 100644
index 00000000000..ccde22791bd
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/internals.xml
@@ -0,0 +1,548 @@
+<sect1 id="appendix.porting.internals" xreflabel="internals">
+<?dbhtml filename="internals.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ internals
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Porting to New Hardware or Operating Systems</title>
+
+<para>
+</para>
+
+
+<para>This document explains how to port libstdc++ (the GNU C++ library) to
+a new target.
+</para>
+
+ <para>In order to make the GNU C++ library (libstdc++) work with a new
+target, you must edit some configuration files and provide some new
+header files. Unless this is done, libstdc++ will use generic
+settings which may not be correct for your target; even if they are
+correct, they will likely be inefficient.
+ </para>
+
+ <para>Before you get started, make sure that you have a working C library on
+your target. The C library need not precisely comply with any
+particular standard, but should generally conform to the requirements
+imposed by the ANSI/ISO standard.
+ </para>
+
+ <para>In addition, you should try to verify that the C++ compiler generally
+works. It is difficult to test the C++ compiler without a working
+library, but you should at least try some minimal test cases.
+ </para>
+
+ <para>(Note that what we think of as a "target," the library refers to as
+a "host." The comment at the top of <code>configure.ac</code> explains why.)
+ </para>
+
+
+<sect2 id="internals.os" xreflabel="internals.os">
+<title>Operating System</title>
+
+<para>If you are porting to a new operating system (as opposed to a new chip
+using an existing operating system), you will need to create a new
+directory in the <code>config/os</code> hierarchy. For example, the IRIX
+configuration files are all in <code>config/os/irix</code>. There is no set
+way to organize the OS configuration directory. For example,
+<code>config/os/solaris/solaris-2.6</code> and
+<code>config/os/solaris/solaris-2.7</code> are used as configuration
+directories for these two versions of Solaris. On the other hand, both
+Solaris 2.7 and Solaris 2.8 use the <code>config/os/solaris/solaris-2.7</code>
+directory. The important information is that there needs to be a
+directory under <code>config/os</code> to store the files for your operating
+system.
+</para>
+
+ <para>You might have to change the <code>configure.host</code> file to ensure that
+your new directory is activated. Look for the switch statement that sets
+<code>os_include_dir</code>, and add a pattern to handle your operating system
+if the default will not suffice. The switch statement switches on only
+the OS portion of the standard target triplet; e.g., the <code>solaris2.8</code>
+in <code>sparc-sun-solaris2.8</code>. If the new directory is named after the
+OS portion of the triplet (the default), then nothing needs to be changed.
+ </para>
+
+ <para>The first file to create in this directory, should be called
+<code>os_defines.h</code>. This file contains basic macro definitions
+that are required to allow the C++ library to work with your C library.
+ </para>
+
+ <para>Several libstdc++ source files unconditionally define the macro
+<code>_POSIX_SOURCE</code>. On many systems, defining this macro causes
+large portions of the C library header files to be eliminated
+at preprocessing time. Therefore, you may have to <code>#undef</code> this
+macro, or define other macros (like <code>_LARGEFILE_SOURCE</code> or
+<code>__EXTENSIONS__</code>). You won't know what macros to define or
+undefine at this point; you'll have to try compiling the library and
+seeing what goes wrong. If you see errors about calling functions
+that have not been declared, look in your C library headers to see if
+the functions are declared there, and then figure out what macros you
+need to define. You will need to add them to the
+<code>CPLUSPLUS_CPP_SPEC</code> macro in the GCC configuration file for your
+target. It will not work to simply define these macros in
+<code>os_defines.h</code>.
+ </para>
+
+ <para>At this time, there are a few libstdc++-specific macros which may be
+defined:
+ </para>
+
+ <para><code>_GLIBCXX_USE_C99_CHECK</code> may be defined to 1 to check C99
+function declarations (which are not covered by specialization below)
+found in system headers against versions found in the library headers
+derived from the standard.
+ </para>
+
+ <para><code>_GLIBCXX_USE_C99_DYNAMIC</code> may be defined to an expression that
+yields 0 if and only if the system headers are exposing proper support
+for C99 functions (which are not covered by specialization below). If
+defined, it must be 0 while bootstrapping the compiler/rebuilding the
+library.
+ </para>
+
+ <para><code>_GLIBCXX_USE_C99_LONG_LONG_CHECK</code> may be defined to 1 to check
+the set of C99 long long function declarations found in system headers
+against versions found in the library headers derived from the
+standard.
+
+ </para>
+ <para><code>_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC</code> may be defined to an
+expression that yields 0 if and only if the system headers are
+exposing proper support for the set of C99 long long functions. If
+defined, it must be 0 while bootstrapping the compiler/rebuilding the
+library.
+ </para>
+ <para><code>_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC</code> may be defined to an
+expression that yields 0 if and only if the system headers
+are exposing proper support for the related set of macros. If defined,
+it must be 0 while bootstrapping the compiler/rebuilding the library.
+ </para>
+ <para><code>_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK</code> may be defined
+to 1 to check the related set of function declarations found in system
+headers against versions found in the library headers derived from
+the standard.
+ </para>
+ <para><code>_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC</code> may be defined
+to an expression that yields 0 if and only if the system headers
+are exposing proper support for the related set of functions. If defined,
+it must be 0 while bootstrapping the compiler/rebuilding the library.
+ </para>
+ <para>Finally, you should bracket the entire file in an include-guard, like
+this:
+ </para>
+
+<programlisting>
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES
+...
+#endif
+</programlisting>
+
+ <para>We recommend copying an existing <code>os_defines.h</code> to use as a
+starting point.
+ </para>
+</sect2>
+
+
+<sect2 id="internals.cpu" xreflabel="internals.cpu">
+<title>CPU</title>
+
+<para>If you are porting to a new chip (as opposed to a new operating system
+running on an existing chip), you will need to create a new directory in the
+<code>config/cpu</code> hierarchy. Much like the <link linkend="internals.os">Operating system</link> setup,
+there are no strict rules on how to organize the CPU configuration
+directory, but careful naming choices will allow the configury to find your
+setup files without explicit help.
+</para>
+
+ <para>We recommend that for a target triplet <code>&lt;CPU&gt;-&lt;vendor&gt;-&lt;OS&gt;</code>, you
+name your configuration directory <code>config/cpu/&lt;CPU&gt;</code>. If you do this,
+the configury will find the directory by itself. Otherwise you will need to
+edit the <code>configure.host</code> file and, in the switch statement that sets
+<code>cpu_include_dir</code>, add a pattern to handle your chip.
+ </para>
+
+ <para>Note that some chip families share a single configuration directory, for
+example, <code>alpha</code>, <code>alphaev5</code>, and <code>alphaev6</code> all use the
+<code>config/cpu/alpha</code> directory, and there is an entry in the
+<code>configure.host</code> switch statement to handle this.
+ </para>
+
+ <para>The <code>cpu_include_dir</code> sets default locations for the files controlling
+<link linkend="internals.thread_safety">Thread safety</link> and <link linkend="internals.numeric_limits">Numeric limits</link>, if the defaults are not
+appropriate for your chip.
+ </para>
+
+</sect2>
+
+
+<sect2 id="internals.char_types" xreflabel="internals.char_types">
+<title>Character Types</title>
+
+<para>The library requires that you provide three header files to implement
+character classification, analogous to that provided by the C libraries
+<code>&lt;ctype.h&gt;</code> header. You can model these on the files provided in
+<code>config/os/generic</code>. However, these files will almost
+certainly need some modification.
+</para>
+
+ <para>The first file to write is <code>ctype_base.h</code>. This file provides
+some very basic information about character classification. The libstdc++
+library assumes that your C library implements <code>&lt;ctype.h&gt;</code> by using
+a table (indexed by character code) containing integers, where each of
+these integers is a bit-mask indicating whether the character is
+upper-case, lower-case, alphabetic, etc. The <code>ctype_base.h</code>
+file gives the type of the integer, and the values of the various bit
+masks. You will have to peer at your own <code>&lt;ctype.h&gt;</code> to figure out
+how to define the values required by this file.
+ </para>
+
+ <para>The <code>ctype_base.h</code> header file does not need include guards.
+It should contain a single <code>struct</code> definition called
+<code>ctype_base</code>. This <code>struct</code> should contain two type
+declarations, and one enumeration declaration, like this example, taken
+from the IRIX configuration:
+ </para>
+
+<programlisting>
+ struct ctype_base
+ {
+ typedef unsigned int mask;
+ typedef int* __to_type;
+
+ enum
+ {
+ space = _ISspace,
+ print = _ISprint,
+ cntrl = _IScntrl,
+ upper = _ISupper,
+ lower = _ISlower,
+ alpha = _ISalpha,
+ digit = _ISdigit,
+ punct = _ISpunct,
+ xdigit = _ISxdigit,
+ alnum = _ISalnum,
+ graph = _ISgraph
+ };
+ };
+</programlisting>
+
+<para>The <code>mask</code> type is the type of the elements in the table. If your
+C library uses a table to map lower-case numbers to upper-case numbers,
+and vice versa, you should define <code>__to_type</code> to be the type of the
+elements in that table. If you don't mind taking a minor performance
+penalty, or if your library doesn't implement <code>toupper</code> and
+<code>tolower</code> in this way, you can pick any pointer-to-integer type,
+but you must still define the type.
+</para>
+
+ <para>The enumeration should give definitions for all the values in the above
+example, using the values from your native <code>&lt;ctype.h&gt;</code>. They can
+be given symbolically (as above), or numerically, if you prefer. You do
+not have to include <code>&lt;ctype.h&gt;</code> in this header; it will always be
+included before <code>ctype_base.h</code> is included.
+ </para>
+
+ <para>The next file to write is <code>ctype_noninline.h</code>, which also does
+not require include guards. This file defines a few member functions
+that will be included in <code>include/bits/locale_facets.h</code>. The first
+function that must be written is the <code>ctype&lt;char&gt;::ctype</code>
+constructor. Here is the IRIX example:
+ </para>
+
+<programlisting>
+ctype&lt;char&gt;::ctype(const mask* __table = 0, bool __del = false,
+ size_t __refs = 0)
+ : _Ctype_nois&lt;char&gt;(__refs), _M_del(__table != 0 &amp;&amp; __del),
+ _M_toupper(NULL),
+ _M_tolower(NULL),
+ _M_ctable(NULL),
+ _M_table(!__table
+ ? (const mask*) (__libc_attr._ctype_tbl-&gt;_class + 1)
+ : __table)
+ { }
+</programlisting>
+
+<para>There are two parts of this that you might choose to alter. The first,
+and most important, is the line involving <code>__libc_attr</code>. That is
+IRIX system-dependent code that gets the base of the table mapping
+character codes to attributes. You need to substitute code that obtains
+the address of this table on your system. If you want to use your
+operating system's tables to map upper-case letters to lower-case, and
+vice versa, you should initialize <code>_M_toupper</code> and
+<code>_M_tolower</code> with those tables, in similar fashion.
+</para>
+
+ <para>Now, you have to write two functions to convert from upper-case to
+lower-case, and vice versa. Here are the IRIX versions:
+ </para>
+
+<programlisting>
+ char
+ ctype&lt;char&gt;::do_toupper(char __c) const
+ { return _toupper(__c); }
+
+ char
+ ctype&lt;char&gt;::do_tolower(char __c) const
+ { return _tolower(__c); }
+</programlisting>
+
+<para>Your C library provides equivalents to IRIX's <code>_toupper</code> and
+<code>_tolower</code>. If you initialized <code>_M_toupper</code> and
+<code>_M_tolower</code> above, then you could use those tables instead.
+</para>
+
+ <para>Finally, you have to provide two utility functions that convert strings
+of characters. The versions provided here will always work - but you
+could use specialized routines for greater performance if you have
+machinery to do that on your system:
+ </para>
+
+<programlisting>
+ const char*
+ ctype&lt;char&gt;::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low &lt; __high)
+ {
+ *__low = do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ const char*
+ ctype&lt;char&gt;::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low &lt; __high)
+ {
+ *__low = do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+</programlisting>
+
+ <para>You must also provide the <code>ctype_inline.h</code> file, which
+contains a few more functions. On most systems, you can just copy
+<code>config/os/generic/ctype_inline.h</code> and use it on your system.
+ </para>
+
+ <para>In detail, the functions provided test characters for particular
+properties; they are analogous to the functions like <code>isalpha</code> and
+<code>islower</code> provided by the C library.
+ </para>
+
+ <para>The first function is implemented like this on IRIX:
+ </para>
+
+<programlisting>
+ bool
+ ctype&lt;char&gt;::
+ is(mask __m, char __c) const throw()
+ { return (_M_table)[(unsigned char)(__c)] &amp; __m; }
+</programlisting>
+
+<para>The <code>_M_table</code> is the table passed in above, in the constructor.
+This is the table that contains the bitmasks for each character. The
+implementation here should work on all systems.
+</para>
+
+ <para>The next function is:
+ </para>
+
+<programlisting>
+ const char*
+ ctype&lt;char&gt;::
+ is(const char* __low, const char* __high, mask* __vec) const throw()
+ {
+ while (__low &lt; __high)
+ *__vec++ = (_M_table)[(unsigned char)(*__low++)];
+ return __high;
+ }
+</programlisting>
+
+<para>This function is similar; it copies the masks for all the characters
+from <code>__low</code> up until <code>__high</code> into the vector given by
+<code>__vec</code>.
+</para>
+
+ <para>The last two functions again are entirely generic:
+ </para>
+
+<programlisting>
+ const char*
+ ctype&lt;char&gt;::
+ scan_is(mask __m, const char* __low, const char* __high) const throw()
+ {
+ while (__low &lt; __high &amp;&amp; !this-&gt;is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype&lt;char&gt;::
+ scan_not(mask __m, const char* __low, const char* __high) const throw()
+ {
+ while (__low &lt; __high &amp;&amp; this-&gt;is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="internals.thread_safety" xreflabel="internals.thread_safety">
+<title>Thread Safety</title>
+
+<para>The C++ library string functionality requires a couple of atomic
+operations to provide thread-safety. If you don't take any special
+action, the library will use stub versions of these functions that are
+not thread-safe. They will work fine, unless your applications are
+multi-threaded.
+</para>
+
+ <para>If you want to provide custom, safe, versions of these functions, there
+are two distinct approaches. One is to provide a version for your CPU,
+using assembly language constructs. The other is to use the
+thread-safety primitives in your operating system. In either case, you
+make a file called <code>atomicity.h</code>, and the variable
+<code>ATOMICITYH</code> must point to this file.
+ </para>
+
+ <para>If you are using the assembly-language approach, put this code in
+<code>config/cpu/&lt;chip&gt;/atomicity.h</code>, where chip is the name of
+your processor (see <link linkend="internals.cpu">CPU</link>). No additional changes are necessary to
+locate the file in this case; <code>ATOMICITYH</code> will be set by default.
+ </para>
+
+ <para>If you are using the operating system thread-safety primitives approach,
+you can also put this code in the same CPU directory, in which case no more
+work is needed to locate the file. For examples of this approach,
+see the <code>atomicity.h</code> file for IRIX or IA64.
+ </para>
+
+ <para>Alternatively, if the primitives are more closely related to the OS
+than they are to the CPU, you can put the <code>atomicity.h</code> file in
+the <link linkend="internals.os">Operating system</link> directory instead. In this case, you must
+edit <code>configure.host</code>, and in the switch statement that handles
+operating systems, override the <code>ATOMICITYH</code> variable to point to
+the appropriate <code>os_include_dir</code>. For examples of this approach,
+see the <code>atomicity.h</code> file for AIX.
+ </para>
+
+ <para>With those bits out of the way, you have to actually write
+<code>atomicity.h</code> itself. This file should be wrapped in an
+include guard named <code>_GLIBCXX_ATOMICITY_H</code>. It should define one
+type, and two functions.
+ </para>
+
+ <para>The type is <code>_Atomic_word</code>. Here is the version used on IRIX:
+ </para>
+
+<programlisting>
+typedef long _Atomic_word;
+</programlisting>
+
+<para>This type must be a signed integral type supporting atomic operations.
+If you're using the OS approach, use the same type used by your system's
+primitives. Otherwise, use the type for which your CPU provides atomic
+primitives.
+</para>
+
+ <para>Then, you must provide two functions. The bodies of these functions
+must be equivalent to those provided here, but using atomic operations:
+ </para>
+
+<programlisting>
+ static inline _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add (_Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result = *__mem;
+ *__mem += __val;
+ return __result;
+ }
+
+ static inline void
+ __attribute__ ((__unused__))
+ __atomic_add (_Atomic_word* __mem, int __val)
+ {
+ *__mem += __val;
+ }
+</programlisting>
+
+</sect2>
+
+
+<sect2 id="internals.numeric_limits" xreflabel="internals.numeric_limits">
+<title>Numeric Limits</title>
+
+<para>The C++ library requires information about the fundamental data types,
+such as the minimum and maximum representable values of each type.
+You can define each of these values individually, but it is usually
+easiest just to indicate how many bits are used in each of the data
+types and let the library do the rest. For information about the
+macros to define, see the top of <code>include/bits/std_limits.h</code>.
+</para>
+
+ <para>If you need to define any macros, you can do so in <code>os_defines.h</code>.
+However, if all operating systems for your CPU are likely to use the
+same values, you can provide a CPU-specific file instead so that you
+do not have to provide the same definitions for each operating system.
+To take that approach, create a new file called <code>cpu_limits.h</code> in
+your CPU configuration directory (see <link linkend="internals.cpu">CPU</link>).
+ </para>
+
+</sect2>
+
+
+<sect2 id="internals.libtool" xreflabel="internals.libtool">
+<title>Libtool</title>
+
+<para>The C++ library is compiled, archived and linked with libtool.
+Explaining the full workings of libtool is beyond the scope of this
+document, but there are a few, particular bits that are necessary for
+porting.
+</para>
+
+ <para>Some parts of the libstdc++ library are compiled with the libtool
+<code>--tags CXX</code> option (the C++ definitions for libtool). Therefore,
+<code>ltcf-cxx.sh</code> in the top-level directory needs to have the correct
+logic to compile and archive objects equivalent to the C version of libtool,
+<code>ltcf-c.sh</code>. Some libtool targets have definitions for C but not
+for C++, or C++ definitions which have not been kept up to date.
+ </para>
+
+ <para>The C++ run-time library contains initialization code that needs to be
+run as the library is loaded. Often, that requires linking in special
+object files when the C++ library is built as a shared library, or
+taking other system-specific actions.
+ </para>
+
+ <para>The libstdc++ library is linked with the C version of libtool, even
+though it is a C++ library. Therefore, the C version of libtool needs to
+ensure that the run-time library initializers are run. The usual way to
+do this is to build the library using <code>gcc -shared</code>.
+ </para>
+
+ <para>If you need to change how the library is linked, look at
+<code>ltcf-c.sh</code> in the top-level directory. Find the switch statement
+that sets <code>archive_cmds</code>. Here, adjust the setting for your
+operating system.
+ </para>
+
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/intro.xml b/libstdc++-v3/doc/xml/manual/intro.xml
new file mode 100644
index 00000000000..1a51e9e44f9
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/intro.xml
@@ -0,0 +1,664 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.intro" xreflabel="Introduction">
+<?dbhtml filename="intro.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Introduction</title>
+
+<!-- Chapter 01 : Status -->
+<chapter id="manual.intro.status" xreflabel="Status">
+ <title>Status</title>
+
+
+ <sect1 id="manual.intro.status.standard" xreflabel="Implementation Status">
+ <title>Implementation Status</title>
+
+ <!-- Section 01 : Status C++ 1998 -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="status_cxx1998.xml">
+ </xi:include>
+
+ <!-- Section 02 : Status C++ TR1 -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="status_cxxtr1.xml">
+ </xi:include>
+
+ <!-- Section 03 : Status C++ 200x -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="status_cxx200x.xml">
+ </xi:include>
+ </sect1>
+
+ <!-- Section 02 : License -->
+ <sect1 id="manual.intro.status.license" xreflabel="License">
+ <title>License</title>
+ <para>
+ There are two licenses affecting GNU libstdc++: one for the code,
+ and one for the documentation.
+ </para>
+
+ <para>
+ There is a license section in the FAQ regarding common <link
+ linkend="faq.license">questions</link>. If you have more
+ questions, ask the FSF or the <ulink
+ url="http://gcc.gnu.org/lists.html">gcc mailing list</ulink>.
+ </para>
+
+ <sect2 id="manual.intro.status.license.gpl" xreflabel="License GPL">
+ <title>The Code: GPL</title>
+
+ <para>
+ The source code is distributed under the <link
+ linkend="appendix.gpl-2.0">GNU General Public License version 2</link>,
+ with the so-called <quote>Runtime Exception</quote>
+ as follows (or see any header or implementation file):
+ </para>
+
+ <literallayout>
+ 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.
+ </literallayout>
+
+ <para>
+ Hopefully that text is self-explanatory. If it isn't, you need to speak
+ to your lawyer, or the Free Software Foundation.
+ </para>
+ </sect2>
+
+ <sect2 id="manual.intro.status.license.fdl" xreflabel="License FDL">
+ <title>The Documentation: GPL, FDL</title>
+
+ <para>
+ The documentation shipped with the library and made available over
+ the web, excluding the pages generated from source comments, are
+ copyrighted by the Free Software Foundation, and placed under the
+ <link linkend="appendix.gfdl-1.2"> GNU Free Documentation
+ License version 1.2</link>. There are no Front-Cover Texts, no
+ Back-Cover Texts, and no Invariant Sections.
+ </para>
+
+ <para>
+ For documentation generated by doxygen or other automated tools
+ via processing source code comments and markup, the original source
+ code license applies to the generated files. Thus, the doxygen
+ documents are licensed <link linkend="appendix.gpl-2.0">GPL</link>.
+ </para>
+
+ <para>
+ If you plan on making copies of the documentation, please let us know.
+ We can probably offer suggestions.
+ </para>
+ </sect2>
+
+ </sect1>
+
+ <!-- Section 03 : Known Bugs -->
+ <sect1 id="manual.intro.status.bugs" xreflabel="Bugs">
+ <title>Bugs</title>
+
+ <sect2 id="manual.intro.status.bugs.impl" xreflabel="Bugs impl">
+ <title>Implementation Bugs</title>
+ <para>
+ Information on known bugs, details on efforts to fix them, and
+ fixed bugs are all available as part of the GCC bug tracking
+ system, <ulink
+ url="http://gcc.gnu.org/bugzilla">bugzilla</ulink>, with the
+ category set to <literal>libstdc++</literal>.
+ </para>
+ </sect2>
+
+ <sect2 id="manual.intro.status.bugs.iso" xreflabel="Bugs iso">
+ <title>Standard Bugs</title>
+ <para>
+ Everybody's got issues. Even the C++ Standard Library.
+ </para>
+ <para>
+ The Library Working Group, or LWG, is the ISO subcommittee responsible
+ for making changes to the library. They periodically publish an
+ Issues List containing problems and possible solutions. As they reach
+ a consensus on proposed solutions, we often incorporate the solution.
+ </para>
+ <para>
+ Here are the issues which have resulted in code changes to the library.
+ The links are to the specific defect reports from a <emphasis>partial
+ copy</emphasis> of the Issues List. You can read the full version online
+ at the <ulink url="http://www.open-std.org/jtc1/sc22/wg21/">ISO C++
+ Committee homepage</ulink>, linked to on the
+ <ulink url="http://gcc.gnu.org/readings.html">GCC &quot;Readings&quot;
+ page</ulink>. If
+ you spend a lot of time reading the issues, we recommend downloading
+ the ZIP file and reading them locally.
+ </para>
+ <para>
+ (NB: <emphasis>partial copy</emphasis> means that not all
+ links within the lwg-*.html pages will work. Specifically,
+ links to defect reports that have not been accorded full DR
+ status will probably break. Rather than trying to mirror the
+ entire issues list on our overworked web server, we recommend
+ you go to the LWG homepage instead.)
+ </para>
+ <para>
+ If a DR is not listed here, we may simply not have gotten to
+ it yet; feel free to submit a patch. Search the include/bits
+ and src directories for appearances of
+ <constant>_GLIBCXX_RESOLVE_LIB_DEFECTS</constant> for examples
+ of style. Note that we usually do not make changes to the
+ code until an issue has reached <ulink url="lwg-active.html#DR">DR</ulink> status.
+ </para>
+
+ <variablelist>
+ <varlistentry><term><ulink url="lwg-defects.html#5">5</ulink>:
+ <emphasis>string::compare specification questionable</emphasis>
+ </term>
+ <listitem><para>This should be two overloaded functions rather than a single function.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#17">17</ulink>:
+ <emphasis>Bad bool parsing</emphasis>
+ </term>
+ <listitem><para>Apparently extracting Boolean values was messed up...
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#19">19</ulink>:
+ <emphasis>&quot;Noconv&quot; definition too vague</emphasis>
+ </term>
+ <listitem><para>If <code>codecvt::do_in</code> returns <code>noconv</code> there are
+ no changes to the values in <code>[to, to_limit)</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#22">22</ulink>:
+ <emphasis>Member open vs flags</emphasis>
+ </term>
+ <listitem><para>Re-opening a file stream does <emphasis>not</emphasis> clear the state flags.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#25">25</ulink>:
+ <emphasis>String operator&lt;&lt; uses width() value wrong</emphasis>
+ </term>
+ <listitem><para>Padding issues.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#48">48</ulink>:
+ <emphasis>Use of non-existent exception constructor</emphasis>
+ </term>
+ <listitem><para>An instance of <code>ios_base::failure</code> is constructed instead.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#49">49</ulink>:
+ <emphasis>Underspecification of ios_base::sync_with_stdio</emphasis>
+ </term>
+ <listitem><para>The return type is the <emphasis>previous</emphasis> state of synchronization.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#50">50</ulink>:
+ <emphasis>Copy constructor and assignment operator of ios_base</emphasis>
+ </term>
+ <listitem><para>These members functions are declared <code>private</code> and are
+ thus inaccessible. Specifying the correct semantics of
+ &quot;copying stream state&quot; was deemed too complicated.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#60">60</ulink>:
+ <emphasis>What is a formatted input function?</emphasis>
+ </term>
+ <listitem><para>This DR made many widespread changes to <code>basic_istream</code>
+ and <code>basic_ostream</code> all of which have been implemented.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#63">63</ulink>:
+ <emphasis>Exception-handling policy for unformatted output</emphasis>
+ </term>
+ <listitem><para>Make the policy consistent with that of formatted input, unformatted
+ input, and formatted output.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#68">68</ulink>:
+ <emphasis>Extractors for char* should store null at end</emphasis>
+ </term>
+ <listitem><para>And they do now. An editing glitch in the last item in the list of
+ [27.6.1.2.3]/7.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#74">74</ulink>:
+ <emphasis>Garbled text for codecvt::do_max_length</emphasis>
+ </term>
+ <listitem><para>The text of the standard was gibberish. Typos gone rampant.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#75">75</ulink>:
+ <emphasis>Contradiction in codecvt::length's argument types</emphasis>
+ </term>
+ <listitem><para>Change the first parameter to <code>stateT&amp;</code> and implement
+ the new effects paragraph.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#83">83</ulink>:
+ <emphasis>string::npos vs. string::max_size()</emphasis>
+ </term>
+ <listitem><para>Safety checks on the size of the string should test against
+ <code>max_size()</code> rather than <code>npos</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#90">90</ulink>:
+ <emphasis>Incorrect description of operator&gt;&gt; for strings</emphasis>
+ </term>
+ <listitem><para>The effect contain <code>isspace(c,getloc())</code> which must be
+ replaced by <code>isspace(c,is.getloc())</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#91">91</ulink>:
+ <emphasis>Description of operator&gt;&gt; and getline() for string&lt;&gt;
+ might cause endless loop</emphasis>
+ </term>
+ <listitem><para>They behave as a formatted input function and as an unformatted
+ input function, respectively (except that <code>getline</code> is
+ not required to set <code>gcount</code>).
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#103">103</ulink>:
+ <emphasis>set::iterator is required to be modifiable, but this allows
+ modification of keys.</emphasis>
+ </term>
+ <listitem><para>For associative containers where the value type is the same as
+ the key type, both <code>iterator</code> and <code>const_iterator
+ </code> are constant iterators.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#109">109</ulink>:
+ <emphasis>Missing binders for non-const sequence elements</emphasis>
+ </term>
+ <listitem><para>The <code>binder1st</code> and <code>binder2nd</code> didn't have an
+ <code>operator()</code> taking a non-const parameter.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#110">110</ulink>:
+ <emphasis>istreambuf_iterator::equal not const</emphasis>
+ </term>
+ <listitem><para>This was not a const member function. Note that the DR says to
+ replace the function with a const one; we have instead provided an
+ overloaded version with identical contents.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#117">117</ulink>:
+ <emphasis>basic_ostream uses nonexistent num_put member functions</emphasis>
+ </term>
+ <listitem><para><code>num_put::put()</code> was overloaded on the wrong types.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#118">118</ulink>:
+ <emphasis>basic_istream uses nonexistent num_get member functions</emphasis>
+ </term>
+ <listitem><para>Same as 117, but for <code>num_get::get()</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#129">129</ulink>:
+ <emphasis>Need error indication from seekp() and seekg()</emphasis>
+ </term>
+ <listitem><para>These functions set <code>failbit</code> on error now.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#136">136</ulink>:
+ <emphasis>seekp, seekg setting wrong streams?</emphasis>
+ </term>
+ <listitem><para><code>seekp</code> should only set the output stream, and
+ <code>seekg</code> should only set the input stream.
+ </para></listitem></varlistentry>
+
+<!--<varlistentry><term><ulink url="lwg-defects.html#159">159</ulink>:
+ <emphasis>Strange use of underflow()</emphasis>
+ </term>
+ <listitem><para>In fstream.tcc, the basic_filebuf&lt;&gt;::showmanyc() function
+ should probably not be calling <code>underflow()</code>.
+ </para></listitem></varlistentry> -->
+
+ <varlistentry><term><ulink url="lwg-defects.html#167">167</ulink>:
+ <emphasis>Improper use of traits_type::length()</emphasis>
+ </term>
+ <listitem><para><code>op&lt;&lt;</code> with a <code>const char*</code> was
+ calculating an incorrect number of characters to write.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#169">169</ulink>:
+ <emphasis>Bad efficiency of overflow() mandated</emphasis>
+ </term>
+ <listitem><para>Grow efficiently the internal array object.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#171">171</ulink>:
+ <emphasis>Strange seekpos() semantics due to joint position</emphasis>
+ </term>
+ <listitem><para>Quite complex to summarize...
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#181">181</ulink>:
+ <emphasis>make_pair() unintended behavior</emphasis>
+ </term>
+ <listitem><para>This function used to take its arguments as reference-to-const, now
+ it copies them (pass by value).
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#195">195</ulink>:
+ <emphasis>Should basic_istream::sentry's constructor ever set eofbit?</emphasis>
+ </term>
+ <listitem><para>Yes, it can, specifically if EOF is reached while skipping whitespace.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#211">211</ulink>:
+ <emphasis>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</emphasis>
+ </term>
+ <listitem><para>If nothing is extracted into the string, <code>op&gt;&gt;</code> now
+ sets <code>failbit</code> (which can cause an exception, etc., etc.).
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#214">214</ulink>:
+ <emphasis>set::find() missing const overload</emphasis>
+ </term>
+ <listitem><para>Both <code>set</code> and <code>multiset</code> were missing
+ overloaded find, lower_bound, upper_bound, and equal_range functions
+ for const instances.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#231">231</ulink>:
+ <emphasis>Precision in iostream?</emphasis>
+ </term>
+ <listitem><para>For conversion from a floating-point type, <code>str.precision()</code>
+ is specified in the conversion specification.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-active.html#233">233</ulink>:
+ <emphasis>Insertion hints in associative containers</emphasis>
+ </term>
+ <listitem><para>Implement N1780, first check before then check after, insert as close
+ to hint as possible.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#235">235</ulink>:
+ <emphasis>No specification of default ctor for reverse_iterator</emphasis>
+ </term>
+ <listitem><para>The declaration of <code>reverse_iterator</code> lists a default constructor.
+ However, no specification is given what this constructor should do.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#241">241</ulink>:
+ <emphasis>Does unique_copy() require CopyConstructible and Assignable?</emphasis>
+ </term>
+ <listitem><para>Add a helper for forward_iterator/output_iterator, fix the existing
+ one for input_iterator/output_iterator to not rely on Assignability.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#243">243</ulink>:
+ <emphasis>get and getline when sentry reports failure</emphasis>
+ </term>
+ <listitem><para>Store a null character only if the character array has a non-zero size.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#251">251</ulink>:
+ <emphasis>basic_stringbuf missing allocator_type</emphasis>
+ </term>
+ <listitem><para>This nested typedef was originally not specified.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#253">253</ulink>:
+ <emphasis>valarray helper functions are almost entirely useless</emphasis>
+ </term>
+ <listitem><para>Make the copy constructor and copy-assignment operator declarations
+ public in gslice_array, indirect_array, mask_array, slice_array; provide
+ definitions.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#265">265</ulink>:
+ <emphasis>std::pair::pair() effects overly restrictive</emphasis>
+ </term>
+ <listitem><para>The default ctor would build its members from copies of temporaries;
+ now it simply uses their respective default ctors.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#266">266</ulink>:
+ <emphasis>bad_exception::~bad_exception() missing Effects clause</emphasis>
+ </term>
+ <listitem><para>The <code>bad_</code>* classes no longer have destructors (they
+ are trivial), since no description of them was ever given.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#271">271</ulink>:
+ <emphasis>basic_iostream missing typedefs</emphasis>
+ </term>
+ <listitem><para>The typedefs it inherits from its base classes can't be used, since
+ (for example) <code>basic_iostream&lt;T&gt;::traits_type</code> is ambiguous.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#275">275</ulink>:
+ <emphasis>Wrong type in num_get::get() overloads</emphasis>
+ </term>
+ <listitem><para>Similar to 118.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#280">280</ulink>:
+ <emphasis>Comparison of reverse_iterator to const reverse_iterator</emphasis>
+ </term>
+ <listitem><para>Add global functions with two template parameters.
+ (NB: not added for now a templated assignment operator)
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#292">292</ulink>:
+ <emphasis>Effects of a.copyfmt (a)</emphasis>
+ </term>
+ <listitem><para>If <code>(this == &amp;rhs)</code> do nothing.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#300">300</ulink>:
+ <emphasis>List::merge() specification incomplete</emphasis>
+ </term>
+ <listitem><para>If <code>(this == &amp;x)</code> do nothing.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#303">303</ulink>:
+ <emphasis>Bitset input operator underspecified</emphasis>
+ </term>
+ <listitem><para>Basically, compare the input character to <code>is.widen(0)</code>
+ and <code>is.widen(1)</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#305">305</ulink>:
+ <emphasis>Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</emphasis>
+ </term>
+ <listitem><para>Do not specify what <code>codecvt&lt;wchar_t, char, mbstate_t&gt;::do_length</code>
+ must return.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#328">328</ulink>:
+ <emphasis>Bad sprintf format modifier in money_put&lt;&gt;::do_put()</emphasis>
+ </term>
+ <listitem><para>Change the format string to &quot;%.0Lf&quot;.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#365">365</ulink>:
+ <emphasis>Lack of const-qualification in clause 27</emphasis>
+ </term>
+ <listitem><para>Add const overloads of <code>is_open</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#389">389</ulink>:
+ <emphasis>Const overload of valarray::operator[] returns by value</emphasis>
+ </term>
+ <listitem><para>Change it to return a <code>const T&amp;</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#402">402</ulink>:
+ <emphasis>Wrong new expression in [some_]allocator::construct</emphasis>
+ </term>
+ <listitem><para>Replace &quot;new&quot; with &quot;::new&quot;.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#409">409</ulink>:
+ <emphasis>Closing an fstream should clear the error state</emphasis>
+ </term>
+ <listitem><para>Have <code>open</code> clear the error flags.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-active.html#431">431</ulink>:
+ <emphasis>Swapping containers with unequal allocators</emphasis>
+ </term>
+ <listitem><para>Implement Option 3, as per N1599.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#432">432</ulink>:
+ <emphasis>stringbuf::overflow() makes only one write position
+ available</emphasis>
+ </term>
+ <listitem><para>Implement the resolution, beyond DR 169.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#434">434</ulink>:
+ <emphasis>bitset::to_string() hard to use</emphasis>
+ </term>
+ <listitem><para>Add three overloads, taking fewer template arguments.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#438">438</ulink>:
+ <emphasis>Ambiguity in the "do the right thing" clause</emphasis>
+ </term>
+ <listitem><para>Implement the resolution, basically cast less.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#453">453</ulink>:
+ <emphasis>basic_stringbuf::seekoff need not always fail for an empty stream</emphasis>
+ </term>
+ <listitem><para>Don't fail if the next pointer is null and newoff is zero.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#455">455</ulink>:
+ <emphasis>cerr::tie() and wcerr::tie() are overspecified</emphasis>
+ </term>
+ <listitem><para>Initialize cerr tied to cout and wcerr tied to wcout.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#464">464</ulink>:
+ <emphasis>Suggestion for new member functions in standard containers</emphasis>
+ </term>
+ <listitem><para>Add <code>data()</code> to <code>std::vector</code> and
+ <code>at(const key_type&amp;)</code> to <code>std::map</code>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#508">508</ulink>:
+ <emphasis>Bad parameters for ranlux64_base_01</emphasis>
+ </term>
+ <listitem><para>Fix the parameters.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-closed.html#512">512</ulink>:
+ <emphasis>Seeding subtract_with_carry_01 from a single unsigned long</emphasis>
+ </term>
+ <listitem><para>Construct a <code>linear_congruential</code> engine and seed with it.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-closed.html#526">526</ulink>:
+ <emphasis>Is it undefined if a function in the standard changes in
+ parameters?</emphasis>
+ </term>
+ <listitem><para>Use &amp;value.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#538">538</ulink>:
+ <emphasis>241 again: Does unique_copy() require CopyConstructible
+ and Assignable?</emphasis>
+ </term>
+ <listitem><para>In case of input_iterator/output_iterator rely on Assignability of
+ input_iterator' value_type.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#541">541</ulink>:
+ <emphasis>shared_ptr template assignment and void</emphasis>
+ </term>
+ <listitem><para>Add an auto_ptr&lt;void&gt; specialization.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#543">543</ulink>:
+ <emphasis>valarray slice default constructor</emphasis>
+ </term>
+ <listitem><para>Follow the straightforward proposed resolution.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#586">586</ulink>:
+ <emphasis>string inserter not a formatted function</emphasis>
+ </term>
+ <listitem><para>Change it to be a formatted output function (i.e. catch exceptions).
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-active.html#596">596</ulink>:
+ <emphasis>27.8.1.3 Table 112 omits "a+" and "a+b" modes</emphasis>
+ </term>
+ <listitem><para>Add the missing modes to fopen_mode.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-defects.html#660">660</ulink>:
+ <emphasis>Missing bitwise operations</emphasis>
+ </term>
+ <listitem><para>Add the missing operations.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-active.html#693">693</ulink>:
+ <emphasis>std::bitset::all() missing</emphasis>
+ </term>
+ <listitem><para>Add it, consistently with the discussion.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><ulink url="lwg-active.html#695">695</ulink>:
+ <emphasis>ctype&lt;char&gt;::classic_table() not accessible</emphasis>
+ </term>
+ <listitem><para>Make the member functions table and classic_table public.
+ </para></listitem></varlistentry>
+ </variablelist>
+
+ </sect2>
+ </sect1>
+</chapter>
+
+
+<!-- Chapter 02 : Setup -->
+<chapter id="manual.intro.setup" xreflabel="Setup">
+ <title>Setup</title>
+
+ <!-- Section 01 : Configure -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="configure.xml">
+ </xi:include>
+
+ <!-- Section 02 : Build -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="build.xml">
+ </xi:include>
+
+ <!-- Section 03 : Test -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="test.xml">
+ </xi:include>
+</chapter>
+
+
+<!-- Chapter 03 : Using -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="using.xml">
+</xi:include>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/io.xml b/libstdc++-v3/doc/xml/manual/io.xml
new file mode 100644
index 00000000000..8b6806f90a7
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/io.xml
@@ -0,0 +1,665 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.io" xreflabel="Input and Output">
+<?dbhtml filename="io.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Input and Output</title>
+
+<!-- Chapter 01 : Iostream Objects -->
+<chapter id="manual.io.objects" xreflabel="IO Objects">
+ <title>Iostream Objects</title>
+
+ <para>To minimize the time you have to wait on the compiler, it's good to
+ only include the headers you really need. Many people simply include
+ &lt;iostream&gt; when they don't need to -- and that can <emphasis>penalize
+ your runtime as well.</emphasis> Here are some tips on which header to use
+ for which situations, starting with the simplest.
+ </para>
+ <para><emphasis>&lt;iosfwd&gt;</emphasis> should be included whenever you simply
+ need the <emphasis>name</emphasis> of an I/O-related class, such as
+ &quot;ofstream&quot; or &quot;basic_streambuf&quot;. Like the name
+ implies, these are forward declarations. (A word to all you fellow
+ old school programmers: trying to forward declare classes like
+ &quot;class istream;&quot; won't work. Look in the iosfwd header if
+ you'd like to know why.) For example,
+ </para>
+ <programlisting>
+ #include &lt;iosfwd&gt;
+
+ class MyClass
+ {
+ ....
+ std::ifstream&amp; input_file;
+ };
+
+ extern std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, MyClass&amp;);
+ </programlisting>
+ <para><emphasis>&lt;ios&gt;</emphasis> declares the base classes for the entire
+ I/O stream hierarchy, std::ios_base and std::basic_ios&lt;charT&gt;, the
+ counting types std::streamoff and std::streamsize, the file
+ positioning type std::fpos, and the various manipulators like
+ std::hex, std::fixed, std::noshowbase, and so forth.
+ </para>
+ <para>The ios_base class is what holds the format flags, the state flags,
+ and the functions which change them (setf(), width(), precision(),
+ etc). You can also store extra data and register callback functions
+ through ios_base, but that has been historically underused. Anything
+ which doesn't depend on the type of characters stored is consolidated
+ here.
+ </para>
+ <para>The template class basic_ios is the highest template class in the
+ hierarchy; it is the first one depending on the character type, and
+ holds all general state associated with that type: the pointer to the
+ polymorphic stream buffer, the facet information, etc.
+ </para>
+ <para><emphasis>&lt;streambuf&gt;</emphasis> declares the template class
+ basic_streambuf, and two standard instantiations, streambuf and
+ wstreambuf. If you need to work with the vastly useful and capable
+ stream buffer classes, e.g., to create a new form of storage
+ transport, this header is the one to include.
+ </para>
+ <para><emphasis>&lt;istream&gt;</emphasis>/<emphasis>&lt;ostream&gt;</emphasis> are
+ the headers to include when you are using the &gt;&gt;/&lt;&lt;
+ interface, or any of the other abstract stream formatting functions.
+ For example,
+ </para>
+ <programlisting>
+ #include &lt;istream&gt;
+
+ std::ostream&amp; operator&lt;&lt; (std::ostream&amp; os, MyClass&amp; c)
+ {
+ return os &lt;&lt; c.data1() &lt;&lt; c.data2();
+ }
+ </programlisting>
+ <para>The std::istream and std::ostream classes are the abstract parents of
+ the various concrete implementations. If you are only using the
+ interfaces, then you only need to use the appropriate interface header.
+ </para>
+ <para><emphasis>&lt;iomanip&gt;</emphasis> provides &quot;extractors and inserters
+ that alter information maintained by class ios_base and its derived
+ classes,&quot; such as std::setprecision and std::setw. If you need
+ to write expressions like <code>os &lt;&lt; setw(3);</code> or
+ <code>is &gt;&gt; setbase(8);</code>, you must include &lt;iomanip&gt;.
+ </para>
+ <para><emphasis>&lt;sstream&gt;</emphasis>/<emphasis>&lt;fstream&gt;</emphasis>
+ declare the six stringstream and fstream classes. As they are the
+ standard concrete descendants of istream and ostream, you will already
+ know about them.
+ </para>
+ <para>Finally, <emphasis>&lt;iostream&gt;</emphasis> provides the eight standard
+ global objects (cin, cout, etc). To do this correctly, this header
+ also provides the contents of the &lt;istream&gt; and &lt;ostream&gt;
+ headers, but nothing else. The contents of this header look like
+ </para>
+ <programlisting>
+ #include &lt;ostream&gt;
+ #include &lt;istream&gt;
+
+ namespace std
+ {
+ extern istream cin;
+ extern ostream cout;
+ ....
+
+ // this is explained below
+ <emphasis>static ios_base::Init __foo;</emphasis> // not its real name
+ }
+ </programlisting>
+ <para>Now, the runtime penalty mentioned previously: the global objects
+ must be initialized before any of your own code uses them; this is
+ guaranteed by the standard. Like any other global object, they must
+ be initialized once and only once. This is typically done with a
+ construct like the one above, and the nested class ios_base::Init is
+ specified in the standard for just this reason.
+ </para>
+ <para>How does it work? Because the header is included before any of your
+ code, the <emphasis>__foo</emphasis> object is constructed before any of
+ your objects. (Global objects are built in the order in which they
+ are declared, and destroyed in reverse order.) The first time the
+ constructor runs, the eight stream objects are set up.
+ </para>
+ <para>The <code>static</code> keyword means that each object file compiled
+ from a source file containing &lt;iostream&gt; will have its own
+ private copy of <emphasis>__foo</emphasis>. There is no specified order
+ of construction across object files (it's one of those pesky NP
+ problems that make life so interesting), so one copy in each object
+ file means that the stream objects are guaranteed to be set up before
+ any of your code which uses them could run, thereby meeting the
+ requirements of the standard.
+ </para>
+ <para>The penalty, of course, is that after the first copy of
+ <emphasis>__foo</emphasis> is constructed, all the others are just wasted
+ processor time. The time spent is merely for an increment-and-test
+ inside a function call, but over several dozen or hundreds of object
+ files, that time can add up. (It's not in a tight loop, either.)
+ </para>
+ <para>The lesson? Only include &lt;iostream&gt; when you need to use one of
+ the standard objects in that source file; you'll pay less startup
+ time. Only include the header files you need to in general; your
+ compile times will go down when there's less parsing work to do.
+ </para>
+
+</chapter>
+
+<!-- Chapter 02 : Stream Buffers -->
+<chapter id="manual.io.streambufs" xreflabel="Stream Buffers">
+ <title>Stream Buffers</title>
+
+ <sect1 id="io.streambuf.derived" xreflabel="Derived streambuf Classes">
+ <title>Derived streambuf Classes</title>
+ <para>
+ </para>
+
+ <para>Creating your own stream buffers for I/O can be remarkably easy.
+ If you are interested in doing so, we highly recommend two very
+ excellent books:
+ <ulink url="http://www.langer.camelot.de/iostreams.html">Standard C++
+ IOStreams and Locales</ulink> by Langer and Kreft, ISBN 0-201-18395-1, and
+ <ulink url="http://www.josuttis.com/libbook/">The C++ Standard Library</ulink>
+ by Nicolai Josuttis, ISBN 0-201-37926-0. Both are published by
+ Addison-Wesley, who isn't paying us a cent for saying that, honest.
+ </para>
+ <para>Here is a simple example, io/outbuf1, from the Josuttis text. It
+ transforms everything sent through it to uppercase. This version
+ assumes many things about the nature of the character type being
+ used (for more information, read the books or the newsgroups):
+ </para>
+ <programlisting>
+ #include &lt;iostream&gt;
+ #include &lt;streambuf&gt;
+ #include &lt;locale&gt;
+ #include &lt;cstdio&gt;
+
+ class outbuf : public std::streambuf
+ {
+ protected:
+ /* central output function
+ * - print characters in uppercase mode
+ */
+ virtual int_type overflow (int_type c) {
+ if (c != EOF) {
+ // convert lowercase to uppercase
+ c = std::toupper(static_cast&lt;char&gt;(c),getloc());
+
+ // and write the character to the standard output
+ if (putchar(c) == EOF) {
+ return EOF;
+ }
+ }
+ return c;
+ }
+ };
+
+ int main()
+ {
+ // create special output buffer
+ outbuf ob;
+ // initialize output stream with that output buffer
+ std::ostream out(&amp;ob);
+
+ out &lt;&lt; "31 hexadecimal: "
+ &lt;&lt; std::hex &lt;&lt; 31 &lt;&lt; std::endl;
+ return 0;
+ }
+ </programlisting>
+ <para>Try it yourself! More examples can be found in 3.1.x code, in
+ <code>include/ext/*_filebuf.h</code>, and on
+ <ulink url="http://www.informatik.uni-konstanz.de/~kuehl/c++/iostream/">Dietmar
+ K&uuml;hl's IOStreams page</ulink>.
+ </para>
+
+ </sect1>
+
+ <sect1 id="io.streambuf.buffering" xreflabel="Buffering">
+ <title>Buffering</title>
+ <para>First, are you sure that you understand buffering? Particularly
+ the fact that C++ may not, in fact, have anything to do with it?
+ </para>
+ <para>The rules for buffering can be a little odd, but they aren't any
+ different from those of C. (Maybe that's why they can be a bit
+ odd.) Many people think that writing a newline to an output
+ stream automatically flushes the output buffer. This is true only
+ when the output stream is, in fact, a terminal and not a file
+ or some other device -- and <emphasis>that</emphasis> may not even be true
+ since C++ says nothing about files nor terminals. All of that is
+ system-dependent. (The &quot;newline-buffer-flushing only occurring
+ on terminals&quot; thing is mostly true on Unix systems, though.)
+ </para>
+ <para>Some people also believe that sending <code>endl</code> down an
+ output stream only writes a newline. This is incorrect; after a
+ newline is written, the buffer is also flushed. Perhaps this
+ is the effect you want when writing to a screen -- get the text
+ out as soon as possible, etc -- but the buffering is largely
+ wasted when doing this to a file:
+ </para>
+ <programlisting>
+ output &lt;&lt; &quot;a line of text&quot; &lt;&lt; endl;
+ output &lt;&lt; some_data_variable &lt;&lt; endl;
+ output &lt;&lt; &quot;another line of text&quot; &lt;&lt; endl; </programlisting>
+ <para>The proper thing to do in this case to just write the data out
+ and let the libraries and the system worry about the buffering.
+ If you need a newline, just write a newline:
+ </para>
+ <programlisting>
+ output &lt;&lt; &quot;a line of text\n&quot;
+ &lt;&lt; some_data_variable &lt;&lt; '\n'
+ &lt;&lt; &quot;another line of text\n&quot;; </programlisting>
+ <para>I have also joined the output statements into a single statement.
+ You could make the code prettier by moving the single newline to
+ the start of the quoted text on the last line, for example.
+ </para>
+ <para>If you do need to flush the buffer above, you can send an
+ <code>endl</code> if you also need a newline, or just flush the buffer
+ yourself:
+ </para>
+ <programlisting>
+ output &lt;&lt; ...... &lt;&lt; flush; // can use std::flush manipulator
+ output.flush(); // or call a member fn </programlisting>
+ <para>On the other hand, there are times when writing to a file should
+ be like writing to standard error; no buffering should be done
+ because the data needs to appear quickly (a prime example is a
+ log file for security-related information). The way to do this is
+ just to turn off the buffering <emphasis>before any I/O operations at
+ all</emphasis> have been done (note that opening counts as an I/O operation):
+ </para>
+ <programlisting>
+ std::ofstream os;
+ std::ifstream is;
+ int i;
+
+ os.rdbuf()-&gt;pubsetbuf(0,0);
+ is.rdbuf()-&gt;pubsetbuf(0,0);
+
+ os.open(&quot;/foo/bar/baz&quot;);
+ is.open(&quot;/qux/quux/quuux&quot;);
+ ...
+ os &lt;&lt; &quot;this data is written immediately\n&quot;;
+ is &gt;&gt; i; // and this will probably cause a disk read </programlisting>
+ <para>Since all aspects of buffering are handled by a streambuf-derived
+ member, it is necessary to get at that member with <code>rdbuf()</code>.
+ Then the public version of <code>setbuf</code> can be called. The
+ arguments are the same as those for the Standard C I/O Library
+ function (a buffer area followed by its size).
+ </para>
+ <para>A great deal of this is implementation-dependent. For example,
+ <code>streambuf</code> does not specify any actions for its own
+ <code>setbuf()</code>-ish functions; the classes derived from
+ <code>streambuf</code> each define behavior that &quot;makes
+ sense&quot; for that class: an argument of (0,0) turns off buffering
+ for <code>filebuf</code> but does nothing at all for its siblings
+ <code>stringbuf</code> and <code>strstreambuf</code>, and specifying
+ anything other than (0,0) has varying effects.
+ User-defined classes derived from <code>streambuf</code> can
+ do whatever they want. (For <code>filebuf</code> and arguments for
+ <code>(p,s)</code> other than zeros, libstdc++ does what you'd expect:
+ the first <code>s</code> bytes of <code>p</code> are used as a buffer,
+ which you must allocate and deallocate.)
+ </para>
+ <para>A last reminder: there are usually more buffers involved than
+ just those at the language/library level. Kernel buffers, disk
+ buffers, and the like will also have an effect. Inspecting and
+ changing those are system-dependent.
+ </para>
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 03 : Memory-based Streams -->
+<chapter id="manual.io.memstreams" xreflabel="Memory Streams">
+ <title>Memory Based Streams</title>
+ <sect1 id="manual.io.memstreams.compat" xreflabel="Compatibility strstream">
+ <title>Compatibility With strstream</title>
+ <para>
+ </para>
+ <para>Stringstreams (defined in the header <code>&lt;sstream&gt;</code>)
+ are in this author's opinion one of the coolest things since
+ sliced time. An example of their use is in the Received Wisdom
+ section for Chapter 21 (Strings),
+ <ulink url="../21_strings/howto.html#1.1internal"> describing how to
+ format strings</ulink>.
+ </para>
+ <para>The quick definition is: they are siblings of ifstream and ofstream,
+ and they do for <code>std::string</code> what their siblings do for
+ files. All that work you put into writing <code>&lt;&lt;</code> and
+ <code>&gt;&gt;</code> functions for your classes now pays off
+ <emphasis>again!</emphasis> Need to format a string before passing the string
+ to a function? Send your stuff via <code>&lt;&lt;</code> to an
+ ostringstream. You've read a string as input and need to parse it?
+ Initialize an istringstream with that string, and then pull pieces
+ out of it with <code>&gt;&gt;</code>. Have a stringstream and need to
+ get a copy of the string inside? Just call the <code>str()</code>
+ member function.
+ </para>
+ <para>This only works if you've written your
+ <code>&lt;&lt;</code>/<code>&gt;&gt;</code> functions correctly, though,
+ and correctly means that they take istreams and ostreams as
+ parameters, not i<emphasis>f</emphasis>streams and o<emphasis>f</emphasis>streams. If they
+ take the latter, then your I/O operators will work fine with
+ file streams, but with nothing else -- including stringstreams.
+ </para>
+ <para>If you are a user of the strstream classes, you need to update
+ your code. You don't have to explicitly append <code>ends</code> to
+ terminate the C-style character array, you don't have to mess with
+ &quot;freezing&quot; functions, and you don't have to manage the
+ memory yourself. The strstreams have been officially deprecated,
+ which means that 1) future revisions of the C++ Standard won't
+ support them, and 2) if you use them, people will laugh at you.
+ </para>
+
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 04 : File-based Streams -->
+<chapter id="manual.io.filestreams" xreflabel="File Streams">
+ <title>File Based Streams</title>
+
+ <sect1 id="manual.io.filestreams.copying_a_file" xreflabel="Copying a File">
+ <title>Copying a File</title>
+ <para>
+ </para>
+
+ <para>So you want to copy a file quickly and easily, and most important,
+ completely portably. And since this is C++, you have an open
+ ifstream (call it IN) and an open ofstream (call it OUT):
+ </para>
+ <programlisting>
+ #include &lt;fstream&gt;
+
+ std::ifstream IN ("input_file");
+ std::ofstream OUT ("output_file"); </programlisting>
+ <para>Here's the easiest way to get it completely wrong:
+ </para>
+ <programlisting>
+ OUT &lt;&lt; IN;</programlisting>
+ <para>For those of you who don't already know why this doesn't work
+ (probably from having done it before), I invite you to quickly
+ create a simple text file called &quot;input_file&quot; containing
+ the sentence
+ </para>
+ <programlisting>
+ The quick brown fox jumped over the lazy dog.</programlisting>
+ <para>surrounded by blank lines. Code it up and try it. The contents
+ of &quot;output_file&quot; may surprise you.
+ </para>
+ <para>Seriously, go do it. Get surprised, then come back. It's worth it.
+ </para>
+ <para>The thing to remember is that the <code>basic_[io]stream</code> classes
+ handle formatting, nothing else. In particular, they break up on
+ whitespace. The actual reading, writing, and storing of data is
+ handled by the <code>basic_streambuf</code> family. Fortunately, the
+ <code>operator&lt;&lt;</code> is overloaded to take an ostream and
+ a pointer-to-streambuf, in order to help with just this kind of
+ &quot;dump the data verbatim&quot; situation.
+ </para>
+ <para>Why a <emphasis>pointer</emphasis> to streambuf and not just a streambuf? Well,
+ the [io]streams hold pointers (or references, depending on the
+ implementation) to their buffers, not the actual
+ buffers. This allows polymorphic behavior on the part of the buffers
+ as well as the streams themselves. The pointer is easily retrieved
+ using the <code>rdbuf()</code> member function. Therefore, the easiest
+ way to copy the file is:
+ </para>
+ <programlisting>
+ OUT &lt;&lt; IN.rdbuf();</programlisting>
+ <para>So what <emphasis>was</emphasis> happening with OUT&lt;&lt;IN? Undefined
+ behavior, since that particular &lt;&lt; isn't defined by the Standard.
+ I have seen instances where it is implemented, but the character
+ extraction process removes all the whitespace, leaving you with no
+ blank lines and only &quot;Thequickbrownfox...&quot;. With
+ libraries that do not define that operator, IN (or one of IN's
+ member pointers) sometimes gets converted to a void*, and the output
+ file then contains a perfect text representation of a hexadecimal
+ address (quite a big surprise). Others don't compile at all.
+ </para>
+ <para>Also note that none of this is specific to o<emphasis>*f*</emphasis>streams.
+ The operators shown above are all defined in the parent
+ basic_ostream class and are therefore available with all possible
+ descendants.
+ </para>
+
+ </sect1>
+
+ <sect1 id="manual.io.filestreams.binary" xreflabel="Binary Input and Output">
+ <title>Binary Input and Output</title>
+ <para>
+ </para>
+ <para>The first and most important thing to remember about binary I/O is
+ that opening a file with <code>ios::binary</code> is not, repeat
+ <emphasis>not</emphasis>, the only thing you have to do. It is not a silver
+ bullet, and will not allow you to use the <code>&lt;&lt;/&gt;&gt;</code>
+ operators of the normal fstreams to do binary I/O.
+ </para>
+ <para>Sorry. Them's the breaks.
+ </para>
+ <para>This isn't going to try and be a complete tutorial on reading and
+ writing binary files (because &quot;binary&quot;
+ <ulink url="#7">covers a lot of ground)</ulink>, but we will try and clear
+ up a couple of misconceptions and common errors.
+ </para>
+ <para>First, <code>ios::binary</code> has exactly one defined effect, no more
+ and no less. Normal text mode has to be concerned with the newline
+ characters, and the runtime system will translate between (for
+ example) '\n' and the appropriate end-of-line sequence (LF on Unix,
+ CRLF on DOS, CR on Macintosh, etc). (There are other things that
+ normal mode does, but that's the most obvious.) Opening a file in
+ binary mode disables this conversion, so reading a CRLF sequence
+ under Windows won't accidentally get mapped to a '\n' character, etc.
+ Binary mode is not supposed to suddenly give you a bitstream, and
+ if it is doing so in your program then you've discovered a bug in
+ your vendor's compiler (or some other part of the C++ implementation,
+ possibly the runtime system).
+ </para>
+ <para>Second, using <code>&lt;&lt;</code> to write and <code>&gt;&gt;</code> to
+ read isn't going to work with the standard file stream classes, even
+ if you use <code>skipws</code> during reading. Why not? Because
+ ifstream and ofstream exist for the purpose of <emphasis>formatting</emphasis>,
+ not reading and writing. Their job is to interpret the data into
+ text characters, and that's exactly what you don't want to happen
+ during binary I/O.
+ </para>
+ <para>Third, using the <code>get()</code> and <code>put()/write()</code> member
+ functions still aren't guaranteed to help you. These are
+ &quot;unformatted&quot; I/O functions, but still character-based.
+ (This may or may not be what you want, see below.)
+ </para>
+ <para>Notice how all the problems here are due to the inappropriate use
+ of <emphasis>formatting</emphasis> functions and classes to perform something
+ which <emphasis>requires</emphasis> that formatting not be done? There are a
+ seemingly infinite number of solutions, and a few are listed here:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para><quote>Derive your own fstream-type classes and write your own
+ &lt;&lt;/&gt;&gt; operators to do binary I/O on whatever data
+ types you're using.</quote>
+ </para>
+ <para>
+ This is a Bad Thing, because while
+ the compiler would probably be just fine with it, other humans
+ are going to be confused. The overloaded bitshift operators
+ have a well-defined meaning (formatting), and this breaks it.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <quote>Build the file structure in memory, then
+ <code>mmap()</code> the file and copy the
+ structure.
+ </quote>
+ </para>
+ <para>
+ Well, this is easy to make work, and easy to break, and is
+ pretty equivalent to using <code>::read()</code> and
+ <code>::write()</code> directly, and makes no use of the
+ iostream library at all...
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <quote>Use streambufs, that's what they're there for.</quote>
+ </para>
+ <para>
+ While not trivial for the beginner, this is the best of all
+ solutions. The streambuf/filebuf layer is the layer that is
+ responsible for actual I/O. If you want to use the C++
+ library for binary I/O, this is where you start.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>How to go about using streambufs is a bit beyond the scope of this
+ document (at least for now), but while streambufs go a long way,
+ they still leave a couple of things up to you, the programmer.
+ As an example, byte ordering is completely between you and the
+ operating system, and you have to handle it yourself.
+ </para>
+ <para>Deriving a streambuf or filebuf
+ class from the standard ones, one that is specific to your data
+ types (or an abstraction thereof) is probably a good idea, and
+ lots of examples exist in journals and on Usenet. Using the
+ standard filebufs directly (either by declaring your own or by
+ using the pointer returned from an fstream's <code>rdbuf()</code>)
+ is certainly feasible as well.
+ </para>
+ <para>One area that causes problems is trying to do bit-by-bit operations
+ with filebufs. C++ is no different from C in this respect: I/O
+ must be done at the byte level. If you're trying to read or write
+ a few bits at a time, you're going about it the wrong way. You
+ must read/write an integral number of bytes and then process the
+ bytes. (For example, the streambuf functions take and return
+ variables of type <code>int_type</code>.)
+ </para>
+ <para>Another area of problems is opening text files in binary mode.
+ Generally, binary mode is intended for binary files, and opening
+ text files in binary mode means that you now have to deal with all of
+ those end-of-line and end-of-file problems that we mentioned before.
+ An instructive thread from comp.lang.c++.moderated delved off into
+ this topic starting more or less at
+ <ulink url="http://groups.google.com/groups?oi=djq&amp;selm=an_436187505">this</ulink>
+ article and continuing to the end of the thread. (You'll have to
+ sort through some flames every couple of paragraphs, but the points
+ made are good ones.)
+ </para>
+
+ </sect1>
+
+ <sect1 id="manual.io.filestreams.binary2" xreflabel="Binary Input and Output">
+ <title>More Binary Input and Output</title>
+ <para>Towards the beginning of February 2001, the subject of
+ &quot;binary&quot; 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&uuml;hl separately posted articles on why attempting
+ generic binary I/O was not a good idea. (Here are copies of
+ <ulink url="binary_iostreams_kanze.txt">Kanze's article</ulink> and
+ <ulink url="binary_iostreams_kuehl.txt">K&uuml;hl's article</ulink>.)
+ </para>
+ <para>Briefly, the problems of byte ordering and type sizes mean that
+ the unformatted functions like <code>ostream::put()</code> and
+ <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.
+ </para>
+ <para>The entire Usenet thread is instructive, and took place under the
+ subject heading &quot;binary iostreams&quot; on both comp.std.c++
+ and comp.lang.c++.moderated in parallel. Also in that thread,
+ Dietmar K&uuml;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.
+ </para>
+
+ </sect1>
+
+</chapter>
+
+<!-- Chapter 03 : Interacting with C -->
+<chapter id="manual.io.c" xreflabel="Interacting with C">
+ <title>Interacting with C</title>
+
+
+ <sect1 id="manual.io.c.FILE" xreflabel="Using FILE* and file descriptors">
+ <title>Using FILE* and file descriptors</title>
+ <para>
+ See the <link linkend="manual.ext.io">extensions</link> for using
+ <type>FILE</type> and <type>file descriptors</type> with
+ <classname>ofstream</classname> and
+ <classname>ifstream</classname>.
+ </para>
+ </sect1>
+
+ <sect1 id="manual.io.c.sync" xreflabel="Performance Issues">
+ <title>Performance</title>
+ <para>
+ Pathetic Performance? Ditch C.
+ </para>
+ <para>It sounds like a flame on C, but it isn't. Really. Calm down.
+ I'm just saying it to get your attention.
+ </para>
+ <para>Because the C++ library includes the C library, both C-style and
+ C++-style I/O have to work at the same time. For example:
+ </para>
+ <programlisting>
+ #include &lt;iostream&gt;
+ #include &lt;cstdio&gt;
+
+ std::cout &lt;&lt; &quot;Hel&quot;;
+ std::printf (&quot;lo, worl&quot;);
+ std::cout &lt;&lt; &quot;d!\n&quot;;
+ </programlisting>
+ <para>This must do what you think it does.
+ </para>
+ <para>Alert members of the audience will immediately notice that buffering
+ is going to make a hash of the output unless special steps are taken.
+ </para>
+ <para>The special steps taken by libstdc++, at least for version 3.0,
+ involve doing very little buffering for the standard streams, leaving
+ most of the buffering to the underlying C library. (This kind of
+ thing is tricky to get right.)
+ The upside is that correctness is ensured. The downside is that
+ writing through <code>cout</code> can quite easily lead to awful
+ performance when the C++ I/O library is layered on top of the C I/O
+ library (as it is for 3.0 by default). Some patches have been applied
+ which improve the situation for 3.1.
+ </para>
+ <para>However, the C and C++ standard streams only need to be kept in sync
+ when both libraries' facilities are in use. If your program only uses
+ C++ I/O, then there's no need to sync with the C streams. The right
+ thing to do in this case is to call
+ </para>
+ <programlisting>
+ #include <emphasis>any of the I/O headers such as ios, iostream, etc</emphasis>
+
+ std::ios::sync_with_stdio(false);
+ </programlisting>
+ <para>You must do this before performing any I/O via the C++ stream objects.
+ Once you call this, the C++ streams will operate independently of the
+ (unused) C streams. For GCC 3.x, this means that <code>cout</code> and
+ company will become fully buffered on their own.
+ </para>
+ <para>Note, by the way, that the synchronization requirement only applies to
+ the standard streams (<code>cin</code>, <code>cout</code>,
+ <code>cerr</code>,
+ <code>clog</code>, and their wide-character counterparts). File stream
+ objects that you declare yourself have no such requirement and are fully
+ buffered.
+ </para>
+
+
+ </sect1>
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/iterators.xml b/libstdc++-v3/doc/xml/manual/iterators.xml
new file mode 100644
index 00000000000..757249d277e
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/iterators.xml
@@ -0,0 +1,177 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.iterators" xreflabel="Iterators">
+<?dbhtml filename="iterators.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Iterators</title>
+
+<!-- Chapter 01 : Predefined -->
+<chapter id="manual.iterators.predefined" xreflabel="Predefined">
+ <title>Predefined</title>
+
+ <sect1 id="iterators.predefined.vs_pointers" xreflabel="Versus Pointers">
+ <title>Iterators vs. Pointers</title>
+ <para><ulink url="../faq/index.html#5_1">FAQ 5.1</ulink> points out that iterators
+ are not implemented as pointers. They are a generalization of
+ pointers, but they are implemented in libstdc++ as separate classes.
+ </para>
+ <para>Keeping that simple fact in mind as you design your code will
+ prevent a whole lot of difficult-to-understand bugs.
+ </para>
+ <para>You can think of it the other way 'round, even. Since iterators
+ are a generalization, that means that <emphasis>pointers</emphasis> are
+ <emphasis>iterators</emphasis>, and that pointers can be used whenever an
+ iterator would be. All those functions in the Algorithms chapter
+ of the Standard will work just as well on plain arrays and their
+ pointers.
+ </para>
+ <para>That doesn't mean that when you pass in a pointer, it gets wrapped
+ into some special delegating iterator-to-pointer class with a layer
+ of overhead. (If you think that's the case anywhere, you don't
+ understand templates to begin with...) Oh, no; if you pass
+ in a pointer, then the compiler will instantiate that template
+ using T* as a type, and good old high-speed pointer arithmetic as
+ its operations, so the resulting code will be doing exactly the same
+ things as it would be doing if you had hand-coded it yourself (for
+ the 273rd time).
+ </para>
+ <para>How much overhead <emphasis>is</emphasis> there when using an iterator class?
+ Very little. Most of the layering classes contain nothing but
+ typedefs, and typedefs are &quot;meta-information&quot; that simply
+ tell the compiler some nicknames; they don't create code. That
+ information gets passed down through inheritance, so while the
+ compiler has to do work looking up all the names, your runtime code
+ does not. (This has been a prime concern from the beginning.)
+ </para>
+
+
+ </sect1>
+
+ <sect1 id="iterators.predefined.end" xreflabel="end() Is One Past the End">
+ <title>One Past the End</title>
+
+ <para>This starts off sounding complicated, but is actually very easy,
+ especially towards the end. Trust me.
+ </para>
+ <para>Beginners usually have a little trouble understand the whole
+ 'past-the-end' thing, until they remember their early algebra classes
+ (see, they <emphasis>told</emphasis> you that stuff would come in handy!) and
+ the concept of half-open ranges.
+ </para>
+ <para>First, some history, and a reminder of some of the funkier rules in
+ C and C++ for builtin arrays. The following rules have always been
+ true for both languages:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>You can point anywhere in the array, <emphasis>or to the first element
+ past the end of the array</emphasis>. A pointer that points to one
+ past the end of the array is guaranteed to be as unique as a
+ pointer to somewhere inside the array, so that you can compare
+ such pointers safely.
+ </para>
+ </listitem>
+ <listitem>
+ <para>You can only dereference a pointer that points into an array.
+ If your array pointer points outside the array -- even to just
+ one past the end -- and you dereference it, Bad Things happen.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Strictly speaking, simply pointing anywhere else invokes
+ undefined behavior. Most programs won't puke until such a
+ pointer is actually dereferenced, but the standards leave that
+ up to the platform.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>The reason this past-the-end addressing was allowed is to make it
+ easy to write a loop to go over an entire array, e.g.,
+ while (*d++ = *s++);.
+ </para>
+ <para>So, when you think of two pointers delimiting an array, don't think
+ of them as indexing 0 through n-1. Think of them as <emphasis>boundary
+ markers</emphasis>:
+ </para>
+ <programlisting>
+
+ beginning end
+ | |
+ | | This is bad. Always having to
+ | | remember to add or subtract one.
+ | | Off-by-one bugs very common here.
+ V V
+ array of N elements
+ |---|---|--...--|---|---|
+ | 0 | 1 | ... |N-2|N-1|
+ |---|---|--...--|---|---|
+
+ ^ ^
+ | |
+ | | This is good. This is safe. This
+ | | is guaranteed to work. Just don't
+ | | dereference 'end'.
+ beginning end
+
+ </programlisting>
+ <para>See? Everything between the boundary markers is part of the array.
+ Simple.
+ </para>
+ <para>Now think back to your junior-high school algebra course, when you
+ were learning how to draw graphs. Remember that a graph terminating
+ with a solid dot meant, &quot;Everything up through this point,&quot;
+ and a graph terminating with an open dot meant, &quot;Everything up
+ to, but not including, this point,&quot; respectively called closed
+ and open ranges? Remember how closed ranges were written with
+ brackets, <emphasis>[a,b]</emphasis>, and open ranges were written with parentheses,
+ <emphasis>(a,b)</emphasis>?
+ </para>
+ <para>The boundary markers for arrays describe a <emphasis>half-open range</emphasis>,
+ starting with (and including) the first element, and ending with (but
+ not including) the last element: <emphasis>[beginning,end)</emphasis>. See, I
+ told you it would be simple in the end.
+ </para>
+ <para>Iterators, and everything working with iterators, follows this same
+ time-honored tradition. A container's <code>begin()</code> method returns
+ an iterator referring to the first element, and its <code>end()</code>
+ method returns a past-the-end iterator, which is guaranteed to be
+ unique and comparable against any other iterator pointing into the
+ middle of the container.
+ </para>
+ <para>Container constructors, container methods, and algorithms, all take
+ pairs of iterators describing a range of values on which to operate.
+ All of these ranges are half-open ranges, so you pass the beginning
+ iterator as the starting parameter, and the one-past-the-end iterator
+ as the finishing parameter.
+ </para>
+ <para>This generalizes very well. You can operate on sub-ranges quite
+ easily this way; functions accepting a <emphasis>[first,last)</emphasis> range
+ don't know or care whether they are the boundaries of an entire {array,
+ sequence, container, whatever}, or whether they only enclose a few
+ elements from the center. This approach also makes zero-length
+ sequences very simple to recognize: if the two endpoints compare
+ equal, then the {array, sequence, container, whatever} is empty.
+ </para>
+ <para>Just don't dereference <code>end()</code>.
+ </para>
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 02 : Stream -->
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/locale.xml b/libstdc++-v3/doc/xml/manual/locale.xml
new file mode 100644
index 00000000000..a4f20bd974c
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/locale.xml
@@ -0,0 +1,653 @@
+<sect1 id="manual.localization.locales.locale" xreflabel="locale">
+<?dbhtml filename="locale.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ locale
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>locale</title>
+
+<para>
+Describes the basic locale object, including nested
+classes id, facet, and the reference-counted implementation object,
+class _Impl.
+</para>
+
+<sect2 id="locales.locale.req" xreflabel="locales.locale.req">
+<title>Requirements</title>
+
+<para>
+Class locale is non-templatized and has two distinct types nested
+inside of it:
+</para>
+
+<blockquote>
+<para>
+<emphasis>
+class facet
+22.1.1.1.2 Class locale::facet
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+Facets actually implement locale functionality. For instance, a facet
+called numpunct is the data objects that can be used to query for the
+thousands separator is in the German locale.
+</para>
+
+<para>
+Literally, a facet is strictly defined:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ Dontaining the following public data member:
+ </para>
+ <para>
+ <code>static locale::id id;</code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Derived from another facet:
+ </para>
+ <para>
+ <code>class gnu_codecvt: public std::ctype&lt;user-defined-type&gt;</code>
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+Of interest in this class are the memory management options explicitly
+specified as an argument to facet's constructor. Each constructor of a
+facet class takes a std::size_t __refs argument: if __refs == 0, the
+facet is deleted when the locale containing it is destroyed. If __refs
+== 1, the facet is not destroyed, even when it is no longer
+referenced.
+</para>
+
+<blockquote>
+<para>
+<emphasis>
+class id
+22.1.1.1.3 - Class locale::id
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+Provides an index for looking up specific facets.
+</para>
+</sect2>
+
+<sect2 id="locales.locale.design" xreflabel="locales.locale.design">
+<title>Design</title>
+
+<para>
+The major design challenge is fitting an object-orientated and
+non-global locale design ontop of POSIX and other relevant stanards,
+which include the Single Unix (nee X/Open.)
+</para>
+
+<para>
+Because C and earlier versions of POSIX falls down so completely,
+portibility is an issue.
+</para>
+
+</sect2>
+
+<sect2 id="locales.locale.impl" xreflabel="locales.locale.impl">
+<title>Implementation</title>
+
+ <sect3 id="locale.impl.c" xreflabel="locale.impl.c">
+ <title>Interacting with &quot;C&quot; locales</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <code>`locale -a`</code> displays available locales.
+ </para>
+<blockquote>
+<programlisting>
+af_ZA
+ar_AE
+ar_AE.utf8
+ar_BH
+ar_BH.utf8
+ar_DZ
+ar_DZ.utf8
+ar_EG
+ar_EG.utf8
+ar_IN
+ar_IQ
+ar_IQ.utf8
+ar_JO
+ar_JO.utf8
+ar_KW
+ar_KW.utf8
+ar_LB
+ar_LB.utf8
+ar_LY
+ar_LY.utf8
+ar_MA
+ar_MA.utf8
+ar_OM
+ar_OM.utf8
+ar_QA
+ar_QA.utf8
+ar_SA
+ar_SA.utf8
+ar_SD
+ar_SD.utf8
+ar_SY
+ar_SY.utf8
+ar_TN
+ar_TN.utf8
+ar_YE
+ar_YE.utf8
+be_BY
+be_BY.utf8
+bg_BG
+bg_BG.utf8
+br_FR
+bs_BA
+C
+ca_ES
+ca_ES@euro
+ca_ES.utf8
+ca_ES.utf8@euro
+cs_CZ
+cs_CZ.utf8
+cy_GB
+da_DK
+da_DK.iso885915
+da_DK.utf8
+de_AT
+de_AT@euro
+de_AT.utf8
+de_AT.utf8@euro
+de_BE
+de_BE@euro
+de_BE.utf8
+de_BE.utf8@euro
+de_CH
+de_CH.utf8
+de_DE
+de_DE@euro
+de_DE.utf8
+de_DE.utf8@euro
+de_LU
+de_LU@euro
+de_LU.utf8
+de_LU.utf8@euro
+el_GR
+el_GR.utf8
+en_AU
+en_AU.utf8
+en_BW
+en_BW.utf8
+en_CA
+en_CA.utf8
+en_DK
+en_DK.utf8
+en_GB
+en_GB.iso885915
+en_GB.utf8
+en_HK
+en_HK.utf8
+en_IE
+en_IE@euro
+en_IE.utf8
+en_IE.utf8@euro
+en_IN
+en_NZ
+en_NZ.utf8
+en_PH
+en_PH.utf8
+en_SG
+en_SG.utf8
+en_US
+en_US.iso885915
+en_US.utf8
+en_ZA
+en_ZA.utf8
+en_ZW
+en_ZW.utf8
+es_AR
+es_AR.utf8
+es_BO
+es_BO.utf8
+es_CL
+es_CL.utf8
+es_CO
+es_CO.utf8
+es_CR
+es_CR.utf8
+es_DO
+es_DO.utf8
+es_EC
+es_EC.utf8
+es_ES
+es_ES@euro
+es_ES.utf8
+es_ES.utf8@euro
+es_GT
+es_GT.utf8
+es_HN
+es_HN.utf8
+es_MX
+es_MX.utf8
+es_NI
+es_NI.utf8
+es_PA
+es_PA.utf8
+es_PE
+es_PE.utf8
+es_PR
+es_PR.utf8
+es_PY
+es_PY.utf8
+es_SV
+es_SV.utf8
+es_US
+es_US.utf8
+es_UY
+es_UY.utf8
+es_VE
+es_VE.utf8
+et_EE
+et_EE.utf8
+eu_ES
+eu_ES@euro
+eu_ES.utf8
+eu_ES.utf8@euro
+fa_IR
+fi_FI
+fi_FI@euro
+fi_FI.utf8
+fi_FI.utf8@euro
+fo_FO
+fo_FO.utf8
+fr_BE
+fr_BE@euro
+fr_BE.utf8
+fr_BE.utf8@euro
+fr_CA
+fr_CA.utf8
+fr_CH
+fr_CH.utf8
+fr_FR
+fr_FR@euro
+fr_FR.utf8
+fr_FR.utf8@euro
+fr_LU
+fr_LU@euro
+fr_LU.utf8
+fr_LU.utf8@euro
+ga_IE
+ga_IE@euro
+ga_IE.utf8
+ga_IE.utf8@euro
+gl_ES
+gl_ES@euro
+gl_ES.utf8
+gl_ES.utf8@euro
+gv_GB
+gv_GB.utf8
+he_IL
+he_IL.utf8
+hi_IN
+hr_HR
+hr_HR.utf8
+hu_HU
+hu_HU.utf8
+id_ID
+id_ID.utf8
+is_IS
+is_IS.utf8
+it_CH
+it_CH.utf8
+it_IT
+it_IT@euro
+it_IT.utf8
+it_IT.utf8@euro
+iw_IL
+iw_IL.utf8
+ja_JP.eucjp
+ja_JP.utf8
+ka_GE
+kl_GL
+kl_GL.utf8
+ko_KR.euckr
+ko_KR.utf8
+kw_GB
+kw_GB.utf8
+lt_LT
+lt_LT.utf8
+lv_LV
+lv_LV.utf8
+mi_NZ
+mk_MK
+mk_MK.utf8
+mr_IN
+ms_MY
+ms_MY.utf8
+mt_MT
+mt_MT.utf8
+nl_BE
+nl_BE@euro
+nl_BE.utf8
+nl_BE.utf8@euro
+nl_NL
+nl_NL@euro
+nl_NL.utf8
+nl_NL.utf8@euro
+nn_NO
+nn_NO.utf8
+no_NO
+no_NO.utf8
+oc_FR
+pl_PL
+pl_PL.utf8
+POSIX
+pt_BR
+pt_BR.utf8
+pt_PT
+pt_PT@euro
+pt_PT.utf8
+pt_PT.utf8@euro
+ro_RO
+ro_RO.utf8
+ru_RU
+ru_RU.koi8r
+ru_RU.utf8
+ru_UA
+ru_UA.utf8
+se_NO
+sk_SK
+sk_SK.utf8
+sl_SI
+sl_SI.utf8
+sq_AL
+sq_AL.utf8
+sr_YU
+sr_YU@cyrillic
+sr_YU.utf8
+sr_YU.utf8@cyrillic
+sv_FI
+sv_FI@euro
+sv_FI.utf8
+sv_FI.utf8@euro
+sv_SE
+sv_SE.iso885915
+sv_SE.utf8
+ta_IN
+te_IN
+tg_TJ
+th_TH
+th_TH.utf8
+tl_PH
+tr_TR
+tr_TR.utf8
+uk_UA
+uk_UA.utf8
+ur_PK
+uz_UZ
+vi_VN
+vi_VN.tcvn
+wa_BE
+wa_BE@euro
+yi_US
+zh_CN
+zh_CN.gb18030
+zh_CN.gbk
+zh_CN.utf8
+zh_HK
+zh_HK.utf8
+zh_TW
+zh_TW.euctw
+zh_TW.utf8
+</programlisting>
+</blockquote>
+</listitem>
+
+ <listitem>
+ <para>
+ <code>`locale`</code> displays environmental variables that
+ impact how locale("") will be deduced.
+ </para>
+<blockquote>
+<programlisting>
+LANG=en_US
+LC_CTYPE="en_US"
+LC_NUMERIC="en_US"
+LC_TIME="en_US"
+LC_COLLATE="en_US"
+LC_MONETARY="en_US"
+LC_MESSAGES="en_US"
+LC_PAPER="en_US"
+LC_NAME="en_US"
+LC_ADDRESS="en_US"
+LC_TELEPHONE="en_US"
+LC_MEASUREMENT="en_US"
+LC_IDENTIFICATION="en_US"
+LC_ALL=
+</programlisting>
+</blockquote>
+</listitem>
+</itemizedlist>
+
+<para>
+From Josuttis, p. 697-698, which says, that "there is only *one*
+relation (of the C++ locale mechanism) to the C locale mechanism: the
+global C locale is modified if a named C++ locale object is set as the
+global locale" (emphasis Paolo), that is:
+</para>
+
+<programlisting>std::locale::global(std::locale(""));</programlisting>
+
+<para>affects the C functions as if the following call was made:</para>
+
+<programlisting>std::setlocale(LC_ALL, "");</programlisting>
+
+<para>
+ On the other hand, there is *no* viceversa, that is, calling
+ setlocale has *no* whatsoever on the C++ locale mechanism, in
+ particular on the working of locale(""), which constructs the locale
+ object from the environment of the running program, that is, in
+ practice, the set of LC_ALL, LANG, etc. variable of the shell.
+</para>
+
+ </sect3>
+</sect2>
+
+<sect2 id="locales.locale.future" xreflabel="locales.locale.future">
+<title>Future</title>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ Locale initialization: at what point does _S_classic, _S_global
+ get initialized? Can named locales assume this initialization
+ has already taken place?
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Document how named locales error check when filling data
+ members. Ie, a fr_FR locale that doesn't have
+ numpunct::truename(): does it use "true"? Or is it a blank
+ string? What's the convention?
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Explain how locale aliasing happens. When does "de_DE" use "de"
+ information? What is the rule for locales composed of just an
+ ISO language code (say, "de") and locales with both an ISO
+ language code and ISO country code (say, "de_DE").
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ What should non-required facet instantiations do? If the
+ generic implemenation is provided, then how to end-users
+ provide specializations?
+ </para>
+ </listitem>
+</itemizedlist>
+</sect2>
+
+<bibliography id="locales.locale.biblio" xreflabel="locales.locale.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ The GNU C Library
+ </title>
+
+ <author>
+ <surname>McGrath</surname>
+ <firstname>Roland</firstname>
+ </author>
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder>FSF</holder>
+ </copyright>
+ <pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Correspondence
+ </title>
+
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+ <holder></holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 14882:1998 Programming languages - C++
+ </title>
+
+ <copyright>
+ <year>1998</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 9899:1999 Programming languages - C
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>
+ The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://www.opennc.org/austin/docreg.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The C++ Programming Language, Special Edition
+ </title>
+
+ <author>
+ <surname>Stroustrup</surname>
+ <firstname>Bjarne</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley, Inc.</holder>
+ </copyright>
+ <pagenums>Appendix D</pagenums>
+
+ <publisher>
+ <publishername>
+ Addison Wesley
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>
+ Standard C++ IOStreams and Locales
+ </title>
+ <subtitle>
+ Advanced Programmer's Guide and Reference
+ </subtitle>
+
+ <author>
+ <surname>Langer</surname>
+ <firstname>Angelika</firstname>
+ </author>
+
+ <author>
+ <surname>Kreft</surname>
+ <firstname>Klaus</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley Longman, Inc.</holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Addison Wesley Longman
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/localization.xml b/libstdc++-v3/doc/xml/manual/localization.xml
new file mode 100644
index 00000000000..0c6d82ea762
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/localization.xml
@@ -0,0 +1,54 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.localization" xreflabel="Localization">
+<?dbhtml filename="localization.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Localization</title>
+
+<!-- Chapter 01 : Locale -->
+<chapter id="manual.localization.locales" xreflabel="Locales">
+ <title>Locales</title>
+
+ <!-- Section 01 : locale -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="locale.xml">
+ </xi:include>
+</chapter>
+
+<!-- Chapter 02 : Facet -->
+<chapter id="manual.localization.facet" xreflabel="facet">
+ <title>Facets aka Categories</title>
+
+ <!-- Section 01 : ctype -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="ctype.xml">
+ </xi:include>
+
+ <!-- Section 02 : codecvt -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="codecvt.xml">
+ </xi:include>
+
+ <!-- Section 03 : messages -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="messages.xml">
+ </xi:include>
+</chapter>
+
+<!-- Chapter 03 : Interacting with C -->
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/messages.xml b/libstdc++-v3/doc/xml/manual/messages.xml
new file mode 100644
index 00000000000..d32620fb3ad
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/messages.xml
@@ -0,0 +1,604 @@
+<sect1 id="manual.localization.facet.messages" xreflabel="messages">
+<?dbhtml filename="messages.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ messages
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>messages</title>
+
+<para>
+The std::messages facet implements message retrieval functionality
+equivalent to Java's java.text.MessageFormat .using either GNU gettext
+or IEEE 1003.1-200 functions.
+</para>
+
+<sect2 id="facet.messages.req" xreflabel="facet.messages.req">
+<title>Requirements</title>
+
+<para>
+The std::messages facet is probably the most vaguely defined facet in
+the standard library. It's assumed that this facility was built into
+the standard library in order to convert string literals from one
+locale to the other. For instance, converting the "C" locale's
+<code>const char* c = "please"</code> to a German-localized <code>"bitte"</code>
+during program execution.
+</para>
+
+<blockquote>
+<para>
+22.2.7.1 - Template class messages [lib.locale.messages]
+</para>
+</blockquote>
+
+<para>
+This class has three public member functions, which directly
+correspond to three protected virtual member functions.
+</para>
+
+<para>
+The public member functions are:
+</para>
+
+<para>
+<code>catalog open(const string&amp;, const locale&amp;) const</code>
+</para>
+
+<para>
+<code>string_type get(catalog, int, int, const string_type&amp;) const</code>
+</para>
+
+<para>
+<code>void close(catalog) const</code>
+</para>
+
+<para>
+While the virtual functions are:
+</para>
+
+<para>
+<code>catalog do_open(const string&amp;, const locale&amp;) const</code>
+</para>
+<blockquote>
+<para>
+<emphasis>
+-1- Returns: A value that may be passed to get() to retrieve a
+message, from the message catalog identified by the string name
+according to an implementation-defined mapping. The result can be used
+until it is passed to close(). Returns a value less than 0 if no such
+catalog can be opened.
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+<code>string_type do_get(catalog, int, int, const string_type&amp;) const</code>
+</para>
+<blockquote>
+<para>
+<emphasis>
+-3- Requires: A catalog cat obtained from open() and not yet closed.
+-4- Returns: A message identified by arguments set, msgid, and dfault,
+according to an implementation-defined mapping. If no such message can
+be found, returns dfault.
+</emphasis>
+</para>
+</blockquote>
+
+<para>
+<code>void do_close(catalog) const</code>
+</para>
+<blockquote>
+<para>
+<emphasis>
+-5- Requires: A catalog cat obtained from open() and not yet closed.
+-6- Effects: Releases unspecified resources associated with cat.
+-7- Notes: The limit on such resources, if any, is implementation-defined.
+</emphasis>
+</para>
+</blockquote>
+
+
+</sect2>
+
+<sect2 id="facet.messages.design" xreflabel="facet.messages.design">
+<title>Design</title>
+
+<para>
+A couple of notes on the standard.
+</para>
+
+<para>
+First, why is <code>messages_base::catalog</code> specified as a typedef
+to int? This makes sense for implementations that use
+<code>catopen</code>, but not for others. Fortunately, it's not heavily
+used and so only a minor irritant.
+</para>
+
+<para>
+Second, by making the member functions <code>const</code>, it is
+impossible to save state in them. Thus, storing away information used
+in the 'open' member function for use in 'get' is impossible. This is
+unfortunate.
+</para>
+
+<para>
+The 'open' member function in particular seems to be oddly
+designed. The signature seems quite peculiar. Why specify a <code>const
+string&amp; </code> argument, for instance, instead of just <code>const
+char*</code>? Or, why specify a <code>const locale&amp;</code> argument that is
+to be used in the 'get' member function? How, exactly, is this locale
+argument useful? What was the intent? It might make sense if a locale
+argument was associated with a given default message string in the
+'open' member function, for instance. Quite murky and unclear, on
+reflection.
+</para>
+
+<para>
+Lastly, it seems odd that messages, which explicitly require code
+conversion, don't use the codecvt facet. Because the messages facet
+has only one template parameter, it is assumed that ctype, and not
+codecvt, is to be used to convert between character sets.
+</para>
+
+<para>
+It is implicitly assumed that the locale for the default message
+string in 'get' is in the "C" locale. Thus, all source code is assumed
+to be written in English, so translations are always from "en_US" to
+other, explicitly named locales.
+</para>
+
+</sect2>
+
+<sect2 id="facet.messages.impl" xreflabel="facet.messages.impl">
+<title>Implementation</title>
+
+ <sect3 id="messages.impl.models" xreflabel="messages.impl.models">
+ <title>Models</title>
+ <para>
+ This is a relatively simple class, on the face of it. The standard
+ specifies very little in concrete terms, so generic
+ implementations that are conforming yet do very little are the
+ norm. Adding functionality that would be useful to programmers and
+ comparable to Java's java.text.MessageFormat takes a bit of work,
+ and is highly dependent on the capabilities of the underlying
+ operating system.
+ </para>
+
+ <para>
+ Three different mechanisms have been provided, selectable via
+ configure flags:
+ </para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ generic
+ </para>
+ <para>
+ This model does very little, and is what is used by default.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ gnu
+ </para>
+ <para>
+ The gnu model is complete and fully tested. It's based on the
+ GNU gettext package, which is part of glibc. It uses the
+ functions <code>textdomain, bindtextdomain, gettext</code> to
+ implement full functionality. Creating message catalogs is a
+ relatively straight-forward process and is lightly documented
+ below, and fully documented in gettext's distributed
+ documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ ieee_1003.1-200x
+ </para>
+ <para>
+ This is a complete, though untested, implementation based on
+ the IEEE standard. The functions <code>catopen, catgets,
+ catclose</code> are used to retrieve locale-specific messages
+ given the appropriate message catalogs that have been
+ constructed for their use. Note, the script <code>
+ po2msg.sed</code> that is part of the gettext distribution can
+ convert gettext catalogs into catalogs that
+ <code>catopen</code> can use.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+A new, standards-conformant non-virtual member function signature was
+added for 'open' so that a directory could be specified with a given
+message catalog. This simplifies calling conventions for the gnu
+model.
+</para>
+
+ </sect3>
+
+ <sect3 id="messages.impl.gnu" xreflabel="messages.impl.gnu">
+ <title>The GNU Model</title>
+
+ <para>
+ The messages facet, because it is retrieving and converting
+ between characters sets, depends on the ctype and perhaps the
+ codecvt facet in a given locale. In addition, underlying "C"
+ library locale support is necessary for more than just the
+ <code>LC_MESSAGES</code> mask: <code>LC_CTYPE</code> is also
+ necessary. To avoid any unpleasantness, all bits of the "C" mask
+ (ie <code>LC_ALL</code>) are set before retrieving messages.
+ </para>
+
+ <para>
+ Making the message catalogs can be initially tricky, but become
+ quite simple with practice. For complete info, see the gettext
+ documentation. Here's an idea of what is required:
+ </para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ Make a source file with the required string literals that need
+ to be translated. See <code>intl/string_literals.cc</code> for
+ an example.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Make initial catalog (see "4 Making the PO Template File" from
+ the gettext docs).</para>
+ <para>
+ <code> xgettext --c++ --debug string_literals.cc -o libstdc++.pot </code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Make language and country-specific locale catalogs.</para>
+ <para>
+ <code>cp libstdc++.pot fr_FR.po</code>
+ </para>
+ <para>
+ <code>cp libstdc++.pot de_DE.po</code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Edit localized catalogs in emacs so that strings are
+ translated.
+ </para>
+ <para>
+ <code>emacs fr_FR.po</code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Make the binary mo files.</para>
+ <para>
+ <code>msgfmt fr_FR.po -o fr_FR.mo</code>
+ </para>
+ <para>
+ <code>msgfmt de_DE.po -o de_DE.mo</code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Copy the binary files into the correct directory structure.</para>
+ <para>
+ <code>cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++.mo</code>
+ </para>
+ <para>
+ <code>cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++.mo</code>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Use the new message catalogs.</para>
+ <para>
+ <code>locale loc_de("de_DE");</code>
+ </para>
+ <para>
+ <code>
+ use_facet&lt;messages&lt;char&gt; &gt;(loc_de).open("libstdc++", locale(), dir);
+ </code>
+ </para>
+ </listitem>
+</itemizedlist>
+
+ </sect3>
+</sect2>
+
+<sect2 id="facet.messages.use" xreflabel="facet.messages.use">
+<title>Use</title>
+ <para>
+ A simple example using the GNU model of message conversion.
+ </para>
+
+<programlisting>
+#include &lt;iostream&gt;
+#include &lt;locale&gt;
+using namespace std;
+
+void test01()
+{
+ typedef messages&lt;char&gt;::catalog catalog;
+ const char* dir =
+ "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++/po/share/locale";
+ const locale loc_de("de_DE");
+ const messages&lt;char&gt;&amp; mssg_de = use_facet&lt;messages&lt;char&gt; &gt;(loc_de);
+
+ catalog cat_de = mssg_de.open("libstdc++", loc_de, dir);
+ string s01 = mssg_de.get(cat_de, 0, 0, "please");
+ string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
+ cout &lt;&lt; "please in german:" &lt;&lt; s01 &lt;&lt; '\n';
+ cout &lt;&lt; "thank you in german:" &lt;&lt; s02 &lt;&lt; '\n';
+ mssg_de.close(cat_de);
+}
+</programlisting>
+
+</sect2>
+
+<sect2 id="facet.messages.future" xreflabel="facet.messages.future">
+<title>Future</title>
+
+<itemizedlist>
+<listitem>
+ <para>
+ Things that are sketchy, or remain unimplemented:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ _M_convert_from_char, _M_convert_to_char are in flux,
+ depending on how the library ends up doing character set
+ conversions. It might not be possible to do a real character
+ set based conversion, due to the fact that the template
+ parameter for messages is not enough to instantiate the
+ codecvt facet (1 supplied, need at least 2 but would prefer
+ 3).
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ There are issues with gettext needing the global locale set
+ to extract a message. This dependence on the global locale
+ makes the current "gnu" model non MT-safe. Future versions
+ of glibc, ie glibc 2.3.x will fix this, and the C++ library
+ bits are already in place.
+ </para>
+ </listitem>
+ </itemizedlist>
+</listitem>
+
+<listitem>
+ <para>
+ Development versions of the GNU "C" library, glibc 2.3 will allow
+ a more efficient, MT implementation of std::messages, and will
+ allow the removal of the _M_name_messages data member. If this is
+ done, it will change the library ABI. The C++ parts to support
+ glibc 2.3 have already been coded, but are not in use: once this
+ version of the "C" library is released, the marked parts of the
+ messages implementation can be switched over to the new "C"
+ library functionality.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ At some point in the near future, std::numpunct will probably use
+ std::messages facilities to implement truename/falename
+ correctly. This is currently not done, but entries in
+ libstdc++.pot have already been made for "true" and "false" string
+ literals, so all that remains is the std::numpunct coding and the
+ configure/make hassles to make the installed library search its
+ own catalog. Currently the libstdc++.mo catalog is only searched
+ for the testsuite cases involving messages members.
+ </para>
+</listitem>
+
+<listitem>
+ <para> The following member functions:</para>
+
+ <para>
+ <code>
+ catalog
+ open(const basic_string&lt;char&gt;&amp; __s, const locale&amp; __loc) const
+ </code>
+ </para>
+
+ <para>
+ <code>
+ catalog
+ open(const basic_string&lt;char&gt;&amp;, const locale&amp;, const char*) const;
+ </code>
+ </para>
+
+ <para>
+ Don't actually return a "value less than 0 if no such catalog
+ can be opened" as required by the standard in the "gnu"
+ model. As of this writing, it is unknown how to query to see
+ if a specified message catalog exists using the gettext
+ package.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect2>
+
+<bibliography id="facet.messages.biblio" xreflabel="facet.messages.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ The GNU C Library
+ </title>
+
+ <author>
+ <surname>McGrath</surname>
+ <firstname>Roland</firstname>
+ </author>
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder>FSF</holder>
+ </copyright>
+ <pagenums>Chapters 6 Character Set Handling, and 7 Locales and Internationalization
+ </pagenums>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Correspondence
+ </title>
+
+ <author>
+ <surname>Drepper</surname>
+ <firstname>Ulrich</firstname>
+ </author>
+
+ <copyright>
+ <year>2002</year>
+ <holder></holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 14882:1998 Programming languages - C++
+ </title>
+
+ <copyright>
+ <year>1998</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ ISO/IEC 9899:1999 Programming languages - C
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>ISO</holder>
+ </copyright>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
+ </title>
+
+ <copyright>
+ <year>1999</year>
+ <holder>
+ The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
+ </copyright>
+
+ <biblioid>
+ <ulink url="http://www.opennc.org/austin/docreg.html">
+ </ulink>
+ </biblioid>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The C++ Programming Language, Special Edition
+ </title>
+
+ <author>
+ <surname>Stroustrup</surname>
+ <firstname>Bjarne</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley, Inc.</holder>
+ </copyright>
+ <pagenums>Appendix D</pagenums>
+
+ <publisher>
+ <publishername>
+ Addison Wesley
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+
+ <biblioentry>
+ <title>
+ Standard C++ IOStreams and Locales
+ </title>
+ <subtitle>
+ Advanced Programmer's Guide and Reference
+ </subtitle>
+
+ <author>
+ <surname>Langer</surname>
+ <firstname>Angelika</firstname>
+ </author>
+
+ <author>
+ <surname>Kreft</surname>
+ <firstname>Klaus</firstname>
+ </author>
+
+ <copyright>
+ <year>2000</year>
+ <holder>Addison Wesley Longman, Inc.</holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Addison Wesley Longman
+ </publishername>
+ </publisher>
+
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ Java 2 Platform, Standard Edition, v 1.3.1 API Specification
+ </title>
+ <pagenums>java.util.Properties, java.text.MessageFormat,
+java.util.Locale, java.util.ResourceBundle</pagenums>
+ <biblioid>
+ <ulink url="http://java.sun.com/j2se/1.3/docs/api">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ GNU gettext tools, version 0.10.38, Native Language Support
+Library and Tools.
+ </title>
+ <biblioid>
+ <ulink url="http://sources.redhat.com/gettext">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/mt_allocator.xml b/libstdc++-v3/doc/xml/manual/mt_allocator.xml
new file mode 100644
index 00000000000..48f5c2fe502
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/mt_allocator.xml
@@ -0,0 +1,554 @@
+<sect1 id="manual.ext.allocator.mt" xreflabel="mt allocator">
+<?dbhtml filename="mt_allocator.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ allocator
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>mt_allocator</title>
+
+<para>
+</para>
+
+<sect2 id="allocator.mt.intro" xreflabel="allocator.mt.intro">
+<title>Intro</title>
+
+<para>
+ The mt allocator [hereinafter referred to simply as "the allocator"]
+ is a fixed size (power of two) allocator that was initially
+ developed specifically to suit the needs of multi threaded
+ applications [hereinafter referred to as an MT application]. Over
+ time the allocator has evolved and been improved in many ways, in
+ particular it now also does a good job in single threaded
+ applications [hereinafter referred to as a ST application]. (Note:
+ In this document, when referring to single threaded applications
+ this also includes applications that are compiled with gcc without
+ thread support enabled. This is accomplished using ifdef's on
+ __GTHREADS). This allocator is tunable, very flexible, and capable
+ of high-performance.
+</para>
+
+<para>
+ The aim of this document is to describe - from an application point of
+ view - the "inner workings" of the allocator.
+</para>
+
+</sect2>
+
+
+<sect2 id="allocator.mt.design_issues" xreflabel="allocator.mt.design_issues">
+<title>Design Issues</title>
+
+<sect3 id="allocator.mt.overview" xreflabel="allocator.mt.overview">
+<title>Overview</title>
+
+
+<para> There are three general components to the allocator: a datum
+describing the characteristics of the memory pool, a policy class
+containing this pool that links instantiation types to common or
+individual pools, and a class inheriting from the policy class that is
+the actual allocator.
+</para>
+
+<para>The datum describing pools characteristics is
+</para>
+<programlisting>
+ template&lt;bool _Thread&gt;
+ class __pool
+</programlisting>
+<para> This class is parametrized on thread support, and is explicitly
+specialized for both multiple threads (with <code>bool==true</code>)
+and single threads (via <code>bool==false</code>.) It is possible to
+use a custom pool datum instead of the default class that is provided.
+</para>
+
+<para> There are two distinct policy classes, each of which can be used
+with either type of underlying pool datum.
+</para>
+
+<programlisting>
+ template&lt;bool _Thread&gt;
+ struct __common_pool_policy
+
+ template&lt;typename _Tp, bool _Thread&gt;
+ struct __per_type_pool_policy
+</programlisting>
+
+<para> The first policy, <code>__common_pool_policy</code>, implements a
+common pool. This means that allocators that are instantiated with
+different types, say <code>char</code> and <code>long</code> will both
+use the same pool. This is the default policy.
+</para>
+
+<para> The second policy, <code>__per_type_pool_policy</code>, implements
+a separate pool for each instantiating type. Thus, <code>char</code>
+and <code>long</code> will use separate pools. This allows per-type
+tuning, for instance.
+</para>
+
+<para> Putting this all together, the actual allocator class is
+</para>
+<programlisting>
+ template&lt;typename _Tp, typename _Poolp = __default_policy&gt;
+ class __mt_alloc : public __mt_alloc_base&lt;_Tp&gt;, _Poolp
+</programlisting>
+<para> This class has the interface required for standard library allocator
+classes, namely member functions <code>allocate</code> and
+<code>deallocate</code>, plus others.
+</para>
+
+</sect3>
+</sect2>
+
+<sect2 id="allocator.mt.impl" xreflabel="allocator.mt.impl">
+<title>Implementation</title>
+
+
+<sect3 id="allocator.mt.tune" xreflabel="allocator.mt.tune">
+<title>Tunable Parameters</title>
+
+<para>Certain allocation parameters can be modified, or tuned. There
+exists a nested <code>struct __pool_base::_Tune</code> that contains all
+these parameters, which include settings for
+</para>
+ <itemizedlist>
+ <listitem><para>Alignment</para></listitem>
+ <listitem><para>Maximum bytes before calling <code>::operator new</code> directly</para></listitem>
+ <listitem><para>Minimum bytes</para></listitem>
+ <listitem><para>Size of underlying global allocations</para></listitem>
+ <listitem><para>Maximum number of supported threads</para></listitem>
+ <listitem><para>Migration of deallocations to the global free list</para></listitem>
+ <listitem><para>Shunt for global <code>new</code> and <code>delete</code></para></listitem>
+ </itemizedlist>
+<para>Adjusting parameters for a given instance of an allocator can only
+happen before any allocations take place, when the allocator itself is
+initialized. For instance:
+</para>
+<programlisting>
+#include &lt;ext/mt_allocator.h&gt;
+
+struct pod
+{
+ int i;
+ int j;
+};
+
+int main()
+{
+ typedef pod value_type;
+ typedef __gnu_cxx::__mt_alloc&lt;value_type&gt; allocator_type;
+ typedef __gnu_cxx::__pool_base::_Tune tune_type;
+
+ tune_type t_default;
+ tune_type t_opt(16, 5120, 32, 5120, 20, 10, false);
+ tune_type t_single(16, 5120, 32, 5120, 1, 10, false);
+
+ tune_type t;
+ t = allocator_type::_M_get_options();
+ allocator_type::_M_set_options(t_opt);
+ t = allocator_type::_M_get_options();
+
+ allocator_type a;
+ allocator_type::pointer p1 = a.allocate(128);
+ allocator_type::pointer p2 = a.allocate(5128);
+
+ a.deallocate(p1, 128);
+ a.deallocate(p2, 5128);
+
+ return 0;
+}
+</programlisting>
+
+</sect3>
+
+<sect3 id="allocator.mt.init" xreflabel="allocator.mt.init">
+<title>Initialization</title>
+
+<para>
+The static variables (pointers to freelists, tuning parameters etc)
+are initialized as above, or are set to the global defaults.
+</para>
+
+<para>
+The very first allocate() call will always call the
+_S_initialize_once() function. In order to make sure that this
+function is called exactly once we make use of a __gthread_once call
+in MT applications and check a static bool (_S_init) in ST
+applications.
+</para>
+
+<para>
+The _S_initialize() function:
+- If the GLIBCXX_FORCE_NEW environment variable is set, it sets the bool
+ _S_force_new to true and then returns. This will cause subsequent calls to
+ allocate() to return memory directly from a new() call, and deallocate will
+ only do a delete() call.
+</para>
+
+<para>
+- If the GLIBCXX_FORCE_NEW environment variable is not set, both ST and MT
+ applications will:
+ - Calculate the number of bins needed. A bin is a specific power of two size
+ of bytes. I.e., by default the allocator will deal with requests of up to
+ 128 bytes (or whatever the value of _S_max_bytes is when _S_init() is
+ called). This means that there will be bins of the following sizes
+ (in bytes): 1, 2, 4, 8, 16, 32, 64, 128.
+
+ - Create the _S_binmap array. All requests are rounded up to the next
+ "large enough" bin. I.e., a request for 29 bytes will cause a block from
+ the "32 byte bin" to be returned to the application. The purpose of
+ _S_binmap is to speed up the process of finding out which bin to use.
+ I.e., the value of _S_binmap[ 29 ] is initialized to 5 (bin 5 = 32 bytes).
+</para>
+<para>
+ - Create the _S_bin array. This array consists of bin_records. There will be
+ as many bin_records in this array as the number of bins that we calculated
+ earlier. I.e., if _S_max_bytes = 128 there will be 8 entries.
+ Each bin_record is then initialized:
+ - bin_record-&gt;first = An array of pointers to block_records. There will be
+ as many block_records pointers as there are maximum number of threads
+ (in a ST application there is only 1 thread, in a MT application there
+ are _S_max_threads).
+ This holds the pointer to the first free block for each thread in this
+ bin. I.e., if we would like to know where the first free block of size 32
+ for thread number 3 is we would look this up by: _S_bin[ 5 ].first[ 3 ]
+
+ The above created block_record pointers members are now initialized to
+ their initial values. I.e. _S_bin[ n ].first[ n ] = NULL;
+</para>
+
+<para>
+- Additionally a MT application will:
+ - Create a list of free thread id's. The pointer to the first entry
+ is stored in _S_thread_freelist_first. The reason for this approach is
+ that the __gthread_self() call will not return a value that corresponds to
+ the maximum number of threads allowed but rather a process id number or
+ something else. So what we do is that we create a list of thread_records.
+ This list is _S_max_threads long and each entry holds a size_t thread_id
+ which is initialized to 1, 2, 3, 4, 5 and so on up to _S_max_threads.
+ Each time a thread calls allocate() or deallocate() we call
+ _S_get_thread_id() which looks at the value of _S_thread_key which is a
+ thread local storage pointer. If this is NULL we know that this is a newly
+ created thread and we pop the first entry from this list and saves the
+ pointer to this record in the _S_thread_key variable. The next time
+ we will get the pointer to the thread_record back and we use the
+ thread_record-&gt;thread_id as identification. I.e., the first thread that
+ calls allocate will get the first record in this list and thus be thread
+ number 1 and will then find the pointer to its first free 32 byte block
+ in _S_bin[ 5 ].first[ 1 ]
+ When we create the _S_thread_key we also define a destructor
+ (_S_thread_key_destr) which means that when the thread dies, this
+ thread_record is returned to the front of this list and the thread id
+ can then be reused if a new thread is created.
+ This list is protected by a mutex (_S_thread_freelist_mutex) which is only
+ locked when records are removed or added to the list.
+</para>
+<para>
+ - Initialize the free and used counters of each bin_record:
+ - bin_record-&gt;free = An array of size_t. This keeps track of the number
+ of blocks on a specific thread's freelist in each bin. I.e., if a thread
+ has 12 32-byte blocks on it's freelists and allocates one of these, this
+ counter would be decreased to 11.
+
+ - bin_record-&gt;used = An array of size_t. This keeps track of the number
+ of blocks currently in use of this size by this thread. I.e., if a thread
+ has made 678 requests (and no deallocations...) of 32-byte blocks this
+ counter will read 678.
+
+ The above created arrays are now initialized with their initial values.
+ I.e. _S_bin[ n ].free[ n ] = 0;
+</para>
+<para>
+ - Initialize the mutex of each bin_record: The bin_record-&gt;mutex
+ is used to protect the global freelist. This concept of a global
+ freelist is explained in more detail in the section "A multi
+ threaded example", but basically this mutex is locked whenever a
+ block of memory is retrieved or returned to the global freelist
+ for this specific bin. This only occurs when a number of blocks
+ are grabbed from the global list to a thread specific list or when
+ a thread decides to return some blocks to the global freelist.
+</para>
+
+</sect3>
+
+<sect3 id="allocator.mt.deallocation" xreflabel="allocator.mt.deallocation">
+<title>Deallocation Notes</title>
+
+<para> Notes about deallocation. This allocator does not explicitly
+release memory. Because of this, memory debugging programs like
+valgrind or purify may notice leaks: sorry about this
+inconvenience. Operating systems will reclaim allocated memory at
+program termination anyway. If sidestepping this kind of noise is
+desired, there are three options: use an allocator, like
+<code>new_allocator</code> that releases memory while debugging, use
+GLIBCXX_FORCE_NEW to bypass the allocator's internal pools, or use a
+custom pool datum that releases resources on destruction.
+</para>
+
+<para>
+ On systems with the function <code>__cxa_atexit</code>, the
+allocator can be forced to free all memory allocated before program
+termination with the member function
+<code>__pool_type::_M_destroy</code>. However, because this member
+function relies on the precise and exactly-conforming ordering of
+static destructors, including those of a static local
+<code>__pool</code> object, it should not be used, ever, on systems
+that don't have the necessary underlying support. In addition, in
+practice, forcing deallocation can be tricky, as it requires the
+<code>__pool</code> object to be fully-constructed before the object
+that uses it is fully constructed. For most (but not all) STL
+containers, this works, as an instance of the allocator is constructed
+as part of a container's constructor. However, this assumption is
+implementation-specific, and subject to change. For an example of a
+pool that frees memory, see the following
+ <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup">
+ example.</ulink>
+</para>
+
+</sect3>
+
+</sect2>
+
+<sect2 id="allocator.mt.example_single" xreflabel="allocator.mt.example_single">
+<title>Single Thread Example</title>
+
+<para>
+Let's start by describing how the data on a freelist is laid out in memory.
+This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes):
+</para>
+<programlisting>
++----------------+
+| next* ---------|--+ (_S_bin[ 3 ].first[ 3 ] points here)
+| | |
+| | |
+| | |
++----------------+ |
+| thread_id = 3 | |
+| | |
+| | |
+| | |
++----------------+ |
+| DATA | | (A pointer to here is what is returned to the
+| | | the application when needed)
+| | |
+| | |
+| | |
+| | |
+| | |
+| | |
++----------------+ |
++----------------+ |
+| next* |&lt;-+ (If next == NULL it's the last one on the list)
+| |
+| |
+| |
++----------------+
+| thread_id = 3 |
+| |
+| |
+| |
++----------------+
+| DATA |
+| |
+| |
+| |
+| |
+| |
+| |
+| |
++----------------+
+</programlisting>
+
+<para>
+With this in mind we simplify things a bit for a while and say that there is
+only one thread (a ST application). In this case all operations are made to
+what is referred to as the global pool - thread id 0 (No thread may be
+assigned this id since they span from 1 to _S_max_threads in a MT application).
+</para>
+<para>
+When the application requests memory (calling allocate()) we first look at the
+requested size and if this is &gt; _S_max_bytes we call new() directly and return.
+</para>
+<para>
+If the requested size is within limits we start by finding out from which
+bin we should serve this request by looking in _S_binmap.
+</para>
+<para>
+A quick look at _S_bin[ bin ].first[ 0 ] tells us if there are any blocks of
+this size on the freelist (0). If this is not NULL - fine, just remove the
+block that _S_bin[ bin ].first[ 0 ] points to from the list,
+update _S_bin[ bin ].first[ 0 ] and return a pointer to that blocks data.
+</para>
+<para>
+If the freelist is empty (the pointer is NULL) we must get memory from the
+system and build us a freelist within this memory. All requests for new memory
+is made in chunks of _S_chunk_size. Knowing the size of a block_record and
+the bytes that this bin stores we then calculate how many blocks we can create
+within this chunk, build the list, remove the first block, update the pointer
+(_S_bin[ bin ].first[ 0 ]) and return a pointer to that blocks data.
+</para>
+
+<para>
+Deallocation is equally simple; the pointer is casted back to a block_record
+pointer, lookup which bin to use based on the size, add the block to the front
+of the global freelist and update the pointer as needed
+(_S_bin[ bin ].first[ 0 ]).
+</para>
+
+<para>
+The decision to add deallocated blocks to the front of the freelist was made
+after a set of performance measurements that showed that this is roughly 10%
+faster than maintaining a set of "last pointers" as well.
+</para>
+
+</sect2>
+
+<sect2 id="allocator.mt.example_multi" xreflabel="allocator.mt.example_multi">
+<title>Multiple Thread Example</title>
+
+<para>
+In the ST example we never used the thread_id variable present in each block.
+Let's start by explaining the purpose of this in a MT application.
+</para>
+
+<para>
+The concept of "ownership" was introduced since many MT applications
+allocate and deallocate memory to shared containers from different
+threads (such as a cache shared amongst all threads). This introduces
+a problem if the allocator only returns memory to the current threads
+freelist (I.e., there might be one thread doing all the allocation and
+thus obtaining ever more memory from the system and another thread
+that is getting a longer and longer freelist - this will in the end
+consume all available memory).
+</para>
+
+<para>
+Each time a block is moved from the global list (where ownership is
+irrelevant), to a threads freelist (or when a new freelist is built
+from a chunk directly onto a threads freelist or when a deallocation
+occurs on a block which was not allocated by the same thread id as the
+one doing the deallocation) the thread id is set to the current one.
+</para>
+
+<para>
+What's the use? Well, when a deallocation occurs we can now look at
+the thread id and find out if it was allocated by another thread id
+and decrease the used counter of that thread instead, thus keeping the
+free and used counters correct. And keeping the free and used counters
+corrects is very important since the relationship between these two
+variables decides if memory should be returned to the global pool or
+not when a deallocation occurs.
+</para>
+
+<para>
+When the application requests memory (calling allocate()) we first
+look at the requested size and if this is &gt;_S_max_bytes we call new()
+directly and return.
+</para>
+
+<para>
+If the requested size is within limits we start by finding out from which
+bin we should serve this request by looking in _S_binmap.
+</para>
+
+<para>
+A call to _S_get_thread_id() returns the thread id for the calling thread
+(and if no value has been set in _S_thread_key, a new id is assigned and
+returned).
+</para>
+
+<para>
+A quick look at _S_bin[ bin ].first[ thread_id ] tells us if there are
+any blocks of this size on the current threads freelist. If this is
+not NULL - fine, just remove the block that _S_bin[ bin ].first[
+thread_id ] points to from the list, update _S_bin[ bin ].first[
+thread_id ], update the free and used counters and return a pointer to
+that blocks data.
+</para>
+
+<para>
+If the freelist is empty (the pointer is NULL) we start by looking at
+the global freelist (0). If there are blocks available on the global
+freelist we lock this bins mutex and move up to block_count (the
+number of blocks of this bins size that will fit into a _S_chunk_size)
+or until end of list - whatever comes first - to the current threads
+freelist and at the same time change the thread_id ownership and
+update the counters and pointers. When the bins mutex has been
+unlocked, we remove the block that _S_bin[ bin ].first[ thread_id ]
+points to from the list, update _S_bin[ bin ].first[ thread_id ],
+update the free and used counters, and return a pointer to that blocks
+data.
+</para>
+
+<para>
+The reason that the number of blocks moved to the current threads
+freelist is limited to block_count is to minimize the chance that a
+subsequent deallocate() call will return the excess blocks to the
+global freelist (based on the _S_freelist_headroom calculation, see
+below).
+</para>
+
+<para>
+However if there isn't any memory on the global pool we need to get
+memory from the system - this is done in exactly the same way as in a
+single threaded application with one major difference; the list built
+in the newly allocated memory (of _S_chunk_size size) is added to the
+current threads freelist instead of to the global.
+</para>
+
+<para>
+The basic process of a deallocation call is simple: always add the
+block to the front of the current threads freelist and update the
+counters and pointers (as described earlier with the specific check of
+ownership that causes the used counter of the thread that originally
+allocated the block to be decreased instead of the current threads
+counter).
+</para>
+
+<para>
+And here comes the free and used counters to service. Each time a
+deallocation() call is made, the length of the current threads
+freelist is compared to the amount memory in use by this thread.
+</para>
+
+<para>
+Let's go back to the example of an application that has one thread
+that does all the allocations and one that deallocates. Both these
+threads use say 516 32-byte blocks that was allocated during thread
+creation for example. Their used counters will both say 516 at this
+point. The allocation thread now grabs 1000 32-byte blocks and puts
+them in a shared container. The used counter for this thread is now
+1516.
+</para>
+
+<para>
+The deallocation thread now deallocates 500 of these blocks. For each
+deallocation made the used counter of the allocating thread is
+decreased and the freelist of the deallocation thread gets longer and
+longer. But the calculation made in deallocate() will limit the length
+of the freelist in the deallocation thread to _S_freelist_headroom %
+of it's used counter. In this case, when the freelist (given that the
+_S_freelist_headroom is at it's default value of 10%) exceeds 52
+(516/10) blocks will be returned to the global pool where the
+allocating thread may pick them up and reuse them.
+</para>
+
+<para>
+In order to reduce lock contention (since this requires this bins
+mutex to be locked) this operation is also made in chunks of blocks
+(just like when chunks of blocks are moved from the global freelist to
+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.
+</para>
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/numerics.xml b/libstdc++-v3/doc/xml/manual/numerics.xml
new file mode 100644
index 00000000000..835cd1e7454
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/numerics.xml
@@ -0,0 +1,143 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.numerics" xreflabel="Numerics">
+<?dbhtml filename="numerics.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Numerics</title>
+
+<!-- Chapter 01 : Complex -->
+<chapter id="manual.numerics.complex" xreflabel="complex">
+ <title>Complex</title>
+ <para>
+ </para>
+ <sect1 id="numerics.complex.processing" xreflabel="complex Processing">
+ <title>complex Processing</title>
+ <para>
+ </para>
+ <para>Using <code>complex&lt;&gt;</code> becomes even more comple- er, sorry,
+ <emphasis>complicated</emphasis>, with the not-quite-gratuitously-incompatible
+ addition of complex types to the C language. David Tribble has
+ compiled a list of C++98 and C99 conflict points; his description of
+ C's new type versus those of C++ and how to get them playing together
+ nicely is
+<ulink url="http://david.tribble.com/text/cdiffs.htm#C99-complex">here</ulink>.
+ </para>
+ <para><code>complex&lt;&gt;</code> is intended to be instantiated with a
+ floating-point type. As long as you meet that and some other basic
+ requirements, then the resulting instantiation has all of the usual
+ math operators defined, as well as definitions of <code>op&lt;&lt;</code>
+ and <code>op&gt;&gt;</code> that work with iostreams: <code>op&lt;&lt;</code>
+ prints <code>(u,v)</code> and <code>op&gt;&gt;</code> can read <code>u</code>,
+ <code>(u)</code>, and <code>(u,v)</code>.
+ </para>
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 02 : Generalized Operations -->
+<chapter id="manual.numerics.generalized_ops" xreflabel="Generalized Ops">
+ <title>Generalized Operations</title>
+ <para>
+ </para>
+
+ <para>There are four generalized functions in the &lt;numeric&gt; header
+ that follow the same conventions as those in &lt;algorithm&gt;. Each
+ of them is overloaded: one signature for common default operations,
+ and a second for fully general operations. Their names are
+ self-explanatory to anyone who works with numerics on a regular basis:
+ </para>
+ <itemizedlist>
+ <listitem><para><code>accumulate</code></para></listitem>
+ <listitem><para><code>inner_product</code></para></listitem>
+ <listitem><para><code>partial_sum</code></para></listitem>
+ <listitem><para><code>adjacent_difference</code></para></listitem>
+ </itemizedlist>
+ <para>Here is a simple example of the two forms of <code>accumulate</code>.
+ </para>
+ <programlisting>
+ int ar[50];
+ int someval = somefunction();
+
+ // ...initialize members of ar to something...
+
+ int sum = std::accumulate(ar,ar+50,0);
+ int sum_stuff = std::accumulate(ar,ar+50,someval);
+ int product = std::accumulate(ar,ar+50,1,std::multiplies&lt;int&gt;());
+ </programlisting>
+ <para>The first call adds all the members of the array, using zero as an
+ initial value for <code>sum</code>. The second does the same, but uses
+ <code>someval</code> as the starting value (thus, <code>sum_stuff == sum +
+ someval</code>). The final call uses the second of the two signatures,
+ and multiplies all the members of the array; here we must obviously
+ use 1 as a starting value instead of 0.
+ </para>
+ <para>The other three functions have similar dual-signature forms.
+ </para>
+
+</chapter>
+
+<!-- Chapter 03 : Interacting with C -->
+<chapter id="manual.numerics.c" xreflabel="Interacting with C">
+ <title>Interacting with C</title>
+
+ <sect1 id="numerics.c.array" xreflabel="Numerics vs. Arrays">
+ <title>Numerics vs. Arrays</title>
+
+ <para>One of the major reasons why FORTRAN can chew through numbers so well
+ is that it is defined to be free of pointer aliasing, an assumption
+ that C89 is not allowed to make, and neither is C++98. C99 adds a new
+ keyword, <code>restrict</code>, to apply to individual pointers. The
+ C++ solution is contained in the library rather than the language
+ (although many vendors can be expected to add this to their compilers
+ as an extension).
+ </para>
+ <para>That library solution is a set of two classes, five template classes,
+ and &quot;a whole bunch&quot; of functions. The classes are required
+ to be free of pointer aliasing, so compilers can optimize the
+ daylights out of them the same way that they have been for FORTRAN.
+ They are collectively called <code>valarray</code>, although strictly
+ speaking this is only one of the five template classes, and they are
+ designed to be familiar to people who have worked with the BLAS
+ libraries before.
+ </para>
+
+ </sect1>
+
+ <sect1 id="numerics.c.c99" xreflabel="C99">
+ <title>C99</title>
+
+ <para>In addition to the other topics on this page, we'll note here some
+ of the C99 features that appear in libstdc++.
+ </para>
+ <para>The C99 features depend on the <code>--enable-c99</code> configure flag.
+ This flag is already on by default, but it can be disabled by the
+ user. Also, the configuration machinery will disable it if the
+ necessary support for C99 (e.g., header files) cannot be found.
+ </para>
+ <para>As of GCC 3.0, C99 support includes classification functions
+ such as <code>isnormal</code>, <code>isgreater</code>,
+ <code>isnan</code>, etc.
+ The functions used for 'long long' support such as <code>strtoll</code>
+ are supported, as is the <code>lldiv_t</code> typedef. Also supported
+ are the wide character functions using 'long long', like
+ <code>wcstoll</code>.
+ </para>
+
+ </sect1>
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/parallel_mode.xml b/libstdc++-v3/doc/xml/manual/parallel_mode.xml
new file mode 100644
index 00000000000..4236f63c8b1
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/parallel_mode.xml
@@ -0,0 +1,674 @@
+<?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.parallel_mode" xreflabel="Parallel Mode">
+<?dbhtml filename="parallel_mode.html"?>
+
+<chapterinfo>
+ <keywordset>
+ <keyword>
+ C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ <keyword>
+ parallel
+ </keyword>
+ </keywordset>
+</chapterinfo>
+
+<title>Parallel Mode</title>
+
+<para> The libstdc++ parallel mode is an experimental parallel
+implementation of many algorithms the C++ Standard Library.
+</para>
+
+<para>
+Several of the standard algorithms, for instance
+<code>std::sort</code>, are made parallel using OpenMP
+annotations. These parallel mode constructs and can be invoked by
+explicit source declaration or by compiling existing sources with a
+specific compiler flag.
+</para>
+
+
+<sect1 id="manual.ext.parallel_mode.intro" xreflabel="Intro">
+ <title>Intro</title>
+
+<para>The following library components in the include
+<code>&lt;numeric&gt;</code> are included in the parallel mode:</para>
+<itemizedlist>
+ <listitem><para><code>std::accumulate</code></para></listitem>
+ <listitem><para><code>std::adjacent_difference</code></para></listitem>
+ <listitem><para><code>std::inner_product</code></para></listitem>
+ <listitem><para><code>std::partial_sum</code></para></listitem>
+</itemizedlist>
+
+<para>The following library components in the include
+<code>&lt;algorithm&gt;</code> are included in the parallel mode:</para>
+<itemizedlist>
+ <listitem><para><code>std::adjacent_find</code></para></listitem>
+ <listitem><para><code>std::count</code></para></listitem>
+ <listitem><para><code>std::count_if</code></para></listitem>
+ <listitem><para><code>std::equal</code></para></listitem>
+ <listitem><para><code>std::find</code></para></listitem>
+ <listitem><para><code>std::find_if</code></para></listitem>
+ <listitem><para><code>std::find_first_of</code></para></listitem>
+ <listitem><para><code>std::for_each</code></para></listitem>
+ <listitem><para><code>std::generate</code></para></listitem>
+ <listitem><para><code>std::generate_n</code></para></listitem>
+ <listitem><para><code>std::lexicographical_compare</code></para></listitem>
+ <listitem><para><code>std::mismatch</code></para></listitem>
+ <listitem><para><code>std::search</code></para></listitem>
+ <listitem><para><code>std::search_n</code></para></listitem>
+ <listitem><para><code>std::transform</code></para></listitem>
+ <listitem><para><code>std::replace</code></para></listitem>
+ <listitem><para><code>std::replace_if</code></para></listitem>
+ <listitem><para><code>std::max_element</code></para></listitem>
+ <listitem><para><code>std::merge</code></para></listitem>
+ <listitem><para><code>std::min_element</code></para></listitem>
+ <listitem><para><code>std::nth_element</code></para></listitem>
+ <listitem><para><code>std::partial_sort</code></para></listitem>
+ <listitem><para><code>std::partition</code></para></listitem>
+ <listitem><para><code>std::random_shuffle</code></para></listitem>
+ <listitem><para><code>std::set_union</code></para></listitem>
+ <listitem><para><code>std::set_intersection</code></para></listitem>
+ <listitem><para><code>std::set_symmetric_difference</code></para></listitem>
+ <listitem><para><code>std::set_difference</code></para></listitem>
+ <listitem><para><code>std::sort</code></para></listitem>
+ <listitem><para><code>std::stable_sort</code></para></listitem>
+ <listitem><para><code>std::unique_copy</code></para></listitem>
+</itemizedlist>
+
+<para>The following library components in the includes
+<code>&lt;set&gt;</code> and <code>&lt;map&gt;</code> are included in the parallel mode:</para>
+<itemizedlist>
+ <listitem><para><code>std::(multi_)map/set&lt;T&gt;::(multi_)map/set(Iterator begin, Iterator end)</code> (bulk construction)</para></listitem>
+ <listitem><para><code>std::(multi_)map/set&lt;T&gt;::insert(Iterator begin, Iterator end)</code> (bulk insertion)</para></listitem>
+</itemizedlist>
+
+</sect1>
+
+<sect1 id="manual.ext.parallel_mode.semantics" xreflabel="Semantics">
+ <title>Semantics</title>
+
+<para> The parallel mode STL algorithms are currently not exception-safe,
+i. e. user-defined functors must not throw exceptions.
+</para>
+
+<para> Since the current GCC OpenMP implementation does not support
+OpenMP parallel regions in concurrent threads,
+it is not possible to call parallel STL algorithm in
+concurrent threads, either.
+It might work with other compilers, though.</para>
+
+</sect1>
+
+<sect1 id="manual.ext.parallel_mode.using" xreflabel="Using">
+ <title>Using</title>
+
+<sect2 id="parallel_mode.using.parallel_mode" xreflabel="using.parallel_mode">
+ <title>Using Parallel Mode</title>
+
+<para>To use the libstdc++ parallel mode, compile your application with
+ the compiler flag <code>-D_GLIBCXX_PARALLEL -fopenmp</code>. This
+ will link in <code>libgomp</code>, the GNU OpenMP <ulink url="http://gcc.gnu.org/onlinedocs/libgomp">implementation</ulink>,
+ whose presence is mandatory. In addition, hardware capable of atomic
+ operations is mandatory. Actually activating these atomic
+ operations may require explicit compiler flags on some targets
+ (like sparc and x86), such as <code>-march=i686</code>,
+ <code>-march=native</code> or <code>-mcpu=v9</code>.
+</para>
+
+<para>Note that the <code>_GLIBCXX_PARALLEL</code> define may change the
+ sizes and behavior of standard class templates such as
+ <code>std::search</code>, and therefore one can only link code
+ compiled with parallel mode and code compiled without parallel mode
+ if no instantiation of a container is passed between the two
+ translation units. Parallel mode functionality has distinct linkage,
+ and cannot be confused with normal mode symbols.</para>
+</sect2>
+
+<sect2 id="manual.ext.parallel_mode.usings" xreflabel="using.specific">
+ <title>Using Specific Parallel Components</title>
+
+<para>When it is not feasible to recompile your entire application, or
+ only specific algorithms need to be parallel-aware, individual
+ parallel algorithms can be made available explicitly. These
+ parallel algorithms are functionally equivalent to the standard
+ drop-in algorithms used in parallel mode, but they are available in
+ a separate namespace as GNU extensions and may be used in programs
+ compiled with either release mode or with parallel mode. The
+ following table provides the names and headers of the parallel
+ algorithms:
+</para>
+
+<table frame='all'>
+<title>Parallel Algorithms</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>
+
+<thead>
+ <row>
+ <entry>Algorithm</entry>
+ <entry>Header</entry>
+ <entry>Parallel algorithm</entry>
+ <entry>Parallel header</entry>
+ </row>
+</thead>
+
+<tbody>
+ <row>
+ <entry><function>std::accumulate</function></entry>
+ <entry><filename class="headerfile">numeric</filename></entry>
+ <entry><function>__gnu_parallel::accumulate</function></entry>
+ <entry><filename class="headerfile">parallel/numeric</filename></entry>
+ </row>
+ <row>
+ <entry><function>std::adjacent_difference</function></entry>
+ <entry><filename class="headerfile">numeric</filename></entry>
+ <entry><function>__gnu_parallel::adjacent_difference</function></entry>
+ <entry><filename class="headerfile">parallel/numeric</filename></entry>
+ </row>
+ <row>
+ <entry><function>std::inner_product</function></entry>
+ <entry><filename class="headerfile">numeric</filename></entry>
+ <entry><function>__gnu_parallel::inner_product</function></entry>
+ <entry><filename class="headerfile">parallel/numeric</filename></entry>
+ </row>
+ <row>
+ <entry><function>std::partial_sum</function></entry>
+ <entry><filename class="headerfile">numeric</filename></entry>
+ <entry><function>__gnu_parallel::partial_sum</function></entry>
+ <entry><filename class="headerfile">parallel/numeric</filename></entry>
+ </row>
+ <row>
+ <entry><function>std::adjacent_find</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::adjacent_find</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::count</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::count</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::count_if</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::count_if</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::equal</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::equal</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::find</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::find</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::find_if</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::find_if</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::find_first_of</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::find_first_of</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::for_each</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::for_each</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::generate</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::generate</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::generate_n</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::generate_n</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::lexicographical_compare</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::lexicographical_compare</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::mismatch</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::mismatch</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::search</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::search</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::search_n</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::search_n</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::transform</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::transform</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::replace</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::replace</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::replace_if</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::replace_if</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::max_element</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::max_element</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::merge</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::merge</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::min_element</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::min_element</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::nth_element</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::nth_element</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::partial_sort</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::partial_sort</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::partition</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::partition</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::random_shuffle</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::random_shuffle</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::set_union</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::set_union</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::set_intersection</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::set_intersection</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::set_symmetric_difference</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::set_symmetric_difference</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::set_difference</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::set_difference</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::sort</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::sort</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::stable_sort</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::stable_sort</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+
+ <row>
+ <entry><function>std::unique_copy</function></entry>
+ <entry><filename class="headerfile">algorithm</filename></entry>
+ <entry><function>__gnu_parallel::unique_copy</function></entry>
+ <entry><filename class="headerfile">parallel/algorithm</filename></entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+
+</sect2>
+
+</sect1>
+
+<sect1 id="manual.ext.parallel_mode.design" xreflabel="Design">
+ <title>Design</title>
+ <para>
+ </para>
+<sect2 id="manual.ext.parallel_mode.design.intro" xreflabel="Intro">
+ <title>Interface Basics</title>
+
+
+<para>All parallel algorithms are intended to have signatures that are
+equivalent to the ISO C++ algorithms replaced. For instance, the
+<code>std::adjacent_find</code> function is declared as:
+</para>
+<programlisting>
+namespace std
+{
+ template&lt;typename _FIter&gt;
+ _FIter
+ adjacent_find(_FIter, _FIter);
+}
+</programlisting>
+
+<para>
+Which means that there should be something equivalent for the parallel
+version. Indeed, this is the case:
+</para>
+
+<programlisting>
+namespace std
+{
+ namespace __parallel
+ {
+ template&lt;typename _FIter&gt;
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ ...
+ }
+}
+</programlisting>
+
+<para>But.... why the elipses?
+</para>
+
+<para> The elipses in the example above represent additional overloads
+required for the parallel version of the function. These additional
+overloads are used to dispatch calls from the ISO C++ function
+signature to the appropriate parallel function (or sequential
+function, if no parallel functions are deemed worthy), based on either
+compile-time or run-time conditions.
+</para>
+
+<para> Compile-time conditions are referred to as "embarrassingly
+parallel," and are denoted with the appropriate dispatch object, ie
+one of <code>__gnu_parallel::sequential_tag</code>,
+<code>__gnu_parallel::parallel_tag</code>,
+<code>__gnu_parallel::balanced_tag</code>,
+<code>__gnu_parallel::unbalanced_tag</code>,
+<code>__gnu_parallel::omp_loop_tag</code>, or
+<code>__gnu_parallel::omp_loop_static_tag</code>.
+</para>
+
+<para> Run-time conditions depend on the hardware being used, the number
+of threads available, etc., and are denoted by the use of the enum
+<code>__gnu_parallel::parallelism</code>. Values of this enum include
+<code>__gnu_parallel::sequential</code>,
+<code>__gnu_parallel::parallel_unbalanced</code>,
+<code>__gnu_parallel::parallel_balanced</code>,
+<code>__gnu_parallel::parallel_omp_loop</code>,
+<code>__gnu_parallel::parallel_omp_loop_static</code>, or
+<code>__gnu_parallel::parallel_taskqueue</code>.
+</para>
+
+<para> Putting all this together, the general view of overloads for the
+parallel algorithms look like this:
+</para>
+<itemizedlist>
+ <listitem><para>ISO C++ signature</para></listitem>
+ <listitem><para>ISO C++ signature + sequential_tag argument</para></listitem>
+ <listitem><para>ISO C++ signature + parallelism argument</para></listitem>
+</itemizedlist>
+
+<para> Please note that the implementation may use additional functions
+(designated with the <code>_switch</code> suffix) to dispatch from the
+ISO C++ signature to the correct parallel version. Also, some of the
+algorithms do not have support for run-time conditions, so the last
+overload is therefore missing.
+</para>
+
+
+</sect2>
+
+<sect2 id="manual.ext.parallel_mode.design.tuning" xreflabel="Tuning">
+ <title>Configuration and Tuning</title>
+
+<para> Some algorithm variants can be enabled/disabled/selected at compile-time.
+See <ulink url="latest-doxygen/compiletime__settings_8h.html">
+<code>&lt;compiletime_settings.h&gt;</code></ulink> and
+See <ulink url="latest-doxygen/compiletime__settings_8h.html">
+<code>&lt;features.h&gt;</code></ulink> for details.
+</para>
+
+<para>
+To specify the number of threads to be used for an algorithm,
+use <code>omp_set_num_threads</code>.
+To force a function to execute sequentially,
+even though parallelism is switched on in general,
+add <code>__gnu_parallel::sequential_tag()</code>
+to the end of the argument list.
+</para>
+
+<para>
+Parallelism always incurs some overhead. Thus, it is not
+helpful to parallelize operations on very small sets of data.
+There are measures to avoid parallelizing stuff that is not worth it.
+For each algorithm, a minimum problem size can be stated,
+usually using the variable
+<code>__gnu_parallel::Settings::[algorithm]_minimal_n</code>.
+Please see <ulink url="latest-doxygen/settings_8h.html">
+<code>&lt;settings.h&gt;</code></ulink> for details.</para>
+
+
+</sect2>
+
+<sect2 id="manual.ext.parallel_mode.design.impl" xreflabel="Impl">
+ <title>Implementation Namespaces</title>
+
+<para> One namespace contain versions of code that are explicitly sequential:
+<code>__gnu_serial</code>.
+</para>
+
+<para> Two namespaces contain the parallel mode:
+<code>std::__parallel</code> and <code>__gnu_parallel</code>.
+</para>
+
+<para> Parallel implementations of standard components, including
+template helpers to select parallelism, are defined in <code>namespace
+std::__parallel</code>. For instance, <code>std::transform</code> from
+&lt;algorithm&gt; has a parallel counterpart in
+<code>std::__parallel::transform</code> from
+&lt;parallel/algorithm&gt;. In addition, these parallel
+implementations are injected into <code>namespace
+__gnu_parallel</code> with using declarations.
+</para>
+
+<para> Support and general infrastructure is in <code>namespace
+__gnu_parallel</code>.
+</para>
+
+<para> More information, and an organized index of types and functions
+related to the parallel mode on a per-namespace basis, can be found in
+the generated source documentation.
+</para>
+
+</sect2>
+
+</sect1>
+
+<sect1 id="manual.ext.parallel_mode.test" xreflabel="Testing">
+ <title>Testing</title>
+
+ <para>
+ Both the normal conformance and regression tests and the
+ supplemental performance tests work.
+ </para>
+
+ <para>
+ To run the conformance and regression tests with the parallel mode
+ active,
+ </para>
+
+ <screen>
+ <userinput>make check-parallel</userinput>
+ </screen>
+
+ <para>
+ The log and summary files for conformance testing are in the
+ <code>testsuite/parallel</code> directory.
+ </para>
+
+ <para>
+ To run the performance tests with the parallel mode active,
+ </para>
+
+ <screen>
+ <userinput>check-performance-parallel</userinput>
+ </screen>
+
+ <para>
+ The result file for performance testing are in the
+ <code>testsuite</code> directory, in the file
+ <code>libstdc++_performance.sum</code>. In addition, the
+ policy-based containers have their own visualizations, which have
+ additional software dependencies than the usual bare-boned text
+ file, and can be generated by using the <code>make
+ doc-performance</code> rule in the testsuite's Makefile.
+</para>
+</sect1>
+
+<bibliography id="parallel_mode.biblio" xreflabel="parallel_mode.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <title>
+ Parallelization of Bulk Operations for STL Dictionaries
+ </title>
+
+ <author>
+ <firstname>Johannes</firstname>
+ <surname>Singler</surname>
+ </author>
+ <author>
+ <firstname>Leonor</firstname>
+ <surname>Frias</surname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder></holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
+ </publishername>
+ </publisher>
+ </biblioentry>
+
+ <biblioentry>
+ <title>
+ The Multi-Core Standard Template Library
+ </title>
+
+ <author>
+ <firstname>Johannes</firstname>
+ <surname>Singler</surname>
+ </author>
+ <author>
+ <firstname>Peter</firstname>
+ <surname>Sanders</surname>
+ </author>
+ <author>
+ <firstname>Felix</firstname>
+ <surname>Putze</surname>
+ </author>
+
+ <copyright>
+ <year>2007</year>
+ <holder></holder>
+ </copyright>
+
+ <publisher>
+ <publishername>
+ Euro-Par 2007: Parallel Processing. (LNCS 4641)
+ </publishername>
+ </publisher>
+ </biblioentry>
+
+</bibliography>
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/manual/shared_ptr.xml b/libstdc++-v3/doc/xml/manual/shared_ptr.xml
new file mode 100644
index 00000000000..cd517f1250a
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/shared_ptr.xml
@@ -0,0 +1,580 @@
+<sect1 id="manual.util.memory.shared_ptr" xreflabel="shared_ptr">
+<?dbhtml filename="shared_ptr.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ shared_ptr
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>shared_ptr</title>
+
+<para>
+The shared_ptr class template stores a pointer, usually obtained via new,
+and implements shared ownership semantics.
+</para>
+
+<sect2 id="shared_ptr.req" xreflabel="shared_ptr.req">
+<title>Requirements</title>
+
+ <para>
+ </para>
+
+ <para>
+ The standard deliberately doesn't require a reference-counted
+ implementation, allowing other techniques such as a
+ circular-linked-list.
+ </para>
+
+ <para>
+ At the time of writing the C++0x working paper doesn't mention how
+ threads affect shared_ptr, but it is likely to follow the existing
+ practice set by <classname>boost::shared_ptr</classname>. The
+ shared_ptr in libstdc++ is derived from Boost's, so the same rules
+ apply.
+ </para>
+
+ <para>
+ </para>
+</sect2>
+
+<sect2 id="shared_ptr.design_issues" xreflabel="shared_ptr.design_issues">
+<title>Design Issues</title>
+
+
+ <para>
+The <classname>shared_ptr</classname> code is kindly donated to GCC by the Boost
+project and the original authors of the code. The basic design and
+algorithms are from Boost, the notes below describe details specific to
+the GCC implementation. Names have been uglified in this implementation,
+but the design should be recognisable to anyone familiar with the Boost
+1.32 shared_ptr.
+ </para>
+
+ <para>
+The basic design is an abstract base class, <code>_Sp_counted_base</code> that
+does the reference-counting and calls virtual functions when the count
+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.
+ </para>
+
+</sect2>
+
+<sect2 id="shared_ptr.impl" xreflabel="shared_ptr.impl">
+<title>Implementation</title>
+
+ <sect3>
+ <title>Class Hierarchy</title>
+
+ <para>
+A <classname>shared_ptr&lt;T&gt;</classname> contains a pointer of
+type <type>T*</type> and an object of type
+<classname>__shared_count</classname>. The shared_count contains a
+pointer of type <type>_Sp_counted_base*</type> which points to the
+object that maintains the reference-counts and destroys the managed
+resource.
+ </para>
+
+<variablelist>
+
+<varlistentry>
+ <term><classname>_Sp_counted_base&lt;Lp&gt;</classname></term>
+ <listitem>
+ <para>
+The base of the hierarchy is parameterized on the lock policy alone.
+_Sp_counted_base doesn't depend on the type of pointer being managed,
+it only maintains the reference counts and calls virtual functions when
+the counts drop to zero. The managed object is destroyed when the last
+strong reference is dropped, but the _Sp_counted_base itself must exist
+until the last weak reference is dropped.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><classname>_Sp_counted_base_impl&lt;Ptr, Deleter, Lp&gt;</classname></term>
+ <listitem>
+ <para>
+Inherits from _Sp_counted_base and stores a pointer of type <type>Ptr</type>
+and a deleter of type <code>Deleter</code>. <code>_Sp_deleter</code> is
+used when the user doesn't supply a custom deleter. Unlike Boost's, this
+default deleter is not "checked" because GCC already issues a warning if
+<function>delete</function> is used with an incomplete type.
+This is the only derived type used by <classname>shared_ptr&lt;Ptr&gt;</classname>
+and it is never used by <classname>shared_ptr</classname>, which uses one of
+the following types, depending on how the shared_ptr is constructed.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><classname>_Sp_counted_ptr&lt;Ptr, Lp&gt;</classname></term>
+ <listitem>
+ <para>
+Inherits from _Sp_counted_base and stores a pointer of type <type>Ptr</type>,
+which is passed to <function>delete</function> when the last reference is dropped.
+This is the simplest form and is used when there is no custom deleter or
+allocator.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><classname>_Sp_counted_deleter&lt;Ptr, Deleter, Alloc&gt;</classname></term>
+ <listitem>
+ <para>
+Inherits from _Sp_counted_ptr and adds support for custom deleter and
+allocator. Empty Base Optimization is used for the allocator. This class
+is used even when the user only provides a custom deleter, in which case
+<classname>allocator</classname> is used as the allocator.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><classname>_Sp_counted_ptr_inplace&lt;Tp, Alloc, Lp&gt;</classname></term>
+ <listitem>
+ <para>
+Used by <code>allocate_shared</code> and <code>make_shared</code>.
+Contains aligned storage to hold an object of type <type>Tp</type>,
+which is constructed in-place with placement <function>new</function>.
+Has a variadic template constructor allowing any number of arguments to
+be forwarded to <type>Tp</type>'s constructor.
+Unlike the other <classname>_Sp_counted_*</classname> 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.
+ </para>
+ </listitem>
+</varlistentry>
+
+</variablelist>
+
+ </sect3>
+
+ <sect3>
+ <title>Thread Safety</title>
+
+ <para>
+The interface of <classname>tr1::shared_ptr</classname> 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,
+boost_shared_ptr.h uses conditional compilation, based on the macros
+<constant>_GLIBCXX_INCLUDE_AS_CXX0X</constant> and
+<constant>_GLIBCXX_INCLUDE_AS_TR1</constant>, to enable and disable
+features.
+ </para>
+
+ <para>
+C++0x-only features are: rvalue-ref/move support, allocator support,
+aliasing constructor, make_shared &amp; allocate_shared. Additionally,
+the constructors taking <classname>auto_ptr</classname> parameters are
+deprecated in C++0x mode.
+ </para>
+
+<para>
+The
+<ulink url="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety">Thread
+Safety</ulink> section of the Boost shared_ptr documentation says "shared_ptr
+objects offer the same level of thread safety as built-in types."
+The implementation must ensure that concurrent updates to separate shared_ptr
+instances are correct even when those instances share a reference count e.g.
+</para>
+
+<programlisting>
+shared_ptr&lt;A&gt; a(new A);
+shared_ptr&lt;A&gt; b(a);
+
+// Thread 1 // Thread 2
+ a.reset(); b.reset();
+</programlisting>
+
+<para>
+The dynamically-allocated object must be destroyed by exactly one of the
+threads. Weak references make things even more interesting.
+The shared state used to implement shared_ptr must be transparent to the
+user and invariants must be preserved at all times.
+The key pieces of shared state are the strong and weak reference counts.
+Updates to these need to be atomic and visible to all threads to ensure
+correct cleanup of the managed resource (which is, after all, shared_ptr's
+job!)
+On multi-processor systems memory synchronisation may be needed so that
+reference-count updates and the destruction of the managed resource are
+race-free.
+</para>
+
+<para>
+The function <function>_Sp_counted_base::_M_add_ref_lock()</function>, called when
+obtaining a shared_ptr from a weak_ptr, has to test if the managed
+resource still exists and either increment the reference count or throw
+<classname>bad_weak_ptr</classname>.
+In a multi-threaded program there is a potential race condition if the last
+reference is dropped (and the managed resource destroyed) between testing
+the reference count and incrementing it, which could result in a shared_ptr
+pointing to invalid memory.
+</para>
+<para>
+The Boost shared_ptr (as used in GCC) features a clever lock-free
+algorithm to avoid the race condition, but this relies on the
+processor supporting an atomic <emphasis>Compare-And-Swap</emphasis>
+instruction. For other platforms there are fall-backs using mutex
+locks. Boost (as of version 1.35) includes several different
+implementations and the preprocessor selects one based on the
+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.
+</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Selecting Lock Policy</title>
+
+ <para>
+ </para>
+
+ <para>
+There is a single <classname>_Sp_counted_base</classname> class,
+which is a template parameterized on the enum
+<type>__gnu_cxx::_Lock_policy</type>. The entire family of classes is
+parameterized on the lock policy, right up to
+<classname>__shared_ptr</classname>, <classname>__weak_ptr</classname> and
+<classname>__enable_shared_from_this</classname>. The actual
+<classname>std::shared_ptr</classname> class inherits from
+<classname>__shared_ptr</classname> with the lock policy parameter
+selected automatically based on the thread model and platform that
+libstdc++ is configured for, so that the best available template
+specialization will be used. This design is necessary because it would
+not be conforming for <classname>shared_ptr</classname> to have an
+extra template parameter, even if it had a default value. The
+available policies are:
+ </para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ <type>_S_Atomic</type>
+ </para>
+ <para>
+Selected when GCC supports a builtin atomic compare-and-swap operation
+on the target processor (see <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html">Atomic
+Builtins</ulink>.) The reference counts are maintained using a lock-free
+algorithm and GCC's atomic builtins, which provide the required memory
+synchronisation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <type>_S_Mutex</type>
+ </para>
+ <para>
+The _Sp_counted_base specialization for this policy contains a mutex,
+which is locked in add_ref_lock(). This policy is used when GCC's atomic
+builtins aren't available so explicit memory barriers are needed in places.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <type>_S_Single</type>
+ </para>
+ <para>
+This policy uses a non-reentrant add_ref_lock() with no locking. It is
+used when libstdc++ is built without <literal>--enable-threads</literal>.
+ </para>
+ </listitem>
+
+ </orderedlist>
+ <para>
+ For all three policies, reference count increments and
+ decrements are done via the functions in
+ <filename>ext/atomicity.h</filename>, 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.
+ </para>
+ </sect3>
+
+ <sect3>
+ <title>Dual C++0x and TR1 Implementation</title>
+
+<para>
+The classes derived from <classname>_Sp_counted_base</classname> (see Class Hierarchy
+below) and <classname>__shared_count</classname> are implemented separately for C++0x
+and TR1, in <filename>bits/boost_sp_shared_count.h</filename> and
+<filename>tr1/boost_sp_shared_count.h</filename> respectively. All other classes
+including <classname>_Sp_counted_base</classname> are shared by both implementations.
+</para>
+
+<para>
+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.
+</para>
+</sect3>
+
+<sect3>
+<title>Related functions and classes</title>
+
+<variablelist>
+
+<varlistentry>
+ <term><code>dynamic_pointer_cast</code>, <code>static_pointer_cast</code>,
+<code>const_pointer_cast</code></term>
+ <listitem>
+ <para>
+As noted in N2351, these functions can be implemented non-intrusively using
+the alias constructor. However the aliasing constructor is only available
+in C++0x mode, so in TR1 mode these casts rely on three non-standard
+constructors in shared_ptr and __shared_ptr.
+In C++0x mode these constructors and the related tag types are not needed.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><code>enable_shared_from_this</code></term>
+ <listitem>
+ <para>
+The clever overload to detect a base class of type
+<code>enable_shared_from_this</code> comes straight from Boost.
+There is an extra overload for <code>__enable_shared_from_this</code> to
+work smoothly with <code>__shared_ptr&lt;Tp, Lp&gt;</code> using any lock
+policy.
+ </para>
+ </listitem>
+</varlistentry>
+
+<varlistentry>
+ <term><code>make_shared</code>, <code>allocate_shared</code></term>
+ <listitem>
+ <para>
+<code>make_shared</code> simply forwards to <code>allocate_shared</code>
+with <code>std::allocator</code> as the allocator.
+Although these functions can be implemented non-intrusively using the
+alias constructor, if they have access to the implementation then it is
+possible to save storage and reduce the number of heap allocations. The
+newly constructed object and the _Sp_counted_* can be allocated in a single
+block and the standard says implementations are "encouraged, but not required,"
+to do so. This implementation provides additional non-standard constructors
+(selected with the type <code>_Sp_make_shared_tag</code>) which create an
+object of type <code>_Sp_counted_ptr_inplace</code> to hold the new object.
+The returned <code>shared_ptr&lt;A&gt;</code> needs to know the address of the
+new <code>A</code> object embedded in the <code>_Sp_counted_ptr_inplace</code>,
+but it has no way to access it.
+This implementation uses a "covert channel" to return the address of the
+embedded object when <code>get_deleter&lt;_Sp_make_shared_tag&gt;()</code>
+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.
+ </para>
+ </listitem>
+</varlistentry>
+
+</variablelist>
+
+</sect3>
+
+</sect2>
+
+<!--- XXX
+ <listitem>
+ <type>_Sp_counted_base&lt;Lp&gt;</type>
+ <para>
+The base of the hierarchy is parameterized on the lock policy alone.
+_Sp_counted_base doesn't depend on the type of pointer being managed,
+it only maintains the reference counts and calls virtual functions when
+the counts drop to zero. The managed object is destroyed when the last
+strong reference is dropped, but the _Sp_counted_base itself must exist
+until the last weak reference is dropped.
+ </para>
+ </listitem>
+
+ <listitem>
+ <type>_Sp_counted_base_impl&lt;Ptr, Deleter, Lp&gt;</type>
+ <para>
+Inherits from _Sp_counted_base and stores a pointer of type <code>Ptr</code>
+and a deleter of type <code>Deleter</code>. <code>_Sp_deleter</code> is
+used when the user doesn't supply a custom deleter. Unlike Boost's, this
+default deleter is not "checked" because GCC already issues a warning if
+<code>delete</code> is used with an incomplete type.
+This is the only derived type used by <code>tr1::shared_ptr&lt;Ptr&gt;</code>
+and it is never used by <code>std::shared_ptr</code>, which uses one of
+the following types, depending on how the shared_ptr is constructed.
+ </para>
+ </listitem>
+-->
+
+<sect2 id="shared_ptr.using" xreflabel="shared_ptr.using">
+<title>Use</title>
+
+ <sect3>
+ <title>Examples</title>
+ <para>
+ Examples of use can be found in the testsuite, under
+ <filename class="directory">testsuite/tr1/2_general_utilities/shared_ptr</filename>.
+ </para>
+ </sect3>
+
+ <sect3>
+ <title>Unresolved Issues</title>
+ <para>
+ The resolution to C++ Standard Library issue <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</ulink>,
+ "shared_ptr interface changes for consistency with N1856" will
+ need to be implemented after it is accepted into the working
+ paper. Issue <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</ulink>
+ might also require changes.
+ </para>
+
+ <para>
+ The <type>_S_single</type> policy uses atomics when used in MT
+ code, because it uses the same dispatcher functions that check
+ <function>__gthread_active_p()</function>. This could be
+ addressed by providing template specialisations for some members
+ of <classname>_Sp_counted_base&lt;_S_single&gt;</classname>.
+ </para>
+
+ <para>
+ Unlike Boost, this implementation does not use separate classes
+ for the pointer+deleter and pointer+deleter+allocator cases in
+ C++0x mode, combining both into _Sp_counted_deleter and using
+ <classname>allocator</classname> when the user doesn't specify
+ an allocator. If it was found to be beneficial an additional
+ class could easily be added. With the current implementation,
+ the _Sp_counted_deleter and __shared_count constructors taking a
+ custom deleter but no allocator are technically redundant and
+ could be removed, changing callers to always specify an
+ allocator. If a separate pointer+deleter class was added the
+ __shared_count constructor would be needed, so it has been kept
+ for now.
+ </para>
+
+ <para>
+ The hack used to get the address of the managed object from
+ <function>_Sp_counted_ptr_inplace::_M_get_deleter()</function>
+ is accessible to users. This could be prevented if
+ <function>get_deleter&lt;_Sp_make_shared_tag&gt;()</function>
+ always returned NULL, since the hack only needs to work at a
+ lower level, not in the public API. This wouldn't be difficult,
+ but hasn't been done since there is no danger of accidental
+ misuse: users already know they are relying on unsupported
+ features if they refer to implementation details such as
+ _Sp_make_shared_tag.
+ </para>
+
+ <para>
+ tr1::_Sp_deleter could be a private member of tr1::__shared_count but it
+ would alter the ABI.
+ </para>
+
+ <para>
+ Exposing the alias constructor in TR1 mode could simplify the
+ *_pointer_cast functions. Constructor could be private in TR1
+ mode, with the cast functions as friends.
+ </para>
+ </sect3>
+
+</sect2>
+
+<sect2 id="shared_ptr.ack" xreflabel="shared_ptr.ack">
+<title>Acknowledgments</title>
+
+ <para>
+ The original authors of the Boost shared_ptr, which is really nice
+ 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.
+ </para>
+
+</sect2>
+
+<bibliography id="shared_ptr.biblio" xreflabel="shared_ptr.biblio">
+<title>Bibliography</title>
+
+ <biblioentry>
+ <abbrev>
+ n2351
+ </abbrev>
+
+ <title>
+ Improving shared_ptr for C++0x, Revision 2
+ </title>
+ <subtitle>
+ N2351
+ </subtitle>
+
+ <biblioid>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <abbrev>
+ n2456
+ </abbrev>
+
+ <title>
+ C++ Standard Library Active Issues List (Revision R52)
+ </title>
+ <subtitle>
+ N2456
+ </subtitle>
+
+ <biblioid>
+ <ulink url="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <abbrev>
+ n2461
+ </abbrev>
+
+ <title>
+ Working Draft, Standard for Programming Language C++
+ </title>
+ <subtitle>
+ N2461
+ </subtitle>
+
+ <biblioid>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf">
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+
+ <biblioentry>
+ <abbrev>
+ boostshared_ptr
+ </abbrev>
+
+ <title>
+ Boost C++ Libraries documentation - shared_ptr class template
+ </title>
+ <subtitle>
+ N2461
+ </subtitle>
+
+ <biblioid>
+ <ulink url="http://boost.org/libs/smart_ptr/shared_ptr.htm">shared_ptr
+ </ulink>
+ </biblioid>
+ </biblioentry>
+
+</bibliography>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/spine.xml b/libstdc++-v3/doc/xml/manual/spine.xml
new file mode 100644
index 00000000000..4c9c62842a1
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/spine.xml
@@ -0,0 +1,111 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<book id="manual-index" xreflabel="manual-index">
+<?dbhtml dir="manual"?>
+<?dbhtml filename="spine.html"?>
+<title>The GNU C++ Library</title>
+
+<bookinfo>
+ <copyright>
+ <year>2008</year>
+ <holder>
+ <ulink url="http://fsf.org">FSF</ulink>
+ </holder>
+ </copyright>
+ <legalnotice>
+ <para>
+ <ulink url="17_intro/license.html">License</ulink>
+ </para>
+ </legalnotice>
+</bookinfo>
+
+<!-- Part 01 : Intro -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="intro.xml">
+</xi:include>
+
+<!-- Part 02 : Support -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="support.xml">
+</xi:include>
+
+<!-- Part 03 : Diagnostics -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="diagnostics.xml">
+</xi:include>
+
+<!-- Part 04 : Utilities -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="utilities.xml">
+</xi:include>
+
+<!-- Part 05 : Strings -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="strings.xml">
+</xi:include>
+
+<!-- Part 06 : Localization -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="localization.xml">
+</xi:include>
+
+<!-- Part 07 : Containers -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="containers.xml">
+</xi:include>
+
+<!-- Part 08 : Iterators -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="iterators.xml">
+</xi:include>
+
+<!-- Part 09 : Algorithms -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="algorithms.xml">
+</xi:include>
+
+<!-- Part 10 : Numerics -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="numerics.xml">
+</xi:include>
+
+<!-- Part 11 : Input Output -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="io.xml">
+</xi:include>
+
+<!-- Part 12 : Extensions -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="extensions.xml">
+</xi:include>
+
+
+<!-- Appendix A -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="appendix_contributing.xml">
+</xi:include>
+
+<!-- Appendix B -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="appendix_porting.xml">
+</xi:include>
+
+<!-- Appendix C -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="appendix_free.xml">
+</xi:include>
+
+<!-- Appendix D -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="../gnu/gpl-2.0.xml">
+</xi:include>
+
+<!-- Appendix E -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="../gnu/fdl-1.2.xml">
+</xi:include>
+
+</book>
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx1998.xml b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml
new file mode 100644
index 00000000000..fc22af00d3b
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml
@@ -0,0 +1,6153 @@
+<sect2 id="manual.intro.status.standard.1998" xreflabel="Status C++ 1998">
+<?dbhtml filename="standard_cxx1998.html"?>
+
+<sect2info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ 1998
+ </keyword>
+ </keywordset>
+</sect2info>
+
+<title>C++ 1998</title>
+
+<sect3 id="standard.1998" xreflabel="Status C++ 1998">
+ <title>Checklist</title>
+
+<literallayout>
+ Completion Checklist for the Standard C++ Library
+ Updated: 2003-04-25
+
+ Status Code Legend:
+ M - Missing
+ S - Present as stub.
+ X - Partially implemented, or buggy.
+ T - Implemented, pending test/inspection.
+ V - Verified to pass all available test suites.
+ Q - Qualified by inspection for non-testable correctness.
+ P - Portability verified.
+ C - Certified.
+
+ Lexical notes:
+ Only status codes appear in column 0. Notes relating to conformance
+ issues appear [in brackets].
+
+ Note that this checklist does not (yet) include all emendations
+ recommended by the ISO Library Working Group:
+ http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
+
+ Detailed explanation of status codes:
+
+ M - Missing: The name is not visible to programs that include
+ the specified header, either at compile or link stage.
+
+ S - Present as stub: A program can use the name, but no implementation
+ is provided. Programs that use the name link correctly, but
+ cannot usefully be run.
+
+ X - Partially implemented, or buggy: Some implementation has been
+ provided, but it is known or believed not to conform fully.
+ It may have an incorrect base class, wrong namespace, wrong
+ storage class, or simply not fully implement requirements.
+ However, it may be sufficiently usable to help test other
+ components.
+
+ T - Implemented, pending test/inspection: Implementation believed
+ to be complete, and informal testing suggests it is ready for
+ formal verification.
+
+ V - Verified, passes all test suites: Verified to satisfy all
+ generically testable conformance requirements.
+
+ Q - Qualified by inspection for non-testable correctness:
+ Inspected, "implementation-defined" documentation accepted,
+ local usability criteria satisfied, formally inspected for
+ other untestable conformance. (Untestable requirements
+ include exception-safety, thread-safety, worst-case
+ complexity, memory cleanliness, usefulness.)
+
+ P - Portability verified: Qualified on all primary target platforms.
+
+ C - Certified: Formally certified to have passed all tests,
+ inspections, qualifications; approved under "signing authority"
+ to be used to satisfy contractual guarantees.
+
+ ----------------------------------------------------------------------
+ &lt;algorithm&gt; &lt;iomanip&gt; &lt;list&gt; &lt;ostream&gt; &lt;streambuf&gt;
+ &lt;bitset&gt; &lt;ios&gt; &lt;locale&gt; &lt;queue&gt; &lt;string&gt;
+ &lt;complex&gt; &lt;iosfwd&gt; &lt;map&gt; &lt;set&gt; &lt;typeinfo&gt;
+X &lt;deque&gt; &lt;iostream&gt; &lt;memory&gt; &lt;sstream&gt; &lt;utility&gt;
+ &lt;exception&gt; &lt;istream&gt; &lt;new&gt; &lt;stack&gt; &lt;valarray&gt;
+ &lt;fstream&gt; &lt;iterator&gt; &lt;numeric&gt; &lt;stdexcept&gt; &lt;vector&gt;
+ &lt;functional&gt; &lt;limits&gt;
+
+ [C header names must be in std:: to qualify. Related to shadow/ dir.]
+ &lt;cassert&gt; &lt;ciso646&gt; &lt;csetjmp&gt; &lt;cstdio&gt; &lt;ctime&gt;
+ &lt;cctype&gt; &lt;climits&gt; &lt;csignal&gt; &lt;cstdlib&gt; &lt;cwchar&gt;
+X &lt;cerrno&gt; &lt;clocale&gt; &lt;cstdarg&gt; &lt;cstring&gt; &lt;cwctype&gt;
+ &lt;cfloat&gt; &lt;cmath&gt; &lt;cstddef&gt;
+
+ Macro:
+X errno, declared or defined in &lt;cerrno&gt;.
+
+ Macro fn:
+X setjmp(jmp_buf), declared or defined in &lt;csetjmp&gt;
+X va_end(va_list), declared or defined in &lt;cstdarg&gt;
+
+ Types:
+X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
+X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list,
+X wctrans_t, wctype_t, and wint_t.
+
+ 1 Which of the functions in the C++ Standard Library are not reentrant
+ subroutines is implementation-defined.
+
+ 18.1 Types [lib.support.types]
+X &lt;cstddef&gt;
+X NULL
+X offsetof
+X ptrdiff_t
+X size_t
+
+ 18.2 Implementation properties [lib.support.limits]
+
+ &lt;limits&gt;, &lt;climits&gt;, and &lt;cfloat&gt;
+
+ 18.2.1 Numeric limits [lib.limits]
+
+X template&lt;class T&gt; class numeric_limits;
+
+T enum float_round_style;
+T enum float_denorm_style;
+
+T template&lt;&gt; class numeric_limits&lt;bool&gt;;
+
+T template&lt;&gt; class numeric_limits&lt;char&gt;;
+T template&lt;&gt; class numeric_limits&lt;signed char&gt;;
+T template&lt;&gt; class numeric_limits&lt;unsigned char&gt;;
+T template&lt;&gt; class numeric_limits&lt;wchar_t&gt;;
+
+T template&lt;&gt; class numeric_limits&lt;short&gt;;
+T template&lt;&gt; class numeric_limits&lt;int&gt;;
+T template&lt;&gt; class numeric_limits&lt;long&gt;;
+T template&lt;&gt; class numeric_limits&lt;unsigned short&gt;;
+T template&lt;&gt; class numeric_limits&lt;unsigned int&gt;;
+T template&lt;&gt; class numeric_limits&lt;unsigned long&gt;;
+
+X template&lt;&gt; class numeric_limits&lt;float&gt;;
+X template&lt;&gt; class numeric_limits&lt;double&gt;;
+X template&lt;&gt; class numeric_limits&lt;long double&gt;;
+
+ 18.2.1.1 Template class numeric_limits [lib.numeric.limits]
+T template&lt;class T&gt; class numeric_limits {
+ public:
+T static const bool is_specialized = false;
+T static T min() throw();
+T static T max() throw();
+T static const int digits = 0;
+T static const int digits10 = 0;
+T static const bool is_signed = false;
+T static const bool is_integer = false;
+T static const bool is_exact = false;
+T static const int radix = 0;
+T static T epsilon() throw();
+T static T round_error() throw();
+
+T static const int min_exponent = 0;
+T static const int min_exponent10 = 0;
+T static const int max_exponent = 0;
+T static const int max_exponent10 = 0;
+
+T static const bool has_infinity = false;
+T static const bool has_quiet_NaN = false;
+T static const bool has_signaling_NaN = false;
+T static const float_denorm_style has_denorm = denorm_absent;
+T static const bool has_denorm_loss = false;
+T static T infinity() throw();
+T static T quiet_NaN() throw();
+T static T signaling_NaN() throw();
+T static T denorm_min() throw();
+
+T static const bool is_iec559 = false;
+T static const bool is_bounded = false;
+T static const bool is_modulo = false;
+
+T static const bool traps = false;
+T static const bool tinyness_before = false;
+T static const float_round_style round_style = round_toward_zero;
+ };
+
+ 18.2.1.3 Type float_round_style [lib.round.style]
+
+T enum float_round_style {
+T round_indeterminate = -1,
+T round_toward_zero = 0,
+T round_to_nearest = 1,
+T round_toward_infinity = 2,
+T round_toward_neg_infinity = 3
+ };
+
+ 18.2.1.4 Type float_denorm_style [lib.denorm.style]
+
+T enum float_denorm_style {
+T denorm_indeterminate = -1;
+T denorm_absent = 0;
+T denorm present = 1;
+ };
+
+ 18.2.1.5 numeric_limits specializations [lib.numeric.special]
+
+ [Note: see Note at 18.2.1. ]
+
+ 18.2.2 C Library [lib.c.limits]
+
+ 1 Header &lt;climits&gt; (Table 3):
+ CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
+X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
+ CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
+
+ 3 Header &lt;cfloat&gt; (Table 4):
+
+ DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP
+ DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP
+ DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN
+X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
+ DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP
+ DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON
+ DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG
+ DBL_MIN_10_EXP FLT_MIN LDBL_MAX
+
+
+ 1 Header &lt;cstdlib&gt; (partial), Table 5:
+X EXIT_FAILURE EXIT_SUCCESS
+ abort atexit exit
+
+S abort(void)
+S extern "C" int atexit(void (*f)(void))
+S extern "C++" int atexit(void (*f)(void))
+S exit(int status)
+
+ 18.4 Dynamic memory management [lib.support.dynamic]
+
+ Header &lt;new&gt; synopsis
+
+T class bad_alloc;
+T struct nothrow_t {};
+T extern const nothrow_t nothrow;
+T typedef void (*new_handler)();
+T new_handler set_new_handler(new_handler new_p) throw();
+
+T void* operator new(std::size_t size) throw(std::bad_alloc);
+T void* operator new(std::size_t size, const std::nothrow_t&amp;) throw();
+T void operator delete(void* ptr) throw();
+T void operator delete(void* ptr, const std::nothrow_t&amp;) throw();
+T void* operator new[](std::size_t size) throw(std::bad_alloc);
+T void* operator new[](std::size_t size, const std::nothrow_t&amp;) throw();
+T void operator delete[](void* ptr) throw();
+T void operator delete[](void* ptr, const std::nothrow_t&amp;) throw();
+T void* operator new (std::size_t size, void* ptr) throw();
+T void* operator new[](std::size_t size, void* ptr) throw();
+T void operator delete (void* ptr, void*) throw();
+T void operator delete[](void* ptr, void*) throw();
+
+ 18.4.2.1 Class bad_alloc [lib.bad.alloc]
+
+T class bad_alloc : public exception {
+ public:
+T bad_alloc() throw();
+T bad_alloc(const bad_alloc&amp;) throw();
+T bad_alloc&amp; operator=(const bad_alloc&amp;) throw();
+T virtual ~bad_alloc() throw();
+T virtual const char* what() const throw();
+
+
+
+T new_handler set_new_handler(new_handler new_p) throw();
+
+
+ Header &lt;typeinfo&gt; synopsis
+
+T class type_info;
+T class bad_cast;
+T class bad_typeid;
+
+ 18.5.1 - Class type_info [lib.type.info]
+
+T class type_info {
+ public:
+T virtual ~type_info();
+T bool operator==(const type_info&amp; rhs) const;
+T bool operator!=(const type_info&amp; rhs) const;
+T bool before(const type_info&amp; rhs) const;
+T const char* name() const;
+ private:
+T type_info(const type_info&amp; rhs);
+T type_info&amp; operator=(const type_info&amp; rhs);
+ };
+
+ 18.5.2 - Class bad_cast [lib.bad.cast]
+
+T bad_cast() throw();
+T virtual const char* bad_cast::what() const throw();
+
+ 18.5.3 Class bad_typeid [lib.bad.typeid]
+
+T class bad_typeid : public exception {
+ public:
+T bad_typeid() throw();
+T bad_typeid(const bad_typeid&amp;) throw();
+T bad_typeid&amp; operator=(const bad_typeid&amp;) throw();
+T virtual ~bad_typeid() throw();
+T virtual const char* what() const throw();
+ };
+
+ 18.6 Exception handling [lib.support.exception]
+
+T Header &lt;exception&gt; synopsis
+
+T class exception;
+T class bad_exception;
+
+T typedef void (*unexpected_handler)();
+T unexpected_handler set_unexpected(unexpected_handler f) throw();
+T void unexpected();
+T typedef void (*terminate_handler)();
+T terminate_handler set_terminate(terminate_handler f) throw();
+T void terminate();
+T bool uncaught_exception();
+
+ 18.6.1 Class exception [lib.exception]
+
+T class exception {
+ public:
+T exception() throw();
+T exception(const exception&amp;) throw();
+T exception&amp; operator=(const exception&amp;) throw();
+T virtual ~exception() throw();
+T virtual const char* what() const throw();
+ };
+
+ 18.6.2.1 Class bad_exception [lib.bad.exception]
+T class bad_exception : public exception {
+ public:
+T bad_exception() throw();
+T bad_exception(const bad_exception&amp;) throw();
+T bad_exception&amp; operator=(const bad_exception&amp;) throw();
+T virtual ~bad_exception() throw();
+T virtual const char* what() const throw();
+ };
+
+ 18.7 Other runtime support [lib.support.runtime]
+
+ 1 Headers &lt;cstdarg&gt; (variable arguments), &lt;csetjmp&gt; (nonlocal jumps),
+ &lt;ctime&gt; (system clock clock(), time()), &lt;csignal&gt; (signal handling),
+ and &lt;cstdlib&gt; (runtime environment getenv(), system()).
+
+ Table 6--Header &lt;cstdarg&gt; synopsis
+ Macros: va_arg va_end va_start
+X Type: va_list
+
+ Table 7--Header &lt;csetjmp&gt; synopsis
+
+ Macro: setjmp |
+X Type: jmp_buf
+ Function: longjmp
+
+ Table 8--Header &lt;ctime&gt; synopsis
+
+ Macros: CLOCKS_PER_SEC
+X Types: clock_t
+ Functions: clock
+
+ Table 9--Header &lt;csignal&gt; synopsis
+
+X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
+ SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
+ Type: sig_atomic_t
+ Functions: raise signal
+
+ Table 10--Header &lt;cstdlib&gt; synopsis
+
+X Functions: getenv system
+
+ 19.1 Exception classes [lib.std.exceptions]
+
+ Header &lt;stdexcept&gt; synopsis
+
+T class logic_error;
+T class domain_error;
+T class invalid_argument;
+T class length_error;
+T class out_of_range;
+T class runtime_error;
+T class range_error;
+T class overflow_error;
+T class underflow_error;
+
+ 19.1.1 Class logic_error [lib.logic.error]
+T class logic_error : public exception {
+ public:
+T explicit logic_error(const string&amp; what_arg);
+ };
+
+ 19.1.2 Class domain_error [lib.domain.error]
+
+T class domain_error : public logic_error {
+ public:
+T explicit domain_error(const string&amp; what_arg);
+ };
+
+ 19.1.3 Class invalid_argument [lib.invalid.argument]
+
+T class invalid_argument : public logic_error {
+ public:
+T explicit invalid_argument(const string&amp; what_arg);
+ };
+
+ 19.1.4 Class length_error [lib.length.error]
+
+T class length_error : public logic_error {
+ public:
+T explicit length_error(const string&amp; what_arg);
+ };
+
+ 19.1.5 Class out_of_range [lib.out.of.range]
+
+T class out_of_range : public logic_error {
+ public:
+T explicit out_of_range(const string&amp; what_arg);
+ };
+
+
+ 19.1.6 Class runtime_error [lib.runtime.error]
+
+T class runtime_error : public exception {
+ public:
+T explicit runtime_error(const string&amp; what_arg);
+ };
+
+
+ 19.1.7 Class range_error [lib.range.error]
+
+T class range_error : public runtime_error {
+ public:
+T explicit range_error(const string&amp; what_arg);
+ };
+
+ 19.1.8 Class overflow_error [lib.overflow.error]
+
+T class overflow_error : public runtime_error {
+ public:
+T explicit overflow_error(const string&amp; what_arg);
+ };
+
+
+ 19.1.9 Class underflow_error [lib.underflow.error]
+
+T class underflow_error : public runtime_error {
+ public:
+T explicit underflow_error(const string&amp; what_arg);
+ };
+
+
+ 19.2 Assertions [lib.assertions]
+
+ Table 2--Header &lt;cassert&gt; synopsis
+
+X Macro: assert
+
+ 19.3 Error numbers [lib.errno]
+
+ Table 3--Header &lt;cerrno&gt; synopsis
+
+X |Macros: EDOM ERANGE errno |
+
+
+ 20.2 Utility components [lib.utility]
+
+ Header &lt;utility&gt; synopsis
+
+ // _lib.operators_, operators:
+T namespace rel_ops {
+T template&lt;class T&gt; bool operator!=(const T&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator&gt; (const T&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator&lt;=(const T&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator&gt;=(const T&amp;, const T&amp;);
+ }
+ // _lib.pairs_, pairs:
+T template &lt;class T1, class T2&gt; struct pair;
+T template &lt;class T1, class T2&gt;
+ bool operator==(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt;
+ bool operator&lt; (const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt;
+ bool operator!=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt;
+ bool operator&gt; (const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt;
+ bool operator&gt;=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt;
+ bool operator&lt;=(const pair&lt;T1,T2&gt;&amp;, const pair&lt;T1,T2&gt;&amp;);
+T template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(const T1&amp;, const T2&amp;);
+
+
+ 20.2.2 Pairs [lib.pairs]
+
+T template &lt;class T1, class T2&gt;
+ struct pair {
+T typedef T1 first_type;
+T typedef T2 second_type;
+
+T T1 first;
+T T2 second;
+T pair();
+T pair(const T1&amp; x, const T2&amp; y);
+T template&lt;class U, class V&gt; pair(const pair&lt;U, V&gt; &amp;p);
+ };
+
+ 20.3 Function objects [lib.function.objects]
+
+ Header &lt;functional&gt; synopsis
+
+ // _lib.base_, base:
+V template &lt;class Arg, class Result&gt; struct unary_function;
+V template &lt;class Arg1, class Arg2, class Result&gt; struct binary_function;
+
+ // _lib.arithmetic.operations_, arithmetic operations:
+V template &lt;class T&gt; struct plus;
+V template &lt;class T&gt; struct minus;
+V template &lt;class T&gt; struct multiplies;
+V template &lt;class T&gt; struct divides;
+V template &lt;class T&gt; struct modulus;
+V template &lt;class T&gt; struct negate;
+ // _lib.comparisons_, comparisons:
+V template &lt;class T&gt; struct equal_to;
+V template &lt;class T&gt; struct not_equal_to;
+V template &lt;class T&gt; struct greater;
+V template &lt;class T&gt; struct less;
+V template &lt;class T&gt; struct greater_equal;
+V template &lt;class T&gt; struct less_equal;
+ // _lib.logical.operations_, logical operations:
+V template &lt;class T&gt; struct logical_and;
+V template &lt;class T&gt; struct logical_or;
+V template &lt;class T&gt; struct logical_not;
+ // _lib.negators_, negators:
+ template &lt;class Predicate&gt; struct unary_negate;
+V template &lt;class Predicate&gt;
+ unary_negate&lt;Predicate&gt; not1(const Predicate&amp;);
+V template &lt;class Predicate&gt; struct binary_negate;
+V template &lt;class Predicate&gt;
+ binary_negate&lt;Predicate&gt; not2(const Predicate&amp;);
+ // _lib.binders_, binders:
+V template &lt;class Operation&gt; class binder1st;
+V template &lt;class Operation, class T&gt;
+ binder1st&lt;Operation&gt; bind1st(const Operation&amp;, const T&amp;);
+V template &lt;class Operation&gt; class binder2nd;
+V template &lt;class Operation, class T&gt;
+ binder2nd&lt;Operation&gt; bind2nd(const Operation&amp;, const T&amp;);
+ // _lib.function.pointer.adaptors_, adaptors:
+V template &lt;class Arg, class Result&gt; class pointer_to_unary_function;
+V template &lt;class Arg, class Result&gt;
+ pointer_to_unary_function&lt;Arg,Result&gt; ptr_fun(Result (*)(Arg));
+V template &lt;class Arg1, class Arg2, class Result&gt;
+ class pointer_to_binary_function;
+V template &lt;class Arg1, class Arg2, class Result&gt;
+ pointer_to_binary_function&lt;Arg1,Arg2,Result&gt;
+ ptr_fun(Result (*)(Arg1,Arg2));
+
+ // _lib.member.pointer.adaptors_, adaptors:
+V template&lt;class S, class T&gt; class mem_fun_t;
+V template&lt;class S, class T, class A&gt; class mem_fun1_t;
+V template&lt;class S, class T&gt;
+ mem_fun_t&lt;S,T&gt; mem_fun(S (T::*f)());
+V template&lt;class S, class T, class A&gt;
+ mem_fun1_t&lt;S,T,A&gt; mem_fun(S (T::*f)(A));
+V template&lt;class S, class T&gt; class mem_fun_ref_t;
+V template&lt;class S, class T, class A&gt; class mem_fun1_ref_t;
+V template&lt;class S, class T&gt;
+ mem_fun_ref_t&lt;S,T&gt; mem_fun_ref(S (T::*f)());
+V template&lt;class S, class T, class A&gt;
+ mem_fun1_ref_t&lt;S,T,A&gt; mem_fun_ref(S (T::*f)(A));
+
+V template &lt;class S, class T&gt; class const_mem_fun_t;
+V template &lt;class S, class T, class A&gt; class const_mem_fun1_t;
+V template &lt;class S, class T&gt;
+ const_mem_fun_t&lt;S,T&gt; mem_fun(S (T::*f)() const);
+V template &lt;class S, class T, class A&gt;
+ const_mem_fun1_t&lt;S,T,A&gt; mem_fun(S (T::*f)(A) const);
+V template &lt;class S, class T&gt; class const_mem_fun_ref_t;
+V template &lt;class S, class T, class A&gt; class const_mem_fun1_ref_t;
+V template &lt;class S, class T&gt;
+ const_mem_fun_ref_t&lt;S,T&gt; mem_fun_ref(S (T::*f)() const);
+V template &lt;class S, class T, class A&gt;
+ const_mem_fun1_ref_t&lt;S,T,A&gt; mem_fun_ref(S (T::*f)(A) const);
+ }
+
+ 20.3.1 Base [lib.base]
+
+V template &lt;class Arg, class Result&gt;
+ struct unary_function {
+V typedef Arg argument_type;
+V typedef Result result_type;
+ };
+V template &lt;class Arg1, class Arg2, class Result&gt;
+ struct binary_function {
+V typedef Arg1 first_argument_type;
+V typedef Arg2 second_argument_type;
+V typedef Result result_type;
+ };
+
+ 20.3.2 Arithmetic operations [lib.arithmetic.operations]
+
+T template &lt;class T&gt; struct plus : binary_function&lt;T,T,T&gt; {
+V T operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct minus : binary_function&lt;T,T,T&gt; {
+V T operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct multiplies : binary_function&lt;T,T,T&gt; {
+V T operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct divides : binary_function&lt;T,T,T&gt; {
+V T operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct modulus : binary_function&lt;T,T,T&gt; {
+V T operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct negate : unary_function&lt;T,T&gt; {
+V T operator()(const T&amp; x) const;
+ };
+
+ 20.3.3 Comparisons [lib.comparisons]
+
+T template &lt;class T&gt; struct equal_to : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct not_equal_to : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct greater : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct less : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct greater_equal : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct less_equal : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+ 20.3.4 Logical operations [lib.logical.operations]
+
+T template &lt;class T&gt; struct logical_and : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct logical_or : binary_function&lt;T,T,bool&gt; {
+V bool operator()(const T&amp; x, const T&amp; y) const;
+ };
+
+T template &lt;class T&gt; struct logical_not : unary_function&lt;T,bool&gt; {
+V bool operator()(const T&amp; x) const;
+ };
+
+ 20.3.5 Negators [lib.negators]
+
+T template &lt;class Predicate&gt;
+ class unary_negate
+ : public unary_function&lt;typename Predicate::argument_type,bool&gt; {
+ public:
+T explicit unary_negate(const Predicate&amp; pred);
+V bool operator()(const typename Predicate::argument_type&amp; x) const;
+ };
+
+T template &lt;class Predicate&gt;
+ class binary_negate
+ : public binary_function&lt;typename Predicate::first_argument_type,
+ typename Predicate::second_argument_type, bool&gt; {
+ public:
+T explicit binary_negate(const Predicate&amp; pred);
+V bool operator()(const typename Predicate::first_argument_type&amp; x,
+ const typename Predicate::second_argument_type&amp; y) const;
+ };
+
+
+ 20.3.6 Binders [lib.binders]
+
+ 20.3.6.1 Template class binder1st [lib.binder.1st]
+T template &lt;class Operation&gt;
+ class binder1st
+ : public unary_function&lt;typename Operation::second_argument_type,
+ typename Operation::result_type&gt; {
+ protected:
+T Operation op;
+T typename Operation::first_argument_type value;
+ public:
+V binder1st(const Operation&amp; x,
+ const typename Operation::first_argument_type&amp; y);
+V typename Operation::result_type
+ operator()(const typename Operation::second_argument_type&amp; x) const;
+ };
+
+ 20.3.6.2 bind1st [lib.bind.1st]
+
+V template &lt;class Operation, class T&gt;
+ binder1st&lt;Operation&gt; bind1st(const Operation&amp; op, const T&amp; x);
+
+ 20.3.6.3 Template class binder2nd [lib.binder.2nd]
+T template &lt;class Operation&gt;
+ class binder2nd
+ : public unary_function&lt;typename Operation::first_argument_type,
+ typename Operation::result_type&gt; {
+ protected:
+T Operation op;
+T typename Operation::second_argument_type value;
+ public:
+V binder2nd(const Operation&amp; x,
+ const typename Operation::second_argument_type&amp; y);
+V typename Operation::result_type
+ operator()(const typename Operation::first_argument_type&amp; x) const;
+ };
+
+ 20.3.6.4 bind2nd [lib.bind.2nd]
+
+T template &lt;class Operation, class T&gt;
+ binder2nd&lt;Operation&gt; bind2nd(const Operation&amp; op, const T&amp; x);
+
+
+ 20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors]
+ functions
+
+ 1 To allow pointers to (unary and binary) functions to work with func-
+ tion adaptors the library provides:
+
+T template &lt;class Arg, class Result&gt;
+ class pointer_to_unary_function : public unary_function&lt;Arg, Result&gt; {
+ public:
+T explicit pointer_to_unary_function(Result (*f)(Arg));
+V Result operator()(Arg x) const;
+ };
+
+T template &lt;class Arg, class Result&gt;
+ pointer_to_unary_function&lt;Arg, Result&gt; ptr_fun(Result (*f)(Arg));
+
+T template &lt;class Arg1, class Arg2, class Result&gt;
+ class pointer_to_binary_function :
+ public binary_function&lt;Arg1,Arg2,Result&gt; {
+ public:
+T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
+V Result operator()(Arg1 x, Arg2 y) const;
+ };
+
+
+ 20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors]
+ members
+
+T template &lt;class S, class T&gt; class mem_fun_t
+ : public unary_function&lt;T*, S&gt; {
+ public:
+T explicit mem_fun_t(S (T::*p)());
+V S operator()(T* p) const;
+ };
+
+T template &lt;class S, class T, class A&gt; class mem_fun1_t
+ : public binary_function&lt;T*, A, S&gt; {
+ public:
+T explicit mem_fun1_t(S (T::*p)(A));
+V S operator()(T* p, A x) const;
+ };
+
+V template&lt;class S, class T&gt; mem_fun_t&lt;S,T&gt;
+ mem_fun(S (T::*f)());
+V template&lt;class S, class T, class A&gt; mem_fun1_t&lt;S,T,A&gt;
+ mem_fun(S (T::*f)(A));
+
+T template &lt;class S, class T&gt; class mem_fun_ref_t
+ : public unary_function&lt;T, S&gt; {
+ public:
+T explicit mem_fun_ref_t(S (T::*p)());
+V S operator()(T&amp; p) const;
+ };
+
+T template &lt;class S, class T, class A&gt; class mem_fun1_ref_t
+ : public binary_function&lt;T, A, S&gt; {
+ public:
+T explicit mem_fun1_ref_t(S (T::*p)(A));
+V S operator()(T&amp; p, A x) const;
+ };
+
+T template&lt;class S, class T&gt; mem_fun_ref_t&lt;S,T&gt;
+ mem_fun_ref(S (T::*f)());
+
+T template&lt;class S, class T, class A&gt; mem_fun1_ref_t&lt;S,T,A&gt;
+ mem_fun_ref(S (T::*f)(A));
+
+T template &lt;class S, class T&gt; class const_mem_fun_t
+ : public unary_function&lt;T*, S&gt; {
+ public:
+T explicit const_mem_fun_t(S (T::*p)() const);
+V S operator()(const T* p) const;
+ };
+
+T template &lt;class S, class T, class A&gt; class const_mem_fun1_t
+ : public binary_function&lt;T*, A, S&gt; {
+ public:
+T explicit const mem_fun1_t(S (T::*p)(A) const);
+V S operator()(const T* p, A x) const;
+ };
+
+V template&lt;class S, class T&gt; const_mem_fun_t&lt;S,T&gt;
+ mem_fun(S (T::*f)() const);
+V template&lt;class S, class T, class A&gt; const_mem_fun1_t&lt;S,T,A&gt;
+ mem_fun(S (T::*f)(A) const);
+
+T template &lt;class S, class T&gt; class const_mem_fun_ref_t
+ : public unary_function&lt;T, S&gt; {
+ public:
+T explicit const_mem_fun_ref_t(S (T::*p)() const);
+V S operator()(const T&amp; p) const;
+ };
+
+T template &lt;class S, class T, class A&gt; class const_mem_fun1_ref_t
+ : public binary_function&lt;T, A, S&gt; {
+ public:
+T explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
+V S operator()(const T&amp; p, A x) const;
+ };
+
+T template&lt;class S, class T&gt; const_mem_fun_ref_t&lt;S,T&gt;
+ mem_fun_ref(S (T::*f)() const);
+
+T template&lt;class S, class T, class A&gt; const_mem_fun1_ref_t&lt;S,T,A&gt;
+ mem_fun_ref(S (T::*f)(A) const);
+
+ 20.4 Memory [lib.memory]
+
+ Header &lt;memory&gt; synopsis
+
+ // _lib.default.allocator_, the default allocator:
+T template &lt;class T&gt; class allocator;
+T template &lt;&gt; class allocator&lt;void&gt;;
+T template &lt;class T, class U&gt;
+ bool operator==(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) throw();
+T template &lt;class T, class U&gt;
+ bool operator!=(const allocator&lt;T&gt;&amp;, const allocator&lt;U&gt;&amp;) throw();
+ // _lib.storage.iterator_, raw storage iterator:
+T template &lt;class OutputIterator, class T&gt; class raw_storage_iterator;
+ // _lib.temporary.buffer_, temporary buffers:
+T template &lt;class T&gt;
+ pair&lt;T*,ptrdiff_t&gt; get_temporary_buffer(ptrdiff_t n);
+T template &lt;class T&gt;
+ void return_temporary_buffer(T* p);
+ // _lib.specialized.algorithms_, specialized algorithms:
+T template &lt;class InputIterator, class ForwardIterator&gt;
+ ForwardIterator
+ uninitialized_copy(InputIterator first, InputIterator last,
+ ForwardIterator result);
+T template &lt;class ForwardIterator, class T&gt;
+ void uninitialized_fill(ForwardIterator first, ForwardIterator last,
+ const T&amp; x);
+T template &lt;class ForwardIterator, class Size, class T&gt;
+ void uninitialized_fill_n(ForwardIterator first, Size n, const T&amp; x);
+ // _lib.auto.ptr_, pointers:
+X template&lt;class X&gt; class auto_ptr;
+ }
+
+ 20.4.1 The default allocator [lib.default.allocator]
+
+T template &lt;class T&gt; class allocator;
+ // specialize for void:
+T template &lt;&gt; class allocator&lt;void&gt; {
+ public:
+T typedef void* pointer;
+T typedef const void* const_pointer;
+ // reference-to-void members are impossible.
+T typedef void value_type;
+T template &lt;class U&gt; struct rebind { typedef allocator&lt;U&gt; other; };
+ };
+
+T template &lt;class T&gt; class allocator {
+ public:
+T typedef size_t size_type;
+T typedef ptrdiff_t difference_type;
+T typedef T* pointer;
+T typedef const T* const_pointer;
+T typedef T&amp; reference;
+T typedef const T&amp; const_reference;
+T typedef T value_type;
+T template &lt;class U&gt; struct rebind { typedef allocator&lt;U&gt; other; };
+T allocator() throw();
+T allocator(const allocator&amp;) throw();
+T template &lt;class U&gt; allocator(const allocator&lt;U&gt;&amp;) throw();
+T ~allocator() throw();
+T pointer address(reference x) const;
+T const_pointer address(const_reference x) const;
+T pointer allocate(
+ size_type, allocator&lt;void&gt;::const_pointer hint = 0);
+T void deallocate(pointer p, size_type n);
+T size_type max_size() const throw();
+T void construct(pointer p, const T&amp; val);
+T void destroy(pointer p);
+ };
+
+ 20.4.1.2 allocator globals [lib.allocator.globals]
+
+T template &lt;class T1, class T2&gt;
+ bool operator==(const allocator&lt;T1&gt;&amp;, const allocator&lt;T2&gt;&amp;) throw();
+T template &lt;class T1, class T2&gt;
+ bool operator!=(const allocator&lt;T1&gt;&amp;, const allocator&lt;T2&gt;&amp;) throw();
+
+ 20.4.2 Raw storage iterator [lib.storage.iterator]
+
+T template &lt;class OutputIterator, class T&gt;
+ class raw_storage_iterator
+ : public iterator&lt;output_iterator_tag,void,void,void,void&gt; {
+ public:
+T explicit raw_storage_iterator(OutputIterator x);
+T raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator*();
+T raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator=(const T&amp; element);
+T raw_storage_iterator&lt;OutputIterator,T&gt;&amp; operator++();
+T raw_storage_iterator&lt;OutputIterator,T&gt; operator++(int);
+ };
+
+ 20.4.3 Temporary buffers [lib.temporary.buffer]
+
+T template &lt;class T&gt;
+ pair&lt;T*, ptrdiff_t&gt; get_temporary_buffer(ptrdiff_t n);
+
+T template &lt;class T&gt; void return_temporary_buffer(T* p);
+
+ 20.4.4 Specialized algorithms [lib.specialized.algorithms]
+
+ 20.4.4.1 uninitialized_copy [lib.uninitialized.copy]
+
+V template &lt;class InputIterator, class ForwardIterator&gt;
+ ForwardIterator
+ uninitialized_copy(InputIterator first, InputIterator last,
+ ForwardIterator result);
+
+ 20.4.4.2 uninitialized_fill [lib.uninitialized.fill]
+
+V template &lt;class ForwardIterator, class T&gt;
+ void uninitialized_fill(ForwardIterator first, ForwardIterator last,
+ const T&amp; x);
+
+ 20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n]
+
+V template &lt;class ForwardIterator, class Size, class T&gt;
+ void uninitialized_fill_n(ForwardIterator first, Size n, const T&amp; x);
+
+ 20.4.5 Template class auto_ptr [lib.auto.ptr]
+
+X template&lt;class X&gt; class auto_ptr {
+ template &lt;class Y&gt; struct auto_ptr_ref {};
+ public:
+T typedef X element_type;
+ // _lib.auto.ptr.cons_ construct/copy/destroy:
+T explicit auto_ptr(X* p =0) throw();
+T auto_ptr(auto_ptr&amp;) throw();
+T template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt;&amp;) throw();
+T auto_ptr&amp; operator=(auto_ptr&amp;) throw();
+T template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt;&amp;) throw();
+T ~auto_ptr() throw();
+ // _lib.auto.ptr.members_ members:
+T X&amp; operator*() const throw();
+T X* operator-&gt;() const throw();
+T X* get() const throw();
+T X* release() throw();
+T void reset(X* p =0) throw();
+
+ // _lib.auto.ptr.conv_ conversions:
+X auto_ptr(auto_ptr_ref&lt;X&gt;) throw();
+X template&lt;class Y&gt; operator auto_ptr_ref&lt;Y&gt;() throw();
+X template&lt;class Y&gt; operator auto_ptr&lt;Y&gt;() throw();
+ };
+
+ 20.4.6 C Library [lib.c.malloc]
+
+ Table 7--Header &lt;cstdlib&gt; synopsis
+
+X Functions: calloc malloc
+ free realloc
+
+
+ Table 8--Header &lt;cstring&gt; synopsis
+
+X Macro: NULL
+X Type: size_t
+X Functions: memchr memcmp
+X memcpy memmove memset
+
+ Table 9--Header &lt;ctime&gt; synopsis
+
+X Macros: NULL
+X Types: size_t clock_t time_t
+X Struct: tm
+ Functions:
+X asctime clock difftime localtime strftime
+X ctime gmtime mktime time
+
+ 21.1.1 Character traits requirements [lib.char.traits.require]
+
+ 2 The struct template
+T template&lt;class charT&gt; struct char_traits;
+ shall be provided in the header &lt;string&gt; as a basis for explicit spe-
+ cializations.
+
+
+ 21.1.3.1 struct [lib.char.traits.specializations.char]
+ char_traits&lt;char&gt;
+
+T template&lt;&gt;
+ struct char_traits&lt;char&gt; {
+T typedef char char_type;
+T typedef int int_type;
+T typedef streamoff off_type;
+T typedef streampos pos_type;
+T typedef mbstate_t state_type;
+
+T static void assign(char_type&amp; c1, const char_type&amp; c2);
+T static bool eq(const char_type&amp; c1, const char_type&amp; c2);
+T static bool lt(const char_type&amp; c1, const char_type&amp; c2);
+
+T static int compare(const char_type* s1, const char_type* s2, size_t n);
+T static size_t length(const char_type* s);
+T static const char_type* find(const char_type* s, size_t n,
+ const char_type&amp; a);
+T static char_type* move(char_type* s1, const char_type* s2, size_t n);
+T static char_type* copy(char_type* s1, const char_type* s2, size_t n);
+T static char_type* assign(char_type* s, size_t n, char_type a);
+
+T static int_type not_eof(const int_type&amp; c);
+T static char_type to_char_type(const int_type&amp; c);
+T static int_type to_int_type(const char_type&amp; c);
+T static bool eq_int_type(const int_type&amp; c1, const int_type&amp; c2);
+T static int_type eof();
+ };
+
+ 21.1.3.2 struct [lib.char.traits.specializations.wchar.t]
+ char_traits&lt;wchar_t&gt;
+
+V template&lt;&gt;
+ struct char_traits&lt;wchar_t&gt; {
+V typedef wchar_t char_type;
+V typedef wint_t int_type;
+V typedef streamoff off_type;
+V typedef wstreampos pos_type;
+V typedef mbstate_t state_type;
+
+V static void assign(char_type&amp; c1, const char_type&amp; c2);
+V static bool eq(const char_type&amp; c1, const char_type&amp; c2);
+V static bool lt(const char_type&amp; c1, const char_type&amp; c2);
+
+V static int compare(const char_type* s1, const char_type* s2, size_t n);
+V static size_t length(const char_type* s);
+V static const char_type* find(const char_type* s, size_t n,
+ const char_type&amp; a);
+V static char_type* move(char_type* s1, const char_type* s2, size_t n);
+V static char_type* copy(char_type* s1, const char_type* s2, size_t n);
+V static char_type* assign(char_type* s, size_t n, char_type a);
+
+V static int_type not_eof(const int_type&amp; c);
+V static char_type to_char_type(const int_type&amp; c);
+V static int_type to_int_type(const char_type&amp; c);
+V static bool eq_int_type(const int_type&amp; c1, const int_type&amp; c2);
+V static int_type eof();
+ };
+
+ 21.2 String classes [lib.string.classes]
+
+ // _lib.char.traits_, character traits:
+V template&lt;class charT&gt;
+ struct char_traits;
+V template &lt;&gt; struct char_traits&lt;char&gt;;
+V template &lt;&gt; struct char_traits&lt;wchar_t&gt;;
+
+ // _lib.basic.string_, basic_string:
+V template&lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_string;
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt;
+ operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt;
+ operator+(const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt;
+ operator+(charT lhs, const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt;
+ operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT,traits,Allocator&gt;
+ operator+(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs, charT rhs);
+
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator==(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator==(const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator==(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator!=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator!=(const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator!=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt; (const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt; (const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt; (const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&lt;=(const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt;=(const basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ const charT* rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ bool operator&gt;=(const charT* lhs,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+
+ // _lib.string.special_:
+V template&lt;class charT, class traits, class Allocator&gt;
+ void swap(basic_string&lt;charT,traits,Allocator&gt;&amp; lhs,
+ basic_string&lt;charT,traits,Allocator&gt;&amp; rhs);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_istream&lt;charT,traits&gt;&amp;
+ operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp; is,
+ basic_string&lt;charT,traits,Allocator&gt;&amp; str);
+T template&lt;class charT, class traits, class Allocator&gt;
+ basic_ostream&lt;charT, traits&gt;&amp;
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os,
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_istream&lt;charT,traits&gt;&amp;
+ getline(basic_istream&lt;charT,traits&gt;&amp; is,
+ basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ charT delim);
+V template&lt;class charT, class traits, class Allocator&gt;
+ basic_istream&lt;charT,traits&gt;&amp;
+ getline(basic_istream&lt;charT,traits&gt;&amp; is,
+ basic_string&lt;charT,traits,Allocator&gt;&amp; str);
+V typedef basic_string&lt;char&gt; string;
+T typedef basic_string&lt;wchar_t&gt; wstring;
+ }
+
+ 21.3 Template class basic_string [lib.basic.string]
+
+V namespace std {
+ template&lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_string {
+ public:
+ // types:
+ typedef traits traits_type;
+ typedef typename traits::char_type value_type;
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef typename Allocator::reference reference;
+ typedef typename Allocator::const_reference const_reference;
+ typedef typename Allocator::pointer pointer;
+ typedef typename Allocator::const_pointer const_pointer;
+ typedef implementation defined iterator;
+ typedef implementation defined const_iterator;
+ typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+ typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+ static const size_type npos = -1;
+
+ // _lib.string.cons_ construct/copy/destroy:
+V explicit basic_string(const Allocator&amp; a = Allocator());
+V basic_string(const basic_string&amp; str, size_type pos = 0,
+ size_type n = npos, const Allocator&amp; a = Allocator());
+V basic_string(const charT* s,
+ size_type n, const Allocator&amp; a = Allocator());
+V basic_string(const charT* s, const Allocator&amp; a = Allocator());
+V basic_string(size_type n, charT c, const Allocator&amp; a = Allocator());
+V template&lt;class InputIterator&gt;
+ basic_string(InputIterator begin, InputIterator end,
+ const Allocator&amp; a = Allocator());
+V ~basic_string();
+V basic_string&amp; operator=(const basic_string&amp; str);
+V basic_string&amp; operator=(const charT* s);
+V basic_string&amp; operator=(charT c);
+ // _lib.string.iterators_ iterators:
+V iterator begin();
+V const_iterator begin() const;
+V iterator end();
+V const_iterator end() const;
+
+V reverse_iterator rbegin();
+V const_reverse_iterator rbegin() const;
+V reverse_iterator rend();
+V const_reverse_iterator rend() const;
+ // _lib.string.capacity_ capacity:
+V size_type size() const;
+V size_type length() const;
+V size_type max_size() const;
+V void resize(size_type n, charT c);
+V void resize(size_type n);
+V size_type capacity() const;
+V void reserve(size_type res_arg = 0);
+V void clear();
+V bool empty() const;
+ // _lib.string.access_ element access:
+V const_reference operator[](size_type pos) const;
+V reference operator[](size_type pos);
+V const_reference at(size_type n) const;
+V reference at(size_type n);
+ // _lib.string.modifiers_ modifiers:
+V basic_string&amp; operator+=(const basic_string&amp; str);
+V basic_string&amp; operator+=(const charT* s);
+V basic_string&amp; operator+=(charT c);
+V basic_string&amp; append(const basic_string&amp; str);
+V basic_string&amp; append(const basic_string&amp; str, size_type pos,
+ size_type n);
+V basic_string&amp; append(const charT* s, size_type n);
+V basic_string&amp; append(const charT* s);
+V basic_string&amp; append(size_type n, charT c);
+V template&lt;class InputIterator&gt;
+ basic_string&amp; append(InputIterator first, InputIterator last);
+V void push_back(const charT);
+
+V basic_string&amp; assign(const basic_string&amp;);
+V basic_string&amp; assign(const basic_string&amp; str, size_type pos,
+ size_type n);
+V basic_string&amp; assign(const charT* s, size_type n);
+V basic_string&amp; assign(const charT* s);
+V basic_string&amp; assign(size_type n, charT c);
+V template&lt;class InputIterator&gt;
+ basic_string&amp; assign(InputIterator first, InputIterator last);
+V basic_string&amp; insert(size_type pos1, const basic_string&amp; str);
+V basic_string&amp; insert(size_type pos1, const basic_string&amp; str,
+ size_type pos2, size_type n);
+V basic_string&amp; insert(size_type pos, const charT* s, size_type n);
+V basic_string&amp; insert(size_type pos, const charT* s);
+V basic_string&amp; insert(size_type pos, size_type n, charT c);
+V iterator insert(iterator p, charT c);
+V void insert(iterator p, size_type n, charT c);
+V template&lt;class InputIterator&gt;
+ void insert(iterator p, InputIterator first, InputIterator last);
+V basic_string&amp; erase(size_type pos = 0, size_type n = npos);
+V iterator erase(iterator position);
+V iterator erase(iterator first, iterator last);
+V basic_string&amp; replace(size_type pos1, size_type n1,
+ const basic_string&amp; str);
+V basic_string&amp; replace(size_type pos1, size_type n1,
+ const basic_string&amp; str,
+ size_type pos2, size_type n2);
+V basic_string&amp; replace(size_type pos, size_type n1, const charT* s,
+ size_type n2);
+V basic_string&amp; replace(size_type pos, size_type n1, const charT* s);
+V basic_string&amp; replace(size_type pos, size_type n1, size_type n2,
+ charT c);
+V basic_string&amp; replace(iterator i1, iterator i2, const basic_string&amp; str);
+V basic_string&amp; replace(iterator i1, iterator i2, const charT* s,
+ size_type n);
+V basic_string&amp; replace(iterator i1, iterator i2, const charT* s);
+V basic_string&amp; replace(iterator i1, iterator i2,
+ size_type n, charT c);
+V template&lt;class InputIterator&gt;
+ basic_string&amp; replace(iterator i1, iterator i2,
+ InputIterator j1, InputIterator j2);
+V size_type copy(charT* s, size_type n, size_type pos = 0) const;
+V void swap(basic_string&lt;charT,traits,Allocator&gt;&amp;);
+ // _lib.string.ops_ string operations:
+V const charT* c_str() const; // explicit
+V const charT* data() const;
+V allocator_type get_allocator() const;
+V size_type find (const basic_string&amp; str, size_type pos = 0) const;
+V size_type find (const charT* s, size_type pos, size_type n) const;
+V size_type find (const charT* s, size_type pos = 0) const;
+V size_type find (charT c, size_type pos = 0) const;
+V size_type rfind(const basic_string&amp; str, size_type pos = npos) const;
+V size_type rfind(const charT* s, size_type pos, size_type n) const;
+V size_type rfind(const charT* s, size_type pos = npos) const;
+V size_type rfind(charT c, size_type pos = npos) const;
+
+V size_type find_first_of(const basic_string&amp; str,
+ size_type pos = 0) const;
+V size_type find_first_of(const charT* s,
+ size_type pos, size_type n) const;
+V size_type find_first_of(const charT* s, size_type pos = 0) const;
+V size_type find_first_of(charT c, size_type pos = 0) const;
+V size_type find_last_of (const basic_string&amp; str,
+ size_type pos = npos) const;
+V size_type find_last_of (const charT* s,
+ size_type pos, size_type n) const;
+V size_type find_last_of (const charT* s, size_type pos = npos) const;
+V size_type find_last_of (charT c, size_type pos = npos) const;
+V size_type find_first_not_of(const basic_string&amp; str,
+ size_type pos = 0) const;
+V size_type find_first_not_of(const charT* s, size_type pos,
+ size_type n) const;
+V size_type find_first_not_of(const charT* s, size_type pos = 0) const;
+V size_type find_first_not_of(charT c, size_type pos = 0) const;
+V size_type find_last_not_of (const basic_string&amp; str,
+ size_type pos = npos) const;
+V size_type find_last_not_of (const charT* s, size_type pos,
+ size_type n) const;
+V size_type find_last_not_of (const charT* s,
+ size_type pos = npos) const;
+V size_type find_last_not_of (charT c, size_type pos = npos) const;
+V basic_string substr(size_type pos = 0, size_type n = npos) const;
+V int compare(const basic_string&amp; str) const;
+V int compare(size_type pos1, size_type n1,
+ const basic_string&amp; str) const;
+V int compare(size_type pos1, size_type n1,
+ const basic_string&amp; str,
+ size_type pos2, size_type n2) const;
+V int compare(const charT* s) const;
+V int compare(size_type pos1, size_type n1,
+ const charT* s, size_type n2 = npos) const;
+ };
+ }
+
+ 21.4 Null-terminated sequence utilities [lib.c.strings]
+
+ Table 10--Header &lt;cctype&gt; synopsis
+
+ isalnum isdigit isprint isupper tolower
+X isalpha isgraph ispunct isxdigit toupper
+ iscntrl islower isspace
+
+ Table 11--Header &lt;cwctype&gt; synopsis
+
+X Macro: WEOF &lt;cwctype&gt;
+X Types: wctrans_t wctype_t wint_t &lt;cwctype&gt;
+ Functions:
+X iswalnum iswctype iswlower iswspace towctrans wctrans
+X iswalpha iswdigit iswprint iswupper towlower wctype
+X iswcntrl iswgraph iswpunct iswxdigit towupper
+
+ Table 12--Header &lt;cstring&gt; synopsis
+
+X Macro: NULL &lt;cstring&gt;
+X Type: size_t &lt;cstring&gt;
+ Functions:
+X memchr strcat strcspn strncpy strtok
+X memcmp strchr strerror strpbrk strxfrm
+X memcpy strcmp strlen strrchr
+X memmove strcoll strncat strspn
+X memset strcpy strncmp strstr
+
+ Table 13--Header &lt;cwchar&gt; synopsis
+ Macros: NULL &lt;cwchar&gt; WCHAR_MAX WCHAR_MIN WEOF &lt;cwchar&gt;
+ Types: mbstate_t wint_t &lt;cwchar&gt; size_t
+ Functions:
+X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr
+X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp
+X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy
+X fputwc mbsinit vwprintf wcslen wcstod wmemmove
+X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset
+X fwide putwc wcscat wcsncmp wcstol wprintf
+X fwprintf putwchar wcschr wcsncpy wcstoul wscanf
+X fwscanf swprintf wcscmp wcspbrk wcsxfrm
+X getwc swscanf wcscoll wcsrchr wctob
+
+ Table 14--Header &lt;cstdlib&gt; synopsis
+
+ Macros: MB_CUR_MAX
+ Functions:
+X atol mblen strtod wctomb
+X atof mbstowcs strtol wcstombs
+X atoi mbtowc strtoul
+
+X const char* strchr(const char* s, int c);
+X char* strchr( char* s, int c);
+
+X const char* strpbrk(const char* s1, const char* s2);
+X char* strpbrk( char* s1, const char* s2);
+
+X const char* strrchr(const char* s, int c);
+X char* strrchr( char* s, int c);
+
+X const char* strstr(const char* s1, const char* s2);
+X char* strstr( char* s1, const char* s2);
+
+X const void* memchr(const void* s, int c, size_t n);
+X void* memchr( void* s, int c, size_t n);
+
+X const wchar_t* wcschr(const wchar_t* s, wchar_t c);
+X wchar_t* wcschr( wchar_t* s, wchar_t c);
+
+X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
+X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
+
+X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
+X wchar_t* wcsrchr( wchar_t* s, wchar_t c);
+
+X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
+X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
+
+X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
+X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
+
+ [for initial efforts on the above, see shadow/string.h]
+
+ 22.1 Locales [lib.locales]
+
+ Header &lt;locale&gt; synopsis
+
+ // _lib.locale_, locale:
+T class locale;
+T template &lt;class Facet&gt; const Facet&amp; use_facet(const locale&amp;);
+T template &lt;class Facet&gt; bool has_facet(const locale&amp;) throw();
+
+ // _lib.locale.convenience_, convenience interfaces:
+T template &lt;class charT&gt; bool isspace (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isprint (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool iscntrl (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isupper (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool islower (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isalpha (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isdigit (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool ispunct (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isxdigit(charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isalnum (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; bool isgraph (charT c, const locale&amp; loc);
+T template &lt;class charT&gt; charT toupper(charT c, const locale&amp; loc);
+T template &lt;class charT&gt; charT tolower(charT c, const locale&amp; loc);
+ // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
+ class ctype_base;
+T template &lt;class charT&gt; class ctype;
+T template &lt;&gt; class ctype&lt;char&gt;; // specialization
+S template &lt;class charT&gt; class ctype_byname;
+S template &lt;&gt; class ctype_byname&lt;char&gt;; // specialization
+T class codecvt_base;
+X template &lt;class internT, class externT, class stateT&gt; class codecvt;
+S template &lt;class internT, class externT, class stateT&gt; class codecvt_byname;
+ // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
+X template &lt;class charT, class InputIterator&gt; class num_get;
+X template &lt;class charT, class OutputIterator&gt; class num_put;
+T template &lt;class charT&gt; class numpunct;
+S template &lt;class charT&gt; class numpunct_byname;
+ // _lib.category.collate_, collation:
+T template &lt;class charT&gt; class collate;
+S template &lt;class charT&gt; class collate_byname;
+ // _lib.category.time_, date and time:
+T class time_base;
+S template &lt;class charT, class InputIterator&gt; class time_get;
+S template &lt;class charT, class InputIterator&gt; class time_get_byname;
+S template &lt;class charT, class OutputIterator&gt; class time_put;
+S template &lt;class charT, class OutputIterator&gt; class time_put_byname;
+ // _lib.category.monetary_, money:
+T class money_base;
+S template &lt;class charT, class InputIterator&gt; class money_get;
+S template &lt;class charT, class OutputIterator&gt; class money_put;
+S template &lt;class charT, bool Intl&gt; class moneypunct;
+S template &lt;class charT, bool Intl&gt; class moneypunct_byname;
+ // _lib.category.messages_, message retrieval:
+T class messages_base;
+S template &lt;class charT&gt; class messages;
+S template &lt;class charT&gt; class messages_byname;
+
+
+ 22.1.1 Class locale [lib.locale]
+
+X class locale {
+ public:
+ // types:
+T class facet;
+T class id;
+T typedef int category;
+T static const category // values assigned here are for exposition only
+T none = 0,
+T collate = 0x010, ctype = 0x020,
+T monetary = 0x040, numeric = 0x080,
+T time = 0x100, messages = 0x200,
+T all = collate | ctype | monetary | numeric | time | messages;
+ // construct/copy/destroy:
+T locale() throw()
+T locale(const locale&amp; other) throw()
+X explicit locale(const char* std_name);
+X locale(const locale&amp; other, const char* std_name, category);
+T template &lt;class Facet&gt; locale(const locale&amp; other, Facet* f);
+T locale(const locale&amp; other, const locale&amp; one, category);
+T ~locale() throw(); // non-virtual
+T const locale&amp; operator=(const locale&amp; other) throw();
+T template &lt;class Facet&gt; locale combine(const locale&amp; other) const;
+ // locale operations:
+X basic_string&lt;char&gt; name() const;
+T bool operator==(const locale&amp; other) const;
+T bool operator!=(const locale&amp; other) const;
+T template &lt;class charT, class Traits, class Allocator&gt;
+ bool operator()(const basic_string&lt;charT,Traits,Allocator&gt;&amp; s1,
+ const basic_string&lt;charT,Traits,Allocator&gt;&amp; s2) const;
+ // global locale objects:
+T static locale global(const locale&amp;);
+T static const locale&amp; classic();
+ };
+
+ 22.1.1.1 locale types [lib.locale.types]
+
+ 22.1.1.1.1 Type locale::category [lib.locale.category]
+
+T typedef int category;
+
+T none, collate, ctype, monetary, numeric, time, and messages
+
+ [required locale members]
+T collate&lt;char&gt;, collate&lt;wchar_t&gt;
+T ctype&lt;char&gt;, ctype&lt;wchar_t&gt;
+T codecvt&lt;char,char,mbstate_t&gt;,
+S codecvt&lt;wchar_t,char,mbstate_t&gt;
+T moneypunct&lt;char&gt;, moneypunct&lt;wchar_t&gt;
+T moneypunct&lt;char,true&gt;, moneypunct&lt;wchar_t,true&gt;,
+S money_get&lt;char&gt;, money_get&lt;wchar_t
+S money_put&lt;char&gt;, money_put&lt;wchar_t&gt;
+T numpunct&lt;char&gt;, numpunct&lt;wchar_t&gt;,
+X num_get&lt;char&gt;, num_get&lt;wchar_t&gt;
+X num_put&lt;char&gt;, num_put&lt;wchar_t&gt;
+S time_get&lt;char&gt;, time_get&lt;wchar_t&gt;,
+S time_put&lt;char&gt;, time_put&lt;wchar_t&gt;
+S messages&lt;char&gt;, messages&lt;wchar_t&gt;
+
+ [required instantiations]
+S collate_byname&lt;char&gt;, collate_byname&lt;wchar_t&gt;
+S ctype_byname&lt;char&gt;, ctype_byname&lt;wchar_t&gt;
+S codecvt_byname&lt;char,char,mbstate_t&gt;,
+S codecvt_byname&lt;wchar_t,char,mbstate_t&gt;
+S moneypunct_byname&lt;char,International&gt;,
+S moneypunct_byname&lt;wchar_t,International&gt;,
+S money_get&lt;C,InputIterator&gt;,
+S money_put&lt;C,OutputIterator&gt;
+S numpunct_byname&lt;char&gt;, numpunct_byname&lt;wchar_t&gt;
+X num_get&lt;C,InputIterator&gt;, num_put&lt;C,OutputIterator&gt;
+S time_get&lt;char,InputIterator&gt;,
+S time_get_byname&lt;char,InputIterator&gt;,
+S time_get&lt;wchar_t,OutputIterator&gt;,
+S time_get_byname&lt;wchar_t,OutputIterator&gt;,
+S time_put&lt;char,OutputIterator&gt;,
+S time_put_byname&lt;char,OutputIterator&gt;,
+S time_put&lt;wchar_t,OutputIterator&gt;
+S time_put_byname&lt;wchar_t,OutputIterator&gt;
+S messages_byname&lt;char&gt;, messages_byname&lt;wchar_t&gt;
+
+
+ 22.1.1.1.2 Class locale::facet [lib.locale.facet]
+
+T class locale::facet {
+ protected:
+T explicit facet(size_t refs = 0);
+T virtual ~facet();
+ private:
+T facet(const facet&amp;); // not defined
+T void operator=(const facet&amp;); // not defined
+ };
+ }
+
+
+ 22.1.1.1.3 Class locale::id [lib.locale.id]
+
+T class locale::id {
+ public:
+T id();
+ private:
+T void operator=(const id&amp;); // not defined
+T id(const id&amp;); // not defined
+ };
+ }
+
+
+ 22.2.1 The ctype category [lib.category.ctype]
+
+T class ctype_base {
+ public:
+T enum mask { // numeric values are for exposition only.
+T space=, print=, cntrl=, upper=, lower=,
+T alpha=, digit=, punct=, xdigit=,
+T alnum=, graph=
+ };
+ };
+
+
+ 22.2.1.1 Template class ctype [lib.locale.ctype]
+
+T template &lt;class charT&gt;
+ class ctype : public locale::facet, public ctype_base {
+ public:
+T typedef charT char_type;
+T explicit ctype(size_t refs = 0);
+T bool is(mask m, charT c) const;
+T const charT* is(const charT* low, const charT* high, mask* vec) const;
+T const charT* scan_is(mask m,
+ const charT* low, const charT* high) const;
+T const charT* scan_not(mask m,
+ const charT* low, const charT* high) const;
+T charT toupper(charT c) const;
+T const charT* toupper(charT* low, const charT* high) const;
+T charT tolower(charT c) const;
+T const charT* tolower(charT* low, const charT* high) const;
+T charT widen(char c) const;
+T const char* widen(const char* low, const char* high, charT* to) const;
+T char narrow(charT c, char dfault) const;
+T const charT* narrow(const charT* low, const charT*, char dfault,
+ char* to) const;
+T static locale::id id;
+
+ protected:
+T ~ctype(); // virtual
+T virtual bool do_is(mask m, charT c) const;
+T virtual const charT* do_is(const charT* low, const charT* high,
+ mask* vec) const;
+T virtual const charT* do_scan_is(mask m,
+ const charT* low, const charT* high) const;
+T virtual const charT* do_scan_not(mask m,
+ const charT* low, const charT* high) const;
+T virtual charT do_toupper(charT) const;
+T virtual const charT* do_toupper(charT* low, const charT* high) const;
+T virtual charT do_tolower(charT) const;
+T virtual const charT* do_tolower(charT* low, const charT* high) const;
+T virtual charT do_widen(char) const;
+T virtual const char* do_widen(const char* low, const char* high,
+ charT* dest) const;
+T virtual char do_narrow(charT, char dfault) const;
+T virtual const charT* do_narrow(const charT* low, const charT* high,
+ char dfault, char* dest) const;
+ };
+
+
+ 22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname]
+
+X template &lt;class charT&gt;
+ class ctype_byname : public ctype&lt;charT&gt; {
+ public:
+T typedef ctype&lt;charT&gt;::mask mask;
+S explicit ctype_byname(const char*, size_t refs = 0);
+ protected:
+S ~ctype_byname(); // virtual
+S virtual bool do_is(mask m, charT c) const;
+S virtual const charT* do_is(const charT* low, const charT* high,
+ mask* vec) const;
+S virtual const char* do_scan_is(mask m,
+ const charT* low, const charT* high) const;
+S virtual const char* do_scan_not(mask m,
+ const charT* low, const charT* high) const;
+S virtual charT do_toupper(charT) const;
+S virtual const charT* do_toupper(charT* low, const charT* high) const;
+S virtual charT do_tolower(charT) const;
+S virtual const charT* do_tolower(charT* low, const charT* high) const;
+S virtual charT do_widen(char) const;
+S virtual const char* do_widen(const char* low, const char* high,
+ charT* dest) const;
+S virtual char do_narrow(charT, char dfault) const;
+S virtual const charT* do_narrow(const charT* low, const charT* high,
+ char dfault, char* dest) const;
+ };
+
+ 22.2.1.3 ctype specializations [lib.facet.ctype.special]
+
+T template &lt;&gt; class ctype&lt;char&gt;
+ : public locale::facet, public ctype_base {
+ public:
+T typedef char char_type;
+T explicit ctype(const mask* tab = 0, bool del = false,
+ size_t refs = 0);
+T bool is(mask m, char c) const;
+T const char* is(const char* low, const char* high, mask* vec) const;
+T const char* scan_is (mask m,
+ const char* low, const char* high) const;
+T const char* scan_not(mask m,
+ const char* low, const char* high) const;
+T char toupper(char c) const;
+T const char* toupper(char* low, const char* high) const;
+T char tolower(char c) const;
+T const char* tolower(char* low, const char* high) const;
+T char widen(char c) const;
+T const char* widen(const char* low, const char* high, char* to) const;
+T char narrow(char c, char dfault) const;
+T const char* narrow(const char* low, const char* high, char dfault,
+ char* to) const;
+T static locale::id id;
+T static const size_t table_size = IMPLEMENTATION_DEFINED;
+
+ protected:
+T const mask* table() const throw();
+T static const mask* classic_table() throw();
+T ~ctype(); // virtual
+T virtual char do_toupper(char c) const;
+T virtual const char* do_toupper(char* low, const char* high) const;
+T virtual char do_tolower(char c) const;
+T virtual const char* do_tolower(char* low, const char* high) const;
+
+T virtual char do_widen(char c) const;
+T virtual const char* do_widen(const char* low,
+ const char* high,
+ char* to) const;
+T virtual char do_narrow(char c, char dfault) const;
+T virtual const char* do_narrow(const char* low,
+ const char* high,
+ char dfault, char* to) const;
+ };
+
+
+ 22.2.1.4 Class [lib.locale.ctype.byname.special]
+ ctype_byname&lt;char&gt;
+
+X template &lt;&gt; class ctype_byname&lt;char&gt; : public ctype&lt;char&gt; {
+ public:
+S explicit ctype_byname(const char*, size_t refs = 0);
+ protected:
+S ~ctype_byname(); // virtual
+S virtual char do_toupper(char c) const;
+S virtual const char* do_toupper(char* low, const char* high) const;
+S virtual char do_tolower(char c) const;
+S virtual const char* do_tolower(char* low, const char* high) const;
+
+S virtual char do_widen(char c) const;
+S virtual const char* do_widen(char* low,
+ const char* high,
+ char* to) const;
+S virtual char do_widen(char c) const;
+S virtual const char* do_widen(char* low, const char* high) const;
+
+ };
+
+
+
+ 22.2.1.5 Template class codecvt [lib.locale.codecvt]
+
+T class codecvt_base {
+ public:
+T enum result { ok, partial, error, noconv };
+ };
+
+T template &lt;class internT, class externT, class stateT&gt;
+ class codecvt : public locale::facet, public codecvt_base {
+ public:
+T typedef internT intern_type;
+T typedef externT extern_type;
+T typedef stateT state_type;
+T explicit codecvt(size_t refs = 0)
+T result out(stateT&amp; state,
+ const internT* from, const internT* from_end, const internT*&amp; from_next,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+T result unshift(stateT&amp; state,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+T result in(stateT&amp; state,
+ const externT* from, const externT* from_end, const externT*&amp; from_next,
+ internT* to, internT* to_limit, internT*&amp; to_next) const;
+T int encoding() const throw();
+T bool always_noconv() const throw();
+T int length(const stateT&amp;, const externT* from, const externT* end,
+ size_t max) const;
+T int max_length() const throw();
+T static locale::id id;
+
+ protected:
+T ~codecvt(); // virtual
+T virtual result do_out(stateT&amp; state,
+ const internT* from, const internT* from_end, const internT*&amp; from_next,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+T virtual result do_in(stateT&amp; state,
+T const externT* from, const externT* from_end, const externT*&amp; from_next,
+ internT* to, internT* to_limit, internT*&amp; to_next) const;
+T virtual result do_unshift(stateT&amp; state,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+T virtual int do_encoding() const throw();
+T virtual bool do_always_noconv() const throw();
+T virtual int do_length(const stateT&amp;, const externT* from,
+ const externT* end, size_t max) const;
+T virtual int do_max_length() const throw();
+ };
+ }
+
+
+ 22.2.1.6 Template class [lib.locale.codecvt.byname]
+ codecvt_byname
+
+X template &lt;class internT, class externT, class stateT&gt;
+ class codecvt_byname : public codecvt&lt;internT, externT, stateT&gt; {
+ public:
+S explicit codecvt_byname(const char*, size_t refs = 0);
+ protected:
+S ~codecvt_byname(); // virtual
+S virtual result do_out(stateT&amp; state,
+ const internT* from, const internT* from_end, const internT*&amp; from_next,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+S virtual result do_in(stateT&amp; state,
+ const externT* from, const externT* from_end, const externT*&amp; from_next,
+ internT* to, internT* to_limit, internT*&amp; to_next) const;
+S virtual result do_unshift(stateT&amp; state,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+S virtual int do_encoding() const throw();
+S virtual bool do_always_noconv() const throw();
+S virtual int do_length(const stateT&amp;, const externT* from,
+ const externT* end, size_t max) const;
+S virtual result do_unshift(stateT&amp; state,
+ externT* to, externT* to_limit, externT*&amp; to_next) const;
+S virtual int do_max_length() const throw();
+ };
+
+
+ 22.2.2.1 Template class num_get [lib.locale.num.get]
+
+X template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
+ class num_get : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef InputIterator iter_type;
+T explicit num_get(size_t refs = 0);
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, bool&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp; ,
+ ios_base::iostate&amp; err, long&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned short&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned int&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned long&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, float&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, double&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, long double&amp; v) const;
+T iter_type get(iter_type in, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, void*&amp; v) const;
+T static locale::id id;
+
+ protected:
+T ~num_get(); // virtual
+T virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, bool&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, long&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned short&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned int&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, unsigned long&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, float&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, double&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, long double&amp; v) const;
+S virtual iter_type do_get(iter_type, iter_type, ios_base&amp;,
+ ios_base::iostate&amp; err, void*&amp; v) const;
+ };
+
+
+
+ 22.2.2.2 Template class num_put [lib.locale.nm.put]
+
+X template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
+ class num_put : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef OutputIterator iter_type;
+T explicit num_put(size_t refs = 0);
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill, bool v) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill, long v) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill,
+ unsigned long v) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill,
+ double v) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill,
+ long double v) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill,
+ const void* v) const;
+T static locale::id id;
+ protected:
+T ~num_put(); // virtual
+T virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ bool v) const;
+T virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ long v) const;
+T virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ unsigned long) const;
+S virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ double v) const;
+S virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ long double v) const;
+T virtual iter_type do_put(iter_type, ios_base&amp;, char_type fill,
+ const void* v) const;
+ };
+ }
+
+ 22.2.3.1 Template class numpunct [lib.locale.numpunct]
+
+T template &lt;class charT&gt;
+ class numpunct : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit numpunct(size_t refs = 0);
+T char_type decimal_point() const;
+T char_type thousands_sep() const;
+T string grouping() const;
+T string_type truename() const;
+T string_type falsename() const;
+T static locale::id id;
+ protected:
+T ~numpunct(); // virtual
+T virtual char_type do_decimal_point() const;
+T virtual char_type do_thousands_sep() const;
+T virtual string do_grouping() const;
+T virtual string_type do_truename() const; // for bool
+T virtual string_type do_falsename() const; // for bool
+ };
+ }
+
+
+
+ 22.2.3.2 Template class [lib.locale.numpunct.byname]
+ numpunct_byname
+
+X template &lt;class charT&gt;
+ class numpunct_byname : public numpunct&lt;charT&gt; {
+ // this class is specialized for char and wchar_t.
+ public:
+T typedef charT char_type;
+T typedef basic_string&lt;charT&gt; string_type;
+S explicit numpunct_byname(const char*, size_t refs = 0);
+ protected:
+S ~numpunct_byname(); // virtual
+S virtual char_type do_decimal_point() const;
+S virtual char_type do_thousands_sep() const;
+S virtual string do_grouping() const;
+S virtual string_type do_truename() const; // for bool
+S virtual string_type do_falsename() const; // for bool
+ };
+
+
+ 22.2.4.1 Template class collate [lib.locale.collate]
+
+T template &lt;class charT&gt;
+ class collate : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit collate(size_t refs = 0);
+T int compare(const charT* low1, const charT* high1,
+ const charT* low2, const charT* high2) const;
+T string_type transform(const charT* low, const charT* high) const;
+T long hash(const charT* low, const charT* high) const;
+T static locale::id id;
+ protected:
+T ~collate(); // virtual
+T virtual int do_compare(const charT* low1, const charT* high1,
+ const charT* low2, const charT* high2) const;
+T virtual string_type do_transform
+ (const charT* low, const charT* high) const;
+T virtual long do_hash (const charT* low, const charT* high) const;
+ };
+
+
+ 22.2.4.2 Template class [lib.locale.collate.byname]
+ collate_byname
+
+X template &lt;class charT&gt;
+ class collate_byname : public collate&lt;charT&gt; {
+ public:
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit collate_byname(const char*, size_t refs = 0);
+ protected:
+S ~collate_byname(); // virtual
+S virtual int do_compare(const charT* low1, const charT* high1,
+ const charT* low2, const charT* high2) const;
+S virtual string_type do_transform
+ (const charT* low, const charT* high) const;
+S virtual long do_hash (const charT* low, const charT* high) const;
+ };
+
+
+ 22.2.5.1 Template class time_get [lib.locale.time.get]
+
+T class time_base {
+ public:
+T enum dateorder { no_order, dmy, mdy, ymd, ydm };
+ };
+
+ [Note: semantics of time_get members are implementation-defined.
+ To complete implementation requires documenting behavior.]
+
+X template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
+ class time_get : public locale::facet, public time_base {
+ public:
+T typedef charT char_type;
+T typedef InputIterator iter_type;
+T explicit time_get(size_t refs = 0);
+
+T dateorder date_order() const { return do_date_order(); }
+T iter_type get_time(iter_type s, iter_type end, ios_base&amp; f,
+ ios_base::iostate&amp; err, tm* t) const;
+T iter_type get_date(iter_type s, iter_type end, ios_base&amp; f,
+ ios_base::iostate&amp; err, tm* t) const;
+T iter_type get_weekday(iter_type s, iter_type end, ios_base&amp; f,
+ ios_base::iostate&amp; err, tm* t) const;
+T iter_type get_monthname(iter_type s, iter_type end, ios_base&amp; f,
+ ios_base::iostate&amp; err, tm* t) const;
+T iter_type get_year(iter_type s, iter_type end, ios_base&amp; f,
+ ios_base::iostate&amp; err, tm* t) const;
+T static locale::id id;
+ protected:
+ ~time_get(); // virtual
+X virtual dateorder do_date_order() const;
+S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_monthname(iter_type s, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+ };
+
+
+
+ 22.2.5.2 Template class [lib.locale.time.get.byname]
+ time_get_byname
+
+X template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
+ class time_get_byname : public time_get&lt;charT, InputIterator&gt; {
+ public:
+T typedef time_base::dateorder dateorder;
+T typedef InputIterator iter_type
+
+S explicit time_get_byname(const char*, size_t refs = 0);
+ protected:
+S ~time_get_byname(); // virtual
+S virtual dateorder do_date_order() const;
+S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&amp;,
+ ios_base::iostate&amp; err, tm* t) const;
+ };
+ }
+
+ 22.2.5.3 Template class time_put [lib.locale.time.put]
+
+X template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
+ class time_put : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef OutputIterator iter_type;
+T explicit time_put(size_t refs = 0);
+ // the following is implemented in terms of other member functions.
+S iter_type put(iter_type s, ios_base&amp; f, char_type fill, const tm* tmb,
+ const charT* pattern, const charT* pat_end) const;
+T iter_type put(iter_type s, ios_base&amp; f, char_type fill,
+ const tm* tmb, char format, char modifier = 0) const;
+T static locale::id id;
+ protected:
+T ~time_put(); // virtual
+S virtual iter_type do_put(iter_type s, ios_base&amp;, char_type, const tm* t,
+ char format, char modifier) const;
+ };
+
+
+
+ 22.2.5.4 Template class [lib.locale.time.put.byname]
+ time_put_byname
+
+T template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
+ class time_put_byname : public time_put&lt;charT, OutputIterator&gt;
+ {
+ public:
+T typedef charT char_type;
+T typedef OutputIterator iter_type;
+
+T explicit time_put_byname(const char*, size_t refs = 0);
+ protected:
+T ~time_put_byname(); // virtual
+S virtual iter_type do_put(iter_type s, ios_base&amp;, char_type, const tm* t,
+ char format, char modifier) const;
+ };
+
+
+ 22.2.6.1 Template class money_get [lib.locale.money.get]
+
+X template &lt;class charT,
+ class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
+ class money_get : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef InputIterator iter_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit money_get(size_t refs = 0);
+T iter_type get(iter_type s, iter_type end, bool intl,
+ ios_base&amp; f, ios_base::iostate&amp; err,
+ long double&amp; units) const;
+T iter_type get(iter_type s, iter_type end, bool intl,
+ ios_base&amp; f, ios_base::iostate&amp; err,
+ string_type&amp; digits) const;
+T static locale::id id;
+ protected:
+T ~money_get(); // virtual
+S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&amp;,
+ ios_base::iostate&amp; err, long double&amp; units) const;
+S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&amp;,
+ ios_base::iostate&amp; err, string_type&amp; digits) const;
+ };
+
+ 22.2.6.2 Template class money_put [lib.locale.money.put]
+
+X template &lt;class charT,
+ class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
+ class money_put : public locale::facet {
+ public:
+T typedef charT char_type;
+T typedef OutputIterator iter_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit money_put(size_t refs = 0);
+T iter_type put(iter_type s, bool intl, ios_base&amp; f,
+ char_type fill, long double units) const;
+T iter_type put(iter_type s, bool intl, ios_base&amp; f,
+ char_type fill, const string_type&amp; digits) const;
+T static locale::id id;
+
+ protected:
+T ~money_put(); // virtual
+S virtual iter_type
+ do_put(iter_type, bool, ios_base&amp;, char_type fill,
+ long double units) const;
+S virtual iter_type
+ do_put(iter_type, bool, ios_base&amp;, char_type fill,
+ const string_type&amp; digits) const;
+ };
+
+
+ 22.2.6.3 Template class moneypunct [lib.locale.moneypunct]
+
+T class money_base {
+ public:
+T enum part { none, space, symbol, sign, value };
+T struct pattern { char field[4]; };
+ };
+
+X template &lt;class charT, bool International = false&gt;
+ class moneypunct : public locale::facet, public money_base {
+ public:
+T typedef charT char_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit moneypunct(size_t refs = 0);
+T charT decimal_point() const;
+T charT thousands_sep() const;
+T string grouping() const;
+T string_type curr_symbol() const;
+T string_type positive_sign() const;
+T string_type negative_sign() const;
+T int frac_digits() const;
+T pattern pos_format() const;
+T pattern neg_format() const;
+T static locale::id id;
+T static const bool intl = International;
+ protected:
+T ~moneypunct(); // virtual
+S virtual charT do_decimal_point() const;
+S virtual charT do_thousands_sep() const;
+S virtual string do_grouping() const;
+S virtual string_type do_curr_symbol() const;
+S virtual string_type do_positive_sign() const;
+S virtual string_type do_negative_sign() const;
+S virtual int do_frac_digits() const;
+T virtual pattern do_pos_format() const;
+T virtual pattern do_neg_format() const;
+ };
+ }
+
+ 22.2.6.4 Template class [lib.locale.moneypunct.byname]
+ moneypunct_byname
+
+X template &lt;class charT, bool Intl = false&gt;
+ class moneypunct_byname : public moneypunct&lt;charT, Intl&gt; {
+ public:
+T typedef money_base::pattern pattern;
+T typedef basic_string&lt;charT&gt; string_type;
+
+T explicit moneypunct_byname(const char*, size_t refs = 0);
+ protected:
+T ~moneypunct_byname(); // virtual
+S virtual charT do_decimal_point() const;
+S virtual charT do_thousands_sep() const;
+S virtual string do_grouping() const;
+S virtual string_type do_curr_symbol() const;
+S virtual string_type do_positive_sign() const;
+S virtual string_type do_negative_sign() const;
+S virtual int do_frac_digits() const;
+S virtual pattern do_pos_format() const;
+S virtual pattern do_neg_format() const;
+ };
+
+ 22.2.7.1 Template class messages [lib.locale.messages]
+
+T class messages_base {
+ public:
+T typedef int catalog;
+ };
+
+X template &lt;class charT&gt;
+ class messages : public locale::facet, public messages_base {
+ public:
+T typedef charT char_type;
+T typedef basic_string&lt;charT&gt; string_type;
+T explicit messages(size_t refs = 0);
+T catalog open(const basic_string&lt;char&gt;&amp; fn, const locale&amp;) const;
+T string_type get(catalog c, int set, int msgid,
+ const string_type&amp; dfault) const;
+T void close(catalog c) const;
+T static locale::id id;
+ protected:
+T ~messages(); // virtual
+S virtual catalog do_open(const basic_string&lt;char&gt;&amp;, const locale&amp;) const;
+S virtual string_type do_get(catalog, int set, int msgid,
+ const string_type&amp; dfault) const;
+S virtual void do_close(catalog) const;
+ };
+
+ 22.2.7.2 Template class [lib.locale.messages.byname]
+ messages_byname
+
+
+X template &lt;class charT&gt;
+ class messages_byname : public messages&lt;charT&gt; {
+ public:
+T typedef messages_base::catalog catalog;
+T typedef basic_string&lt;charT&gt; string_type;
+
+T explicit messages_byname(const char*, size_t refs = 0);
+ protected:
+T ~messages_byname(); // virtual
+S virtual catalog do_open(const basic_string&lt;char&gt;&amp;, const locale&amp;) const;
+S virtual string_type do_get(catalog, int set, int msgid,
+ const string_type&amp; dfault) const;
+S virtual void do_close(catalog) const;
+ };
+
+
+ 22.3 C Library Locales [lib.c.locales]
+
+
+ Table 13--Header &lt;clocale&gt; synopsis
+ Macros:
+X LC_ALL LC_COLLATE LC_CTYPE
+X LC_MONETARY LC_NUMERIC LC_TIME
+X NULL
+X Struct: lconv
+X Functions: localeconv setlocale
+
+
+ 23.2 Sequences [lib.sequences]
+
+ &lt;deque&gt;, &lt;list&gt;, &lt;queue&gt;, &lt;stack&gt;, and &lt;vector&gt;.
+
+ Header &lt;deque&gt; synopsis
+
+T template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class deque;
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const deque&lt;T,Allocator&gt;&amp; x, const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ void swap(deque&lt;T,Allocator&gt;&amp; x, deque&lt;T,Allocator&gt;&amp; y);
+ }
+
+ Header &lt;list&gt; synopsis
+
+T template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class list;
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ void swap(list&lt;T,Allocator&gt;&amp; x, list&lt;T,Allocator&gt;&amp; y);
+ }
+
+ Header &lt;queue&gt; synopsis
+
+ namespace std {
+T template &lt;class T, class Container = deque&lt;T&gt; &gt; class queue;
+T template &lt;class T, class Container&gt;
+ bool operator==(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt; (const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator!=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt; (const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt;=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt;=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container = vector&lt;T&gt;,
+ class Compare = less&lt;typename Container::value_type&gt; &gt;
+T class priority_queue;
+ }
+
+ Header &lt;stack&gt; synopsis
+
+ namespace std {
+T template &lt;class T, class Container = deque&lt;T&gt; &gt; class stack;
+T template &lt;class T, class Container&gt;
+ bool operator==(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator!=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+ }
+
+ Header &lt;vector&gt; synopsis
+
+T template &lt;class T, class Allocator = allocator&lt;T&gt; &gt; class vector;
+
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ void swap(vector&lt;T,Allocator&gt;&amp; x, vector&lt;T,Allocator&gt;&amp; y);
+
+T template &lt;class Allocator&gt; class vector&lt;bool,Allocator&gt;;
+T template &lt;class Allocator&gt;
+ bool operator==(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&lt; (const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator!=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&gt; (const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&gt;=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&lt;=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ void swap(vector&lt;bool,Allocator&gt;&amp; x, vector&lt;bool,Allocator&gt;&amp; y);
+ }
+
+ 23.2.1 Template class deque [lib.deque]
+
+ template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
+T class deque {
+ public:
+ // types:
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef T value_type;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+ // _lib.deque.cons_ construct/copy/destroy:
+T explicit deque(const Allocator&amp; = Allocator());
+T explicit deque(size_type n, const T&amp; value = T(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ deque(InputIterator first, InputIterator last,
+ const Allocator&amp; = Allocator());
+T deque(const deque&lt;T,Allocator&gt;&amp; x);
+T ~deque();
+T deque&lt;T,Allocator&gt;&amp; operator=(const deque&lt;T,Allocator&gt;&amp; x);
+T template &lt;class InputIterator&gt;
+ void assign(InputIterator first, InputIterator last);
+T void assign(size_type n, const T&amp; t);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // _lib.deque.capacity_ capacity:
+T size_type size() const;
+T size_type max_size() const;
+T void resize(size_type sz, T c = T());
+T bool empty() const;
+
+ // element access:
+T reference operator[](size_type n);
+T const_reference operator[](size_type n) const;
+T reference at(size_type n);
+T const_reference at(size_type n) const;
+T reference front();
+T const_reference front() const;
+T reference back();
+T const_reference back() const;
+ // _lib.deque.modifiers_ modifiers:
+T void push_front(const T&amp; x);
+T void push_back(const T&amp; x);
+T iterator insert(iterator position, const T&amp; x);
+T void insert(iterator position, size_type n, const T&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert (iterator position,
+ InputIterator first, InputIterator last);
+T void pop_front();
+T void pop_back();
+T iterator erase(iterator position);
+T iterator erase(iterator first, iterator last);
+T void swap(deque&lt;T,Allocator&gt;&amp;);
+T void clear();
+ };
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const deque&lt;T,Allocator&gt;&amp; x,
+ const deque&lt;T,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class T, class Allocator&gt;
+ void swap(deque&lt;T,Allocator&gt;&amp; x, deque&lt;T,Allocator&gt;&amp; y);
+
+
+ 23.2.2 Template class list [lib.list]
+
+T template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
+ class list {
+ public:
+ // types:
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef T value_type;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+
+ // _lib.list.cons_ construct/copy/destroy:
+T explicit list(const Allocator&amp; = Allocator());
+T explicit list(size_type n, const T&amp; value = T(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ list(InputIterator first, InputIterator last,
+ const Allocator&amp; = Allocator());
+T list(const list&lt;T,Allocator&gt;&amp; x);
+T ~list();
+T list&lt;T,Allocator&gt;&amp; operator=(const list&lt;T,Allocator&gt;&amp; x);
+T template &lt;class InputIterator&gt;
+ void assign(InputIterator first, InputIterator last);
+T void assign(size_type n, const T&amp; t);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // _lib.list.capacity_ capacity:
+T bool empty() const;
+T size_type size() const;
+T size_type max_size() const;
+T void resize(size_type sz, T c = T());
+ // element access:
+T reference front();
+T const_reference front() const;
+T reference back();
+T const_reference back() const;
+ // _lib.list.modifiers_ modifiers:
+T void push_front(const T&amp; x);
+T void pop_front();
+T void push_back(const T&amp; x);
+T void pop_back();
+T iterator insert(iterator position, const T&amp; x);
+T void insert(iterator position, size_type n, const T&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(iterator position, InputIterator first,
+ InputIterator last);
+T iterator erase(iterator position);
+T iterator erase(iterator position, iterator last);
+T void swap(list&lt;T,Allocator&gt;&amp;);
+T void clear();
+ // _lib.list.ops_ list operations:
+T void splice(iterator position, list&lt;T,Allocator&gt;&amp; x);
+T void splice(iterator position, list&lt;T,Allocator&gt;&amp; x, iterator i);
+T void splice(iterator position, list&lt;T,Allocator&gt;&amp; x, iterator first,
+ iterator last);
+T void remove(const T&amp; value);
+T template &lt;class Predicate&gt; void remove_if(Predicate pred);
+
+T void unique();
+T template &lt;class BinaryPredicate&gt;
+ void unique(BinaryPredicate binary_pred);
+T void merge(list&lt;T,Allocator&gt;&amp; x);
+T template &lt;class Compare&gt; void merge(list&lt;T,Allocator&gt;&amp; x, Compare comp);
+ void sort();
+T template &lt;class Compare&gt; void sort(Compare comp);
+ void reverse();
+ };
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const list&lt;T,Allocator&gt;&amp; x, const list&lt;T,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class T, class Allocator&gt;
+ void swap(list&lt;T,Allocator&gt;&amp; x, list&lt;T,Allocator&gt;&amp; y);
+
+
+ 23.2.3.1 Template class queue [lib.queue]
+
+T template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class queue {
+ public:
+T typedef typename Container::value_type value_type;
+T typedef typename Container::size_type size_type;
+T typedef Container container_type;
+ protected:
+T Container c;
+ public:
+T explicit queue(const Container&amp; = Container());
+
+T bool empty() const { return c.empty(); }
+T size_type size() const { return c.size(); }
+T value_type&amp; front() { return c.front(); }
+T const value_type&amp; front() const { return c.front(); }
+T value_type&amp; back() { return c.back(); }
+T const value_type&amp; back() const { return c.back(); }
+T void push(const value_type&amp; x) { c.push_back(x); }
+T void pop() { c.pop_front(); }
+ };
+
+T template &lt;class T, class Container&gt;
+ bool operator==(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt; (const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator!=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt; (const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt;=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt;=(const queue&lt;T, Container&gt;&amp; x,
+ const queue&lt;T, Container&gt;&amp; y);
+
+ 23.2.3.2 Template class priority_queue [lib.priority.queue]
+
+T template &lt;class T, class Container = vector&lt;T&gt;,
+ class Compare = less&lt;typename Container::value_type&gt; &gt;
+ class priority_queue {
+ public:
+T typedef typename Container::value_type value_type;
+T typedef typename Container::size_type size_type;
+T typedef Container container_type;
+ protected:
+T Container c;
+T Compare comp;
+ public:
+T explicit priority_queue(const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+T template &lt;class InputIterator&gt;
+ priority_queue(InputIterator first, InputIterator last,
+ const Compare&amp; x = Compare(),
+ const Container&amp; = Container());
+
+T bool empty() const { return c.empty(); }
+T size_type size() const { return c.size(); }
+T const value_type&amp; top() const { return c.front(); }
+T void push(const value_type&amp; x);
+T void pop();
+ };
+
+ 23.2.3.3 Template class stack [lib.stack]
+
+T template &lt;class T, class Container = deque&lt;T&gt; &gt;
+ class stack {
+ public:
+T typedef typename Container::value_type value_type;
+T typedef typename Container::size_type size_type;
+T typedef Container container_type;
+ protected:
+T Container c;
+ public:
+T explicit stack(const Container&amp; = Container());
+
+T bool empty() const { return c.empty(); }
+T size_type size() const { return c.size(); }
+T value_type&amp; top() { return c.back(); }
+T const value_type&amp; top() const { return c.back(); }
+T void push(const value_type&amp; x) { c.push_back(x); }
+T void pop() { c.pop_back(); }
+ };
+T template &lt;class T, class Container&gt;
+ bool operator==(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator!=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+T template &lt;class T, class Container&gt;
+ bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
+ const stack&lt;T, Container&gt;&amp; y);
+
+ 23.2.4 Template class vector [lib.vector]
+
+ template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
+T class vector {
+ public:
+ // types:
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef T value_type;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+ // _lib.vector.cons_ construct/copy/destroy:
+T explicit vector(const Allocator&amp; = Allocator());
+T explicit vector(size_type n, const T&amp; value = T(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ vector(InputIterator first, InputIterator last,
+ const Allocator&amp; = Allocator());
+T vector(const vector&lt;T,Allocator&gt;&amp; x);
+T ~vector();
+T vector&lt;T,Allocator&gt;&amp; operator=(const vector&lt;T,Allocator&gt;&amp; x);
+T template &lt;class InputIterator&gt;
+ void assign(InputIterator first, InputIterator last);
+T void assign(size_type n, const T&amp; u);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // _lib.vector.capacity_ capacity:
+T size_type size() const;
+T size_type max_size() const;
+T void resize(size_type sz, T c = T());
+T size_type capacity() const;
+T bool empty() const;
+T void reserve(size_type n);
+
+ // element access:
+T reference operator[](size_type n);
+T const_reference operator[](size_type n) const;
+T const_reference at(size_type n) const;
+T reference at(size_type n);
+T reference front();
+T const_reference front() const;
+T reference back();
+T const_reference back() const;
+ // _lib.vector.modifiers_ modifiers:
+T void push_back(const T&amp; x);
+T void pop_back();
+T iterator insert(iterator position, const T&amp; x);
+T void insert(iterator position, size_type n, const T&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(iterator position,
+ InputIterator first, InputIterator last);
+T iterator erase(iterator position);
+T iterator erase(iterator first, iterator last);
+T void swap(vector&lt;T,Allocator&gt;&amp;);
+T void clear();
+ };
+
+T template &lt;class T, class Allocator&gt;
+ bool operator==(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt; (const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator!=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt; (const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&gt;=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+T template &lt;class T, class Allocator&gt;
+ bool operator&lt;=(const vector&lt;T,Allocator&gt;&amp; x,
+ const vector&lt;T,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class T, class Allocator&gt;
+ void swap(vector&lt;T,Allocator&gt;&amp; x, vector&lt;T,Allocator&gt;&amp; y);
+
+
+ 23.2.5 Class vector&lt;bool&gt; [lib.vector.bool]
+
+T template &lt;class Allocator&gt; class vector&lt;bool, Allocator&gt; {
+ public:
+ // types:
+T typedef bool const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef bool value_type;
+T typedef Allocator allocator_type;
+T typedef implementation defined pointer;
+T typedef implementation defined const_pointer
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+ // bit reference:
+T class reference {
+ friend class vector;
+T reference();
+ public:
+T ~reference();
+T operator bool() const;
+T reference&amp; operator=(const bool x);
+T reference&amp; operator=(const reference&amp; x);
+T void flip(); // flips the bit
+ };
+
+ // construct/copy/destroy:
+T explicit vector(const Allocator&amp; = Allocator());
+T explicit vector(size_type n, const bool&amp; value = bool(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ vector(InputIterator first, InputIterator last,
+ const Allocator&amp; = Allocator());
+T vector(const vector&lt;bool,Allocator&gt;&amp; x);
+T ~vector();
+T vector&lt;bool,Allocator&gt;&amp; operator=(const vector&lt;bool,Allocator&gt;&amp; x);
+T template &lt;class InputIterator&gt;
+ void assign(InputIterator first, InputIterator last);
+T void assign(size_type n, const T&amp; t);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // capacity:
+T size_type size() const;
+T size_type max_size() const;
+T void resize(size_type sz, bool c = false);
+T size_type capacity() const;
+T bool empty() const;
+T void reserve(size_type n);
+ // element access:
+T reference operator[](size_type n);
+T const_reference operator[](size_type n) const;
+T const_reference at(size_type n) const;
+T reference at(size_type n);
+T reference front();
+T const_reference front() const;
+T reference back();
+T const_reference back() const;
+ // modifiers:
+T void push_back(const bool&amp; x);
+T void pop_back();
+T iterator insert(iterator position, const bool&amp; x);
+T void insert (iterator position, size_type n, const bool&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(iterator position,
+ InputIterator first, InputIterator last);
+T iterator erase(iterator position);
+T iterator erase(iterator first, iterator last);
+T void swap(vector&lt;bool,Allocator&gt;&amp;);
+T static void swap(reference x, reference y);
+T void flip(); // flips all bits
+T void clear();
+ };
+
+T template &lt;class Allocator&gt;
+ bool operator==(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&lt; (const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator!=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&gt; (const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&gt;=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+T template &lt;class Allocator&gt;
+ bool operator&lt;=(const vector&lt;bool,Allocator&gt;&amp; x,
+ const vector&lt;bool,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class Allocator&gt;
+ void swap(vector&lt;bool,Allocator&gt;&amp; x, vector&lt;bool,Allocator&gt;&amp; y);
+
+ 23.3 Associative containers [lib.associative]
+
+ &lt;map&gt; and &lt;set&gt;:
+
+ Header &lt;map&gt; synopsis
+
+ template &lt;class Key, class T, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;
+T class map;
+
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator==(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator!=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ void swap(map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;
+ class multimap;
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator==(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator!=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+ }
+
+ Header &lt;set&gt; synopsis
+
+ template &lt;class Key, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;Key&gt; &gt;
+T class set;
+
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator==(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator!=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ void swap(set&lt;Key,Compare,Allocator&gt;&amp; x,
+ set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;Key&gt; &gt;
+ class multiset;
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator==(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator!=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ void swap(multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+ }
+
+ 23.3.1 Template class map [lib.map]
+
+ template &lt;class Key, class T, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;
+T class map {
+ public:
+ // types:
+T typedef Key key_type;
+T typedef T mapped_type;
+T typedef pair&lt;const Key, T&gt; value_type;
+T typedef Compare key_compare;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+T class value_compare
+ : public binary_function&lt;value_type,value_type,bool&gt; {
+ friend class map;
+ protected:
+T Compare comp;
+T value_compare(Compare c) : comp(c) {}
+ public:
+T bool operator()(const value_type&amp; x, const value_type&amp; y) const {
+ return comp(x.first, y.first);
+ }
+ };
+
+ // _lib.map.cons_ construct/copy/destroy:
+T explicit map(const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ map(InputIterator first, InputIterator last,
+ const Compare&amp; comp = Compare(), const Allocator&amp; = Allocator());
+T map(const map&lt;Key,T,Compare,Allocator&gt;&amp; x);
+T ~map();
+T map&lt;Key,T,Compare,Allocator&gt;&amp;
+ operator=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x);
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // capacity:
+T bool empty() const;
+T size_type size() const;
+T size_type max_size() const;
+ // _lib.map.access_ element access:
+T T&amp; operator[](const key_type&amp; x);
+ // modifiers:
+T pair&lt;iterator, bool&gt; insert(const value_type&amp; x);
+T iterator insert(iterator position, const value_type&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);
+T void erase(iterator position);
+T size_type erase(const key_type&amp; x);
+T void erase(iterator first, iterator last);
+T void swap(map&lt;Key,T,Compare,Allocator&gt;&amp;);
+T void clear();
+ // observers:
+T key_compare key_comp() const;
+T value_compare value_comp() const;
+ // _lib.map.ops_ map operations:
+T iterator find(const key_type&amp; x);
+T const_iterator find(const key_type&amp; x) const;
+T size_type count(const key_type&amp; x) const;
+T iterator lower_bound(const key_type&amp; x);
+T const_iterator lower_bound(const key_type&amp; x) const;
+T iterator upper_bound(const key_type&amp; x);
+T const_iterator upper_bound(const key_type&amp; x) const;
+T pair&lt;iterator,iterator&gt;
+ equal_range(const key_type&amp; x);
+T pair&lt;const_iterator,const_iterator&gt;
+ equal_range(const key_type&amp; x) const;
+ };
+
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator==(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator!=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt; (const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt;=(const map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ void swap(map&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ map&lt;Key,T,Compare,Allocator&gt;&amp; y);
+
+ 23.3.2 Template class multimap [lib.multimap]
+
+ template &lt;class Key, class T, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;pair&lt;const Key, T&gt; &gt; &gt;
+T class multimap {
+ public:
+ // types:
+T typedef Key key_type;
+T typedef T mapped_type;
+T typedef pair&lt;const Key,T&gt; value_type;
+T typedef Compare key_compare;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+T class value_compare
+ : public binary_function&lt;value_type,value_type,bool&gt; {
+ friend class multimap;
+ protected:
+T Compare comp;
+T value_compare(Compare c) : comp(c) {}
+ public:
+T bool operator()(const value_type&amp; x, const value_type&amp; y) const {
+ return comp(x.first, y.first);
+ }
+ };
+ // construct/copy/destroy:
+T explicit multimap(const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ multimap(InputIterator first, InputIterator last,
+ const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T multimap(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x);
+T ~multimap();
+T multimap&lt;Key,T,Compare,Allocator&gt;&amp;
+ operator=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x);
+T allocator_type get_allocator() const;
+
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // capacity:
+T bool empty() const;
+T size_type size() const;
+T size_type max_size() const;
+ // modifiers:
+T iterator insert(const value_type&amp; x);
+T iterator insert(iterator position, const value_type&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);
+T void erase(iterator position);
+T size_type erase(const key_type&amp; x);
+T void erase(iterator first, iterator last);
+T void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp;);
+T void clear();
+ // observers:
+T key_compare key_comp() const;
+T value_compare value_comp() const;
+ // map operations:
+T iterator find(const key_type&amp; x);
+T const_iterator find(const key_type&amp; x) const;
+T size_type count(const key_type&amp; x) const;
+T iterator lower_bound(const key_type&amp; x);
+T const_iterator lower_bound(const key_type&amp; x) const;
+T iterator upper_bound(const key_type&amp; x);
+T const_iterator upper_bound(const key_type&amp; x) const;
+T pair&lt;iterator,iterator&gt; equal_range(const key_type&amp; x);
+T pair&lt;const_iterator,const_iterator&gt; equal_range(const key_type&amp; x) const;
+ };
+
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator==(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator!=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt; (const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&gt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ bool operator&lt;=(const multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ const multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class Key, class T, class Compare, class Allocator&gt;
+ void swap(multimap&lt;Key,T,Compare,Allocator&gt;&amp; x,
+ multimap&lt;Key,T,Compare,Allocator&gt;&amp; y);
+
+
+ 23.3.3 Template class set [lib.set]
+
+ template &lt;class Key, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;Key&gt; &gt;
+T class set {
+ public:
+ // types:
+T typedef Key key_type;
+T typedef Key value_type;
+T typedef Compare key_compare;
+T typedef Compare value_compare;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type;
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+ // _lib.set.cons_ construct/copy/destroy:
+T explicit set(const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ set(InputIterator first, InputIterator last,
+ const Compare&amp; comp = Compare(), const Allocator&amp; = Allocator());
+T set(const set&lt;Key,Compare,Allocator&gt;&amp; x);
+T ~set();
+T set&lt;Key,Compare,Allocator&gt;&amp;
+ operator=(const set&lt;Key,Compare,Allocator&gt;&amp; x);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // capacity:
+T bool empty() const;
+T size_type size() const;
+T size_type max_size() const;
+ // modifiers:
+T pair&lt;iterator,bool&gt; insert(const value_type&amp; x);
+T iterator insert(iterator position, const value_type&amp; x);
+T template &lt;class InputIterator&gt;
+T void insert(InputIterator first, InputIterator last);
+T void erase(iterator position);
+T size_type erase(const key_type&amp; x);
+T void erase(iterator first, iterator last);
+T void swap(set&lt;Key,Compare,Allocator&gt;&amp;);
+T void clear();
+
+ // observers:
+T key_compare key_comp() const;
+T value_compare value_comp() const;
+ // set operations:
+T iterator find(const key_type&amp; x) const;
+T size_type count(const key_type&amp; x) const;
+T iterator lower_bound(const key_type&amp; x) const;
+T iterator upper_bound(const key_type&amp; x) const;
+T pair&lt;iterator,iterator&gt; equal_range(const key_type&amp; x) const;
+ };
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator==(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator!=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt; (const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt;=(const set&lt;Key,Compare,Allocator&gt;&amp; x,
+ const set&lt;Key,Compare,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class Key, class Compare, class Allocator&gt;
+ void swap(set&lt;Key,Compare,Allocator&gt;&amp; x,
+ set&lt;Key,Compare,Allocator&gt;&amp; y);
+
+ 23.3.4 Template class multiset [lib.multiset]
+
+ template &lt;class Key, class Compare = less&lt;Key&gt;,
+ class Allocator = allocator&lt;Key&gt; &gt;
+T class multiset {
+ public:
+ // types:
+T typedef Key key_type;
+T typedef Key value_type;
+T typedef Compare key_compare;
+T typedef Compare value_compare;
+T typedef Allocator allocator_type;
+T typedef typename Allocator::reference reference;
+T typedef typename Allocator::const_reference const_reference;
+T typedef implementation defined iterator;
+T typedef implementation defined const_iterator;
+T typedef implementation defined size_type;
+T typedef implementation defined difference_type
+T typedef typename Allocator::pointer pointer;
+T typedef typename Allocator::const_pointer const_pointer;
+T typedef std::reverse_iterator&lt;iterator&gt; reverse_iterator;
+T typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
+
+ // construct/copy/destroy:
+T explicit multiset(const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T template &lt;class InputIterator&gt;
+ multiset(InputIterator first, InputIterator last,
+ const Compare&amp; comp = Compare(),
+ const Allocator&amp; = Allocator());
+T multiset(const multiset&lt;Key,Compare,Allocator&gt;&amp; x);
+T ~multiset();
+T multiset&lt;Key,Compare,Allocator&gt;&amp;
+ operator=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x);
+T allocator_type get_allocator() const;
+ // iterators:
+T iterator begin();
+T const_iterator begin() const;
+T iterator end();
+T const_iterator end() const;
+T reverse_iterator rbegin();
+T const_reverse_iterator rbegin() const;
+T reverse_iterator rend();
+T const_reverse_iterator rend() const;
+ // capacity:
+T bool empty() const;
+T size_type size() const;
+T size_type max_size() const;
+ // modifiers:
+T iterator insert(const value_type&amp; x);
+T iterator insert(iterator position, const value_type&amp; x);
+T template &lt;class InputIterator&gt;
+ void insert(InputIterator first, InputIterator last);
+T void erase(iterator position);
+T size_type erase(const key_type&amp; x);
+T void erase(iterator first, iterator last);
+T void swap(multiset&lt;Key,Compare,Allocator&gt;&amp;);
+T void clear();
+ // observers:
+T key_compare key_comp() const;
+T value_compare value_comp() const;
+ // set operations:
+T iterator find(const key_type&amp; x) const;
+T size_type count(const key_type&amp; x) const;
+T iterator lower_bound(const key_type&amp; x) const;
+T iterator upper_bound(const key_type&amp; x) const;
+T pair&lt;iterator,iterator&gt; equal_range(const key_type&amp; x) const;
+ };
+
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator==(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator!=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt; (const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&gt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+T template &lt;class Key, class Compare, class Allocator&gt;
+ bool operator&lt;=(const multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ const multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+ // specialized algorithms:
+T template &lt;class Key, class Compare, class Allocator&gt;
+ void swap(multiset&lt;Key,Compare,Allocator&gt;&amp; x,
+ multiset&lt;Key,Compare,Allocator&gt;&amp; y);
+
+ 23.3.5 Template class bitset [lib.template.bitset]
+
+ Header &lt;bitset&gt; synopsis
+
+T template &lt;size_t N&gt; class bitset;
+ // _lib.bitset.operators_ bitset operations:
+T template &lt;size_t N&gt;
+ bitset&lt;N&gt; operator&amp;(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);
+T template &lt;size_t N&gt;
+ bitset&lt;N&gt; operator|(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);
+T template &lt;size_t N&gt;
+ bitset&lt;N&gt; operator^(const bitset&lt;N&gt;&amp;, const bitset&lt;N&gt;&amp;);
+T template &lt;class charT, class traits, size_t N&gt;
+ basic_istream&lt;charT, traits&gt;&amp;
+ operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, bitset&lt;N&gt;&amp; x);
+T template &lt;class charT, class traits, size_t N&gt;
+ basic_ostream&lt;charT, traits&gt;&amp;
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os, const bitset&lt;N&gt;&amp; x);
+
+T template&lt;size_t N&gt; class bitset {
+ public:
+ // bit reference:
+T class reference {
+ friend class bitset;
+T reference();
+ public:
+T ~reference();
+T reference&amp; operator=(bool x); // for b[i] = x;
+T reference&amp; operator=(const reference&amp;); // for b[i] = b[j];
+T bool operator~() const; // flips the bit
+T operator bool() const; // for x = b[i];
+T reference&amp; flip(); // for b[i].flip();
+ };
+
+ // _lib.bitset.cons_ constructors:
+T bitset();
+T bitset(unsigned long val);
+T template&lt;class charT, class traits, class Allocator&gt;
+ explicit bitset(
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ typename basic_string&lt;charT,traits,Allocator&gt;::size_type pos = 0,
+ typename basic_string&lt;charT,traits,Allocator&gt;::size_type n =
+ basic_string&lt;charT,traits,Allocator&gt;::npos);
+ // _lib.bitset.members_ bitset operations:
+T bitset&lt;N&gt;&amp; operator&amp;=(const bitset&lt;N&gt;&amp; rhs);
+T bitset&lt;N&gt;&amp; operator|=(const bitset&lt;N&gt;&amp; rhs);
+T bitset&lt;N&gt;&amp; operator^=(const bitset&lt;N&gt;&amp; rhs);
+T bitset&lt;N&gt;&amp; operator&lt;&lt;=(size_t pos);
+T bitset&lt;N&gt;&amp; operator&gt;&gt;=(size_t pos);
+T bitset&lt;N&gt;&amp; set();
+T bitset&lt;N&gt;&amp; set(size_t pos, int val = true);
+T bitset&lt;N&gt;&amp; reset();
+T bitset&lt;N&gt;&amp; reset(size_t pos);
+T bitset&lt;N&gt; operator~() const;
+T bitset&lt;N&gt;&amp; flip();
+T bitset&lt;N&gt;&amp; flip(size_t pos);
+ // element access:
+T reference operator[](size_t pos); // for b[i];
+T unsigned long to_ulong() const;
+T template &lt;class charT, class traits, class Allocator&gt;
+ basic_string&lt;charT, traits, Allocator&gt; to_string() const;
+T size_t count() const;
+T size_t size() const;
+T bool operator==(const bitset&lt;N&gt;&amp; rhs) const;
+T bool operator!=(const bitset&lt;N&gt;&amp; rhs) const;
+T bool test(size_t pos) const;
+T bool any() const;
+T bool none() const;
+T bitset&lt;N&gt; operator&lt;&lt;(size_t pos) const;
+T bitset&lt;N&gt; operator&gt;&gt;(size_t pos) const;
+ };
+
+
+
+
+ 24.2 Header &lt;iterator&gt; synopsis [lib.iterator.synopsis]
+
+ // _lib.iterator.primitives_, primitives:
+T template&lt;class Iterator&gt; struct iterator_traits;
+T template&lt;class T&gt; struct iterator_traits&lt;T*&gt;;
+
+X template&lt;class Category, class T, class Distance = ptrdiff_t,
+ class Pointer = T*, class Reference = T&amp;&gt; struct iterator;
+T struct input_iterator_tag {};
+T struct output_iterator_tag {};
+T struct forward_iterator_tag: public input_iterator_tag {};
+T struct bidirectional_iterator_tag: public forward_iterator_tag {};
+T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
+ // _lib.iterator.operations_, iterator operations:
+T template &lt;class InputIterator, class Distance&gt;
+ void advance(InputIterator&amp; i, Distance n);
+T template &lt;class InputIterator&gt;
+ typename iterator_traits&lt;InputIterator&gt;::difference_type
+ distance(InputIterator first, InputIterator last);
+ // _lib.predef.iterators_, predefined iterators:
+X template &lt;class Iterator&gt; class reverse_iterator;
+T template &lt;class Iterator&gt;
+ bool operator==(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&lt;(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator!=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&gt;(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&gt;=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&lt;=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ typename reverse_iterator&lt;Iterator&gt;::difference_type operator-(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ reverse_iterator&lt;Iterator&gt;
+ operator+(
+ typename reverse_iterator&lt;Iterator&gt;::difference_type n,
+ const reverse_iterator&lt;Iterator&gt;&amp; x);
+
+X template &lt;class Container&gt; class back_insert_iterator;
+T template &lt;class Container&gt;
+ back_insert_iterator&lt;Container&gt; back_inserter(Container&amp; x);
+X template &lt;class Container&gt; class front_insert_iterator;
+T template &lt;class Container&gt;
+ front_insert_iterator&lt;Container&gt; front_inserter(Container&amp; x);
+X template &lt;class Container&gt; class insert_iterator;
+T template &lt;class Container, class Iterator&gt;
+ insert_iterator&lt;Container&gt; inserter(Container&amp; x, Iterator i);
+ // _lib.stream.iterators_, stream iterators:
+X template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt;,
+ class Distance = ptrdiff_t&gt;
+ class istream_iterator;
+ template &lt;class T, class charT, class traits, class Distance&gt;
+X bool operator==(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+ template &lt;class T, class charT, class traits, class Distance&gt;
+X bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+X template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt; &gt;
+ class ostream_iterator;
+X template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class istreambuf_iterator;
+X template &lt;class charT, class traits&gt;
+ bool operator==(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,
+ const istreambuf_iterator&lt;charT,traits&gt;&amp; b);
+X template &lt;class charT, class traits&gt;
+ bool operator!=(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,
+ const istreambuf_iterator&lt;charT,traits&gt;&amp; b);
+T template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class ostreambuf_iterator;
+
+ 24.3 Iterator primitives [lib.iterator.primitives]
+
+T template&lt;class Iterator&gt; struct iterator_traits {
+T typedef typename Iterator::difference_type difference_type;
+T typedef typename Iterator::value_type value_type;
+T typedef typename Iterator::pointer pointer;
+T typedef typename Iterator::reference reference;
+T typedef typename Iterator::iterator_category iterator_category;
+ };
+
+T template&lt;class T&gt; struct iterator_traits&lt;T*&gt; {
+T typedef ptrdiff_t difference_type;
+T typedef T value_type;
+T typedef T* pointer;
+T typedef T&amp; reference;
+T typedef random_access_iterator_tag iterator_category;
+ };
+
+T template&lt;class T&gt; struct iterator_traits&lt;const T*&gt; {
+T typedef ptrdiff_t difference_type;
+T typedef T value_type;
+T typedef const T* pointer;
+T typedef const T&amp; reference;
+T typedef random_access_iterator_tag iterator_category;
+ };
+
+ 24.3.2 Basic iterator [lib.iterator.basic]
+
+ template&lt;class Category, class T, class Distance = ptrdiff_t,
+ class Pointer = T*, class Reference = T&amp;&gt;
+X struct iterator {
+T typedef T value_type;
+T typedef Distance difference_type;
+T typedef Pointer pointer;
+T typedef Reference reference;
+T typedef Category iterator_category;
+ };
+
+ 24.3.3 Standard iterator tags [lib.std.iterator.tags]
+
+T struct input_iterator_tag {};
+T struct output_iterator_tag {};
+T struct forward_iterator_tag: public input_iterator_tag {};
+T struct bidirectional_iterator_tag: public forward_iterator_tag {};
+T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
+
+
+ 24.4.1 Reverse iterators [lib.reverse.iterators]
+
+ template &lt;class Iterator&gt;
+X class reverse_iterator : public
+ iterator&lt;typename iterator_traits&lt;Iterator&gt;::iterator_category,
+ typename iterator_traits&lt;Iterator&gt;::value_type,
+ typename iterator_traits&lt;Iterator&gt;::difference_type,
+ typename iterator_traits&lt;Iterator&gt;::pointer,
+ typename iterator_traits&lt;Iterator&gt;::reference&gt; {
+ protected:
+T Iterator current;
+ public:
+T typedef Iterator
+ iterator_type;
+T typedef typename iterator_traits&lt;Iterator&gt;::difference_type
+ difference_type;
+T typedef typename iterator_traits&lt;Iterator&gt;::reference
+ reference;
+T typedef typename iterator_traits&lt;Iterator&gt;::pointer
+ pointer;
+
+T reverse_iterator();
+T explicit reverse_iterator(Iterator x);
+T template &lt;class U&gt; reverse_iterator(const reverse_iterator&lt;U&gt;&amp; u);
+T Iterator base() const; // explicit
+T reference operator*() const;
+T pointer operator-&gt;() const;
+T reverse_iterator&amp; operator++();
+T reverse_iterator operator++(int);
+T reverse_iterator&amp; operator--();
+T reverse_iterator operator--(int);
+
+T reverse_iterator operator+ (difference_type n) const;
+T reverse_iterator&amp; operator+=(difference_type n);
+T reverse_iterator operator- (difference_type n) const;
+T reverse_iterator&amp; operator-=(difference_type n);
+T reference operator[](difference_type n) const;
+ };
+T template &lt;class Iterator&gt;
+ bool operator==(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&lt;(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator!=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&gt;(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&gt;=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ bool operator&lt;=(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ typename reverse_iterator&lt;Iterator&gt;::difference_type operator-(
+ const reverse_iterator&lt;Iterator&gt;&amp; x,
+ const reverse_iterator&lt;Iterator&gt;&amp; y);
+T template &lt;class Iterator&gt;
+ reverse_iterator&lt;Iterator&gt; operator+(
+ typename reverse_iterator&lt;Iterator&gt;::difference_type n,
+ const reverse_iterator&lt;Iterator&gt;&amp; x);
+
+
+ 24.4.2.1 Template class [lib.back.insert.iterator]
+ back_insert_iterator
+
+ template &lt;class Container&gt;
+X class back_insert_iterator :
+ public iterator&lt;output_iterator_tag,void,void,void,void&gt; {
+ protected:
+T Container* container;
+ public:
+T typedef Container container_type;
+T explicit back_insert_iterator(Container&amp; x);
+T back_insert_iterator&lt;Container&gt;&amp;
+ operator=(typename Container::const_reference value);
+
+T back_insert_iterator&lt;Container&gt;&amp; operator*();
+T back_insert_iterator&lt;Container&gt;&amp; operator++();
+T back_insert_iterator&lt;Container&gt; operator++(int);
+ };
+T template &lt;class Container&gt;
+ back_insert_iterator&lt;Container&gt; back_inserter(Container&amp; x);
+
+
+
+ 24.4.2.3 Template class [lib.front.insert.iterator]
+ front_insert_iterator
+
+ template &lt;class Container&gt;
+X class front_insert_iterator :
+ public iterator&lt;output_iterator_tag,void,void,void,void&gt; {
+ protected:
+T Container* container;
+ public:
+T typedef Container container_type;
+T explicit front_insert_iterator(Container&amp; x);
+T front_insert_iterator&lt;Container&gt;&amp;
+ operator=(typename Container::const_reference value);
+T front_insert_iterator&lt;Container&gt;&amp; operator*();
+T front_insert_iterator&lt;Container&gt;&amp; operator++();
+T front_insert_iterator&lt;Container&gt; operator++(int);
+ };
+T template &lt;class Container&gt;
+ front_insert_iterator&lt;Container&gt; front_inserter(Container&amp; x);
+
+
+ 24.4.2.5 Template class insert_iterator [lib.insert.iterator]
+
+ template &lt;class Container&gt;
+X class insert_iterator :
+ public iterator&lt;output_iterator_tag,void,void,void,void&gt; {
+ protected:
+T Container* container;
+T typename Container::iterator iter;
+ public:
+T typedef Container container_type;
+T insert_iterator(Container&amp; x, typename Container::iterator i);
+T insert_iterator&lt;Container&gt;&amp;
+ operator=(typename Container::const_reference value);
+T insert_iterator&lt;Container&gt;&amp; operator*();
+T insert_iterator&lt;Container&gt;&amp; operator++();
+T insert_iterator&lt;Container&gt;&amp; operator++(int);
+ };
+T template &lt;class Container, class Iterator&gt;
+ insert_iterator&lt;Container&gt; inserter(Container&amp; x, Iterator i);
+
+ 24.5.1 Template class istream_iterator [lib.istream.iterator]
+
+ template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt;,
+ class Distance = ptrdiff_t&gt;
+X class istream_iterator:
+ public iterator&lt;input_iterator_tag, T, Distance, const T*, const T&amp;&gt; {
+ public:
+T typedef charT char_type
+T typedef traits traits_type;
+T typedef basic_istream&lt;charT,traits&gt; istream_type;
+T istream_iterator();
+T istream_iterator(istream_type&amp; s);
+T istream_iterator(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x);
+T ~istream_iterator();
+
+T const T&amp; operator*() const;
+T const T* operator-&gt;() const;
+T istream_iterator&lt;T,charT,traits,Distance&gt;&amp; operator++();
+T istream_iterator&lt;T,charT,traits,Distance&gt; operator++(int);
+ };
+
+T template &lt;class T, class charT, class traits, class Distance&gt;
+ bool operator==(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+T template &lt;class T, class charT, class traits, class Distance&gt;
+ bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
+ const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
+
+
+ 24.5.2 Template class ostream_iterator [lib.ostream.iterator]
+
+ template &lt;class T, class charT = char, class traits = char_traits&lt;charT&gt; &gt;
+X class ostream_iterator:
+ public iterator&lt;output_iterator_tag, void, void, void, void&gt; {
+ public:
+T typedef charT char_type;
+T typedef traits traits_type;
+T typedef basic_ostream&lt;charT,traits&gt; ostream_type;
+T ostream_iterator(ostream_type&amp; s);
+T ostream_iterator(ostream_type&amp; s, const charT* delimiter);
+T ostream_iterator(const ostream_iterator&lt;T,charT,traits&gt;&amp; x);
+T ~ostream_iterator();
+T ostream_iterator&lt;T,charT,traits&gt;&amp; operator=(const T&amp; value);
+
+T ostream_iterator&lt;T,charT,traits&gt;&amp; operator*();
+T ostream_iterator&lt;T,charT,traits&gt;&amp; operator++();
+T ostream_iterator&lt;T,charT,traits&gt;&amp; operator++(int);
+ };
+
+
+ 24.5.3 Template class [lib.istreambuf.iterator]
+ istreambuf_iterator
+
+ template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class istreambuf_iterator
+ : public iterator&lt;input_iterator_tag, charT,
+ typename traits::off_type, charT*, charT&amp;&gt; {
+ public:
+T typedef charT char_type;
+T typedef traits traits_type;
+T typedef typename traits::int_type int_type;
+T typedef basic_streambuf&lt;charT,traits&gt; streambuf_type;
+T typedef basic_istream&lt;charT,traits&gt; istream_type;
+T class proxy; // exposition only
+T istreambuf_iterator() throw();
+T istreambuf_iterator(istream_type&amp; s) throw();
+T istreambuf_iterator(streambuf_type* s) throw();
+T istreambuf_iterator(const proxy&amp; p) throw();
+T charT operator*() const;
+T istreambuf_iterator&lt;charT,traits&gt;&amp; operator++();
+T proxy operator++(int);
+X bool equal(istreambuf_iterator&amp; b);
+ };
+
+T template &lt;class charT, class traits&gt;
+ bool operator==(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,
+ const istreambuf_iterator&lt;charT,traits&gt;&amp; b);
+
+T template &lt;class charT, class traits&gt;
+ bool operator!=(const istreambuf_iterator&lt;charT,traits&gt;&amp; a,
+ const istreambuf_iterator&lt;charT,traits&gt;&amp; b);
+
+ 24.5.3.1 Template class [lib.istreambuf.iterator::proxy]
+ istreambuf_iterator::proxy
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+T class istreambuf_iterator&lt;charT, traits&gt;::proxy
+ {
+T charT keep_;
+T basic_streambuf&lt;charT,traits&gt;* sbuf_;
+T proxy(charT c,
+ basic_streambuf&lt;charT,traits&gt;* sbuf);
+ : keep_(c), sbuf_(sbuf) {}
+ public:
+T charT operator*() { return keep_; }
+ };
+
+
+
+ 24.5.4 Template class [lib.ostreambuf.iterator]
+ ostreambuf_iterator
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+T class ostreambuf_iterator:
+ public iterator&lt;output_iterator_tag, void, void, void, void&gt; {
+ public:
+T typedef charT char_type;
+T typedef traits traits_type;
+T typedef basic_streambuf&lt;charT,traits&gt; streambuf_type;
+T typedef basic_ostream&lt;charT,traits&gt; ostream_type;
+ public:
+T ostreambuf_iterator(ostream_type&amp; s) throw();
+T ostreambuf_iterator(streambuf_type* s) throw();
+T ostreambuf_iterator&amp; operator=(charT c);
+T ostreambuf_iterator&amp; operator*();
+T ostreambuf_iterator&amp; operator++();
+T ostreambuf_iterator&amp; operator++(int);
+T bool failed() const throw();
+ };
+
+
+ Header &lt;algorithm&gt; synopsis
+
+
+ // _lib.alg.nonmodifying_, non-modifying sequence operations:
+T template&lt;class InputIterator, class Function&gt;
+ Function for_each(InputIterator first, InputIterator last, Function f);
+T template&lt;class InputIterator, class T&gt;
+ InputIterator find(InputIterator first, InputIterator last,
+ const T&amp; value);
+T template&lt;class InputIterator, class Predicate&gt;
+ InputIterator find_if(InputIterator first, InputIterator last,
+ Predicate pred);
+T template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ ForwardIterator1
+ find_end(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+T template&lt;class ForwardIterator1, class ForwardIterator2,
+ class BinaryPredicate&gt;
+ ForwardIterator1
+ find_end(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ BinaryPredicate pred);
+T template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ ForwardIterator1
+ find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+T template&lt;class ForwardIterator1, class ForwardIterator2,
+ class BinaryPredicate&gt;
+ ForwardIterator1
+ find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ BinaryPredicate pred);
+T template&lt;class ForwardIterator&gt;
+ ForwardIterator adjacent_find(ForwardIterator first,
+ ForwardIterator last);
+T template&lt;class ForwardIterator, class BinaryPredicate&gt;
+ ForwardIterator adjacent_find(ForwardIterator first,
+ ForwardIterator last, BinaryPredicate pred);
+T template&lt;class InputIterator, class T&gt;
+ typename iterator_traits&lt;InputIterator&gt;::difference_type
+ count(InputIterator first, InputIterator last, const T&amp; value);
+T template&lt;class InputIterator, class Predicate&gt;
+ typename iterator_traits&lt;InputIterator&gt;::difference_type
+ count_if(InputIterator first, InputIterator last, Predicate pred);
+T template&lt;class InputIterator1, class InputIterator2&gt;
+ pair&lt;InputIterator1, InputIterator2&gt;
+ mismatch(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2);
+T template&lt;class InputIterator1, class InputIterator2, class BinaryPredicate&gt;
+ pair&lt;InputIterator1, InputIterator2&gt;
+ mismatch(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, BinaryPredicate pred);
+
+T template&lt;class InputIterator1, class InputIterator2&gt;
+ bool equal(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2);
+T template&lt;class InputIterator1, class InputIterator2, class BinaryPredicate&gt;
+ bool equal(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, BinaryPredicate pred);
+T template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2);
+T template&lt;class ForwardIterator1, class ForwardIterator2,
+ class BinaryPredicate&gt;
+ ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
+ ForwardIterator2 first2, ForwardIterator2 last2,
+ BinaryPredicate pred);
+T template&lt;class ForwardIterator, class Size, class T&gt;
+ ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
+ Size count, const T&amp; value);
+T template&lt;class ForwardIterator, class Size, class T, class BinaryPredicate&gt;
+ ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
+ Size count, const T&amp; value,
+ BinaryPredicate pred);
+ // _lib.alg.modifying.operations_, modifying sequence operations:
+ // _lib.alg.copy_, copy:
+T template&lt;class InputIterator, class OutputIterator&gt;
+ OutputIterator copy(InputIterator first, InputIterator last,
+ OutputIterator result);
+T template&lt;class BidirectionalIterator1, class BidirectionalIterator2&gt;
+ BidirectionalIterator2
+ copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
+ BidirectionalIterator2 result);
+ // _lib.alg.swap_, swap:
+T template&lt;class T&gt; void swap(T&amp; a, T&amp; b);
+T template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ ForwardIterator2 swap_ranges(ForwardIterator1 first1,
+ ForwardIterator1 last1, ForwardIterator2 first2);
+T template&lt;class ForwardIterator1, class ForwardIterator2&gt;
+ void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
+T template&lt;class InputIterator, class OutputIterator, class UnaryOperation&gt;
+ OutputIterator transform(InputIterator first, InputIterator last,
+ OutputIterator result, UnaryOperation op);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class BinaryOperation&gt;
+ OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, OutputIterator result,
+ BinaryOperation binary_op);
+
+T template&lt;class ForwardIterator, class T&gt;
+ void replace(ForwardIterator first, ForwardIterator last,
+ const T&amp; old_value, const T&amp; new_value);
+T template&lt;class ForwardIterator, class Predicate, class T&gt;
+ void replace_if(ForwardIterator first, ForwardIterator last,
+ Predicate pred, const T&amp; new_value);
+T template&lt;class InputIterator, class OutputIterator, class T&gt;
+ OutputIterator replace_copy(InputIterator first, InputIterator last,
+ OutputIterator result,
+ const T&amp; old_value, const T&amp; new_value);
+T template&lt;class Iterator, class OutputIterator, class Predicate, class T&gt;
+ OutputIterator replace_copy_if(Iterator first, Iterator last,
+ OutputIterator result,
+ Predicate pred, const T&amp; new_value);
+T template&lt;class ForwardIterator, class T&gt;
+ void fill(ForwardIterator first, ForwardIterator last, const T&amp; value);
+T template&lt;class OutputIterator, class Size, class T&gt;
+ void fill_n(OutputIterator first, Size n, const T&amp; value);
+T template&lt;class ForwardIterator, class Generator&gt;
+ void generate(ForwardIterator first, ForwardIterator last, Generator gen);
+T template&lt;class OutputIterator, class Size, class Generator&gt;
+ void generate_n(OutputIterator first, Size n, Generator gen);
+T template&lt;class ForwardIterator, class T&gt;
+ ForwardIterator remove(ForwardIterator first, ForwardIterator last,
+ const T&amp; value);
+T template&lt;class ForwardIterator, class Predicate&gt;
+ ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
+ Predicate pred);
+T template&lt;class InputIterator, class OutputIterator, class T&gt;
+ OutputIterator remove_copy(InputIterator first, InputIterator last,
+ OutputIterator result, const T&amp; value);
+T template&lt;class InputIterator, class OutputIterator, class Predicate&gt;
+ OutputIterator remove_copy_if(InputIterator first, InputIterator last,
+ OutputIterator result, Predicate pred);
+T template&lt;class ForwardIterator&gt;
+ ForwardIterator unique(ForwardIterator first, ForwardIterator last);
+T template&lt;class ForwardIterator, class BinaryPredicate&gt;
+ ForwardIterator unique(ForwardIterator first, ForwardIterator last,
+ BinaryPredicate pred);
+T template&lt;class InputIterator, class OutputIterator&gt;
+ OutputIterator unique_copy(InputIterator first, InputIterator last,
+ OutputIterator result);
+T template&lt;class InputIterator, class OutputIterator, class BinaryPredicate&gt;
+ OutputIterator unique_copy(InputIterator first, InputIterator last,
+ OutputIterator result, BinaryPredicate pred);
+T template&lt;class BidirectionalIterator&gt;
+ void reverse(BidirectionalIterator first, BidirectionalIterator last);
+T template&lt;class BidirectionalIterator, class OutputIterator&gt;
+ OutputIterator reverse_copy(BidirectionalIterator first,
+ BidirectionalIterator last,
+ OutputIterator result);
+
+T template&lt;class ForwardIterator&gt;
+ void rotate(ForwardIterator first, ForwardIterator middle,
+ ForwardIterator last);
+T template&lt;class ForwardIterator, class OutputIterator&gt;
+ OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
+ ForwardIterator last, OutputIterator result);
+T template&lt;class RandomAccessIterator&gt;
+ void random_shuffle(RandomAccessIterator first,
+ RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class RandomNumberGenerator&gt;
+ void random_shuffle(RandomAccessIterator first,
+ RandomAccessIterator last,
+ RandomNumberGenerator&amp; rand);
+ // _lib.alg.partitions_, partitions:
+T template&lt;class BidirectionalIterator, class Predicate&gt;
+ BidirectionalIterator partition(BidirectionalIterator first,
+ BidirectionalIterator last,
+ Predicate pred);
+T template&lt;class BidirectionalIterator, class Predicate&gt;
+ BidirectionalIterator stable_partition(BidirectionalIterator first,
+ BidirectionalIterator last,
+ Predicate pred);
+ // _lib.alg.sorting_, sorting and related operations:
+ // _lib.alg.sort_, sorting:
+T template&lt;class RandomAccessIterator&gt;
+ void sort(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void sort(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+T template&lt;class RandomAccessIterator&gt;
+ void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+T template&lt;class RandomAccessIterator&gt;
+ void partial_sort(RandomAccessIterator first,
+ RandomAccessIterator middle,
+ RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void partial_sort(RandomAccessIterator first,
+ RandomAccessIterator middle,
+ RandomAccessIterator last, Compare comp);
+T template&lt;class InputIterator, class RandomAccessIterator&gt;
+ RandomAccessIterator
+ partial_sort_copy(InputIterator first, InputIterator last,
+ RandomAccessIterator result_first,
+ RandomAccessIterator result_last);
+T template&lt;class InputIterator, class RandomAccessIterator, class Compare&gt;
+ RandomAccessIterator
+ partial_sort_copy(InputIterator first, InputIterator last,
+ RandomAccessIterator result_first,
+ RandomAccessIterator result_last,
+ Compare comp);
+
+T template&lt;class RandomAccessIterator&gt;
+ void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
+ RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
+ RandomAccessIterator last, Compare comp);
+ // _lib.alg.binary.search_, binary search:
+T template&lt;class ForwardIterator, class T&gt;
+ ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
+ const T&amp; value);
+T template&lt;class ForwardIterator, class T, class Compare&gt;
+ ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
+ const T&amp; value, Compare comp);
+T template&lt;class ForwardIterator, class T&gt;
+ ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
+ const T&amp; value);
+T template&lt;class ForwardIterator, class T, class Compare&gt;
+ ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
+ const T&amp; value, Compare comp);
+T template&lt;class ForwardIterator, class T&gt;
+ pair&lt;ForwardIterator, ForwardIterator&gt;
+ equal_range(ForwardIterator first, ForwardIterator last,
+ const T&amp; value);
+T template&lt;class ForwardIterator, class T, class Compare&gt;
+ pair&lt;ForwardIterator, ForwardIterator&gt;
+ equal_range(ForwardIterator first, ForwardIterator last,
+ const T&amp; value, Compare comp);
+T template&lt;class ForwardIterator, class T&gt;
+ bool binary_search(ForwardIterator first, ForwardIterator last,
+ const T&amp; value);
+T template&lt;class ForwardIterator, class T, class Compare&gt;
+ bool binary_search(ForwardIterator first, ForwardIterator last,
+ const T&amp; value, Compare comp);
+ // _lib.alg.merge_, merge:
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;
+ OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class Compare&gt;
+ OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result, Compare comp);
+T template&lt;class BidirectionalIterator&gt;
+ void inplace_merge(BidirectionalIterator first,
+ BidirectionalIterator middle,
+ BidirectionalIterator last);
+T template&lt;class BidirectionalIterator, class Compare&gt;
+ void inplace_merge(BidirectionalIterator first,
+ BidirectionalIterator middle,
+ BidirectionalIterator last, Compare comp);
+
+ // _lib.alg.set.operations_, set operations:
+T template&lt;class InputIterator1, class InputIterator2&gt;
+ bool includes(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2);
+T template&lt;class InputIterator1, class InputIterator2, class Compare&gt;
+ bool includes(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2, Compare comp);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;
+ OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class Compare&gt;
+ OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result, Compare comp);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;
+ OutputIterator set_intersection
+ (InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class Compare&gt;
+ OutputIterator set_intersection
+ (InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result, Compare comp);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;
+ OutputIterator set_difference
+ (InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class Compare&gt;
+ OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result, Compare comp);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator&gt;
+ OutputIterator
+ set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result);
+T template&lt;class InputIterator1, class InputIterator2, class OutputIterator,
+ class Compare&gt;
+ OutputIterator
+ set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ OutputIterator result, Compare comp);
+ // _lib.alg.heap.operations_, heap operations:
+T template&lt;class RandomAccessIterator&gt;
+ void push_heap(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void push_heap(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+
+T template&lt;class RandomAccessIterator&gt;
+ void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+T template&lt;class RandomAccessIterator&gt;
+ void make_heap(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void make_heap(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+T template&lt;class RandomAccessIterator&gt;
+ void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
+T template&lt;class RandomAccessIterator, class Compare&gt;
+ void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
+ Compare comp);
+ // _lib.alg.min.max_, minimum and maximum:
+T template&lt;class T&gt; const T&amp; min(const T&amp; a, const T&amp; b);
+T template&lt;class T, class Compare&gt;
+ const T&amp; min(const T&amp; a, const T&amp; b, Compare comp);
+T template&lt;class T&gt; const T&amp; max(const T&amp; a, const T&amp; b);
+T template&lt;class T, class Compare&gt;
+ const T&amp; max(const T&amp; a, const T&amp; b, Compare comp);
+T template&lt;class ForwardIterator&gt;
+ ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
+T template&lt;class ForwardIterator, class Compare&gt;
+ ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
+ Compare comp);
+T template&lt;class ForwardIterator&gt;
+ ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
+T template&lt;class ForwardIterator, class Compare&gt;
+ ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
+ Compare comp);
+T template&lt;class InputIterator1, class InputIterator2&gt;
+ bool lexicographical_compare
+ (InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2);
+T template&lt;class InputIterator1, class InputIterator2, class Compare&gt;
+ bool lexicographical_compare
+ (InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ Compare comp);
+
+ // _lib.alg.permutation.generators_, permutations
+T template&lt;class BidirectionalIterator&gt;
+ bool next_permutation(BidirectionalIterator first,
+ BidirectionalIterator last);
+T template&lt;class BidirectionalIterator, class Compare&gt;
+ bool next_permutation(BidirectionalIterator first,
+ BidirectionalIterator last, Compare comp);
+T template&lt;class BidirectionalIterator&gt;
+ bool prev_permutation(BidirectionalIterator first,
+ BidirectionalIterator last);
+T template&lt;class BidirectionalIterator, class Compare&gt;
+ bool prev_permutation(BidirectionalIterator first,
+ BidirectionalIterator last, Compare comp);
+
+
+ 25.4 C library algorithms [lib.alg.c.library]
+
+ 1 Header &lt;cstdlib&gt; (partial, Table 2):
+
+ Table 2--Header &lt;cstdlib&gt; synopsis
+
+ Functions: bsearch qsort
+
+
+X extern "C" void *bsearch(const void *key, const void *base,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+X extern "C++" void *bsearch(const void *key, const void *base,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+X extern "C" void qsort(void* base, size_t nmemb, size_t size,
+ int (*compar)(const void*, const void*));
+X extern "C++" void qsort(void* base, size_t nmemb, size_t size,
+ int (*compar)(const void*, const void*));
+
+
+
+ 26.2 Complex numbers [lib.complex.numbers]
+
+
+ 26.2.1 Header &lt;complex&gt; synopsis [lib.complex.synopsis]
+
+T template&lt;class T&gt; class complex;
+T template&lt;&gt; class complex&lt;float&gt;;
+T template&lt;&gt; class complex&lt;double&gt;;
+T template&lt;&gt; class complex&lt;long double&gt;;
+ // _lib.complex.ops_ operators:
+T template&lt;class T&gt;
+ complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator*
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator*(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator*(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator/
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator/(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator/(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator==
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator==(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator!=(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T, class charT, class traits&gt;
+ basic_istream&lt;charT, traits&gt;&amp;
+ operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp;, complex&lt;T&gt;&amp;);
+
+T template&lt;class T, class charT, class traits&gt;
+ basic_ostream&lt;charT, traits&gt;&amp;
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp;, const complex&lt;T&gt;&amp;);
+ // _lib.complex.value.ops_ values:
+T template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; T arg(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; T norm(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; conj(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;);
+ // _lib.complex.transcendentals_ transcendentals:
+T template&lt;class T&gt; complex&lt;T&gt; cos (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; cosh (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; exp (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; log (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; log10(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, int);
+T template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; pow(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; pow(const T&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; sin (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; sinh (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; sqrt (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; tan (const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; tanh (const complex&lt;T&gt;&amp;);
+ }
+
+ 26.2.2 Template class complex [lib.complex]
+
+ template&lt;class T&gt;
+T class complex {
+ public:
+T typedef T value_type;
+
+T complex(const T&amp; re = T(), const T&amp; im = T());
+T complex(const complex&amp;);
+T template&lt;class X&gt; complex(const complex&lt;X&gt;&amp;);
+
+T T real() const;
+T T imag() const;
+
+T complex&lt;T&gt;&amp; operator= (const T&amp;);
+T complex&lt;T&gt;&amp; operator+=(const T&amp;);
+T complex&lt;T&gt;&amp; operator-=(const T&amp;);
+T complex&lt;T&gt;&amp; operator*=(const T&amp;);
+T complex&lt;T&gt;&amp; operator/=(const T&amp;);
+
+T complex&amp; operator=(const complex&amp;);
+T template&lt;class X&gt; complex&lt;T&gt;&amp; operator= (const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;T&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;T&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;T&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;T&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);
+ };
+
+T template&lt;class T&gt; complex&lt;T&gt; operator+
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; complex&lt;T&gt; operator-
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; complex&lt;T&gt; operator*
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator*(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator*(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; complex&lt;T&gt; operator/
+ (const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator/(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator/(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; complex&lt;T&gt; operator+(const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; complex&lt;T&gt; operator-(const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator==(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator==(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const complex&lt;T&gt;&amp;);
+T template&lt;class T&gt; bool operator!=(const complex&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; bool operator!=(const T&amp;, const complex&lt;T&gt;&amp;);
+
+T template&lt;class T, class charT, class traits&gt;
+ basic_istream&lt;charT, traits&gt;&amp;
+ operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp;, complex&lt;T&gt;&amp;);
+
+T template&lt;class T, class charT, class traits&gt;
+ basic_ostream&lt;charT, traits&gt;&amp;
+ operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp;, const complex&lt;T&gt;&amp;);
+
+
+ 26.2.3 complex specializations [lib.complex.special]
+
+T template&lt;&gt; class complex&lt;float&gt; {
+ public:
+T typedef float value_type;
+
+T complex(float re = 0.0f, float im = 0.0f);
+T explicit complex(const complex&lt;double&gt;&amp;);
+T explicit complex(const complex&lt;long double&gt;&amp;);
+T float real() const;
+T float imag() const;
+
+T complex&lt;float&gt;&amp; operator= (float);
+T complex&lt;float&gt;&amp; operator+=(float);
+T complex&lt;float&gt;&amp; operator-=(float);
+T complex&lt;float&gt;&amp; operator*=(float);
+T complex&lt;float&gt;&amp; operator/=(float);
+
+T complex&lt;float&gt;&amp; operator=(const complex&lt;float&gt;&amp;);
+T template&lt;class X&gt; complex&lt;float&gt;&amp; operator= (const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;float&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;float&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;float&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;float&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);
+ };
+T template&lt;&gt; class complex&lt;double&gt; {
+ public:
+T typedef double value_type;
+
+T complex(double re = 0.0, double im = 0.0);
+T complex(const complex&lt;float&gt;&amp;);
+T explicit complex(const complex&lt;long double&gt;&amp;);
+T double real() const;
+T double imag() const;
+
+T complex&lt;double&gt;&amp; operator= (double);
+T complex&lt;double&gt;&amp; operator+=(double);
+T complex&lt;double&gt;&amp; operator-=(double);
+T complex&lt;double&gt;&amp; operator*=(double);
+T complex&lt;double&gt;&amp; operator/=(double);
+
+T complex&lt;double&gt;&amp; operator=(const complex&lt;double&gt;&amp;);
+T template&lt;class X&gt; complex&lt;double&gt;&amp; operator= (const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;double&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;double&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;double&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;double&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);
+ };
+
+T template&lt;&gt; class complex&lt;long double&gt; {
+ public:
+T typedef long double value_type;
+
+T complex(long double re = 0.0L, long double im = 0.0L);
+T complex(const complex&lt;float&gt;&amp;);
+T complex(const complex&lt;double&gt;&amp;);
+T long double real() const;
+T long double imag() const;
+
+T complex&lt;long double&gt;&amp; operator=(const complex&lt;long double&gt;&amp;);
+T complex&lt;long double&gt;&amp; operator= (long double);
+T complex&lt;long double&gt;&amp; operator+=(long double);
+T complex&lt;long double&gt;&amp; operator-=(long double);
+T complex&lt;long double&gt;&amp; operator*=(long double);
+T complex&lt;long double&gt;&amp; operator/=(long double);
+
+T template&lt;class X&gt; complex&lt;long double&gt;&amp; operator= (const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;long double&gt;&amp; operator+=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;long double&gt;&amp; operator-=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;long double&gt;&amp; operator*=(const complex&lt;X&gt;&amp;);
+T template&lt;class X&gt; complex&lt;long double&gt;&amp; operator/=(const complex&lt;X&gt;&amp;);
+ };
+
+ 26.3 Numeric arrays [lib.numarray]
+
+ 26.3.1 Header &lt;valarray&gt; synopsis [lib.valarray.synopsis]
+
+T template&lt;class T&gt; class valarray; // An array of type T
+T class slice;
+T template&lt;class T&gt; class slice_array;
+T class gslice;
+T template&lt;class T&gt; class gslice_array;
+T template&lt;class T&gt; class mask_array; // a masked array
+T template&lt;class T&gt; class indirect_array; // an indirected array
+
+T template&lt;class T&gt; valarray&lt;T&gt; operator*
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator* (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator* (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator/
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator/ (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator/ (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator%
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator% (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator% (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator+
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator+ (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator+ (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator-
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator- (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator- (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator^
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator^ (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator^ (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&amp;
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&amp; (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&amp; (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator|
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator| (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator| (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&lt;&lt;(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; operator&gt;&gt;(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&amp;&amp;(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator||
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator||(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator||(const T&amp;, const valarray&lt;T&gt;&amp;);
+
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator==(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator==(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator==(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator!=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator!=(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator!=(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator&lt; (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&lt; (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&lt; (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator&gt; (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&gt; (const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&gt; (const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator&lt;=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&lt;=(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&lt;=(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt;
+ valarray&lt;bool&gt; operator&gt;=(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&gt;=(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;bool&gt; operator&gt;=(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; abs (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; acos (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; asin (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; atan (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; atan2
+ (const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; atan2(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; atan2(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; cos (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; cosh (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; exp (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; log (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; log10(const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; pow(const valarray&lt;T&gt;&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; pow(const valarray&lt;T&gt;&amp;, const T&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; pow(const T&amp;, const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; sin (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; sinh (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; sqrt (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; tan (const valarray&lt;T&gt;&amp;);
+T template&lt;class T&gt; valarray&lt;T&gt; tanh (const valarray&lt;T&gt;&amp;);
+ }
+
+
+ 26.3.2 Template class valarray [lib.template.valarray]
+
+T template&lt;class T&gt; class valarray {
+ public:
+T typedef T value_type;
+
+ // _lib.valarray.cons_ construct/destroy:
+T valarray();
+T explicit valarray(size_t);
+T valarray(const T&amp;, size_t);
+T valarray(const T*, size_t);
+T valarray(const valarray&amp;);
+T valarray(const slice_array&lt;T&gt;&amp;);
+T valarray(const gslice_array&lt;T&gt;&amp;);
+T valarray(const mask_array&lt;T&gt;&amp;);
+T valarray(const indirect_array&lt;T&gt;&amp;);
+T ~valarray();
+
+ // _lib.valarray.assign_ assignment:
+T valarray&lt;T&gt;&amp; operator=(const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator=(const T&amp;);
+T valarray&lt;T&gt;&amp; operator=(const slice_array&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator=(const gslice_array&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator=(const mask_array&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator=(const indirect_array&lt;T&gt;&amp;);
+ // _lib.valarray.access_ element access:
+T T operator[](size_t) const;
+T T&amp; operator[](size_t);
+ // _lib.valarray.sub_ subset operations:
+T valarray&lt;T&gt; operator[](slice) const;
+T slice_array&lt;T&gt; operator[](slice);
+T valarray&lt;T&gt; operator[](const gslice&amp;) const;
+T gslice_array&lt;T&gt; operator[](const gslice&amp;);
+T valarray&lt;T&gt; operator[](const valarray&lt;bool&gt;&amp;) const;
+T mask_array&lt;T&gt; operator[](const valarray&lt;bool&gt;&amp;);
+T valarray&lt;T&gt; operator[](const valarray&lt;size_t&gt;&amp;) const;
+T indirect_array&lt;T&gt; operator[](const valarray&lt;size_t&gt;&amp;);
+ // _lib.valarray.unary_ unary operators:
+T valarray&lt;T&gt; operator+() const;
+T valarray&lt;T&gt; operator-() const;
+T valarray&lt;T&gt; operator~() const;
+T valarray&lt;T&gt; operator!() const;
+ // _lib.valarray.cassign_ computed assignment:
+T valarray&lt;T&gt;&amp; operator*= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator/= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator%= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator+= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator-= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator^= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator&amp;= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator|= (const T&amp;);
+T valarray&lt;T&gt;&amp; operator&lt;&lt;=(const T&amp;);
+T valarray&lt;T&gt;&amp; operator&gt;&gt;=(const T&amp;);
+T valarray&lt;T&gt;&amp; operator*= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator/= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator%= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator+= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator-= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator^= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator|= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator&amp;= (const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator&lt;&lt;=(const valarray&lt;T&gt;&amp;);
+T valarray&lt;T&gt;&amp; operator&gt;&gt;=(const valarray&lt;T&gt;&amp;);
+ // _lib.valarray.members_ member functions:
+T size_t size() const;
+T T sum() const;
+T T min() const;
+T T max() const;
+
+T valarray&lt;T&gt; shift (int) const;
+T valarray&lt;T&gt; cshift(int) const;
+T valarray&lt;T&gt; apply(T func(T)) const;
+T valarray&lt;T&gt; apply(T func(const T&amp;)) const;
+T void resize(size_t sz, T c = T());
+ };
+ }
+
+
+
+ 26.3.4 Class slice [lib.class.slice]
+
+T class slice {
+ public:
+T slice();
+T slice(size_t, size_t, size_t);
+
+T size_t start() const;
+T size_t size() const;
+T size_t stride() const;
+ };
+ }
+
+
+
+ 26.3.5 Template class slice_array [lib.template.slice.array]
+
+T template &lt;class T&gt; class slice_array {
+ public:
+T typedef T value_type;
+
+T void operator= (const valarray&lt;T&gt;&amp;) const;
+T void operator*= (const valarray&lt;T&gt;&amp;) const;
+T void operator/= (const valarray&lt;T&gt;&amp;) const;
+T void operator%= (const valarray&lt;T&gt;&amp;) const;
+T void operator+= (const valarray&lt;T&gt;&amp;) const;
+T void operator-= (const valarray&lt;T&gt;&amp;) const;
+T void operator^= (const valarray&lt;T&gt;&amp;) const;
+T void operator&amp;= (const valarray&lt;T&gt;&amp;) const;
+T void operator|= (const valarray&lt;T&gt;&amp;) const;
+T void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator=(const T&amp;);
+T ~slice_array();
+ private:
+T slice_array();
+T slice_array(const slice_array&amp;);
+T slice_array&amp; operator=(const slice_array&amp;);
+ };
+ }
+
+
+
+ 26.3.6 The gslice class [lib.class.gslice]
+
+T class gslice {
+ public:
+T gslice();
+T gslice(size_t s, const valarray&lt;size_t&gt;&amp; l, const valarray&lt;size_t&gt;&amp; d);
+
+T size_t start() const;
+T valarray&lt;size_t&gt; size() const;
+T valarray&lt;size_t&gt; stride() const;
+ };
+
+
+ 26.3.7 Template class gslice_array [lib.template.gslice.array]
+
+T template &lt;class T&gt; class gslice_array {
+ public:
+T typedef T value_type;
+
+T void operator= (const valarray&lt;T&gt;&amp;) const;
+T void operator*= (const valarray&lt;T&gt;&amp;) const;
+T void operator/= (const valarray&lt;T&gt;&amp;) const;
+T void operator%= (const valarray&lt;T&gt;&amp;) const;
+T void operator+= (const valarray&lt;T&gt;&amp;) const;
+T void operator-= (const valarray&lt;T&gt;&amp;) const;
+T void operator^= (const valarray&lt;T&gt;&amp;) const;
+T void operator&amp;= (const valarray&lt;T&gt;&amp;) const;
+T void operator|= (const valarray&lt;T&gt;&amp;) const;
+T void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator=(const T&amp;);
+T ~gslice_array();
+ private:
+T gslice_array();
+T gslice_array(const gslice_array&amp;);
+T gslice_array&amp; operator=(const gslice_array&amp;);
+ };
+
+
+ 26.3.8 Template class mask_array [lib.template.mask.array]
+
+T template &lt;class T&gt; class mask_array {
+ public:
+T typedef T value_type;
+
+T void operator= (const valarray&lt;T&gt;&amp;) const;
+T void operator*= (const valarray&lt;T&gt;&amp;) const;
+T void operator/= (const valarray&lt;T&gt;&amp;) const;
+T void operator%= (const valarray&lt;T&gt;&amp;) const;
+T void operator+= (const valarray&lt;T&gt;&amp;) const;
+T void operator-= (const valarray&lt;T&gt;&amp;) const;
+T void operator^= (const valarray&lt;T&gt;&amp;) const;
+T void operator&amp;= (const valarray&lt;T&gt;&amp;) const;
+T void operator|= (const valarray&lt;T&gt;&amp;) const;
+T void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator=(const T&amp;);
+T ~mask_array();
+ private:
+T mask_array();
+T mask_array(const mask_array&amp;);
+T mask_array&amp; operator=(const mask_array&amp;);
+ // remainder implementation defined
+ };
+
+
+ 26.3.9 Template class [lib.template.indirect.array]
+ indirect_array
+
+T template &lt;class T&gt; class indirect_array {
+ public:
+T typedef T value_type;
+
+T void operator= (const valarray&lt;T&gt;&amp;) const;
+T void operator*= (const valarray&lt;T&gt;&amp;) const;
+T void operator/= (const valarray&lt;T&gt;&amp;) const;
+T void operator%= (const valarray&lt;T&gt;&amp;) const;
+T void operator+= (const valarray&lt;T&gt;&amp;) const;
+T void operator-= (const valarray&lt;T&gt;&amp;) const;
+T void operator^= (const valarray&lt;T&gt;&amp;) const;
+T void operator&amp;= (const valarray&lt;T&gt;&amp;) const;
+T void operator|= (const valarray&lt;T&gt;&amp;) const;
+T void operator&lt;&lt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator&gt;&gt;=(const valarray&lt;T&gt;&amp;) const;
+T void operator=(const T&amp;);
+T ~indirect_array();
+ private:
+T indirect_array();
+T indirect_array(const indirect_array&amp;);
+T indirect_array&amp; operator=(const indirect_array&amp;);
+ // remainder implementation defined
+ };
+
+ 26.4 Generalized numeric operations [lib.numeric.ops]
+
+ Header &lt;numeric&gt; synopsis
+
+T template &lt;class InputIterator, class T&gt;
+ T accumulate(InputIterator first, InputIterator last, T init);
+
+T template &lt;class InputIterator, class T, class BinaryOperation&gt;
+ T accumulate(InputIterator first, InputIterator last, T init,
+ BinaryOperation binary_op);
+
+T template &lt;class InputIterator1, class InputIterator2, class T&gt;
+ T inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init);
+
+T template &lt;class InputIterator1, class InputIterator2, class T,
+ class BinaryOperation1, class BinaryOperation2&gt;
+ T inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init,
+ BinaryOperation1 binary_op1,
+ BinaryOperation2 binary_op2);
+
+T template &lt;class InputIterator, class OutputIterator&gt;
+ OutputIterator partial_sum(InputIterator first,
+ InputIterator last,
+ OutputIterator result);
+
+T template &lt;class InputIterator, class OutputIterator,
+ class BinaryOperation&gt;
+ OutputIterator partial_sum(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ BinaryOperation binary_op);
+
+T template &lt;class InputIterator, class OutputIterator&gt;
+ OutputIterator adjacent_difference(InputIterator first,
+ InputIterator last,
+ OutputIterator result);
+
+T template &lt;class InputIterator, class OutputIterator,
+ class BinaryOperation&gt;
+ OutputIterator adjacent_difference(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ BinaryOperation binary_op);
+
+
+ 26.5 C Library [lib.c.math]
+
+ Table 2--Header &lt;cmath&gt; synopsis
+X Macro: HUGE_VAL
+ Functions:
+X acos cos fmod modf tan
+X asin cosh frexp pow tanh
+X atan exp ldexp sin
+X atan2 fabs log sinh
+X ceil floor log10 sqrt
+
+ Table 3--Header &lt;cstdlib&gt; synopsis
+X Macros: RAND_MAX
+X Types: div_t ldiv_t
+ Functions:
+X abs labs srand
+X div ldiv rand
+
+X long abs(long); // labs()
+X ldiv_t div(long, long); // ldiv()
+
+X float abs (float);
+X float acos (float);
+X float asin (float);
+X float atan (float);
+X float atan2(float, float);
+X float ceil (float);
+X float cos (float);
+X float cosh (float);
+X float exp (float);
+X float fabs (float);
+X float floor(float);
+X float fmod (float, float);
+X float frexp(float, int*);
+X float ldexp(float, int);
+X float log (float);
+X float log10(float);
+X float modf (float, float*);
+X float pow (float, float);
+X float pow (float, int);
+X float sin (float);
+X float sinh (float);
+X float sqrt (float);
+X float tan (float);
+X float tanh (float);
+
+X double abs(double); // fabs()
+X double pow(double, int);
+
+X long double abs (long double);
+X long double acos (long double);
+X long double asin (long double);
+X long double atan (long double);
+X long double atan2(long double, long double);
+X long double ceil (long double);
+X long double cos (long double);
+X long double cosh (long double);
+X long double exp (long double);
+X long double fabs (long double);
+X long double floor(long double);
+X long double fmod (long double, long double);
+X long double frexp(long double, int*);
+X long double ldexp(long double, int);
+X long double log (long double);
+X long double log10(long double);
+X long double modf (long double, long double*);
+X long double pow (long double, long double);
+X long double pow (long double, int);
+X long double sin (long double);
+X long double sinh (long double);
+X long double sqrt (long double);
+X long double tan (long double);
+X long double tanh (long double);
+
+ Header &lt;iosfwd&gt; synopsis
+
+X template&lt;class charT&gt; class char_traits;
+X template&lt;&gt; class char_traits&lt;char&gt;;
+X template&lt;&gt; class char_traits&lt;wchar_t&gt;;
+X template&lt;class T&gt; class allocator;
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ios;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_streambuf;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_istream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ostream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_iostream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_stringbuf;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_istringstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_ostringstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_stringstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_filebuf;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ifstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ofstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_fstream;
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class istreambuf_iterator;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class ostreambuf_iterator;
+X typedef basic_ios&lt;char&gt; ios;
+X typedef basic_ios&lt;wchar_t&gt; wios;
+X typedef basic_streambuf&lt;char&gt; streambuf;
+X typedef basic_istream&lt;char&gt; istream;
+X typedef basic_ostream&lt;char&gt; ostream;
+X typedef basic_iostream&lt;char&gt; iostream;
+X typedef basic_stringbuf&lt;char&gt; stringbuf;
+X typedef basic_istringstream&lt;char&gt; istringstream;
+X typedef basic_ostringstream&lt;char&gt; ostringstream;
+X typedef basic_stringstream&lt;char&gt; stringstream;
+X typedef basic_filebuf&lt;char&gt; filebuf;
+X typedef basic_ifstream&lt;char&gt; ifstream;
+X typedef basic_ofstream&lt;char&gt; ofstream;
+X typedef basic_fstream&lt;char&gt; fstream;
+X typedef basic_streambuf&lt;wchar_t&gt; wstreambuf;
+X typedef basic_istream&lt;wchar_t&gt; wistream;
+X typedef basic_ostream&lt;wchar_t&gt; wostream;
+X typedef basic_iostream&lt;wchar_t&gt; wiostream;
+X typedef basic_stringbuf&lt;wchar_t&gt; wstringbuf;
+X typedef basic_istringstream&lt;wchar_t&gt; wistringstream;
+X typedef basic_ostringstream&lt;wchar_t&gt; wostringstream;
+X typedef basic_stringstream&lt;wchar_t&gt; wstringstream;
+
+X typedef basic_filebuf&lt;wchar_t&gt; wfilebuf;
+X typedef basic_ifstream&lt;wchar_t&gt; wifstream;
+X typedef basic_ofstream&lt;wchar_t&gt; wofstream;
+X typedef basic_fstream&lt;wchar_t&gt; wfstream;
+X template &lt;class state&gt; class fpos;
+X typedef fpos&lt;char_traits&lt;char&gt;::state_type&gt; streampos;
+X typedef fpos&lt;char_traits&lt;wchar_t&gt;::state_type&gt; wstreampos;
+
+ 27.3 Standard iostream objects [lib.iostream.objects]
+
+ Header &lt;iostream&gt; synopsis
+
+T [must also include &lt;istream&gt; and &lt;ostream&gt;]
+T extern istream cin;
+T extern ostream cout;
+T extern ostream cerr;
+T extern ostream clog;
+
+T extern wistream wcin;
+T extern wostream wcout;
+T extern wostream wcerr;
+T extern wostream wclog;
+
+ 27.4 Iostreams base classes [lib.iostreams.base]
+
+ Header &lt;ios&gt; synopsis
+
+ #include &lt;iosfwd&gt;
+
+T typedef OFF_T streamoff;
+T typedef SZ_T streamsize;
+T template &lt;class stateT&gt; class fpos;
+
+ class ios_base;
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ios;
+ // _lib.std.ios.manip_, manipulators:
+T ios_base&amp; boolalpha (ios_base&amp; str);
+T ios_base&amp; noboolalpha(ios_base&amp; str);
+T ios_base&amp; showbase (ios_base&amp; str);
+T ios_base&amp; noshowbase (ios_base&amp; str);
+T ios_base&amp; showpoint (ios_base&amp; str);
+T ios_base&amp; noshowpoint(ios_base&amp; str);
+T ios_base&amp; showpos (ios_base&amp; str);
+T ios_base&amp; noshowpos (ios_base&amp; str);
+T ios_base&amp; skipws (ios_base&amp; str);
+T ios_base&amp; noskipws (ios_base&amp; str);
+T ios_base&amp; nouppercase(ios_base&amp; str);
+T ios_base&amp; uppercase (ios_base&amp; str);
+M ios_base&amp; unitbuf (ios_base&amp; str);
+M ios_base&amp; nounitbuf (ios_base&amp; str);
+ // _lib.adjustfield.manip_ adjustfield:
+T ios_base&amp; internal (ios_base&amp; str);
+T ios_base&amp; left (ios_base&amp; str);
+T ios_base&amp; right (ios_base&amp; str);
+ // _lib.basefield.manip_ basefield:
+T ios_base&amp; dec (ios_base&amp; str);
+T ios_base&amp; hex (ios_base&amp; str);
+T ios_base&amp; oct (ios_base&amp; str);
+
+ // _lib.floatfield.manip_ floatfield:
+T ios_base&amp; fixed (ios_base&amp; str);
+T ios_base&amp; scientific (ios_base&amp; str);
+
+
+ 27.4.2 Class ios_base [lib.ios.base]
+
+T class ios_base {
+ public:
+ class failure;
+T typedef T1 fmtflags;
+T static const fmtflags boolalpha;
+T static const fmtflags dec;
+T static const fmtflags fixed;
+T static const fmtflags hex;
+T static const fmtflags internal;
+T static const fmtflags left;
+T static const fmtflags oct;
+T static const fmtflags right;
+T static const fmtflags scientific;
+T static const fmtflags showbase;
+T static const fmtflags showpoint;
+T static const fmtflags showpos;
+T static const fmtflags skipws;
+X static const fmtflags unitbuf;
+T static const fmtflags uppercase;
+T static const fmtflags adjustfield;
+T static const fmtflags basefield;
+T static const fmtflags floatfield;
+
+ typedef T2 iostate;
+T static const iostate badbit;
+T static const iostate eofbit;
+T static const iostate failbit;
+T static const iostate goodbit;
+T typedef T3 openmode;
+T static const openmode app;
+T static const openmode ate;
+T static const openmode binary;
+T static const openmode in;
+T static const openmode out;
+T static const openmode trunc;
+T typedef T4 seekdir;
+T static const seekdir beg;
+T static const seekdir cur;
+T static const seekdir end;
+T class Init;
+ // _lib.fmtflags.state_ fmtflags state:
+T fmtflags flags() const;
+T fmtflags flags(fmtflags fmtfl);
+T fmtflags setf(fmtflags fmtfl);
+T fmtflags setf(fmtflags fmtfl, fmtflags mask);
+T void unsetf(fmtflags mask);
+T streamsize precision() const;
+T streamsize precision(streamsize prec);
+T streamsize width() const;
+T streamsize width(streamsize wide);
+ // _lib.ios.base.locales_ locales:
+T locale imbue(const locale&amp; loc);
+T locale getloc() const;
+ // _lib.ios.base.storage_ storage:
+T static int xalloc();
+T long&amp; iword(int index);
+T void*&amp; pword(int index);
+ // destructor
+T virtual ~ios_base();
+ // _lib.ios.base.callback_ callbacks;
+T enum event { erase_event, imbue_event, copyfmt_event };
+T typedef void (*event_callback)(event, ios_base&amp;, int index);
+T void register_callback(event_call_back fn, int index);
+T static bool sync_with_stdio(bool sync = true);
+ protected:
+T ios_base();
+ };
+
+ 27.4.2.1.1 Class ios_base::failure [lib.ios::failure]
+
+T class ios_base::failure : public exception {
+ public:
+T explicit failure(const string&amp; msg);
+T virtual ~failure();
+T virtual const char* what() const throw();
+ };
+
+
+ 27.4.2.1.6 Class ios_base::Init [lib.ios::Init]
+
+T class ios_base::Init {
+ public:
+T Init();
+T ~Init();
+ };
+
+
+ 27.4.3 Template class fpos [lib.fpos]
+
+X template &lt;class stateT&gt; class fpos {
+ public:
+ // _lib.fpos.members_ Members
+T stateT state() const;
+T void state(stateT);
+ private;
+T stateT st; // exposition only
+ };
+
+
+ 27.4.5 Template class basic_ios [lib.ios]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_ios : public ios_base {
+ public:
+
+ // Types:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+T operator void*() const
+T bool operator!() const
+T iostate rdstate() const;
+T void clear(iostate state = goodbit);
+T void setstate(iostate state);
+T bool good() const;
+T bool eof() const;
+T bool fail() const;
+T bool bad() const;
+T iostate exceptions() const;
+T void exceptions(iostate except);
+ // _lib.basic.ios.cons_ Constructor/destructor:
+T explicit basic_ios(basic_streambuf&lt;charT,traits&gt;* sb);
+T virtual ~basic_ios();
+ // _lib.basic.ios.members_ Members:
+T basic_ostream&lt;charT,traits&gt;* tie() const;
+T basic_ostream&lt;charT,traits&gt;* tie(basic_ostream&lt;charT,traits&gt;* tiestr);
+T basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
+T basic_streambuf&lt;charT,traits&gt;* rdbuf(basic_streambuf&lt;charT,traits&gt;* sb);
+X basic_ios&amp; copyfmt(const basic_ios&amp; rhs);
+T char_type fill() const;
+T char_type fill(char_type ch);
+ // _lib.ios.base.locales_ locales:
+T locale imbue(const locale&amp; loc);
+X char narrow(char_type c, char dfault) const;
+X char_type widen(char c) const;
+ protected:
+ basic_ios();
+T void init(basic_streambuf&lt;charT,traits&gt;* sb);
+ private:
+T basic_ios(const basic_ios&amp; ); // not defined
+T basic_ios&amp; operator=(const basic_ios&amp;); // not defined
+ };
+
+
+ 27.5 Stream buffers [lib.stream.buffers]
+
+ Header &lt;streambuf&gt; synopsis
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_streambuf;
+T typedef basic_streambuf&lt;char&gt; streambuf;
+T typedef basic_streambuf&lt;wchar_t&gt; wstreambuf;
+
+ 27.5.2 Template class [lib.streambuf]
+ basic_streambuf&lt;charT,traits&gt;
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_streambuf {
+ public:
+
+ // Types:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+T virtual ~basic_streambuf();
+ // _lib.streambuf.locales_ locales:
+T locale pubimbue(const locale &amp;loc);
+T locale getloc() const;
+ // _lib.streambuf.buffer_ buffer and positioning:
+T basic_streambuf&lt;char_type,traits&gt;*
+ pubsetbuf(char_type* s, streamsize n);
+T pos_type pubseekoff(off_type off, ios_base::seekdir way,
+ ios_base::openmode which =
+ ios_base::in | ios_base::out);
+T pos_type pubseekpos(pos_type sp,
+ ios_base::openmode which =
+ ios_base::in | ios_base::out);
+T int pubsync();
+
+ // Get and put areas:
+ // _lib.streambuf.pub.get_ Get area:
+T streamsize in_avail();
+T int_type snextc();
+T int_type sbumpc();
+T int_type sgetc();
+T streamsize sgetn(char_type* s, streamsize n);
+ // _lib.streambuf.pub.pback_ Putback:
+X int_type sputbackc(char_type c);
+X int_type sungetc();
+ // _lib.streambuf.pub.put_ Put area:
+T int_type sputc(char_type c);
+X streamsize sputn(const char_type* s, streamsize n);
+ protected:
+T basic_streambuf();
+ // _lib.streambuf.get.area_ Get area:
+T char_type* eback() const;
+T char_type* gptr() const;
+T char_type* egptr() const;
+T void gbump(int n);
+T void setg(char_type* gbeg, char_type* gnext, char_type* gend);
+ // _lib.streambuf.put.area_ Put area:
+T char_type* pbase() const;
+T char_type* pptr() const;
+T char_type* epptr() const;
+T void pbump(int n);
+T void setp(char_type* pbeg, char_type* pend);
+ // _lib.streambuf.virtuals_ virtual functions:
+ // _lib.streambuf.virt.locales_ Locales:
+T virtual void imbue(const locale &amp;loc);
+ // _lib.streambuf.virt.buffer_ Buffer management and positioning:
+T virtual basic_streambuf&lt;char_type,traits&gt;*
+ setbuf(char_type* s, streamsize n);
+T virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+ ios_base::openmode which = ios_base::in | ios_base::out);
+T virtual pos_type seekpos(pos_type sp,
+ ios_base::openmode which = ios_base::in | ios_base::out);
+T virtual int sync();
+ // _lib.streambuf.virt.get_ Get area:
+T virtual int showmanyc();
+T virtual streamsize xsgetn(char_type* s, streamsize n);
+T virtual int_type underflow();
+T virtual int_type uflow();
+ // _lib.streambuf.virt.pback_ Putback:
+T virtual int_type pbackfail(int_type c = traits::eof());
+ // _lib.streambuf.virt.put_ Put area:
+X virtual streamsize xsputn(const char_type* s, streamsize n);
+T virtual int_type overflow (int_type c = traits::eof());
+ };
+
+ 27.6 Formatting and manipulators [lib.iostream.format]
+
+ Header &lt;istream&gt; synopsis
+
+T template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_istream;
+T typedef basic_istream&lt;char&gt; istream;
+T typedef basic_istream&lt;wchar_t&gt; wistream;
+
+T template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_iostream;
+T typedef basic_iostream&lt;char&gt; iostream;
+T typedef basic_iostream&lt;wchar_t&gt; wiostream;
+
+X template &lt;class charT, class traits&gt;
+ basic_istream&lt;charT,traits&gt;&amp; ws(basic_istream&lt;charT,traits&gt;&amp; is);
+
+ Header &lt;ostream&gt; synopsis
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ostream;
+T typedef basic_ostream&lt;char&gt; ostream;
+T typedef basic_ostream&lt;wchar_t&gt; wostream;
+
+T template &lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; endl(basic_ostream&lt;charT,traits&gt;&amp; os);
+T template &lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; ends(basic_ostream&lt;charT,traits&gt;&amp; os);
+T template &lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; flush(basic_ostream&lt;charT,traits&gt;&amp; os);
+
+ Header &lt;iomanip&gt; synopsis
+
+ // Types T1, T2, ... are unspecified implementation types
+T T1 resetiosflags(ios_base::fmtflags mask);
+T T2 setiosflags (ios_base::fmtflags mask);
+T T3 setbase(int base);
+T template&lt;charT&gt; T4 setfill(charT c);
+T T5 setprecision(int n);
+T T6 setw(int n);
+
+
+ 27.6.1.1 Template class basic_istream [lib.istream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+T class basic_istream : virtual public basic_ios&lt;charT,traits&gt; {
+ public:
+ // Types (inherited from basic_ios (_lib.ios_)):
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.istream.cons_ Constructor/destructor:
+T explicit basic_istream(basic_streambuf&lt;charT,traits&gt;* sb);
+T virtual ~basic_istream();
+ // _lib.istream::sentry_ Prefix/suffix:
+T class sentry;
+
+ // _lib.istream.formatted_ Formatted input:
+T basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;
+ (basic_istream&lt;charT,traits&gt;&amp; (*pf)(basic_istream&lt;charT,traits&gt;&amp;))
+T basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;
+ (basic_ios&lt;charT,traits&gt;&amp; (*pf)(basic_ios&lt;charT,traits&gt;&amp;))
+T basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;
+ (ios_base&amp; (*pf)(ios_base&amp;))
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(bool&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(short&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned short&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(int&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned int&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(long&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(unsigned long&amp; n);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(float&amp; f);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(double&amp; f);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(long double&amp; f);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(void*&amp; p);
+S basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;
+ (basic_streambuf&lt;char_type,traits&gt;* sb);
+ // _lib.istream.unformatted_ Unformatted input:
+T streamsize gcount() const;
+S int_type get();
+S basic_istream&lt;charT,traits&gt;&amp; get(char_type&amp; c);
+S basic_istream&lt;charT,traits&gt;&amp; get(char_type* s, streamsize n);
+S basic_istream&lt;charT,traits&gt;&amp; get(char_type* s, streamsize n,
+ char_type delim);
+S basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp; sb);
+S basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp; sb,
+ char_type delim);
+S basic_istream&lt;charT,traits&gt;&amp; getline(char_type* s, streamsize n);
+S basic_istream&lt;charT,traits&gt;&amp; getline(char_type* s, streamsize n,
+ char_type delim);
+S basic_istream&lt;charT,traits&gt;&amp; ignore
+ (streamsize n = 1, int_type delim = traits::eof());
+S int_type peek();
+S basic_istream&lt;charT,traits&gt;&amp; read (char_type* s, streamsize n);
+S streamsize readsome(char_type* s, streamsize n);
+S basic_istream&lt;charT,traits&gt;&amp; putback(char_type c);
+S basic_istream&lt;charT,traits&gt;&amp; unget();
+S int sync();
+
+S pos_type tellg();
+S basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type);
+S basic_istream&lt;charT,traits&gt;&amp; seekg(off_type, ios_base::seekdir);
+ };
+
+ // _lib.istream::extractors_ character extraction templates:
+S template&lt;class charT, class traits&gt;
+ basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp;,
+ charT&amp;);
+S template&lt;class traits&gt;
+ basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,
+ unsigned char&amp;);
+S template&lt;class traits&gt;
+ basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,
+ signed char&amp;);
+
+S template&lt;class charT, class traits&gt;
+ basic_istream&lt;charT,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;charT,traits&gt;&amp;,
+ charT*);
+S template&lt;class traits&gt;
+ basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,
+ unsigned char*);
+S template&lt;class traits&gt;
+ basic_istream&lt;char,traits&gt;&amp; operator&gt;&gt;(basic_istream&lt;char,traits&gt;&amp;,
+ signed char*);
+
+ 27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry]
+
+
+ template &lt;class charT,class traits = char_traits&lt;charT&gt; &gt;
+S class basic_istream&lt;charT,traits&gt;::sentry {
+ typedef traits traits_type;
+S bool ok_; // exposition only
+ public:
+S explicit sentry(basic_istream&lt;charT,traits&gt;&amp; is, bool noskipws = false);
+S ~sentry();
+S operator bool() const { return ok_; }
+ private:
+T sentry(const sentry&amp;); // not defined
+T sentry&amp; operator=(const sentry&amp;); // not defined
+ };
+
+
+ 27.6.1.5 Template class basic_iostream [lib.iostreamclass]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+T class basic_iostream :
+ public basic_istream&lt;charT,traits&gt;,
+ public basic_ostream&lt;charT,traits&gt; {
+ public:
+ // constructor/destructor
+T explicit basic_iostream(basic_streambuf&lt;charT,traits&gt;* sb);
+T virtual ~basic_iostream();
+ };
+
+
+ 27.6.2.1 Template class basic_ostream [lib.ostream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_ostream : virtual public basic_ios&lt;charT,traits&gt; {
+ public:
+ // Types (inherited from basic_ios (_lib.ios_)):
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.ostream.cons_ Constructor/destructor:
+T explicit basic_ostream(basic_streambuf&lt;char_type,traits&gt;* sb);
+T virtual ~basic_ostream();
+ // _lib.ostream::sentry_ Prefix/suffix:
+T class sentry;
+ // _lib.ostream.formatted_ Formatted output:
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;
+ (basic_ostream&lt;charT,traits&gt;&amp; (*pf)(basic_ostream&lt;charT,traits&gt;&amp;));
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;
+ (basic_ios&lt;charT,traits&gt;&amp; (*pf)(basic_ios&lt;charT,traits&gt;&amp;));
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;
+ (ios_base&amp; (*pf)(ios_base&amp;));
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(bool n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(short n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned short n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(int n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned int n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(long n);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(unsigned long n);
+S basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(float f);
+S basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(double f);
+S basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(long double f);
+T basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(const void* p);
+X basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;
+ (basic_streambuf&lt;char_type,traits&gt;* sb);
+ // _lib.ostream.unformatted_ Unformatted output:
+T basic_ostream&lt;charT,traits&gt;&amp; put(char_type c);
+T basic_ostream&lt;charT,traits&gt;&amp; write(const char_type* s, streamsize n);
+X basic_ostream&lt;charT,traits&gt;&amp; flush();
+
+ // _lib.ostream.seeks_ seeks:
+S pos_type tellp();
+S basic_ostream&lt;charT,traits&gt;&amp; seekp(pos_type);
+S basic_ostream&lt;charT,traits&gt;&amp; seekp(off_type, ios_base::seekdir);
+ };
+ // _lib.ostream.inserters.character_ character inserters
+X template&lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,
+ charT);
+X template&lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,
+ char);
+ // specialization
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ char);
+ // signed and unsigned
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ signed char);
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ unsigned char)
+X template&lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,
+ const charT*);
+X template&lt;class charT, class traits&gt;
+ basic_ostream&lt;charT,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;charT,traits&gt;&amp;,
+ const char*);
+ // partial specializationss
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ const char*);
+ // signed and unsigned
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ const signed char*);
+X template&lt;class traits&gt;
+ basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;(basic_ostream&lt;char,traits&gt;&amp;,
+ const unsigned char*);
+
+
+ 27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry]
+
+ template &lt;class charT,class traits = char_traits&lt;charT&gt; &gt;
+X class basic_ostream&lt;charT,traits&gt;::sentry {
+ bool ok_; // exposition only
+ public:
+X explicit sentry(basic_ostream&lt;charT,traits&gt;&amp; os);
+X ~sentry();
+X operator bool() const { return ok_; }
+ private
+X sentry(const sentry&amp;); // not defined
+X sentry&amp; operator=(const sentry&amp;); // not defined
+ };
+
+ 27.7 String-based streams [lib.string.streams]
+
+ Header &lt;sstream&gt; synopsis
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+ class basic_stringbuf;
+
+T typedef basic_stringbuf&lt;char&gt; stringbuf;
+T typedef basic_stringbuf&lt;wchar_t&gt; wstringbuf;
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_istringstream;
+
+T typedef basic_istringstream&lt;char&gt; istringstream;
+T typedef basic_istringstream&lt;wchar_t&gt; wistringstream;
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_ostringstream;
+T typedef basic_ostringstream&lt;char&gt; ostringstream;
+T typedef basic_ostringstream&lt;wchar_t&gt; wostringstream;
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_stringstream;
+T typedef basic_stringstream&lt;char&gt; stringstream;
+T typedef basic_stringstream&lt;wchar_t&gt; wstringstream;
+
+ 27.7.1 Template class basic_stringbuf [lib.stringbuf]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_stringbuf : public basic_streambuf&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.stringbuf.cons_ Constructors:
+S explicit basic_stringbuf(ios_base::openmode which
+ = ios_base::in | ios_base::out);
+S explicit basic_stringbuf
+ (const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ ios_base::openmode which = ios_base::in | ios_base::out);
+ // _lib.stringbuf.members_ Get and set:
+S basic_string&lt;charT,traits,Allocator&gt; str() const;
+S void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);
+
+ protected:
+ // _lib.stringbuf.virtuals_ Overridden virtual functions:
+S virtual int_type underflow();
+S virtual int_type pbackfail(int_type c = traits::eof());
+S virtual int_type overflow (int_type c = traits::eof());
+S virtual basic_streambuf&lt;charT,traits&gt;* setbuf(charT*, streamsize);
+
+S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+ ios_base::openmode which
+ = ios_base::in | ios_base::out);
+S virtual pos_type seekpos(pos_type sp,
+ ios_base::openmode which
+ = ios_base::in | ios_base::out);
+ };
+
+
+ 27.7.2 Template class basic_istringstream [lib.istringstream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_istringstream : public basic_istream&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.istringstream.cons_ Constructors:
+S explicit basic_istringstream(ios_base::openmode which = ios_base::in);
+S explicit basic_istringstream(
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ ios_base::openmode which = ios_base::in);
+
+ // _lib.istringstream.members_ Members:
+S basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
+S basic_string&lt;charT,traits,Allocator&gt; str() const;
+S void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);
+ private:
+ // basic_stringbuf&lt;charT,traits,Allocator&gt; sb; exposition only
+ };
+
+ 27.7.3 Class basic_ostringstream [lib.ostringstream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_ostringstream : public basic_ostream&lt;charT,traits&gt; {
+ public:
+
+ // Types:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+ // _lib.ostringstream.cons_ Constructors/destructor:
+S explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
+S explicit basic_ostringstream(
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ ios_base::openmode which = ios_base::out);
+ // _lib.ostringstream.members_ Members:
+S basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
+S basic_string&lt;charT,traits,Allocator&gt; str() const;
+S void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; s);
+ };
+
+
+ 27.7.4 Template class basic_stringstream [lib.stringstream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt;,
+ class Allocator = allocator&lt;charT&gt; &gt;
+X class basic_stringstream
+ : public basic_iostream&lt;charT,traits&gt; {
+ public:
+ // Types
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+ // constructors/destructors
+S explicit basic_stringstream(
+ ios_base::openmode which = ios_base::out|ios_base::in);
+S explicit basic_stringstream(
+ const basic_string&lt;charT,traits,Allocator&gt;&amp; str,
+ ios_base::openmode which = ios_base::out|ios_base::in);
+ // Members:
+S basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
+S basic_string&lt;charT,traits,Allocator&gt; str() const;
+S void str(const basic_string&lt;charT,traits,Allocator&gt;&amp; str);
+ };
+
+
+
+ 27.8.1 File streams [lib.fstreams]
+
+
+ Header &lt;fstream&gt; synopsis
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_filebuf;
+T typedef basic_filebuf&lt;char&gt; filebuf;
+T typedef basic_filebuf&lt;wchar_t&gt; wfilebuf;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ifstream;
+T typedef basic_ifstream&lt;char&gt; ifstream;
+T typedef basic_ifstream&lt;wchar_t&gt; wifstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ofstream;
+T typedef basic_ofstream&lt;char&gt; ofstream;
+T typedef basic_ofstream&lt;wchar_t&gt; wofstream;
+
+X template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_fstream;
+T typedef basic_fstream&lt;char&gt; fstream;
+T typedef basic_fstream&lt;wchar_t&gt; wfstream;
+
+ 27.8.1.1 Template class basic_filebuf [lib.filebuf]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_filebuf : public basic_streambuf&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.filebuf.cons_ Constructors/destructor:
+X basic_filebuf();
+X virtual ~basic_filebuf();
+ // _lib.filebuf.members_ Members:
+T bool is_open() const;
+X basic_filebuf&lt;charT,traits&gt;* open
+ (const char* s, ios_base::openmode mode);
+X basic_filebuf&lt;charT,traits&gt;* close();
+ protected:
+ // _lib.filebuf.virtuals_ Overridden virtual functions:
+X virtual streamsize showmanyc();
+X virtual int_type underflow();
+X virtual int_type uflow();
+X virtual int_type pbackfail(int_type c = traits::eof());
+X virtual int_type overflow (int_type c = traits::eof());
+S virtual basic_streambuf&lt;charT,traits&gt;*
+ setbuf(char_type* s, streamsize n);
+S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+ ios_base::openmode which
+ = ios_base::in | ios_base::out);
+S virtual pos_type seekpos(pos_type sp, ios_base::openmode which
+ = ios_base::in | ios_base::out);
+S virtual int sync();
+S virtual void imbue(const locale&amp; loc);
+ };
+
+
+
+ 27.8.1.5 Template class basic_ifstream [lib.ifstream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_ifstream : public basic_istream&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.ifstream.cons_ Constructors:
+S basic_ifstream();
+S explicit basic_ifstream(const char* s,
+ ios_base::openmode mode = ios_base::in);
+ // _lib.ifstream.members_ Members:
+S basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
+S bool is_open();
+S void open(const char* s, ios_base::openmode mode = ios_base::in);
+S void close();
+ };
+
+
+ 27.8.1.8 Template class basic_ofstream [lib.ofstream]
+
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+X class basic_ofstream : public basic_ostream&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // _lib.ofstream.cons_ Constructors:
+X basic_ofstream();
+X explicit basic_ofstream(const char* s,
+ ios_base::openmode mode
+ = ios_base::out);
+ // _lib.ofstream.members_ Members:
+X basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
+T bool is_open();
+X void open(const char* s, ios_base::openmode mode = ios_base::out);
+X void close();
+ };
+
+
+ 27.8.1.11 Template class basic_fstream [lib.fstream]
+
+ template &lt;class charT, class traits=char_traits&lt;charT&gt; &gt;
+X class basic_fstream
+ : public basic_iostream&lt;charT,traits&gt; {
+ public:
+T typedef charT char_type;
+T typedef typename traits::int_type int_type;
+T typedef typename traits::pos_type pos_type;
+T typedef typename traits::off_type off_type;
+T typedef traits traits_type;
+ // constructors/destructor
+S basic_fstream();
+S explicit basic_fstream(
+ const char* s,
+ ios_base::openmode mode = ios_base::in|ios_base::out);
+
+ // Members:
+S basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
+S bool is_open();
+S void open(
+ const char* s,
+ ios_base::openmode mode = ios_base::in|ios_base::out);
+S void close();
+ };
+
+
+
+ 27.8.2 C Library files [lib.c.files]
+
+
+ Table 13--Header &lt;cstdio&gt; synopsis
+ Macros:
+X BUFSIZ L_tmpnam SEEK_SET TMP_MAX
+X EOF NULL &lt;cstdio&gt; stderr _IOFBF
+X FILENAME_MAX SEEK_CUR stdin _IOLBF
+X FOPEN_MAX SEEK_END stdout _IONBF
+
+X Types: FILE fpos_t size_t &lt;cstdio&gt;
+ Functions:
+X clearerr fgets fscanf gets rewind
+X fclose fopen fseek perror scanf tmpnam
+X feof fprintf fsetpos printf setbuf ungetc
+X ferror fputc ftell putc setvbuf vprintf
+X fflush fputs fwrite puts sprintf vfprintf
+X fgetc fread getc remove sscanf vsprintf
+X fgetpos freopen getchar putchar rename tmpfile
+
+
+
+
+ 1.5 Standard C library headers [depr.c.headers]
+
+X &lt;assert.h&gt; &lt;iso646.h&gt; &lt;setjmp.h&gt; &lt;stdio.h&gt; &lt;wchar.h&gt;
+ &lt;ctype.h&gt; &lt;limits.h&gt; &lt;signal.h&gt; &lt;stdlib.h&gt; &lt;wctype.h&gt;
+ &lt;errno.h&gt; &lt;locale.h&gt; &lt;stdarg.h&gt; &lt;string.h&gt;
+ &lt;float.h&gt; &lt;math.h&gt; &lt;stddef.h&gt; &lt;time.h&gt;
+
+ 1.6 Old iostreams members [depr.ios.members]
+
+ [Note: these should be #ifdef'd to permit diagnostics if used.]
+ namespace std {
+ class ios_base {
+ public:
+T typedef T1 io_state;
+T typedef T2 open_mode;
+T typedef T3 seek_dir;
+T typedef OFF_T streamoff;
+T typedef OFF_T streampos;
+ // remainder unchanged
+ };
+ }
+
+ [Note: these should be #ifdef'd to permit diagnostics if used.]
+ namespace std {
+ template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_streambuf {
+ public:
+T void stossc();
+ // remainder unchanged
+ };
+ }
+
+ 8 An implementation may provide the following member functions that
+ overload signatures specified in clause _lib.iostreams_:
+
+ [Note: the following overloads should be #ifdef'd to permit
+ diagnostics to be emitted, by default, if used.]
+
+ template&lt;class charT, class Traits&gt; class basic_ios {
+ public:
+M void clear(io_state state);
+M void setstate(io_state state);
+ // remainder unchanged
+ };
+ class ios_base {
+ public:
+M void exceptions(io_state);
+ // remainder unchanged
+ };
+ template&lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_streambuf {
+ public:
+M pos_type pubseekoff(off_type off, ios_base::seek_dir way,
+ ios_base::open_mode which = ios_base::in | ios_base::out);
+M pos_type pubseekpos(pos_type sp,
+ ios_base::open_mode which = ios_base::in | ios_base::out);
+ // remainder unchanged
+ };
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_filebuf : public basic_streambuf&lt;charT,traits&gt; {
+ public:
+M basic_filebuf&lt;charT,traits&gt;* open
+ (const char* s, ios_base::open_mode mode);
+ // remainder unchanged
+ };
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ifstream : public basic_istream&lt;charT,traits&gt; {
+ public:
+M void open(const char* s, ios_base::open_mode mode = in);
+ // remainder unchanged
+ };
+ template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
+ class basic_ofstream : public basic_ostream&lt;charT,traits&gt; {
+ public:
+M void open(const char* s, ios_base::open_mode mode = out | trunc);
+ // remainder unchanged
+ };
+ }
+
+
+
+ 1.7.1 Class strstreambuf [depr.strstreambuf]
+
+ [Note: It should be possible to adopt these components with only
+ minor changes from the 2.8 version of the library.]
+
+M class strstreambuf : public basic_streambuf&lt;char&gt; {
+ public:
+M explicit strstreambuf(streamsize alsize_arg = 0);
+M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
+M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
+M strstreambuf(const char* gnext_arg, streamsize n);
+M strstreambuf(signed char* gnext_arg, streamsize n,
+ signed char* pbeg_arg = 0);
+M strstreambuf(const signed char* gnext_arg, streamsize n);
+M strstreambuf(unsigned char* gnext_arg, streamsize n,
+ unsigned char* pbeg_arg = 0);
+M strstreambuf(const unsigned char* gnext_arg, streamsize n);
+M virtual ~strstreambuf();
+M void freeze(bool freezefl = true);
+M char* str();
+M int pcount();
+ protected:
+M virtual int_type overflow (int_type c = EOF);
+M virtual int_type pbackfail(int_type c = EOF);
+M virtual int_type underflow();
+M virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+ ios_base::openmode which
+ = ios_base::in | ios_base::out);
+M virtual pos_type seekpos(pos_type sp, ios_base::openmode which
+ = ios_base::in | ios_base::out);
+M virtual streambuf&lt;char&gt;* setbuf(char* s, streamsize n);
+ }
+
+ 1.7.4 Class strstream [depr.strstream]
+
+M class strstream
+ : public basic_iostream&lt;char&gt; {
+ public:
+ // Types
+M typedef char char_type;
+M typedef typename char_traits&lt;char&gt;::int_type int_type
+M typedef typename char_traits&lt;char&gt;::pos_type pos_type;
+M typedef typename char_traits&lt;char&gt;::off_type off_type;
+ // consturctors/destructor
+M strstream();
+M strstream(char* s, int n,
+ ios_base::openmode mode = ios_base::in|ios_base::out);
+M virtual ~strstream();
+ // Members:
+M strstreambuf* rdbuf() const;
+M void freeze(bool freezefl = true);
+M int pcount() const;
+M char* str();
+ };
+</literallayout>
+
+</sect3>
+
+
+<sect3 id="standard.1998.specific" xreflabel="Implementation Specific">
+ <title>Implementation Specific Behavior</title>
+
+ <para>
+ The ISO standard defines the following phrase:
+ </para>
+ <blockquote>
+ <variablelist>
+ <varlistentry>
+ <term>
+ <code>[1.3.5] implementation-defined behavior</code>
+ </term>
+ <listitem>
+ <para>
+ Behavior, for a well-formed program construct and correct data, that
+ depends on the implementation <emphasis>and that each implementation
+ shall document</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </blockquote>
+ <para>
+ We do so here, for the C++ library only. Behavior of the
+ compiler, linker, runtime loader, and other elements of &quot;the
+ implementation&quot; are documented elsewhere. Everything listed
+ in Annex B, Implementation Qualities, are also part of the
+ compiler, not the library.
+ </para>
+ <para>
+ For each entry, we give the section number of the standard, when
+ applicable. This list is probably incomplet and inkorrekt.
+ </para>
+ <para>
+ <emphasis>[1.9]/11 #3</emphasis> If <code>isatty(3)</code> is true, then
+ interactive stream support is implied.
+ </para>
+ <para>
+ <emphasis>[17.4.4.5]</emphasis> Non-reentrant functions are probably best
+ discussed in the various sections on multithreading (see above).
+ </para>
+ <!-- [17.4.4.8]/3 says any function that doesn't have an exception-spec
+ can throw whatever we want; see also its footnote. Let's list those
+ in the sections where the function itself occurs.
+ -->
+ <para><emphasis>[18.1]/4</emphasis> The type of <code>NULL</code> is described
+ <ulink url="../18_support/howto.html#1">here</ulink>.
+ </para>
+ <para><emphasis>[18.3]/8</emphasis> Even though it's listed in the library
+ sections, libstdc++ has zero control over what the cleanup code hands
+ back to the runtime loader. Talk to the compiler people. :-)
+ </para>
+ <para><emphasis>[18.4.2.1]/5</emphasis> (bad_alloc),
+ <emphasis>[18.5.2]/5</emphasis> (bad_cast),
+ <emphasis>[18.5.3]/5</emphasis> (bad_typeid),
+ <emphasis>[18.6.1]/8</emphasis> (exception),
+ <emphasis>[18.6.2.1]/5</emphasis> (bad_exception): The <code>what()</code>
+ member function of class <code>std::exception</code>, and these other
+ classes publicly derived from it, simply returns the name of the
+ class. But they are the <emphasis>mangled</emphasis> names; you will need to call
+ <code>c++filt</code> and pass the names as command-line parameters to
+ demangle them, or call a
+ <ulink url="../18_support/howto.html#5">runtime demangler function</ulink>.
+ (The classes in <code>&lt;stdexcept&gt;</code> have constructors which
+ require an argument to use later for <code>what()</code> calls, so the
+ problem of <code>what()</code>'s value does not arise in most
+ user-defined exceptions.)
+ </para>
+ <para><emphasis>[18.5.1]/7</emphasis> The return value of
+ <code>std::type_info::name()</code> is the mangled type name (see the
+ previous entry for more).
+ </para>
+ <para><emphasis>[20.1.5]/5</emphasis> <emphasis>&quot;Implementors are encouraged to
+ supply libraries that can accept allocators that encapsulate more
+ general memory models and that support non-equal instances. In such
+ implementations, any requirements imposed on allocators by containers
+ beyond those requirements that appear in Table 32, and the semantics
+ of containers and algorithms when allocator instances compare
+ non-equal, are implementation-defined.&quot;</emphasis> As yet we don't
+ have any allocators which compare non-equal, so we can't describe how
+ they behave.
+ </para>
+ <para><emphasis>[21.1.3.1]/3,4</emphasis>,
+ <emphasis>[21.1.3.2]/2</emphasis>,
+ <emphasis>[23.*]'s foo::iterator</emphasis>,
+ <emphasis>[27.*]'s foo::*_type</emphasis>,
+ <emphasis>others...</emphasis>
+ Nope, these types are called implementation-defined because you
+ shouldn't be taking advantage of their underlying types. Listing them
+ here would defeat the purpose. :-)
+ </para>
+ <para><emphasis>[21.1.3.1]/5</emphasis> I don't really know about the mbstate_t
+ stuff... see the <ulink url="../22_locale/howto.html">chapter 22 notes</ulink>
+ for what does exist.
+ </para>
+ <para><emphasis>[22.*]</emphasis> Anything and everything we have on locale
+ implementation will be described
+ <ulink url="../22_locale/howto.html">over here</ulink>.
+ </para>
+ <para><emphasis>[26.2.8]/9</emphasis> I have no idea what
+ <code>complex&lt;T&gt;</code>'s pow(0,0) returns.
+ </para>
+ <para><emphasis>[27.4.2.4]/2</emphasis> Calling
+ <code>std::ios_base::sync_with_stdio</code> after I/O has already been
+ performed on the standard stream objects will
+ flush the buffers, and <!-- this line might go away -->
+ destroy and recreate the underlying buffer instances. Whether or not
+ the previously-written I/O is destroyed in this process depends mostly
+ on the --enable-libio choice: for stdio, if the written data is
+ already in the stdio buffer, the data may be completely safe!
+ </para>
+ <para><emphasis>[27.6.1.1.2]</emphasis>,
+ <emphasis>[27.6.2.3]</emphasis> The I/O sentry ctor and dtor can perform
+ additional work than the minimum required. We are not currently taking
+ advantage of this yet.
+ </para>
+ <para><emphasis>[27.7.1.3]/16</emphasis>,
+ <emphasis>[27.8.1.4]/10</emphasis>
+ The effects of <code>pubsetbuf/setbuf</code> are described
+ <ulink url="../27_io/howto.html#2">in this chapter</ulink>.
+ </para>
+ <para><emphasis>[27.8.1.4]/16</emphasis> Calling <code>fstream::sync</code> when
+ a get area exists will... whatever <code>fflush()</code> does, I think.
+ </para>
+
+</sect3>
+
+</sect2>
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx200x.xml b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml
new file mode 100644
index 00000000000..1c6460a5544
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml
@@ -0,0 +1,2241 @@
+<sect2 id="manual.intro.status.standard.200x" xreflabel="Status C++ 200x">
+<?dbhtml filename="standard_cxx200x.html"?>
+
+<sect2info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ 200x
+ </keyword>
+ </keywordset>
+</sect2info>
+
+<title>C++ 200x</title>
+
+<para>
+This table is based on the table of contents of ISO/IEC
+Doc No: N2461=07-0331 Date: 2007-10-22
+Working Draft, Standard for Programming Language C++
+</para>
+
+<para>
+In this implementation <literal>-std=gnu++0x</literal> or
+<literal>-std=c++0x</literal> flags must be used to enable language and
+library features. The pre-defined symbol
+<constant>__GXX_EXPERIMENTAL_CXX0X__</constant> is used to check for the
+presence of the required flag.
+</para>
+
+<para>
+This page describes the C++0x support in mainline GCC SVN, not in any
+particular release.
+</para>
+
+<table frame='all'>
+<title>C++ 200x Implementation Status</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>
+
+ <thead>
+ <row>
+ <entry>Section</entry>
+ <entry>Description</entry>
+ <entry>Done</entry>
+ <entry>Broken</entry>
+ <entry>Missing</entry>
+ <entry>Comments</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><emphasis>20</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>General Utilities</emphasis></entry>
+ </row>
+ <row>
+ <entry>20.2</entry>
+ <entry>Utility Components</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>incomplete</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.2.1</entry>
+ <entry>Operators</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.2.2</entry>
+ <entry>forward/move helpers</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.2.3</entry>
+ <entry>Pairs</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>20.3</entry>
+ <entry>Header <code>&lt;tuple&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1</entry>
+ <entry>Class template <code>tuple</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1.1</entry>
+ <entry>Construction</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1.2</entry>
+ <entry>Tuple creation functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1.3</entry>
+ <entry>Tuple helper classes</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1.4</entry>
+ <entry>Element access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.3.1.5</entry>
+ <entry>Relational operators</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>20.4</entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Metaprogramming and type traits</emphasis></entry>
+ </row>
+ <row>
+ <entry>20.4.1</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.2</entry>
+ <entry>Header <code>&lt;type_traits&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.3</entry>
+ <entry>Helper classes</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.4</entry>
+ <entry>General Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.5</entry>
+ <entry>Unary Type Traits</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.5.1</entry>
+ <entry>Primary Type Categories</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.5.2</entry>
+ <entry>Composite type traits</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.5.3</entry>
+ <entry>Type properties</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.6</entry>
+ <entry>Relationships between types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.7</entry>
+ <entry>Transformations between types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.7.1</entry>
+ <entry>Const-volatile modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.7.2</entry>
+ <entry>Reference modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.7.3</entry>
+ <entry>Array modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.7.4</entry>
+ <entry>Pointer modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.8</entry>
+ <entry>Other transformations</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.4.9</entry>
+ <entry>Implementation requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5 </entry>
+ <entry>Function Objects</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5</entry>
+ <entry>Additions to header <code>&lt;functional&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.1</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.2</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.3</entry>
+ <entry>Base</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.4</entry>
+ <entry>Function return types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5</entry>
+ <entry>Class template <code>reference_wrapper</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5.1</entry>
+ <entry><code>reference_wrapper</code> construct/copy/destroy</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5.2</entry>
+ <entry><code>reference_wrapper</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5.3</entry>
+ <entry><code>reference_wrapper</code> access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5.4</entry>
+ <entry><code>reference_wrapper</code> invocation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.5.5</entry>
+ <entry><code>reference_wrapper</code> helper functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.14</entry>
+ <entry>Function template <code>mem_fn</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.11</entry>
+ <entry>Template function bind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>20.5.11.1</entry>
+ <entry>Function object binders</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.11.1.1</entry>
+ <entry>Class template <code>is_bind_expression</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.11.1.2</entry>
+ <entry>Class template <code>is_placeholder</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.11.1.3</entry>
+ <entry>Function template <code>bind</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.11.1.4</entry>
+ <entry>Placeholders</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15</entry>
+ <entry>Polymorphic function wrappers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.1</entry>
+ <entry>Class <code>bad_function_call<code></code></code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.1.1</entry>
+ <entry><code>bad_function_call</code> constructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2</entry>
+ <entry>Class template <code>function</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.1</entry>
+ <entry><code>function</code> construct/copy/destroy</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.2</entry>
+ <entry><code>function</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.3</entry>
+ <entry><code>function</code> capacity</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.4</entry>
+ <entry><code>function</code> invocation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.5</entry>
+ <entry><code>function</code> target access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.7</entry>
+ <entry>null pointer comparison operators</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.15.2.8</entry>
+ <entry>specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.5.16</entry>
+ <entry>Class template <code>hash</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6</entry>
+ <entry>Additions to header <code>&lt;memory&gt;</code> synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry>missing <code>unique_ptr</code></entry>
+ </row>
+ <row>
+ <entry>20.6.5</entry>
+ <entry>Class template <code>unique_ptr</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6</entry>
+ <entry>Smart pointers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.1</entry>
+ <entry>Class <code>bad_weak_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2</entry>
+ <entry>Class template <code>shared_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>See Footnotes.</entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.1</entry>
+ <entry><code>shared_ptr</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.2</entry>
+ <entry><code>shared_ptr</code> destructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.3</entry>
+ <entry><code>shared_ptr</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.4</entry>
+ <entry><code>shared_ptr</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.5</entry>
+ <entry><code>shared_ptr</code> observers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.6</entry>
+ <entry><code>shared_ptr</code> creation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm">N2351</ulink>
+ </entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.7</entry>
+ <entry><code>shared_ptr</code> comparison</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.8</entry>
+ <entry><code>shared_ptr</code> I/O</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.9</entry>
+ <entry><code>shared_ptr</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.10</entry>
+ <entry><code>shared_ptr</code> casts</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.2.11</entry>
+ <entry><code>get_deleter</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3</entry>
+ <entry>Class template <code>weak_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.1</entry>
+ <entry><code>weak_ptr</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.2</entry>
+ <entry><code>weak_ptr</code> destructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.3</entry>
+ <entry><code>weak_ptr</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.4</entry>
+ <entry><code>weak_ptr</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.5</entry>
+ <entry><code>weak_ptr</code> observers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.6</entry>
+ <entry><code>weak_ptr</code> comparison</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.3.7</entry>
+ <entry><code>weak_ptr</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>20.6.6.4</entry>
+ <entry>Class template <code>enable_shared_from_this</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+
+
+ <row>
+ <entry><emphasis>23</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Containers</emphasis></entry>
+ </row>
+ <row>
+ <entry>23.2.1</entry>
+ <entry>Header <code>&lt;array&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1</entry>
+ <entry>Class template array</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.1</entry>
+ <entry><code>array</code> constructors, copy, and assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.2</entry>
+ <entry><code>array</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.3</entry>
+ <entry><code>array </code>size</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.4</entry>
+ <entry><code>array </code>data</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.5</entry>
+ <entry>Zero sized <code>array</code>s</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.2.1.6</entry>
+ <entry>Tuple interface to class template <code>array</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>23.4</entry>
+ <entry>Unordered associative containers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.1</entry>
+ <entry>Class template <code>unordered_map</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.1.1</entry>
+ <entry><code>unordered_map</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.1.2</entry>
+ <entry><code>unordered_map</code> element access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.1.3</entry>
+ <entry><code>unordered_map</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.2</entry>
+ <entry>Class template <code>unordered_multimap</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.2.1</entry>
+ <entry><code>unordered_multimap</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.2.2</entry>
+ <entry><code>unordered_multimap</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.3</entry>
+ <entry>Class template <code>unordered_set</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.3.1</entry>
+ <entry><code>unordered_set</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.3.2</entry>
+ <entry><code>unordered_set</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.4</entry>
+ <entry>Class template <code>unordered_multiset<code></code></code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.4.1</entry>
+ <entry><code>unordered_multiset</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>23.4.4.2</entry>
+ <entry><code>unordered_multiset</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>26</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Numerics</emphasis></entry>
+ </row>
+ <row>
+ <entry>26.4</entry>
+ <entry>Random number generation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.1</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.2</entry>
+ <entry>Header <code>&lt;random&gt;</code> synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.3</entry>
+ <entry>Random number engine class templates</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.3.1</entry>
+ <entry>Class template <code>linear_congruential_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.3.2</entry>
+ <entry>Class template <code>mersenne_twister_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.3.3</entry>
+ <entry>Class template <code>subtract_with_carry_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.4</entry>
+ <entry>Random number engine adaptor class templates</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>26.4.4.1</entry>
+ <entry>Class template <code>discard_block_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.4.2</entry>
+ <entry>Class template <code>independent_bits_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.4.3</entry>
+ <entry>Class template <code>shuffle_order_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.4.4</entry>
+ <entry>Class template <code>xor_combine_engine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>operator()() per N2079</entry>
+ </row>
+ <row>
+ <entry>26.4.5</entry>
+ <entry>Engines and engine adaptors with predefined parameters</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.6</entry>
+ <entry>Class <code>random_device</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.7</entry>
+ <entry>Utilities</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.7.1</entry>
+ <entry>Class <code>seed_seq</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.7.2</entry>
+ <entry>Function template <code>generate_cannonical</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8</entry>
+ <entry>Random number generation class templates</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.1</entry>
+ <entry>Uniform distributions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.1</entry>
+ <entry>Class template <code>uniform_int_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.1</entry>
+ <entry>Class template <code>uniform_real_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.2</entry>
+ <entry>Bernoulli distributions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>26.4.8.2.1</entry>
+ <entry>Class <code>bernoulli_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.2.2</entry>
+ <entry>Class template <code>binomial_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.2.3</entry>
+ <entry>Class template <code>geometric_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.2.4</entry>
+ <entry>Class template <code>negative_binomial_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3</entry>
+ <entry>Poisson distributions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3.1</entry>
+ <entry>Class template <code>poisson_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3.2</entry>
+ <entry>Class template <code>exponential_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3.3</entry>
+ <entry>Class template <code>gamma_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3.4</entry>
+ <entry>Class template <code>weibull_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.3.5</entry>
+ <entry>Class template <code>extreme_value_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4</entry>
+ <entry>Normal distributions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>partial</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.1</entry>
+ <entry>Class template <code>normal_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.2</entry>
+ <entry>Class template <code>lognormal_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.3</entry>
+ <entry>Class template <code>chi_squared_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.4</entry>
+ <entry>Class template <code>cauchy_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.5</entry>
+ <entry>Class template <code>fisher_f_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.4.6</entry>
+ <entry>Class template <code>student_t_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.5</entry>
+ <entry>Sampling distributions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.5.1</entry>
+ <entry>Class template <code>discrete_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.5.1</entry>
+ <entry>Class template <code>piecewise_constant_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>26.4.8.5.1</entry>
+ <entry>Class template <code>general_pdf_distribution</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry><emphasis>28</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Regular Expressions</emphasis></entry>
+ </row>
+ <row>
+ <entry>28.1</entry>
+ <entry>Definitions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.2</entry>
+ <entry>Requirements</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.3</entry>
+ <entry>Regular expressions summary</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.4</entry>
+ <entry>Header <code>&lt;regex&gt;</code> synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.5</entry>
+ <entry>Namespace <code>tr1::regex_constants</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.5.1</entry>
+ <entry>Bitmask Type <code>syntax_option_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.5.2</entry>
+ <entry>Bitmask Type <code>regex_constants::match_flag_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.5.3</entry>
+ <entry>Implementation defined <code>error_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.6</entry>
+ <entry>Class <code>regex_error</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.7</entry>
+ <entry>Class template <code>regex_traits</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8</entry>
+ <entry>Class template <code>basic_regex</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.1</entry>
+ <entry><code>basic_regex</code> constants</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.2</entry>
+ <entry><code>basic_regex</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.3</entry>
+ <entry><code>basic_regex</code> assign</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.4</entry>
+ <entry><code>basic_regex</code> constant operations</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.5</entry>
+ <entry><code>basic_regex</code> locale</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.6</entry>
+ <entry><code>basic_regex</code> swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.7</entry>
+ <entry><code>basic_regex</code> non-member functions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.8.7.1</entry>
+ <entry><code>basic_regex</code> non-member swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.9</entry>
+ <entry>Class template <code>sub_match</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.9.1</entry>
+ <entry><code>sub_match</code> members</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.9.2</entry>
+ <entry><code>sub_match</code> non-member operators</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10</entry>
+ <entry>Class template <code>match_results</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.1</entry>
+ <entry><code>match_results</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.2</entry>
+ <entry><code>match_results</code> size</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.3</entry>
+ <entry><code>match_results</code> element access</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.4</entry>
+ <entry><code>match_results</code> formatting</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.5</entry>
+ <entry><code>match_results</code> allocator</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.10.6</entry>
+ <entry><code>match_results</code> swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.11</entry>
+ <entry>Regular expression algorithms</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.11.1</entry>
+ <entry>exceptions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.11.2</entry>
+ <entry><code>regex_match</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.11.3</entry>
+ <entry><code>regex_search</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.11.4</entry>
+ <entry><code>regex_replace</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12</entry>
+ <entry>Regular expression Iterators</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.1</entry>
+ <entry>Class template <code>regex_iterator</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.1.1</entry>
+ <entry><code>regex_iterator</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.1.2</entry>
+ <entry><code>regex_iterator</code> comparisons</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.1.3</entry>
+ <entry><code>regex_iterator</code> dereference</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.1.4</entry>
+ <entry><code>regex_iterator</code> increment</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.2</entry>
+ <entry>Class template <code>regex_token_iterator</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.2.1</entry>
+ <entry><code>regex_token_iterator</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.2.2</entry>
+ <entry><code>regex_token_iterator</code> comparisons</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.2.3</entry>
+ <entry><code>regex_token_iterator</code> dereference</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.12.2.4</entry>
+ <entry><code>regex_token_iterator</code> increment</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>28.13</entry>
+ <entry>Modified ECMAScript regular expression grammar</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>C</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>C Compatibility</emphasis></entry>
+ </row>
+ <row>
+ <entry>C2.1</entry>
+ <entry>Additions to header <code>&lt;complex&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.2</entry>
+ <entry>Function <code>acos</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.3</entry>
+ <entry>Function <code>asin</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.4</entry>
+ <entry>Function <code>atan</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.5</entry>
+ <entry>Function <code>acosh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.6</entry>
+ <entry>Function <code>asinh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.7</entry>
+ <entry>Function <code>atanh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.8</entry>
+ <entry>Function <code>fabs</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.1.9</entry>
+ <entry>Additional Overloads</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.2</entry>
+ <entry>Header <code>&lt;ccomplex&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>C2.3</entry>
+ <entry>Header <code>&lt;complex.h&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>C2.4</entry>
+ <entry>Additions to header <code>&lt;cctype&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.4.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.4.2</entry>
+ <entry>Function <code>isblank</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.5</entry>
+ <entry>Additions to header <code>&lt;ctype.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.6</entry>
+ <entry>Header <code>&lt;cfenv&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.6.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.6.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.7</entry>
+ <entry>Header <code>&lt;fenv.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.8</entry>
+ <entry>Additions to header <code>&lt;cfloat&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.9</entry>
+ <entry>Additions to header <code>&lt;float.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.10</entry>
+ <entry>Additions to header <code>&lt;ios&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.10.1</entry>
+ <entry>Synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.10.2</entry>
+ <entry>Function <code>hexfloat</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.11</entry>
+ <entry>Header <code>&lt;cinttypes&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.11.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 557</entry>
+ </row>
+ <row>
+ <entry>C2.11.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.12</entry>
+ <entry>Header <code>&lt;inttypes.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.13</entry>
+ <entry>Additions to header <code>&lt;climits&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.14</entry>
+ <entry>Additions to header <code>&lt;limits.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.15</entry>
+ <entry>Additions to header <code>&lt;locale&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.16</entry>
+ <entry>Additions to header <code>&lt;cmath&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.16.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.16.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.16.3</entry>
+ <entry>Function template definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.16.4</entry>
+ <entry>Additional overloads</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 568; DR 550</entry>
+ </row>
+ <row>
+ <entry>C2.17</entry>
+ <entry>Additions to header <code>&lt;math.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.18</entry>
+ <entry>Additions to header <code>&lt;cstdarg&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.19</entry>
+ <entry>Additions to header <code>&lt;stdarg.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.20</entry>
+ <entry>The header <code>&lt;cstdbool&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.21</entry>
+ <entry>The header <code>&lt;stdbool.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.22</entry>
+ <entry>The header <code>&lt;cstdint&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.22.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.22.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.23</entry>
+ <entry>The header <code>&lt;stdint.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.24</entry>
+ <entry>Additions to header <code>&lt;cstdio&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.24.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.24.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.24.3</entry>
+ <entry>Additional format specifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>C2.24.4</entry>
+ <entry>Additions to header <code>&lt;stdio.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.25</entry>
+ <entry>Additions to header <code>&lt;cstdlib&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.25.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.25.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.25.3</entry>
+ <entry>Function <code>abs</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.25.4</entry>
+ <entry>Function <code>div</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.26</entry>
+ <entry>Additions to header <code>&lt;stdlib.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.27</entry>
+ <entry>Header <code>&lt;ctgmath&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>C2.28</entry>
+ <entry>Header <code>&lt;tgmath.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>C2.29</entry>
+ <entry>Additions to header <code>&lt;ctime&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>C2.30</entry>
+ <entry>Additions to header <code>&lt;cwchar&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.30.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.30.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.30.3</entry>
+ <entry>Additional wide format specifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>C2.31</entry>
+ <entry>Additions to header <code>&lt;wchar.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.32</entry>
+ <entry>Additions to header <code>&lt;cwctype&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.32.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.32.2</entry>
+ <entry>Function <code>iswblank</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>C2.33</entry>
+ <entry>Additions to header <code>&lt;wctype.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>D</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Compatibility Features</emphasis></entry>
+ </row>
+ <row>
+ <entry>D.6</entry>
+ <entry>Old iostream members</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>D.8</entry>
+ <entry>Binders</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry><ulink url="http://gcc.gnu.org/PR33911">33911</ulink></entry>
+ </row>
+ <row>
+ <entry>D.9</entry>
+ <entry>Class template <code>auto_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry><ulink url="http://gcc.gnu.org/PR33911">33911</ulink></entry>
+ </row>
+ </tbody>
+</tgroup>
+</table>
+
+<para>
+Footnotes
+</para>
+
+<para>
+ The shared_ptr implementation uses some code from the
+ <ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">Boost
+ shared_ptr</ulink> library.
+</para>
+
+</sect2> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml b/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml
new file mode 100644
index 00000000000..092a78af458
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml
@@ -0,0 +1,2273 @@
+<sect2 id="manual.intro.status.standard.tr1" xreflabel="Status C++ TR1">
+<?dbhtml filename="standard_cxxtr1.html"?>
+
+<sect2info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ tr1
+ </keyword>
+ </keywordset>
+</sect2info>
+
+<title>C++ TR1</title>
+
+<para>
+This table is based on the table of contents of ISO/IEC DTR 19768
+Doc No: N1836=05-0096 Date: 2005-06-24
+Draft Technical Report on C++ Library Extensions
+</para>
+
+<para>
+In this implementation the header names are prefixed by
+<code>tr1/</code>, for instance <code>&lt;tr1/functional&gt;</code>,
+<code>&lt;tr1/memory&gt;</code>, and so on.
+</para>
+
+<para>
+This page describes the TR1 support in mainline GCC SVN, not in any particular
+release.
+</para>
+
+<table frame='all'>
+<title>C++ TR1 Implementation Status</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>
+
+ <thead>
+ <row>
+ <entry>Section</entry>
+ <entry>Description</entry>
+ <entry>Done</entry>
+ <entry>Broken</entry>
+ <entry>Missing</entry>
+ <entry>Comments</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><emphasis>2</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>General Utilities</emphasis></entry>
+ </row>
+ <row>
+ <entry>2.1</entry>
+ <entry>Reference wrappers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.1</entry>
+ <entry>Additions to header <code>&lt;functional&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2</entry>
+ <entry>Class template <code>reference_wrapper</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2.1</entry>
+ <entry><code>reference_wrapper</code> construct/copy/destroy</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2.2</entry>
+ <entry><code>reference_wrapper</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2.3</entry>
+ <entry><code>reference_wrapper</code> access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2.4</entry>
+ <entry><code>reference_wrapper</code> invocation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.1.2.5</entry>
+ <entry><code>reference_wrapper</code> helper functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2</entry>
+ <entry>Smart pointers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.1</entry>
+ <entry>Additions to header <code>&lt;memory&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.2</entry>
+ <entry>Class <code>bad_weak_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3</entry>
+ <entry>Class template <code>shared_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>See Footnotes</entry>
+ </row>
+ <row>
+ <entry>2.2.3.1</entry>
+ <entry><code>shared_ptr</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.2</entry>
+ <entry><code>shared_ptr</code> destructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.3</entry>
+ <entry><code>shared_ptr</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.4</entry>
+ <entry><code>shared_ptr</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.5</entry>
+ <entry><code>shared_ptr</code> observers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.6</entry>
+ <entry><code>shared_ptr</code> comparison</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.7</entry>
+ <entry><code>shared_ptr</code> I/O</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.8</entry>
+ <entry><code>shared_ptr</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.9</entry>
+ <entry><code>shared_ptr</code> casts</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.3.10</entry>
+ <entry><code>get_deleter</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4</entry>
+ <entry>Class template <code>weak_ptr</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.1</entry>
+ <entry><code>weak_ptr</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.2</entry>
+ <entry><code>weak_ptr</code> destructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.3</entry>
+ <entry><code>weak_ptr</code> assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.4</entry>
+ <entry><code>weak_ptr</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.5</entry>
+ <entry><code>weak_ptr</code> observers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.6</entry>
+ <entry><code>weak_ptr</code> comparison</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.4.7</entry>
+ <entry><code>weak_ptr</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2.2.5</entry>
+ <entry>Class template <code>enable_shared_from_this</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>3</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Function Objects</emphasis></entry>
+ </row>
+ <row>
+ <entry>3.1</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.2</entry>
+ <entry>Additions to <code>&lt;functional&gt; synopsis</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.3</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.4</entry>
+ <entry>Function return types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.5</entry>
+ <entry>Function template <code>mem_fn</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.6</entry>
+ <entry>Function object binders</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.6.1</entry>
+ <entry>Class template <code>is_bind_expression</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.6.2</entry>
+ <entry>Class template <code>is_placeholder</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.6.3</entry>
+ <entry>Function template <code>bind</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.6.4</entry>
+ <entry>Placeholders</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7</entry>
+ <entry>Polymorphic function wrappers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.1</entry>
+ <entry>Class <code>bad_function_call<code></code></code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.1.1</entry>
+ <entry><code>bad_function_call</code> constructor</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2</entry>
+ <entry>Class template <code>function</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.1</entry>
+ <entry><code>function</code> construct/copy/destroy</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.2</entry>
+ <entry><code>function</code> modifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.3</entry>
+ <entry><code>function</code> capacity</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.4</entry>
+ <entry><code>function</code> invocation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.5</entry>
+ <entry><code>function</code> target access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.6</entry>
+ <entry>undefined operators</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.7</entry>
+ <entry>null pointer comparison operators</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>3.7.2.8</entry>
+ <entry>specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>4</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Metaprogramming and type traits</emphasis></entry>
+ </row>
+ <row>
+ <entry>4.1</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.2</entry>
+ <entry>Header <code>&lt;type_traits&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.3</entry>
+ <entry>Helper classes</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.4</entry>
+ <entry>General Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.5</entry>
+ <entry>Unary Type Traits</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.5.1</entry>
+ <entry>Primary Type Categories</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.5.2</entry>
+ <entry>Composite type traits</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.5.3</entry>
+ <entry>Type properties</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.6</entry>
+ <entry>Relationships between types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.7</entry>
+ <entry>Transformations between types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.7.1</entry>
+ <entry>Const-volatile modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.7.2</entry>
+ <entry>Reference modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.7.3</entry>
+ <entry>Array modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.7.4</entry>
+ <entry>Pointer modifications</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.8</entry>
+ <entry>Other transformations</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4.9</entry>
+ <entry>Implementation requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>5</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Numerical Facilities</emphasis></entry>
+ </row>
+ <row>
+ <entry>5.1</entry>
+ <entry>Random number generation</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.1</entry>
+ <entry>Requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.2</entry>
+ <entry>Header <code>&lt;random&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.3</entry>
+ <entry>Class template <code>variate_generator</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4</entry>
+ <entry>Random number engine class templates</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.1</entry>
+ <entry>Class template <code>linear_congruential</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.2</entry>
+ <entry>Class template <code>mersenne_twister</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.3</entry>
+ <entry>Class template <code>subtract_with_carry</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.4</entry>
+ <entry>Class template <code>subtract_with_carry_01</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.5</entry>
+ <entry>Class template <code>discard_block</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.4.6</entry>
+ <entry>Class template <code>xor_combine</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>operator()() per N2079</entry>
+ </row>
+ <row>
+ <entry>5.1.5</entry>
+ <entry>Engines with predefined parameters</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.6</entry>
+ <entry>Class <code>random_device</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7</entry>
+ <entry>Random distribution class templates</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.1</entry>
+ <entry>Class template <code>uniform_int</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.2</entry>
+ <entry>Class <code>bernoulli_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.3</entry>
+ <entry>Class template <code>geometric_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.4</entry>
+ <entry>Class template <code>poisson_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.5</entry>
+ <entry>Class template <code>binomial_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.6</entry>
+ <entry>Class template <code>uniform_real</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.7</entry>
+ <entry>Class template <code>exponential_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.8</entry>
+ <entry>Class template <code>normal_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.1.7.9</entry>
+ <entry>Class template <code>gamma_distribution</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2</entry>
+ <entry>Mathematical special functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1</entry>
+ <entry>Additions to header <code>&lt;cmath&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.1</entry>
+ <entry>associated Laguerre polynomials</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.2</entry>
+ <entry>associated Legendre functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.3</entry>
+ <entry>beta function</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.4</entry>
+ <entry>(complete) elliptic integral of the first kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.5</entry>
+ <entry>(complete) elliptic integral of the second kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.6</entry>
+ <entry>(complete) elliptic integral of the third kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.7</entry>
+ <entry>confluent hypergeometric functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.8</entry>
+ <entry>regular modified cylindrical Bessel functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.9</entry>
+ <entry>cylindrical Bessel functions (of the first kind)</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.10</entry>
+ <entry>irregular modified cylindrical Bessel functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.11</entry>
+ <entry>cylindrical Neumann functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.12</entry>
+ <entry>(incomplete) elliptic integral of the first kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.13</entry>
+ <entry>(incomplete) elliptic integral of the second kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.14</entry>
+ <entry>(incomplete) elliptic integral of the third kind</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.15</entry>
+ <entry>exponential integral</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.16</entry>
+ <entry>Hermite polynomials</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.17</entry>
+ <entry>hypergeometric functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.18</entry>
+ <entry>Laguerre polynomials</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.19</entry>
+ <entry>Legendre polynomials</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.20</entry>
+ <entry>Riemann zeta function</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.21</entry>
+ <entry>spherical Bessel functions (of the first kind)</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.22</entry>
+ <entry>spherical associated Legendre functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.1.23</entry>
+ <entry>spherical Neumann functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>5.2.2</entry>
+ <entry>Additions to header <code>&lt;math.h&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>6</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Containers</emphasis></entry>
+ </row>
+ <row>
+ <entry>6.1</entry>
+ <entry>Tuple types</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.1</entry>
+ <entry>Header <code>&lt;tuple&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.2</entry>
+ <entry>Additions to header <code>&lt;utility&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3</entry>
+ <entry>Class template <code>tuple</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3.1</entry>
+ <entry>Construction</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3.2</entry>
+ <entry>Tuple creation functions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3.3</entry>
+ <entry>Tuple helper classes</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3.4</entry>
+ <entry>Element access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.3.5</entry>
+ <entry>Relational operators</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.1.4</entry>
+ <entry>Pairs</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2</entry>
+ <entry>Fixed size array</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.1</entry>
+ <entry>Header <code>&lt;array&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2</entry>
+ <entry>Class template <code>array</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2.1</entry>
+ <entry><code>array</code> constructors, copy, and assignment</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2.2</entry>
+ <entry><code>array</code> specialized algorithms</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2.3</entry>
+ <entry><code>array</code> size</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2.4</entry>
+ <entry>Zero sized <code>array</code>s</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.2.2.5</entry>
+ <entry>Tuple interface to class template <code>array</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3</entry>
+ <entry>Unordered associative containers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.1</entry>
+ <entry>Unordered associative container requirements</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.1.1</entry>
+ <entry>Exception safety guarantees</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.2</entry>
+ <entry>Additions to header <code>&lt;functional&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.3</entry>
+ <entry>Class template <code>hash</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4</entry>
+ <entry>Unordered associative container classes</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.1</entry>
+ <entry>Header <code>&lt;unordered_set&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.2</entry>
+ <entry>Header <code>&lt;unordered_map&gt;</code> synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.3</entry>
+ <entry>Class template <code>unordered_set</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.3.1</entry>
+ <entry><code>unordered_set</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.3.2</entry>
+ <entry><code>unordered_set</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.4</entry>
+ <entry>Class template <code>unordered_map</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.4.1</entry>
+ <entry><code>unordered_map</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.4.2</entry>
+ <entry><code>unordered_map</code> element access</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.4.3</entry>
+ <entry><code>unordered_map</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.5</entry>
+ <entry>Class template <code>unordered_multiset<code></code></code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.5.1</entry>
+ <entry><code>unordered_multiset</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.5.2</entry>
+ <entry><code>unordered_multiset</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.6</entry>
+ <entry>Class template <code>unordered_multimap</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.6.1</entry>
+ <entry><code>unordered_multimap</code> constructors</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>6.3.4.6.2</entry>
+ <entry><code>unordered_multimap</code> swap</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>7</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>Regular Expressions</emphasis></entry>
+ </row>
+ <row>
+ <entry>7.1</entry>
+ <entry>Definitions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.2</entry>
+ <entry>Requirements</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.3</entry>
+ <entry>Regular expressions summary</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.4</entry>
+ <entry>Header <code>&lt;regex&gt;</code> synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.5</entry>
+ <entry>Namespace <code>tr1::regex_constants</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.5.1</entry>
+ <entry>Bitmask Type <code>syntax_option_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.5.2</entry>
+ <entry>Bitmask Type <code>regex_constants::match_flag_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.5.3</entry>
+ <entry>Implementation defined <code>error_type</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.6</entry>
+ <entry>Class <code>regex_error</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.7</entry>
+ <entry>Class template <code>regex_traits</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8</entry>
+ <entry>Class template <code>basic_regex</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.1</entry>
+ <entry><code>basic_regex</code> constants</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.2</entry>
+ <entry><code>basic_regex</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.3</entry>
+ <entry><code>basic_regex</code> assign</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.4</entry>
+ <entry><code>basic_regex</code> constant operations</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.5</entry>
+ <entry><code>basic_regex</code> locale</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.6</entry>
+ <entry><code>basic_regex</code> swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.7</entry>
+ <entry><code>basic_regex</code> non-member functions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.8.7.1</entry>
+ <entry><code>basic_regex</code> non-member swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.9</entry>
+ <entry>Class template <code>sub_match</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.9.1</entry>
+ <entry><code>sub_match</code> members</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.9.2</entry>
+ <entry><code>sub_match</code> non-member operators</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10</entry>
+ <entry>Class template <code>match_results</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.1</entry>
+ <entry><code>match_results</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.2</entry>
+ <entry><code>match_results</code> size</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.3</entry>
+ <entry><code>match_results</code> element access</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.4</entry>
+ <entry><code>match_results</code> formatting</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.5</entry>
+ <entry><code>match_results</code> allocator</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.10.6</entry>
+ <entry><code>match_results</code> swap</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.11</entry>
+ <entry>Regular expression algorithms</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.11.1</entry>
+ <entry>exceptions</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.11.2</entry>
+ <entry><code>regex_match</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.11.3</entry>
+ <entry><code>regex_search</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.11.4</entry>
+ <entry><code>regex_replace</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12</entry>
+ <entry>Regular expression Iterators</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.1</entry>
+ <entry>Class template <code>regex_iterator</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.1.1</entry>
+ <entry><code>regex_iterator</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.1.2</entry>
+ <entry><code>regex_iterator</code> comparisons</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.1.3</entry>
+ <entry><code>regex_iterator</code> dereference</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.1.4</entry>
+ <entry><code>regex_iterator</code> increment</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.2</entry>
+ <entry>Class template <code>regex_token_iterator</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.2.1</entry>
+ <entry><code>regex_token_iterator</code> constructors</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.2.2</entry>
+ <entry><code>regex_token_iterator</code> comparisons</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.2.3</entry>
+ <entry><code>regex_token_iterator</code> dereference</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.12.2.4</entry>
+ <entry><code>regex_token_iterator</code> increment</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>7.13</entry>
+ <entry>Modified ECMAScript regular expression grammar</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><emphasis>8</emphasis></entry>
+ <entry namest="c2" nameend="c6" align="left"><emphasis>C Compatibility</emphasis></entry>
+ </row>
+ <row>
+ <entry>8.1</entry>
+ <entry>Additions to header <code>&lt;complex&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.2</entry>
+ <entry>Function <code>acos</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.3</entry>
+ <entry>Function <code>asin</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.4</entry>
+ <entry>Function <code>atan</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.5</entry>
+ <entry>Function <code>acosh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.6</entry>
+ <entry>Function <code>asinh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.7</entry>
+ <entry>Function <code>atanh</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.8</entry>
+ <entry>Function <code>fabs</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.1.9</entry>
+ <entry>Additional Overloads</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.2</entry>
+ <entry>Header <code>&lt;ccomplex&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>8.3</entry>
+ <entry>Header <code>&lt;complex.h&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>8.4</entry>
+ <entry>Additions to header <code>&lt;cctype&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.4.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.4.2</entry>
+ <entry>Function <code>isblank</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.5</entry>
+ <entry>Additions to header <code>&lt;ctype.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.6</entry>
+ <entry>Header <code>&lt;cfenv&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.6.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.6.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.7</entry>
+ <entry>Header <code>&lt;fenv.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.8</entry>
+ <entry>Additions to header <code>&lt;cfloat&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.9</entry>
+ <entry>Additions to header <code>&lt;float.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.10</entry>
+ <entry>Additions to header <code>&lt;ios&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.10.1</entry>
+ <entry>Synopsis</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.10.2</entry>
+ <entry>Function <code>hexfloat</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.11</entry>
+ <entry>Header <code>&lt;cinttypes&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.11.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 557</entry>
+ </row>
+ <row>
+ <entry>8.11.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.12</entry>
+ <entry>Header <code>&lt;inttypes.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.13</entry>
+ <entry>Additions to header <code>&lt;climits&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.14</entry>
+ <entry>Additions to header <code>&lt;limits.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.15</entry>
+ <entry>Additions to header <code>&lt;locale&gt;</code></entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>missing</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.16</entry>
+ <entry>Additions to header <code>&lt;cmath&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.16.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.16.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.16.3</entry>
+ <entry>Function template definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.16.4</entry>
+ <entry>Additional overloads</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 568; DR 550</entry>
+ </row>
+ <row>
+ <entry>8.17</entry>
+ <entry>Additions to header <code>&lt;math.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.18</entry>
+ <entry>Additions to header <code>&lt;cstdarg&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.19</entry>
+ <entry>Additions to header <code>&lt;stdarg.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.20</entry>
+ <entry>The header <code>&lt;cstdbool&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.21</entry>
+ <entry>The header <code>&lt;stdbool.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.22</entry>
+ <entry>The header <code>&lt;cstdint&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.22.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.22.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.23</entry>
+ <entry>The header <code>&lt;stdint.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.24</entry>
+ <entry>Additions to header <code>&lt;cstdio&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.24.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.24.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.24.3</entry>
+ <entry>Additional format specifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>8.24.4</entry>
+ <entry>Additions to header <code>&lt;stdio.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.25</entry>
+ <entry>Additions to header <code>&lt;cstdlib&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.25.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.25.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.25.3</entry>
+ <entry>Function <code>abs</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.25.4</entry>
+ <entry>Function <code>div</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.26</entry>
+ <entry>Additions to header <code>&lt;stdlib.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.27</entry>
+ <entry>Header <code>&lt;ctgmath&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>8.28</entry>
+ <entry>Header <code>&lt;tgmath.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>DR 551</entry>
+ </row>
+ <row>
+ <entry>8.29</entry>
+ <entry>Additions to header <code>&lt;ctime&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>8.30</entry>
+ <entry>Additions to header <code>&lt;cwchar&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.30.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.30.2</entry>
+ <entry>Definitions</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.30.3</entry>
+ <entry>Additional wide format specifiers</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>C library responsibility</entry>
+ </row>
+ <row>
+ <entry>8.31</entry>
+ <entry>Additions to header <code>&lt;wchar.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.32</entry>
+ <entry>Additions to header <code>&lt;cwctype&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.32.1</entry>
+ <entry>Synopsis</entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.32.2</entry>
+ <entry>Function <code>iswblank</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>8.33</entry>
+ <entry>Additions to header <code>&lt;wctype.h&gt;</code></entry>
+ <entry>done</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ </tbody>
+</tgroup>
+</table>
+
+<para>
+Footnotes
+</para>
+
+<para>
+ The shared_ptr implementation uses some code from the
+ <ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">Boost
+ shared_ptr</ulink> library.
+</para>
+
+</sect2> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/strings.xml b/libstdc++-v3/doc/xml/manual/strings.xml
new file mode 100644
index 00000000000..d8f2035cb6d
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/strings.xml
@@ -0,0 +1,495 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.strings" xreflabel="Strings">
+<?dbhtml filename="strings.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Strings</title>
+
+<!-- Chapter 01 : Character Traits -->
+
+<!-- Chapter 02 : String Classes -->
+<chapter id="manual.strings.string" xreflabel="string">
+ <title>String Classes</title>
+
+ <sect1 id="strings.string.simple" xreflabel="Simple Transformations">
+ <title>Simple Transformations</title>
+ <para>
+ Here are Standard, simple, and portable ways to perform common
+ transformations on a <code>string</code> instance, such as
+ &quot;convert to all upper case.&quot; The word transformations
+ is especially apt, because the standard template function
+ <code>transform&lt;&gt;</code> is used.
+ </para>
+ <para>
+ This code will go through some iterations. Here's a simiple
+ version:
+ </para>
+ <programlisting>
+ #include &lt;string&gt;
+ #include &lt;algorithm&gt;
+ #include &lt;cctype&gt; // old &lt;ctype.h&gt;
+
+ struct ToLower
+ {
+ char operator() (char c) const { return std::tolower(c); }
+ };
+
+ struct ToUpper
+ {
+ char operator() (char c) const { return std::toupper(c); }
+ };
+
+ int main()
+ {
+ std::string s ("Some Kind Of Initial Input Goes Here");
+
+ // Change everything into upper case
+ std::transform (s.begin(), s.end(), s.begin(), ToUpper());
+
+ // Change everything into lower case
+ std::transform (s.begin(), s.end(), s.begin(), ToLower());
+
+ // Change everything back into upper case, but store the
+ // result in a different string
+ std::string capital_s;
+ capital_s.resize(s.size());
+ std::transform (s.begin(), s.end(), capital_s.begin(), ToUpper());
+ }
+ </programlisting>
+ <para>
+ <emphasis>Note</emphasis> that these calls all
+ involve the global C locale through the use of the C functions
+ <code>toupper/tolower</code>. This is absolutely guaranteed to work --
+ but <emphasis>only</emphasis> if the string contains <emphasis>only</emphasis> characters
+ from the basic source character set, and there are <emphasis>only</emphasis>
+ 96 of those. Which means that not even all English text can be
+ represented (certain British spellings, proper names, and so forth).
+ So, if all your input forevermore consists of only those 96
+ characters (hahahahahaha), then you're done.
+ </para>
+ <para><emphasis>Note</emphasis> that the
+ <code>ToUpper</code> and <code>ToLower</code> function objects
+ are needed because <code>toupper</code> and <code>tolower</code>
+ are overloaded names (declared in <code>&lt;cctype&gt;</code> and
+ <code>&lt;locale&gt;</code>) so the template-arguments for
+ <code>transform&lt;&gt;</code> cannot be deduced, as explained in
+ <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-11/msg00180.html">this
+ message</ulink>.
+ <!-- section 14.8.2.4 clause 16 in ISO 14882:1998 -->
+ At minimum, you can write short wrappers like
+ </para>
+ <programlisting>
+ char toLower (char c)
+ {
+ return std::tolower(c);
+ } </programlisting>
+ <para>The correct method is to use a facet for a particular locale
+ and call its conversion functions. These are discussed more in
+ Chapter 22; the specific part is
+ <ulink url="../22_locale/howto.html#7">Correct Transformations</ulink>,
+ which shows the final version of this code. (Thanks to James Kanze
+ for assistance and suggestions on all of this.)
+ </para>
+ <para>Another common operation is trimming off excess whitespace. Much
+ like transformations, this task is trivial with the use of string's
+ <code>find</code> family. These examples are broken into multiple
+ statements for readability:
+ </para>
+ <programlisting>
+ std::string str (" \t blah blah blah \n ");
+
+ // trim leading whitespace
+ string::size_type notwhite = str.find_first_not_of(" \t\n");
+ str.erase(0,notwhite);
+
+ // trim trailing whitespace
+ notwhite = str.find_last_not_of(" \t\n");
+ str.erase(notwhite+1); </programlisting>
+ <para>Obviously, the calls to <code>find</code> could be inserted directly
+ into the calls to <code>erase</code>, in case your compiler does not
+ optimize named temporaries out of existence.
+ </para>
+
+ </sect1>
+ <sect1 id="strings.string.case" xreflabel="Case Sensitivity">
+ <title>Case Sensivitity</title>
+ <para>
+ </para>
+
+ <para>The well-known-and-if-it-isn't-well-known-it-ought-to-be
+ <ulink url="http://www.gotw.ca/gotw/">Guru of the Week</ulink>
+ discussions held on Usenet covered this topic in January of 1998.
+ Briefly, the challenge was, <quote>write a 'ci_string' class which
+ is identical to the standard 'string' class, but is
+ case-insensitive in the same way as the (common but nonstandard)
+ C function stricmp()</quote>.
+ </para>
+ <programlisting>
+ ci_string s( "AbCdE" );
+
+ // case insensitive
+ assert( s == "abcde" );
+ assert( s == "ABCDE" );
+
+ // still case-preserving, of course
+ assert( strcmp( s.c_str(), "AbCdE" ) == 0 );
+ assert( strcmp( s.c_str(), "abcde" ) != 0 ); </programlisting>
+
+ <para>The solution is surprisingly easy. The original answer was
+ posted on Usenet, and a revised version appears in Herb Sutter's
+ book <emphasis>Exceptional C++</emphasis> and on his website as <ulink url="http://www.gotw.ca/gotw/029.htm">GotW 29</ulink>.
+ </para>
+ <para>See? Told you it was easy!</para>
+ <para>
+ <emphasis>Added June 2000:</emphasis> The May 2000 issue of C++
+ Report contains a fascinating <ulink
+ url="http://lafstern.org/matt/col2_new.pdf"> article</ulink> by
+ Matt Austern (yes, <emphasis>the</emphasis> Matt Austern) on why
+ case-insensitive comparisons are not as easy as they seem, and
+ why creating a class is the <emphasis>wrong</emphasis> way to go
+ about it in production code. (The GotW answer mentions one of
+ the principle difficulties; his article mentions more.)
+ </para>
+ <para>Basically, this is &quot;easy&quot; only if you ignore some things,
+ things which may be too important to your program to ignore. (I chose
+ to ignore them when originally writing this entry, and am surprised
+ that nobody ever called me on it...) The GotW question and answer
+ remain useful instructional tools, however.
+ </para>
+ <para><emphasis>Added September 2000:</emphasis> James Kanze provided a link to a
+ <ulink url="http://www.unicode.org/unicode/reports/tr21/">Unicode
+ Technical Report discussing case handling</ulink>, which provides some
+ very good information.
+ </para>
+
+ </sect1>
+ <sect1 id="strings.string.character_types" xreflabel="Arbitrary Characters">
+ <title>Arbitrary Character Types</title>
+ <para>
+ </para>
+
+ <para>The <code>std::basic_string</code> is tantalizingly general, in that
+ it is parameterized on the type of the characters which it holds.
+ In theory, you could whip up a Unicode character class and instantiate
+ <code>std::basic_string&lt;my_unicode_char&gt;</code>, or assuming
+ that integers are wider than characters on your platform, maybe just
+ declare variables of type <code>std::basic_string&lt;int&gt;</code>.
+ </para>
+ <para>That's the theory. Remember however that basic_string has additional
+ type parameters, which take default arguments based on the character
+ type (called <code>CharT</code> here):
+ </para>
+ <programlisting>
+ template &lt;typename CharT,
+ typename Traits = char_traits&lt;CharT&gt;,
+ typename Alloc = allocator&lt;CharT&gt; &gt;
+ class basic_string { .... };</programlisting>
+ <para>Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right
+ Thing by default, unless you need to implement your own allocator
+ for your characters.
+ </para>
+ <para>But <code>char_traits</code> takes more work. The char_traits
+ template is <emphasis>declared</emphasis> but not <emphasis>defined</emphasis>.
+ That means there is only
+ </para>
+ <programlisting>
+ template &lt;typename CharT&gt;
+ struct char_traits
+ {
+ static void foo (type1 x, type2 y);
+ ...
+ };</programlisting>
+ <para>and functions such as char_traits&lt;CharT&gt;::foo() are not
+ actually defined anywhere for the general case. The C++ standard
+ permits this, because writing such a definition to fit all possible
+ CharT's cannot be done.
+ </para>
+ <para>The C++ standard also requires that char_traits be specialized for
+ instantiations of <code>char</code> and <code>wchar_t</code>, and it
+ is these template specializations that permit entities like
+ <code>basic_string&lt;char,char_traits&lt;char&gt;&gt;</code> to work.
+ </para>
+ <para>If you want to use character types other than char and wchar_t,
+ such as <code>unsigned char</code> and <code>int</code>, you will
+ need suitable specializations for them. For a time, in earlier
+ versions of GCC, there was a mostly-correct implementation that
+ let programmers be lazy but it broke under many situations, so it
+ was removed. GCC 3.4 introduced a new implementation that mostly
+ works and can be specialized even for <code>int</code> and other
+ built-in types.
+ </para>
+ <para>If you want to use your own special character class, then you have
+ <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00163.html">a lot
+ of work to do</ulink>, especially if you with to use i18n features
+ (facets require traits information but don't have a traits argument).
+ </para>
+ <para>Another example of how to specialize char_traits was given <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00260.html">on the
+ mailing list</ulink> and at a later date was put into the file <code>
+ include/ext/pod_char_traits.h</code>. We agree
+ that the way it's used with basic_string (scroll down to main())
+ doesn't look nice, but that's because <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00236.html">the
+ nice-looking first attempt</ulink> turned out to <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00242.html">not
+ be conforming C++</ulink>, due to the rule that CharT must be a POD.
+ (See how tricky this is?)
+ </para>
+
+ </sect1>
+
+ <sect1 id="strings.string.token" xreflabel="Tokenizing">
+ <title>Tokenizing</title>
+ <para>
+ </para>
+ <para>The Standard C (and C++) function <code>strtok()</code> leaves a lot to
+ be desired in terms of user-friendliness. It's unintuitive, it
+ destroys the character string on which it operates, and it requires
+ you to handle all the memory problems. But it does let the client
+ code decide what to use to break the string into pieces; it allows
+ you to choose the &quot;whitespace,&quot; so to speak.
+ </para>
+ <para>A C++ implementation lets us keep the good things and fix those
+ annoyances. The implementation here is more intuitive (you only
+ call it once, not in a loop with varying argument), it does not
+ affect the original string at all, and all the memory allocation
+ is handled for you.
+ </para>
+ <para>It's called stringtok, and it's a template function. Sources are
+ as below, in a less-portable form than it could be, to keep this
+ example simple (for example, see the comments on what kind of
+ string it will accept).
+ </para>
+
+<programlisting>
+#include &lt;string&gt;
+template &lt;typename Container&gt;
+void
+stringtok(Container &amp;container, string const &amp;in,
+ const char * const delimiters = " \t\n")
+{
+ const string::size_type len = in.length();
+ string::size_type i = 0;
+
+ while (i &lt; len)
+ {
+ // Eat leading whitespace
+ i = in.find_first_not_of(delimiters, i);
+ if (i == string::npos)
+ return; // Nothing left but white space
+
+ // Find the end of the token
+ string::size_type j = in.find_first_of(delimiters, i);
+
+ // Push token
+ if (j == string::npos)
+ {
+ container.push_back(in.substr(i));
+ return;
+ }
+ else
+ container.push_back(in.substr(i, j-i));
+
+ // Set up for next loop
+ i = j + 1;
+ }
+}
+</programlisting>
+
+
+ <para>
+ The author uses a more general (but less readable) form of it for
+ parsing command strings and the like. If you compiled and ran this
+ code using it:
+ </para>
+
+
+ <programlisting>
+ std::list&lt;string&gt; ls;
+ stringtok (ls, " this \t is\t\n a test ");
+ for (std::list&lt;string&gt;const_iterator i = ls.begin();
+ i != ls.end(); ++i)
+ {
+ std::cerr &lt;&lt; ':' &lt;&lt; (*i) &lt;&lt; ":\n";
+ } </programlisting>
+ <para>You would see this as output:
+ </para>
+ <programlisting>
+ :this:
+ :is:
+ :a:
+ :test: </programlisting>
+ <para>with all the whitespace removed. The original <code>s</code> is still
+ available for use, <code>ls</code> will clean up after itself, and
+ <code>ls.size()</code> will return how many tokens there were.
+ </para>
+ <para>As always, there is a price paid here, in that stringtok is not
+ as fast as strtok. The other benefits usually outweigh that, however.
+ <ulink url="stringtok_std_h.txt">Another version of stringtok is given
+ here</ulink>, suggested by Chris King and tweaked by Petr Prikryl,
+ and this one uses the
+ transformation functions mentioned below. If you are comfortable
+ with reading the new function names, this version is recommended
+ as an example.
+ </para>
+ <para><emphasis>Added February 2001:</emphasis> Mark Wilden pointed out that the
+ standard <code>std::getline()</code> function can be used with standard
+ <ulink url="../27_io/howto.html">istringstreams</ulink> to perform
+ tokenizing as well. Build an istringstream from the input text,
+ and then use std::getline with varying delimiters (the three-argument
+ signature) to extract tokens into a string.
+ </para>
+
+
+ </sect1>
+ <sect1 id="strings.string.shrink" xreflabel="Shrink to Fit">
+ <title>Shrink to Fit</title>
+ <para>
+ </para>
+ <para>From GCC 3.4 calling <code>s.reserve(res)</code> on a
+ <code>string s</code> with <code>res &lt; s.capacity()</code> will
+ reduce the string's capacity to <code>std::max(s.size(), res)</code>.
+ </para>
+ <para>This behaviour is suggested, but not required by the standard. Prior
+ to GCC 3.4 the following alternative can be used instead
+ </para>
+ <programlisting>
+ std::string(str.data(), str.size()).swap(str);
+ </programlisting>
+ <para>This is similar to the idiom for reducing a <code>vector</code>'s
+ memory usage (see <ulink url='../faq/index.html#5_9'>FAQ 5.9</ulink>) but
+ the regular copy constructor cannot be used because libstdc++'s
+ <code>string</code> is Copy-On-Write.
+ </para>
+
+
+ </sect1>
+
+ <sect1 id="strings.string.Cstring" xreflabel="CString (MFC)">
+ <title>CString (MFC)</title>
+ <para>
+ </para>
+
+ <para>A common lament seen in various newsgroups deals with the Standard
+ string class as opposed to the Microsoft Foundation Class called
+ CString. Often programmers realize that a standard portable
+ answer is better than a proprietary nonportable one, but in porting
+ their application from a Win32 platform, they discover that they
+ are relying on special functions offered by the CString class.
+ </para>
+ <para>Things are not as bad as they seem. In
+ <ulink url="http://gcc.gnu.org/ml/gcc/1999-04n/msg00236.html">this
+ message</ulink>, Joe Buck points out a few very important things:
+ </para>
+ <itemizedlist>
+ <listitem><para>The Standard <code>string</code> supports all the operations
+ that CString does, with three exceptions.
+ </para></listitem>
+ <listitem><para>Two of those exceptions (whitespace trimming and case
+ conversion) are trivial to implement. In fact, we do so
+ on this page.
+ </para></listitem>
+ <listitem><para>The third is <code>CString::Format</code>, which allows formatting
+ in the style of <code>sprintf</code>. This deserves some mention:
+ </para></listitem>
+ </itemizedlist>
+ <para>
+ The old libg++ library had a function called form(), which did much
+ the same thing. But for a Standard solution, you should use the
+ stringstream classes. These are the bridge between the iostream
+ hierarchy and the string class, and they operate with regular
+ streams seamlessly because they inherit from the iostream
+ hierarchy. An quick example:
+ </para>
+ <programlisting>
+ #include &lt;iostream&gt;
+ #include &lt;string&gt;
+ #include &lt;sstream&gt;
+
+ string f (string&amp; incoming) // incoming is "foo N"
+ {
+ istringstream incoming_stream(incoming);
+ string the_word;
+ int the_number;
+
+ incoming_stream &gt;&gt; the_word // extract "foo"
+ &gt;&gt; the_number; // extract N
+
+ ostringstream output_stream;
+ output_stream &lt;&lt; "The word was " &lt;&lt; the_word
+ &lt;&lt; " and 3*N was " &lt;&lt; (3*the_number);
+
+ return output_stream.str();
+ } </programlisting>
+ <para>A serious problem with CString is a design bug in its memory
+ allocation. Specifically, quoting from that same message:
+ </para>
+ <programlisting>
+ CString suffers from a common programming error that results in
+ poor performance. Consider the following code:
+
+ CString n_copies_of (const CString&amp; foo, unsigned n)
+ {
+ CString tmp;
+ for (unsigned i = 0; i &lt; n; i++)
+ tmp += foo;
+ return tmp;
+ }
+
+ This function is O(n^2), not O(n). The reason is that each +=
+ causes a reallocation and copy of the existing string. Microsoft
+ applications are full of this kind of thing (quadratic performance
+ on tasks that can be done in linear time) -- on the other hand,
+ we should be thankful, as it's created such a big market for high-end
+ ix86 hardware. :-)
+
+ If you replace CString with string in the above function, the
+ performance is O(n).
+ </programlisting>
+ <para>Joe Buck also pointed out some other things to keep in mind when
+ comparing CString and the Standard string class:
+ </para>
+ <itemizedlist>
+ <listitem><para>CString permits access to its internal representation; coders
+ who exploited that may have problems moving to <code>string</code>.
+ </para></listitem>
+ <listitem><para>Microsoft ships the source to CString (in the files
+ MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation
+ bug and rebuild your MFC libraries.
+ <emphasis><emphasis>Note:</emphasis> It looks like the CString shipped
+ with VC++6.0 has fixed this, although it may in fact have been
+ one of the VC++ SPs that did it.</emphasis>
+ </para></listitem>
+ <listitem><para><code>string</code> operations like this have O(n) complexity
+ <emphasis>if the implementors do it correctly</emphasis>. The libstdc++
+ implementors did it correctly. Other vendors might not.
+ </para></listitem>
+ <listitem><para>While parts of the SGI STL are used in libstdc++, their
+ string class is not. The SGI <code>string</code> is essentially
+ <code>vector&lt;char&gt;</code> and does not do any reference
+ counting like libstdc++'s does. (It is O(n), though.)
+ So if you're thinking about SGI's string or rope classes,
+ you're now looking at four possibilities: CString, the
+ libstdc++ string, the SGI string, and the SGI rope, and this
+ is all before any allocator or traits customizations! (More
+ choices than you can shake a stick at -- want fries with that?)
+ </para></listitem>
+ </itemizedlist>
+
+ </sect1>
+</chapter>
+
+<!-- Chapter 03 : Interacting with C -->
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/support.xml b/libstdc++-v3/doc/xml/manual/support.xml
new file mode 100644
index 00000000000..55169590028
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/support.xml
@@ -0,0 +1,448 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.support" xreflabel="Support">
+<?dbhtml filename="support.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Support</title>
+
+<preface>
+ <title></title>
+ <para>
+ This part deals with the functions called and objects created
+ automatically during the course of a program's existence.
+ </para>
+
+ <para>
+ While we can't reproduce the contents of the Standard here (you
+ need to get your own copy from your nation's member body; see our
+ homepage for help), we can mention a couple of changes in what
+ kind of support a C++ program gets from the Standard Library.
+ </para>
+</preface>
+
+<chapter id="manual.support.types" xreflabel="Types">
+ <title>Types</title>
+ <sect1 id="manual.support.types.fundamental" xreflabel="Fundamental Types">
+ <title>Fundamental Types</title>
+ <para>
+ C++ has the following builtin types:
+ </para>
+ <itemizedlist>
+ <listitem><para>
+ char
+ </para></listitem>
+ <listitem><para>
+ signed char
+ </para></listitem>
+ <listitem><para>
+ unsigned char
+ </para></listitem>
+ <listitem><para>
+ signed short
+ </para></listitem>
+ <listitem><para>
+ signed int
+ </para></listitem>
+ <listitem><para>
+ signed long
+ </para></listitem>
+ <listitem><para>
+ unsigned short
+ </para></listitem>
+ <listitem><para>
+ unsigned int
+ </para></listitem>
+ <listitem><para>
+ unsigned long
+ </para></listitem>
+ <listitem><para>
+ bool
+ </para></listitem>
+ <listitem><para>
+ wchar_t
+ </para></listitem>
+ <listitem><para>
+ float
+ </para></listitem>
+ <listitem><para>
+ double
+ </para></listitem>
+ <listitem><para>
+ long double
+ </para></listitem>
+ </itemizedlist>
+
+ <para>
+ These fundamental types are always available, without having to
+ include a header file. These types are exactly the same in
+ either C++ or in C.
+ </para>
+
+ <para>
+ Specializing parts of the library on these types is prohibited:
+ instead, use a POD.
+ </para>
+
+ </sect1>
+ <sect1 id="manual.support.types.numeric_limits" xreflabel="Numeric Properites">
+ <title>Numeric Properties</title>
+
+
+ <para>
+ The header <filename class="headerfile">limits</filename> defines
+ traits classes to give access to various implementation
+ defined-aspects of the fundamental types. The traits classes --
+ fourteen in total -- are all specializations of the template class
+ <classname>numeric_limits</classname>, documented <ulink
+ url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/structstd_1_1numeric__limits.html">here</ulink>
+ and defined as follows:
+ </para>
+
+ <programlisting>
+ template&lt;typename T&gt;
+ struct class
+ {
+ static const bool is_specialized;
+ static T max() throw();
+ static T min() throw();
+
+ static const int digits;
+ static const int digits10;
+ static const bool is_signed;
+ static const bool is_integer;
+ static const bool is_exact;
+ static const int radix;
+ static T epsilon() throw();
+ static T round_error() throw();
+
+ static const int min_exponent;
+ static const int min_exponent10;
+ static const int max_exponent;
+ static const int max_exponent10;
+
+ static const bool has_infinity;
+ static const bool has_quiet_NaN;
+ static const bool has_signaling_NaN;
+ static const float_denorm_style has_denorm;
+ static const bool has_denorm_loss;
+ static T infinity() throw();
+ static T quiet_NaN() throw();
+ static T denorm_min() throw();
+
+ static const bool is_iec559;
+ static const bool is_bounded;
+ static const bool is_modulo;
+
+ static const bool traps;
+ static const bool tinyness_before;
+ static const float_round_style round_style;
+ };
+ </programlisting>
+ </sect1>
+
+ <sect1 id="manual.support.types.null" xreflabel="NULL">
+ <title>NULL</title>
+ <para>
+ The only change that might affect people is the type of
+ <constant>NULL</constant>: while it is required to be a macro,
+ the definition of that macro is <emphasis>not</emphasis> allowed
+ to be <constant>(void*)0</constant>, which is often used in C.
+ </para>
+
+ <para>
+ For <command>g++</command>, <constant>NULL</constant> is
+ <programlisting>#define</programlisting>'d to be
+ <constant>__null</constant>, a magic keyword extension of
+ <command>g++</command>.
+ </para>
+
+ <para>
+ The biggest problem of #defining <constant>NULL</constant> to be
+ something like <quote>0L</quote> is that the compiler will view
+ that as a long integer before it views it as a pointer, so
+ overloading won't do what you expect. (This is why
+ <command>g++</command> has a magic extension, so that
+ <constant>NULL</constant> is always a pointer.)
+ </para>
+
+ <para>In his book <ulink
+ url="http://www.awprofessional.com/titles/0-201-92488-9/"><emphasis>Effective
+ C++</emphasis></ulink>, Scott Meyers points out that the best way
+ to solve this problem is to not overload on pointer-vs-integer
+ types to begin with. He also offers a way to make your own magic
+ <constant>NULL</constant> that will match pointers before it
+ matches integers.
+ </para>
+ <para>See
+ <ulink url="http://www.awprofessional.com/titles/0-201-31015-5/">the
+ Effective C++ CD example</ulink>
+ </para>
+ </sect1>
+
+</chapter>
+
+<chapter id="manual.support.memory" xreflabel="Dynamic Memory">
+ <title>Dynamic Memory</title>
+ <para>
+ There are six flavors each of <function>new</function> and
+ <function>delete</function>, so make certain that you're using the right
+ ones. Here are quickie descriptions of <function>new</function>:
+ </para>
+ <itemizedlist>
+ <listitem><para>
+ single object form, throwing a
+ <classname>bad_alloc</classname> on errors; this is what most
+ people are used to using
+ </para></listitem>
+ <listitem><para>
+ Single object &quot;nothrow&quot; form, returning NULL on errors
+ </para></listitem>
+ <listitem><para>
+ Array <function>new</function>, throwing
+ <classname>bad_alloc</classname> on errors
+ </para></listitem>
+ <listitem><para>
+ Array nothrow <function>new</function>, returning
+ <constant>NULL</constant> on errors
+ </para></listitem>
+ <listitem><para>
+ Placement <function>new</function>, which does nothing (like
+ it's supposed to)
+ </para></listitem>
+ <listitem><para>
+ Placement array <function>new</function>, which also does
+ nothing
+ </para></listitem>
+ </itemizedlist>
+ <para>
+ They are distinguished by the parameters that you pass to them, like
+ any other overloaded function. The six flavors of <function>delete</function>
+ are distinguished the same way, but none of them are allowed to throw
+ an exception under any circumstances anyhow. (They match up for
+ completeness' sake.)
+ </para>
+ <para>
+ Remember that it is perfectly okay to call <function>delete</function> on a
+ NULL pointer! Nothing happens, by definition. That is not the
+ same thing as deleting a pointer twice.
+ </para>
+ <para>
+ By default, if one of the <quote>throwing <function>new</function>s</quote> can't
+ allocate the memory requested, it tosses an instance of a
+ <classname>bad_alloc</classname> exception (or, technically, some class derived
+ from it). You can change this by writing your own function (called a
+ new-handler) and then registering it with <function>set_new_handler()</function>:
+ </para>
+ <programlisting>
+ typedef void (*PFV)(void);
+
+ static char* safety;
+ static PFV old_handler;
+
+ void my_new_handler ()
+ {
+ delete[] safety;
+ popup_window ("Dude, you are running low on heap memory. You
+ should, like, close some windows, or something.
+ The next time you run out, we're gonna burn!");
+ set_new_handler (old_handler);
+ return;
+ }
+
+ int main ()
+ {
+ safety = new char[500000];
+ old_handler = set_new_handler (&amp;my_new_handler);
+ ...
+ }
+ </programlisting>
+ <para>
+ <classname>bad_alloc</classname> is derived from the base <classname>exception</classname>
+ class defined in Chapter 19.
+ </para>
+</chapter>
+
+<chapter id="manual.support.termination" xreflabel="Termination">
+ <title>Termination</title>
+ <sect1 id="support.termination.handlers" xreflabel="Termination Handlers">
+ <title>Termination Handlers</title>
+ <para>
+ Not many changes here to <filename
+ class="headerfile">cstdlib</filename>. You should note that the
+ <function>abort()</function> function does not call the
+ destructors of automatic nor static objects, so if you're
+ depending on those to do cleanup, it isn't going to happen.
+ (The functions registered with <function>atexit()</function>
+ don't get called either, so you can forget about that
+ possibility, too.)
+ </para>
+ <para>
+ The good old <function>exit()</function> function can be a bit
+ funky, too, until you look closer. Basically, three points to
+ remember are:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Static objects are destroyed in reverse order of their creation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Functions registered with <function>atexit()</function> are called in
+ reverse order of registration, once per registration call.
+ (This isn't actually new.)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The previous two actions are <quote>interleaved,</quote> that is,
+ given this pseudocode:
+ </para>
+<programlisting>
+ extern "C or C++" void f1 (void);
+ extern "C or C++" void f2 (void);
+
+ static Thing obj1;
+ atexit(f1);
+ static Thing obj2;
+ atexit(f2);
+</programlisting>
+ <para>
+ then at a call of <function>exit()</function>,
+ <varname>f2</varname> will be called, then
+ <varname>obj2</varname> will be destroyed, then
+ <varname>f1</varname> will be called, and finally
+ <varname>obj1</varname> will be destroyed. If
+ <varname>f1</varname> or <varname>f2</varname> allow an
+ exception to propagate out of them, Bad Things happen.
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ Note also that <function>atexit()</function> is only required to store 32
+ functions, and the compiler/library might already be using some of
+ those slots. If you think you may run out, we recommend using
+ the <function>xatexit</function>/<function>xexit</function> combination from <literal>libiberty</literal>, which has no such limit.
+ </para>
+ </sect1>
+
+ <sect1 id="support.termination.verbose" xreflabel="Verbose Terminate Handler">
+ <title>Verbose Terminate Handler</title>
+ <para>
+ If you are having difficulty with uncaught exceptions and want a
+ little bit of help debugging the causes of the core dumps, you can
+ make use of a GNU extension, the verbose terminate handler.
+ </para>
+
+<programlisting>
+#include &lt;exception&gt;
+
+int main()
+{
+ std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+ ...
+
+ throw <replaceable>anything</replaceable>;
+}
+</programlisting>
+
+ <para>
+ The <function>__verbose_terminate_handler</function> function
+ obtains the name of the current exception, attempts to demangle
+ it, and prints it to stderr. If the exception is derived from
+ <classname>exception</classname> then the output from
+ <function>what()</function> will be included.
+ </para>
+
+ <para>
+ Any replacement termination function is required to kill the
+ program without returning; this one calls abort.
+ </para>
+
+ <para>
+ For example:
+ </para>
+
+<programlisting>
+#include &lt;exception&gt;
+#include &lt;stdexcept&gt;
+
+struct argument_error : public std::runtime_error
+{
+ argument_error(const std::string&amp; s): std::runtime_error(s) { }
+};
+
+int main(int argc)
+{
+ std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
+ if (argc &gt; 5)
+ throw argument_error(<quote>argc is greater than 5!</quote>);
+ else
+ throw argc;
+}
+</programlisting>
+
+ <para>
+ With the verbose terminate handler active, this gives:
+ </para>
+
+ <screen>
+ <computeroutput>
+ % ./a.out
+ terminate called after throwing a `int'
+ Aborted
+ % ./a.out f f f f f f f f f f f
+ terminate called after throwing an instance of `argument_error'
+ what(): argc is greater than 5!
+ Aborted
+ </computeroutput>
+ </screen>
+
+ <para>
+ The 'Aborted' line comes from the call to
+ <function>abort()</function>, of course.
+ </para>
+
+ <para>
+ This is the default termination handler; nothing need be done to
+ use it. To go back to the previous <quote>silent death</quote>
+ method, simply include <filename>exception</filename> and
+ <filename>cstdlib</filename>, and call
+ </para>
+
+ <programlisting>
+ std::set_terminate(std::abort);
+ </programlisting>
+
+ <para>
+ After this, all calls to <function>terminate</function> will use
+ <function>abort</function> as the terminate handler.
+ </para>
+
+ <para>
+ Note: the verbose terminate handler will attempt to write to
+ stderr. If your application closes stderr or redirects it to an
+ inappropriate location,
+ <function>__verbose_terminate_handler</function> will behave in
+ an unspecified manner.
+ </para>
+
+ </sect1>
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/manual/test.xml b/libstdc++-v3/doc/xml/manual/test.xml
new file mode 100644
index 00000000000..076138d10da
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/test.xml
@@ -0,0 +1,823 @@
+<sect1 id="manual.intro.setup.test" xreflabel="Testing">
+<?dbhtml filename="test.html"?>
+
+<sect1info>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ test
+ </keyword>
+ <keyword>
+ testsuite
+ </keyword>
+ </keywordset>
+</sect1info>
+
+<title>Test</title>
+
+<sect2 id="test.organization" xreflabel="test.organization">
+<title>Organization</title>
+<para>
+ The directory <emphasis>libsrcdir/testsuite</emphasis> contains the
+ individual test cases organized in sub-directories corresponding to
+ chapters of the C++ standard (detailed below), the dejagnu test
+ harness support files, and sources to various testsuite utilities
+ that are packaged in a separate testing library.
+</para>
+
+<para>
+ All test cases for functionality required by the runtime components
+ of the C++ standard (ISO 14882) are files within the following
+ directories.
+</para>
+
+ <programlisting>
+17_intro
+18_support
+19_diagnostics
+20_util
+21_strings
+22_locale
+23_containers
+25_algorithms
+26_numerics
+27_io
+ </programlisting>
+
+ <para>
+ In addition, the following directories include test files:
+ </para>
+
+ <programlisting>
+tr1 Tests for components as described by the Technical Report on Standard Library Extensions (TR1).
+backward Tests for backwards compatibility and deprecated features.
+demangle Tests for __cxa_demangle, the IA 64 C++ ABI demangler
+ext Tests for extensions.
+performance Tests for performance analysis, and performance regressions.
+thread Tests for threads.
+ </programlisting>
+
+ <para>
+ Some directories don't have test files, but instead contain
+ auxiliary information (<ulink url="#internals">more information</ulink>):
+ </para>
+
+ <programlisting>
+config Files for the dejagnu test harness.
+lib Files for the dejagnu test harness.
+libstdc++* Files for the dejagnu test harness.
+data Sample text files for testing input and output.
+util Files for libtestc++, utilities and testing routines.
+ </programlisting>
+
+ <para>
+ Within a directory that includes test files, there may be
+ additional subdirectories, or files. Originally, test cases
+ were appended to one file that represented a particular section
+ of the chapter under test, and was named accordingly. For
+ instance, to test items related to <code> 21.3.6.1 -
+ basic_string::find [lib.string::find]</code> in the standard,
+ the following was used:
+ </para>
+ <programlisting>
+21_strings/find.cc
+ </programlisting>
+ <para>
+ However, that practice soon became a liability as the test cases
+ became huge and unwieldy, and testing new or extended
+ functionality (like wide characters or named locales) became
+ frustrating, leading to aggressive pruning of test cases on some
+ platforms that covered up implementation errors. Now, the test
+ suite has a policy of one file, one test case, which solves the
+ above issues and gives finer grained results and more manageable
+ error debugging. As an example, the test case quoted above
+ becomes:
+ </para>
+ <programlisting>
+21_strings/basic_string/find/char/1.cc
+21_strings/basic_string/find/char/2.cc
+21_strings/basic_string/find/char/3.cc
+21_strings/basic_string/find/wchar_t/1.cc
+21_strings/basic_string/find/wchar_t/2.cc
+21_strings/basic_string/find/wchar_t/3.cc
+ </programlisting>
+
+ <para>
+ All new tests should be written with the policy of one test
+ case, one file in mind.
+ </para>
+
+</sect2>
+
+<sect2 id="test.naming" xreflabel="test.naming">
+<title>Naming Conventions</title>
+ <para>
+ </para>
+
+ <para>
+ In addition, there are some special names and suffixes that are
+ used within the testsuite to designate particular kinds of
+ tests.
+ </para>
+
+<itemizedlist>
+<listitem>
+ <para>
+ <emphasis>_xin.cc</emphasis>
+ </para>
+ <para>
+ This test case expects some kind of interactive input in order
+ to finish or pass. At the moment, the interactive tests are not
+ run by default. Instead, they are run by hand, like:
+ </para>
+ <programlisting>
+g++ 27_io/objects/char/3_xin.cc
+cat 27_io/objects/char/3_xin.in | a.out
+ </programlisting>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>.in</emphasis>
+ </para>
+ <para>
+ This file contains the expected input for the corresponding <emphasis>
+ _xin.cc</emphasis> test case.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>_neg.cc</emphasis>
+ </para>
+ <para>
+ This test case is expected to fail: it's a negative test. At the
+ moment, these are almost always compile time errors.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>char</emphasis>
+ </para>
+ <para>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing the <code>char</code> instantiation of a
+ template.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>wchar_t</emphasis>
+ </para>
+ <para>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing the <code>wchar_t</code> instantiation of
+ a template. Some hosts do not support <code>wchar_t</code>
+ functionality, so for these targets, all of these tests will not
+ be run.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>thread</emphasis>
+ </para>
+ <para>
+ This can either be a directory name or part of a longer file
+ name, and indicates that this file, or the files within this
+ directory are testing situations where multiple threads are
+ being used.
+ </para>
+</listitem>
+<listitem>
+ <para>
+ <emphasis>performance</emphasis>
+ </para>
+ <para>
+ This can either be an enclosing directory name or part of a
+ specific file name. This indicates a test that is used to
+ analyze runtime performance, for performance regression testing,
+ or for other optimization related analysis. At the moment, these
+ test cases are not run by default.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="test.utils" xreflabel="test.utils">
+<title>Utilities</title>
+ <para>
+ </para>
+ <para>
+ The testsuite directory also contains some files that implement
+ functionality that is intended to make writing test cases easier,
+ or to avoid duplication, or to provide error checking in a way that
+ is consistent across platforms and test harnesses. A stand-alone
+ executable, called <emphasis>abi_check</emphasis>, and a static
+ library called <emphasis>libtestc++</emphasis> are
+ constructed. Both of these items are not installed, and only used
+ during testing.
+ </para>
+
+ <para>
+ These files include the following functionality:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>testsuite_abi.h</emphasis>,
+ <emphasis>testsuite_abi.cc</emphasis>,
+ <emphasis>testsuite_abi_check.cc</emphasis>
+ </para>
+ <para>
+ Creates the executable <emphasis>abi_check</emphasis>.
+ Used to check correctness of symbol versioning, visibility of
+ exported symbols, and compatibility on symbols in the shared
+ library, for hosts that support this feature. More information
+ can be found in the ABI documentation <ulink url="abi.html">here</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_allocator.h</emphasis>,
+ <emphasis>testsuite_allocator.cc</emphasis>
+ </para>
+ <para>
+ Contains specialized allocators that keep track of construction
+ and destruction. Also, support for overriding global new and
+ delete operators, including verification that new and delete
+ are called during execution, and that allocation over max_size
+ fails.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_character.h</emphasis>
+ </para>
+ <para>
+ Contains <code>std::char_traits</code> and
+ <code>std::codecvt</code> specializations for a user-defined
+ POD.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_hooks.h</emphasis>,
+ <emphasis>testsuite_hooks.cc</emphasis>
+ </para>
+ <para>
+ A large number of utilities, including:
+ </para>
+ <itemizedlist>
+ <listitem><para>VERIFY</para></listitem>
+ <listitem><para>set_memory_limits</para></listitem>
+ <listitem><para>verify_demangle</para></listitem>
+ <listitem><para>run_tests_wrapped_locale</para></listitem>
+ <listitem><para>run_tests_wrapped_env</para></listitem>
+ <listitem><para>try_named_locale</para></listitem>
+ <listitem><para>try_mkfifo</para></listitem>
+ <listitem><para>func_callback</para></listitem>
+ <listitem><para>counter</para></listitem>
+ <listitem><para>copy_tracker</para></listitem>
+ <listitem><para>copy_constructor</para></listitem>
+ <listitem><para>assignment_operator</para></listitem>
+ <listitem><para>destructor</para></listitem>
+ <listitem>
+ <para>pod_char, pod_int and associated char_traits specializations</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_io.h</emphasis>
+ </para>
+ <para>
+ Error, exception, and constraint checking for
+ <code>std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_iterators.h</emphasis>
+ </para>
+ <para>
+ Wrappers for various iterators.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>testsuite_performance.h</emphasis>
+ </para>
+ <para>
+ A number of class abstractions for performance counters, and
+ reporting functions including:
+ </para>
+ <itemizedlist>
+ <listitem><para>time_counter</para></listitem>
+ <listitem><para>resource_counter</para></listitem>
+ <listitem><para>report_performance</para></listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+
+</sect2>
+
+<sect2 id="test.run" xreflabel="test.run">
+<title>Running the Testsuite</title>
+
+ <sect3 id="test.run.basic" xreflabel="test.run.basic">
+ <title>Basic Results</title>
+ <para>
+ There are several options for running tests, including testing
+ the regression tests, testing a subset of the regression tests,
+ testing the performance tests, testing just compilation, testing
+ installed tools, etc. In addition, there is a special rule for
+ checking the exported symbols of the shared library.
+ </para>
+
+ <para>
+ You can check the status of the build without installing it
+ using the dejagnu harness, much like the rest of the gcc
+ tools.</para>
+ <programlisting> make check</programlisting>
+ <para>in the <emphasis>libbuilddir</emphasis> directory.</para>
+ <para>or</para>
+ <programlisting> make check-target-libstdc++-v3</programlisting>
+ <para>in the <emphasis>gccbuilddir</emphasis> directory.
+ </para>
+
+ <para>
+ These commands are functionally equivalent and will create a
+ 'testsuite' directory underneath
+ <emphasis>libbuilddir</emphasis> containing the results of the
+ tests. Two results files will be generated: <emphasis>
+ libstdc++.sum</emphasis>, which is a PASS/FAIL summary for each
+ test, and <emphasis>libstdc++.log</emphasis> which is a log of
+ the exact command line passed to the compiler, the compiler
+ output, and the executable output (if any).
+ </para>
+
+ <para>
+ Archives of test results for various versions and platforms are
+ available on the GCC website in the <ulink
+ url="http://gcc.gnu.org/gcc-4.1/buildstat.html">build
+ status</ulink> section of each individual release, and are also
+ archived on a daily basis on the <ulink
+ url="http://gcc.gnu.org/ml/gcc-testresults/current">gcc-testresults</ulink>
+ mailing list. Please check either of these places for a similar
+ combination of source version, operating system, and host CPU.
+ </para>
+ </sect3>
+
+ <sect3 id="test.run.options" xreflabel="test.run.options">
+ <title>Options</title>
+ <para>
+ To debug the dejagnu test harness during runs, try invoking with a
+ specific argument to the variable RUNTESTFLAGS, as below.
+ </para>
+
+<programlisting>
+make check-target-libstdc++-v3 RUNTESTFLAGS="-v"
+</programlisting>
+
+ <para>
+ or
+ </para>
+
+<programlisting>
+make check-target-libstdc++-v3 RUNTESTFLAGS="-v -v"
+</programlisting>
+
+ <para>
+ To run a subset of the library tests, you will need to generate
+ the <emphasis>testsuite_files</emphasis> file by running
+ <command>make testsuite_files</command> in the
+ <emphasis>libbuilddir/testsuite</emphasis> directory, described
+ below. Edit the file to remove the tests you don't want and
+ then run the testsuite as normal.
+ </para>
+
+ <para>
+ There are two ways to run on a simulator: set up DEJAGNU to point to a
+ specially crafted site.exp, or pass down --target_board flags.
+ </para>
+
+ <para>
+ Example flags to pass down for various embedded builds are as follows:
+ </para>
+
+<programlisting>
+ --target=powerpc-eabism (libgloss/sim)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=powerpc-sim"
+
+--target=calmrisc32 (libgloss/sid)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=calmrisc32-sid"
+
+--target=xscale-elf (newlib/sim)
+make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=arm-sim"
+</programlisting>
+
+ <para>
+ Also, here is an example of how to run the libstdc++ testsuite
+ for a multilibed build directory with different ABI settings:
+ </para>
+
+ <programlisting>
+make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board \"unix{-mabi=32,,-mabi=64}\"'
+</programlisting>
+
+ <para>
+ You can run the tests with a compiler and library that have
+ already been installed. Make sure that the compiler (e.g.,
+ <code>g++</code>) is in your <code>PATH</code>. If you are
+ using shared libraries, then you must also ensure that the
+ directory containing the shared version of libstdc++ is in your
+ <code>LD_LIBRARY_PATH</code>, or equivalent. If your GCC source
+ tree is at <code>/path/to/gcc</code>, then you can run the tests
+ as follows:
+ </para>
+
+<programlisting>
+runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
+</programlisting>
+
+ <para>
+ The testsuite will create a number of files in the directory in
+ which you run this command,. Some of those files might use the
+ same name as files created by other testsuites (like the ones
+ for GCC and G++), so you should not try to run all the
+ testsuites in parallel from the same directory.
+ </para>
+
+ <para>
+ In addition, there are some testing options that are mostly of
+ interest to library maintainers and system integrators. As such,
+ these tests may not work on all cpu and host combinations, and
+ may need to be executed in the
+ <emphasis>libbuilddir/testsuite</emphasis> directory. These
+ options include, but are not necessarily limited to, the
+ following:
+ </para>
+
+ <programlisting>
+ make testsuite_files
+ </programlisting>
+
+ <para>
+ Five files are generated that determine what test files
+ are run. These files are:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>testsuite_files</emphasis>
+ </para>
+ <para>
+ This is a list of all the test cases that will be run. Each
+ test case is on a separate line, given with an absolute path
+ from the <emphasis>libsrcdir/testsuite</emphasis> directory.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis>testsuite_files_interactive</emphasis>
+ </para>
+ <para>
+ This is a list of all the interactive test cases, using the
+ same format as the file list above. These tests are not run
+ by default.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis>testsuite_files_performance</emphasis>
+ </para>
+ <para>
+ This is a list of all the performance test cases, using the
+ same format as the file list above. These tests are not run
+ by default.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis>testsuite_thread</emphasis>
+ </para>
+ <para>
+ This file indicates that the host system can run tests which
+ incolved multiple threads.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis>testsuite_wchar_t</emphasis>
+ </para>
+ <para>
+ This file indicates that the host system can run the wchar_t
+ tests, and corresponds to the macro definition <code>
+ _GLIBCXX_USE_WCHAR_T</code> in the file c++config.h.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting>
+ make check-abi
+ </programlisting>
+
+ <para>
+ The library ABI can be tested. This involves testing the shared
+ library against an ABI-defining previous version of symbol
+ exports.
+ </para>
+
+ <programlisting>
+ make check-compile
+ </programlisting>
+
+ <para>
+ This rule compiles, but does not link or execute, the
+ <emphasis>testsuite_files</emphasis> test cases and displays the
+ output on stdout.
+ </para>
+
+ <programlisting>
+ make check-performance
+ </programlisting>
+
+ <para>
+ This rule runs through the
+ <emphasis>testsuite_files_performance</emphasis> test cases and
+ collects information for performance analysis and can be used to
+ spot performance regressions. Various timing information is
+ collected, as well as number of hard page faults, and memory
+ used. This is not run by default, and the implementation is in
+ flux.
+ </para>
+
+ <para>
+ We are interested in any strange failures of the testsuite;
+ please email the main libstdc++ mainling list if you see
+ something odd or have questions.
+ </para>
+ </sect3>
+
+ <sect3 id="test.run.permutations" xreflabel="test.run.permutations">
+ <title>Test Permutations</title>
+ <para>
+ To run the libstdc++ test suite under the <link
+ linkend="manual.ext.debug_mode">debug mode</link>, edit
+ <filename>libstdc++-v3/scripts/testsuite_flags</filename> to add the
+ compile-time flag <constant>-D_GLIBCXX_DEBUG</constant> to the
+ result printed by the <literal>--build-cxx</literal>
+ option. Additionally, add the
+ <constant>-D_GLIBCXX_DEBUG_PEDANTIC</constant> flag to turn on
+ pedantic checking. The libstdc++ test suite should produce
+ precisely the same results under debug mode that it does under
+ release mode: any deviation indicates an error in either the
+ library or the test suite.
+ </para>
+
+ <para>
+ Or, just run the testsuites with <constant>CXXFLAGS</constant>
+ set to <constant>-D_GLIBCXX_DEBUG</constant>.
+ </para>
+ </sect3>
+</sect2>
+
+<sect2 id="test.new_tests" xreflabel="test.new_tests">
+<title>New Test Cases</title>
+
+ <para>
+ The first step in making a new test case is to choose the correct
+ directory and file name, given the organization as previously
+ described.
+ </para>
+
+ <para>
+ All files are copyright the FSF, and GPL'd: this is very
+ important. The first copyright year should correspond to the date
+ the file was checked in to SVN.
+ </para>
+
+ <para>
+ As per the dejagnu instructions, always return 0 from main to
+ indicate success.
+ </para>
+
+ <para>
+ A bunch of utility functions and classes have already been
+ abstracted out into the testsuite utility library, <code>
+ libtestc++</code>. To use this functionality, just include the
+ appropriate header file: the library or specific object files will
+ automatically be linked in as part of the testsuite run.
+ </para>
+
+ <para>
+ For a test that needs to take advantage of the dejagnu test
+ harness, what follows below is a list of special keyword that
+ harness uses. Basically, a test case contains dg-keywords (see
+ dg.exp) indicating what to do and what kinds of behavior are to be
+ expected. New test cases should be written with the new style
+ DejaGnu framework in mind.
+ </para>
+
+ <para>
+ To ease transition, here is the list of dg-keyword documentation
+ lifted from dg.exp.
+ </para>
+
+<programlisting>
+# The currently supported options are:
+#
+# dg-prms-id N
+# set prms_id to N
+#
+# dg-options "options ..." [{ target selector }]
+# specify special options to pass to the tool (eg: compiler)
+#
+# dg-do do-what-keyword [{ target/xfail selector }]
+# `do-what-keyword' is tool specific and is passed unchanged to
+# ${tool}-dg-test. An example is gcc where `keyword' can be any of:
+# preprocess|compile|assemble|link|run
+# and will do one of: produce a .i, produce a .s, produce a .o,
+# produce an a.out, or produce an a.out and run it (the default is
+# compile).
+#
+# dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate an error message &lt;regexp&gt; is expected on this line
+# (the test fails if it doesn't occur)
+# Linenum=0 for general tool messages (eg: -V arg missing).
+# "." means the current line.
+#
+# dg-warning regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate a warning message &lt;regexp&gt; is expected on this line
+# (the test fails if it doesn't occur)
+#
+# dg-bogus regexp comment [{ target/xfail selector } [{.|0|linenum}]]
+# indicate a bogus error message &lt;regexp&gt; use to occur here
+# (the test fails if it does occur)
+#
+# dg-build regexp comment [{ target/xfail selector }]
+# indicate the build use to fail for some reason
+# (errors covered here include bad assembler generated, tool crashes,
+# and link failures)
+# (the test fails if it does occur)
+#
+# dg-excess-errors comment [{ target/xfail selector }]
+# indicate excess errors are expected (any line)
+# (this should only be used sparingly and temporarily)
+#
+# dg-output regexp [{ target selector }]
+# indicate the expected output of the program is &lt;regexp&gt;
+# (there may be multiple occurrences of this, they are concatenated)
+#
+# dg-final { tcl code }
+# add some tcl code to be run at the end
+# (there may be multiple occurrences of this, they are concatenated)
+# (unbalanced braces must be \-escaped)
+#
+# "{ target selector }" is a list of expressions that determine whether the
+# test succeeds or fails for a particular target, or in some cases whether the
+# option applies for a particular target. If the case of `dg-do' it specifies
+# whether the test case is even attempted on the specified target.
+#
+# The target selector is always optional. The format is one of:
+#
+# { xfail *-*-* ... } - the test is expected to fail for the given targets
+# { target *-*-* ... } - the option only applies to the given targets
+#
+# At least one target must be specified, use *-*-* for "all targets".
+# At present it is not possible to specify both `xfail' and `target'.
+# "native" may be used in place of "*-*-*".
+
+Example 1: Testing compilation only
+// { dg-do compile }
+
+Example 2: Testing for expected warnings on line 36, which all targets fail
+// { dg-warning "string literals" "" { xfail *-*-* } 36
+
+Example 3: Testing for expected warnings on line 36
+// { dg-warning "string literals" "" { target *-*-* } 36
+
+Example 4: Testing for compilation errors on line 41
+// { dg-do compile }
+// { dg-error "no match for" "" { target *-*-* } 41 }
+
+Example 5: Testing with special command line settings, or without the
+use of pre-compiled headers, in particular the stdc++.h.gch file. Any
+options here will override the DEFAULT_CXXFLAGS and PCH_CXXFLAGS set
+up in the normal.exp file.
+// { dg-options "-O0" { target *-*-* } }
+</programlisting>
+
+ <para>
+ More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
+ </para>
+
+
+</sect2>
+
+<sect2 id="test.dejagnu" xreflabel="test.dejagnu">
+<title>Test Harness Details</title>
+ <para>
+ Underlying details of testing are abstracted via the GNU Dejagnu package.
+ </para>
+
+
+<para>This is information for those looking at making changes to the testsuite
+structure, and/or needing to trace dejagnu's actions with --verbose. This
+will not be useful to people who are "merely" adding new tests to the existing
+structure.
+</para>
+
+<para>The first key point when working with dejagnu is the idea of a "tool".
+Files, directories, and functions are all implicitly used when they are
+named after the tool in use. Here, the tool will always be "libstdc++".
+</para>
+
+<para>The <code>lib</code> subdir contains support routines. The
+<code>lib/libstdc++.exp</code> file ("support library") is loaded
+automagically, and must explicitly load the others. For example, files can
+be copied from the core compiler's support directory into <code>lib</code>.
+</para>
+
+<para>Some routines in <code>lib/libstdc++.exp</code> are callbacks, some are
+our own. Callbacks must be prefixed with the name of the tool. To easily
+distinguish the others, by convention our own routines are named "v3-*".
+</para>
+
+<para>The next key point when working with dejagnu is "test files". Any
+directory whose name starts with the tool name will be searched for test files.
+(We have only one.) In those directories, any <code>.exp</code> file is
+considered a test file, and will be run in turn. Our main test file is called
+<code>normal.exp</code>; it runs all the tests in testsuite_files using the
+callbacks loaded from the support library.
+</para>
+
+<para>The <code>config</code> directory is searched for any particular "target
+board" information unique to this library. This is currently unused and sets
+only default variables.
+</para>
+
+</sect2>
+
+<sect2 id="test.future" xreflabel="test.future">
+<title>Future</title>
+ <para>
+ </para>
+
+
+<para>
+Shared runs need to be implemented, for targets that support shared libraries.
+</para>
+
+<para>
+Diffing of expected output to standard streams needs to be finished off.
+</para>
+
+<para>
+The V3 testing framework supports, or will eventually support,
+additional keywords for the purpose of easing the job of writing
+test cases. All V3-keywords are of the form <code>@xxx@</code>.
+Currently plans for supported keywords include:
+</para>
+
+<variablelist>
+<varlistentry><term> <code> @require@ &lt;files&gt; </code> </term>
+<listitem>
+ <para>
+ The existence of &lt;files&gt; is essential for the test to complete
+ successfully. For example, a test case foo.C using bar.baz as
+ input file could say
+ </para>
+ <programlisting>
+ // @require@ bar.baz</programlisting>
+ <para>
+ The special variable % stands for the rootname, e.g. the
+ file-name without its `.C' extension. Example of use (taken
+ verbatim from 27_io/filebuf.cc)
+ </para>
+ <programlisting>
+ // @require@ %-*.tst %-*.txt</programlisting>
+</listitem></varlistentry>
+<varlistentry><term> <code> @diff@ &lt;first-list&gt; &lt;second-list&gt; </code> </term>
+<listitem>
+ <para>
+ After the test case compiles and ran successfully, diff
+ &lt;first-list&gt; against &lt;second-list&gt;, these lists should
+ have the same length. The test fails if diff returns non-zero a
+ pair of files.
+ </para>
+</listitem></varlistentry>
+</variablelist>
+
+</sect2>
+
+</sect1> \ No newline at end of file
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
new file mode 100644
index 00000000000..2782596201f
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -0,0 +1,1024 @@
+<?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.intro.using" xreflabel="Using">
+<?dbhtml filename="using.html"?>
+
+<title>Using</title>
+
+ <sect1 id="manual.intro.using.lib" xreflabel="Lib">
+ <title>Linking Library Binary Files</title>
+
+ <para>
+ 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
+ against it, then you will need to find that library when you run
+ the executable.
+ </para>
+ <para>
+ Methods vary for different platforms and different styles, but
+ the usual ones are printed to the screen during installation.
+ They include:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ At runtime set LD_LIBRARY_PATH in your environment
+ correctly, so that the shared library for libstdc++ can be
+ found and loaded. Be certain that you understand all of the
+ other implications and behavior of LD_LIBRARY_PATH first
+ (few people do, and they get into trouble).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Compile the path to find the library at runtime into the
+ program. This can be done by passing certain options to
+ g++, which will in turn pass them on to the linker. The
+ exact format of the options is dependent on which linker you
+ use:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ GNU ld (default on Linux):<literal>-Wl,--rpath,<filename class="directory">destdir</filename>/lib</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ IRIX ld:<literal>
+ -Wl,-rpath,<filename class="directory">destdir</filename>/lib</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Solaris ld:<literal>-Wl,-R<filename class="directory">destdir</filename>/lib</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ More...? Let us know!
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Use the <command>ldd</command> utility to show which library the
+ system thinks it will get at runtime.
+ </para>
+ <para>
+ A libstdc++.la file is also installed, for use with Libtool. If
+ you use Libtool to create your executables, these details are
+ taken care of for you.
+ </para>
+ </sect1>
+
+ <sect1 id="manual.intro.using.headers" xreflabel="Headers">
+ <title>Headers</title>
+
+ <sect2 id="manual.intro.using.headers.all" xreflabel="Header Files">
+ <title>Header Files</title>
+
+ <para>
+ The C++ standard specifies the entire set of header files that
+ must be available to all hosted implementations. Actually, the
+ word &quot;files&quot; is a misnomer, since the contents of the
+ headers don't necessarily have to be in any kind of external
+ file. The only rule is that when one <code>#include</code>'s a
+ header, the contents of that header become available, no matter
+ how.
+ </para>
+
+ <para>
+ That said, in practice files are used.
+ </para>
+
+ <para>
+ There are two main types of include files: header files related
+ to a specific version of the ISO C++ standard (called Standard
+ Headers), and all others (TR1, C++ ABI, and Extensions).
+ </para>
+
+ <para>
+ Two dialects of standard headers are supported, corresponding to
+ the 1998 standard as updated for 2003, and the draft of the
+ upcoming 200x standard.
+ </para>
+
+ <para>
+ C++98/03 include files. These are available in the default compilation mode, ie <code>-std=c++98</code> or <code>-std=gnu++98</code>.
+ </para>
+
+<table frame='all'>
+<title>C++ 1998 Library Headers</title>
+<tgroup cols='5' 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">algorithm</filename></entry><entry><filename class="headerfile">iomanip</filename></entry><entry><filename class="headerfile">list</filename></entry><entry><filename class="headerfile">ostream</filename></entry><entry><filename class="headerfile">streambuf</filename></entry></row>
+<row><entry><filename class="headerfile">bitset</filename></entry><entry><filename class="headerfile">ios</filename></entry><entry><filename class="headerfile">locale</filename></entry><entry><filename class="headerfile">queue</filename></entry><entry><filename class="headerfile">string</filename></entry></row>
+<row><entry><filename class="headerfile">complex</filename></entry><entry><filename class="headerfile">iosfwd</filename></entry><entry><filename class="headerfile">map</filename></entry><entry><filename class="headerfile">set</filename></entry><entry><filename class="headerfile">typeinfo</filename></entry></row>
+<row><entry><filename class="headerfile">deque</filename></entry><entry><filename class="headerfile">iostream</filename></entry><entry><filename class="headerfile">memory</filename></entry><entry><filename class="headerfile">sstream</filename></entry><entry><filename class="headerfile">utility</filename></entry></row>
+<row><entry><filename class="headerfile">exception</filename></entry><entry><filename class="headerfile">istream</filename></entry><entry><filename class="headerfile">new</filename></entry><entry><filename class="headerfile">stack</filename></entry><entry><filename class="headerfile">valarray</filename></entry></row>
+<row><entry><filename class="headerfile">fstream</filename></entry><entry><filename class="headerfile">iterator</filename></entry><entry><filename class="headerfile">numeric</filename></entry><entry><filename class="headerfile">stdexcept</filename></entry><entry><filename class="headerfile">vector</filename></entry></row>
+<row><entry><filename class="headerfile">functional</filename></entry><entry><filename class="headerfile">limits</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para></para>
+<table frame='all'>
+<title>C++ 1998 Library Headers for C Library Facilities</title>
+<tgroup cols='5' 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">cassert</filename></entry><entry><filename class="headerfile">ciso646</filename></entry><entry><filename class="headerfile">csetjmp</filename></entry><entry><filename class="headerfile">cstdio</filename></entry><entry><filename class="headerfile">ctime</filename></entry></row>
+<row><entry><filename class="headerfile">cctype</filename></entry><entry><filename class="headerfile">climits</filename></entry><entry><filename class="headerfile">csignal</filename></entry><entry><filename class="headerfile">cstdlib</filename></entry><entry><filename class="headerfile">cwchar</filename></entry></row>
+<row><entry><filename class="headerfile">cerrno</filename></entry><entry><filename class="headerfile">clocale</filename></entry><entry><filename class="headerfile">cstdarg</filename></entry><entry><filename class="headerfile">cstring</filename></entry><entry><filename class="headerfile">cwctype</filename></entry></row>
+<row><entry><filename class="headerfile">cfloat</filename></entry><entry><filename class="headerfile">cmath</filename></entry><entry><filename class="headerfile">cstddef</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para>C++0x include files. These are only available in C++0x compilation mode, ie <code>-std=c++0x</code> or <code>-std=gnu++0x</code>.
+</para>
+
+<para></para>
+<table frame='all'>
+<title>C++ 200x Library Headers</title>
+<tgroup cols='5' 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">algorithm</filename></entry><entry><filename class="headerfile">iomanip</filename></entry><entry><filename class="headerfile">locale</filename></entry><entry><filename class="headerfile">regex</filename></entry><entry><filename class="headerfile">tuple</filename></entry></row>
+<row><entry><filename class="headerfile">array</filename></entry><entry><filename class="headerfile">ios</filename></entry><entry><filename class="headerfile">map</filename></entry><entry><filename class="headerfile">set</filename></entry><entry><filename class="headerfile">typeinfo</filename></entry></row>
+<row><entry><filename class="headerfile">bitset</filename></entry><entry><filename class="headerfile">iosfwd</filename></entry><entry><filename class="headerfile">memory</filename></entry><entry><filename class="headerfile">sstream</filename></entry><entry><filename class="headerfile">type_traits</filename></entry></row>
+<row><entry><filename class="headerfile">complex</filename></entry><entry><filename class="headerfile">iostream</filename></entry><entry><filename class="headerfile">new</filename></entry><entry><filename class="headerfile">stack</filename></entry><entry><filename class="headerfile">unordered_map</filename></entry></row>
+<row><entry><filename class="headerfile">deque</filename></entry><entry><filename class="headerfile">istream</filename></entry><entry><filename class="headerfile">numeric</filename></entry><entry><filename class="headerfile">stdexcept</filename></entry><entry><filename class="headerfile">unordered_set</filename></entry></row>
+<row><entry><filename class="headerfile">exception</filename></entry><entry><filename class="headerfile">iterator</filename></entry><entry><filename class="headerfile">ostream</filename></entry><entry><filename class="headerfile">streambuf</filename></entry><entry><filename class="headerfile">utility</filename></entry></row>
+<row><entry><filename class="headerfile">fstream</filename></entry><entry><filename class="headerfile">limits</filename></entry><entry><filename class="headerfile">queue</filename></entry><entry><filename class="headerfile">string</filename></entry><entry><filename class="headerfile">valarray</filename></entry></row>
+<row><entry><filename class="headerfile">functional</filename></entry><entry><filename class="headerfile">list</filename></entry><entry><filename class="headerfile">random</filename></entry><entry><filename class="headerfile">system_error</filename></entry><entry><filename class="headerfile">vector</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para></para>
+
+<table frame='all'>
+<title>C++ 200x Library Headers for C Library Facilities</title>
+<tgroup cols='5' 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>
+<tbody>
+<row><entry><filename class="headerfile">cassert</filename></entry><entry><filename class="headerfile">cfloat</filename></entry><entry><filename class="headerfile">cmath</filename></entry><entry><filename class="headerfile">cstddef</filename></entry><entry><filename class="headerfile">ctgmath</filename></entry></row>
+<row><entry><filename class="headerfile">ccomplex</filename></entry><entry><filename class="headerfile">cinttypes</filename></entry><entry><filename class="headerfile">csetjmp</filename></entry><entry><filename class="headerfile">cstdint</filename></entry><entry><filename class="headerfile">ctime</filename></entry></row>
+<row><entry><filename class="headerfile">cctype</filename></entry><entry><filename class="headerfile">ciso646</filename></entry><entry><filename class="headerfile">csignal</filename></entry><entry><filename class="headerfile">cstdio</filename></entry><entry><filename class="headerfile">cuchar</filename></entry></row>
+<row><entry><filename class="headerfile">cerrno</filename></entry><entry><filename class="headerfile">climits</filename></entry><entry><filename class="headerfile">cstdarg</filename></entry><entry><filename class="headerfile">cstdlib</filename></entry><entry><filename class="headerfile">cwchar</filename></entry></row>
+<row><entry><filename class="headerfile">cfenv</filename></entry><entry><filename class="headerfile">clocale</filename></entry><entry><filename class="headerfile">cstdbool</filename></entry><entry><filename class="headerfile">cstring</filename></entry><entry><filename class="headerfile">cwctype</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+
+<para>
+ In addition, TR1 includes as:
+</para>
+
+<table frame='all'>
+<title>C++ TR1 Library Headers</title>
+<tgroup cols='5' 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>
+<tbody>
+
+<row><entry><filename class="headerfile">tr1/array</filename></entry><entry><filename class="headerfile">tr1/memory</filename></entry><entry><filename class="headerfile">tr1/regex</filename></entry><entry><filename class="headerfile">tr1/type_traits</filename></entry><entry><filename class="headerfile">tr1/unordered_set</filename></entry></row>
+<row><entry><filename class="headerfile">tr1/complex</filename></entry><entry><filename class="headerfile">tr1/random</filename></entry><entry><filename class="headerfile">tr1/tuple</filename></entry><entry><filename class="headerfile">tr1/unordered_map</filename></entry><entry><filename class="headerfile">tr1/utility</filename></entry></row>
+<row><entry><filename class="headerfile">tr1/functional</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para></para>
+
+
+<table frame='all'>
+<title>C++ TR1 Library Headers for C Library Facilities</title>
+<tgroup cols='5' 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>
+<tbody>
+
+<row><entry><filename class="headerfile">tr1/cmath</filename></entry><entry><filename class="headerfile">tr1/cfloat</filename></entry><entry><filename class="headerfile">tr1/cstdarg</filename></entry><entry><filename class="headerfile">tr1/cstdio</filename></entry><entry><filename class="headerfile">tr1/ctime</filename></entry></row>
+<row><entry><filename class="headerfile">tr1/ccomplex</filename></entry><entry><filename class="headerfile">tr1/cinttypes</filename></entry><entry><filename class="headerfile">tr1/cstdbool</filename></entry><entry><filename class="headerfile">tr1/cstdlib</filename></entry><entry><filename class="headerfile">tr1/cwchar</filename></entry></row>
+<row><entry><filename class="headerfile">tr1/cfenv</filename></entry><entry><filename class="headerfile">tr1/climits</filename></entry><entry><filename class="headerfile">tr1/cstdint</filename></entry><entry><filename class="headerfile">tr1/ctgmath</filename></entry><entry><filename class="headerfile">tr1/cwctype</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para>
+ Also included are files for the C++ ABI interface:
+</para>
+
+<table frame='all'>
+<title>C++ ABI Headers</title>
+<tgroup cols='2' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+<tbody>
+<row><entry><filename class="headerfile">cxxabi.h</filename></entry><entry><filename class="headerfile">cxxabi_forced.h</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para>
+ And a large variety of extensions.
+</para>
+
+<table frame='all'>
+<title>Extension Headers</title>
+<tgroup cols='5' 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>
+<tbody>
+
+<row><entry><filename class="headerfile">ext/algorithm</filename></entry><entry><filename class="headerfile">ext/debug_allocator.h</filename></entry><entry><filename class="headerfile">ext/mt_allocator.h</filename></entry><entry><filename class="headerfile">ext/pod_char_traits.h</filename></entry><entry><filename class="headerfile">ext/stdio_sync_filebuf.h</filename></entry></row>
+<row><entry><filename class="headerfile">ext/array_allocator.h</filename></entry><entry><filename class="headerfile">ext/enc_filebuf.h</filename></entry><entry><filename class="headerfile">ext/new_allocator.h</filename></entry><entry><filename class="headerfile">ext/pool_allocator.h</filename></entry><entry><filename class="headerfile">ext/throw_allocator.h</filename></entry></row>
+<row><entry><filename class="headerfile">ext/atomicity.h</filename></entry><entry><filename class="headerfile">ext/functional</filename></entry><entry><filename class="headerfile">ext/numeric</filename></entry><entry><filename class="headerfile">ext/rb_tree</filename></entry><entry><filename class="headerfile">ext/typelist.h</filename></entry></row>
+<row><entry><filename class="headerfile">ext/bitmap_allocator.h</filename></entry><entry><filename class="headerfile">ext/iterator</filename></entry><entry><filename class="headerfile">ext/numeric_traits.h</filename></entry><entry><filename class="headerfile">ext/rope</filename></entry><entry><filename class="headerfile">ext/type_traits.h</filename></entry></row>
+<row><entry><filename class="headerfile">ext/codecvt_specializations.h</filename></entry><entry><filename class="headerfile">ext/malloc_allocator.h</filename></entry><entry><filename class="headerfile">ext/pb_ds/assoc_container.h</filename></entry><entry><filename class="headerfile">ext/slist</filename></entry><entry><filename class="headerfile">ext/vstring.h</filename></entry></row>
+<row><entry><filename class="headerfile">ext/concurrence.h</filename></entry><entry><filename class="headerfile">ext/memory</filename></entry><entry><filename class="headerfile">ext/pb_ds/priority_queue.h</filename></entry><entry><filename class="headerfile">ext/stdio_filebuf.h</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+<para></para>
+
+<table frame='all'>
+<title>Extension Debug Headers</title>
+<tgroup cols='5' 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>
+<tbody>
+
+<row><entry><filename class="headerfile">debug/bitset</filename></entry><entry><filename class="headerfile">debug/list</filename></entry><entry><filename class="headerfile">debug/set</filename></entry><entry><filename class="headerfile">debug/unordered_map</filename></entry><entry><filename class="headerfile">debug/vector</filename></entry></row>
+<row><entry><filename class="headerfile">debug/deque</filename></entry><entry><filename class="headerfile">debug/map</filename></entry><entry><filename class="headerfile">debug/string</filename></entry><entry><filename class="headerfile">debug/unordered_set</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>
+<colspec colname='c2'></colspec>
+<tbody>
+<row><entry><filename class="headerfile">parallel/algorithm</filename></entry><entry><filename class="headerfile">parallel/numeric</filename></entry></row>
+</tbody>
+</tgroup>
+</table>
+
+ </sect2>
+
+ <sect2 id="manual.intro.using.headers.mixing" xreflabel="Mixing Headers">
+ <title>Mixing Headers</title>
+
+<para> A few simple rules.
+</para>
+
+<para>First, mixing different dialects of the standard headers is not
+possible. It's an all-or-nothing affair. Thus, code like
+</para>
+
+<programlisting>
+#include &lt;array&gt;
+#include &lt;functional&gt;
+</programlisting>
+
+<para>Implies C++0x mode. To use the entities in &lt;array&gt;, the C++0x
+compilation mode must be used, which implies the C++0x functionality
+(and deprecations) in &lt;functional&gt; will be present.
+</para>
+
+<para>Second, the other headers can be included with either dialect of
+the standard headers, although features and types specific to C++0x
+are still only enabled when in C++0x compilation mode. So, to use
+rvalue references with <code>__gnu_cxx::vstring</code>, or to use the
+debug-mode versions of <code>std::unordered_map</code>, one must use
+the <code>std=gnu++0x</code> compiler flag. (Or <code>std=c++0x</code>, of course.)
+</para>
+
+<para>A special case of the second rule is the mixing of TR1 and C++0x
+facilities. It is possible (although not especially prudent) to
+include both the TR1 version and the C++0x version of header in the
+same translation unit:
+</para>
+
+<programlisting>
+#include &lt;tr1/type_traits&gt;
+#include &lt;type_traits&gt;
+</programlisting>
+
+<para> Several parts of C++0x diverge quite substantially from TR1 predecessors.
+</para>
+ </sect2>
+
+ <sect2 id="manual.intro.using.headers.cheaders" xreflabel="C Headers and">
+ <title>The C Headers and <code>namespace std</code></title>
+
+<para>
+ The standard specifies that if one includes the C-style header
+ (&lt;math.h&gt; in this case), the symbols will be available
+ in the global namespace and perhaps in
+ namespace <code>std::</code> (but this is no longer a firm
+ requirement.) One the other hand, including the C++-style
+ header (&lt;cmath&gt;) guarantees that the entities will be
+ found in namespace std and perhaps in the global namespace.
+ </para>
+
+<para>
+Usage of C++-style headers is recommended, as then
+C-linkage names can be disambiguated by explicit qualification, such
+as by <code>std::abort</code>. In addition, the C++-style headers can
+use function overloading to provide a simpler interface to certain
+families of C-functions. For instance in &lt;cmath&gt;, the
+function <code>std::sin</code> has overloads for all the builtin
+floating-point types. This means that <code>std::sin</code> can be
+used uniformly, instead of a combination
+of <code>std::sinf</code>, <code>std::sin</code>,
+and <code>std::sinl</code>.
+</para>
+ </sect2>
+
+ <sect2 id="manual.intro.using.headers.pre" xreflabel="Precompiled Headers">
+ <title>Precompiled Headers</title>
+
+
+<para>There are three base header files that are provided. They can be
+used to precompile the standard headers and extensions into binary
+files that may the be used to speed compiles that use these headers.
+</para>
+
+
+<itemizedlist>
+<listitem>
+ <para>stdc++.h</para>
+<para>Includes all standard headers. Actual content varies depending on
+language dialect.
+</para>
+</listitem>
+
+<listitem>
+ <para>stdtr1c++.h</para>
+<para>Includes all of &lt;stdc++.h&gt;, and adds all the TR1 headers.
+</para>
+</listitem>
+
+<listitem><para>extc++.h</para>
+<para>Includes all of &lt;stdtr1c++.h&gt;, and adds all the Extension headers.
+</para></listitem>
+</itemizedlist>
+
+<para>How to construct a .gch file from one of these base header files.</para>
+
+<para>First, find the include directory for the compiler. One way to do
+this is:</para>
+
+<programlisting>
+g++ -v hello.cc
+
+#include &lt;...&gt; search starts here:
+ /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0
+...
+End of search list.
+</programlisting>
+
+
+<para>Then, create a precompiled header file with the same flags that
+will be used to compile other projects.</para>
+
+<programlisting>
+g++ -Winvalid-pch -x c++-header -g -O2 -o ./stdc++.h.gch /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h
+</programlisting>
+
+<para>The resulting file will be quite large: the current size is around
+thirty megabytes. </para>
+
+<para>How to use the resulting file.</para>
+
+<programlisting>
+g++ -I. -include stdc++.h -H -g -O2 hello.cc
+</programlisting>
+
+<para>Verification that the PCH file is being used is easy:</para>
+
+<programlisting>
+g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
+! ./stdc++.h.gch
+. /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/iostream
+. /mnt/share/bld/H-x86-gcc.20071201include/c++/4.3.0/string
+</programlisting>
+
+<para>The exclamation point to the left of the <code>stdc++.h.gch</code> listing means that the generated PCH file was used, and thus the </para>
+<para></para>
+
+<para> Detailed information about creating precompiled header files can be found in the GCC <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html">documentation</ulink>.
+</para>
+
+
+ </sect2>
+ </sect1>
+
+ <sect1 id="manual.intro.using.namespaces" xreflabel="Namespaces">
+ <title>Namespaces</title>
+
+ <sect2 id="manual.intro.using.namespaces.all" xreflabel="Available Namespaces">
+ <title>Available Namespaces</title>
+
+
+
+<para> There are three main namespaces.
+</para>
+
+<itemizedlist>
+ <listitem><para>std</para>
+<para>The ISO C++ standards specify that "all library entities are defined
+within namespace std." This includes namepaces nested
+within <code>namespace std</code>, such as <code>namespace
+std::tr1</code>.
+</para>
+</listitem>
+<listitem><para>abi</para>
+<para>Specified by the C++ ABI. This ABI specifies a number of type and
+function APIs supplemental to those required by the ISO C++ Standard,
+but necessary for interoperability.
+</para>
+</listitem>
+
+<listitem><para>__gnu_</para>
+<para>Indicating one of several GNU extensions. Choices
+include <code>__gnu_cxx</code>, <code>__gnu_debug</code>, <code>__gnu_parallel</code>,
+and <code>__gnu_pbds</code>.
+</para></listitem>
+</itemizedlist>
+
+<para> A complete list of implementation namespaces (including namespace contents) is available in the generated source <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html">documentation</ulink>.
+</para>
+
+
+ </sect2>
+
+ <sect2 id="manual.intro.using.namespaces.std" xreflabel="namespace std">
+ <title>namespace std</title>
+
+
+<para>
+ One standard requirement is that the library components are defined
+ in <code>namespace std::</code>. Thus, in order to use these types or
+ functions, one must do one of two things:
+</para>
+
+<itemizedlist>
+ <listitem><para>put a kind of <emphasis>using-declaration</emphasis> in your source
+(either <code>using namespace std;</code> or i.e. <code>using
+std::string;</code>) This approach works well for individual source files, but
+should not be used in a global context, like header files.
+ </para></listitem> <listitem><para>use a <emphasis>fully
+qualified name</emphasis>for each library symbol
+(i.e. <code>std::string</code>, <code>std::cout</code>) Always can be
+used, and usually enhanced, by strategic use of typedefs. (In the
+cases where the qualified verbiage becomes unwieldy.)
+ </para>
+ </listitem>
+</itemizedlist>
+
+ </sect2>
+
+ <sect2 id="manual.intro.using.namespaces.comp" xreflabel="Using Namepace Composition">
+ <title>Using Namespace Composition</title>
+
+<para>
+Best practice in programming suggests sequestering new data or
+functionality in a sanely-named, unique namespace whenever
+possible. This is considered an advantage over dumping everything in
+the global namespace, as then name look-up can be explicitly enabled or
+disabled as above, symbols are consistently mangled without repetitive
+naming prefixes or macros, etc.
+</para>
+
+<para>For instance, consider a project that defines most of its classes in <code>namespace gtk</code>. It is possible to
+ adapt <code>namespace gtk</code> to <code>namespace std</code> by using a C++-feature called
+ <emphasis>namespace composition</emphasis>. This is what happens if
+ a <emphasis>using</emphasis>-declaration is put into a
+ namespace-definition: the imported symbol(s) gets imported into the
+ currently active namespace(s). For example:
+</para>
+<programlisting>
+namespace gtk
+{
+ using std::string;
+ using std::tr1::array;
+
+ class Window { ... };
+}
+</programlisting>
+<para>
+ In this example, <code>std::string</code> gets imported into
+ <code>namespace gtk</code>. The result is that use of
+ <code>std::string</code> inside namespace gtk can just use <code>string</code>, without the explicit qualification.
+ As an added bonus,
+ <code>std::string</code> does not get imported into
+ the global namespace. Additionally, a more elaborate arrangement can be made for backwards compatibility and portability, whereby the
+ <code>using</code>-declarations can wrapped in macros that
+ are set based on autoconf-tests to either &quot;&quot; or i.e. <code>using
+ std::string;</code> (depending on whether the system has
+ libstdc++ in <code>std::</code> or not). (ideas from
+ <email>llewelly@dbritsch.dsl.xmission.com</email>, Karl Nelson <email>kenelson@ece.ucdavis.edu</email>)
+</para>
+
+
+ </sect2>
+ </sect1>
+
+ <sect1 id="manual.intro.using.macros" xreflabel="Macros">
+ <title>Macros</title>
+
+ <para>All pre-processor switches and configurations are all gathered
+ in the file <code>c++config.h</code>, which is generated during
+ the libstdc++ configuration and build process, and included by
+ files part of the public libstdc++ API. Most of these macros
+ should not be used by consumers of libstdc++, and are reserved
+ for internal implementation use. <emphasis>These macros cannot be
+ redefined</emphasis>. However, a select handful of these macro
+ control libstdc++ extensions and extra features, or provide
+ versioning information for the API, and are able to be used.
+ </para>
+
+ <para>All library macros begin with <code>_GLIBCXX_</code> (except for
+ versions 3.1.x to 3.3.x, which use <code>_GLIBCPP_</code>).
+ </para>
+
+ <para>Below is the macro which users may check for library version
+ information. </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><code>__GLIBCXX__</code></term>
+ <listitem>
+ <para>The current version of
+ libstdc++ in compressed ISO date format, form of an unsigned
+ long. For details on the value of this particular macro for a
+ particular release, please consult this <ulink url="abi.html">
+ document</ulink>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>Below are the macros which users may change with #define/#undef or
+ with -D/-U compiler flags. The default state of the symbol is
+ listed.</para>
+
+ <para><quote>Configurable</quote> (or <quote>Not configurable</quote>) means
+ that the symbol is initially chosen (or not) based on
+ --enable/--disable options at library build and configure time
+ (documented <link linkend="manual.intro.setup.configure">here</link>), with the
+ various --enable/--disable choices being translated to
+ #define/#undef).
+ </para>
+
+ <para> <acronym>ABI</acronym> means that changing from the default value may
+ mean changing the <acronym>ABI</acronym> of compiled code. In other words, these
+ choices control code which has already been compiled (i.e., in a
+ binary such as libstdc++.a/.so). If you explicitly #define or
+ #undef these macros, the <emphasis>headers</emphasis> may see different code
+ paths, but the <emphasis>libraries</emphasis> which you link against will not.
+ Experimenting with different values with the expectation of
+ consistent linkage requires changing the config headers before
+ building/installing the library.
+ </para>
+
+ <variablelist>
+ <varlistentry><term><code>_GLIBCXX_DEPRECATED</code></term>
+ <listitem>
+ <para>
+ Defined by default. Not configurable. ABI-changing. Turning this off
+ removes older ARM-style iostreams code, and other anachronisms
+ from the API. This macro is dependent on the version of the
+ standard being tracked, and as a result may give different results for
+ <code>-std=c++98</code> and <code>-std=c++0x</code>. This may
+ be useful in updating old C++ code which no longer meet the
+ requirements of the language, or for checking current code
+ against new language standards.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>_GLIBCXX_FORCE_NEW</code></term>
+ <listitem>
+ <para>
+ Undefined by default. When defined, memory allocation and
+ allocators controlled by libstdc++ call operator new/delete
+ without caching and pooling. Configurable via
+ <code>--enable-libstdcxx-allocator</code>. ABI-changing.
+ </para>
+ </listitem></varlistentry>
+
+
+ <varlistentry><term><code>_GLIBCXX_CONCEPT_CHECKS</code></term>
+ <listitem>
+ <para>
+ Undefined by default. Configurable via
+ <code>--enable-concept-checks</code>. When defined, performs
+ compile-time checking on certain template instantiations to
+ detect violations of the requirements of the standard. This
+ is described in more detail <ulink
+ url="../19_diagnostics/howto.html#3">here</ulink>.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term><code>_GLIBCXX_DEBUG</code></term>
+ <listitem>
+ <para>
+ Undefined by default. When defined, compiles
+ user code using the <ulink url="../ext/debug.html#safe">libstdc++ debug
+ mode</ulink>.
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term><code>_GLIBCXX_DEBUG_PEDANTIC</code></term>
+ <listitem>
+ <para>
+ Undefined by default. When defined while
+ compiling with the <ulink url="../ext/debug.html#safe">libstdc++ debug
+ mode</ulink>, makes the debug mode extremely picky by making the use
+ of libstdc++ extensions and libstdc++-specific behavior into
+ errors.
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term><code>_GLIBCXX_PARALLEL</code></term>
+ <listitem>
+ <para>Undefined by default. When defined, compiles
+ user code using the <ulink url="../ext/parallel_mode.html">libstdc++ parallel
+ mode</ulink>.
+ </para>
+ </listitem></varlistentry>
+ </variablelist>
+
+
+ </sect1>
+
+ <sect1 id="manual.intro.using.concurrency" xreflabel="Concurrency">
+ <title>Concurrency</title>
+
+ <para>This section discusses issues surrounding the proper compilation
+ of multithreaded applications which use the Standard C++
+ library. This information is GCC-specific since the C++
+ standard does not address matters of multithreaded applications.
+ </para>
+
+ <sect2 id="manual.intro.using.concurrency.prereq" xreflabel="Thread Prereq">
+ <title>Prerequisites</title>
+
+ <para>All normal disclaimers aside, multithreaded C++ application are
+ only supported when libstdc++ and all user code was built with
+ compilers which report (via <code> gcc/g++ -v </code>) the same thread
+ model and that model is not <emphasis>single</emphasis>. As long as your
+ final application is actually single-threaded, then it should be
+ safe to mix user code built with a thread model of
+ <emphasis>single</emphasis> with a libstdc++ and other C++ libraries built
+ with another thread model useful on the platform. Other mixes
+ may or may not work but are not considered supported. (Thus, if
+ you distribute a shared C++ library in binary form only, it may
+ be best to compile it with a GCC configured with
+ --enable-threads for maximal interchangeability and usefulness
+ with a user population that may have built GCC with either
+ --enable-threads or --disable-threads.)
+ </para>
+ <para>When you link a multithreaded application, you will probably
+ need to add a library or flag to g++. This is a very
+ non-standardized area of GCC across ports. Some ports support a
+ special flag (the spelling isn't even standardized yet) to add
+ all required macros to a compilation (if any such flags are
+ required then you must provide the flag for all compilations not
+ just linking) and link-library additions and/or replacements at
+ link time. The documentation is weak. Here is a quick summary
+ to display how ad hoc this is: On Solaris, both -pthreads and
+ -threads (with subtly different meanings) are honored. On OSF,
+ -pthread and -threads (with subtly different meanings) are
+ honored. On Linux/i386, -pthread is honored. On FreeBSD,
+ -pthread is honored. Some other ports use other switches.
+ AFAIK, none of this is properly documented anywhere other than
+ in ``gcc -dumpspecs'' (look at lib and cpp entries).
+ </para>
+
+ </sect2>
+
+ <sect2 id="manual.intro.using.concurrency.thread_safety" xreflabel="Thread Safety">
+ <title>Thread Safety</title>
+
+
+<para>
+We currently use the <ulink url="http://www.sgi.com/tech/stl/thread_safety.html">SGI STL</ulink> definition of thread safety.
+</para>
+
+
+ <para>The library strives to be thread-safe when all of the following
+ conditions are met:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>The system's libc is itself thread-safe,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The compiler in use reports a thread model other than
+ 'single'. This can be tested via output from <code>gcc
+ -v</code>. Multi-thread capable versions of gcc output
+ something like this:
+ </para>
+<programlisting>
+%gcc -v
+Using built-in specs.
+...
+Thread model: posix
+gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
+</programlisting>
+
+<para>Look for "Thread model" lines that aren't equal to "single."</para>
+ </listitem>
+ <listitem>
+ <para>
+ Requisite command-line flags are used for atomic operations
+ and threading. Examples of this include <code>-pthread</code>
+ and <code>-march=native</code>, although specifics vary
+ depending on the host environment. See <ulink
+ url="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html">Machine
+ Dependent Options</ulink>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ An implementation of atomicity.h functions
+ exists for the architecture in question. See the internals documentation for more <ulink url="../ext/concurrence.html">details</ulink>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ <para>The user-code must guard against concurrent method calls which may
+ access any particular library object's state. Typically, the
+ application programmer may infer what object locks must be held
+ based on the objects referenced in a method call. Without getting
+ into great detail, here is an example which requires user-level
+ locks:
+ </para>
+ <programlisting>
+ library_class_a shared_object_a;
+
+ thread_main () {
+ library_class_b *object_b = new library_class_b;
+ shared_object_a.add_b (object_b); // must hold lock for shared_object_a
+ shared_object_a.mutate (); // must hold lock for shared_object_a
+ }
+
+ // Multiple copies of thread_main() are started in independent threads.</programlisting>
+ <para>Under the assumption that object_a and object_b are never exposed to
+ another thread, here is an example that should not require any
+ user-level locks:
+ </para>
+ <programlisting>
+ thread_main () {
+ library_class_a object_a;
+ library_class_b *object_b = new library_class_b;
+ object_a.add_b (object_b);
+ object_a.mutate ();
+ } </programlisting>
+ <para>All library objects are safe to use in a multithreaded program as
+ long as each thread carefully locks out access by any other
+ thread while it uses any object visible to another thread, i.e.,
+ treat library objects like any other shared resource. In general,
+ this requirement includes both read and write access to objects;
+ unless otherwise documented as safe, do not assume that two threads
+ may access a shared standard library object at the same time.
+ </para>
+ <para>See chapters <ulink url="../17_intro/howto.html#3">17</ulink> (library
+ introduction), <ulink url="../23_containers/howto.html#3">23</ulink>
+ (containers), and <ulink url="../27_io/howto.html#9">27</ulink> (I/O) for
+ more information.
+ </para>
+
+
+ </sect2>
+ <sect2 id="manual.intro.using.concurrency.atomics" xreflabel="Atomics">
+ <title>Atomics</title>
+ <para>
+ </para>
+ </sect2>
+
+ <sect2 id="manual.intro.using.concurrency.io" xreflabel="IO">
+ <title>IO</title>
+ <para>I'll assume that you have already read the
+ <ulink url="../17_intro/howto.html#3">general notes on library threads</ulink>,
+ and the
+ <ulink url="../23_containers/howto.html#3">notes on threaded container
+ access</ulink> (you might not think of an I/O stream as a container, but
+ the points made there also hold here). If you have not read them,
+ please do so first.
+ </para>
+ <para>This gets a bit tricky. Please read carefully, and bear with me.
+ </para>
+
+ <sect3 id="concurrency.io.structure" xreflabel="Structure">
+ <title>Structure</title>
+ <para>A wrapper
+ type called <code>__basic_file</code> provides our abstraction layer
+ for the <code>std::filebuf</code> classes. Nearly all decisions dealing
+ with actual input and output must be made in <code>__basic_file</code>.
+ </para>
+ <para>A generic locking mechanism is somewhat in place at the filebuf layer,
+ but is not used in the current code. Providing locking at any higher
+ level is akin to providing locking within containers, and is not done
+ for the same reasons (see the links above).
+ </para>
+ </sect3>
+
+ <sect3 id="concurrency.io.defaults" xreflabel="Defaults">
+ <title>Defaults</title>
+ <para>The __basic_file type is simply a collection of small wrappers around
+ the C stdio layer (again, see the link under Structure). We do no
+ locking ourselves, but simply pass through to calls to <code>fopen</code>,
+ <code>fwrite</code>, and so forth.
+ </para>
+ <para>So, for 3.0, the question of &quot;is multithreading safe for I/O&quot;
+ must be answered with, &quot;is your platform's C library threadsafe
+ for I/O?&quot; Some are by default, some are not; many offer multiple
+ implementations of the C library with varying tradeoffs of threadsafety
+ and efficiency. You, the programmer, are always required to take care
+ with multiple threads.
+ </para>
+ <para>(As an example, the POSIX standard requires that C stdio FILE*
+ operations are atomic. POSIX-conforming C libraries (e.g, on Solaris
+ and GNU/Linux) have an internal mutex to serialize operations on
+ FILE*s. However, you still need to not do stupid things like calling
+ <code>fclose(fs)</code> in one thread followed by an access of
+ <code>fs</code> in another.)
+ </para>
+ <para>So, if your platform's C library is threadsafe, then your
+ <code>fstream</code> I/O operations will be threadsafe at the lowest
+ level. For higher-level operations, such as manipulating the data
+ contained in the stream formatting classes (e.g., setting up callbacks
+ inside an <code>std::ofstream</code>), you need to guard such accesses
+ like any other critical shared resource.
+ </para>
+ </sect3>
+
+ <sect3 id="concurrency.io.future" xreflabel="Future">
+ <title>Future</title>
+ <para> A
+ second choice may be available for I/O implementations: libio. This is
+ disabled by default, and in fact will not currently work due to other
+ issues. It will be revisited, however.
+ </para>
+ <para>The libio code is a subset of the guts of the GNU libc (glibc) I/O
+ implementation. When libio is in use, the <code>__basic_file</code>
+ type is basically derived from FILE. (The real situation is more
+ complex than that... it's derived from an internal type used to
+ implement FILE. See libio/libioP.h to see scary things done with
+ vtbls.) The result is that there is no &quot;layer&quot; of C stdio
+ to go through; the filebuf makes calls directly into the same
+ functions used to implement <code>fread</code>, <code>fwrite</code>,
+ and so forth, using internal data structures. (And when I say
+ &quot;makes calls directly,&quot; I mean the function is literally
+ replaced by a jump into an internal function. Fast but frightening.
+ *grin*)
+ </para>
+ <para>Also, the libio internal locks are used. This requires pulling in
+ large chunks of glibc, such as a pthreads implementation, and is one
+ of the issues preventing widespread use of libio as the libstdc++
+ cstdio implementation.
+ </para>
+ <para>But we plan to make this work, at least as an option if not a future
+ default. Platforms running a copy of glibc with a recent-enough
+ version will see calls from libstdc++ directly into the glibc already
+ installed. For other platforms, a copy of the libio subsection will
+ be built and included in libstdc++.
+ </para>
+ </sect3>
+
+ <sect3 id="concurrency.io.alt" xreflabel="Alt">
+ <title>Alternatives</title>
+ <para>Don't forget that other cstdio implementations are possible. You could
+ easily write one to perform your own forms of locking, to solve your
+ &quot;interesting&quot; problems.
+ </para>
+ </sect3>
+
+ </sect2>
+
+ <sect2 id="manual.intro.using.concurrency.containers" xreflabel="Containers">
+ <title>Containers</title>
+
+ <para>This section discusses issues surrounding the design of
+ multithreaded applications which use Standard C++ containers.
+ All information in this section is current as of the gcc 3.0
+ release and all later point releases. Although earlier gcc
+ releases had a different approach to threading configuration and
+ proper compilation, the basic code design rules presented here
+ were similar. For information on all other aspects of
+ multithreading as it relates to libstdc++, including details on
+ the proper compilation of threaded code (and compatibility between
+ threaded and non-threaded code), see Chapter 17.
+ </para>
+ <para>Two excellent pages to read when working with the Standard C++
+ containers and threads are
+ <ulink url="http://www.sgi.com/tech/stl/thread_safety.html">SGI's
+ http://www.sgi.com/tech/stl/thread_safety.html</ulink> and
+ <ulink url="http://www.sgi.com/tech/stl/Allocators.html">SGI's
+ http://www.sgi.com/tech/stl/Allocators.html</ulink>.
+ </para>
+ <para><emphasis>However, please ignore all discussions about the user-level
+ configuration of the lock implementation inside the STL
+ container-memory allocator on those pages. For the sake of this
+ discussion, libstdc++ configures the SGI STL implementation,
+ not you. This is quite different from how gcc pre-3.0 worked.
+ In particular, past advice was for people using g++ to
+ explicitly define _PTHREADS or other macros or port-specific
+ compilation options on the command line to get a thread-safe
+ STL. This is no longer required for any port and should no
+ longer be done unless you really know what you are doing and
+ assume all responsibility.</emphasis>
+ </para>
+ <para>Since the container implementation of libstdc++ uses the SGI
+ code, we use the same definition of thread safety as SGI when
+ discussing design. A key point that beginners may miss is the
+ fourth major paragraph of the first page mentioned above
+ (&quot;For most clients,&quot;...), which points out that
+ locking must nearly always be done outside the container, by
+ client code (that'd be you, not us). There is a notable
+ exceptions to this rule. Allocators called while a container or
+ element is constructed uses an internal lock obtained and
+ released solely within libstdc++ code (in fact, this is the
+ reason STL requires any knowledge of the thread configuration).
+ </para>
+ <para>For implementing a container which does its own locking, it is
+ trivial to provide a wrapper class which obtains the lock (as
+ SGI suggests), performs the container operation, and then
+ releases the lock. This could be templatized <emphasis>to a certain
+ extent</emphasis>, on the underlying container and/or a locking
+ mechanism. Trying to provide a catch-all general template
+ solution would probably be more trouble than it's worth.
+ </para>
+ <para>The STL implementation is currently configured to use the
+ high-speed caching memory allocator. Some people like to
+ test and/or normally run threaded programs with a different
+ default. For all details about how to globally override this
+ at application run-time see <ulink url="../ext/howto.html#3">here</ulink>.
+ </para>
+ <para>There is a better way (not standardized yet): It is possible to
+ force the malloc-based allocator on a per-case-basis for some
+ application code. The library team generally believes that this
+ is a better way to tune an application for high-speed using this
+ implementation of the STL. There is
+ <ulink url="../ext/howto.html#3">more information on allocators here</ulink>.
+ </para>
+
+ </sect2>
+ </sect1>
+
+ <sect1 id="manual.intro.using.exception_safety" xreflabel="Exception Safety">
+ <title>Exception Safety</title>
+ <para></para>
+ </sect1>
+
+<!-- Section 0x : Debug -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="debug.xml">
+</xi:include>
+
+</chapter>
diff --git a/libstdc++-v3/doc/xml/manual/utilities.xml b/libstdc++-v3/doc/xml/manual/utilities.xml
new file mode 100644
index 00000000000..77cdb6427eb
--- /dev/null
+++ b/libstdc++-v3/doc/xml/manual/utilities.xml
@@ -0,0 +1,125 @@
+<?xml version='1.0'?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[ ]>
+
+<part id="manual.util" xreflabel="Utilities">
+<?dbhtml filename="utilities.html"?>
+
+<partinfo>
+ <keywordset>
+ <keyword>
+ ISO C++
+ </keyword>
+ <keyword>
+ library
+ </keyword>
+ </keywordset>
+</partinfo>
+
+<title>Utilities</title>
+
+<!-- Chapter 01 : Functors -->
+<chapter id="manual.util.functors" xreflabel="Functors">
+ <title>Functors</title>
+ <para>If you don't know what functors are, you're not alone. Many people
+ get slightly the wrong idea. In the interest of not reinventing
+ the wheel, we will refer you to the introduction to the functor
+ concept written by SGI as part of their STL, in
+ <ulink url="http://www.sgi.com/tech/stl/functors.html">their
+ http://www.sgi.com/tech/stl/functors.html</ulink>.
+ </para>
+</chapter>
+
+<!-- Chapter 02 : Pairs -->
+<chapter id="manual.util.pairs" xreflabel="Pairs">
+ <title>Pairs</title>
+ <para>The <code>pair&lt;T1,T2&gt;</code> is a simple and handy way to
+ carry around a pair of objects. One is of type T1, and another of
+ type T2; they may be the same type, but you don't get anything
+ extra if they are. The two members can be accessed directly, as
+ <code>.first</code> and <code>.second</code>.
+ </para>
+ <para>Construction is simple. The default ctor initializes each member
+ with its respective default ctor. The other simple ctor,
+ </para>
+ <programlisting>
+ pair (const T1&amp; x, const T2&amp; y);
+ </programlisting>
+ <para>does what you think it does, <code>first</code> getting <code>x</code>
+ and <code>second</code> getting <code>y</code>.
+ </para>
+ <para>There is a copy constructor, but it requires that your compiler
+ handle member function templates:
+ </para>
+ <programlisting>
+ template &lt;class U, class V&gt; pair (const pair&lt;U,V&gt;&amp; p);
+ </programlisting>
+ <para>The compiler will convert as necessary from U to T1 and from
+ V to T2 in order to perform the respective initializations.
+ </para>
+ <para>The comparison operators are done for you. Equality
+ of two <code>pair&lt;T1,T2&gt;</code>s is defined as both <code>first</code>
+ members comparing equal and both <code>second</code> members comparing
+ equal; this simply delegates responsibility to the respective
+ <code>operator==</code> functions (for types like MyClass) or builtin
+ comparisons (for types like int, char, etc).
+ </para>
+ <para>
+ The less-than operator is a bit odd the first time you see it. It
+ is defined as evaluating to:
+ </para>
+ <programlisting>
+ x.first &lt; y.first ||
+ ( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second )
+ </programlisting>
+ <para>The other operators are not defined using the <code>rel_ops</code>
+ functions above, but their semantics are the same.
+ </para>
+ <para>Finally, there is a template function called <function>make_pair</function>
+ that takes two references-to-const objects and returns an
+ instance of a pair instantiated on their respective types:
+ </para>
+ <programlisting>
+ pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
+ </programlisting>
+
+</chapter>
+
+<!-- Chapter 03 : Memory -->
+<chapter id="manual.util.memory" xreflabel="Memory">
+
+ <title>Memory</title>
+ <para>
+ Memory contains three general areas. First, function and operator
+ calls via <function>new</function> and <function>delete</function>
+ operator or member function calls. Second, allocation via
+ <classname>allocator</classname>. And finally, smart pointer and
+ intelligent pointer abstractions.
+ </para>
+
+ <!-- Section 01 : allocator -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="allocator.xml">
+ </xi:include>
+
+ <!-- Section 02 : auto_ptr -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="auto_ptr.xml">
+ </xi:include>
+
+ <!-- Section 03 : shared_ptr -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ parse="xml" href="shared_ptr.xml">
+ </xi:include>
+
+</chapter>
+
+<!-- Chapter 04 : Traits -->
+<chapter id="manual.util.traits" xreflabel="Traits">
+ <title>Traits</title>
+ <para>
+ </para>
+</chapter>
+
+</part>
diff --git a/libstdc++-v3/doc/xml/spine.xml b/libstdc++-v3/doc/xml/spine.xml
new file mode 100644
index 00000000000..32f970a2c11
--- /dev/null
+++ b/libstdc++-v3/doc/xml/spine.xml
@@ -0,0 +1,47 @@
+<?xml version='1.0'?>
+<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+[
+<!ENTITY authors SYSTEM "authors.xml">
+<!ENTITY license SYSTEM "license.xml">
+]>
+
+<set id="set-index" xreflabel="The GNU C++ Library Documentation">
+<?dbhtml filename="spine.html"?>
+<title>The GNU C++ Library Documentation</title>
+
+<setinfo>
+ <copyright>
+ <year>2000</year>
+ <year>2001</year>
+ <year>2002</year>
+ <year>2003</year>
+ <year>2004</year>
+ <year>2005</year>
+ <year>2006</year>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>
+ <ulink url="http://fsf.org">FSF</ulink>
+ </holder>
+ </copyright>
+ &authors;
+</setinfo>
+
+
+<!-- User Manual -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="manual/spine.xml" parse="xml">
+</xi:include>
+
+<!-- Source Level Documentation-->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="api.xml" parse="xml">
+</xi:include>
+
+<!-- FAQ -->
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="faq.xml" parse="xml">
+</xi:include>
+
+</set>
diff --git a/libstdc++-v3/docs/doxygen/Intro.3 b/libstdc++-v3/docs/doxygen/Intro.3
deleted file mode 100644
index 48cb31f87f1..00000000000
--- a/libstdc++-v3/docs/doxygen/Intro.3
+++ /dev/null
@@ -1,141 +0,0 @@
-.\" t
-.\" This man page is released under the FDL as part of libstdc++.
-.TH C++Intro 3 "20 May 2004" "GNU libstdc++" "Standard C++ Library"
-.SH NAME
-C++Intro \- Introduction to the GNU libstdc++ man pages
-.SH DESCRIPTION
-This man page serves as a brief introduction to the GNU implementation of
-the Standard C++ Library. For a better introduction and more complete
-documentation, see the
-.B libstdc++
-homepage listed at the end.
-.P
-All standard library entities are declared within
-.I namespace std
-and have manual entries beginning with "std::". For example, to see
-documentation of the template class
-.I std::vector
-one would use "man std::vector". Some entities do not have a separate man
-page; for those see the main listing in "man Namespace_std".
-.P
-All the man pages are automatically generated by Doxygen. For more
-information on this tool, see the HTML counterpart to these man pages.
-.P
-Some man pages do not correspond to individual classes or functions. Rather
-they describe categories of the Standard Library. (For a more thorough
-introduction to the various categories, consult a text such as Josuttis'
-or Austern's.) These category pages are:
-.P
-.\" These are separated by ONE TAB. Nothing else. I don't like it either.
-.TS
-lB l.
-C++Intro This page.
-Namespace_std A listing of the contents of std::.
-Namespace___gnu_cxx A listing of the contents of __gnu_cxx::.
-Containers An introduction to container classes.
-Sequences Linear containers.
-Assoc_containers Key-based containers.
-Iterator_types Programatically distinguishing iterators/pointers.
-Intro_functors An introduction to function objects, or functors.
-Arithmetic_functors Functors for basic math.
-Binder_functors Functors which "remember" an argument.
-Comparison_functors Functors wrapping built-in comparisons.
-Func_ptr_functors Functors for use with pointers to functions.
-Logical_functors Functors wrapping the Boolean operations.
-Member_ptr_functor Functors for use with pointers to members.
-Negation_functors Functors which negate their contents.
-SGIextensions A list of the extensions from the SGI STL subset.
-
-.TE
-.P
-The HTML documentation typically goes into much more depth.
-.SH FILES
-Lots!
-.SS Standard Headers
-These headers will be found automatically, unless you instruct the compiler
-otherwise.
-.TS
-lB lB lB lB.
-<algorithm> <csignal> <iomanip> <ostream>
-<bitset> <cstdarg> <ios> <queue>
-<cassert> <cstddef> <iosfwd> <set>
-<cctype> <cstdio> <iostream> <sstream>
-<cerrno> <cstdlib> <istream> <stack>
-<cfloat> <cstring> <iterator> <stdexcept>
-<ciso>646 <ctime> <limits> <streambuf>
-<climits> <cwchar> <list> <string>
-<clocale> <cwctype> <locale> <utility>
-<cmath> <deque> <map> <valarray>
-<complex> <fstream> <memory> <vector>
-<csetjmp> <functional> <numeric>
-.TE
-.SS Backwards-Compatibility Headers
-For GCC 3.0 these headers will be found automatically, unless you instruct
-the compiler otherwise. You should not depend on this, instead you should
-read FAQ 5.4 and use a
-.B backward/
-prefix.
-.TS
-lB lB lB lB.
-<algo.h> <hash_map.h> <map.h> <slist.h>
-<algobase.h> <hash_set.h> <multimap.h> <stack.h>
-<alloc.h> <hashtable.h> <multiset.h> <stream.h>
-<bvector.h> <heap.h> <new.h> <streambuf.h>
-<complex.h> <iomanip.h> <ostream.h> <strstream>
-<defalloc.h> <iostream.h> <pair.h> <strstream.h>
-<deque.h> <istream.h> <queue.h> <tempbuf.h>
-<fstream.h> <iterator.h> <rope.h> <tree.h>
-<function.h> <list.h> <set.h> <vector.h>
-.TE
-.SS Extension Headers
-These headers will only be found automatically if you include the leading
-.B ext/
-in the name. Otherwise you need to read FAQ 5.4.
-.\" Easy way to generate these columns of headers is to use GNU ls(1):
-.\" ls -w 40 file1 file2... | sed 's=[a-z_][a-z_]*=<ext/&>=g'
-.TS
-lB lB.
-<ext/algorithm> <ext/numeric>
-<ext/functional> <ext/iterator>
-<ext/slist> <ext/rb_tree>
-<ext/hash_map> <ext/hash_set>
-<ext/rope> <ext/memory>
-<ext/bitmap_allocator.h> <ext/debug_allocator.h>
-<ext/malloc_allocator.h> <ext/mt_allocator.h>
-<ext/pool_allocator.h> <ext/pod_char_traits.h>
-<ext/stdio_filebuf.h> <ext/stdio_sync_filebuf.h>
-.TE
-.SS Libraries
-.TP
-.I libstdc++.a
-The library implementation in static archive form. If you did not configure
-libstdc++ to use shared libraries, this will always be used. Otherwise
-it will only be used if the user requests it.
-.TP
-.I libsupc++.a
-This library contains C++ language support routines. Usually you will never
-need to know about it, but it can be useful. See FAQ 2.5.
-.TP
-.I libstdc++.so[.N]
-The library implementation in shared object form. This will be used in
-preference to the static archive form by default. N will be a number equal
-to or greater than 3. If N is in the 2.x series, then you are looking at
-the old libstdc++-v2 library, which we do not maintain.
-.TP
-.I libstdc++.la
-.TP
-.I libsupc++.la
-These are Libtool library files, and should only be used when working with
-that tool.
-.SH CONFORMING TO
-Almost conforming to
-.BI "International Standard ISO/IEC 14882:1998(E), " "Programming Languages --- C++"
-(aka the C++ standard), in addition to corrections proposed by the Library
-Working Group,
-.SM JTC1/SC22/WG21.
-.SH SEE ALSO
-.UR
-http://gcc.gnu.org/libstdc++/
-.UE
-for the Frequently Asked Questions, online documentation, and much, much more!
-.\" vim:ts=8:noet:
diff --git a/libstdc++-v3/docs/doxygen/doxygroups.cc b/libstdc++-v3/docs/doxygen/doxygroups.cc
deleted file mode 100644
index 9824754efc5..00000000000
--- a/libstdc++-v3/docs/doxygen/doxygroups.cc
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
- See license.html for license.
-
- This just provides documentation for stuff that doesn't need to be in the
- source headers themselves. It is a ".cc" file for the sole cheesy reason
- that it triggers many different text editors into doing Nice Things when
- typing comments. However, it is mentioned nowhere except the *cfg.in files.
-
- Some actual code (declarations) is exposed here, but no compiler ever
- sees it. The decls must be visible to doxygen, and sometimes their real
- declarations are not visible, or not visible in a way we want.
-
- Pieces separated by '// //' lines will usually not be presented to the
- user on the same page.
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-/** @namespace std
- * @brief Everything defined by the ISO C++ Standard is within
- * namespace <a class="el" href="namespacestd.html">std</a>.
-*/
-/** @namespace std::__detail
- * @brief Implementation details not part of the namespace <a class="el"
- * href="namespacestd.html">std</a> interface.
-*/
-/** @namespace std::tr1
- * @brief Everything defined by the ISO C++ TR1 is within namespace std::tr1.
-*/
-/** @namespace std::tr1::__detail
- * @brief Implementation details not part of the namespace std::tr1 interface.
-*/
-/** @namespace __gnu_cxx
- * @brief GNU extensions for public use.
-*/
-/** @namespace __gnu_cxx::__detail
- * @brief Implementation details not part of the namespace __gnu_cxx
- * interface.
-*/
-/** @namespace __gnu_cxx::typelist
- * @brief GNU typelist extensions for public compile-time use.
-*/
-/** @namespace __gnu_internal
- * @brief GNU implemenation details, not for public use or
- * export. Used only when anonymous namespaces cannot be substituted.
-*/
-/** @namespace __gnu_debug
- * @brief GNU debug mode classes for public use.
-*/
-// // // // // // // // // // // // // // // // // // // // // // // //
-/** @addtogroup SGIextensions STL extensions from SGI
-Because libstdc++ based its implementation of the STL subsections of
-the library on the SGI 3.3 implementation, we inherited their extensions
-as well.
-
-They are additionally documented in the
-<a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">
-online documentation</a>, a copy of which is also shipped with the
-library source code (in .../docs/html/documentation.html). You can also
-read the documentation <a href="http://www.sgi.com/tech/stl/">on SGI's
-site</a>, which is still running even though the code is not maintained.
-
-<strong>NB</strong> that the following notes are pulled from various
-comments all over the place, so they may seem stilted.
-<hr>
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-// This is standalone because, unlike the functor introduction, there is no
-// single header file which serves as a base "all containers must include
-// this header". We do some quoting of 14882 here.
-/** @addtogroup Containers Containers
-Containers are collections of objects.
-
-A container may hold any type which meets certain requirements, but the type
-of contained object is chosen at compile time, and all objects in a given
-container must be of the same type. (Polymorphism is possible by declaring a
-container of pointers to a base class and then populating it with pointers to
-instances of derived classes. Variant value types such as the @c any class
-from <a href="http://www.boost.org/">Boost</a> can also be used.
-
-All contained types must be @c Assignable and @c CopyConstructible.
-Specific containers may place additional requirements on the types of
-their contained objects.
-
-Containers manage memory allocation and deallocation themselves when
-storing your objects. The objects are destroyed when the container is
-itself destroyed. Note that if you are storing pointers in a container,
-@c delete is @e not automatically called on the pointers before destroying them.
-
-All containers must meet certain requirements, summarized in
-<a href="tables.html">tables</a>.
-
-The standard containers are further refined into
-@link Sequences Sequences@endlink and
-@link Assoc_containers Associative Containers@endlink.
-*/
-
-/** @addtogroup Sequences Sequences
-Sequences arrange a collection of objects into a strictly linear order.
-
-The differences between sequences are usually due to one or both of the
-following:
- - memory management
- - algorithmic complexity
-
-As an example of the first case, @c vector is required to use a contiguous
-memory layout, while other sequences such as @c deque are not.
-
-The prime reason for choosing one sequence over another should be based on
-the second category of differences, algorithmic complexity. For example, if
-you need to perform many inserts and removals from the middle of a sequence,
-@c list would be ideal. But if you need to perform constant-time access to
-random elements of the sequence, then @c list should not be used.
-
-All sequences must meet certain requirements, summarized in
-<a href="tables.html">tables</a>.
-*/
-
-/** @addtogroup Assoc_containers Associative Containers
-Associative containers allow fast retrieval of data based on keys.
-
-Each container type is parameterized on a @c Key type, and an ordering
-relation used to sort the elements of the container.
-
-There should be more text here.
-
-All associative containers must meet certain requirements, summarized in
-<a href="tables.html">tables</a>.
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-/** @namespace abi
- * @brief The cross-vendor C++ Application Binary Interface. A
- * namespace alias to __cxxabiv1.
- *
- * A brief overview of an ABI is given in the libstdc++ FAQ, question
- * 5.8 (you may have a copy of the FAQ locally, or you can view the online
- * version at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_8).
- *
- * GCC subscribes to a relatively-new cross-vendor ABI for C++, sometimes
- * called the IA64 ABI because it happens to be the native ABI for that
- * platform. It is summarized at http://www.codesourcery.com/cxx-abi/
- * along with the current specification.
- *
- * For users of GCC greater than or equal to 3.x, entry points are
- * available in <cxxabi.h>, which notes, <em>"It is not normally
- * necessary for user programs to include this header, or use the
- * entry points directly. However, this header is available should
- * that be needed."</em>
-*/
-
-namespace abi {
-/**
-@brief New ABI-mandated entry point in the C++ runtime library for demangling.
-
-@param mangled_name A NUL-terminated character string containing the name
- to be demangled.
-
-@param output_buffer A region of memory, allocated with malloc, of
- @a *length bytes, into which the demangled name
- is stored. If @a output_buffer is not long enough,
- it is expanded using realloc. @a output_buffer may
- instead be NULL; in that case, the demangled name is
- placed in a region of memory allocated with malloc.
-
-@param length If @a length is non-NULL, the length of the buffer containing
- the demangled name is placed in @a *length.
-
-@param status @a *status is set to one of the following values:
- - 0: The demangling operation succeeded.
- - -1: A memory allocation failiure occurred.
- - -2: @a mangled_name is not a valid name under the C++ ABI
- mangling rules.
- - -3: One of the arguments is invalid.
-
-@return A pointer to the start of the NUL-terminated demangled name, or NULL
- if the demangling fails. The caller is responsible for deallocating
- this memory using @c free.
-
-
-The demangling is performed using the C++ ABI mangling rules, with
-GNU extensions. For example, this function is used
-in __gnu_cxx::__verbose_terminate_handler. See
-http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#5 for other
-examples of use.
-
-@note The same demangling functionality is available via libiberty
-(@c <libiberty/demangle.h> and @c libiberty.a) in GCC 3.1 and later, but that
-requires explicit installation (@c --enable-install-libiberty) and uses a
-different API, although the ABI is unchanged.
-*/
-char* __cxa_demangle (const char* mangled_name, char* output_buffer,
- size_t* length, int* status);
-} // namespace abi
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-/** @addtogroup binarysearch Binary search algorithms
-These algorithms are variations of a classic binary search. They all assume
-that the sequence being searched is already sorted.
-
-The number of comparisons will be logarithmic (and as few as possible).
-The number of steps through the sequence will be logarithmic for
-random-access iterators (e.g., pointers), and linear otherwise.
-
-The LWG has passed Defect Report 270, which notes: <em>The proposed
-resolution reinterprets binary search. Instead of thinking about searching
-for a value in a sorted range, we view that as an important special
-case of a more general algorithm: searching for the partition point in a
-partitioned range. We also add a guarantee that the old wording did not:
-we ensure that the upper bound is no earlier than the lower bound, that
-the pair returned by equal_range is a valid range, and that the first part
-of that pair is the lower bound.</em>
-
-The actual effect of the first sentence is that a comparison functor
-passed by the user doesn't necessarily need to induce a strict weak ordering
-relation. Rather, it partitions the range.
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-/** @addtogroup setoperations Set operation algorithms
-These algorithms are common set operations performed on sequences that are
-already sorted.
-
-The number of comparisons will be linear.
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-/* * @addtogroup groupname description of group
-placeholder text
-*/
-
-// // // // // // // // // // // // // // // // // // // // // // // //
-
-// vim:et:noai:
-
diff --git a/libstdc++-v3/docs/doxygen/guide.html b/libstdc++-v3/docs/doxygen/guide.html
deleted file mode 100644
index 30c8725e8e0..00000000000
--- a/libstdc++-v3/docs/doxygen/guide.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Build and Writing Guide for libstdc++ Doxygen</title>
- <link href="style.css" rel="stylesheet" type="text/css">
-</head>
-
-<body bgcolor="#ffffff">
-
-<h1>libstdc++ Source Documentation</h1>
-
-<p>This file is docs/doxygen/guide.html in the libstdc++ source tree. It
- is not included in the generated pages (no real point to doing that).
-</p>
-
-<ul>
- <li><a href="#creating">Creating the pages</a></li>
- <li><a href="#writing">Writing the markup</a></li>
-</ul>
-
-<hr />
-
-<a name="creating"><h2>Creating the pages</h2></a>
-<p>The Makefile rules <code>'make doxygen'</code>,
- <code>'make doxygen-maint'</code>, and <code>'make doxygen-man'</code>
- in the libstdc++ build directory generate the user-level HTML docs, the
- maintainer-level HTML docs, and the man pages, respectively. Prerequisite
- tools are Bash 2.x,
- <a href="http://www.doxygen.org/">
- <!-- snagged from the generated page -->
- <img src="doxygen.png" alt="Doxygen" align=center border=0 width=110 height=53>
- </a>, a working version of <code>g++</code> somewhere in the PATH, and
- the <a href="http://www.gnu.org/software/coreutils/">GNU coreutils</a>.
-
- In addition, to generate the pretty pictures, the
- <a href=
- "http://www.research.att.com/sw/tools/graphviz/download.html">Graphviz</a>
- package will need to be installed.
- (g++ is used to build a program which manipulates man pages. GNU versions
- of find, xargs, and possibly sed and grep are used, just because the GNU
- versions make things very easy.)
-</p>
-
-<p>Careful observers will see that the Makefile rules simply call a script
- from the source tree, <code>run_doxygen</code>, which does the actual work
- of running Doxygen and then (most importantly) massaging the output files.
- If for some reason you prefer to not go through the Makefile, you can call
- this script directly. (Start by passing <code>'--help'</code>.)
-</p>
-
-<p>If you wish to tweak the Doxygen settings, do so by editing
- <code>docs/doxygen/user.cfg.in</code>. Notes to v3-hackers are written in
- triple-# comments.
-</p>
-
-<a name="writing"><h2>Writing the markup</h2></a>
-<p>In general, libstdc++ files should be formatted according to the GNU
- C++ Coding Standard rules found in the file
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE">C++STYLE</a>.
- Before any doxygen-specific formatting tweaks are made, please try to make
- sure that the initial formatting is sound.
-</p>
-
-<p>Adding Doxygen markup to a file (informally called "doxygenating") is very
- simple. The Doxygen manual can be found
- <a href="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">here</a>.
- We try to use a very-recent version of Doxygen.
-</p>
-
-<h3>Doxygen style guide</h3>
-<p>[incomplete and constantly evolving]</p>
-
-<p>For classes, use deque/vector/list and std::pair as examples. For
- functions, see their member functions, and the free functions in
- <code>stl_algobase.h</code>. Member functions of other container-like
- types should read similarly to these member functions.
-</p>
-
-<p>These points accompany the first list in section 3.1 of the Doxygen manual:
-</p>
-<ol>
- <li>Use the Javadoc style...</li>
- <li>...not the Qt style. The intermediate *'s are preferred.</li>
- <li>Use the triple-slash style only for one-line comments (the "brief" mode).
- Very recent versions of Doxygen permit full-mode comments in triple-slash
- blocks, but the formatting still comes out wonky.</li>
- <li>This is disgusting. Don't do this.</li>
-</ol>
-
-<p>Use the @-style of commands, not the !-style. Please be careful about
- whitespace in your markup comments. Most of the time it doesn't matter;
- doxygen absorbs most whitespace, and both HTML and *roff are agnostic about
- whitespace. However, in &lt;pre&gt; blocks and @code/@endcode sections,
- spacing can have "interesting" effects.
-</p>
-
-<p>Use either kind of grouping, as appropriate. <code>doxygroups.cc</code>
- exists for this purpose. See <code>stl_iterator.h</code> for a good
- example of the "other" kind of grouping.
-</p>
-
-<p>Please use markup tags like @p and @a when referring to things such as the
- names of function parameters. Use @e for emphasis when necessary. Use @c
- to refer to other standard names. (Examples of all these abound in the
- present code.)
-</p>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/doxygen/mainpage.html b/libstdc++-v3/docs/doxygen/mainpage.html
deleted file mode 100644
index 2f57764fae8..00000000000
--- a/libstdc++-v3/docs/doxygen/mainpage.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>libstdc++ Source: Main Index</title>
-<link href="style.css" rel="stylesheet" type="text/css">
-</head>
-
-<body bgcolor="#ffffff">
-<!--
- Originally generated by Doxygen 1.2.12.
-
- This used to be surrounded by /* */ marks and tagged with @mainpage, so
- that Doxygen would create the index page from it. HOWEVER, Doxygen
- ignores all but the most basic HTML tags, and even with those it strips
- all the attributes. (See, the HTML you write for @mainpage isn't used
- directly; it all gets run through Doxygen and re-output.) So lots of
- tags were all being mangled.
-
- Funk 'dat. Now we let Doxygen do whatever it feels like doing for the
- index page, and then we just flat copy this over top of it. Voila!
- Tags actually work like they're supposed to in HTML.
--->
-
-<h1>libstdc++ Source Documentation</h1>
-
-<h2>Documentation Overview</h2>
-
-<p class="smallertext">@LEVEL@-level docs, generated @DATE@.</p>
-
-<p>There are two types of documentation for libstdc++. One is the
- distribution documentation, which can be read online at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html</a>
- or offline from docs/html/documentation.html in the library source
- directory.
-</p>
-
-<p>The other type is the source documentation, of which this is the first page.
- Both &quot;user-level&quot; and &quot;maintainer-level&quot; source
- documentation is produced: user-level docs are for the users of this
- library. The maint-level docs are for those interested in the underlying
- workings of the library; they include all the user-level docs plus
- additional notes and additional classes/functions/etc.
-</p>
-
-<p>Here are entry points to all the pages generated by Doxygen:
- <ul>
- <li><a href="modules.html">Modules</a>
- <li><a href="namespaces.html">Namespace List</a>
- <li><a href="hierarchy.html">Class List</a>
- <li><a href="annotated.html">Class Annotated List</a>
- <li><a href="classes.html">Class Alphabetical Index</a>
- <li><a href="globals_func.html">Function Alphabetical List</a>
- <li><a href="files.html">Source File List</a>
- <li><a href="todo.html">TODO List</a> (This is incomplete... how ironic.)
- </ul>
-</p>
-
-<p>If you are using Doxygen for your own projects, you can use
- <a href="libstdc++.tag">a tag file for the appropriate version</a> and
- an entry such as
- <blockquote>
- TAGFILES = "libstdc++.tag =
- http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen"
- </blockquote>
- Be sure to adjust the URL for the right version. If you download a
- local copy of the source documentation for faster viewing, you can use
- the doxytag/installdox programs (part of Doxygen) to adjust the links
- for you.
-</p>
-
-<h2>Generating the documentation</h2>
-<p>These HTML pages are automatically generated, along with the man pages.
- See <code>docs/doxygen/guide.html</code> in the source tree for how to
- create (and write) the pages.
-
-<h2>License, Copyright, and Other Lawyerly Verbosity</h2>
-<p>The libstdc++ documentation is released under
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/license.html">
- these terms</a>.
-</p>
-<p>Part of the generated documentation involved comments and notes from
- SGI, who says we gotta say this:
- <blockquote>
- Permission to use, copy, modify, distribute and sell this software and its
- documentation for any purpose is hereby granted without fee, provided
- that the below copyright notice appears in all copies and that both
- the 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.
- <br><br>
- Copyright &copy; 1994
- Hewlett-Packard Company
- </blockquote>
-</p>
-<p>Part of the generated documentation is quoted from the ISO C++ Standard,
- which is Copyright &copy; 1998 by Information Technology Industry Council.
-</p>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/doxygen/run_doxygen b/libstdc++-v3/docs/doxygen/run_doxygen
deleted file mode 100644
index 2aca793e14a..00000000000
--- a/libstdc++-v3/docs/doxygen/run_doxygen
+++ /dev/null
@@ -1,328 +0,0 @@
-#!/bin/bash
-
-# Runs doxygen and massages the output files.
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-#
-# Synopsis: run_doxygen --mode=[user|maint|man] --host_alias=<alias> \
-# v3srcdir v3builddir
-#
-# Originally hacked together by Phil Edwards <pme@gcc.gnu.org>
-
-
-# We can check now that the version of doxygen is >= this variable.
-DOXYVER=1.3.9
-
-find_doxygen() {
- local -r v_required=`echo $DOXYVER | \
- awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
- local testing_version doxygen maybedoxy v_found
- # thank you goat book
- set `IFS=:; X="$PATH:/usr/local/bin:/bin:/usr/bin"; echo $X`
- for dir
- do
- # AC_EXEEXT could come in useful here
- maybedoxy="$dir/doxygen"
- test -f "$maybedoxy" && testing_version=`$maybedoxy --version`
- if test -n "$testing_version"; then
- v_found=`echo $testing_version | \
- awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
- if test $v_found -ge $v_required; then
- doxygen="$maybedoxy"
- break
- fi
- fi
- done
- if test -z "$doxygen"; then
- echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2
- print_usage
- fi
- # We need to use other tools from the same package/version.
- echo :: Using Doxygen tools from ${dir}.
- PATH=$dir:$PATH
- hash -r
-}
-
-print_usage() {
- cat 1>&2 <<EOF
-Usage: run_doxygen --mode=MODE --host_alias=BUILD_ALIAS [<options>]
- <v3-src-dir> <v3-build-dir>
- MODE is one of:
- user Generate user-level HTML library documentation.
- maint Generate maintainers' HTML documentation (lots more;
- exposes non-public members, etc).
- man Generate user-level man pages.
-
- BUILD_ALIAS is the GCC build alias set at configure time.
-
- more options when i think of them
-
-Note: Requires Doxygen ${DOXYVER} or later; get it at
- ftp://ftp.stack.nl/pub/users/dimitri/doxygen-${DOXYVER}.src.tar.gz
-
-EOF
- exit 1
-}
-
-parse_options() {
- for o
- do
- # Blatantly ripped from autoconf, er, I mean, "gratefully standing
- # on the shoulders of those giants who have gone before us."
- case "$o" in
- -*=*) arg=`echo "$o" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) arg= ;;
- esac
-
- case "$o" in
- --mode=*)
- mode=$arg ;;
- --host_alias=*)
- host_alias=$arg ;;
- --mode | --host_alias | --help | -h)
- print_usage ;;
- *)
- # this turned out to be a mess, maybe change to --srcdir=, etc
- if test $srcdir = unset; then
- srcdir=$o
- elif test $outdir = unset; then
- builddir=${o}
- outdir=${o}/docs/doxygen
- else
- echo run_doxygen error: Too many arguments 1>&2
- exit 1
- fi
- ;;
- esac
- done
-}
-
-
-# script begins here
-mode=unset
-host_alias=unset
-srcdir=unset
-outdir=unset
-do_html=false
-do_man=false
-enabled_sections=
-generate_tagfile=
-DATEtext=`date '+%Y-%m-%d'`
-
-# Show how this script is called.
-echo run_doxygen $*
-
-parse_options $*
-find_doxygen
-
-if test $srcdir = unset || test $outdir = unset || test $mode = unset || test $host_alias = unset; then
- # this could be better
- echo run_doxygen error: You have not given enough information...! 1>&2
- print_usage
-fi
-
-case x"$mode" in
- xuser)
- do_html=true
- LEVELtext='User'
- generate_tagfile="$outdir/html_$mode/libstdc++.tag"
- ;;
- xmaint)
- do_html=true
- enabled_sections=maint
- LEVELtext='Maintainer'
- generate_tagfile="$outdir/html_$mode/libstdc++.tag"
- ;;
- xman)
- do_man=true
- ;;
- *)
- echo run_doxygen error: $mode is an invalid mode 1>&2
- exit 1 ;;
-esac
-
-#rm -rf $outdir
-mkdir -p $outdir
-chmod u+w $outdir
-
-# work around a stupid doxygen bug
-if $do_man; then
- mkdir -p $outdir/man/man3/ext
- chmod -R u+w $outdir/man/man3/ext
-fi
-
-(
- set -e
- cd $builddir
- sed -e "s=@outdir@=${outdir}=g" \
- -e "s=@srcdir@=${srcdir}=g" \
- -e "s=@builddir@=${builddir}=g" \
- -e "s=@host_alias@=${host_alias}=g" \
- -e "s=@html_output_dir@=html_${mode}=" \
- -e "s=@enabled_sections@=${enabled_sections}=" \
- -e "s=@do_html@=${do_html}=" \
- -e "s=@do_man@=${do_man}=" \
- -e "s=@generate_tagfile@=${generate_tagfile}=" \
- ${srcdir}/docs/doxygen/user.cfg.in > ${outdir}/${mode}.cfg
- echo :: NOTE that this may take some time...
- echo doxygen ${outdir}/${mode}.cfg
- doxygen ${outdir}/${mode}.cfg
- echo :: Finished, exit code was $?
-)
-ret=$?
-test $ret -ne 0 && exit $ret
-
-if $do_html; then
- cd ${outdir}/html_${mode}
-
- #doxytag -t libstdc++.tag . > /dev/null 2>&1
- sed -e '/<path>/d' libstdc++.tag > TEMP
- mv TEMP libstdc++.tag
-
- sed -e "s=@LEVEL@=${LEVELtext}=" \
- -e "s=@DATE@=${DATEtext}=" \
- ${srcdir}/docs/doxygen/mainpage.html > index.html
-
- # The following bit of line noise changes annoying
- # std::foo < typename _Ugly1, typename _Ugly2, .... _DefaultUgly17 >
- # to user-friendly
- # std::foo
- # in the major "Compound List" page.
- sed -e 's=\(::[[:alnum:]_]*\)&lt; .* &gt;=\1=' annotated.html > annstrip.html
- mv annstrip.html annotated.html
-
- # Work around a bug in doxygen 1.3.
- for f in class*html struct*html; do
- sed '1,10s!^<title> Template!<title>Template !' $f > TEMP
- mv TEMP $f
- done
-
- cp ${srcdir}/docs/doxygen/tables.html tables.html
- echo ::
- echo :: HTML pages begin with
- echo :: ${outdir}/html_${mode}/index.html
-fi
-
-# Mess with the man pages. We don't need documentation of the internal
-# headers, since the man pages for those contain nothing useful anyhow. The
-# man pages for doxygen modules need to be renamed (or deleted). And the
-# generated #include lines need to be changed from the internal names to the
-# standard ones (e.g., "#include <stl_tempbuf.h>" -> "#include <memory>").
-if $do_man; then
-echo ::
-echo :: Fixing up the man pages...
-cd $outdir/man/man3
-
-# here's the other end of the "stupid doxygen bug" mentioned above
-rm -rf ext
-
-# File names with embedded spaces (EVIL!) need to be....? renamed or removed?
-find . -name "* *" -print0 | xargs -0r rm # requires GNU tools
-
-# can leave SGIextensions.3 alone, it's an okay name
-mv s20_3_1_base.3 Intro_functors.3
-mv s20_3_2_arithmetic.3 Arithmetic_functors.3
-mv s20_3_3_comparisons.3 Comparison_functors.3
-mv s20_3_4_logical.3 Logical_functors.3
-mv s20_3_5_negators.3 Negation_functors.3
-mv s20_3_6_binder.3 Binder_functors.3
-mv s20_3_7_adaptors.3 Func_ptr_functors.3
-mv s20_3_8_memadaptors.3 Member_ptr_functors.3
-mv iterator_tags.3 Iterator_types.3
-mv std.3 Namespace_std.3
-mv __gnu_cxx.3 Namespace___gnu_cxx.3
-
-# man pages are for functions/types/other entities, not source files
-# directly. who the heck would type "man foo.h" anyhow?
-find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm
-rm -f *.h.3 *config* *.cc.3 *.tcc.3 *_t.3
-# this is used to examine what we would have deleted, for debugging
-#mkdir trash
-#find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash
-#mv *.h.3 *config* *.cc.3 *.tcc.3 *_t.3 trash
-
-# Standardize the displayed header names. If anyone who knows perl cares
-# enough to rewrite all this, feel free. This only gets run once a century,
-# and I'm off getting coffee then anyhow, so I didn't care enough to make
-# this super-fast.
-g++ ${srcdir}/docs/doxygen/stdheader.cc -o ./stdheader
-problematic=`egrep -l '#include <.*_.*>' [a-z]*.3`
-for f in $problematic; do
- # this is also slow, but safe and easy to debug
- oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
- newh=`echo $oldh | ./stdheader`
- sed "s=${oldh}=${newh}=" $f > TEMP
- mv TEMP $f
-done
-rm stdheader
-
-# Some of the pages for generated modules have text that confuses certain
-# implementations of man(1), e.g., Linux's. We need to have another top-level
-# *roff tag to /stop/ the .SH NAME entry.
-#problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
-problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3'
-for f in $problematic; do
- sed '/^\.SH NAME/{
-n
-a\
-\
-.SH SYNOPSIS
- }' $f > TEMP
- mv TEMP $f
-done
-
-# Also, break this (generated) line up. It's ugly as sin.
-problematic=`grep -l '[^^]Definition at line' *.3`
-for f in $problematic; do
- sed 's/Definition at line/\
-.PP\
-&/' $f > TEMP
- mv TEMP $f
-done
-
-cp ${srcdir}/docs/doxygen/Intro.3 C++Intro.3
-
-# Why didn't I do this at the start? Were rabid weasels eating my brain?
-# Who the fsck would "man std_vector" when the class isn't named that?
-for f in std_tr1_*; do
- newname=`echo $f | sed 's/^std_tr1_/std::tr1::/'`
- mv $f $newname
-done
-for f in std_*; do
- newname=`echo $f | sed 's/^std_/std::/'`
- mv $f $newname
-done
-for f in __gnu_cxx_*; do
- newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'`
- mv $f $newname
-done
-
-# Generic reoval bits, where there are things in the generated man
-# pages that need to be killed.
-for f in *_libstdc__-v3_*; do
- rm $f
-done
-
-for f in *_src_*; do
- rm $f
-done
-
-
-# Also, for some reason, typedefs don't get their own man pages. Sigh.
-for f in ios streambuf istream ostream iostream stringbuf \
- istringstream ostringstream stringstream filebuf ifstream \
- ofstream fstream string;
-do
- echo ".so man3/std::basic_${f}.3" > std::${f}.3
- echo ".so man3/std::basic_${f}.3" > std::w${f}.3
-done
-
-echo ::
-echo :: Man pages in ${outdir}/man
-fi
-
-# all done
-echo ::
-
-exit 0
-
-# vim:ts=4:et:
diff --git a/libstdc++-v3/docs/doxygen/user.cfg.in b/libstdc++-v3/docs/doxygen/user.cfg.in
deleted file mode 100644
index 73fe6777d4d..00000000000
--- a/libstdc++-v3/docs/doxygen/user.cfg.in
+++ /dev/null
@@ -1,1414 +0,0 @@
-# Doxyfile 1.5.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = libstdc++
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = @outdir@
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# This tag can be used to specify the encoding used in the generated
-# output. The encoding is not always determined by the language that
-# is chosen, but also whether or not the output is meant for Windows
-# or non-Windows users. In case there is a difference, setting the
-# USE_WINDOWS_ENCODING tag to YES forces the Windows encoding (this is
-# the default for the Windows binary), whereas setting the tag to NO
-# uses a Unix-style encoding (the default for all platforms other than
-# Windows).
-
-USE_WINDOWS_ENCODING = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = NO
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will
-# prepend the brief description of a member or function before the
-# detailed description. Note: if both HIDE_UNDOC_MEMBERS and
-# BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be
-# completely suppressed.
-
-REPEAT_BRIEF = NO
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = YES
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show
-# all inherited members of a class in the documentation of that class
-# as if those members were ordinary class members. Constructors,
-# destructors and assignment operators of the base classes will not be
-# shown.
-
-INLINE_INHERITED_MEMB = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = YES
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES = "doctodo=@todo\nDoc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more." \
- "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink"
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of
-# Java sources only. Doxygen will then generate output that is more
-# tailored for Java. For instance, namespaces will be presented as
-# packages, qualified scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do
-# not want to include (a tag file for) the STL sources as input, then
-# you should set this tag to YES in order to let doxygen match
-# functions declarations and definitions whose arguments contain STL
-# classes (e.g. func(std::string); v.s. func(std::string) {}). This
-# also make the inheritance and collaboration diagrams that involve
-# STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = YES
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = YES
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = NO#
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-#HIDE_SCOPE_NAMES = YES
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then
-# Doxygen will put a list of the files that are included by a file in
-# the documentation of that file.
-
-SHOW_INCLUDE_FILES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = YES
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-#SORT_BY_SCOPE_NAME = NO
-SORT_BY_SCOPE_NAME = YES
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = NO
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS = @enabled_sections@
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 0
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple
-# directories then setting the SHOW_DIRECTORIES tag to YES will show
-# the directory hierarchy in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or
-# script that doxygen should invoke to get the current version for
-# each file (typically from the version control system). Doxygen will
-# invoke the program by executing (via popen()) the command <command>
-# <input-file>, where <command> is the value of the
-# FILE_VERSION_FILTER tag, and <input-file> is the name of an input
-# file provided by doxygen. Whatever the program writes to standard
-# output is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = NO
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their
-# parameters or return value. If set to NO (the default) doxygen will
-# only warn about wrong or incomplete parameter documentation, but not
-# about the absence of documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories
-# that contain documented source files. You may enter file names like
-# "myfile.cpp" or directories like "/usr/src/myproject". Separate the
-# files or directories with spaces.
-
-INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
- @srcdir@/include/precompiled/stdc++.h \
- @srcdir@/include/precompiled/stdtr1c++.h \
- @srcdir@/include/precompiled/extc++.h \
- @srcdir@/libsupc++/cxxabi.h \
- @srcdir@/libsupc++/exception \
- @srcdir@/libsupc++/new \
- @srcdir@/libsupc++/typeinfo \
- include/@host_alias@/bits \
- include/bits \
- include/debug \
- include/ext \
- include/tr1 \
- include/algorithm \
- include/array \
- include/bitset \
- include/cassert \
- include/ccomplex \
- include/cctype \
- include/cerrno \
- include/cfenv \
- include/cfloat \
- include/cinttypes \
- include/ciso646 \
- include/climits \
- include/clocale \
- include/cmath \
- include/csetjmp \
- include/csignal \
- include/cstdarg \
- include/cstdbool \
- include/cstddef \
- include/cstdint \
- include/cstdio \
- include/cstdlib \
- include/cstring \
- include/ctgmath \
- include/ctime \
- include/cwchar \
- include/cwctype \
- include/deque \
- include/fstream \
- include/functional \
- include/iomanip \
- include/ios \
- include/iosfwd \
- include/iostream \
- include/istream \
- include/iterator \
- include/limits \
- include/list \
- include/locale \
- include/map \
- include/memory \
- include/numeric \
- include/ostream \
- include/queue \
- include/random \
- include/regex \
- include/set \
- include/sstream \
- include/stack \
- include/stdexcept \
- include/streambuf \
- include/string \
- include/tuple \
- include/type_traits \
- include/unordered_map \
- include/unordered_set \
- include/utility \
- include/valarray \
- include/vector \
- include/debug/bitset \
- include/debug/deque \
- include/debug/hash_map \
- include/debug/hash_set \
- include/debug/list \
- include/debug/map \
- include/debug/set \
- include/debug/string \
- include/debug/vector \
- include/ext/algorithm \
- include/ext/functional \
- include/ext/hash_map \
- include/ext/hash_set \
- include/ext/iterator \
- include/ext/memory \
- include/ext/numeric \
- include/ext/rb_tree \
- include/ext/rope \
- include/ext/slist \
- include/ext/pb_ds \
- include/ext/pb_ds/detail \
- include/tr1/array \
- include/tr1/ccomplex \
- include/tr1/cctype \
- include/tr1/cfenv \
- include/tr1/cfloat \
- include/tr1/cinttypes \
- include/tr1/climits \
- include/tr1/cmath \
- include/tr1/complex \
- include/tr1/cstdarg \
- include/tr1/cstdbool \
- include/tr1/cstdint \
- include/tr1/cstdio \
- include/tr1/cstdlib \
- include/tr1/ctgmath \
- include/tr1/ctime \
- include/tr1/cwchar \
- include/tr1/cwctype \
- include/tr1/functional \
- include/tr1/hashtable \
- include/tr1/memory \
- include/tr1/random \
- include/tr1/regex \
- include/tr1/tuple \
- include/tr1/type_traits \
- include/tr1/unordered_map \
- include/tr1/unordered_set \
- include/tr1/utility
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like
-# *.cpp and *.h) to filter out the source-files in the directories. If
-# left blank the following patterns are tested: *.c *.cc *.cxx *.cpp
-# *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++
-# *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
-
-FILE_PATTERNS = *.h \
- *.hpp \
- *.tcc
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that
-# should excluded from the INPUT source files. This way you can easily
-# exclude a subdirectory from a directory tree whose root is specified
-# with the INPUT tag.
-
-EXCLUDE = Makefile
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS = stamp-* \
- *stdc++.h* \
- *stdtr1c++.h* \
- *extc++.h* \
- */.svn/*
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files
-# will be generated. Documented entities will be cross-referenced with
-# these sources. Note: To get rid of all source code in the generated
-# output, make sure also VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = NO
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 2
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-#IGNORE_PREFIX = std \
-# std::tr1 \
-# __gnu_cxx \
-# __gnu_debug
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = @do_html@
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = @html_output_dir@
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET = @srcdir@/docs/doxygen/style.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = YES
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES = amsmath
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = @do_man@
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = YES
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-# GLIBCXX NOTE: Necessary for namespaces to be sorted correctly.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names
-# that are defined before the preprocessor is started (similar to the
-# -D option of gcc). The argument of the tag is a list of macros of
-# the form: name or name=definition (no spaces). If the definition and
-# the = are omitted =1 is assumed. To prevent a macro definition from
-# being undefined via #undef or recursively expanded use the :=
-# operator instead of the = operator.
-
-PREDEFINED = __GTHREADS \
- _GLIBCXX_STD=std \
- _GLIBCXX_TR1=tr1 \
- "_GLIBCXX_BEGIN_NAMESPACE(name)=namespace name {" \
- "_GLIBCXX_BEGIN_NESTED_NAMESPACE(name, unused)=namespace name {" \
- _GLIBCXX_END_NAMESPACE=} \
- _GLIBCXX_END_NESTED_NAMESPACE=} \
- "_GLIBCXX_TEMPLATE_ARGS=..." \
- _GLIBCXX_DEPRECATED \
- _GLIBCXX_USE_WCHAR_T \
- _GLIBCXX_USE_LONG_LONG \
- __glibcxx_function_requires=// \
- __glibcxx_class_requires=// \
- __glibcxx_class_requires2=// \
- __glibcxx_class_requires3=// \
- __glibcxx_class_requires4=//
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES
-# then this tag can be used to specify a list of macro names that
-# should be expanded. The macro definition that is found in the
-# sources will be used. Use the PREDEFINED tag if you want to use a
-# different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE = @generate_tagfile@
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = YES
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes
-# with base or super classes. Setting the tag to NO turns the diagrams
-# off. Note that this option is superseded by the HAVE_DOT option
-# below. This is only a fallback. It is recommended to install and use
-# dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = NO
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot
-# tool is available from the path. This tool is part of Graphviz, a
-# graph visualization toolkit from AT&T and Lucent Bell Labs. The
-# other options in this section have no effect if this option is set
-# to NO (the default)
-
-HAVE_DOT = YES
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = NO
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-#TEMPLATE_RELATIONS = YES
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = NO
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class
-# method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable
-# call graphs for selected functions only using the \callgraph
-# command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a caller dependency graph for every global function or
-# class method. Note that enabling this option will significantly
-# increase the time of a run. So in most cases it will be better to
-# enable caller graphs for selected functions only using the
-# \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-#DOT_IMAGE_FORMAT = svg
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_WIDTH = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of
-# the graphs generated by dot. A depth value of 3 means that only
-# nodes reachable from the root by following a path via at most 3
-# edges will be shown. Nodes that lay further from the root node will
-# be omitted. Note that setting this option to 1 or 2 may greatly
-# reduce the computation time needed for large code bases. Also note
-# that a graph may be further truncated if the graph's image
-# dimensions are not sufficient to fit the graph (see
-# MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the
-# depth value (the default), the graph is not depth-constrained.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a
-# transparent background. This is disabled by default, which results
-# in a white background. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the
-# edges of a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = YES
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = NO
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/libstdc++-v3/docs/html/17_intro/BADNAMES b/libstdc++-v3/docs/html/17_intro/BADNAMES
deleted file mode 100644
index a904704ee39..00000000000
--- a/libstdc++-v3/docs/html/17_intro/BADNAMES
+++ /dev/null
@@ -1,182 +0,0 @@
-
-This is the list of names "reserved to the implementation" that
-have been claimed by certain compilers and system headers of interest,
-and should not be used in the library. It will grow, of course.
-We generally are interested in names that are not all-caps, except
-for those like "_T"
-
-For Solarix:
-_B
-_C
-_L
-_N
-_P
-_S
-_U
-_X
-_E1
-..
-_E24
-
-Irix adds:
-_A
-_G
-
-MS adds:
-_T
-
-BSD adds:
-__used
-__unused
-__inline
-_Complex
-__istype
-__maskrune
-__tolower
-__toupper
-__wchar_t
-__wint_t
-_res
-_res_ext
-__tg_*
-
-For GCC:
-
- [Note that this list is out of date. It applies to the old
- name-mangling; in G++ 3.0 and higher a different name-mangling is
- used. In addition, many of the bugs relating to G++ interpreting
- these names as operators have been fixed.]
-
- The full set of __* identifiers (combined from gcc/cp/lex.c and
- gcc/cplus-dem.c) that are either old or new, but are definitely
- recognized by the demangler, is:
-
-__aa
-__aad
-__ad
-__addr
-__adv
-__aer
-__als
-__alshift
-__amd
-__ami
-__aml
-__amu
-__aor
-__apl
-__array
-__ars
-__arshift
-__as
-__bit_and
-__bit_ior
-__bit_not
-__bit_xor
-__call
-__cl
-__cm
-__cn
-__co
-__component
-__compound
-__cond
-__convert
-__delete
-__dl
-__dv
-__eq
-__er
-__ge
-__gt
-__indirect
-__le
-__ls
-__lt
-__max
-__md
-__method_call
-__mi
-__min
-__minus
-__ml
-__mm
-__mn
-__mult
-__mx
-__ne
-__negate
-__new
-__nop
-__nt
-__nw
-__oo
-__op
-__or
-__pl
-__plus
-__postdecrement
-__postincrement
-__pp
-__pt
-__rf
-__rm
-__rs
-__sz
-__trunc_div
-__trunc_mod
-__truth_andif
-__truth_not
-__truth_orif
-__vc
-__vd
-__vn
-
-SGI badnames:
-__builtin_alloca
-__builtin_fsqrt
-__builtin_sqrt
-__builtin_fabs
-__builtin_dabs
-__builtin_cast_f2i
-__builtin_cast_i2f
-__builtin_cast_d2ll
-__builtin_cast_ll2d
-__builtin_copy_dhi2i
-__builtin_copy_i2dhi
-__builtin_copy_dlo2i
-__builtin_copy_i2dlo
-__add_and_fetch
-__sub_and_fetch
-__or_and_fetch
-__xor_and_fetch
-__and_and_fetch
-__nand_and_fetch
-__mpy_and_fetch
-__min_and_fetch
-__max_and_fetch
-__fetch_and_add
-__fetch_and_sub
-__fetch_and_or
-__fetch_and_xor
-__fetch_and_and
-__fetch_and_nand
-__fetch_and_mpy
-__fetch_and_min
-__fetch_and_max
-__lock_test_and_set
-__lock_release
-__lock_acquire
-__compare_and_swap
-__synchronize
-__high_multiply
-__unix
-__sgi
-__linux__
-__i386__
-__i486__
-__cplusplus
-__embedded_cplusplus
-// long double conversion members mangled as __opr
-// http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00060.html
-_opr
diff --git a/libstdc++-v3/docs/html/17_intro/BUGS b/libstdc++-v3/docs/html/17_intro/BUGS
deleted file mode 100644
index e71304d0666..00000000000
--- a/libstdc++-v3/docs/html/17_intro/BUGS
+++ /dev/null
@@ -1,28 +0,0 @@
-2003-04-26
-
-- _GLIBCPP_HAS_BUILTIN_SINF: We should still hold out for a cleaner solution the is currenly the case in bits/std_cmath.h.
-
-- there may be one set of remaining string bugs, dependent on final
-clarification of the string::find technicalities when finding in an
-empty string or using an empty string for an argument. At the very
-least, v-3 has interpreted the standard in a way that is in opposition
-to other libraries on other platforms.
-
-- trigraphs and keywords a la the iso646 header are not correctly
-implemented. It looks like the compiler recognizes them as keywords
-but then doesn't translate into the correct bit ops. It is a mystery.
-
-- wide strings have not been tested, and may therefore be unusable.
-
-- Chapter 27 io functionality is not finished. As such, there are
-known bugs in: filebuf::putbackfail
-
-- Many facet implementations are stubs. (22)
-
-- Almost no optimizations for small-footprint/low-overhead. (22,27)
-
-- There has been some work to wrap the C headers in namespace std::, but
- it may not be complete yet, and C macros are not shadowed. Please consult
- the mailing list archives for more information.
-
-
diff --git a/libstdc++-v3/docs/html/17_intro/C++STYLE b/libstdc++-v3/docs/html/17_intro/C++STYLE
deleted file mode 100644
index 87f53d0ea05..00000000000
--- a/libstdc++-v3/docs/html/17_intro/C++STYLE
+++ /dev/null
@@ -1,386 +0,0 @@
-
-C++ Standard Library Style Guidelines DRAFT 2001-01-15
--------------------------------------
-
-This library is written to appropriate C++ coding standards. As such,
-it is intended to precede the recommendations of the GNU Coding
-Standard, which can be referenced here:
-
-http://www.gnu.org/prep/standards_toc.html
-
-ChangeLog entries for member functions should use the
-classname::member function name syntax as follows:
-
-1999-04-15 Dennis Ritchie <dr@att.com>
-
- * src/basic_file.cc (__basic_file::open): Fix thinko in
- _G_HAVE_IO_FILE_OPEN bits.
-
-Notable areas of divergence from what may be previous local practice
-(particularly for GNU C) include:
-
-01. Pointers and references
- char* p = "flop";
- char& c = *p;
- -NOT-
- char *p = "flop"; // wrong
- char &c = *p; // wrong
-
- Reason: In C++, definitions are mixed with executable code. Here,
- p is being initialized, not *p. This is near-universal
- practice among C++ programmers; it is normal for C hackers
- to switch spontaneously as they gain experience.
-
-02. Operator names and parentheses
- operator==(type)
- -NOT-
- operator == (type) // wrong
-
- Reason: The == is part of the function name. Separating
- it makes the declaration look like an expression.
-
-03. Function names and parentheses
- void mangle()
- -NOT-
- void mangle () // wrong
-
- Reason: no space before parentheses (except after a control-flow
- keyword) is near-universal practice for C++. It identifies the
- parentheses as the function-call operator or declarator, as
- opposed to an expression or other overloaded use of parentheses.
-
-04. Template function indentation
- template<typename T>
- void
- template_function(args)
- { }
- -NOT-
- template<class T>
- void template_function(args) {};
-
- Reason: In class definitions, without indentation whitespace is
- needed both above and below the declaration to distinguish
- it visually from other members. (Also, re: "typename"
- rather than "class".) T often could be int, which is
- not a class. ("class", here, is an anachronism.)
-
-05. Template class indentation
- template<typename _CharT, typename _Traits>
- class basic_ios : public ios_base
- {
- public:
- // Types:
- };
- -NOT-
- template<class _CharT, class _Traits>
- class basic_ios : public ios_base
- {
- public:
- // Types:
- };
- -NOT-
- template<class _CharT, class _Traits>
- class basic_ios : public ios_base
- {
- public:
- // Types:
- };
-
-06. Enumerators
- enum
- {
- space = _ISspace,
- print = _ISprint,
- cntrl = _IScntrl
- };
- -NOT-
- enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };
-
-07. Member initialization lists
- All one line, separate from class name.
-
- gribble::gribble()
- : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
- { }
- -NOT-
- gribble::gribble() : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
- { }
-
-08. Try/Catch blocks
- try
- {
- //
- }
- catch (...)
- {
- //
- }
- -NOT-
- try {
- //
- } catch(...) {
- //
- }
-
-09. Member functions declarations and definitions
- Keywords such as extern, static, export, explicit, inline, etc
- go on the line above the function name. Thus
-
- virtual int
- foo()
- -NOT-
- virtual int foo()
-
- Reason: GNU coding conventions dictate return types for functions
- are on a separate line than the function name and parameter list
- for definitions. For C++, where we have member functions that can
- be either inline definitions or declarations, keeping to this
- standard allows all member function names for a given class to be
- aligned to the same margin, increasing readibility.
-
-
-10. Invocation of member functions with "this->"
- For non-uglified names, use this->name to call the function.
-
- this->sync()
- -NOT-
- sync()
-
- Reason: Koenig lookup.
-
-11. Namespaces
- namespace std
- {
- blah blah blah;
- } // namespace std
-
- -NOT-
-
- namespace std {
- blah blah blah;
- } // namespace std
-
-12. Spacing under protected and private in class declarations:
- space above, none below
- ie
-
- public:
- int foo;
-
- -NOT-
- public:
-
- int foo;
-
-13. Spacing WRT return statements.
- no extra spacing before returns, no parenthesis
- ie
-
- }
- return __ret;
-
- -NOT-
- }
-
- return __ret;
-
- -NOT-
-
- }
- return (__ret);
-
-
-14. Location of global variables.
- All global variables of class type, whether in the "user visable"
- space (e.g., cin) or the implementation namespace, must be defined
- as a character array with the appropriate alignment and then later
- re-initialized to the correct value.
-
- This is due to startup issues on certain platforms, such as AIX.
- For more explanation and examples, see src/globals.cc. All such
- variables should be contained in that file, for simplicity.
-
-15. Exception abstractions
- Use the exception abstractions found in functexcept.h, which allow
- C++ programmers to use this library with -fno-exceptions. (Even if
- that is rarely advisable, it's a necessary evil for backwards
- compatibility.)
-
-16. Exception error messages
- All start with the name of the function where the exception is
- thrown, and then (optional) descriptive text is added. Example:
-
- __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
-
- Reason: The verbose terminate handler prints out exception::what(),
- as well as the typeinfo for the thrown exception. As this is the
- default terminate handler, by putting location info into the
- exception string, a very useful error message is printed out for
- uncaught exceptions. So useful, in fact, that non-programmers can
- give useful error messages, and programmers can intelligently
- speculate what went wrong without even using a debugger.
-
-The library currently has a mixture of GNU-C and modern C++ coding
-styles. The GNU C usages will be combed out gradually.
-
-Name patterns:
-
-For nonstandard names appearing in Standard headers, we are constrained
-to use names that begin with underscores. This is called "uglification".
-The convention is:
-
- Local and argument names: __[a-z].*
-
- Examples: __count __ix __s1
-
- Type names and template formal-argument names: _[A-Z][^_].*
-
- Examples: _Helper _CharT _N
-
- Member data and function names: _M_.*
-
- Examples: _M_num_elements _M_initialize ()
-
- Static data members, constants, and enumerations: _S_.*
-
- Examples: _S_max_elements _S_default_value
-
-Don't use names in the same scope that differ only in the prefix,
-e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
-(The most tempting of these seem to be and "_T" and "__sz".)
-
-Names must never have "__" internally; it would confuse name
-unmanglers on some targets. Also, never use "__[0-9]", same reason.
-
---------------------------
-
-[BY EXAMPLE]
-
-#ifndef _HEADER_
-#define _HEADER_ 1
-
-namespace std
-{
- class gribble
- {
- public:
- // ctor, op=, dtor
- gribble() throw();
-
- gribble(const gribble&);
-
- explicit
- gribble(int __howmany);
-
- gribble&
- operator=(const gribble&);
-
- virtual
- ~gribble() throw ();
-
- // argument
- inline void
- public_member(const char* __arg) const;
-
- // in-class function definitions should be restricted to one-liners.
- int
- one_line() { return 0 }
-
- int
- two_lines(const char* arg)
- { return strchr(arg, 'a'); }
-
- inline int
- three_lines(); // inline, but defined below.
-
- // note indentation
- template<typename _Formal_argument>
- void
- public_template() const throw();
-
- template<typename _Iterator>
- void
- other_template();
-
- private:
- class _Helper;
-
- int _M_private_data;
- int _M_more_stuff;
- _Helper* _M_helper;
- int _M_private_function();
-
- enum _Enum
- {
- _S_one,
- _S_two
- };
-
- static void
- _S_initialize_library();
- };
-
-// More-or-less-standard language features described by lack, not presence:
-# ifndef _G_NO_LONGLONG
- extern long long _G_global_with_a_good_long_name; // avoid globals!
-# endif
-
- // Avoid in-class inline definitions, define separately;
- // likewise for member class definitions:
- inline int
- gribble::public_member() const
- { int __local = 0; return __local; }
-
- class gribble::_Helper
- {
- int _M_stuff;
-
- friend class gribble;
- };
-}
-
-// Names beginning with "__": only for arguments and
-// local variables; never use "__" in a type name, or
-// within any name; never use "__[0-9]".
-
-#endif /* _HEADER_ */
-
-
-namespace std
-{
- template<typename T> // notice: "typename", not "class", no space
- long_return_value_type<with_many, args>
- function_name(char* pointer, // "char *pointer" is wrong.
- char* argument,
- const Reference& ref)
- {
- // int a_local; /* wrong; see below. */
- if (test)
- {
- nested code
- }
-
- int a_local = 0; // declare variable at first use.
-
- // char a, b, *p; /* wrong */
- char a = 'a';
- char b = a + 1;
- char* c = "abc"; // each variable goes on its own line, always.
-
- // except maybe here...
- for (unsigned i = 0, mask = 1; mask; ++i, mask <<= 1) {
- // ...
- }
- }
-
- gribble::gribble()
- : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
- { }
-
- inline int
- gribble::three_lines()
- {
- // doesn't fit in one line.
- }
-} // namespace std
-
diff --git a/libstdc++-v3/docs/html/17_intro/CHECKLIST b/libstdc++-v3/docs/html/17_intro/CHECKLIST
deleted file mode 100644
index ad02b0d8731..00000000000
--- a/libstdc++-v3/docs/html/17_intro/CHECKLIST
+++ /dev/null
@@ -1,6002 +0,0 @@
-
- Completion Checklist for the Standard C++ Library
- Updated: 2003-04-25
-
- Status Code Legend:
- M - Missing
- S - Present as stub.
- X - Partially implemented, or buggy.
- T - Implemented, pending test/inspection.
- V - Verified to pass all available test suites.
- Q - Qualified by inspection for non-testable correctness.
- P - Portability verified.
- C - Certified.
-
- Lexical notes:
- Only status codes appear in column 0. Notes relating to conformance
- issues appear [in brackets].
-
- Note that this checklist does not (yet) include all emendations
- recommended by the ISO Library Working Group:
- http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
-
- Detailed explanation of status codes:
-
- M - Missing: The name is not visible to programs that include
- the specified header, either at compile or link stage.
-
- S - Present as stub: A program can use the name, but no implementation
- is provided. Programs that use the name link correctly, but
- cannot usefully be run.
-
- X - Partially implemented, or buggy: Some implementation has been
- provided, but it is known or believed not to conform fully.
- It may have an incorrect base class, wrong namespace, wrong
- storage class, or simply not fully implement requirements.
- However, it may be sufficiently usable to help test other
- components.
-
- T - Implemented, pending test/inspection: Implementation believed
- to be complete, and informal testing suggests it is ready for
- formal verification.
-
- V - Verified, passes all test suites: Verified to satisfy all
- generically testable conformance requirements.
-
- Q - Qualified by inspection for non-testable correctness:
- Inspected, "implementation-defined" documentation accepted,
- local usability criteria satisfied, formally inspected for
- other untestable conformance. (Untestable requirements
- include exception-safety, thread-safety, worst-case
- complexity, memory cleanliness, usefulness.)
-
- P - Portability verified: Qualified on all primary target platforms.
-
- C - Certified: Formally certified to have passed all tests,
- inspections, qualifications; approved under "signing authority"
- to be used to satisfy contractual guarantees.
-
- ----------------------------------------------------------------------
- <algorithm> <iomanip> <list> <ostream> <streambuf>
- <bitset> <ios> <locale> <queue> <string>
- <complex> <iosfwd> <map> <set> <typeinfo>
-X <deque> <iostream> <memory> <sstream> <utility>
- <exception> <istream> <new> <stack> <valarray>
- <fstream> <iterator> <numeric> <stdexcept> <vector>
- <functional> <limits>
-
- [C header names must be in std:: to qualify. Related to shadow/ dir.]
- <cassert> <ciso646> <csetjmp> <cstdio> <ctime>
- <cctype> <climits> <csignal> <cstdlib> <cwchar>
-X <cerrno> <clocale> <cstdarg> <cstring> <cwctype>
- <cfloat> <cmath> <cstddef>
-
- Macro:
-X errno, declared or defined in <cerrno>.
-
- Macro fn:
-X setjmp(jmp_buf), declared or defined in <csetjmp>
-X va_end(va_list), declared or defined in <cstdarg>
-
- Types:
-X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
-X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list,
-X wctrans_t, wctype_t, and wint_t.
-
- 1 Which of the functions in the C++ Standard Library are not reentrant
- subroutines is implementation-defined.
-
- 18.1 Types [lib.support.types]
-X <cstddef>
-X NULL
-X offsetof
-X ptrdiff_t
-X size_t
-
- 18.2 Implementation properties [lib.support.limits]
-
- <limits>, <climits>, and <cfloat>
-
- 18.2.1 Numeric limits [lib.limits]
-
-X template<class T> class numeric_limits;
-
-T enum float_round_style;
-T enum float_denorm_style;
-
-T template<> class numeric_limits<bool>;
-
-T template<> class numeric_limits<char>;
-T template<> class numeric_limits<signed char>;
-T template<> class numeric_limits<unsigned char>;
-T template<> class numeric_limits<wchar_t>;
-
-T template<> class numeric_limits<short>;
-T template<> class numeric_limits<int>;
-T template<> class numeric_limits<long>;
-T template<> class numeric_limits<unsigned short>;
-T template<> class numeric_limits<unsigned int>;
-T template<> class numeric_limits<unsigned long>;
-
-X template<> class numeric_limits<float>;
-X template<> class numeric_limits<double>;
-X template<> class numeric_limits<long double>;
-
- 18.2.1.1 Template class numeric_limits [lib.numeric.limits]
-T template<class T> class numeric_limits {
- public:
-T static const bool is_specialized = false;
-T static T min() throw();
-T static T max() throw();
-T static const int digits = 0;
-T static const int digits10 = 0;
-T static const bool is_signed = false;
-T static const bool is_integer = false;
-T static const bool is_exact = false;
-T static const int radix = 0;
-T static T epsilon() throw();
-T static T round_error() throw();
-
-T static const int min_exponent = 0;
-T static const int min_exponent10 = 0;
-T static const int max_exponent = 0;
-T static const int max_exponent10 = 0;
-
-T static const bool has_infinity = false;
-T static const bool has_quiet_NaN = false;
-T static const bool has_signaling_NaN = false;
-T static const float_denorm_style has_denorm = denorm_absent;
-T static const bool has_denorm_loss = false;
-T static T infinity() throw();
-T static T quiet_NaN() throw();
-T static T signaling_NaN() throw();
-T static T denorm_min() throw();
-
-T static const bool is_iec559 = false;
-T static const bool is_bounded = false;
-T static const bool is_modulo = false;
-
-T static const bool traps = false;
-T static const bool tinyness_before = false;
-T static const float_round_style round_style = round_toward_zero;
- };
-
- 18.2.1.3 Type float_round_style [lib.round.style]
-
-T enum float_round_style {
-T round_indeterminate = -1,
-T round_toward_zero = 0,
-T round_to_nearest = 1,
-T round_toward_infinity = 2,
-T round_toward_neg_infinity = 3
- };
-
- 18.2.1.4 Type float_denorm_style [lib.denorm.style]
-
-T enum float_denorm_style {
-T denorm_indeterminate = -1;
-T denorm_absent = 0;
-T denorm present = 1;
- };
-
- 18.2.1.5 numeric_limits specializations [lib.numeric.special]
-
- [Note: see Note at 18.2.1. ]
-
- 18.2.2 C Library [lib.c.limits]
-
- 1 Header <climits> (Table 3):
- CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
-X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
- CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
-
- 3 Header <cfloat> (Table 4):
-
- DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP
- DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP
- DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN
-X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
- DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP
- DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON
- DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG
- DBL_MIN_10_EXP FLT_MIN LDBL_MAX
-
-
- 1 Header <cstdlib> (partial), Table 5:
-X EXIT_FAILURE EXIT_SUCCESS
- abort atexit exit
-
-S abort(void)
-S extern "C" int atexit(void (*f)(void))
-S extern "C++" int atexit(void (*f)(void))
-S exit(int status)
-
- 18.4 Dynamic memory management [lib.support.dynamic]
-
- Header <new> synopsis
-
-T class bad_alloc;
-T struct nothrow_t {};
-T extern const nothrow_t nothrow;
-T typedef void (*new_handler)();
-T new_handler set_new_handler(new_handler new_p) throw();
-
-T void* operator new(std::size_t size) throw(std::bad_alloc);
-T void* operator new(std::size_t size, const std::nothrow_t&) throw();
-T void operator delete(void* ptr) throw();
-T void operator delete(void* ptr, const std::nothrow_t&) throw();
-T void* operator new[](std::size_t size) throw(std::bad_alloc);
-T void* operator new[](std::size_t size, const std::nothrow_t&) throw();
-T void operator delete[](void* ptr) throw();
-T void operator delete[](void* ptr, const std::nothrow_t&) throw();
-T void* operator new (std::size_t size, void* ptr) throw();
-T void* operator new[](std::size_t size, void* ptr) throw();
-T void operator delete (void* ptr, void*) throw();
-T void operator delete[](void* ptr, void*) throw();
-
- 18.4.2.1 Class bad_alloc [lib.bad.alloc]
-
-T class bad_alloc : public exception {
- public:
-T bad_alloc() throw();
-T bad_alloc(const bad_alloc&) throw();
-T bad_alloc& operator=(const bad_alloc&) throw();
-T virtual ~bad_alloc() throw();
-T virtual const char* what() const throw();
-
-
-
-T new_handler set_new_handler(new_handler new_p) throw();
-
-
- Header <typeinfo> synopsis
-
-T class type_info;
-T class bad_cast;
-T class bad_typeid;
-
- 18.5.1 - Class type_info [lib.type.info]
-
-T class type_info {
- public:
-T virtual ~type_info();
-T bool operator==(const type_info& rhs) const;
-T bool operator!=(const type_info& rhs) const;
-T bool before(const type_info& rhs) const;
-T const char* name() const;
- private:
-T type_info(const type_info& rhs);
-T type_info& operator=(const type_info& rhs);
- };
-
- 18.5.2 - Class bad_cast [lib.bad.cast]
-
-T bad_cast() throw();
-T virtual const char* bad_cast::what() const throw();
-
- 18.5.3 Class bad_typeid [lib.bad.typeid]
-
-T class bad_typeid : public exception {
- public:
-T bad_typeid() throw();
-T bad_typeid(const bad_typeid&) throw();
-T bad_typeid& operator=(const bad_typeid&) throw();
-T virtual ~bad_typeid() throw();
-T virtual const char* what() const throw();
- };
-
- 18.6 Exception handling [lib.support.exception]
-
-T Header <exception> synopsis
-
-T class exception;
-T class bad_exception;
-
-T typedef void (*unexpected_handler)();
-T unexpected_handler set_unexpected(unexpected_handler f) throw();
-T void unexpected();
-T typedef void (*terminate_handler)();
-T terminate_handler set_terminate(terminate_handler f) throw();
-T void terminate();
-T bool uncaught_exception();
-
- 18.6.1 Class exception [lib.exception]
-
-T class exception {
- public:
-T exception() throw();
-T exception(const exception&) throw();
-T exception& operator=(const exception&) throw();
-T virtual ~exception() throw();
-T virtual const char* what() const throw();
- };
-
- 18.6.2.1 Class bad_exception [lib.bad.exception]
-T class bad_exception : public exception {
- public:
-T bad_exception() throw();
-T bad_exception(const bad_exception&) throw();
-T bad_exception& operator=(const bad_exception&) throw();
-T virtual ~bad_exception() throw();
-T virtual const char* what() const throw();
- };
-
- 18.7 Other runtime support [lib.support.runtime]
-
- 1 Headers <cstdarg> (variable arguments), <csetjmp> (nonlocal jumps),
- <ctime> (system clock clock(), time()), <csignal> (signal handling),
- and <cstdlib> (runtime environment getenv(), system()).
-
- Table 6--Header <cstdarg> synopsis
- Macros: va_arg va_end va_start
-X Type: va_list
-
- Table 7--Header <csetjmp> synopsis
-
- Macro: setjmp |
-X Type: jmp_buf
- Function: longjmp
-
- Table 8--Header <ctime> synopsis
-
- Macros: CLOCKS_PER_SEC
-X Types: clock_t
- Functions: clock
-
- Table 9--Header <csignal> synopsis
-
-X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
- SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
- Type: sig_atomic_t
- Functions: raise signal
-
- Table 10--Header <cstdlib> synopsis
-
-X Functions: getenv system
-
- 19.1 Exception classes [lib.std.exceptions]
-
- Header <stdexcept> synopsis
-
-T class logic_error;
-T class domain_error;
-T class invalid_argument;
-T class length_error;
-T class out_of_range;
-T class runtime_error;
-T class range_error;
-T class overflow_error;
-T class underflow_error;
-
- 19.1.1 Class logic_error [lib.logic.error]
-T class logic_error : public exception {
- public:
-T explicit logic_error(const string& what_arg);
- };
-
- 19.1.2 Class domain_error [lib.domain.error]
-
-T class domain_error : public logic_error {
- public:
-T explicit domain_error(const string& what_arg);
- };
-
- 19.1.3 Class invalid_argument [lib.invalid.argument]
-
-T class invalid_argument : public logic_error {
- public:
-T explicit invalid_argument(const string& what_arg);
- };
-
- 19.1.4 Class length_error [lib.length.error]
-
-T class length_error : public logic_error {
- public:
-T explicit length_error(const string& what_arg);
- };
-
- 19.1.5 Class out_of_range [lib.out.of.range]
-
-T class out_of_range : public logic_error {
- public:
-T explicit out_of_range(const string& what_arg);
- };
-
-
- 19.1.6 Class runtime_error [lib.runtime.error]
-
-T class runtime_error : public exception {
- public:
-T explicit runtime_error(const string& what_arg);
- };
-
-
- 19.1.7 Class range_error [lib.range.error]
-
-T class range_error : public runtime_error {
- public:
-T explicit range_error(const string& what_arg);
- };
-
- 19.1.8 Class overflow_error [lib.overflow.error]
-
-T class overflow_error : public runtime_error {
- public:
-T explicit overflow_error(const string& what_arg);
- };
-
-
- 19.1.9 Class underflow_error [lib.underflow.error]
-
-T class underflow_error : public runtime_error {
- public:
-T explicit underflow_error(const string& what_arg);
- };
-
-
- 19.2 Assertions [lib.assertions]
-
- Table 2--Header <cassert> synopsis
-
-X Macro: assert
-
- 19.3 Error numbers [lib.errno]
-
- Table 3--Header <cerrno> synopsis
-
-X |Macros: EDOM ERANGE errno |
-
-
- 20.2 Utility components [lib.utility]
-
- Header <utility> synopsis
-
- // _lib.operators_, operators:
-T namespace rel_ops {
-T template<class T> bool operator!=(const T&, const T&);
-T template<class T> bool operator> (const T&, const T&);
-T template<class T> bool operator<=(const T&, const T&);
-T template<class T> bool operator>=(const T&, const T&);
- }
- // _lib.pairs_, pairs:
-T template <class T1, class T2> struct pair;
-T template <class T1, class T2>
- bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2>
- bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2>
- bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2>
- bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2>
- bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2>
- bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
-T template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
-
-
- 20.2.2 Pairs [lib.pairs]
-
-T template <class T1, class T2>
- struct pair {
-T typedef T1 first_type;
-T typedef T2 second_type;
-
-T T1 first;
-T T2 second;
-T pair();
-T pair(const T1& x, const T2& y);
-T template<class U, class V> pair(const pair<U, V> &p);
- };
-
- 20.3 Function objects [lib.function.objects]
-
- Header <functional> synopsis
-
- // _lib.base_, base:
-V template <class Arg, class Result> struct unary_function;
-V template <class Arg1, class Arg2, class Result> struct binary_function;
-
- // _lib.arithmetic.operations_, arithmetic operations:
-V template <class T> struct plus;
-V template <class T> struct minus;
-V template <class T> struct multiplies;
-V template <class T> struct divides;
-V template <class T> struct modulus;
-V template <class T> struct negate;
- // _lib.comparisons_, comparisons:
-V template <class T> struct equal_to;
-V template <class T> struct not_equal_to;
-V template <class T> struct greater;
-V template <class T> struct less;
-V template <class T> struct greater_equal;
-V template <class T> struct less_equal;
- // _lib.logical.operations_, logical operations:
-V template <class T> struct logical_and;
-V template <class T> struct logical_or;
-V template <class T> struct logical_not;
- // _lib.negators_, negators:
- template <class Predicate> struct unary_negate;
-V template <class Predicate>
- unary_negate<Predicate> not1(const Predicate&);
-V template <class Predicate> struct binary_negate;
-V template <class Predicate>
- binary_negate<Predicate> not2(const Predicate&);
- // _lib.binders_, binders:
-V template <class Operation> class binder1st;
-V template <class Operation, class T>
- binder1st<Operation> bind1st(const Operation&, const T&);
-V template <class Operation> class binder2nd;
-V template <class Operation, class T>
- binder2nd<Operation> bind2nd(const Operation&, const T&);
- // _lib.function.pointer.adaptors_, adaptors:
-V template <class Arg, class Result> class pointer_to_unary_function;
-V template <class Arg, class Result>
- pointer_to_unary_function<Arg,Result> ptr_fun(Result (*)(Arg));
-V template <class Arg1, class Arg2, class Result>
- class pointer_to_binary_function;
-V template <class Arg1, class Arg2, class Result>
- pointer_to_binary_function<Arg1,Arg2,Result>
- ptr_fun(Result (*)(Arg1,Arg2));
-
- // _lib.member.pointer.adaptors_, adaptors:
-V template<class S, class T> class mem_fun_t;
-V template<class S, class T, class A> class mem_fun1_t;
-V template<class S, class T>
- mem_fun_t<S,T> mem_fun(S (T::*f)());
-V template<class S, class T, class A>
- mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));
-V template<class S, class T> class mem_fun_ref_t;
-V template<class S, class T, class A> class mem_fun1_ref_t;
-V template<class S, class T>
- mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)());
-V template<class S, class T, class A>
- mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));
-
-V template <class S, class T> class const_mem_fun_t;
-V template <class S, class T, class A> class const_mem_fun1_t;
-V template <class S, class T>
- const_mem_fun_t<S,T> mem_fun(S (T::*f)() const);
-V template <class S, class T, class A>
- const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);
-V template <class S, class T> class const_mem_fun_ref_t;
-V template <class S, class T, class A> class const_mem_fun1_ref_t;
-V template <class S, class T>
- const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
-V template <class S, class T, class A>
- const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
- }
-
- 20.3.1 Base [lib.base]
-
-V template <class Arg, class Result>
- struct unary_function {
-V typedef Arg argument_type;
-V typedef Result result_type;
- };
-V template <class Arg1, class Arg2, class Result>
- struct binary_function {
-V typedef Arg1 first_argument_type;
-V typedef Arg2 second_argument_type;
-V typedef Result result_type;
- };
-
- 20.3.2 Arithmetic operations [lib.arithmetic.operations]
-
-T template <class T> struct plus : binary_function<T,T,T> {
-V T operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct minus : binary_function<T,T,T> {
-V T operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct multiplies : binary_function<T,T,T> {
-V T operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct divides : binary_function<T,T,T> {
-V T operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct modulus : binary_function<T,T,T> {
-V T operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct negate : unary_function<T,T> {
-V T operator()(const T& x) const;
- };
-
- 20.3.3 Comparisons [lib.comparisons]
-
-T template <class T> struct equal_to : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct not_equal_to : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct greater : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct less : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct greater_equal : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct less_equal : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
- 20.3.4 Logical operations [lib.logical.operations]
-
-T template <class T> struct logical_and : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct logical_or : binary_function<T,T,bool> {
-V bool operator()(const T& x, const T& y) const;
- };
-
-T template <class T> struct logical_not : unary_function<T,bool> {
-V bool operator()(const T& x) const;
- };
-
- 20.3.5 Negators [lib.negators]
-
-T template <class Predicate>
- class unary_negate
- : public unary_function<typename Predicate::argument_type,bool> {
- public:
-T explicit unary_negate(const Predicate& pred);
-V bool operator()(const typename Predicate::argument_type& x) const;
- };
-
-T template <class Predicate>
- class binary_negate
- : public binary_function<typename Predicate::first_argument_type,
- typename Predicate::second_argument_type, bool> {
- public:
-T explicit binary_negate(const Predicate& pred);
-V bool operator()(const typename Predicate::first_argument_type& x,
- const typename Predicate::second_argument_type& y) const;
- };
-
-
- 20.3.6 Binders [lib.binders]
-
- 20.3.6.1 Template class binder1st [lib.binder.1st]
-T template <class Operation>
- class binder1st
- : public unary_function<typename Operation::second_argument_type,
- typename Operation::result_type> {
- protected:
-T Operation op;
-T typename Operation::first_argument_type value;
- public:
-V binder1st(const Operation& x,
- const typename Operation::first_argument_type& y);
-V typename Operation::result_type
- operator()(const typename Operation::second_argument_type& x) const;
- };
-
- 20.3.6.2 bind1st [lib.bind.1st]
-
-V template <class Operation, class T>
- binder1st<Operation> bind1st(const Operation& op, const T& x);
-
- 20.3.6.3 Template class binder2nd [lib.binder.2nd]
-T template <class Operation>
- class binder2nd
- : public unary_function<typename Operation::first_argument_type,
- typename Operation::result_type> {
- protected:
-T Operation op;
-T typename Operation::second_argument_type value;
- public:
-V binder2nd(const Operation& x,
- const typename Operation::second_argument_type& y);
-V typename Operation::result_type
- operator()(const typename Operation::first_argument_type& x) const;
- };
-
- 20.3.6.4 bind2nd [lib.bind.2nd]
-
-T template <class Operation, class T>
- binder2nd<Operation> bind2nd(const Operation& op, const T& x);
-
-
- 20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors]
- functions
-
- 1 To allow pointers to (unary and binary) functions to work with func-
- tion adaptors the library provides:
-
-T template <class Arg, class Result>
- class pointer_to_unary_function : public unary_function<Arg, Result> {
- public:
-T explicit pointer_to_unary_function(Result (*f)(Arg));
-V Result operator()(Arg x) const;
- };
-
-T template <class Arg, class Result>
- pointer_to_unary_function<Arg, Result> ptr_fun(Result (*f)(Arg));
-
-T template <class Arg1, class Arg2, class Result>
- class pointer_to_binary_function :
- public binary_function<Arg1,Arg2,Result> {
- public:
-T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
-V Result operator()(Arg1 x, Arg2 y) const;
- };
-
-
- 20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors]
- members
-
-T template <class S, class T> class mem_fun_t
- : public unary_function<T*, S> {
- public:
-T explicit mem_fun_t(S (T::*p)());
-V S operator()(T* p) const;
- };
-
-T template <class S, class T, class A> class mem_fun1_t
- : public binary_function<T*, A, S> {
- public:
-T explicit mem_fun1_t(S (T::*p)(A));
-V S operator()(T* p, A x) const;
- };
-
-V template<class S, class T> mem_fun_t<S,T>
- mem_fun(S (T::*f)());
-V template<class S, class T, class A> mem_fun1_t<S,T,A>
- mem_fun(S (T::*f)(A));
-
-T template <class S, class T> class mem_fun_ref_t
- : public unary_function<T, S> {
- public:
-T explicit mem_fun_ref_t(S (T::*p)());
-V S operator()(T& p) const;
- };
-
-T template <class S, class T, class A> class mem_fun1_ref_t
- : public binary_function<T, A, S> {
- public:
-T explicit mem_fun1_ref_t(S (T::*p)(A));
-V S operator()(T& p, A x) const;
- };
-
-T template<class S, class T> mem_fun_ref_t<S,T>
- mem_fun_ref(S (T::*f)());
-
-T template<class S, class T, class A> mem_fun1_ref_t<S,T,A>
- mem_fun_ref(S (T::*f)(A));
-
-T template <class S, class T> class const_mem_fun_t
- : public unary_function<T*, S> {
- public:
-T explicit const_mem_fun_t(S (T::*p)() const);
-V S operator()(const T* p) const;
- };
-
-T template <class S, class T, class A> class const_mem_fun1_t
- : public binary_function<T*, A, S> {
- public:
-T explicit const mem_fun1_t(S (T::*p)(A) const);
-V S operator()(const T* p, A x) const;
- };
-
-V template<class S, class T> const_mem_fun_t<S,T>
- mem_fun(S (T::*f)() const);
-V template<class S, class T, class A> const_mem_fun1_t<S,T,A>
- mem_fun(S (T::*f)(A) const);
-
-T template <class S, class T> class const_mem_fun_ref_t
- : public unary_function<T, S> {
- public:
-T explicit const_mem_fun_ref_t(S (T::*p)() const);
-V S operator()(const T& p) const;
- };
-
-T template <class S, class T, class A> class const_mem_fun1_ref_t
- : public binary_function<T, A, S> {
- public:
-T explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
-V S operator()(const T& p, A x) const;
- };
-
-T template<class S, class T> const_mem_fun_ref_t<S,T>
- mem_fun_ref(S (T::*f)() const);
-
-T template<class S, class T, class A> const_mem_fun1_ref_t<S,T,A>
- mem_fun_ref(S (T::*f)(A) const);
-
- 20.4 Memory [lib.memory]
-
- Header <memory> synopsis
-
- // _lib.default.allocator_, the default allocator:
-T template <class T> class allocator;
-T template <> class allocator<void>;
-T template <class T, class U>
- bool operator==(const allocator<T>&, const allocator<U>&) throw();
-T template <class T, class U>
- bool operator!=(const allocator<T>&, const allocator<U>&) throw();
- // _lib.storage.iterator_, raw storage iterator:
-T template <class OutputIterator, class T> class raw_storage_iterator;
- // _lib.temporary.buffer_, temporary buffers:
-T template <class T>
- pair<T*,ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
-T template <class T>
- void return_temporary_buffer(T* p);
- // _lib.specialized.algorithms_, specialized algorithms:
-T template <class InputIterator, class ForwardIterator>
- ForwardIterator
- uninitialized_copy(InputIterator first, InputIterator last,
- ForwardIterator result);
-T template <class ForwardIterator, class T>
- void uninitialized_fill(ForwardIterator first, ForwardIterator last,
- const T& x);
-T template <class ForwardIterator, class Size, class T>
- void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
- // _lib.auto.ptr_, pointers:
-X template<class X> class auto_ptr;
- }
-
- 20.4.1 The default allocator [lib.default.allocator]
-
-T template <class T> class allocator;
- // specialize for void:
-T template <> class allocator<void> {
- public:
-T typedef void* pointer;
-T typedef const void* const_pointer;
- // reference-to-void members are impossible.
-T typedef void value_type;
-T template <class U> struct rebind { typedef allocator<U> other; };
- };
-
-T template <class T> class allocator {
- public:
-T typedef size_t size_type;
-T typedef ptrdiff_t difference_type;
-T typedef T* pointer;
-T typedef const T* const_pointer;
-T typedef T& reference;
-T typedef const T& const_reference;
-T typedef T value_type;
-T template <class U> struct rebind { typedef allocator<U> other; };
-T allocator() throw();
-T allocator(const allocator&) throw();
-T template <class U> allocator(const allocator<U>&) throw();
-T ~allocator() throw();
-T pointer address(reference x) const;
-T const_pointer address(const_reference x) const;
-T pointer allocate(
- size_type, allocator<void>::const_pointer hint = 0);
-T void deallocate(pointer p, size_type n);
-T size_type max_size() const throw();
-T void construct(pointer p, const T& val);
-T void destroy(pointer p);
- };
-
- 20.4.1.2 allocator globals [lib.allocator.globals]
-
-T template <class T1, class T2>
- bool operator==(const allocator<T1>&, const allocator<T2>&) throw();
-T template <class T1, class T2>
- bool operator!=(const allocator<T1>&, const allocator<T2>&) throw();
-
- 20.4.2 Raw storage iterator [lib.storage.iterator]
-
-T template <class OutputIterator, class T>
- class raw_storage_iterator
- : public iterator<output_iterator_tag,void,void,void,void> {
- public:
-T explicit raw_storage_iterator(OutputIterator x);
-T raw_storage_iterator<OutputIterator,T>& operator*();
-T raw_storage_iterator<OutputIterator,T>& operator=(const T& element);
-T raw_storage_iterator<OutputIterator,T>& operator++();
-T raw_storage_iterator<OutputIterator,T> operator++(int);
- };
-
- 20.4.3 Temporary buffers [lib.temporary.buffer]
-
-T template <class T>
- pair<T*, ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
-
-T template <class T> void return_temporary_buffer(T* p);
-
- 20.4.4 Specialized algorithms [lib.specialized.algorithms]
-
- 20.4.4.1 uninitialized_copy [lib.uninitialized.copy]
-
-V template <class InputIterator, class ForwardIterator>
- ForwardIterator
- uninitialized_copy(InputIterator first, InputIterator last,
- ForwardIterator result);
-
- 20.4.4.2 uninitialized_fill [lib.uninitialized.fill]
-
-V template <class ForwardIterator, class T>
- void uninitialized_fill(ForwardIterator first, ForwardIterator last,
- const T& x);
-
- 20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n]
-
-V template <class ForwardIterator, class Size, class T>
- void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
-
- 20.4.5 Template class auto_ptr [lib.auto.ptr]
-
-X template<class X> class auto_ptr {
- template <class Y> struct auto_ptr_ref {};
- public:
-T typedef X element_type;
- // _lib.auto.ptr.cons_ construct/copy/destroy:
-T explicit auto_ptr(X* p =0) throw();
-T auto_ptr(auto_ptr&) throw();
-T template<class Y> auto_ptr(auto_ptr<Y>&) throw();
-T auto_ptr& operator=(auto_ptr&) throw();
-T template<class Y> auto_ptr& operator=(auto_ptr<Y>&) throw();
-T ~auto_ptr() throw();
- // _lib.auto.ptr.members_ members:
-T X& operator*() const throw();
-T X* operator->() const throw();
-T X* get() const throw();
-T X* release() throw();
-T void reset(X* p =0) throw();
-
- // _lib.auto.ptr.conv_ conversions:
-X auto_ptr(auto_ptr_ref<X>) throw();
-X template<class Y> operator auto_ptr_ref<Y>() throw();
-X template<class Y> operator auto_ptr<Y>() throw();
- };
-
- 20.4.6 C Library [lib.c.malloc]
-
- Table 7--Header <cstdlib> synopsis
-
-X Functions: calloc malloc
- free realloc
-
-
- Table 8--Header <cstring> synopsis
-
-X Macro: NULL
-X Type: size_t
-X Functions: memchr memcmp
-X memcpy memmove memset
-
- Table 9--Header <ctime> synopsis
-
-X Macros: NULL
-X Types: size_t clock_t time_t
-X Struct: tm
- Functions:
-X asctime clock difftime localtime strftime
-X ctime gmtime mktime time
-
- 21.1.1 Character traits requirements [lib.char.traits.require]
-
- 2 The struct template
-T template<class charT> struct char_traits;
- shall be provided in the header <string> as a basis for explicit spe-
- cializations.
-
-
- 21.1.3.1 struct [lib.char.traits.specializations.char]
- char_traits<char>
-
-T template<>
- struct char_traits<char> {
-T typedef char char_type;
-T typedef int int_type;
-T typedef streamoff off_type;
-T typedef streampos pos_type;
-T typedef mbstate_t state_type;
-
-T static void assign(char_type& c1, const char_type& c2);
-T static bool eq(const char_type& c1, const char_type& c2);
-T static bool lt(const char_type& c1, const char_type& c2);
-
-T static int compare(const char_type* s1, const char_type* s2, size_t n);
-T static size_t length(const char_type* s);
-T static const char_type* find(const char_type* s, size_t n,
- const char_type& a);
-T static char_type* move(char_type* s1, const char_type* s2, size_t n);
-T static char_type* copy(char_type* s1, const char_type* s2, size_t n);
-T static char_type* assign(char_type* s, size_t n, char_type a);
-
-T static int_type not_eof(const int_type& c);
-T static char_type to_char_type(const int_type& c);
-T static int_type to_int_type(const char_type& c);
-T static bool eq_int_type(const int_type& c1, const int_type& c2);
-T static int_type eof();
- };
-
- 21.1.3.2 struct [lib.char.traits.specializations.wchar.t]
- char_traits<wchar_t>
-
-V template<>
- struct char_traits<wchar_t> {
-V typedef wchar_t char_type;
-V typedef wint_t int_type;
-V typedef streamoff off_type;
-V typedef wstreampos pos_type;
-V typedef mbstate_t state_type;
-
-V static void assign(char_type& c1, const char_type& c2);
-V static bool eq(const char_type& c1, const char_type& c2);
-V static bool lt(const char_type& c1, const char_type& c2);
-
-V static int compare(const char_type* s1, const char_type* s2, size_t n);
-V static size_t length(const char_type* s);
-V static const char_type* find(const char_type* s, size_t n,
- const char_type& a);
-V static char_type* move(char_type* s1, const char_type* s2, size_t n);
-V static char_type* copy(char_type* s1, const char_type* s2, size_t n);
-V static char_type* assign(char_type* s, size_t n, char_type a);
-
-V static int_type not_eof(const int_type& c);
-V static char_type to_char_type(const int_type& c);
-V static int_type to_int_type(const char_type& c);
-V static bool eq_int_type(const int_type& c1, const int_type& c2);
-V static int_type eof();
- };
-
- 21.2 String classes [lib.string.classes]
-
- // _lib.char.traits_, character traits:
-V template<class charT>
- struct char_traits;
-V template <> struct char_traits<char>;
-V template <> struct char_traits<wchar_t>;
-
- // _lib.basic.string_, basic_string:
-V template<class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_string;
-V template<class charT, class traits, class Allocator>
- basic_string<charT,traits,Allocator>
- operator+(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- basic_string<charT,traits,Allocator>
- operator+(const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- basic_string<charT,traits,Allocator>
- operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- basic_string<charT,traits,Allocator>
- operator+(const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- basic_string<charT,traits,Allocator>
- operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs);
-
-V template<class charT, class traits, class Allocator>
- bool operator==(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator==(const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator==(const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator!=(const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator< (const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator< (const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator< (const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator> (const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator> (const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator> (const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator<=(const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
- const charT* rhs);
-V template<class charT, class traits, class Allocator>
- bool operator>=(const charT* lhs,
- const basic_string<charT,traits,Allocator>& rhs);
-
- // _lib.string.special_:
-V template<class charT, class traits, class Allocator>
- void swap(basic_string<charT,traits,Allocator>& lhs,
- basic_string<charT,traits,Allocator>& rhs);
-V template<class charT, class traits, class Allocator>
- basic_istream<charT,traits>&
- operator>>(basic_istream<charT,traits>& is,
- basic_string<charT,traits,Allocator>& str);
-T template<class charT, class traits, class Allocator>
- basic_ostream<charT, traits>&
- operator<<(basic_ostream<charT, traits>& os,
- const basic_string<charT,traits,Allocator>& str);
-V template<class charT, class traits, class Allocator>
- basic_istream<charT,traits>&
- getline(basic_istream<charT,traits>& is,
- basic_string<charT,traits,Allocator>& str,
- charT delim);
-V template<class charT, class traits, class Allocator>
- basic_istream<charT,traits>&
- getline(basic_istream<charT,traits>& is,
- basic_string<charT,traits,Allocator>& str);
-V typedef basic_string<char> string;
-T typedef basic_string<wchar_t> wstring;
- }
-
- 21.3 Template class basic_string [lib.basic.string]
-
-V namespace std {
- template<class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_string {
- public:
- // types:
- typedef traits traits_type;
- typedef typename traits::char_type value_type;
- typedef Allocator allocator_type;
- typedef typename Allocator::size_type size_type;
- typedef typename Allocator::difference_type difference_type;
- typedef typename Allocator::reference reference;
- typedef typename Allocator::const_reference const_reference;
- typedef typename Allocator::pointer pointer;
- typedef typename Allocator::const_pointer const_pointer;
- typedef implementation defined iterator;
- typedef implementation defined const_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- static const size_type npos = -1;
-
- // _lib.string.cons_ construct/copy/destroy:
-V explicit basic_string(const Allocator& a = Allocator());
-V basic_string(const basic_string& str, size_type pos = 0,
- size_type n = npos, const Allocator& a = Allocator());
-V basic_string(const charT* s,
- size_type n, const Allocator& a = Allocator());
-V basic_string(const charT* s, const Allocator& a = Allocator());
-V basic_string(size_type n, charT c, const Allocator& a = Allocator());
-V template<class InputIterator>
- basic_string(InputIterator begin, InputIterator end,
- const Allocator& a = Allocator());
-V ~basic_string();
-V basic_string& operator=(const basic_string& str);
-V basic_string& operator=(const charT* s);
-V basic_string& operator=(charT c);
- // _lib.string.iterators_ iterators:
-V iterator begin();
-V const_iterator begin() const;
-V iterator end();
-V const_iterator end() const;
-
-V reverse_iterator rbegin();
-V const_reverse_iterator rbegin() const;
-V reverse_iterator rend();
-V const_reverse_iterator rend() const;
- // _lib.string.capacity_ capacity:
-V size_type size() const;
-V size_type length() const;
-V size_type max_size() const;
-V void resize(size_type n, charT c);
-V void resize(size_type n);
-V size_type capacity() const;
-V void reserve(size_type res_arg = 0);
-V void clear();
-V bool empty() const;
- // _lib.string.access_ element access:
-V const_reference operator[](size_type pos) const;
-V reference operator[](size_type pos);
-V const_reference at(size_type n) const;
-V reference at(size_type n);
- // _lib.string.modifiers_ modifiers:
-V basic_string& operator+=(const basic_string& str);
-V basic_string& operator+=(const charT* s);
-V basic_string& operator+=(charT c);
-V basic_string& append(const basic_string& str);
-V basic_string& append(const basic_string& str, size_type pos,
- size_type n);
-V basic_string& append(const charT* s, size_type n);
-V basic_string& append(const charT* s);
-V basic_string& append(size_type n, charT c);
-V template<class InputIterator>
- basic_string& append(InputIterator first, InputIterator last);
-V void push_back(const charT);
-
-V basic_string& assign(const basic_string&);
-V basic_string& assign(const basic_string& str, size_type pos,
- size_type n);
-V basic_string& assign(const charT* s, size_type n);
-V basic_string& assign(const charT* s);
-V basic_string& assign(size_type n, charT c);
-V template<class InputIterator>
- basic_string& assign(InputIterator first, InputIterator last);
-V basic_string& insert(size_type pos1, const basic_string& str);
-V basic_string& insert(size_type pos1, const basic_string& str,
- size_type pos2, size_type n);
-V basic_string& insert(size_type pos, const charT* s, size_type n);
-V basic_string& insert(size_type pos, const charT* s);
-V basic_string& insert(size_type pos, size_type n, charT c);
-V iterator insert(iterator p, charT c);
-V void insert(iterator p, size_type n, charT c);
-V template<class InputIterator>
- void insert(iterator p, InputIterator first, InputIterator last);
-V basic_string& erase(size_type pos = 0, size_type n = npos);
-V iterator erase(iterator position);
-V iterator erase(iterator first, iterator last);
-V basic_string& replace(size_type pos1, size_type n1,
- const basic_string& str);
-V basic_string& replace(size_type pos1, size_type n1,
- const basic_string& str,
- size_type pos2, size_type n2);
-V basic_string& replace(size_type pos, size_type n1, const charT* s,
- size_type n2);
-V basic_string& replace(size_type pos, size_type n1, const charT* s);
-V basic_string& replace(size_type pos, size_type n1, size_type n2,
- charT c);
-V basic_string& replace(iterator i1, iterator i2, const basic_string& str);
-V basic_string& replace(iterator i1, iterator i2, const charT* s,
- size_type n);
-V basic_string& replace(iterator i1, iterator i2, const charT* s);
-V basic_string& replace(iterator i1, iterator i2,
- size_type n, charT c);
-V template<class InputIterator>
- basic_string& replace(iterator i1, iterator i2,
- InputIterator j1, InputIterator j2);
-V size_type copy(charT* s, size_type n, size_type pos = 0) const;
-V void swap(basic_string<charT,traits,Allocator>&);
- // _lib.string.ops_ string operations:
-V const charT* c_str() const; // explicit
-V const charT* data() const;
-V allocator_type get_allocator() const;
-V size_type find (const basic_string& str, size_type pos = 0) const;
-V size_type find (const charT* s, size_type pos, size_type n) const;
-V size_type find (const charT* s, size_type pos = 0) const;
-V size_type find (charT c, size_type pos = 0) const;
-V size_type rfind(const basic_string& str, size_type pos = npos) const;
-V size_type rfind(const charT* s, size_type pos, size_type n) const;
-V size_type rfind(const charT* s, size_type pos = npos) const;
-V size_type rfind(charT c, size_type pos = npos) const;
-
-V size_type find_first_of(const basic_string& str,
- size_type pos = 0) const;
-V size_type find_first_of(const charT* s,
- size_type pos, size_type n) const;
-V size_type find_first_of(const charT* s, size_type pos = 0) const;
-V size_type find_first_of(charT c, size_type pos = 0) const;
-V size_type find_last_of (const basic_string& str,
- size_type pos = npos) const;
-V size_type find_last_of (const charT* s,
- size_type pos, size_type n) const;
-V size_type find_last_of (const charT* s, size_type pos = npos) const;
-V size_type find_last_of (charT c, size_type pos = npos) const;
-V size_type find_first_not_of(const basic_string& str,
- size_type pos = 0) const;
-V size_type find_first_not_of(const charT* s, size_type pos,
- size_type n) const;
-V size_type find_first_not_of(const charT* s, size_type pos = 0) const;
-V size_type find_first_not_of(charT c, size_type pos = 0) const;
-V size_type find_last_not_of (const basic_string& str,
- size_type pos = npos) const;
-V size_type find_last_not_of (const charT* s, size_type pos,
- size_type n) const;
-V size_type find_last_not_of (const charT* s,
- size_type pos = npos) const;
-V size_type find_last_not_of (charT c, size_type pos = npos) const;
-V basic_string substr(size_type pos = 0, size_type n = npos) const;
-V int compare(const basic_string& str) const;
-V int compare(size_type pos1, size_type n1,
- const basic_string& str) const;
-V int compare(size_type pos1, size_type n1,
- const basic_string& str,
- size_type pos2, size_type n2) const;
-V int compare(const charT* s) const;
-V int compare(size_type pos1, size_type n1,
- const charT* s, size_type n2 = npos) const;
- };
- }
-
- 21.4 Null-terminated sequence utilities [lib.c.strings]
-
- Table 10--Header <cctype> synopsis
-
- isalnum isdigit isprint isupper tolower
-X isalpha isgraph ispunct isxdigit toupper
- iscntrl islower isspace
-
- Table 11--Header <cwctype> synopsis
-
-X Macro: WEOF <cwctype>
-X Types: wctrans_t wctype_t wint_t <cwctype>
- Functions:
-X iswalnum iswctype iswlower iswspace towctrans wctrans
-X iswalpha iswdigit iswprint iswupper towlower wctype
-X iswcntrl iswgraph iswpunct iswxdigit towupper
-
- Table 12--Header <cstring> synopsis
-
-X Macro: NULL <cstring>
-X Type: size_t <cstring>
- Functions:
-X memchr strcat strcspn strncpy strtok
-X memcmp strchr strerror strpbrk strxfrm
-X memcpy strcmp strlen strrchr
-X memmove strcoll strncat strspn
-X memset strcpy strncmp strstr
-
- Table 13--Header <cwchar> synopsis
- Macros: NULL <cwchar> WCHAR_MAX WCHAR_MIN WEOF <cwchar>
- Types: mbstate_t wint_t <cwchar> size_t
- Functions:
-X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr
-X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp
-X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy
-X fputwc mbsinit vwprintf wcslen wcstod wmemmove
-X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset
-X fwide putwc wcscat wcsncmp wcstol wprintf
-X fwprintf putwchar wcschr wcsncpy wcstoul wscanf
-X fwscanf swprintf wcscmp wcspbrk wcsxfrm
-X getwc swscanf wcscoll wcsrchr wctob
-
- Table 14--Header <cstdlib> synopsis
-
- Macros: MB_CUR_MAX
- Functions:
-X atol mblen strtod wctomb
-X atof mbstowcs strtol wcstombs
-X atoi mbtowc strtoul
-
-X const char* strchr(const char* s, int c);
-X char* strchr( char* s, int c);
-
-X const char* strpbrk(const char* s1, const char* s2);
-X char* strpbrk( char* s1, const char* s2);
-
-X const char* strrchr(const char* s, int c);
-X char* strrchr( char* s, int c);
-
-X const char* strstr(const char* s1, const char* s2);
-X char* strstr( char* s1, const char* s2);
-
-X const void* memchr(const void* s, int c, size_t n);
-X void* memchr( void* s, int c, size_t n);
-
-X const wchar_t* wcschr(const wchar_t* s, wchar_t c);
-X wchar_t* wcschr( wchar_t* s, wchar_t c);
-
-X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
-X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
-
-X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
-X wchar_t* wcsrchr( wchar_t* s, wchar_t c);
-
-X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
-X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
-
-X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
-X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
-
- [for initial efforts on the above, see shadow/string.h]
-
- 22.1 Locales [lib.locales]
-
- Header <locale> synopsis
-
- // _lib.locale_, locale:
-T class locale;
-T template <class Facet> const Facet& use_facet(const locale&);
-T template <class Facet> bool has_facet(const locale&) throw();
-
- // _lib.locale.convenience_, convenience interfaces:
-T template <class charT> bool isspace (charT c, const locale& loc);
-T template <class charT> bool isprint (charT c, const locale& loc);
-T template <class charT> bool iscntrl (charT c, const locale& loc);
-T template <class charT> bool isupper (charT c, const locale& loc);
-T template <class charT> bool islower (charT c, const locale& loc);
-T template <class charT> bool isalpha (charT c, const locale& loc);
-T template <class charT> bool isdigit (charT c, const locale& loc);
-T template <class charT> bool ispunct (charT c, const locale& loc);
-T template <class charT> bool isxdigit(charT c, const locale& loc);
-T template <class charT> bool isalnum (charT c, const locale& loc);
-T template <class charT> bool isgraph (charT c, const locale& loc);
-T template <class charT> charT toupper(charT c, const locale& loc);
-T template <class charT> charT tolower(charT c, const locale& loc);
- // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
- class ctype_base;
-T template <class charT> class ctype;
-T template <> class ctype<char>; // specialization
-S template <class charT> class ctype_byname;
-S template <> class ctype_byname<char>; // specialization
-T class codecvt_base;
-X template <class internT, class externT, class stateT> class codecvt;
-S template <class internT, class externT, class stateT> class codecvt_byname;
- // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
-X template <class charT, class InputIterator> class num_get;
-X template <class charT, class OutputIterator> class num_put;
-T template <class charT> class numpunct;
-S template <class charT> class numpunct_byname;
- // _lib.category.collate_, collation:
-T template <class charT> class collate;
-S template <class charT> class collate_byname;
- // _lib.category.time_, date and time:
-T class time_base;
-S template <class charT, class InputIterator> class time_get;
-S template <class charT, class InputIterator> class time_get_byname;
-S template <class charT, class OutputIterator> class time_put;
-S template <class charT, class OutputIterator> class time_put_byname;
- // _lib.category.monetary_, money:
-T class money_base;
-S template <class charT, class InputIterator> class money_get;
-S template <class charT, class OutputIterator> class money_put;
-S template <class charT, bool Intl> class moneypunct;
-S template <class charT, bool Intl> class moneypunct_byname;
- // _lib.category.messages_, message retrieval:
-T class messages_base;
-S template <class charT> class messages;
-S template <class charT> class messages_byname;
-
-
- 22.1.1 Class locale [lib.locale]
-
-X class locale {
- public:
- // types:
-T class facet;
-T class id;
-T typedef int category;
-T static const category // values assigned here are for exposition only
-T none = 0,
-T collate = 0x010, ctype = 0x020,
-T monetary = 0x040, numeric = 0x080,
-T time = 0x100, messages = 0x200,
-T all = collate | ctype | monetary | numeric | time | messages;
- // construct/copy/destroy:
-T locale() throw()
-T locale(const locale& other) throw()
-X explicit locale(const char* std_name);
-X locale(const locale& other, const char* std_name, category);
-T template <class Facet> locale(const locale& other, Facet* f);
-T locale(const locale& other, const locale& one, category);
-T ~locale() throw(); // non-virtual
-T const locale& operator=(const locale& other) throw();
-T template <class Facet> locale combine(const locale& other) const;
- // locale operations:
-X basic_string<char> name() const;
-T bool operator==(const locale& other) const;
-T bool operator!=(const locale& other) const;
-T template <class charT, class Traits, class Allocator>
- bool operator()(const basic_string<charT,Traits,Allocator>& s1,
- const basic_string<charT,Traits,Allocator>& s2) const;
- // global locale objects:
-T static locale global(const locale&);
-T static const locale& classic();
- };
-
- 22.1.1.1 locale types [lib.locale.types]
-
- 22.1.1.1.1 Type locale::category [lib.locale.category]
-
-T typedef int category;
-
-T none, collate, ctype, monetary, numeric, time, and messages
-
- [required locale members]
-T collate<char>, collate<wchar_t>
-T ctype<char>, ctype<wchar_t>
-T codecvt<char,char,mbstate_t>,
-S codecvt<wchar_t,char,mbstate_t>
-T moneypunct<char>, moneypunct<wchar_t>
-T moneypunct<char,true>, moneypunct<wchar_t,true>,
-S money_get<char>, money_get<wchar_t
-S money_put<char>, money_put<wchar_t>
-T numpunct<char>, numpunct<wchar_t>,
-X num_get<char>, num_get<wchar_t>
-X num_put<char>, num_put<wchar_t>
-S time_get<char>, time_get<wchar_t>,
-S time_put<char>, time_put<wchar_t>
-S messages<char>, messages<wchar_t>
-
- [required instantiations]
-S collate_byname<char>, collate_byname<wchar_t>
-S ctype_byname<char>, ctype_byname<wchar_t>
-S codecvt_byname<char,char,mbstate_t>,
-S codecvt_byname<wchar_t,char,mbstate_t>
-S moneypunct_byname<char,International>,
-S moneypunct_byname<wchar_t,International>,
-S money_get<C,InputIterator>,
-S money_put<C,OutputIterator>
-S numpunct_byname<char>, numpunct_byname<wchar_t>
-X num_get<C,InputIterator>, num_put<C,OutputIterator>
-S time_get<char,InputIterator>,
-S time_get_byname<char,InputIterator>,
-S time_get<wchar_t,OutputIterator>,
-S time_get_byname<wchar_t,OutputIterator>,
-S time_put<char,OutputIterator>,
-S time_put_byname<char,OutputIterator>,
-S time_put<wchar_t,OutputIterator>
-S time_put_byname<wchar_t,OutputIterator>
-S messages_byname<char>, messages_byname<wchar_t>
-
-
- 22.1.1.1.2 Class locale::facet [lib.locale.facet]
-
-T class locale::facet {
- protected:
-T explicit facet(size_t refs = 0);
-T virtual ~facet();
- private:
-T facet(const facet&); // not defined
-T void operator=(const facet&); // not defined
- };
- }
-
-
- 22.1.1.1.3 Class locale::id [lib.locale.id]
-
-T class locale::id {
- public:
-T id();
- private:
-T void operator=(const id&); // not defined
-T id(const id&); // not defined
- };
- }
-
-
- 22.2.1 The ctype category [lib.category.ctype]
-
-T class ctype_base {
- public:
-T enum mask { // numeric values are for exposition only.
-T space=, print=, cntrl=, upper=, lower=,
-T alpha=, digit=, punct=, xdigit=,
-T alnum=, graph=
- };
- };
-
-
- 22.2.1.1 Template class ctype [lib.locale.ctype]
-
-T template <class charT>
- class ctype : public locale::facet, public ctype_base {
- public:
-T typedef charT char_type;
-T explicit ctype(size_t refs = 0);
-T bool is(mask m, charT c) const;
-T const charT* is(const charT* low, const charT* high, mask* vec) const;
-T const charT* scan_is(mask m,
- const charT* low, const charT* high) const;
-T const charT* scan_not(mask m,
- const charT* low, const charT* high) const;
-T charT toupper(charT c) const;
-T const charT* toupper(charT* low, const charT* high) const;
-T charT tolower(charT c) const;
-T const charT* tolower(charT* low, const charT* high) const;
-T charT widen(char c) const;
-T const char* widen(const char* low, const char* high, charT* to) const;
-T char narrow(charT c, char dfault) const;
-T const charT* narrow(const charT* low, const charT*, char dfault,
- char* to) const;
-T static locale::id id;
-
- protected:
-T ~ctype(); // virtual
-T virtual bool do_is(mask m, charT c) const;
-T virtual const charT* do_is(const charT* low, const charT* high,
- mask* vec) const;
-T virtual const charT* do_scan_is(mask m,
- const charT* low, const charT* high) const;
-T virtual const charT* do_scan_not(mask m,
- const charT* low, const charT* high) const;
-T virtual charT do_toupper(charT) const;
-T virtual const charT* do_toupper(charT* low, const charT* high) const;
-T virtual charT do_tolower(charT) const;
-T virtual const charT* do_tolower(charT* low, const charT* high) const;
-T virtual charT do_widen(char) const;
-T virtual const char* do_widen(const char* low, const char* high,
- charT* dest) const;
-T virtual char do_narrow(charT, char dfault) const;
-T virtual const charT* do_narrow(const charT* low, const charT* high,
- char dfault, char* dest) const;
- };
-
-
- 22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname]
-
-X template <class charT>
- class ctype_byname : public ctype<charT> {
- public:
-T typedef ctype<charT>::mask mask;
-S explicit ctype_byname(const char*, size_t refs = 0);
- protected:
-S ~ctype_byname(); // virtual
-S virtual bool do_is(mask m, charT c) const;
-S virtual const charT* do_is(const charT* low, const charT* high,
- mask* vec) const;
-S virtual const char* do_scan_is(mask m,
- const charT* low, const charT* high) const;
-S virtual const char* do_scan_not(mask m,
- const charT* low, const charT* high) const;
-S virtual charT do_toupper(charT) const;
-S virtual const charT* do_toupper(charT* low, const charT* high) const;
-S virtual charT do_tolower(charT) const;
-S virtual const charT* do_tolower(charT* low, const charT* high) const;
-S virtual charT do_widen(char) const;
-S virtual const char* do_widen(const char* low, const char* high,
- charT* dest) const;
-S virtual char do_narrow(charT, char dfault) const;
-S virtual const charT* do_narrow(const charT* low, const charT* high,
- char dfault, char* dest) const;
- };
-
- 22.2.1.3 ctype specializations [lib.facet.ctype.special]
-
-T template <> class ctype<char>
- : public locale::facet, public ctype_base {
- public:
-T typedef char char_type;
-T explicit ctype(const mask* tab = 0, bool del = false,
- size_t refs = 0);
-T bool is(mask m, char c) const;
-T const char* is(const char* low, const char* high, mask* vec) const;
-T const char* scan_is (mask m,
- const char* low, const char* high) const;
-T const char* scan_not(mask m,
- const char* low, const char* high) const;
-T char toupper(char c) const;
-T const char* toupper(char* low, const char* high) const;
-T char tolower(char c) const;
-T const char* tolower(char* low, const char* high) const;
-T char widen(char c) const;
-T const char* widen(const char* low, const char* high, char* to) const;
-T char narrow(char c, char dfault) const;
-T const char* narrow(const char* low, const char* high, char dfault,
- char* to) const;
-T static locale::id id;
-T static const size_t table_size = IMPLEMENTATION_DEFINED;
-
- protected:
-T const mask* table() const throw();
-T static const mask* classic_table() throw();
-T ~ctype(); // virtual
-T virtual char do_toupper(char c) const;
-T virtual const char* do_toupper(char* low, const char* high) const;
-T virtual char do_tolower(char c) const;
-T virtual const char* do_tolower(char* low, const char* high) const;
-
-T virtual char do_widen(char c) const;
-T virtual const char* do_widen(const char* low,
- const char* high,
- char* to) const;
-T virtual char do_narrow(char c, char dfault) const;
-T virtual const char* do_narrow(const char* low,
- const char* high,
- char dfault, char* to) const;
- };
-
-
- 22.2.1.4 Class [lib.locale.ctype.byname.special]
- ctype_byname<char>
-
-X template <> class ctype_byname<char> : public ctype<char> {
- public:
-S explicit ctype_byname(const char*, size_t refs = 0);
- protected:
-S ~ctype_byname(); // virtual
-S virtual char do_toupper(char c) const;
-S virtual const char* do_toupper(char* low, const char* high) const;
-S virtual char do_tolower(char c) const;
-S virtual const char* do_tolower(char* low, const char* high) const;
-
-S virtual char do_widen(char c) const;
-S virtual const char* do_widen(char* low,
- const char* high,
- char* to) const;
-S virtual char do_widen(char c) const;
-S virtual const char* do_widen(char* low, const char* high) const;
-
- };
-
-
-
- 22.2.1.5 Template class codecvt [lib.locale.codecvt]
-
-T class codecvt_base {
- public:
-T enum result { ok, partial, error, noconv };
- };
-
-T template <class internT, class externT, class stateT>
- class codecvt : public locale::facet, public codecvt_base {
- public:
-T typedef internT intern_type;
-T typedef externT extern_type;
-T typedef stateT state_type;
-T explicit codecvt(size_t refs = 0)
-T result out(stateT& state,
- const internT* from, const internT* from_end, const internT*& from_next,
- externT* to, externT* to_limit, externT*& to_next) const;
-T result unshift(stateT& state,
- externT* to, externT* to_limit, externT*& to_next) const;
-T result in(stateT& state,
- const externT* from, const externT* from_end, const externT*& from_next,
- internT* to, internT* to_limit, internT*& to_next) const;
-T int encoding() const throw();
-T bool always_noconv() const throw();
-T int length(const stateT&, const externT* from, const externT* end,
- size_t max) const;
-T int max_length() const throw();
-T static locale::id id;
-
- protected:
-T ~codecvt(); // virtual
-T virtual result do_out(stateT& state,
- const internT* from, const internT* from_end, const internT*& from_next,
- externT* to, externT* to_limit, externT*& to_next) const;
-T virtual result do_in(stateT& state,
-T const externT* from, const externT* from_end, const externT*& from_next,
- internT* to, internT* to_limit, internT*& to_next) const;
-T virtual result do_unshift(stateT& state,
- externT* to, externT* to_limit, externT*& to_next) const;
-T virtual int do_encoding() const throw();
-T virtual bool do_always_noconv() const throw();
-T virtual int do_length(const stateT&, const externT* from,
- const externT* end, size_t max) const;
-T virtual int do_max_length() const throw();
- };
- }
-
-
- 22.2.1.6 Template class [lib.locale.codecvt.byname]
- codecvt_byname
-
-X template <class internT, class externT, class stateT>
- class codecvt_byname : public codecvt<internT, externT, stateT> {
- public:
-S explicit codecvt_byname(const char*, size_t refs = 0);
- protected:
-S ~codecvt_byname(); // virtual
-S virtual result do_out(stateT& state,
- const internT* from, const internT* from_end, const internT*& from_next,
- externT* to, externT* to_limit, externT*& to_next) const;
-S virtual result do_in(stateT& state,
- const externT* from, const externT* from_end, const externT*& from_next,
- internT* to, internT* to_limit, internT*& to_next) const;
-S virtual result do_unshift(stateT& state,
- externT* to, externT* to_limit, externT*& to_next) const;
-S virtual int do_encoding() const throw();
-S virtual bool do_always_noconv() const throw();
-S virtual int do_length(const stateT&, const externT* from,
- const externT* end, size_t max) const;
-S virtual result do_unshift(stateT& state,
- externT* to, externT* to_limit, externT*& to_next) const;
-S virtual int do_max_length() const throw();
- };
-
-
- 22.2.2.1 Template class num_get [lib.locale.num.get]
-
-X template <class charT, class InputIterator = istreambuf_iterator<charT> >
- class num_get : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef InputIterator iter_type;
-T explicit num_get(size_t refs = 0);
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, bool& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base& ,
- ios_base::iostate& err, long& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, unsigned short& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, unsigned int& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, unsigned long& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, float& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, double& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, long double& v) const;
-T iter_type get(iter_type in, iter_type end, ios_base&,
- ios_base::iostate& err, void*& v) const;
-T static locale::id id;
-
- protected:
-T ~num_get(); // virtual
-T virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, bool& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, long& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, unsigned short& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, unsigned int& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, unsigned long& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, float& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, double& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, long double& v) const;
-S virtual iter_type do_get(iter_type, iter_type, ios_base&,
- ios_base::iostate& err, void*& v) const;
- };
-
-
-
- 22.2.2.2 Template class num_put [lib.locale.nm.put]
-
-X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
- class num_put : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef OutputIterator iter_type;
-T explicit num_put(size_t refs = 0);
-T iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill, long v) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill,
- unsigned long v) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill,
- double v) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill,
- long double v) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill,
- const void* v) const;
-T static locale::id id;
- protected:
-T ~num_put(); // virtual
-T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- bool v) const;
-T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- long v) const;
-T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- unsigned long) const;
-S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- double v) const;
-S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- long double v) const;
-T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
- const void* v) const;
- };
- }
-
- 22.2.3.1 Template class numpunct [lib.locale.numpunct]
-
-T template <class charT>
- class numpunct : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef basic_string<charT> string_type;
-T explicit numpunct(size_t refs = 0);
-T char_type decimal_point() const;
-T char_type thousands_sep() const;
-T string grouping() const;
-T string_type truename() const;
-T string_type falsename() const;
-T static locale::id id;
- protected:
-T ~numpunct(); // virtual
-T virtual char_type do_decimal_point() const;
-T virtual char_type do_thousands_sep() const;
-T virtual string do_grouping() const;
-T virtual string_type do_truename() const; // for bool
-T virtual string_type do_falsename() const; // for bool
- };
- }
-
-
-
- 22.2.3.2 Template class [lib.locale.numpunct.byname]
- numpunct_byname
-
-X template <class charT>
- class numpunct_byname : public numpunct<charT> {
- // this class is specialized for char and wchar_t.
- public:
-T typedef charT char_type;
-T typedef basic_string<charT> string_type;
-S explicit numpunct_byname(const char*, size_t refs = 0);
- protected:
-S ~numpunct_byname(); // virtual
-S virtual char_type do_decimal_point() const;
-S virtual char_type do_thousands_sep() const;
-S virtual string do_grouping() const;
-S virtual string_type do_truename() const; // for bool
-S virtual string_type do_falsename() const; // for bool
- };
-
-
- 22.2.4.1 Template class collate [lib.locale.collate]
-
-T template <class charT>
- class collate : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef basic_string<charT> string_type;
-T explicit collate(size_t refs = 0);
-T int compare(const charT* low1, const charT* high1,
- const charT* low2, const charT* high2) const;
-T string_type transform(const charT* low, const charT* high) const;
-T long hash(const charT* low, const charT* high) const;
-T static locale::id id;
- protected:
-T ~collate(); // virtual
-T virtual int do_compare(const charT* low1, const charT* high1,
- const charT* low2, const charT* high2) const;
-T virtual string_type do_transform
- (const charT* low, const charT* high) const;
-T virtual long do_hash (const charT* low, const charT* high) const;
- };
-
-
- 22.2.4.2 Template class [lib.locale.collate.byname]
- collate_byname
-
-X template <class charT>
- class collate_byname : public collate<charT> {
- public:
-T typedef basic_string<charT> string_type;
-T explicit collate_byname(const char*, size_t refs = 0);
- protected:
-S ~collate_byname(); // virtual
-S virtual int do_compare(const charT* low1, const charT* high1,
- const charT* low2, const charT* high2) const;
-S virtual string_type do_transform
- (const charT* low, const charT* high) const;
-S virtual long do_hash (const charT* low, const charT* high) const;
- };
-
-
- 22.2.5.1 Template class time_get [lib.locale.time.get]
-
-T class time_base {
- public:
-T enum dateorder { no_order, dmy, mdy, ymd, ydm };
- };
-
- [Note: semantics of time_get members are implementation-defined.
- To complete implementation requires documenting behavior.]
-
-X template <class charT, class InputIterator = istreambuf_iterator<charT> >
- class time_get : public locale::facet, public time_base {
- public:
-T typedef charT char_type;
-T typedef InputIterator iter_type;
-T explicit time_get(size_t refs = 0);
-
-T dateorder date_order() const { return do_date_order(); }
-T iter_type get_time(iter_type s, iter_type end, ios_base& f,
- ios_base::iostate& err, tm* t) const;
-T iter_type get_date(iter_type s, iter_type end, ios_base& f,
- ios_base::iostate& err, tm* t) const;
-T iter_type get_weekday(iter_type s, iter_type end, ios_base& f,
- ios_base::iostate& err, tm* t) const;
-T iter_type get_monthname(iter_type s, iter_type end, ios_base& f,
- ios_base::iostate& err, tm* t) const;
-T iter_type get_year(iter_type s, iter_type end, ios_base& f,
- ios_base::iostate& err, tm* t) const;
-T static locale::id id;
- protected:
- ~time_get(); // virtual
-X virtual dateorder do_date_order() const;
-S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_monthname(iter_type s, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
- };
-
-
-
- 22.2.5.2 Template class [lib.locale.time.get.byname]
- time_get_byname
-
-X template <class charT, class InputIterator = istreambuf_iterator<charT> >
- class time_get_byname : public time_get<charT, InputIterator> {
- public:
-T typedef time_base::dateorder dateorder;
-T typedef InputIterator iter_type
-
-S explicit time_get_byname(const char*, size_t refs = 0);
- protected:
-S ~time_get_byname(); // virtual
-S virtual dateorder do_date_order() const;
-S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
-S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
- ios_base::iostate& err, tm* t) const;
- };
- }
-
- 22.2.5.3 Template class time_put [lib.locale.time.put]
-
-X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
- class time_put : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef OutputIterator iter_type;
-T explicit time_put(size_t refs = 0);
- // the following is implemented in terms of other member functions.
-S iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
- const charT* pattern, const charT* pat_end) const;
-T iter_type put(iter_type s, ios_base& f, char_type fill,
- const tm* tmb, char format, char modifier = 0) const;
-T static locale::id id;
- protected:
-T ~time_put(); // virtual
-S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
- char format, char modifier) const;
- };
-
-
-
- 22.2.5.4 Template class [lib.locale.time.put.byname]
- time_put_byname
-
-T template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
- class time_put_byname : public time_put<charT, OutputIterator>
- {
- public:
-T typedef charT char_type;
-T typedef OutputIterator iter_type;
-
-T explicit time_put_byname(const char*, size_t refs = 0);
- protected:
-T ~time_put_byname(); // virtual
-S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
- char format, char modifier) const;
- };
-
-
- 22.2.6.1 Template class money_get [lib.locale.money.get]
-
-X template <class charT,
- class InputIterator = istreambuf_iterator<charT> >
- class money_get : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef InputIterator iter_type;
-T typedef basic_string<charT> string_type;
-T explicit money_get(size_t refs = 0);
-T iter_type get(iter_type s, iter_type end, bool intl,
- ios_base& f, ios_base::iostate& err,
- long double& units) const;
-T iter_type get(iter_type s, iter_type end, bool intl,
- ios_base& f, ios_base::iostate& err,
- string_type& digits) const;
-T static locale::id id;
- protected:
-T ~money_get(); // virtual
-S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
- ios_base::iostate& err, long double& units) const;
-S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
- ios_base::iostate& err, string_type& digits) const;
- };
-
- 22.2.6.2 Template class money_put [lib.locale.money.put]
-
-X template <class charT,
- class OutputIterator = ostreambuf_iterator<charT> >
- class money_put : public locale::facet {
- public:
-T typedef charT char_type;
-T typedef OutputIterator iter_type;
-T typedef basic_string<charT> string_type;
-T explicit money_put(size_t refs = 0);
-T iter_type put(iter_type s, bool intl, ios_base& f,
- char_type fill, long double units) const;
-T iter_type put(iter_type s, bool intl, ios_base& f,
- char_type fill, const string_type& digits) const;
-T static locale::id id;
-
- protected:
-T ~money_put(); // virtual
-S virtual iter_type
- do_put(iter_type, bool, ios_base&, char_type fill,
- long double units) const;
-S virtual iter_type
- do_put(iter_type, bool, ios_base&, char_type fill,
- const string_type& digits) const;
- };
-
-
- 22.2.6.3 Template class moneypunct [lib.locale.moneypunct]
-
-T class money_base {
- public:
-T enum part { none, space, symbol, sign, value };
-T struct pattern { char field[4]; };
- };
-
-X template <class charT, bool International = false>
- class moneypunct : public locale::facet, public money_base {
- public:
-T typedef charT char_type;
-T typedef basic_string<charT> string_type;
-T explicit moneypunct(size_t refs = 0);
-T charT decimal_point() const;
-T charT thousands_sep() const;
-T string grouping() const;
-T string_type curr_symbol() const;
-T string_type positive_sign() const;
-T string_type negative_sign() const;
-T int frac_digits() const;
-T pattern pos_format() const;
-T pattern neg_format() const;
-T static locale::id id;
-T static const bool intl = International;
- protected:
-T ~moneypunct(); // virtual
-S virtual charT do_decimal_point() const;
-S virtual charT do_thousands_sep() const;
-S virtual string do_grouping() const;
-S virtual string_type do_curr_symbol() const;
-S virtual string_type do_positive_sign() const;
-S virtual string_type do_negative_sign() const;
-S virtual int do_frac_digits() const;
-T virtual pattern do_pos_format() const;
-T virtual pattern do_neg_format() const;
- };
- }
-
- 22.2.6.4 Template class [lib.locale.moneypunct.byname]
- moneypunct_byname
-
-X template <class charT, bool Intl = false>
- class moneypunct_byname : public moneypunct<charT, Intl> {
- public:
-T typedef money_base::pattern pattern;
-T typedef basic_string<charT> string_type;
-
-T explicit moneypunct_byname(const char*, size_t refs = 0);
- protected:
-T ~moneypunct_byname(); // virtual
-S virtual charT do_decimal_point() const;
-S virtual charT do_thousands_sep() const;
-S virtual string do_grouping() const;
-S virtual string_type do_curr_symbol() const;
-S virtual string_type do_positive_sign() const;
-S virtual string_type do_negative_sign() const;
-S virtual int do_frac_digits() const;
-S virtual pattern do_pos_format() const;
-S virtual pattern do_neg_format() const;
- };
-
- 22.2.7.1 Template class messages [lib.locale.messages]
-
-T class messages_base {
- public:
-T typedef int catalog;
- };
-
-X template <class charT>
- class messages : public locale::facet, public messages_base {
- public:
-T typedef charT char_type;
-T typedef basic_string<charT> string_type;
-T explicit messages(size_t refs = 0);
-T catalog open(const basic_string<char>& fn, const locale&) const;
-T string_type get(catalog c, int set, int msgid,
- const string_type& dfault) const;
-T void close(catalog c) const;
-T static locale::id id;
- protected:
-T ~messages(); // virtual
-S virtual catalog do_open(const basic_string<char>&, const locale&) const;
-S virtual string_type do_get(catalog, int set, int msgid,
- const string_type& dfault) const;
-S virtual void do_close(catalog) const;
- };
-
- 22.2.7.2 Template class [lib.locale.messages.byname]
- messages_byname
-
-
-X template <class charT>
- class messages_byname : public messages<charT> {
- public:
-T typedef messages_base::catalog catalog;
-T typedef basic_string<charT> string_type;
-
-T explicit messages_byname(const char*, size_t refs = 0);
- protected:
-T ~messages_byname(); // virtual
-S virtual catalog do_open(const basic_string<char>&, const locale&) const;
-S virtual string_type do_get(catalog, int set, int msgid,
- const string_type& dfault) const;
-S virtual void do_close(catalog) const;
- };
-
-
- 22.3 C Library Locales [lib.c.locales]
-
-
- Table 13--Header <clocale> synopsis
- Macros:
-X LC_ALL LC_COLLATE LC_CTYPE
-X LC_MONETARY LC_NUMERIC LC_TIME
-X NULL
-X Struct: lconv
-X Functions: localeconv setlocale
-
-
- 23.2 Sequences [lib.sequences]
-
- <deque>, <list>, <queue>, <stack>, and <vector>.
-
- Header <deque> synopsis
-
-T template <class T, class Allocator = allocator<T> > class deque;
-T template <class T, class Allocator>
- bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
- }
-
- Header <list> synopsis
-
-T template <class T, class Allocator = allocator<T> > class list;
-T template <class T, class Allocator>
- bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- void swap(list<T,Allocator>& x, list<T,Allocator>& y);
- }
-
- Header <queue> synopsis
-
- namespace std {
-T template <class T, class Container = deque<T> > class queue;
-T template <class T, class Container>
- bool operator==(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator< (const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator!=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator> (const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator>=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator<=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container = vector<T>,
- class Compare = less<typename Container::value_type> >
-T class priority_queue;
- }
-
- Header <stack> synopsis
-
- namespace std {
-T template <class T, class Container = deque<T> > class stack;
-T template <class T, class Container>
- bool operator==(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator< (const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator!=(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator> (const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator>=(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator<=(const stack<T, Container>& x,
- const stack<T, Container>& y);
- }
-
- Header <vector> synopsis
-
-T template <class T, class Allocator = allocator<T> > class vector;
-
-T template <class T, class Allocator>
- bool operator==(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
-
-T template <class Allocator> class vector<bool,Allocator>;
-T template <class Allocator>
- bool operator==(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator< (const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator!=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator> (const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator>=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator<=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
- }
-
- 23.2.1 Template class deque [lib.deque]
-
- template <class T, class Allocator = allocator<T> >
-T class deque {
- public:
- // types:
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef T value_type;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- // _lib.deque.cons_ construct/copy/destroy:
-T explicit deque(const Allocator& = Allocator());
-T explicit deque(size_type n, const T& value = T(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- deque(InputIterator first, InputIterator last,
- const Allocator& = Allocator());
-T deque(const deque<T,Allocator>& x);
-T ~deque();
-T deque<T,Allocator>& operator=(const deque<T,Allocator>& x);
-T template <class InputIterator>
- void assign(InputIterator first, InputIterator last);
-T void assign(size_type n, const T& t);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // _lib.deque.capacity_ capacity:
-T size_type size() const;
-T size_type max_size() const;
-T void resize(size_type sz, T c = T());
-T bool empty() const;
-
- // element access:
-T reference operator[](size_type n);
-T const_reference operator[](size_type n) const;
-T reference at(size_type n);
-T const_reference at(size_type n) const;
-T reference front();
-T const_reference front() const;
-T reference back();
-T const_reference back() const;
- // _lib.deque.modifiers_ modifiers:
-T void push_front(const T& x);
-T void push_back(const T& x);
-T iterator insert(iterator position, const T& x);
-T void insert(iterator position, size_type n, const T& x);
-T template <class InputIterator>
- void insert (iterator position,
- InputIterator first, InputIterator last);
-T void pop_front();
-T void pop_back();
-T iterator erase(iterator position);
-T iterator erase(iterator first, iterator last);
-T void swap(deque<T,Allocator>&);
-T void clear();
- };
-T template <class T, class Allocator>
- bool operator==(const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const deque<T,Allocator>& x,
- const deque<T,Allocator>& y);
- // specialized algorithms:
-T template <class T, class Allocator>
- void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
-
-
- 23.2.2 Template class list [lib.list]
-
-T template <class T, class Allocator = allocator<T> >
- class list {
- public:
- // types:
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef T value_type;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
- // _lib.list.cons_ construct/copy/destroy:
-T explicit list(const Allocator& = Allocator());
-T explicit list(size_type n, const T& value = T(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- list(InputIterator first, InputIterator last,
- const Allocator& = Allocator());
-T list(const list<T,Allocator>& x);
-T ~list();
-T list<T,Allocator>& operator=(const list<T,Allocator>& x);
-T template <class InputIterator>
- void assign(InputIterator first, InputIterator last);
-T void assign(size_type n, const T& t);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // _lib.list.capacity_ capacity:
-T bool empty() const;
-T size_type size() const;
-T size_type max_size() const;
-T void resize(size_type sz, T c = T());
- // element access:
-T reference front();
-T const_reference front() const;
-T reference back();
-T const_reference back() const;
- // _lib.list.modifiers_ modifiers:
-T void push_front(const T& x);
-T void pop_front();
-T void push_back(const T& x);
-T void pop_back();
-T iterator insert(iterator position, const T& x);
-T void insert(iterator position, size_type n, const T& x);
-T template <class InputIterator>
- void insert(iterator position, InputIterator first,
- InputIterator last);
-T iterator erase(iterator position);
-T iterator erase(iterator position, iterator last);
-T void swap(list<T,Allocator>&);
-T void clear();
- // _lib.list.ops_ list operations:
-T void splice(iterator position, list<T,Allocator>& x);
-T void splice(iterator position, list<T,Allocator>& x, iterator i);
-T void splice(iterator position, list<T,Allocator>& x, iterator first,
- iterator last);
-T void remove(const T& value);
-T template <class Predicate> void remove_if(Predicate pred);
-
-T void unique();
-T template <class BinaryPredicate>
- void unique(BinaryPredicate binary_pred);
-T void merge(list<T,Allocator>& x);
-T template <class Compare> void merge(list<T,Allocator>& x, Compare comp);
- void sort();
-T template <class Compare> void sort(Compare comp);
- void reverse();
- };
-T template <class T, class Allocator>
- bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
- // specialized algorithms:
-T template <class T, class Allocator>
- void swap(list<T,Allocator>& x, list<T,Allocator>& y);
-
-
- 23.2.3.1 Template class queue [lib.queue]
-
-T template <class T, class Container = deque<T> >
- class queue {
- public:
-T typedef typename Container::value_type value_type;
-T typedef typename Container::size_type size_type;
-T typedef Container container_type;
- protected:
-T Container c;
- public:
-T explicit queue(const Container& = Container());
-
-T bool empty() const { return c.empty(); }
-T size_type size() const { return c.size(); }
-T value_type& front() { return c.front(); }
-T const value_type& front() const { return c.front(); }
-T value_type& back() { return c.back(); }
-T const value_type& back() const { return c.back(); }
-T void push(const value_type& x) { c.push_back(x); }
-T void pop() { c.pop_front(); }
- };
-
-T template <class T, class Container>
- bool operator==(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator< (const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator!=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator> (const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator>=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-T template <class T, class Container>
- bool operator<=(const queue<T, Container>& x,
- const queue<T, Container>& y);
-
- 23.2.3.2 Template class priority_queue [lib.priority.queue]
-
-T template <class T, class Container = vector<T>,
- class Compare = less<typename Container::value_type> >
- class priority_queue {
- public:
-T typedef typename Container::value_type value_type;
-T typedef typename Container::size_type size_type;
-T typedef Container container_type;
- protected:
-T Container c;
-T Compare comp;
- public:
-T explicit priority_queue(const Compare& x = Compare(),
- const Container& = Container());
-T template <class InputIterator>
- priority_queue(InputIterator first, InputIterator last,
- const Compare& x = Compare(),
- const Container& = Container());
-
-T bool empty() const { return c.empty(); }
-T size_type size() const { return c.size(); }
-T const value_type& top() const { return c.front(); }
-T void push(const value_type& x);
-T void pop();
- };
-
- 23.2.3.3 Template class stack [lib.stack]
-
-T template <class T, class Container = deque<T> >
- class stack {
- public:
-T typedef typename Container::value_type value_type;
-T typedef typename Container::size_type size_type;
-T typedef Container container_type;
- protected:
-T Container c;
- public:
-T explicit stack(const Container& = Container());
-
-T bool empty() const { return c.empty(); }
-T size_type size() const { return c.size(); }
-T value_type& top() { return c.back(); }
-T const value_type& top() const { return c.back(); }
-T void push(const value_type& x) { c.push_back(x); }
-T void pop() { c.pop_back(); }
- };
-T template <class T, class Container>
- bool operator==(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator< (const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator!=(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator> (const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator>=(const stack<T, Container>& x,
- const stack<T, Container>& y);
-T template <class T, class Container>
- bool operator<=(const stack<T, Container>& x,
- const stack<T, Container>& y);
-
- 23.2.4 Template class vector [lib.vector]
-
- template <class T, class Allocator = allocator<T> >
-T class vector {
- public:
- // types:
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef T value_type;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- // _lib.vector.cons_ construct/copy/destroy:
-T explicit vector(const Allocator& = Allocator());
-T explicit vector(size_type n, const T& value = T(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- vector(InputIterator first, InputIterator last,
- const Allocator& = Allocator());
-T vector(const vector<T,Allocator>& x);
-T ~vector();
-T vector<T,Allocator>& operator=(const vector<T,Allocator>& x);
-T template <class InputIterator>
- void assign(InputIterator first, InputIterator last);
-T void assign(size_type n, const T& u);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // _lib.vector.capacity_ capacity:
-T size_type size() const;
-T size_type max_size() const;
-T void resize(size_type sz, T c = T());
-T size_type capacity() const;
-T bool empty() const;
-T void reserve(size_type n);
-
- // element access:
-T reference operator[](size_type n);
-T const_reference operator[](size_type n) const;
-T const_reference at(size_type n) const;
-T reference at(size_type n);
-T reference front();
-T const_reference front() const;
-T reference back();
-T const_reference back() const;
- // _lib.vector.modifiers_ modifiers:
-T void push_back(const T& x);
-T void pop_back();
-T iterator insert(iterator position, const T& x);
-T void insert(iterator position, size_type n, const T& x);
-T template <class InputIterator>
- void insert(iterator position,
- InputIterator first, InputIterator last);
-T iterator erase(iterator position);
-T iterator erase(iterator first, iterator last);
-T void swap(vector<T,Allocator>&);
-T void clear();
- };
-
-T template <class T, class Allocator>
- bool operator==(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator< (const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator!=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator> (const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator>=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
-T template <class T, class Allocator>
- bool operator<=(const vector<T,Allocator>& x,
- const vector<T,Allocator>& y);
- // specialized algorithms:
-T template <class T, class Allocator>
- void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
-
-
- 23.2.5 Class vector<bool> [lib.vector.bool]
-
-T template <class Allocator> class vector<bool, Allocator> {
- public:
- // types:
-T typedef bool const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef bool value_type;
-T typedef Allocator allocator_type;
-T typedef implementation defined pointer;
-T typedef implementation defined const_pointer
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- // bit reference:
-T class reference {
- friend class vector;
-T reference();
- public:
-T ~reference();
-T operator bool() const;
-T reference& operator=(const bool x);
-T reference& operator=(const reference& x);
-T void flip(); // flips the bit
- };
-
- // construct/copy/destroy:
-T explicit vector(const Allocator& = Allocator());
-T explicit vector(size_type n, const bool& value = bool(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- vector(InputIterator first, InputIterator last,
- const Allocator& = Allocator());
-T vector(const vector<bool,Allocator>& x);
-T ~vector();
-T vector<bool,Allocator>& operator=(const vector<bool,Allocator>& x);
-T template <class InputIterator>
- void assign(InputIterator first, InputIterator last);
-T void assign(size_type n, const T& t);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // capacity:
-T size_type size() const;
-T size_type max_size() const;
-T void resize(size_type sz, bool c = false);
-T size_type capacity() const;
-T bool empty() const;
-T void reserve(size_type n);
- // element access:
-T reference operator[](size_type n);
-T const_reference operator[](size_type n) const;
-T const_reference at(size_type n) const;
-T reference at(size_type n);
-T reference front();
-T const_reference front() const;
-T reference back();
-T const_reference back() const;
- // modifiers:
-T void push_back(const bool& x);
-T void pop_back();
-T iterator insert(iterator position, const bool& x);
-T void insert (iterator position, size_type n, const bool& x);
-T template <class InputIterator>
- void insert(iterator position,
- InputIterator first, InputIterator last);
-T iterator erase(iterator position);
-T iterator erase(iterator first, iterator last);
-T void swap(vector<bool,Allocator>&);
-T static void swap(reference x, reference y);
-T void flip(); // flips all bits
-T void clear();
- };
-
-T template <class Allocator>
- bool operator==(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator< (const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator!=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator> (const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator>=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
-T template <class Allocator>
- bool operator<=(const vector<bool,Allocator>& x,
- const vector<bool,Allocator>& y);
- // specialized algorithms:
-T template <class Allocator>
- void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
-
- 23.3 Associative containers [lib.associative]
-
- <map> and <set>:
-
- Header <map> synopsis
-
- template <class Key, class T, class Compare = less<Key>,
- class Allocator = allocator<pair<const Key, T> > >
-T class map;
-
-T template <class Key, class T, class Compare, class Allocator>
- bool operator==(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator< (const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator!=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator> (const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator>=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator<=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- void swap(map<Key,T,Compare,Allocator>& x,
- map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare = less<Key>,
- class Allocator = allocator<pair<const Key, T> > >
- class multimap;
-T template <class Key, class T, class Compare, class Allocator>
- bool operator==(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator< (const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator> (const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- void swap(multimap<Key,T,Compare,Allocator>& x,
- multimap<Key,T,Compare,Allocator>& y);
- }
-
- Header <set> synopsis
-
- template <class Key, class Compare = less<Key>,
- class Allocator = allocator<Key> >
-T class set;
-
-T template <class Key, class Compare, class Allocator>
- bool operator==(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator< (const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator!=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator> (const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator>=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator<=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- void swap(set<Key,Compare,Allocator>& x,
- set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare = less<Key>,
- class Allocator = allocator<Key> >
- class multiset;
-T template <class Key, class Compare, class Allocator>
- bool operator==(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator< (const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator!=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator> (const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator>=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator<=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- void swap(multiset<Key,Compare,Allocator>& x,
- multiset<Key,Compare,Allocator>& y);
- }
-
- 23.3.1 Template class map [lib.map]
-
- template <class Key, class T, class Compare = less<Key>,
- class Allocator = allocator<pair<const Key, T> > >
-T class map {
- public:
- // types:
-T typedef Key key_type;
-T typedef T mapped_type;
-T typedef pair<const Key, T> value_type;
-T typedef Compare key_compare;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-T class value_compare
- : public binary_function<value_type,value_type,bool> {
- friend class map;
- protected:
-T Compare comp;
-T value_compare(Compare c) : comp(c) {}
- public:
-T bool operator()(const value_type& x, const value_type& y) const {
- return comp(x.first, y.first);
- }
- };
-
- // _lib.map.cons_ construct/copy/destroy:
-T explicit map(const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- map(InputIterator first, InputIterator last,
- const Compare& comp = Compare(), const Allocator& = Allocator());
-T map(const map<Key,T,Compare,Allocator>& x);
-T ~map();
-T map<Key,T,Compare,Allocator>&
- operator=(const map<Key,T,Compare,Allocator>& x);
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // capacity:
-T bool empty() const;
-T size_type size() const;
-T size_type max_size() const;
- // _lib.map.access_ element access:
-T T& operator[](const key_type& x);
- // modifiers:
-T pair<iterator, bool> insert(const value_type& x);
-T iterator insert(iterator position, const value_type& x);
-T template <class InputIterator>
- void insert(InputIterator first, InputIterator last);
-T void erase(iterator position);
-T size_type erase(const key_type& x);
-T void erase(iterator first, iterator last);
-T void swap(map<Key,T,Compare,Allocator>&);
-T void clear();
- // observers:
-T key_compare key_comp() const;
-T value_compare value_comp() const;
- // _lib.map.ops_ map operations:
-T iterator find(const key_type& x);
-T const_iterator find(const key_type& x) const;
-T size_type count(const key_type& x) const;
-T iterator lower_bound(const key_type& x);
-T const_iterator lower_bound(const key_type& x) const;
-T iterator upper_bound(const key_type& x);
-T const_iterator upper_bound(const key_type& x) const;
-T pair<iterator,iterator>
- equal_range(const key_type& x);
-T pair<const_iterator,const_iterator>
- equal_range(const key_type& x) const;
- };
-
-T template <class Key, class T, class Compare, class Allocator>
- bool operator==(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator< (const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator!=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator> (const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator>=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator<=(const map<Key,T,Compare,Allocator>& x,
- const map<Key,T,Compare,Allocator>& y);
- // specialized algorithms:
-T template <class Key, class T, class Compare, class Allocator>
- void swap(map<Key,T,Compare,Allocator>& x,
- map<Key,T,Compare,Allocator>& y);
-
- 23.3.2 Template class multimap [lib.multimap]
-
- template <class Key, class T, class Compare = less<Key>,
- class Allocator = allocator<pair<const Key, T> > >
-T class multimap {
- public:
- // types:
-T typedef Key key_type;
-T typedef T mapped_type;
-T typedef pair<const Key,T> value_type;
-T typedef Compare key_compare;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-T class value_compare
- : public binary_function<value_type,value_type,bool> {
- friend class multimap;
- protected:
-T Compare comp;
-T value_compare(Compare c) : comp(c) {}
- public:
-T bool operator()(const value_type& x, const value_type& y) const {
- return comp(x.first, y.first);
- }
- };
- // construct/copy/destroy:
-T explicit multimap(const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- multimap(InputIterator first, InputIterator last,
- const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T multimap(const multimap<Key,T,Compare,Allocator>& x);
-T ~multimap();
-T multimap<Key,T,Compare,Allocator>&
- operator=(const multimap<Key,T,Compare,Allocator>& x);
-T allocator_type get_allocator() const;
-
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // capacity:
-T bool empty() const;
-T size_type size() const;
-T size_type max_size() const;
- // modifiers:
-T iterator insert(const value_type& x);
-T iterator insert(iterator position, const value_type& x);
-T template <class InputIterator>
- void insert(InputIterator first, InputIterator last);
-T void erase(iterator position);
-T size_type erase(const key_type& x);
-T void erase(iterator first, iterator last);
-T void swap(multimap<Key,T,Compare,Allocator>&);
-T void clear();
- // observers:
-T key_compare key_comp() const;
-T value_compare value_comp() const;
- // map operations:
-T iterator find(const key_type& x);
-T const_iterator find(const key_type& x) const;
-T size_type count(const key_type& x) const;
-T iterator lower_bound(const key_type& x);
-T const_iterator lower_bound(const key_type& x) const;
-T iterator upper_bound(const key_type& x);
-T const_iterator upper_bound(const key_type& x) const;
-T pair<iterator,iterator> equal_range(const key_type& x);
-T pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
- };
-
-T template <class Key, class T, class Compare, class Allocator>
- bool operator==(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator< (const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator> (const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
-T template <class Key, class T, class Compare, class Allocator>
- bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
- const multimap<Key,T,Compare,Allocator>& y);
- // specialized algorithms:
-T template <class Key, class T, class Compare, class Allocator>
- void swap(multimap<Key,T,Compare,Allocator>& x,
- multimap<Key,T,Compare,Allocator>& y);
-
-
- 23.3.3 Template class set [lib.set]
-
- template <class Key, class Compare = less<Key>,
- class Allocator = allocator<Key> >
-T class set {
- public:
- // types:
-T typedef Key key_type;
-T typedef Key value_type;
-T typedef Compare key_compare;
-T typedef Compare value_compare;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type;
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- // _lib.set.cons_ construct/copy/destroy:
-T explicit set(const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- set(InputIterator first, InputIterator last,
- const Compare& comp = Compare(), const Allocator& = Allocator());
-T set(const set<Key,Compare,Allocator>& x);
-T ~set();
-T set<Key,Compare,Allocator>&
- operator=(const set<Key,Compare,Allocator>& x);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // capacity:
-T bool empty() const;
-T size_type size() const;
-T size_type max_size() const;
- // modifiers:
-T pair<iterator,bool> insert(const value_type& x);
-T iterator insert(iterator position, const value_type& x);
-T template <class InputIterator>
-T void insert(InputIterator first, InputIterator last);
-T void erase(iterator position);
-T size_type erase(const key_type& x);
-T void erase(iterator first, iterator last);
-T void swap(set<Key,Compare,Allocator>&);
-T void clear();
-
- // observers:
-T key_compare key_comp() const;
-T value_compare value_comp() const;
- // set operations:
-T iterator find(const key_type& x) const;
-T size_type count(const key_type& x) const;
-T iterator lower_bound(const key_type& x) const;
-T iterator upper_bound(const key_type& x) const;
-T pair<iterator,iterator> equal_range(const key_type& x) const;
- };
-T template <class Key, class Compare, class Allocator>
- bool operator==(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator< (const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator!=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator> (const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator>=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator<=(const set<Key,Compare,Allocator>& x,
- const set<Key,Compare,Allocator>& y);
- // specialized algorithms:
-T template <class Key, class Compare, class Allocator>
- void swap(set<Key,Compare,Allocator>& x,
- set<Key,Compare,Allocator>& y);
-
- 23.3.4 Template class multiset [lib.multiset]
-
- template <class Key, class Compare = less<Key>,
- class Allocator = allocator<Key> >
-T class multiset {
- public:
- // types:
-T typedef Key key_type;
-T typedef Key value_type;
-T typedef Compare key_compare;
-T typedef Compare value_compare;
-T typedef Allocator allocator_type;
-T typedef typename Allocator::reference reference;
-T typedef typename Allocator::const_reference const_reference;
-T typedef implementation defined iterator;
-T typedef implementation defined const_iterator;
-T typedef implementation defined size_type;
-T typedef implementation defined difference_type
-T typedef typename Allocator::pointer pointer;
-T typedef typename Allocator::const_pointer const_pointer;
-T typedef std::reverse_iterator<iterator> reverse_iterator;
-T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
- // construct/copy/destroy:
-T explicit multiset(const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T template <class InputIterator>
- multiset(InputIterator first, InputIterator last,
- const Compare& comp = Compare(),
- const Allocator& = Allocator());
-T multiset(const multiset<Key,Compare,Allocator>& x);
-T ~multiset();
-T multiset<Key,Compare,Allocator>&
- operator=(const multiset<Key,Compare,Allocator>& x);
-T allocator_type get_allocator() const;
- // iterators:
-T iterator begin();
-T const_iterator begin() const;
-T iterator end();
-T const_iterator end() const;
-T reverse_iterator rbegin();
-T const_reverse_iterator rbegin() const;
-T reverse_iterator rend();
-T const_reverse_iterator rend() const;
- // capacity:
-T bool empty() const;
-T size_type size() const;
-T size_type max_size() const;
- // modifiers:
-T iterator insert(const value_type& x);
-T iterator insert(iterator position, const value_type& x);
-T template <class InputIterator>
- void insert(InputIterator first, InputIterator last);
-T void erase(iterator position);
-T size_type erase(const key_type& x);
-T void erase(iterator first, iterator last);
-T void swap(multiset<Key,Compare,Allocator>&);
-T void clear();
- // observers:
-T key_compare key_comp() const;
-T value_compare value_comp() const;
- // set operations:
-T iterator find(const key_type& x) const;
-T size_type count(const key_type& x) const;
-T iterator lower_bound(const key_type& x) const;
-T iterator upper_bound(const key_type& x) const;
-T pair<iterator,iterator> equal_range(const key_type& x) const;
- };
-
-T template <class Key, class Compare, class Allocator>
- bool operator==(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator< (const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator!=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator> (const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator>=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
-T template <class Key, class Compare, class Allocator>
- bool operator<=(const multiset<Key,Compare,Allocator>& x,
- const multiset<Key,Compare,Allocator>& y);
- // specialized algorithms:
-T template <class Key, class Compare, class Allocator>
- void swap(multiset<Key,Compare,Allocator>& x,
- multiset<Key,Compare,Allocator>& y);
-
- 23.3.5 Template class bitset [lib.template.bitset]
-
- Header <bitset> synopsis
-
-T template <size_t N> class bitset;
- // _lib.bitset.operators_ bitset operations:
-T template <size_t N>
- bitset<N> operator&(const bitset<N>&, const bitset<N>&);
-T template <size_t N>
- bitset<N> operator|(const bitset<N>&, const bitset<N>&);
-T template <size_t N>
- bitset<N> operator^(const bitset<N>&, const bitset<N>&);
-T template <class charT, class traits, size_t N>
- basic_istream<charT, traits>&
- operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
-T template <class charT, class traits, size_t N>
- basic_ostream<charT, traits>&
- operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
-
-T template<size_t N> class bitset {
- public:
- // bit reference:
-T class reference {
- friend class bitset;
-T reference();
- public:
-T ~reference();
-T reference& operator=(bool x); // for b[i] = x;
-T reference& operator=(const reference&); // for b[i] = b[j];
-T bool operator~() const; // flips the bit
-T operator bool() const; // for x = b[i];
-T reference& flip(); // for b[i].flip();
- };
-
- // _lib.bitset.cons_ constructors:
-T bitset();
-T bitset(unsigned long val);
-T template<class charT, class traits, class Allocator>
- explicit bitset(
- const basic_string<charT,traits,Allocator>& str,
- typename basic_string<charT,traits,Allocator>::size_type pos = 0,
- typename basic_string<charT,traits,Allocator>::size_type n =
- basic_string<charT,traits,Allocator>::npos);
- // _lib.bitset.members_ bitset operations:
-T bitset<N>& operator&=(const bitset<N>& rhs);
-T bitset<N>& operator|=(const bitset<N>& rhs);
-T bitset<N>& operator^=(const bitset<N>& rhs);
-T bitset<N>& operator<<=(size_t pos);
-T bitset<N>& operator>>=(size_t pos);
-T bitset<N>& set();
-T bitset<N>& set(size_t pos, int val = true);
-T bitset<N>& reset();
-T bitset<N>& reset(size_t pos);
-T bitset<N> operator~() const;
-T bitset<N>& flip();
-T bitset<N>& flip(size_t pos);
- // element access:
-T reference operator[](size_t pos); // for b[i];
-T unsigned long to_ulong() const;
-T template <class charT, class traits, class Allocator>
- basic_string<charT, traits, Allocator> to_string() const;
-T size_t count() const;
-T size_t size() const;
-T bool operator==(const bitset<N>& rhs) const;
-T bool operator!=(const bitset<N>& rhs) const;
-T bool test(size_t pos) const;
-T bool any() const;
-T bool none() const;
-T bitset<N> operator<<(size_t pos) const;
-T bitset<N> operator>>(size_t pos) const;
- };
-
-
-
-
- 24.2 Header <iterator> synopsis [lib.iterator.synopsis]
-
- // _lib.iterator.primitives_, primitives:
-T template<class Iterator> struct iterator_traits;
-T template<class T> struct iterator_traits<T*>;
-
-X template<class Category, class T, class Distance = ptrdiff_t,
- class Pointer = T*, class Reference = T&> struct iterator;
-T struct input_iterator_tag {};
-T struct output_iterator_tag {};
-T struct forward_iterator_tag: public input_iterator_tag {};
-T struct bidirectional_iterator_tag: public forward_iterator_tag {};
-T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
- // _lib.iterator.operations_, iterator operations:
-T template <class InputIterator, class Distance>
- void advance(InputIterator& i, Distance n);
-T template <class InputIterator>
- typename iterator_traits<InputIterator>::difference_type
- distance(InputIterator first, InputIterator last);
- // _lib.predef.iterators_, predefined iterators:
-X template <class Iterator> class reverse_iterator;
-T template <class Iterator>
- bool operator==(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator<(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator!=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator>(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator>=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator<=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- typename reverse_iterator<Iterator>::difference_type operator-(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- reverse_iterator<Iterator>
- operator+(
- typename reverse_iterator<Iterator>::difference_type n,
- const reverse_iterator<Iterator>& x);
-
-X template <class Container> class back_insert_iterator;
-T template <class Container>
- back_insert_iterator<Container> back_inserter(Container& x);
-X template <class Container> class front_insert_iterator;
-T template <class Container>
- front_insert_iterator<Container> front_inserter(Container& x);
-X template <class Container> class insert_iterator;
-T template <class Container, class Iterator>
- insert_iterator<Container> inserter(Container& x, Iterator i);
- // _lib.stream.iterators_, stream iterators:
-X template <class T, class charT = char, class traits = char_traits<charT>,
- class Distance = ptrdiff_t>
- class istream_iterator;
- template <class T, class charT, class traits, class Distance>
-X bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
- const istream_iterator<T,charT,traits,Distance>& y);
- template <class T, class charT, class traits, class Distance>
-X bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
- const istream_iterator<T,charT,traits,Distance>& y);
-X template <class T, class charT = char, class traits = char_traits<charT> >
- class ostream_iterator;
-X template<class charT, class traits = char_traits<charT> >
- class istreambuf_iterator;
-X template <class charT, class traits>
- bool operator==(const istreambuf_iterator<charT,traits>& a,
- const istreambuf_iterator<charT,traits>& b);
-X template <class charT, class traits>
- bool operator!=(const istreambuf_iterator<charT,traits>& a,
- const istreambuf_iterator<charT,traits>& b);
-T template <class charT, class traits = char_traits<charT> >
- class ostreambuf_iterator;
-
- 24.3 Iterator primitives [lib.iterator.primitives]
-
-T template<class Iterator> struct iterator_traits {
-T typedef typename Iterator::difference_type difference_type;
-T typedef typename Iterator::value_type value_type;
-T typedef typename Iterator::pointer pointer;
-T typedef typename Iterator::reference reference;
-T typedef typename Iterator::iterator_category iterator_category;
- };
-
-T template<class T> struct iterator_traits<T*> {
-T typedef ptrdiff_t difference_type;
-T typedef T value_type;
-T typedef T* pointer;
-T typedef T& reference;
-T typedef random_access_iterator_tag iterator_category;
- };
-
-T template<class T> struct iterator_traits<const T*> {
-T typedef ptrdiff_t difference_type;
-T typedef T value_type;
-T typedef const T* pointer;
-T typedef const T& reference;
-T typedef random_access_iterator_tag iterator_category;
- };
-
- 24.3.2 Basic iterator [lib.iterator.basic]
-
- template<class Category, class T, class Distance = ptrdiff_t,
- class Pointer = T*, class Reference = T&>
-X struct iterator {
-T typedef T value_type;
-T typedef Distance difference_type;
-T typedef Pointer pointer;
-T typedef Reference reference;
-T typedef Category iterator_category;
- };
-
- 24.3.3 Standard iterator tags [lib.std.iterator.tags]
-
-T struct input_iterator_tag {};
-T struct output_iterator_tag {};
-T struct forward_iterator_tag: public input_iterator_tag {};
-T struct bidirectional_iterator_tag: public forward_iterator_tag {};
-T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
-
-
- 24.4.1 Reverse iterators [lib.reverse.iterators]
-
- template <class Iterator>
-X class reverse_iterator : public
- iterator<typename iterator_traits<Iterator>::iterator_category,
- typename iterator_traits<Iterator>::value_type,
- typename iterator_traits<Iterator>::difference_type,
- typename iterator_traits<Iterator>::pointer,
- typename iterator_traits<Iterator>::reference> {
- protected:
-T Iterator current;
- public:
-T typedef Iterator
- iterator_type;
-T typedef typename iterator_traits<Iterator>::difference_type
- difference_type;
-T typedef typename iterator_traits<Iterator>::reference
- reference;
-T typedef typename iterator_traits<Iterator>::pointer
- pointer;
-
-T reverse_iterator();
-T explicit reverse_iterator(Iterator x);
-T template <class U> reverse_iterator(const reverse_iterator<U>& u);
-T Iterator base() const; // explicit
-T reference operator*() const;
-T pointer operator->() const;
-T reverse_iterator& operator++();
-T reverse_iterator operator++(int);
-T reverse_iterator& operator--();
-T reverse_iterator operator--(int);
-
-T reverse_iterator operator+ (difference_type n) const;
-T reverse_iterator& operator+=(difference_type n);
-T reverse_iterator operator- (difference_type n) const;
-T reverse_iterator& operator-=(difference_type n);
-T reference operator[](difference_type n) const;
- };
-T template <class Iterator>
- bool operator==(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator<(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator!=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator>(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator>=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- bool operator<=(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- typename reverse_iterator<Iterator>::difference_type operator-(
- const reverse_iterator<Iterator>& x,
- const reverse_iterator<Iterator>& y);
-T template <class Iterator>
- reverse_iterator<Iterator> operator+(
- typename reverse_iterator<Iterator>::difference_type n,
- const reverse_iterator<Iterator>& x);
-
-
- 24.4.2.1 Template class [lib.back.insert.iterator]
- back_insert_iterator
-
- template <class Container>
-X class back_insert_iterator :
- public iterator<output_iterator_tag,void,void,void,void> {
- protected:
-T Container* container;
- public:
-T typedef Container container_type;
-T explicit back_insert_iterator(Container& x);
-T back_insert_iterator<Container>&
- operator=(typename Container::const_reference value);
-
-T back_insert_iterator<Container>& operator*();
-T back_insert_iterator<Container>& operator++();
-T back_insert_iterator<Container> operator++(int);
- };
-T template <class Container>
- back_insert_iterator<Container> back_inserter(Container& x);
-
-
-
- 24.4.2.3 Template class [lib.front.insert.iterator]
- front_insert_iterator
-
- template <class Container>
-X class front_insert_iterator :
- public iterator<output_iterator_tag,void,void,void,void> {
- protected:
-T Container* container;
- public:
-T typedef Container container_type;
-T explicit front_insert_iterator(Container& x);
-T front_insert_iterator<Container>&
- operator=(typename Container::const_reference value);
-T front_insert_iterator<Container>& operator*();
-T front_insert_iterator<Container>& operator++();
-T front_insert_iterator<Container> operator++(int);
- };
-T template <class Container>
- front_insert_iterator<Container> front_inserter(Container& x);
-
-
- 24.4.2.5 Template class insert_iterator [lib.insert.iterator]
-
- template <class Container>
-X class insert_iterator :
- public iterator<output_iterator_tag,void,void,void,void> {
- protected:
-T Container* container;
-T typename Container::iterator iter;
- public:
-T typedef Container container_type;
-T insert_iterator(Container& x, typename Container::iterator i);
-T insert_iterator<Container>&
- operator=(typename Container::const_reference value);
-T insert_iterator<Container>& operator*();
-T insert_iterator<Container>& operator++();
-T insert_iterator<Container>& operator++(int);
- };
-T template <class Container, class Iterator>
- insert_iterator<Container> inserter(Container& x, Iterator i);
-
- 24.5.1 Template class istream_iterator [lib.istream.iterator]
-
- template <class T, class charT = char, class traits = char_traits<charT>,
- class Distance = ptrdiff_t>
-X class istream_iterator:
- public iterator<input_iterator_tag, T, Distance, const T*, const T&> {
- public:
-T typedef charT char_type
-T typedef traits traits_type;
-T typedef basic_istream<charT,traits> istream_type;
-T istream_iterator();
-T istream_iterator(istream_type& s);
-T istream_iterator(const istream_iterator<T,charT,traits,Distance>& x);
-T ~istream_iterator();
-
-T const T& operator*() const;
-T const T* operator->() const;
-T istream_iterator<T,charT,traits,Distance>& operator++();
-T istream_iterator<T,charT,traits,Distance> operator++(int);
- };
-
-T template <class T, class charT, class traits, class Distance>
- bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
- const istream_iterator<T,charT,traits,Distance>& y);
-T template <class T, class charT, class traits, class Distance>
- bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
- const istream_iterator<T,charT,traits,Distance>& y);
-
-
- 24.5.2 Template class ostream_iterator [lib.ostream.iterator]
-
- template <class T, class charT = char, class traits = char_traits<charT> >
-X class ostream_iterator:
- public iterator<output_iterator_tag, void, void, void, void> {
- public:
-T typedef charT char_type;
-T typedef traits traits_type;
-T typedef basic_ostream<charT,traits> ostream_type;
-T ostream_iterator(ostream_type& s);
-T ostream_iterator(ostream_type& s, const charT* delimiter);
-T ostream_iterator(const ostream_iterator<T,charT,traits>& x);
-T ~ostream_iterator();
-T ostream_iterator<T,charT,traits>& operator=(const T& value);
-
-T ostream_iterator<T,charT,traits>& operator*();
-T ostream_iterator<T,charT,traits>& operator++();
-T ostream_iterator<T,charT,traits>& operator++(int);
- };
-
-
- 24.5.3 Template class [lib.istreambuf.iterator]
- istreambuf_iterator
-
- template<class charT, class traits = char_traits<charT> >
-X class istreambuf_iterator
- : public iterator<input_iterator_tag, charT,
- typename traits::off_type, charT*, charT&> {
- public:
-T typedef charT char_type;
-T typedef traits traits_type;
-T typedef typename traits::int_type int_type;
-T typedef basic_streambuf<charT,traits> streambuf_type;
-T typedef basic_istream<charT,traits> istream_type;
-T class proxy; // exposition only
-T istreambuf_iterator() throw();
-T istreambuf_iterator(istream_type& s) throw();
-T istreambuf_iterator(streambuf_type* s) throw();
-T istreambuf_iterator(const proxy& p) throw();
-T charT operator*() const;
-T istreambuf_iterator<charT,traits>& operator++();
-T proxy operator++(int);
-X bool equal(istreambuf_iterator& b);
- };
-
-T template <class charT, class traits>
- bool operator==(const istreambuf_iterator<charT,traits>& a,
- const istreambuf_iterator<charT,traits>& b);
-
-T template <class charT, class traits>
- bool operator!=(const istreambuf_iterator<charT,traits>& a,
- const istreambuf_iterator<charT,traits>& b);
-
- 24.5.3.1 Template class [lib.istreambuf.iterator::proxy]
- istreambuf_iterator::proxy
-
- template <class charT, class traits = char_traits<charT> >
-T class istreambuf_iterator<charT, traits>::proxy
- {
-T charT keep_;
-T basic_streambuf<charT,traits>* sbuf_;
-T proxy(charT c,
- basic_streambuf<charT,traits>* sbuf);
- : keep_(c), sbuf_(sbuf) {}
- public:
-T charT operator*() { return keep_; }
- };
-
-
-
- 24.5.4 Template class [lib.ostreambuf.iterator]
- ostreambuf_iterator
-
- template <class charT, class traits = char_traits<charT> >
-T class ostreambuf_iterator:
- public iterator<output_iterator_tag, void, void, void, void> {
- public:
-T typedef charT char_type;
-T typedef traits traits_type;
-T typedef basic_streambuf<charT,traits> streambuf_type;
-T typedef basic_ostream<charT,traits> ostream_type;
- public:
-T ostreambuf_iterator(ostream_type& s) throw();
-T ostreambuf_iterator(streambuf_type* s) throw();
-T ostreambuf_iterator& operator=(charT c);
-T ostreambuf_iterator& operator*();
-T ostreambuf_iterator& operator++();
-T ostreambuf_iterator& operator++(int);
-T bool failed() const throw();
- };
-
-
- Header <algorithm> synopsis
-
-
- // _lib.alg.nonmodifying_, non-modifying sequence operations:
-T template<class InputIterator, class Function>
- Function for_each(InputIterator first, InputIterator last, Function f);
-T template<class InputIterator, class T>
- InputIterator find(InputIterator first, InputIterator last,
- const T& value);
-T template<class InputIterator, class Predicate>
- InputIterator find_if(InputIterator first, InputIterator last,
- Predicate pred);
-T template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1
- find_end(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-T template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1
- find_end(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-T template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-T template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-T template<class ForwardIterator>
- ForwardIterator adjacent_find(ForwardIterator first,
- ForwardIterator last);
-T template<class ForwardIterator, class BinaryPredicate>
- ForwardIterator adjacent_find(ForwardIterator first,
- ForwardIterator last, BinaryPredicate pred);
-T template<class InputIterator, class T>
- typename iterator_traits<InputIterator>::difference_type
- count(InputIterator first, InputIterator last, const T& value);
-T template<class InputIterator, class Predicate>
- typename iterator_traits<InputIterator>::difference_type
- count_if(InputIterator first, InputIterator last, Predicate pred);
-T template<class InputIterator1, class InputIterator2>
- pair<InputIterator1, InputIterator2>
- mismatch(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
-T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
- pair<InputIterator1, InputIterator2>
- mismatch(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
-
-T template<class InputIterator1, class InputIterator2>
- bool equal(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
-T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
- bool equal(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
-T template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-T template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-T template<class ForwardIterator, class Size, class T>
- ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
- Size count, const T& value);
-T template<class ForwardIterator, class Size, class T, class BinaryPredicate>
- ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
- Size count, const T& value,
- BinaryPredicate pred);
- // _lib.alg.modifying.operations_, modifying sequence operations:
- // _lib.alg.copy_, copy:
-T template<class InputIterator, class OutputIterator>
- OutputIterator copy(InputIterator first, InputIterator last,
- OutputIterator result);
-T template<class BidirectionalIterator1, class BidirectionalIterator2>
- BidirectionalIterator2
- copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
- BidirectionalIterator2 result);
- // _lib.alg.swap_, swap:
-T template<class T> void swap(T& a, T& b);
-T template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator2 swap_ranges(ForwardIterator1 first1,
- ForwardIterator1 last1, ForwardIterator2 first2);
-T template<class ForwardIterator1, class ForwardIterator2>
- void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
-T template<class InputIterator, class OutputIterator, class UnaryOperation>
- OutputIterator transform(InputIterator first, InputIterator last,
- OutputIterator result, UnaryOperation op);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class BinaryOperation>
- OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, OutputIterator result,
- BinaryOperation binary_op);
-
-T template<class ForwardIterator, class T>
- void replace(ForwardIterator first, ForwardIterator last,
- const T& old_value, const T& new_value);
-T template<class ForwardIterator, class Predicate, class T>
- void replace_if(ForwardIterator first, ForwardIterator last,
- Predicate pred, const T& new_value);
-T template<class InputIterator, class OutputIterator, class T>
- OutputIterator replace_copy(InputIterator first, InputIterator last,
- OutputIterator result,
- const T& old_value, const T& new_value);
-T template<class Iterator, class OutputIterator, class Predicate, class T>
- OutputIterator replace_copy_if(Iterator first, Iterator last,
- OutputIterator result,
- Predicate pred, const T& new_value);
-T template<class ForwardIterator, class T>
- void fill(ForwardIterator first, ForwardIterator last, const T& value);
-T template<class OutputIterator, class Size, class T>
- void fill_n(OutputIterator first, Size n, const T& value);
-T template<class ForwardIterator, class Generator>
- void generate(ForwardIterator first, ForwardIterator last, Generator gen);
-T template<class OutputIterator, class Size, class Generator>
- void generate_n(OutputIterator first, Size n, Generator gen);
-T template<class ForwardIterator, class T>
- ForwardIterator remove(ForwardIterator first, ForwardIterator last,
- const T& value);
-T template<class ForwardIterator, class Predicate>
- ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
- Predicate pred);
-T template<class InputIterator, class OutputIterator, class T>
- OutputIterator remove_copy(InputIterator first, InputIterator last,
- OutputIterator result, const T& value);
-T template<class InputIterator, class OutputIterator, class Predicate>
- OutputIterator remove_copy_if(InputIterator first, InputIterator last,
- OutputIterator result, Predicate pred);
-T template<class ForwardIterator>
- ForwardIterator unique(ForwardIterator first, ForwardIterator last);
-T template<class ForwardIterator, class BinaryPredicate>
- ForwardIterator unique(ForwardIterator first, ForwardIterator last,
- BinaryPredicate pred);
-T template<class InputIterator, class OutputIterator>
- OutputIterator unique_copy(InputIterator first, InputIterator last,
- OutputIterator result);
-T template<class InputIterator, class OutputIterator, class BinaryPredicate>
- OutputIterator unique_copy(InputIterator first, InputIterator last,
- OutputIterator result, BinaryPredicate pred);
-T template<class BidirectionalIterator>
- void reverse(BidirectionalIterator first, BidirectionalIterator last);
-T template<class BidirectionalIterator, class OutputIterator>
- OutputIterator reverse_copy(BidirectionalIterator first,
- BidirectionalIterator last,
- OutputIterator result);
-
-T template<class ForwardIterator>
- void rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-T template<class ForwardIterator, class OutputIterator>
- OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last, OutputIterator result);
-T template<class RandomAccessIterator>
- void random_shuffle(RandomAccessIterator first,
- RandomAccessIterator last);
-T template<class RandomAccessIterator, class RandomNumberGenerator>
- void random_shuffle(RandomAccessIterator first,
- RandomAccessIterator last,
- RandomNumberGenerator& rand);
- // _lib.alg.partitions_, partitions:
-T template<class BidirectionalIterator, class Predicate>
- BidirectionalIterator partition(BidirectionalIterator first,
- BidirectionalIterator last,
- Predicate pred);
-T template<class BidirectionalIterator, class Predicate>
- BidirectionalIterator stable_partition(BidirectionalIterator first,
- BidirectionalIterator last,
- Predicate pred);
- // _lib.alg.sorting_, sorting and related operations:
- // _lib.alg.sort_, sorting:
-T template<class RandomAccessIterator>
- void sort(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void sort(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-T template<class RandomAccessIterator>
- void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-T template<class RandomAccessIterator>
- void partial_sort(RandomAccessIterator first,
- RandomAccessIterator middle,
- RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void partial_sort(RandomAccessIterator first,
- RandomAccessIterator middle,
- RandomAccessIterator last, Compare comp);
-T template<class InputIterator, class RandomAccessIterator>
- RandomAccessIterator
- partial_sort_copy(InputIterator first, InputIterator last,
- RandomAccessIterator result_first,
- RandomAccessIterator result_last);
-T template<class InputIterator, class RandomAccessIterator, class Compare>
- RandomAccessIterator
- partial_sort_copy(InputIterator first, InputIterator last,
- RandomAccessIterator result_first,
- RandomAccessIterator result_last,
- Compare comp);
-
-T template<class RandomAccessIterator>
- void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
- RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
- RandomAccessIterator last, Compare comp);
- // _lib.alg.binary.search_, binary search:
-T template<class ForwardIterator, class T>
- ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
- const T& value);
-T template<class ForwardIterator, class T, class Compare>
- ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-T template<class ForwardIterator, class T>
- ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
- const T& value);
-T template<class ForwardIterator, class T, class Compare>
- ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-T template<class ForwardIterator, class T>
- pair<ForwardIterator, ForwardIterator>
- equal_range(ForwardIterator first, ForwardIterator last,
- const T& value);
-T template<class ForwardIterator, class T, class Compare>
- pair<ForwardIterator, ForwardIterator>
- equal_range(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-T template<class ForwardIterator, class T>
- bool binary_search(ForwardIterator first, ForwardIterator last,
- const T& value);
-T template<class ForwardIterator, class T, class Compare>
- bool binary_search(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
- // _lib.alg.merge_, merge:
-T template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-T template<class BidirectionalIterator>
- void inplace_merge(BidirectionalIterator first,
- BidirectionalIterator middle,
- BidirectionalIterator last);
-T template<class BidirectionalIterator, class Compare>
- void inplace_merge(BidirectionalIterator first,
- BidirectionalIterator middle,
- BidirectionalIterator last, Compare comp);
-
- // _lib.alg.set.operations_, set operations:
-T template<class InputIterator1, class InputIterator2>
- bool includes(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
-T template<class InputIterator1, class InputIterator2, class Compare>
- bool includes(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2, Compare comp);
-T template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-T template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_intersection
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_intersection
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-T template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_difference
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-T template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator
- set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-T template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator
- set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
- // _lib.alg.heap.operations_, heap operations:
-T template<class RandomAccessIterator>
- void push_heap(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void push_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-
-T template<class RandomAccessIterator>
- void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-T template<class RandomAccessIterator>
- void make_heap(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void make_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-T template<class RandomAccessIterator>
- void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
-T template<class RandomAccessIterator, class Compare>
- void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
- // _lib.alg.min.max_, minimum and maximum:
-T template<class T> const T& min(const T& a, const T& b);
-T template<class T, class Compare>
- const T& min(const T& a, const T& b, Compare comp);
-T template<class T> const T& max(const T& a, const T& b);
-T template<class T, class Compare>
- const T& max(const T& a, const T& b, Compare comp);
-T template<class ForwardIterator>
- ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
-T template<class ForwardIterator, class Compare>
- ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
- Compare comp);
-T template<class ForwardIterator>
- ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
-T template<class ForwardIterator, class Compare>
- ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
- Compare comp);
-T template<class InputIterator1, class InputIterator2>
- bool lexicographical_compare
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
-T template<class InputIterator1, class InputIterator2, class Compare>
- bool lexicographical_compare
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- Compare comp);
-
- // _lib.alg.permutation.generators_, permutations
-T template<class BidirectionalIterator>
- bool next_permutation(BidirectionalIterator first,
- BidirectionalIterator last);
-T template<class BidirectionalIterator, class Compare>
- bool next_permutation(BidirectionalIterator first,
- BidirectionalIterator last, Compare comp);
-T template<class BidirectionalIterator>
- bool prev_permutation(BidirectionalIterator first,
- BidirectionalIterator last);
-T template<class BidirectionalIterator, class Compare>
- bool prev_permutation(BidirectionalIterator first,
- BidirectionalIterator last, Compare comp);
-
-
- 25.4 C library algorithms [lib.alg.c.library]
-
- 1 Header <cstdlib> (partial, Table 2):
-
- Table 2--Header <cstdlib> synopsis
-
- Functions: bsearch qsort
-
-
-X extern "C" void *bsearch(const void *key, const void *base,
- size_t nmemb, size_t size,
- int (*compar)(const void *, const void *));
-X extern "C++" void *bsearch(const void *key, const void *base,
- size_t nmemb, size_t size,
- int (*compar)(const void *, const void *));
-
-X extern "C" void qsort(void* base, size_t nmemb, size_t size,
- int (*compar)(const void*, const void*));
-X extern "C++" void qsort(void* base, size_t nmemb, size_t size,
- int (*compar)(const void*, const void*));
-
-
-
- 26.2 Complex numbers [lib.complex.numbers]
-
-
- 26.2.1 Header <complex> synopsis [lib.complex.synopsis]
-
-T template<class T> class complex;
-T template<> class complex<float>;
-T template<> class complex<double>;
-T template<> class complex<long double>;
- // _lib.complex.ops_ operators:
-T template<class T>
- complex<T> operator+(const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator+(const complex<T>&, const T&);
-T template<class T> complex<T> operator+(const T&, const complex<T>&);
-T template<class T> complex<T> operator-
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator-(const complex<T>&, const T&);
-T template<class T> complex<T> operator-(const T&, const complex<T>&);
-T template<class T> complex<T> operator*
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator*(const complex<T>&, const T&);
-T template<class T> complex<T> operator*(const T&, const complex<T>&);
-T template<class T> complex<T> operator/
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator/(const complex<T>&, const T&);
-T template<class T> complex<T> operator/(const T&, const complex<T>&);
-T template<class T> complex<T> operator+(const complex<T>&);
-T template<class T> complex<T> operator-(const complex<T>&);
-T template<class T> bool operator==
- (const complex<T>&, const complex<T>&);
-T template<class T> bool operator==(const complex<T>&, const T&);
-T template<class T> bool operator==(const T&, const complex<T>&);
-T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
-T template<class T> bool operator!=(const complex<T>&, const T&);
-T template<class T> bool operator!=(const T&, const complex<T>&);
-T template<class T, class charT, class traits>
- basic_istream<charT, traits>&
- operator>>(basic_istream<charT, traits>&, complex<T>&);
-
-T template<class T, class charT, class traits>
- basic_ostream<charT, traits>&
- operator<<(basic_ostream<charT, traits>&, const complex<T>&);
- // _lib.complex.value.ops_ values:
-T template<class T> T real(const complex<T>&);
-T template<class T> T imag(const complex<T>&);
-
-T template<class T> T abs(const complex<T>&);
-T template<class T> T arg(const complex<T>&);
-T template<class T> T norm(const complex<T>&);
-T template<class T> complex<T> conj(const complex<T>&);
-T template<class T> complex<T> polar(const T&, const T&);
- // _lib.complex.transcendentals_ transcendentals:
-T template<class T> complex<T> cos (const complex<T>&);
-T template<class T> complex<T> cosh (const complex<T>&);
-T template<class T> complex<T> exp (const complex<T>&);
-T template<class T> complex<T> log (const complex<T>&);
-T template<class T> complex<T> log10(const complex<T>&);
-T template<class T> complex<T> pow(const complex<T>&, int);
-T template<class T> complex<T> pow(const complex<T>&, const T&);
-T template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
-T template<class T> complex<T> pow(const T&, const complex<T>&);
-T template<class T> complex<T> sin (const complex<T>&);
-T template<class T> complex<T> sinh (const complex<T>&);
-T template<class T> complex<T> sqrt (const complex<T>&);
-T template<class T> complex<T> tan (const complex<T>&);
-T template<class T> complex<T> tanh (const complex<T>&);
- }
-
- 26.2.2 Template class complex [lib.complex]
-
- template<class T>
-T class complex {
- public:
-T typedef T value_type;
-
-T complex(const T& re = T(), const T& im = T());
-T complex(const complex&);
-T template<class X> complex(const complex<X>&);
-
-T T real() const;
-T T imag() const;
-
-T complex<T>& operator= (const T&);
-T complex<T>& operator+=(const T&);
-T complex<T>& operator-=(const T&);
-T complex<T>& operator*=(const T&);
-T complex<T>& operator/=(const T&);
-
-T complex& operator=(const complex&);
-T template<class X> complex<T>& operator= (const complex<X>&);
-T template<class X> complex<T>& operator+=(const complex<X>&);
-T template<class X> complex<T>& operator-=(const complex<X>&);
-T template<class X> complex<T>& operator*=(const complex<X>&);
-T template<class X> complex<T>& operator/=(const complex<X>&);
- };
-
-T template<class T> complex<T> operator+
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator+(const complex<T>&, const T&);
-T template<class T> complex<T> operator+(const T&, const complex<T>&);
-
-T template<class T> complex<T> operator-
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator-(const complex<T>&, const T&);
-T template<class T> complex<T> operator-(const T&, const complex<T>&);
-
-T template<class T> complex<T> operator*
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator*(const complex<T>&, const T&);
-T template<class T> complex<T> operator*(const T&, const complex<T>&);
-
-T template<class T> complex<T> operator/
- (const complex<T>&, const complex<T>&);
-T template<class T> complex<T> operator/(const complex<T>&, const T&);
-T template<class T> complex<T> operator/(const T&, const complex<T>&);
-
-T template<class T> complex<T> operator+(const complex<T>&);
-T template<class T> complex<T> operator-(const complex<T>&);
-
-T template<class T> bool operator==(const complex<T>&, const complex<T>&);
-T template<class T> bool operator==(const complex<T>&, const T&);
-T template<class T> bool operator==(const T&, const complex<T>&);
-
-T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
-T template<class T> bool operator!=(const complex<T>&, const T&);
-T template<class T> bool operator!=(const T&, const complex<T>&);
-
-T template<class T, class charT, class traits>
- basic_istream<charT, traits>&
- operator>>(basic_istream<charT, traits>&, complex<T>&);
-
-T template<class T, class charT, class traits>
- basic_ostream<charT, traits>&
- operator<<(basic_ostream<charT, traits>&, const complex<T>&);
-
-
- 26.2.3 complex specializations [lib.complex.special]
-
-T template<> class complex<float> {
- public:
-T typedef float value_type;
-
-T complex(float re = 0.0f, float im = 0.0f);
-T explicit complex(const complex<double>&);
-T explicit complex(const complex<long double>&);
-T float real() const;
-T float imag() const;
-
-T complex<float>& operator= (float);
-T complex<float>& operator+=(float);
-T complex<float>& operator-=(float);
-T complex<float>& operator*=(float);
-T complex<float>& operator/=(float);
-
-T complex<float>& operator=(const complex<float>&);
-T template<class X> complex<float>& operator= (const complex<X>&);
-T template<class X> complex<float>& operator+=(const complex<X>&);
-T template<class X> complex<float>& operator-=(const complex<X>&);
-T template<class X> complex<float>& operator*=(const complex<X>&);
-T template<class X> complex<float>& operator/=(const complex<X>&);
- };
-T template<> class complex<double> {
- public:
-T typedef double value_type;
-
-T complex(double re = 0.0, double im = 0.0);
-T complex(const complex<float>&);
-T explicit complex(const complex<long double>&);
-T double real() const;
-T double imag() const;
-
-T complex<double>& operator= (double);
-T complex<double>& operator+=(double);
-T complex<double>& operator-=(double);
-T complex<double>& operator*=(double);
-T complex<double>& operator/=(double);
-
-T complex<double>& operator=(const complex<double>&);
-T template<class X> complex<double>& operator= (const complex<X>&);
-T template<class X> complex<double>& operator+=(const complex<X>&);
-T template<class X> complex<double>& operator-=(const complex<X>&);
-T template<class X> complex<double>& operator*=(const complex<X>&);
-T template<class X> complex<double>& operator/=(const complex<X>&);
- };
-
-T template<> class complex<long double> {
- public:
-T typedef long double value_type;
-
-T complex(long double re = 0.0L, long double im = 0.0L);
-T complex(const complex<float>&);
-T complex(const complex<double>&);
-T long double real() const;
-T long double imag() const;
-
-T complex<long double>& operator=(const complex<long double>&);
-T complex<long double>& operator= (long double);
-T complex<long double>& operator+=(long double);
-T complex<long double>& operator-=(long double);
-T complex<long double>& operator*=(long double);
-T complex<long double>& operator/=(long double);
-
-T template<class X> complex<long double>& operator= (const complex<X>&);
-T template<class X> complex<long double>& operator+=(const complex<X>&);
-T template<class X> complex<long double>& operator-=(const complex<X>&);
-T template<class X> complex<long double>& operator*=(const complex<X>&);
-T template<class X> complex<long double>& operator/=(const complex<X>&);
- };
-
- 26.3 Numeric arrays [lib.numarray]
-
- 26.3.1 Header <valarray> synopsis [lib.valarray.synopsis]
-
-T template<class T> class valarray; // An array of type T
-T class slice;
-T template<class T> class slice_array;
-T class gslice;
-T template<class T> class gslice_array;
-T template<class T> class mask_array; // a masked array
-T template<class T> class indirect_array; // an indirected array
-
-T template<class T> valarray<T> operator*
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator* (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator* (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator/
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator/ (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator%
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator% (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator% (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator+
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator+ (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator+ (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator-
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator- (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator- (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator^
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator^ (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator^ (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator&
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator& (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator& (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator|
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator| (const valarray<T>&, const T&);
-T template<class T> valarray<T> operator| (const T&, const valarray<T>&);
-T template<class T> valarray<T> operator<<
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator<<(const valarray<T>&, const T&);
-T template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
-T template<class T> valarray<T> operator>>
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
-T template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
-T template<class T> valarray<bool> operator&&
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
-T template<class T> valarray<bool> operator||
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
-
-T template<class T>
- valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
-T template<class T>
- valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator!=(const T&, const valarray<T>&);
-T template<class T>
- valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator< (const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator< (const T&, const valarray<T>&);
-T template<class T>
- valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator> (const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator> (const T&, const valarray<T>&);
-T template<class T>
- valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator<=(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator<=(const T&, const valarray<T>&);
-T template<class T>
- valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<bool> operator>=(const valarray<T>&, const T&);
-T template<class T> valarray<bool> operator>=(const T&, const valarray<T>&);
-T template<class T> valarray<T> abs (const valarray<T>&);
-T template<class T> valarray<T> acos (const valarray<T>&);
-T template<class T> valarray<T> asin (const valarray<T>&);
-T template<class T> valarray<T> atan (const valarray<T>&);
-T template<class T> valarray<T> atan2
- (const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> atan2(const valarray<T>&, const T&);
-T template<class T> valarray<T> atan2(const T&, const valarray<T>&);
-T template<class T> valarray<T> cos (const valarray<T>&);
-T template<class T> valarray<T> cosh (const valarray<T>&);
-T template<class T> valarray<T> exp (const valarray<T>&);
-T template<class T> valarray<T> log (const valarray<T>&);
-T template<class T> valarray<T> log10(const valarray<T>&);
-T template<class T> valarray<T> pow(const valarray<T>&, const valarray<T>&);
-T template<class T> valarray<T> pow(const valarray<T>&, const T&);
-T template<class T> valarray<T> pow(const T&, const valarray<T>&);
-T template<class T> valarray<T> sin (const valarray<T>&);
-T template<class T> valarray<T> sinh (const valarray<T>&);
-T template<class T> valarray<T> sqrt (const valarray<T>&);
-T template<class T> valarray<T> tan (const valarray<T>&);
-T template<class T> valarray<T> tanh (const valarray<T>&);
- }
-
-
- 26.3.2 Template class valarray [lib.template.valarray]
-
-T template<class T> class valarray {
- public:
-T typedef T value_type;
-
- // _lib.valarray.cons_ construct/destroy:
-T valarray();
-T explicit valarray(size_t);
-T valarray(const T&, size_t);
-T valarray(const T*, size_t);
-T valarray(const valarray&);
-T valarray(const slice_array<T>&);
-T valarray(const gslice_array<T>&);
-T valarray(const mask_array<T>&);
-T valarray(const indirect_array<T>&);
-T ~valarray();
-
- // _lib.valarray.assign_ assignment:
-T valarray<T>& operator=(const valarray<T>&);
-T valarray<T>& operator=(const T&);
-T valarray<T>& operator=(const slice_array<T>&);
-T valarray<T>& operator=(const gslice_array<T>&);
-T valarray<T>& operator=(const mask_array<T>&);
-T valarray<T>& operator=(const indirect_array<T>&);
- // _lib.valarray.access_ element access:
-T T operator[](size_t) const;
-T T& operator[](size_t);
- // _lib.valarray.sub_ subset operations:
-T valarray<T> operator[](slice) const;
-T slice_array<T> operator[](slice);
-T valarray<T> operator[](const gslice&) const;
-T gslice_array<T> operator[](const gslice&);
-T valarray<T> operator[](const valarray<bool>&) const;
-T mask_array<T> operator[](const valarray<bool>&);
-T valarray<T> operator[](const valarray<size_t>&) const;
-T indirect_array<T> operator[](const valarray<size_t>&);
- // _lib.valarray.unary_ unary operators:
-T valarray<T> operator+() const;
-T valarray<T> operator-() const;
-T valarray<T> operator~() const;
-T valarray<T> operator!() const;
- // _lib.valarray.cassign_ computed assignment:
-T valarray<T>& operator*= (const T&);
-T valarray<T>& operator/= (const T&);
-T valarray<T>& operator%= (const T&);
-T valarray<T>& operator+= (const T&);
-T valarray<T>& operator-= (const T&);
-T valarray<T>& operator^= (const T&);
-T valarray<T>& operator&= (const T&);
-T valarray<T>& operator|= (const T&);
-T valarray<T>& operator<<=(const T&);
-T valarray<T>& operator>>=(const T&);
-T valarray<T>& operator*= (const valarray<T>&);
-T valarray<T>& operator/= (const valarray<T>&);
-T valarray<T>& operator%= (const valarray<T>&);
-T valarray<T>& operator+= (const valarray<T>&);
-T valarray<T>& operator-= (const valarray<T>&);
-T valarray<T>& operator^= (const valarray<T>&);
-T valarray<T>& operator|= (const valarray<T>&);
-T valarray<T>& operator&= (const valarray<T>&);
-T valarray<T>& operator<<=(const valarray<T>&);
-T valarray<T>& operator>>=(const valarray<T>&);
- // _lib.valarray.members_ member functions:
-T size_t size() const;
-T T sum() const;
-T T min() const;
-T T max() const;
-
-T valarray<T> shift (int) const;
-T valarray<T> cshift(int) const;
-T valarray<T> apply(T func(T)) const;
-T valarray<T> apply(T func(const T&)) const;
-T void resize(size_t sz, T c = T());
- };
- }
-
-
-
- 26.3.4 Class slice [lib.class.slice]
-
-T class slice {
- public:
-T slice();
-T slice(size_t, size_t, size_t);
-
-T size_t start() const;
-T size_t size() const;
-T size_t stride() const;
- };
- }
-
-
-
- 26.3.5 Template class slice_array [lib.template.slice.array]
-
-T template <class T> class slice_array {
- public:
-T typedef T value_type;
-
-T void operator= (const valarray<T>&) const;
-T void operator*= (const valarray<T>&) const;
-T void operator/= (const valarray<T>&) const;
-T void operator%= (const valarray<T>&) const;
-T void operator+= (const valarray<T>&) const;
-T void operator-= (const valarray<T>&) const;
-T void operator^= (const valarray<T>&) const;
-T void operator&= (const valarray<T>&) const;
-T void operator|= (const valarray<T>&) const;
-T void operator<<=(const valarray<T>&) const;
-T void operator>>=(const valarray<T>&) const;
-T void operator=(const T&);
-T ~slice_array();
- private:
-T slice_array();
-T slice_array(const slice_array&);
-T slice_array& operator=(const slice_array&);
- };
- }
-
-
-
- 26.3.6 The gslice class [lib.class.gslice]
-
-T class gslice {
- public:
-T gslice();
-T gslice(size_t s, const valarray<size_t>& l, const valarray<size_t>& d);
-
-T size_t start() const;
-T valarray<size_t> size() const;
-T valarray<size_t> stride() const;
- };
-
-
- 26.3.7 Template class gslice_array [lib.template.gslice.array]
-
-T template <class T> class gslice_array {
- public:
-T typedef T value_type;
-
-T void operator= (const valarray<T>&) const;
-T void operator*= (const valarray<T>&) const;
-T void operator/= (const valarray<T>&) const;
-T void operator%= (const valarray<T>&) const;
-T void operator+= (const valarray<T>&) const;
-T void operator-= (const valarray<T>&) const;
-T void operator^= (const valarray<T>&) const;
-T void operator&= (const valarray<T>&) const;
-T void operator|= (const valarray<T>&) const;
-T void operator<<=(const valarray<T>&) const;
-T void operator>>=(const valarray<T>&) const;
-T void operator=(const T&);
-T ~gslice_array();
- private:
-T gslice_array();
-T gslice_array(const gslice_array&);
-T gslice_array& operator=(const gslice_array&);
- };
-
-
- 26.3.8 Template class mask_array [lib.template.mask.array]
-
-T template <class T> class mask_array {
- public:
-T typedef T value_type;
-
-T void operator= (const valarray<T>&) const;
-T void operator*= (const valarray<T>&) const;
-T void operator/= (const valarray<T>&) const;
-T void operator%= (const valarray<T>&) const;
-T void operator+= (const valarray<T>&) const;
-T void operator-= (const valarray<T>&) const;
-T void operator^= (const valarray<T>&) const;
-T void operator&= (const valarray<T>&) const;
-T void operator|= (const valarray<T>&) const;
-T void operator<<=(const valarray<T>&) const;
-T void operator>>=(const valarray<T>&) const;
-T void operator=(const T&);
-T ~mask_array();
- private:
-T mask_array();
-T mask_array(const mask_array&);
-T mask_array& operator=(const mask_array&);
- // remainder implementation defined
- };
-
-
- 26.3.9 Template class [lib.template.indirect.array]
- indirect_array
-
-T template <class T> class indirect_array {
- public:
-T typedef T value_type;
-
-T void operator= (const valarray<T>&) const;
-T void operator*= (const valarray<T>&) const;
-T void operator/= (const valarray<T>&) const;
-T void operator%= (const valarray<T>&) const;
-T void operator+= (const valarray<T>&) const;
-T void operator-= (const valarray<T>&) const;
-T void operator^= (const valarray<T>&) const;
-T void operator&= (const valarray<T>&) const;
-T void operator|= (const valarray<T>&) const;
-T void operator<<=(const valarray<T>&) const;
-T void operator>>=(const valarray<T>&) const;
-T void operator=(const T&);
-T ~indirect_array();
- private:
-T indirect_array();
-T indirect_array(const indirect_array&);
-T indirect_array& operator=(const indirect_array&);
- // remainder implementation defined
- };
-
- 26.4 Generalized numeric operations [lib.numeric.ops]
-
- Header <numeric> synopsis
-
-T template <class InputIterator, class T>
- T accumulate(InputIterator first, InputIterator last, T init);
-
-T template <class InputIterator, class T, class BinaryOperation>
- T accumulate(InputIterator first, InputIterator last, T init,
- BinaryOperation binary_op);
-
-T template <class InputIterator1, class InputIterator2, class T>
- T inner_product(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, T init);
-
-T template <class InputIterator1, class InputIterator2, class T,
- class BinaryOperation1, class BinaryOperation2>
- T inner_product(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, T init,
- BinaryOperation1 binary_op1,
- BinaryOperation2 binary_op2);
-
-T template <class InputIterator, class OutputIterator>
- OutputIterator partial_sum(InputIterator first,
- InputIterator last,
- OutputIterator result);
-
-T template <class InputIterator, class OutputIterator,
- class BinaryOperation>
- OutputIterator partial_sum(InputIterator first,
- InputIterator last,
- OutputIterator result,
- BinaryOperation binary_op);
-
-T template <class InputIterator, class OutputIterator>
- OutputIterator adjacent_difference(InputIterator first,
- InputIterator last,
- OutputIterator result);
-
-T template <class InputIterator, class OutputIterator,
- class BinaryOperation>
- OutputIterator adjacent_difference(InputIterator first,
- InputIterator last,
- OutputIterator result,
- BinaryOperation binary_op);
-
-
- 26.5 C Library [lib.c.math]
-
- Table 2--Header <cmath> synopsis
-X Macro: HUGE_VAL
- Functions:
-X acos cos fmod modf tan
-X asin cosh frexp pow tanh
-X atan exp ldexp sin
-X atan2 fabs log sinh
-X ceil floor log10 sqrt
-
- Table 3--Header <cstdlib> synopsis
-X Macros: RAND_MAX
-X Types: div_t ldiv_t
- Functions:
-X abs labs srand
-X div ldiv rand
-
-X long abs(long); // labs()
-X ldiv_t div(long, long); // ldiv()
-
-X float abs (float);
-X float acos (float);
-X float asin (float);
-X float atan (float);
-X float atan2(float, float);
-X float ceil (float);
-X float cos (float);
-X float cosh (float);
-X float exp (float);
-X float fabs (float);
-X float floor(float);
-X float fmod (float, float);
-X float frexp(float, int*);
-X float ldexp(float, int);
-X float log (float);
-X float log10(float);
-X float modf (float, float*);
-X float pow (float, float);
-X float pow (float, int);
-X float sin (float);
-X float sinh (float);
-X float sqrt (float);
-X float tan (float);
-X float tanh (float);
-
-X double abs(double); // fabs()
-X double pow(double, int);
-
-X long double abs (long double);
-X long double acos (long double);
-X long double asin (long double);
-X long double atan (long double);
-X long double atan2(long double, long double);
-X long double ceil (long double);
-X long double cos (long double);
-X long double cosh (long double);
-X long double exp (long double);
-X long double fabs (long double);
-X long double floor(long double);
-X long double fmod (long double, long double);
-X long double frexp(long double, int*);
-X long double ldexp(long double, int);
-X long double log (long double);
-X long double log10(long double);
-X long double modf (long double, long double*);
-X long double pow (long double, long double);
-X long double pow (long double, int);
-X long double sin (long double);
-X long double sinh (long double);
-X long double sqrt (long double);
-X long double tan (long double);
-X long double tanh (long double);
-
- Header <iosfwd> synopsis
-
-X template<class charT> class char_traits;
-X template<> class char_traits<char>;
-X template<> class char_traits<wchar_t>;
-X template<class T> class allocator;
-X template <class charT, class traits = char_traits<charT> >
- class basic_ios;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_streambuf;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_istream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ostream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_iostream;
-
-X template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_stringbuf;
-
-X template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_istringstream;
-
-X template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_ostringstream;
-
-X template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_stringstream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_filebuf;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ifstream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ofstream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_fstream;
-X template <class charT, class traits = char_traits<charT> >
- class istreambuf_iterator;
-
-X template <class charT, class traits = char_traits<charT> >
- class ostreambuf_iterator;
-X typedef basic_ios<char> ios;
-X typedef basic_ios<wchar_t> wios;
-X typedef basic_streambuf<char> streambuf;
-X typedef basic_istream<char> istream;
-X typedef basic_ostream<char> ostream;
-X typedef basic_iostream<char> iostream;
-X typedef basic_stringbuf<char> stringbuf;
-X typedef basic_istringstream<char> istringstream;
-X typedef basic_ostringstream<char> ostringstream;
-X typedef basic_stringstream<char> stringstream;
-X typedef basic_filebuf<char> filebuf;
-X typedef basic_ifstream<char> ifstream;
-X typedef basic_ofstream<char> ofstream;
-X typedef basic_fstream<char> fstream;
-X typedef basic_streambuf<wchar_t> wstreambuf;
-X typedef basic_istream<wchar_t> wistream;
-X typedef basic_ostream<wchar_t> wostream;
-X typedef basic_iostream<wchar_t> wiostream;
-X typedef basic_stringbuf<wchar_t> wstringbuf;
-X typedef basic_istringstream<wchar_t> wistringstream;
-X typedef basic_ostringstream<wchar_t> wostringstream;
-X typedef basic_stringstream<wchar_t> wstringstream;
-
-X typedef basic_filebuf<wchar_t> wfilebuf;
-X typedef basic_ifstream<wchar_t> wifstream;
-X typedef basic_ofstream<wchar_t> wofstream;
-X typedef basic_fstream<wchar_t> wfstream;
-X template <class state> class fpos;
-X typedef fpos<char_traits<char>::state_type> streampos;
-X typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
-
- 27.3 Standard iostream objects [lib.iostream.objects]
-
- Header <iostream> synopsis
-
-T [must also include <istream> and <ostream>]
-T extern istream cin;
-T extern ostream cout;
-T extern ostream cerr;
-T extern ostream clog;
-
-T extern wistream wcin;
-T extern wostream wcout;
-T extern wostream wcerr;
-T extern wostream wclog;
-
- 27.4 Iostreams base classes [lib.iostreams.base]
-
- Header <ios> synopsis
-
- #include <iosfwd>
-
-T typedef OFF_T streamoff;
-T typedef SZ_T streamsize;
-T template <class stateT> class fpos;
-
- class ios_base;
- template <class charT, class traits = char_traits<charT> >
- class basic_ios;
- // _lib.std.ios.manip_, manipulators:
-T ios_base& boolalpha (ios_base& str);
-T ios_base& noboolalpha(ios_base& str);
-T ios_base& showbase (ios_base& str);
-T ios_base& noshowbase (ios_base& str);
-T ios_base& showpoint (ios_base& str);
-T ios_base& noshowpoint(ios_base& str);
-T ios_base& showpos (ios_base& str);
-T ios_base& noshowpos (ios_base& str);
-T ios_base& skipws (ios_base& str);
-T ios_base& noskipws (ios_base& str);
-T ios_base& nouppercase(ios_base& str);
-T ios_base& uppercase (ios_base& str);
-M ios_base& unitbuf (ios_base& str);
-M ios_base& nounitbuf (ios_base& str);
- // _lib.adjustfield.manip_ adjustfield:
-T ios_base& internal (ios_base& str);
-T ios_base& left (ios_base& str);
-T ios_base& right (ios_base& str);
- // _lib.basefield.manip_ basefield:
-T ios_base& dec (ios_base& str);
-T ios_base& hex (ios_base& str);
-T ios_base& oct (ios_base& str);
-
- // _lib.floatfield.manip_ floatfield:
-T ios_base& fixed (ios_base& str);
-T ios_base& scientific (ios_base& str);
-
-
- 27.4.2 Class ios_base [lib.ios.base]
-
-T class ios_base {
- public:
- class failure;
-T typedef T1 fmtflags;
-T static const fmtflags boolalpha;
-T static const fmtflags dec;
-T static const fmtflags fixed;
-T static const fmtflags hex;
-T static const fmtflags internal;
-T static const fmtflags left;
-T static const fmtflags oct;
-T static const fmtflags right;
-T static const fmtflags scientific;
-T static const fmtflags showbase;
-T static const fmtflags showpoint;
-T static const fmtflags showpos;
-T static const fmtflags skipws;
-X static const fmtflags unitbuf;
-T static const fmtflags uppercase;
-T static const fmtflags adjustfield;
-T static const fmtflags basefield;
-T static const fmtflags floatfield;
-
- typedef T2 iostate;
-T static const iostate badbit;
-T static const iostate eofbit;
-T static const iostate failbit;
-T static const iostate goodbit;
-T typedef T3 openmode;
-T static const openmode app;
-T static const openmode ate;
-T static const openmode binary;
-T static const openmode in;
-T static const openmode out;
-T static const openmode trunc;
-T typedef T4 seekdir;
-T static const seekdir beg;
-T static const seekdir cur;
-T static const seekdir end;
-T class Init;
- // _lib.fmtflags.state_ fmtflags state:
-T fmtflags flags() const;
-T fmtflags flags(fmtflags fmtfl);
-T fmtflags setf(fmtflags fmtfl);
-T fmtflags setf(fmtflags fmtfl, fmtflags mask);
-T void unsetf(fmtflags mask);
-T streamsize precision() const;
-T streamsize precision(streamsize prec);
-T streamsize width() const;
-T streamsize width(streamsize wide);
- // _lib.ios.base.locales_ locales:
-T locale imbue(const locale& loc);
-T locale getloc() const;
- // _lib.ios.base.storage_ storage:
-T static int xalloc();
-T long& iword(int index);
-T void*& pword(int index);
- // destructor
-T virtual ~ios_base();
- // _lib.ios.base.callback_ callbacks;
-T enum event { erase_event, imbue_event, copyfmt_event };
-T typedef void (*event_callback)(event, ios_base&, int index);
-T void register_callback(event_call_back fn, int index);
-T static bool sync_with_stdio(bool sync = true);
- protected:
-T ios_base();
- };
-
- 27.4.2.1.1 Class ios_base::failure [lib.ios::failure]
-
-T class ios_base::failure : public exception {
- public:
-T explicit failure(const string& msg);
-T virtual ~failure();
-T virtual const char* what() const throw();
- };
-
-
- 27.4.2.1.6 Class ios_base::Init [lib.ios::Init]
-
-T class ios_base::Init {
- public:
-T Init();
-T ~Init();
- };
-
-
- 27.4.3 Template class fpos [lib.fpos]
-
-X template <class stateT> class fpos {
- public:
- // _lib.fpos.members_ Members
-T stateT state() const;
-T void state(stateT);
- private;
-T stateT st; // exposition only
- };
-
-
- 27.4.5 Template class basic_ios [lib.ios]
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_ios : public ios_base {
- public:
-
- // Types:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
-T operator void*() const
-T bool operator!() const
-T iostate rdstate() const;
-T void clear(iostate state = goodbit);
-T void setstate(iostate state);
-T bool good() const;
-T bool eof() const;
-T bool fail() const;
-T bool bad() const;
-T iostate exceptions() const;
-T void exceptions(iostate except);
- // _lib.basic.ios.cons_ Constructor/destructor:
-T explicit basic_ios(basic_streambuf<charT,traits>* sb);
-T virtual ~basic_ios();
- // _lib.basic.ios.members_ Members:
-T basic_ostream<charT,traits>* tie() const;
-T basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr);
-T basic_streambuf<charT,traits>* rdbuf() const;
-T basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb);
-X basic_ios& copyfmt(const basic_ios& rhs);
-T char_type fill() const;
-T char_type fill(char_type ch);
- // _lib.ios.base.locales_ locales:
-T locale imbue(const locale& loc);
-X char narrow(char_type c, char dfault) const;
-X char_type widen(char c) const;
- protected:
- basic_ios();
-T void init(basic_streambuf<charT,traits>* sb);
- private:
-T basic_ios(const basic_ios& ); // not defined
-T basic_ios& operator=(const basic_ios&); // not defined
- };
-
-
- 27.5 Stream buffers [lib.stream.buffers]
-
- Header <streambuf> synopsis
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_streambuf;
-T typedef basic_streambuf<char> streambuf;
-T typedef basic_streambuf<wchar_t> wstreambuf;
-
- 27.5.2 Template class [lib.streambuf]
- basic_streambuf<charT,traits>
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_streambuf {
- public:
-
- // Types:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
-T virtual ~basic_streambuf();
- // _lib.streambuf.locales_ locales:
-T locale pubimbue(const locale &loc);
-T locale getloc() const;
- // _lib.streambuf.buffer_ buffer and positioning:
-T basic_streambuf<char_type,traits>*
- pubsetbuf(char_type* s, streamsize n);
-T pos_type pubseekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode which =
- ios_base::in | ios_base::out);
-T pos_type pubseekpos(pos_type sp,
- ios_base::openmode which =
- ios_base::in | ios_base::out);
-T int pubsync();
-
- // Get and put areas:
- // _lib.streambuf.pub.get_ Get area:
-T streamsize in_avail();
-T int_type snextc();
-T int_type sbumpc();
-T int_type sgetc();
-T streamsize sgetn(char_type* s, streamsize n);
- // _lib.streambuf.pub.pback_ Putback:
-X int_type sputbackc(char_type c);
-X int_type sungetc();
- // _lib.streambuf.pub.put_ Put area:
-T int_type sputc(char_type c);
-X streamsize sputn(const char_type* s, streamsize n);
- protected:
-T basic_streambuf();
- // _lib.streambuf.get.area_ Get area:
-T char_type* eback() const;
-T char_type* gptr() const;
-T char_type* egptr() const;
-T void gbump(int n);
-T void setg(char_type* gbeg, char_type* gnext, char_type* gend);
- // _lib.streambuf.put.area_ Put area:
-T char_type* pbase() const;
-T char_type* pptr() const;
-T char_type* epptr() const;
-T void pbump(int n);
-T void setp(char_type* pbeg, char_type* pend);
- // _lib.streambuf.virtuals_ virtual functions:
- // _lib.streambuf.virt.locales_ Locales:
-T virtual void imbue(const locale &loc);
- // _lib.streambuf.virt.buffer_ Buffer management and positioning:
-T virtual basic_streambuf<char_type,traits>*
- setbuf(char_type* s, streamsize n);
-T virtual pos_type seekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode which = ios_base::in | ios_base::out);
-T virtual pos_type seekpos(pos_type sp,
- ios_base::openmode which = ios_base::in | ios_base::out);
-T virtual int sync();
- // _lib.streambuf.virt.get_ Get area:
-T virtual int showmanyc();
-T virtual streamsize xsgetn(char_type* s, streamsize n);
-T virtual int_type underflow();
-T virtual int_type uflow();
- // _lib.streambuf.virt.pback_ Putback:
-T virtual int_type pbackfail(int_type c = traits::eof());
- // _lib.streambuf.virt.put_ Put area:
-X virtual streamsize xsputn(const char_type* s, streamsize n);
-T virtual int_type overflow (int_type c = traits::eof());
- };
-
- 27.6 Formatting and manipulators [lib.iostream.format]
-
- Header <istream> synopsis
-
-T template <class charT, class traits = char_traits<charT> >
- class basic_istream;
-T typedef basic_istream<char> istream;
-T typedef basic_istream<wchar_t> wistream;
-
-T template <class charT, class traits = char_traits<charT> >
- class basic_iostream;
-T typedef basic_iostream<char> iostream;
-T typedef basic_iostream<wchar_t> wiostream;
-
-X template <class charT, class traits>
- basic_istream<charT,traits>& ws(basic_istream<charT,traits>& is);
-
- Header <ostream> synopsis
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ostream;
-T typedef basic_ostream<char> ostream;
-T typedef basic_ostream<wchar_t> wostream;
-
-T template <class charT, class traits>
- basic_ostream<charT,traits>& endl(basic_ostream<charT,traits>& os);
-T template <class charT, class traits>
- basic_ostream<charT,traits>& ends(basic_ostream<charT,traits>& os);
-T template <class charT, class traits>
- basic_ostream<charT,traits>& flush(basic_ostream<charT,traits>& os);
-
- Header <iomanip> synopsis
-
- // Types T1, T2, ... are unspecified implementation types
-T T1 resetiosflags(ios_base::fmtflags mask);
-T T2 setiosflags (ios_base::fmtflags mask);
-T T3 setbase(int base);
-T template<charT> T4 setfill(charT c);
-T T5 setprecision(int n);
-T T6 setw(int n);
-
-
- 27.6.1.1 Template class basic_istream [lib.istream]
-
- template <class charT, class traits = char_traits<charT> >
-T class basic_istream : virtual public basic_ios<charT,traits> {
- public:
- // Types (inherited from basic_ios (_lib.ios_)):
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.istream.cons_ Constructor/destructor:
-T explicit basic_istream(basic_streambuf<charT,traits>* sb);
-T virtual ~basic_istream();
- // _lib.istream::sentry_ Prefix/suffix:
-T class sentry;
-
- // _lib.istream.formatted_ Formatted input:
-T basic_istream<charT,traits>& operator>>
- (basic_istream<charT,traits>& (*pf)(basic_istream<charT,traits>&))
-T basic_istream<charT,traits>& operator>>
- (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&))
-T basic_istream<charT,traits>& operator>>
- (ios_base& (*pf)(ios_base&))
-S basic_istream<charT,traits>& operator>>(bool& n);
-S basic_istream<charT,traits>& operator>>(short& n);
-S basic_istream<charT,traits>& operator>>(unsigned short& n);
-S basic_istream<charT,traits>& operator>>(int& n);
-S basic_istream<charT,traits>& operator>>(unsigned int& n);
-S basic_istream<charT,traits>& operator>>(long& n);
-S basic_istream<charT,traits>& operator>>(unsigned long& n);
-S basic_istream<charT,traits>& operator>>(float& f);
-S basic_istream<charT,traits>& operator>>(double& f);
-S basic_istream<charT,traits>& operator>>(long double& f);
-S basic_istream<charT,traits>& operator>>(void*& p);
-S basic_istream<charT,traits>& operator>>
- (basic_streambuf<char_type,traits>* sb);
- // _lib.istream.unformatted_ Unformatted input:
-T streamsize gcount() const;
-S int_type get();
-S basic_istream<charT,traits>& get(char_type& c);
-S basic_istream<charT,traits>& get(char_type* s, streamsize n);
-S basic_istream<charT,traits>& get(char_type* s, streamsize n,
- char_type delim);
-S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb);
-S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb,
- char_type delim);
-S basic_istream<charT,traits>& getline(char_type* s, streamsize n);
-S basic_istream<charT,traits>& getline(char_type* s, streamsize n,
- char_type delim);
-S basic_istream<charT,traits>& ignore
- (streamsize n = 1, int_type delim = traits::eof());
-S int_type peek();
-S basic_istream<charT,traits>& read (char_type* s, streamsize n);
-S streamsize readsome(char_type* s, streamsize n);
-S basic_istream<charT,traits>& putback(char_type c);
-S basic_istream<charT,traits>& unget();
-S int sync();
-
-S pos_type tellg();
-S basic_istream<charT,traits>& seekg(pos_type);
-S basic_istream<charT,traits>& seekg(off_type, ios_base::seekdir);
- };
-
- // _lib.istream::extractors_ character extraction templates:
-S template<class charT, class traits>
- basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
- charT&);
-S template<class traits>
- basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
- unsigned char&);
-S template<class traits>
- basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
- signed char&);
-
-S template<class charT, class traits>
- basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
- charT*);
-S template<class traits>
- basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
- unsigned char*);
-S template<class traits>
- basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
- signed char*);
-
- 27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry]
-
-
- template <class charT,class traits = char_traits<charT> >
-S class basic_istream<charT,traits>::sentry {
- typedef traits traits_type;
-S bool ok_; // exposition only
- public:
-S explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
-S ~sentry();
-S operator bool() const { return ok_; }
- private:
-T sentry(const sentry&); // not defined
-T sentry& operator=(const sentry&); // not defined
- };
-
-
- 27.6.1.5 Template class basic_iostream [lib.iostreamclass]
-
- template <class charT, class traits = char_traits<charT> >
-T class basic_iostream :
- public basic_istream<charT,traits>,
- public basic_ostream<charT,traits> {
- public:
- // constructor/destructor
-T explicit basic_iostream(basic_streambuf<charT,traits>* sb);
-T virtual ~basic_iostream();
- };
-
-
- 27.6.2.1 Template class basic_ostream [lib.ostream]
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_ostream : virtual public basic_ios<charT,traits> {
- public:
- // Types (inherited from basic_ios (_lib.ios_)):
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.ostream.cons_ Constructor/destructor:
-T explicit basic_ostream(basic_streambuf<char_type,traits>* sb);
-T virtual ~basic_ostream();
- // _lib.ostream::sentry_ Prefix/suffix:
-T class sentry;
- // _lib.ostream.formatted_ Formatted output:
-T basic_ostream<charT,traits>& operator<<
- (basic_ostream<charT,traits>& (*pf)(basic_ostream<charT,traits>&));
-T basic_ostream<charT,traits>& operator<<
- (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&));
-T basic_ostream<charT,traits>& operator<<
- (ios_base& (*pf)(ios_base&));
-T basic_ostream<charT,traits>& operator<<(bool n);
-T basic_ostream<charT,traits>& operator<<(short n);
-T basic_ostream<charT,traits>& operator<<(unsigned short n);
-T basic_ostream<charT,traits>& operator<<(int n);
-T basic_ostream<charT,traits>& operator<<(unsigned int n);
-T basic_ostream<charT,traits>& operator<<(long n);
-T basic_ostream<charT,traits>& operator<<(unsigned long n);
-S basic_ostream<charT,traits>& operator<<(float f);
-S basic_ostream<charT,traits>& operator<<(double f);
-S basic_ostream<charT,traits>& operator<<(long double f);
-T basic_ostream<charT,traits>& operator<<(const void* p);
-X basic_ostream<charT,traits>& operator<<
- (basic_streambuf<char_type,traits>* sb);
- // _lib.ostream.unformatted_ Unformatted output:
-T basic_ostream<charT,traits>& put(char_type c);
-T basic_ostream<charT,traits>& write(const char_type* s, streamsize n);
-X basic_ostream<charT,traits>& flush();
-
- // _lib.ostream.seeks_ seeks:
-S pos_type tellp();
-S basic_ostream<charT,traits>& seekp(pos_type);
-S basic_ostream<charT,traits>& seekp(off_type, ios_base::seekdir);
- };
- // _lib.ostream.inserters.character_ character inserters
-X template<class charT, class traits>
- basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
- charT);
-X template<class charT, class traits>
- basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
- char);
- // specialization
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- char);
- // signed and unsigned
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- signed char);
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- unsigned char)
-X template<class charT, class traits>
- basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
- const charT*);
-X template<class charT, class traits>
- basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
- const char*);
- // partial specializationss
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- const char*);
- // signed and unsigned
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- const signed char*);
-X template<class traits>
- basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
- const unsigned char*);
-
-
- 27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry]
-
- template <class charT,class traits = char_traits<charT> >
-X class basic_ostream<charT,traits>::sentry {
- bool ok_; // exposition only
- public:
-X explicit sentry(basic_ostream<charT,traits>& os);
-X ~sentry();
-X operator bool() const { return ok_; }
- private
-X sentry(const sentry&); // not defined
-X sentry& operator=(const sentry&); // not defined
- };
-
- 27.7 String-based streams [lib.string.streams]
-
- Header <sstream> synopsis
-
-X template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_stringbuf;
-
-T typedef basic_stringbuf<char> stringbuf;
-T typedef basic_stringbuf<wchar_t> wstringbuf;
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_istringstream;
-
-T typedef basic_istringstream<char> istringstream;
-T typedef basic_istringstream<wchar_t> wistringstream;
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_ostringstream;
-T typedef basic_ostringstream<char> ostringstream;
-T typedef basic_ostringstream<wchar_t> wostringstream;
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_stringstream;
-T typedef basic_stringstream<char> stringstream;
-T typedef basic_stringstream<wchar_t> wstringstream;
-
- 27.7.1 Template class basic_stringbuf [lib.stringbuf]
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_stringbuf : public basic_streambuf<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.stringbuf.cons_ Constructors:
-S explicit basic_stringbuf(ios_base::openmode which
- = ios_base::in | ios_base::out);
-S explicit basic_stringbuf
- (const basic_string<charT,traits,Allocator>& str,
- ios_base::openmode which = ios_base::in | ios_base::out);
- // _lib.stringbuf.members_ Get and set:
-S basic_string<charT,traits,Allocator> str() const;
-S void str(const basic_string<charT,traits,Allocator>& s);
-
- protected:
- // _lib.stringbuf.virtuals_ Overridden virtual functions:
-S virtual int_type underflow();
-S virtual int_type pbackfail(int_type c = traits::eof());
-S virtual int_type overflow (int_type c = traits::eof());
-S virtual basic_streambuf<charT,traits>* setbuf(charT*, streamsize);
-
-S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode which
- = ios_base::in | ios_base::out);
-S virtual pos_type seekpos(pos_type sp,
- ios_base::openmode which
- = ios_base::in | ios_base::out);
- };
-
-
- 27.7.2 Template class basic_istringstream [lib.istringstream]
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_istringstream : public basic_istream<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.istringstream.cons_ Constructors:
-S explicit basic_istringstream(ios_base::openmode which = ios_base::in);
-S explicit basic_istringstream(
- const basic_string<charT,traits,Allocator>& str,
- ios_base::openmode which = ios_base::in);
-
- // _lib.istringstream.members_ Members:
-S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
-S basic_string<charT,traits,Allocator> str() const;
-S void str(const basic_string<charT,traits,Allocator>& s);
- private:
- // basic_stringbuf<charT,traits,Allocator> sb; exposition only
- };
-
- 27.7.3 Class basic_ostringstream [lib.ostringstream]
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_ostringstream : public basic_ostream<charT,traits> {
- public:
-
- // Types:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
- // _lib.ostringstream.cons_ Constructors/destructor:
-S explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
-S explicit basic_ostringstream(
- const basic_string<charT,traits,Allocator>& str,
- ios_base::openmode which = ios_base::out);
- // _lib.ostringstream.members_ Members:
-S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
-S basic_string<charT,traits,Allocator> str() const;
-S void str(const basic_string<charT,traits,Allocator>& s);
- };
-
-
- 27.7.4 Template class basic_stringstream [lib.stringstream]
-
- template <class charT, class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
-X class basic_stringstream
- : public basic_iostream<charT,traits> {
- public:
- // Types
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
- // constructors/destructors
-S explicit basic_stringstream(
- ios_base::openmode which = ios_base::out|ios_base::in);
-S explicit basic_stringstream(
- const basic_string<charT,traits,Allocator>& str,
- ios_base::openmode which = ios_base::out|ios_base::in);
- // Members:
-S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
-S basic_string<charT,traits,Allocator> str() const;
-S void str(const basic_string<charT,traits,Allocator>& str);
- };
-
-
-
- 27.8.1 File streams [lib.fstreams]
-
-
- Header <fstream> synopsis
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_filebuf;
-T typedef basic_filebuf<char> filebuf;
-T typedef basic_filebuf<wchar_t> wfilebuf;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ifstream;
-T typedef basic_ifstream<char> ifstream;
-T typedef basic_ifstream<wchar_t> wifstream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_ofstream;
-T typedef basic_ofstream<char> ofstream;
-T typedef basic_ofstream<wchar_t> wofstream;
-
-X template <class charT, class traits = char_traits<charT> >
- class basic_fstream;
-T typedef basic_fstream<char> fstream;
-T typedef basic_fstream<wchar_t> wfstream;
-
- 27.8.1.1 Template class basic_filebuf [lib.filebuf]
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_filebuf : public basic_streambuf<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.filebuf.cons_ Constructors/destructor:
-X basic_filebuf();
-X virtual ~basic_filebuf();
- // _lib.filebuf.members_ Members:
-T bool is_open() const;
-X basic_filebuf<charT,traits>* open
- (const char* s, ios_base::openmode mode);
-X basic_filebuf<charT,traits>* close();
- protected:
- // _lib.filebuf.virtuals_ Overridden virtual functions:
-X virtual streamsize showmanyc();
-X virtual int_type underflow();
-X virtual int_type uflow();
-X virtual int_type pbackfail(int_type c = traits::eof());
-X virtual int_type overflow (int_type c = traits::eof());
-S virtual basic_streambuf<charT,traits>*
- setbuf(char_type* s, streamsize n);
-S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode which
- = ios_base::in | ios_base::out);
-S virtual pos_type seekpos(pos_type sp, ios_base::openmode which
- = ios_base::in | ios_base::out);
-S virtual int sync();
-S virtual void imbue(const locale& loc);
- };
-
-
-
- 27.8.1.5 Template class basic_ifstream [lib.ifstream]
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_ifstream : public basic_istream<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.ifstream.cons_ Constructors:
-S basic_ifstream();
-S explicit basic_ifstream(const char* s,
- ios_base::openmode mode = ios_base::in);
- // _lib.ifstream.members_ Members:
-S basic_filebuf<charT,traits>* rdbuf() const;
-S bool is_open();
-S void open(const char* s, ios_base::openmode mode = ios_base::in);
-S void close();
- };
-
-
- 27.8.1.8 Template class basic_ofstream [lib.ofstream]
-
- template <class charT, class traits = char_traits<charT> >
-X class basic_ofstream : public basic_ostream<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // _lib.ofstream.cons_ Constructors:
-X basic_ofstream();
-X explicit basic_ofstream(const char* s,
- ios_base::openmode mode
- = ios_base::out);
- // _lib.ofstream.members_ Members:
-X basic_filebuf<charT,traits>* rdbuf() const;
-T bool is_open();
-X void open(const char* s, ios_base::openmode mode = ios_base::out);
-X void close();
- };
-
-
- 27.8.1.11 Template class basic_fstream [lib.fstream]
-
- template <class charT, class traits=char_traits<charT> >
-X class basic_fstream
- : public basic_iostream<charT,traits> {
- public:
-T typedef charT char_type;
-T typedef typename traits::int_type int_type;
-T typedef typename traits::pos_type pos_type;
-T typedef typename traits::off_type off_type;
-T typedef traits traits_type;
- // constructors/destructor
-S basic_fstream();
-S explicit basic_fstream(
- const char* s,
- ios_base::openmode mode = ios_base::in|ios_base::out);
-
- // Members:
-S basic_filebuf<charT,traits>* rdbuf() const;
-S bool is_open();
-S void open(
- const char* s,
- ios_base::openmode mode = ios_base::in|ios_base::out);
-S void close();
- };
-
-
-
- 27.8.2 C Library files [lib.c.files]
-
-
- Table 13--Header <cstdio> synopsis
- Macros:
-X BUFSIZ L_tmpnam SEEK_SET TMP_MAX
-X EOF NULL <cstdio> stderr _IOFBF
-X FILENAME_MAX SEEK_CUR stdin _IOLBF
-X FOPEN_MAX SEEK_END stdout _IONBF
-
-X Types: FILE fpos_t size_t <cstdio>
- Functions:
-X clearerr fgets fscanf gets rewind
-X fclose fopen fseek perror scanf tmpnam
-X feof fprintf fsetpos printf setbuf ungetc
-X ferror fputc ftell putc setvbuf vprintf
-X fflush fputs fwrite puts sprintf vfprintf
-X fgetc fread getc remove sscanf vsprintf
-X fgetpos freopen getchar putchar rename tmpfile
-
-
-
-
- 1.5 Standard C library headers [depr.c.headers]
-
-X <assert.h> <iso646.h> <setjmp.h> <stdio.h> <wchar.h>
- <ctype.h> <limits.h> <signal.h> <stdlib.h> <wctype.h>
- <errno.h> <locale.h> <stdarg.h> <string.h>
- <float.h> <math.h> <stddef.h> <time.h>
-
- 1.6 Old iostreams members [depr.ios.members]
-
- [Note: these should be #ifdef'd to permit diagnostics if used.]
- namespace std {
- class ios_base {
- public:
-T typedef T1 io_state;
-T typedef T2 open_mode;
-T typedef T3 seek_dir;
-T typedef OFF_T streamoff;
-T typedef OFF_T streampos;
- // remainder unchanged
- };
- }
-
- [Note: these should be #ifdef'd to permit diagnostics if used.]
- namespace std {
- template<class charT, class traits = char_traits<charT> >
- class basic_streambuf {
- public:
-T void stossc();
- // remainder unchanged
- };
- }
-
- 8 An implementation may provide the following member functions that
- overload signatures specified in clause _lib.iostreams_:
-
- [Note: the following overloads should be #ifdef'd to permit
- diagnostics to be emitted, by default, if used.]
-
- template<class charT, class Traits> class basic_ios {
- public:
-M void clear(io_state state);
-M void setstate(io_state state);
- // remainder unchanged
- };
- class ios_base {
- public:
-M void exceptions(io_state);
- // remainder unchanged
- };
- template<class charT, class traits = char_traits<charT> >
- class basic_streambuf {
- public:
-M pos_type pubseekoff(off_type off, ios_base::seek_dir way,
- ios_base::open_mode which = ios_base::in | ios_base::out);
-M pos_type pubseekpos(pos_type sp,
- ios_base::open_mode which = ios_base::in | ios_base::out);
- // remainder unchanged
- };
- template <class charT, class traits = char_traits<charT> >
- class basic_filebuf : public basic_streambuf<charT,traits> {
- public:
-M basic_filebuf<charT,traits>* open
- (const char* s, ios_base::open_mode mode);
- // remainder unchanged
- };
- template <class charT, class traits = char_traits<charT> >
- class basic_ifstream : public basic_istream<charT,traits> {
- public:
-M void open(const char* s, ios_base::open_mode mode = in);
- // remainder unchanged
- };
- template <class charT, class traits = char_traits<charT> >
- class basic_ofstream : public basic_ostream<charT,traits> {
- public:
-M void open(const char* s, ios_base::open_mode mode = out | trunc);
- // remainder unchanged
- };
- }
-
-
-
- 1.7.1 Class strstreambuf [depr.strstreambuf]
-
- [Note: It should be possible to adopt these components with only
- minor changes from the 2.8 version of the library.]
-
-M class strstreambuf : public basic_streambuf<char> {
- public:
-M explicit strstreambuf(streamsize alsize_arg = 0);
-M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
-M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
-M strstreambuf(const char* gnext_arg, streamsize n);
-M strstreambuf(signed char* gnext_arg, streamsize n,
- signed char* pbeg_arg = 0);
-M strstreambuf(const signed char* gnext_arg, streamsize n);
-M strstreambuf(unsigned char* gnext_arg, streamsize n,
- unsigned char* pbeg_arg = 0);
-M strstreambuf(const unsigned char* gnext_arg, streamsize n);
-M virtual ~strstreambuf();
-M void freeze(bool freezefl = true);
-M char* str();
-M int pcount();
- protected:
-M virtual int_type overflow (int_type c = EOF);
-M virtual int_type pbackfail(int_type c = EOF);
-M virtual int_type underflow();
-M virtual pos_type seekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode which
- = ios_base::in | ios_base::out);
-M virtual pos_type seekpos(pos_type sp, ios_base::openmode which
- = ios_base::in | ios_base::out);
-M virtual streambuf<char>* setbuf(char* s, streamsize n);
- }
-
- 1.7.4 Class strstream [depr.strstream]
-
-M class strstream
- : public basic_iostream<char> {
- public:
- // Types
-M typedef char char_type;
-M typedef typename char_traits<char>::int_type int_type
-M typedef typename char_traits<char>::pos_type pos_type;
-M typedef typename char_traits<char>::off_type off_type;
- // consturctors/destructor
-M strstream();
-M strstream(char* s, int n,
- ios_base::openmode mode = ios_base::in|ios_base::out);
-M virtual ~strstream();
- // Members:
-M strstreambuf* rdbuf() const;
-M void freeze(bool freezefl = true);
-M int pcount() const;
-M char* str();
- };
-
diff --git a/libstdc++-v3/docs/html/17_intro/COPYING b/libstdc++-v3/docs/html/17_intro/COPYING
deleted file mode 100644
index 623b6258a13..00000000000
--- a/libstdc++-v3/docs/html/17_intro/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program 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 of the License, or
- (at your option) any later version.
-
- This program 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 program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/libstdc++-v3/docs/html/17_intro/COPYING.DOC b/libstdc++-v3/docs/html/17_intro/COPYING.DOC
deleted file mode 100644
index 1a864561bd4..00000000000
--- a/libstdc++-v3/docs/html/17_intro/COPYING.DOC
+++ /dev/null
@@ -1,355 +0,0 @@
- GNU Free Documentation License
- Version 1.1, March 2000
-
- Copyright (C) 2000 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-0. PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-1. APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
-
-A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-
-2. VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-
-3. COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-
-4. MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.
-D. Preserve all the copyright notices of the Document.
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.
-H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the "History" section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
- may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
- or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-
-5. COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
-
-
-6. COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-
-
-8. TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-
-
-9. TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-
-10. FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
diff --git a/libstdc++-v3/docs/html/17_intro/DESIGN b/libstdc++-v3/docs/html/17_intro/DESIGN
deleted file mode 100644
index 5af3d9aed3b..00000000000
--- a/libstdc++-v3/docs/html/17_intro/DESIGN
+++ /dev/null
@@ -1,859 +0,0 @@
-
-Standard C++ Library Design Document
-------------------------------------
-
-This is an overview of libstdc++-v3, with particular attention
-to projects to be done and how they fit into the whole.
-
-The Library
------------
-
-This paper is covers two major areas:
-
- - Features and policies not mentioned in the standard that
- the quality of the library implementation depends on, including
- extensions and "implementation-defined" features;
-
- - Plans for required but unimplemented library features and
- optimizations to them.
-
-Overhead
---------
-
-The standard defines a large library, much larger than the standard
-C library. A naive implementation would suffer substantial overhead
-in compile time, executable size, and speed, rendering it unusable
-in many (particularly embedded) applications. The alternative demands
-care in construction, and some compiler support, but there is no
-need for library subsets.
-
-What are the sources of this overhead? There are four main causes:
-
- - The library is specified almost entirely as templates, which
- with current compilers must be included in-line, resulting in
- very slow builds as tens or hundreds of thousands of lines
- of function definitions are read for each user source file.
- Indeed, the entire SGI STL, as well as the dos Reis valarray,
- are provided purely as header files, largely for simplicity in
- porting. Iostream/locale is (or will be) as large again.
-
- - The library is very flexible, specifying a multitude of hooks
- where users can insert their own code in place of defaults.
- When these hooks are not used, any time and code expended to
- support that flexibility is wasted.
-
- - Templates are often described as causing to "code bloat". In
- practice, this refers (when it refers to anything real) to several
- independent processes. First, when a class template is manually
- instantiated in its entirely, current compilers place the definitions
- for all members in a single object file, so that a program linking
- to one member gets definitions of all. Second, template functions
- which do not actually depend on the template argument are, under
- current compilers, generated anew for each instantiation, rather
- than being shared with other instantiations. Third, some of the
- flexibility mentioned above comes from virtual functions (both in
- regular classes and template classes) which current linkers add
- to the executable file even when they manifestly cannot be called.
-
- - The library is specified to use a language feature, exceptions,
- which in the current gcc compiler ABI imposes a run time and
- code space cost to handle the possibility of exceptions even when
- they are not used. Under the new ABI (accessed with -fnew-abi),
- there is a space overhead and a small reduction in code efficiency
- resulting from lost optimization opportunities associated with
- non-local branches associated with exceptions.
-
-What can be done to eliminate this overhead? A variety of coding
-techniques, and compiler, linker and library improvements and
-extensions may be used, as covered below. Most are not difficult,
-and some are already implemented in varying degrees.
-
-Overhead: Compilation Time
---------------------------
-
-Providing "ready-instantiated" template code in object code archives
-allows us to avoid generating and optimizing template instantiations
-in each compilation unit which uses them. However, the number of such
-instantiations that are useful to provide is limited, and anyway this
-is not enough, by itself, to minimize compilation time. In particular,
-it does not reduce time spent parsing conforming headers.
-
-Quicker header parsing will depend on library extensions and compiler
-improvements. One approach is some variation on the techniques
-previously marketed as "pre-compiled headers", now standardized as
-support for the "export" keyword. "Exported" template definitions
-can be placed (once) in a "repository" -- really just a library, but
-of template definitions rather than object code -- to be drawn upon
-at link time when an instantiation is needed, rather than placed in
-header files to be parsed along with every compilation unit.
-
-Until "export" is implemented we can put some of the lengthy template
-definitions in #if guards or alternative headers so that users can skip
-over the the full definitions when they need only the ready-instantiated
-specializations.
-
-To be precise, this means that certain headers which define
-templates which users normally use only for certain arguments
-can be instrumented to avoid exposing the template definitions
-to the compiler unless a macro is defined. For example, in
-<string>, we might have:
-
- template <class _CharT, ... > class basic_string {
- ... // member declarations
- };
- ... // operator declarations
-
- #ifdef _STRICT_ISO_
- # if _G_NO_TEMPLATE_EXPORT
- # include <bits/std_locale.h> // headers needed by definitions
- # ...
- # include <bits/string.tcc> // member and global template definitions.
- # endif
- #endif
-
-Users who compile without specifying a strict-ISO-conforming flag
-would not see many of the template definitions they now see, and rely
-instead on ready-instantiated specializations in the library. This
-technique would be useful for the following substantial components:
-string, locale/iostreams, valarray. It would *not* be useful or
-usable with the following: containers, algorithms, iterators,
-allocator. Since these constitute a large (though decreasing)
-fraction of the library, the benefit the technique offers is
-limited.
-
-The language specifies the semantics of the "export" keyword, but
-the gcc compiler does not yet support it. When it does, problems
-with large template inclusions can largely disappear, given some
-minor library reorganization, along with the need for the apparatus
-described above.
-
-Overhead: Flexibility Cost
---------------------------
-
-The library offers many places where users can specify operations
-to be performed by the library in place of defaults. Sometimes
-this seems to require that the library use a more-roundabout, and
-possibly slower, way to accomplish the default requirements than
-would be used otherwise.
-
-The primary protection against this overhead is thorough compiler
-optimization, to crush out layers of inline function interfaces.
-Kuck & Associates has demonstrated the practicality of this kind
-of optimization.
-
-The second line of defense against this overhead is explicit
-specialization. By defining helper function templates, and writing
-specialized code for the default case, overhead can be eliminated
-for that case without sacrificing flexibility. This takes full
-advantage of any ability of the optimizer to crush out degenerate
-code.
-
-The library specifies many virtual functions which current linkers
-load even when they cannot be called. Some minor improvements to the
-compiler and to ld would eliminate any such overhead by simply
-omitting virtual functions that the complete program does not call.
-A prototype of this work has already been done. For targets where
-GNU ld is not used, a "pre-linker" could do the same job.
-
-The main areas in the standard interface where user flexibility
-can result in overhead are:
-
- - Allocators: Containers are specified to use user-definable
- allocator types and objects, making tuning for the container
- characteristics tricky.
-
- - Locales: the standard specifies locale objects used to implement
- iostream operations, involving many virtual functions which use
- streambuf iterators.
-
- - Algorithms and containers: these may be instantiated on any type,
- frequently duplicating code for identical operations.
-
- - Iostreams and strings: users are permitted to use these on their
- own types, and specify the operations the stream must use on these
- types.
-
-Note that these sources of overhead are _avoidable_. The techniques
-to avoid them are covered below.
-
-Code Bloat
-----------
-
-In the SGI STL, and in some other headers, many of the templates
-are defined "inline" -- either explicitly or by their placement
-in class definitions -- which should not be inline. This is a
-source of code bloat. Matt had remarked that he was relying on
-the compiler to recognize what was too big to benefit from inlining,
-and generate it out-of-line automatically. However, this also can
-result in code bloat except where the linker can eliminate the extra
-copies.
-
-Fixing these cases will require an audit of all inline functions
-defined in the library to determine which merit inlining, and moving
-the rest out of line. This is an issue mainly in chapters 23, 25, and
-27. Of course it can be done incrementally, and we should generally
-accept patches that move large functions out of line and into ".tcc"
-files, which can later be pulled into a repository. Compiler/linker
-improvements to recognize very large inline functions and move them
-out-of-line, but shared among compilation units, could make this
-work unnecessary.
-
-Pre-instantiating template specializations currently produces large
-amounts of dead code which bloats statically linked programs. The
-current state of the static library, libstdc++.a, is intolerable on
-this account, and will fuel further confused speculation about a need
-for a library "subset". A compiler improvement that treats each
-instantiated function as a separate object file, for linking purposes,
-would be one solution to this problem. An alternative would be to
-split up the manual instantiation files into dozens upon dozens of
-little files, each compiled separately, but an abortive attempt at
-this was done for <string> and, though it is far from complete, it
-is already a nuisance. A better interim solution (just until we have
-"export") is badly needed.
-
-When building a shared library, the current compiler/linker cannot
-automatically generate the instantiatiations needed. This creates a
-miserable situation; it means any time something is changed in the
-library, before a shared library can be built someone must manually
-copy the declarations of all templates that are needed by other parts
-of the library to an "instantiation" file, and add it to the build
-system to be compiled and linked to the library. This process is
-readily automated, and should be automated as soon as possible.
-Users building their own shared libraries experience identical
-frustrations.
-
-Sharing common aspects of template definitions among instantiations
-can radically reduce code bloat. The compiler could help a great
-deal here by recognizing when a function depends on nothing about
-a template parameter, or only on its size, and giving the resulting
-function a link-name "equate" that allows it to be shared with other
-instantiations. Implementation code could take advantage of the
-capability by factoring out code that does not depend on the template
-argument into separate functions to be merged by the compiler.
-
-Until such a compiler optimization is implemented, much can be done
-manually (if tediously) in this direction. One such optimization is
-to derive class templates from non-template classes, and move as much
-implementation as possible into the base class. Another is to partial-
-specialize certain common instantiations, such as vector<T*>, to share
-code for instantiations on all types T. While these techniques work,
-they are far from the complete solution that a compiler improvement
-would afford.
-
-Overhead: Expensive Language Features
--------------------------------------
-
-The main "expensive" language feature used in the standard library
-is exception support, which requires compiling in cleanup code with
-static table data to locate it, and linking in library code to use
-the table. For small embedded programs the amount of such library
-code and table data is assumed by some to be excessive. Under the
-"new" ABI this perception is generally exaggerated, although in some
-cases it may actually be excessive.
-
-To implement a library which does not use exceptions directly is
-not difficult given minor compiler support (to "turn off" exceptions
-and ignore exception constructs), and results in no great library
-maintenance difficulties. To be precise, given "-fno-exceptions",
-the compiler should treat "try" blocks as ordinary blocks, and
-"catch" blocks as dead code to ignore or eliminate. Compiler
-support is not strictly necessary, except in the case of "function
-try blocks"; otherwise the following macros almost suffice:
-
- #define throw(X)
- #define try if (true)
- #define catch(X) else if (false)
-
-However, there may be a need to use function try blocks in the
-library implementation, and use of macros in this way can make
-correct diagnostics impossible. Furthermore, use of this scheme
-would require the library to call a function to re-throw exceptions
-from a try block. Implementing the above semantics in the compiler
-is preferable.
-
-Given the support above (however implemented) it only remains to
-replace code that "throws" with a call to a well-documented "handler"
-function in a separate compilation unit which may be replaced by
-the user. The main source of exceptions that would be difficult
-for users to avoid is memory allocation failures, but users can
-define their own memory allocation primitives that never throw.
-Otherwise, the complete list of such handlers, and which library
-functions may call them, would be needed for users to be able to
-implement the necessary substitutes. (Fortunately, they have the
-source code.)
-
-Opportunities
--------------
-
-The template capabilities of C++ offer enormous opportunities for
-optimizing common library operations, well beyond what would be
-considered "eliminating overhead". In particular, many operations
-done in Glibc with macros that depend on proprietary language
-extensions can be implemented in pristine Standard C++. For example,
-the chapter 25 algorithms, and even C library functions such as strchr,
-can be specialized for the case of static arrays of known (small) size.
-
-Detailed optimization opportunities are identified below where
-the component where they would appear is discussed. Of course new
-opportunities will be identified during implementation.
-
-Unimplemented Required Library Features
----------------------------------------
-
-The standard specifies hundreds of components, grouped broadly by
-chapter. These are listed in excruciating detail in the CHECKLIST
-file.
-
- 17 general
- 18 support
- 19 diagnostics
- 20 utilities
- 21 string
- 22 locale
- 23 containers
- 24 iterators
- 25 algorithms
- 26 numerics
- 27 iostreams
- Annex D backward compatibility
-
-Anyone participating in implementation of the library should obtain
-a copy of the standard, ISO 14882. People in the U.S. can obtain an
-electronic copy for US$18 from ANSI's web site. Those from other
-countries should visit http://www.iso.ch/ to find out the location
-of their country's representation in ISO, in order to know who can
-sell them a copy.
-
-The emphasis in the following sections is on unimplemented features
-and optimization opportunities.
-
-Chapter 17 General
--------------------
-
-Chapter 17 concerns overall library requirements.
-
-The standard doesn't mention threads. A multi-thread (MT) extension
-primarily affects operators new and delete (18), allocator (20),
-string (21), locale (22), and iostreams (27). The common underlying
-support needed for this is discussed under chapter 20.
-
-The standard requirements on names from the C headers create a
-lot of work, mostly done. Names in the C headers must be visible
-in the std:: and sometimes the global namespace; the names in the
-two scopes must refer to the same object. More stringent is that
-Koenig lookup implies that any types specified as defined in std::
-really are defined in std::. Names optionally implemented as
-macros in C cannot be macros in C++. (An overview may be read at
-<http://www.cantrip.org/cheaders.html>). The scripts "inclosure"
-and "mkcshadow", and the directories shadow/ and cshadow/, are the
-beginning of an effort to conform in this area.
-
-A correct conforming definition of C header names based on underlying
-C library headers, and practical linking of conforming namespaced
-customer code with third-party C libraries depends ultimately on
-an ABI change, allowing namespaced C type names to be mangled into
-type names as if they were global, somewhat as C function names in a
-namespace, or C++ global variable names, are left unmangled. Perhaps
-another "extern" mode, such as 'extern "C-global"' would be an
-appropriate place for such type definitions. Such a type would
-affect mangling as follows:
-
- namespace A {
- struct X {};
- extern "C-global" { // or maybe just 'extern "C"'
- struct Y {};
- };
- }
- void f(A::X*); // mangles to f__FPQ21A1X
- void f(A::Y*); // mangles to f__FP1Y
-
-(It may be that this is really the appropriate semantics for regular
-'extern "C"', and 'extern "C-global"', as an extension, would not be
-necessary.) This would allow functions declared in non-standard C headers
-(and thus fixable by neither us nor users) to link properly with functions
-declared using C types defined in properly-namespaced headers. The
-problem this solves is that C headers (which C++ programmers do persist
-in using) frequently forward-declare C struct tags without including
-the header where the type is defined, as in
-
- struct tm;
- void munge(tm*);
-
-Without some compiler accommodation, munge cannot be called by correct
-C++ code using a pointer to a correctly-scoped tm* value.
-
-The current C headers use the preprocessor extension "#include_next",
-which the compiler complains about when run "-pedantic".
-(Incidentally, it appears that "-fpedantic" is currently ignored,
-probably a bug.) The solution in the C compiler is to use
-"-isystem" rather than "-I", but unfortunately in g++ this seems
-also to wrap the whole header in an 'extern "C"' block, so it's
-unusable for C++ headers. The correct solution appears to be to
-allow the various special include-directory options, if not given
-an argument, to affect subsequent include-directory options additively,
-so that if one said
-
- -pedantic -iprefix $(prefix) \
- -idirafter -ino-pedantic -ino-extern-c -iwithprefix -I g++-v3 \
- -iwithprefix -I g++-v3/ext
-
-the compiler would search $(prefix)/g++-v3 and not report
-pedantic warnings for files found there, but treat files in
-$(prefix)/g++-v3/ext pedantically. (The undocumented semantics
-of "-isystem" in g++ stink. Can they be rescinded? If not it
-must be replaced with something more rationally behaved.)
-
-All the C headers need the treatment above; in the standard these
-headers are mentioned in various chapters. Below, I have only
-mentioned those that present interesting implementation issues.
-
-The components identified as "mostly complete", below, have not been
-audited for conformance. In many cases where the library passes
-conformance tests we have non-conforming extensions that must be
-wrapped in #if guards for "pedantic" use, and in some cases renamed
-in a conforming way for continued use in the implementation regardless
-of conformance flags.
-
-The STL portion of the library still depends on a header
-stl/bits/stl_config.h full of #ifdef clauses. This apparatus
-should be replaced with autoconf/automake machinery.
-
-The SGI STL defines a type_traits<> template, specialized for
-many types in their code including the built-in numeric and
-pointer types and some library types, to direct optimizations of
-standard functions. The SGI compiler has been extended to generate
-specializations of this template automatically for user types,
-so that use of STL templates on user types can take advantage of
-these optimizations. Specializations for other, non-STL, types
-would make more optimizations possible, but extending the gcc
-compiler in the same way would be much better. Probably the next
-round of standardization will ratify this, but probably with
-changes, so it probably should be renamed to place it in the
-implementation namespace.
-
-The SGI STL also defines a large number of extensions visible in
-standard headers. (Other extensions that appear in separate headers
-have been sequestered in subdirectories ext/ and backward/.) All
-these extensions should be moved to other headers where possible,
-and in any case wrapped in a namespace (not std!), and (where kept
-in a standard header) girded about with macro guards. Some cannot be
-moved out of standard headers because they are used to implement
-standard features. The canonical method for accommodating these
-is to use a protected name, aliased in macro guards to a user-space
-name. Unfortunately C++ offers no satisfactory template typedef
-mechanism, so very ad-hoc and unsatisfactory aliasing must be used
-instead.
-
-Implementation of a template typedef mechanism should have the highest
-priority among possible extensions, on the same level as implementation
-of the template "export" feature.
-
-Chapter 18 Language support
-----------------------------
-
-Headers: <limits> <new> <typeinfo> <exception>
-C headers: <cstddef> <climits> <cfloat> <cstdarg> <csetjmp>
- <ctime> <csignal> <cstdlib> (also 21, 25, 26)
-
-This defines the built-in exceptions, rtti, numeric_limits<>,
-operator new and delete. Much of this is provided by the
-compiler in its static runtime library.
-
-Work to do includes defining numeric_limits<> specializations in
-separate files for all target architectures. Values for integer types
-except for bool and wchar_t are readily obtained from the C header
-<limits.h>, but values for the remaining numeric types (bool, wchar_t,
-float, double, long double) must be entered manually. This is
-largely dog work except for those members whose values are not
-easily deduced from available documentation. Also, this involves
-some work in target configuration to identify the correct choice of
-file to build against and to install.
-
-The definitions of the various operators new and delete must be
-made thread-safe, which depends on a portable exclusion mechanism,
-discussed under chapter 20. Of course there is always plenty of
-room for improvements to the speed of operators new and delete.
-
-<cstdarg>, in Glibc, defines some macros that gcc does not allow to
-be wrapped into an inline function. Probably this header will demand
-attention whenever a new target is chosen. The functions atexit(),
-exit(), and abort() in cstdlib have different semantics in C++, so
-must be re-implemented for C++.
-
-Chapter 19 Diagnostics
------------------------
-
-Headers: <stdexcept>
-C headers: <cassert> <cerrno>
-
-This defines the standard exception objects, which are "mostly complete".
-Cygnus has a version, and now SGI provides a slightly different one.
-It makes little difference which we use.
-
-The C global name "errno", which C allows to be a variable or a macro,
-is required in C++ to be a macro. For MT it must typically result in
-a function call.
-
-Chapter 20 Utilities
----------------------
-Headers: <utility> <functional> <memory>
-C header: <ctime> (also in 18)
-
-SGI STL provides "mostly complete" versions of all the components
-defined in this chapter. However, the auto_ptr<> implementation
-is known to be wrong. Furthermore, the standard definition of it
-is known to be unimplementable as written. A minor change to the
-standard would fix it, and auto_ptr<> should be adjusted to match.
-
-Multi-threading affects the allocator implementation, and there must
-be configuration/installation choices for different users' MT
-requirements. Anyway, users will want to tune allocator options
-to support different target conditions, MT or no.
-
-The primitives used for MT implementation should be exposed, as an
-extension, for users' own work. We need cross-CPU "mutex" support,
-multi-processor shared-memory atomic integer operations, and single-
-processor uninterruptible integer operations, and all three configurable
-to be stubbed out for non-MT use, or to use an appropriately-loaded
-dynamic library for the actual runtime environment, or statically
-compiled in for cases where the target architecture is known.
-
-Chapter 21 String
-------------------
-Headers: <string>
-C headers: <cctype> <cwctype> <cstring> <cwchar> (also in 27)
- <cstdlib> (also in 18, 25, 26)
-
-We have "mostly-complete" char_traits<> implementations. Many of the
-char_traits<char> operations might be optimized further using existing
-proprietary language extensions.
-
-We have a "mostly-complete" basic_string<> implementation. The work
-to manually instantiate char and wchar_t specializations in object
-files to improve link-time behavior is extremely unsatisfactory,
-literally tripling library-build time with no commensurate improvement
-in static program link sizes. It must be redone. (Similar work is
-needed for some components in chapters 22 and 27.)
-
-Other work needed for strings is MT-safety, as discussed under the
-chapter 20 heading.
-
-The standard C type mbstate_t from <cwchar> and used in char_traits<>
-must be different in C++ than in C, because in C++ the default constructor
-value mbstate_t() must be the "base" or "ground" sequence state.
-(According to the likely resolution of a recently raised Core issue,
-this may become unnecessary. However, there are other reasons to
-use a state type not as limited as whatever the C library provides.)
-If we might want to provide conversions from (e.g.) internally-
-represented EUC-wide to externally-represented Unicode, or vice-
-versa, the mbstate_t we choose will need to be more accommodating
-than what might be provided by an underlying C library.
-
-There remain some basic_string template-member functions which do
-not overload properly with their non-template brethren. The infamous
-hack akin to what was done in vector<> is needed, to conform to
-23.1.1 para 10. The CHECKLIST items for basic_string marked 'X',
-or incomplete, are so marked for this reason.
-
-Replacing the string iterators, which currently are simple character
-pointers, with class objects would greatly increase the safety of the
-client interface, and also permit a "debug" mode in which range,
-ownership, and validity are rigorously checked. The current use of
-raw pointers as string iterators is evil. vector<> iterators need the
-same treatment. Note that the current implementation freely mixes
-pointers and iterators, and that must be fixed before safer iterators
-can be introduced.
-
-Some of the functions in <cstring> are different from the C version.
-generally overloaded on const and non-const argument pointers. For
-example, in <cstring> strchr is overloaded. The functions isupper
-etc. in <cctype> typically implemented as macros in C are functions
-in C++, because they are overloaded with others of the same name
-defined in <locale>.
-
-Many of the functions required in <cwctype> and <cwchar> cannot be
-implemented using underlying C facilities on intended targets because
-such facilities only partly exist.
-
-Chapter 22 Locale
-------------------
-Headers: <locale>
-C headers: <clocale>
-
-We have a "mostly complete" class locale, with the exception of
-code for constructing, and handling the names of, named locales.
-The ways that locales are named (particularly when categories
-(e.g. LC_TIME, LC_COLLATE) are different) varies among all target
-environments. This code must be written in various versions and
-chosen by configuration parameters.
-
-Members of many of the facets defined in <locale> are stubs. Generally,
-there are two sets of facets: the base class facets (which are supposed
-to implement the "C" locale) and the "byname" facets, which are supposed
-to read files to determine their behavior. The base ctype<>, collate<>,
-and numpunct<> facets are "mostly complete", except that the table of
-bitmask values used for "is" operations, and corresponding mask values,
-are still defined in libio and just included/linked. (We will need to
-implement these tables independently, soon, but should take advantage
-of libio where possible.) The num_put<>::put members for integer types
-are "mostly complete".
-
-A complete list of what has and has not been implemented may be
-found in CHECKLIST. However, note that the current definition of
-codecvt<wchar_t,char,mbstate_t> is wrong. It should simply write
-out the raw bytes representing the wide characters, rather than
-trying to convert each to a corresponding single "char" value.
-
-Some of the facets are more important than others. Specifically,
-the members of ctype<>, numpunct<>, num_put<>, and num_get<> facets
-are used by other library facilities defined in <string>, <istream>,
-and <ostream>, and the codecvt<> facet is used by basic_filebuf<>
-in <fstream>, so a conforming iostream implementation depends on
-these.
-
-The "long long" type eventually must be supported, but code mentioning
-it should be wrapped in #if guards to allow pedantic-mode compiling.
-
-Performance of num_put<> and num_get<> depend critically on
-caching computed values in ios_base objects, and on extensions
-to the interface with streambufs.
-
-Specifically: retrieving a copy of the locale object, extracting
-the needed facets, and gathering data from them, for each call to
-(e.g.) operator<< would be prohibitively slow. To cache format
-data for use by num_put<> and num_get<> we have a _Format_cache<>
-object stored in the ios_base::pword() array. This is constructed
-and initialized lazily, and is organized purely for utility. It
-is discarded when a new locale with different facets is imbued.
-
-Using only the public interfaces of the iterator arguments to the
-facet functions would limit performance by forbidding "vector-style"
-character operations. The streambuf iterator optimizations are
-described under chapter 24, but facets can also bypass the streambuf
-iterators via explicit specializations and operate directly on the
-streambufs, and use extended interfaces to get direct access to the
-streambuf internal buffer arrays. These extensions are mentioned
-under chapter 27. These optimizations are particularly important
-for input parsing.
-
-Unused virtual members of locale facets can be omitted, as mentioned
-above, by a smart linker.
-
-Chapter 23 Containers
-----------------------
-Headers: <deque> <list> <queue> <stack> <vector> <map> <set> <bitset>
-
-All the components in chapter 23 are implemented in the SGI STL.
-They are "mostly complete"; they include a large number of
-nonconforming extensions which must be wrapped. Some of these
-are used internally and must be renamed or duplicated.
-
-The SGI components are optimized for large-memory environments. For
-embedded targets, different criteria might be more appropriate. Users
-will want to be able to tune this behavior. We should provide
-ways for users to compile the library with different memory usage
-characteristics.
-
-A lot more work is needed on factoring out common code from different
-specializations to reduce code size here and in chapter 25. The
-easiest fix for this would be a compiler/ABI improvement that allows
-the compiler to recognize when a specialization depends only on the
-size (or other gross quality) of a template argument, and allow the
-linker to share the code with similar specializations. In its
-absence, many of the algorithms and containers can be partial-
-specialized, at least for the case of pointers, but this only solves
-a small part of the problem. Use of a type_traits-style template
-allows a few more optimization opportunities, more if the compiler
-can generate the specializations automatically.
-
-As an optimization, containers can specialize on the default allocator
-and bypass it, or take advantage of details of its implementation
-after it has been improved upon.
-
-Replacing the vector iterators, which currently are simple element
-pointers, with class objects would greatly increase the safety of the
-client interface, and also permit a "debug" mode in which range,
-ownership, and validity are rigorously checked. The current use of
-pointers for iterators is evil.
-
-As mentioned for chapter 24, the deque iterator is a good example of
-an opportunity to implement a "staged" iterator that would benefit
-from specializations of some algorithms.
-
-Chapter 24 Iterators
----------------------
-Headers: <iterator>
-
-Standard iterators are "mostly complete", with the exception of
-the stream iterators, which are not yet templatized on the
-stream type. Also, the base class template iterator<> appears
-to be wrong, so everything derived from it must also be wrong,
-currently.
-
-The streambuf iterators (currently located in stl/bits/std_iterator.h,
-but should be under bits/) can be rewritten to take advantage of
-friendship with the streambuf implementation.
-
-Matt Austern has identified opportunities where certain iterator
-types, particularly including streambuf iterators and deque
-iterators, have a "two-stage" quality, such that an intermediate
-limit can be checked much more quickly than the true limit on
-range operations. If identified with a member of iterator_traits,
-algorithms may be specialized for this case. Of course the
-iterators that have this quality can be identified by specializing
-a traits class.
-
-Many of the algorithms must be specialized for the streambuf
-iterators, to take advantage of block-mode operations, in order
-to allow iostream/locale operations' performance not to suffer.
-It may be that they could be treated as staged iterators and
-take advantage of those optimizations.
-
-Chapter 25 Algorithms
-----------------------
-Headers: <algorithm>
-C headers: <cstdlib> (also in 18, 21, 26))
-
-The algorithms are "mostly complete". As mentioned above, they
-are optimized for speed at the expense of code and data size.
-
-Specializations of many of the algorithms for non-STL types would
-give performance improvements, but we must use great care not to
-interfere with fragile template overloading semantics for the
-standard interfaces. Conventionally the standard function template
-interface is an inline which delegates to a non-standard function
-which is then overloaded (this is already done in many places in
-the library). Particularly appealing opportunities for the sake of
-iostream performance are for copy and find applied to streambuf
-iterators or (as noted elsewhere) for staged iterators, of which
-the streambuf iterators are a good example.
-
-The bsearch and qsort functions cannot be overloaded properly as
-required by the standard because gcc does not yet allow overloading
-on the extern-"C"-ness of a function pointer.
-
-Chapter 26 Numerics
---------------------
-Headers: <complex> <valarray> <numeric>
-C headers: <cmath>, <cstdlib> (also 18, 21, 25)
-
-Numeric components: Gabriel dos Reis's valarray, Drepper's complex,
-and the few algorithms from the STL are "mostly done". Of course
-optimization opportunities abound for the numerically literate. It
-is not clear whether the valarray implementation really conforms
-fully, in the assumptions it makes about aliasing (and lack thereof)
-in its arguments.
-
-The C div() and ldiv() functions are interesting, because they are the
-only case where a C library function returns a class object by value.
-Since the C++ type div_t must be different from the underlying C type
-(which is in the wrong namespace) the underlying functions div() and
-ldiv() cannot be re-used efficiently. Fortunately they are trivial to
-re-implement.
-
-Chapter 27 Iostreams
----------------------
-Headers: <iosfwd> <streambuf> <ios> <ostream> <istream> <iostream>
- <iomanip> <sstream> <fstream>
-C headers: <cstdio> <cwchar> (also in 21)
-
-Iostream is currently in a very incomplete state. <iosfwd>, <iomanip>,
-ios_base, and basic_ios<> are "mostly complete". basic_streambuf<> and
-basic_ostream<> are well along, but basic_istream<> has had little work
-done. The standard stream objects, <sstream> and <fstream> have been
-started; basic_filebuf<> "write" functions have been implemented just
-enough to do "hello, world".
-
-Most of the istream and ostream operators << and >> (with the exception
-of the op<<(integer) ones) have not been changed to use locale primitives,
-sentry objects, or char_traits members.
-
-All these templates should be manually instantiated for char and
-wchar_t in a way that links only used members into user programs.
-
-Streambuf is fertile ground for optimization extensions. An extended
-interface giving iterator access to its internal buffer would be very
-useful for other library components.
-
-Iostream operations (primarily operators << and >>) can take advantage
-of the case where user code has not specified a locale, and bypass locale
-operations entirely. The current implementation of op<</num_put<>::put,
-for the integer types, demonstrates how they can cache encoding details
-from the locale on each operation. There is lots more room for
-optimization in this area.
-
-The definition of the relationship between the standard streams
-cout et al. and stdout et al. requires something like a "stdiobuf".
-The SGI solution of using double-indirection to actually use a
-stdio FILE object for buffering is unsatisfactory, because it
-interferes with peephole loop optimizations.
-
-The <sstream> header work has begun. stringbuf can benefit from
-friendship with basic_string<> and basic_string<>::_Rep to use
-those objects directly as buffers, and avoid allocating and making
-copies.
-
-The basic_filebuf<> template is a complex beast. It is specified to
-use the locale facet codecvt<> to translate characters between native
-files and the locale character encoding. In general this involves
-two buffers, one of "char" representing the file and another of
-"char_type", for the stream, with codecvt<> translating. The process
-is complicated by the variable-length nature of the translation, and
-the need to seek to corresponding places in the two representations.
-For the case of basic_filebuf<char>, when no translation is needed,
-a single buffer suffices. A specialized filebuf can be used to reduce
-code space overhead when no locale has been imbued. Matt Austern's
-work at SGI will be useful, perhaps directly as a source of code, or
-at least as an example to draw on.
-
-Filebuf, almost uniquely (cf. operator new), depends heavily on
-underlying environmental facilities. In current releases iostream
-depends fairly heavily on libio constant definitions, but it should
-be made independent. It also depends on operating system primitives
-for file operations. There is immense room for optimizations using
-(e.g.) mmap for reading. The shadow/ directory wraps, besides the
-standard C headers, the libio.h and unistd.h headers, for use mainly
-by filebuf. These wrappings have not been completed, though there
-is scaffolding in place.
-
-The encapulation of certain C header <cstdio> names presents an
-interesting problem. It is possible to define an inline std::fprintf()
-implemented in terms of the 'extern "C"' vfprintf(), but there is no
-standard vfscanf() to use to implement std::fscanf(). It appears that
-vfscanf but be re-implemented in C++ for targets where no vfscanf
-extension has been defined. This is interesting in that it seems
-to be the only significant case in the C library where this kind of
-rewriting is necessary. (Of course Glibc provides the vfscanf()
-extension.) (The functions related to exit() must be rewritten
-for other reasons.)
-
-
-Annex D
--------
-Headers: <strstream>
-
-Annex D defines many non-library features, and many minor
-modifications to various headers, and a complete header.
-It is "mostly done", except that the libstdc++-2 <strstream>
-header has not been adopted into the library, or checked to
-verify that it matches the draft in those details that were
-clarified by the committee. Certainly it must at least be
-moved into the std namespace.
-
-We still need to wrap all the deprecated features in #if guards
-so that pedantic compile modes can detect their use.
-
-Nonstandard Extensions
-----------------------
-Headers: <iostream.h> <strstream.h> <hash> <rbtree>
- <pthread_alloc> <stdiobuf> (etc.)
-
-User code has come to depend on a variety of nonstandard components
-that we must not omit. Much of this code can be adopted from
-libstdc++-v2 or from the SGI STL. This particularly includes
-<iostream.h>, <strstream.h>, and various SGI extensions such
-as <hash_map.h>. Many of these are already placed in the
-subdirectories ext/ and backward/. (Note that it is better to
-include them via "<backward/hash_map.h>" or "<ext/hash_map>" than
-to search the subdirectory itself via a "-I" directive.
-
diff --git a/libstdc++-v3/docs/html/17_intro/HEADER_POLICY b/libstdc++-v3/docs/html/17_intro/HEADER_POLICY
deleted file mode 100644
index c6fa6d38b54..00000000000
--- a/libstdc++-v3/docs/html/17_intro/HEADER_POLICY
+++ /dev/null
@@ -1,164 +0,0 @@
-
-Header Policy
--------------
-
-The C++ Standard specifies many mutual dependencies among the
-headers it defines. It offers no advice on how to arrange headers
-to avoid problems. The worst such problem is circular references.
-Most simply this is "A includes B, B includes A":
-
- // file <A> // file <B>
- #ifndef A #ifndef B
- #define A 1 #define B 1
- #include <B> #include <A>
- typedef int A_type; typedef int B_type;
- extern B_type g(A_type); extern A_type f(B_type);
- #endif /* A */ #endif /* B */
-
- // file C.cc
- #include <A>
-
-The typical effect of such an "include loop" may be seen by tracing
-the preprocessor activity:
-
- C // file C.cc
- C #include <A>
- A // file <A>
- A #ifndef A
- A #define A 1
- A #include <B>
- B // file <B>
- B #ifndef B
- B #define B 1
- B #include <A>
- A // file <A>
- A #ifndef A <-- oops, cpp symbol A defined already
- A ... <-- skip <A> contents
- A #endif
- B typedef int B_type;
- B extern A_type f(B_type); <-- error, A_type not defined yet.
- B #endif /* B */
- A typedef int A_type;
- A extern B_type g(A_type);
- A #endif /* A */
-
-The main symptom of #include loops is that definitions from file <A>
-are not available after the #include <A> for certain include orders.
-The number of standard headers makes testing all permutations of
-include order impractical, so a policy is needed to prevent chaos.
-In any case, for some standard headers (as for the above) no ordering
-can eliminate the loop.
-
-Other factors influence the policy. Typical implementations of
-Make (unfortunately including GNU make) have bugs relating to file
-names with no suffix, that lead to such problems as failure to track
-dependencies on such files and an inclination to _delete_ them.
-Therefore, headers used in building the library are always of the
-form <bits/yyy.h> generally, or specifically <bits/std_xxx.h> for
-an equivalent to the standard header <xxx>.
-
-Standard headers <xxx> are all placed under directory std/, and
-are ignored except during installation. These headers simply
-#include the corresponding header <bits/std_xxx.h>.
-
-Standard substitute headers <bits/std_xxx.h> that have any complexity
-may sub-include other headers. When they sub-include non-standard
-headers, they first include all the headers required for that
-non-standard header.
-
-Mutual dependencies are handled by splitting up the declarations
-intended for standard headers among two or more files, and then
-interleaving them as needed. For example, we replace <A> and <B>
-above, as follows:
-
- // file <bits/std_A.h>
- #ifndef _CPP_A
- #define _CPP_A
- # include <bits/A_types.h>
- # include <bits/B_types.h>
- # include <bits/A_funs.h>
- #endif
-
- // file <bits/std_B.h>
- #ifndef _CPP_B
- #define _CPP_B
- # include <bits/A_types.h>
- # include <bits/B_types.h>
- # include <bits/B_funs.h>
- #endif
-
- // file <bits/A_types.h>
- #ifndef _CPP_BITS_A_TYPES_H
- #define _CPP_BITS_A_TYPES_H
- typedef int A_type;
- #endif
-
- // file <bits/B_types.h>
- #ifndef _CPP_BITS_B_TYPES_H
- #define _CPP_BITS_B_TYPES_H
- typedef int B_type;
- #endif
-
- // file <bits/A_funs.h>
- #ifndef _CPP_BITS_A_FUNS_H
- #define _CPP_BITS_A_FUNS_H
- extern B_type g(A_type);
- #endif
-
- // file <bits/B_funs.h>
- #ifndef _CPP_BITS_B_FUNS_H
- #define _CPP_BITS_B_FUNS_H
- extern A_type f(B_type);
- #endif
-
-Of course we have the standard headers under their mandated names:
-
- // file <std/A>
- #ifndef _CPP_A
- #define _CPP_A
- # include <bits/std_A.h>
- #endif
-
- // file <std/B>
- #ifndef _CPP_B
- #define _CPP_B
- # include <bits/std_B.h>
- #endif
-
-Notice that the include guards are named uniformly except that
-the guard for standard header <bits/std_A.h> is just _CPP_A,
-identically as the header <A> in std/.
-
-At installation the files std/* can be replaced by symbolic links,
-or simply copied into place as is. The result is:
-
- include/
- include/A -> bits/std_A.h
- include/B -> bits/std_A.h
- include/bits/
- include/bits/std_A.h
- include/bits/std_B.h
- include/bits/A_types.h
- include/bits/B_types.h
- include/bits/A_funs.h
- include/bits/B_funs.h
-
-
-Of course splitting up standard headers this way creates
-complexity, so it is not done routinely, but only in response
-to discovered needs.
-
-Another reason to split up headers is for support of separate
-compilation of templates. This interacts with the foregoing
-because template definitions typically have many more dependencies
-on other headers than do pure declarations. Non-inline template
-definitions are placed in a separate ".tcc" file that is included
-by the standard header, and any other standard header that
-requires definitions from it for its implementation.
-
-The key to preventing chaos, given the above structure, is:
-
- Only standard headers <bits/std_xxxx.h> should sub-include
- other headers.
-
-
diff --git a/libstdc++-v3/docs/html/17_intro/PROBLEMS b/libstdc++-v3/docs/html/17_intro/PROBLEMS
deleted file mode 100644
index 52223911295..00000000000
--- a/libstdc++-v3/docs/html/17_intro/PROBLEMS
+++ /dev/null
@@ -1,8 +0,0 @@
-Irix 6.2:
-- math.h: defines extern long double hypotl( long double ); i.e., only
- one argument. They've fixed this in 6.3.
-
-DES OSF 3.2 & 4.0:
-- libm define sincos, sincosf, and sincosl but there are no prototypes and
- especially the return type is nowhere defined. The functions are
- documented in the man pages, though.
diff --git a/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES b/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES
deleted file mode 100644
index 79920407c21..00000000000
--- a/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES
+++ /dev/null
@@ -1,83 +0,0 @@
-2002-05-02
-
-Release Notes
--------------
-The Standard C++ Library, or libstdc++-v3, is an ongoing project
-to fully implement the ISO 14882 Standard C++ library as described in
-chapters 17 through 27 and annex D.
-
-This is the fifteenth snapshot of the libstdc++ rewrite. It still
-has some incomplet and incorrekt parts, but it's a lot less incomplete
-and incorrect than some of the earlier snapshots, and quite usable.
-
-The Standard C++ Library, follows an open development model,
-attempting to be fully buzzword, bazaar, and GNU compliant. Full
-details on participating, including contributor guidelines, mailing
-list subscription, mailing list archives, up-to-date documentation,
-and various and sundry other details can be found at the following
-URL:
-
- http://gcc.gnu.org/libstdc++/
-
-
-New:
----
-- more doxygen documentation
-- more named locale fixups
-- stdio_filebuf that takes fd, FILE
-- io performance tuning
-- allocation tuning, valgrind fixups
-- __cxa_demangle now supported
-
-
-Bugs fixed:
------------
-6533, 6513, 6501, 6511, 5820, 6414, 4150, 6360, 4164, 1072, 6124,
-5180, 3457, 3139, 5268, 3983, 5542, 3129, 5207, 3719, 5734
-+ others.
-
-
-What doesn't:
--------------
-- see BUGS.
-
-
-Build and Install
------------------
-Up to date build and install directions can be found at:
-http://gcc.gnu.org/libstdc++/install.html
-
-
-Contact:
---------
-Places have changed from previous snapshots. The web page, which has
-information about joining the mailing list and searching its archives,
-CVS access, and contribution information is now at:
-
- http://gcc.gnu.org/libstdc++/
-
-Please note that the mailing list has moved, and is now hosted on
-gcc.gnu.org. (The web site above has the most up-to-date info.)
-
-Obtain the library snapshot via ftp (including these release notes) from
-
- ftp://gcc.gnu.org/pub/libstdc++/
-
-The library is maintained by Benjamin Kosnik, Gabriel
-Dos Reis, Phil Edwards, Ulrich Drepper, Loren James Rittle,
-and Paolo Carlini.
-
-
-Development tools:
-------------------
-
-You will need a current version of gcc to compile this snapshot of
-libstdc++. The use of the latest stable gcc-3.0.x release (3.0.4), CVS
-gcc, or gcc-3_1-branch is strongly recommended, which may also
-introduce additional dependencies for up-to-date binutils. In
-particular, current binutils (2.12) is recommended so that symbol
-versioning for the library is on by default. In addition, you may need
-up-to-date tools for modifying Makefiles and regenerating configure
-scripts: automake (version 1.4), autoconf (version 2.13 and higher),
-and libtool.
-
diff --git a/libstdc++-v3/docs/html/17_intro/TODO b/libstdc++-v3/docs/html/17_intro/TODO
deleted file mode 100644
index a0a257c4876..00000000000
--- a/libstdc++-v3/docs/html/17_intro/TODO
+++ /dev/null
@@ -1,164 +0,0 @@
-std::allocator
-
- - persistent allocator
-
- - shared memory allocator (use or link to boost::shmem::allocator)
-
-std::string
-
- - document __gnu_cxx::__versa_string, add new policies
- (Policy-based design incorporating COW
- vs. deep copy issues, MT scalability
- See Andrei Alexandrescu, June 2001, C/C++ Users Journal
- "Generic<Programming>: A Policy-Based basic_string Implementation"
- http://www.cuj.com/documents/s=7994/cujcexp1906alexandr/)
-
- - operator!= and utility/rel_ops operators need to be made safe with
- string and vector iterator classes. basic_string::reverse_iterator may
- be implemented incorrectly, or need things like
- operator==(__normal_iterator, const char*&), and swap(vector)
-
- - 'do the right thing' ctor fixing needs to be done for string. This
- is still subject to some debate on the library issues list, so I
- suggest punting till the dust clears.
-
- - fix template members of basic_string<> to overload iterators and
- non-iterators properly. (This is the infamous hack as in vector<> etc
- 23.1.1 para 10.)
-
-std::locale
-
- - implement __convert_to_v and __convert_from_v without "C" library
- functions and and LANG environment variable dependencies.
-
- - use localedata to implement generic named (non-MT-safe) locales?
- Figure out a way to use ICU data, like libjava? Re-package and use
- the glibc localedata, even if we aren't on linux? Need a generic
- locale model that does something besides the "C" locale.
-
- - make locale::classic() separate from named locale code. This will
- improve the static linkage situation, but will require new
- initialization code. In particular, we need lazy-initialization of
- locale::classic(), and maybe the has_facet/use_facet functions for all
- the required facets. The end goal is a self-contained
- locale_init.cc, or one with transitive closure without the locale
- instantiations (locale-inst.cc) or the named locale bits
- (localename.cc).
-
- - Jerry(?)/Paolo(?) work on __float_to_char.
-
- - minimize ctype convertion in data facets, see numpunct/num_put/num_get
-
-std::basic_filebuf, 27_io
-
- - wfilebuf, get variable-encoding working and tested, including
- positioning and seeking. (I think this may be done now)
-
- - wfilebuf testsuite (getting there...)
-
- - look ahead for unbuffered io, so know when multiple putc's can be
- coalesced.
-
- - unlocked __basic_file + new mutext class
-
- - optimized the sentries for istream/ostream
-
- - v2 vs. v3 speed
-
- - add optimization hooks (esp. whitespace eating) to streambuf
- - add _M_begin() and _M_end() to streambuf
- - add algorithm specializations for [io]streambuf_iterator (copy find etc.)
-
-testsuite
-
- - valgrind hooks into make check so can tell memory leakage
- Some commentary on the valgrind users list
-
- - add hooks for qmtest, pychart, other for visual diffs
-
- - automatic testing of interactive tests
-
- - diffing generated output files
-
- - provide testsuites for numerics.
-
- - make check-abi needs to have full symbol checking. Scope the LSB
- testsuite, see what's going on with the typeinfo etc. bits.
-
- - try to do a better job of ABI testing, with instantiations of all
- standard-specified types checked, not just exported symbols.
-
-g++/binutils
-
- - compression for wide versions of basic types, not just narrow
-
-threads
-
- - create MT abstraction layer for atomicity to pthreads.
-
- - solution for threads + C++.
-
-other/random
-
-- relocations, work on getting these down
-
-- issues with __builtin_memcpy and std::copy from Jerry Quinn
- http://gcc.gnu.org/ml/libstdc++/2003-02/msg00056.html
- http://gcc.gnu.org/ml/libstdc++/2003-02/msg00302.html
- http://gcc.gnu.org/ml/gcc/2003-10/msg01305.html
-
-- fix dependency tracking for includes (.h, .tcc) during build process.
-
-- coordinate with "C" library people the "C" compatibility headers.
-
-- Think about naming all member data and member functions consistently
- as per
- funtions: _M_verb_adverb
- data: _M_noun_adjective
-
-- A C++STYLE guide that deals with nested namespaces, and that
-everybody can live with.
-
-- exception specifications need to be reviewed for all parts of the
-library support and utility areas, particularly <new>. Part of this is
-a standards issue, where the 27_io standard is really in an odd
-spot. Do the work to make this consistent.
-
-- C-related issues WRT to io and filepos, mbstate_t. Seeking in wide
-streams. May need to define operators for mbstate_t so that
-'mbstate_t& == mbstate_t' is something that can be done.
-
-- scoping/linking issues WRT to C structs need to be worked out. See
-Nathan's commentary on cantrip, http://www.cantrip.org/cheaders.html
-
-- auto_ptr: seems to be some disagreement on what is
-standards-conformant behavior, specially on conversion operators.
-
-- list::assignment operator needs const_cast
-
-- a cleaner division between pointers-to-value_type and true iterators
-needs to be drawn throughout the entire STL implementation.
-
-- priority_queue conversions may be non-conformant
-
-- Protect valarray::result_type (not Standard) and make it work with
- the various helper classes.
-
-- Make sure `valarray<bool> & == _Expr<_BinClos<logical_or,_ValArray,_ValArray,double,double>,bool>'
- is defined
-
-- All of the Library working group closed issues need to be
-addressed. Some of them proposed resolutions are already in the v-3
-sources, with macro-guards. Also, same with the TR.
-
-- need to think about doing a .texi or DocBook manual, instead of all
-these HTML pages. In addition, it would be nice to have a full manual,
-instead of a lot of ad-hoc pages. Weaknesses include numerics, locale,
-and io.
-
-- add FAQ entries -- improve the install instructions
-
-- add HOWTO entries
-
-- do more doxygen manpages
-
diff --git a/libstdc++-v3/docs/html/17_intro/concept_check.diff b/libstdc++-v3/docs/html/17_intro/concept_check.diff
deleted file mode 100644
index afb17f5efd6..00000000000
--- a/libstdc++-v3/docs/html/17_intro/concept_check.diff
+++ /dev/null
@@ -1,382 +0,0 @@
-
-Changes made while bringing boost/concept_check.hpp to v3's concept_check.h:
-
-1) File format changed from DOS to Unix.
-2) Boost config.hpp and other workaround files dropped (unneeded in g++ v3).
-3) Conditionally-compiled code depending on those "breakage" macros was
- removed, or not, depending on the macro, so that the macros themselves
- are gone. Since the same code would always be compiled, let's make it
- easier on the reader and a few milliseconds faster for cpplib.
-4) Tests for NDEBUG were removed; if NDEBUG is defined, none of the checking
- code will even be included.
-5) BOOST_CLASS_REQUIRES* changed to accept a namespace parameter.
-6) SameTypeConcept added (simple wrapper around existing code).
-7) An unused variable in OutputIteratorConcept was removed.
-
-At checkin, this was the exact diff, modulo the end-of-line character changes:
-
-
---- concept_check.hpp.orig Sun Apr 1 08:59:46 2001
-+++ boost_concept_check.h Mon Apr 2 18:56:41 2001
-@@ -5,20 +5,15 @@
- // "as is" without express or implied warranty, and with no claim as
- // to its suitability for any purpose.
- //
-+
-+// GCC Note: based on version 1.12.0 of the Boost library.
- #ifndef BOOST_CONCEPT_CHECKS_HPP
- #define BOOST_CONCEPT_CHECKS_HPP
-
--#include <boost/config.hpp>
--#include <boost/iterator.hpp>
--#include <boost/iterator.hpp>
--#include <utility>
--#include <boost/pending/limits.hpp>
--
--#if (__GNUC__) || defined(__KCC) || defined(__ghs) || defined(__MWERKS__)
--#define BOOST_FPTR &
--#else
--#define BOOST_FPTR
--#endif
-+#pragma GCC system_header
-+#include <bits/stl_iterator_base_types.h> // for traits and tags
-+#include <utility> // for pair<>
-+
-
- namespace boost {
-
-@@ -27,80 +22,64 @@
- template <class Concept>
- void function_requires()
- {
--#if !defined(NDEBUG)
-- void (Concept::*x)() = BOOST_FPTR Concept::constraints;
-+ void (Concept::*x)() = &Concept::constraints;
- ignore_unused_variable_warning(x);
--#endif
- }
-
--// The BOOST_CLASS_REQUIRES macros use function pointers as
--// template parameters, which VC++ does not support.
--
--#if defined(BOOST_NO_FUNCTION_PTR_TEMPLATE_PARAMETERS)
--
--#define BOOST_CLASS_REQUIRES(type_var, concept)
--#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, concept)
--#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, concept)
--#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, concept)
-
--#else
--
--#define BOOST_CLASS_REQUIRES(type_var, concept) \
-- typedef void (concept <type_var>::* func##type_var##concept)(); \
-+#define BOOST_CLASS_REQUIRES(type_var, ns, concept) \
-+ typedef void (ns::concept <type_var>::* func##type_var##concept)(); \
- template <func##type_var##concept _Tp1> \
- struct concept_checking_##type_var##concept { }; \
- typedef concept_checking_##type_var##concept< \
-- BOOST_FPTR concept <type_var>::constraints> \
-+ &ns::concept <type_var>::constraints> \
- concept_checking_typedef_##type_var##concept
-
--#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, concept) \
-- typedef void (concept <type_var1,type_var2>::* func##type_var1##type_var2##concept)(); \
-+#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, ns, concept) \
-+ typedef void (ns::concept <type_var1,type_var2>::* func##type_var1##type_var2##concept)(); \
- template <func##type_var1##type_var2##concept _Tp1> \
- struct concept_checking_##type_var1##type_var2##concept { }; \
- typedef concept_checking_##type_var1##type_var2##concept< \
-- BOOST_FPTR concept <type_var1,type_var2>::constraints> \
-+ &ns::concept <type_var1,type_var2>::constraints> \
- concept_checking_typedef_##type_var1##type_var2##concept
-
--#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, concept) \
-- typedef void (concept <type_var1,type_var2,type_var3>::* func##type_var1##type_var2##type_var3##concept)(); \
-+#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, ns, concept) \
-+ typedef void (ns::concept <type_var1,type_var2,type_var3>::* func##type_var1##type_var2##type_var3##concept)(); \
- template <func##type_var1##type_var2##type_var3##concept _Tp1> \
- struct concept_checking_##type_var1##type_var2##type_var3##concept { }; \
- typedef concept_checking_##type_var1##type_var2##type_var3##concept< \
-- BOOST_FPTR concept <type_var1,type_var2,type_var3>::constraints> \
-+ &ns::concept <type_var1,type_var2,type_var3>::constraints> \
- concept_checking_typedef_##type_var1##type_var2##type_var3##concept
-
--#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, concept) \
-- typedef void (concept <type_var1,type_var2,type_var3,type_var4>::* func##type_var1##type_var2##type_var3##type_var4##concept)(); \
-+#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, ns, concept) \
-+ typedef void (ns::concept <type_var1,type_var2,type_var3,type_var4>::* func##type_var1##type_var2##type_var3##type_var4##concept)(); \
- template <func##type_var1##type_var2##type_var3##type_var4##concept _Tp1> \
- struct concept_checking_##type_var1##type_var2##type_var3##type_var4##concept { }; \
- typedef concept_checking_##type_var1##type_var2##type_var3##type_var4##concept< \
-- BOOST_FPTR concept <type_var1,type_var2,type_var3,type_var4>::constraints> \
-+ &ns::concept <type_var1,type_var2,type_var3,type_var4>::constraints> \
- concept_checking_typedef_##type_var1##type_var2##type_var3##type_var4##concept
-
-
--#endif
--
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <class T, class U>
- struct require_same { };
-
- template <class T>
- struct require_same<T,T> { typedef T type; };
--#else
--// This version does not perform checking, but will not do any harm.
--template <class T, class U>
--struct require_same { typedef T type; };
--#endif
-+
-+ template <class T, class U>
-+ struct SameTypeConcept
-+ {
-+ void constraints() {
-+ typedef typename require_same<T, U>::type req;
-+ }
-+ };
-
- template <class T>
- struct IntegerConcept {
- void constraints() {
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- errortype_must_be_an_integer_type();
--#endif
- }
- };
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <> struct IntegerConcept<short> { void constraints() {} };
- template <> struct IntegerConcept<unsigned short> { void constraints() {} };
- template <> struct IntegerConcept<int> { void constraints() {} };
-@@ -108,32 +87,24 @@
- template <> struct IntegerConcept<long> { void constraints() {} };
- template <> struct IntegerConcept<unsigned long> { void constraints() {} };
- // etc.
--#endif
-
- template <class T>
- struct SignedIntegerConcept {
- void constraints() {
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- errortype_must_be_a_signed_integer_type();
--#endif
- }
- };
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <> struct SignedIntegerConcept<short> { void constraints() {} };
- template <> struct SignedIntegerConcept<int> { void constraints() {} };
- template <> struct SignedIntegerConcept<long> { void constraints() {} };
- // etc.
--#endif
-
- template <class T>
- struct UnsignedIntegerConcept {
- void constraints() {
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- errortype_must_be_an_unsigned_integer_type();
--#endif
- }
- };
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <> struct UnsignedIntegerConcept<unsigned short>
- { void constraints() {} };
- template <> struct UnsignedIntegerConcept<unsigned int>
-@@ -141,7 +112,6 @@
- template <> struct UnsignedIntegerConcept<unsigned long>
- { void constraints() {} };
- // etc.
--#endif
-
- //===========================================================================
- // Basic Concepts
-@@ -159,15 +129,11 @@
- struct AssignableConcept
- {
- void constraints() {
--#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = a; // require assignment operator
--#endif
- const_constraints(a);
- }
- void const_constraints(const TT& b) {
--#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = b; // const required for argument to assignment
--#endif
- }
- TT a;
- };
-@@ -196,17 +162,13 @@
- {
- void constraints() {
- TT b(a);
--#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = a; // require assignment operator
--#endif
- const_constraints(a);
- ignore_unused_variable_warning(b);
- }
- void const_constraints(const TT& b) {
- TT c(b);
--#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = b; // const required for argument to assignment
--#endif
- ignore_unused_variable_warning(c);
- }
- TT a;
-@@ -304,6 +266,9 @@
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOpConcept);
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOpConcept);
-
-+#undef BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
-+#undef BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT
-+
- //===========================================================================
- // Function Object Concepts
-
-@@ -318,7 +283,6 @@
- };
-
-
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <class Func>
- struct GeneratorConcept<Func,void>
- {
-@@ -327,7 +291,6 @@
- }
- Func f;
- };
--#endif
-
- template <class Func, class Return, class Arg>
- struct UnaryFunctionConcept
-@@ -340,7 +303,6 @@
- Return r;
- };
-
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <class Func, class Arg>
- struct UnaryFunctionConcept<Func, void, Arg> {
- void constraints() {
-@@ -348,7 +310,6 @@
- }
- Func f;
- };
--#endif
-
- template <class Func, class Return, class First, class Second>
- struct BinaryFunctionConcept
-@@ -362,7 +323,6 @@
- Return r;
- };
-
--#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <class Func, class First, class Second>
- struct BinaryFunctionConcept<Func, void, First, Second>
- {
-@@ -373,7 +333,6 @@
- First first;
- Second second;
- };
--#endif
-
- template <class Func, class Arg>
- struct UnaryPredicateConcept
-@@ -422,9 +381,7 @@
- function_requires< AssignableConcept<TT> >();
- function_requires< DefaultConstructibleConcept<TT> >();
- function_requires< EqualityComparableConcept<TT> >();
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- typedef typename std::iterator_traits<TT>::value_type V;
--#endif
- (void)*i; // require dereference operator
- }
- TT i;
-@@ -446,7 +403,6 @@
- void constraints() {
- function_requires< TrivialIteratorConcept<TT> >();
- // require iterator_traits typedef's
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- typedef typename std::iterator_traits<TT>::difference_type D;
- function_requires< SignedIntegerConcept<D> >();
- typedef typename std::iterator_traits<TT>::reference R;
-@@ -455,7 +411,6 @@
- function_requires< ConvertibleConcept<
- typename std::iterator_traits<TT>::iterator_category,
- std::input_iterator_tag> >();
--#endif
- ++i; // require preincrement operator
- i++; // require postincrement operator
- }
-@@ -471,7 +426,7 @@
- i++; // require postincrement operator
- *i++ = t; // require postincrement and assignment
- }
-- TT i, j;
-+ TT i;
- ValueT t;
- };
-
-@@ -480,14 +435,12 @@
- {
- void constraints() {
- function_requires< InputIteratorConcept<TT> >();
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- function_requires< ConvertibleConcept<
- typename std::iterator_traits<TT>::iterator_category,
- std::forward_iterator_tag> >();
- typedef typename std::iterator_traits<TT>::reference reference;
- reference r = *i;
- ignore_unused_variable_warning(r);
--#endif
- }
- TT i;
- };
-@@ -507,11 +460,9 @@
- {
- void constraints() {
- function_requires< ForwardIteratorConcept<TT> >();
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- function_requires< ConvertibleConcept<
- typename std::iterator_traits<TT>::iterator_category,
- std::bidirectional_iterator_tag> >();
--#endif
- --i; // require predecrement operator
- i--; // require postdecrement operator
- }
-@@ -536,12 +487,10 @@
- void constraints() {
- function_requires< BidirectionalIteratorConcept<TT> >();
- function_requires< ComparableConcept<TT> >();
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- function_requires< ConvertibleConcept<
- typename std::iterator_traits<TT>::iterator_category,
- std::random_access_iterator_tag> >();
- typedef typename std::iterator_traits<TT>::reference R;
--#endif
-
- i += n; // require assignment addition operator
- i = i + n; i = n + i; // require addition with difference type
-@@ -552,11 +501,7 @@
- }
- TT a, b;
- TT i, j;
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- typename std::iterator_traits<TT>::difference_type n;
--#else
-- std::ptrdiff_t n;
--#endif
- };
-
- template <class TT>
-@@ -568,11 +513,7 @@
- i[n] = *i; // require element access and assignment
- }
- TT i;
--#ifndef BOOST_NO_STD_ITERATOR_TRAITS
- typename std::iterator_traits<TT>::difference_type n;
--#else
-- std::ptrdiff_t n;
--#endif
- };
-
- //===========================================================================
-
diff --git a/libstdc++-v3/docs/html/17_intro/configury.html b/libstdc++-v3/docs/html/17_intro/configury.html
deleted file mode 100644
index 4b676f0405e..00000000000
--- a/libstdc++-v3/docs/html/17_intro/configury.html
+++ /dev/null
@@ -1,289 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="DESCRIPTION" content="configury for libstdc++" />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 configury</title>
-<link rel="StyleSheet" href="../lib3styles.css" type='text/css' />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-</head>
-<body>
-
-<h1><code>&gt; open configury door</code></h1>
-<h1><code>&gt; look</code></h1>
-
-<p class="larger"><code>You are in a maze of twisty passages, all
-different.</code></p>
-<p class="larger"><code>It is dark. You are likely to be eaten by a
-Canadian cross build.</code></p>
-
-
-<hr />
-<h2>Notes on libstdc++-v3 configury</h2>
-<blockquote>
-No problem is insoluble in all conceivable circumstances.<br />
--- The Cosmic AC,
-<a href="http://mit.edu/tylerc/www/twt/LQ1.htm">The
-Last Question</a>, by Isaac Asimov
-</blockquote>
-<ul>
- <li><a href="#deps">what comes from where</a></li>
- <li><a href="#breakout">storing information in non-AC files, like
- configure.host</a></li>
- <li><a href="#general">general config notes</a></li>
- <li><a href="#aclayout">acinclude.m4 layout</a></li>
- <li><a href="#enable"><code>--enable</code> howto</a></li>
-</ul>
-
-<hr />
-<h3><a name="deps">what comes from where</a></h3>
-<p class="centered"><img src="confdeps.png"
- alt="Dependency graph in PNG graphics format. (Get a better browser!)" /></p>
-
-<p>Regenerate using a command sequence like
- <code>"aclocal-1.7 &amp;&amp; autoconf-2.59 &amp;&amp; autoheader-2.59
- &amp;&amp; automake-1.7"</code> as needed. And/or configure with
- --enable-maintainer-mode. The version numbers will vary depending on
- <a href="http://gcc.gnu.org/install/prerequisites.html">the current
- requirements</a> and your vendor's choice of installation names.
-</p>
-
-
-<hr />
-<h3><a name="breakout">storing information in non-AC files, like
- configure.host</a></h3>
-<p>Until that glorious day when we can use AC_TRY_LINK with a cross-compiler,
- we have to hardcode the results of what the tests would have shown if
- they could be run. So we have an inflexible mess like crossconfig.m4.
-</p>
-
-<p>Wouldn't it be nice if we could store that information in files like
- configure.host, which can be modified without needing to regenerate
- anything, and can even be tweaked without really knowing how the configury
- all works? Perhaps break the pieces of crossconfig.m4 out and place them in
- their appropriate config/{cpu,os} directory.
-</p>
-
-<p>Alas, writing macros like "<code>AC_DEFINE(HAVE_A_NICE_DAY)</code>" can
- only be done inside files which are passed through autoconf. Files which
- are pure shell script can be source'd at configure time. Files which
- contain autoconf macros must be processed with autoconf. We could still
- try breaking the pieces out into "config/*/cross.m4" bits, for instance,
- but then we would need arguments to aclocal/autoconf to properly find
- them all when generating configure. I would discourage that.
-</p>
-
-
-<hr />
-<h3><a name="general">general config notes</a></h3>
-<p>Lots of stuff got thrown out because the new autotools kindly generate
- the same (or better) shell code for us.
-</p>
-
-<p>Most comments should use {octothorpes, shibboleths, hash marks, pound
- signs, whatevers} rather than "dnl". Nearly all comments in configure.ac
- should. Comments inside macros written in ancilliary .m4 files should.
- About the only comments which should <em>not</em> use #, but use dnl
- instead, are comments <em>outside</em> our own macros in the ancilliary
- files. The difference is that # comments show up in <code>configure</code>
- (which is most helpful for debugging), while dnl'd lines just vanish.
- Since the macros in ancilliary files generate code which appears in odd
- places, their "outside" comments tend to not be useful while reading
- <code>configure</code>.
-</p>
-
-<p>Do not use any <code>$target*</code> variables, such as
- <code>$target_alias</code>. The single exception is in configure.ac,
- for automake+dejagnu's sake.
-</p>
-
-<p>
-</p>
-
-<hr />
-<h3><a name="aclayout">acinclude.m4 layout</a></h3>
-<p>The nice thing about acinclude.m4/aclocal.m4 is that macros aren't actually
- performed/called/expanded/whatever here, just loaded. So we can arrange
- the contents however we like. As of this writing, acinclude.m4 is arranged
- as follows:
-</p>
-<pre>
- GLIBCXX_CHECK_HOST
- GLIBCXX_TOPREL_CONFIGURE
- GLIBCXX_CONFIGURE
-</pre>
-<p>All the major variable "discovery" is done here. CXX, multilibs, etc.
-</p>
-<pre>
- fragments included from elsewhere
-</pre>
-<p>Right now, "fragments" == "the math/linkage bits".
-</p>
-<pre>
- GLIBCXX_CHECK_COMPILER_FEATURES
- GLIBCXX_CHECK_LINKER_FEATURES
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
-</pre>
-<p>Next come extra compiler/linker feature tests. Wide character support
- was placed here because I couldn't think of another place for it. It will
- probably get broken apart like the math tests, because we're still disabling
- wchars on systems which could actually support them.
-</p>
-<pre>
- GLIBCXX_CHECK_SETRLIMIT_ancilliary
- GLIBCXX_CHECK_SETRLIMIT
- GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
- GLIBCXX_CHECK_POLL
- GLIBCXX_CHECK_WRITEV
-
- GLIBCXX_CONFIGURE_TESTSUITE
-</pre>
-<p>Feature tests which only get used in one place. Here, things used only in
- the testsuite, plus a couple bits used in the guts of I/O.
-</p>
-<pre>
- GLIBCXX_EXPORT_INCLUDES
- GLIBCXX_EXPORT_FLAGS
- GLIBCXX_EXPORT_INSTALL_INFO
-</pre>
-<p>Installation variables, multilibs, working with the rest of the compiler.
- Many of the critical variables used in the makefiles are set here.
-</p>
-<pre>
- GLIBGCC_ENABLE
- GLIBCXX_ENABLE_C99
- GLIBCXX_ENABLE_CHEADERS
- GLIBCXX_ENABLE_CLOCALE
- GLIBCXX_ENABLE_CONCEPT_CHECKS
- GLIBCXX_ENABLE_CSTDIO
- GLIBCXX_ENABLE_CXX_FLAGS
- GLIBCXX_ENABLE_C_MBCHAR
- GLIBCXX_ENABLE_DEBUG
- GLIBCXX_ENABLE_DEBUG_FLAGS
- GLIBCXX_ENABLE_LONG_LONG
- GLIBCXX_ENABLE_PCH
- GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
- GLIBCXX_ENABLE_SYMVERS
- GLIBCXX_ENABLE_THREADS
-</pre>
-<p>All the features which can be controlled with enable/disable configure
- options. Note how they're alphabetized now? Keep them like that. :-)
-</p>
-<pre>
- AC_LC_MESSAGES
- libtool bits
-</pre>
-<p>Things which we don't seem to use directly, but just has to be present
- otherwise stuff magically goes wonky.
-</p>
-
-
-<hr />
-<h3><a name="enable"><code>--enable</code> howto</a></h3>
-<p>All the GLIBCXX_ENABLE_FOO macros use a common helper, GLIBCXX_ENABLE.
- (You don't have to use it, but it's easy.) The helper does two things
- for us:
-</p>
-
-<ol>
- <li>Builds the call to the AC_ARG_ENABLE macro, with --help text properly
- quoted and aligned. (Death to changequote!)</li>
- <li>Checks the result against a list of allowed possibilities, and signals
- a fatal error if there's no match. This means that the rest of the
- GLIBCXX_ENABLE_FOO macro doesn't need to test for strange arguments,
- nor do we need to protect against empty/whitespace strings with the
- <code>"x$foo" = "xbar"</code> idiom.</li>
-</ol>
-
-<p>Doing these things correctly takes some extra autoconf/autom4te code,
- which made our macros nearly illegible. So all the ugliness is factored
- out into this one helper macro.
-</p>
-
-<p>Many of the macros take an argument, passed from when they are expanded
- in configure.ac. The argument controls the default value of the
- enable/disable switch. Previously, the arguments themselves had defaults.
- Now they don't, because that's extra complexity with zero gain for us.
-</p>
-
-<p>There are three "overloaded signatures". When reading the descriptions
- below, keep in mind that the brackets are autoconf's quotation characters,
- and that they will be stripped. Examples of just about everything occur
- in acinclude.m4, if you want to look.
-</p>
-
-<pre>
- GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
- GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
- GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
-</pre>
-
-<ul>
- <li><p>FEATURE is the string that follows --enable. The results of the test
- (such as it is) will be in the variable $enable_FEATURE, where FEATURE
- has been squashed. Example: <code>[extra-foo]</code>, controlled by the
- --enable-extra-foo option and stored in $enable_extra_foo.</p></li>
- <li><p>DEFAULT is the value to store in $enable_FEATURE if the user does not
- pass --enable/--disable. It should be one of the permitted values
- passed later. Examples: <code>[yes]</code>, or <code>[bar]</code>, or
- <code>[$1]</code> (which passes the argument given to the
- GLIBCXX_ENABLE_FOO macro as the default).</p>
- <p>For cases where we need to probe for particular models
- of things, it is useful to have an undocumented "auto" value here (see
- GLIBCXX_ENABLE_CLOCALE for an example).</p></li>
- <li><p>HELP-ARG is any text to append to the option string itself in the
- --help output. Examples: <code>[]</code> (i.e., an empty string,
- which appends nothing),
- <code>[=BAR]</code>, which produces
- <code>--enable-extra-foo=BAR</code>, and
- <code>[@&lt;:@=BAR@:&gt;@]</code>, which produces
- <code>--enable-extra-foo[=BAR]</code>. See the difference? See what
- it implies to the user?</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
-href="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_95.html#SEC95"><em>quadrigraphs</em></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 GLIBCXX_ENABLE.
- By convention, these are not full English sentences.
- Example: [turn on extra foo]</p></li>
-</ul>
-
-<p>With no other arguments, only the standard autoconf patterns are
- allowed: "<code>--{enable,disable}-foo[={yes,no}]</code>" The
- $enable_FEATURE variable is guaranteed to equal either "yes" or "no"
- after the macro. If the user tries to pass something else, an
- explanatory error message will be given, and configure will halt.
-</p>
-
-<p>The second signature takes a fifth argument,
- "<code>[permit <em>a</em>|<em>b</em>|<em>c</em>|<em>...</em>]</code>"
- This allows <em>a</em> or <em>b</em> or ... after the equals sign in the
- option, and $enable_FEATURE is guaranteed to equal one of them after the
- macro. Note that if you want to allow plain --enable/--disable with no
- "=whatever", you must include "yes" and "no" in the list of permitted
- values. Also note that whatever you passed as DEFAULT must be in the list.
- If the user tries to pass something not on the list, a semi-explanatory
- error message will be given, and configure will halt.
- Example: <code>[permit generic|gnu|ieee_1003.1-2001|yes|no|auto]</code>
-</p>
-
-<p>The third signature takes a fifth argument. It is arbitrary shell code
- to execute if the user actually passes the enable/disable option. (If
- the user does not, the default is used. Duh.) No argument checking at
- all is done in this signature. See GLIBCXX_ENABLE_CXX_FLAGS for an
- example of handling, and an error message.
-</p>
-
-<hr />
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/17_intro/contribute.html b/libstdc++-v3/docs/html/17_intro/contribute.html
deleted file mode 100644
index 0013d604925..00000000000
--- a/libstdc++-v3/docs/html/17_intro/contribute.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <title>How to contribute</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<!--990301 slightly modified version of the GCC contribute.html file-->
-<!-- #include virtual="/include/header-subpages.html"-->
-<body>
-<h2>How to contribute</h2>
-<p> The Standard C++ Library v3, follows an open development
-model. Active contributors are assigned maintainer-ship
-responsibility, and given write access to the CVS repository. First
-time contributors should follow this procedure:
-</p>
-
-<hr />
-<h4>ONE : read the documentation</h4>
-
-<ul>
- <li> Get and read the relevant sections of the C++ language
-specification. Copies of the full ISO 14882 standard are available on
-line via the ISO mirror site for committee members. Non-members, or
-those who have not paid for the privilege of sitting on the committee
-and sustained their two meeting commitment for voting rights, may get
-a copy of the standard from their respective national standards
-organization. In the USA, this national standards organization is ANSI
-and their web-site is right
-
- <a href="http://www.ansi.org">here.</a>
-(And if you've already registered with them, clicking this link will take you to directly to the place where you can
-<a href="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003">buy the standard on-line.)</a>
-</li>
-
-<li> The library working group bugs, and known defects, can be obtained here:
- <a href="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21 </a>
-</li>
-
-<li> The newsgroup dedicated to standardization issues is comp.std.c++: this FAQ for this group is quite useful and can be found <a href="http://www.jamesd.demon.co.uk/csc/faq.html"> here </a>.
-</li>
-
- <li> Peruse the <a href="http://www.gnu.org/prep/standards_toc.html">GNU Coding Standards</a>, and chuckle when you hit the part about "Using Languages Other Than C."
-</li>
-
- <li> Be familiar with the extensions that preceded these general GNU rules. These style issues for libstdc++ can be found in the file C++STYLE, located in the root level of the distribution, or <a href="C++STYLE"> here. </a>
-</li>
-
- <li> And last but certainly not least, read the library-specific information found <a href="../documentation.html"> here.</a>
-</li>
-
-</ul>
-
-
-
-<hr />
-<h4>TWO : copyright assignment</h4>
-<p>
-Small changes can be accepted without a copyright assignment form on
-file. New code and additions to the library need completed copyright
-assignment form on file at the FSF. Note: your employer may be required
-to fill out appropriate disclaimer forms as well.
-</p>
-
-<p> Historically, the libstdc++ assignment form added the following question:
-</p>
-
-<code>[Which Belgian comic book character is better, Tintin or
-Asterix, and why?]</code>
-
-<p>
-While not strictly necessary, humoring the maintainers and answering
-this question would be appreciated.
-</p>
-
-<p>
-For more information about getting a copyright assignment, please see
-<a href=http://www.gnu.org/prep/maintain_4.html#SEC4=> Legal Issues</a>
-</p>
-
-<p>
-Please contact <a href="mailto:bkoz+assign@redhat.com">Benjamin
-Kosnik</a> if you are confused about the assignment or have general
-licensing questions. When requesting an assignment form from <a
-HREF="mailto:assign@gnu.org">assign@gnu.org</a>, please cc
-the above libstdc++ maintainer so that progress can be monitored.
-</p>
-
-
-<hr />
-<h4>THREE : submitting patches</h4>
-
-<p>
-Every patch must have several pieces of information before it can be
-properly evaluated. Ideally (and to ensure the fastest possible
-response from the maintainers) it would have all of these pieces:
-</p>
-
-<ul>
-
- <li> A description of the bug and how your patch fixes this bug. For
- new features a description of the feature and your implementation. </li>
-
- <li> A ChangeLog entry as plain text; see the various ChangeLog files
- for format and content. If using you are using emacs as your editor,
- simply position the insertion point at the beginning of your change
- and hit CX-4a to bring up the appropriate ChangeLog
- entry. See--magic! Similar functionality also exists for vi. </li>
-
- <li> A testsuite submission or sample program that will easily and
- simply show the existing error or test new functionality. </li>
-
- <li> The patch itself. If you are accessing the CVS repository at
- Cygnus, use "cvs update; cvs diff -c3p NEW"; else, use "diff -c3p OLD
- NEW" ... If your version of diff does not support these options, then
- get the latest version of GNU diff. </li>
-
- <li> When you have all these pieces, bundle them up in a mail message
-and send it to libstdc++@gcc.gnu.org. All patches and related
-discussion should be sent to the libstdc++ mailing list. </li>
-
-</ul>
-
-</body>
-</html>
-
diff --git a/libstdc++-v3/docs/html/17_intro/headers_cc.txt b/libstdc++-v3/docs/html/17_intro/headers_cc.txt
deleted file mode 100644
index a0d926d71c5..00000000000
--- a/libstdc++-v3/docs/html/17_intro/headers_cc.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-// 1999-05-12 bkoz
-
-// Copyright (C) 1999 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.
-
-// 17.4.1.2 Headers
-
-
-// "C++" headers
-#include <algorithm>
-#include <bitset>
-#include <complex>
-#include <deque>
-#include <exception>
-#include <fstream>
-#include <functional>
-#include <iomanip>
-#include <ios>
-#include <iosfwd>
-#include <iostream>
-#include <istream>
-#include <iterator>
-#include <limits>
-#include <list>
-#include <locale>
-#include <map>
-#include <memory>
-#include <new>
-#include <numeric>
-#include <ostream>
-#include <queue>
-#include <set>
-#include <sstream>
-#include <stack>
-#include <stdexcept>
-#include <streambuf>
-#include <string>
-#include <typeinfo>
-#include <utility>
-#include <valarray>
-#include <vector>
-
-// "C" headers
-#include <cassert>
-#include <cctype>
-#include <cerrno>
-#include <cfloat>
-#include <ciso646>
-#include <climits>
-#include <clocale>
-#include <cmath>
-#include <csetjmp>
-#include <csignal>
-#include <cstdarg>
-#include <cstddef>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-
-// "C" headers that might not work if wchar_t support is disabled.
-#include <bits/c++config.h>
-#if _GLIBCXX_USE_WCHAR_T
- #include <cwchar>
- #include <cwctype>
-#endif
-
-int main() { return 0; }
diff --git a/libstdc++-v3/docs/html/17_intro/howto.html b/libstdc++-v3/docs/html/17_intro/howto.html
deleted file mode 100644
index 631e58fe0b9..00000000000
--- a/libstdc++-v3/docs/html/17_intro/howto.html
+++ /dev/null
@@ -1,385 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, gcc, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for libstdc++ chapter 17." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 17: Library Introduction</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Next" href="../18_support/howto.html" type="text/html"
- title="Library Support" />
-<link rel="Copyright" href="license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 17: Library Introduction</a></h1>
-
-<p>Chapter 17 is actually a list of definitions and descriptions used
- in the following chapters of the Standard when describing the actual
- library. Here, we use &quot;Introduction&quot; as an introduction
- to the <em>GNU implementation of</em> the ISO Standard C++ Library.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#2">The Standard C++ header files</a></li>
- <li><a href="#3">The Standard C++ library and multithreading</a></li>
- <li><a href="#4"><code>&lt;foo&gt;</code> vs <code>&lt;foo.h&gt;</code></a></li>
- <li><a href="porting-howto.html">Porting HOWTO</a></li>
- <li><a href="#5">Behavior specific to libstdc++-v3</a></li>
- <li><a href="#6">Preprocessor macros controlling the library</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="2">The Standard C++ header files</a></h2>
- <p>The Standard C++ Library specifies 50 header files that must be
- available to all hosted implementations. Actually, the word
- &quot;files&quot; is a misnomer, since the contents of the headers
- don't necessarily have to be in any kind of external file. The
- only rule is that when you <code>#include</code> a certain header, the
- contents of that header, as defined by the Standard, become
- available to you, no matter how.
- </p>
- <p>The names of the headers can be easily seen in
- <a href="headers_cc.txt"><code>testsuite/17_intro/headers.cc</code></a>,
- which is a small testbed we use to make certain that the headers
- all compile and run.
- </p>
-
-<hr />
-<h2><a name="3">The Standard C++ library and multithreading</a></h2>
- <p>This section discusses issues surrounding the proper compilation
- of multithreaded applications which use the Standard C++
- library. This information is GCC-specific since the C++
- standard does not address matters of multithreaded applications.
- Unless explicitly prefaced, all information in this section is
- current as of the GCC 3.0 release and all later point releases.
- </p>
- <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
- command-line options and macros (both of which were somewhat
- thread-implementation and port-specific). There were no
- guarantees related to being able to link code compiled with one
- set of options and macro setting with another set. For GCC 3.0,
- configuration of the threading model used with libraries and
- user-code is performed when GCC is configured and built using
- the --enable-threads and --disable-threads options. The ABI is
- stable for symbol name-mangling and limited functional
- compatibility exists between code compiled under different
- threading models.
- </p>
- <p>All normal disclaimers aside, multithreaded C++ application are
- only supported when libstdc++ and all user code was built with
- compilers which report (via <code> gcc/g++ -v </code>) the same thread
- model and that model is not <em>single</em>. As long as your
- final application is actually single-threaded, then it should be
- safe to mix user code built with a thread model of
- <em>single</em> with a libstdc++ and other C++ libraries built
- with another thread model useful on the platform. Other mixes
- may or may not work but are not considered supported. (Thus, if
- you distribute a shared C++ library in binary form only, it may
- be best to compile it with a GCC configured with
- --enable-threads for maximal interchangeability and usefulness
- with a user population that may have built GCC with either
- --enable-threads or --disable-threads.)
- </p>
- <p>When you link a multithreaded application, you will probably
- need to add a library or flag to g++. This is a very
- non-standardized area of GCC across ports. Some ports support a
- special flag (the spelling isn't even standardized yet) to add
- all required macros to a compilation (if any such flags are
- required then you must provide the flag for all compilations not
- just linking) and link-library additions and/or replacements at
- link time. The documentation is weak. Here is a quick summary
- to display how ad hoc this is: On Solaris, both -pthreads and
- -threads (with subtly different meanings) are honored. On OSF,
- -pthread and -threads (with subtly different meanings) are
- honored. On Linux/i386, -pthread is honored. On FreeBSD,
- -pthread is honored. Some other ports use other switches.
- AFAIK, none of this is properly documented anywhere other than
- in ``gcc -dumpspecs'' (look at lib and cpp entries).
- </p>
- <p>See <a href="../faq/index.html#3">FAQ</a> (general overview), <a
- href="../23_containers/howto.html#3">23</a> (containers), and <a
- href="../27_io/howto.html#9">27</a> (I/O) for more information.
- </p>
- <p>The libstdc++-v3 library (unlike libstdc++-v2, all of it, not
- just the STL) has been designed so that multithreaded
- applications using it may be written. The first problem is
- finding a <em>fast</em> method of implementation portable to all
- platforms. Due to historical reasons, some of the library is
- written against per-CPU-architecture spinlocks and other parts
- against the gthr.h abstraction layer which is provided by gcc.
- A minor problem that pops up every so often is different
- interpretations of what &quot;thread-safe&quot; means for a
- library (not a general program). We currently use the <a
- href="http://www.sgi.com/tech/stl/thread_safety.html">same
- definition that SGI</a> uses for their STL subset. However, the
- exception for read-only containers only applies to the STL
- components.
- </p>
- <p>Here is a small link farm to threads (no pun) in the mail archives
- that discuss the threading problem. Each link is to the first
- relevant message in the thread; from there you can use
- &quot;Thread Next&quot; to move down the thread. This farm is in
- latest-to-oldest order.
- </p>
- <ul>
- <li>Our threading expert Loren gives a breakdown of
- <a href="http://gcc.gnu.org/ml/libstdc++/2001-10/msg00024.html">the
- six situations involving threads</a> for the 3.0 release series.</li>
- <li><a href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00384.html">
- This message</a> inspired a recent updating of issues with threading
- and the SGI STL library. It also contains some example
- POSIX-multithreaded STL code.</li>
- </ul>
- <p> (A large selection of links to older messages has been removed; many
- of the messages from 1999 were lost in a disk crash, and the few
- people with access to the backup tapes have been too swamped with work
- to restore them. Many of the points have been superseded anyhow.)
- </p>
- <p>This section will be updated as new and interesting issues come
- to light.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4"><code>&lt;foo&gt;</code> vs <code>&lt;foo.h&gt;</code></a></h2>
- <p>The new-style headers are fully supported in libstdc++-v3. The compiler
- itself fully supports namespaces, including <code>std::</code>.
- </p>
- <p>For those of you new to ISO C++98, no, that isn't a typo, the headers
- really have new names. Marshall Cline's C++ FAQ Lite has a good
- explanation in
-<a href="http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4">item [27.4]</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="5">Behavior specific to libstdc++-v3</a></h2>
- <p>The ISO standard defines the following phrase:
- </p>
- <blockquote><dl>
- <dt><code>[1.3.5] implementation-defined behavior</code></dt>
- <dd>behavior, for a well-formed program construct and correct data, that
- depends on the implementation <strong>and that each implementation
- shall document</strong>.
- </dd>
- </dl></blockquote>
- <p>We do so here, for the C++ library only. Behavior of the compiler,
- linker, runtime loader, and other elements of &quot;the
- implementation&quot; are documented elsewhere. Everything listed in
- Annex B, Implementation Qualities, are also part of the compiler, not
- the library.
- </p>
- <p>For each entry, we give the section number of the standard, when
- applicable. This list is probably incomplet and inkorrekt.
- </p>
- <p><strong>[1.9]/11 #3</strong> If <code>isatty(3)</code> is true, then
- interactive stream support is implied.
- </p>
- <p><strong>[17.4.4.5]</strong> Non-reentrant functions are probably best
- discussed in the various sections on multithreading (see above).
- </p>
- <!-- [17.4.4.8]/3 says any function that doesn't have an exception-spec
- can throw whatever we want; see also its footnote. Let's list those
- in the sections where the function itself occurs.
- -->
- <p><strong>[18.1]/4</strong> The type of <code>NULL</code> is described
- <a href="../18_support/howto.html#1">here</a>.
- </p>
- <p><strong>[18.3]/8</strong> Even though it's listed in the library
- sections, libstdc++-v3 has zero control over what the cleanup code hands
- back to the runtime loader. Talk to the compiler people. :-)
- </p>
- <p><strong>[18.4.2.1]/5</strong> (bad_alloc),<br />
- <strong>[18.5.2]/5</strong> (bad_cast),<br />
- <strong>[18.5.3]/5</strong> (bad_typeid),<br />
- <strong>[18.6.1]/8</strong> (exception),<br />
- <strong>[18.6.2.1]/5</strong> (bad_exception): The <code>what()</code>
- member function of class <code>std::exception</code>, and these other
- classes publicly derived from it, simply returns the name of the
- class. But they are the <em>mangled</em> names; you will need to call
- <code>c++filt</code> and pass the names as command-line parameters to
- demangle them, or call a
- <a href="../18_support/howto.html#5">runtime demangler function</a>.
- (The classes in <code>&lt;stdexcept&gt;</code> have constructors which
- require an argument to use later for <code>what()</code> calls, so the
- problem of <code>what()</code>'s value does not arise in most
- user-defined exceptions.)
- </p>
- <p><strong>[18.5.1]/7</strong> The return value of
- <code>std::type_info::name()</code> is the mangled type name (see the
- previous entry for more).
- </p>
- <p><strong>[20.1.5]/5</strong> <em>&quot;Implementors are encouraged to
- supply libraries that can accept allocators that encapsulate more
- general memory models and that support non-equal instances. In such
- implementations, any requirements imposed on allocators by containers
- beyond those requirements that appear in Table 32, and the semantics
- of containers and algorithms when allocator instances compare
- non-equal, are implementation-defined.&quot;</em> As yet we don't
- have any allocators which compare non-equal, so we can't describe how
- they behave.
- </p>
- <p><strong>[21.1.3.1]/3,4</strong>,<br />
- <strong>[21.1.3.2]/2</strong>,<br />
- <strong>[23.*]'s foo::iterator</strong>,<br />
- <strong>[27.*]'s foo::*_type</strong>,<br />
- <strong>others...</strong>
- Nope, these types are called implementation-defined because you
- shouldn't be taking advantage of their underlying types. Listing them
- here would defeat the purpose. :-)
- </p>
- <p><strong>[21.1.3.1]/5</strong> I don't really know about the mbstate_t
- stuff... see the <a href="../22_locale/howto.html">chapter 22 notes</a>
- for what does exist.
- </p>
- <p><strong>[22.*]</strong> Anything and everything we have on locale
- implementation will be described
- <a href="../22_locale/howto.html">over here</a>.
- </p>
- <p><strong>[26.2.8]/9</strong> I have no idea what
- <code>complex&lt;T&gt;</code>'s pow(0,0) returns.
- </p>
- <p><strong>[27.4.2.4]/2</strong> Calling
- <code>std::ios_base::sync_with_stdio</code> after I/O has already been
- performed on the standard stream objects will
- flush the buffers, and <!-- this line might go away -->
- destroy and recreate the underlying buffer instances. Whether or not
- the previously-written I/O is destroyed in this process depends mostly
- on the --enable-libio choice: for stdio, if the written data is
- already in the stdio buffer, the data may be completely safe!
- </p>
- <p><strong>[27.6.1.1.2]</strong>,<br />
- <strong>[27.6.2.3]</strong> The I/O sentry ctor and dtor can perform
- additional work than the minimum required. We are not currently taking
- advantage of this yet.
- </p>
- <p><strong>[27.7.1.3]/16</strong>,<br />
- <strong>[27.8.1.4]/10</strong>
- The effects of <code>pubsetbuf/setbuf</code> are described
- <a href="../27_io/howto.html#2">in this chapter</a>.
- </p>
- <p><strong>[27.8.1.4]/16</strong> Calling <code>fstream::sync</code> when
- a get area exists will... whatever <code>fflush()</code> does, I think.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="6">Preprocessor macros controlling the library</a></h2>
- <p>Some of the semantics of the libstdc++-v3 implementation are
- controlled by preprocessor macros, both during build/installation and
- during compilation of user code. Many of these choices are made when
- the library is built and installed (actually, during
- <a href="../configopts.html">the configuration step</a>, with the
- various --enable/--disable choices being translated to #define/#undef).
- </p>
- <p>All library macros begin with <code>_GLIBCPP_</code> in earlier
- versions, and <code>_GLIBCXX_</code> in later versions. The fact that
- these symbols start with a leading underscore should give you a clue
- that (by default) they aren't meant to be changed by the user. :-)
- </p>
- <p>These macros are all gathered in the file <code>c++config.h</code>,
- which is generated during installation. <strong>You must assume that
- these macros cannot be redefined by your own code</strong>, unless we
- document otherwise here. Some of the choices control code which has
- already been compiled (i.e., libstdc++.a/.so). If you explicitly
- #define or #undef these macros, the <em>headers</em> may see different
- code paths, but the <em>libraries</em> which you link against will not.
- If you want to experiment with different values, you must change the
- config headers before building/installing the library.
- </p>
- <p>Below are macros which, for 3.1 and later, you may change yourself,
- in your own code with #define/#undef or with -D/-U compiler flags.
- The default state of the symbol is listed. &quot;Configurable&quot;
- (or &quot;Not configurable&quot;) means that the symbol is initially
- chosen (or not) based on --enable/--disable options at configure time.
- For 3.1 through 3.3, the prefixes are <code>_GLIBCPP_</code>.
- </p>
- <dl>
- <dt><code>_GLIBCXX_DEPRECATED</code></dt>
- <dd>Undefined by default. Not configurable. Turning this on enables
- older ARM-style iostreams code, and other anachronisms. This may be
- useful in updating old C++ programs which no longer meet the
- requirements of the language.
- </dd>
- <!--
- Can this actually be turned off and still produce a working lib? Must
- check. -pme
- No, it can't. Hmmm. -pme
- <dt><code>_GLIBCPP_RESOLVE_LIB_DEFECTS</code></dt>
- <dd>Defined by default. Not configurable. The library follows
- corrections and updates from the ISO committee, see
- <a href="../faq/index.html#5_2">here</a> and
- <a href="../ext/howto.html#5">here</a> for more on this feature.
- If you have code which depends on the first version of the standard,
- you might try undefining this macro.
- </dd>
- -->
- <dt><code>_GLIBCXX_CONCEPT_CHECKS</code></dt>
- <dd>Undefined by default. Configurable. When defined, performs
- compile-time checking on certain template instantiations to detect
- violations of the requirements of the standard. This is described
- in more detail <a href="../19_diagnostics/howto.html#3">here</a>.
- </dd>
- <dt><code>_GLIBCXX_DEBUG</code></dt>
- <dd>Undefined by default. Configurable. When defined, compiles
- user code using the <a href="../debug.html#safe">libstdc++ debug
- mode</a>.
- </dd>
- <dt><code>_GLIBCXX_DEBUG_PEDANTIC</code></dt>
- <dd>Undefined by default. Configurable. When defined while
- compiling with the <a href="../debug.html#safe">libstdc++ debug
- mode</a>, makes the debug mode extremely picky by making the use
- of libstdc++ extensions and libstdc++-specific behavior into
- errors.
- </dd>
- <!--
- <dt><code></code></dt>
- <dd>
- </dd>
- -->
- </dl>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
-
-
diff --git a/libstdc++-v3/docs/html/17_intro/license.html b/libstdc++-v3/docs/html/17_intro/license.html
deleted file mode 100644
index 8dc0ebd711c..00000000000
--- a/libstdc++-v3/docs/html/17_intro/license.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="libstdc++, license, licence" />
- <meta name="DESCRIPTION" content="Copying restrictions for libstdc++." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++ copying</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" rev="Copyright" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Licenses for the Library</a></h1>
-
-<p>There are two licenses affecting GNU libstdc++: one for the code, and
- one for the documentation. Here we will describe both of them, and try
- to answer some of the widespread questions. If you have more questions,
- ask the FSF or the
- <a href="http://gcc.gnu.org/lists.html">gcc mailing list</a>; the person
- writing this page is a programmer, not a lawyer.
-</p>
-
-<hr />
-
-<h2>The Code: Runtime GPL</h2>
-
-<p>The source code of libstdc++ is distributed under version 2 of the
- <a href="COPYING">GNU General Public License</a>, with the so-called
- &quot;runtime exception,&quot; as follows (or see any header or
- implementation file):
-</p>
-<pre>
- 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.
-</pre>
-
-<p>Hopefully that text is self-explanatory. If it isn't, you need to speak
- to your lawyer, or the Free Software Foundation.
-</p>
-
-<!-- Most of the Q&A's are based on, paraphrased from, and outright stolen
- from this thread:
- http://gcc.gnu.org/ml/libstdc++/2000-q2/subjects.html#00050
--->
-<p><strong>Q: So any program which uses libstdc++ falls under the GPL?</strong>
- <br />A: <strong>No.</strong> The special exception permits use of the
- library in proprietary applications.
-</p>
-
-<p><strong>Q: How is that different from the GNU {Lesser,Library}
- GPL?</strong>
- <!-- Quoting Jason Merrill from the thread above: -->
- <br />A: The LGPL requires that users be able to replace the LGPL code with a
- modified version; this is trivial if the library in question is a C
- shared library. But there's no way to make that work with C++, where
- much of the library consists of inline functions and templates, which
- are expanded inside the code that uses the library. So to allow people
- to replace the library code, someone using the library would have to
- distribute their own source, rendering the LGPL equivalent to the GPL.
-</p>
-
-<p><strong>Q: I see. So, what restrictions <em>are</em> there on
- programs that use the library?</strong>
- <br />A: None. We encourage such programs to be released as open source,
- but we won't punish you or sue you if you choose otherwise.
-</p>
-
-<hr />
-
-<h2>The Docs: GPL, FDL</h2>
-
-<p>The documentation shipped with the library and made available over the
- web, excluding the pages generated from source comments, are copyrighted
- by the Free Software Foundation, and placed under
- the <a href="COPYING.DOC">GNU Free Documentation License version 1.1</a>.
- There are no Front-Cover Texts, no Back-Cover Texts, and
- <!-- as far as I know -->
- no Invariant Sections.
-</p>
-
-<p> For documentation generated by doxygen or other automated tools
-via processing source code comments and markup, the original source
-code license applies to the generated files. Thus, the doxygen
-documents are licensed GPL.
-</p>
-
-<p>If you plan on making copies of the documentation, please let us know.
- We can probably offer suggestions.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-Comments and suggestions about this page are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-Comments or questions about the licenses themselves are also welcome, and
-should be directed to the GCC list as descibed above.
-</em></p>
-
-
-</body>
-</html>
-
-
diff --git a/libstdc++-v3/docs/html/17_intro/porting-howto.html b/libstdc++-v3/docs/html/17_intro/porting-howto.html
deleted file mode 100644
index d6bedb271ed..00000000000
--- a/libstdc++-v3/docs/html/17_intro/porting-howto.html
+++ /dev/null
@@ -1,744 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
-<title>Libstdc++-porting-howto</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.48">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article">
-<div class="titlepage">
-<div><h1 class="title">
-<a name="libstdc++-porting-howto"></a>Libstdc++-porting-howto</h1></div>
-<div><h3 class="author">Felix Natter</h3></div>
-<div><div class="legalnotice">
-<p class="legalnotice-title"><b>Legal Notice</b></p>
-<p>
- This document can be distributed under the FDL
- (<a href="http://www.gnu.org" target="_top">www.gnu.org</a>)
- </p>
-</div></div>
-<div><p class="pubdate">Tue Jun 5 20:07:49 2001</p></div>
-<div><div class="revhistory"><table border="1" width="100%" summary="Revision history">
-<tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr>
-<tr>
-<td align="left">Revision 0.5</td>
-<td align="left">Thu Jun 1 13:06:50 2000</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">First docbook-version.</td></tr>
-<tr>
-<td align="left">Revision 0.8</td>
-<td align="left">Sun Jul 30 20:28:40 2000</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">First released version using docbook-xml
- + second upload to libstdc++-page.
- </td></tr>
-<tr>
-<td align="left">Revision 0.9</td>
-<td align="left">Wed Sep 6 02:59:32 2000</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">5 new sections.</td></tr>
-<tr>
-<td align="left">Revision 0.9.1</td>
-<td align="left">Sat Sep 23 14:20:15 2000</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">added information about why file-descriptors are not in the
- standard</td></tr>
-<tr>
-<td align="left">Revision 0.9.2</td>
-<td align="left">Tue Jun 5 20:07:49 2001</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">
- a fix, added hint on increased portability of C-shadow-headers,
- added autoconf-test HAVE_CONTAINER_AT
- </td></tr>
-<tr>
-<td align="left">Revision 0.9.3</td>
-<td align="left">Fri Jun 29 16:15:56 2001</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">
- changed signature of nonstandard filebuf-constructor and
- update the section on filebuf::attach to point to ../ext/howto.html,
- added link to ../21/strings/howto.html
- in sec-stringstream, changed &lt;link&gt;-tags to have content
- (so that these links work),
- replace &quot;user-space&quot; by &quot;global namespace&quot;
- add note about gcc 3.0 and shadow-headers
- add section about ostream::form and istream::scan
- sec-vector-at: remove hint to modify headers
- fix spelling error in sec-stringstream
- </td></tr>
-<tr>
-<td align="left">Revision 0.9.4</td>
-<td align="left">Mon Nov 5 17:01:04 2001</td>
-<td align="left">fnatter</td>
-</tr>
-<tr><td align="left" colspan="3">
- rewrite section 1.1.3 because of gnu.gcc.help-post by
- Juergen Heinzl
- </td></tr>
-</table></div></div>
-<div><div class="abstract">
-<p><b>Abstract</b></p>
-<p>
- Some notes on porting applications from libstdc++-2.90 (or earlier
- versions) to libstdc++-v3. Not speaking in terms of the GNU libstdc++
- implementations, this means porting from earlier versions of the
- C++-Standard to ISO 14882.
- </p>
-</div></div>
-<hr>
-</div>
-<div class="toc">
-<p><b>Table of Contents</b></p>
-<dl>
-<dt>1. <a href="#sec-nsstd">Namespace std::</a>
-</dt>
-<dd><dl>
-<dt>1.1.1. <a href="#sec-gtkmm-hack">Using namespace
- composition if the project uses a separate
- namespace</a>
-</dt>
-<dt>1.1.2. <a href="#sec-emptyns">Defining an empty namespace std</a>
-</dt>
-<dt>1.1.3. <a href="#sec-avoidfqn">Avoid to use fully qualified names
- (i.e. std::string)</a>
-</dt>
-<dt>1.1.4. <a href="#sec-osprojects">How some open-source-projects deal
- with this</a>
-</dt>
-</dl></dd>
-<dt>2. <a href="#sec-nocreate">There is no ios::nocreate/ios::noreplace
- in ISO 14882</a>
-</dt>
-<dt>3. <a href="#sec-stream::attach">stream::attach(int
- fd) is not in the standard any more</a>
-</dt>
-<dt>4. <a href="#sec-headers">The new headers</a>
-</dt>
-<dd><dl>
-<dt>4.4.1. <a href="#sec-cheaders">New headers replacing C-headers</a>
-</dt>
-<dt>4.4.2. <a href="#sec-fstream-header">
- &lt;fstream&gt; does
- not define std::cout,
- std::cin etc.</a>
-</dt>
-</dl></dd>
-<dt>5. <a href="#sec-iterators">Iterators</a>
-</dt>
-<dt>6. <a href="#sec-macros">
- Libc-macros (i.e. isspace from
- &lt;cctype&gt;)</a>
-</dt>
-<dt>7. <a href="#sec-stream-state">State of streams</a>
-</dt>
-<dt>8. <a href="#sec-vector-at">vector::at is missing (i.e. gcc 2.95.x)</a>
-</dt>
-<dt>9. <a href="#sec-eof">Using std::char_traits&lt;char&gt;::eof()</a>
-</dt>
-<dt>10. <a href="#sec-string-clear">Using string::clear()/string::erase()</a>
-</dt>
-<dt>11. <a href="#sec-scan-form">GNU Extensions ostream::form and istream::scan</a>
-</dt>
-<dt>12. <a href="#sec-stringstream">Using stringstreams</a>
-</dt>
-<dt>13. <a href="#sec-about">About...</a>
-</dt>
-</dl>
-</div>
-<p>
- In the following, when I say portable, I will refer to &quot;portable among ISO
- 14882-implementations&quot;. On the other hand, if I say &quot;backportable&quot; or
- &quot;conservative&quot;, I am talking about &quot;compiles with older
- libstdc++-implementations&quot;.
- </p>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-nsstd"></a>Namespace std::</h2></div></div>
-<p>
- The latest C++-standard (ISO-14882) requires that the standard
- C++-library is defined in namespace std::. Thus, in order to use
- classes from the standard C++-library, you can do one of three
- things:
- <div class="itemizedlist"><ul type="disc">
-<li><p>wrap your code in <b>namespace std {
- ... }</b> =&gt; This is not an option because only symbols
- from the standard c++-library are defined in namespace std::.
- </p></li>
-<li><p>put a kind of
- <span class="emphasis"><i>using-declaration</i></span> in your source (either
- <b>using namespace std;</b> or i.e. <b>using
- std::string;</b>) =&gt; works well for source-files, but
- cannot be used in header-files.
- </p></li>
-<li><p>use a <span class="emphasis"><i>fully qualified name</i></span> for
- each libstdc++-symbol (i.e. <b>std::string</b>,
- <b>std::cout</b>) =&gt; can always be used
- </p></li>
-</ul></div>
-<p>
- Because there are many compilers which still use an implementation
- that does not have the standard C++-library in namespace
- <b>std::</b>, some care is required to support these as
- well.
- </p>
-<p>
- Namespace back-portability-issues are generally not a problem with
- g++, because versions of g++ that do not have libstdc++ in
- <b>std::</b> use <b>-fno-honor-std</b>
- (ignore <b>std::</b>, <b>:: = std::</b>) by
- default. That is, the responsibility for enabling or disabling
- <b>std::</b> is on the user; the maintainer does not have
- to care about it. This probably applies to some other compilers as
- well.
- </p>
-<p>
- The following sections list some possible solutions to support compilers
- that cannot ignore std::.
- </p>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-gtkmm-hack"></a>Using <span class="emphasis"><i>namespace
- composition</i></span> if the project uses a separate
- namespace</h3></div></div>
-<p>
- <a href="http://gtkmm.sourceforge.net" target="_top">Gtk--</a> defines
- most of its classes in namespace Gtk::. Thus, it was possible to
- adapt Gtk-- to namespace std:: by using a C++-feature called
- <span class="emphasis"><i>namespace composition</i></span>. This is what happens if
- you put a <span class="emphasis"><i>using</i></span>-declaration into a
- namespace-definition: the imported symbol(s) gets imported into the
- currently active namespace(s). For example:
- <pre class="programlisting">
- namespace Gtk {
- using std::string;
- class Window { ... }
- }
- </pre>
- In this example, <b>std::string</b> gets imported into
- namespace Gtk::. The result is that you don't have to use
- <b>std::string</b> in this header, but still
- <b>std::string</b> does not get imported into
- the global namespace (::) unless the user does
- <b>using namespace Gtk;</b> (which is not recommended
- practice for Gtk--, so it is not a problem). Additionally, the
- <b>using</b>-declarations are wrapped in macros that
- are set based on autoconf-tests to either &quot;&quot; or i.e. <b>using
- std::string;</b> (depending on whether the system has
- libstdc++ in <b>std::</b> or not). (ideas from
- <tt>&lt;<a href="mailto:llewelly@dbritsch.dsl.xmission.com">llewelly@dbritsch.dsl.xmission.com</a>&gt;</tt>, Karl Nelson
- <tt>&lt;<a href="mailto:kenelson@ece.ucdavis.edu">kenelson@ece.ucdavis.edu</a>&gt;</tt>)
-</div>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-emptyns"></a>Defining an empty namespace std</h3></div></div>
-<p>
- By defining an (empty) namespace <b>std::</b> before
- using it, you avoid getting errors on systems where no part of the
- library is in namespace std:
- <pre class="programlisting">
- namespace std { }
- using namespace std;
- </pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-avoidfqn"></a>Avoid to use fully qualified names
- (i.e. std::string)</h3></div></div>
-<p>
- If some compilers complain about <b>using
- std::string;</b>, and if the &quot;hack&quot; for gtk-- mentioned above
- does not work, then I see two solutions:
-
- <div class="itemizedlist"><ul type="disc">
-<li><p>
- Define <b>std::</b> as a macro if the compiler
- doesn't know about <b>std::</b>.
- <pre class="programlisting">
- #ifdef OLD_COMPILER
- #define std
- #endif
- </pre>
- (thanks to Juergen Heinzl who posted this solution on
- gnu.gcc.help)
- </li>
-<li><p>
- Define a macro NS_STD, which is defined to
- either &quot;&quot; or &quot;std&quot;
- based on an autoconf-test. Then you should be able to use
- <b>NS_STD::string</b>, which will evaluate to
- <b>::string</b> (&quot;string in the global namespace&quot;) on
- systems that do not put string in std::. (This is untested)
- </p></li>
-</ul></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-osprojects"></a>How some open-source-projects deal
- with this</h3></div></div>
-<p>
- This information was gathered around May 2000. It may not be correct
- by the time you read this.
- </p>
-<div class="table">
-<p><b>Table 1. Namespace std:: in Open-Source programs</b></p>
-<table summary="Namespace std:: in Open-Source programs" border="1">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<tbody>
-<tr>
-<td><a href="http://www.clanlib.org" target="_top">clanlib</a></td>
-<td>usual</td>
-</tr>
-<tr>
-<td><a href="http://pingus.seul.org" target="_top">pingus</a></td>
-<td>usual</td>
-</tr>
-<tr>
-<td><a href="http://www.mozilla.org" target="_top">mozilla</a></td>
-<td>usual</td>
-</tr>
-<tr>
-<td><a href="http://libsigc.sourceforge.net" target="_top">
- libsigc++</a></td>
-<td>conservative-impl</td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="table">
-<p><b>Table 2. Notations for categories</b></p>
-<table summary="Notations for categories" border="1">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<tbody>
-<tr>
-<td>usual</td>
-<td>mostly fully qualified names and some
- using-declarations (but not in headers)</td>
-</tr>
-<tr>
-<td>none</td>
-<td>no namespace std at all</td>
-</tr>
-<tr>
-<td>conservative-impl</td>
-<td>wrap all
- namespace-handling in macros to support compilers without
- namespace-support (no libstdc++ used in headers)</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p>
- As you can see, this currently lacks an example of a project
- which uses libstdc++-symbols in headers in a back-portable way
- (except for Gtk--: see the <a href="#sec-gtkmm-hack" title="Using namespace
- composition if the project uses a separate
- namespace">section on the gtkmm-hack</a>).
- </p>
-</div>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-nocreate"></a>There is no ios::nocreate/ios::noreplace
- in ISO 14882</h2></div></div>
-<p>
- I have seen <b>ios::nocreate</b> being used for
- input-streams, most probably because the author thought it would be
- more correct to specify nocreate &quot;explicitly&quot;. So you can simply
- leave it out for input-streams.
- </p>
-<p>
- For output streams, &quot;nocreate&quot; is probably the default, unless you
- specify <b>std::ios::trunc</b> ? To be safe, you can 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 <b>app</b>,
- <b>ate</b> and <b>trunc</b> (except for
- <b>app</b> ?).
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-stream::attach"></a><b>stream::attach(int
- fd)</b> is not in the standard any more</h2></div></div>
-<p>
- Phil Edwards <tt>&lt;<a href="mailto:pedwards@disaster.jaj.com">pedwards@disaster.jaj.com</a>&gt;</tt> writes:
- It was considered and rejected. Not all environments use file
- descriptors. Of those that do, not all of them use integers to represent
- them.
- </p>
-
-<p>
- For a portable solution (among systems which use
- filedescriptors), you need to implement a subclass of
- <b>std::streambuf</b> (or
- <b>std::basic_streambuf&lt;..&gt;</b>) which opens a file
- given a descriptor, and then pass an instance of this to the
- stream-constructor. For an example of this, refer to
- <a href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
- by Nicolai Josuttis.
- </p>
-
-<p>
- An extension is also available:
- <code>&lt;ext/stdio_filebuf.h&gt;</code> contains a derived class called
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html"><code>__gnu_cxx::stdio_filebuf</code></a>.
- This class can be constructed from a C <code>FILE*</code> or a file
- descriptor, and provides the <code>fd()</code> function.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-headers"></a>The new headers</h2></div></div>
-<p>
- All new headers can be seen in this <a href="headers_cc.txt" target="_top">
- source-code</a>.
- </p>
-<p>
- The old C++-headers (iostream.h etc.) are available, but gcc generates
- a warning that you are using deprecated headers.
- </p>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-cheaders"></a>New headers replacing C-headers</h3></div></div>
-<p>
- You should not use the C-headers (except for system-level
- headers) from C++ programs. Instead, you should use a set of
- headers that are named by prepending 'c' and, as usual,
- omitting the extension (.h). For example, instead of using
- <tt>&lt;math.h&gt;</tt>, you
- should use <tt>&lt;cmath&gt;</tt>. In some cases this has
- the advantage that the C++-header is more standardized than
- the C-header (i.e. <tt>&lt;ctime&gt;</tt> (almost)
- corresponds to either <tt>&lt;time.h&gt;</tt> or <tt>&lt;sys/time.h&gt;</tt>).
-
- The standard specifies that if you include the C-style header
- (<tt>&lt;math.h&gt;</tt> in
- this case), the symbols will be available both in the global
- namespace and in namespace <b>std::</b> (but
- libstdc++ does not yet have fully compliant headers) On the
- other hand, if you include only the new header (i.e. <tt>&lt;cmath&gt;</tt>), the symbols
- will only be defined in namespace <b>std::</b>
- (and macros will be converted to inline-functions).
- </p>
-<p>
- For more information on this, and for information on how the
- GNU C++ implementation might reuse (&quot;shadow&quot;) the C
- library-functions, have a look at <a href="http://www.cantrip.org/cheaders.html" target="_top">
- www.cantrip.org</a>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h3 class="title">
-<a name="sec-fstream-header"></a>
- <tt>&lt;fstream&gt;</tt> does
- not define <b>std::cout</b>,
- <b>std::cin</b> etc.</h3></div></div>
-<p>
- In earlier versions of the standard,
- <tt>&lt;fstream.h&gt;</tt>,
- <tt>&lt;ostream.h&gt;</tt>
- and <tt>&lt;istream.h&gt;</tt>
- used to define
- <b>cout</b>, <b>cin</b> and so on. Because
- of the templatized iostreams in libstdc++-v3, you need to include
- <tt>&lt;iostream&gt;</tt>
- explicitly to define these.
- </p>
-</div>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-iterators"></a>Iterators</h2></div></div>
-<p>
- The following are not proper uses of iterators, but may be working
- fixes for existing uses of iterators.
- <div class="itemizedlist"><ul type="disc">
-<li><p>you cannot do
- <b>ostream::operator&lt;&lt;(iterator)</b> to
- print the address of the iterator =&gt; use
- <b>operator&lt;&lt; &amp;*iterator</b> instead ?
- </p></li>
-<li><p>you cannot clear an iterator's reference
- (<b>iterator = 0</b>) =&gt; use
- <b>iterator = iterator_type();</b> ?
- </p></li>
-<li><p>
-<b>if (iterator)</b> won't work any
- more =&gt; use <b>if (iterator != iterator_type())</b>
- ?</p></li>
-</ul></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-macros"></a>
- Libc-macros (i.e. <b>isspace</b> from
- <tt>&lt;cctype&gt;</tt>)</h2></div></div>
-<p>
- Glibc 2.0.x and 2.1.x define the
- <tt>&lt;ctype.h&gt;</tt>
- -functionality as macros (isspace, isalpha etc.). Libstdc++-v3
- &quot;shadows&quot; these macros as described in the <a href="#sec-cheaders" title="New headers replacing C-headers">section about
- c-headers</a>.
- </p>
-<p>
- Older implementations of libstdc++ (g++-2 for egcs 1.x and g++-3
- for gcc 2.95.x), however, keep these functions as macros, and so it
- is not back-portable to use fully qualified names. For example:
- <pre class="programlisting">
- #include &lt;cctype&gt;
- int main() { std::isspace('X'); }
- </pre>
- will result in something like this (unless using g++-v3):
- <pre class="programlisting">
- std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int)
- _ISspace ) ;
- </pre>
-<p>
- One solution I can think of is to test for -v3 using
- autoconf-macros, and define macros for each of the C-functions
- (maybe that is possible with one &quot;wrapper&quot; macro as well ?).
- </p>
-<p>
- Another solution which would fix g++ is to tell the user to modify a
- header-file so that g++-2 (egcs 1.x) and g++-3 (gcc 2.95.x) define a
- macro which tells <tt>&lt;ctype.h&gt;</tt> to define functions
- instead of macros:
- <pre class="programlisting">
- // This keeps isalnum, et al from being propagated as macros.
- #if __linux__
- #define __NO_CTYPE 1
- #endif
-
- [ now include &lt;ctype.h&gt; ]
- </pre>
-<p>
- Another problem arises if you put a <b>using namespace
- std;</b> declaration at the top, and include <tt>&lt;ctype.h&gt;</tt>. This will result in
- ambiguities between the definitions in the global namespace
- (<tt>&lt;ctype.h&gt;</tt>) and the
- definitions in namespace <b>std::</b>
- (<b>&lt;cctype&gt;</b>).
- </p>
-<p>
- The solution to this problem was posted to the libstdc++-v3
- mailing-list:
- Benjamin Kosnik <tt>&lt;<a href="mailto:bkoz@redhat.com">bkoz@redhat.com</a>&gt;</tt> writes:
- &#x2018;
- --enable-cshadow-headers is currently broken. As a result, shadow
- headers are not being searched....
- &#x2019;
- This is now outdated, but gcc 3.0 still does not have fully
- compliant &quot;shadow headers&quot;.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-stream-state"></a>State of streams</h2></div></div>
-<p>
- At least some older implementations don't have
- <b>std::ios_base</b>, so you should use
- <b>std::ios::badbit</b>, <b>std::ios::failbit</b>
- and <b>std::ios::eofbit</b> and
- <b>std::ios::goodbit</b>.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-vector-at"></a>vector::at is missing (i.e. gcc 2.95.x)</h2></div></div>
-<p>
- One solution is to add an autoconf-test for this:
- <pre class="programlisting">
- AC_MSG_CHECKING(for container::at)
- AC_TRY_COMPILE(
- [
- #include &lt;vector&gt;
- #include &lt;deque&gt;
- #include &lt;string&gt;
-
- using namespace std;
- ],
- [
- deque&lt;int&gt; test_deque(3);
- test_deque.at(2);
- vector&lt;int&gt; test_vector(2);
- test_vector.at(1);
- string test_string(&quot;test_string&quot;);
- test_string.at(3);
- ],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_CONTAINER_AT)],
- [AC_MSG_RESULT(no)])
- </pre>
- If you are using other (non-GNU) compilers it might be a good idea
- to check for <b>string::at</b> separately.
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-eof"></a>Using std::char_traits&lt;char&gt;::eof()</h2></div></div>
-<p>
- <pre class="programlisting">
- #ifdef HAVE_CHAR_TRAITS
- #define CPP_EOF std::char_traits&lt;char&gt;::eof()
- #else
- #define CPP_EOF EOF
- #endif
- </pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-string-clear"></a>Using string::clear()/string::erase()</h2></div></div>
-<p>
- There are two functions for deleting the contents of a string:
- <b>clear</b> and <b>erase</b> (the latter
- returns the string).
- <pre class="programlisting">
- void
- clear() { _M_mutate(0, this-&gt;size(), 0); }
- </pre>
- <pre class="programlisting">
- basic_string&amp;
- erase(size_type __pos = 0, size_type __n = npos)
- {
- return this-&gt;replace(_M_check(__pos), _M_fold(__pos, __n),
- _M_data(), _M_data());
- }
- </pre>
- The implementation of <b>erase</b> seems to be more
- complicated (from libstdc++-v3), but <b>clear</b> is not
- implemented in gcc 2.95.x's libstdc++, so you should use
- <b>erase</b> (which is probably faster than
- <b>operator=(charT*)</b>).
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-scan-form"></a>GNU Extensions ostream::form and istream::scan</h2></div></div>
-<p>
- These are not supported any more - use
- <a href="#sec-stringstream" title="Using stringstreams">
- stringstreams</a> instead.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-stringstream"></a>Using stringstreams</h2></div></div>
-<p>
- Libstdc++-v3 provides the new
- <b>i/ostringstream</b>-classes, (<tt>&lt;sstream&gt;</tt>), but for compatibility
- with older implementations you still have to use
- <b>i/ostrstream</b> (<tt>&lt;strstream&gt;</tt>):
- <pre class="programlisting">
- #ifdef HAVE_SSTREAM
- #include &lt;sstream&gt;
- #else
- #include &lt;strstream&gt;
- #endif
- </pre>
- <div class="itemizedlist"><ul type="disc">
-<li><p> <b>strstream</b> is considered to be
- deprecated
- </p></li>
-<li><p> <b>strstream</b> is limited to
- <b>char</b>
- </p></li>
-<li><p> with <b>ostringstream</b> you don't
- have to take care of terminating the string or freeing its
- memory
- </p></li>
-<li><p> <b>istringstream</b> can be re-filled
- (clear(); str(input);)
- </p></li>
-</ul></div>
-<p>
- You can then use output-stringstreams like this:
- <pre class="programlisting">
- #ifdef HAVE_SSTREAM
- std::ostringstream oss;
- #else
- std::ostrstream oss;
- #endif
- oss &lt;&lt; &quot;Name=&quot; &lt;&lt; m_name &lt;&lt; &quot;, number=&quot; &lt;&lt; m_number &lt;&lt; std::endl;
- ...
- #ifndef HAVE_SSTREAM
- oss &lt;&lt; std::ends; // terminate the char*-string
- #endif
- // str() returns char* for ostrstream and a string for ostringstream
- // this also causes ostrstream to think that the buffer's memory
- // is yours
- m_label.set_text(oss.str());
- #ifndef HAVE_SSTREAM
- // let the ostrstream take care of freeing the memory
- oss.freeze(false);
- #endif
- </pre>
-<p>
- Input-stringstreams can be used similarly:
- <pre class="programlisting">
- std::string input;
- ...
- #ifdef HAVE_SSTREAM
- std::istringstream iss(input);
- #else
- std::istrstream iss(input.c_str());
- #endif
- int i;
- iss &gt;&gt; i;
- </pre>
- One (the only?) restriction is that an istrstream cannot be re-filled:
- <pre class="programlisting">
- std::istringstream iss(numerator);
- iss &gt;&gt; m_num;
- // this is not possible with istrstream
- iss.clear();
- iss.str(denominator);
- iss &gt;&gt; m_den;
- </pre>
- If you don't care about speed, you can put these conversions in
- a template-function:
- <pre class="programlisting">
- template &lt;class X&gt;
- void fromString(const string&amp; input, X&amp; any)
- {
- #ifdef HAVE_SSTREAM
- std::istringstream iss(input);
- #else
- std::istrstream iss(input.c_str());
- #endif
- X temp;
- iss &gt;&gt; temp;
- if (iss.fail())
- throw runtime_error(..)
- any = temp;
- }
- </pre>
- Another example of using stringstreams is in <a href="../21_strings/howto.html" target="_top">this howto</a>.
-<p>
- I have read the Josuttis book on Standard C++, so some information
- comes from there. Additionally, there is information in
- &quot;info iostream&quot;, which covers the old implementation that gcc 2.95.x
- uses.
- </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><h2 class="title" style="clear: both">
-<a name="sec-about"></a>About...</h2></div></div>
-<p>
- Please send any experience, additions, corrections or questions to
- <a href="mailto:fnatter@gmx.net" target="_top">fnatter@gmx.net</a> or for
- discussion to the libstdc++-v3-mailing-list.
- </p>
-</div>
-</div></body>
-</html>
diff --git a/libstdc++-v3/docs/html/17_intro/porting.html b/libstdc++-v3/docs/html/17_intro/porting.html
deleted file mode 100644
index c280990c901..00000000000
--- a/libstdc++-v3/docs/html/17_intro/porting.html
+++ /dev/null
@@ -1,992 +0,0 @@
-<html lang="en">
-<head>
-<title>Porting libstdc++-v3</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="Porting libstdc++-v3">
-<meta name="generator" content="makeinfo 4.6">
-<!--
-Copyright &copy; 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-
- <p>Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being "GNU General Public License", the Front-Cover
-texts being (a) (see below), and with the Back-Cover Texts being (b)
-(see below). A copy of the license is included in the section entitled
-"GNU Free Documentation License".
-
- <p>(a) The FSF's Front-Cover Text is:
-
- <p>A GNU Manual
-
- <p>(b) The FSF's Back-Cover Text is:
-
- <p>You have freedom to copy and modify this GNU Manual, like GNU
- software. Copies published by the Free Software Foundation raise
- funds for GNU development.-->
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
---></style>
-</head>
-<body>
-<h1 class="settitle">Porting libstdc++-v3</h1>
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Top">Top</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#Operating%20system">Operating system</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
-</div>
-
-<h2 class="unnumbered">Porting libstdc++-v3</h2>
-
-<p>This document explains how to port libstdc++-v3 (the GNU C++ library) to
-a new target.
-
- <p>In order to make the GNU C++ library (libstdc++-v3) work with a new
-target, you must edit some configuration files and provide some new
-header files. Unless this is done, libstdc++-v3 will use generic
-settings which may not be correct for your target; even if they are
-correct, they will likely be inefficient.
-
- <p>Before you get started, make sure that you have a working C library on
-your target. The C library need not precisely comply with any
-particular standard, but should generally conform to the requirements
-imposed by the ANSI/ISO standard.
-
- <p>In addition, you should try to verify that the C++ compiler generally
-works. It is difficult to test the C++ compiler without a working
-library, but you should at least try some minimal test cases.
-
- <p>(Note that what we think of as a "target," the library refers to as
-a "host." The comment at the top of <code>configure.ac</code> explains why.)
-
- <p>Here are the primary steps required to port the library:
-
-<ul class="menu">
-<li><a accesskey="1" href="#Operating%20system">Operating system</a>: Configuring for your operating system.
-<li><a accesskey="2" href="#CPU">CPU</a>: Configuring for your processor chip.
-<li><a accesskey="3" href="#Character%20types">Character types</a>: Implementing character classification.
-<li><a accesskey="4" href="#Thread%20safety">Thread safety</a>: Implementing atomic operations.
-<li><a accesskey="5" href="#Numeric%20limits">Numeric limits</a>: Implementing numeric limits.
-<li><a accesskey="6" href="#Libtool">Libtool</a>: Using libtool.
-<li><a accesskey="7" href="#GNU%20Free%20Documentation%20License">GNU Free Documentation License</a>: How you can copy and share this manual.
-</ul>
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Operating%20system">Operating system</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#CPU">CPU</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">Operating system</h2>
-
-<p>If you are porting to a new operating system (as opposed to a new chip
-using an existing operating system), you will need to create a new
-directory in the <code>config/os</code> hierarchy. For example, the IRIX
-configuration files are all in <code>config/os/irix</code>. There is no set
-way to organize the OS configuration directory. For example,
-<code>config/os/solaris/solaris-2.6</code> and
-<code>config/os/solaris/solaris-2.7</code> are used as configuration
-directories for these two versions of Solaris. On the other hand, both
-Solaris 2.7 and Solaris 2.8 use the <code>config/os/solaris/solaris-2.7</code>
-directory. The important information is that there needs to be a
-directory under <code>config/os</code> to store the files for your operating
-system.
-
- <p>You might have to change the <code>configure.host</code> file to ensure that
-your new directory is activated. Look for the switch statement that sets
-<code>os_include_dir</code>, and add a pattern to handle your operating system
-if the default will not suffice. The switch statement switches on only
-the OS portion of the standard target triplet; e.g., the <code>solaris2.8</code>
-in <code>sparc-sun-solaris2.8</code>. If the new directory is named after the
-OS portion of the triplet (the default), then nothing needs to be changed.
-
- <p>The first file to create in this directory, should be called
-<code>os_defines.h</code>. This file contains basic macro definitions
-that are required to allow the C++ library to work with your C library.
-
- <p>Several libstdc++-v3 source files unconditionally define the macro
-<code>_POSIX_SOURCE</code>. On many systems, defining this macro causes
-large portions of the C library header files to be eliminated
-at preprocessing time. Therefore, you may have to <code>#undef</code> this
-macro, or define other macros (like <code>_LARGEFILE_SOURCE</code> or
-<code>__EXTENSIONS__</code>). You won't know what macros to define or
-undefine at this point; you'll have to try compiling the library and
-seeing what goes wrong. If you see errors about calling functions
-that have not been declared, look in your C library headers to see if
-the functions are declared there, and then figure out what macros you
-need to define. You will need to add them to the
-<code>CPLUSPLUS_CPP_SPEC</code> macro in the GCC configuration file for your
-target. It will not work to simply define these macros in
-<code>os_defines.h</code>.
-
- <p>At this time, there are a few libstdc++-v3-specific macros which may be
-defined:
-
- <p><code>_GLIBCXX_USE_C99_CHECK</code> may be defined to 1 to check C99
-function declarations (which are not covered by specialization below)
-found in system headers against versions found in the library headers
-derived from the standard.
-
- <p><code>_GLIBCXX_USE_C99_DYNAMIC</code> may be defined to an expression that
-yields 0 if and only if the system headers are exposing proper support
-for C99 functions (which are not covered by specialization below). If
-defined, it must be 0 while bootstrapping the compiler/rebuilding the
-library.
-
- <p><code>_GLIBCXX_USE_C99_LONG_LONG_CHECK</code> may be defined to 1 to check
-the set of C99 long long function declarations found in system headers
-against versions found in the library headers derived from the
-standard.
-
- <p><code>_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC</code> may be defined to an
-expression that yields 0 if and only if the system headers are
-exposing proper support for the set of C99 long long functions. If
-defined, it must be 0 while bootstrapping the compiler/rebuilding the
-library.
-
- <p><code>_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC</code> may be defined to an
-expression that yields 0 if and only if the system headers
-are exposing proper support for the related set of macros. If defined,
-it must be 0 while bootstrapping the compiler/rebuilding the library.
-
- <p><code>_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK</code> may be defined
-to 1 to check the related set of function declarations found in system
-headers against versions found in the library headers derived from
-the standard.
-
- <p><code>_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC</code> may be defined
-to an expression that yields 0 if and only if the system headers
-are exposing proper support for the related set of functions. If defined,
-it must be 0 while bootstrapping the compiler/rebuilding the library.
-
- <p>Finally, you should bracket the entire file in an include-guard, like
-this:
-
-<pre class="example"> #ifndef _GLIBCXX_OS_DEFINES
- #define _GLIBCXX_OS_DEFINES
- ...
- #endif
- </pre>
-
- <p>We recommend copying an existing <code>os_defines.h</code> to use as a
-starting point.
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="CPU">CPU</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#Character%20types">Character types</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Operating%20system">Operating system</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">CPU</h2>
-
-<p>If you are porting to a new chip (as opposed to a new operating system
-running on an existing chip), you will need to create a new directory in the
-<code>config/cpu</code> hierarchy. Much like the <a href="#Operating%20system">Operating system</a> setup,
-there are no strict rules on how to organize the CPU configuration
-directory, but careful naming choices will allow the configury to find your
-setup files without explicit help.
-
- <p>We recommend that for a target triplet <code>&lt;CPU&gt;-&lt;vendor&gt;-&lt;OS&gt;</code>, you
-name your configuration directory <code>config/cpu/&lt;CPU&gt;</code>. If you do this,
-the configury will find the directory by itself. Otherwise you will need to
-edit the <code>configure.host</code> file and, in the switch statement that sets
-<code>cpu_include_dir</code>, add a pattern to handle your chip.
-
- <p>Note that some chip families share a single configuration directory, for
-example, <code>alpha</code>, <code>alphaev5</code>, and <code>alphaev6</code> all use the
-<code>config/cpu/alpha</code> directory, and there is an entry in the
-<code>configure.host</code> switch statement to handle this.
-
- <p>The <code>cpu_include_dir</code> sets default locations for the files controlling
-<a href="#Thread%20safety">Thread safety</a> and <a href="#Numeric%20limits">Numeric limits</a>, if the defaults are not
-appropriate for your chip.
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Character%20types">Character types</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#Thread%20safety">Thread safety</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#CPU">CPU</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">Character types</h2>
-
-<p>The library requires that you provide three header files to implement
-character classification, analogous to that provided by the C libraries
-<code>&lt;ctype.h&gt;</code> header. You can model these on the files provided in
-<code>config/os/generic</code>. However, these files will almost
-certainly need some modification.
-
- <p>The first file to write is <code>ctype_base.h</code>. This file provides
-some very basic information about character classification. The libstdc++-v3
-library assumes that your C library implements <code>&lt;ctype.h&gt;</code> by using
-a table (indexed by character code) containing integers, where each of
-these integers is a bit-mask indicating whether the character is
-upper-case, lower-case, alphabetic, etc. The <code>ctype_base.h</code>
-file gives the type of the integer, and the values of the various bit
-masks. You will have to peer at your own <code>&lt;ctype.h&gt;</code> to figure out
-how to define the values required by this file.
-
- <p>The <code>ctype_base.h</code> header file does not need include guards.
-It should contain a single <code>struct</code> definition called
-<code>ctype_base</code>. This <code>struct</code> should contain two type
-declarations, and one enumeration declaration, like this example, taken
-from the IRIX configuration:
-
-<pre class="example"> struct ctype_base
- {
- typedef unsigned int mask;
- typedef int* __to_type;
-
- enum
- {
- space = _ISspace,
- print = _ISprint,
- cntrl = _IScntrl,
- upper = _ISupper,
- lower = _ISlower,
- alpha = _ISalpha,
- digit = _ISdigit,
- punct = _ISpunct,
- xdigit = _ISxdigit,
- alnum = _ISalnum,
- graph = _ISgraph
- };
- };
- </pre>
-
-<p>The <code>mask</code> type is the type of the elements in the table. If your
-C library uses a table to map lower-case numbers to upper-case numbers,
-and vice versa, you should define <code>__to_type</code> to be the type of the
-elements in that table. If you don't mind taking a minor performance
-penalty, or if your library doesn't implement <code>toupper</code> and
-<code>tolower</code> in this way, you can pick any pointer-to-integer type,
-but you must still define the type.
-
- <p>The enumeration should give definitions for all the values in the above
-example, using the values from your native <code>&lt;ctype.h&gt;</code>. They can
-be given symbolically (as above), or numerically, if you prefer. You do
-not have to include <code>&lt;ctype.h&gt;</code> in this header; it will always be
-included before <code>ctype_base.h</code> is included.
-
- <p>The next file to write is <code>ctype_noninline.h</code>, which also does
-not require include guards. This file defines a few member functions
-that will be included in <code>include/bits/locale_facets.h</code>. The first
-function that must be written is the <code>ctype&lt;char&gt;::ctype</code>
-constructor. Here is the IRIX example:
-
-<pre class="example"> ctype&lt;char&gt;::ctype(const mask* __table = 0, bool __del = false,
- size_t __refs = 0)
- : _Ctype_nois&lt;char&gt;(__refs), _M_del(__table != 0 &amp;&amp; __del),
- _M_toupper(NULL),
- _M_tolower(NULL),
- _M_ctable(NULL),
- _M_table(!__table
- ? (const mask*) (__libc_attr._ctype_tbl-&gt;_class + 1)
- : __table)
- { }
- </pre>
-
-<p>There are two parts of this that you might choose to alter. The first,
-and most important, is the line involving <code>__libc_attr</code>. That is
-IRIX system-dependent code that gets the base of the table mapping
-character codes to attributes. You need to substitute code that obtains
-the address of this table on your system. If you want to use your
-operating system's tables to map upper-case letters to lower-case, and
-vice versa, you should initialize <code>_M_toupper</code> and
-<code>_M_tolower</code> with those tables, in similar fashion.
-
- <p>Now, you have to write two functions to convert from upper-case to
-lower-case, and vice versa. Here are the IRIX versions:
-
-<pre class="example"> char
- ctype&lt;char&gt;::do_toupper(char __c) const
- { return _toupper(__c); }
-
- char
- ctype&lt;char&gt;::do_tolower(char __c) const
- { return _tolower(__c); }
- </pre>
-
-<p>Your C library provides equivalents to IRIX's <code>_toupper</code> and
-<code>_tolower</code>. If you initialized <code>_M_toupper</code> and
-<code>_M_tolower</code> above, then you could use those tables instead.
-
- <p>Finally, you have to provide two utility functions that convert strings
-of characters. The versions provided here will always work - but you
-could use specialized routines for greater performance if you have
-machinery to do that on your system:
-
-<pre class="example"> const char*
- ctype&lt;char&gt;::do_toupper(char* __low, const char* __high) const
- {
- while (__low &lt; __high)
- {
- *__low = do_toupper(*__low);
- ++__low;
- }
- return __high;
- }
-
- const char*
- ctype&lt;char&gt;::do_tolower(char* __low, const char* __high) const
- {
- while (__low &lt; __high)
- {
- *__low = do_tolower(*__low);
- ++__low;
- }
- return __high;
- }
- </pre>
-
- <p>You must also provide the <code>ctype_inline.h</code> file, which
-contains a few more functions. On most systems, you can just copy
-<code>config/os/generic/ctype_inline.h</code> and use it on your system.
-
- <p>In detail, the functions provided test characters for particular
-properties; they are analogous to the functions like <code>isalpha</code> and
-<code>islower</code> provided by the C library.
-
- <p>The first function is implemented like this on IRIX:
-
-<pre class="example"> bool
- ctype&lt;char&gt;::
- is(mask __m, char __c) const throw()
- { return (_M_table)[(unsigned char)(__c)] &amp; __m; }
- </pre>
-
-<p>The <code>_M_table</code> is the table passed in above, in the constructor.
-This is the table that contains the bitmasks for each character. The
-implementation here should work on all systems.
-
- <p>The next function is:
-
-<pre class="example"> const char*
- ctype&lt;char&gt;::
- is(const char* __low, const char* __high, mask* __vec) const throw()
- {
- while (__low &lt; __high)
- *__vec++ = (_M_table)[(unsigned char)(*__low++)];
- return __high;
- }
- </pre>
-
-<p>This function is similar; it copies the masks for all the characters
-from <code>__low</code> up until <code>__high</code> into the vector given by
-<code>__vec</code>.
-
- <p>The last two functions again are entirely generic:
-
-<pre class="example"> const char*
- ctype&lt;char&gt;::
- scan_is(mask __m, const char* __low, const char* __high) const throw()
- {
- while (__low &lt; __high &amp;&amp; !this-&gt;is(__m, *__low))
- ++__low;
- return __low;
- }
-
- const char*
- ctype&lt;char&gt;::
- scan_not(mask __m, const char* __low, const char* __high) const throw()
- {
- while (__low &lt; __high &amp;&amp; this-&gt;is(__m, *__low))
- ++__low;
- return __low;
- }
- </pre>
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Thread%20safety">Thread safety</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#Numeric%20limits">Numeric limits</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Character%20types">Character types</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">Thread safety</h2>
-
-<p>The C++ library string functionality requires a couple of atomic
-operations to provide thread-safety. If you don't take any special
-action, the library will use stub versions of these functions that are
-not thread-safe. They will work fine, unless your applications are
-multi-threaded.
-
- <p>If you want to provide custom, safe, versions of these functions, there
-are two distinct approaches. One is to provide a version for your CPU,
-using assembly language constructs. The other is to use the
-thread-safety primitives in your operating system. In either case, you
-make a file called <code>atomicity.h</code>, and the variable
-<code>ATOMICITYH</code> must point to this file.
-
- <p>If you are using the assembly-language approach, put this code in
-<code>config/cpu/&lt;chip&gt;/atomicity.h</code>, where chip is the name of
-your processor (see <a href="#CPU">CPU</a>). No additional changes are necessary to
-locate the file in this case; <code>ATOMICITYH</code> will be set by default.
-
- <p>If you are using the operating system thread-safety primitives approach,
-you can also put this code in the same CPU directory, in which case no more
-work is needed to locate the file. For examples of this approach,
-see the <code>atomicity.h</code> file for IRIX or IA64.
-
- <p>Alternatively, if the primitives are more closely related to the OS
-than they are to the CPU, you can put the <code>atomicity.h</code> file in
-the <a href="#Operating%20system">Operating system</a> directory instead. In this case, you must
-edit <code>configure.host</code>, and in the switch statement that handles
-operating systems, override the <code>ATOMICITYH</code> variable to point to
-the appropriate <code>os_include_dir</code>. For examples of this approach,
-see the <code>atomicity.h</code> file for AIX.
-
- <p>With those bits out of the way, you have to actually write
-<code>atomicity.h</code> itself. This file should be wrapped in an
-include guard named <code>_GLIBCXX_ATOMICITY_H</code>. It should define one
-type, and two functions.
-
- <p>The type is <code>_Atomic_word</code>. Here is the version used on IRIX:
-
-<pre class="example"> typedef long _Atomic_word;
- </pre>
-
-<p>This type must be a signed integral type supporting atomic operations.
-If you're using the OS approach, use the same type used by your system's
-primitives. Otherwise, use the type for which your CPU provides atomic
-primitives.
-
- <p>Then, you must provide two functions. The bodies of these functions
-must be equivalent to those provided here, but using atomic operations:
-
-<pre class="example"> static inline _Atomic_word
- __attribute__ ((__unused__))
- __exchange_and_add (_Atomic_word* __mem, int __val)
- {
- _Atomic_word __result = *__mem;
- *__mem += __val;
- return __result;
- }
-
- static inline void
- __attribute__ ((__unused__))
- __atomic_add (_Atomic_word* __mem, int __val)
- {
- *__mem += __val;
- }
- </pre>
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Numeric%20limits">Numeric limits</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#Libtool">Libtool</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Thread%20safety">Thread safety</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">Numeric limits</h2>
-
-<p>The C++ library requires information about the fundamental data types,
-such as the minimum and maximum representable values of each type.
-You can define each of these values individually, but it is usually
-easiest just to indicate how many bits are used in each of the data
-types and let the library do the rest. For information about the
-macros to define, see the top of <code>include/bits/std_limits.h</code>.
-
- <p>If you need to define any macros, you can do so in <code>os_defines.h</code>.
-However, if all operating systems for your CPU are likely to use the
-same values, you can provide a CPU-specific file instead so that you
-do not have to provide the same definitions for each operating system.
-To take that approach, create a new file called <code>cpu_limits.h</code> in
-your CPU configuration directory (see <a href="#CPU">CPU</a>).
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="Libtool">Libtool</a>,
-Next:&nbsp;<a rel="next" accesskey="n" href="#GNU%20Free%20Documentation%20License">GNU Free Documentation License</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Numeric%20limits">Numeric limits</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="chapter">Libtool</h2>
-
-<p>The C++ library is compiled, archived and linked with libtool.
-Explaining the full workings of libtool is beyond the scope of this
-document, but there are a few, particular bits that are necessary for
-porting.
-
- <p>Some parts of the libstdc++-v3 library are compiled with the libtool
-<code>--tags CXX</code> option (the C++ definitions for libtool). Therefore,
-<code>ltcf-cxx.sh</code> in the top-level directory needs to have the correct
-logic to compile and archive objects equivalent to the C version of libtool,
-<code>ltcf-c.sh</code>. Some libtool targets have definitions for C but not
-for C++, or C++ definitions which have not been kept up to date.
-
- <p>The C++ run-time library contains initialization code that needs to be
-run as the library is loaded. Often, that requires linking in special
-object files when the C++ library is built as a shared library, or
-taking other system-specific actions.
-
- <p>The libstdc++-v3 library is linked with the C version of libtool, even
-though it is a C++ library. Therefore, the C version of libtool needs to
-ensure that the run-time library initializers are run. The usual way to
-do this is to build the library using <code>gcc -shared</code>.
-
- <p>If you need to change how the library is linked, look at
-<code>ltcf-c.sh</code> in the top-level directory. Find the switch statement
-that sets <code>archive_cmds</code>. Here, adjust the setting for your
-operating system.
-
-<div class="node">
-<p><hr>
-Node:&nbsp;<a name="GNU%20Free%20Documentation%20License">GNU Free Documentation License</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#Libtool">Libtool</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
-<br>
-</div>
-
-<h2 class="unnumbered">GNU Free Documentation License</h2>
-
-<div align="center">Version 1.2, November 2002</div>
-<pre class="display"> Copyright &copy; 2000,2001,2002 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
- </pre>
-
- <ol type=1 start=0>
-<li>PREAMBLE
-
- <p>The purpose of this License is to make a manual, textbook, or other
-functional and useful document <dfn>free</dfn> in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-
- <p>This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
- <p>We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
- </p><li>APPLICABILITY AND DEFINITIONS
-
- <p>This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The "Document", below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as "you". You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-
- <p>A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
- <p>A "Secondary Section" is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
- <p>The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-
- <p>The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-
- <p>A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not "Transparent" is called "Opaque".
-
- <p>Examples of suitable formats for Transparent copies include plain
-<small>ASCII</small> without markup, Texinfo input format, LaTeX input
-format, <small>SGML</small> or <small>XML</small> using a publicly available
-<small>DTD</small>, and standard-conforming simple <small>HTML</small>,
-PostScript or <small>PDF</small> designed for human modification. Examples
-of transparent image formats include <small>PNG</small>, <small>XCF</small> and
-<small>JPG</small>. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, <small>SGML</small> or
-<small>XML</small> for which the <small>DTD</small> and/or processing tools are
-not generally available, and the machine-generated <small>HTML</small>,
-PostScript or <small>PDF</small> produced by some word processors for
-output purposes only.
-
- <p>The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
- <p>A section "Entitled XYZ" means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as "Acknowledgements",
-"Dedications", "Endorsements", or "History".) To "Preserve the Title"
-of such a section when you modify the Document means that it remains a
-section "Entitled XYZ" according to this definition.
-
- <p>The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-
- </p><li>VERBATIM COPYING
-
- <p>You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
- <p>You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
- </p><li>COPYING IN QUANTITY
-
- <p>If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
- <p>If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
- <p>If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-
- <p>It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
- </p><li>MODIFICATIONS
-
- <p>You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
- <ol type=A start=1>
-<li>Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
- <li>List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
- <li>State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
- <li>Preserve all the copyright notices of the Document.
-
- <li>Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
- <li>Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
- <li>Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document's license notice.
-
- <li>Include an unaltered copy of this License.
-
- <li>Preserve the section Entitled "History", Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled "History" in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
- <li>Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the "History" section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
- <li>For any section Entitled "Acknowledgements" or "Dedications", Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
- <li>Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
- <li>Delete any section Entitled "Endorsements". Such a section
-may not be included in the Modified Version.
-
- <li>Do not retitle any existing section to be Entitled "Endorsements" or
-to conflict in title with any Invariant Section.
-
- <li>Preserve any Warranty Disclaimers.
- </ol>
-
- <p>If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
- <p>You may add a section Entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
- <p>You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
- <p>The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
- </p><li>COMBINING DOCUMENTS
-
- <p>You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-
- <p>The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
- <p>In the combination, you must combine any sections Entitled "History"
-in the various original documents, forming one section Entitled
-"History"; likewise combine any sections Entitled "Acknowledgements",
-and any sections Entitled "Dedications". You must delete all
-sections Entitled "Endorsements."
-
- </p><li>COLLECTIONS OF DOCUMENTS
-
- <p>You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
- <p>You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
- </p><li>AGGREGATION WITH INDEPENDENT WORKS
-
- <p>A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an "aggregate" if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation's users beyond what the individual works permit.
-When the Document is included an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-
- <p>If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document's Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-
- </p><li>TRANSLATION
-
- <p>Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warrany Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-
- <p>If a section in the Document is Entitled "Acknowledgements",
-"Dedications", or "History", the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-
- </p><li>TERMINATION
-
- <p>You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- </p><li>FUTURE REVISIONS OF THIS LICENSE
-
- <p>The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
-
- <p>Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
- </ol>
-
-<h3 class="unnumberedsec">ADDENDUM: How to use this License for your documents</h3>
-
-<p>To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
- A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
- </pre>
-
- <p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the "with...Texts." line with this:
-
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
- </pre>
-
- <p>If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-
- <p>If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-
-
-<div class="contents">
-<h2>Table of Contents</h2>
-<ul>
-<li><a name="toc_Top" href="#Top">Porting libstdc++-v3</a>
-<li><a name="toc_Operating%20system" href="#Operating%20system">Operating system</a>
-<li><a name="toc_CPU" href="#CPU">CPU</a>
-<li><a name="toc_Character%20types" href="#Character%20types">Character types</a>
-<li><a name="toc_Thread%20safety" href="#Thread%20safety">Thread safety</a>
-<li><a name="toc_Numeric%20limits" href="#Numeric%20limits">Numeric limits</a>
-<li><a name="toc_Libtool" href="#Libtool">Libtool</a>
-<li><a name="toc_GNU%20Free%20Documentation%20License" href="#GNU%20Free%20Documentation%20License">GNU Free Documentation License</a>
-<ul>
-<li><a href="#GNU%20Free%20Documentation%20License">ADDENDUM: How to use this License for your documents</a>
-</li></ul>
-</li></ul>
-</div>
-
- </body></html>
-
diff --git a/libstdc++-v3/docs/html/17_intro/porting.texi b/libstdc++-v3/docs/html/17_intro/porting.texi
deleted file mode 100644
index 090bdf77155..00000000000
--- a/libstdc++-v3/docs/html/17_intro/porting.texi
+++ /dev/null
@@ -1,570 +0,0 @@
-\input texinfo
-
-@c ---------------------------------------------------------------------
-@c Prologue
-@c ---------------------------------------------------------------------
-
-@setfilename porting.info
-@settitle Porting libstdc++-v3
-@setchapternewpage odd
-
-@copying
-Copyright @copyright{} 2000, 2001, 2002, 2003, 2005
-Free Software Foundation, Inc.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License'', the Front-Cover
-texts being (a) (see below), and with the Back-Cover Texts being (b)
-(see below). A copy of the license is included in the section entitled
-``GNU Free Documentation License''.
-
-(a) The FSF's Front-Cover Text is:
-
- A GNU Manual
-
-(b) The FSF's Back-Cover Text is:
-
- You have freedom to copy and modify this GNU Manual, like GNU
- software. Copies published by the Free Software Foundation raise
- funds for GNU development.
-@end copying
-
-@ifinfo
-This file explains how to port libstdc++-v3 (the GNU C++ library) to
-a new target.
-
-@insertcopying
-@end ifinfo
-
-@c ---------------------------------------------------------------------
-@c Titlepage
-@c ---------------------------------------------------------------------
-
-@titlepage
-@title Porting libstdc++-v3
-@author Mark Mitchell
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-@end titlepage
-
-@c ---------------------------------------------------------------------
-@c Top
-@c ---------------------------------------------------------------------
-
-@node Top
-@top Porting libstdc++-v3
-
-This document explains how to port libstdc++-v3 (the GNU C++ library) to
-a new target.
-
-In order to make the GNU C++ library (libstdc++-v3) work with a new
-target, you must edit some configuration files and provide some new
-header files. Unless this is done, libstdc++-v3 will use generic
-settings which may not be correct for your target; even if they are
-correct, they will likely be inefficient.
-
-Before you get started, make sure that you have a working C library on
-your target. The C library need not precisely comply with any
-particular standard, but should generally conform to the requirements
-imposed by the ANSI/ISO standard.
-
-In addition, you should try to verify that the C++ compiler generally
-works. It is difficult to test the C++ compiler without a working
-library, but you should at least try some minimal test cases.
-
-(Note that what we think of as a ``target,'' the library refers to as
-a ``host.'' The comment at the top of @file{configure.ac} explains why.)
-
-Here are the primary steps required to port the library:
-
-@menu
-* Operating system:: Configuring for your operating system.
-* CPU:: Configuring for your processor chip.
-* Character types:: Implementing character classification.
-* Thread safety:: Implementing atomic operations.
-* Numeric limits:: Implementing numeric limits.
-* Libtool:: Using libtool.
-* GNU Free Documentation License:: How you can copy and share this manual.
-@end menu
-
-@c ---------------------------------------------------------------------
-@c Operating system
-@c ---------------------------------------------------------------------
-
-@node Operating system
-@chapter Operating system
-
-If you are porting to a new operating system (as opposed to a new chip
-using an existing operating system), you will need to create a new
-directory in the @file{config/os} hierarchy. For example, the IRIX
-configuration files are all in @file{config/os/irix}. There is no set
-way to organize the OS configuration directory. For example,
-@file{config/os/solaris/solaris-2.6} and
-@file{config/os/solaris/solaris-2.7} are used as configuration
-directories for these two versions of Solaris. On the other hand, both
-Solaris 2.7 and Solaris 2.8 use the @file{config/os/solaris/solaris-2.7}
-directory. The important information is that there needs to be a
-directory under @file{config/os} to store the files for your operating
-system.
-
-You might have to change the @file{configure.host} file to ensure that
-your new directory is activated. Look for the switch statement that sets
-@code{os_include_dir}, and add a pattern to handle your operating system
-if the default will not suffice. The switch statement switches on only
-the OS portion of the standard target triplet; e.g., the @code{solaris2.8}
-in @code{sparc-sun-solaris2.8}. If the new directory is named after the
-OS portion of the triplet (the default), then nothing needs to be changed.
-
-The first file to create in this directory, should be called
-@file{os_defines.h}. This file contains basic macro definitions
-that are required to allow the C++ library to work with your C library.
-
-Several libstdc++-v3 source files unconditionally define the macro
-@code{_POSIX_SOURCE}. On many systems, defining this macro causes
-large portions of the C library header files to be eliminated
-at preprocessing time. Therefore, you may have to @code{#undef} this
-macro, or define other macros (like @code{_LARGEFILE_SOURCE} or
-@code{__EXTENSIONS__}). You won't know what macros to define or
-undefine at this point; you'll have to try compiling the library and
-seeing what goes wrong. If you see errors about calling functions
-that have not been declared, look in your C library headers to see if
-the functions are declared there, and then figure out what macros you
-need to define. You will need to add them to the
-@code{CPLUSPLUS_CPP_SPEC} macro in the GCC configuration file for your
-target. It will not work to simply define these macros in
-@file{os_defines.h}.
-
-At this time, there are a few libstdc++-v3-specific macros which may be
-defined:
-
-@code{_GLIBCXX_USE_C99_CHECK} may be defined to 1 to check C99
-function declarations (which are not covered by specialization below)
-found in system headers against versions found in the library headers
-derived from the standard.
-
-@code{_GLIBCXX_USE_C99_DYNAMIC} may be defined to an expression that
-yields 0 if and only if the system headers are exposing proper support
-for C99 functions (which are not covered by specialization below). If
-defined, it must be 0 while bootstrapping the compiler/rebuilding the
-library.
-
-@code{_GLIBCXX_USE_C99_LONG_LONG_CHECK} may be defined to 1 to check
-the set of C99 long long function declarations found in system headers
-against versions found in the library headers derived from the
-standard.
-
-@code{_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC} may be defined to an
-expression that yields 0 if and only if the system headers are
-exposing proper support for the set of C99 long long functions. If
-defined, it must be 0 while bootstrapping the compiler/rebuilding the
-library.
-
-@code{_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC} may be defined to an
-expression that yields 0 if and only if the system headers
-are exposing proper support for the related set of macros. If defined,
-it must be 0 while bootstrapping the compiler/rebuilding the library.
-
-@code{_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK} may be defined
-to 1 to check the related set of function declarations found in system
-headers against versions found in the library headers derived from
-the standard.
-
-@code{_GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC} may be defined
-to an expression that yields 0 if and only if the system headers
-are exposing proper support for the related set of functions. If defined,
-it must be 0 while bootstrapping the compiler/rebuilding the library.
-
-Finally, you should bracket the entire file in an include-guard, like
-this:
-
-@example
-#ifndef _GLIBCXX_OS_DEFINES
-#define _GLIBCXX_OS_DEFINES
-...
-#endif
-@end example
-
-We recommend copying an existing @file{os_defines.h} to use as a
-starting point.
-
-@c ---------------------------------------------------------------------
-@c CPU
-@c ---------------------------------------------------------------------
-
-@node CPU
-@chapter CPU
-
-If you are porting to a new chip (as opposed to a new operating system
-running on an existing chip), you will need to create a new directory in the
-@file{config/cpu} hierarchy. Much like the @ref{Operating system} setup,
-there are no strict rules on how to organize the CPU configuration
-directory, but careful naming choices will allow the configury to find your
-setup files without explicit help.
-
-We recommend that for a target triplet @code{<CPU>-<vendor>-<OS>}, you
-name your configuration directory @file{config/cpu/<CPU>}. If you do this,
-the configury will find the directory by itself. Otherwise you will need to
-edit the @file{configure.host} file and, in the switch statement that sets
-@code{cpu_include_dir}, add a pattern to handle your chip.
-
-Note that some chip families share a single configuration directory, for
-example, @code{alpha}, @code{alphaev5}, and @code{alphaev6} all use the
-@file{config/cpu/alpha} directory, and there is an entry in the
-@file{configure.host} switch statement to handle this.
-
-The @code{cpu_include_dir} sets default locations for the files controlling
-@ref{Thread safety} and @ref{Numeric limits}, if the defaults are not
-appropriate for your chip.
-
-
-@c ---------------------------------------------------------------------
-@c Character types
-@c ---------------------------------------------------------------------
-
-@node Character types
-@chapter Character types
-
-The library requires that you provide three header files to implement
-character classification, analogous to that provided by the C libraries
-@file{<ctype.h>} header. You can model these on the files provided in
-@file{config/os/generic}. However, these files will almost
-certainly need some modification.
-
-The first file to write is @file{ctype_base.h}. This file provides
-some very basic information about character classification. The libstdc++-v3
-library assumes that your C library implements @file{<ctype.h>} by using
-a table (indexed by character code) containing integers, where each of
-these integers is a bit-mask indicating whether the character is
-upper-case, lower-case, alphabetic, etc. The @file{ctype_base.h}
-file gives the type of the integer, and the values of the various bit
-masks. You will have to peer at your own @file{<ctype.h>} to figure out
-how to define the values required by this file.
-
-The @file{ctype_base.h} header file does not need include guards.
-It should contain a single @code{struct} definition called
-@code{ctype_base}. This @code{struct} should contain two type
-declarations, and one enumeration declaration, like this example, taken
-from the IRIX configuration:
-
-@example
-struct ctype_base
-@{
- typedef unsigned int mask;
- typedef int* __to_type;
-
- enum
- @{
- space = _ISspace,
- print = _ISprint,
- cntrl = _IScntrl,
- upper = _ISupper,
- lower = _ISlower,
- alpha = _ISalpha,
- digit = _ISdigit,
- punct = _ISpunct,
- xdigit = _ISxdigit,
- alnum = _ISalnum,
- graph = _ISgraph
- @};
-@};
-@end example
-
-@noindent
-The @code{mask} type is the type of the elements in the table. If your
-C library uses a table to map lower-case numbers to upper-case numbers,
-and vice versa, you should define @code{__to_type} to be the type of the
-elements in that table. If you don't mind taking a minor performance
-penalty, or if your library doesn't implement @code{toupper} and
-@code{tolower} in this way, you can pick any pointer-to-integer type,
-but you must still define the type.
-
-The enumeration should give definitions for all the values in the above
-example, using the values from your native @file{<ctype.h>}. They can
-be given symbolically (as above), or numerically, if you prefer. You do
-not have to include @file{<ctype.h>} in this header; it will always be
-included before @file{ctype_base.h} is included.
-
-The next file to write is @file{ctype_noninline.h}, which also does
-not require include guards. This file defines a few member functions
-that will be included in @file{include/bits/locale_facets.h}. The first
-function that must be written is the @code{ctype<char>::ctype}
-constructor. Here is the IRIX example:
-
-@example
-ctype<char>::ctype(const mask* __table = 0, bool __del = false,
- size_t __refs = 0)
- : _Ctype_nois<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL),
- _M_tolower(NULL),
- _M_ctable(NULL),
- _M_table(!__table
- ? (const mask*) (__libc_attr._ctype_tbl->_class + 1)
- : __table)
- @{ @}
-@end example
-
-@noindent
-There are two parts of this that you might choose to alter. The first,
-and most important, is the line involving @code{__libc_attr}. That is
-IRIX system-dependent code that gets the base of the table mapping
-character codes to attributes. You need to substitute code that obtains
-the address of this table on your system. If you want to use your
-operating system's tables to map upper-case letters to lower-case, and
-vice versa, you should initialize @code{_M_toupper} and
-@code{_M_tolower} with those tables, in similar fashion.
-
-Now, you have to write two functions to convert from upper-case to
-lower-case, and vice versa. Here are the IRIX versions:
-
-@example
-char
-ctype<char>::do_toupper(char __c) const
-@{ return _toupper(__c); @}
-
-char
-ctype<char>::do_tolower(char __c) const
-@{ return _tolower(__c); @}
-@end example
-
-@noindent
-Your C library provides equivalents to IRIX's @code{_toupper} and
-@code{_tolower}. If you initialized @code{_M_toupper} and
-@code{_M_tolower} above, then you could use those tables instead.
-
-Finally, you have to provide two utility functions that convert strings
-of characters. The versions provided here will always work -- but you
-could use specialized routines for greater performance if you have
-machinery to do that on your system:
-
-@example
-const char*
-ctype<char>::do_toupper(char* __low, const char* __high) const
-@{
- while (__low < __high)
- @{
- *__low = do_toupper(*__low);
- ++__low;
- @}
- return __high;
-@}
-
-const char*
-ctype<char>::do_tolower(char* __low, const char* __high) const
-@{
- while (__low < __high)
- @{
- *__low = do_tolower(*__low);
- ++__low;
- @}
- return __high;
-@}
-@end example
-
-You must also provide the @file{ctype_inline.h} file, which
-contains a few more functions. On most systems, you can just copy
-@file{config/os/generic/ctype_inline.h} and use it on your system.
-
-In detail, the functions provided test characters for particular
-properties; they are analogous to the functions like @code{isalpha} and
-@code{islower} provided by the C library.
-
-The first function is implemented like this on IRIX:
-
-@example
-bool
-ctype<char>::
-is(mask __m, char __c) const throw()
-@{ return (_M_table)[(unsigned char)(__c)] & __m; @}
-@end example
-
-@noindent
-The @code{_M_table} is the table passed in above, in the constructor.
-This is the table that contains the bitmasks for each character. The
-implementation here should work on all systems.
-
-The next function is:
-
-@example
-const char*
-ctype<char>::
-is(const char* __low, const char* __high, mask* __vec) const throw()
-@{
- while (__low < __high)
- *__vec++ = (_M_table)[(unsigned char)(*__low++)];
- return __high;
-@}
-@end example
-
-@noindent
-This function is similar; it copies the masks for all the characters
-from @code{__low} up until @code{__high} into the vector given by
-@code{__vec}.
-
-The last two functions again are entirely generic:
-
-@example
-const char*
-ctype<char>::
-scan_is(mask __m, const char* __low, const char* __high) const throw()
-@{
- while (__low < __high && !this->is(__m, *__low))
- ++__low;
- return __low;
-@}
-
-const char*
-ctype<char>::
-scan_not(mask __m, const char* __low, const char* __high) const throw()
-@{
- while (__low < __high && this->is(__m, *__low))
- ++__low;
- return __low;
-@}
-@end example
-
-@c ---------------------------------------------------------------------
-@c Thread safety
-@c ---------------------------------------------------------------------
-
-@node Thread safety
-@chapter Thread safety
-
-The C++ library string functionality requires a couple of atomic
-operations to provide thread-safety. If you don't take any special
-action, the library will use stub versions of these functions that are
-not thread-safe. They will work fine, unless your applications are
-multi-threaded.
-
-If you want to provide custom, safe, versions of these functions, there
-are two distinct approaches. One is to provide a version for your CPU,
-using assembly language constructs. The other is to use the
-thread-safety primitives in your operating system. In either case, you
-make a file called @file{atomicity.h}, and the variable
-@code{ATOMICITYH} must point to this file.
-
-If you are using the assembly-language approach, put this code in
-@file{config/cpu/<chip>/atomicity.h}, where chip is the name of
-your processor (@pxref{CPU}). No additional changes are necessary to
-locate the file in this case; @code{ATOMICITYH} will be set by default.
-
-If you are using the operating system thread-safety primitives approach,
-you can also put this code in the same CPU directory, in which case no more
-work is needed to locate the file. For examples of this approach,
-see the @file{atomicity.h} file for IRIX or IA64.
-
-Alternatively, if the primitives are more closely related to the OS
-than they are to the CPU, you can put the @file{atomicity.h} file in
-the @ref{Operating system} directory instead. In this case, you must
-edit @file{configure.host}, and in the switch statement that handles
-operating systems, override the @code{ATOMICITYH} variable to point to
-the appropriate @code{os_include_dir}. For examples of this approach,
-see the @file{atomicity.h} file for AIX.
-
-With those bits out of the way, you have to actually write
-@file{atomicity.h} itself. This file should be wrapped in an
-include guard named @code{_GLIBCXX_ATOMICITY_H}. It should define one
-type, and two functions.
-
-The type is @code{_Atomic_word}. Here is the version used on IRIX:
-
-@example
-typedef long _Atomic_word;
-@end example
-
-@noindent
-This type must be a signed integral type supporting atomic operations.
-If you're using the OS approach, use the same type used by your system's
-primitives. Otherwise, use the type for which your CPU provides atomic
-primitives.
-
-Then, you must provide two functions. The bodies of these functions
-must be equivalent to those provided here, but using atomic operations:
-
-@example
-static inline _Atomic_word
-__attribute__ ((__unused__))
-__exchange_and_add (_Atomic_word* __mem, int __val)
-@{
- _Atomic_word __result = *__mem;
- *__mem += __val;
- return __result;
-@}
-
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (_Atomic_word* __mem, int __val)
-@{
- *__mem += __val;
-@}
-@end example
-
-@c ---------------------------------------------------------------------
-@c Numeric limits
-@c ---------------------------------------------------------------------
-
-@node Numeric limits
-@chapter Numeric limits
-
-The C++ library requires information about the fundamental data types,
-such as the minimum and maximum representable values of each type.
-You can define each of these values individually, but it is usually
-easiest just to indicate how many bits are used in each of the data
-types and let the library do the rest. For information about the
-macros to define, see the top of @file{include/bits/std_limits.h}.
-
-If you need to define any macros, you can do so in @file{os_defines.h}.
-However, if all operating systems for your CPU are likely to use the
-same values, you can provide a CPU-specific file instead so that you
-do not have to provide the same definitions for each operating system.
-To take that approach, create a new file called @file{cpu_limits.h} in
-your CPU configuration directory (@pxref{CPU}).
-
-@c ---------------------------------------------------------------------
-@c Libtool
-@c ---------------------------------------------------------------------
-
-@node Libtool
-@chapter Libtool
-
-The C++ library is compiled, archived and linked with libtool.
-Explaining the full workings of libtool is beyond the scope of this
-document, but there are a few, particular bits that are necessary for
-porting.
-
-Some parts of the libstdc++-v3 library are compiled with the libtool
-@code{--tags CXX} option (the C++ definitions for libtool). Therefore,
-@file{ltcf-cxx.sh} in the top-level directory needs to have the correct
-logic to compile and archive objects equivalent to the C version of libtool,
-@file{ltcf-c.sh}. Some libtool targets have definitions for C but not
-for C++, or C++ definitions which have not been kept up to date.
-
-The C++ run-time library contains initialization code that needs to be
-run as the library is loaded. Often, that requires linking in special
-object files when the C++ library is built as a shared library, or
-taking other system-specific actions.
-
-The libstdc++-v3 library is linked with the C version of libtool, even
-though it is a C++ library. Therefore, the C version of libtool needs to
-ensure that the run-time library initializers are run. The usual way to
-do this is to build the library using @code{gcc -shared}.
-
-If you need to change how the library is linked, look at
-@file{ltcf-c.sh} in the top-level directory. Find the switch statement
-that sets @code{archive_cmds}. Here, adjust the setting for your
-operating system.
-
-@c ---------------------------------------------------------------------
-@c GFDL
-@c ---------------------------------------------------------------------
-
-@include fdl.texi
-
-@c ---------------------------------------------------------------------
-@c Epilogue
-@c ---------------------------------------------------------------------
-
-@contents
-@bye
diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html
deleted file mode 100644
index c6faf5e98f2..00000000000
--- a/libstdc++-v3/docs/html/18_support/howto.html
+++ /dev/null
@@ -1,433 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 18." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 18: Library Support</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../17_intro/howto.html" type="text/html"
- title="Library Introduction" />
-<link rel="Next" href="../19_diagnostics/howto.html" type="text/html"
- title="Diagnostics" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 18: Library Support</a></h1>
-
-<p>Chapter 18 deals with the functions called and objects created
- automatically during the course of a program's existence.
-</p>
-<p>While we can't reproduce the contents of the Standard here (you need to
- get your own copy from your nation's member body; see our homepage for
- help), we can mention a couple of changes in what kind of support a C++
- program gets from the Standard Library.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Types</a></li>
- <li><a href="#2">Implementation properties</a></li>
- <li><a href="#3">Start and Termination</a></li>
- <li><a href="#4">Verbose <code>terminate</code></a></li>
- <li><a href="#5">Dynamic memory management</a></li>
- <li><a href="#6">RTTI, the ABI, and demangling</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Types</a></h2>
- <p>All the types that you're used to in C are here in one form or
- another. The only change that might affect people is the type of
- NULL: while it is required to be a macro, the definition of that
- macro is <em>not</em> allowed to be <code>(void*)0</code>, which is
- often used in C.
- </p>
- <p>In g++, NULL is #define'd to be <code>__null</code>, a magic keyword
- extension of g++.
- </p>
- <p>The biggest problem of #defining NULL to be something like
- &quot;0L&quot; is that the compiler will view that as a long integer
- before it views it as a pointer, so overloading won't do what you
- expect. (This is why g++ has a magic extension, so that NULL is
- always a pointer.)
- </p>
- <p>In his book
- <a href="http://www.awprofessional.com/titles/0-201-92488-9/"><em>Effective C++</em></a>,
- Scott Meyers points out that the best way to solve this problem is to
- not overload on pointer-vs-integer types to begin with. He also
- offers a way to make your own magic NULL that will match pointers
- before it matches integers:
- </p>
- <pre>
- const // this is a const object...
- class {
- public:
- template&lt;class T&gt; // convertible to any type
- operator T*() const // of null non-member
- { return 0; } // pointer...
-
- template&lt;class C, class T&gt; // or any type of null
- operator T C::*() const // member pointer...
- { return 0; }
-
- private:
- void operator&amp;() const; // whose address can't be
- // taken (see Item 27)...
-
- } NULL; // and whose name is NULL
- </pre>
- <p>(Cribbed from the published version of
- <a href="http://www.awprofessional.com/titles/0-201-31015-5/">the
- Effective C++ CD</a>, reproduced here with permission.)
- </p>
- <p>If you aren't using g++ (why?), but you do have a compiler which
- supports member function templates, then you can use this definition
- of NULL (be sure to #undef any existing versions). It only helps if
- you actually use NULL in function calls, though; if you make a call of
- <code>foo(0);</code> instead of <code>foo(NULL);</code>, then you're back
- where you started.
- </p>
- <p><strong>Added Note:</strong> When we contacted Dr. Meyers to ask
- permission to
- print this stuff, it prompted him to run this code through current
- compilers to see what the state of the art is with respect to member
- template functions. He posted
- <a href="http://groups.google.com/groups?oi=djq&selm=an_644660779">an
- article to Usenet</a> after discovering that the code above is not
- valid! Even though it has no data members, it still needs a
- user-defined constructor (which means that the class needs a type name
- after all). The ctor can have an empty body; it just needs to be
- there. (Stupid requirement? We think so too, and this will probably
- be changed in the language itself.)
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Implementation properties</a></h2>
- <h3><code>&lt;limits&gt;</code></h3>
- <p>This header mainly defines traits classes to give access to various
- implementation defined-aspects of the fundamental types. The
- traits classes -- fourteen in total -- are all specializations of the
- template class <code>numeric_limits</code>, documented
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/structstd_1_1numeric__limits.html">here</a>
- and defined as follows:
- </p>
- <pre>
- template&lt;typename T&gt; struct class {
- static const bool is_specialized;
- static T max() throw();
- static T min() throw();
-
- static const int digits;
- static const int digits10;
- static const bool is_signed;
- static const bool is_integer;
- static const bool is_exact;
- static const int radix;
- static T epsilon() throw();
- static T round_error() throw();
-
- static const int min_exponent;
- static const int min_exponent10;
- static const int max_exponent;
- static const int max_exponent10;
-
- static const bool has_infinity;
- static const bool has_quiet_NaN;
- static const bool has_signaling_NaN;
- static const float_denorm_style has_denorm;
- static const bool has_denorm_loss;
- static T infinity() throw();
- static T quiet_NaN() throw();
- static T denorm_min() throw();
-
- static const bool is_iec559;
- static const bool is_bounded;
- static const bool is_modulo;
-
- static const bool traps;
- static const bool tinyness_before;
- static const float_round_style round_style;
- };</pre>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Start and Termination</a></h2>
- <p>Not many changes here to <code>&lt;cstdlib&gt;</code> (the old stdlib.h).
- You should note that the <code>abort()</code> function does not call
- the destructors of automatic nor static objects, so if you're depending
- on those to do cleanup, it isn't going to happen. (The functions
- registered with <code>atexit()</code> don't get called either, so you
- can forget about that possibility, too.)
- </p>
- <p>The good old <code>exit()</code> function can be a bit funky, too, until
- you look closer. Basically, three points to remember are:
- </p>
- <ol>
- <li>Static objects are destroyed in reverse order of their creation.
- </li>
- <li>Functions registered with <code>atexit()</code> are called in
- reverse order of registration, once per registration call.
- (This isn't actually new.)
- </li>
- <li>The previous two actions are &quot;interleaved,&quot; that is,
- given this pseudocode:
- <pre>
- extern "C or C++" void f1 (void);
- extern "C or C++" void f2 (void);
-
- static Thing obj1;
- atexit(f1);
- static Thing obj2;
- atexit(f2);
- </pre>
- then at a call of <code>exit()</code>, f2 will be called, then
- obj2 will be destroyed, then f1 will be called, and finally obj1
- will be destroyed. If f1 or f2 allow an exception to propagate
- out of them, Bad Things happen.
- </li>
- </ol>
- <p>Note also that <code>atexit()</code> is only required to store 32
- functions, and the compiler/library might already be using some of
- those slots. If you think you may run out, we recommend using
- the xatexit/xexit combination from libiberty, which has no such limit.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">Verbose <code>terminate</code></a></h2>
- <p>If you are having difficulty with uncaught exceptions and want a
- little bit of help debugging the causes of the core dumps, you can
- make use of a GNU extension in GCC 3.1 and later:
- </p>
- <pre>
- #include &lt;exception&gt;
-
- int main()
- {
- std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
- ...
-
- throw <em>anything</em>;
- }</pre>
- <p>The <code> __verbose_terminate_handler </code> function obtains the name
- of the current exception, attempts to demangle it, and prints it to
- stderr. If the exception is derived from <code> std::exception </code>
- then the output from <code>what()</code> will be included.
- </p>
- <p>Any replacement termination function is required to kill the program
- without returning; this one calls abort.
- </p>
- <p>For example:
- </p>
- <pre>
- #include &lt;exception&gt;
- #include &lt;stdexcept&gt;
-
- struct argument_error : public std::runtime_error
- {
- argument_error(const std::string& s): std::runtime_error(s) { }
- };
-
- int main(int argc)
- {
- std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
- if (argc &gt; 5)
- throw argument_error(&quot;argc is greater than 5!&quot;);
- else
- throw argc;
- }
- </pre>
- <p>In GCC 3.1 and later, this gives
- </p>
- <pre>
- % ./a.out
- terminate called after throwing a `int'
- Aborted
- % ./a.out f f f f f f f f f f f
- terminate called after throwing an instance of `argument_error'
- what(): argc is greater than 5!
- Aborted
- %</pre>
- <p>The 'Aborted' line comes from the call to abort(), of course.
- </p>
- <p><strong>UPDATE:</strong> Starting with GCC 3.4, this is the default
- termination handler; nothing need be done to use it. To go back to
- the previous &quot;silent death&quot; method, simply include
- <code>&lt;exception&gt;</code> and <code>&lt;cstdlib&gt;</code>,
- and call
- </p>
- <pre>
- std::set_terminate(std::abort);</pre>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<p>
- This function will attempt to write to stderr. If your application
- closes stderr or redirects it to an inappropriate location,
- <code>__verbose_terminate_handler</code> will behave in an
- unspecified manner.
-</p>
-
-<hr />
-<h2><a name="5">Dynamic memory management</a></h2>
- <p>There are six flavors each of <code>new</code> and
- <code>delete</code>, so make certain that you're using the right
- ones! Here are quickie descriptions of <code>new</code>:
- </p>
- <ul>
- <li>single object form, throwing a <code>bad_alloc</code> on errors;
- this is what most people are used to using</li>
- <li>single object &quot;nothrow&quot; form, returning NULL on errors</li>
- <li>array new, throwing <code>bad_alloc</code> on errors</li>
- <li>array nothrow new, returning NULL on errors</li>
- <li>placement new, which does nothing (like it's supposed to)</li>
- <li>placement array new, which also does nothing</li>
- </ul>
- <p>They are distinguished by the parameters that you pass to them, like
- any other overloaded function. The six flavors of <code>delete</code>
- are distinguished the same way, but none of them are allowed to throw
- an exception under any circumstances anyhow. (They match up for
- completeness' sake.)
- </p>
- <p>Remember that it is perfectly okay to call <code>delete</code> on a
- NULL pointer! Nothing happens, by definition. That is not the
- same thing as deleting a pointer twice.
- </p>
- <p>By default, if one of the &quot;throwing <code>new</code>s&quot; can't
- allocate the memory requested, it tosses an instance of a
- <code>bad_alloc</code> exception (or, technically, some class derived
- from it). You can change this by writing your own function (called a
- new-handler) and then registering it with <code>set_new_handler()</code>:
- </p>
- <pre>
- typedef void (*PFV)(void);
-
- static char* safety;
- static PFV old_handler;
-
- void my_new_handler ()
- {
- delete[] safety;
- popup_window ("Dude, you are running low on heap memory. You
- should, like, close some windows, or something.
- The next time you run out, we're gonna burn!");
- set_new_handler (old_handler);
- return;
- }
-
- int main ()
- {
- safety = new char[500000];
- old_handler = set_new_handler (&amp;my_new_handler);
- ...
- }
- </pre>
- <p><code>bad_alloc</code> is derived from the base <code>exception</code>
- class defined in Chapter 19.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="6">RTTI, the ABI, and demangling</a></h2>
- <p>If you have read the <a href="../documentation.html#4">source
- documentation</a> for <code> namespace abi </code> then you are aware
- of the cross-vendor C++ ABI which we use. One of the exposed
- functions is the one which we use for demangling in programs like
- <code>c++filt</code>, and you can use it yourself as well.
- </p>
- <p>(The function itself might use different demanglers, but that's the
- whole point of abstract interfaces. If we change the implementation,
- you won't notice.)
- </p>
- <p>Probably the only times you'll be interested in demangling at runtime
- are when you're seeing <code>typeid</code> strings in RTTI, or when
- you're handling the runtime-support exception classes. For example:
- </p>
- <pre>
-#include &lt;exception&gt;
-#include &lt;iostream&gt;
-#include &lt;cxxabi.h&gt;
-
-struct empty { };
-
-template &lt;typename T, int N&gt;
- struct bar { };
-
-
-int main()
-{
- int status;
- char *realname;
-
- // exception classes not in &lt;stdexcept&gt;, thrown by the implementation
- // instead of the user
- std::bad_exception e;
- realname = abi::__cxa_demangle(e.what(), 0, 0, &amp;status);
- std::cout &lt;&lt; e.what() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
- free(realname);
-
-
- // typeid
- bar&lt;empty,17&gt; u;
- const std::type_info &amp;ti = typeid(u);
-
- realname = abi::__cxa_demangle(ti.name(), 0, 0, &amp;status);
- std::cout &lt;&lt; ti.name() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
- free(realname);
-
- return 0;
-}</pre>
- <p>With GCC 3.1 and later, this prints
- </p>
- <pre>
- St13bad_exception =&gt; std::bad_exception : 0
- 3barI5emptyLi17EE =&gt; bar&lt;empty, 17&gt; : 0 </pre>
- <p>The demangler interface is described in the source documentation
- linked to above. It is actually written in C, so you don't need to
- 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>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html
deleted file mode 100644
index 7bf44c641f0..00000000000
--- a/libstdc++-v3/docs/html/19_diagnostics/howto.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 19." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 19: Diagnostics</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../18_support/howto.html" type="text/html"
- title="Library Support" />
-<link rel="Next" href="../20_util/howto.html" type="text/html"
- title="General Utilities" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 19: Diagnostics</a></h1>
-
-<p>Chapter 19 deals with program diagnostics, such as exceptions
- and assertions. You know, all the things we wish weren't even
- necessary at all.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Adding data to exceptions</a></li>
- <li><a href="#2">Exception class hierarchy diagram</a></li>
- <li><a href="#3">Concept checkers -- <strong>new and improved!</strong></a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Adding data to exceptions</a></h2>
- <p>The standard exception classes carry with them a single string as
- data (usually describing what went wrong or where the 'throw' took
- place). It's good to remember that you can add your own data to
- these exceptions when extending the hierarchy:
- </p>
- <pre>
- struct My_Exception : public std::runtime_error
- {
- public:
- My_Exception (const string&amp; whatarg)
- : std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { }
- int errno_at_time_of_throw() const { return e; }
- DBID id_of_thing_that_threw() const { return id; }
- protected:
- int e;
- DBID id; // some user-defined type
- };
- </pre>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Exception class hierarchy diagram</a></h2>
- <p>At one point we were going to make up a PDF of the exceptions
- hierarchy, akin to the one done for the I/O class hierarchy.
- Time was our enemy. Since then we've moved to Doxygen, which has
- the useful property of not sucking. Specifically, when the source
- code is changed, the diagrams are automatically brought up to date.
- For the old way, we had to update the diagrams separately.
- </p>
- <p>There are several links to the Doxygen-generated pages from
- <a href="../documentation.html">here</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Concept checkers -- <strong>new and improved!</strong></a></h2>
- <p>Better taste! Less fat! Literally!</p>
- <p>In 1999, SGI added <em>concept checkers</em> to their implementation
- of the STL: code which checked the template parameters of
- instantiated pieces of the STL, in order to insure that the parameters
- being used met the requirements of the standard. For example,
- the Standard requires that types passed as template parameters to
- <code>vector</code> be &quot;Assignable&quot; (which means what you think
- it means). The checking was done during compilation, and none of
- the code was executed at runtime.
- </p>
- <p>Unfortunately, the size of the compiler files grew significantly
- as a result. The checking code itself was cumbersome. And bugs
- were found in it on more than one occasion.
- </p>
- <p>The primary author of the checking code, Jeremy Siek, had already
- started work on a replacement implementation. The new code has been
- formally reviewed and accepted into
- <a href="http://www.boost.org/libs/concept_check/concept_check.htm">the
- Boost libraries</a>, and we are pleased to incorporate it into the
- GNU C++ library.
- </p>
- <p>The new version imposes a much smaller space overhead on the generated
- object file. The checks are also cleaner and easier to read and
- understand.
- </p>
- <p>They are off by default for all versions of GCC from 3.0 to 3.4 (the
- latest release at the time of writing).
- They can be enabled at configure time with
- <a href="../configopts.html"><code>--enable-concept-checks</code></a>.
- You can enable them on a per-translation-unit basis with
- <code>#define _GLIBCXX_CONCEPT_CHECKS</code> for GCC 3.4 and higher
- (or with <code>#define _GLIBCPP_CONCEPT_CHECKS</code> for versions
- 3.1, 3.2 and 3.3).
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/20_util/allocator.html b/libstdc++-v3/docs/html/20_util/allocator.html
deleted file mode 100644
index d847fc0afc9..00000000000
--- a/libstdc++-v3/docs/html/20_util/allocator.html
+++ /dev/null
@@ -1,528 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards) and bkoz@gcc.gnu.org (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="c++, libstdc++, g++, allocator, memory" />
- <meta name="DESCRIPTION" content="Allocators and allocation" />
- <meta name="GENERATOR" content="emacs and ten fingers" />
- <title>Allocators and allocation</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html"
- title="General Utilities" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Allocators and allocation</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/20_util/allocator.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/20_util/allocator.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<p> The C++ Standard encapsulates memory management characteristics
- for strings, container classes, and parts of iostreams in a
- template class called <code>std::allocator</code>.
-</p>
-
-<h3 class="left">
- <a name="standard_requirements">Standard requirements</a>
-</h3>
- <p>The C++ standard only gives a few directives in this area:
- </p>
- <ul>
- <li>When you add elements to a container, and the container must allocate
- more memory to hold them, the container makes the request via its
- <code>Allocator</code> template parameter. This includes adding
- chars to the string class, which acts as a regular STL container
- in this respect.
- </li>
- <li>The default <code>Allocator</code> of every container-of-T is
- <code>std::allocator&lt;T&gt;</code>.
- </li>
- <li>The interface of the <code>allocator&lt;T&gt;</code> class is
- extremely simple. It has about 20 public declarations (nested
- typedefs, member functions, etc), but the two which concern us most
- are:
- <pre>
- T* allocate (size_type n, const void* hint = 0);
- void deallocate (T* p, size_type n);</pre>
- (This is a simplification; the real signatures use nested typedefs.)
- The <code>&quot;n&quot;</code> arguments in both those functions is a
- <em>count</em> of the number of T's to allocate space for,
- <em>not their total size</em>.
- </li>
- <li>&quot;The storage is obtained by calling
- <code>::operator new(size_t)</code>, but it is unspecified when or
- how often this function is called. The use of <code>hint</code>
- is unspecified, but intended as an aid to locality if an
- implementation so desires.&quot; [20.4.1.1]/6
- </li>
- </ul>
-
- <p> Complete details cam be found in the C++ standard, look in
- [20.4 Memory].
- </p>
-
-<h3 class="left">
- <a name="probs_possibilities">Problems and Possibilities</a>
-</h3>
- <p>The easiest way of fulfilling the requirements is to call operator new
- each time a container needs memory, and to call operator delete each
- time the container releases memory. <strong>BUT</strong>
- <a href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html">this
- method is horribly slow</a>.
- </p>
- <p>Or we can keep old memory around, and reuse it in a pool to save time.
- The old libstdc++-v2 used a memory pool, and so do we. As of 3.0,
- <a href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00136.html">it's
- on by default</a>. The pool is shared among all the containers in the
- program: when your program's std::vector&lt;int&gt; gets cut in half
- and frees a bunch of its storage, that memory can be reused by the
- private std::list&lt;WonkyWidget&gt; brought in from a KDE library
- that you linked against. And we don't have to call operators new and
- delete to pass the memory on, either, which is a speed bonus.
- <strong>BUT</strong>...
- </p>
- <p>What about threads? No problem: in a threadsafe environment, the
- memory pool is manipulated atomically, so you can grow a container in
- one thread and shrink it in another, etc. <strong>BUT</strong> what
- if threads in libstdc++-v3 aren't set up properly?
- <a href="../faq/index.html#5_6">That's been answered already</a>.
- </p>
- <p><strong>BUT</strong> what if you want to use your own allocator? What
- if you plan on using a runtime-loadable version of malloc() which uses
- shared telepathic anonymous mmap'd sections serializable over a
- network, so that memory requests <em>should</em> go through malloc?
- And what if you need to debug it?
- </p>
-
-<h3 class="left">
- <a name="stdallocator">Implementation details of <code>std::allocator</code></a>
-</h3>
- <p> The implementation of <code> std::allocator</code> has continued
- to evolve through successive releases. Here's a brief history.
- </p>
-
-<h5 class="left">
- <a name="30allocator"> 3.0, 3.1, 3.2, 3.3 </a>
-</h5>
- <p> During this period, all allocators were written to the SGI
- style, and all STL containers expected this interface. This
- interface had a traits class called <code>_Alloc_traits</code> that
- attempted to provide more information for compile-time allocation
- selection and optimization. This traits class had another allocator
- wrapper, <code>__simple_alloc&lt;T,A&gt;</code>, which was a
- wrapper around another allocator, A, which itself is an allocator
- for instances of T. But wait, there's more:
- <code>__allocator&lt;T,A&gt;</code> is another adapter. Many of
- the provided allocator classes were SGI style: such classes can be
- changed to a conforming interface with this wrapper:
- <code>__allocator&lt;T, __alloc&gt;</code> is thus the same as
- <code>allocator&lt;T&gt;</code>.
- </p>
-
- <p> The class <code>std::allocator</code> use the typedef
- <code>__alloc</code> to select an underlying allocator that
- satisfied memory allocation requests. The selection of this
- underlying allocator was not user-configurable.
- </p>
-
-<h5 class="left">
- <a name="34allocator"> 3.4 </a>
-</h5>
- <p> For this and later releases, 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
- been modified to support this change. Because of this,
- <code>__simple_alloc, __allocator, __alloc, </code> and <code>
- _Alloc_traits</code> have all been removed.
- </p>
-
- <p> The class <code>std::allocator</code> just has typedef,
- constructor, and rebind members. It inherits from one of the
- high-speed extension allocators, covered below. Thus, all
- allocation and deallocation depends on the base class.
- </p>
-
- <p> The base class that <code>std::allocator</code> is derived from
- is not user-configurable.
- </p>
-
-<h5 class="left">
- <a name="benchmarks"> How the default allocation strategy is selected.</a>
-</h5>
- <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
- for speed.
- </p>
-
- <p> Three synthetic benchmarks have been created that provide data
- that is used to compare different C++ allocators. These tests are:
- </p>
-
- <ul>
- <li>Insertion. Over multiple iterations, various STL container
- objects have elements inserted to some maximum amount. A variety
- of allocators are tested.
- Test source <a
- href="http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/testsuite/performance/20_util/allocator/insert.cc?only_with_tag=MAIN">here.</a>
- </li>
-
- <li>Insertion, clear, and re-insertion in a multi-threaded
- environment. Over multiple iterations, several threads are
- started that insert elements into a STL container, then assign a
- null instance of the same type to clear memory, and then
- re-insert the same number of elements. Several STL containers and
- multiple allocators are tested. This test shows the ability of
- the allocator to reclaim memory on a pre-thread basis, as well as
- measuring thread contention for memory resources.
- Test source
- <a href="http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/testsuite/performance/20_util/allocator/insert_insert.cc">
- here.</a>
- </li>
-
- <li>A threaded producer/consumer model.
- Test source
- <a href="http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/testsuite/performance/20_util/allocator/producer_consumer.cc">
- here.</a>
- </li>
- </ul>
-
-<h5 class="left">
- <a name="forcenew"> Disabling memory caching.</a>
-</h5>
- <p> In use, <code>std::allocator</code> may allocate and deallocate
- using implementation-specified strategies and heuristics. Because of
- this, every call to an allocator object's <code> allocate</code>
- member function may not actually call the global operator new. This
- situation is also duplicated for calls to the <code>
- deallocate</code> member function.
- </p>
-
- <p> This can be confusing.
- </p>
-
- <p> In particular, this can make debugging memory errors more
- difficult, especially when using third party tools like valgrind or
- debug versions of <code> new</code>.
- </p>
-
- <p> There are various ways to solve this problem. One would be to
- use a custom allocator that just called operators <code> new
- </code> and <code> delete</code> directly, for every
- allocation. (See include/ext/new_allocator.h, for instance.)
- However, that option would involve changing source code to use the a
- non-default allocator. Another option is to force the default
- allocator to remove caching and pools, and to directly allocate
- with every call of <code> allocate</code> and directly deallocate
- with every call of <code> deallocate</code>, regardless of
- efficiency. As it turns out, this last option is available,
- although the exact mechanism has evolved with time.
- </p>
-
- <p> For GCC releases from 2.95 through the 3.1 series, defining
- <code>__USE_MALLOC</code> on the gcc command line would change the
- default allocation strategy to instead use <code> malloc</code> and
- <code> free</code>. See
- <a href="../23_containers/howto.html#3">this note</a>
- for details as to why this was something needing improvement.
- </p>
-
- <p>Starting with GCC 3.2, and continued in the 3.3 series, to
- globally disable memory caching within the library for the
- default allocator, merely set GLIBCPP_FORCE_NEW (at this time,
- with any value) in the system's environment before running the
- program. If your program crashes with GLIBCPP_FORCE_NEW in the
- environment, it likely means that you linked against objects
- built against the older library. Code to support this extension
- is fully compatible with 3.2 code if GLIBCPP_FORCE_NEW is not in
- the environment.
- </p>
-
- <p> As it turns out, the 3.4 code base continues to use this
- mechanism, only the environment variable has been changed to
- GLIBCXX_FORCE_NEW.
- </p>
-
-<h3 class="left">
- <a name="ext_allocators">Other allocators</a>
-</h3>
- <p> Several other allocators are provided as part of this
- implementation. The location of the extension allocators and their
- names have changed, but in all cases, functionality is
- equivalent. Starting with gcc-3.4, all extension allocators are
- standard style. Before this point, SGI style was the norm. Because of
- this, the number of template arguments also changed. Here's a simple
- chart to track the changes.
- </p>
-
-<table title="extension allocators" border="1">
- <tr>
- <th>Allocator (3.4)</th>
- <th>Header (3.4)</th>
- <th>Allocator (3.[0-3])</th>
- <th>Header (3.[0-3])</th>
- </tr>
- <tr>
- <td>__gnu_cxx::new_allocator&lt;T&gt;</td>
- <td>&lt;ext/new_allocator.h&gt;</td>
- <td>std::__new_alloc</td>
- <td>&lt;memory&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::malloc_allocator&lt;T&gt;</td>
- <td>&lt;ext/malloc_allocator.h&gt;</td>
- <td>std::__malloc_alloc_template&lt;int&gt;</td>
- <td>&lt;memory&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::debug_allocator&lt;T&gt;</td>
- <td>&lt;ext/debug_allocator.h&gt;</td>
- <td>std::debug_alloc&lt;T&gt;</td>
- <td>&lt;memory&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::__pool_alloc&lt;T&gt;</td>
- <td>&lt;ext/pool_allocator.h&gt;</td>
- <td>std::__default_alloc_template&lt;bool,int&gt;</td>
- <td>&lt;memory&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::__mt_alloc&lt;T&gt;</td>
- <td>&lt;ext/mt_allocator.h&gt;</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>__gnu_cxx::bitmap_allocator&lt;T&gt;</td>
- <td>&lt;ext/bitmap_allocator.h&gt;</td>
- <td></td>
- <td></td>
- </tr>
-</table>
-
- <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>
-
-<table title="more extension allocators" border="1">
- <tr>
- <th>Allocator</th>
- <th>Include</th>
- <th>Version</th>
- </tr>
- <tr>
- <td>__gnu_cxx::array_allocator&lt;T&gt;</td>
- <td>&lt;ext/array_allocator.h&gt;</td>
- <td>4.0.0</td>
- </tr>
-</table>
-
- <p>More details on each of these extension allocators follows. </p>
- <ul>
- <li><code>new_allocator</code>
- <p>Simply wraps <code>::operator new</code>
- and <code>::operator delete</code>.
- </p>
- </li>
- <li><code>malloc_allocator</code>
- <p>Simply wraps
- <code>malloc</code> and <code>free</code>. There is also a hook
- for an out-of-memory handler (for new/delete this is taken care of
- elsewhere).
- </p>
- </li>
- <li><code>array_allocator</code>
- <p>Allows allocations of known and fixed sizes using existing
- global or external storage allocated via construction of
- std::tr1::array objects. By using this allocator, fixed size
- containers (including std::string) can be used without
- instances calling <code>::operator new</code> and
- <code>::operator delete</code>. This capability allows the
- use of STL abstractions without runtime complications or
- overhead, even in situations such as program startup. For
- usage examples, please consult the libstdc++ testsuite.
- </p>
- </li>
- <li><code>debug_allocator</code>
- <p> A wrapper around an
- arbitrary allocator A. It passes on slightly increased size
- requests to A, and uses the extra memory to store size information.
- When a pointer is passed to <code>deallocate()</code>, the stored
- size is checked, and assert() is used to guarantee they match.
- </p>
- </li>
- <li><code>__pool_alloc</code>
- <p> A high-performance, single pool allocator. The reusable
- memory is shared among identical instantiations of this type.
- It calls through <code>::operator new</code> to obtain new memory
- when its lists run out. If a client container requests a block
- larger than a certain threshold size, then the pool is bypassed,
- and the allocate/deallocate request is passed to
- <code>::operator new</code> directly. </p>
-
- <p> For versions of <code>__pool_alloc</code> after 3.4.0, there is
- only one template parameter, as per the standard.
- </p>
-
- <p> Older versions of this class take a boolean template parameter,
- called <code>thr</code>, and an integer template parameter,
- called <code>inst</code>.
- </p>
-
- <p>The <code>inst</code> number is used to track additional memory
- pools. The point of the number is to allow multiple
- instantiations of the classes without changing the semantics at
- all. All three of
- </p>
-
- <pre>
- typedef __pool_alloc&lt;true,0&gt; normal;
- typedef __pool_alloc&lt;true,1&gt; private;
- typedef __pool_alloc&lt;true,42&gt; also_private;</pre>
- <p>behave exactly the same way. However, the memory pool for each type
- (and remember that different instantiations result in different types)
- remains separate.
- </p>
- <p>The library uses <strong>0</strong> in all its instantiations. If you
- wish to keep separate free lists for a particular purpose, use a
- different number.
- </p>
- <p>The <code>thr</code> boolean determines whether the pool should
- be manipulated atomically or not. When thr=true, the allocator
- is is threadsafe, while thr=false, and is slightly faster but
- unsafe for multiple threads.
- </p>
-
- <p>For thread-enabled configurations, the pool is locked with a
- single big lock. In some situations, this implementation detail may
- result in severe performance degredation.
- </p>
-
- <p>(Note that the GCC thread abstraction layer allows us to provide safe
- zero-overhead stubs for the threading routines, if threads were
- disabled at configuration time.)
- </p>
-
- </li>
-
- <li><code>__mt_alloc</code>
- <p>A high-performance
- fixed-size allocator. It has its own documentation, found <a
- href="../ext/mt_allocator.html">here</a>.
- </p>
- </li>
-
- <li><code>bitmap_allocator</code>
- <p>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
- href="../ext/ballocator_doc.html">here</a>.
- </p>
- </li>
- </ul>
-
-
-<h3 class="left">
- <a name="using_custom_allocators">Using a specific allocator</a>
-</h3>
- <p>You can specify different memory management schemes on a
- per-container basis, by overriding the default
- <code>Allocator</code> template parameter. For example, an easy
- (but non-portable) method of specifying that only malloc/free
- should be used instead of the default node allocator is:
- </p>
- <pre>
- std::list &lt;int, __gnu_cxx::malloc_allocator&lt;int&gt; &gt; malloc_list;</pre>
- Likewise, a debugging form of whichever allocator is currently in use:
- <pre>
- std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque;</pre>
-
-
-<h3 class="left">
- <a name="custom_allocators">Writing custom allocators</a>
-</h3>
- <p> Writing a portable C++ allocator would dictate that the
- interface would look much like the one specified for <code>
- std::allocator</code>. Additional member functions, but not
- subtractions, would be permissible.
- </p>
-
- <p> Probably the best place to start would be to copy one of the
- extension allocators already shipped with libstdc++: say, <code>
- new_allocator </code>.
- </p>
-
-
-<h3 class="left">
- <a name="biblio">Bibliography / Further Reading</a>
-</h3>
- <p>
- ISO/IEC 14882:1998 Programming languages - C++ [20.4 Memory]
- </p>
-
- <p>
- Austern, Matt, C/C++ Users Journal.
- <a href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/">The Standard Librarian: What Are Allocators Good
- For?</a>
- </p>
-
- <p>
- Berger, Emery,
- <a href="http://www.cs.umass.edu/~emery/hoard/"> The Hoard memory allocator </a>
- </p>
-
- <p>
- Berger, Emery with Ben Zorn & Kathryn McKinley, OOPSLA 2002
- <a href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf">Reconsidering Custom Memory Allocation</a>
- </p>
-
- <p>
- Kreft, Klaus and Angelika Langer, C++ Report, June 1998
- <a href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html">Allocator Types</a>
- </p>
-
- <p>
- Stroustrup, Bjarne, 19.4 Allocators, The C++ Programming
- Language, Special Edition, Addison Wesley, Inc. 2000
- </p>
-
- <p>
- Yen, Felix, <a href="http://home.earthlink.net/~brimar/yalloc/">Yalloc: A Recycling C++ Allocator</a>
- </p>
-
-<hr />
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/20_util/howto.html b/libstdc++-v3/docs/html/20_util/howto.html
deleted file mode 100644
index 4c404595a47..00000000000
--- a/libstdc++-v3/docs/html/20_util/howto.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 20." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 20: General Utilities</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../19_diagnostics/howto.html" type="text/html"
- title="Diagnostics" />
-<link rel="Next" href="../21_strings/howto.html" type="text/html"
- title="Strings" />
-<link rel="Bookmark" href="allocator.html" type="text/html"
- title="Allocators and allocation" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 20: General Utilities</a></h1>
-
-<p>Chapter 20 deals with utility classes and functions, such as
- the oft-debated <code>auto_ptr&lt;&gt;</code>.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1"><code>auto_ptr</code> is not omnipotent</a></li>
- <li><a href="#2"><code>auto_ptr</code> inside container classes</a></li>
- <li><a href="#3">Functors</a></li>
- <li><a href="#4">Pairs</a></li>
- <li><a href="#5">Memory allocators</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1"><code>auto_ptr</code> is not omnipotent</a></h2>
- <p>I'm not going to try and explain all of the fun and delicious
- things that can happen with misuse of the auto_ptr class template
- (called AP here), nor am I going to try and teach you how to use
- AP safely in the presence of copying. The AP class is a really
- nifty idea for a smart pointer, but it is one of the dumbest of
- all the smart pointers -- and that's fine.
- </p>
- <p>AP is not meant to be a supersmart solution to all resource
- leaks everywhere. Neither is it meant to be an effective form
- of garbage collection (although it can help, a little bit).
- And it can <em>not</em> be used for arrays!
- </p>
- <p>AP <em>is</em> meant to prevent nasty leaks in the presence of
- exceptions. That's <em>all</em>. This code is AP-friendly:
- </p>
- <pre>
- // not a recommend naming scheme, but good for web-based FAQs
- typedef std::auto_ptr&lt;MyClass&gt; APMC;
-
- extern function_taking_MyClass_pointer (MyClass*);
- extern some_throwable_function ();
-
- void func (int data)
- {
- APMC ap (new MyClass(data));
-
- some_throwable_function(); // this will throw an exception
-
- function_taking_MyClass_pointer (ap.get());
- }
- </pre>
- <p>When an exception gets thrown, the instance of MyClass that's
- been created on the heap will be <code>delete</code>'d as the stack is
- unwound past <code>func()</code>.
- </p>
- <p>Changing that code as follows is <em>not</em> AP-friendly:
- </p>
- <pre>
- APMC ap (new MyClass[22]);
- </pre>
- <p>You will get the same problems as you would without the use
- of AP:
- </p>
- <pre>
- char* array = new char[10]; // array new...
- ...
- delete array; // ...but single-object delete
- </pre>
- <p>AP cannot tell whether the pointer you've passed at creation points
- to one or many things. If it points to many things, you are about
- to die. AP is trivial to write, however, so you could write your
- own <code>auto_array_ptr</code> for that situation (in fact, this has
- been done many times; check the mailing lists, Usenet, Boost, etc).
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2"><code>auto_ptr</code> inside container classes</a></h2>
- <p>All of the <a href="../23_containers/howto.html">containers</a>
- described in the standard library require their contained types
- to have, among other things, a copy constructor like this:
- </p>
- <pre>
- struct My_Type
- {
- My_Type (My_Type const&amp;);
- };
- </pre>
- <p>Note the const keyword; the object being copied shouldn't change.
- The template class <code>auto_ptr</code> (called AP here) does not
- meet this requirement. Creating a new AP by copying an existing
- one transfers ownership of the pointed-to object, which means that
- the AP being copied must change, which in turn means that the
- copy ctors of AP do not take const objects.
- </p>
- <p>The resulting rule is simple: <em>Never ever use a container of
- auto_ptr objects.</em> The standard says that &quot;undefined&quot;
- behavior is the result, but it is guaranteed to be messy.
- </p>
- <p>To prevent you from doing this to yourself, the
- <a href="../19_diagnostics/howto.html#3">concept checks</a> built
- in to this implementation will issue an error if you try to
- compile code like this:
- </p>
- <pre>
- #include &lt;vector&gt;
- #include &lt;memory&gt;
-
- void f()
- {
- std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int;
- }
- </pre>
- <p>Should you try this with the checks enabled, you will see an error.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Functors</a></h2>
- <p>If you don't know what functors are, you're not alone. Many people
- get slightly the wrong idea. In the interest of not reinventing
- the wheel, we will refer you to the introduction to the functor
- concept written by SGI as part of their STL, in
- <a href="http://www.sgi.com/tech/stl/functors.html">their
- http://www.sgi.com/tech/stl/functors.html</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">Pairs</a></h2>
- <p>The <code>pair&lt;T1,T2&gt;</code> is a simple and handy way to
- carry around a pair of objects. One is of type T1, and another of
- type T2; they may be the same type, but you don't get anything
- extra if they are. The two members can be accessed directly, as
- <code>.first</code> and <code>.second</code>.
- </p>
- <p>Construction is simple. The default ctor initializes each member
- with its respective default ctor. The other simple ctor,
- </p>
- <pre>
- pair (const T1&amp; x, const T2&amp; y);
- </pre>
- <p>does what you think it does, <code>first</code> getting <code>x</code>
- and <code>second</code> getting <code>y</code>.
- </p>
- <p>There is a copy constructor, but it requires that your compiler
- handle member function templates:
- </p>
- <pre>
- template &lt;class U, class V&gt; pair (const pair&lt;U,V&gt;&amp; p);
- </pre>
- <p>The compiler will convert as necessary from U to T1 and from
- V to T2 in order to perform the respective initializations.
- </p>
- <p>The comparison operators are done for you. Equality
- of two <code>pair&lt;T1,T2&gt;</code>s is defined as both <code>first</code>
- members comparing equal and both <code>second</code> members comparing
- equal; this simply delegates responsibility to the respective
- <code>operator==</code> functions (for types like MyClass) or builtin
- comparisons (for types like int, char, etc).
- </p>
- <p><a name="pairlt">
- The less-than operator is a bit odd the first time you see it. It
- is defined as evaluating to:
- </a>
- </p>
- <pre>
- x.first &lt; y.first ||
- ( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second )
- </pre>
- <p>The other operators are not defined using the <code>rel_ops</code>
- functions above, but their semantics are the same.
- </p>
- <p>Finally, there is a template function called <code>make_pair</code>
- that takes two references-to-const objects and returns an
- instance of a pair instantiated on their respective types:
- </p>
- <pre>
- pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
- </pre>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="5">Memory allocators</a></h2>
- <p>The available free store (&quot;heap&quot;) management classes are
- described <a href="allocator.html">here</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/21_strings/gotw29a.txt b/libstdc++-v3/docs/html/21_strings/gotw29a.txt
deleted file mode 100644
index 9326604855e..00000000000
--- a/libstdc++-v3/docs/html/21_strings/gotw29a.txt
+++ /dev/null
@@ -1,159 +0,0 @@
-From: herbs@cntc.com (Herb Sutter)
-Subject: Guru of the Week #29: Solution
-Date: 22 Jan 1998 00:00:00 GMT
-Message-ID: <6a8q26$9qa@netlab.cs.rpi.edu>
-Newsgroups: comp.lang.c++.moderated
-
-
- .--------------------------------------------------------------------.
- | Guru of the Week problems and solutions are posted regularly on |
- | news:comp.lang.c++.moderated. For past problems and solutions |
- | see the GotW archive at http://www.cntc.com. |
- | Is there a topic you'd like to see covered? mailto:herbs@cntc.com |
- `--------------------------------------------------------------------'
-_______________________________________________________
-
-GotW #29: Strings
-
-Difficulty: 7 / 10
-_______________________________________________________
-
-
->Write a ci_string class which is identical to the
->standard 'string' class, but is case-insensitive in the
->same way as the C function stricmp():
-
-The "how can I make a case-insensitive string?"
-question is so common that it probably deserves its own
-FAQ -- hence this issue of GotW.
-
-Note 1: The stricmp() case-insensitive string
-comparison function is not part of the C standard, but
-it is a common extension on many C compilers.
-
-Note 2: What "case insensitive" actually means depends
-entirely on your application and language. For
-example, many languages do not have "cases" at all, and
-for languages that do you have to decide whether you
-want accented characters to compare equal to unaccented
-characters, and so on. This GotW provides guidance on
-how to implement case-insensitivity for standard
-strings in whatever sense applies to your particular
-situation.
-
-
-Here's what we want to achieve:
-
-> ci_string s( "AbCdE" );
->
-> // case insensitive
-> assert( s == "abcde" );
-> assert( s == "ABCDE" );
->
-> // still case-preserving, of course
-> assert( strcmp( s.c_str(), "AbCdE" ) == 0 );
-> assert( strcmp( s.c_str(), "abcde" ) != 0 );
-
-The key here is to understand what a "string" actually
-is in standard C++. If you look in your trusty string
-header, you'll see something like this:
-
- typedef basic_string<char> string;
-
-So string isn't really a class... it's a typedef of a
-template. In turn, the basic_string<> template is
-declared as follows, in all its glory:
-
- template<class charT,
- class traits = char_traits<charT>,
- class Allocator = allocator<charT> >
- class basic_string;
-
-So "string" really means "basic_string<char,
-char_traits<char>, allocator<char> >". We don't need
-to worry about the allocator part, but the key here is
-the char_traits part because char_traits defines how
-characters interact and compare(!).
-
-basic_string supplies useful comparison functions that
-let you compare whether a string is equal to another,
-less than another, and so on. These string comparisons
-functions are built on top of character comparison
-functions supplied in the char_traits template. In
-particular, the char_traits template supplies character
-comparison functions named eq(), ne(), and lt() for
-equality, inequality, and less-than comparisons, and
-compare() and find() functions to compare and search
-sequences of characters.
-
-If we want these to behave differently, all we have to
-do is provide a different char_traits template! Here's
-the easiest way:
-
- struct ci_char_traits : public char_traits<char>
- // just inherit all the other functions
- // that we don't need to override
- {
- static bool eq( char c1, char c2 ) {
- return tolower(c1) == tolower(c2);
- }
-
- static bool ne( char c1, char c2 ) {
- return tolower(c1) != tolower(c2);
- }
-
- static bool lt( char c1, char c2 ) {
- return tolower(c1) < tolower(c2);
- }
-
- static int compare( const char* s1,
- const char* s2,
- size_t n ) {
- return strnicmp( s1, s2, n );
- // if available on your compiler,
- // otherwise you can roll your own
- }
-
- static const char*
- find( const char* s, int n, char a ) {
- while( n-- > 0 && tolower(*s) != tolower(a) ) {
- ++s;
- }
- return n >= 0 ? s : 0;
- }
- };
-
-[N.B. A bug in the original code has been fixed for the
-GCC documentation, the corrected code was taken from
-Herb Sutter's book, Exceptional C++]
-
-And finally, the key that brings it all together:
-
- typedef basic_string<char, ci_char_traits> ci_string;
-
-All we've done is created a typedef named "ci_string"
-which operates exactly like the standard "string",
-except that it uses ci_char_traits instead of
-char_traits<char> to get its character comparison
-rules. Since we've handily made the ci_char_traits
-rules case-insensitive, we've made ci_string itself
-case-insensitive without any further surgery -- that
-is, we have a case-insensitive string without having
-touched basic_string at all!
-
-This GotW should give you a flavour for how the
-basic_string template works and how flexible it is in
-practice. If you want different comparisons than the
-ones stricmp() and tolower() give you, just replace the
-five functions shown above with your own code that
-performs character comparisons the way that's
-appropriate in your particular application.
-
-
-
-Exercise for the reader:
-
-Is it safe to inherit ci_char_traits from
-char_traits<char> this way? Why or why not?
-
-
diff --git a/libstdc++-v3/docs/html/21_strings/howto.html b/libstdc++-v3/docs/html/21_strings/howto.html
deleted file mode 100644
index a35666739b2..00000000000
--- a/libstdc++-v3/docs/html/21_strings/howto.html
+++ /dev/null
@@ -1,478 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 21." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 21: Strings</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../20_util/howto.html" type="text/html"
- title="General Utilities" />
-<link rel="Next" href="../22_locale/howto.html" type="text/html"
- title="Localization" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 21: Strings</a></h1>
-
-<p>Chapter 21 deals with the C++ strings library (a welcome relief).
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">MFC's CString</a></li>
- <li><a href="#2">A case-insensitive string class</a></li>
- <li><a href="#3">Breaking a C++ string into tokens</a></li>
- <li><a href="#4">Simple transformations</a></li>
- <li><a href="#5">Making strings of arbitrary character types</a></li>
- <li><a href="#6">Shrink-to-fit strings</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">MFC's CString</a></h2>
- <p>A common lament seen in various newsgroups deals with the Standard
- string class as opposed to the Microsoft Foundation Class called
- CString. Often programmers realize that a standard portable
- answer is better than a proprietary nonportable one, but in porting
- their application from a Win32 platform, they discover that they
- are relying on special functions offered by the CString class.
- </p>
- <p>Things are not as bad as they seem. In
- <a href="http://gcc.gnu.org/ml/gcc/1999-04n/msg00236.html">this
- message</a>, Joe Buck points out a few very important things:
- </p>
- <ul>
- <li>The Standard <code>string</code> supports all the operations
- that CString does, with three exceptions.
- </li>
- <li>Two of those exceptions (whitespace trimming and case
- conversion) are trivial to implement. In fact, we do so
- on this page.
- </li>
- <li>The third is <code>CString::Format</code>, which allows formatting
- in the style of <code>sprintf</code>. This deserves some mention:
- </li>
- </ul>
- <p><a name="1.1internal"> <!-- Coming from Chapter 27 -->
- The old libg++ library had a function called form(), which did much
- the same thing. But for a Standard solution, you should use the
- stringstream classes. These are the bridge between the iostream
- hierarchy and the string class, and they operate with regular
- streams seamlessly because they inherit from the iostream
- hierarchy. An quick example:
- </a>
- </p>
- <pre>
- #include &lt;iostream&gt;
- #include &lt;string&gt;
- #include &lt;sstream&gt;
-
- string f (string&amp; incoming) // incoming is "foo N"
- {
- istringstream incoming_stream(incoming);
- string the_word;
- int the_number;
-
- incoming_stream &gt;&gt; the_word // extract "foo"
- &gt;&gt; the_number; // extract N
-
- ostringstream output_stream;
- output_stream &lt;&lt; "The word was " &lt;&lt; the_word
- &lt;&lt; " and 3*N was " &lt;&lt; (3*the_number);
-
- return output_stream.str();
- } </pre>
- <p>A serious problem with CString is a design bug in its memory
- allocation. Specifically, quoting from that same message:
- </p>
- <pre>
- CString suffers from a common programming error that results in
- poor performance. Consider the following code:
-
- CString n_copies_of (const CString&amp; foo, unsigned n)
- {
- CString tmp;
- for (unsigned i = 0; i &lt; n; i++)
- tmp += foo;
- return tmp;
- }
-
- This function is O(n^2), not O(n). The reason is that each +=
- causes a reallocation and copy of the existing string. Microsoft
- applications are full of this kind of thing (quadratic performance
- on tasks that can be done in linear time) -- on the other hand,
- we should be thankful, as it's created such a big market for high-end
- ix86 hardware. :-)
-
- If you replace CString with string in the above function, the
- performance is O(n).
- </pre>
- <p>Joe Buck also pointed out some other things to keep in mind when
- comparing CString and the Standard string class:
- </p>
- <ul>
- <li>CString permits access to its internal representation; coders
- who exploited that may have problems moving to <code>string</code>.
- </li>
- <li>Microsoft ships the source to CString (in the files
- MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation
- bug and rebuild your MFC libraries.
- <em><strong>Note:</strong> It looks like the CString shipped
- with VC++6.0 has fixed this, although it may in fact have been
- one of the VC++ SPs that did it.</em>
- </li>
- <li><code>string</code> operations like this have O(n) complexity
- <em>if the implementors do it correctly</em>. The libstdc++
- implementors did it correctly. Other vendors might not.
- </li>
- <li>While parts of the SGI STL are used in libstdc++-v3, their
- string class is not. The SGI <code>string</code> is essentially
- <code>vector&lt;char&gt;</code> and does not do any reference
- counting like libstdc++-v3's does. (It is O(n), though.)
- So if you're thinking about SGI's string or rope classes,
- you're now looking at four possibilities: CString, the
- libstdc++ string, the SGI string, and the SGI rope, and this
- is all before any allocator or traits customizations! (More
- choices than you can shake a stick at -- want fries with that?)
- </li>
- </ul>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">A case-insensitive string class</a></h2>
- <p>The well-known-and-if-it-isn't-well-known-it-ought-to-be
- <a href="http://www.gotw.ca/gotw/index.htm">Guru of the Week</a>
- discussions held on Usenet covered this topic in January of 1998.
- Briefly, the challenge was, &quot;write a 'ci_string' class which
- is identical to the standard 'string' class, but is
- case-insensitive in the same way as the (common but nonstandard)
- C function stricmp():&quot;
- </p>
- <pre>
- ci_string s( "AbCdE" );
-
- // case insensitive
- assert( s == "abcde" );
- assert( s == "ABCDE" );
-
- // still case-preserving, of course
- assert( strcmp( s.c_str(), "AbCdE" ) == 0 );
- assert( strcmp( s.c_str(), "abcde" ) != 0 ); </pre>
-
- <p>The solution is surprisingly easy. The original answer pages
- on the GotW website were removed into cold storage, in
- preparation for
- <a href="http://cseng.aw.com/bookpage.taf?ISBN=0-201-61562-2">a
- published book of GotW notes</a>. Before being
- put on the web, of course, it was posted on Usenet, and that
- posting containing the answer is <a href="gotw29a.txt">available
- here</a>.
- </p>
- <p>See? Told you it was easy!</p>
- <p><strong>Added June 2000:</strong> The May issue of <u>C++ Report</u>
- contains
- a fascinating article by Matt Austern (yes, <em>the</em> Matt Austern)
- on why case-insensitive comparisons are not as easy as they seem,
- and why creating a class is the <em>wrong</em> way to go about it in
- production code. (The GotW answer mentions one of the principle
- difficulties; his article mentions more.)
- </p>
- <p>Basically, this is &quot;easy&quot; only if you ignore some things,
- things which may be too important to your program to ignore. (I chose
- to ignore them when originally writing this entry, and am surprised
- that nobody ever called me on it...) The GotW question and answer
- remain useful instructional tools, however.
- </p>
- <p><strong>Added September 2000:</strong> James Kanze provided a link to a
- <a href="http://www.unicode.org/unicode/reports/tr21/">Unicode
- Technical Report discussing case handling</a>, which provides some
- very good information.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Breaking a C++ string into tokens</a></h2>
- <p>The Standard C (and C++) function <code>strtok()</code> leaves a lot to
- be desired in terms of user-friendliness. It's unintuitive, it
- destroys the character string on which it operates, and it requires
- you to handle all the memory problems. But it does let the client
- code decide what to use to break the string into pieces; it allows
- you to choose the &quot;whitespace,&quot; so to speak.
- </p>
- <p>A C++ implementation lets us keep the good things and fix those
- annoyances. The implementation here is more intuitive (you only
- call it once, not in a loop with varying argument), it does not
- affect the original string at all, and all the memory allocation
- is handled for you.
- </p>
- <p>It's called stringtok, and it's a template function. It's given
- <a href="stringtok_h.txt">in this file</a> in a less-portable form than
- it could be, to keep this example simple (for example, see the
- comments on what kind of string it will accept). The author uses
- a more general (but less readable) form of it for parsing command
- strings and the like. If you compiled and ran this code using it:
- </p>
- <pre>
- std::list&lt;string&gt; ls;
- stringtok (ls, " this \t is\t\n a test ");
- for (std::list&lt;string&gt;const_iterator i = ls.begin();
- i != ls.end(); ++i)
- {
- std::cerr &lt;&lt; ':' &lt;&lt; (*i) &lt;&lt; ":\n";
- } </pre>
- <p>You would see this as output:
- </p>
- <pre>
- :this:
- :is:
- :a:
- :test: </pre>
- <p>with all the whitespace removed. The original <code>s</code> is still
- available for use, <code>ls</code> will clean up after itself, and
- <code>ls.size()</code> will return how many tokens there were.
- </p>
- <p>As always, there is a price paid here, in that stringtok is not
- as fast as strtok. The other benefits usually outweigh that, however.
- <a href="stringtok_std_h.txt">Another version of stringtok is given
- here</a>, suggested by Chris King and tweaked by Petr Prikryl,
- and this one uses the
- transformation functions mentioned below. If you are comfortable
- with reading the new function names, this version is recommended
- as an example.
- </p>
- <p><strong>Added February 2001:</strong> Mark Wilden pointed out that the
- standard <code>std::getline()</code> function can be used with standard
- <a href="../27_io/howto.html">istringstreams</a> to perform
- tokenizing as well. Build an istringstream from the input text,
- and then use std::getline with varying delimiters (the three-argument
- signature) to extract tokens into a string.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">Simple transformations</a></h2>
- <p>Here are Standard, simple, and portable ways to perform common
- transformations on a <code>string</code> instance, such as &quot;convert
- to all upper case.&quot; The word transformations is especially
- apt, because the standard template function
- <code>transform&lt;&gt;</code> is used.
- </p>
- <p>This code will go through some iterations (no pun). Here's the
- simplistic version usually seen on Usenet:
- </p>
- <pre>
- #include &lt;string&gt;
- #include &lt;algorithm&gt;
- #include &lt;cctype&gt; // old &lt;ctype.h&gt;
-
- struct ToLower
- {
- char operator() (char c) const { return std::tolower(c); }
- };
-
- struct ToUpper
- {
- char operator() (char c) const { return std::toupper(c); }
- };
-
- int main()
- {
- std::string s ("Some Kind Of Initial Input Goes Here");
-
- // Change everything into upper case
- std::transform (s.begin(), s.end(), s.begin(), ToUpper());
-
- // Change everything into lower case
- std::transform (s.begin(), s.end(), s.begin(), ToLower());
-
- // Change everything back into upper case, but store the
- // result in a different string
- std::string capital_s;
- capital_s.resize(s.size());
- std::transform (s.begin(), s.end(), capital_s.begin(), ToUpper());
- } </pre>
- <p><span class="larger"><strong>Note</strong></span> that these calls all
- involve the global C locale through the use of the C functions
- <code>toupper/tolower</code>. This is absolutely guaranteed to work --
- but <em>only</em> if the string contains <em>only</em> characters
- from the basic source character set, and there are <em>only</em>
- 96 of those. Which means that not even all English text can be
- represented (certain British spellings, proper names, and so forth).
- So, if all your input forevermore consists of only those 96
- characters (hahahahahaha), then you're done.
- </p>
- <p><span class="larger"><strong>Note</strong></span> that the
- <code>ToUpper</code> and <code>ToLower</code> function objects
- are needed because <code>toupper</code> and <code>tolower</code>
- are overloaded names (declared in <code>&lt;cctype&gt;</code> and
- <code>&lt;locale&gt;</code>) so the template-arguments for
- <code>transform&lt;&gt;</code> cannot be deduced, as explained in
- <a href="http://gcc.gnu.org/ml/libstdc++/2002-11/msg00180.html">this
- message</a>. <!-- section 14.8.2.4 clause 16 in ISO 14882:1998
- if you're into that sort of thing -->
- At minimum, you can write short wrappers like
- </p>
- <pre>
- char toLower (char c)
- {
- return std::tolower(c);
- } </pre>
- <p>The correct method is to use a facet for a particular locale
- and call its conversion functions. These are discussed more in
- Chapter 22; the specific part is
- <a href="../22_locale/howto.html#7">Correct Transformations</a>,
- which shows the final version of this code. (Thanks to James Kanze
- for assistance and suggestions on all of this.)
- </p>
- <p>Another common operation is trimming off excess whitespace. Much
- like transformations, this task is trivial with the use of string's
- <code>find</code> family. These examples are broken into multiple
- statements for readability:
- </p>
- <pre>
- std::string str (" \t blah blah blah \n ");
-
- // trim leading whitespace
- string::size_type notwhite = str.find_first_not_of(" \t\n");
- str.erase(0,notwhite);
-
- // trim trailing whitespace
- notwhite = str.find_last_not_of(" \t\n");
- str.erase(notwhite+1); </pre>
- <p>Obviously, the calls to <code>find</code> could be inserted directly
- into the calls to <code>erase</code>, in case your compiler does not
- optimize named temporaries out of existence.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="5">Making strings of arbitrary character types</a></h2>
- <p>The <code>std::basic_string</code> is tantalizingly general, in that
- it is parameterized on the type of the characters which it holds.
- In theory, you could whip up a Unicode character class and instantiate
- <code>std::basic_string&lt;my_unicode_char&gt;</code>, or assuming
- that integers are wider than characters on your platform, maybe just
- declare variables of type <code>std::basic_string&lt;int&gt;</code>.
- </p>
- <p>That's the theory. Remember however that basic_string has additional
- type parameters, which take default arguments based on the character
- type (called CharT here):
- </p>
- <pre>
- template &lt;typename CharT,
- typename Traits = char_traits&lt;CharT&gt;,
- typename Alloc = allocator&lt;CharT&gt; &gt;
- class basic_string { .... };</pre>
- <p>Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right
- Thing by default, unless you need to implement your own allocator
- for your characters.
- </p>
- <p>But <code>char_traits</code> takes more work. The char_traits
- template is <em>declared</em> but not <em>defined</em>.
- That means there is only
- </p>
- <pre>
- template &lt;typename CharT&gt;
- struct char_traits
- {
- static void foo (type1 x, type2 y);
- ...
- };</pre>
- <p>and functions such as char_traits&lt;CharT&gt;::foo() are not
- actually defined anywhere for the general case. The C++ standard
- permits this, because writing such a definition to fit all possible
- CharT's cannot be done. (For a time, in earlier versions of GCC,
- there was a mostly-correct implementation that let programmers be
- lazy. :-) But it broke under many situations, so it was removed.
- You are no longer allowed to be lazy and non-portable.)
- </p>
- <p>The C++ standard also requires that char_traits be specialized for
- instantiations of <code>char</code> and <code>wchar_t</code>, and it
- is these template specializations that permit entities like
- <code>basic_string&lt;char,char_traits&lt;char&gt;&gt;</code> to work.
- </p>
- <p>If you want to use character types other than char and wchar_t,
- such as <code>unsigned char</code> and <code>int</code>, you will
- need to write specializations for them at the present time. If you
- want to use your own special character class, then you have
- <a href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00163.html">a lot
- of work to do</a>, especially if you with to use i18n features
- (facets require traits information but don't have a traits argument).
- </p>
- <p>One example of how to specialize char_traits is given <a
- href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00260.html">in
- this message</a>, which was then put into the file <code>
- include/ext/pod_char_traits.h</code> at a later date. We agree
- that the way it's used with basic_string (scroll down to main())
- doesn't look nice, but that's because <a
- href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00236.html">the
- nice-looking first attempt</a> turned out to <a
- href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00242.html">not
- be conforming C++</a>, due to the rule that CharT must be a POD.
- (See how tricky this is?)
- </p>
- <p>Other approaches were suggested in that same thread, such as providing
- more specializations and/or some helper types in the library to assist
- users writing such code. So far nobody has had the time...
- <a href="../17_intro/contribute.html">do you?</a>
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="6">Shrink-to-fit strings</a></h2>
- <!-- referenced by faq/index.html#5_9, update link if numbering changes -->
- <p>From GCC 3.4 calling <code>s.reserve(res)</code> on a
- <code>string s</code> with <code>res &lt; s.capacity()</code> will
- reduce the string's capacity to <code>std::max(s.size(), res)</code>.
- </p>
- <p>This behaviour is suggested, but not required by the standard. Prior
- to GCC 3.4 the following alternative can be used instead
- </p>
- <pre>
- std::string(str.data(), str.size()).swap(str);
- </pre>
- <p>This is similar to the idiom for reducing a <code>vector</code>'s
- memory usage (see <a href='../faq/index.html#5_9'>FAQ 5.9</a>) but
- the regular copy constructor cannot be used because libstdc++'s
- <code>string</code> is Copy-On-Write.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/21_strings/stringtok_h.txt b/libstdc++-v3/docs/html/21_strings/stringtok_h.txt
deleted file mode 100644
index 81d87a6efaf..00000000000
--- a/libstdc++-v3/docs/html/21_strings/stringtok_h.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * stringtok.h -- Breaks a string into tokens. This is an example for lib3.
- *
- * Template function looks like this:
- *
- * template <typename Container>
- * void stringtok (Container &l,
- * string const &s,
- * char const * const ws = " \t\n");
- *
- * A nondestructive version of strtok() that handles its own memory and can
- * be broken up by any character(s). Does all the work at once rather than
- * in an invocation loop like strtok() requires.
- *
- * Container is any type that supports push_back(a_string), although using
- * list<string> and deque<string> are indicated due to their O(1) push_back.
- * (I prefer deque<> because op[]/at() is available as well.) The first
- * parameter references an existing Container.
- *
- * s is the string to be tokenized. From the parameter declaration, it can
- * be seen that s is not affected. Since references-to-const may refer to
- * temporaries, you could use stringtok(some_container, readline("")) when
- * using the GNU readline library.
- *
- * The final parameter is an array of characters that serve as whitespace.
- * Whitespace characters default to one or more of tab, space, and newline,
- * in any combination.
- *
- * 'l' need not be empty on entry. On return, 'l' will have the token
- * strings appended.
- *
- *
- * [Example:
- * list<string> ls;
- * stringtok (ls, " this \t is\t\n a test ");
- * for (list<string>::const_iterator i = ls.begin();
- * i != ls.end(); ++i)
- * {
- * cerr << ':' << (*i) << ":\n";
- * }
- *
- * would print
- * :this:
- * :is:
- * :a:
- * :test:
- * -end example]
- *
- * pedwards@jaj.com May 1999
-*/
-
-
-#include <string>
-#include <cstring> // for strchr
-
-
-/*****************************************************************
- * This is the only part of the implementation that I don't like.
- * It can probably be improved upon by the reader...
-*/
-namespace {
- inline bool
- isws (char c, char const * const wstr)
- {
- return (strchr(wstr,c) != NULL);
- }
-}
-
-
-/*****************************************************************
- * Simplistic and quite Standard, but a bit slow. This should be
- * templatized on basic_string instead, or on a more generic StringT
- * that just happens to support ::size_type, .substr(), and so on.
- * I had hoped that "whitespace" would be a trait, but it isn't, so
- * the user must supply it. Enh, this lets them break up strings on
- * different things easier than traits would anyhow.
-*/
-template <typename Container>
-void
-stringtok (Container &l, string const &s, char const * const ws = " \t\n")
-{
- const string::size_type S = s.size();
- string::size_type i = 0;
-
- while (i < S) {
- // eat leading whitespace
- while ((i < S) && (isws(s[i],ws))) ++i;
- if (i == S) return; // nothing left but WS
-
- // find end of word
- string::size_type j = i+1;
- while ((j < S) && (!isws(s[j],ws))) ++j;
-
- // add word
- l.push_back(s.substr(i,j-i));
-
- // set up for next loop
- i = j+1;
- }
-}
-
-
diff --git a/libstdc++-v3/docs/html/21_strings/stringtok_std_h.txt b/libstdc++-v3/docs/html/21_strings/stringtok_std_h.txt
deleted file mode 100644
index 2f3d7e07368..00000000000
--- a/libstdc++-v3/docs/html/21_strings/stringtok_std_h.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Same as stringtok_h.txt, but doesn't (visiably) use C functions.
-*/
-
-#include <string>
-
-// The std:: prefix is not used here, for readability, and a line like
-// "using namespace std;" is dangerous to have in a header file.
-
-template <typename Container>
-void
-stringtok (Container &container, string const &in,
- const char * const delimiters = " \t\n")
-{
- const string::size_type len = in.length();
- string::size_type i = 0;
-
- while ( i < len )
- {
- // eat leading whitespace
- i = in.find_first_not_of (delimiters, i);
- if (i == string::npos)
- return; // nothing left but white space
-
- // find the end of the token
- string::size_type j = in.find_first_of (delimiters, i);
-
- // push token
- if (j == string::npos) {
- container.push_back (in.substr(i));
- return;
- } else
- container.push_back (in.substr(i, j-i));
-
- // set up for next loop
- i = j + 1;
- }
-}
-
diff --git a/libstdc++-v3/docs/html/22_locale/codecvt.html b/libstdc++-v3/docs/html/22_locale/codecvt.html
deleted file mode 100644
index b2e10b13292..00000000000
--- a/libstdc++-v3/docs/html/22_locale/codecvt.html
+++ /dev/null
@@ -1,595 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="bkoz@redhat.com (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="Notes on the codecvt implementation." />
- <title>Notes on the codecvt implementation.</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Localization" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
- <h1>
- Notes on the codecvt implementation.
- </h1>
-<p>
-<em>
-prepared by Benjamin Kosnik (bkoz@redhat.com) on August 28, 2000
-</em>
-</p>
-
-<h2>
-1. Abstract
-</h2>
-<p>
-The standard class codecvt attempts to address conversions between
-different character encoding schemes. In particular, the standard
-attempts to detail conversions between the implementation-defined wide
-characters (hereafter referred to as wchar_t) and the standard type
-char that is so beloved in classic &quot;C&quot; (which can now be referred to
-as narrow characters.) This document attempts to describe how the GNU
-libstdc++-v3 implementation deals with the conversion between wide and
-narrow characters, and also presents a framework for dealing with the
-huge number of other encodings that iconv can convert, including
-Unicode and UTF8. Design issues and requirements are addressed, and
-examples of correct usage for both the required specializations for
-wide and narrow characters and the implementation-provided extended
-functionality are given.
-</p>
-
-<h2>
-2. What the standard says
-</h2>
-Around page 425 of the C++ Standard, this charming heading comes into view:
-
-<blockquote>
-22.2.1.5 - Template class codecvt [lib.locale.codecvt]
-</blockquote>
-
-The text around the codecvt definition gives some clues:
-
-<blockquote>
-<em>
--1- The class codecvt&lt;internT,externT,stateT&gt; is for use when
-converting from one codeset to another, such as from wide characters
-to multibyte characters, between wide character encodings such as
-Unicode and EUC.
-</em>
-</blockquote>
-
-<p>
-Hmm. So, in some unspecified way, Unicode encodings and
-translations between other character sets should be handled by this
-class.
-</p>
-
-<blockquote>
-<em>
--2- The stateT argument selects the pair of codesets being mapped between.
-</em>
-</blockquote>
-
-<p>
-Ah ha! Another clue...
-</p>
-
-<blockquote>
-<em>
--3- The instantiations required in the Table ??
-(lib.locale.category), namely codecvt&lt;wchar_t,char,mbstate_t&gt; and
-codecvt&lt;char,char,mbstate_t&gt;, convert the implementation-defined
-native character set. codecvt&lt;char,char,mbstate_t&gt; implements a
-degenerate conversion; it does not convert at
-all. codecvt&lt;wchar_t,char,mbstate_t&gt; converts between the native
-character sets for tiny and wide characters. Instantiations on
-mbstate_t perform conversion between encodings known to the library
-implementor. Other encodings can be converted by specializing on a
-user-defined stateT type. The stateT object can contain any state that
-is useful to communicate to or from the specialized do_convert member.
-</em>
-</blockquote>
-
-<p>
-At this point, a couple points become clear:
-</p>
-
-<p>
-One: The standard clearly implies that attempts to add non-required
-(yet useful and widely used) conversions need to do so through the
-third template parameter, stateT.</p>
-
-<p>
-Two: The required conversions, by specifying mbstate_t as the third
-template parameter, imply an implementation strategy that is mostly
-(or wholly) based on the underlying C library, and the functions
-mcsrtombs and wcsrtombs in particular.</p>
-
-<h2>
-3. Some thoughts on what would be useful
-</h2>
-Probably the most frequently asked question about code conversion is:
-&quot;So dudes, what's the deal with Unicode strings?&quot; The dude part is
-optional, but apparently the usefulness of Unicode strings is pretty
-widely appreciated. Sadly, this specific encoding (And other useful
-encodings like UTF8, UCS4, ISO 8859-10, etc etc etc) are not mentioned
-in the C++ standard.
-
-<p>
-In particular, the simple implementation detail of wchar_t's size
-seems to repeatedly confound people. Many systems use a two byte,
-unsigned integral type to represent wide characters, and use an
-internal encoding of Unicode or UCS2. (See AIX, Microsoft NT, Java,
-others.) Other systems, use a four byte, unsigned integral type to
-represent wide characters, and use an internal encoding of
-UCS4. (GNU/Linux systems using glibc, in particular.) The C
-programming language (and thus C++) does not specify a specific size
-for the type wchar_t.
-</p>
-
-<p>
-Thus, portable C++ code cannot assume a byte size (or endianness) either.
-</p>
-
-<p>
-Getting back to the frequently asked question: What about Unicode strings?
-</p>
-
-<p>
-What magic spell will do this conversion?
-</p>
-
-<p>
-A couple of comments:
-</p>
-
-<p>
-The thought that all one needs to convert between two arbitrary
-codesets is two types and some kind of state argument is
-unfortunate. In particular, encodings may be stateless. The naming of
-the third parameter as stateT is unfortunate, as what is really needed
-is some kind of generalized type that accounts for the issues that
-abstract encodings will need. The minimum information that is required
-includes:
-</p>
-
-<ul>
-<li>
-<p>
- Identifiers for each of the codesets involved in the conversion. For
-example, using the iconv family of functions from the Single Unix
-Specification (what used to be called X/Open) hosted on the GNU/Linux
-operating system allows bi-directional mapping between far more than
-the following tantalizing possibilities:
-</p>
-
-<p>
-(An edited list taken from <code>`iconv --list`</code> on a Red Hat 6.2/Intel system:
-</p>
-
-<blockquote>
-<pre>
-8859_1, 8859_9, 10646-1:1993, 10646-1:1993/UCS4, ARABIC, ARABIC7,
-ASCII, EUC-CN, EUC-JP, EUC-KR, EUC-TW, GREEK-CCIcode, GREEK, GREEK7-OLD,
-GREEK7, GREEK8, HEBREW, ISO-8859-1, ISO-8859-2, ISO-8859-3,
-ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8,
-ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14,
-ISO-8859-15, ISO-10646, ISO-10646/UCS2, ISO-10646/UCS4,
-ISO-10646/UTF-8, ISO-10646/UTF8, SHIFT-JIS, SHIFT_JIS, UCS-2, UCS-4,
-UCS2, UCS4, UNICODE, UNICODEBIG, UNICODELIcodeLE, US-ASCII, US, UTF-8,
-UTF-16, UTF8, UTF16).
-</pre>
-</blockquote>
-
-<p>
-For iconv-based implementations, string literals for each of the
-encodings (ie. &quot;UCS-2&quot; and &quot;UTF-8&quot;) are necessary,
-although for other,
-non-iconv implementations a table of enumerated values or some other
-mechanism may be required.
-</p>
-</li>
-
-<li>
- Maximum length of the identifying string literal.
-</li>
-
-<li>
- Some encodings are require explicit endian-ness. As such, some kind
- of endian marker or other byte-order marker will be necessary. See
- &quot;Footnotes for C/C++ developers&quot; in Haible for more information on
- UCS-2/Unicode endian issues. (Summary: big endian seems most likely,
- however implementations, most notably Microsoft, vary.)
-</li>
-
-<li>
- Types representing the conversion state, for conversions involving
- the machinery in the &quot;C&quot; library, or the conversion descriptor, for
- conversions using iconv (such as the type iconv_t.) Note that the
- conversion descriptor encodes more information than a simple encoding
- state type.
-</li>
-
-<li>
- Conversion descriptors for both directions of encoding. (ie, both
- UCS-2 to UTF-8 and UTF-8 to UCS-2.)
-</li>
-
-<li>
- Something to indicate if the conversion requested if valid.
-</li>
-
-<li>
- Something to represent if the conversion descriptors are valid.
-</li>
-
-<li>
- Some way to enforce strict type checking on the internal and
- external types. As part of this, the size of the internal and
- external types will need to be known.
-</li>
-</ul>
-
-<h2>
-4. Problems with &quot;C&quot; code conversions : thread safety, global
-locales, termination.
-</h2>
-
-In addition, multi-threaded and multi-locale environments also impact
-the design and requirements for code conversions. In particular, they
-affect the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt;
-when implemented using standard &quot;C&quot; functions.
-
-<p>
-Three problems arise, one big, one of medium importance, and one small.
-</p>
-
-<p>
-First, the small: mcsrtombs and wcsrtombs may not be multithread-safe
-on all systems required by the GNU tools. For GNU/Linux and glibc,
-this is not an issue.
-</p>
-
-<p>
-Of medium concern, in the grand scope of things, is that the functions
-used to implement this specialization work on null-terminated
-strings. Buffers, especially file buffers, may not be null-terminated,
-thus giving conversions that end prematurely or are otherwise
-incorrect. Yikes!
-</p>
-
-<p>
-The last, and fundamental problem, is the assumption of a global
-locale for all the &quot;C&quot; functions referenced above. For something like
-C++ iostreams (where codecvt is explicitly used) the notion of
-multiple locales is fundamental. In practice, most users may not run
-into this limitation. However, as a quality of implementation issue,
-the GNU C++ library would like to offer a solution that allows
-multiple locales and or simultaneous usage with computationally
-correct results. In short, libstdc++-v3 is trying to offer, as an
-option, a high-quality implementation, damn the additional complexity!
-</p>
-
-<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
-LC_CTYPE category implements.
-</p>
-
-<h2>
-5. Design
-</h2>
-The two required specializations are implemented as follows:
-
-<p>
-<code>
-codecvt&lt;char, char, mbstate_t&gt;
-</code>
-</p>
-<p>
-This is a degenerate (ie, does nothing) specialization. Implementing
-this was a piece of cake.
-</p>
-
-<p>
-<code>
-codecvt&lt;char, wchar_t, mbstate_t&gt;
-</code>
-</p>
-<p>
-This specialization, by specifying all the template parameters, pretty
-much ties the hands of implementors. As such, the implementation is
-straightforward, involving mcsrtombs for the conversions between char
-to wchar_t and wcsrtombs for conversions between wchar_t and char.
-</p>
-
-<p>
-Neither of these two required specializations deals with Unicode
-characters. As such, libstdc++-v3 implements a partial specialization
-of the codecvt class with and iconv wrapper class, encoding_state as the
-third template parameter.
-</p>
-
-<p>
-This implementation should be standards conformant. First of all, the
-standard explicitly points out that instantiations on the third
-template parameter, stateT, are the proper way to implement
-non-required conversions. Second of all, the standard says (in Chapter
-17) that partial specializations of required classes are a-ok. Third
-of all, the requirements for the stateT type elsewhere in the standard
-(see 21.1.2 traits typedefs) only indicate that this type be copy
-constructible.
-</p>
-
-<p>
-As such, the type encoding_state is defined as a non-templatized, POD
-type to be used as the third type of a codecvt instantiation. This
-type is just a wrapper class for iconv, and provides an easy interface
-to iconv functionality.
-</p>
-
-<p>
-There are two constructors for encoding_state:
-</p>
-
-<p>
-<code>
-encoding_state() : __in_desc(0), __out_desc(0)
-</code>
-</p>
-<p>
-This default constructor sets the internal encoding to some default
-(currently UCS4) and the external encoding to whatever is returned by
-nl_langinfo(CODESET).
-</p>
-
-<p>
-<code>
-encoding_state(const char* __int, const char* __ext)
-</code>
-</p>
-<p>
-This constructor takes as parameters string literals that indicate the
-desired internal and external encoding. There are no defaults for
-either argument.
-</p>
-
-<p>
-One of the issues with iconv is that the string literals identifying
-conversions are not standardized. Because of this, the thought of
-mandating and or enforcing some set of pre-determined valid
-identifiers seems iffy: thus, a more practical (and non-migraine
-inducing) strategy was implemented: end-users can specify any string
-(subject to a pre-determined length qualifier, currently 32 bytes) for
-encodings. It is up to the user to make sure that these strings are
-valid on the target system.
-</p>
-
-<p>
-<code>
-void
-_M_init()
-</code>
-</p>
-<p>
-Strangely enough, this member function attempts to open conversion
-descriptors for a given encoding_state object. If the conversion
-descriptors are not valid, the conversion descriptors returned will
-not be valid and the resulting calls to the codecvt conversion
-functions will return error.
-</p>
-
-<p>
-<code>
-bool
-_M_good()
-</code>
-</p>
-<p>
-Provides a way to see if the given encoding_state object has been
-properly initialized. If the string literals describing the desired
-internal and external encoding are not valid, initialization will
-fail, and this will return false. If the internal and external
-encodings are valid, but iconv_open could not allocate conversion
-descriptors, this will also return false. Otherwise, the object is
-ready to convert and will return true.
-</p>
-
-<p>
-<code>
-encoding_state(const encoding_state&amp;)
-</code>
-</p>
-<p>
-As iconv allocates memory and sets up conversion descriptors, the copy
-constructor can only copy the member data pertaining to the internal
-and external code conversions, and not the conversion descriptors
-themselves.
-</p>
-
-<p>
-Definitions for all the required codecvt member functions are provided
-for this specialization, and usage of codecvt&lt;internal character type,
-external character type, encoding_state&gt; is consistent with other
-codecvt usage.
-</p>
-
-<h2>
-6. Examples
-</h2>
-
-<ul>
- <li>
- a. conversions involving string literals
-
-<pre>
- typedef codecvt_base::result result;
- typedef unsigned short unicode_t;
- typedef unicode_t int_type;
- typedef char ext_type;
- typedef encoding_state state_type;
- typedef codecvt&lt;int_type, ext_type, state_type&gt; unicode_codecvt;
-
- const ext_type* e_lit = "black pearl jasmine tea";
- int size = strlen(e_lit);
- int_type i_lit_base[24] =
- { 25088, 27648, 24832, 25344, 27392, 8192, 28672, 25856, 24832, 29184,
- 27648, 8192, 27136, 24832, 29440, 27904, 26880, 28160, 25856, 8192, 29696,
- 25856, 24832, 2560
- };
- const int_type* i_lit = i_lit_base;
- const ext_type* efrom_next;
- const int_type* ifrom_next;
- ext_type* e_arr = new ext_type[size + 1];
- ext_type* eto_next;
- int_type* i_arr = new int_type[size + 1];
- int_type* ito_next;
-
- // construct a locale object with the specialized facet.
- locale loc(locale::classic(), new unicode_codecvt);
- // sanity check the constructed locale has the specialized facet.
- VERIFY( has_facet&lt;unicode_codecvt&gt;(loc) );
- const unicode_codecvt&amp; cvt = use_facet&lt;unicode_codecvt&gt;(loc);
- // convert between const char* and unicode strings
- unicode_codecvt::state_type state01("UNICODE", "ISO_8859-1");
- initialize_state(state01);
- result r1 = cvt.in(state01, e_lit, e_lit + size, efrom_next,
- i_arr, i_arr + size, ito_next);
- VERIFY( r1 == codecvt_base::ok );
- VERIFY( !int_traits::compare(i_arr, i_lit, size) );
- VERIFY( efrom_next == e_lit + size );
- VERIFY( ito_next == i_arr + size );
-</pre>
- </li>
- <li>
- b. conversions involving std::string
- </li>
- <li>
- c. conversions involving std::filebuf and std::ostream
- </li>
-</ul>
-
-More information can be found in the following testcases:
-<ul>
-<li> testsuite/22_locale/codecvt_char_char.cc </li>
-<li> testsuite/22_locale/codecvt_unicode_wchar_t.cc </li>
-<li> testsuite/22_locale/codecvt_unicode_char.cc </li>
-<li> testsuite/22_locale/codecvt_wchar_t_char.cc </li>
-</ul>
-
-<h2>
-7. Unresolved Issues
-</h2>
-<ul>
-<li>
- a. things that are sketchy, or remain unimplemented:
- do_encoding, max_length and length member functions
- are only weakly implemented. I have no idea how to do
- this correctly, and in a generic manner. Nathan?
-</li>
-
-<li>
- b. conversions involving std::string
-
- <ul>
- <li>
- how should operators != and == work for string of
- different/same encoding?
- </li>
-
- <li>
- what is equal? A byte by byte comparison or an
- encoding then byte comparison?
- </li>
-
- <li>
- conversions between narrow, wide, and unicode strings
- </li>
- </ul>
-</li>
-<li>
- c. conversions involving std::filebuf and std::ostream
- <ul>
- <li>
- how to initialize the state object in a
- standards-conformant manner?
- </li>
-
- <li>
- how to synchronize the &quot;C&quot; and &quot;C++&quot;
- conversion information?
- </li>
-
- <li>
- wchar_t/char internal buffers and conversions between
- internal/external buffers?
- </li>
- </ul>
-</li>
-</ul>
-
-<h2>
-8. Acknowledgments
-</h2>
-Ulrich Drepper for the iconv suggestions and patient answering of
-late-night questions, Jason Merrill for the template partial
-specialization hints, language clarification, and wchar_t fixes.
-
-<h2>
-9. Bibliography / Referenced Documents
-</h2>
-
-Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters &quot;6. Character Set Handling&quot; and &quot;7 Locales and Internationalization&quot;
-
-<p>
-Drepper, Ulrich, Numerous, late-night email correspondence
-</p>
-
-<p>
-Feather, Clive, &quot;A brief description of Normative Addendum 1,&quot; in particular the parts on Extended Character Sets
-http://www.lysator.liu.se/c/na1.html
-</p>
-
-<p>
-Haible, Bruno, &quot;The Unicode HOWTO&quot; v0.18, 4 August 2000
-ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html
-</p>
-
-<p>
-ISO/IEC 14882:1998 Programming languages - C++
-</p>
-
-<p>
-ISO/IEC 9899:1999 Programming languages - C
-</p>
-
-<p>
-Khun, Markus, &quot;UTF-8 and Unicode FAQ for Unix/Linux&quot;
-http://www.cl.cam.ac.uk/~mgk25/unicode.html
-</p>
-
-<p>
-Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales, Advanced Programmer's Guide and Reference, Addison Wesley Longman, Inc. 2000
-</p>
-
-<p>
-Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000
-</p>
-
-<p>
-System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
-The Open Group/The Institute of Electrical and Electronics Engineers, Inc.
-http://www.opennc.org/austin/docreg.html
-</p>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/22_locale/ctype.html b/libstdc++-v3/docs/html/22_locale/ctype.html
deleted file mode 100644
index ee5e69f7cf7..00000000000
--- a/libstdc++-v3/docs/html/22_locale/ctype.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="bkoz@redhat.com (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="Notes on the ctype implementation." />
- <title>Notes on the ctype implementation.</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Localization" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
- <h1>
- Notes on the ctype implementation.
- </h1>
-<em>
-prepared by Benjamin Kosnik (bkoz@redhat.com) on August 30, 2000
-</em>
-
-<h2>
-1. Abstract
-</h2>
-<p>
-Woe is me.
-</p>
-
-<h2>
-2. What the standard says
-</h2>
-
-
-<h2>
-3. Problems with &quot;C&quot; ctype : global locales, termination.
-</h2>
-
-<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
-LC_CTYPE category implements.
-</p>
-
-<h2>
-4. Design
-</h2>
-The two required specializations are implemented as follows:
-
-<p>
-<code>
-ctype&lt;char&gt;
-</code>
-</p>
-<p>
-This is simple specialization. Implementing this was a piece of cake.
-</p>
-
-<p>
-<code>
-ctype&lt;wchar_t&gt;
-</code>
-</p>
-<p>
-This specialization, by specifying all the template parameters, pretty
-much ties the hands of implementors. As such, the implementation is
-straightforward, involving mcsrtombs for the conversions between char
-to wchar_t and wcsrtombs for conversions between wchar_t and char.
-</p>
-
-<p>
-Neither of these two required specializations deals with Unicode
-characters. As such, libstdc++-v3 implements
-</p>
-
-<h2>
-5. Examples
-</h2>
-
-<pre>
- typedef ctype&lt;char&gt; cctype;
-</pre>
-
-More information can be found in the following testcases:
-<ul>
-<li> testsuite/22_locale/ctype_char_members.cc </li>
-<li> testsuite/22_locale/ctype_wchar_t_members.cc </li>
-</ul>
-
-<h2>
-6. Unresolved Issues
-</h2>
-
-<ul>
- <li> how to deal with the global locale issue? </li>
-
- <li> how to deal with different types than char, wchar_t? </li>
-
- <li> codecvt/ctype overlap: narrow/widen </li>
-
- <li> mask typedef in codecvt_base, argument types in codecvt.
- what is know about this type? </li>
-
- <li> why mask* argument in codecvt? </li>
-
- <li> can this be made (more) generic? is there a simple way to
- straighten out the configure-time mess that is a by-product of
- this class? </li>
-
- <li> get the ctype&lt;wchar_t&gt;::mask stuff under control. Need to
- make some kind of static table, and not do lookup evertime
- somebody hits the do_is... functions. Too bad we can't just
- redefine mask for ctype&lt;wchar_t&gt; </li>
-
- <li> rename abstract base class. See if just smash-overriding
- is a better approach. Clarify, add sanity to naming. </li>
-
-</ul>
-
-
-<h2>
-7. Acknowledgments
-</h2>
-Ulrich Drepper for patient answering of late-night questions, skeletal
-examples, and C language expertise.
-
-<h2>
-8. Bibliography / Referenced Documents
-</h2>
-
-Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters &quot;6. Character Set Handling&quot; and &quot;7 Locales and Internationalization&quot;
-
-<p>
-Drepper, Ulrich, Numerous, late-night email correspondence
-</p>
-
-<p>
-ISO/IEC 14882:1998 Programming languages - C++
-</p>
-
-<p>
-ISO/IEC 9899:1999 Programming languages - C
-</p>
-
-<p>
-Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales, Advanced Programmer's Guide and Reference, Addison Wesley Longman, Inc. 2000
-</p>
-
-<p>
-Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000
-</p>
-
-<p>
-System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
-The Open Group/The Institute of Electrical and Electronics Engineers, Inc.
-http://www.opennc.org/austin/docreg.html
-</p>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html
deleted file mode 100644
index 3d19bb69a62..00000000000
--- a/libstdc++-v3/docs/html/22_locale/howto.html
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 22." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 22: Localization</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../21_strings/howto.html" type="text/html"
- title="Strings" />
-<link rel="Next" href="../23_containers/howto.html" type="text/html"
- title="Containers" />
-<link rel="Bookmark" href="locale.html" type="text/html" title="class locale" />
-<link rel="Bookmark" href="codecvt.html" type="text/html" title="class codecvt" />
-<link rel="Bookmark" href="ctype.html" type="text/html" title="class ctype" />
-<link rel="Bookmark" href="messages.html" type="text/html" title="class messages" />
-<link rel="Bookmark" href="http://www.research.att.com/~bs/3rd_loc0.html" type="text/html" title="Bjarne Stroustrup on Locales" />
-<link rel="Bookmark" href="http://www.cantrip.org/locale.html" type="text/html" title="Nathan Myers on Locales" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 22: Localization</a></h1>
-
-<p>Chapter 22 deals with the C++ localization facilities.
-</p>
-<!-- I wanted to write that sentence in something requiring an exotic font,
- like Cyrllic or Kanji. Probably more work than such cuteness is worth,
- but I still think it'd be funny.
- -->
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">class locale</a></li>
- <li><a href="#2">class codecvt</a></li>
- <li><a href="#3">class ctype</a></li>
- <li><a href="#4">class messages</a></li>
- <li><a href="#5">Bjarne Stroustrup on Locales</a></li>
- <li><a href="#6">Nathan Myers on Locales</a></li>
- <li><a href="#7">Correct Transformations</a></li>
-</ul>
-
-<!-- ####################################################### -->
-
-<hr />
-<h2><a name="1">class locale</a></h2>
- <p>Notes made during the implementation of locales can be found
- <a href="locale.html">here</a>.
- </p>
-
-<hr />
-<h2><a name="2">class codecvt</a></h2>
- <p>Notes made during the implementation of codecvt can be found
- <a href="codecvt.html">here</a>.
- </p>
-
- <p>The following is the abstract from the implementation notes:
- </p>
- <blockquote>
- The standard class codecvt attempts to address conversions between
- different character encoding schemes. In particular, the standard
- attempts to detail conversions between the implementation-defined
- wide characters (hereafter referred to as wchar_t) and the standard
- type char that is so beloved in classic &quot;C&quot; (which can
- now be referred to as narrow characters.) This document attempts
- to describe how the GNU libstdc++-v3 implementation deals with the
- conversion between wide and narrow characters, and also presents a
- framework for dealing with the huge number of other encodings that
- iconv can convert, including Unicode and UTF8. Design issues and
- requirements are addressed, and examples of correct usage for both
- the required specializations for wide and narrow characters and the
- implementation-provided extended functionality are given.
- </blockquote>
-
-<hr />
-<h2><a name="3">class ctype</a></h2>
- <p>Notes made during the implementation of ctype can be found
- <a href="ctype.html">here</a>.
- </p>
-
-<hr />
-<h2><a name="4">class messages</a></h2>
- <p>Notes made during the implementation of messages can be found
- <a href="messages.html">here</a>.
- </p>
-
-<hr />
-<h2><a name="5">Bjarne Stroustrup on Locales</a></h2>
- <p>Dr. Bjarne Stroustrup has released a
- <a href="http://www.research.att.com/~bs/3rd_loc0.html">pointer</a>
- to Appendix D of his book,
- <a href="http://www.research.att.com/~bs/3rd.html">The C++
- Programming Language (3rd Edition)</a>. It is a detailed
- description of locales and how to use them.
- </p>
- <p>He also writes:
- </p>
- <blockquote><em>
- Please note that I still consider this detailed description of
- locales beyond the needs of most C++ programmers. It is written
- with experienced programmers in mind and novices will do best to
- avoid it.
- </em></blockquote>
-
-<hr />
-<h2><a name="6">Nathan Myers on Locales</a></h2>
- <p>An article entitled &quot;The Standard C++ Locale&quot; was
- published in Dr. Dobb's Journal and can be found
- <a href="http://www.cantrip.org/locale.html">here</a>.
- </p>
-
-<hr />
-<h2><a name="7">Correct Transformations</a></h2>
- <!-- Jumping directly to here from chapter 21. -->
- <p>A very common question on newsgroups and mailing lists is, &quot;How
- do I do &lt;foo&gt; to a character string?&quot; where &lt;foo&gt; is
- a task such as changing all the letters to uppercase, to lowercase,
- testing for digits, etc. A skilled and conscientious programmer
- will follow the question with another, &quot;And how do I make the
- code portable?&quot;
- </p>
- <p>(Poor innocent programmer, you have no idea the depths of trouble
- you are getting yourself into. 'Twould be best for your sanity if
- you dropped the whole idea and took up basket weaving instead. No?
- Fine, you asked for it...)
- </p>
- <p>The task of changing the case of a letter or classifying a character
- as numeric, graphical, etc., all depends on the cultural context of the
- program at runtime. So, first you must take the portability question
- into account. Once you have localized the program to a particular
- natural language, only then can you perform the specific task.
- Unfortunately, specializing a function for a human language is not
- as simple as declaring
- <code> extern &quot;Danish&quot; int tolower (int); </code>.
- </p>
- <p>The C++ code to do all this proceeds in the same way. First, a locale
- is created. Then member functions of that locale are called to
- perform minor tasks. Continuing the example from Chapter 21, we wish
- to use the following convenience functions:
- </p>
- <pre>
- namespace std {
- template &lt;class charT&gt;
- charT
- toupper (charT c, const locale&amp; loc) const;
- template &lt;class charT&gt;
- charT
- tolower (charT c, const locale&amp; loc) const;
- }</pre>
- <p>
- This function extracts the appropriate &quot;facet&quot; from the
- locale <em>loc</em> and calls the appropriate member function of that
- facet, passing <em>c</em> as its argument. The resulting character
- is returned.
- </p>
- <p>For the C/POSIX locale, the results are the same as calling the
- classic C <code>toupper/tolower</code> function that was used in previous
- examples. For other locales, the code should Do The Right Thing.
- </p>
- <p>Of course, these functions take a second argument, and the
- transformation algorithm's operator argument can only take a single
- parameter. So we write simple wrapper structs to handle that.
- </p>
- <p>The next-to-final version of the code started in Chapter 21 looks like:
- </p>
- <pre>
- #include &lt;iterator&gt; // for back_inserter
- #include &lt;locale&gt;
- #include &lt;string&gt;
- #include &lt;algorithm&gt;
- #include &lt;cctype&gt; // old &lt;ctype.h&gt;
-
- struct ToUpper
- {
- ToUpper(std::locale const&amp; l) : loc(l) {;}
- char operator() (char c) const { return std::toupper(c,loc); }
- private:
- std::locale const&amp; loc;
- };
-
- struct ToLower
- {
- ToLower(std::locale const&amp; l) : loc(l) {;}
- char operator() (char c) const { return std::tolower(c,loc); }
- private:
- std::locale const&amp; loc;
- };
-
- int main ()
- {
- std::string s("Some Kind Of Initial Input Goes Here");
- ToUpper up(std::locale::classic());
- ToLower down(std::locale::classic());
-
- // Change everything into upper case.
- std::transform(s.begin(), s.end(), s.begin(), up);
-
- // Change everything into lower case.
- std::transform(s.begin(), s.end(), s.begin(), down);
-
- // Change everything back into upper case, but store the
- // result in a different string.
- std::string capital_s;
- std::transform(s.begin(), s.end(), std::back_inserter(capital_s), up);
- }</pre>
- <p>The <code>ToUpper</code> and <code>ToLower</code> structs can be
- generalized for other character types by making <code>operator()</code>
- a member function template.
- </p>
- <p>The final version of the code uses <code>bind2nd</code> to eliminate
- the wrapper structs, but the resulting code is tricky. I have not
- shown it here because no compilers currently available to me will
- handle it.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/22_locale/locale.html b/libstdc++-v3/docs/html/22_locale/locale.html
deleted file mode 100644
index 57ef5b4e981..00000000000
--- a/libstdc++-v3/docs/html/22_locale/locale.html
+++ /dev/null
@@ -1,543 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="bkoz@redhat.com (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, locale name LC_ALL" />
- <meta name="DESCRIPTION" content="Notes on the locale implementation." />
- <title>Notes on the locale implementation.</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Localization" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
- <h1>
- Notes on the locale implementation.
- </h1>
-<em>
-prepared by Benjamin Kosnik (bkoz@redhat.com) on October 14, 2002
-</em>
-
-<h2>
-1. Abstract
-</h2>
-<p>
-Describes the basic locale object, including nested
-classes id, facet, and the reference-counted implementation object,
-class _Impl.
-</p>
-
-<h2>
-2. What the standard says
-</h2>
-Class locale is non-templatized and has two distinct types nested
-inside of it:
-
-<blockquote>
-<em>
-class facet
-22.1.1.1.2 Class locale::facet
-</em>
-</blockquote>
-
-<p>
-Facets actually implement locale functionality. For instance, a facet
-called numpunct is the data objects that can be used to query for the
-thousands separator is in the German locale.
-</p>
-
-Literally, a facet is strictly defined:
-<ul>
- <li>containing the following public data member:
- <p>
- <code>static locale::id id;</code>
- </p>
- </li>
-
- <li>derived from another facet:
- <p>
- <code> class gnu_codecvt: public std::ctype&lt;user-defined-type&gt;</code>
- </p>
- </li>
-</ul>
-
-<p>
-Of interest in this class are the memory management options explicitly
-specified as an argument to facet's constructor. Each constructor of a
-facet class takes a std::size_t __refs argument: if __refs == 0, the
-facet is deleted when the locale containing it is destroyed. If __refs
-== 1, the facet is not destroyed, even when it is no longer
-referenced.
-</p>
-
-<blockquote>
-<em>
-class id
-22.1.1.1.3 - Class locale::id
-</em>
-</blockquote>
-
-<p>
-Provides an index for looking up specific facets.
-</p>
-
-
-<h2>
-3. Interacting with &quot;C&quot; locales.
-</h2>
-
-<p>
-Some help on determining the underlying support for locales on a system.
-Note, this is specific to linux (and glibc-2.3.x)
-</p>
-
-<ul>
- <li> <code>`locale -a`</code> displays available locales.
-<blockquote>
-<pre>
-af_ZA
-ar_AE
-ar_AE.utf8
-ar_BH
-ar_BH.utf8
-ar_DZ
-ar_DZ.utf8
-ar_EG
-ar_EG.utf8
-ar_IN
-ar_IQ
-ar_IQ.utf8
-ar_JO
-ar_JO.utf8
-ar_KW
-ar_KW.utf8
-ar_LB
-ar_LB.utf8
-ar_LY
-ar_LY.utf8
-ar_MA
-ar_MA.utf8
-ar_OM
-ar_OM.utf8
-ar_QA
-ar_QA.utf8
-ar_SA
-ar_SA.utf8
-ar_SD
-ar_SD.utf8
-ar_SY
-ar_SY.utf8
-ar_TN
-ar_TN.utf8
-ar_YE
-ar_YE.utf8
-be_BY
-be_BY.utf8
-bg_BG
-bg_BG.utf8
-br_FR
-bs_BA
-C
-ca_ES
-ca_ES@euro
-ca_ES.utf8
-ca_ES.utf8@euro
-cs_CZ
-cs_CZ.utf8
-cy_GB
-da_DK
-da_DK.iso885915
-da_DK.utf8
-de_AT
-de_AT@euro
-de_AT.utf8
-de_AT.utf8@euro
-de_BE
-de_BE@euro
-de_BE.utf8
-de_BE.utf8@euro
-de_CH
-de_CH.utf8
-de_DE
-de_DE@euro
-de_DE.utf8
-de_DE.utf8@euro
-de_LU
-de_LU@euro
-de_LU.utf8
-de_LU.utf8@euro
-el_GR
-el_GR.utf8
-en_AU
-en_AU.utf8
-en_BW
-en_BW.utf8
-en_CA
-en_CA.utf8
-en_DK
-en_DK.utf8
-en_GB
-en_GB.iso885915
-en_GB.utf8
-en_HK
-en_HK.utf8
-en_IE
-en_IE@euro
-en_IE.utf8
-en_IE.utf8@euro
-en_IN
-en_NZ
-en_NZ.utf8
-en_PH
-en_PH.utf8
-en_SG
-en_SG.utf8
-en_US
-en_US.iso885915
-en_US.utf8
-en_ZA
-en_ZA.utf8
-en_ZW
-en_ZW.utf8
-es_AR
-es_AR.utf8
-es_BO
-es_BO.utf8
-es_CL
-es_CL.utf8
-es_CO
-es_CO.utf8
-es_CR
-es_CR.utf8
-es_DO
-es_DO.utf8
-es_EC
-es_EC.utf8
-es_ES
-es_ES@euro
-es_ES.utf8
-es_ES.utf8@euro
-es_GT
-es_GT.utf8
-es_HN
-es_HN.utf8
-es_MX
-es_MX.utf8
-es_NI
-es_NI.utf8
-es_PA
-es_PA.utf8
-es_PE
-es_PE.utf8
-es_PR
-es_PR.utf8
-es_PY
-es_PY.utf8
-es_SV
-es_SV.utf8
-es_US
-es_US.utf8
-es_UY
-es_UY.utf8
-es_VE
-es_VE.utf8
-et_EE
-et_EE.utf8
-eu_ES
-eu_ES@euro
-eu_ES.utf8
-eu_ES.utf8@euro
-fa_IR
-fi_FI
-fi_FI@euro
-fi_FI.utf8
-fi_FI.utf8@euro
-fo_FO
-fo_FO.utf8
-fr_BE
-fr_BE@euro
-fr_BE.utf8
-fr_BE.utf8@euro
-fr_CA
-fr_CA.utf8
-fr_CH
-fr_CH.utf8
-fr_FR
-fr_FR@euro
-fr_FR.utf8
-fr_FR.utf8@euro
-fr_LU
-fr_LU@euro
-fr_LU.utf8
-fr_LU.utf8@euro
-ga_IE
-ga_IE@euro
-ga_IE.utf8
-ga_IE.utf8@euro
-gl_ES
-gl_ES@euro
-gl_ES.utf8
-gl_ES.utf8@euro
-gv_GB
-gv_GB.utf8
-he_IL
-he_IL.utf8
-hi_IN
-hr_HR
-hr_HR.utf8
-hu_HU
-hu_HU.utf8
-id_ID
-id_ID.utf8
-is_IS
-is_IS.utf8
-it_CH
-it_CH.utf8
-it_IT
-it_IT@euro
-it_IT.utf8
-it_IT.utf8@euro
-iw_IL
-iw_IL.utf8
-ja_JP.eucjp
-ja_JP.utf8
-ka_GE
-kl_GL
-kl_GL.utf8
-ko_KR.euckr
-ko_KR.utf8
-kw_GB
-kw_GB.utf8
-lt_LT
-lt_LT.utf8
-lv_LV
-lv_LV.utf8
-mi_NZ
-mk_MK
-mk_MK.utf8
-mr_IN
-ms_MY
-ms_MY.utf8
-mt_MT
-mt_MT.utf8
-nl_BE
-nl_BE@euro
-nl_BE.utf8
-nl_BE.utf8@euro
-nl_NL
-nl_NL@euro
-nl_NL.utf8
-nl_NL.utf8@euro
-nn_NO
-nn_NO.utf8
-no_NO
-no_NO.utf8
-oc_FR
-pl_PL
-pl_PL.utf8
-POSIX
-pt_BR
-pt_BR.utf8
-pt_PT
-pt_PT@euro
-pt_PT.utf8
-pt_PT.utf8@euro
-ro_RO
-ro_RO.utf8
-ru_RU
-ru_RU.koi8r
-ru_RU.utf8
-ru_UA
-ru_UA.utf8
-se_NO
-sk_SK
-sk_SK.utf8
-sl_SI
-sl_SI.utf8
-sq_AL
-sq_AL.utf8
-sr_YU
-sr_YU@cyrillic
-sr_YU.utf8
-sr_YU.utf8@cyrillic
-sv_FI
-sv_FI@euro
-sv_FI.utf8
-sv_FI.utf8@euro
-sv_SE
-sv_SE.iso885915
-sv_SE.utf8
-ta_IN
-te_IN
-tg_TJ
-th_TH
-th_TH.utf8
-tl_PH
-tr_TR
-tr_TR.utf8
-uk_UA
-uk_UA.utf8
-ur_PK
-uz_UZ
-vi_VN
-vi_VN.tcvn
-wa_BE
-wa_BE@euro
-yi_US
-zh_CN
-zh_CN.gb18030
-zh_CN.gbk
-zh_CN.utf8
-zh_HK
-zh_HK.utf8
-zh_TW
-zh_TW.euctw
-zh_TW.utf8
-</pre>
-</blockquote>
-</li>
-
- <li> <code>`locale`</code> displays environmental variables
- that impact how locale("") will be deduced.
-
-<blockquote>
-<pre>
-LANG=en_US
-LC_CTYPE="en_US"
-LC_NUMERIC="en_US"
-LC_TIME="en_US"
-LC_COLLATE="en_US"
-LC_MONETARY="en_US"
-LC_MESSAGES="en_US"
-LC_PAPER="en_US"
-LC_NAME="en_US"
-LC_ADDRESS="en_US"
-LC_TELEPHONE="en_US"
-LC_MEASUREMENT="en_US"
-LC_IDENTIFICATION="en_US"
-LC_ALL=
-</pre>
-</blockquote>
-</li>
-</ul>
-
-<p>
-From Josuttis, p. 697-698, which says, that "there is only *one*
-relation (of the C++ locale mechanism) to the C locale mechanism: the
-global C locale is modified if a named C++ locale object is set as the
-global locale" (emphasis Paolo), that is:
-</p>
- <code>std::locale::global(std::locale(""));</code>
-
-<p>affects the C functions as if the following call was made:</p>
-
- <code>std::setlocale(LC_ALL, "");</code>
-
-<p>
-On the other hand, there is *no* viceversa, that is, calling setlocale
-has *no* whatsoever on the C++ locale mechanism, in particular on the
-working of locale(""), which constructs the locale object from the
-environment of the running program, that is, in practice, the set of
-LC_ALL, LANG, etc. variable of the shell.
-</p>
-
-
-<h2>
-4. Design
-</h2>
-
-
-<p>
-The major design challenge is fitting an object-orientated and
-non-global locale design ontop of POSIX and other relevant stanards,
-which include the Single Unix (nee X/Open.)
-</p>
-
-<p>
-Because POSIX falls down so completely, portibility is an issue.
-</p>
-
-class _Impl
-The internal representation of the std::locale object.
-
-
-<h2>
-5. Examples
-</h2>
-
-More information can be found in the following testcases:
-<ul>
-<li> testsuite/22_locale/all </li>
-</ul>
-
-<h2>
-6. Unresolved Issues
-</h2>
-
-<ul>
- <li> locale initialization: at what point does _S_classic,
- _S_global get initialized? Can named locales assume this
- initialization has already taken place? </li>
-
- <li> document how named locales error check when filling data
- members. Ie, a fr_FR locale that doesn't have
- numpunct::truename(): does it use "true"? Or is it a blank
- string? What's the convention? </li>
-
- <li> explain how locale aliasing happens. When does "de_DE"
- use "de" information? What is the rule for locales composed of
- just an ISO language code (say, "de") and locales with both an
- ISO language code and ISO country code (say, "de_DE"). </li>
-
- <li> what should non-required facet instantiations do? If the
- generic implemenation is provided, then how to end-users
- provide specializations? </li>
-</ul>
-
-<h2>
-7. Acknowledgments
-</h2>
-
-<h2>
-8. Bibliography / Referenced Documents
-</h2>
-
-Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters &quot;6. Character Set Handling&quot; and &quot;7 Locales and Internationalization&quot;
-
-<p>
-Drepper, Ulrich, Numerous, late-night email correspondence
-</p>
-
-<p>
-ISO/IEC 14882:1998 Programming languages - C++
-</p>
-
-<p>
-ISO/IEC 9899:1999 Programming languages - C
-</p>
-
-<p>
-Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales, Advanced Programmer's Guide and Reference, Addison Wesley Longman, Inc. 2000
-</p>
-
-<p>
-Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000
-</p>
-
-<p>
-System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
-The Open Group/The Institute of Electrical and Electronics Engineers, Inc.
-http://www.opennc.org/austin/docreg.html
-</p>
-
-</body>
-</html>
-
-
diff --git a/libstdc++-v3/docs/html/22_locale/messages.html b/libstdc++-v3/docs/html/22_locale/messages.html
deleted file mode 100644
index 41e94a42f83..00000000000
--- a/libstdc++-v3/docs/html/22_locale/messages.html
+++ /dev/null
@@ -1,461 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="bkoz@redhat.com (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="Notes on the messages implementation." />
- <title>Notes on the messages implementation.</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Localization" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-<h1>
-Notes on the messages implementation.
-</h1>
-<em>
-prepared by Benjamin Kosnik (bkoz@redhat.com) on August 8, 2001
-</em>
-
-<h2>
-1. Abstract
-</h2>
-<p>
-The std::messages facet implements message retrieval functionality
-equivalent to Java's java.text.MessageFormat .using either GNU gettext
-or IEEE 1003.1-200 functions.
-</p>
-
-<h2>
-2. What the standard says
-</h2>
-The std::messages facet is probably the most vaguely defined facet in
-the standard library. It's assumed that this facility was built into
-the standard library in order to convert string literals from one
-locale to the other. For instance, converting the "C" locale's
-<code>const char* c = "please"</code> to a German-localized <code>"bitte"</code>
-during program execution.
-
-<blockquote>
-22.2.7.1 - Template class messages [lib.locale.messages]
-</blockquote>
-
-This class has three public member functions, which directly
-correspond to three protected virtual member functions.
-
-The public member functions are:
-
-<p>
-<code>catalog open(const string&amp;, const locale&amp;) const</code>
-</p>
-
-<p>
-<code>string_type get(catalog, int, int, const string_type&amp;) const</code>
-</p>
-
-<p>
-<code>void close(catalog) const</code>
-</p>
-
-<p>
-While the virtual functions are:
-</p>
-
-<p>
-<code>catalog do_open(const string&amp;, const locale&amp;) const</code>
-</p>
-<blockquote>
-<em>
--1- Returns: A value that may be passed to get() to retrieve a
-message, from the message catalog identified by the string name
-according to an implementation-defined mapping. The result can be used
-until it is passed to close(). Returns a value less than 0 if no such
-catalog can be opened.
-</em>
-</blockquote>
-
-<p>
-<code>string_type do_get(catalog, int, int, const string_type&amp;) const</code>
-</p>
-<blockquote>
-<em>
--3- Requires: A catalog cat obtained from open() and not yet closed.
--4- Returns: A message identified by arguments set, msgid, and dfault,
-according to an implementation-defined mapping. If no such message can
-be found, returns dfault.
-</em>
-</blockquote>
-
-<p>
-<code>void do_close(catalog) const</code>
-</p>
-<blockquote>
-<em>
--5- Requires: A catalog cat obtained from open() and not yet closed.
--6- Effects: Releases unspecified resources associated with cat.
--7- Notes: The limit on such resources, if any, is implementation-defined.
-</em>
-</blockquote>
-
-
-<h2>
-3. Problems with &quot;C&quot; messages: thread safety,
-over-specification, and assumptions.
-</h2>
-A couple of notes on the standard.
-
-<p>
-First, why is <code>messages_base::catalog</code> specified as a typedef
-to int? This makes sense for implementations that use
-<code>catopen</code>, but not for others. Fortunately, it's not heavily
-used and so only a minor irritant.
-</p>
-
-<p>
-Second, by making the member functions <code>const</code>, it is
-impossible to save state in them. Thus, storing away information used
-in the 'open' member function for use in 'get' is impossible. This is
-unfortunate.
-</p>
-
-<p>
-The 'open' member function in particular seems to be oddly
-designed. The signature seems quite peculiar. Why specify a <code>const
-string&amp; </code> argument, for instance, instead of just <code>const
-char*</code>? Or, why specify a <code>const locale&amp;</code> argument that is
-to be used in the 'get' member function? How, exactly, is this locale
-argument useful? What was the intent? It might make sense if a locale
-argument was associated with a given default message string in the
-'open' member function, for instance. Quite murky and unclear, on
-reflection.
-</p>
-
-<p>
-Lastly, it seems odd that messages, which explicitly require code
-conversion, don't use the codecvt facet. Because the messages facet
-has only one template parameter, it is assumed that ctype, and not
-codecvt, is to be used to convert between character sets.
-</p>
-
-<p>
-It is implicitly assumed that the locale for the default message
-string in 'get' is in the "C" locale. Thus, all source code is assumed
-to be written in English, so translations are always from "en_US" to
-other, explicitly named locales.
-</p>
-
-<h2>
-4. Design and Implementation Details
-</h2>
-This is a relatively simple class, on the face of it. The standard
-specifies very little in concrete terms, so generic implementations
-that are conforming yet do very little are the norm. Adding
-functionality that would be useful to programmers and comparable to
-Java's java.text.MessageFormat takes a bit of work, and is highly
-dependent on the capabilities of the underlying operating system.
-
-<p>
-Three different mechanisms have been provided, selectable via
-configure flags:
-</p>
-
-<ul>
- <li> generic
- <p>
- This model does very little, and is what is used by default.
- </p>
- </li>
-
- <li> gnu
- <p>
- The gnu model is complete and fully tested. It's based on the
- GNU gettext package, which is part of glibc. It uses the functions
- <code>textdomain, bindtextdomain, gettext</code>
- to implement full functionality. Creating message
- catalogs is a relatively straight-forward process and is
- lightly documented below, and fully documented in gettext's
- distributed documentation.
- </p>
- </li>
-
- <li> ieee_1003.1-200x
- <p>
- This is a complete, though untested, implementation based on
- the IEEE standard. The functions
- <code>catopen, catgets, catclose</code>
- are used to retrieve locale-specific messages given the
- appropriate message catalogs that have been constructed for
- their use. Note, the script <code> po2msg.sed</code> that is part
- of the gettext distribution can convert gettext catalogs into
- catalogs that <code>catopen</code> can use.
- </p>
- </li>
-</ul>
-
-<p>
-A new, standards-conformant non-virtual member function signature was
-added for 'open' so that a directory could be specified with a given
-message catalog. This simplifies calling conventions for the gnu
-model.
-</p>
-
-<p>
-The rest of this document discusses details of the GNU model.
-</p>
-
-<p>
-The messages facet, because it is retrieving and converting between
-characters sets, depends on the ctype and perhaps the codecvt facet in
-a given locale. In addition, underlying "C" library locale support is
-necessary for more than just the <code>LC_MESSAGES</code> mask:
-<code>LC_CTYPE</code> is also necessary. To avoid any unpleasantness, all
-bits of the "C" mask (ie <code>LC_ALL</code>) are set before retrieving
-messages.
-</p>
-
-<p>
-Making the message catalogs can be initially tricky, but become quite
-simple with practice. For complete info, see the gettext
-documentation. Here's an idea of what is required:
-</p>
-
-<ul>
- <li> Make a source file with the required string literals
- that need to be translated. See
- <code>intl/string_literals.cc</code> for an example.
- </li>
-
- <li> Make initial catalog (see "4 Making the PO Template File"
- from the gettext docs).
- <p>
- <code> xgettext --c++ --debug string_literals.cc -o libstdc++.pot </code>
- </p>
- </li>
-
- <li> Make language and country-specific locale catalogs.
- <p>
- <code>cp libstdc++.pot fr_FR.po</code>
- </p>
- <p>
- <code>cp libstdc++.pot de_DE.po</code>
- </p>
- </li>
-
- <li> Edit localized catalogs in emacs so that strings are
- translated.
- <p>
- <code>emacs fr_FR.po</code>
- </p>
- </li>
-
- <li> Make the binary mo files.
- <p>
- <code>msgfmt fr_FR.po -o fr_FR.mo</code>
- </p>
- <p>
- <code>msgfmt de_DE.po -o de_DE.mo</code>
- </p>
- </li>
-
- <li> Copy the binary files into the correct directory structure.
- <p>
- <code>cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++-v3.mo</code>
- </p>
- <p>
- <code>cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++-v3.mo</code>
- </p>
- </li>
-
- <li> Use the new message catalogs.
- <p>
- <code>locale loc_de("de_DE");</code>
- </p>
- <p>
- <code>
- use_facet&lt;messages&lt;char&gt; &gt;(loc_de).open("libstdc++", locale(), dir);
- </code>
- </p>
- </li>
-</ul>
-
-<h2>
-5. Examples
-</h2>
-
-<ul>
- <li> message converting, simple example using the GNU model.
-
-<pre>
-#include &lt;iostream&gt;
-#include &lt;locale&gt;
-using namespace std;
-
-void test01()
-{
- typedef messages&lt;char&gt;::catalog catalog;
- const char* dir =
- "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++-v3/po/share/locale";
- const locale loc_de("de_DE");
- const messages&lt;char&gt;&amp; mssg_de = use_facet&lt;messages&lt;char&gt; &gt;(loc_de);
-
- catalog cat_de = mssg_de.open("libstdc++", loc_de, dir);
- string s01 = mssg_de.get(cat_de, 0, 0, "please");
- string s02 = mssg_de.get(cat_de, 0, 0, "thank you");
- cout &lt;&lt; "please in german:" &lt;&lt; s01 &lt;&lt; '\n';
- cout &lt;&lt; "thank you in german:" &lt;&lt; s02 &lt;&lt; '\n';
- mssg_de.close(cat_de);
-}
-</pre>
- </li>
-</ul>
-
-More information can be found in the following testcases:
-<ul>
-<li> testsuite/22_locale/messages.cc </li>
-<li> testsuite/22_locale/messages_byname.cc </li>
-<li> testsuite/22_locale/messages_char_members.cc </li>
-</ul>
-
-<h2>
-6. Unresolved Issues
-</h2>
-<ul>
-<li> Things that are sketchy, or remain unimplemented:
- <ul>
- <li>_M_convert_from_char, _M_convert_to_char are in
- flux, depending on how the library ends up doing
- character set conversions. It might not be possible to
- do a real character set based conversion, due to the
- fact that the template parameter for messages is not
- enough to instantiate the codecvt facet (1 supplied,
- need at least 2 but would prefer 3).
- </li>
-
- <li> There are issues with gettext needing the global
- locale set to extract a message. This dependence on
- the global locale makes the current "gnu" model non
- MT-safe. Future versions of glibc, ie glibc 2.3.x will
- fix this, and the C++ library bits are already in
- place.
- </li>
- </ul>
-</li>
-
-<li> Development versions of the GNU "C" library, glibc 2.3 will allow
- a more efficient, MT implementation of std::messages, and will
- allow the removal of the _M_name_messages data member. If this
- is done, it will change the library ABI. The C++ parts to
- support glibc 2.3 have already been coded, but are not in use:
- once this version of the "C" library is released, the marked
- parts of the messages implementation can be switched over to
- the new "C" library functionality.
-</li>
-<li> At some point in the near future, std::numpunct will probably use
- std::messages facilities to implement truename/falename
- correctly. This is currently not done, but entries in
- libstdc++.pot have already been made for "true" and "false"
- string literals, so all that remains is the std::numpunct
- coding and the configure/make hassles to make the installed
- library search its own catalog. Currently the libstdc++.mo
- catalog is only searched for the testsuite cases involving
- messages members.
-</li>
-
-<li> The following member functions:
-
- <p>
- <code>
- catalog
- open(const basic_string&lt;char&gt;&amp; __s, const locale&amp; __loc) const
- </code>
- </p>
-
- <p>
- <code>
- catalog
- open(const basic_string&lt;char&gt;&amp;, const locale&amp;, const char*) const;
- </code>
- </p>
-
- <p>
- Don't actually return a "value less than 0 if no such catalog
- can be opened" as required by the standard in the "gnu"
- 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>
-
-<h2>
-7. Acknowledgments
-</h2>
-Ulrich Drepper for the character set explanations, gettext details,
-and patient answering of late-night questions, Tom Tromey for the java details.
-
-
-<h2>
-8. Bibliography / Referenced Documents
-</h2>
-
-Drepper, Ulrich, GNU libc (glibc) 2.2 manual. In particular, Chapters
-&quot;7 Locales and Internationalization&quot;
-
-<p>
-Drepper, Ulrich, Thread-Aware Locale Model, A proposal. This is a
-draft document describing the design of glibc 2.3 MT locale
-functionality.
-</p>
-
-<p>
-Drepper, Ulrich, Numerous, late-night email correspondence
-</p>
-
-<p>
-ISO/IEC 9899:1999 Programming languages - C
-</p>
-
-<p>
-ISO/IEC 14882:1998 Programming languages - C++
-</p>
-
-<p>
-Java 2 Platform, Standard Edition, v 1.3.1 API Specification. In
-particular, java.util.Properties, java.text.MessageFormat,
-java.util.Locale, java.util.ResourceBundle.
-http://java.sun.com/j2se/1.3/docs/api
-</p>
-
-<p>
-System Interface Definitions, Issue 7 (IEEE Std. 1003.1-200x)
-The Open Group/The Institute of Electrical and Electronics Engineers, Inc.
-In particular see lines 5268-5427.
-http://www.opennc.org/austin/docreg.html
-</p>
-
-<p> GNU gettext tools, version 0.10.38, Native Language Support
-Library and Tools.
-http://sources.redhat.com/gettext
-</p>
-
-<p>
-Langer, Angelika and Klaus Kreft, Standard C++ IOStreams and Locales,
-Advanced Programmer's Guide and Reference, Addison Wesley Longman,
-Inc. 2000. See page 725, Internationalized Messages.
-</p>
-
-<p>
-Stroustrup, Bjarne, Appendix D, The C++ Programming Language, Special Edition, Addison Wesley, Inc. 2000
-</p>
-
-</body>
-</html>
-
diff --git a/libstdc++-v3/docs/html/23_containers/howto.html b/libstdc++-v3/docs/html/23_containers/howto.html
deleted file mode 100644
index 55415affd95..00000000000
--- a/libstdc++-v3/docs/html/23_containers/howto.html
+++ /dev/null
@@ -1,459 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 23." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 23: Containers</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../22_locale/howto.html" type="text/html"
- title="Localization" />
-<link rel="Next" href="../24_iterators/howto.html" type="text/html"
- title="Iterators" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 23: Containers</a></h1>
-
-<p>Chapter 23 deals with container classes and what they offer.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Making code unaware of the container/array difference</a></li>
- <li><a href="#2">Variable-sized bitmasks</a></li>
- <li><a href="#3">Containers and multithreading</a></li>
- <li><a href="#4">&quot;Hinting&quot; during insertion</a></li>
- <li><a href="#5">Bitmasks and string arguments</a></li>
- <li><a href="#6"><code>std::list::size()</code> is O(n)!</a></li>
- <li><a href="#7">Space overhead management for vectors</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Making code unaware of the container/array difference</a></h2>
- <p>You're writing some code and can't decide whether to use builtin
- arrays or some kind of container. There are compelling reasons
- to use one of the container classes, but you're afraid that you'll
- eventually run into difficulties, change everything back to arrays,
- and then have to change all the code that uses those data types to
- keep up with the change.
- </p>
- <p>If your code makes use of the standard algorithms, this isn't as
- scary as it sounds. The algorithms don't know, nor care, about
- the kind of &quot;container&quot; on which they work, since the
- algorithms are only given endpoints to work with. For the container
- classes, these are iterators (usually <code>begin()</code> and
- <code>end()</code>, but not always). For builtin arrays, these are
- the address of the first element and the
- <a href="../24_iterators/howto.html#2">past-the-end</a> element.
- </p>
- <p>Some very simple wrapper functions can hide all of that from the
- rest of the code. For example, a pair of functions called
- <code>beginof</code> can be written, one that takes an array, another
- that takes a vector. The first returns a pointer to the first
- element, and the second returns the vector's <code>begin()</code>
- iterator.
- </p>
- <p>The functions should be made template functions, and should also
- be declared inline. As pointed out in the comments in the code
- below, this can lead to <code>beginof</code> being optimized out of
- existence, so you pay absolutely nothing in terms of increased
- code size or execution time.
- </p>
- <p>The result is that if all your algorithm calls look like
- </p>
- <pre>
- std::transform(beginof(foo), endof(foo), beginof(foo), SomeFunction);</pre>
- <p>then the type of foo can change from an array of ints to a vector
- of ints to a deque of ints and back again, without ever changing any
- client code.
- </p>
- <p>This author has a collection of such functions, called &quot;*of&quot;
- because they all extend the builtin &quot;sizeof&quot;. It started
- with some Usenet discussions on a transparent way to find the length
- of an array. A simplified and much-reduced version for easier
- reading is <a href="wrappers_h.txt">given here</a>.
- </p>
- <p>Astute readers will notice two things at once: first, that the
- container class is still a <code>vector&lt;T&gt;</code> instead of a
- more general <code>Container&lt;T&gt;</code>. This would mean that
- three functions for <code>deque</code> would have to be added, another
- three for <code>list</code>, and so on. This is due to problems with
- getting template resolution correct; I find it easier just to
- give the extra three lines and avoid confusion.
- </p>
- <p>Second, the line
- </p>
- <pre>
- inline unsigned int lengthof (T (&amp;)[sz]) { return sz; } </pre>
- <p>looks just weird! Hint: unused parameters can be left nameless.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Variable-sized bitmasks</a></h2>
- <p>No, you cannot write code of the form
- </p>
- <!-- Careful, the leading spaces in PRE show up directly. -->
- <pre>
- #include &lt;bitset&gt;
-
- void foo (size_t n)
- {
- std::bitset&lt;n&gt; bits;
- ....
- } </pre>
- <p>because <code>n</code> must be known at compile time. Your compiler is
- correct; it is not a bug. That's the way templates work. (Yes, it
- <em>is</em> a feature.)
- </p>
- <p>There are a couple of ways to handle this kind of thing. Please
- consider all of them before passing judgement. They include, in
- no particular order:
- </p>
- <ul>
- <li>A very large N in <code>bitset&lt;N&gt;</code>.</li>
- <li>A container&lt;bool&gt;.</li>
- <li>Extremely weird solutions.</li>
- </ul>
- <p><strong>A very large N in
- <code>bitset&lt;N&gt;</code>.&nbsp;&nbsp;</strong> It has
- been pointed out a few times in newsgroups that N bits only takes up
- (N/8) bytes on most systems, and division by a factor of eight is pretty
- impressive when speaking of memory. Half a megabyte given over to a
- bitset (recall that there is zero space overhead for housekeeping info;
- it is known at compile time exactly how large the set is) will hold over
- four million bits. If you're using those bits as status flags (e.g.,
- &quot;changed&quot;/&quot;unchanged&quot; flags), that's a <em>lot</em>
- of state.
- </p>
- <p>You can then keep track of the &quot;maximum bit used&quot; during some
- testing runs on representative data, make note of how many of those bits
- really need to be there, and then reduce N to a smaller number. Leave
- some extra space, of course. (If you plan to write code like the
- incorrect example above, where the bitset is a local variable, then you
- may have to talk your compiler into allowing that much stack space;
- there may be zero space overhead, but it's all allocated inside the
- object.)
- </p>
- <p><strong>A container&lt;bool&gt;.&nbsp;&nbsp;</strong> The Committee
- made provision
- for the space savings possible with that (N/8) usage previously mentioned,
- so that you don't have to do wasteful things like
- <code>Container&lt;char&gt;</code> or
- <code>Container&lt;short int&gt;</code>.
- Specifically, <code>vector&lt;bool&gt;</code> is required to be
- specialized for that space savings.
- </p>
- <p>The problem is that <code>vector&lt;bool&gt;</code> doesn't behave like a
- normal vector anymore. There have been recent journal articles which
- discuss the problems (the ones by Herb Sutter in the May and
- July/August 1999 issues of
- <u>C++ Report</u> cover it well). Future revisions of the ISO C++
- Standard will change the requirement for <code>vector&lt;bool&gt;</code>
- specialization. In the meantime, <code>deque&lt;bool&gt;</code> is
- recommended (although its behavior is sane, you probably will not get
- the space savings, but the allocation scheme is different than that
- of vector).
- </p>
- <p><strong>Extremely weird solutions.&nbsp;&nbsp;</strong> If you have
- access to
- the compiler and linker at runtime, you can do something insane, like
- figuring out just how many bits you need, then writing a temporary
- source code file. That file contains an instantiation of
- <code>bitset</code>
- for the required number of bits, inside some wrapper functions with
- unchanging signatures. Have your program then call the
- compiler on that file using Position Independent Code, then open the
- newly-created object file and load those wrapper functions. You'll have
- an instantiation of <code>bitset&lt;N&gt;</code> for the exact
- <code>N</code>
- that you need at the time. Don't forget to delete the temporary files.
- (Yes, this <em>can</em> be, and <em>has been</em>, done.)
- </p>
- <!-- I wonder if this next paragraph will get me in trouble... -->
- <p>This would be the approach of either a visionary genius or a raving
- lunatic, depending on your programming and management style. Probably
- the latter.
- </p>
- <p>Which of the above techniques you use, if any, are up to you and your
- intended application. Some time/space profiling is indicated if it
- really matters (don't just guess). And, if you manage to do anything
- along the lines of the third category, the author would love to hear
- from you...
- </p>
- <p>Also note that the implementation of bitset used in libstdc++-v3 has
- <a href="../ext/sgiexts.html#ch23">some extensions</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Containers and multithreading</a></h2>
- <p>This section discusses issues surrounding the design of
- multithreaded applications which use Standard C++ containers.
- All information in this section is current as of the gcc 3.0
- release and all later point releases. Although earlier gcc
- releases had a different approach to threading configuration and
- proper compilation, the basic code design rules presented here
- were similar. For information on all other aspects of
- multithreading as it relates to libstdc++, including details on
- the proper compilation of threaded code (and compatibility between
- threaded and non-threaded code), see Chapter 17.
- </p>
- <p>Two excellent pages to read when working with the Standard C++
- containers and threads are
- <a href="http://www.sgi.com/tech/stl/thread_safety.html">SGI's
- http://www.sgi.com/tech/stl/thread_safety.html</a> and
- <a href="http://www.sgi.com/tech/stl/Allocators.html">SGI's
- http://www.sgi.com/tech/stl/Allocators.html</a>.
- </p>
- <p><em>However, please ignore all discussions about the user-level
- configuration of the lock implementation inside the STL
- container-memory allocator on those pages. For the sake of this
- discussion, libstdc++-v3 configures the SGI STL implementation,
- not you. This is quite different from how gcc pre-3.0 worked.
- In particular, past advice was for people using g++ to
- explicitly define _PTHREADS or other macros or port-specific
- compilation options on the command line to get a thread-safe
- STL. This is no longer required for any port and should no
- longer be done unless you really know what you are doing and
- assume all responsibility.</em>
- </p>
- <p>Since the container implementation of libstdc++-v3 uses the SGI
- code, we use the same definition of thread safety as SGI when
- discussing design. A key point that beginners may miss is the
- fourth major paragraph of the first page mentioned above
- (&quot;For most clients,&quot;...), which points out that
- locking must nearly always be done outside the container, by
- client code (that'd be you, not us). There is a notable
- exceptions to this rule. Allocators called while a container or
- element is constructed uses an internal lock obtained and
- released solely within libstdc++-v3 code (in fact, this is the
- reason STL requires any knowledge of the thread configuration).
- </p>
- <p>For implementing a container which does its own locking, it is
- trivial to provide a wrapper class which obtains the lock (as
- SGI suggests), performs the container operation, and then
- releases the lock. This could be templatized <em>to a certain
- extent</em>, on the underlying container and/or a locking
- mechanism. Trying to provide a catch-all general template
- solution would probably be more trouble than it's worth.
- </p>
- <p>The STL implementation is currently configured to use the
- high-speed caching memory allocator. Some people like to
- test and/or normally run threaded programs with a different
- default. For all details about how to globally override this
- at application run-time see <a href="../ext/howto.html#3">here</a>.
- </p>
- <p>There is a better way (not standardized yet): It is possible to
- force the malloc-based allocator on a per-case-basis for some
- application code. The library team generally believes that this
- is a better way to tune an application for high-speed using this
- implementation of the STL. There is
- <a href="../ext/howto.html#3">more information on allocators here</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">&quot;Hinting&quot; during insertion</a></h2>
- <p>Section [23.1.2], Table 69, of the C++ standard lists this function
- for all of the associative containers (map, set, etc):
- </p>
- <pre>
- a.insert(p,t);</pre>
- <p>where 'p' is an iterator into the container 'a', and 't' is the item
- to insert. The standard says that &quot;iterator p is a hint
- pointing to where the insert should start to search,&quot; but
- specifies nothing more. (LWG Issue #233, currently in review,
- addresses this topic, but I will ignore it here because it is not yet
- finalized.)
- </p>
- <p>Here we'll describe how the hinting works in the libstdc++-v3
- implementation, and what you need to do in order to take advantage of
- it. (Insertions can change from logarithmic complexity to amortized
- constant time, if the hint is properly used.) Also, since the current
- implementation is based on the SGI STL one, these points may hold true
- for other library implementations also, since the HP/SGI code is used
- in a lot of places.
- </p>
- <p>In the following text, the phrases <em>greater than</em> and <em>less
- than</em> refer to the results of the strict weak ordering imposed on
- the container by its comparison object, which defaults to (basically)
- &quot;&lt;&quot;. Using those phrases is semantically sloppy, but I
- didn't want to get bogged down in syntax. I assume that if you are
- intelligent enough to use your own comparison objects, you are also
- intelligent enough to assign &quot;greater&quot; and &quot;lesser&quot;
- their new meanings in the next paragraph. *grin*
- </p>
- <p>If the <code>hint</code> parameter ('p' above) is equivalent to:
- </p>
- <ul>
- <li><code>begin()</code>, then the item being inserted should have a key
- less than all the other keys in the container. The item will
- be inserted at the beginning of the container, becoming the new
- entry at <code>begin()</code>.
- </li>
- <li><code>end()</code>, then the item being inserted should have a key
- greater than all the other keys in the container. The item will
- be inserted at the end of the container, becoming the new entry
- at <code>end()</code>.
- </li>
- <li>neither <code>begin()</code> nor <code>end()</code>, then: Let <code>h</code>
- be the entry in the container pointed to by <code>hint</code>, that
- is, <code>h = *hint</code>. Then the item being inserted should have
- a key less than that of <code>h</code>, and greater than that of the
- item preceding <code>h</code>. The new item will be inserted
- between <code>h</code> and <code>h</code>'s predecessor.
- </li>
- </ul>
- <p>For <code>multimap</code> and <code>multiset</code>, the restrictions are
- slightly looser: &quot;greater than&quot; should be replaced by
- &quot;not less than&quot; and &quot;less than&quot; should be replaced
- by &quot;not greater than.&quot; (Why not replace greater with
- greater-than-or-equal-to? You probably could in your head, but the
- mathematicians will tell you that it isn't the same thing.)
- </p>
- <p>If the conditions are not met, then the hint is not used, and the
- insertion proceeds as if you had called <code> a.insert(t) </code>
- instead. (<strong>Note </strong> that GCC releases prior to 3.0.2
- had a bug in the case with <code>hint == begin()</code> for the
- <code>map</code> and <code>set</code> classes. You should not use a hint
- argument in those releases.)
- </p>
- <p>This behavior goes well with other container's <code>insert()</code>
- functions which take an iterator: if used, the new item will be
- inserted before the iterator passed as an argument, same as the other
- containers. The exception
- (in a sense) is with a hint of <code>end()</code>: the new item will
- actually be inserted after <code>end()</code>, but it also becomes the
- new <code>end()</code>.
- </p>
- <p><strong>Note </strong> also that the hint in this implementation is a
- one-shot. The insertion-with-hint routines check the immediately
- surrounding entries to ensure that the new item would in fact belong
- there. If the hint does not point to the correct place, then no
- further local searching is done; the search begins from scratch in
- logarithmic time. (Further local searching would only increase the
- time required when the hint is too far off.)
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="5">Bitmasks and string arguments</a></h2>
- <p>Bitmasks do not take char* nor const char* arguments in their
- constructors. This is something of an accident, but you can read
- about the problem: follow the library's &quot;Links&quot; from the
- homepage, and from the C++ information &quot;defect reflector&quot;
- link, select the library issues list. Issue number 116 describes the
- problem.
- </p>
- <p>For now you can simply make a temporary string object using the
- constructor expression:
- </p>
- <pre>
- std::bitset&lt;5&gt; b ( std::string(&quot;10110&quot;) );
- </pre>
- instead of
- <pre>
- std::bitset&lt;5&gt; b ( &quot;10110&quot; ); // invalid
- </pre>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="6"><code>std::list::size()</code> is O(n)!</a></h2>
- <p>Yes it is, and that's okay. This is a decision that we preserved when
- we imported SGI's STL implementation. The following is quoted from
- <a href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</a>:
- </p>
- <blockquote>
- <p>The size() member function, for list and slist, takes time
- proportional to the number of elements in the list. This was a
- deliberate tradeoff. The only way to get a constant-time size() for
- linked lists would be to maintain an extra member variable containing
- the list's size. This would require taking extra time to update that
- variable (it would make splice() a linear time operation, for example),
- and it would also make the list larger. Many list algorithms don't
- require that extra word (algorithms that do require it might do better
- with vectors than with lists), and, when it is necessary to maintain
- an explicit size count, it's something that users can do themselves.
- </p>
- <p>This choice is permitted by the C++ standard. The standard says that
- size() &quot;should&quot; be constant time, and &quot;should&quot;
- does not mean the same thing as &quot;shall&quot;. This is the
- officially recommended ISO wording for saying that an implementation
- is supposed to do something unless there is a good reason not to.
- </p>
- <p>One implication of linear time size(): you should never write
- </p>
- <pre>
- if (L.size() == 0)
- ...</pre>
- Instead, you should write
- <pre>
- if (L.empty())
- ...</pre>
- </blockquote>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="7">Space overhead management for vectors</a></h2>
- <p>In
- <a href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
- message to the list</a>, Daniel Kostecky announced work on an
- alternate form of <code>std::vector</code> that would support hints
- on the number of elements to be over-allocated. The design was also
- described, along with possible implementation choices.
- </p>
- <p>The first two alpha releases were announced
- <a href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html">here</a>
- and
- <a href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</a>.
- The releases themselves are available at
- <a href="http://www.kotelna.sk/dk/sw/caphint/">
- http://www.kotelna.sk/dk/sw/caphint/</a>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/23_containers/wrappers_h.txt b/libstdc++-v3/docs/html/23_containers/wrappers_h.txt
deleted file mode 100644
index 53b59204220..00000000000
--- a/libstdc++-v3/docs/html/23_containers/wrappers_h.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/*****************************************************************
- * Functions to help treat arrays in a uniform manner. These were
- * inspired by a thread on comp.lang.c++.moderated, started by Dietmar
- * Kuehl and contributed to by the rest of the entire planet.
- *
- * beginof (x), endof (x), lengthof (x) now accompany sizeof, where x
- * can be either a container (currently only sequences) or a builtin
- * array (/not/ a pointer). The beginof/endof are intended for use in
- * the algorithms library, and lengthof is a "sizing" function.
- *
- * Note example:
- * char an_array [17];
- * cerr << lengthof(an_array) << endl;
- * produces assembly code of
- * mov 17,register0
- * call ofstream_put
- * i.e., the template function inlining really does work; g++
- * requires -O3 (or -finline-functions) before it does this, though.
- *
- * pedwards 13Nov98
-*/
-// beginof
-template <class T>
- inline typename vector<T>::iterator beginof (vector<T> &v)
- { return v.begin(); }
-
-template <class T, unsigned int sz>
- inline T* beginof (T (&array)[sz]) { return array; }
-
-
-// endof
-template <class T>
- inline typename vector<T>::iterator endof (vector<T> &v)
- { return v.end(); }
-
-template <class T, unsigned int sz>
- inline T* endof (T (&array)[sz]) { return array + sz; }
-
-
-// lengthof
-template <class T>
- inline typename vector<T>::size_type lengthof (vector<T> &v)
- { return v.size(); }
-
-template <class T, unsigned int sz>
- inline unsigned int lengthof (T (&)[sz]) { return sz; }
-
diff --git a/libstdc++-v3/docs/html/24_iterators/howto.html b/libstdc++-v3/docs/html/24_iterators/howto.html
deleted file mode 100644
index 43d199d7454..00000000000
--- a/libstdc++-v3/docs/html/24_iterators/howto.html
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 24." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 24: Iterators</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../23_containers/howto.html" type="text/html"
- title="Containers" />
-<link rel="Next" href="../25_algorithms/howto.html" type="text/html"
- title="Algorithms" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 24: Iterators</a></h1>
-
-<p>Chapter 24 deals with the FORTRAN subroutines for automatically
- transforming lemmings into gold.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">They ain't pointers!</a></li>
- <li><a href="#2">It ends <em>where?</em></a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">They ain't pointers!</a></h2>
- <p><a href="../faq/index.html#5_1">FAQ 5.1</a> points out that iterators
- are not implemented as pointers. They are a generalization of
- pointers, but they are implemented in libstdc++-v3 as separate classes.
- </p>
- <p>Keeping that simple fact in mind as you design your code will
- prevent a whole lot of difficult-to-understand bugs.
- </p>
- <p>You can think of it the other way 'round, even. Since iterators
- are a generalization, that means that <em>pointers</em> are
- <em>iterators</em>, and that pointers can be used whenever an
- iterator would be. All those functions in the Algorithms chapter
- of the Standard will work just as well on plain arrays and their
- pointers.
- </p>
- <p>That doesn't mean that when you pass in a pointer, it gets wrapped
- into some special delegating iterator-to-pointer class with a layer
- of overhead. (If you think that's the case anywhere, you don't
- understand templates to begin with...) Oh, no; if you pass
- in a pointer, then the compiler will instantiate that template
- using T* as a type, and good old high-speed pointer arithmetic as
- its operations, so the resulting code will be doing exactly the same
- things as it would be doing if you had hand-coded it yourself (for
- the 273rd time).
- </p>
- <p>How much overhead <em>is</em> there when using an iterator class?
- Very little. Most of the layering classes contain nothing but
- typedefs, and typedefs are &quot;meta-information&quot; that simply
- tell the compiler some nicknames; they don't create code. That
- information gets passed down through inheritance, so while the
- compiler has to do work looking up all the names, your runtime code
- does not. (This has been a prime concern from the beginning.)
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">It ends <em>where?</em></a></h2>
- <p>This starts off sounding complicated, but is actually very easy,
- especially towards the end. Trust me.
- </p>
- <p>Beginners usually have a little trouble understand the whole
- 'past-the-end' thing, until they remember their early algebra classes
- (see, they <em>told</em> you that stuff would come in handy!) and
- the concept of half-open ranges.
- </p>
- <p>First, some history, and a reminder of some of the funkier rules in
- C and C++ for builtin arrays. The following rules have always been
- true for both languages:
- </p>
- <ol>
- <li>You can point anywhere in the array, <em>or to the first element
- past the end of the array</em>. A pointer that points to one
- past the end of the array is guaranteed to be as unique as a
- pointer to somewhere inside the array, so that you can compare
- such pointers safely.
- </li>
- <li>You can only dereference a pointer that points into an array.
- If your array pointer points outside the array -- even to just
- one past the end -- and you dereference it, Bad Things happen.
- </li>
- <li>Strictly speaking, simply pointing anywhere else invokes
- undefined behavior. Most programs won't puke until such a
- pointer is actually dereferenced, but the standards leave that
- up to the platform.
- </li>
- </ol>
- <p>The reason this past-the-end addressing was allowed is to make it
- easy to write a loop to go over an entire array, e.g.,
- while (*d++ = *s++);.
- </p>
- <p>So, when you think of two pointers delimiting an array, don't think
- of them as indexing 0 through n-1. Think of them as <em>boundary
- markers</em>:
- </p>
- <pre>
-
- beginning end
- | |
- | | This is bad. Always having to
- | | remember to add or subtract one.
- | | Off-by-one bugs very common here.
- V V
- array of N elements
- |---|---|--...--|---|---|
- | 0 | 1 | ... |N-2|N-1|
- |---|---|--...--|---|---|
-
- ^ ^
- | |
- | | This is good. This is safe. This
- | | is guaranteed to work. Just don't
- | | dereference 'end'.
- beginning end
-
- </pre>
- <p>See? Everything between the boundary markers is part of the array.
- Simple.
- </p>
- <p>Now think back to your junior-high school algebra course, when you
- were learning how to draw graphs. Remember that a graph terminating
- with a solid dot meant, &quot;Everything up through this point,&quot;
- and a graph terminating with an open dot meant, &quot;Everything up
- to, but not including, this point,&quot; respectively called closed
- and open ranges? Remember how closed ranges were written with
- brackets, <em>[a,b]</em>, and open ranges were written with parentheses,
- <em>(a,b)</em>?
- </p>
- <p>The boundary markers for arrays describe a <em>half-open range</em>,
- starting with (and including) the first element, and ending with (but
- not including) the last element: <em>[beginning,end)</em>. See, I
- told you it would be simple in the end.
- </p>
- <p>Iterators, and everything working with iterators, follows this same
- time-honored tradition. A container's <code>begin()</code> method returns
- an iterator referring to the first element, and its <code>end()</code>
- method returns a past-the-end iterator, which is guaranteed to be
- unique and comparable against any other iterator pointing into the
- middle of the container.
- </p>
- <p>Container constructors, container methods, and algorithms, all take
- pairs of iterators describing a range of values on which to operate.
- All of these ranges are half-open ranges, so you pass the beginning
- iterator as the starting parameter, and the one-past-the-end iterator
- as the finishing parameter.
- </p>
- <p>This generalizes very well. You can operate on sub-ranges quite
- easily this way; functions accepting a <em>[first,last)</em> range
- don't know or care whether they are the boundaries of an entire {array,
- sequence, container, whatever}, or whether they only enclose a few
- elements from the center. This approach also makes zero-length
- sequences very simple to recognize: if the two endpoints compare
- equal, then the {array, sequence, container, whatever} is empty.
- </p>
- <p>Just don't dereference <code>end()</code>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/25_algorithms/howto.html b/libstdc++-v3/docs/html/25_algorithms/howto.html
deleted file mode 100644
index fe45f3237e1..00000000000
--- a/libstdc++-v3/docs/html/25_algorithms/howto.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 25." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 25: Algorithms</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../24_iterators/howto.html" type="text/html"
- title="Iterators" />
-<link rel="Next" href="../26_numerics/howto.html" type="text/html"
- title="Numerics" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 25: Algorithms</a></h1>
-
-<p>Chapter 25 deals with the generalized subroutines for automatically
- transforming lemmings into gold.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Prerequisites</a></li>
- <li><a href="#2">Special <code>swap</code>s</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Prerequisites</a></h2>
- <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:
- </p>
- <ol>
- <li>Anything that behaves like an iterator can be used in one of
- these algorithms. Raw pointers make great candidates, thus
- built-in arrays are fine containers, as well as your own iterators.
- </li>
- <li>The algorithms do not (and cannot) affect the container as a
- whole; only the things between the two iterator endpoints. If
- you pass a range of iterators only enclosing the middle third of
- a container, then anything outside that range is inviolate.
- </li>
- </ol>
- <p>Even strings can be fed through the algorithms here, although the
- string class has specialized versions of many of these functions (for
- example, <code>string::find()</code>). Most of the examples on this
- page will use simple arrays of integers as a playground for
- algorithms, just to keep things simple.
- <a name="Nsize">The use of <strong>N</strong></a> as a size in the
- examples is to keep things easy to read but probably won't be valid
- code. You can use wrappers such as those described in the
- <a href="../23_containers/howto.html">containers chapter</a> to keep
- real code readable.
- </p>
- <p>The single thing that trips people up the most is the definition of
- <em>range</em> used with iterators; the famous
- &quot;past-the-end&quot; rule that everybody loves to hate. The
- <a href="../24_iterators/howto.html#2">iterators chapter</a> of this
- document has a complete explanation of this simple rule that seems to
- cause so much confusion. Once you get <em>range</em> into your head
- (it's not that hard, honest!), then the algorithms are a cakewalk.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Special <code>swap</code>s</a></h2>
- <p>If you call <code> std::swap(x,y); </code> where x and y are standard
- containers, then the call will automatically be replaced by a call to
- <code> x.swap(y); </code> instead.
- </p>
- <p>This allows member functions of each container class to take over, and
- containers' swap functions should have O(1) complexity according to
- the standard. (And while &quot;should&quot; allows implementations to
- behave otherwise and remain compliant, this implementation does in
- fact use constant-time swaps.) This should not be surprising, since
- for two containers of the same type to swap contents, only some
- internal pointers to storage need to be exchanged.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/26_numerics/howto.html b/libstdc++-v3/docs/html/26_numerics/howto.html
deleted file mode 100644
index 48dc84c355b..00000000000
--- a/libstdc++-v3/docs/html/26_numerics/howto.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 26." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 26: Numerics</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../25_algorithms/howto.html" type="text/html"
- title="Algorithms" />
-<link rel="Next" href="../27_io/howto.html" type="text/html"
- title="Input/Output" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 26: Numerics</a></h1>
-
-<p>Chapter 26 deals with building block abstractions to aid in
- numerical computing:
-</p>
-<ul>
- <li>Template data structures such as <code>valarray&lt;&gt;</code>
- and <code>complex&lt;&gt;</code>.
- </li>
- <li>Template numerical functions such as <code>accumulate</code>,
- <code>inner_product</code>, <code>partial_sum</code>, and
- <code>adjacent_difference</code>.
- </li>
-</ul>
-<p>All of the Standard C math functions are of course included in C++,
- and overloaded versions for <code>long</code>, <code>float</code>, and
- <code>long double</code> have been added for all of them.
-</p>
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Complex Number Processing</a></li>
- <li><a href="#2">Array Processing</a></li>
- <li><a href="#3">Numerical Functions</a></li>
- <li><a href="#4">C99</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Complex Number Processing</a></h2>
- <p>Using <code>complex&lt;&gt;</code> becomes even more comple- er, sorry,
- <em>complicated</em>, with the not-quite-gratuitously-incompatible
- addition of complex types to the C language. David Tribble has
- compiled a list of C++98 and C99 conflict points; his description of
- C's new type versus those of C++ and how to get them playing together
- nicely is
-<a href="http://david.tribble.com/text/cdiffs.htm#C99-complex">here</a>.
- </p>
- <p><code>complex&lt;&gt;</code> is intended to be instantiated with a
- floating-point type. As long as you meet that and some other basic
- requirements, then the resulting instantiation has all of the usual
- math operators defined, as well as definitions of <code>op&lt;&lt;</code>
- and <code>op&gt;&gt;</code> that work with iostreams: <code>op&lt;&lt;</code>
- prints <code>(u,v)</code> and <code>op&gt;&gt;</code> can read <code>u</code>,
- <code>(u)</code>, and <code>(u,v)</code>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Array Processing</a></h2>
- <p>One of the major reasons why FORTRAN can chew through numbers so well
- is that it is defined to be free of pointer aliasing, an assumption
- that C89 is not allowed to make, and neither is C++98. C99 adds a new
- keyword, <code>restrict</code>, to apply to individual pointers. The
- C++ solution is contained in the library rather than the language
- (although many vendors can be expected to add this to their compilers
- as an extension).
- </p>
- <p>That library solution is a set of two classes, five template classes,
- and &quot;a whole bunch&quot; of functions. The classes are required
- to be free of pointer aliasing, so compilers can optimize the
- daylights out of them the same way that they have been for FORTRAN.
- They are collectively called <code>valarray</code>, although strictly
- speaking this is only one of the five template classes, and they are
- designed to be familiar to people who have worked with the BLAS
- libraries before.
- </p>
- <p>Some more stuff should go here once somebody has time to write it.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Numerical Functions</a></h2>
- <p>There are four generalized functions in the &lt;numeric&gt; header
- that follow the same conventions as those in &lt;algorithm&gt;. Each
- of them is overloaded: one signature for common default operations,
- and a second for fully general operations. Their names are
- self-explanatory to anyone who works with numerics on a regular basis:
- </p>
- <ul>
- <li><code>accumulate</code></li>
- <li><code>inner_product</code></li>
- <li><code>partial_sum</code></li>
- <li><code>adjacent_difference</code></li>
- </ul>
- <p>Here is a simple example of the two forms of <code>accumulate</code>.
- </p>
- <pre>
- int ar[50];
- int someval = somefunction();
-
- // ...initialize members of ar to something...
-
- int sum = std::accumulate(ar,ar+50,0);
- int sum_stuff = std::accumulate(ar,ar+50,someval);
- int product = std::accumulate(ar,ar+50,1,std::multiplies&lt;int&gt;());
- </pre>
- <p>The first call adds all the members of the array, using zero as an
- initial value for <code>sum</code>. The second does the same, but uses
- <code>someval</code> as the starting value (thus, <code>sum_stuff == sum +
- someval</code>). The final call uses the second of the two signatures,
- and multiplies all the members of the array; here we must obviously
- use 1 as a starting value instead of 0.
- </p>
- <p>The other three functions have similar dual-signature forms.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">C99</a></h2>
- <p>In addition to the other topics on this page, we'll note here some
- of the C99 features that appear in libstdc++-v3.
- </p>
- <p>The C99 features depend on the <code>--enable-c99</code> configure flag.
- This flag is already on by default, but it can be disabled by the
- user. Also, the configuration machinery will disable it if the
- necessary support for C99 (e.g., header files) cannot be found.
- </p>
- <p>As of GCC 3.0, C99 support includes classification functions
- such as <code>isnormal</code>, <code>isgreater</code>,
- <code>isnan</code>, etc.
- The functions used for 'long long' support such as <code>strtoll</code>
- are supported, as is the <code>lldiv_t</code> typedef. Also supported
- are the wide character functions using 'long long', like
- <code>wcstoll</code>.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt b/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt
deleted file mode 100644
index 65d79c996c5..00000000000
--- a/libstdc++-v3/docs/html/27_io/binary_iostreams_kanze.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-
-From: James Kanze <kanze@gabi-soft.de>
-Newsgroups: comp.lang.c++.moderated
-Subject: Re: binary iostreams ?
-Date: 3 Feb 2001 14:28:19 -0500
-Message-ID: <86lmro86qp.fsf@alex.gabi-soft.de>
-
-"Plinio Conti" <plinio.contiNO@SPAMMINGmclink.it> writes:
-
-|> Why std c++ library stream classes are only text-oriented?
-
-Because that is the only universally recognized format.
-
-|> I mean, if I want to write an int, a float, etc. AS IT IS I can't
-|> use streams, because they write and read a human readable text
-|> format of numbers.
-
-Correct.
-
-|> Does anyone know how to solve the problem?
-
-It depends on what you really want to do. If you are just dumping a
-block of memory to disk, in order to free up memory, and will reread it
-later in the same run of the same program, ostream::write and
-istream::read are what you need. Note, however, that this ony works 1)
-in the same run of the same program, and 2) for PODs without pointers.
-
-If you are writing something that will be read by another program, or a
-later run of the same program, you'll have to define a specific format
-to use, and implement streams to input and output that. If you are
-writing something that will be read by an existing program, or be
-transmitted over a network to another machine, you will have to find out
-what protocol is expected, and adher to it.
-
-|> Any public library?
-
-Not that I know of. I think that there is a library somewhere that
-outputs in format RPC, or maybe some Internet format.
-
-|> What do you think about this choice?
-
-What other choice is possible? It's not reasonable to ask the standard
-to support all binary formats, and it's not reasonable for it to favor
-any one of them. Given that, what else can you do.
-
---
-James Kanze mailto:kanze@gabi-soft.de
-Conseils en informatique orientée objet/
- Beratung in objektorientierter Datenverarbeitung
-Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627
-
diff --git a/libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt b/libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt
deleted file mode 100644
index 901701ff480..00000000000
--- a/libstdc++-v3/docs/html/27_io/binary_iostreams_kuehl.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-
-From: kuehl@ramsen.informatik.uni-konstanz.de (Dietmar Kuehl)
-Newsgroups: comp.std.c++
-Subject: Re: binary iostreams ?
-Date: Sat, 3 Feb 2001 17:17:49 GMT
-Message-ID: <95hctq$suu$2@news.BelWue.DE>
-
-Hi,
-Plinio Conti (plinio.contiNO@SPAMMINGmclink.it) wrote:
-: Why std c++ library stream classes are only text-oriented?
-
-There is only a text oriented front end to stream buffers because text
-input and output does not vary between platforms. This is very
-different for binary output. For example, binary output has to consider
-
-- word sizes: Is an 'int' two, four, or eight bytes long? The same
- questions arise for all other built-in types.
-
-- what is the bit pattern of a value? I think that at least implicitly
- in the standard a binary representation for integer types is required.
- I don't think that it is required to use two's complement. In any
- case, the floating point representations do differ, eg. in their
- number of bytes used.
-
-- what "endianess" is to be used?
-
-Basically it is possible to decide a format for each of those. This,
-however, implies inefficient implementations on platforms where the
-format does not match the internal representation.
-
-What many people asking for binary I/O forget is that binary I/O also
-requires some form of formatting! Assuming that just writing data and
-then reading it in will work is asking for problems, eg. when the
-compiler version changes and they decided to use a 32 bit integer
-rather than a 16 bit integer: It is not even necessary to switch
-platforms to run into problems!
-
-: I mean, if I want to write an int, a float, etc. AS IT IS I can't use
-: streams, because they write and read a human readable text format of
-: numbers.
-
-Which is for most I/O a reasonable approach. If it is not for you, you
-might want to consider a data base: File I/O is not really useful as a
-persistance mechanism. It is fine eg. for user interaction (text I/O),
-logging (text I/O), cross platfrom program interaction (formatted I/O),
-and data exchange (formatted I/O). In all these cases, the I/O is
-formatted, although possible using a binary format. For persistance,
-data bases are used. Depending on your needs, a relational or an object
-oriented one may be better suited.
-
-That said, it is worth to mention that it is easy to create a hierarchy
-similar to IOStreams built on top of stream buffers but doing binary
-formatting. A somewhat aged example is found at
-<ftp://ftp.fmi.uni-konstanz.de/pub/algo/personal/kuehl/binio.tar.gz>.
-This uses XDR formatting of the binary data (well, if I remmeber
-correctly, it is easy to plug in a different binary formatting).
-
-: Does anyone know how to solve the problem?
-
-Use a data base, text formatting, or binary formatting. With the
-details you have given it is impossible to tell which of those is the
-right approach because you haven't told *why* you want a binary format
-and *what* you want to do. That basically means that you came up with
-solution and you want us to confirm that it is the right one without
-telling us what problem is solved! Until I have seen the problem I
-doubt that binary I/O is the right approach...
-
-... and, BTW, using 'std::istream::read()' and 'std::ostream::write()'
-is almost certainly the *wrong* approach! These functions are an
-historical mistake which should have been corrected in the standard:
-It is my understanding that these methods were present in the IOStream
-version predating the rework from Jerry Schwartz and were left in to
-be compatible with the earlier stuff although they were not necessary:
-You could get binary I/O from the stream buffer level. The original
-IOStream library (maybe you remember using <stream.h>) did not have
-stream buffers and thus basic support for binary I/O was also present
-on the streams level.
-
-: What do you think about this choice?
-
-When I wrote the above paragraph about confirming your choice, I haven't
-read this question! As I said above: You told us what solution you have
-choosen without stating what problem is solved. We cannot determine
-whether your choice is the right one. Actually, I'm pretty sure it is
-the wrong one but without seen the details I can't be certain.
---
-<mailto:dietmar_kuehl@yahoo.com> <http://www.dietmar-kuehl.de/>
-Phaidros eaSE - Easy Software Engineering: <http://www.phaidros.com/>
-
diff --git a/libstdc++-v3/docs/html/27_io/howto.html b/libstdc++-v3/docs/html/27_io/howto.html
deleted file mode 100644
index 14720537b95..00000000000
--- a/libstdc++-v3/docs/html/27_io/howto.html
+++ /dev/null
@@ -1,779 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="HOWTO for the libstdc++ chapter 27." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Chapter 27: Input/Output</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../26_numerics/howto.html" type="text/html"
- title="Numerics" />
-<link rel="Next" href="../ext/howto.html" type="text/html"
- title="Extensions" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-<link rel="Help" href="../faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Chapter 27: Input/Output</a></h1>
-
-<p>Chapter 27 deals with iostreams and all their subcomponents
- and extensions. All <em>kinds</em> of fun stuff.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Copying a file</a></li>
- <li><a href="#2">The buffering is screwing up my program!</a></li>
- <li><a href="#3">Binary I/O</a></li>
- <li><a href="#5">What is this &lt;sstream&gt;/stringstreams thing?</a></li>
- <li><a href="#6">Deriving a stream buffer</a></li>
- <li><a href="#7">More on binary I/O</a></li>
- <li><a href="#8">Pathetic performance? Ditch C.</a></li>
- <li><a href="#9">Threads and I/O</a></li>
- <li><a href="#10">Which header?</a></li>
- <li><a href="#11">Using FILE*s and file descriptors with IOStreams</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Copying a file</a></h2>
- <p>So you want to copy a file quickly and easily, and most important,
- completely portably. And since this is C++, you have an open
- ifstream (call it IN) and an open ofstream (call it OUT):
- </p>
- <pre>
- #include &lt;fstream&gt;
-
- std::ifstream IN ("input_file");
- std::ofstream OUT ("output_file"); </pre>
- <p>Here's the easiest way to get it completely wrong:
- </p>
- <pre>
- OUT &lt;&lt; IN;</pre>
- <p>For those of you who don't already know why this doesn't work
- (probably from having done it before), I invite you to quickly
- create a simple text file called &quot;input_file&quot; containing
- the sentence
- </p>
- <pre>
- The quick brown fox jumped over the lazy dog.</pre>
- <p>surrounded by blank lines. Code it up and try it. The contents
- of &quot;output_file&quot; may surprise you.
- </p>
- <p>Seriously, go do it. Get surprised, then come back. It's worth it.
- </p>
- <hr width="60%" />
- <p>The thing to remember is that the <code>basic_[io]stream</code> classes
- handle formatting, nothing else. In particular, they break up on
- whitespace. The actual reading, writing, and storing of data is
- handled by the <code>basic_streambuf</code> family. Fortunately, the
- <code>operator&lt;&lt;</code> is overloaded to take an ostream and
- a pointer-to-streambuf, in order to help with just this kind of
- &quot;dump the data verbatim&quot; situation.
- </p>
- <p>Why a <em>pointer</em> to streambuf and not just a streambuf? Well,
- the [io]streams hold pointers (or references, depending on the
- implementation) to their buffers, not the actual
- buffers. This allows polymorphic behavior on the part of the buffers
- as well as the streams themselves. The pointer is easily retrieved
- using the <code>rdbuf()</code> member function. Therefore, the easiest
- way to copy the file is:
- </p>
- <pre>
- OUT &lt;&lt; IN.rdbuf();</pre>
- <p>So what <em>was</em> happening with OUT&lt;&lt;IN? Undefined
- behavior, since that particular &lt;&lt; isn't defined by the Standard.
- I have seen instances where it is implemented, but the character
- extraction process removes all the whitespace, leaving you with no
- blank lines and only &quot;Thequickbrownfox...&quot;. With
- libraries that do not define that operator, IN (or one of IN's
- member pointers) sometimes gets converted to a void*, and the output
- file then contains a perfect text representation of a hexadecimal
- address (quite a big surprise). Others don't compile at all.
- </p>
- <p>Also note that none of this is specific to o<b>*f*</b>streams.
- The operators shown above are all defined in the parent
- basic_ostream class and are therefore available with all possible
- descendants.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">The buffering is screwing up my program!</a></h2>
-<!--
- This is not written very well. I need to redo this section.
--->
- <p>First, are you sure that you understand buffering? Particularly
- the fact that C++ may not, in fact, have anything to do with it?
- </p>
- <p>The rules for buffering can be a little odd, but they aren't any
- different from those of C. (Maybe that's why they can be a bit
- odd.) Many people think that writing a newline to an output
- stream automatically flushes the output buffer. This is true only
- when the output stream is, in fact, a terminal and not a file
- or some other device -- and <em>that</em> may not even be true
- since C++ says nothing about files nor terminals. All of that is
- system-dependent. (The &quot;newline-buffer-flushing only occurring
- on terminals&quot; thing is mostly true on Unix systems, though.)
- </p>
- <p>Some people also believe that sending <code>endl</code> down an
- output stream only writes a newline. This is incorrect; after a
- newline is written, the buffer is also flushed. Perhaps this
- is the effect you want when writing to a screen -- get the text
- out as soon as possible, etc -- but the buffering is largely
- wasted when doing this to a file:
- </p>
- <pre>
- output &lt;&lt; &quot;a line of text&quot; &lt;&lt; endl;
- output &lt;&lt; some_data_variable &lt;&lt; endl;
- output &lt;&lt; &quot;another line of text&quot; &lt;&lt; endl; </pre>
- <p>The proper thing to do in this case to just write the data out
- and let the libraries and the system worry about the buffering.
- If you need a newline, just write a newline:
- </p>
- <pre>
- output &lt;&lt; &quot;a line of text\n&quot;
- &lt;&lt; some_data_variable &lt;&lt; '\n'
- &lt;&lt; &quot;another line of text\n&quot;; </pre>
- <p>I have also joined the output statements into a single statement.
- You could make the code prettier by moving the single newline to
- the start of the quoted text on the last line, for example.
- </p>
- <p>If you do need to flush the buffer above, you can send an
- <code>endl</code> if you also need a newline, or just flush the buffer
- yourself:
- </p>
- <pre>
- output &lt;&lt; ...... &lt;&lt; flush; // can use std::flush manipulator
- output.flush(); // or call a member fn </pre>
- <p>On the other hand, there are times when writing to a file should
- be like writing to standard error; no buffering should be done
- because the data needs to appear quickly (a prime example is a
- log file for security-related information). The way to do this is
- just to turn off the buffering <em>before any I/O operations at
- all</em> have been done (note that opening counts as an I/O operation):
- </p>
- <pre>
- std::ofstream os;
- std::ifstream is;
- int i;
-
- os.rdbuf()-&gt;pubsetbuf(0,0);
- is.rdbuf()-&gt;pubsetbuf(0,0);
-
- os.open(&quot;/foo/bar/baz&quot;);
- is.open(&quot;/qux/quux/quuux&quot;);
- ...
- os &lt;&lt; &quot;this data is written immediately\n&quot;;
- is &gt;&gt; i; // and this will probably cause a disk read </pre>
- <p>Since all aspects of buffering are handled by a streambuf-derived
- member, it is necessary to get at that member with <code>rdbuf()</code>.
- Then the public version of <code>setbuf</code> can be called. The
- arguments are the same as those for the Standard C I/O Library
- function (a buffer area followed by its size).
- </p>
- <p>A great deal of this is implementation-dependent. For example,
- <code>streambuf</code> does not specify any actions for its own
- <code>setbuf()</code>-ish functions; the classes derived from
- <code>streambuf</code> each define behavior that &quot;makes
- sense&quot; for that class: an argument of (0,0) turns off buffering
- for <code>filebuf</code> but does nothing at all for its siblings
- <code>stringbuf</code> and <code>strstreambuf</code>, and specifying
- anything other than (0,0) has varying effects.
- User-defined classes derived from <code>streambuf</code> can
- do whatever they want. (For <code>filebuf</code> and arguments for
- <code>(p,s)</code> other than zeros, libstdc++ does what you'd expect:
- the first <code>s</code> bytes of <code>p</code> are used as a buffer,
- which you must allocate and deallocate.)
- </p>
- <p>A last reminder: there are usually more buffers involved than
- just those at the language/library level. Kernel buffers, disk
- buffers, and the like will also have an effect. Inspecting and
- changing those are system-dependent.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="3">Binary I/O</a></h2>
- <p>The first and most important thing to remember about binary I/O is
- that opening a file with <code>ios::binary</code> is not, repeat
- <em>not</em>, the only thing you have to do. It is not a silver
- bullet, and will not allow you to use the <code>&lt;&lt;/&gt;&gt;</code>
- operators of the normal fstreams to do binary I/O.
- </p>
- <p>Sorry. Them's the breaks.
- </p>
- <p>This isn't going to try and be a complete tutorial on reading and
- writing binary files (because &quot;binary&quot;
- <a href="#7">covers a lot of ground)</a>, but we will try and clear
- up a couple of misconceptions and common errors.
- </p>
- <p>First, <code>ios::binary</code> has exactly one defined effect, no more
- and no less. Normal text mode has to be concerned with the newline
- characters, and the runtime system will translate between (for
- example) '\n' and the appropriate end-of-line sequence (LF on Unix,
- CRLF on DOS, CR on Macintosh, etc). (There are other things that
- normal mode does, but that's the most obvious.) Opening a file in
- binary mode disables this conversion, so reading a CRLF sequence
- under Windows won't accidentally get mapped to a '\n' character, etc.
- Binary mode is not supposed to suddenly give you a bitstream, and
- if it is doing so in your program then you've discovered a bug in
- your vendor's compiler (or some other part of the C++ implementation,
- possibly the runtime system).
- </p>
- <p>Second, using <code>&lt;&lt;</code> to write and <code>&gt;&gt;</code> to
- read isn't going to work with the standard file stream classes, even
- if you use <code>skipws</code> during reading. Why not? Because
- ifstream and ofstream exist for the purpose of <em>formatting</em>,
- not reading and writing. Their job is to interpret the data into
- text characters, and that's exactly what you don't want to happen
- during binary I/O.
- </p>
- <p>Third, using the <code>get()</code> and <code>put()/write()</code> member
- functions still aren't guaranteed to help you. These are
- &quot;unformatted&quot; I/O functions, but still character-based.
- (This may or may not be what you want, see below.)
- </p>
- <p>Notice how all the problems here are due to the inappropriate use
- of <em>formatting</em> functions and classes to perform something
- which <em>requires</em> that formatting not be done? There are a
- seemingly infinite number of solutions, and a few are listed here:
- </p>
- <ul>
- <li>&quot;Derive your own fstream-type classes and write your own
- &lt;&lt;/&gt;&gt; operators to do binary I/O on whatever data
- types you're using.&quot; This is a Bad Thing, because while
- the compiler would probably be just fine with it, other humans
- are going to be confused. The overloaded bitshift operators
- have a well-defined meaning (formatting), and this breaks it.
- </li>
- <li>&quot;Build the file structure in memory, then <code>mmap()</code>
- the file and copy the structure.&quot; Well, this is easy to
- make work, and easy to break, and is pretty equivalent to
- using <code>::read()</code> and <code>::write()</code> directly, and
- makes no use of the iostream library at all...
- </li>
- <li>&quot;Use streambufs, that's what they're there for.&quot;
- While not trivial for the beginner, this is the best of all
- solutions. The streambuf/filebuf layer is the layer that is
- responsible for actual I/O. If you want to use the C++
- library for binary I/O, this is where you start.
- </li>
- </ul>
- <p>How to go about using streambufs is a bit beyond the scope of this
- document (at least for now), but while streambufs go a long way,
- they still leave a couple of things up to you, the programmer.
- As an example, byte ordering is completely between you and the
- operating system, and you have to handle it yourself.
- </p>
- <p>Deriving a streambuf or filebuf
- class from the standard ones, one that is specific to your data
- types (or an abstraction thereof) is probably a good idea, and
- lots of examples exist in journals and on Usenet. Using the
- standard filebufs directly (either by declaring your own or by
- using the pointer returned from an fstream's <code>rdbuf()</code>)
- is certainly feasible as well.
- </p>
- <p>One area that causes problems is trying to do bit-by-bit operations
- with filebufs. C++ is no different from C in this respect: I/O
- must be done at the byte level. If you're trying to read or write
- a few bits at a time, you're going about it the wrong way. You
- must read/write an integral number of bytes and then process the
- bytes. (For example, the streambuf functions take and return
- variables of type <code>int_type</code>.)
- </p>
- <p>Another area of problems is opening text files in binary mode.
- Generally, binary mode is intended for binary files, and opening
- text files in binary mode means that you now have to deal with all of
- those end-of-line and end-of-file problems that we mentioned before.
- An instructive thread from comp.lang.c++.moderated delved off into
- this topic starting more or less at
- <a href="http://groups.google.com/groups?oi=djq&selm=an_436187505">this</a>
- article and continuing to the end of the thread. (You'll have to
- sort through some flames every couple of paragraphs, but the points
- made are good ones.)
- </p>
-
-<hr />
-<h2><a name="5">What is this &lt;sstream&gt;/stringstreams thing?</a></h2>
- <p>Stringstreams (defined in the header <code>&lt;sstream&gt;</code>)
- are in this author's opinion one of the coolest things since
- sliced time. An example of their use is in the Received Wisdom
- section for Chapter 21 (Strings),
- <a href="../21_strings/howto.html#1.1internal"> describing how to
- format strings</a>.
- </p>
- <p>The quick definition is: they are siblings of ifstream and ofstream,
- and they do for <code>std::string</code> what their siblings do for
- files. All that work you put into writing <code>&lt;&lt;</code> and
- <code>&gt;&gt;</code> functions for your classes now pays off
- <em>again!</em> Need to format a string before passing the string
- to a function? Send your stuff via <code>&lt;&lt;</code> to an
- ostringstream. You've read a string as input and need to parse it?
- Initialize an istringstream with that string, and then pull pieces
- out of it with <code>&gt;&gt;</code>. Have a stringstream and need to
- get a copy of the string inside? Just call the <code>str()</code>
- member function.
- </p>
- <p>This only works if you've written your
- <code>&lt;&lt;</code>/<code>&gt;&gt;</code> functions correctly, though,
- and correctly means that they take istreams and ostreams as
- parameters, not i<b>f</b>streams and o<b>f</b>streams. If they
- take the latter, then your I/O operators will work fine with
- file streams, but with nothing else -- including stringstreams.
- </p>
- <p>If you are a user of the strstream classes, you need to update
- your code. You don't have to explicitly append <code>ends</code> to
- terminate the C-style character array, you don't have to mess with
- &quot;freezing&quot; functions, and you don't have to manage the
- memory yourself. The strstreams have been officially deprecated,
- which means that 1) future revisions of the C++ Standard won't
- support them, and 2) if you use them, people will laugh at you.
- </p>
-
-<hr />
-<h2><a name="6">Deriving a stream buffer</a></h2>
- <p>Creating your own stream buffers for I/O can be remarkably easy.
- If you are interested in doing so, we highly recommend two very
- excellent books:
- <a href="http://www.langer.camelot.de/iostreams.html">Standard C++
- IOStreams and Locales</a> by Langer and Kreft, ISBN 0-201-18395-1, and
- <a href="http://www.josuttis.com/libbook/">The C++ Standard Library</a>
- by Nicolai Josuttis, ISBN 0-201-37926-0. Both are published by
- Addison-Wesley, who isn't paying us a cent for saying that, honest.
- </p>
- <p>Here is a simple example, io/outbuf1, from the Josuttis text. It
- transforms everything sent through it to uppercase. This version
- assumes many things about the nature of the character type being
- used (for more information, read the books or the newsgroups):
- </p>
- <pre>
- #include &lt;iostream&gt;
- #include &lt;streambuf&gt;
- #include &lt;locale&gt;
- #include &lt;cstdio&gt;
-
- class outbuf : public std::streambuf
- {
- protected:
- /* central output function
- * - print characters in uppercase mode
- */
- virtual int_type overflow (int_type c) {
- if (c != EOF) {
- // convert lowercase to uppercase
- c = std::toupper(static_cast&lt;char&gt;(c),getloc());
-
- // and write the character to the standard output
- if (putchar(c) == EOF) {
- return EOF;
- }
- }
- return c;
- }
- };
-
- int main()
- {
- // create special output buffer
- outbuf ob;
- // initialize output stream with that output buffer
- std::ostream out(&amp;ob);
-
- out &lt;&lt; "31 hexadecimal: "
- &lt;&lt; std::hex &lt;&lt; 31 &lt;&lt; std::endl;
- return 0;
- }
- </pre>
- <p>Try it yourself! More examples can be found in 3.1.x code, in
- <code>include/ext/*_filebuf.h</code>, and on
- <a href="http://www.informatik.uni-konstanz.de/~kuehl/c++/iostream/">Dietmar
- K&uuml;hl's IOStreams page</a>.
- </p>
-
-<hr />
-<h2><a name="7">More on binary I/O</a></h2>
- <p>Towards the beginning of February 2001, the subject of
- &quot;binary&quot; 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&uuml;hl separately posted articles on why attempting
- generic binary I/O was not a good idea. (Here are copies of
- <a href="binary_iostreams_kanze.txt">Kanze's article</a> and
- <a href="binary_iostreams_kuehl.txt">K&uuml;hl's article</a>.)
- </p>
- <p>Briefly, the problems of byte ordering and type sizes mean that
- the unformatted functions like <code>ostream::put()</code> and
- <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 &quot;binary iostreams&quot; on both comp.std.c++
- and comp.lang.c++.moderated in parallel. Also in that thread,
- Dietmar K&uuml;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>
-
-<hr />
-<h2><a name="8">Pathetic performance? Ditch C.</a></h2>
- <p>It sounds like a flame on C, but it isn't. Really. Calm down.
- I'm just saying it to get your attention.
- </p>
- <p>Because the C++ library includes the C library, both C-style and
- C++-style I/O have to work at the same time. For example:
- </p>
- <pre>
- #include &lt;iostream&gt;
- #include &lt;cstdio&gt;
-
- std::cout &lt;&lt; &quot;Hel&quot;;
- std::printf (&quot;lo, worl&quot;);
- std::cout &lt;&lt; &quot;d!\n&quot;;
- </pre>
- <p>This must do what you think it does.
- </p>
- <p>Alert members of the audience will immediately notice that buffering
- is going to make a hash of the output unless special steps are taken.
- </p>
- <p>The special steps taken by libstdc++, at least for version 3.0,
- involve doing very little buffering for the standard streams, leaving
- most of the buffering to the underlying C library. (This kind of
- thing is <a href="../explanations.html#cstdio">tricky to get right</a>.)
- The upside is that correctness is ensured. The downside is that
- writing through <code>cout</code> can quite easily lead to awful
- performance when the C++ I/O library is layered on top of the C I/O
- library (as it is for 3.0 by default). Some patches have been applied
- which improve the situation for 3.1.
- </p>
- <p>However, the C and C++ standard streams only need to be kept in sync
- when both libraries' facilities are in use. If your program only uses
- C++ I/O, then there's no need to sync with the C streams. The right
- thing to do in this case is to call
- </p>
- <pre>
- #include <em>any of the I/O headers such as ios, iostream, etc</em>
-
- std::ios::sync_with_stdio(false);
- </pre>
- <p>You must do this before performing any I/O via the C++ stream objects.
- Once you call this, the C++ streams will operate independently of the
- (unused) C streams. For GCC 3.x, this means that <code>cout</code> and
- company will become fully buffered on their own.
- </p>
- <p>Note, by the way, that the synchronization requirement only applies to
- the standard streams (<code>cin</code>, <code>cout</code>,
- <code>cerr</code>,
- <code>clog</code>, and their wide-character counterparts). File stream
- objects that you declare yourself have no such requirement and are fully
- buffered.
- </p>
-
-<hr />
-<h2><a name="9">Threads and I/O</a></h2>
- <p>I'll assume that you have already read the
- <a href="../17_intro/howto.html#3">general notes on library threads</a>,
- and the
- <a href="../23_containers/howto.html#3">notes on threaded container
- access</a> (you might not think of an I/O stream as a container, but
- the points made there also hold here). If you have not read them,
- please do so first.
- </p>
- <p>This gets a bit tricky. Please read carefully, and bear with me.
- </p>
- <h3>Structure</h3>
- <p>As described <a href="../explanations.html#cstdio">here</a>, a wrapper
- type called <code>__basic_file</code> provides our abstraction layer
- for the <code>std::filebuf</code> classes. Nearly all decisions dealing
- with actual input and output must be made in <code>__basic_file</code>.
- </p>
- <p>A generic locking mechanism is somewhat in place at the filebuf layer,
- but is not used in the current code. Providing locking at any higher
- level is akin to providing locking within containers, and is not done
- for the same reasons (see the links above).
- </p>
- <h3>The defaults for 3.0.x</h3>
- <p>The __basic_file type is simply a collection of small wrappers around
- the C stdio layer (again, see the link under Structure). We do no
- locking ourselves, but simply pass through to calls to <code>fopen</code>,
- <code>fwrite</code>, and so forth.
- </p>
- <p>So, for 3.0, the question of &quot;is multithreading safe for I/O&quot;
- must be answered with, &quot;is your platform's C library threadsafe
- for I/O?&quot; Some are by default, some are not; many offer multiple
- implementations of the C library with varying tradeoffs of threadsafety
- and efficiency. You, the programmer, are always required to take care
- with multiple threads.
- </p>
- <p>(As an example, the POSIX standard requires that C stdio FILE*
- operations are atomic. POSIX-conforming C libraries (e.g, on Solaris
- and GNU/Linux) have an internal mutex to serialize operations on
- FILE*s. However, you still need to not do stupid things like calling
- <code>fclose(fs)</code> in one thread followed by an access of
- <code>fs</code> in another.)
- </p>
- <p>So, if your platform's C library is threadsafe, then your
- <code>fstream</code> I/O operations will be threadsafe at the lowest
- level. For higher-level operations, such as manipulating the data
- contained in the stream formatting classes (e.g., setting up callbacks
- inside an <code>std::ofstream</code>), you need to guard such accesses
- like any other critical shared resource.
- </p>
- <h3>The future</h3>
- <p>As already mentioned <a href="../explanations.html#cstdio">here</a>, a
- second choice is available for I/O implementations: libio. This is
- disabled by default, and in fact will not currently work due to other
- issues. It will be revisited, however.
- </p>
- <p>The libio code is a subset of the guts of the GNU libc (glibc) I/O
- implementation. When libio is in use, the <code>__basic_file</code>
- type is basically derived from FILE. (The real situation is more
- complex than that... it's derived from an internal type used to
- implement FILE. See libio/libioP.h to see scary things done with
- vtbls.) The result is that there is no &quot;layer&quot; of C stdio
- to go through; the filebuf makes calls directly into the same
- functions used to implement <code>fread</code>, <code>fwrite</code>,
- and so forth, using internal data structures. (And when I say
- &quot;makes calls directly,&quot; I mean the function is literally
- replaced by a jump into an internal function. Fast but frightening.
- *grin*)
- </p>
- <p>Also, the libio internal locks are used. This requires pulling in
- large chunks of glibc, such as a pthreads implementation, and is one
- of the issues preventing widespread use of libio as the libstdc++
- cstdio implementation.
- </p>
- <p>But we plan to make this work, at least as an option if not a future
- default. Platforms running a copy of glibc with a recent-enough
- version will see calls from libstdc++ directly into the glibc already
- installed. For other platforms, a copy of the libio subsection will
- be built and included in libstdc++.
- </p>
- <h3>Alternatives</h3>
- <p>Don't forget that other cstdio implementations are possible. You could
- easily write one to perform your own forms of locking, to solve your
- &quot;interesting&quot; problems.
- </p>
-
-<hr />
-<h2><a name="10">Which header?</a></h2>
- <p>To minimize the time you have to wait on the compiler, it's good to
- only include the headers you really need. Many people simply include
- &lt;iostream&gt; when they don't need to -- and that can <em>penalize
- your runtime as well.</em> Here are some tips on which header to use
- for which situations, starting with the simplest.
- </p>
- <p><strong>&lt;iosfwd&gt;</strong> should be included whenever you simply
- need the <em>name</em> of an I/O-related class, such as
- &quot;ofstream&quot; or &quot;basic_streambuf&quot;. Like the name
- implies, these are forward declarations. (A word to all you fellow
- old school programmers: trying to forward declare classes like
- &quot;class istream;&quot; won't work. Look in the iosfwd header if
- you'd like to know why.) For example,
- </p>
- <pre>
- #include &lt;iosfwd&gt;
-
- class MyClass
- {
- ....
- std::ifstream&amp; input_file;
- };
-
- extern std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, MyClass&amp;);
- </pre>
- <p><strong>&lt;ios&gt;</strong> declares the base classes for the entire
- I/O stream hierarchy, std::ios_base and std::basic_ios&lt;charT&gt;, the
- counting types std::streamoff and std::streamsize, the file
- positioning type std::fpos, and the various manipulators like
- std::hex, std::fixed, std::noshowbase, and so forth.
- </p>
- <p>The ios_base class is what holds the format flags, the state flags,
- and the functions which change them (setf(), width(), precision(),
- etc). You can also store extra data and register callback functions
- through ios_base, but that has been historically underused. Anything
- which doesn't depend on the type of characters stored is consolidated
- here.
- </p>
- <p>The template class basic_ios is the highest template class in the
- hierarchy; it is the first one depending on the character type, and
- holds all general state associated with that type: the pointer to the
- polymorphic stream buffer, the facet information, etc.
- </p>
- <p><strong>&lt;streambuf&gt;</strong> declares the template class
- basic_streambuf, and two standard instantiations, streambuf and
- wstreambuf. If you need to work with the vastly useful and capable
- stream buffer classes, e.g., to create a new form of storage
- transport, this header is the one to include.
- </p>
- <p><strong>&lt;istream&gt;</strong>/<strong>&lt;ostream&gt;</strong> are
- the headers to include when you are using the &gt;&gt;/&lt;&lt;
- interface, or any of the other abstract stream formatting functions.
- For example,
- </p>
- <pre>
- #include &lt;istream&gt;
-
- std::ostream&amp; operator&lt;&lt; (std::ostream&amp; os, MyClass&amp; c)
- {
- return os &lt;&lt; c.data1() &lt;&lt; c.data2();
- }
- </pre>
- <p>The std::istream and std::ostream classes are the abstract parents of
- the various concrete implementations. If you are only using the
- interfaces, then you only need to use the appropriate interface header.
- </p>
- <p><strong>&lt;iomanip&gt;</strong> provides &quot;extractors and inserters
- that alter information maintained by class ios_base and its derived
- classes,&quot; such as std::setprecision and std::setw. If you need
- to write expressions like <code>os &lt;&lt; setw(3);</code> or
- <code>is &gt;&gt; setbase(8);</code>, you must include &lt;iomanip&gt;.
- </p>
- <p><strong>&lt;sstream&gt;</strong>/<strong>&lt;fstream&gt;</strong>
- declare the six stringstream and fstream classes. As they are the
- standard concrete descendants of istream and ostream, you will already
- know about them.
- </p>
- <p>Finally, <strong>&lt;iostream&gt;</strong> provides the eight standard
- global objects (cin, cout, etc). To do this correctly, this header
- also provides the contents of the &lt;istream&gt; and &lt;ostream&gt;
- headers, but nothing else. The contents of this header look like
- </p>
- <pre>
- #include &lt;ostream&gt;
- #include &lt;istream&gt;
-
- namespace std
- {
- extern istream cin;
- extern ostream cout;
- ....
-
- // this is explained below
- <strong>static ios_base::Init __foo;</strong> // not its real name
- }
- </pre>
- <p>Now, the runtime penalty mentioned previously: the global objects
- must be initialized before any of your own code uses them; this is
- guaranteed by the standard. Like any other global object, they must
- be initialized once and only once. This is typically done with a
- construct like the one above, and the nested class ios_base::Init is
- specified in the standard for just this reason.
- </p>
- <p>How does it work? Because the header is included before any of your
- code, the <strong>__foo</strong> object is constructed before any of
- your objects. (Global objects are built in the order in which they
- are declared, and destroyed in reverse order.) The first time the
- constructor runs, the eight stream objects are set up.
- </p>
- <p>The <code>static</code> keyword means that each object file compiled
- from a source file containing &lt;iostream&gt; will have its own
- private copy of <strong>__foo</strong>. There is no specified order
- of construction across object files (it's one of those pesky NP
- problems that make life so interesting), so one copy in each object
- file means that the stream objects are guaranteed to be set up before
- any of your code which uses them could run, thereby meeting the
- requirements of the standard.
- </p>
- <p>The penalty, of course, is that after the first copy of
- <strong>__foo</strong> is constructed, all the others are just wasted
- processor time. The time spent is merely for an increment-and-test
- inside a function call, but over several dozen or hundreds of object
- files, that time can add up. (It's not in a tight loop, either.)
- </p>
- <p>The lesson? Only include &lt;iostream&gt; when you need to use one of
- the standard objects in that source file; you'll pay less startup
- time. Only include the header files you need to in general; your
- compile times will go down when there's less parsing work to do.
- </p>
-
-
-<hr />
-<h2><a name="11">Using FILE*s and file descriptors with IOStreams</a></h2>
- <!-- referenced by ext/howto.html#2, update link if numbering changes -->
- <p>The v2 library included non-standard extensions to construct
- <code>std::filebuf</code>s from C stdio types such as
- <code>FILE*</code>s and POSIX file descriptors.
- Today the recommended way to use stdio types with libstdc++-v3
- IOStreams is via the <code>stdio_filebuf</code> class (see below),
- but earlier releases provided slightly different mechanisms.
- </p>
- <ul>
- <li>3.0.x <code>filebuf</code>s have another ctor with this signature:
- <br />
- <code>basic_filebuf(__c_file_type*, ios_base::openmode, int_type);</code>
- <br />This comes in very handy in a number of places, such as
- attaching Unix sockets, pipes, and anything else which uses file
- descriptors, into the IOStream buffering classes. The three
- arguments are as follows:
- <ul>
- <li><code>__c_file_type* F </code>
- // the __c_file_type typedef usually boils down to stdio's FILE
- </li>
- <li><code>ios_base::openmode M </code>
- // same as all the other uses of openmode
- </li>
- <li><code>int_type B </code>
- // buffer size, defaults to BUFSIZ if not specified
- </li>
- </ul>
- For those wanting to use file descriptors instead of FILE*'s, I
- invite you to contemplate the mysteries of C's <code>fdopen()</code>.
- </li>
- <li>In library snapshot 3.0.95 and later, <code>filebuf</code>s bring
- back an old extension: the <code>fd()</code> member function. The
- integer returned from this function can be used for whatever file
- descriptors can be used for on your platform. Naturally, the
- library cannot track what you do on your own with a file descriptor,
- so if you perform any I/O directly, don't expect the library to be
- aware of it.
- </li>
- <li>Beginning with 3.1, the extra <code>filebuf</code> constructor and
- the <code>fd()</code> function were removed from the standard
- filebuf. Instead, <code>&lt;ext/stdio_filebuf.h&gt;</code> contains
- a derived class called
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/class____gnu__cxx_1_1stdio__filebuf.html"><code>__gnu_cxx::stdio_filebuf</code></a>.
- This class can be constructed from a C <code>FILE*</code> or a file
- descriptor, and provides the <code>fd()</code> function.
- </li>
- </ul>
- <p>If you want to access a <code>filebuf</code>s file descriptor to
- implement file locking (e.g. using the <code>fcntl()</code> system
- call) then you might be interested in Henry Suter's
- <a href="http://suter.home.cern.ch/suter/RWLock.html">RWLock</a>
- class.
- </p>
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
-
-
diff --git a/libstdc++-v3/docs/html/Makefile b/libstdc++-v3/docs/html/Makefile
deleted file mode 100644
index a0b335aaa2d..00000000000
--- a/libstdc++-v3/docs/html/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-
-PWD_COMMAND=$${PWDCMD-pwd}
-MAKEINFO=makeinfo
-INC=../../../gcc/doc/include
-
-all: documentation.html \
- faq/index.txt \
- 17_intro/confdeps.png \
- 17_intro/porting.html \
- 17_intro/porting-howto.html
-
-# chock full of GNUism, probably
-documentation.html: $(wildcard */howto.html)
- sed -n '1,/beginlist/p' $@ > tmp.top
- sed -n '/endlist/,$$p' $@ > tmp.bottom
- echo ' <ul>' > tmp.middle
- for i in [0-9]*/howto.html; do \
- title=`grep 'h1 ' $$i |\
- sed 's=.*\(Chapter [[:digit:]]*\):[[:space:]]*\(.*\)</a>.*=\2 (\1)='` ;\
- awk -v file=$$i -v "title=$$title" -f makedoc.awk $$i >> tmp.middle ;\
- done
- awk -v file=ext/howto.html -v "title=Extensions to the Standard Library"\
- -f makedoc.awk ext/howto.html >> tmp.middle ;\
- echo ' </ul>' >> tmp.middle
- cat tmp.top tmp.middle tmp.bottom > $@
- rm tmp.top tmp.middle tmp.bottom
-
-faq/index.txt: faq/index.html
- lynx -dump $< | sed "s%file://localhost`${PWD_COMMAND}`%..%" > $@
-
-17_intro/porting.html: 17_intro/porting.texi
- ${MAKEINFO} -I ${INC} --html --no-split $< -o $@
-
-# known to work under RH; this can be cleaned up later if needed
-17_intro/porting-howto.html: 17_intro/porting-howto.xml
- xltproc -o $@ /usr/share/xml/docbook/xsl-stylesheets-1.48-2/html/docbook.xsl $<
-
-17_intro/confdeps.png: 17_intro/confdeps.dot
- dot -Tpng -o $@ $<
-
-# vim:noet ts=4
diff --git a/libstdc++-v3/docs/html/abi.html b/libstdc++-v3/docs/html/abi.html
deleted file mode 100644
index 59828e5dd0b..00000000000
--- a/libstdc++-v3/docs/html/abi.html
+++ /dev/null
@@ -1,991 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="bkoz@gcc.gnu.org (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="C++, libstdc++, dynamic, shared, library, ABI, version" />
- <meta name="DESCRIPTION" content="C++ Standard Library ABI" />
- <meta name="GENERATOR" content="emacs and ten fingers" />
- <title>Standard C++ Library ABI</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Start" href="documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">C++ Standard Library ABI</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/abi.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/abi.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<h3 class="left">
- <a name="CXXinterface">The C++ interface</a>
-</h3>
-
-<p> C++ applications often dependent on specific language support
-routines, say for throwing exceptions, or catching exceptions, and
-perhaps also dependent on features in the C++ Standard Library.
-</p>
-
-<p> The C++ Standard Library has many include files, types defined in
-those include files, specific named functions, and other behavior. The
-text of these behaviors, as written in source include files, is called
-the Application Programing Interface, or API.
-</p>
-
-<p> Furthermore, C++ source that is compiled into object files is
- transformed by the compiler: it arranges objects with specific
- alignment and in a particular layout, mangling names according to a
- well-defined algorithm, has specific arrangements for the support of
- virtual functions, etc. These details are defined as the compiler
- Application Binary Interface, or ABI. The GNU C++ compiler uses an
- industry-standard C++ ABI starting with version 3. Details can be
- found in the <a href="http://www.codesourcery.com/cxx-abi/abi.html">
- ABI specification</a>.
-</p>
-
-<p>
- The GNU C++ compiler, g++, has a compiler command line option to
- switch between various different C++ ABIs. This explicit version
- switch is the flag <code> -fabi-version</code>. In addition, some
- g++ command line options may change the ABI as a side-effect of
- use. Such flags include <code>-fpack-struct</code> and
- <code>-fno-exceptions</code>, but include others: see the complete
- list in the GCC manual under the heading <a
- href="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code%20Gen%20Options">Options
- for Code Generation Conventions</a>.
-</p>
-
-<p> The configure options used when building a specific libstdc++
-version may also impact the resulting library ABI. The available
-configure options, and their impact on the library ABI, are documented
-<a href="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
-here</a>.
-</p>
-
-<p> Putting all of these ideas together results in the C++ Standard
-library ABI, which is the compilation of a given library API by a
-given compiler ABI. In a nutshell:
-</p>
-
-<code> library API + compiler ABI = library ABI</code>
-
-<p>
- The library ABI is mostly of interest for end-users who have
- unresolved symbols and are linking dynamically to the C++ Standard
- library, and who thus must be careful to compile their application
- with a compiler that is compatible with the available C++ Standard
- library binary. In this case, compatible is defined with the equation
- above: given an application compiled with a given compiler ABI and
- library API, it will work correctly with a Standard C++ Library
- created with the same constraints.
-</p>
-
-<p>
- To use a specific version of the C++ ABI, one must use a
- corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that
- implements the C++ ABI in question.
-</p>
-
-<h3 class="left">
- <a name="ABI_versioning">Versioning</a>
-</h3>
-
-<p> The C++ interface has evolved throughout the history of the GNU
-C++ toolchain. With each release, various details have been changed so
-as to give distinct versions to the C++ interface.
-</p>
-
-<h5 class="left">
- <a name="goals">Goals of versioning</a>
-</h5>
-
-<p>Extending existing, stable ABIs. Versioning gives subsequent stable
-releases series libraries the ability to add new symbols and add
-functionality, all the while retaining backwards compatibility with
-the previous releases in the series. Note: the reverse is not true. It
-is not possible to take binaries linked with the latest version of a
-release series (if symbols have been added) and expect the initial
-release of the series to remain link compatible.
-</p>
-
-<p>Allows multiple, incompatible ABIs to coexist at the same time.
-</p>
-
-<p>
-</p>
-
-<h5 class="left">
- <a name="details"> Version History </a>
-</h5>
-<p>
- How can this complexity be managed? What does C++ versioning mean?
- Because library and compiler changes often make binaries compiled
- with one version of the GNU tools incompatible with binaries
- compiled with other (either newer or older) versions of the same GNU
- tools, specific techniques are used to make managing this complexity
- easier.
-</p>
-
-<p>
- The following techniques are used:
-</p>
-
- <ul>
-
- <li> <p>Release versioning on the libgcc_s.so binary. This is
-implemented via file names and the ELF DT_SONAME mechanism (at least
-on ELF systems).</p>
-
- <p>It is versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.0: libgcc_s.so.1</li>
- <li>gcc-3.0.1: libgcc_s.so.1</li>
- <li>gcc-3.0.2: libgcc_s.so.1</li>
- <li>gcc-3.0.3: libgcc_s.so.1</li>
- <li>gcc-3.0.4: libgcc_s.so.1</li>
- <li>gcc-3.1.0: libgcc_s.so.1</li>
- <li>gcc-3.1.1: libgcc_s.so.1</li>
- <li>gcc-3.2.0: libgcc_s.so.1</li>
- <li>gcc-3.2.1: libgcc_s.so.1</li>
- <li>gcc-3.2.2: libgcc_s.so.1</li>
- <li>gcc-3.2.3: libgcc_s.so.1</li>
- <li>gcc-3.3.0: libgcc_s.so.1</li>
- <li>gcc-3.3.1: libgcc_s.so.1</li>
- <li>gcc-3.3.2: libgcc_s.so.1</li>
- <li>gcc-3.3.3: libgcc_s.so.1</li>
- <li>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: on m68k-linux and
- hppa-linux this is either libgcc_s.so.1 (when configuring
- <code>--with-sjlj-exceptions</code>) or libgcc_s.so.2. For all
- others, this is libgcc_s.so.1. </li> </ul>
- <p></p>
- </li>
-
- <li>Symbol versioning on the libgcc_s.so binary.
- <p>mapfile: gcc/libgcc-std.ver</p>
-
- <p>It is versioned with the following labels and version
- definitions, where the version definition is the maximum for a
- particular release. Labels are cumulative. If a particular release
- is not listed, it has the same version labels as the preceeding
- release.</p>
- <ul>
- <li>gcc-3.0.0: GCC_3.0</li>
- <li>gcc-3.3.0: GCC_3.3</li>
- <li>gcc-3.3.1: GCC_3.3.1</li>
- <li>gcc-3.3.2: GCC_3.3.2</li>
- <li>gcc-3.3.4: GCC_3.3.4</li>
- <li>gcc-3.4.0: GCC_3.4</li>
- <li>gcc-3.4.2: GCC_3.4.2</li>
- <li>gcc-3.4.4: GCC_3.4.4</li>
- <li>gcc-4.0.0: GCC_4.0.0</li>
- <li>gcc-4.1.0: GCC_4.1.0</li>
- <li>gcc-4.2.0: GCC_4.2.0</li>
- </ul>
- <p></p>
- </li>
-
- <li>Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above.
-
- <p>It is versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.0: libstdc++.so.3.0.0</li>
- <li>gcc-3.0.1: libstdc++.so.3.0.1</li>
- <li>gcc-3.0.2: libstdc++.so.3.0.2</li>
- <li>gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)</li>
- <li>gcc-3.0.4: libstdc++.so.3.0.4</li>
- <li>gcc-3.1.0: libstdc++.so.4.0.0</li>
- <li>gcc-3.1.1: libstdc++.so.4.0.1</li>
- <li>gcc-3.2.0: libstdc++.so.5.0.0</li>
- <li>gcc-3.2.1: libstdc++.so.5.0.1</li>
- <li>gcc-3.2.2: libstdc++.so.5.0.2</li>
- <li>gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)</li>
- <li>gcc-3.3.0: libstdc++.so.5.0.4</li>
- <li>gcc-3.3.1: libstdc++.so.5.0.5</li>
- <li>gcc-3.3.2: libstdc++.so.5.0.5</li>
- <li>gcc-3.3.3: libstdc++.so.5.0.5</li>
- <li>gcc-3.4.0: libstdc++.so.6.0.0</li>
- <li>gcc-3.4.1: libstdc++.so.6.0.1</li>
- <li>gcc-3.4.2: libstdc++.so.6.0.2</li>
- <li>gcc-3.4.3: libstdc++.so.6.0.3</li>
- <li>gcc-3.4.4: libstdc++.so.6.0.3</li>
- <li>gcc-3.4.5: libstdc++.so.6.0.3</li>
- <li>gcc-3.4.6: libstdc++.so.6.0.3</li>
- <li>gcc-4.0.0: libstdc++.so.6.0.4</li>
- <li>gcc-4.0.1: libstdc++.so.6.0.5</li>
- <li>gcc-4.0.2: libstdc++.so.6.0.6</li>
- <li>gcc-4.0.3: libstdc++.so.6.0.7</li>
- <li>gcc-4.1.0: libstdc++.so.6.0.7</li>
- <li>gcc-4.1.1: libstdc++.so.6.0.8</li>
- <li>gcc-4.1.2: libstdc++.so.6.0.8</li>
- <li>gcc-4.2.0: libstdc++.so.6.0.9</li>
- </ul>
- <p></p>
- </li>
-
- <li>Symbol versioning on the libstdc++.so binary.
-
- <p>mapfile: libstdc++-v3/config/linker-map.gnu</p>
- <p>It is versioned with the following labels and version
- definitions, where the version definition is the maximum for a
- particular release. Note, only symbol which are newly introduced
- will use the maximum version definition. Thus, for release series
- with the same label, but incremented version definitions, the later
- release has both versions. (An example of this would be the
- gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and
- GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0
- release.) If a particular release is not listed, it has the same
- version labels as the preceeding release.
- </p>
- <ul>
- <li>gcc-3.0.0: (Error, not versioned)</li>
- <li>gcc-3.0.1: (Error, not versioned)</li>
- <li>gcc-3.0.2: (Error, not versioned)</li>
- <li>gcc-3.0.3: (Error, not versioned)</li>
- <li>gcc-3.0.4: (Error, not versioned)</li>
- <li>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</li>
- <li>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</li>
- <li>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</li>
- <li>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</li>
- <li>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</li>
- <li>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</li>
- <li>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</li>
- <li>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</li>
- <li>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</li>
- <li>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</li>
- <li>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</li>
- <li>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</li>
- <li>gcc-3.4.2: GLIBCXX_3.4.2</li>
- <li>gcc-3.4.3: GLIBCXX_3.4.3</li>
- <li>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</li>
- <li>gcc-4.0.1: GLIBCXX_3.4.5</li>
- <li>gcc-4.0.2: GLIBCXX_3.4.6</li>
- <li>gcc-4.0.3: GLIBCXX_3.4.7</li>
- <li>gcc-4.1.1: GLIBCXX_3.4.8</li>
- <li>gcc-4.2.0: GLIBCXX_3.4.9</li>
- </ul>
- <p></p>
- </li>
-
- <li>
- <p>Incremental bumping of a compiler pre-defined macro,
- __GXX_ABI_VERSION. This macro is defined as the version of the
- compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
- be automatically defined whenever g++ is used (the curious can
- test this by invoking g++ with the '-v' flag.)
- </p>
-
- <p>
- This macro was defined in the file "lang-specs.h" in the gcc/cp directory.
- Later versions defined it in "c-common.c" in the gcc directory, and from
- G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the
- '-fabi-version' command line option.
- </p>
-
- <p>
- It is versioned as follows, where 'n' is given by '-fabi-version=n':
- </p>
- <ul>
- <li>gcc-3.0.x: 100</li>
- <li>gcc-3.1.x: 100 (Error, should be 101)</li>
- <li>gcc-3.2.x: 102</li>
- <li>gcc-3.3.x: 102</li>
- <li>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 102 (when n=1)</li>
- <li>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 1000 + n (when n&gt;1)</li>
- <li>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 999999 (when n=0)</li>
- </ul>
- <p></p>
- </li>
-
- <li>
- <p>Changes to the default compiler option for
- <code>-fabi-version</code>.
- </p>
- <p>
- It is versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.x: (Error, not versioned) </li>
- <li>gcc-3.1.x: (Error, not versioned) </li>
- <li>gcc-3.2.x: <code>-fabi-version=1</code></li>
- <li>gcc-3.3.x: <code>-fabi-version=1</code></li>
- <li>gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: <code>-fabi-version=2</code></li>
- </ul>
- <p></p>
- </li>
-
- <li>
- <p>Incremental bumping of a library pre-defined macro. For releases
- before 3.4.0, the macro is __GLIBCPP__. For later releases, it's
- __GLIBCXX__. (The libstdc++ project generously changed from CPP to
- CXX throughout its source to allow the "C" pre-processor the CPP
- macro namespace.) These macros are defined as the date the library
- was released, in compressed ISO date format, as an unsigned long.
- </p>
-
- <p>
- This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory. (Up to gcc-4.1.0, it was
- changed every night by an automated script. Since gcc-4.1.0, it is
- the same value as gcc/DATESTAMP.)
- </p>
- <p>
- It is versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.0: 20010615</li>
- <li>gcc-3.0.1: 20010819</li>
- <li>gcc-3.0.2: 20011023</li>
- <li>gcc-3.0.3: 20011220</li>
- <li>gcc-3.0.4: 20020220</li>
- <li>gcc-3.1.0: 20020514</li>
- <li>gcc-3.1.1: 20020725</li>
- <li>gcc-3.2.0: 20020814</li>
- <li>gcc-3.2.1: 20021119</li>
- <li>gcc-3.2.2: 20030205</li>
- <li>gcc-3.2.3: 20030422</li>
- <li>gcc-3.3.0: 20030513</li>
- <li>gcc-3.3.1: 20030804</li>
- <li>gcc-3.3.2: 20031016</li>
- <li>gcc-3.3.3: 20040214</li>
- <li>gcc-3.4.0: 20040419</li>
- <li>gcc-3.4.1: 20040701</li>
- <li>gcc-3.4.2: 20040906</li>
- <li>gcc-3.4.3: 20041105</li>
- <li>gcc-3.4.4: 20050519</li>
- <li>gcc-3.4.5: 20051201</li>
- <li>gcc-3.4.6: 20060306</li>
- <li>gcc-4.0.0: 20050421</li>
- <li>gcc-4.0.1: 20050707</li>
- <li>gcc-4.0.2: 20050921</li>
- <li>gcc-4.0.3: 20060309</li>
- <li>gcc-4.1.0: 20060228</li>
- <li>gcc-4.1.1: 20060524</li>
- <li>gcc-4.1.2: 20070214</li>
- <li>gcc-4.2.0: 20070514</li>
- </ul>
- <p></p>
- </li>
-
- <li>
- <p>
- Incremental bumping of a library pre-defined macro,
- _GLIBCPP_VERSION. This macro is defined as the released version of
- the library, as a string literal. This is only implemented in
- gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it
- is called _GLIBCXX_VERSION).
- </p>
-
- <p>
- This macro is defined in the file "c++config" in the
- "libstdc++-v3/include/bits" directory and is generated
- automatically by autoconf as part of the configure-time generation
- of config.h.
- </p>
-
- <p>
- It is versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.0: "3.0.0"</li>
- <li>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</li>
- <li>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</li>
- <li>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</li>
- <li>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</li>
- <li>gcc-3.1.0: "3.1.0"</li>
- <li>gcc-3.1.1: "3.1.1"</li>
- <li>gcc-3.2.0: "3.2"</li>
- <li>gcc-3.2.1: "3.2.1"</li>
- <li>gcc-3.2.2: "3.2.2"</li>
- <li>gcc-3.2.3: "3.2.3"</li>
- <li>gcc-3.3.0: "3.3"</li>
- <li>gcc-3.3.1: "3.3.1"</li>
- <li>gcc-3.3.2: "3.3.2"</li>
- <li>gcc-3.3.3: "3.3.3"</li>
- <li>gcc-3.4.x: "version-unused"</li>
- <li>gcc-4.0.x: "version-unused"</li>
- <li>gcc-4.1.x: "version-unused"</li>
- <li>gcc-4.2.x: "version-unused"</li>
- </ul>
- <p></p>
- </li>
-
- <li>
- <p>
- Matching each specific C++ compiler release to a specific set of
- C++ include files. This is only implemented in gcc-3.1.1 releases
- and higher.
- </p>
- <p>
- All C++ includes are installed in include/c++, then nest in a
- directory hierarchy corresponding to the C++ compiler's released
- version. This version corresponds to the variable "gcc_version" in
- "libstdc++-v3/acinclude.m4," and more details can be found in that
- file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).
- </p>
- <p>
- C++ includes are versioned as follows:
- </p>
- <ul>
- <li>gcc-3.0.0: include/g++-v3</li>
- <li>gcc-3.0.1: include/g++-v3</li>
- <li>gcc-3.0.2: include/g++-v3</li>
- <li>gcc-3.0.3: include/g++-v3</li>
- <li>gcc-3.0.4: include/g++-v3</li>
- <li>gcc-3.1.0: include/g++-v3</li>
- <li>gcc-3.1.1: include/c++/3.1.1</li>
- <li>gcc-3.2.0: include/c++/3.2</li>
- <li>gcc-3.2.1: include/c++/3.2.1</li>
- <li>gcc-3.2.2: include/c++/3.2.2</li>
- <li>gcc-3.2.3: include/c++/3.2.3</li>
- <li>gcc-3.3.0: include/c++/3.3</li>
- <li>gcc-3.3.1: include/c++/3.3.1</li>
- <li>gcc-3.3.2: include/c++/3.3.2</li>
- <li>gcc-3.3.3: include/c++/3.3.3</li>
- <li>gcc-3.4.0: include/c++/3.4.0</li>
- <li>gcc-3.4.1: include/c++/3.4.1</li>
- <li>gcc-3.4.2: include/c++/3.4.2</li>
- <li>gcc-3.4.3: include/c++/3.4.3</li>
- <li>gcc-3.4.4: include/c++/3.4.4</li>
- <li>gcc-3.4.5: include/c++/3.4.5</li>
- <li>gcc-3.4.6: include/c++/3.4.6</li>
- <li>gcc-4.0.0: include/c++/4.0.0</li>
- <li>gcc-4.0.1: include/c++/4.0.1</li>
- <li>gcc-4.0.2: include/c++/4.0.2</li>
- <li>gcc-4.0.3: include/c++/4.0.3</li>
- <li>gcc-4.1.0: include/c++/4.1.0</li>
- <li>gcc-4.1.1: include/c++/4.1.1</li>
- <li>gcc-4.1.2: include/c++/4.1.2</li>
- <li>gcc-4.2.0: include/c++/4.2.0</li>
- </ul>
- <p></p>
- </li>
- </ul>
-<p>
- Taken together, these techniques can accurately specify interface
- and implementation changes in the GNU C++ tools themselves. Used
- properly, they allow both the GNU C++ tools implementation, and
- programs using them, an evolving yet controlled development that
- maintains backward compatibility.
-</p>
-
-
-
-<h5 class="left">
- <a name="requirements"> Minimum requirements for a versioned ABI </a>
-</h5>
-<p>
- Minimum environment that supports a versioned ABI: A supported
- dynamic linker, a GNU linker of sufficient vintage to understand
- demangled C++ name globbing (ld), a shared executable compiled with
- g++, and shared libraries (libgcc_s, libstdc++-v3) compiled by a
- compiler (g++) with a compatible ABI. Phew.
-</p>
-
-<p>
- On top of all that, an additional constraint: libstdc++ did not
- attempt to version symbols (or age gracefully, really) until version
- 3.1.0.
-</p>
-
-<p>
- Most modern Linux and BSD versions, particularly ones using
- gcc-3.1.x tools and more recent vintages, will meet the requirements above.
-</p>
-
-
-<h5 class="left">
- <a name="config"> What configure options impact symbol versioning? </a>
-</h5>
-<p>
- It turns out that most of the configure options that change default
- behavior will impact the mangled names of exported symbols, and thus
- impact versioning and compatibility.
-</p>
-
-<p>
- For more information on configure options, including ABI impacts, see:
- http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
-</p>
-
-<p>
- There is one flag that explicitly deals with symbol versioning:
- --enable-symvers.
-</p>
-
-<p>
- In particular, libstdc++-v3/acinclude.m4 has a macro called
- GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed
- in via --enable-symvers=foo). At that point, the macro attempts to
- make sure that all the requirement for symbol versioning are in
- place. For more information, please consult acinclude.m4.
-</p>
-
-
-<h5 class="left">
- <a name="active"> How to tell if symbol versioning is, indeed, active? </a>
-</h5>
-<p>
- When the GNU C++ library is being built with symbol versioning on,
- you should see the following at configure time for libstdc++-v3:
-</p>
-
-
-<code> checking versioning on shared library symbols... gnu</code>
-
-<p>
- If you don't see this line in the configure output, or if this line
- appears but the last word is 'no', then you are out of luck.
-</p>
-
-<p>
- If the compiler is pre-installed, a quick way to test is to compile
- the following (or any) simple C++ file and link it to the shared
- libstdc++ library:
-</p>
-
-<pre>
-#include &lt;iostream&gt;
-
-int main()
-{ std::cout &lt;&lt; "hello" &lt;&lt; std::endl; return 0; }
-
-%g++ hello.cc -o hello.out
-
-%ldd hello.out
- libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
- libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
- libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
- libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
- /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
-
-%nm hello.out
-</pre>
-
-<p>
-If you see symbols in the resulting output with "GLIBCXX_3" as part
-of the name, then the executable is versioned. Here's an example:
-</p>
-
- <code> U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 </code>
-
-<h3 class="left">
- <a name="ABI_allowed">Library allowed ABI changes</a>
-</h3>
-<p>
-The following will cause the library minor version number to
-increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
-</p>
-<ul>
- <li>adding an exported global or static data member</li>
- <li>adding an exported function, static or non-virtual member function</li>
- <li>adding an exported symbol or symbols by additional instantiations</li>
-</ul>
-<p>
-</p>
-<p>
-Other allowed changes are possible.
-</p>
-
-
-<h3 class="left">
- <a name="ABI_disallowed">Library disallowed ABI changes</a>
-</h3>
-
-<p>
-The following non-exhaustive list will cause the library major version
-number to increase, say from "libstdc++.so.3.0.4" to
-"libstdc++.so.4.0.0".
-</p>
-<ul>
- <li>changes in the gcc/g++ compiler ABI</li>
-<li>changing size of an exported symbol</li>
-<li>changing alignment of an exported symbol</li>
-<li>changing the layout of an exported symbol</li>
-<li>changing mangling on an exported symbol</li>
-<li>deleting an exported symbol</li>
-<li>changing the inheritance properties of a type by adding or removing
- base classes</li>
-<li>
- changing the size, alignment, or layout of types
- specified in the C++ standard. These may not necessarily be
- instantiated or otherwise exported in the library binary, and
- include all the required locale facets, as well as things like
- std::basic_streambuf, et al.
-</li>
-
-<li> adding an explicit copy constructor or destructor to a
-class that would otherwise have implicit versions. This will change
-the way the compiler deals with this class in by-value return
-statements or parameters: instead of being passing instances of this
-class in registers, the compiler will be forced to use memory. See <a
-href="http://www.codesourcery.com/cxx-abi/abi.html#calls"> this part</a>
- of the C++ ABI documentation for further details.
- </li>
-
-</ul>
-
-<h3 class="left">
- <a name="implementation">Library implementation strategy</a> </h3>
-
-<ul>
- <li>Separation of interface and implementation
-<p>This is accomplished by two techniques that separate the API from
-the ABI: forcing undefined references to link against a library binary
-for definitions.
-</p>
-
- <dl>
- <dt>Include files have declarations, source files have defines</dt>
-
- <dd> For non-templatized types, such as much of <code>class
- locale</code>, the appropriate standard C++ include, say
- <code>locale</code>, can contain full declarations, while various
- source files (say <code> locale.cc, locale_init.cc,
- localename.cc</code>) contain definitions.</dd>
-
- <dt>Extern template on required types</dt>
-
- <dd>For parts of the standard that have an explicit list of required
- instantiations, the GNU extension syntax <code> extern template
- </code> can be used to control where template definitions
- reside. By marking required instantiations as <code> extern
- template </code> in include files, and providing explicit
- instantiations in the appropriate instantiation files, non-inlined
- template functions can be versioned. This technique is mostly used
- on parts of the standard that require <code> char</code> and <code>
- wchar_t</code> instantiations, and includes <code>
- basic_string</code>, the locale facets, and the types in <code>
- iostreams</code>.</dd>
-
- </dl>
- <p> In addition, these techniques have the additional benefit that
- they reduce binary size, which can increase runtime performance.
- </p>
- </li>
-
- <li>Namespaces linking symbol definitions to export mapfiles
-
-<p>All symbols in the shared library binary are processed by a linker
-script at build time that either allows or disallows external
-linkage. Because of this, some symbols, regardless of normal C/C++
-linkage, are not visible. Symbols that are internal have several
-appealing characteristics: by not exporting the symbols, there are no
-relocations when the shared library is started and thus this makes for
-faster runtime loading performance by the underlying dynamic loading
-mechanism. In addition, they have the possibility of changing without
-impacting ABI compatibility.
-</p>
-
-<p>The following namespaces are transformed by the mapfile:</p>
-
-<dl>
-<dt><code>namespace std</code></dt>
-<dd> Defaults to exporting all symbols in label
-<code>GLIBCXX</code> that do not begin with an underscore, ie
-<code>__test_func</code> would not be exported by default. Select
-exceptional symbols are allowed to be visible.</dd>
-
-<dt><code>namespace __gnu_cxx</code></dt>
-<dd> Defaults to not exporting any symbols in label
-<code>GLIBCXX</code>, select items are allowed to be visible.</dd>
-
-<dt><code>namespace __gnu_internal</code></dt>
-<dd> Defaults to not exported, no items are allowed to be visible.</dd>
-
-<dt><code>namespace __cxxabiv1</code>, aliased to <code> namespace abi</code></dt>
-<dd> Defaults to not exporting any symbols in label
-<code>CXXABI</code>, select items are allowed to be visible.</dd>
-</dl>
-<p>
-</p>
-</li>
-
- <li>Freezing the API
- <p>Disallowed changes, as above, are not made on a stable release
-branch. Enforcement tends to be less strict with GNU extensions that
-standard includes.</p>
-</li>
-</ul>
-
-<h3 class="left">
- <a name="ABI_testing">Testing ABI changes</a>
-</h3>
-
-<p>
-Testing for GNU C++ ABI changes is composed of two distinct areas:
-testing the C++ compiler (g++) for compiler changes, and testing the
-C++ library (libstdc++) for library changes.
-</p>
-
-<p>
-Testing the C++ compiler ABI can be done various ways.
-</p>
-
-<p>
-One.
-Intel ABI checker. More information can be obtained
-<a href="http://developer.intel.com/software/products/opensource/">here.</a>
-</p>
-
-<p>
-Two.
-The second is yet unreleased, but has been announced on the gcc
-mailing list. It is yet unspecified if these tools will be freely
-available, and able to be included in a GNU project. Please contact
-Mark Mitchell (mark@codesourcery.com) for more details, and current
-status.
-</p>
-
-<p>
-Three.
-Involves using the vlad.consistency test framework. This has also been
-discussed on the gcc mailing lists.
-</p>
-
-<p>
-Testing the C++ library ABI can also be done various ways.
-</p>
-
-<p>
-One.
-(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
-one with a new compiler and an old library, and the other with an old
-compiler and a new library, and look for testsuite regressions)
-</p>
-
-<p>
-Details on how to set this kind of test up can be found here:
-http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
-</p>
-
-<p>
-Two.
-Use the 'make check-abi' rule in the libstdc++-v3 Makefile.
-</p>
-
-<p>
-This is a proactive check the library ABI. Currently, exported symbol
-names that are either weak or defined are checked against a last known
-good baseline. Currently, this baseline is keyed off of 3.4.0
-binaries, as this was the last time the .so number was incremented. In
-addition, all exported names are demangled, and the exported objects
-are checked to make sure they are the same size as the same object in
-the baseline.
-
-Notice that each baseline is relative to a <strong>default</strong>
-configured library and compiler: in particular, if options such as
---enable-clocale, or --with-cpu, in case of multilibs, are used at
-configure time, the check may fail, either because of substantive
-differences or because of limitations of the current checking
-machinery.
-</p>
-
-<p>
-This dataset is insufficient, yet a start. Also needed is a
-comprehensive check for all user-visible types part of the standard
-library for sizeof() and alignof() changes.
-</p>
-
-<p>
-Verifying compatible layouts of objects is not even attempted. It
-should be possible to use sizeof, alignof, and offsetof to compute
-offsets for each structure and type in the standard library, saving to
-another datafile. Then, compute this in a similar way for new
-binaries, and look for differences.
-</p>
-
-<p>
-Another approach might be to use the -fdump-class-hierarchy flag to
-get information. However, currently this approach gives insufficient
-data for use in library testing, as class data members, their offsets,
-and other detailed data is not displayed with this flag.
-(See g++/7470 on how this was used to find bugs.)
-</p>
-
-<p>
-Perhaps there are other C++ ABI checkers. If so, please notify
-us. We'd like to know about them!
-</p>
-
-<h3 class="left">
- <a name="ABI_multi_testing">Testing Multi-ABI binaries</a>
-</h3>
-
-<p>
-A "C" application, dynamically linked to two shared libraries, liba,
-libb. The dependent library liba is C++ shared library compiled with
-gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library
-libb is a C++ shared library compiled with gcc-3.4.x, and also uses io,
-exceptions, locale, etc.
-</p>
-
-<p> As above, libone is constructed as follows: </p>
-<pre>
-%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
-
-%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
-
-%ln -s libone.so.1.0.0 libone.so
-
-%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
-
-%ar cru libone.a a.o
-</pre>
-
-<p> And, libtwo is constructed as follows: </p>
-
-<pre>
-%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
-
-%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
-
-%ln -s libtwo.so.1.0.0 libtwo.so
-
-%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
-
-%ar cru libtwo.a b.o
-</pre>
-
-<p> ...with the resulting libraries looking like </p>
-<pre>
-%ldd libone.so.1.0.0
- libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40016000)
- libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400fa000)
- libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
- libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40125000)
- /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
-
-%ldd libtwo.so.1.0.0
- libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x40027000)
- libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400e1000)
- libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
- libc.so.6 =&gt; /lib/tls/libc.so.6 (0x4010c000)
- /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
-
-</pre>
-
-<p> Then, the "C" compiler is used to compile a source file that uses
-functions from each library.</p>
-<pre>
-gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
-</pre>
-
-<p>
-Which gives the expected:
-</p>
-<pre>
-%ldd a.out
- libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
- libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40015000)
- libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
- libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
- libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
- /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
-</pre>
-
-<p>
-This resulting binary, when executed, will be able to safely use code
-from both liba, and the dependent libstdc++.so.6, and libb, with the
-dependent libstdc++.so.5.
-</p>
-
-
-<h3 class="left">
- <a name="Outstanding Issues">Outstanding Issues</a>
-</h3>
-
-<p> Some features in the C++ language make versioning especially
-difficult. In particular, compiler generated constructs such as
-implicit instantiations for templates, typeinfo information, and
-virtual tables all may cause ABI leakage across shared library
-boundaries. Because of this, mixing C++ ABI's is not recommended at
-this time.
-</p>
-
-<p>For more background on this issue, see these bugzilla entries:</p>
-
-<p>
-<a href="http://gcc.gnu.org/PR24660">24660: versioning weak symbols in libstdc++</a>
-</p>
-
-<p>
-<a href="http://gcc.gnu.org/PR19664">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
-</p>
-
-<h3 class="left">
- <a name="references">Bibliography / Further Reading</a>
-</h3>
-
-<p>
-ABIcheck, a vague idea of checking ABI compatibility
-<br />
-<a href="http://abicheck.sourceforge.net/">http://abicheck.sourceforge.net/</a>
-</p>
-
-<p>
-C++ ABI reference
-<br />
-<a href="http://www.codesourcery.com/cxx-abi/">http://www.codesourcery.com/cxx-abi/</a>
-</p>
-
-<p>
-Intel ABI documentation, "Intel® Compilers for Linux* -Compatibility with the GNU Compilers"
-<br />
-<a href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm">http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm</a>
-</p>
-
-<p>
-Sun Solaris 2.9 docs
-<br />
-Linker and Libraries Guide (document 816-1386)
-<br />
-C++ Migration Guide (document 816-2459)
-<br />
-<a href="http://docs.sun.com/db/prod/solaris.9">http://docs.sun.com/db/prod/solaris.9</a>
-<br />
-<a href="http://docs.sun.com/?p=/doc/816-1386&amp;a=load">http://docs.sun.com/?p=/doc/816-1386&amp;a=load</a>
-</p>
-
-<p>
-Ulrich Drepper, "ELF Symbol Versioning"
-<br />
-<a href="http://people.redhat.com/drepper/symbol-versioning">http://people.redhat.com/drepper/symbol-versioning</a>
-</p>
-
-<p>
-C++ ABI for the ARM Architecture
-<br />
-<a href="http://www.arm.com/miscPDFs/8033.pdf">http://www.arm.com/miscPDFs/8033.pdf</a>
-</p>
-
-<p>
-Benjamin Kosnik, ISO C++ J16/06-0046
-<br />
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html">Dynamic Shared Objects: Survey and Issues</a>
-</p>
-
-<p>
-Benjamin Kosnik, ISO C++ J16/06-0083
-<br />
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html">Versioning With Namespaces</a>
-</p>
-
-</body>
-</html>
-
diff --git a/libstdc++-v3/docs/html/configopts.html b/libstdc++-v3/docs/html/configopts.html
deleted file mode 100644
index 215a1ab3b81..00000000000
--- a/libstdc++-v3/docs/html/configopts.html
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++" />
- <meta name="DESCRIPTION" content="Configuration options for libstdc++-v3." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 configure options</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Interesting <code>configure</code>
-options</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<p>Here are some of the non-obvious options to libstdc++'s configure.
- Keep in mind that
- <!-- This SECnn should be the "Choosing Package Options" section. -->
- <a href="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131">they
- all have opposite forms as well</a>
- (enable/disable and with/without). The defaults are for <strong>current
- development sources</strong>, which may be different than those for
- released versions.
-</p>
-<p>The canonical way to find out the configure options that are
- available for a given set of libstdc++ sources is to go to the
- source directory and then type:<code> ./configure --help</code>
-</p>
-
-<dl>
- <dt><code>--enable-multilib </code>[default]</dt>
- <dd><p>This is part of the generic multilib support for building cross
- compilers. As such, targets like &quot;powerpc-elf&quot; will have
- libstdc++ built many different ways: &quot;-msoft-float&quot;
- and not, etc. A different libstdc++ will be built for each of
- the different multilib versions. This option is on by default.
- </p>
- </dd>
-
- <dt><code>--enable-sjlj-exceptions </code></dt>
- <dd><p>Forces old, set-jump/long-jump exception handling model. If
- at all possible, the new, frame unwinding exception handling routines
- should be used instead, as they significantly reduce both
- runtime memory usage and executable size. This option can
- change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-version-specific-runtime-libs </code></dt>
- <dd><p>Specify that run-time libraries should be installed in the
- compiler-specific subdirectory (i.e.,
- <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
- instead of <code>${libdir}</code>. This option is useful if you
- intend to use several versions of gcc in parallel. In addition,
- libstdc++'s include files will be installed in
- <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
- unless you also specify
- <code>--with-gxx-include-dir=<em>dirname</em></code> during configuration.
- </p>
- </dd>
-
- <dt><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></dt>
- <dd><p>Adds support for named libstdc++ include directory. For instance,
- the following puts all the libstdc++ headers into a directory
- called &quot;2.97-20001008&quot; instead of the usual
- &quot;c++/(version)&quot;.
- </p>
- <pre>
- --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre> </dd>
-
- <dt><code>--enable-cstdio </code></dt>
- <dd><p>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
- (described next). This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-cstdio=OPTION </code></dt>
- <dd><p>Select a target-specific I/O package. At the moment, the only
- choice is to use 'stdio', a generic &quot;C&quot; abstraction.
- The default is 'stdio'. A longer explanation is <a
- href="explanations.html#cstdio">here</a>.
- </p>
- </dd>
-
- <dt><code>--enable-clocale </code></dt>
- <dd><p>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
- (described next). This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-clocale=OPTION </code></dt>
- <dd><p>Select a target-specific underlying locale package. The
- choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
- (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
- 'gnu' to specify a model based on functionality from the GNU C
- library (langinfo/iconv/gettext) (from <a
- href="http://sources.redhat.com/glibc/">glibc</a>, the GNU C
- library), or 'generic' to use a generic &quot;C&quot;
- abstraction which consists of &quot;C&quot; locale info.
- </p>
-
- <p>As part of the configuration process, the "C" library is
- probed both for sufficient vintage, and installed locale
- data. If either of these elements are not present, the C++
- locale model default to 'generic.' On glibc-based systems of
- version 2.2.5 and above with installed locale files, 'gnu' is
- automatically selected.
- </p>
- </dd>
-
- <dt><code>--enable-libstdcxx-allocator </code></dt>
- <dd><p>This is an abbreviated form of
- <code>'--enable-libstdcxx-allocator=auto'</code> (described
- next). This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-libstdcxx-allocator=OPTION </code></dt>
- <dd><p>Select a target-specific underlying std::allocator. The
- choices are 'new' to specify a wrapper for new, 'malloc' to
- specify a wrapper for malloc, 'mt' for a fixed power of two allocator
- (<a href="ext/mt_allocator.html">documented</a> under extensions),
- 'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
- This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-cheaders=OPTION </code></dt>
- <dd><p>This allows the user to define the approach taken for C header
- compatibility with C++. Options are c, c_std, and c_global.
- These correspond to the source directory's include/c,
- include/c_std, and include/c_global, and may also include
- include/c_compatibility. The default is c_global.
- </p>
- </dd>
-
- <dt><code>--enable-threads </code></dt>
- <dd><p>This is an abbreviated form of <code>'--enable-threads=yes'</code>
- (described next). This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-threads=OPTION </code></dt>
- <dd><p>Select a threading library. A full description is given in the
- general <a href="http://gcc.gnu.org/install/configure.html">compiler
- configuration instructions</a>.
- </p>
- </dd>
-
- <dt><code>--enable-libstdcxx-debug </code></dt>
- <dd><p>Build separate debug libraries in addition to what is normally built.
- By default, the debug libraries are compiled with
- <code> CXXFLAGS='-g3 -O0'</code>
- , are installed in <code>${libdir}/debug</code>, and have the
- same names and versioning information as the non-debug
- libraries. This option is off by default.
- </p>
- <p>Note this make command, executed in
- the build directory, will do much the same thing, without the
- configuration difference and without building everything twice:
- <code>make CXXFLAGS='-g3 -O0' all</code>
- </p>
- </dd>
-
- <dt><code>--enable-libstdcxx-debug-flags=FLAGS</code></dt>
-
- <dd><p>This option is only valid when <code> --enable-debug </code>
- is also specified, and applies to the debug builds only. With
- this option, you can pass a specific string of flags to the
- compiler to use when building the debug versions of libstdc++.
- FLAGS is a quoted string of options, like
- </p>
- <pre>
- --enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</pre>
- </dd>
-
- <dt><code>--enable-cxx-flags=FLAGS</code></dt>
- <dd><p>With this option, you can pass a string of -f (functionality)
- flags to the compiler to use when building libstdc++. This
- option can change the library ABI. FLAGS is a quoted string of
- options, like
- </p>
- <pre>
- --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre>
- <p>
- Note that the flags don't necessarily have to all be -f flags,
- as shown, but usually those are the ones that will make sense
- for experimentation and configure-time overriding.
- </p>
- <p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
- the 'make' environment is that, if files are automatically
- rebuilt, the same flags will be used when compiling those files
- as well, so that everything matches.
- </p>
- <p>Fun flags to try might include combinations of
- </p>
- <pre>
- -fstrict-aliasing
- -fno-exceptions
- -ffunction-sections
- -fvtable-gc</pre>
- <p>and opposite forms (-fno-) of the same. Tell us (the libstdc++
- mailing list) if you discover more!
- </p>
- </dd>
-
- <dt><code>--enable-c99 </code></dt>
- <dd><p>The &quot;long long&quot; type was introduced in C99, along
- with many other functions for wide characters, and math
- classification macros, etc. If enabled, all C99 functions not
- specified by the C++ standard will be put into <code>namespace
- __gnu_cxx</code>, and then all these names will
- be injected into namespace std, so that C99 functions can be
- used &quot;as if&quot; they were in the C++ standard (as they
- will eventually be in some future revision of the standard,
- without a doubt). By default, C99 support is on, assuming the
- configure probes find all the necessary functions and bits
- necessary. This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-wchar_t </code>[default]</dt>
- <dd><p>Template specializations for the &quot;wchar_t&quot; type are
- required for wide character conversion support. Disabling
- wide character specializations may be expedient for initial
- porting efforts, but builds only a subset of what is required by
- ISO, and is not recommended. By default, this option is on.
- This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-long-long </code></dt>
- <dd><p>The &quot;long long&quot; type was introduced in C99. It is
- provided as a GNU extension to C++98 in g++. This flag builds
- support for &quot;long long&quot; into the library (specialized
- templates and the like for iostreams). This option is on by default:
- if enabled, users will have to either use the new-style &quot;C&quot;
- headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
- or add appropriate compile-time flags to all compile lines to
- allow &quot;C&quot; visibility of this feature (on GNU/Linux,
- the flag is -D_ISOC99_SOURCE, which is added automatically via
- CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
- This option can change the library ABI.
- </p>
- </dd>
-
- <dt><code>--enable-fully-dynamic-string </code></dt>
- <dd><p>This option enables a special version of basic_string avoiding
- the optimization that allocates empty objects in static memory.
- Mostly useful together with shared memory allocators, see PR
- libstdc++/16612 for details.
- </p>
- </dd>
-
- <dt><code>--enable-concept-checks </code></dt>
- <dd><p>This turns on additional compile-time checks for instantiated
- library templates, in the form of specialized templates,
- <a href="19_diagnostics/howto.html#3">described here</a>. They
- can help users discover when they break the rules of the STL, before
- their programs run.
- </p>
- </dd>
-
- <dt><code>--enable-symvers[=style] </code></dt>
-
- <dd><p>In 3.1 and later, tries to turn on symbol versioning in the
- shared library (if a shared library has been
- requested). Values for 'style' that are currently supported
- are 'gnu', 'gnu-versioned-namespace', 'darwin', and
- 'darwin-export'. Both gnu- options require that a recent
- version of the GNU linker be in use. Both darwin options are
- equivalent. With no style given, the configure script will try
- to guess correct defaults for the host system, probe to see if
- additional requirements are necessary and present for
- activation, and if so, will turn symbol versioning on. This
- option can change the library ABI.
- </p>
-
- </dd>
-
- <dt><code>--enable-visibility </code></dt>
- <dd><p> In 4.2 and later, enables or disables visibility attributes.
- If enabled (as by default), and the compiler seems capable of
- passing the simple sanity checks thrown at it, adjusts items
- in namespace std, namespace std::tr1, and namespace __gnu_cxx
- so that -fvisibility options work.
- </p>
- </dd>
-
- <dt><code>--enable-libstdcxx-pch </code></dt>
- <dd><p>In 3.4 and later, tries to turn on the generation of
- stdc++.h.gch, a pre-compiled file including all the standard
- C++ includes. If enabled (as by default), and the compiler
- seems capable of passing the simple sanity checks thrown at
- it, try to build stdc++.h.gch as part of the make process.
- In addition, this generated file is used later on (by appending <code>
- --include bits/stdc++.h </code> to CXXFLAGS) when running the
- testsuite.
- </p>
- </dd>
-
- <dt><code>--disable-hosted-libstdcxx </code></dt>
- <dd><p>By default, a complete <em>hosted</em> C++ library is built. The
- C++ Standard also describes a <em>freestanding</em> environment,
- in which only a minimal set of headers are provided. This option
- builds such an environment.
- </p>
- </dd>
-</dl>
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/debug.html b/libstdc++-v3/docs/html/debug.html
deleted file mode 100644
index 6013115fe13..00000000000
--- a/libstdc++-v3/docs/html/debug.html
+++ /dev/null
@@ -1,450 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="bkoz@gcc.gnu.org (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="c++, libstdc++, gdb, g++, debug" />
- <meta name="DESCRIPTION" content="Debugging C++ binaries" />
- <meta name="GENERATOR" content="vi and ten fingers" />
- <title>Debugging schemes and strategies</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Debugging schemes and strategies</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/debug.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/debug.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<p>There are numerous things that can be done to improve the ease with
- which C++ binaries are debugged when using the GNU
- tool chain. Here are some of them.
-</p>
-
-<h3 class="left"><a name="gplusplus">Compiler flags determine debug info</a></h3>
-<p>The default optimizations and debug flags for a libstdc++ build are
- <code>-g -O2</code>. However, both debug and optimization flags can
- be varied to change debugging characteristics. For instance,
- turning off all optimization via the <code>-g -O0</code> flag will
- disable inlining, so that stepping through all functions, including
- inlined constructors and destructors, is possible. In addition,
- <code>-fno-eliminate-unused-debug-types</code> can be used when
- additional debug information, such as nested class info, is desired.
-</p>
-
-<p>Or, the debug format that the compiler and debugger use to communicate
- information about source constructs can be changed via <code>
- -gdwarf-2 </code> or <code> -gstabs </code> flags: some debugging
- formats permit more expressive type and scope information to be
- shown in gdb. The default debug information for a particular
- platform can be identified via the value set by the
- PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
-</p>
-
-<p>Many other options are available: please see
-<a href="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options">"Options for Debugging Your Program"</a>
- in Using the GNU Compiler Collection (GCC) for a complete list.
-</p>
-
-<h3 class="left"><a name="lib">Using special flags to make a debug binary</a></h3>
-<p>If you would like debug symbols in libstdc++, there are two ways to
- build libstdc++ with debug flags. The first is to run make from the
- toplevel in a freshly-configured tree with
-</p>
-<pre>
- --enable-libstdcxx-debug
-</pre>
-<p>and perhaps</p>
-<pre>
- --enable-libstdcxx-debug-flags='...'
-</pre>
-<p>to create a separate debug build. Both the normal build and the
- debug build will persist, without having to specify
- <code>CXXFLAGS</code>, and the debug library will be installed in a
- separate directory tree, in <code>(prefix)/lib/debug</code>. For
- more information, look at the <a href="configopts.html">configuration
- options</a> document.
-</p>
-
-<p>A second approach is to use the configuration flags
-</p>
-<pre>
- make CXXFLAGS='-g3 -O0' all
-</pre>
-
-<p>This quick and dirty approach is often sufficient for quick
- debugging tasks, when you cannot or don't want to recompile your
- application to use the <a href="#safe">debug mode</a>.</p>
-
-<h3 class="left"><a name="safe">The libstdc++ debug mode</a></h3>
-<p>By default, libstdc++ is built with efficiency in mind, and
- therefore performs little or no error checking that is not required
- by the C++ standard. This means that programs that incorrectly use
- the C++ standard library will exhibit behavior that is not portable
- and may not even be predictable, because they tread into
- implementation-specific or undefined behavior. To detect some of
- these errors before they can become problematic, libstdc++ offers a
- debug mode that provides additional checking of library facilities,
- and will report errors in the use of libstdc++ as soon as they can
- be detected by emitting a description of the problem to standard
- error and aborting the program. This debug mode is available with
- GCC 3.4.0 and later versions. </p>
-
-<p>The libstdc++ debug mode performs checking for many areas of the C++
- standard, but the focus is on checking interactions among standard
- iterators, containers, and algorithms, including:</p>
-
- <ul>
- <li><em>Safe iterators</em>: Iterators keep track of the
- container whose elements they reference, so errors such as
- incrementing a past-the-end iterator or dereferencing an iterator
- that points to a container that has been destructed are diagnosed
- immediately.</li>
-
- <li><em>Algorithm preconditions</em>: Algorithms attempt to
- validate their input parameters to detect errors as early as
- possible. For instance, the <code>set_intersection</code>
- algorithm requires that its iterator
- parameters <code>first1</code> and <code>last1</code> form a valid
- iterator range, and that the sequence
- [<code>first1</code>, <code>last1</code>) is sorted according to
- the same predicate that was passed
- to <code>set_intersection</code>; the libstdc++ debug mode will
- detect an error if the sequence is not sorted or was sorted by a
- different predicate.</li>
- </ul>
-
-<h4 class="left">Using the libstdc++ debug mode</h4>
-<p>To use the libstdc++ debug mode, compile your application with the
- compiler flag <code>-D_GLIBCXX_DEBUG</code>. Note that this flag
- changes the sizes and behavior of standard class templates such
- as <code>std::vector</code>, and therefore you can only link code
- compiled with debug mode and code compiled without debug mode if no
- instantiation of a container is passed between the two translation
- units.</p>
-
-<p>By default, error messages are formatted to fit on lines of about
- 78 characters. The environment variable
- <code>GLIBCXX_DEBUG_MESSAGE_LENGTH</code> can be used to request a
- different length.</p>
-
-<p>For information about the design of the libstdc++ debug mode,
- please see the <a href="debug_mode.html">libstdc++ debug mode design
- document</a>.</p>
-
-<h4 class="left">Using the debugging containers without debug
- mode</h4>
-<p>When it is not feasible to recompile your entire application, or
- only specific containers need checking, debugging containers are
- available as GNU extensions. These debugging containers are
- functionally equivalent to the standard drop-in containers used in
- debug mode, but they are available in a separate namespace as GNU
- extensions and may be used in programs compiled with either release
- mode or with debug mode. The
- following table provides the names and headers of the debugging
- containers:
-</p>
-
-<table title="Debugging containers" border="1">
- <tr>
- <th>Container</th>
- <th>Header</th>
- <th>Debug container</th>
- <th>Debug header</th>
- </tr>
- <tr>
- <td>std::bitset</td>
- <td>&lt;bitset&gt;</td>
- <td>__gnu_debug::bitset</td>
- <td>&lt;debug/bitset&gt;</td>
- </tr>
- <tr>
- <td>std::deque</td>
- <td>&lt;deque&gt;</td>
- <td>__gnu_debug::deque</td>
- <td>&lt;debug/deque&gt;</td>
- </tr>
- <tr>
- <td>std::list</td>
- <td>&lt;list&gt;</td>
- <td>__gnu_debug::list</td>
- <td>&lt;debug/list&gt;</td>
- </tr>
- <tr>
- <td>std::map</td>
- <td>&lt;map&gt;</td>
- <td>__gnu_debug::map</td>
- <td>&lt;debug/map&gt;</td>
- </tr>
- <tr>
- <td>std::multimap</td>
- <td>&lt;map&gt;</td>
- <td>__gnu_debug::multimap</td>
- <td>&lt;debug/map&gt;</td>
- </tr>
- <tr>
- <td>std::multiset</td>
- <td>&lt;set&gt;</td>
- <td>__gnu_debug::multiset</td>
- <td>&lt;debug/set&gt;</td>
- </tr>
- <tr>
- <td>std::set</td>
- <td>&lt;set&gt;</td>
- <td>__gnu_debug::set</td>
- <td>&lt;debug/set&gt;</td>
- </tr>
- <tr>
- <td>std::string</td>
- <td>&lt;string&gt;</td>
- <td>__gnu_debug::string</td>
- <td>&lt;debug/string&gt;</td>
- </tr>
- <tr>
- <td>std::wstring</td>
- <td>&lt;string&gt;</td>
- <td>__gnu_debug::wstring</td>
- <td>&lt;debug/string&gt;</td>
- </tr>
- <tr>
- <td>std::basic_string</td>
- <td>&lt;string&gt;</td>
- <td>__gnu_debug::basic_string</td>
- <td>&lt;debug/string&gt;</td>
- </tr>
- <tr>
- <td>std::vector</td>
- <td>&lt;vector&gt;</td>
- <td>__gnu_debug::vector</td>
- <td>&lt;debug/vector&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::hash_map</td>
- <td>&lt;ext/hash_map&gt;</td>
- <td>__gnu_debug::hash_map</td>
- <td>&lt;debug/hash_map&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::hash_multimap</td>
- <td>&lt;ext/hash_map&gt;</td>
- <td>__gnu_debug::hash_multimap</td>
- <td>&lt;debug/hash_map&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::hash_set</td>
- <td>&lt;ext/hash_set&gt;</td>
- <td>__gnu_debug::hash_set</td>
- <td>&lt;debug/hash_set&gt;</td>
- </tr>
- <tr>
- <td>__gnu_cxx::hash_multiset</td>
- <td>&lt;ext/hash_set&gt;</td>
- <td>__gnu_debug::hash_multiset</td>
- <td>&lt;debug/hash_set&gt;</td>
- </tr>
-</table>
-
-<h4 class="left">Debug mode semantics</h4>
-<p>A program that uses the C++ standard library correctly
- will maintain the same semantics under debug mode as it had with
- the normal (release) library. All functional and exception-handling
- guarantees made by the normal library also hold for the debug mode
- library, with one exception: performance guarantees made by the
- normal library may not hold in the debug mode library. For
- instance, erasing an element in a <code>std::list</code> is a
- constant-time operation in normal library, but in debug mode it is
- linear in the number of iterators that reference that particular
- list. So while your (correct) program won't change its results, it
- is likely to execute more slowly.</p>
-
-<p>libstdc++ includes many extensions to the C++ standard library. In
- some cases the extensions are obvious, such as the hashed
- associative containers, whereas other extensions give predictable
- results to behavior that would otherwise be undefined, such as
- throwing an exception when a <code>std::basic_string</code> is
- constructed from a NULL character pointer. This latter category also
- includes implementation-defined and unspecified semantics, such as
- the growth rate of a vector. Use of these extensions is not
- considered incorrect, so code that relies on them will not be
- rejected by debug mode. However, use of these extensions may affect
- the portability of code to other implementations of the C++ standard
- library, and is therefore somewhat hazardous. For this reason, the
- libstdc++ debug mode offers a "pedantic" mode (similar to
- GCC's <code>-pedantic</code> compiler flag) that attempts to emulate
- the semantics guaranteed by the C++ standard. For
- instance, constructing a <code>std::basic_string</code> with a NULL
- character pointer would result in an exception under normal mode or
- non-pedantic debug mode (this is a libstdc++ extension), whereas
- under pedantic debug mode libstdc++ would signal an error. To enable
- the pedantic debug mode, compile your program with
- both <code>-D_GLIBCXX_DEBUG</code>
- and <code>-D_GLIBCXX_DEBUG_PEDANTIC</code> .
- (N.B. In GCC 3.4.x and 4.0.0, due to a bug,
- <code>-D_GLIBXX_DEBUG_PEDANTIC</code> was also needed. The problem has
- been fixed in GCC 4.0.1 and later versions.) </p>
-
-<p>The following library components provide extra debugging
- capabilities in debug mode:</p>
-<ul>
- <li><code>std::basic_string</code> (no safe iterators)</li>
- <li><code>std::bitset</code></li>
- <li><code>std::deque</code></li>
- <li><code>std::list</code></li>
- <li><code>std::map</code></li>
- <li><code>std::multimap</code></li>
- <li><code>std::multiset</code></li>
- <li><code>std::set</code></li>
- <li><code>std::vector</code></li>
- <li><code>__gnu_cxx::hash_map</code></li>
- <li><code>__gnu_cxx::hash_multimap</code></li>
- <li><code>__gnu_cxx::hash_multiset</code></li>
- <li><code>__gnu_cxx::hash_set</code></li>
-</ul>
-
-
-<h3 class="left"><a name="mem">Tips for memory leak hunting</a></h3>
-
-<p>There are various third party memory tracing and debug utilities
- that can be used to provide detailed memory allocation information
- about C++ code. An exhaustive list of tools is not going to be
- attempted, but includes <code>mtrace</code>, <code>valgrind</code>,
- <code>mudflap</code>, and the non-free commercial product
- <code>purify</code>. In addition, <code>libcwd</code> has a
- replacement for the global new and delete operators that can track
- memory allocation and deallocation and provide useful memory
- statistics.
-</p>
-
-<p>Regardless of the memory debugging tool being used, there is one
- thing of great importance to keep in mind when debugging C++ code
- that uses <code>new</code> and <code>delete</code>:
- there are different kinds of allocation schemes that can be used by
- <code> std::allocator </code>. For implementation details, see this
- <a href="ext/howto.html#3"> document</a> and look specifically for
- <code>GLIBCXX_FORCE_NEW</code>.
-</p>
-
-<p>In a nutshell, the default allocator used by <code>
- std::allocator</code> is a high-performance pool allocator, and can
- give the mistaken impression that in a suspect executable, memory
- is being leaked, when in reality the memory "leak" is a pool being
- used by the library's allocator and is reclaimed after program
- termination.
-</p>
-
-<p>For valgrind, there are some specific items to keep in mind. First
- of all, use a version of valgrind that will work with current GNU
- C++ tools: the first that can do this is valgrind 1.0.4, but later
- versions should work at least as well. Second of all, use a
- completely unoptimized build to avoid confusing valgrind. Third,
- use GLIBCXX_FORCE_NEW to keep extraneous pool allocation noise from
- cluttering debug information.
-</p>
-
-<p>Fourth, it may be necessary to force deallocation in other
- libraries as well, namely the "C" library. On linux, this can be
- accomplished with the appropriate use of the
- <code>__cxa_atexit</code> or <code>atexit</code> functions.
-</p>
-
-<pre>
- #include &lt;cstdlib&gt;
-
- extern "C" void __libc_freeres(void);
-
- void do_something() { }
-
- int main()
- {
- atexit(__libc_freeres);
- do_something();
- return 0;
- }
-</pre>
-
-
-<p>or, using <code>__cxa_atexit</code>:</p>
-
-<pre>
- extern "C" void __libc_freeres(void);
- extern "C" int __cxa_atexit(void (*func) (void *), void *arg, void *d);
-
- void do_something() { }
-
- int main()
- {
- extern void* __dso_handle __attribute__ ((__weak__));
- __cxa_atexit((void (*) (void *)) __libc_freeres, NULL,
- &amp;__dso_handle ? __dso_handle : NULL);
- do_test();
- return 0;
- }
-</pre>
-
-<p>Suggested valgrind flags, given the suggestions above about setting
- up the runtime environment, library, and test file, might be:
-</p>
-<pre>
- valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
-</pre>
-
-
-<h3 class="left"><a name="gdb">Some gdb strategies</a></h3>
-<p>Many options are available for gdb itself: please see <a
- href="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109">
- "GDB features for C++" </a> in the gdb documentation. Also
- recommended: the other parts of this manual.
-</p>
-
-<p>These settings can either be switched on in at the gdb command
- line, or put into a .gdbint file to establish default debugging
- characteristics, like so:
-</p>
-
-<pre>
- set print pretty on
- set print object on
- set print static-members on
- set print vtbl on
- set print demangle on
- set demangle-style gnu-v3
-</pre>
-
-
-<h3 class="left"><a name="verbterm">Tracking uncaught exceptions</a></h3>
-<p>The <a href="18_support/howto.html#4">verbose termination handler</a>
- gives information about uncaught exceptions which are killing the
- program. It is described in the linked-to page.
-</p>
-
-
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/debug_mode.html b/libstdc++-v3/docs/html/debug_mode.html
deleted file mode 100644
index 44d471ff8c3..00000000000
--- a/libstdc++-v3/docs/html/debug_mode.html
+++ /dev/null
@@ -1,578 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="gregod@cs.rpi.edu (Doug Gregor)" />
- <meta name="KEYWORDS" content="C++, GCC, libstdc++, g++, debug" />
- <meta name="DESCRIPTION" content="Design of the libstdc++ debug mode." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>Design of the libstdc++ debug mode</title>
-<link rel="StyleSheet" href="lib3styles.css" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Design of the libstdc++ debug mode</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/debug_mode.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/debug_mode.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<h1>Debug mode design</h1>
-<p> The libstdc++ debug mode replaces unsafe (but efficient) standard
- containers and iterators with semantically equivalent safe standard
- containers and iterators to aid in debugging user programs. The
- following goals directed the design of the libstdc++ debug mode:</p>
-
- <ul>
-
- <li><b>Correctness</b>: the libstdc++ debug mode must not change
- the semantics of the standard library for all cases specified in
- the ANSI/ISO C++ standard. The essence of this constraint is that
- any valid C++ program should behave in the same manner regardless
- of whether it is compiled with debug mode or release mode. In
- particular, entities that are defined in namespace std in release
- mode should remain defined in namespace std in debug mode, so that
- legal specializations of namespace std entities will remain
- valid. A program that is not valid C++ (e.g., invokes undefined
- behavior) is not required to behave similarly, although the debug
- mode will abort with a diagnostic when it detects undefined
- behavior.</li>
-
- <li><b>Performance</b>: the additional of the libstdc++ debug mode
- must not affect the performance of the library when it is compiled
- in release mode. Performance of the libstdc++ debug mode is
- secondary (and, in fact, will be worse than the release
- mode).</li>
-
- <li><b>Usability</b>: the libstdc++ debug mode should be easy to
- use. It should be easily incorporated into the user's development
- environment (e.g., by requiring only a single new compiler switch)
- and should produce reasonable diagnostics when it detects a
- problem with the user program. Usability also involves detection
- of errors when using the debug mode incorrectly, e.g., by linking
- a release-compiled object against a debug-compiled object if in
- fact the resulting program will not run correctly.</li>
-
- <li><b>Minimize recompilation</b>: While it is expected that
- users recompile at least part of their program to use debug
- mode, the amount of recompilation affects the
- detect-compile-debug turnaround time. This indirectly affects the
- usefulness of the debug mode, because debugging some applications
- may require rebuilding a large amount of code, which may not be
- feasible when the suspect code may be very localized. There are
- several levels of conformance to this requirement, each with its
- own usability and implementation characteristics. In general, the
- higher-numbered conformance levels are more usable (i.e., require
- less recompilation) but are more complicated to implement than
- the lower-numbered conformance levels.
- <ol>
- <li><b>Full recompilation</b>: The user must recompile his or
- her entire application and all C++ libraries it depends on,
- including the C++ standard library that ships with the
- compiler. This must be done even if only a small part of the
- program can use debugging features.</li>
-
- <li><b>Full user recompilation</b>: The user must recompile
- his or her entire application and all C++ libraries it depends
- on, but not the C++ standard library itself. This must be done
- even if only a small part of the program can use debugging
- features. This can be achieved given a full recompilation
- system by compiling two versions of the standard library when
- the compiler is installed and linking against the appropriate
- one, e.g., a multilibs approach.</li>
-
- <li><b>Partial recompilation</b>: The user must recompile the
- parts of his or her application and the C++ libraries it
- depends on that will use the debugging facilities
- directly. This means that any code that uses the debuggable
- standard containers would need to be recompiled, but code
- that does not use them (but may, for instance, use IOStreams)
- would not have to be recompiled.</li>
-
- <li><b>Per-use recompilation</b>: The user must recompile the
- parts of his or her application and the C++ libraries it
- depends on where debugging should occur, and any other code
- that interacts with those containers. This means that a set of
- translation units that accesses a particular standard
- container instance may either be compiled in release mode (no
- checking) or debug mode (full checking), but must all be
- compiled in the same way; a translation unit that does not see
- that standard container instance need not be recompiled. This
- also means that a translation unit <em>A</em> that contains a
- particular instantiation
- (say, <code>std::vector&lt;int&gt;</code>) compiled in release
- mode can be linked against a translation unit <em>B</em> that
- contains the same instantiation compiled in debug mode (a
- feature not present with partial recompilation). While this
- behavior is technically a violation of the One Definition
- Rule, this ability tends to be very important in
- practice. The libstdc++ debug mode supports this level of
- recompilation. </li>
-
- <li><b>Per-unit recompilation</b>: The user must only
- recompile the translation units where checking should occur,
- regardless of where debuggable standard containers are
- used. This has also been dubbed "<code>-g</code> mode",
- because the <code>-g</code> compiler switch works in this way,
- emitting debugging information at a per--translation-unit
- granularity. We believe that this level of recompilation is in
- fact not possible if we intend to supply safe iterators, leave
- the program semantics unchanged, and not regress in
- performance under release mode because we cannot associate
- extra information with an iterator (to form a safe iterator)
- without either reserving that space in release mode
- (performance regression) or allocating extra memory associated
- with each iterator with <code>new</code> (changes the program
- semantics).</li>
- </ol>
- </li>
- </ul>
-
-<h2><a name="other">Other implementations</a></h2>
-<p> There are several existing implementations of debug modes for C++
- standard library implementations, although none of them directly
- supports debugging for programs using libstdc++. The existing
- implementations include:</p>
-<ul>
- <li><a
- href="http://www.mathcs.sjsu.edu/faculty/horstman/safestl.html">SafeSTL</a>:
- SafeSTL was the original debugging version of the Standard Template
- Library (STL), implemented by Cay S. Horstmann on top of the
- Hewlett-Packard STL. Though it inspired much work in this area, it
- has not been kept up-to-date for use with modern compilers or C++
- standard library implementations.</li>
-
- <li><a href="http://www.stlport.org/">STLport</a>: STLport is a free
- implementation of the C++ standard library derived from the <a
- href="http://www.sgi.com/tech/stl/">SGI implementation</a>, and
- ported to many other platforms. It includes a debug mode that uses a
- wrapper model (that in some way inspired the libstdc++ debug mode
- design), although at the time of this writing the debug mode is
- somewhat incomplete and meets only the "Full user recompilation" (2)
- recompilation guarantee by requiring the user to link against a
- different library in debug mode vs. release mode.</li>
-
- <li><a href="http://www.metrowerks.com/mw/default.htm">Metrowerks
- CodeWarrior</a>: The C++ standard library that ships with Metrowerks
- CodeWarrior includes a debug mode. It is a full debug-mode
- implementation (including debugging for CodeWarrior extensions) and
- is easy to use, although it meets only the "Full recompilation" (1)
- recompilation guarantee.</li>
-</ul>
-
-<h2><a name="design">Debug mode design methodology</a></h2>
-<p>This section provides an overall view of the design of the
- libstdc++ debug mode and details the relationship between design
- decisions and the stated design goals.</p>
-
-<h3><a name="wrappers">The wrapper model</a></h3>
-<p>The libstdc++ debug mode uses a wrapper model where the debugging
- versions of library components (e.g., iterators and containers) form
- a layer on top of the release versions of the library
- components. The debugging components first verify that the operation
- is correct (aborting with a diagnostic if an error is found) and
- will then forward to the underlying release-mode container that will
- perform the actual work. This design decision ensures that we cannot
- regress release-mode performance (because the release-mode
- containers are left untouched) and partially enables <a
- href="#mixing">mixing debug and release code</a> at link time,
- although that will not be discussed at this time.</p>
-
-<p>Two types of wrappers are used in the implementation of the debug
- mode: container wrappers and iterator wrappers. The two types of
- wrappers interact to maintain relationships between iterators and
- their associated containers, which are necessary to detect certain
- types of standard library usage errors such as dereferencing
- past-the-end iterators or inserting into a container using an
- iterator from a different container.</p>
-
-<h4><a name="safe_iterator">Safe iterators</a></h4>
-<p>Iterator wrappers provide a debugging layer over any iterator that
- is attached to a particular container, and will manage the
- information detailing the iterator's state (singular,
- dereferenceable, etc.) and tracking the container to which the
- iterator is attached. Because iterators have a well-defined, common
- interface the iterator wrapper is implemented with the iterator
- adaptor class template <code>__gnu_debug::_Safe_iterator</code>,
- which takes two template parameters:</p>
-
-<ul>
- <li><code>Iterator</code>: The underlying iterator type, which must
- be either the <code>iterator</code> or <code>const_iterator</code>
- typedef from the sequence type this iterator can reference.</li>
-
- <li><code>Sequence</code>: The type of sequence that this iterator
- references. This sequence must be a safe sequence (discussed below)
- whose <code>iterator</code> or <code>const_iterator</code> typedef
- is the type of the safe iterator.</li>
-</ul>
-
-<h4><a name="safe_sequence">Safe sequences (containers)</a></h4>
-<p>Container wrappers provide a debugging layer over a particular
- container type. Because containers vary greatly in the member
- functions they support and the semantics of those member functions
- (especially in the area of iterator invalidation), container
- wrappers are tailored to the container they reference, e.g., the
- debugging version of <code>std::list</code> duplicates the entire
- interface of <code>std::list</code>, adding additional semantic
- checks and then forwarding operations to the
- real <code>std::list</code> (a public base class of the debugging
- version) as appropriate. However, all safe containers inherit from
- the class template <code>__gnu_debug::_Safe_sequence</code>,
- instantiated with the type of the safe container itself (an instance
- of the curiously recurring template pattern).</p>
-
-<p>The iterators of a container wrapper will be
- <a href="#safe_iterator">safe iterators</a> that reference sequences
- of this type and wrap the iterators provided by the release-mode
- base class. The debugging container will use only the safe
- iterators within its own interface (therefore requiring the user to
- use safe iterators, although this does not change correct user
- code) and will communicate with the release-mode base class with
- only the underlying, unsafe, release-mode iterators that the base
- class exports.</p>
-
-<p> The debugging version of <code>std::list</code> will have the
- following basic structure:</p>
-
-<pre>
-template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
- class debug-list :
- public release-list&lt;_Tp, _Allocator&gt;,
- public __gnu_debug::_Safe_sequence&lt;debug-list&lt;_Tp, _Allocator&gt; &gt;
- {
- typedef release-list&lt;_Tp, _Allocator&gt; _Base;
- typedef debug-list&lt;_Tp, _Allocator&gt; _Self;
-
- public:
- typedef __gnu_debug::_Safe_iterator&lt;typename _Base::iterator, _Self&gt; iterator;
- typedef __gnu_debug::_Safe_iterator&lt;typename _Base::const_iterator, _Self&gt; const_iterator;
-
- // duplicate std::list interface with debugging semantics
- };
-</pre>
-
-<h3><a name="precondition">Precondition checking</a></h3>
-<p>The debug mode operates primarily by checking the preconditions of
- all standard library operations that it supports. Preconditions that
- are always checked (regardless of whether or not we are in debug
- mode) are checked via the <code>__check_xxx</code> macros defined
- and documented in the source
- file <code>include/debug/debug.h</code>. Preconditions that may or
- may not be checked, depending on the debug-mode
- macro <code>_GLIBCXX_DEBUG</code>, are checked via
- the <code>__requires_xxx</code> macros defined and documented in the
- same source file. Preconditions are validated using any additional
- information available at run-time, e.g., the containers that are
- associated with a particular iterator, the position of the iterator
- within those containers, the distance between two iterators that may
- form a valid range, etc. In the absence of suitable information,
- e.g., an input iterator that is not a safe iterator, these
- precondition checks will silently succeed.</p>
-
-<p>The majority of precondition checks use the aforementioned macros,
- which have the secondary benefit of having prewritten debug
- messages that use information about the current status of the
- objects involved (e.g., whether an iterator is singular or what
- sequence it is attached to) along with some static information
- (e.g., the names of the function parameters corresponding to the
- objects involved). When not using these macros, the debug mode uses
- either the debug-mode assertion
- macro <code>_GLIBCXX_DEBUG_ASSERT</code> , its pedantic
- cousin <code>_GLIBCXX_DEBUG_PEDASSERT</code>, or the assertion
- check macro that supports more advance formulation of error
- messages, <code>_GLIBCXX_DEBUG_VERIFY</code>. These macros are
- documented more thoroughly in the debug mode source code.</p>
-
-<h3><a name="coexistence">Release- and debug-mode coexistence</a></h3>
-<p>The libstdc++ debug mode is the first debug mode we know of that
- is able to provide the "Per-use recompilation" (4) guarantee, that
- allows release-compiled and debug-compiled code to be linked and
- executed together without causing unpredictable behavior. This
- guarantee minimizes the recompilation that users are required to
- perform, shortening the detect-compile-debug bughunting cycle
- and making the debug mode easier to incorporate into development
- environments by minimizing dependencies.</p>
-
-<p>Achieving link- and run-time coexistence is not a trivial
- implementation task. To achieve this goal we required a small
- extension to the GNU C++ compiler (described in the GCC Manual for
- C++ Extensions, see <a
- href="http://gcc.gnu.org/onlinedocs/gcc/Strong-Using.html">strong
- using</a>), and a complex organization of debug- and
- release-modes. The end result is that we have achieved per-use
- recompilation but have had to give up some checking of the
- <code>std::basic_string</code> class template (namely, safe
- iterators).
-</p>
-
-<h4><a name="compile_coexistence">Compile-time coexistence of release- and
- debug-mode components</a></h4>
-<p>Both the release-mode components and the debug-mode
- components need to exist within a single translation unit so that
- the debug versions can wrap the release versions. However, only one
- of these components should be user-visible at any particular
- time with the standard name, e.g., <code>std::list</code>. </p>
-
-<p>In release mode, we define only the release-mode version of the
- component with its standard name and do not include the debugging
- component at all. The release mode version is defined within the
- namespace <code>std</code>. Minus the namespace associations, this
- method leaves the behavior of release mode completely unchanged from
- its behavior prior to the introduction of the libstdc++ debug
- mode. Here's an example of what this ends up looking like, in
- C++.</p>
-
-<pre>
-namespace std
-{
- template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
- class list
- {
- // ...
- };
-} // namespace std
-</pre>
-
-<p>In debug mode we include the release-mode container (which is now
-defined in in the namespace <code>__norm</code>) and also the
-debug-mode container. The debug-mode container is defined within the
-namespace <code>__debug</code>, which is associated with namespace
-<code>std</code> via the GNU namespace association extension. This
-method allows the debug and release versions of the same component to
-coexist at compile-time and link-time without causing an unreasonable
-maintenance burden, while minimizing confusion. Again, this boils down
-to C++ code as follows:</p>
-
-<pre>
-namespace std
-{
- namespace __norm
- {
- template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
- class list
- {
- // ...
- };
- } // namespace __gnu_norm
-
- namespace __debug
- {
- template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
- class list
- : public __norm::list&lt;_Tp, _Alloc&gt;,
- public __gnu_debug::_Safe_sequence&lt;list&lt;_Tp, _Alloc&gt; &gt;
- {
- // ...
- };
- } // namespace __norm
-
- using namespace __debug __attribute__ ((strong));
-}
-</pre>
-
-<h4><a name="mixing">Link- and run-time coexistence of release- and
- debug-mode components</a></h4>
-
-<p>Because each component has a distinct and separate release and
-debug implementation, there are are no issues with link-time
-coexistence: the separate namespaces result in different mangled
-names, and thus unique linkage.</p>
-
-<p>However, components that are defined and used within the C++
-standard library itself face additional constraints. For instance,
-some of the member functions of <code> std::moneypunct</code> return
-<code>std::basic_string</code>. Normally, this is not a problem, but
-with a mixed mode standard library that could be using either
-debug-mode or release-mode <code> basic_string</code> objects, things
-get more complicated. As the return value of a function is not
-encoded into the mangled name, there is no way to specify a
-release-mode or a debug-mode string. In practice, this results in
-runtime errors. A simplified example of this problem is as follows.
-</p>
-
-<p> Take this translation unit, compiled in debug-mode: </p>
-<pre>
-// -D_GLIBCXX_DEBUG
-#include &lt;string&gt;
-
-std::string test02();
-
-std::string test01()
-{
- return test02();
-}
-
-int main()
-{
- test01();
- return 0;
-}
-</pre>
-
-<p> ... and linked to this translation unit, compiled in release mode:</p>
-
-<pre>
-#include &lt;string&gt;
-
-std::string
-test02()
-{
- return std::string("toast");
-}
-</pre>
-
-<p> For this reason we cannot easily provide safe iterators for
- the <code>std::basic_string</code> class template, as it is present
- throughout the C++ standard library. For instance, locale facets
- define typedefs that include <code>basic_string</code>: in a mixed
- debug/release program, should that typedef be based on the
- debug-mode <code>basic_string</code> or the
- release-mode <code>basic_string</code>? While the answer could be
- "both", and the difference hidden via renaming a la the
- debug/release containers, we must note two things about locale
- facets:</p>
-
-<ol>
- <li>They exist as shared state: one can create a facet in one
- translation unit and access the facet via the same type name in a
- different translation unit. This means that we cannot have two
- different versions of locale facets, because the types would not be
- the same across debug/release-mode translation unit barriers.</li>
-
- <li>They have virtual functions returning strings: these functions
- mangle in the same way regardless of the mangling of their return
- types (see above), and their precise signatures can be relied upon
- by users because they may be overridden in derived classes.</li>
-</ol>
-
-<p>With the design of libstdc++ debug mode, we cannot effectively hide
- the differences between debug and release-mode strings from the
- user. Failure to hide the differences may result in unpredictable
- behavior, and for this reason we have opted to only
- perform <code>basic_string</code> changes that do not require ABI
- changes. The effect on users is expected to be minimal, as there are
- simple alternatives (e.g., <code>__gnu_debug::basic_string</code>),
- and the usability benefit we gain from the ability to mix debug- and
- release-compiled translation units is enormous.</p>
-
-<h4><a name="coexistence_alt">Alternatives for Coexistence</a></h4>
-<p>The coexistence scheme above was chosen over many alternatives,
- including language-only solutions and solutions that also required
- extensions to the C++ front end. The following is a partial list of
- solutions, with justifications for our rejection of each.</p>
-
-<ul>
- <li><em>Completely separate debug/release libraries</em>: This is by
- far the simplest implementation option, where we do not allow any
- coexistence of debug- and release-compiled translation units in a
- program. This solution has an extreme negative affect on usability,
- because it is quite likely that some libraries an application
- depends on cannot be recompiled easily. This would not meet
- our <b>usability</b> or <b>minimize recompilation</b> criteria
- well.</li>
-
- <li><em>Add a <code>Debug</code> boolean template parameter</em>:
- Partial specialization could be used to select the debug
- implementation when <code>Debug == true</code>, and the state
- of <code>_GLIBCXX_DEBUG</code> could decide whether the
- default <code>Debug</code> argument is <code>true</code>
- or <code>false</code>. This option would break conformance with the
- C++ standard in both debug <em>and</em> release modes. This would
- not meet our <b>correctness</b> criteria. </li>
-
- <li><em>Packaging a debug flag in the allocators</em>: We could
- reuse the <code>Allocator</code> template parameter of containers
- by adding a sentinel wrapper <code>debug&lt;&gt;</code> that
- signals the user's intention to use debugging, and pick up
- the <code>debug&lt;&gt;</code> allocator wrapper in a partial
- specialization. However, this has two drawbacks: first, there is a
- conformance issue because the default allocator would not be the
- standard-specified <code>std::allocator&lt;T&gt;</code>. Secondly
- (and more importantly), users that specify allocators instead of
- implicitly using the default allocator would not get debugging
- containers. Thus this solution fails the <b>correctness</b>
- criteria.</li>
-
- <li><em>Define debug containers in another namespace, and employ
- a <code>using</code> declaration (or directive)</em>: This is an
- enticing option, because it would eliminate the need for
- the <code>link_name</code> extension by aliasing the
- templates. However, there is no true template aliasing mechanism
- is C++, because both <code>using</code> directives and using
- declarations disallow specialization. This method fails
- the <b>correctness</b> criteria.</li>
-
- <li><em> Use implementation-specific properties of anonymous
- namespaces. </em>
- See <a
- href="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00004.html"> this post
- </a>
- This method fails the <b>correctness</b> criteria.</li>
-
- <li><em>Extension: allow reopening on namespaces</em>: This would
- allow the debug mode to effectively alias the
- namespace <code>std</code> to an internal namespace, such
- as <code>__gnu_std_debug</code>, so that it is completely
- separate from the release-mode <code>std</code> namespace. While
- this will solve some renaming problems and ensure that
- debug- and release-compiled code cannot be mixed unsafely, it ensures that
- debug- and release-compiled code cannot be mixed at all. For
- instance, the program would have two <code>std::cout</code>
- objects! This solution would fails the <b>minimize
- recompilation</b> requirement, because we would only be able to
- support option (1) or (2).</li>
-
- <li><em>Extension: use link name</em>: This option involves
- complicated re-naming between debug-mode and release-mode
- components at compile time, and then a g++ extension called <em>
- link name </em> to recover the original names at link time. There
- are two drawbacks to this approach. One, it's very verbose,
- relying on macro renaming at compile time and several levels of
- include ordering. Two, ODR issues remained with container member
- functions taking no arguments in mixed-mode settings resulting in
- equivalent link names, <code> vector::push_back() </code> being
- one example.
- See <a
- href="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00177.html">link
- name</a> </li>
-</ul>
-
-<p>Other options may exist for implementing the debug mode, many of
- which have probably been considered and others that may still be
- lurking. This list may be expanded over time to include other
- options that we could have implemented, but in all cases the full
- ramifications of the approach (as measured against the design goals
- for a libstdc++ debug mode) should be considered first. The DejaGNU
- testsuite includes some testcases that check for known problems with
- some solutions (e.g., the <code>using</code> declaration solution
- that breaks user specialization), and additional testcases will be
- added as we are able to identify other typical problem cases. These
- test cases will serve as a benchmark by which we can compare debug
- mode implementations.</p>
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/documentation.html b/libstdc++-v3/docs/html/documentation.html
deleted file mode 100644
index f211165cca7..00000000000
--- a/libstdc++-v3/docs/html/documentation.html
+++ /dev/null
@@ -1,273 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="KEYWORDS"
- content="libstdc++, homepage, home, C++, library, c++, std, g++, ABI, STL" />
- <title>GNU C++ Standard Library</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-<link rel="Help" href="faq/index.html" type="text/html" title="F.A.Q." />
-</head>
-<body>
-
-
-<p><strong>All of these documents</strong> (in fact, this entire homepage set)
- are bundled with the library source, under the <code>docs</code>
- subdirectory, for releases and snapshots. The sole exception is the
- automatically-generated source documentation, available separately.
-</p>
-
-<hr />
-<br />
-<h2><a name="1">Introduction</a></h2>
- <p>This is a short list of text files pertaining to this implementation of
- ISO 14882. A brief description may follow the name of the file.
- </p>
- <ul>
- <li><a href="17_intro/COPYING">License</a>
- - GPL v2 license terms</li>
- <li><a href="abi.html">ABI Policy and Guidelines</a></li>
- <li><a href="17_intro/BUGS">BUGS</a></li>
- <li><a href="17_intro/PROBLEMS">PROBLEMS</a>
- - target-specific known issues</li>
- <!-- Linking to "../README" doesn't work; we are at the top level
- of the web pages. Punt. -->
- <li>README - directory structure</li>
- <li><a href="17_intro/RELEASE-NOTES">RELEASE-NOTES</a>
- - latest version info, recent changes and news</li>
- <li><a href="17_intro/TODO">TODO</a>
- - tasks yet undone</li>
- <li><a href="faq/index.html">FAQ (HTML)</a>,
- <a href="faq/index.txt">FAQ (text)</a></li>
- </ul>
-
-<hr />
-<br />
-<h2><a name="2">Configuring, Building, Testing, Installing</a></h2>
-<ul>
- <li><a href="configopts.html">Configure options</a></li>
- <li><a href="install.html">Getting started: configure, build, install</a>
- </li>
- <li><a href="test.html">Testing details</a></li>
- <li><a href="debug.html">Debugging schemes and strategies</a>
- </li>
-</ul>
-
-
-<hr />
-<br />
-<h2><a name="4">Source-Level Documentation</a></h2>
-<p>The library sources have been specially formatted so that with the
- proper invocation of another tool (Doxygen), a set of HTML pages
- are generated from the sources files themselves. The resultant
- documentation is referred to as Source-Level Documentation, and is
- useful for examining the signatures of public member functions for
- the library classes, finding out what is in a particular include
- file, looking at inheritance diagrams, etc.
-</p>
-<p>The source-level documentation for the most recent releases can
- be viewed online:
-</p>
-<ul>
- <li><a href="libstdc++-html-USERS-3.4/index.html">for the 3.4 release</a></li>
- <li><a href="latest-doxygen/index.html">&quot;the latest collection&quot;</a>
- (for the main development tree; see the date on the first page)
- </li>
-</ul>
-<p>This generated HTML collection, as above, is also available for download in
- the libstdc++ snapshots directory at
- <code>&lt;URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/&gt;</code>.
- You will almost certainly need to use one of the
- <a href="http://gcc.gnu.org/mirrors.html">mirror sites</a> to download
- the tarball. After unpacking, simply load libstdc++-html-*/index.html
- into a browser.
-</p>
-<p>Documentation for older releases is available for download only, not
- online viewing.
-</p>
-<p>In addition, an initial set of man pages are also available in the
- same place as the HTML collections. Start with C++Intro(3).
-</p>
-
-
-<hr />
-<br />
-<h2><a name="3">Chapter-Specific Documentation</a></h2>
-<p>Information, extensions, notes and advice on specific implementation
- capabilites and/or liabilities broken down into chapter names based on the
- C++ standard.
-</p>
-<!--
- The list below is automatically generated. To make changes in the text,
- edit the appropriate HOWTO file and run "make" in this directory. In
- those files, you may reorder entries as you like, but DO NOT change the
- "#number"s in anchors, for they are used elsewhere and in bookmarks.
--->
-<!-- beginlist -->
- <ul>
- <li>Library Introduction (Chapter 17)
- <ul>
- <li><a href="17_intro/howto.html#2">The Standard C++ header files</a></li>
- <li><a href="17_intro/howto.html#3">The Standard C++ library and multithreading</a></li>
- <li><a href="17_intro/howto.html#4"><code>&lt;foo&gt;</code> vs <code>&lt;foo.h&gt;</code></a></li>
- <li><a href="17_intro/porting-howto.html">Porting HOWTO</a></li>
- <li><a href="17_intro/howto.html#5">Behavior specific to libstdc++-v3</a></li>
- <li><a href="17_intro/howto.html#6">Preprocessor macros controlling the library</a></li>
- </ul>
- </li>
-
- <li>Library Support (Chapter 18)
- <ul>
- <li><a href="18_support/howto.html#1">Types</a></li>
- <li><a href="18_support/howto.html#2">Implementation properties</a></li>
- <li><a href="18_support/howto.html#3">Start and Termination</a></li>
- <li><a href="18_support/howto.html#4">Verbose <code>terminate</code></a></li>
- <li><a href="18_support/howto.html#5">Dynamic memory management</a></li>
- <li><a href="18_support/howto.html#6">RTTI, the ABI, and demangling</a></li>
- </ul>
- </li>
-
- <li>Diagnostics (Chapter 19)
- <ul>
- <li><a href="19_diagnostics/howto.html#1">Adding data to exceptions</a></li>
- <li><a href="19_diagnostics/howto.html#2">Exception class hierarchy diagram</a></li>
- <li><a href="19_diagnostics/howto.html#3">Concept checkers -- <strong>new and improved!</strong></a></li>
- </ul>
- </li>
-
- <li>General Utilities (Chapter 20)
- <ul>
- <li><a href="20_util/howto.html#1"><code>auto_ptr</code> is not omnipotent</a></li>
- <li><a href="20_util/howto.html#2"><code>auto_ptr</code> inside container classes</a></li>
- <li><a href="20_util/howto.html#3">Functors</a></li>
- <li><a href="20_util/howto.html#4">Pairs</a></li>
- <li><a href="20_util/howto.html#5">Memory allocators</a></li>
- </ul>
- </li>
-
- <li>Strings (Chapter 21)
- <ul>
- <li><a href="21_strings/howto.html#1">MFC's CString</a></li>
- <li><a href="21_strings/howto.html#2">A case-insensitive string class</a></li>
- <li><a href="21_strings/howto.html#3">Breaking a C++ string into tokens</a></li>
- <li><a href="21_strings/howto.html#4">Simple transformations</a></li>
- <li><a href="21_strings/howto.html#5">Making strings of arbitrary character types</a></li>
- <li><a href="21_strings/howto.html#6">Shrink-to-fit strings</a></li>
- </ul>
- </li>
-
- <li>Localization (Chapter 22)
- <ul>
- <li><a href="22_locale/howto.html#1">class locale</a></li>
- <li><a href="22_locale/howto.html#2">class codecvt</a></li>
- <li><a href="22_locale/howto.html#3">class ctype</a></li>
- <li><a href="22_locale/howto.html#4">class messages</a></li>
- <li><a href="22_locale/howto.html#5">Bjarne Stroustrup on Locales</a></li>
- <li><a href="22_locale/howto.html#6">Nathan Myers on Locales</a></li>
- <li><a href="22_locale/howto.html#7">Correct Transformations</a></li>
- </ul>
- </li>
-
- <li>Containers (Chapter 23)
- <ul>
- <li><a href="23_containers/howto.html#1">Making code unaware of the container/array difference</a></li>
- <li><a href="23_containers/howto.html#2">Variable-sized bitmasks</a></li>
- <li><a href="23_containers/howto.html#3">Containers and multithreading</a></li>
- <li><a href="23_containers/howto.html#4">&quot;Hinting&quot; during insertion</a></li>
- <li><a href="23_containers/howto.html#5">Bitmasks and string arguments</a></li>
- <li><a href="23_containers/howto.html#6"><code>std::list::size()</code> is O(n)!</a></li>
- <li><a href="23_containers/howto.html#7">Space overhead management for vectors</a></li>
- </ul>
- </li>
-
- <li>Iterators (Chapter 24)
- <ul>
- <li><a href="24_iterators/howto.html#1">They ain't pointers!</a></li>
- <li><a href="24_iterators/howto.html#2">It ends <em>where?</em></a></li>
- </ul>
- </li>
-
- <li>Algorithms (Chapter 25)
- <ul>
- <li><a href="25_algorithms/howto.html#1">Prerequisites</a></li>
- <li><a href="25_algorithms/howto.html#2">Special <code>swap</code>s</a></li>
- </ul>
- </li>
-
- <li>Numerics (Chapter 26)
- <ul>
- <li><a href="26_numerics/howto.html#1">Complex Number Processing</a></li>
- <li><a href="26_numerics/howto.html#2">Array Processing</a></li>
- <li><a href="26_numerics/howto.html#3">Numerical Functions</a></li>
- <li><a href="26_numerics/howto.html#4">C99</a></li>
- </ul>
- </li>
-
- <li>Input/Output (Chapter 27)
- <ul>
- <li><a href="27_io/howto.html#1">Copying a file</a></li>
- <li><a href="27_io/howto.html#2">The buffering is screwing up my program!</a></li>
- <li><a href="27_io/howto.html#3">Binary I/O</a></li>
- <li><a href="27_io/howto.html#5">What is this &lt;sstream&gt;/stringstreams thing?</a></li>
- <li><a href="27_io/howto.html#6">Deriving a stream buffer</a></li>
- <li><a href="27_io/howto.html#7">More on binary I/O</a></li>
- <li><a href="27_io/howto.html#8">Pathetic performance? Ditch C.</a></li>
- <li><a href="27_io/howto.html#9">Threads and I/O</a></li>
- <li><a href="27_io/howto.html#10">Which header?</a></li>
- <li><a href="27_io/howto.html#11">Using FILE*s and file descriptors with IOStreams</a></li>
- </ul>
- </li>
-
- <li>Extensions to the Standard Library
- <ul>
- <li><a href="ext/pb_ds/index.html">Policy Based Data Structures</a></li>
- <li><a href="ext/howto.html#1">Ropes and trees and hashes, oh my!</a></li>
- <li><a href="ext/howto.html#2">Added members and types</a></li>
- <li><a href="ext/mt_allocator.html"><code>__mt_alloc</code> </a></li>
- <li><a href="ext/howto.html#4">Compile-time checks</a></li>
- <li><a href="ext/howto.html#5">LWG Issues</a></li>
- <li><a href="ext/../18_support/howto.html#6">Demangling</a></li>
- </ul>
- </li>
-
- </ul>
-<!-- endlist -->
-
-<hr />
-<br />
-<h2><a name="5">Contributor-Specific Information</a></h2>
-<ul>
- <li><a href="17_intro/contribute.html">Contributor checklist</a></li>
- <li><a href="http://gcc.gnu.org/cvswrite.html">Getting CVS write access
- (look for &quot;Write after approval&quot;)</a></li>
- <li><a href="17_intro/BADNAMES">BADNAMES</a>
- - names to avoid because of potential collisions</li>
- <li><a href="17_intro/C++STYLE">C++STYLE</a>
- - coding style by example</li>
- <li> In the libstdc++-v3/docs/doxygen directory, see guide.html, a
- doxygen markup style guide</li>
- <li><a href="17_intro/CHECKLIST">CHECKLIST</a>
- - a list of required features and their status.</li>
- <li><a href="17_intro/DESIGN">DESIGN</a>
- - overview of the implementation plan</li>
- <li><a href="17_intro/HEADER_POLICY">HEADER_POLICY</a>
- - header naming and sub-include structure</li>
-</ul>
-
-<!-- ####################################################### -->
-
-<p>Return <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.</p>
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/explanations.html b/libstdc++-v3/docs/html/explanations.html
deleted file mode 100644
index 938b449d47a..00000000000
--- a/libstdc++-v3/docs/html/explanations.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++" />
- <meta name="DESCRIPTION" content="Explanatory notes about libstdc++-v3." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>Explanatory notes about libstdc++-v3 design</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Explanatory notes about libstdc++-v3
-design</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/explanations.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/explanations.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h3><a name="cstdio">&quot;I/O packages&quot;, <code>--enable-cstdio</code></a></h3>
-<p>In addition to all the nifty things which C++ can do for I/O, its library
- also includes all of the I/O capabilites of C. Making them work together
- can be a challenge, not only
- <a href="27_io/howto.html#8">for the programmer</a> but for the
- implementors as well.
-</p>
-<p>There are two ways to do a C++ library: the cool way, and the easy way.
- More specifically, the cool-but-easy-to-get-wrong way, and the
- easy-to-guarantee-correct-behavior way. For 3.0, the easy way is used.
-</p>
-<p>Choosing 'stdio' is the easy way. It builds a C++ library which forwards
- all operations to the C library. Many of the C++ I/O functions are
- specified in the standard 'as if' they called a certain C function; the
- easiest way to get it correct is to actually call that function. The
- disadvantage is that the C++ code will run slower (fortunately, the layer
- is thin).
-</p>
-<p>Other packages are possible. For a new package, a header must be
- written to provide types like streamsize (usually just a typedef), as
- well as some internal types like<code> __c_file_type </code> and
- <code> __c_lock </code> (for the stdio case, these are FILE (as in
- &quot;FILE*&quot;) and a simple POSIX mutex, respectively). An
- interface class called <code> __basic_file </code> must also be filled in;
- as an example, for the stdio case, these member functions are all
- inline calles to fread, fwrite, etc.
-</p>
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<hr />
-<h3><a name="alloc">Internal Allocators</a></h3>
-<p>
-</p>
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/ballocator_doc.html b/libstdc++-v3/docs/html/ext/ballocator_doc.html
deleted file mode 100644
index fa09584cf78..00000000000
--- a/libstdc++-v3/docs/html/ext/ballocator_doc.html
+++ /dev/null
@@ -1,426 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta content="text/html; charset=ISO-8859-1"
- http-equiv="content-type">
- <title>Bitmap Allocator</title>
- <meta content="Dhruv Matani" name="author">
- <meta content="Bitmap Allocator" name="description">
-</head>
-<body>
-<h1 style="text-align: center;">Bitmap Allocator</h1>
-<em><br>
-<small><small>The latest version of this document is always available
-at <a
- href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/ballocator_doc.html">
-http://gcc.gnu.org/onlinedocs/libstdc++/ext/ballocator_doc.html</a>.</small></small></em><br>
-<br>
-<em> To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3
-homepage</a>.</em><br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-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 purposes.<br>
-<br>
-This allocator will make use of 1 single bit to keep track of whether
-it has been allocated or not. A bit 1 indicates free, while 0 indicates
-allocated. This has been done so that you can easily check a collection
-of bits for a free block. This kind of Bitmapped strategy works best
-for single object allocations, and with the STL type parameterized
-allocators, we do not need to choose any size for the block which will
-be represented by a single bit. This will be the size of the parameter
-around which the allocator has been parameterized. Thus, close to
-optimal performance will result. Hence, this should be used for node
-based containers which call the allocate function with an argument of 1.<br>
-<br>
-The bitmapped allocator's internal pool is exponentially growing.
-Meaning that internally, the blocks acquired from the Free List Store
-will double every time the bitmapped allocator runs out of memory.<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-The macro __GTHREADS decides whether to use Mutex Protection around
-every allocation/deallocation. The state of the macro is picked up
-automatically from the gthr abstraction layer.<br>
-<br>
-<hr style="width: 100%; height: 2px;">
-<h3 style="text-align: center;">What is the Free List Store?</h3>
-<br>
-The Free List Store (referred to as FLS for the remaining part of this
-document) is the Global memory pool that is shared by all instances of
-the bitmapped allocator instantiated for any type. This maintains a
-sorted order of all free memory blocks given back to it by the
-bitmapped allocator, and is also responsible for giving memory to the
-bitmapped allocator when it asks for more.<br>
-<br>
-Internally, there is a Free List threshold which indicates the Maximum
-number of free lists that the FLS can hold internally (cache).
-Currently, this value is set at 64. So, if there are more than 64 free
-lists coming in, then some of them will be given back to the OS using
-operator delete so that at any given time the Free List's size does not
-exceed 64 entries. This is done because a Binary Search is used to
-locate an entry in a free list when a request for memory comes along.
-Thus, the run-time complexity of the search would go up given an
-increasing size, for 64 entries however, lg(64) == 6 comparisons are
-enough to locate the correct free list if it exists.<br>
-<br>
-Suppose the free list size has reached it's threshold, then the largest
-block from among those in the list and the new block will be selected
-and given back to the OS. This is done because it reduces external
-fragmentation, and allows the OS to use the larger blocks later in an
-orderly fashion, possibly merging them later. Also, on some systems,
-large blocks are obtained via calls to mmap, so giving them back to
-free system resources becomes most important.<br>
-<br>
-The function _S_should_i_give decides the policy that determines
-whether the current block of memory should be given to the allocator
-for the request that it has made. That's because we may not always have
-exact fits for the memory size that the allocator requests. We do this
-mainly to prevent external fragmentation at the cost of a little
-internal fragmentation. Now, the value of this internal fragmentation
-has to be decided by this function. I can see 3 possibilities right
-now. Please add more as and when you find better strategies.<br>
-<br>
-<ol>
- <li>Equal size check. Return true only when the 2 blocks are of equal
-size.</li>
- <li>Difference Threshold: Return true only when the _block_size is
-greater than or equal to the _required_size, and if the _BS is &gt; _RS
-by a difference of less than some THRESHOLD value, then return true,
-else return false. </li>
- <li>Percentage Threshold. Return true only when the _block_size is
-greater than or equal to the _required_size, and if the _BS is &gt; _RS
-by a percentage of less than some THRESHOLD value, then return true,
-else return false.</li>
-</ol>
-<br>
-Currently, (3) is being used with a value of 36% Maximum wastage per
-Super Block.<br>
-<br>
-<hr style="width: 100%; height: 2px;"><span style="font-weight: bold;">1)
-What is a super block? Why is it needed?</span><br>
-<br>
-A super block is the block of memory acquired from the FLS from which
-the bitmap allocator carves out memory for single objects and satisfies
-the user's requests. These super blocks come in sizes that are powers
-of 2 and multiples of 32 (_Bits_Per_Block). Yes both at the same time!
-That's because the next super block acquired will be 2 times the
-previous one, and also all super blocks have to be multiples of the
-_Bits_Per_Block value. <br>
-<br>
-<span style="font-weight: bold;">2) How does it interact with the free
-list store?</span><br>
-<br>
-The super block is contained in the FLS, and the FLS is responsible for
-getting / returning Super Bocks to and from the OS using operator new
-as defined by the C++ standard.<br>
-<br>
-<hr style="width: 100%; height: 2px;">
-<h3 style="text-align: center;">How does the allocate function Work?</h3>
-<br>
-The allocate function is specialized for single object allocation ONLY.
-Thus, ONLY if n == 1, will the bitmap_allocator's specialized algorithm
-be used. Otherwise, the request is satisfied directly by calling
-operator new.<br>
-<br>
-Suppose n == 1, then the allocator does the following:<br>
-<br>
-<ol>
- <li>Checks to see whether a free block exists somewhere in a
-region of memory close to the last satisfied request. If so, then that
-block is marked as allocated in the bit map and given to the user. If
-not, then (2) is executed.</li>
- <li>Is there a free block anywhere after the current block right up to
-the end of the memory that we have? If so, that block is found, and the
-same procedure is applied as above, and returned to the user. If not,
-then (3) is executed.</li>
- <li>Is there any block in whatever region of memory that we own free?
-This is done by checking <br>
- <div style="margin-left: 40px;">
- <ul>
- <li>The use count for each super block, and if that fails then </li>
- <li>The individual bit-maps for each super block. </li>
- </ul>
- </div>
-Note: Here we are never touching any of the memory that the user will
-be given, and we are confining all memory accesses to a small region of
-memory! This helps reduce cache misses. If this succeeds then we apply
-the same procedure on that bit-map as (1), and return that block of
-memory to the user. However, if this process fails, then we resort to
-(4).</li>
- <li>This process involves Refilling the internal exponentially
-growing memory pool. The said effect is achieved by calling
-_S_refill_pool which does the following: <br>
- <div style="margin-left: 40px;">
- <ul>
- <li>Gets more memory from the Global Free List of the Required
-size. </li>
- <li>Adjusts the size for the next call to itself. </li>
- <li>Writes the appropriate headers in the bit-maps.</li>
- <li>Sets the use count for that super-block just allocated to 0
-(zero). </li>
- <li>All of the above accounts to maintaining the basic invariant
-for the allocator. If the invariant is maintained, we are sure that all
-is well. Now, the same process is applied on the newly acquired free
-blocks, which are dispatched accordingly.</li>
- </ul>
- </div>
- </li>
-</ol>
-<br>
-Thus, you can clearly see that the allocate function is nothing but a
-combination of the next-fit and first-fit algorithm optimized ONLY for
-single object allocations.<br>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;">
-<h3 style="text-align: center;">How does the deallocate function work?</h3>
-<br>
-The deallocate function again is specialized for single objects ONLY.
-For all n belonging to &gt; 1, the operator delete is called without
-further ado, and the deallocate function returns.<br>
-<br>
-However for n == 1, a series of steps are performed:<br>
-<br>
-<ol>
- <li>We first need to locate that super-block which holds the memory
-location given to us by the user. For that purpose, we maintain a
-static variable _S_last_dealloc_index, which holds the index into the
-vector of block pairs which indicates the index of the last super-block
-from which memory was freed. We use this strategy in the hope that the
-user will deallocate memory in a region close to what he/she
-deallocated the last time around. If the check for belongs_to succeeds,
-then we determine the bit-map for the given pointer, and locate the
-index into that bit-map, and mark that bit as free by setting it.</li>
- <li>If the _S_last_dealloc_index does not point to the memory block
-that we're looking for, then we do a linear search on the block stored
-in the vector of Block Pairs. This vector in code is called
-_S_mem_blocks. When the corresponding super-block is found, we apply
-the same procedure as we did for (1) to mark the block as free in the
-bit-map.</li>
-</ol>
-<br>
-Now, whenever a block is freed, the use count of that particular super
-block goes down by 1. When this use count hits 0, we remove that super
-block from the list of all valid super blocks stored in the vector.
-While doing this, we also make sure that the basic invariant is
-maintained by making sure that _S_last_request and
-_S_last_dealloc_index point to valid locations within the vector.<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-<h3 style="text-align: center;">Data Layout for a Super Block:</h3>
-<br>
-Each Super Block will be of some size that is a multiple of the number
-of Bits Per Block. Typically, this value is chosen as Bits_Per_Byte x
-sizeof(size_t). On an x86 system, this gives the figure &nbsp;8 x
-4 = 32. Thus, each Super Block will be of size 32 x Some_Value. This
-Some_Value is sizeof(value_type). For now, let it be called 'K'. Thus,
-finally, Super Block size is 32 x K bytes.<br>
-<br>
-This value of 32 has been chosen because each size_t has 32-bits
-and Maximum use of these can be made with such a figure.<br>
-<br>
-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).<br>
-<br>
-<table cellpadding="0" cellspacing="0" border="1"
- style="text-align: left; width: 763px; height: 21px;">
- <tbody>
- <tr>
- <td style="vertical-align: top; text-align: center;">268<br>
- </td>
- <td style="vertical-align: top; text-align: center;">0<br>
- </td>
- <td style="vertical-align: top; text-align: center;">4294967295<br>
- </td>
- <td style="vertical-align: top; text-align: center;">4294967295<br>
- </td>
- <td style="vertical-align: top; text-align: center;">Data -&gt;
-Space for 64 ints<br>
- </td>
- </tr>
- </tbody>
-</table>
-<br>
-<br>
-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 bitmap allocator.
-It is this Free List Store that is responsible for writing and managing
-this information. Actually the number of bytes allocated in this case
-would be: 4 + 4 + (4x2) + (64x4) = 272 bytes, but the first 4 bytes are
-an
-addition by the Free List Store, so the Bitmap Allocator sees only 268
-bytes. These first 4 bytes about which the bitmapped allocator is not
-aware hold the value 268.<br>
-<br>
-<span style="font-weight: bold;">What do the remaining values represent?</span><br>
-<br>
-The 2nd 4 in the expression is the sizeof(size_t) because the
-Bitmapped Allocator maintains a used count for each Super Block, which
-is initially set to 0 (as indicated in the diagram). This is
-incremented every time a block is removed from this super block
-(allocated), and decremented whenever it is given back. So, when the
-used count falls to 0, the whole super block will be given back to the
-Free List Store.<br>
-<br>
-The value 4294967295 represents the integer corresponding to the bit
-representation of all bits set: 11111111111111111111111111111111.<br>
-<br>
-The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits
-x 2,
-which is 8-bytes, or 2 x sizeof(size_t).<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-Another issue would be whether to keep the all bitmaps in a separate
-area in memory, or to keep them near the actual blocks that will be
-given out or allocated for the client. After some testing, I've decided
-to keep these bitmaps close to the actual blocks. This will help in 2
-ways. <br>
-<br>
-<ol>
- <li>Constant time access for the bitmap themselves, since no kind of
-look up will be needed to find the correct bitmap list or it's
-equivalent.</li>
- <li>And also this would preserve the cache as far as possible.</li>
-</ol>
-<br>
-So in effect, this kind of an allocator might prove beneficial from a
-purely cache point of view. But this allocator has been made to try and
-roll out the defects of the node_allocator, wherein the nodes get
-skewed about in memory, if they are not returned in the exact reverse
-order or in the same order in which they were allocated. Also, the
-new_allocator's book keeping overhead is too much for small objects and
-single object allocations, though it preserves the locality of blocks
-very well when they are returned back to the allocator.<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-Expected overhead per block would be 1 bit in memory. Also, once the
-address of the free list has been found, the cost for
-allocation/deallocation would be negligible, and is supposed to be
-constant time. For these very reasons, it is very important to minimize
-the linear time costs, which include finding a free list with a free
-block while allocating, and finding the corresponding free list for a
-block while deallocating. Therefore, I have decided that the growth of
-the internal pool for this allocator will be exponential as compared to
-linear for node_allocator. There, linear time works well, because we
-are mainly concerned with speed of allocation/deallocation and memory
-consumption, whereas here, the allocation/deallocation part does have
-some linear/logarithmic complexity components in it. Thus, to try and
-minimize them would be a good thing to do at the cost of a little bit
-of memory.<br>
-<br>
-Another thing to be noted is the pool size will double every time
-the internal pool gets exhausted, and all the free blocks have been
-given away. The initial size of the pool would be 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.<br>
-<br>
-<hr style="width: 100%; height: 2px;">After reading all this, you may
-still have a few questions about the internal working of this
-allocator, like my friend had!<br>
-<br>
-Well here are the exact questions that he posed:<br>
-<br>
-<span style="font-weight: bold;">Q1) The "Data Layout" section is
-cryptic. I have no idea of what you are trying to say. Layout of what?
-The free-list? Each bitmap? The Super Block?</span><br>
-<br>
-<div style="margin-left: 40px;"> The layout of a Super Block of a given
-size. In the example, a super block of size 32 x 1 is taken. The
-general formula for calculating the size of a super block is
-32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit
-systems.<br>
-</div>
-<br>
-<span style="font-weight: bold;">Q2) And since I just mentioned the
-term `each bitmap', what in the world is meant by it? What does each
-bitmap manage? How does it relate to the super block? Is the Super
-Block a bitmap as well?</span><br style="font-weight: bold;">
-<br>
-<div style="margin-left: 40px;"> Good question! Each bitmap is part of
-a
-Super Block which is made up of 3 parts as I have mentioned earlier.
-Re-iterating, 1. The use count, 2. The bit-map for that Super Block. 3.
-The actual memory that will be eventually given to the user. Each
-bitmap is a multiple of 32 in size. If there are 32 x (2^3) blocks of
-single objects to be given, there will be '32 x (2^3)' bits present.
-Each
-32 bits managing the allocated / free status for 32 blocks. Since each
-size_t contains 32-bits, one size_t can manage up to 32
-blocks' status. Each bit-map is made up of a number of size_t,
-whose exact number for a super-block of a given size I have just
-mentioned.<br>
-</div>
-<br>
-<span style="font-weight: bold;">Q3) How do the allocate and deallocate
-functions work in regard to bitmaps?</span><br>
-<br>
-<div style="margin-left: 40px;"> The allocate and deallocate functions
-manipulate the bitmaps and have nothing to do with the memory that is
-given to the user. As I have earlier mentioned, a 1 in the bitmap's bit
-field indicates free, while a 0 indicates allocated. This lets us check
-32 bits at a time to check whether there is at lease one free block in
-those 32 blocks by testing for equality with (0). Now, the allocate
-function will given a memory block find the corresponding bit in the
-bitmap, and will reset it (i.e., make it re-set (0)). And when the
-deallocate function is called, it will again set that bit after
-locating it to indicate that that particular block corresponding to
-this bit in the bit-map is not being used by anyone, and may be used to
-satisfy future requests.<br>
-<br>
-e.g.: Consider a bit-map of 64-bits as represented below:<br>
-1111111111111111111111111111111111111111111111111111111111111111<br>
-<br>
-Now, when the first request for allocation of a single object comes
-along, the first block in address order is returned. And since the
-bit-maps in the reverse order to that of the address order, the last
-bit (LSB if the bit-map is considered as a binary word of 64-bits) is
-re-set to 0.<br>
-<br>
-The bit-map now looks like this:<br>
-1111111111111111111111111111111111111111111111111111111111111110<br>
-</div>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-(Tech-Stuff, Please stay out if you are not interested in the selection
-of certain constants. This has nothing to do with the algorithm per-se,
-only with some vales that must be chosen correctly to ensure that the
-allocator performs well in a real word scenario, and maintains a good
-balance between the memory consumption and the allocation/deallocation
-speed).<br>
-<br>
-The formula for calculating the maximum wastage as a percentage:<br>
-<br>
-(32 x k + 1) / (2 x (32 x k + 1 + 32 x c)) x 100.<br>
-<br>
-Where,<br>
-k =&gt; The constant overhead per node. eg. for list, it is 8 bytes,
-and for map it is 12 bytes.<br>
-c =&gt; The size of the base type on which the map/list is
-instantiated. Thus, suppose the type1 is int and type2 is double,
-they are related by the relation sizeof(double) == 2*sizeof(int). Thus,
-all types must have this double size relation for this formula to work
-properly.<br>
-<br>
-Plugging-in: For List: k = 8 and c = 4 (int and double), we get:<br>
-33.376%<br>
-<br>
-For map/multimap: k = 12, and c = 4 (int and double), we get:<br>
-37.524%<br>
-<br>
-Thus, knowing these values, and based on the sizeof(value_type), we may
-create a function that returns the Max_Wastage_Percentage for us to use.<br>
-<br>
-<hr style="width: 100%; height: 2px;"><small><small><em> See <a
- href="file:///home/dhruv/projects/libstdc++-v3/gcc/libstdc++-v3/docs/html/17_intro/license.html">license.html</a>
-for copying conditions. Comments and suggestions are welcome, and may
-be
-sent to <a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing
-list</a>.</em><br>
-</small></small><br>
-<br>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html
deleted file mode 100644
index fff3410180f..00000000000
--- a/libstdc++-v3/docs/html/ext/howto.html
+++ /dev/null
@@ -1,652 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="Notes for the libstdc++ extensions." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 HOWTO: Extensions</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Prev" href="../27_io/howto.html" type="text/html"
- title="Input/Output" />
-<link rel="Bookmark" href="sgiexts.html" type="text/html"
- title="SGI extensions" />
-<link rel="Bookmark" href="mt_allocator.html" type="text/html"
- title="__mt_alloc" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Extensions</a></h1>
-
-<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.
-</p>
-<p><strong>Before you leap in and use these</strong>, be aware of two things:
-</p>
-<ol>
- <li>Non-Standard means exactly that. The behavior, and the very
- existence, of these extensions may change with little or no
- warning. (Ideally, the really good ones will appear in the next
- revision of C++.) Also, other platforms, other compilers, other
- versions of g++ or libstdc++-v3 may not recognize these names, or
- treat them differently, or... </li>
- <li>You should know how to <a href="../faq/index.html#5_4">access
- these headers properly</a>. </li>
-</ol>
-
-
-<!-- ####################################################### -->
-<hr />
-<h1>Contents</h1>
-<ul>
- <li><a href="#1">Ropes and trees and hashes, oh my!</a></li>
- <li><a href="#2">Added members and types</a></li>
- <li><a href="mt_allocator.html"><code>__mt_alloc</code> </a></li>
- <li><a href="#4">Compile-time checks</a></li>
- <li><a href="#5">LWG Issues</a></li>
- <li><a href="../18_support/howto.html#6">Demangling</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="1">Ropes and trees and hashes, oh my!</a></h2>
- <p>The SGI headers</p>
- <pre>
- &lt;bvector&gt;
- &lt;hash_map&gt;
- &lt;hash_set&gt;
- &lt;rope&gt;
- &lt;slist&gt;
- &lt;tree&gt;
- </pre>
- <p>are all here; <code>&lt;bvector&gt;</code> exposes the old bit_vector
- class that was used before specialization of vector&lt;bool&gt; was
- available (it's actually a typedef for the specialization now).
- <code>&lt;hash_map&gt;</code> and <code>&lt;hash_set&gt;</code>
- are discussed further below. <code>&lt;rope&gt;</code> is the SGI
- specialization for large strings (&quot;rope,&quot; &quot;large
- strings,&quot; get it? love those SGI folks).
- <code>&lt;slist&gt;</code> is a singly-linked list, for when the
- doubly-linked <code>list&lt;&gt;</code> is too much space overhead, and
- <code>&lt;tree&gt;</code> exposes the red-black tree classes used in the
- implementation of the standard maps and sets.
- </p>
- <p>Okay, about those hashing classes... I'm going to foist most of the
- work off onto SGI's own site.
- </p>
- <p>Each of the associative containers map, multimap, set, and multiset
- have a counterpart which uses a
- <a href="http://www.sgi.com/tech/stl/HashFunction.html">hashing
- function</a> to do the arranging, instead of a strict weak ordering
- function. The classes take as one of their template parameters a
- function object that will return the hash value; by default, an
- instantiation of
- <a href="http://www.sgi.com/tech/stl/hash.html">hash</a>.
- You should specialize this functor for your class, or define your own,
- before trying to use one of the hashing classes.
- </p>
- <p>The hashing classes support all the usual associative container
- functions, as well as some extra constructors specifying the number
- of buckets, etc.
- </p>
- <p>Why would you want to use a hashing class instead of the
- &quot;normal&quot; implementations? Matt Austern writes:
- </p>
- <blockquote><em>[W]ith a well chosen hash function, hash tables
- generally provide much better average-case performance than binary
- search trees, and much worse worst-case performance. So if your
- implementation has hash_map, if you don't mind using nonstandard
- components, and if you aren't scared about the possibility of
- pathological cases, you'll probably get better performance from
- hash_map.</em></blockquote>
- <p>(Side note: for those of you wondering, <strong>&quot;Why wasn't a hash
- table included in the Standard in the first #!$@ place?&quot;</strong>
- I'll give a quick answer: it was proposed, but too late and in too
- unorganized a fashion. Some sort of hashing will undoubtedly be
- included in a future Standard.)
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="2">Added members and types</a></h2>
- <p>Some of the classes in the Standard Library have additional
- publicly-available members, and some classes are themselves not in
- the standard. Of those, some are intended purely for the implementors,
- for example, additional typedefs. Those won't be described here
- (or anywhere else).
- </p>
- <ul>
- <li>The extensions added by SGI are so numerous that they have
- <a href="sgiexts.html">their own page</a>. Since the SGI STL is no
- longer actively maintained, we will try and keep this code working
- ourselves.</li>
- <li>Extensions allowing <code>filebuf</code>s to be constructed from
- stdio types are described in the
- <a href="../27_io/howto.html#11">chapter 27 notes</a>.</li>
- </ul>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="4">Compile-time checks</a></h2>
- <p>Currently libstdc++-v3 uses the concept checkers from the Boost
- library to perform <a href="../19_diagnostics/howto.html#3">optional
- compile-time checking</a> of template instantiations of the standard
- containers. They are described in the linked-to page.
- </p>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-<hr />
-<h2><a name="5">LWG Issues</a></h2>
- <p>Everybody's got issues. Even the C++ Standard Library.
- </p>
- <p>The Library Working Group, or LWG, is the ISO subcommittee responsible
- for making changes to the library. They periodically publish an
- Issues List containing problems and possible solutions. As they reach
- a consensus on proposed solutions, we often incorporate the solution
- into libstdc++-v3.
- </p>
- <p>Here are the issues which have resulted in code changes to the library.
- The links are to the specific defect reports from a <strong>partial
- copy</strong> of the Issues List. You can read the full version online
- at the <a href="http://www.open-std.org/jtc1/sc22/wg21/">ISO C++
- Committee homepage</a>, linked to on the
- <a href="http://gcc.gnu.org/readings.html">GCC &quot;Readings&quot;
- page</a>. If
- you spend a lot of time reading the issues, we recommend downloading
- the ZIP file and reading them locally.
- </p>
- <p>(NB: <strong>partial copy</strong> means that not all links within
- the lwg-*.html pages will work.
- Specifically, links to defect reports that have not been accorded full
- DR status will probably break. Rather than trying to mirror the
- entire issues list on our overworked web server, we recommend you go
- to the LWG homepage instead.)
- </p>
- <p>
- If a DR is not listed here, we may simply not have gotten to it yet;
- feel free to submit a patch. Search the include/bits and src
- directories for appearances of _GLIBCXX_RESOLVE_LIB_DEFECTS for
- examples of style. Note that we usually do not make changes to the code
- until an issue has reached <a href="lwg-active.html#DR">DR</a> status.
- </p>
- <dl>
- <dt><a href="lwg-defects.html#5">5</a>:
- <em>string::compare specification questionable</em>
- </dt>
- <dd>This should be two overloaded functions rather than a single function.
- </dd>
-
- <dt><a href="lwg-defects.html#17">17</a>:
- <em>Bad bool parsing</em>
- </dt>
- <dd>Apparently extracting Boolean values was messed up...
- </dd>
-
- <dt><a href="lwg-defects.html#19">19</a>:
- <em>&quot;Noconv&quot; definition too vague</em>
- </dt>
- <dd>If <code>codecvt::do_in</code> returns <code>noconv</code> there are
- no changes to the values in <code>[to, to_limit)</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#22">22</a>:
- <em>Member open vs flags</em>
- </dt>
- <dd>Re-opening a file stream does <em>not</em> clear the state flags.
- </dd>
-
- <dt><a href="lwg-defects.html#25">25</a>:
- <em>String operator&lt;&lt; uses width() value wrong</em>
- </dt>
- <dd>Padding issues.
- </dd>
-
- <dt><a href="lwg-defects.html#48">48</a>:
- <em>Use of non-existent exception constructor</em>
- </dt>
- <dd>An instance of <code>ios_base::failure</code> is constructed instead.
- </dd>
-
- <dt><a href="lwg-defects.html#49">49</a>:
- <em>Underspecification of ios_base::sync_with_stdio</em>
- </dt>
- <dd>The return type is the <em>previous</em> state of synchronization.
- </dd>
-
- <dt><a href="lwg-defects.html#50">50</a>:
- <em>Copy constructor and assignment operator of ios_base</em>
- </dt>
- <dd>These members functions are declared <code>private</code> and are
- thus inaccessible. Specifying the correct semantics of
- &quot;copying stream state&quot; was deemed too complicated.
- </dd>
-
- <dt><a href="lwg-defects.html#60">60</a>:
- <em>What is a formatted input function?</em>
- </dt>
- <dd>This DR made many widespread changes to <code>basic_istream</code>
- and <code>basic_ostream</code> all of which have been implemented.
- </dd>
-
- <dt><a href="lwg-defects.html#63">63</a>:
- <em>Exception-handling policy for unformatted output</em>
- </dt>
- <dd>Make the policy consistent with that of formatted input, unformatted
- input, and formatted output.
- </dd>
-
- <dt><a href="lwg-defects.html#68">68</a>:
- <em>Extractors for char* should store null at end</em>
- </dt>
- <dd>And they do now. An editing glitch in the last item in the list of
- [27.6.1.2.3]/7.
- </dd>
-
- <dt><a href="lwg-defects.html#74">74</a>:
- <em>Garbled text for codecvt::do_max_length</em>
- </dt>
- <dd>The text of the standard was gibberish. Typos gone rampant.
- </dd>
-
- <dt><a href="lwg-defects.html#75">75</a>:
- <em>Contradiction in codecvt::length's argument types</em>
- </dt>
- <dd>Change the first parameter to <code>stateT&amp;</code> and implement
- the new effects paragraph.
- </dd>
-
- <dt><a href="lwg-defects.html#83">83</a>:
- <em>string::npos vs. string::max_size()</em>
- </dt>
- <dd>Safety checks on the size of the string should test against
- <code>max_size()</code> rather than <code>npos</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#90">90</a>:
- <em>Incorrect description of operator&gt;&gt; for strings</em>
- </dt>
- <dd>The effect contain <code>isspace(c,getloc())</code> which must be
- replaced by <code>isspace(c,is.getloc())</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#91">91</a>:
- <em>Description of operator&gt;&gt; and getline() for string&lt;&gt;
- might cause endless loop</em>
- </dt>
- <dd>They behave as a formatted input function and as an unformatted
- input function, respectively (except that <code>getline</code> is
- not required to set <code>gcount</code>).
- </dd>
-
- <dt><a href="lwg-defects.html#103">103</a>:
- <em>set::iterator is required to be modifiable, but this allows
- modification of keys.</em>
- </dt>
- <dd>For associative containers where the value type is the same as
- the key type, both <code>iterator</code> and <code>const_iterator
- </code> are constant iterators.
- </dd>
-
- <dt><a href="lwg-defects.html#109">109</a>:
- <em>Missing binders for non-const sequence elements</em>
- </dt>
- <dd>The <code>binder1st</code> and <code>binder2nd</code> didn't have an
- <code>operator()</code> taking a non-const parameter.
- </dd>
-
- <dt><a href="lwg-defects.html#110">110</a>:
- <em>istreambuf_iterator::equal not const</em>
- </dt>
- <dd>This was not a const member function. Note that the DR says to
- replace the function with a const one; we have instead provided an
- overloaded version with identical contents.
- </dd>
-
- <dt><a href="lwg-defects.html#117">117</a>:
- <em>basic_ostream uses nonexistent num_put member functions</em>
- </dt>
- <dd><code>num_put::put()</code> was overloaded on the wrong types.
- </dd>
-
- <dt><a href="lwg-defects.html#118">118</a>:
- <em>basic_istream uses nonexistent num_get member functions</em>
- </dt>
- <dd>Same as 117, but for <code>num_get::get()</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#129">129</a>:
- <em>Need error indication from seekp() and seekg()</em>
- </dt>
- <dd>These functions set <code>failbit</code> on error now.
- </dd>
-
- <dt><a href="lwg-defects.html#136">136</a>:
- <em>seekp, seekg setting wrong streams?</em>
- </dt>
- <dd><code>seekp</code> should only set the output stream, and
- <code>seekg</code> should only set the input stream.
- </dd>
-
-<!--<dt><a href="lwg-defects.html#159">159</a>:
- <em>Strange use of underflow()</em>
- </dt>
- <dd>In fstream.tcc, the basic_filebuf&lt;&gt;::showmanyc() function
- should probably not be calling <code>underflow()</code>.
- </dd> -->
-
- <dt><a href="lwg-defects.html#167">167</a>:
- <em>Improper use of traits_type::length()</em>
- </dt>
- <dd><code>op&lt;&lt;</code> with a <code>const char*</code> was
- calculating an incorrect number of characters to write.
- </dd>
-
- <dt><a href="lwg-defects.html#169">169</a>:
- <em>Bad efficiency of overflow() mandated</em>
- </dt>
- <dd>Grow efficiently the internal array object.
- </dd>
-
- <dt><a href="lwg-defects.html#171">171</a>:
- <em>Strange seekpos() semantics due to joint position</em>
- </dt>
- <dd>Quite complex to summarize...
- </dd>
-
- <dt><a href="lwg-defects.html#181">181</a>:
- <em>make_pair() unintended behavior</em>
- </dt>
- <dd>This function used to take its arguments as reference-to-const, now
- it copies them (pass by value).
- </dd>
-
- <dt><a href="lwg-defects.html#195">195</a>:
- <em>Should basic_istream::sentry's constructor ever set eofbit?</em>
- </dt>
- <dd>Yes, it can, specifically if EOF is reached while skipping whitespace.
- </dd>
-
- <dt><a href="lwg-defects.html#211">211</a>:
- <em>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</em>
- </dt>
- <dd>If nothing is extracted into the string, <code>op&gt;&gt;</code> now
- sets <code>failbit</code> (which can cause an exception, etc., etc.).
- </dd>
-
- <dt><a href="lwg-defects.html#214">214</a>:
- <em>set::find() missing const overload</em>
- </dt>
- <dd>Both <code>set</code> and <code>multiset</code> were missing
- overloaded find, lower_bound, upper_bound, and equal_range functions
- for const instances.
- </dd>
-
- <dt><a href="lwg-defects.html#231">231</a>:
- <em>Precision in iostream?</em>
- </dt>
- <dd>For conversion from a floating-point type, <code>str.precision()</code>
- is specified in the conversion specification.
- </dd>
-
- <dt><a href="lwg-active.html#233">233</a>:
- <em>Insertion hints in associative containers</em>
- </dt>
- <dd>Implement N1780, first check before then check after, insert as close
- to hint as possible.
- </dd>
-
- <dt><a href="lwg-defects.html#235">235</a>:
- <em>No specification of default ctor for reverse_iterator</em>
- </dt>
- <dd>The declaration of <code>reverse_iterator</code> lists a default constructor.
- However, no specification is given what this constructor should do.
- </dd>
-
- <dt><a href="lwg-defects.html#241">241</a>:
- <em>Does unique_copy() require CopyConstructible and Assignable?</em>
- </dt>
- <dd>Add an helper for forward_iterator/output_iterator, fix the existing
- one for input_iterator/output_iterator not to rely on Assignability.
- </dd>
-
- <dt><a href="lwg-defects.html#243">243</a>:
- <em>get and getline when sentry reports failure</em>
- </dt>
- <dd>Store a null character only if the character array has a non-zero size.
- </dd>
-
- <dt><a href="lwg-defects.html#251">251</a>:
- <em>basic_stringbuf missing allocator_type</em>
- </dt>
- <dd>This nested typedef was originally not specified.
- </dd>
-
- <dt><a href="lwg-defects.html#253">253</a>:
- <em>valarray helper functions are almost entirely useless</em>
- </dt>
- <dd>Make the copy constructor and copy-assignment operator declarations
- public in gslice_array, indirect_array, mask_array, slice_array; provide
- definitions.
- </dd>
-
- <dt><a href="lwg-defects.html#265">265</a>:
- <em>std::pair::pair() effects overly restrictive</em>
- </dt>
- <dd>The default ctor would build its members from copies of temporaries;
- now it simply uses their respective default ctors.
- </dd>
-
- <dt><a href="lwg-defects.html#266">266</a>:
- <em>bad_exception::~bad_exception() missing Effects clause</em>
- </dt>
- <dd>The <code>bad_</code>* classes no longer have destructors (they
- are trivial), since no description of them was ever given.
- </dd>
-
- <dt><a href="lwg-defects.html#271">271</a>:
- <em>basic_iostream missing typedefs</em>
- </dt>
- <dd>The typedefs it inherits from its base classes can't be used, since
- (for example) <code>basic_iostream&lt;T&gt;::traits_type</code> is ambiguous.
- </dd>
-
- <dt><a href="lwg-defects.html#275">275</a>:
- <em>Wrong type in num_get::get() overloads</em>
- </dt>
- <dd>Similar to 118.
- </dd>
-
- <dt><a href="lwg-defects.html#280">280</a>:
- <em>Comparison of reverse_iterator to const reverse_iterator</em>
- </dt>
- <dd>Add global functions with two template parameters.
- (NB: not added for now a templated assignment operator)
- </dd>
-
- <dt><a href="lwg-defects.html#292">292</a>:
- <em>Effects of a.copyfmt (a)</em>
- </dt>
- <dd>If <code>(this == &amp;rhs)</code> do nothing.
- </dd>
-
- <dt><a href="lwg-defects.html#300">300</a>:
- <em>List::merge() specification incomplete</em>
- </dt>
- <dd>If <code>(this == &amp;x)</code> do nothing.
- </dd>
-
- <dt><a href="lwg-defects.html#303">303</a>:
- <em>Bitset input operator underspecified</em>
- </dt>
- <dd>Basically, compare the input character to <code>is.widen(0)</code>
- and <code>is.widen(1)</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#305">305</a>:
- <em>Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</em>
- </dt>
- <dd>Do not specify what <code>codecvt&lt;wchar_t, char, mbstate_t&gt;::do_length</code>
- must return.
- </dd>
-
- <dt><a href="lwg-defects.html#328">328</a>:
- <em>Bad sprintf format modifier in money_put&lt;&gt;::do_put()</em>
- </dt>
- <dd>Change the format string to &quot;%.0Lf&quot;.
- </dd>
-
- <dt><a href="lwg-defects.html#365">365</a>:
- <em>Lack of const-qualification in clause 27</em>
- </dt>
- <dd>Add const overloads of <code>is_open</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#389">389</a>:
- <em>Const overload of valarray::operator[] returns by value</em>
- </dt>
- <dd>Change it to return a <code>const T&amp;</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#402">402</a>:
- <em>Wrong new expression in [some_]allocator::construct</em>
- </dt>
- <dd>Replace &quot;new&quot; with &quot;::new&quot;.
- </dd>
-
- <dt><a href="lwg-defects.html#409">409</a>:
- <em>Closing an fstream should clear the error state</em>
- </dt>
- <dd>Have <code>open</code> clear the error flags.
- </dd>
-
- <dt><a href="lwg-active.html#431">431</a>:
- <em>Swapping containers with unequal allocators</em>
- </dt>
- <dd>Implement Option 3, as per N1599.
- </dd>
-
- <dt><a href="lwg-defects.html#432">432</a>:
- <em>stringbuf::overflow() makes only one write position
- available</em>
- </dt>
- <dd>Implement the resolution, beyond DR 169.
- </dd>
-
- <dt><a href="lwg-defects.html#434">434</a>:
- <em>bitset::to_string() hard to use</em>
- </dt>
- <dd>Add three overloads, taking fewer template arguments.
- </dd>
-
- <dt><a href="lwg-defects.html#438">438</a>:
- <em>Ambiguity in the "do the right thing" clause</em>
- </dt>
- <dd>Implement the resolution, basically cast less.
- </dd>
-
- <dt><a href="lwg-defects.html#453">453</a>:
- <em>basic_stringbuf::seekoff need not always fail for an empty stream</em>
- </dt>
- <dd>Don't fail if the next pointer is null and newoff is zero.
- </dd>
-
- <dt><a href="lwg-defects.html#455">455</a>:
- <em>cerr::tie() and wcerr::tie() are overspecified</em>
- </dt>
- <dd>Initialize cerr tied to cout and wcerr tied to wcout.
- </dd>
-
- <dt><a href="lwg-defects.html#464">464</a>:
- <em>Suggestion for new member functions in standard containers</em>
- </dt>
- <dd>Add <code>data()</code> to <code>std::vector</code> and
- <code>at(const key_type&amp;)</code> to <code>std::map</code>.
- </dd>
-
- <dt><a href="lwg-defects.html#508">508</a>:
- <em>Bad parameters for ranlux64_base_01</em>
- </dt>
- <dd>Fix the parameters.
- </dd>
-
- <dt><a href="lwg-closed.html#512">512</a>:
- <em>Seeding subtract_with_carry_01 from a single unsigned long</em>
- </dt>
- <dd>Construct a <code>linear_congruential</code> engine and seed with it.
- </dd>
-
- <dt><a href="lwg-active.html#526">526</a>:
- <em>Is it undefined if a function in the standard changes in
- parameters?</em>
- </dt>
- <dd>Use &amp;value.
- </dd>
-
- <dt><a href="lwg-defects.html#538">538</a>:
- <em>241 again: Does unique_copy() require CopyConstructible
- and Assignable?</em>
- </dt>
- <dd>In case of input_iterator/output_iterator rely on Assignability of
- input_iterator' value_type.
- </dd>
-
- <dt><a href="lwg-defects.html#541">541</a>:
- <em>shared_ptr template assignment and void</em>
- </dt>
- <dd>Add an auto_ptr&lt;void&gt; specialization.
- </dd>
-
- <dt><a href="lwg-active.html#543">543</a>:
- <em>valarray slice default constructor</em>
- </dt>
- <dd>Follow the straightforward proposed resolution.
- </dd>
-
- <dt><a href="lwg-active.html#586">586</a>:
- <em>string inserter not a formatted function</em>
- </dt>
- <dd>Change it to be a formatted output function (i.e. catch exceptions).
- </dd>
-<!--
- <dt><a href="lwg-defects.html#"></a>:
- <em></em>
- </dt>
- <dd>
- </dd>
-
--->
- </dl>
- <p>Return <a href="#top">to top of page</a> or
- <a href="../faq/index.html">to the FAQ</a>.
- </p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/lwg-active.html b/libstdc++-v3/docs/html/ext/lwg-active.html
deleted file mode 100644
index a4f69b64511..00000000000
--- a/libstdc++-v3/docs/html/ext/lwg-active.html
+++ /dev/null
@@ -1,8287 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><head><title>C++ Standard Library Active Issues List</title>
-
-<style>ins {background-color:#FFFFA0}
-del {background-color:#FFFFA0}</style></head>
-
-<body bgcolor="#ffffff" text="#000000">
-<table>
-<tbody><tr>
-<td align="left">Doc. no.</td>
-<td align="left">N2130=06-0200</td>
-</tr>
-<tr>
-<td align="left">Date:</td>
-<td align="left">2006-11-03</td>
-</tr>
-<tr>
-<td align="left">Project:</td>
-<td align="left">Programming Language C++</td>
-</tr>
-<tr>
-<td align="left">Reply to:</td>
-<td align="left">Howard Hinnant &lt;howard.hinnant@gmail.com&gt;</td>
-</tr>
-</tbody></table>
-<h1>C++ Standard Library Active Issues List (Revision R45)</h1>
- <p>Reference ISO/IEC IS 14882:1998(E)</p>
- <p>Also see:</p>
- <ul>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li>
- </ul>
- <p>The purpose of this document is to record the status of issues
- which have come before the Library Working Group (LWG) of the ANSI
- (J16) and ISO (WG21) C++ Standards Committee. Issues represent
- potential defects in the ISO/IEC IS 14882:1998(E) document. Issues
- are not to be used to request new features. </p>
-
- <p>This document contains only library issues which are actively being
- considered by the Library Working Group. That is, issues which have a
- status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>,
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>. See
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a> for issues considered defects and
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a> for issues considered closed.</p>
-
- <p>The issues in these lists are not necessarily formal ISO Defect
- Reports (DR's). While some issues will eventually be elevated to
- official Defect Report status, other issues will be disposed of in
- other ways. See <a href="#Status">Issue Status</a>.</p>
-
- <p>This document is in an experimental format designed for both
- viewing via a world-wide web browser and hard-copy printing. It
- is available as an HTML file for browsing or PDF file for
- printing.</p>
-
- <p>Prior to Revision 14, library issues lists existed in two slightly
- different versions; a Committee Version and a Public
- Version. Beginning with Revision 14 the two versions were combined
- into a single version.</p>
-
- <p>This document includes <i>[bracketed italicized notes]</i> as a
- reminder to the LWG of current progress on issues. Such notes are
- strictly unofficial and should be read with caution as they may be
- incomplete or incorrect. Be aware that LWG support for a particular
- resolution can quickly change if new viewpoints or killer examples are
- presented in subsequent discussions.</p>
-
- <p>For the most current official version of this document see
- <a href="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21/</a>.
- Requests for further information about this document should include
- the document number above, reference ISO/IEC 14882:1998(E), and be
- submitted to Information Technology Industry Council (ITI), 1250 Eye
- Street NW, Washington, DC 20005.</p>
-
- <p>Public information as to how to obtain a copy of the C++ Standard,
- join the standards committee, submit an issue, or comment on an issue
- can be found in the comp.std.c++ FAQ.
- Public discussion of C++ Standard related issues occurs on <a href="news://comp.std.c++/">news:comp.std.c++</a>.
- </p>
-
- <p>For committee members, files available on the committee's private
- web site include the HTML version of the Standard itself. HTML
- hyperlinks from this issues list to those files will only work for
- committee members who have downloaded them into the same disk
- directory as the issues list files. </p>
-<h2>Revision History</h2>
-<ul>
-<li>R45:
-2006-11-03 post-Portland mailing.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>.
-</li>
-<li>R44:
-2006-09-08 pre-Portland mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.
-</li>
-<li>R43:
-2006-06-23 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.
-</li>
-<li>R42:
-2006-04-21 post-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#548">548</a> to Open.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review.
-</li>
-<li>R41:
-2006-02-24 pre-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>.
-Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.
-</li>
-<li>R40:
-2005-12-16 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.
-</li>
-<li>R39:
-2005-10-14 post-Mont Tremblant mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
-</li>
-<li>R38:
-2005-07-03 pre-Mont Tremblant mailing.
-Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
-</li>
-<li>R37:
-2005-06 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
-</li>
-<li>R36:
-2005-04 post-Lillehammer mailing. All issues in "ready" status except
-for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
-previously in "DR" status were moved to "WP".
-</li>
-<li>R35:
-2005-03 pre-Lillehammer mailing.
-</li>
-<li>R34:
-2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
-</li>
-<li>R33:
-2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
-</li>
-<li>R32:
-2004-09 pre-Redmond mailing: reflects new proposed resolutions and
-new issues received after the 2004-07 mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
-</li>
-<li>R31:
-2004-07 mid-term mailing: reflects new proposed resolutions and
-new issues received after the post-Sydney mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
-</li>
-<li>R30:
-Post-Sydney mailing: reflects decisions made at the Sydney meeting.
-Voted all "Ready" issues from R29 into the working paper.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
-</li>
-<li>R29:
-Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
-</li>
-<li>R28:
-Post-Kona mailing: reflects decisions made at the Kona meeting.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
-</li>
-<li>R27:
-Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
-</li>
-<li>R26:
-Post-Oxford mailing: reflects decisions made at the Oxford meeting.
-All issues in Ready status were voted into DR status. All issues in
-DR status were voted into WP status.
-</li>
-<li>R25:
-Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
-</li>
-<li>R24:
-Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
-meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
-moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
-at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
-concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
-</li>
-<li>R23:
-Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
-Moved issues in the TC to TC status.
-</li>
-<li>R22:
-Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
-</li>
-<li>R21:
-Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
-</li>
-<li>R20:
-Post-Redmond mailing; reflects actions taken in Redmond. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
-not discussed at the meeting.
-
-All Ready issues were moved to DR status, with the exception of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-
-Noteworthy issues discussed at Redmond include
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
-</li>
-<li>R19:
-Pre-Redmond mailing. Added new issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
-</li>
-<li>R18:
-Post-Copenhagen mailing; reflects actions taken in Copenhagen.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
-to DR.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
-to Ready.
-
-Closed issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
-as NAD.
-
-</li>
-<li>R17:
-Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
-resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
-</li>
-<li>R16:
-post-Toronto mailing; reflects actions taken in Toronto. Added new
-issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
-appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
-the bug in enough places.
-</li>
-<li>R15:
-pre-Toronto mailing. Added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
-changes so that we pass Weblint tests.
-</li>
-<li>R14:
-post-Tokyo II mailing; reflects committee actions taken in
-Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
-</li>
-<li>R13:
-pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
-</li>
-<li>R12:
-pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
-</li>
-<li>R11:
-post-Kona mailing: Updated to reflect LWG and full committee actions
-in Kona (99-0048/N1224). Note changed resolution of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
-to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
-"closed" documents. Changed the proposed resolution of issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
-</li>
-<li>R10:
-pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
-</li>
-<li>R9:
-pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
-"closed" documents. (99-0030/N1206, 25 Aug 99)
-</li>
-<li>R8:
-post-Dublin mailing. Updated to reflect LWG and full committee actions
-in Dublin. (99-0016/N1193, 21 Apr 99)
-</li>
-<li>R7:
-pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
-</li>
-<li>R6:
-pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
-and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
-</li>
-<li>R5:
-update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
-for making list public. (30 Dec 98)
-</li>
-<li>R4:
-post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
-issues corrected. (22 Oct 98)
-</li>
-<li>R3:
-post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
-added, many issues updated to reflect LWG consensus (12 Oct 98)
-</li>
-<li>R2:
-pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
-</li>
-<li>R1:
-Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
-format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
-</li>
-</ul>
-<h2>
-<a name="Status"></a>Issue Status</h2>
- <p><b><a name="New">New</a></b> - The issue has not yet been
- reviewed by the LWG. Any <b>Proposed Resolution</b> is purely a
- suggestion from the issue submitter, and should not be construed as
- the view of LWG.</p>
-
- <p><b><a name="Open">Open</a></b> - The LWG has discussed the issue
- but is not yet ready to move the issue forward. There are several
- possible reasons for open status:</p>
- <ul>
- <li>Consensus may have not yet have been reached as to how to deal
- with the issue.</li>
- <li>Informal consensus may have been reached, but the LWG awaits
- exact <b>Proposed Resolution</b> wording for review.</li>
- <li>The LWG wishes to consult additional technical experts before
- proceeding.</li>
- <li>The issue may require further study.</li>
- </ul>
-
- <p>A <b>Proposed Resolution</b> for an open issue is still not be
- construed as the view of LWG. Comments on the current state of
- discussions are often given at the end of open issues in an italic
- font. Such comments are for information only and should not be given
- undue importance.</p>
-
- <p><b><a name="Dup">Dup</a></b> - The LWG has reached consensus that
- the issue is a duplicate of another issue, and will not be further
- dealt with. A <b>Rationale</b> identifies the duplicated issue's
- issue number. </p>
-
- <p><b><a name="NAD">NAD</a></b> - The LWG has reached consensus that
- the issue is not a defect in the Standard, and the issue is ready to
- forward to the full committee as a proposed record of response. A
- <b>Rationale</b> discusses the LWG's reasoning.</p>
-
- <p><b><a name="Review">Review</a></b> - Exact wording of a
- <b>Proposed Resolution</b> is now available for review on an issue
- for which the LWG previously reached informal consensus.</p>
-
- <p><b><a name="Tentatively Ready">Tentatively Ready</a></b> - The issue has
- been reviewed online, but not in a meeting, and some support has been formed
- for the proposed resolution. Tentatively Ready issues may be moved to Ready
- and forwarded to full committee within the same meeting. Unlike Ready issues
- they will be reviewed in subcommittee prior to forwarding to full committee.</p>
-
- <p><b><a name="Ready">Ready</a></b> - The LWG has reached consensus
- that the issue is a defect in the Standard, the <b>Proposed
- Resolution</b> is correct, and the issue is ready to forward to the
- full committee for further action as a Defect Report (DR).</p>
-
- <p><b><a name="DR">DR</a></b> - (Defect Report) - The full J16
- committee has voted to forward the issue to the Project Editor to be
- processed as a Potential Defect Report. The Project Editor reviews
- the issue, and then forwards it to the WG21 Convenor, who returns it
- to the full committee for final disposition. This issues list
- accords the status of DR to all these Defect Reports regardless of
- where they are in that process.</p>
-
- <p><b><a name="TC">TC</a></b> - (Technical Corrigenda) - The full
- WG21 committee has voted to accept the Defect Report's Proposed
- Resolution as a Technical Corrigenda. Action on this issue is thus
- complete and no further action is possible under ISO rules.</p>
-
- <p><b><a name="WP">WP</a></b> - (Working Paper) - The proposed
- resolution has not been accepted as a Technical Corrigendum, but
- the full WG21 committee has voted to apply the Defect Report's Proposed
- Resolution to the working paper.</p>
-
- <p><b><a name="RR">RR</a></b> - (Record of Response) - The full WG21
- committee has determined that this issue is not a defect in the
- Standard. Action on this issue is thus complete and no further
- action is possible under ISO rules.</p>
-
- <p><b><a name="Future">Future</a></b> - In addition to the regular
- status, the LWG believes that this issue should be revisited at the
- next revision of the standard. It is usually paired with NAD.</p>
-
- <p>Issues are always given the status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> when
- they first appear on the issues list. They may progress to
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> while the LWG
- is actively working on them. When the LWG has reached consensus on
- the disposition of an issue, the status will then change to
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> as appropriate. Once the full J16 committee votes to
- forward Ready issues to the Project Editor, they are given the
- status of Defect Report ( <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>). These in turn may
- become the basis for Technical Corrigenda (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>),
- or are closed without action other than a Record of Response
- (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a> ). The intent of this LWG process is that
- only issues which are truly defects in the Standard move to the
- formal ISO DR status.
- </p>
-
-<h2>Active Issues</h2>
-<hr>
-<a name="23"><h3>23.&nbsp;Num_get overflow result</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The current description of numeric input does not account for the
-possibility of overflow. This is an implicit result of changing the
-description to rely on the definition of scanf() (which fails to
-report overflow), and conflicts with the documented behavior of
-traditional and current implementations. </p>
-
-<p>Users expect, when reading a character sequence that results in a
-value unrepresentable in the specified type, to have an error
-reported. The standard as written does not permit this. </p>
-
-<p><b>Further comments from Dietmar:</b></p>
-
-<p>
-I don't feel comfortable with the proposed resolution to issue 23: It
-kind of simplifies the issue to much. Here is what is going on:
-</p>
-
-<p>
-Currently, the behavior of numeric overflow is rather counter intuitive
-and hard to trace, so I will describe it briefly:
-</p>
-
-<ul>
- <li>
- According to 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>
- paragraph 11 <tt>failbit</tt> is set if <tt>scanf()</tt> would
- return an input error; otherwise a value is converted to the rules
- of <tt>scanf</tt>.
- </li>
- <li>
- <tt>scanf()</tt> is defined in terms of <tt>fscanf()</tt>.
- </li>
- <li>
- <tt>fscanf()</tt> returns an input failure if during conversion no
- character matching the conversion specification could be extracted
- before reaching EOF. This is the only reason for <tt>fscanf()</tt>
- to fail due to an input error and clearly does not apply to the case
- of overflow.
- </li>
- <li>
- Thus, the conversion is performed according to the rules of
- <tt>fscanf()</tt> which basically says that <tt>strtod</tt>,
- <tt>strtol()</tt>, etc. are to be used for the conversion.
- </li>
- <li>
- The <tt>strtod()</tt>, <tt>strtol()</tt>, etc. functions consume as
- many matching characters as there are and on overflow continue to
- consume matching characters but also return a value identical to
- the maximum (or minimum for signed types if there was a leading minus)
- value of the corresponding type and set <tt>errno</tt> to <tt>ERANGE</tt>.
- </li>
- <li>
- Thus, according to the current wording in the standard, overflows
- can be detected! All what is to be done is to check <tt>errno</tt>
- after reading an element and, of course, clearing <tt>errno</tt>
- before trying a conversion. With the current wording, it can be
- detected whether the overflow was due to a positive or negative
- number for signed types.
- </li>
-</ul>
-
-<p><b>Further discussion from Redmond:</b></p>
-
-<p>The basic problem is that we've defined our behavior,
-including our error-reporting behavior, in terms of C90. However,
-C90's method of reporting overflow in scanf is not technically an
-"input error". The <tt>strto_*</tt> functions are more precise.</p>
-
-<p>There was general consensus that <tt>failbit</tt> should be set
-upon overflow. We considered three options based on this:</p>
-<ol>
-<li>Set failbit upon conversion error (including overflow), and
- don't store any value.</li>
-<li>Set failbit upon conversion error, and also set <tt>errno</tt> to
- indicated the precise nature of the error.</li>
-<li>Set failbit upon conversion error. If the error was due to
- overflow, store +-numeric_limits&lt;T&gt;::max() as an
- overflow indication.</li>
-</ol>
-
-<p>Straw poll: (1) 5; (2) 0; (3) 8.</p>
-
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Discussed at Lillehammer. General outline of what we want the
- solution to look like: we want to say that overflow is an error, and
- provide a way to distinguish overflow from other kinds of errors.
- Choose candidate field the same way scanf does, but don't describe
- the rest of the process in terms of format. If a finite input field
- is too large (positive or negative) to be represented as a finite
- value, then set failbit and assign the nearest representable value.
- Bill will provide wording.</p>
-
-<hr>
-<a name="96"><h3>96.&nbsp;Vector&lt;bool&gt; is not a container</h3></a><p><b>Section:</b>&nbsp;23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p><tt>vector&lt;bool&gt;</tt> is not a container as its reference and
-pointer types are not references and pointers. </p>
-
-<p>Also it forces everyone to have a space optimization instead of a
-speed one.</p>
-
-<p><b>See also:</b> 99-0008 == N1185 Vector&lt;bool&gt; is
-Nonconforming, Forces Optimization Choice.</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[In Santa Cruz the LWG felt that this was Not A Defect.]</i></p>
-
-<p><i>[In Dublin many present felt that failure to meet Container
-requirements was a defect. There was disagreement as to whether
-or not the optimization requirements constituted a defect.]</i></p>
-
-<p><i>[The LWG looked at the following resolutions in some detail:
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; * Not A Defect.<br>
-&nbsp;&nbsp;&nbsp;&nbsp; * Add a note explaining that vector&lt;bool&gt; does not meet
-Container requirements.<br>
-&nbsp;&nbsp;&nbsp;&nbsp; * Remove vector&lt;bool&gt;.<br>
-&nbsp;&nbsp;&nbsp;&nbsp; * Add a new category of container requirements which
-vector&lt;bool&gt; would meet.<br>
-&nbsp;&nbsp;&nbsp;&nbsp; * Rename vector&lt;bool&gt;.<br>
-<br>
-No alternative had strong, wide-spread, support and every alternative
-had at least one "over my dead body" response.<br>
-<br>
-There was also mention of a transition scheme something like (1) add
-vector_bool and deprecate vector&lt;bool&gt; in the next standard. (2)
-Remove vector&lt;bool&gt; in the following standard.]</i></p>
-
-<p><i>[Modifying container requirements to permit returning proxies
-(thus allowing container requirements conforming vector&lt;bool&gt;)
-was also discussed.]</i></p>
-
-<p><i>[It was also noted that there is a partial but ugly workaround in
-that vector&lt;bool&gt; may be further specialized with a customer
-allocator.]</i></p>
-
-<p><i>[Kona: Herb Sutter presented his paper J16/99-0035==WG21/N1211,
-vector&lt;bool&gt;: More Problems, Better Solutions. Much discussion
-of a two step approach: a) deprecate, b) provide replacement under a
-new name. LWG straw vote on that: 1-favor, 11-could live with, 2-over
-my dead body. This resolution was mentioned in the LWG report to the
-full committee, where several additional committee members indicated
-over-my-dead-body positions.]</i></p>
-
-<p>Discussed at Lillehammer. General agreement that we should
- deprecate vector&lt;bool&gt; and introduce this functionality under
- a different name, e.g. bit_vector. This might make it possible to
- remove the vector&lt;bool&gt; specialization in the standard that comes
- after C++0x. There was also a suggestion that
- in C++0x we could additional say that it's implementation defined
- whether vector&lt;bool&gt; refers to the specialization or to the
- primary template, but there wasn't general agreement that this was a
- good idea.</p>
-
-<p>We need a paper for the new bit_vector class.</p>
-
-<hr>
-<a name="201"><h3>201.&nbsp;Numeric limits terminology wrong</h3></a><p><b>Section:</b>&nbsp;18.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.limits"> [lib.limits]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Stephen Cleary&nbsp; <b>Date:</b>&nbsp;21 Dec 1999</p>
-<p>
-In some places in this section, the terms "fundamental types" and
-"scalar types" are used when the term "arithmetic types" is intended.
-The current usage is incorrect because void is a fundamental type and
-pointers are scalar types, neither of which should have
-specializations of numeric_limits.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Lillehammer: it remains true that numeric_limits is using
- imprecise language. However, none of the proposals for changed
- wording are clearer. A redesign of numeric_limits is needed, but this
- is more a task than an open issue.]</i></p>
-<hr>
-<a name="206"><h3>206.&nbsp;operator new(size_t, nothrow) may become unlinked to ordinary operator new if ordinary version replaced</h3></a><p><b>Section:</b>&nbsp;18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;29 Aug 1999</p>
-<p>As specified, the implementation of the nothrow version of operator
-new does not necessarily call the ordinary operator new, but may
-instead simply call the same underlying allocator and return a null
-pointer instead of throwing an exception in case of failure.</p>
-
-<p>Such an implementation breaks code that replaces the ordinary
-version of new, but not the nothrow version. If the ordinary version
-of new/delete is replaced, and if the replaced delete is not
-compatible with pointers returned from the library versions of new,
-then when the replaced delete receives a pointer allocated by the
-library new(nothrow), crash follows.</p>
-
-<p>The fix appears to be that the lib version of new(nothrow) must
-call the ordinary new. Thus when the ordinary new gets replaced, the
-lib version will call the replaced ordinary new and things will
-continue to work.</p>
-
-<p>An alternative would be to have the ordinary new call
-new(nothrow). This seems sub-optimal to me as the ordinary version of
-new is the version most commonly replaced in practice. So one would
-still need to replace both ordinary and nothrow versions if one wanted
-to replace the ordinary version.</p>
-
-<p>Another alternative is to put in clear text that if one version is
-replaced, then the other must also be replaced to maintain
-compatibility. Then the proposed resolution below would just be a
-quality of implementation issue. There is already such text in
-paragraph 7 (under the new(nothrow) version). But this nuance is
-easily missed if one reads only the paragraphs relating to the
-ordinary new.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Yes, they may become unlinked, and that is by design. If a user
-replaces one, the user should also replace the other.</p>
-
-<p><i>[
-Reopened due to a gcc conversation between Howard, Martin and Gaby. Forwarding
-or not is visible behavior to the client and it would be useful for the client
-to know which behavior it could depend on.
-]</i></p>
-
-<hr>
-<a name="233"><h3>233.&nbsp;Insertion hints in associative containers</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;30 Apr 2000</p>
-<p>
-If <tt>mm</tt> is a multimap and <tt>p</tt> is an iterator
-into the multimap, then <tt>mm.insert(p, x)</tt> inserts
-<tt>x</tt> into <tt>mm</tt> with <tt>p</tt> as a hint as
-to where it should go. Table 69 claims that the execution time is
-amortized constant if the insert winds up taking place adjacent to
-<tt>p</tt>, but does not say when, if ever, this is guaranteed to
-happen. All it says it that <tt>p</tt> is a hint as to where to
-insert.
-</p>
-<p>
-The question is whether there is any guarantee about the relationship
-between <tt>p</tt> and the insertion point, and, if so, what it
-is.
-</p>
-<p>
-I believe the present state is that there is no guarantee: The user
-can supply <tt>p</tt>, and the implementation is allowed to
-disregard it entirely.
-</p>
-
-<p><b>Additional comments from Nathan:</b><br>
-
-The vote [in Redmond] was on whether to elaborately specify the use of
-the hint, or to require behavior only if the value could be inserted
-adjacent to the hint. I would like to ensure that we have a chance to
-vote for a deterministic treatment: "before, if possible, otherwise
-after, otherwise anywhere appropriate", as an alternative to the
-proposed "before or after, if possible, otherwise [...]".
-</p>
-
-
-<p><b>Proposed resolution:</b></p>
-
-<p>In table 69 "Associative Container Requirements" in 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in the row for <tt>a.insert(p, t)</tt>,
-change</p>
-
-<blockquote>
-iterator p is a hint pointing to where the insert
-should start to search.
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-insertion adjacent to iterator p is preferred if
-more than one insertion point is valid.
-</blockquote>
-
-<p>and change</p>
-
-<blockquote>
-logarithmic in general, but amortized constant if
-t is inserted right after p.
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-logarithmic in general, but amortized constant if
-t is inserted adjacent to iterator p.
-</blockquote>
-
-<p><i>[Toronto: there was general agreement that this is a real defect:
-when inserting an element x into a multiset that already contains
-several copies of x, there is no way to know whether the hint will be
-used. The proposed resolution was that the new element should always
-be inserted as close to the hint as possible. So, for example, if
-there is a subsequence of equivalent values, then providing a.begin()
-as the hint means that the new element should be inserted before the
-subsequence even if a.begin() is far away. JC van Winkel supplied
-precise wording for this proposed resolution, and also for an
-alternative resolution in which hints are only used when they are
-adjacent to the insertion point.]</i></p>
-
-<p><i>[Copenhagen: the LWG agreed to the original proposed resolution,
-in which an insertion hint would be used even when it is far from the
-insertion point. This was contingent on seeing a reference
-implementation showing that it is possible to implement this
-requirement without loss of efficiency. John Potter provided such a
-reference implementation.]</i></p>
-
-<p><i>[Redmond: The LWG was reluctant to adopt the proposal that
-emerged from Copenhagen: it seemed excessively complicated, and went
-beyond fixing the defect that we identified in Toronto. PJP provided
-the new wording described in this issue. Nathan agrees that we
-shouldn't adopt the more detailed semantics, and notes: "we know that
-you can do it efficiently enough with a red-black tree, but there are
-other (perhaps better) balanced tree techniques that might differ
-enough to make the detailed semantics hard to satisfy."]</i></p>
-
-<p><i>[Curaçao: Nathan should give us the alternative wording he
-suggests so the LWG can decide between the two options.]</i></p>
-
-<p><i>[Lillehammer: The LWG previously rejected the more detailed
- semantics, because it seemed more loike a new feature than like
- defect fixing. We're now more sympathetic to it, but we (especially
- Bill) are still worried about performance. N1780 describes a naive
- algorithm, but it's not clear whether there is a non-naive
- implementation. Is it possible to implement this as efficently as
- the current version of insert?]</i></p>
-
-<p><i>[Post Lillehammer: N1780 updated in post meeting mailing with
-feedback from Lillehammer with more information regarding performance.
-]</i></p>
-
-<hr>
-<a name="254"><h3>254.&nbsp;Exception types in clause 19 are constructed from <tt>std::string</tt>
-</h3></a><p><b>Section:</b>&nbsp;19.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.std.exceptions"> [lib.std.exceptions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;01 Aug 2000</p>
-<p>
-Many of the standard exception types which implementations are
-required to throw are constructed with a const std::string&amp;
-parameter. For example:
-</p>
-
-<pre> 19.1.5 Class out_of_range [lib.out.of.range]
- namespace std {
- class out_of_range : public logic_error {
- public:
- explicit out_of_range(const string&amp; what_arg);
- };
- }
-
- 1 The class out_of_range defines the type of objects thrown as excep-
- tions to report an argument value not in its expected range.
-
- out_of_range(const string&amp; what_arg);
-
- Effects:
- Constructs an object of class out_of_range.
- Postcondition:
- strcmp(what(), what_arg.c_str()) == 0.
-</pre>
-
-<p>
-There are at least two problems with this:
-</p>
-<ol>
-<li>A program which is low on memory may end up throwing
-std::bad_alloc instead of out_of_range because memory runs out while
-constructing the exception object.</li>
-<li>An obvious implementation which stores a std::string data member
-may end up invoking terminate() during exception unwinding because the
-exception object allocates memory (or rather fails to) as it is being
-copied.</li>
-</ol>
-
-<p>
-There may be no cure for (1) other than changing the interface to
-out_of_range, though one could reasonably argue that (1) is not a
-defect. Personally I don't care that much if out-of-memory is reported
-when I only have 20 bytes left, in the case when out_of_range would
-have been reported. People who use exception-specifications might care
-a lot, though.
-</p>
-
-<p>
-There is a cure for (2), but it isn't completely obvious. I think a
-note for implementors should be made in the standard. Avoiding
-possible termination in this case shouldn't be left up to chance. The
-cure is to use a reference-counted "string" implementation
-in the exception object. I am not necessarily referring to a
-std::string here; any simple reference-counting scheme for a NTBS
-would do.
-</p>
-
-<p><b>Further discussion, in email:</b></p>
-
-<p>
-...I'm not so concerned about (1). After all, a library implementation
-can add const char* constructors as an extension, and users don't
-<i>need</i> to avail themselves of the standard exceptions, though this is
-a lame position to be forced into. FWIW, std::exception and
-std::bad_alloc don't require a temporary basic_string.
-</p>
-
-<p>
-...I don't think the fixed-size buffer is a solution to the problem,
-strictly speaking, because you can't satisfy the postcondition
-<br>
- <tt>&nbsp;&nbsp;strcmp(what(), what_arg.c_str()) == 0</tt>
-<br>
-For all values of what_arg (i.e. very long values). That means that
-the only truly conforming solution requires a dynamic allocation.
-</p>
-
-<p><b>Further discussion, from Redmond:</b></p>
-
-<p>The most important progress we made at the Redmond meeting was
-realizing that there are two separable issues here: the const
-string&amp; constructor, and the copy constructor. If a user writes
-something like <tt>throw std::out_of_range("foo")</tt>, the const
-string&amp; constructor is invoked before anything gets thrown. The
-copy constructor is potentially invoked during stack unwinding.</p>
-
-<p>The copy constructor is a more serious problem, becuase failure
-during stack unwinding invokes <tt>terminate</tt>. The copy
-constructor must be nothrow. <i>Curaçao: Howard thinks this
-requirement may already be present.</i></p>
-
-<p>The fundamental problem is that it's difficult to get the nothrow
-requirement to work well with the requirement that the exception
-objects store a string of unbounded size, particularly if you also try
-to make the const string&amp; constructor nothrow. Options discussed
-include:</p>
-
-<ul>
-<li>Limit the size of a string that exception objects are required to
-throw: change the postconditions of 19.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.domain.error"> [lib.domain.error]</a> paragraph 3
-and 19.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.runtime.error"> [lib.runtime.error]</a> paragraph 3 to something like this:
-"strncmp(what(), what_arg._str(), N) == 0, where N is an
-implementation defined constant no smaller than 256".</li>
-<li>Allow the const string&amp; constructor to throw, but not the
-copy constructor. It's the implementor's responsibility to get it
-right. (An implementor might use a simple refcount class.)</li>
-<li>Compromise between the two: an implementation is not allowed to
-throw if the string's length is less than some N, but, if it doesn't
-throw, the string must compare equal to the argument.</li>
-<li>Add a new constructor that takes a const char*</li>
-</ul>
-
-<p>(Not all of these options are mutually exclusive.)</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-
-<p>Throwing a bad_alloc while trying to construct a message for another
-exception-derived class is not necessarily a bad thing. And the
-bad_alloc constructor already has a no throw spec on it (18.4.2.1).</p>
-
-<p><b>Future:</b></p>
-
-<p>All involved would like to see const char* constructors added, but
-this should probably be done for C++0X as opposed to a DR.</p>
-
-<p>I believe the no throw specs currently decorating these functions
-could be improved by some kind of static no throw spec checking
-mechanism (in a future C++ language). As they stand, the copy
-constructors might fail via a call to unexpected. I think what is
-intended here is that the copy constructors can't fail.</p>
-
-<p><i>[Pre-Sydney: reopened at the request of Howard Hinnant.
- Post-Redmond: James Kanze noticed that the copy constructors of
- exception-derived classes do not have nothrow clauses. Those
- classes have no copy constructors declared, meaning the
- compiler-generated implicit copy constructors are used, and those
- compiler-generated constructors might in principle throw anything.]</i></p>
-
-<hr>
-<a name="255"><h3>255.&nbsp;Why do <tt>basic_streambuf&lt;&gt;::pbump()</tt> and <tt>gbump()</tt> take an int?</h3></a><p><b>Section:</b>&nbsp;27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 Aug 2000</p>
-<p>
-The basic_streambuf members gbump() and pbump() are specified to take an
-int argument. This requirement prevents the functions from effectively
-manipulating buffers larger than std::numeric_limits&lt;int&gt;::max()
-characters. It also makes the common use case for these functions
-somewhat difficult as many compilers will issue a warning when an
-argument of type larger than int (such as ptrdiff_t on LLP64
-architectures) is passed to either of the function. Since it's often the
-result of the subtraction of two pointers that is passed to the
-functions, a cast is necessary to silence such warnings. Finally, the
-usage of a native type in the functions signatures is inconsistent with
-other member functions (such as sgetn() and sputn()) that manipulate the
-underlying character buffer. Those functions take a streamsize argument.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the signatures of these functions in the synopsis of template
-class basic_streambuf (27.5.2) and in their descriptions (27.5.2.3.1, p4
-and 27.5.2.3.2, p4) to take a streamsize argument.
-</p>
-
-<p>
-Although this change has the potential of changing the ABI of the
-library, the change will affect only platforms where int is different
-than the definition of streamsize. However, since both functions are
-typically inline (they are on all known implementations), even on such
-platforms the change will not affect any user code unless it explicitly
-relies on the existing type of the functions (e.g., by taking their
-address). Such a possibility is IMO quite remote.
-</p>
-
-<p>
-Alternate Suggestion from Howard Hinnant, c++std-lib-7780:
-</p>
-
-<p>
-This is something of a nit, but I'm wondering if streamoff wouldn't be a
-better choice than streamsize. The argument to pbump and gbump MUST be
-signed. But the standard has this to say about streamsize
-(27.4.1/2/Footnote):
-</p>
-
-<blockquote>
- [Footnote: streamsize is used in most places where ISO C would use
- size_t. Most of the uses of streamsize could use size_t, except for
- the strstreambuf constructors, which require negative values. It
- should probably be the signed type corresponding to size_t (which is
- what Posix.2 calls ssize_t). --- end footnote]
-</blockquote>
-
-<p>
-This seems a little weak for the argument to pbump and gbump. Should we
-ever really get rid of strstream, this footnote might go with it, along
-with the reason to make streamsize signed.
-</p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes this change is too big for now. We may wish to
-reconsider this for a future revision of the standard. One
-possibility is overloading pbump, rather than changing the
-signature.</p>
-<p><i>[
-[2006-05-04: Reopened at the request of Chris (Krzysztof ?elechowski)]
-]</i></p>
-<hr>
-<a name="258"><h3>258.&nbsp;Missing allocator requirement</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;22 Aug 2000</p>
-<p>
-From lib-7752:
-</p>
-
-<p>
-I've been assuming (and probably everyone else has been assuming) that
-allocator instances have a particular property, and I don't think that
-property can be deduced from anything in Table 32.
-</p>
-
-<p>
-I think we have to assume that allocator type conversion is a
-homomorphism. That is, if x1 and x2 are of type X, where
-X::value_type is T, and if type Y is X::template
-rebind&lt;U&gt;::other, then Y(x1) == Y(x2) if and only if x1 == x2.
-</p>
-
-<p>
-Further discussion: Howard Hinnant writes, in lib-7757:
-</p>
-
-<p>
-I think I can prove that this is not provable by Table 32. And I agree
-it needs to be true except for the "and only if". If x1 != x2, I see no
-reason why it can't be true that Y(x1) == Y(x2). Admittedly I can't
-think of a practical instance where this would happen, or be valuable.
-But I also don't see a need to add that extra restriction. I think we
-only need:
-</p>
-
-<blockquote>
- if (x1 == x2) then Y(x1) == Y(x2)
-</blockquote>
-
-<p>
-If we decide that == on allocators is transitive, then I think I can
-prove the above. But I don't think == is necessarily transitive on
-allocators. That is:
-</p>
-
-<p>
-Given x1 == x2 and x2 == x3, this does not mean x1 == x3.
-</p>
-
-<p>Example:</p>
-
-<blockquote>
-<p>
-x1 can deallocate pointers from: x1, x2, x3 <br>
-x2 can deallocate pointers from: x1, x2, x4 <br>
-x3 can deallocate pointers from: x1, x3 <br>
-x4 can deallocate pointers from: x2, x4
-</p>
-
-<p>
-x1 == x2, and x2 == x4, but x1 != x4
-</p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Toronto: LWG members offered multiple opinions. One
-opinion is that it should not be required that <tt>x1 == x2</tt>
-implies <tt>Y(x1) == Y(x2)</tt>, and that it should not even be
-required that <tt>X(x1) == x1</tt>. Another opinion is that
-the second line from the bottom in table 32 already implies the
-desired property. This issue should be considered in light of
-other issues related to allocator instances.]</i></p>
-<hr>
-<a name="290"><h3>290.&nbsp;Requirements to for_each and its function object</h3></a><p><b>Section:</b>&nbsp;25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;03 Jan 2001</p>
-<p>The specification of the for_each algorithm does not have a
-"Requires" section, which means that there are no
-restrictions imposed on the function object whatsoever. In essence it
-means that I can provide any function object with arbitrary side
-effects and I can still expect a predictable result. In particular I
-can expect that the function object is applied exactly last - first
-times, which is promised in the "Complexity" section.
-</p>
-
-<p>I don't see how any implementation can give such a guarantee
-without imposing requirements on the function object.
-</p>
-
-<p>Just as an example: consider a function object that removes
-elements from the input sequence. In that case, what does the
-complexity guarantee (applies f exactly last - first times) mean?
-</p>
-
-<p>One can argue that this is obviously a nonsensical application and
-a theoretical case, which unfortunately it isn't. I have seen
-programmers shooting themselves in the foot this way, and they did not
-understand that there are restrictions even if the description of the
-algorithm does not say so.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Lillehammer: This is more general than for_each. We don't want
- the function object in transform invalidiating iterators
- either. There should be a note somewhere in clause 17 (17, not 25)
- saying that user code operating on a range may not invalidate
- iterators unless otherwise specified. Bill will provide wording.]</i></p>
-
-<hr>
-<a name="299"><h3>299.&nbsp;Incorrect return types for iterator dereference</h3></a><p><b>Section:</b>&nbsp;24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a>, 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;John Potter&nbsp; <b>Date:</b>&nbsp;22 Jan 2001</p>
-<p>
-In section 24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a>,
-Table 75 gives the return type of *r-- as convertible to T. This is
-not consistent with Table 74 which gives the return type of *r++ as
-T&amp;. *r++ = t is valid while *r-- = t is invalid.
-</p>
-
-<p>
-In section 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a>,
-Table 76 gives the return type of a[n] as convertible to T. This is
-not consistent with the semantics of *(a + n) which returns T&amp; by
-Table 74. *(a + n) = t is valid while a[n] = t is invalid.
-</p>
-
-<p>
-Discussion from the Copenhagen meeting: the first part is
-uncontroversial. The second part, operator[] for Random Access
-Iterators, requires more thought. There are reasonable arguments on
-both sides. Return by value from operator[] enables some potentially
-useful iterators, e.g. a random access "iota iterator" (a.k.a
-"counting iterator" or "int iterator"). There isn't any obvious way
-to do this with return-by-reference, since the reference would be to a
-temporary. On the other hand, <tt>reverse_iterator</tt> takes an
-arbitrary Random Access Iterator as template argument, and its
-operator[] returns by reference. If we decided that the return type
-in Table 76 was correct, we would have to change
-<tt>reverse_iterator</tt>. This change would probably affect user
-code.
-</p>
-
-<p>
-History: the contradiction between <tt>reverse_iterator</tt> and the
-Random Access Iterator requirements has been present from an early
-stage. In both the STL proposal adopted by the committee
-(N0527==94-0140) and the STL technical report (HPL-95-11 (R.1), by
-Stepanov and Lee), the Random Access Iterator requirements say that
-operator[]'s return value is "convertible to T". In N0527
-reverse_iterator's operator[] returns by value, but in HPL-95-11
-(R.1), and in the STL implementation that HP released to the public,
-reverse_iterator's operator[] returns by reference. In 1995, the
-standard was amended to reflect the contents of HPL-95-11 (R.1). The
-original intent for operator[] is unclear.
-</p>
-
-<p>
-In the long term it may be desirable to add more fine-grained
-iterator requirements, so that access method and traversal strategy
-can be decoupled. (See "Improved Iterator Categories and
-Requirements", N1297 = 01-0011, by Jeremy Siek.) Any decisions
-about issue 299 should keep this possibility in mind.
-</p>
-
-<p>Further discussion: I propose a compromise between John Potter's
-resolution, which requires <tt>T&amp;</tt> as the return type of
-<tt>a[n]</tt>, and the current wording, which requires convertible to
-<tt>T</tt>. The compromise is to keep the convertible to <tt>T</tt>
-for the return type of the expression <tt>a[n]</tt>, but to also add
-<tt>a[n] = t</tt> as a valid expression. This compromise "saves" the
-common case uses of random access iterators, while at the same time
-allowing iterators such as counting iterator and caching file
-iterators to remain random access iterators (iterators where the
-lifetime of the object returned by <tt>operator*()</tt> is tied to the
-lifetime of the iterator).
-</p>
-
-<p>
-Note that the compromise resolution necessitates a change to
-<tt>reverse_iterator</tt>. It would need to use a proxy to support
-<tt>a[n] = t</tt>.
-</p>
-
-<p>
-Note also there is one kind of mutable random access iterator that
-will no longer meet the new requirements. Currently, iterators that
-return an r-value from <tt>operator[]</tt> meet the requirements for a
-mutable random access iterartor, even though the expression <tt>a[n] =
-t</tt> will only modify a temporary that goes away. With this proposed
-resolution, <tt>a[n] = t</tt> will be required to have the same
-operational semantics as <tt>*(a + n) = t</tt>.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>
-In section 24.1.4 [lib.bidirectdional.iterators], change the return
-type in table 75 from "convertible to <tt>T</tt>" to
-<tt>T&amp;</tt>.
-</p>
-
-<p>
-In section 24.1.5 [lib.random.access.iterators], change the
-operational semantics for <tt>a[n]</tt> to " the r-value of
-<tt>a[n]</tt> is equivalent to the r-value of <tt>*(a +
-n)</tt>". Add a new row in the table for the expression <tt>a[n] = t</tt>
-with a return type of convertible to <tt>T</tt> and operational semantics of
-<tt>*(a + n) = t</tt>.
-</p>
-
-<p><i>[Lillehammer: Real problem, but should be addressed as part of
- iterator redesign]</i></p>
-
-<hr>
-<a name="309"><h3>309.&nbsp;Does sentry catch exceptions?</h3></a><p><b>Section:</b>&nbsp;27.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.format"> [lib.iostream.format]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;19 Mar 2001</p>
-<p>
-The descriptions of the constructors of basic_istream&lt;&gt;::sentry
-(27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>) and basic_ostream&lt;&gt;::sentry
-(27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>) do not explain what the functions do in
-case an exception is thrown while they execute. Some current
-implementations allow all exceptions to propagate, others catch them
-and set ios_base::badbit instead, still others catch some but let
-others propagate.
-</p>
-
-<p>
-The text also mentions that the functions may call setstate(failbit)
-(without actually saying on what object, but presumably the stream
-argument is meant). That may have been fine for
-basic_istream&lt;&gt;::sentry prior to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>, since
-the function performs an input operation which may fail. However,
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a> amends 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>, p2 to
-clarify that the function should actually call setstate(failbit |
-eofbit), so the sentence in p3 is redundant or even somewhat
-contradictory.
-</p>
-
-<p>
-The same sentence that appears in 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>, p3
-doesn't seem to be very meaningful for basic_istream&lt;&gt;::sentry
-which performs no input. It is actually rather misleading since it
-would appear to guide library implementers to calling
-setstate(failbit) when os.tie()-&gt;flush(), the only called function,
-throws an exception (typically, it's badbit that's set in response to
-such an event).
-</p>
-
-<p><b>Additional comments from Martin, who isn't comfortable with the
- current proposed resolution</b> (see c++std-lib-11530)</p>
-
-<p>
-The istream::sentry ctor says nothing about how the function
-deals with exemptions (27.6.1.1.2, p1 says that the class is
-responsible for doing "exception safe"(*) prefix and suffix
-operations but it doesn't explain what level of exception
-safety the class promises to provide). The mockup example
-of a "typical implementation of the sentry ctor" given in
-27.6.1.1.2, p6, removed in ISO/IEC 14882:2003, doesn't show
-exception handling, either. Since the ctor is not classified
-as a formatted or unformatted input function, the text in
-27.6.1.1, p1 through p4 does not apply. All this would seem
-to suggest that the sentry ctor should not catch or in any
-way handle exceptions thrown from any functions it may call.
-Thus, the typical implementation of an istream extractor may
-look something like [1].
-</p>
-
-<p>
-The problem with [1] is that while it correctly sets ios::badbit
-if an exception is thrown from one of the functions called from
-the sentry ctor, if the sentry ctor reaches EOF while extracting
-whitespace from a stream that has eofbit or failbit set in
-exceptions(), it will cause an ios::failure to be thrown, which
-will in turn cause the extractor to set ios::badbit.
-</p>
-
-<p>
-The only straightforward way to prevent this behavior is to
-move the definition of the sentry object in the extractor
-above the try block (as suggested by the example in 22.2.8,
-p9 and also indirectly supported by 27.6.1.3, p1). See [2].
-But such an implementation will allow exceptions thrown from
-functions called from the ctor to freely propagate to the
-caller regardless of the setting of ios::badbit in the stream
-object's exceptions().
-</p>
-
-<p>
-So since neither [1] nor [2] behaves as expected, the only
-possible solution is to have the sentry ctor catch exceptions
-thrown from called functions, set badbit, and propagate those
-exceptions if badbit is also set in exceptions(). (Another
-solution exists that deals with both kinds of sentries, but
-the code is non-obvious and cumbersome -- see [3].)
-</p>
-
-<p>
-Please note that, as the issue points out, current libraries
-do not behave consistently, suggesting that implementors are
-not quite clear on the exception handling in istream::sentry,
-despite the fact that some LWG members might feel otherwise.
-(As documented by the parenthetical comment here:
-http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1480.html#309)
-</p>
-
-<p>
-Also please note that those LWG members who in Copenhagen
-felt that "a sentry's constructor should not catch exceptions,
-because sentries should only be used within (un)formatted input
-functions and that exception handling is the responsibility of
-those functions, not of the sentries," as noted here
-http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1310.html#309
-would in effect be either arguing for the behavior described
-in [1] or for extractors implemented along the lines of [3].
-</p>
-
-<p>
-The original proposed resolution (Revision 25 of the issues
-list) clarifies the role of the sentry ctor WRT exception
-handling by making it clear that extractors (both library
-or user-defined) should be implemented along the lines of
-[2] (as opposed to [1]) and that no exception thrown from
-the callees should propagate out of either function unless
-badbit is also set in exceptions().
-</p>
-
-
-<p>[1] Extractor that catches exceptions thrown from sentry:</p>
-
-<blockquote>
-<pre>struct S { long i; };
-
-istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
-{
- ios::iostate err = ios::goodbit;
- try {
- const istream::sentry guard (strm, false);
- if (guard) {
- use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
- .get (istreambuf_iterator&lt;char&gt;(strm),
- istreambuf_iterator&lt;char&gt;(),
- strm, err, s.i);
- }
- }
- catch (...) {
- bool rethrow;
- try {
- strm.setstate (ios::badbit);
- rethrow = false;
- }
- catch (...) {
- rethrow = true;
- }
- if (rethrow)
- throw;
- }
- if (err)
- strm.setstate (err);
- return strm;
-}
-</pre>
-</blockquote>
-
-<p>[2] Extractor that propagates exceptions thrown from sentry:</p>
-
-<blockquote>
-<pre>istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
-{
- istream::sentry guard (strm, false);
- if (guard) {
- ios::iostate err = ios::goodbit;
- try {
- use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
- .get (istreambuf_iterator&lt;char&gt;(strm),
- istreambuf_iterator&lt;char&gt;(),
- strm, err, s.i);
- }
- catch (...) {
- bool rethrow;
- try {
- strm.setstate (ios::badbit);
- rethrow = false;
- }
- catch (...) {
- rethrow = true;
- }
- if (rethrow)
- throw;
- }
- if (err)
- strm.setstate (err);
- }
- return strm;
-}
-</pre>
-</blockquote>
-
-<p>
-[3] Extractor that catches exceptions thrown from sentry
-but doesn't set badbit if the exception was thrown as a
-result of a call to strm.clear().
-</p>
-
-<blockquote>
-<pre>istream&amp; operator&gt;&gt; (istream &amp;strm, S &amp;s)
-{
- const ios::iostate state = strm.rdstate ();
- const ios::iostate except = strm.exceptions ();
- ios::iostate err = std::ios::goodbit;
- bool thrown = true;
- try {
- const istream::sentry guard (strm, false);
- thrown = false;
- if (guard) {
- use_facet&lt;num_get&lt;char&gt; &gt;(strm.getloc ())
- .get (istreambuf_iterator&lt;char&gt;(strm),
- istreambuf_iterator&lt;char&gt;(),
- strm, err, s.i);
- }
- }
- catch (...) {
- if (thrown &amp;&amp; state &amp; except)
- throw;
- try {
- strm.setstate (ios::badbit);
- thrown = false;
- }
- catch (...) {
- thrown = true;
- }
- if (thrown)
- throw;
- }
- if (err)
- strm.setstate (err);
-
- return strm;
-}
-</pre>
-</blockquote>
-
-<p>
-[Pre-Berlin] Reopened at the request of Paolo Carlini and Steve Clamage.
-</p>
-
-<p>
-[Pre-Portland] A relevant newsgroup post:
-</p>
-
-<p>
-The current proposed resolution of issue #309
-(http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309) is
-unacceptable. I write commerical software and coding around this
-makes my code ugly, non-intuitive, and requires comments referring
-people to this very issue. Following is the full explanation of my
-experience.
-</p>
-<p>
-In the course of writing software for commercial use, I constructed
-std::ifstream's based on user-supplied pathnames on typical POSIX
-systems.
-</p>
-<p>
-It was expected that some files that opened successfully might not read
-successfully -- such as a pathname which actually refered to a
-directory. Intuitively, I expected the streambuffer underflow() code
-to throw an exception in this situation, and recent implementations of
-libstdc++'s basic_filebuf do just that (as well as many of my own
-custom streambufs).
-</p>
-<p>
-I also intuitively expected that the istream code would convert these
-exceptions to the "badbit' set on the stream object, because I had not
-requested exceptions. I refer to 27.6.1.1. P4.
-</p>
-<p>
-However, this was not the case on at least two implementations -- if
-the first thing I did with an istream was call operator&gt;&gt;( T&amp; ) for T
-among the basic arithmetic types and std::string. Looking further I
-found that the sentry's constructor was invoking the exception when it
-pre-scanned for whitespace, and the extractor function (operator&gt;&gt;())
-was not catching exceptions in this situation.
-</p>
-<p>
-So, I was in a situation where setting 'noskipws' would change the
-istream's behavior even though no characters (whitespace or not) could
-ever be successfully read.
-</p>
-<p>
-Also, calling .peek() on the istream before calling the extractor()
-changed the behavior (.peek() had the effect of setting the badbit
-ahead of time).
-</p>
-<p>
-I found this all to be so inconsistent and inconvenient for me and my
-code design, that I filed a bugzilla entry for libstdc++. I was then
-told that the bug cannot be fixed until issue #309 is resolved by the
-committee.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG agrees there is minor variation between implementations,
- but believes that it doesn't matter. This is a rarely used corner
- case. There is no evidence that this has any commercial importance
- or that it causes actual portability problems for customers trying
- to write code that runs on multiple implementations.</p>
-<hr>
-<a name="342"><h3>342.&nbsp;seek and eofbit</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;09 Oct 2001</p>
-<p>I think we have a defect.</p>
-
-<p>According to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> which is now a dr, the
-description of seekg in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> paragraph 38 now looks
-like:</p>
-
-<blockquote>
-Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1), except that it does not count the number of characters
-extracted and does not affect the value returned by subsequent calls to
-gcount(). After constructing a sentry object, if fail() != true,
-executes rdbuf()­&gt;pubseekpos( pos).
-</blockquote>
-
-<p>And according to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> which is also now a dr,
-27.6.1.3, paragraph 1 looks like:</p>
-
-<blockquote>
-Each unformatted input function begins execution by constructing an
-object of class sentry with the default argument noskipws (second)
-argument true. If the sentry object returns true, when converted to a
-value of type bool, the function endeavors to obtain the requested
-input. Otherwise, if the sentry constructor exits by throwing an
-exception or if the sentry object returns false, when converted to a
-value of type bool, the function returns without attempting to obtain
-any input. In either case the number of extracted characters is set to
-0; unformatted input functions taking a character array of non-zero
-size as an argument shall also store a null character (using charT())
-in the first location of the array. If an exception is thrown during
-input then ios::badbit is turned on in *this'ss error state. If
-(exception()&amp;badbit)!= 0 then the exception is rethrown. It also counts
-the number of characters extracted. If no exception has been thrown it
-ends by storing the count in a member object and returning the value
-specified. In any event the sentry object is destroyed before leaving
-the unformatted input function.
-</blockquote>
-
-<p>And finally 27.6.1.1.2/5 says this about sentry:</p>
-
-<blockquote>
-If, after any preparation is completed, is.good() is true, ok_ != false
-otherwise, ok_ == false.
-</blockquote>
-
-<p>
-So although the seekg paragraph says that the operation proceeds if
-!fail(), the behavior of unformatted functions says the operation
-proceeds only if good(). The two statements are contradictory when only
-eofbit is set. I don't think the current text is clear which condition
-should be respected.
-</p>
-
-<p><b>Further discussion from Redmond:</b></p>
-
-<p>PJP: It doesn't seem quite right to say that <tt>seekg</tt> is
-"unformatted". That makes specific claims about sentry that
-aren't quite appropriate for seeking, which has less fragile failure
-modes than actual input. If we do really mean that it's unformatted
-input, it should behave the same way as other unformatted input. On
-the other hand, "principle of least surprise" is that seeking from EOF
-ought to be OK.</p>
-
-<p>
-Pre-Berlin: Paolo points out several problems with the proposed resolution in
-Ready state:
-</p>
-
-<ul>
-<li>It should apply to both overloads of seekg.</li>
-<li>tellg has similar issues, except that it should not call clear().</li>
-<li>The point about clear() seems to apply to seekp().</li>
-<li>Depending on the outcome of
-<a href="file:///Volumes/Data/lwg/lwg-active.html#419">419</a> if the sentry
-sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then
-you can never seek away from the end of stream.</li>
-</ul>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Change 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> to:</p>
-<blockquote>
-Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1), except that it does not count the number of characters
-extracted, does not affect the value returned by subsequent calls to
-gcount(), and does not examine the value returned by the sentry
-object. After constructing a sentry object, if <tt>fail() !=
-true</tt>, executes <tt>rdbuf()-&gt;pubseekpos(pos)</tt>. In
-case of success, the function calls clear().
-In case of failure, the function calls <tt>setstate(failbit)</tt>
-(which may throw <tt>ios_base::failure</tt>).
-</blockquote>
-
-<p><i>[Lillehammer: Matt provided wording.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>In C, fseek does clear EOF. This is probably what most users would
- expect. We agree that having eofbit set should not deter a seek,
- and that a successful seek should clear eofbit. Note
- that <tt>fail()</tt> is true only if <tt>failbit</tt>
- or <tt>badbit</tt> is set, so using <tt>!fail()</tt>, rather
- than <tt>good()</tt>, satisfies this goal.</p>
-<hr>
-<a name="382"></a><h3><a name="382">382.&nbsp;codecvt do_in/out result</a></h3><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;30 Aug 2002</p>
-<p>
-It seems that the descriptions of codecvt do_in() and do_out() leave
-sufficient room for interpretation so that two implementations of
-codecvt may not work correctly with the same filebuf. Specifically,
-the following seems less than adequately specified:
-</p>
-
-<ol>
-<li>
- the conditions under which the functions terminate
-</li>
-<li>
- precisely when the functions return ok
-</li>
-<li>
- precisely when the functions return partial
-</li>
-<li>
- the full set of conditions when the functions return error
-</li>
-</ol>
-
-<ol>
-<li>
- <font color="red">22.2.1.5.2</font>, p2 says this about the effects of the
- function: ...Stops if it encounters a character it cannot
- convert... This assumes that there *is* a character to
- convert. What happens when there is a sequence that doesn't form a
- valid source character, such as an unassigned or invalid UNICODE
- character, or a sequence that cannot possibly form a character
- (e.g., the sequence "\xc0\xff" in UTF-8)?
-</li>
-<li>
- Table 53 says that the function returns codecvt_base::ok
- to indicate that the function(s) "completed the conversion."
- Suppose that the source sequence is "\xc0\x80" in UTF-8,
- with from pointing to '\xc0' and (from_end==from + 1).
- It is not clear whether the return value should be ok
- or partial (see below).
-</li>
-<li>
- Table 53 says that the function returns codecvt_base::partial
- if "not all source characters converted." With the from pointers
- set up the same way as above, it is not clear whether the return
- value should be partial or ok (see above).
-</li>
-<li>
- Table 53, in the row describing the meaning of error mistakenly
- refers to a "from_type" character, without the symbol from_type
- having been defined. Most likely, the word "source" character
- is intended, although that is not sufficient. The functions
- may also fail when they encounter an invalid source sequence
- that cannot possibly form a valid source character (e.g., as
- explained in bullet 1 above).
-</li>
-</ol>
-<p>
-Finally, the conditions described at the end of <font color="red">22.2.1.5.2</font>, p4 don't seem to be possible:
-</p>
-<blockquote>
- "A return value of partial, if (from_next == from_end),
- indicates that either the destination sequence has not
- absorbed all the available destination elements, or that
- additional source elements are needed before another
- destination element can be produced."
-</blockquote>
-<p>
-If the value is partial, it's not clear to me that (from_next
-==from_end) could ever hold if there isn't enough room
-in the destination buffer. In order for (from_next==from_end) to
-hold, all characters in that range must have been successfully
-converted (according to <font color="red">22.2.1.5.2</font>, p2) and since there are no
-further source characters to convert, no more room in the
-destination buffer can be needed.
-</p>
-<p>
-It's also not clear to me that (from_next==from_end) could ever
-hold if additional source elements are needed to produce another
-destination character (not element as incorrectly stated in the
-text). partial is returned if "not all source characters have
-been converted" according to Table 53, which also implies that
-(from_next==from) does NOT hold.
-</p>
-<p>
-Could it be that the intended qualifying condition was actually
-(from_next != from_end), i.e., that the sentence was supposed
-to read
-</p>
-<blockquote>
- "A return value of partial, if (from_next != from_end),..."
-</blockquote>
-<p>
-which would make perfect sense, since, as far as I understand it,
-partial can only occur if (from_next != from_end)?
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Lillehammer: Defer for the moment, but this really needs to be
- fixed. Right now, the description of codecvt is too vague for it to
- be a useful contract between providers and clients of codecvt
- facets. (Note that both vendors and users can be both providers and
- clients of codecvt facets.) The major philosophical issue is whether
- the standard should only describe mappings that take a single wide
- character to multiple narrow characters (and vice versa), or whether
- it should describe fully general N-to-M conversions. When the
- original standard was written only the former was contemplated, but
- today, in light of the popularity of utf8 and utf16, that doesn't
- seem sufficient for C++0x. Bill supports general N-to-M conversions;
- we need to make sure Martin and Howard agree.]</i></p>
-
-<hr>
-<a name="385"><h3>385.&nbsp;Does call by value imply the CopyConstructible requirement?</h3></a><p><b>Section:</b>&nbsp;17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;23 Oct 2002</p>
-<p>
-Many function templates have parameters that are passed by value;
-a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in
-25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>. Are the corresponding template parameters
-(<tt>Predicate</tt> in this case) implicitly required to be
-CopyConstructible, or does that need to be spelled out explicitly?
-</p>
-
-<p>
-This isn't quite as silly a question as it might seem to be at first
-sight. If you call <tt>find_if</tt> in such a way that template
-argument deduction applies, then of course you'll get call by value
-and you need to provide a copy constructor. If you explicitly provide
-the template arguments, however, you can force call by reference by
-writing something like <tt>find_if&lt;my_iterator,
-my_predicate&amp;&gt;</tt>. The question is whether implementation
-are required to accept this, or whether this is ill-formed because
-my_predicate&amp; is not CopyConstructible.
-</p>
-
-<p>
-The scope of this problem, if it is a problem, is unknown. Function
-object arguments to generic algorithms in clauses 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>
-and 26 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numerics"> [lib.numerics]</a> are obvious examples. A review of the whole
-library is necessary.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[
-This is really two issues. First, predicates are typically passed by
-value but we don't say they must be Copy Constructible. They should
-be. Second: is specialization allowed to transform value arguments
-into references? References aren't copy constructible, so this should
-not be allowed.
-]</i></p>
-<hr>
-<a name="387"><h3>387.&nbsp;std::complex over-encapsulated</h3></a><p><b>Section:</b>&nbsp;26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Gabriel Dos Reis&nbsp; <b>Date:</b>&nbsp;8 Nov 2002</p>
-<p>
-The absence of explicit description of std::complex&lt;T&gt; layout
-makes it imposible to reuse existing software developed in traditional
-languages like Fortran or C with unambigous and commonly accepted
-layout assumptions. There ought to be a way for practitioners to
-predict with confidence the layout of std::complex&lt;T&gt; whenever T
-is a numerical datatype. The absence of ways to access individual
-parts of a std::complex&lt;T&gt; object as lvalues unduly promotes
-severe pessimizations. For example, the only way to change,
-independently, the real and imaginary parts is to write something like
-</p>
-
-<pre>complex&lt;T&gt; z;
-// ...
-// set the real part to r
-z = complex&lt;T&gt;(r, z.imag());
-// ...
-// set the imaginary part to i
-z = complex&lt;T&gt;(z.real(), i);
-</pre>
-
-<p>
-At this point, it seems appropriate to recall that a complex number
-is, in effect, just a pair of numbers with no particular invariant to
-maintain. Existing practice in numerical computations has it that a
-complex number datatype is usually represented by Cartesian
-coordinates. Therefore the over-encapsulation put in the specification
-of std::complex&lt;&gt; is not justified.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Add the following requirements to 26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a> as 26.3/4:</p>
-<blockquote>
-<p>If z is an lvalue expression of type cv std::complex&lt;T&gt; then</p>
-
-<ul>
-<li>the expression reinterpret_cast&lt;cv T(&amp;)[2]&gt;(z)
-is well-formed; and</li>
-<li>reinterpret_cast&lt;cvT(&amp;)[2]&gt;(z)[0]designates the
-real part of z; and</li>
-<li>reinterpret_cast&lt;cvT(&amp;)[2]&gt;(z)[1]designates the
-imaginary part of z.</li>
-</ul>
-
-<p>
-Moreover, if a is an expression of pointer type cv complex&lt;T&gt;*
-and the expression a[i] is well-defined for an integer expression
-i then:
-</p>
-
-<ul>
-<li>reinterpret_cast&lt;cvT*&gt;(a)[2+i] designates the real
-part of a[i]; and</li>
-<li>reinterpret_cast&lt;cv T*&gt;(a)[2+i+1] designates the
-imaginary part of a[i].</li>
-</ul>
-</blockquote>
-
-<p>In the header synopsis in 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>, replace</p>
-<pre> template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);
- template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);
-</pre>
-
-<p>with</p>
-
-<pre> template&lt;class T&gt; const T&amp; real(const complex&lt;T&gt;&amp;);
- template&lt;class T&gt; T&amp; real( complex&lt;T&gt;&amp;);
- template&lt;class T&gt; const T&amp; imag(const complex&lt;T&gt;&amp;);
- template&lt;class T&gt; T&amp; imag( complex&lt;T&gt;&amp;);
-</pre>
-
-<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> paragraph 1, change</p>
-<pre> template&lt;class T&gt; T real(const complex&lt;T&gt;&amp;);
-</pre>
-<p>to</p>
-<pre> template&lt;class T&gt; const T&amp; real(const complex&lt;T&gt;&amp;);
- template&lt;class T&gt; T&amp; real( complex&lt;T&gt;&amp;);
-</pre>
-<p>and change the <b>Returns</b> clause to "<b>Returns:</b> The real
-part of <i>x</i></p>.
-
-<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> paragraph 2, change</p>
-<pre> template&lt;class T&gt; T imag(const complex&lt;T&gt;&amp;);
-</pre>
-<p>to</p>
-<pre> template&lt;class T&gt; const T&amp; imag(const complex&lt;T&gt;&amp;);
- template&lt;class T&gt; T&amp; imag( complex&lt;T&gt;&amp;);
-</pre>
-<p>and change the <b>Returns</b> clause to "<b>Returns:</b> The imaginary
-part of <i>x</i></p>.
-
-<p><i>[Kona: The layout guarantee is absolutely necessary for C
- compatibility. However, there was disagreement about the other part
- of this proposal: retrieving elements of the complex number as
- lvalues. An alternative: continue to have real() and imag() return
- rvalues, but add set_real() and set_imag(). Straw poll: return
- lvalues - 2, add setter functions - 5. Related issue: do we want
- reinterpret_cast as the interface for converting a complex to an
- array of two reals, or do we want to provide a more explicit way of
- doing it? Howard will try to resolve this issue for the next
- meeting.]</i></p>
-
-<p><i>[pre-Sydney: Howard summarized the options in n1589.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG believes that C99 compatibility would be enough
-justification for this change even without other considerations. All
-existing implementations already have the layout proposed here.</p>
-<hr>
-<a name="394"><h3>394.&nbsp;behavior of formatted output on failure</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;27 Dec 2002</p>
-<p>
-There is a contradiction in Formatted output about what bit is
-supposed to be set if the formatting fails. On sentence says it's
-badbit and another that it's failbit.
-</p>
-<p>
-27.6.2.5.1, p1 says in the Common Requirements on Formatted output
-functions:
-</p><pre> ... If the generation fails, then the formatted output function
- does setstate(ios::failbit), which might throw an exception.
-</pre>
-<p></p>
-<p>
-27.6.2.5.2, p1 goes on to say this about Arithmetic Inserters:
-</p>
-<p>
- ... The formatting conversion occurs as if it performed the
- following code fragment:
-</p>
-<p>
-</p><pre> bool failed =
- use_facet&lt;num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt;
- &gt; &gt;
- (getloc()).put(*this, *this, fill(), val). failed();
-
- ... If failed is true then does setstate(badbit) ...
-</pre>
-<p></p>
-<p>
-The original intent of the text, according to Jerry Schwarz (see
-c++std-lib-10500), is captured in the following paragraph:
-</p>
-<p>
-In general "badbit" should mean that the stream is unusable because
-of some underlying failure, such as disk full or socket closure;
-"failbit" should mean that the requested formatting wasn't possible
-because of some inconsistency such as negative widths. So typically
-if you clear badbit and try to output something else you'll fail
-again, but if you clear failbit and try to output something else
-you'll succeed.
-</p>
-<p>
-In the case of the arithmetic inserters, since num_put cannot
-report failure by any means other than exceptions (in response
-to which the stream must set badbit, which prevents the kind of
-recoverable error reporting mentioned above), the only other
-detectable failure is if the iterator returned from num_put
-returns true from failed().
-</p>
-<p>
-Since that can only happen (at least with the required iostream
-specializations) under such conditions as the underlying failure
-referred to above (e.g., disk full), setting badbit would seem
-to be the appropriate response (indeed, it is required in
-27.6.2.5.2, p1). It follows that failbit can never be directly
-set by the arithmetic (it can only be set by the sentry object
-under some unspecified conditions).
-</p>
-<p>
-The situation is different for other formatted output functions
-which can fail as a result of the streambuf functions failing
-(they may do so by means other than exceptions), and which are
-then required to set failbit.
-</p>
-<p>
-The contradiction, then, is that ostream::operator&lt;&lt;(int) will
-set badbit if the disk is full, while operator&lt;&lt;(ostream&amp;,
-char) will set failbit under the same conditions. To make the behavior
-consistent, the Common requirements sections for the Formatted output
-functions should be changed as proposed below.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-
-<p><i>[Kona: There's agreement that this is a real issue. What we
- decided at Kona: 1. An error from the buffer (which can be detected
- either directly from streambuf's member functions or by examining a
- streambuf_iterator) should always result in badbit getting set.
- 2. There should never be a circumstance where failbit gets set.
- That represents a formatting error, and there are no circumstances
- under which the output facets are specified as signaling a
- formatting error. (Even more so for string output that for numeric
- because there's nothing to format.) If we ever decide to make it
- possible for formatting errors to exist then the facets can signal
- the error directly, and that should go in clause 22, not clause 27.
- 3. The phrase "if generation fails" is unclear and should be
- eliminated. It's not clear whether it's intended to mean a buffer
- error (e.g. a full disk), a formatting error, or something else.
- Most people thought it was supposed to refer to buffer errors; if
- so, we should say so. Martin will provide wording.]</i></p>
-
-<p><b>Rationale:</b></p>
-
-<hr>
-<a name="396"><h3>396.&nbsp;what are characters zero and one</h3></a><p><b>Section:</b>&nbsp;23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Jan 2003</p>
- <p>
-23.3.5.1, p6 [lib.bitset.cons] talks about a generic character
-having the value of 0 or 1 but there is no definition of what
-that means for charT other than char and wchar_t. And even for
-those two types, the values 0 and 1 are not actually what is
-intended -- the values '0' and '1' are. This, along with the
-converse problem in the description of to_string() in 23.3.5.2,
-p33, looks like a defect remotely related to DR 303.
- </p>
- <p>
-http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#303
- </p>
- <pre>23.3.5.1:
- -6- An element of the constructed string has value zero if the
- corresponding character in str, beginning at position pos,
- is 0. Otherwise, the element has the value one.
- </pre>
- <pre>23.3.5.2:
- -33- Effects: Constructs a string object of the appropriate
- type and initializes it to a string of length N characters.
- Each character is determined by the value of its
- corresponding bit position in *this. Character position N
- ?- 1 corresponds to bit position zero. Subsequent decreasing
- character positions correspond to increasing bit positions.
- Bit value zero becomes the character 0, bit value one becomes
- the character 1.
- </pre>
- <p>
-Also note the typo in 23.3.5.1, p6: the object under construction
-is a bitset, not a string.
- </p>
- <p><b>Proposed resolution:</b></p>
-<p>Change the constructor's function declaration immediately before
-23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> p3 to:</p>
-<pre> template &lt;class charT, class traits, class Allocator&gt;
- explicit
- bitset(const basic_string&lt;charT, traits, Allocator&gt;&amp; str,
- typename basic_string&lt;charT, traits, Allocator&gt;::size_type pos = 0,
- typename basic_string&lt;charT, traits, Allocator&gt;::size_type n =
- basic_string&lt;charT, traits, Allocator&gt;::npos,
- charT zero = charT('0'), charT one = charT('1'))
-</pre>
-<p>Change the first two sentences of 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> p6 to: "An
-element of the constructed string has value 0 if the corresponding
-character in <i>str</i>, beginning at position <i>pos</i>,
-is <i>zero</i>. Otherwise, the element has the value 1.</p>
-
-<p>Change the text of the second sentence in 23.3.5.1, p5 to read:
- "The function then throws invalid_argument if any of the rlen
- characters in str beginning at position pos is other than <i>zero</i>
- or <i>one</i>. The function uses traits::eq() to compare the character
- values."
-</p>
-
-<p>Change the declaration of the <tt>to_string</tt> member function
- immediately before 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> p33 to:</p>
-<pre> template &lt;class charT, class traits, class Allocator&gt;
- basic_string&lt;charT, traits, Allocator&gt;
- to_string(charT zero = charT('0'), charT one = charT('1')) const;
-</pre>
-<p>Change the last sentence of 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> p33 to: "Bit
- value 0 becomes the character <tt><i>zero</i></tt>, bit value 1 becomes the
- character <tt><i>one</i></tt>.</p>
-<p>Change 23.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.operators"> [lib.bitset.operators]</a> p8 to:</p>
-<p><b>Returns</b>:</p>
-<pre> os &lt;&lt; x.template to_string&lt;charT,traits,allocator&lt;charT&gt; &gt;(
- use_facet&lt;ctype&lt;charT&gt; &gt;(<i>os</i>.getloc()).widen('0'),
- use_facet&lt;ctype&lt;charT&gt; &gt;(<i>os</i>.getloc()).widen('1'));
-</pre>
-<p><b>Rationale:</b></p>
-<p>There is a real problem here: we need the character values of '0'
- and '1', and we have no way to get them since strings don't have
- imbued locales. In principle the "right" solution would be to
- provide an extra object, either a ctype facet or a full locale,
- which would be used to widen '0' and '1'. However, there was some
- discomfort about using such a heavyweight mechanism. The proposed
- resolution allows those users who care about this issue to get it
- right.</p>
-<p>We fix the inserter to use the new arguments. Note that we already
- fixed the analogous problem with the extractor in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a>.</p>
-
-<hr>
-<a name="397"><h3>397.&nbsp;ostream::sentry dtor throws exceptions</h3></a><p><b>Section:</b>&nbsp;27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Jan 2003</p>
- <p>
-17.4.4.8, p3 prohibits library dtors from throwing exceptions.
- </p>
- <p>
-27.6.2.3, p4 says this about the ostream::sentry dtor:
- </p>
- <pre> -4- If ((os.flags() &amp; ios_base::unitbuf) &amp;&amp; !uncaught_exception())
- is true, calls os.flush().
- </pre>
- <p>
-27.6.2.6, p7 that describes ostream::flush() says:
- </p>
- <pre> -7- If rdbuf() is not a null pointer, calls rdbuf()-&gt;pubsync().
- If that function returns ?-1 calls setstate(badbit) (which
- may throw ios_base::failure (27.4.4.3)).
- </pre>
- <p>
-That seems like a defect, since both pubsync() and setstate() can
-throw an exception.
- </p>
- <p><b>Proposed resolution:</b></p>
-<p><i>[
-The contradiction is real. Clause 17 says destructors may never
-throw exceptions, and clause 27 specifies a destructor that does
-throw. In principle we might change either one. We're leaning
-toward changing clause 17: putting in an "unless otherwise specified"
-clause, and then putting in a footnote saying the sentry destructor
-is the only one that can throw. PJP suggests specifying that
-sentry::~sentry() should internally catch any exceptions it might cause.
-]</i></p>
-<hr>
-<a name="398"><h3>398.&nbsp;effects of end-of-file on unformatted input functions</h3></a><p><b>Section:</b>&nbsp;27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Jan 2003</p>
- <p>
-While reviewing unformatted input member functions of istream
-for their behavior when they encounter end-of-file during input
-I found that the requirements vary, sometimes unexpectedly, and
-in more than one case even contradict established practice (GNU
-libstdc++ 3.2, IBM VAC++ 6.0, STLPort 4.5, SunPro 5.3, HP aCC
-5.38, Rogue Wave libstd 3.1, and Classic Iostreams).
- </p>
- <p>
-The following unformatted input member functions set eofbit if they
-encounter an end-of-file (this is the expected behavior, and also
-the behavior of all major implementations):
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- get (char_type*, streamsize, char_type);
- </pre>
- <p></p>
- <p>
- Also sets failbit if it fails to extract any characters.
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- get (char_type*, streamsize);
- </pre>
- <p></p>
- <p>
- Also sets failbit if it fails to extract any characters.
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- getline (char_type*, streamsize, char_type);
- </pre>
- <p></p>
- <p>
- Also sets failbit if it fails to extract any characters.
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- getline (char_type*, streamsize);
- </pre>
- <p></p>
- <p>
- Also sets failbit if it fails to extract any characters.
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- ignore (int, int_type);
- </pre>
- <p></p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- read (char_type*, streamsize);
- </pre>
- <p></p>
- <p>
- Also sets failbit if it encounters end-of-file.
- </p>
- <p>
- </p><pre> streamsize readsome (char_type*, streamsize);
- </pre>
- <p></p>
-
- <p>
-The following unformated input member functions set failbit but
-not eofbit if they encounter an end-of-file (I find this odd
-since the functions make it impossible to distinguish a general
-failure from a failure due to end-of-file; the requirement is
-also in conflict with all major implementation which set both
-eofbit and failbit):
- </p>
- <p>
- </p><pre> int_type get();
- </pre>
- <p></p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- get (char_type&amp;);
- </pre>
- <p></p>
- <p>
-These functions only set failbit of they extract no characters,
-otherwise they don't set any bits, even on failure (I find this
-inconsistency quite unexpected; the requirement is also in
-conflict with all major implementations which set eofbit
-whenever they encounter end-of-file):
- </p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- get (basic_streambuf&lt;charT, traits&gt;&amp;, char_type);
- </pre>
- <p></p>
- <p>
- </p><pre> basic_istream&lt;charT, traits&gt;&amp;
- get (basic_streambuf&lt;charT, traits&gt;&amp;);
- </pre>
- <p></p>
- <p>
-This function sets no bits (all implementations except for
-STLport and Classic Iostreams set eofbit when they encounter
-end-of-file):
- </p>
- <p>
- </p><pre> int_type peek ();
- </pre>
- <p></p>
- <p><b>Proposed resolution:</b></p>
-<p>Informally, what we want is a global statement of intent saying
- that eofbit gets set if we trip across EOF, and then we can take
- away the specific wording for individual functions. A full review
- is necessary. The wording currently in the standard is a mishmash,
- and changing it on an individual basis wouldn't make things better.
- Dietmar will do this work.</p>
-<hr>
-<a name="401"><h3>401.&nbsp; incorrect type casts in table 32 in lib.allocator.requirements</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Markus Mauhart&nbsp; <b>Date:</b>&nbsp;27 Feb 2003</p>
-<p>
-I think that in par2 of 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> the last two
-lines of table 32 contain two incorrect type casts. The lines are ...
-</p>
-
-<pre> a.construct(p,t) Effect: new((void*)p) T(t)
- a.destroy(p) Effect: ((T*)p)?-&gt;~T()
-</pre>
-
-<p>
-.... with the prerequisits coming from the preceding two paragraphs, especially
-from table 31:
-</p>
-
-<pre> alloc&lt;T&gt; a ;// an allocator for T
- alloc&lt;T&gt;::pointer p ;// random access iterator
- // (may be different from T*)
- alloc&lt;T&gt;::reference r = *p;// T&amp;
- T const&amp; t ;
-</pre>
-
-<p>
-For that two type casts ("(void*)p" and "(T*)p") to be well-formed
-this would require then conversions to T* and void* for all
-alloc&lt;T&gt;::pointer, so it would implicitely introduce extra
-requirements for alloc&lt;T&gt;::pointer, additionally to the only
-current requirement (being a random access iterator).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-"(void*)p" should be replaced with "(void*)&amp;*p" and that
-"((T*)p)?-&gt;" should be replaced with "(*p)." or with
-"(&amp;*p)-&gt;".
-</p>
-
-<p>
-Note: Actually I would prefer to replace "((T*)p)?-&gt;dtor_name" with
-"p?-&gt;dtor_name", but AFAICS this is not possible cause of an omission
-in 13.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/over.html#over.ref"> [over.ref]</a> (for which I have filed another DR on 29.11.2002).
-</p>
-
-<p><i>[Kona: The LWG thinks this is somewhere on the border between
- Open and NAD. The intend is clear: <tt>construct</tt> constructs an
- object at the location <i>p</i>. It's reading too much into the
- description to think that literally calling <tt>new</tt> is
- required. Tweaking this description is low priority until we can do
- a thorough review of allocators, and, in particular, allocators with
- non-default pointer types.]</i></p>
-
-<hr>
-<a name="408"><h3>408.&nbsp;Is vector&lt;reverse_iterator&lt;char*&gt; &gt; forbidden?</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;3 June 2003</p>
-<p>
-I've been discussing iterator semantics with Dave Abrahams, and a
-surprise has popped up. I don't think this has been discussed before.
-</p>
-
-<p>
-24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> says that the only operation that can be performed on "singular"
-iterator values is to assign a non-singular value to them. (It
-doesn't say they can be destroyed, and that's probably a defect.)
-Some implementations have taken this to imply that there is no need
-to initialize the data member of a reverse_iterator&lt;&gt; in the default
-constructor. As a result, code like
-</p>
-<blockquote>
- std::vector&lt;std::reverse_iterator&lt;char*&gt; &gt; v(7);
- v.reserve(1000);
-</blockquote>
-<p>
-invokes undefined behavior, because it must default-initialize the
-vector elements, and then copy them to other storage. Of course many
-other vector operations on these adapters are also left undefined,
-and which those are is not reliably deducible from the standard.
-</p>
-
-<p>
-I don't think that 24.1 was meant to make standard-library iterator
-types unsafe. Rather, it was meant to restrict what operations may
-be performed by functions which take general user- and standard
-iterators as arguments, so that raw pointers would qualify as
-iterators. However, this is not clear in the text, others have come
-to the opposite conclusion.
-</p>
-
-<p>
-One question is whether the standard iterator adaptors have defined
-copy semantics. Another is whether they have defined destructor
-semantics: is
-</p>
-<blockquote>
- { std::vector&lt;std::reverse_iterator&lt;char*&gt; &gt; v(7); }
-</blockquote>
-<p>
-undefined too?
-</p>
-
-<p>
-Note this is not a question of whether algorithms are allowed to
-rely on copy semantics for arbitrary iterators, just whether the
-types we actually supply support those operations. I believe the
-resolution must be expressed in terms of the semantics of the
-adapter's argument type. It should make clear that, e.g., the
-reverse_iterator&lt;T&gt; constructor is actually required to execute
-T(), and so copying is defined if the result of T() is copyable.
-</p>
-
-<p>
-Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, which defines reverse_iterator's default
-constructor more precisely, has some relevance to this issue.
-However, it is not the whole story.
-</p>
-
-<p>
-The issue was whether
-</p>
-<blockquote>
- reverse_iterator() { }
-</blockquote>
-<p>
-is allowed, vs.
-</p>
-<blockquote>
- reverse_iterator() : current() { }
-</blockquote>
-
-<p>
-The difference is when T is char*, where the first leaves the member
-uninitialized, and possibly equal to an existing pointer value, or
-(on some targets) may result in a hardware trap when copied.
-</p>
-
-<p>
-8.5 paragraph 5 seems to make clear that the second is required to
-satisfy DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, at least for non-class Iterator argument
-types.
-</p>
-
-<p>
-But that only takes care of reverse_iterator, and doesn't establish
-a policy for all iterators. (The reverse iterator adapter was just
-an example.) In particular, does my function
-</p>
-<blockquote>
- template &lt;typename Iterator&gt;
- void f() { std::vector&lt;Iterator&gt; v(7); }
-</blockquote>
-<p>
-evoke undefined behavior for some conforming iterator definitions?
-I think it does, now, because vector&lt;&gt; will destroy those singular
-iterator values, and that's explicitly disallowed.
-</p>
-
-<p>
-24.1 shouldn't give blanket permission to copy all singular iterators,
-because then pointers wouldn't qualify as iterators. However, it
-should allow copying of that subset of singular iterator values that
-are default-initialized, and it should explicitly allow destroying any
-iterator value, singular or not, default-initialized or not.
-</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#407">407</a></p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[
-We don't want to require all singular iterators to be copyable,
-because that is not the case for pointers. However, default
-construction may be a special case. Issue: is it really default
-construction we want to talk about, or is it something like value
-initialization? We need to check with core to see whether default
-constructed pointers are required to be copyable; if not, it would be
-wrong to impose so strict a requirement for iterators.
-]</i></p>
-
-<hr>
-<a name="416"><h3>416.&nbsp;definitions of XXX_MIN and XXX_MAX macros in climits</h3></a><p><b>Section:</b>&nbsp;18.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.c.limits"> [lib.c.limits]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
- <p>
-
-Given two overloads of the function foo(), one taking an argument of type
-int and the other taking a long, which one will the call foo(LONG_MAX)
-resolve to? The expected answer should be foo(long), but whether that
-is true depends on the #defintion of the LONG_MAX macro, specifically
-its type. This issue is about the fact that the type of these macros
-is not actually required to be the same as the the type each respective
-limit.
-<br>
-
-Section 18.2.2 of the C++ Standard does not specify the exact types of
-the XXX_MIN and XXX_MAX macros #defined in the &lt;climits&gt; and &lt;limits.h&gt;
-headers such as INT_MAX and LONG_MAX and instead defers to the C standard.
-<br>
-
-Section 5.2.4.2.1, p1 of the C standard specifies that "The values [of
-these constants] shall be replaced by constant expressions suitable for use
-in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX,
-the following shall be replaced by expressions that have the same type as
-would an expression that is an object of the corresponding type converted
-according to the integer promotions."
-<br>
-
-The "corresponding type converted according to the integer promotions" for
-LONG_MAX is, according to 6.4.4.1, p5 of the C standard, the type of long
-converted to the first of the following set of types that can represent it:
-int, long int, long long int. So on an implementation where (sizeof(long)
-== sizeof(int)) this type is actually int, while on an implementation where
-(sizeof(long) &gt; sizeof(int)) holds this type will be long.
-<br>
-
-This is not an issue in C since the type of the macro cannot be detected
-by any conforming C program, but it presents a portability problem in C++
-where the actual type is easily detectable by overload resolution.
-
- </p>
- <p><b>Proposed resolution:</b></p>
-
-<p><i>[Kona: the LWG does not believe this is a defect. The C macro
- definitions are what they are; we've got a better
- mechanism, <tt>std::numeric_limits</tt>, that is specified more
- precisely than the C limit macros. At most we should add a
- nonnormative note recommending that users who care about the exact
- types of limit quantities should use &lt;limits&gt; instead of
- &lt;climits&gt;.]</i></p>
-
-<hr>
-<a name="417"><h3>417.&nbsp;what does ctype::do_widen() return on failure</h3></a><p><b>Section:</b>&nbsp;22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The Effects and Returns clauses of the do_widen() member function of
-the ctype facet fail to specify the behavior of the function on failure.
-That the function may not be able to simply cast the narrow character
-argument to the type of the result since doing so may yield the wrong value
-for some wchar_t encodings. Popular implementations of ctype&lt;wchar_t&gt; that
-use mbtowc() and UTF-8 as the native encoding (e.g., GNU glibc) will fail
-when the argument's MSB is set. There is no way for the the rest of locale
-and iostream to reliably detect this failure.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Kona: This is a real problem. Widening can fail. It's unclear
- what the solution should be. Returning WEOF works for the wchar_t
- specialization, but not in general. One option might be to add a
- default, like <i>narrow</i>. But that's an incompatible change.
- Using <i>traits::eof</i> might seem like a good idea, but facets
- don't have access to traits (a recurring problem). We could
- have <i>widen</i> throw an exception, but that's a scary option;
- existing library components aren't written with the assumption
- that <i>widen</i> can throw.]</i></p>
-<hr>
-<a name="418"><h3>418.&nbsp;exceptions thrown during iostream cleanup</h3></a><p><b>Section:</b>&nbsp;27.4.2.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::Init"> [lib.ios::Init]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The dtor of the ios_base::Init object is supposed to call flush() on the
-6 standard iostream objects cout, cerr, clog, wcout, wcerr, and wclog.
-This call may cause an exception to be thrown.
-</p>
-
-<p>
-17.4.4.8, p3 prohibits all library destructors from throwing exceptions.
-</p>
-
-<p>
-The question is: What should this dtor do if one or more of these calls
-to flush() ends up throwing an exception? This can happen quite easily
-if one of the facets installed in the locale imbued in the iostream
-object throws.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Kona: We probably can't do much better than what we've got, so
- the LWG is leaning toward NAD. At the point where the standard
- stream objects are being cleaned up, the usual error reporting
- mechanism are all unavailable. And exception from flush at this
- point will definitely cause problems. A quality implementation
- might reasonably swallow the exception, or call abort, or do
- something even more drastic.]</i></p>
-<hr>
-<a name="419"><h3>419.&nbsp;istream extractors not setting failbit if eofbit is already set</h3></a><p><b>Section:</b>&nbsp;27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
- <p>
-
-27.6.1.1.2, p2 says that istream::sentry ctor prepares for input if is.good()
-is true. p4 then goes on to say that the ctor sets the sentry::ok_ member to
-true if the stream state is good after any preparation. 27.6.1.2.1, p1 then
-says that a formatted input function endeavors to obtain the requested input
-if the sentry's operator bool() returns true.
-
-Given these requirements, no formatted extractor should ever set failbit if
-the initial stream rdstate() == eofbit. That is contrary to the behavior of
-all implementations I tested. The program below prints out
-
-eof = 1, fail = 0
-eof = 1, fail = 1
-
-on all of them.
- </p>
-<pre>
-#include &lt;sstream&gt;
-#include &lt;cstdio&gt;
-
-int main()
-{
- std::istringstream strm ("1");
-
- int i = 0;
-
- strm &gt;&gt; i;
-
- std::printf ("eof = %d, fail = %d\n",
- !!strm.eof (), !!strm.fail ());
-
- strm &gt;&gt; i;
-
- std::printf ("eof = %d, fail = %d\n",
- !!strm.eof (), !!strm.fail ());
-}
-
-</pre>
- <p>
-<br>
-
-Comments from Jerry Schwarz (c++std-lib-11373):
-<br>
-
-Jerry Schwarz wrote:
-<br>
-
-I don't know where (if anywhere) it says it in the standard, but the
-formatted extractors are supposed to set failbit if they don't extract
-any characters. If they didn't then simple loops like
-<br>
-
-while (cin &gt;&gt; x);
-<br>
-
-would loop forever.
-<br>
-
-Further comments from Martin Sebor:
-<br>
-
-The question is which part of the extraction should prevent this from happening
-by setting failbit when eofbit is already set. It could either be the sentry
-object or the extractor. It seems that most implementations have chosen to
-set failbit in the sentry [...] so that's the text that will need to be
-corrected.
-
- </p>
-<p>
-Pre Berlin: This issue is related to
-<a href="file:///Volumes/Data/lwg/lwg-active.html#342">342</a>. If the sentry
-sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then
-you can never seek away from the end of stream.
-</p>
-
- <p><b>Proposed resolution:</b></p>
-<p>Kona: Possibly NAD. If eofbit is set then good() will return false. We
- then set <i>ok</i> to false. We believe that the sentry's
- constructor should always set failbit when <i>ok</i> is false, and
- we also think the standard already says that. Possibly it could be
- clearer.</p>
-
-<hr>
-<a name="421"><h3>421.&nbsp;is basic_streambuf copy-constructible?</h3></a><p><b>Section:</b>&nbsp;27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The reflector thread starting with c++std-lib-11346 notes that the class
-template basic_streambuf, along with basic_stringbuf and basic_filebuf,
-is copy-constructible but that the semantics of the copy constructors
-are not defined anywhere. Further, different implementations behave
-differently in this respect: some prevent copy construction of objects
-of these types by declaring their copy ctors and assignment operators
-private, others exhibit undefined behavior, while others still give
-these operations well-defined semantics.
-</p>
-
-<p>
-Note that this problem doesn't seem to be isolated to just the three
-types mentioned above. A number of other types in the library section
-of the standard provide a compiler-generated copy ctor and assignment
-operator yet fail to specify their semantics. It's believed that the
-only types for which this is actually a problem (i.e. types where the
-compiler-generated default may be inappropriate and may not have been
-intended) are locale facets. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#439">439</a>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-27.5.2 [lib.streambuf]: Add into the synopsis, public section, just above the destructor declaration:
-</p>
-
-<blockquote>
-<pre>basic_streambuf(const basic_streambuf&amp; sb);
-basic_streambuf&amp; operator=(const basic_streambuf&amp; sb);
-</pre>
-</blockquote>
-
-<p>Insert after 27.5.2.1, paragraph 2:</p>
-<blockquote>
-<pre>basic_streambuf(const basic_streambuf&amp; sb);
-</pre>
-
-<p>Constructs a copy of sb.</p>
-<p>Postcondtions:</p>
-<pre> eback() == sb.eback()
- gptr() == sb.gptr()
- egptr() == sb.egptr()
- pbase() == sb.pbase()
- pptr() == sb.pptr()
- epptr() == sb.epptr()
- getloc() == sb.getloc()
-</pre>
-
-<pre>basic_streambuf&amp; operator=(const basic_streambuf&amp; sb);
-</pre>
-
-<p>Assigns the data members of sb to this.</p>
-
-<p>Postcondtions:</p>
-<pre> eback() == sb.eback()
- gptr() == sb.gptr()
- egptr() == sb.egptr()
- pbase() == sb.pbase()
- pptr() == sb.pptr()
- epptr() == sb.epptr()
- getloc() == sb.getloc()
-</pre>
-
-<p>Returns: *this.</p>
-</blockquote>
-
-<p>27.7.1 [lib.stringbuf]:</p>
-
-<b>Option A:</b>
-
-<blockquote>
-<p>Insert into the basic_stringbuf synopsis in the private section:</p>
-
-<pre>basic_stringbuf(const basic_stringbuf&amp;); // not defined
-basic_stringbuf&amp; operator=(const basic_stringbuf&amp;); // not defined
-</pre>
-</blockquote>
-
-<b>Option B:</b>
-
-<blockquote>
-<p>Insert into the basic_stringbuf synopsis in the public section:</p>
-
-<pre>basic_stringbuf(const basic_stringbuf&amp; sb);
-basic_stringbuf&amp; operator=(const basic_stringbuf&amp; sb);
-</pre>
-
-<p>27.7.1.1, insert after paragraph 4:</p>
-
-<pre>basic_stringbuf(const basic_stringbuf&amp; sb);</pre>
-
-<p>
-Constructs an independent copy of sb as if with sb.str(), and with the openmode that sb was constructed with.
-</p>
-
-<p>Postcondtions: </p>
-<pre> str() == sb.str()
- gptr() - eback() == sb.gptr() - sb.eback()
- egptr() - eback() == sb.egptr() - sb.eback()
- pptr() - pbase() == sb.pptr() - sb.pbase()
- getloc() == sb.getloc()
-</pre>
-
-<p>
-Note: The only requirement on epptr() is that it point beyond the
-initialized range if an output sequence exists. There is no requirement
-that epptr() - pbase() == sb.epptr() - sb.pbase().
-</p>
-
-<pre>basic_stringbuf&amp; operator=(const basic_stringbuf&amp; sb);</pre>
-<p>After assignment the basic_stringbuf has the same state as if it
-were initially copy constructed from sb, except that the
-basic_stringbuf is allowed to retain any excess capacity it might have,
-which may in turn effect the value of epptr().
-</p>
-</blockquote>
-
-<p>27.8.1.1 [lib.filebuf]</p>
-
-<p>Insert at the bottom of the basic_filebuf synopsis:</p>
-
-<blockquote>
-<pre>private:
- basic_filebuf(const basic_filebuf&amp;); // not defined
- basic_filebuf&amp; operator=(const basic_filebuf&amp;); // not defined
-</pre>
-</blockquote>
-<p><i>[Kona: this is an issue for basic_streambuf itself and for its
- derived classes. We are leaning toward allowing basic_streambuf to
- be copyable, and specifying its precise semantics. (Probably the
- obvious: copying the buffer pointers.) We are less sure whether
- the streambuf derived classes should be copyable. Howard will
- write up a proposal.]</i></p>
-
-<p><i>[Sydney: Dietmar presented a new argument against basic_streambuf
- being copyable: it can lead to an encapsulation violation. Filebuf
- inherits from streambuf. Now suppose you inhert a my_hijacking_buf
- from streambuf. You can copy the streambuf portion of a filebuf to a
- my_hijacking_buf, giving you access to the pointers into the
- filebuf's internal buffer. Perhaps not a very strong argument, but
- it was strong enough to make people nervous. There was weak
- preference for having streambuf not be copyable. There was weak
- preference for having stringbuf not be copyable even if streambuf
- is. Move this issue to open for now.
-]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-27.5.2 [lib.streambuf]: The proposed basic_streambuf copy constructor
-and assignment operator are the same as currently implied by the lack
-of declarations: public and simply copies the data members. This
-resolution is not a change but a clarification of the current
-standard.
-</p>
-
-<p>
-27.7.1 [lib.stringbuf]: There are two reasonable options: A) Make
-basic_stringbuf not copyable. This is likely the status-quo of
-current implementations. B) Reasonable copy semantics of
-basic_stringbuf can be defined and implemented. A copyable
-basic_streambuf is arguably more useful than a non-copyable one. This
-should be considered as new functionality and not the fixing of a
-defect. If option B is chosen, ramifications from issue 432 are taken
-into account.
-</p>
-
-<p>
-27.8.1.1 [lib.filebuf]: There are no reasonable copy semantics for
-basic_filebuf.
-</p>
-
-<hr>
-<a name="422"><h3>422.&nbsp;explicit specializations of member functions of class templates</h3></a><p><b>Section:</b>&nbsp;17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-It has been suggested that 17.4.3.1, p1 may or may not allow programs to
-explicitly specialize members of standard templates on user-defined types.
-The answer to the question might have an impact where library requirements
-are given using the "as if" rule. I.e., if programs are allowed to specialize
-member functions they will be able to detect an implementation's strict
-conformance to Effects clauses that describe the behavior of the function
-in terms of the other member function (the one explicitly specialized by
-the program) by relying on the "as if" rule.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>
- Add the following sentence immediately after the text of 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>, p1:
-</p>
-
-<blockquote>
- The behavior of a program that declares explicit specializations
- of any members of class templates or explicit specializations of
- any member templates of classes or class templates defined in
- this library is undefined.
-</blockquote>
-
-
-<p><i>[Kona: straw poll was 6-1 that user programs should not be
- allowed to specialize individual member functions of standard
- library class templates, and that doing so invokes undefined
- behavior. Post-Kona: Martin provided wording.]</i></p>
-
-<p><i>[Sydney: The LWG agrees that the standard shouldn't permit users
-to specialize individual member functions unless they specialize the
-whole class, but we're not sure these words say what we want them to;
-they could be read as prohibiting the specialization of any standard
-library class templates. We need to consult with CWG to make sure we
-use the right wording.]</i></p>
-
-<hr>
-<a name="423"><h3>423.&nbsp;effects of negative streamsize in iostreams</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-
-<p>
-A third party test suite tries to exercise istream::ignore(N) with
-a negative value of N and expects that the implementation will treat
-N as if it were 0. Our implementation asserts that (N &gt;= 0) holds and
-aborts the test.
-</p>
-
-<p>
-I can't find anything in section 27 that prohibits such values but I don't
-see what the effects of such calls should be, either (this applies to
-a number of unformatted input functions as well as some member functions
-of the basic_streambuf template).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-I propose that we add to each function in clause 27 that takes an argument,
-say N, of type streamsize a Requires clause saying that "N &gt;= 0." The intent
-is to allow negative streamsize values in calls to precision() and width()
-but disallow it in calls to streambuf::sgetn(), istream::ignore(), or
-ostream::write().
-</p>
-
-<p><i>[Kona: The LWG agreed that this is probably what we want. However, we
- need a review to find all places where functions in clause 27 take
- arguments of type streamsize that shouldn't be allowed to go
- negative. Martin will do that review.]</i></p>
-
-<hr>
-<a name="424"><h3>424.&nbsp;normative notes</h3></a><p><b>Section:</b>&nbsp;17.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.summary"> [lib.structure.summary]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-
-<p>
-The text in 17.3.1.1, p1 says:
-<br>
-
-"Paragraphs labelled "Note(s):" or "Example(s):" are informative, other
-paragraphs are normative."
-<br>
-
-The library section makes heavy use of paragraphs labeled "Notes(s),"
-some of which are clearly intended to be normative (see list 1), while
-some others are not (see list 2). There are also those where the intent
-is not so clear (see list 3).
-<br>
-
-List 1 -- Examples of (presumably) normative Notes:
-<br>
-
-20.4.1.1, p3, 20.4.1.1, p10, 21.3.1, p11, 22.1.1.2, p11, 23.2.1.3, p2,
-25.3.7, p3, 26.2.6, p14a, 27.5.2.4.3, p7.
-<br>
-
-List 2 -- Examples of (presumably) informative Notes:
-<br>
-
-18.4.1.3, p3, 21.3.5.6, p14, 22.2.1.5.2, p3, 25.1.1, p4, 26.2.5, p1,
-27.4.2.5, p6.
-<br>
-
-List 3 -- Examples of Notes that are not clearly either normative
-or informative:
-<br>
-
-22.1.1.2, p8, 22.1.1.5, p6, 27.5.2.4.5, p4.
-<br>
-
-None of these lists is meant to be exhaustive.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Definitely a real problem. The big problem is there's material
- that doesn't quite fit any of the named paragraph categories
- (e.g. <b>Effects</b>). Either we need a new kind of named
- paragraph, or we need to put more material in unnamed paragraphs
- jsut after the signature. We need to talk to the Project Editor
- about how to do this.
-]</i></p>
-
-<hr>
-<a name="427"><h3>427.&nbsp;stage 2 and rationale of DR 221</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The requirements specified in Stage 2 and reiterated in the rationale
-of DR 221 (and echoed again in DR 303) specify that num_get&lt;charT&gt;::
-do_get() compares characters on the stream against the widened elements
-of "012...abc...ABCX+-"
-</p>
-
-<p>
-An implementation is required to allow programs to instantiate the num_get
-template on any charT that satisfies the requirements on a user-defined
-character type. These requirements do not include the ability of the
-character type to be equality comparable (the char_traits template must
-be used to perform tests for equality). Hence, the num_get template cannot
-be implemented to support any arbitrary character type. The num_get template
-must either make the assumption that the character type is equality-comparable
-(as some popular implementations do), or it may use char_traits&lt;charT&gt; to do
-the comparisons (some other popular implementations do that). This diversity
-of approaches makes it difficult to write portable programs that attempt to
-instantiate the num_get template on user-defined types.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Kona: the heart of the problem is that we're theoretically
- supposed to use traits classes for all fundamental character
- operations like assignment and comparison, but facets don't have
- traits parameters. This is a fundamental design flaw and it
- appears all over the place, not just in this one place. It's not
- clear what the correct solution is, but a thorough review of facets
- and traits is in order. The LWG considered and rejected the
- possibility of changing numeric facets to use narrowing instead of
- widening. This may be a good idea for other reasons (see issue
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#459">459</a>), but it doesn't solve the problem raised by this
- issue. Whether we use widen or narrow the <tt>num_get</tt> facet
- still has no idea which traits class the user wants to use for
- the comparison, because only streams, not facets, are passed traits
- classes. The standard does not require that two different
- traits classes with the same <tt>char_type</tt> must necessarily
- have the same behavior.]</i></p>
-
-<p>Informally, one possibility: require that some of the basic
-character operations, such as <tt>eq</tt>, <tt>lt</tt>,
-and <tt>assign</tt>, must behave the same way for all traits classes
-with the same <tt>char_type</tt>. If we accept that limitation on
-traits classes, then the facet could reasonably be required to
-use <tt>char_traits&lt;charT&gt;</tt></p>.
-
-<hr>
-<a name="430"><h3>430.&nbsp;valarray subset operations</h3></a><p><b>Section:</b>&nbsp;26.5.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.sub"> [lib.valarray.sub]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The standard fails to specify the behavior of valarray::operator[](slice)
-and other valarray subset operations when they are passed an "invalid"
-slice object, i.e., either a slice that doesn't make sense at all (e.g.,
-slice (0, 1, 0) or one that doesn't specify a valid subset of the valarray
-object (e.g., slice (2, 1, 1) for a valarray of size 1).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Kona: the LWG believes that invalid slices should invoke
- undefined behavior. Valarrays are supposed to be designed for high
- performance, so we don't want to require specific checking. We
- need wording to express this decision.]</i></p>
-<hr>
-<a name="431"><h3>431.&nbsp;Swapping containers with unequal allocators</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;20 Sep 2003</p>
-<p>Clause 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> paragraph 4 says that implementations
- are permitted to supply containers that are unable to cope with
- allocator instances and that container implementations may assume
- that all instances of an allocator type compare equal. We gave
- implementers this latitude as a temporary hack, and eventually we
- want to get rid of it. What happens when we're dealing with
- allocators that <i>don't</i> compare equal?
-</p>
-
-<p>In particular: suppose that <tt>v1</tt> and <tt>v2</tt> are both
- objects of type <tt>vector&lt;int, my_alloc&gt;</tt> and that
- <tt>v1.get_allocator() != v2.get_allocator()</tt>. What happens if
- we write <tt>v1.swap(v2)</tt>? Informally, three possibilities:</p>
-
-<p>1. This operation is illegal. Perhaps we could say that an
- implementation is required to check and to throw an exception, or
- perhaps we could say it's undefined behavior.</p>
-<p>2. The operation performs a slow swap (i.e. using three
- invocations of <tt>operator=</tt>, leaving each allocator with its
- original container. This would be an O(N) operation.</p>
-<p>3. The operation swaps both the vectors' contents and their
- allocators. This would be an O(1) operation. That is:</p>
- <blockquote>
- <pre> my_alloc a1(...);
- my_alloc a2(...);
- assert(a1 != a2);
-
- vector&lt;int, my_alloc&gt; v1(a1);
- vector&lt;int, my_alloc&gt; v2(a2);
- assert(a1 == v1.get_allocator());
- assert(a2 == v2.get_allocator());
-
- v1.swap(v2);
- assert(a1 == v2.get_allocator());
- assert(a2 == v1.get_allocator());
- </pre>
- </blockquote>
-
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Kona: This is part of a general problem. We need a paper
- saying how to deal with unequal allocators in general.]</i></p>
-
-<p><i>[pre-Sydney: Howard argues for option 3 in n1599.]</i></p>
-
-<hr>
-<a name="446"><h3>446.&nbsp;Iterator equality between different containers</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>, 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Koenig&nbsp; <b>Date:</b>&nbsp;16 Dec 2003</p>
-<p>
-What requirements does the standard place on equality comparisons between
-iterators that refer to elements of different containers. For example, if
-v1 and v2 are empty vectors, is v1.end() == v2.end() allowed to yield true?
-Is it allowed to throw an exception?
-</p>
-
-<p>
-The standard appears to be silent on both questions.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Sydney: The intention is that comparing two iterators from
-different containers is undefined, but it's not clear if we say that,
-or even whether it's something we should be saying in clause 23 or in
-clause 24. Intuitively we might want to say that equality is defined
-only if one iterator is reachable from another, but figuring out how
-to say it in any sensible way is a bit tricky: reachability is defined
-in terms of equality, so we can't also define equality in terms of
-reachability.
-]</i></p>
-
-<hr>
-<a name="454"><h3>454.&nbsp;basic_filebuf::open should accept wchar_t names</h3></a><p><b>Section:</b>&nbsp;27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<pre> basic_filebuf *basic_filebuf::open(const char *, ios_base::open_mode);
-</pre>
-
-<p>should be supplemented with the overload:</p>
-
-<pre> basic_filebuf *basic_filebuf::open(const wchar_t *, ios_base::open_mode);
-</pre>
-
-<p>
-Depending on the operating system, one of these forms is fundamental and
-the other requires an implementation-defined mapping to determine the
-actual filename.
-</p>
-
-<p><i>[Sydney: Yes, we want to allow wchar_t filenames. Bill will
- provide wording.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Change from:</p>
-<blockquote>
-<pre>basic_filebuf&lt;charT,traits&gt;* open(
- const char* s,
- ios_base::openmode mode );
-</pre>
-
-<p>
-Effects: If is_open() != false, returns a null pointer.
-Otherwise, initializes the filebuf as required. It then
-opens a file, if possible, whose name is the NTBS s ("as if"
-by calling std::fopen(s,modstr)).</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<pre>basic_filebuf&lt;charT,traits&gt;* open(
- const char* s,
- ios_base::openmode mode );
-
-basic_filebuf&lt;charT,traits&gt;* open(
- const wchar_t* ws,
- ios_base::openmode mode );
-</pre>
-
-<p>
-Effects: If is_open() != false, returns a null pointer.
-Otherwise, initializes the filebuf as required. It then
-opens a file, if possible, whose name is the NTBS s ("as if"
-by calling std::fopen(s,modstr)).
-For the second signature, the NTBS s is determined from the
-WCBS ws in an implementation-defined manner.
-</p>
-
-<p>
-(NOTE: For a system that "naturally" represents a filename
-as a WCBS, the NTBS s in the first signature may instead
-be mapped to a WCBS; if so, it follows the same mapping
-rules as the first argument to open.)
-</p>
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>
-Slightly controversial, but by a 7-1 straw poll the LWG agreed to move
-this to Ready. The controversy was because the mapping between wide
-names and files in a filesystem is implementation defined. The
-counterargument, which most but not all LWG members accepted, is that
-the mapping between narrow files names and files is also
-implemenation defined.</p>
-
-<p><i>[Lillehammer: Moved back to "open" status, at Beman's urging.
-(1) Why just basic_filebuf, instead of also basic_fstream (and
-possibly other things too). (2) Why not also constructors that take
-std::basic_string? (3) We might want to wait until we see Beman's
-filesystem library; we might decide that it obviates this.]</i></p>
-
-<hr>
-<a name="456"><h3>456.&nbsp;Traditional C header files are overspecified</h3></a><p><b>Section:</b>&nbsp;17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-
-<p>The C++ Standard effectively requires that the traditional C headers
-(of the form &lt;xxx.h&gt;) be defined in terms of the newer C++
-headers (of the form &lt;cxxx&gt;). Clauses 17.4.1.2/4 and D.5 combine
-to require that:</p>
-
-<ul>
- <li>Including the header &lt;cxxx&gt; declares a C name in namespace std.</li>
-
- <li> Including the header &lt;xxx.h&gt; declares a C name in namespace std
- (effectively by including &lt;cxxx&gt;), then imports it into the global
- namespace with an individual using declaration.</li>
-</ul>
-
-<p>
-The rules were left in this form despited repeated and heated objections
-from several compiler vendors. The C headers are often beyond the direct
-control of C++ implementors. In some organizations, it's all they can do
-to get a few #ifdef __cplusplus tests added. Third-party library vendors
-can perhaps wrap the C headers. But neither of these approaches supports
-the drastic restructuring required by the C++ Standard. As a result, it is
-still widespread practice to ignore this conformance requirement, nearly
-seven years after the committee last debated this topic. Instead, what is
-often implemented is:
-</p>
-
-<ul>
- <li> Including the header &lt;xxx.h&gt; declares a C name in the
- global namespace.</li>
-
- <li> Including the header &lt;cxxx&gt; declares a C name in the
- global namespace (effectively by including &lt;xxx.h&gt;), then
- imports it into namespace std with an individual using declaration.</li>
-</ul>
-
-<p>
-The practical benefit for implementors with the second approach is that
-they can use existing C library headers, as they are pretty much obliged
-to do. The practical cost for programmers facing a mix of implementations
-is that they have to assume weaker rules:</p>
-
-<ul>
- <li> If you want to assuredly declare a C name in the global
- namespace, include &lt;xxx.h&gt;. You may or may not also get the
- declaration in namespace std.</li>
-
- <li> If you want to assuredly declare a C name in namespace std,
- include &lt;cxxx.h&gt;. You may or may not also get the declaration in
- the global namespace.</li>
-</ul>
-
-<p>
-There also exists the <i>possibility</i> of subtle differences due to
-Koenig lookup, but there are so few non-builtin types defined in the C
-headers that I've yet to see an example of any real problems in this
-area.
-</p>
-
-<p>
-It is worth observing that the rate at which programmers fall afoul of
-these differences has remained small, at least as measured by newsgroup
-postings and our own bug reports. (By an overwhelming margin, the
-commonest problem is still that programmers include &lt;string&gt; and can't
-understand why the typename string isn't defined -- this a decade after
-the committee invented namespace std, nominally for the benefit of all
-programmers.)
-</p>
-
-<p>
-We should accept the fact that we made a serious mistake and rectify it,
-however belatedly, by explicitly allowing either of the two schemes for
-declaring C names in headers.
-</p>
-
-<p><i>[Sydney: This issue has been debated many times, and will
- certainly have to be discussed in full committee before any action
- can be taken. However, the preliminary sentiment of the LWG was in
- favor of the change. (6 yes, 0 no, 2 abstain) Robert Klarer
- suggests that we might also want to undeprecate the
- C-style <tt>.h</tt> headers.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="458"><h3>458.&nbsp;24.1.5 contains unintented limitation for operator-</h3></a><p><b>Section:</b>&nbsp;24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Frey&nbsp; <b>Date:</b>&nbsp;27 Feb 2004</p>
-<p>
-In 24.1.5 [lib.random.access.iterators], table 76 the operational
-semantics for the expression "r -= n" are defined as "return r += -n".
-This means, that the expression -n must be valid, which is not the case
-for unsigned types.
-</p>
-
-<p><i>[
-Sydney: Possibly not a real problem, since difference type is required
-to be a signed integer type. However, the wording in the standard may
-be less clear than we would like.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-To remove this limitation, I suggest to change the
-operational semantics for this column to:
-</p>
-<code>
- { Distance m = n;
- if (m &gt;= 0)
- while (m--) --r;
- else
- while (m++) ++r;
- return r; }
-</code>
-
-<hr>
-<a name="459"><h3>459.&nbsp;Requirement for widening in stage 2 is overspecification</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;16 Mar 2004</p>
-<p>When parsing strings of wide-character digits, the standard
- requires the library to widen narrow-character "atoms" and compare
- the widened atoms against the characters that are being parsed.
- Simply narrowing the wide characters would be far simpler, and
- probably more efficient. The two choices are equivalent except in
- convoluted test cases, and many implementations already ignore the
- standard and use narrow instead of widen.</p>
-
-<p>
-First, I disagree that using narrow() instead of widen() would
-necessarily have unfortunate performance implications. A possible
-implementation of narrow() that allows num_get to be implemented
-in a much simpler and arguably comparably efficient way as calling
-widen() allows, i.e. without making a virtual call to do_narrow every
-time, is as follows:
-</p>
-
-<pre> inline char ctype&lt;wchar_t&gt;::narrow (wchar_t wc, char dflt) const
- {
- const unsigned wi = unsigned (wc);
-
- if (wi &gt; UCHAR_MAX)
- return typeid (*this) == typeid (ctype&lt;wchar_t&gt;) ?
- dflt : do_narrow (wc, dflt);
-
- if (narrow_ [wi] &lt; 0) {
- const char nc = do_narrow (wc, dflt);
- if (nc == dflt)
- return dflt;
- narrow_ [wi] = nc;
- }
-
- return char (narrow_ [wi]);
- }
-</pre>
-
-<p>
-Second, I don't think the change proposed in the issue (i.e., to use
-narrow() instead of widen() during Stage 2) would be at all
-drastic. Existing implementations with the exception of libstdc++
-currently already use narrow() so the impact of the change on programs
-would presumably be isolated to just a single implementation. Further,
-since narrow() is not required to translate alternate wide digit
-representations such as those mentioned in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> to
-their narrow equivalents (i.e., the portable source characters '0'
-through '9'), the change does not necessarily imply that these
-alternate digits would be treated as ordinary digits and accepted as
-part of numbers during parsing. In fact, the requirement in 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>, p13 forbids narrow() to translate an alternate
-digit character, wc, to an ordinary digit in the basic source
-character set unless the expression
-(ctype&lt;charT&gt;::is(ctype_base::digit, wc) == true) holds. This in
-turn is prohibited by the C standard (7.25.2.1.5, 7.25.2.1.5, and
-5.2.1, respectively) for charT of either char or wchar_t.
-</p>
-
-<p><i>[Sydney: To a large extent this is a nonproblem. As long as
-you're only trafficking in char and wchar_t we're only dealing with a
-stable character set, so you don't really need either 'widen' or
-'narrow': can just use literals. Finally, it's not even clear whether
-widen-vs-narrow is the right question; arguably we should be using
-codecvt instead.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change stage 2 so that implementations are permitted to use either
-technique to perform the comparison:</p>
-<ol>
- <li> call widen on the atoms and compare (either by using
- operator== or char_traits&lt;charT&gt;::eq) the input with
- the widened atoms, or</li>
- <li> call narrow on the input and compare the narrow input
- with the atoms</li>
- <li> do (1) or (2) only if charT is not char or wchar_t,
- respectively; i.e., avoid calling widen or narrow
- if it the source and destination types are the same</li>
-</ol>
-<hr>
-<a name="462"><h3>462.&nbsp;Destroying objects with static storage duration</h3></a><p><b>Section:</b>&nbsp;3.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.start.term"> [basic.start.term]</a>, 18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;23 Mar 2004</p>
-<p>
-3.6.3 Termination spells out in detail the interleaving of static
-destructor calls and calls to functions registered with atexit. To
-match this behavior requires intimate cooperation between the code
-that calls destructors and the exit/atexit machinery. The former
-is tied tightly to the compiler; the latter is a primitive mechanism
-inherited from C that traditionally has nothing to do with static
-construction and destruction. The benefits of intermixing destructor
-calls with atexit handler calls is questionable at best, and <i>very</i>
-difficult to get right, particularly when mixing third-party C++
-libraries with different third-party C++ compilers and C libraries
-supplied by still other parties.
-</p>
-
-<p>
-I believe the right thing to do is defer all static destruction
-until after all atexit handlers are called. This is a change in
-behavior, but one that is likely visible only to perverse test
-suites. At the very least, we should <i>permit</i> deferred destruction
-even if we don't require it.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[If this is to be changed, it should probably be changed by CWG.
- At this point, however, the LWG is leaning toward NAD. Implementing
- what the standard says is hard work, but it's not impossible and
- most vendors went through that pain years ago. Changing this
- behavior would be a user-visible change, and would break at least
- one real application.]</i></p>
-
-<p>
-</p>
-<hr>
-<a name="463"><h3>463.&nbsp;auto_ptr usability issues</h3></a><p><b>Section:</b>&nbsp;20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Rani Sharoni&nbsp; <b>Date:</b>&nbsp;7 Dec 2003</p>
-
-<p>
-TC1 CWG DR #84 effectively made the template&lt;class Y&gt; operator auto_ptr&lt;Y&gt;()
-member of auto_ptr (20.4.5.3/4) obsolete.
-</p>
-
-<p>
-The sole purpose of this obsolete conversion member is to enable copy
-initialization base from r-value derived (or any convertible types like
-cv-types) case:
-</p>
-<pre>#include &lt;memory&gt;
-using std::auto_ptr;
-
-struct B {};
-struct D : B {};
-
-auto_ptr&lt;D&gt; source();
-int sink(auto_ptr&lt;B&gt;);
-int x1 = sink( source() ); // #1 EDG - no suitable copy constructor
-</pre>
-
-<p>
-The excellent analysis of conversion operations that was given in the final
-auto_ptr proposal
-(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1128.pdf)
-explicitly specifies this case analysis (case 4). DR #84 makes the analysis
-wrong and actually comes to forbid the loophole that was exploited by the
-auto_ptr designers.
-</p>
-
-<p>
-I didn't encounter any compliant compiler (e.g. EDG, GCC, BCC and VC) that
-ever allowed this case. This is probably because it requires 3 user defined
-conversions and in fact current compilers conform to DR #84.
-</p>
-
-<p>
-I was surprised to discover that the obsolete conversion member actually has
-negative impact of the copy initialization base from l-value derived
-case:</p>
-<pre>auto_ptr&lt;D&gt; dp;
-int x2 = sink(dp); // #2 EDG - more than one user-defined conversion applies
-</pre>
-
-<p>
-I'm sure that the original intention was allowing this initialization using
-the template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt;&amp; a) constructor (20.4.5.1/4) but
-since in this copy initialization it's merely user defined conversion (UDC)
-and the obsolete conversion member is UDC with the same rank (for the early
-overloading stage) there is an ambiguity between them.
-</p>
-
-<p>
-Removing the obsolete member will have impact on code that explicitly
-invokes it:
-</p>
-<pre>int y = sink(source().operator auto_ptr&lt;B&gt;());
-</pre>
-
-<p>
-IMHO no one ever wrote such awkward code and the reasonable workaround for
-#1 is:
-</p>
-<pre>int y = sink( auto_ptr&lt;B&gt;(source()) );
-</pre>
-
-<p>
-I was even more surprised to find out that after removing the obsolete
-conversion member the initialization was still ill-formed:
-int x3 = sink(dp); // #3 EDG - no suitable copy constructor
-</p>
-
-<p>
-This copy initialization semantically requires copy constructor which means
-that both template conversion constructor and the auto_ptr_ref conversion
-member (20.4.5.3/3) are required which is what was explicitly forbidden in
-DR #84. This is a bit amusing case in which removing ambiguity results with
-no candidates.
-</p>
-
-<p>
-I also found exception safety issue with auto_ptr related to auto_ptr_ref:
-</p>
-<pre>int f(auto_ptr&lt;B&gt;, std::string);
-auto_ptr&lt;B&gt; source2();
-
-// string constructor throws while auto_ptr_ref
-// "holds" the pointer
-int x4 = f(source2(), "xyz"); // #4
-</pre>
-
-<p>
-The theoretic execution sequence that will cause a leak:
-</p>
-<ol>
-<li>call auto_ptr&lt;B&gt;::operator auto_ptr_ref&lt;B&gt;()</li>
-<li>call string::string(char const*) and throw</li>
-</ol>
-
-<p>
-According to 20.4.5.3/3 and 20.4.5/2 the auto_ptr_ref conversion member
-returns auto_ptr_ref&lt;Y&gt; that holds *this and this is another defect since
-the type of *this is auto_ptr&lt;X&gt; where X might be different from Y. Several
-library vendors (e.g. SGI) implement auto_ptr_ref&lt;Y&gt; with Y* as member which
-is much more reasonable. Other vendor implemented auto_ptr_ref as
-defectively required and it results with awkward and catastrophic code:
-int oops = sink(auto_ptr&lt;B&gt;(source())); // warning recursive on all control
-paths
-</p>
-
-<p>
-Dave Abrahams noticed that there is no specification saying that
-auto_ptr_ref copy constructor can't throw.
-</p>
-
-<p>
-My proposal comes to solve all the above issues and significantly simplify
-auto_ptr implementation. One of the fundamental requirements from auto_ptr
-is that it can be constructed in an intuitive manner (i.e. like ordinary
-pointers) but with strict ownership semantics which yield that source
-auto_ptr in initialization must be non-const. My idea is to add additional
-constructor template with sole propose to generate ill-formed, diagnostic
-required, instance for const auto_ptr arguments during instantiation of
-declaration. This special constructor will not be instantiated for other
-types which is achievable using 14.8.2/2 (SFINAE). Having this constructor
-in hand makes the constructor template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp;)
-legitimate since the actual argument can't be const yet non const r-value
-are acceptable.
-</p>
-
-<p>
-This implementation technique makes the "private auxiliary class"
-auto_ptr_ref obsolete and I found out that modern C++ compilers (e.g. EDG,
-GCC and VC) consume the new implementation as expected and allow all
-intuitive initialization and assignment cases while rejecting illegal cases
-that involve const auto_ptr arguments.
-</p>
-
-<p>The proposed auto_ptr interface:</p>
-
-<pre>namespace std {
- template&lt;class X&gt; class auto_ptr {
- public:
- typedef X element_type;
-
- // 20.4.5.1 construct/copy/destroy:
- explicit auto_ptr(X* p=0) throw();
- auto_ptr(auto_ptr&amp;) throw();
- template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp;) throw();
- auto_ptr&amp; operator=(auto_ptr&amp;) throw();
- template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt;) throw();
- ~auto_ptr() throw();
-
- // 20.4.5.2 members:
- X&amp; operator*() const throw();
- X* operator-&gt;() const throw();
- X* get() const throw();
- X* release() throw();
- void reset(X* p=0) throw();
-
- private:
- template&lt;class U&gt;
- auto_ptr(U&amp; rhs, typename
-unspecified_error_on_const_auto_ptr&lt;U&gt;::type = 0);
- };
-}
-</pre>
-
-<p>
-One compliant technique to implement the unspecified_error_on_const_auto_ptr
-helper class is using additional private auto_ptr member class template like
-the following:
-</p>
-<pre>template&lt;typename T&gt; struct unspecified_error_on_const_auto_ptr;
-
-template&lt;typename T&gt;
-struct unspecified_error_on_const_auto_ptr&lt;auto_ptr&lt;T&gt; const&gt;
-{ typedef typename auto_ptr&lt;T&gt;::const_auto_ptr_is_not_allowed type; };
-</pre>
-
-<p>
-There are other techniques to implement this helper class that might work
-better for different compliers (i.e. better diagnostics) and therefore I
-suggest defining its semantic behavior without mandating any specific
-implementation. IMO, and I didn't found any compiler that thinks otherwise,
-14.7.1/5 doesn't theoretically defeat the suggested technique but I suggest
-verifying this with core language experts.
-</p>
-
-<p><b>Further changes in standard text:</b></p>
-<p>Remove section 20.4.5.3</p>
-
-<p>Change 20.4.5/2 to read something like:
-Initializing auto_ptr&lt;X&gt; from const auto_ptr&lt;Y&gt; will result with unspecified
-ill-formed declaration that will require unspecified diagnostic.</p>
-
-<p>Change 20.4.5.1/4,5,6 to read:</p>
-
-<pre>template&lt;class Y&gt; auto_ptr(auto_ptr&lt;Y&gt; const&amp; a) throw();</pre>
-<p> 4 Requires: Y* can be implicitly converted to X*.</p>
-<p> 5 Effects: Calls const_cast&lt;auto_ptr&lt;Y&gt;&amp;&gt;(a).release().</p>
-<p> 6 Postconditions: *this holds the pointer returned from a.release().</p>
-
-<p>Change 20.4.5.1/10</p>
-<pre>template&lt;class Y&gt; auto_ptr&amp; operator=(auto_ptr&lt;Y&gt; a) throw();
-</pre>
-<p>
-10 Requires: Y* can be implicitly converted to X*. The expression delete
-get() is well formed.
-</p>
-
-<p>LWG TC DR #127 is obsolete.</p>
-
-<p>
-Notice that the copy constructor and copy assignment operator should remain
-as before and accept non-const auto_ptr&amp; since they have effect on the form
-of the implicitly declared copy constructor and copy assignment operator of
-class that contains auto_ptr as member per 12.8/5,10:
-</p>
-<pre>struct X {
- // implicit X(X&amp;)
- // implicit X&amp; operator=(X&amp;)
- auto_ptr&lt;D&gt; aptr_;
-};
-</pre>
-
-<p>
-In most cases this indicates about sloppy programming but preserves the
-current auto_ptr behavior.
-</p>
-
-<p>
-Dave Abrahams encouraged me to suggest fallback implementation in case that
-my suggestion that involves removing of auto_ptr_ref will not be accepted.
-In this case removing the obsolete conversion member to auto_ptr&lt;Y&gt; and
-20.4.5.3/4,5 is still required in order to eliminate ambiguity in legal
-cases. The two constructors that I suggested will co exist with the current
-members but will make auto_ptr_ref obsolete in initialization contexts.
-auto_ptr_ref will be effective in assignment contexts as suggested in DR
-#127 and I can't see any serious exception safety issues in those cases
-(although it's possible to synthesize such). auto_ptr_ref&lt;X&gt; semantics will
-have to be revised to say that it strictly holds pointer of type X and not
-reference to an auto_ptr for the favor of cases in which auto_ptr_ref&lt;Y&gt; is
-constructed from auto_ptr&lt;X&gt; in which X is different from Y (i.e. assignment
-from r-value derived to base).
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><i>[Redmond: punt for the moment. We haven't decided yet whether we
- want to fix auto_ptr for C++-0x, or remove it and replace it with
- move_ptr and unique_ptr.]</i></p>
-<hr>
-<a name="466"><h3>466.&nbsp;basic_string ctor should prevent null pointer error</h3></a><p><b>Section:</b>&nbsp;21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Frey&nbsp; <b>Date:</b>&nbsp;10 Jun 2004</p>
-<p>
-Today, my colleagues and me wasted a lot of time. After some time, I
-found the problem. It could be reduced to the following short example:
-</p>
-
-<pre> #include &lt;string&gt;
- int main() { std::string( 0 ); }
-</pre>
-
-<p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and
-Comeau online) compile the above without errors or warnings! The
-programs (at least for the GCC) resulted in a SEGV.</p>
-
-<p>I know that the standard explicitly states that the ctor of string
-requires a char* which is not zero. STLs could easily detect the above
-case with a private ctor for basic_string which takes a single 'int'
-argument. This would catch the above code at compile time and would not
-ambiguate any other legal ctors.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><i>[Redmond: No great enthusiasm for doing this. If we do,
- however, we want to do it for all places that take <tt>charT*</tt>
- pointers, not just the single-argument constructor. The other
- question is whether we want to catch this at compile time (in which
- case we catch the error of a literal 0, but not an expression whose
- value is a null pointer), at run time, or both.]</i></p>
-
-<hr>
-<a name="470"><h3>470.&nbsp;accessing containers from their elements' special functions</h3></a><p><b>Section:</b>&nbsp;23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jun 2004</p>
-
-<p>
-The standard doesn't prohibit the destructors (or any other special
-functions) of containers' elements invoked from a member function
-of the container from "recursively" calling the same (or any other)
-member function on the same container object, potentially while the
-container is in an intermediate state, or even changing the state
-of the container object while it is being modified. This may result
-in some surprising (i.e., undefined) behavior.
-</p>
-
-<p>Read email thread starting with c++std-lib-13637 for more.</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Add to Container Requirements the following new paragraph:</p>
-
-<pre> Unless otherwise specified, the behavior of a program that
- invokes a container member function f from a member function
- g of the container's value_type on a container object c that
- called g from its mutating member function h, is undefined.
- I.e., if v is an element of c, directly or indirectly calling
- c.h() from v.g() called from c.f(), is undefined.
-</pre>
-
-<p><i>[Redmond: This is a real issue, but it's probably a clause 17
- issue, not clause 23. We get the same issue, for example, if we
- try to destroy a stream from one of the stream's callback functions.]</i></p>
-
-
-<hr>
-<a name="471"><h3>471.&nbsp;result of what() implementation-defined</h3></a><p><b>Section:</b>&nbsp;18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jun 2004</p>
-
-<p>[lib.exception] specifies the following:</p>
-<pre> exception (const exception&amp;) throw();
- exception&amp; operator= (const exception&amp;) throw();
-
- -4- Effects: Copies an exception object.
- -5- Notes: The effects of calling what() after assignment
- are implementation-defined.
-</pre>
-
-<p>
-First, does the Note only apply to the assignment operator? If so,
-what are the effects of calling what() on a copy of an object? Is
-the returned pointer supposed to point to an identical copy of
-the NTBS returned by what() called on the original object or not?
-</p>
-
-<p>
-Second, is this Note intended to extend to all the derived classes
-in section 19? I.e., does the standard provide any guarantee for
-the effects of what() called on a copy of any of the derived class
-described in section 19?
-</p>
-
-<p>
-Finally, if the answer to the first question is no, I believe it
-constitutes a defect since throwing an exception object typically
-implies invoking the copy ctor on the object. If the answer is yes,
-then I believe the standard ought to be clarified to spell out
-exactly what the effects are on the copy (i.e., after the copy
-ctor was called).
-</p>
-
-<p><i>[Redmond: Yes, this is fuzzy. The issue of derived classes is
- fuzzy too.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="473"><h3>473.&nbsp;underspecified ctype calls</h3></a><p><b>Section:</b>&nbsp;22.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype"> [lib.locale.ctype]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;1 Jul 2004</p>
-<p>
-Most ctype member functions come in two forms: one that operates
-on a single character at a time and another form that operates
-on a range of characters. Both forms are typically described by
-a single Effects and/or Returns clause.
-</p>
-<p>
-The Returns clause of each of the single-character non-virtual forms
-suggests that the function calls the corresponding single character
-virtual function, and that the array form calls the corresponding
-virtual array form. Neither of the two forms of each virtual member
-function is required to be implemented in terms of the other.
-</p>
-<p>
-There are three problems:
-</p>
-<p>
-1. One is that while the standard does suggest that each non-virtual
-member function calls the corresponding form of the virtual function,
-it doesn't actually explicitly require it.
-</p>
-<p>
-Implementations that cache results from some of the virtual member
-functions for some or all values of their arguments might want to
-call the array form from the non-array form the first time to fill
-the cache and avoid any or most subsequent virtual calls. Programs
-that rely on each form of the virtual function being called from
-the corresponding non-virtual function will see unexpected behavior
-when using such implementations.
-</p>
-<p>
-2. The second problem is that either form of each of the virtual
-functions can be overridden by a user-defined function in a derived
-class to return a value that is different from the one produced by
-the virtual function of the alternate form that has not been
-overriden.
-</p>
-<p>
-Thus, it might be possible for, say, ctype::widen(c) to return one
-value, while for ctype::widen(&amp;c, &amp;c + 1, &amp;wc) to set
-wc to another value. This is almost certainly not intended. Both
-forms of every function should be required to return the same result
-for the same character, otherwise the same program using an
-implementation that calls one form of the functions will behave
-differently than when using another implementation that calls the
-other form of the function "under the hood."
-</p>
-<p>
-3. The last problem is that the standard text fails to specify whether
-one form of any of the virtual functions is permitted to be implemented
-in terms of the other form or not, and if so, whether it is required
-or permitted to call the overridden virtual function or not.
-</p>
-<p>
-Thus, a program that overrides one of the virtual functions so that
-it calls the other form which then calls the base member might end
-up in an infinite loop if the called form of the base implementation
-of the function in turn calls the other form.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>
-Lillehammer: Part of this isn't a real problem. We already talk about
-caching. 22.1.1/6 But part is a real problem. ctype virtuals may call
-each other, so users don't know which ones to override to avoid avoid
-infinite loops.</p>
-
-<p>This is a problem for all facet virtuals, not just ctype virtuals,
-so we probably want a blanket statement in clause 22 for all
-facets. The LWG is leaning toward a blanket prohibition, that a
-facet's virtuals may never call each other. We might want to do that
-in clause 27 too, for that matter. A review is necessary. Bill will
-provide wording.</p>
-<hr>
-<a name="479"><h3>479.&nbsp;Container requirements and placement new</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Herb Sutter&nbsp; <b>Date:</b>&nbsp;1 Aug 2004</p>
-<p>Nothing in the standard appears to make this program ill-formed:</p>
-
-<pre> struct C {
- void* operator new( size_t s ) { return ::operator new( s ); }
- // NOTE: this hides in-place and nothrow new
- };
-
- int main() {
- vector&lt;C&gt; v;
- v.push_back( C() );
- }
-</pre>
-
-<p>Is that intentional? We should clarify whether or not we intended
- to require containers to support types that define their own special
- versions of <tt>operator new</tt>.</p>
-
-<p><i>[
-Lillehammer: A container will definitely never use this overridden
-operator new, but whether it will fail to compile is unclear from the
-standard. Are containers supposed to use qualified or unqualified
-placement new? 20.4.1.1 is somewhat relevant, but the standard
-doesn't make it completely clear whether containers have to use
-Allocator::construct(). If containers don't use it, the details of how
-containers use placement new are unspecified. That is the real bug,
-but it needs to be fixed as part of the allocator overhaul. Weak
-support that the eventual solution should make this code well formed.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="482"><h3>482.&nbsp;Swapping pairs</h3></a><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>, 25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;14 Sep 2004</p>
-<p>(Based on recent comp.std.c++ discussion)</p>
-
-<p>Pair (and tuple) should specialize std::swap to work in terms of
-std::swap on their components. For example, there's no obvious reason
-why swapping two objects of type pair&lt;vector&lt;int&gt;,
-list&lt;double&gt; &gt; should not take O(1).</p>
-<p><b>Proposed resolution:</b></p>
-
-
-<p><i>[Lillehammer: We agree it should be swappable. Howard will
- provide wording.]</i></p>
-
-<hr>
-<a name="484"><h3>484.&nbsp;Convertible to T</h3></a><p><b>Section:</b>&nbsp;24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Chris Jefferson&nbsp; <b>Date:</b>&nbsp;16 Sep 2004</p>
-<p>From comp.std.c++:</p>
-
-<p>
-I note that given an input iterator a for type T,
-then *a only has to be "convertable to T", not actually of type T.
-</p>
-
-<p>Firstly, I can't seem to find an exact definition of "convertable to T".
-While I assume it is the obvious definition (an implicit conversion), I
-can't find an exact definition. Is there one?</p>
-
-<p>Slightly more worryingly, there doesn't seem to be any restriction on
-the this type, other than it is "convertable to T". Consider two input
-iterators a and b. I would personally assume that most people would
-expect *a==*b would perform T(*a)==T(*b), however it doesn't seem that
-the standard requires that, and that whatever type *a is (call it U)
-could have == defined on it with totally different symantics and still
-be a valid inputer iterator.</p>
-
-<p>Is this a correct reading? When using input iterators should I write
-T(*a) all over the place to be sure that the object i'm using is the
-class I expect?</p>
-
-<p>This is especially a nuisance for operations that are defined to be
- "convertible to bool". (This is probably allowed so that
- implementations could return say an int and avoid an unnessary
- conversion. However all implementations I have seen simply return a
- bool anyway. Typical implemtations of STL algorithms just write
- things like <tt>while(a!=b &amp;&amp; *a!=0)</tt>. But strictly
- speaking, there are lots of types that are convertible to T but
- that also overload the appropriate operators so this doesn't behave
- as expected.</p>
-
-<p>If we want to make code like this legal (which most people seem to
- expect), then we'll need to tighten up what we mean by "convertible
- to T".</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><i>[Lillehammer: The first part is NAD, since "convertible" is
- well-defined in core. The second part is basically about pathological
- overloads. It's a minor problem but a real one. So leave open for
- now, hope we solve it as part of iterator redesign.]</i></p>
-<hr>
-<a name="485"><h3>485.&nbsp;output iterator insufficently constrained</h3></a><p><b>Section:</b>&nbsp;24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Chris Jefferson&nbsp; <b>Date:</b>&nbsp;13 Oct 2004</p>
-<p>
-The note on 24.1.2 Output iterators insufficently limits what can be
-performed on output iterators. While it requires that each iterator is
-progressed through only once and that each iterator is written to only
-once, it does not require the following things:</p>
-
-<p>Note: Here it is assumed that x is an output iterator of type X which
-has not yet been assigned to.</p>
-
-<p>a) That each value of the output iterator is written to:
-The standard allows:
-++x; ++x; ++x;
-</p>
-
-<p>
-b) That assignments to the output iterator are made in order
-X a(x); ++a; *a=1; *x=2; is allowed
-</p>
-
-<p>
-c) Chains of output iterators cannot be constructed:
-X a(x); ++a; X b(a); ++b; X c(b); ++c; is allowed, and under the current
-wording (I believe) x,a,b,c could be written to in any order.
-</p>
-
-<p>I do not believe this was the intension of the standard?</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Lillehammer: Real issue. There are lots of constraints we
- intended but didn't specify. Should be solved as part of iterator
- redesign.]</i></p>
-<hr>
-<a name="488"><h3>488.&nbsp;rotate throws away useful information</h3></a><p><b>Section:</b>&nbsp;25.2.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.rotate"> [lib.alg.rotate]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;22 Nov 2004</p>
-<p>
-rotate takes 3 iterators: first, middle and last which point into a
-sequence, and rearranges the sequence such that the subrange [middle,
-last) is now at the beginning of the sequence and the subrange [first,
-middle) follows. The return type is void.
-</p>
-
-<p>
-In many use cases of rotate, the client needs to know where the
-subrange [first, middle) starts after the rotate is performed. This
-might look like:
-</p>
-<pre> rotate(first, middle, last);
- Iterator i = advance(first, distance(middle, last));
-</pre>
-
-<p>
-Unless the iterators are random access, the computation to find the
-start of the subrange [first, middle) has linear complexity. However,
-it is not difficult for rotate to return this information with
-negligible additional computation expense. So the client could code:
-</p>
-<pre> Iterator i = rotate(first, middle, last);
-</pre>
-
-<p>
-and the resulting program becomes significantly more efficient.
-</p>
-
-<p>
-While the backwards compatibility hit with this change is not zero, it
-is very small (similar to that of lwg <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>), and there is
-a significant benefit to the change.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 25p2, change:</p>
-<pre> template&lt;class ForwardIterator&gt;
- void rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-</pre>
-
-<p>to:</p>
-
-<pre> template&lt;class ForwardIterator&gt;
- ForwardIterator rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-</pre>
-
-<p>In 25.2.10, change:</p>
-
-<pre> template&lt;class ForwardIterator&gt;
- void rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-</pre>
-
-<p>to:</p>
-
-<pre> template&lt;class ForwardIterator&gt;
- ForwardIterator rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-</pre>
-
-<p>In 25.2.10 insert a new paragraph after p1:</p>
-
-<blockquote>
-<p><b>Returns</b>: <tt>first + (last - middle)</tt>.</p>
-</blockquote>
-
-<p><i>[
-The LWG agrees with this idea, but has one quibble: we want to make
-sure not to give the impression that the function "advance" is
-actually called, just that the nth iterator is returned. (Calling
-advance is observable behavior, since users can specialize it for
-their own iterators.) Howard will provide wording.
-]</i></p>
-
-<p><i>[Howard provided wording for mid-meeting-mailing Jun. 2005.]</i></p>
-
-<hr>
-<a name="492"><h3>492.&nbsp;Invalid iterator arithmetic expressions</h3></a><p><b>Section:</b>&nbsp;23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a>, 24 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterators"> [lib.iterators]</a>, 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Thomas Mang&nbsp; <b>Date:</b>&nbsp;12 Dec 2004</p>
-<p>Various clauses other than clause 25 make use of iterator arithmetic not
-supported by the iterator category in question.
-Algorithms in clause 25 are exceptional because of 25 [lib.algorithms],
-paragraph 9, but this paragraph does not provide semantics to the
-expression "iterator - n", where n denotes a value of a distance type
-between iterators.</p>
-
-<p>1) Examples of current wording:</p>
-
-<p>Current wording outside clause 25:</p>
-
-<p>
-23.2.2.4 [lib.list.ops], paragraphs 19-21: "first + 1", "(i - 1)",
-"(last - first)"
-23.3.1.1 [lib.map.cons], paragraph 4: "last - first"
-23.3.2.1 [lib.multimap.cons], paragraph 4: "last - first"
-23.3.3.1 [lib.set.cons], paragraph 4: "last - first"
-23.3.4.1 [lib.multiset.cons], paragraph 4: "last - first"
-24.4.1 [lib.reverse.iterators], paragraph 1: "(i - 1)"
-</p>
-
-<p>
-[Important note: The list is not complete, just an illustration. The
-same issue might well apply to other paragraphs not listed here.]</p>
-
-<p>None of these expressions is valid for the corresponding iterator
-category.</p>
-
-<p>Current wording in clause 25:</p>
-
-<p>
-25.1.1 [lib.alg.foreach], paragraph 1: "last - 1"
-25.1.3 [lib.alg.find.end], paragraph 2: "[first1, last1 -
-(last2-first2))"
-25.2.8 [lib.alg.unique], paragraph 1: "(i - 1)"
-25.2.8 [lib.alg.unique], paragraph 5: "(i - 1)"
-</p>
-
-<p>
-However, current wording of 25 [lib.algorithms], paragraph 9 covers
-neither of these four cases:</p>
-
-<p>Current wording of 25 [lib.algorithms], paragraph 9:</p>
-
-<p>
-"In the description of the algorithms operator + and - are used for some
-of the iterator categories for which they do not have to be defined. In
-these cases the semantics of a+n is the same as that of</p>
-<pre>{X tmp = a;
-advance(tmp, n);
-return tmp;
-}
-</pre>
-<p>and that of b-a is the same as of return distance(a, b)"</p>
-
-<p>
-This paragrpah does not take the expression "iterator - n" into account,
-where n denotes a value of a distance type between two iterators [Note:
-According to current wording, the expression "iterator - n" would be
-resolved as equivalent to "return distance(n, iterator)"]. Even if the
-expression "iterator - n" were to be reinterpreted as equivalent to
-"iterator + -n" [Note: This would imply that "a" and "b" were
-interpreted implicitly as values of iterator types, and "n" as value of
-a distance type], then 24.3.4/2 interfers because it says: "Requires: n
-may be negative only for random access and bidirectional iterators.",
-and none of the paragraphs quoted above requires the iterators on which
-the algorithms operate to be of random access or bidirectional category.
-</p>
-
-<p>2) Description of intended behavior:</p>
-
-<p>
-For the rest of this Defect Report, it is assumed that the expression
-"iterator1 + n" and "iterator1 - iterator2" has the semantics as
-described in current 25 [lib.algorithms], paragraph 9, but applying to
-all clauses. The expression "iterator1 - n" is equivalent to an
-result-iterator for which the expression "result-iterator + n" yields an
-iterator denoting the same position as iterator1 does. The terms
-"iterator1", "iterator2" and "result-iterator" shall denote the value of
-an iterator type, and the term "n" shall denote a value of a distance
-type between two iterators.</p>
-
-<p>
-All implementations known to the author of this Defect Report comply
-with these assumptions.
-No impact on current code is expected.</p>
-
-<p>3) Proposed fixes:</p>
-
-
-<p>Change 25 [lib.algorithms], paragraph 9 to:</p>
-
-<p>
-"In the description of the algorithms operator + and - are used for some
-of the iterator categories for which they do not have to be defined. In
-this paragraph, a and b denote values of an iterator type, and n denotes
-a value of a distance type between two iterators. In these cases the
-semantics of a+n is the same as that of</p>
-<pre>{X tmp = a;
-advance(tmp, n);
-return tmp;
-}
-</pre>
-<p>,the semantics of a-n denotes the value of an iterator i for which the
-following condition holds:
-advance(i, n) == a,
-and that of b-a is the same as of
-return distance(a, b)".
-</p>
-
-<p>Comments to the new wording:</p>
-
-<p>
-a) The wording " In this paragraph, a and b denote values of an iterator
-type, and n denotes a value of a distance type between two iterators."
-was added so the expressions "b-a" and "a-n" are distinguished regarding
-the types of the values on which they operate.
-b) The wording ",the semantics of a-n denotes the value of an iterator i
-for which the following condition holds: advance(i, n) == a" was added
-to cover the expression 'iterator - n'. The wording "advance(i, n) == a"
-was used to avoid a dependency on the semantics of a+n, as the wording
-"i + n == a" would have implied. However, such a dependency might well
-be deserved.
-c) DR 225 is not considered in the new wording.
-</p>
-
-<p>
-Proposed fixes regarding invalid iterator arithmetic expressions outside
-clause 25:</p>
-
-<p>
-Either
-a) Move modified 25 [lib.algorithms], paragraph 9 (as proposed above)
-before any current invalid iterator arithmetic expression. In that case,
-the first sentence of 25 [lib.algorithms], paragraph 9, need also to be
-modified and could read: "For the rest of this International Standard,
-...." / "In the description of the following clauses including this
-...." / "In the description of the text below ..." etc. - anyways
-substituting the wording "algorithms", which is a straight reference to
-clause 25.
-In that case, 25 [lib.algorithms] paragraph 9 will certainly become
-obsolete.
-Alternatively,
-b) Add an appropiate paragraph similar to resolved 25 [lib.algorithms],
-paragraph 9, to the beginning of each clause containing invalid iterator
-arithmetic expressions.
-Alternatively,
-c) Fix each paragraph (both current wording and possible resolutions of
-DRs) containing invalid iterator arithmetic expressions separately.
-</p>
-
-<p>5) References to other DRs:</p>
-
-<p>
-See DR 225.
-See DR 237. The resolution could then also read "Linear in last -
-first".
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Lillehammer: Minor issue, but real. We have a blanket statement
-about this in 25/11. But (a) it should be in 17, not 25; and (b) it's
-not quite broad enough, because there are some arithmetic expressions
-it doesn't cover. Bill will provide wording.]</i></p>
-
-<hr>
-<a name="498"><h3>498.&nbsp;Requirements for partition() and stable_partition() too strong</h3></a><p><b>Section:</b>&nbsp;25.2.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.partitions"> [lib.alg.partitions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Sean Parent, Joe Gottman&nbsp; <b>Date:</b>&nbsp;4 May 2005</p>
-<p>
-Problem:
-The iterator requirements for partition() and stable_partition() [25.2.12]
-are listed as BidirectionalIterator, however, there are efficient algorithms
-for these functions that only require ForwardIterator that have been known
-since before the standard existed. The SGI implementation includes these (see
-<a href="http://www.sgi.com/tech/stl/partition.html">http://www.sgi.com/tech/stl/partition.html</a>
-and
-<a href="http://www.sgi.com/tech/stl/stable_partition.html">http://www.sgi.com/tech/stl/stable_partition.html</a>).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 25.2.12 from </p>
-<blockquote><pre>template&lt;class BidirectionalIterator, class Predicate&gt;
-BidirectionalIterator partition(BidirectionalIterato r first,
- BidirectionalIterator last,
- Predicate pred);
-</pre></blockquote>
-<p>to </p>
-<blockquote><pre>template&lt;class ForwardIterator, class Predicate&gt;
-ForwardIterator partition(ForwardIterator first,
- ForwardIterator last,
- Predicate pred);
-</pre></blockquote>
-<p>Change the complexity from </p>
-
-<blockquote><p>
-At most (last - first)/2 swaps are done. Exactly (last - first)
-applications of the predicate are done.
-</p></blockquote>
-
-<p>to </p>
-
-<blockquote><p>
-If ForwardIterator is a bidirectional_iterator, at most (last - first)/2
-swaps are done; otherwise at most (last - first) swaps are done. Exactly
-(last - first) applications of the predicate are done.
-</p></blockquote>
-
-<p><b>Rationale:</b></p>
-Partition is a "foundation" algorithm useful in many contexts (like sorting
-as just one example) - my motivation for extending it to include forward
-iterators is slist - without this extension you can't partition an slist
-(without writing your own partition). Holes like this in the standard
-library weaken the argument for generic programming (ideally I'd be able
-to provide a library that would refine std::partition() to other concepts
-without fear of conflicting with other libraries doing the same - but
-that is a digression). I consider the fact that partition isn't defined
-to work for ForwardIterator a minor embarrassment.
-
-<p><i>[Mont Tremblant: Moved to Open, request motivation and use cases
-by next meeting. Sean provided further rationale by post-meeting
-mailing.]</i></p>
-
-<hr>
-<a name="502"><h3>502.&nbsp;Proposition: Clarification of the interaction between a facet and an iterator</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Christopher Conrade Zseleghovski&nbsp; <b>Date:</b>&nbsp;7 Jun 2005</p>
-<p>
-Motivation:
-</p>
-
-<p>
-This requirement seems obvious to me, it is the essence of code modularity.
-I have complained to Mr. Plauger that the Dinkumware library does not
-observe this principle but he objected that this behaviour is not covered in
-the standard.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Append the following point to 22.1.1.1.1:
-</p>
-
-<p>
-6. The implementation of a facet of Table 52 parametrized with an
-InputIterator/OutputIterator should use that iterator only as character
-source/sink respectively.
-For a *_get facet, it means that the value received depends only on the
-sequence of input characters and not on how they are accessed.
-For a *_put facet, it means that the sequence of characters output depends
-only on the value to be formatted and not of how the characters are stored.
-</p>
-
-<p><i>[
-Berlin: Moved to Open, Need to clean up this area to make it clear
-locales don't have to contain open ended sets of facets. Jack, Howard,
-Bill.
-]</i></p>
-<hr>
-<a name="503"><h3>503.&nbsp;more on locales</h3></a><p><b>Section:</b>&nbsp;22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;P.J. Plauger&nbsp; <b>Date:</b>&nbsp;20 Jun 2005</p>
-<p>
-a) In 22.2.1.1 para. 2 we refer to "the instantiations required in Table
-51" to refer to the facet *objects* associated with a locale. And we
-almost certainly mean just those associated with the default or "C"
-locale. Otherwise, you can't switch to a locale that enforces a different
-mapping between narrow and wide characters, or that defines additional
-uppercase characters.
-</p>
-
-<p>
-b) 22.2.1.5 para. 3 (codecvt) has the same issues.
-</p>
-
-<p>
-c) 22.2.1.5.2 (do_unshift) is even worse. It *forbids* the generation of
-a homing sequence for the basic character set, which might very well need
-one.
-</p>
-
-<p>
-d) 22.2.1.5.2 (do_length) likewise dictates that the default mapping
-between wide and narrow characters be taken as one-for-one.
-</p>
-
-<p>
-e) 22.2.2 para. 2 (num_get/put) is both muddled and vacuous, as far as
-I can tell. The muddle is, as before, calling Table 51 a list of
-instantiations. But the constraint it applies seems to me to cover
-*all* defined uses of num_get/put, so why bother to say so?
-</p>
-
-<p>
-f) 22.2.3.1.2 para. 1(do_decimal_point) says "The required instantiations
-return '.' or L'.'.) Presumably this means "as appropriate for the
-character type. But given the vague definition of "required" earlier,
-this overrules *any* change of decimal point for non "C" locales.
-Surely we don't want to do that.
-</p>
-
-<p>
-g) 22.2.3.1.2 para. 2 (do_thousands_sep) says "The required instantiations
-return ',' or L','.) As above, this probably means "as appropriate for the
-character type. But this overrules the "C" locale, which requires *no*
-character ('\0') for the thousands separator. Even if we agree that we
-don't mean to block changes in decimal point or thousands separator,
-we should also eliminate this clear incompatibility with C.
-</p>
-
-<p>
-h) 22.2.3.1.2 para. 2 (do_grouping) says "The required instantiations
-return the empty string, indicating no grouping." Same considerations
-as for do_decimal_point.
-</p>
-
-<p>
-i) 22.2.4.1 para. 1 (collate) refers to "instantiations required in Table
-51". Same bad jargon.
-</p>
-
-<p>
-j) 22.2.4.1.2 para. 1 (do_compare) refers to "instantiations required
-in Table 51". Same bad jargon.
-</p>
-
-<p>
-k) 22.2.5 para. 1 (time_get/put) uses the same muddled and vacuous
-as num_get/put.
-</p>
-
-<p>
-l) 22.2.6 para. 2 (money_get/put) uses the same muddled and vacuous
-as num_get/put.
-</p>
-
-<p>
-m) 22.2.6.3.2 (do_pos/neg_format) says "The instantiations required
-in Table 51 ... return an object of type pattern initialized to
-{symbol, sign, none, value}." This once again *overrides* the "C"
-locale, as well as any other locale."
-</p>
-
-<p>
-3) We constrain the use_facet calls that can be made by num_get/put,
-so why don't we do the same for money_get/put? Or for any of the
-other facets, for that matter?
-</p>
-
-<p>
-4) As an almost aside, we spell out when a facet needs to use the ctype
-facet, but several also need to use a codecvt facet and we don't say so.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<p><i>[
-Berlin: Bill to provide wording.
-]</i></p>
-<hr>
-<a name="515"><h3>515.&nbsp;Random number engine traits</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.synopsis"> [tr.rand.synopsis]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-To accompany the concept of a pseudo-random number engine as defined in Table 17,
-we propose and recommend an adjunct template, engine_traits, to be declared in
-[tr.rand.synopsis] as:
-</p>
-<blockquote><pre>template&lt; class PSRE &gt;
-class engine_traits;
-</pre></blockquote>
-<p>
-This templateÕs primary purpose would be as an aid to generic programming involving
-pseudo-random number engines. Given only the facilities described in tr1, it would
-be very difficult to produce any algorithms involving the notion of a generic engine.
-The intent of this proposal is to provide, via engine_traits&lt;&gt;, sufficient
-descriptive information to allow an algorithm to employ a pseudo-random number engine
-without regard to its exact type, i.e., as a template parameter.
-</p>
-<p>
-For example, today it is not possible to write an efficient generic function that
-requires any specific number of random bits. More specifically, consider a
-cryptographic application that internally needs 256 bits of randomness per call:
-</p>
-<blockquote><pre>template&lt; class Eng, class InIter, class OutIter &gt;
-void crypto( Eng&amp; e, InIter in, OutIter out );
-</pre></blockquote>
-<p>
-Without knowning the number of bits of randomness produced per call to a provided
-engine, the algorithm has no means of determining how many times to call the engine.
-</p>
-<p>
-In a new section [tr.rand.eng.traits], we proposed to define the engine_traits
-template as:
-</p>
-<blockquote><pre>template&lt; class PSRE &gt;
-class engine_traits
-{
- static std::size_t bits_of_randomness = 0u;
- static std::string name() { return "unknown_engine"; }
- // TODO: other traits here
-};
-</pre></blockquote>
-<p>
-Further, each engine described in [tr.rand.engine] would be accompanied by a
-complete specialization of this new engine_traits template.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-
-</p>
-
-<p><i>[
-Berlin: Walter: While useful for implementation per TR1, N1932 has no need for this
-feature.
-]</i></p>
-
-<hr>
-<a name="518"><h3>518.&nbsp;Are insert and erase stable for unordered_multiset and unordered_multimap?</h3></a><p><b>Section:</b>&nbsp;TR1 6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.hash"> [tr.hash]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Issue 371 deals with stability of multiset/multimap under insert and erase
-(i.e. do they preserve the relative order in ranges of equal elements).
-The same issue applies to unordered_multiset and unordered_multimap.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[
-Moved to open (from review): There is no resolution.
-]</i></p>
-
-<p>
-</p>
-<hr>
-<a name="522"><h3>522.&nbsp;Tuple doesn't define swap</h3></a><p><b>Section:</b>&nbsp;TR1 6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.tuple"> [tr.tuple]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Koenig&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Tuple doesn't define swap(). It should.
-</p>
-<p><i>[
-Berlin: Doug to provide wording.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="523"><h3>523.&nbsp;regex case-insensitive character ranges are unimplementable as specified</h3></a><p><b>Section:</b>&nbsp;TR1 7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.re"> [tr.re]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Eric Niebler&nbsp; <b>Date:</b>&nbsp;1 Jul 2005</p>
-<p>
-A problem with TR1 regex is currently being discussed on the Boost
-developers list. It involves the handling of case-insensitive matching
-of character ranges such as [Z-a]. The proper behavior (according to the
-ECMAScript standard) is unimplementable given the current specification
-of the TR1 regex_traits&lt;&gt; class template. John Maddock, the author of
-the TR1 regex proposal, agrees there is a problem. The full discussion
-can be found at http://lists.boost.org/boost/2005/06/28850.php (first
-message copied below). We don't have any recommendations as yet.
-</p>
-<p>
--- Begin original message --
-</p>
-<p>
-The situation of interest is described in the ECMAScript specification
-(ECMA-262), section 15.10.2.15:
-</p>
-<p>
-"Even if the pattern ignores case, the case of the two ends of a range
-is significant in determining which characters belong to the range.
-Thus, for example, the pattern /[E-F]/i matches only the letters E, F,
-e, and f, while the pattern /[E-f]/i matches all upper and lower-case
-ASCII letters as well as the symbols [, \, ], ^, _, and `."
-</p>
-<p>
-A more interesting case is what should happen when doing a
-case-insentitive match on a range such as [Z-a]. It should match z, Z,
-a, A and the symbols [, \, ], ^, _, and `. This is not what happens with
-Boost.Regex (it throws an exception from the regex constructor).
-</p>
-<p>
-The tough pill to swallow is that, given the specification in TR1, I
-don't think there is any effective way to handle this situation.
-According to the spec, case-insensitivity is handled with
-regex_traits&lt;&gt;::translate_nocase(CharT) -- two characters are equivalent
-if they compare equal after both are sent through the translate_nocase
-function. But I don't see any way of using this translation function to
-make character ranges case-insensitive. Consider the difficulty of
-detecting whether "z" is in the range [Z-a]. Applying the transformation
-to "z" has no effect (it is essentially std::tolower). And we're not
-allowed to apply the transformation to the ends of the range, because as
-ECMA-262 says, "the case of the two ends of a range is significant."
-</p>
-<p>
-So AFAICT, TR1 regex is just broken, as is Boost.Regex. One possible fix
-is to redefine translate_nocase to return a string_type containing all
-the characters that should compare equal to the specified character. But
-this function is hard to implement for Unicode, and it doesn't play nice
-with the existing ctype facet. What a mess!
-</p>
-<p>
--- End original message --
-</p>
-
-<p><i>[
-John Maddock adds:
-]</i></p>
-
-<p>
-One small correction, I have since found that ICU's regex package does
-implement this correctly, using a similar mechanism to the current
-TR1.Regex.
-</p>
-<p>
-Given an expression [c1-c2] that is compiled as case insensitive it:
-</p>
-<p>
-Enumerates every character in the range c1 to c2 and converts it to it's
-case folded equivalent. That case folded character is then used a key to a
-table of equivalence classes, and each member of the class is added to the
-list of possible matches supported by the character-class. This second step
-isn't possible with our current traits class design, but isn't necessary if
-the input text is also converted to a case-folded equivalent on the fly.
-</p>
-<p>
-ICU applies similar brute force mechanisms to character classes such as
-[[:lower:]] and [[:word:]], however these are at least cached, so the impact
-is less noticeable in this case.
-</p>
-<p>
-Quick and dirty performance comparisons show that expressions such as
-"[X-\\x{fff0}]+" are indeed very slow to compile with ICU (about 200 times
-slower than a "normal" expression). For an application that uses a lot of
-regexes this could have a noticeable performance impact. ICU also has an
-advantage in that it knows the range of valid characters codes: code points
-outside that range are assumed not to require enumeration, as they can not
-be part of any equivalence class. I presume that if we want the TR1.Regex
-to work with arbitrarily large character sets enumeration really does become
-impractical.
-</p>
-<p>
-Finally note that Unicode has:
-</p>
-<p>
-Three cases (upper, lower and title).
-One to many, and many to one case transformations.
-Character that have context sensitive case translations - for example an
-uppercase sigma has two different lowercase forms - the form chosen depends
-on context(is it end of a word or not), a caseless match for an upper case
-sigma should match either of the lower case forms, which is why case folding
-is often approximated by tolower(toupper(c)).
-</p>
-<p>
-Probably we need some way to enumerate character equivalence classes,
-including digraphs (either as a result or an input), and some way to tell
-whether the next character pair is a valid digraph in the current locale.
-</p>
-<p>
-Hoping this doesn't make this even more complex that it was already,
-</p>
-
-<p><i>[
-Portland: Alisdair: Detect as invalid, throw an exception.
-Pete: Possible general problem with case insensitive ranges.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="524"><h3>524.&nbsp;regex named character classes and case-insensitivity don't mix</h3></a><p><b>Section:</b>&nbsp;TR1 7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.re"> [tr.re]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Eric Niebler&nbsp; <b>Date:</b>&nbsp;1 Jul 2005</p>
-<p>
-This defect is also being discussed on the Boost developers list. The
-full discussion can be found here:
-http://lists.boost.org/boost/2005/07/29546.php
-</p>
-<p>
--- Begin original message --
-</p>
-<p>
-Also, I may have found another issue, closely related to the one under
-discussion. It regards case-insensitive matching of named character
-classes. The regex_traits&lt;&gt; provides two functions for working with
-named char classes: lookup_classname and isctype. To match a char class
-such as [[:alpha:]], you pass "alpha" to lookup_classname and get a
-bitmask. Later, you pass a char and the bitmask to isctype and get a
-bool yes/no answer.
-</p>
-<p>
-But how does case-insensitivity work in this scenario? Suppose we're
-doing a case-insensitive match on [[:lower:]]. It should behave as if it
-were [[:lower:][:upper:]], right? But there doesn't seem to be enough
-smarts in the regex_traits interface to do this.
-</p>
-<p>
-Imagine I write a traits class which recognizes [[:fubar:]], and the
-"fubar" char class happens to be case-sensitive. How is the regex engine
-to know that? And how should it do a case-insensitive match of a
-character against the [[:fubar:]] char class? John, can you confirm this
-is a legitimate problem?
-</p>
-<p>
-I see two options:
-</p>
-<p>
-1) Add a bool icase parameter to lookup_classname. Then,
-lookup_classname( "upper", true ) will know to return lower|upper
-instead of just upper.
-</p>
-<p>
-2) Add a isctype_nocase function
-</p>
-<p>
-I prefer (1) because the extra computation happens at the time the
-pattern is compiled rather than when it is executed.
-</p>
-<p>
--- End original message --
-</p>
-
-<p>
-For what it's worth, John has also expressed his preference for option
-(1) above.
-</p>
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="525"><h3>525.&nbsp;type traits definitions not clear</h3></a><p><b>Section:</b>&nbsp;TR1 4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.meta.unary"> [tr.meta.unary]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Robert Klarer&nbsp; <b>Date:</b>&nbsp;11 Jul 2005</p>
-<p>
-It is not completely clear how the primary type traits deal with
-cv-qualified types. And several of the secondary type traits
-seem to be lacking a definition.
-</p>
-
-<p><i>[
-Berlin: Howard to provide wording.
-]</i></p>
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="526"><h3>526.&nbsp;Is it undefined if a function in the standard changes in parameters?</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Chris Jefferson&nbsp; <b>Date:</b>&nbsp;14 Sep 2005</p>
-<p>
-Problem: There are a number of places in the C++ standard library where
-it is possible to write what appear to be sensible ways of calling
-functions, but which can cause problems in some (or all)
-implementations, as they cause the values given to the function to be
-changed in a way not specified in standard (and therefore not coded to
-correctly work). These fall into two similar categories.
-</p>
-
-<p>
-1) Parameters taken by const reference can be changed during execution
-of the function
-</p>
-
-<p>
-Examples:
-</p>
-
-<p>
-Given std::vector&lt;int&gt; v:
-</p>
-<p>
-v.insert(v.begin(), v[2]);
-</p>
-<p>
-v[2] can be changed by moving elements of vector
-</p>
-
-
-<p>
-Given std::list&lt;int&gt; l:
-</p>
-<p>
-l.remove(*l.begin());
-</p>
-<p>
-Will delete the first element, and then continue trying to access it.
-This is particularily vicious, as it will appear to work in almost all
-cases.
-</p>
-
-<p>
-2) A range is given which changes during the execution of the function:
-Similarly,
-</p>
-
-<p>
-v.insert(v.begin(), v.begin()+4, v.begin()+6);
-</p>
-
-<p>
-This kind of problem has been partly covered in some cases. For example
-std::copy(first, last, result) states that result cannot be in the range
-[first, last). However, does this cover the case where result is a
-reverse_iterator built from some iterator in the range [first, last)?
-Also, std::copy would still break if result was reverse_iterator(last +
-1), yet this is not forbidden by the standard
-</p>
-
-<p>
-Solution:
-</p>
-
-<p>
-One option would be to try to more carefully limit the requirements of
-each function. There are many functions which would have to be checked.
-However as has been shown in the std::copy case, this may be difficult.
-A simpler, more global option would be to somewhere insert text similar to:
-</p>
-
-<p>
-If the execution of any function would change either any values passed
-by reference or any value in any range passed to a function in a way not
-defined in the definition of that function, the result is undefined.
-</p>
-
-<p>
-Such code would have to at least cover chapters 23 and 25 (the sections
-I read through carefully). I can see no harm on applying it to much of
-the rest of the standard.
-</p>
-
-<p>
-Some existing parts of the standard could be improved to fit with this,
-for example the requires for 25.2.1 (Copy) could be adjusted to:
-</p>
-
-<p>
-Requires: For each non-negative integer n &lt; (last - first), assigning to
-*(result + n) must not alter any value in the range [first + n, last).
-</p>
-
-<p>
-However, this may add excessive complication.
-</p>
-
-<p>
-One other benefit of clearly introducing this text is that it would
-allow a number of small optimisations, such as caching values passed
-by const reference.
-</p>
-
-<p>
-Matt Austern adds that this issue also exists for the <tt>insert</tt> and
-<tt>erase</tt> members of the ordered and unordered associative containers.
-</p>
-
-<p><i>[
-Berlin: Lots of controversey over how this should be solved. Lots of confusion
-as to whether we're talking about self referencing iterators or references.
-Needs a good survey as to the cases where this matters, for which
-implementations, and how expensive it is to fix each case.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="527"><h3>527.&nbsp;tr1::bind has lost its Throws clause</h3></a><p><b>Section:</b>&nbsp;TR1 3.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.func.bind.bind"> [tr.func.bind.bind]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;01 Oct 2005</p>
-<p>
-The original bind proposal gives the guarantee that tr1::bind(f, t1,
-..., tN) does not throw when the copy constructors of f, t1, ..., tN
-don't.
-</p>
-
-<p>
-This guarantee is not present in the final version of TR1.
-</p>
-
-<p>
-I'm pretty certain that we never removed it on purpose. Editorial omission? :-)
-</p>
-
-<p><i>[
-Berlin: not quite editorial, needs proposed wording.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-In 20.5.10.1.3 [lib.func.bind.bind] ([tr.func.bind.bind]), add a new paragraph after p2:
-</p>
-<blockquote>
-<i>Throws:</i> Nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt>
-throws an exception.
-</blockquote>
-
-<p>
-Add a new paragraph after p4:
-</p>
-<blockquote>
-<i>Throws:</i> nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt>
-throws an exception.
-</blockquote>
-<hr>
-<a name="528"><h3>528.&nbsp;TR1: issue 6.19 vs 6.3.4.3/2 (and 6.3.4.5/2)</h3></a><p><b>Section:</b>&nbsp;TR1 6.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.unord.unord"> [tr.unord.unord]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;12 Oct 2005</p>
-<p>
-while implementing the resolution of issue 6.19 I'm noticing the
-following: according to 6.3.4.3/2 (and 6.3.4.5/2), for unordered_set and
-unordered_multiset:
-</p>
-
-<blockquote>
- "The iterator and const_iterator types are both const types. It is
-unspecified whether they are the same type"
-</blockquote>
-
-<p>
-Now, according to the resolution of 6.19, we have overloads of insert
-with hint and erase (single and range) both for iterator and
-const_iterator, which, AFAICS, can be meaningful at the same time *only*
-if iterator and const_iterator *are* in fact different types.
-</p>
-<p>
-Then, iterator and const_iterator are *required* to be different types?
-Or that is an unintended consequence? Maybe the overloads for plain
-iterators should be added only to unordered_map and unordered_multimap?
-Or, of course, I'm missing something?
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Add to 6.3.4.3p2 (and 6.3.4.5p2):
-</p>
-<p>
-2 ... The iterator and const_iterator types are both <del>const</del>
-<ins>constant</ins> iterator types.
-It is unspecified whether they are the same type.
-</p>
-
-<p>
-Add a new subsection to 17.4.4 [lib.conforming]:
-</p>
-
-<blockquote>
-<p>
-An implementation shall not supply an overloaded function
- signature specified in any library clause if such a signature
- would be inherently ambiguous during overload resolution
- due to two library types referring to the same type.
-</p>
-<p>
- [Note: For example, this occurs when a container's iterator
- and const_iterator types are the same. -- end note]
-</p>
-</blockquote>
-
-<p><i>[
-Post-Berlin: Beman supplied wording.
-]</i></p>
-
-<hr>
-<a name="529"><h3>529.&nbsp;The standard encourages redundant and confusing preconditions</h3></a><p><b>Section:</b>&nbsp;17.4.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.required"> [lib.res.on.required]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;David Abrahams&nbsp; <b>Date:</b>&nbsp;25 Oct 2005</p>
-<p>
-17.4.3.8/1 says:
-</p>
-
-<blockquote>
-Violation of the preconditions specified in a function's
-Required behavior: paragraph results in undefined behavior unless the
-function's Throws: paragraph specifies throwing an exception when the
-precondition is violated.
-</blockquote>
-
-<p>
-This implies that a precondition violation can lead to defined
-behavior. That conflicts with the only reasonable definition of
-precondition: that a violation leads to undefined behavior. Any other
-definition muddies the waters when it comes to analyzing program
-correctness, because precondition violations may be routinely done in
-correct code (e.g. you can use std::vector::at with the full
-expectation that you'll get an exception when your index is out of
-range, catch the exception, and continue). Not only is it a bad
-example to set, but it encourages needless complication and redundancy
-in the standard. For example:
-</p>
-
-<blockquote><pre> 21 Strings library
- 21.3.3 basic_string capacity
-
- void resize(size_type n, charT c);
-
- 5 Requires: n &lt;= max_size()
- 6 Throws: length_error if n &gt; max_size().
- 7 Effects: Alters the length of the string designated by *this as follows:
-</pre></blockquote>
-
-<p>
-The Requires clause is entirely redundant and can be dropped. We
-could make that simplifying change (and many others like it) even
-without changing 17.4.3.8/1; the wording there just seems to encourage
-the redundant and error-prone Requires: clause.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-1. Change 17.4.3.8/1 to read:
-</p>
-
-<blockquote>
-Violation of the preconditions specified in a function's
-<i>Required behavior:</i> paragraph results in undefined behavior
-<del>unless the function's <i>Throws:</i> paragraph specifies throwing
-an exception when the precondition is violated</del>.
-</blockquote>
-
-<p>
-2. Go through and remove redundant Requires: clauses. Specifics to be
- provided by Dave A.
-</p>
-
-<p><i>[
-Berlin: The LWG requests a detailed survey of part 2 of the proposed resolution.
-]</i></p>
-
-<hr>
-<a name="531"><h3>531.&nbsp;array forms of unformatted input functions</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Nov 2005</p>
-<p>
-The array forms of unformatted input functions don't seem to have well-defined
-semantics for zero-element arrays in a couple of cases. The affected ones
-(<tt>istream::get()</tt> and <tt>istream::getline()</tt>) are supposed to
-terminate when <tt>(n - 1)</tt> characters are stored, which obviously can
-never be true when <tt>(n == 0)</tt> holds to start with. See
-c++std-lib-16071.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-I suggest changing 27.6.1.3, p7 (<tt>istream::get()</tt>), bullet 1 to read:
-</p>
- <p>
- </p><ul>
- <li>
- <tt>(n &lt; 1)</tt> is true or <tt>(n - 1)</tt> characters
- are stored;
- </li>
- </ul>
- <p></p>
-<p>
-Change 27.6.1.3, p9:
-</p>
-
-<blockquote>
-If the function stores no characters, it calls <tt>setstate(failbit)</tt> (which
-may throw <tt>ios_base::failure</tt> (27.4.4.3)). In any case, <ins>if <tt>(n
-&gt; 0)</tt> is true</ins> it then stores a null character into the next
-successive location of the array.
-</blockquote>
-
- <p>
-
-and similarly p17 (<tt>istream::getline()</tt>), bullet 3 to:
-
- </p>
- <p>
- </p><ul>
- <li>
- <tt>(n &lt; 1)</tt> is true or <tt>(n - 1)</tt> characters
- are stored (in which case the function calls
- <tt>setstate(failbit)</tt>).
- </li>
- </ul>
- <p></p>
-
- <p>
-
-In addition, to clarify that <tt>istream::getline()</tt> must not store the
-terminating NUL character unless the the array has non-zero size, Robert
-Klarer suggests in c++std-lib-16082 to change 27.6.1.3, p20 to read:
-
- </p>
- <p>
- </p><blockquote>
-
-In any case, provided <tt>(n &gt; 0)</tt> is true, it then stores a null character
-(using charT()) into the next successive location of the array.
-
- </blockquote>
- <p></p>
-
-<p><i>[
-post-Redmond: Pete noticed that the current resolution for <tt>get</tt> requires
-writing to out of bounds memory when <tt>n == 0</tt>. Martin provided fix.
-]</i></p>
-
-<hr>
-<a name="532"><h3>532.&nbsp;Tuple comparison</h3></a><p><b>Section:</b>&nbsp;TR1 6.1.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.tuple.rel"> [tr.tuple.rel]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;David Abrahams&nbsp; <b>Date:</b>&nbsp;29 Nov 2005</p>
-<p>
-Where possible, tuple comparison operators &lt;,&lt;=,=&gt;, and &gt; ought to be
-defined in terms of std::less rather than operator&lt;, in order to
-support comparison of tuples of pointers.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-change 6.1.3.5/5 from:
-</p>
-
-<blockquote>
- Returns: The result of a lexicographical comparison between t and
- u. The result is defined as: (bool)(get&lt;0&gt;(t) &lt; get&lt;0&gt;(u)) ||
- (!(bool)(get&lt;0&gt;(u) &lt; get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for
- some tuple r is a tuple containing all but the first element of
- r. For any two zero-length tuples e and f, e &lt; f returns false.
-</blockquote>
-
-<p>
-to:
-</p>
-
-<blockquote>
-<p>
- Returns: The result of a lexicographical comparison between t and
- u. For any two zero-length tuples e and f, e &lt; f returns false.
- Otherwise, the result is defined as: cmp( get&lt;0&gt;(t), get&lt;0&gt;(u)) ||
- (!cmp(get&lt;0&gt;(u), get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for some
- tuple r is a tuple containing all but the first element of r, and
- cmp(x,y) is an unspecified function template defined as follows.
-</p>
-<p>
- Where T is the type of x and U is the type of y:
-</p>
-
-<p>
- if T and U are pointer types and T is convertible to U, returns
- less&lt;U&gt;()(x,y)
-</p>
-
-<p>
- otherwise, if T and U are pointer types, returns less&lt;T&gt;()(x,y)
-</p>
-
-<p>
- otherwise, returns (bool)(x &lt; y)
-</p>
-</blockquote>
-
-<p><i>[
-Berlin: This issue is much bigger than just tuple (pair, containers,
-algorithms). Dietmar will survey and work up proposed wording.
-]</i></p>
-
-<hr>
-<a name="534"><h3>534.&nbsp;Missing basic_string members</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>&nbsp; <b>Submitter:</b>&nbsp;Alisdair Meredith&nbsp; <b>Date:</b>&nbsp;16 Nov 2005</p>
-<p>
-OK, we all know std::basic_string is bloated and already has way too
-many members. However, I propose it is missing 3 useful members that
-are often expected by users believing it is a close approximation of the
-container concept. All 3 are listed in table 71 as 'optional'
-</p>
-
-<p>
-i/ pop_back.
-</p>
-
-<p>
-This is the one I feel most strongly about, as I only just discovered it
-was missing as we are switching to a more conforming standard library
-&lt;g&gt;
-</p>
-
-<p>
-I find it particularly inconsistent to support push_back, but not
-pop_back.
-</p>
-
-<p>
-ii/ back.
-</p>
-
-<p>
-There are certainly cases where I want to examine the last character of
-a string before deciding to append, or to trim trailing path separators
-from directory names etc. *rbegin() somehow feels inelegant.
-</p>
-
-<p>
-iii/ front
-</p>
-
-<p>
-This one I don't feel strongly about, but if I can get the first two,
-this one feels that it should be added as a 'me too' for consistency.
-</p>
-
-<p>
-I believe this would be similarly useful to the data() member recently
-added to vector, or at() member added to the maps.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add the following members to definition of class template basic_string, 21.3p7
-</p>
-<blockquote><pre>void pop_back ()
-
-const charT &amp; front() const
-charT &amp; front()
-
-const charT &amp; back() const
-charT &amp; back()
-</pre></blockquote>
-<p>
-Add the following paragraphs to basic_string description
-</p>
-
-<p>
-21.3.4p5
-</p>
-<blockquote>
-<pre>const charT &amp; front() const
-charT &amp; front()
-</pre>
-<p>
-<i>Precondition:</i> <tt>!empty()</tt>
-</p>
-<p>
-<i>Effects:</i> Equivalent to <tt>operator[](0)</tt>.
-</p>
-</blockquote>
-
-<p>
-21.3.4p6
-</p>
-<blockquote>
-<pre>const charT &amp; back() const
-charT &amp; back()
-</pre>
-<p>
-<i>Precondition:</i> <tt>!empty()</tt>
-</p>
-<p>
-<i>Effects:</i> Equivalent to <tt>operator[]( size() - 1)</tt>.
-</p>
-</blockquote>
-
-<p>
-21.3.5.5p10
-</p>
-<blockquote>
-<pre>void pop_back ()
-</pre>
-<p>
-<i>Precondition:</i> <tt>!empty()</tt>
-</p>
-<p>
-<i>Effects:</i> Equivalent to <tt>erase( size() - 1, 1 )</tt>.
-</p>
-</blockquote>
-
-<p>
-Update Table 71: (optional sequence operations)
-Add basic_string to the list of containers for the following operations.
-</p>
-<blockquote><pre>a.front()
-a.back()
-a.push_back()
-a.pop_back()
-a[n]
-</pre></blockquote>
-
-<p><i>[
-Berlin: Has support. Alisdair provided wording.
-]</i></p>
-<hr>
-<a name="536"><h3>536.&nbsp;Container iterator constructor and explicit convertibility</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Joaquín M López Muñoz&nbsp; <b>Date:</b>&nbsp;17 Dec 2005</p>
-<p>
-The iterator constructor X(i,j) for containers as defined in 23.1.1 and
-23.2.2 does only require that i and j be input iterators but
-nothing is said about their associated value_type. There are three
-sensible
-options:
-</p>
-<ol>
-<li>iterator's value_type is exactly X::value_type (modulo cv).</li>
-<li>iterator's value_type is *implicitly* convertible to X::value_type.</li>
-<li>iterator's value_type is *explicitly* convertible to X::value_type.</li>
-</ol>
-<p>
-The issue has practical implications, and stdlib vendors have
-taken divergent approaches to it: Dinkumware follows 2,
-libstdc++ follows 3.
-</p>
-<p>
-The same problem applies to the definition of insert(p,i,j) for
-sequences and insert(i,j) for associative contianers, as well as
-assign.
-</p>
-
-<p><i>[
-The following added by Howard and the example code was originally written by
-Dietmar.
-]</i></p>
-<p>
-Valid code below?
-</p>
-
-<blockquote><pre>#include &lt;vector&gt;
-#include &lt;iterator&gt;
-#include &lt;iostream&gt;
-
-struct foo
-{
- explicit foo(int) {}
-};
-
-int main()
-{
- std::vector&lt;int&gt; v_int;
- std::vector&lt;foo&gt; v_foo1(v_int.begin(), v_int.end());
- std::vector&lt;foo&gt; v_foo2((std::istream_iterator&lt;int&gt;(std::cin)),
- std::istream_iterator&lt;int&gt;());
-}
-</pre></blockquote>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<p><i>[
-Berlin: Some support, not universal, for respecting the explicit qualifier.
-]</i></p>
-<hr>
-<a name="539"><h3>539.&nbsp;partial_sum and adjacent_difference should mention requirements</h3></a><p><b>Section:</b>&nbsp;26.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand"> [lib.rand]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Marc Schoolderman&nbsp; <b>Date:</b>&nbsp;6 Feb 2006</p>
-<p>
-There are some problems in the definition of partial_sum and
-adjacent_difference in 26.4 [lib.numeric.ops]
-</p>
-
-<p>
-Unlike <tt>accumulate</tt> and <tt>inner_product</tt>, these functions are not
-parametrized on a "type T", instead, 26.4.3 [lib.partial.sum] simply
-specifies the effects clause as;
-</p>
-
-<blockquote>
-Assigns to every element referred to by iterator <tt>i</tt> in the range
-<tt>[result,result + (last - first))</tt> a value correspondingly equal to
-<blockquote><pre>((...(* first + *( first + 1)) + ...) + *( first + ( i - result )))
-</pre></blockquote>
-</blockquote>
-
-<p>
-And similarly for BinaryOperation. Using just this definition, it seems
-logical to expect that:
-</p>
-
-
-<blockquote><pre>char i_array[4] = { 100, 100, 100, 100 };
-int o_array[4];
-
-std::partial_sum(i_array, i_array+4, o_array);
-</pre></blockquote>
-
-<p>
-Is equivalent to
-</p>
-
-<blockquote><pre>int o_array[4] = { 100, 100+100, 100+100+100, 100+100+100+100 };
-</pre></blockquote>
-
-<p>
-i.e. 100, 200, 300, 400, with addition happening in the <tt>result type</tt>,
-<tt>int</tt>.
-</p>
-
-<p>
-Yet all implementations I have tested produce 100, -56, 44, -112,
-because they are using an accumulator of the <tt>InputIterator</tt>'s
-<tt>value_type</tt>, which in this case is <tt>char</tt>, not <tt>int</tt>.
-</p>
-
-<p>
-The issue becomes more noticeable when the result of the expression <tt>*i +
-*(i+1)</tt> or <tt>binary_op(*i, *i-1)</tt> can't be converted to the
-<tt>value_type</tt>. In a contrived example:
-</p>
-
-<blockquote><pre>enum not_int { x = 1, y = 2 };
-...
-not_int e_array[4] = { x, x, y, y };
-std::partial_sum(e_array, e_array+4, o_array);
-</pre></blockquote>
-
-<p>
-Is it the intent that the operations happen in the <tt>input type</tt>, or in
-the <tt>result type</tt>?
-</p>
-
-<p>
-If the intent is that operations happen in the <tt>result type</tt>, something
-like this should be added to the "Requires" clause of 26.4.3/4
-[lib.partial.sum]:
-</p>
-
-<blockquote>
-The type of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall meet the
-requirements of <tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt>
-(23.1) types.
-</blockquote>
-
-<p>
-(As also required for <tt>T</tt> in 26.4.1 [lib.accumulate] and 26.4.2
-[lib.inner.product].)
-</p>
-
-<p>
-The "auto initializer" feature proposed in
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1894.pdf">N1894</a>
-is not required to
-implement <tt>partial_sum</tt> this way. The 'narrowing' behaviour can still be
-obtained by using the <tt>std::plus&lt;&gt;</tt> function object.
-</p>
-
-<p>
-If the intent is that operations happen in the <tt>input type</tt>, then
-something like this should be added instead;
-</p>
-
-<blockquote>
-The type of *first shall meet the requirements of
-<tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types.
-The result of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall be
-convertible to this type.
-</blockquote>
-
-<p>
-The 'widening' behaviour can then be obtained by writing a custom proxy
-iterator, which is somewhat involved.
-</p>
-
-<p>
-In both cases, the semantics should probably be clarified.
-</p>
-
-<p>
-26.4.4 [lib.adjacent.difference] is similarly underspecified, although
-all implementations seem to perform operations in the 'result' type:
-</p>
-
-<blockquote><pre>unsigned char i_array[4] = { 4, 3, 2, 1 };
-int o_array[4];
-
-std::adjacent_difference(i_array, i_array+4, o_array);
-</pre></blockquote>
-
-<p>
-o_array is 4, -1, -1, -1 as expected, not 4, 255, 255, 255.
-</p>
-
-<p>
-In any case, <tt>adjacent_difference</tt> doesn't mention the requirements on the
-<tt>value_type</tt>; it can be brought in line with the rest of 26.4
-[lib.numeric.ops] by adding the following to 26.4.4/2
-[lib.adjacent.difference]:
-</p>
-
-<blockquote>
-The type of <tt>*first</tt> shall meet the requirements of
-<tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types."
-</blockquote>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<p><i>[
-Berlin: Giving output iterator's value_types very controversial. Suggestion of
-adding signatures to allow user to specify "accumulator".
-]</i></p>
-<hr>
-<a name="542"><h3>542.&nbsp;shared_ptr observers</h3></a><p><b>Section:</b>&nbsp;TR1 2.2.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.obs"> [tr.util.smartptr.shared.obs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Oct 2005</p>
-<p>
-Peter Dimov wrote:
-To: C++ libraries mailing list
-Message c++std-lib-15614
-[...]
-The intent is for both use_count() and unique() to work in a threaded environment.
-They are intrinsically prone to race conditions, but they never return garbage.
-</p>
-
-<p>
-This is a crucial piece of information that I really wish were
-captured in the text. Having this in a non-normative note would
-have made everything crystal clear to me and probably stopped
-me from ever starting this discussion :) Instead, the sentence
-in p12 "use only for debugging and testing purposes, not for
-production code" very strongly suggests that implementations
-can and even are encouraged to return garbage (when threads
-are involved) for performance reasons.
-</p>
-<p>
-How about adding an informative note along these lines:
-</p>
-<blockquote>
- Note: Implementations are encouraged to provide well-defined
- behavior for use_count() and unique() even in the presence of
- multiple threads.
-</blockquote>
-<p>
-I don't necessarily insist on the exact wording, just that we
-capture the intent.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="543"><h3>543.&nbsp;valarray slice default constructor</h3></a><p><b>Section:</b>&nbsp;26.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.members"> [lib.complex.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;3 Nov 2005</p>
-<p>
-If one explicitly constructs a slice or glice with the default
-constructor, does the standard require this slice to have any usable
-state? It says "creates a slice which specifies no elements", which
-could be interpreted two ways:
-</p>
-<ol>
-<li>There are no elements to which the slice refers (i.e. undefined).</li>
-<li>The slice specifies an array with no elements in it (i.e. defined).</li>
-</ol>
-<p>
-Here is a bit of code to illustrate:
-</p>
-<blockquote><pre>#include &lt;iostream&gt;
-#include &lt;valarray&gt;
-
-int main()
-{
- std::valarray&lt;int&gt; v(10);
- std::valarray&lt;int&gt; v2 = v[std::slice()];
- std::cout &lt;&lt; "v[slice()].size() = " &lt;&lt; v2.size() &lt;&lt; '\n';
-}
-</pre></blockquote>
-
-<p>
-Is the behavior undefined? Or should the output be:
-</p>
-
-<blockquote>
-v[slice()].size() = 0
-</blockquote>
-
-<p>
-There is a similar question and wording for gslice at 26.3.6.1p1.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 26.5.4.1 [cons.slice]:
-</p>
-
-<blockquote>
-1 - <del>The default constructor for <tt>slice</tt> creates a <tt>slice</tt>
-which specifies no elements.</del> <ins>The default constructor is equivalent to
-<tt>slice(0, 0, 0)</tt>.</ins> A default constructor is provided only to permit
-the declaration of arrays of slices. The constructor with arguments for a slice
-takes a start, length, and stride parameter.
-</blockquote>
-
-<p>
-Change 26.3.6.1 [gslice.cons]:
-</p>
-
-<blockquote>
-1 - <del>The default constructor creates a <tt>gslice</tt> which specifies no
-elements.</del> <ins>The default constructor is equivalent to <tt>gslice(0,
-valarray&lt;size_t&gt;(), valarray&lt;size_t&gt;())</tt>.</ins> The constructor
-with arguments builds a <tt>gslice</tt> based on a specification of start,
-lengths, and strides, as explained in the previous section.
-</blockquote>
-
-<hr>
-<a name="545"><h3>545.&nbsp;When is a deleter deleted?</h3></a><p><b>Section:</b>&nbsp;TR1 2.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.dest"> [tr.util.smartptr.shared.dest]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;10 Jan 2006</p>
-<p>
-The description of ~shared_ptr doesn't say when the shared_ptr's deleter, if
-any, is destroyed. In principle there are two possibilities: it is destroyed
-unconditionally whenever ~shared_ptr is executed (which, from an implementation
-standpoint, means that the deleter is copied whenever the shared_ptr is copied),
-or it is destroyed immediately after the owned pointer is destroyed (which, from
-an implementation standpoint, means that the deleter object is shared between
-instances). We should say which it is.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add after the first sentence of [lib.util.smartptr.getdeleter]/1:
-</p>
-<blockquote>
-<p>
-The returned pointer remains valid as long as there exists a <tt>shared_ptr</tt> instance
-that owns <tt><i>d</i></tt>.
-</p>
-<p>
-[<i>Note:</i> it is unspecified whether the pointer remains valid longer than that.
-This can happen if the implementation doesn't destroy the deleter until all
-<tt>weak_ptr</tt> instances in the ownership group are destroyed. <i>-- end note</i>]
-</p>
-</blockquote>
-<hr>
-<a name="546"><h3>546.&nbsp;_Longlong and _ULonglong are integer types</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;10 Jan 2006</p>
-<p>
-The TR sneaks in two new integer types, _Longlong and _Ulonglong, in [tr.c99].
-The rest of the TR should use that type.&nbsp; I believe this affects two places.
-First, the random number requirements, 5.1.1/10-11, lists all of the types with
-which template parameters named IntType and UIntType may be instantiated.
-_Longlong (or "long long", assuming it is added to C++0x) should be added to the
-IntType list, and UIntType (again, or "unsigned long long") should be added to
-the UIntType list.&nbsp; Second, 6.3.2 lists the types for which hash&lt;&gt; is
-required to be instantiable. _Longlong and _Ulonglong should be added to that
-list, so that people may use long long as a hash key.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="547"><h3>547.&nbsp;division should be floating-point, not integer</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;10 Jan 2006</p>
-<p>
-Paragraph 10 describes how a variate generator uses numbers produced by an
-engine to pass to a generator. The sentence that concerns me is: "Otherwise, if
-the value for engine_value_type::result_type is true and the value for
-Distribution::input_type is false [i.e. if the engine produces integers and the
-engine wants floating-point values], then the numbers in s_eng are divided by
-engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the
-engine is producing integers, both the numerator and the denominator are
-integers and we'll be doing integer division, which I don't think is what we
-want. Shouldn't we be performing a conversion to a floating-point type first?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="548"><h3>548.&nbsp;May random_device block?</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.device"> [tr.rand.device]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;10 Jan 2006</p>
-<p>
-Class random_device "produces non-deterministic random numbers", using some
-external source of entropy. In most real-world systems, the amount of available
-entropy is limited. Suppose that entropy has been exhausted. What is an
-implementation permitted to do? In particular, is it permitted to block
-indefinitely until more random bits are available, or is the implementation
-required to detect failure immediately? This is not an academic question. On
-Linux a straightforward implementation would read from /dev/random, and "When
-the entropy pool is empty, reads to /dev/random will block until additional
-environmental noise is gathered." Programmers need to know whether random_device
-is permitted to (or possibly even required to?) behave the same way.
-</p>
-
-<p><i>[
-Berlin: Walter: N1932 considers this NAD. Does the standard specify whether std::cin
-may block?
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="550"><h3>550.&nbsp;What should the return type of pow(float,int) be?</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;12 Jan 2006</p>
-<p>
-Assuming we adopt the
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">C
-compatibility package from C99</a> what should be the return type of the
-following signature be:
-</p>
-<blockquote><pre>? pow(float, int);
-</pre></blockquote>
-<p>
-C++03 says that the return type should be <tt>float</tt>.
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
-TR1</a> and C90/99 say the return type should be <tt>double</tt>. This can put
-clients into a situation where C++03 provides answers that are not as high
-quality as C90/C99/TR1. For example:
-</p>
-<blockquote><pre>#include &lt;math.h&gt;
-
-int main()
-{
- float x = 2080703.375F;
- double y = pow(x, 2);
-}
-</pre></blockquote>
-<p>
-Assuming an IEEE 32 bit float and IEEE 64 bit double, C90/C99/TR1 all suggest:
-</p>
-
-<blockquote><pre>y = 4329326534736.390625
-</pre></blockquote>
-
-<p>
-which is exactly right. While C++98/C++03 demands:
-</p>
-
-<blockquote><pre>y = 4329326510080.
-</pre></blockquote>
-
-<p>
-which is only approximately right.
-</p>
-
-<p>
-I recommend that C++0X adopt the mixed mode arithmetic already adopted by
-Fortran, C and TR1 and make the return type of <tt>pow(float,int)</tt> be
-<tt>double</tt>.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="551"></a><h3><a name="551">551.&nbsp;&lt;ccomplex&gt;</a></h3><p><b>Section:</b>&nbsp;TR1 8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.ccmplx"> [tr.c99.ccmplx]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;23 Jan 2006</p>
-<p>
-Previously xxx.h was parsable by C++. But in the case of C99's &lt;complex.h&gt;
-it isn't. Otherwise we could model it just like &lt;string.h&gt;, &lt;cstring&gt;, &lt;string&gt;:
-</p>
-
-<ul>
-<li>&lt;string&gt; : C++ API in namespace std</li>
-<li>&lt;cstring&gt; : C API in namespace std</li>
-<li>&lt;string.h&gt; : C API in global namespace</li>
-</ul>
-
-<p>
-In the case of C's complex, the C API won't compile in C++. So we have:
-</p>
-
-<ul>
-<li>&lt;complex&gt; : C++ API in namespace std</li>
-<li>&lt;ccomplex&gt; : ?</li>
-<li>&lt;complex.h&gt; : ?</li>
-</ul>
-
-<p>
-The ? can't refer to the C API. TR1 currently says:
-</p>
-
-<ul>
-<li>&lt;complex&gt; : C++ API in namespace std</li>
-<li>&lt;ccomplex&gt; : C++ API in namespace std</li>
-<li>&lt;complex.h&gt; : C++ API in global namespace</li>
-</ul>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 26.3.11 [cmplxh]:
-</p>
-
-<blockquote>
-<p>
-The header behaves as if it includes the header
-<tt>&lt;ccomplex&gt;</tt><ins>.</ins><del>, and provides sufficient using
-declarations to declare in the global namespace all function and type names
-declared or defined in the neader <tt>&lt;complex&gt;</tt>.</del>
-<ins>[<i>Note:</i> <tt>&lt;complex.h&gt;</tt> does not promote any interface
-into the global namespace as there is no C interface to promote. <i>--end
-note</i>]</ins>
-</p>
-</blockquote>
-
-<hr>
-<a name="552"><h3>552.&nbsp;random_shuffle and its generator</h3></a><p><b>Section:</b>&nbsp;25.2.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.random.shuffle"> [lib.alg.random.shuffle]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;25 Jan 2006</p>
-<p>
-...is specified to shuffle its range by calling swap but not how
-(or even that) it's supposed to use the RandomNumberGenerator
-argument passed to it.
-</p>
-<p>
-Shouldn't we require that the generator object actually be used
-by the algorithm to obtain a series of random numbers and specify
-how many times its operator() should be invoked by the algorithm?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="553"><h3>553.&nbsp;very minor editorial change intptr_t / uintptr_t</h3></a><p><b>Section:</b>&nbsp;TR1 8.22.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cstdint.syn"> [tr.c99.cstdint.syn]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;30 Jan 2006</p>
-<p>
-In the synopsis, some types are identified as optional: int8_t, int16_t,
-and so on, consistently with C99, indeed.
-</p>
-<p>
-On the other hand, intptr_t and uintptr_t, are not marked as such and
-probably should, consistently with C99, 7.18.1.4.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="556"><h3>556.&nbsp;is Compare a BinaryPredicate?</h3></a><p><b>Section:</b>&nbsp;25.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.sorting"> [lib.alg.sorting]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Feb 2006</p>
-<p>
-In 25, p8 we allow BinaryPredicates to return a type that's convertible
-to bool but need not actually be bool. That allows predicates to return
-things like proxies and requires that implementations be careful about
-what kinds of expressions they use the result of the predicate in (e.g.,
-the expression in if (!pred(a, b)) need not be well-formed since the
-negation operator may be inaccessible or return a type that's not
-convertible to bool).
-</p>
-<p>
-Here's the text for reference:
-</p>
-<blockquote>
- ...if an algorithm takes BinaryPredicate binary_pred as its argument
- and first1 and first2 as its iterator arguments, it should work
- correctly in the construct if (binary_pred(*first1, first2)){...}.
-</blockquote>
-
-<p>
-In 25.3, p2 we require that the Compare function object return true
-of false, which would seem to preclude such proxies. The relevant text
-is here:
-</p>
-<blockquote>
- Compare is used as a function object which returns true if the first
- argument is less than the second, and false otherwise...
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-I think we could fix this by rewording 25.3, p2 to read somthing like:
-</p>
-<blockquote>
--2- <tt>Compare</tt> is <del>used as a function object which returns
-<tt>true</tt> if the first argument</del> <ins>a <tt>BinaryPredicate</tt>. The
-return value of the function call operator applied to an object of type
-<tt>Compare</tt>, when converted to type <tt>bool</tt>, yields <tt>true</tt>
-if the first argument of the call</ins> is less than the second, and
-<tt>false</tt> otherwise. <tt>Compare <i>comp</i></tt> is used throughout for
-algorithms assuming an ordering relation. It is assumed that <tt><i>comp</i></tt>
-will not apply any non-constant function through the dereferenced iterator.
-</blockquote>
-<hr>
-<a name="557"><h3>557.&nbsp;TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3></a><p><b>Section:</b>&nbsp;TR1 8.11.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cinttypes.syn"> [tr.c99.cinttypes.syn]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;6 Feb 2006</p>
-<p>
-I'm seeing a problem with such overloads: when, _Longlong == intmax_t ==
-long long we end up, essentially, with the same arguments and different
-return types (lldiv_t and imaxdiv_t, respectively). Similar issue with
-abs(_Longlong) and abs(intmax_t), of course.
-</p>
-<p>
-Comparing sections 8.25 and 8.11, I see an important difference,
-however: 8.25.3 and 8.25.4 carefully describe div and abs for _Longlong
-types (rightfully, because not moved over directly from C99), whereas
-there is no equivalent in 8.11: the abs and div overloads for intmax_t
-types appear only in the synopsis and are not described anywhere, in
-particular no mention in 8.11.2 (at variance with 8.25.2).
-</p>
-<p>
-I'm wondering whether we really, really, want div and abs for intmax_t...
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the <tt>&lt;cstdint&gt;</tt> synopsis in 8.11.1:
-</p>
-<blockquote><pre>...
-intmax_t imaxabs(intmax_t i);
-<del>intmax_t abs(intmax_t i);</del>
-
-imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
-<del>imaxdiv_t div(intmax_t numer, intmax_t denom);</del>
-...
-</pre></blockquote>
-
-<p><i>[
-Portland: no consensus.
-]</i></p>
-
-<hr>
-<a name="559"><h3>559.&nbsp;numeric_limits&lt;const T&gt;</h3></a><p><b>Section:</b>&nbsp;18.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.limits"> [lib.support.limits]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;19 Feb 2006</p>
- <p>
-
-18.2.1, p2 requires implementations to provide specializations of the
-<code>numeric_limits</code> template for each scalar type. While this
-could be interepreted to include cv-qualified forms of such types such
-an interepretation is not reflected in the synopsis of the
-<code>&lt;limits&gt;</code> header.
-
- </p>
- <p>
-
-The absence of specializations of the template on cv-qualified forms
-of fundamental types makes <code>numeric_limits</code> difficult to
-use in generic code where the constness (or volatility) of a type is
-not always immediately apparent. In such contexts, the primary
-template ends up being instantiated instead of the provided
-specialization, typically yielding unexpected behavior.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-Require that specializations of <code>numeric_limits</code> on
-cv-qualified fundamental types have the same semantics as those on the
-unqualifed forms of the same types.
-
- </p>
- <p>
-
-Add to the synopsis of the <code>&lt;limits&gt;</code> header,
-immediately below the declaration of the primary template, the
-following:
-
-</p><pre>
-template &lt;class T&gt; class numeric_limits&lt;const T&gt;;
-template &lt;class T&gt; class numeric_limits&lt;volatile T&gt;;
-template &lt;class T&gt; class numeric_limits&lt;const volatile T&gt;;
-
-</pre>
-
- <p></p>
- <p>
-
-Add a new paragraph to the end of 18.2.1.1, with the following
-text:
-
- </p>
- <p>
-
--new-para- The value of each member of a <code>numeric_limits</code>
-specialization on a cv-qualified T is equal to the value of the same
-member of <code>numeric_limits&lt;T&gt;</code>.
-
- </p>
-
-<p><i>[
-Portland: Martin will clarify that user-defined types get cv-specializations
-automatically.
-]</i></p>
-
-<hr>
-<a name="560"><h3>560.&nbsp;User-defined allocators without default constructor</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Sergey P. Derevyago&nbsp; <b>Date:</b>&nbsp;17 Feb 2006</p>
-<h4>1. The essence of the problem.</h4>
-<p>
-User-defined allocators without default constructor are not explicitly
-supported by the standard but they can be supported just like std::vector
-supports elements without default constructor.
-</p>
-<p>
-As a result, there exist implementations that work well with such allocators
-and implementations that don't.
-</p>
-
-<h4>2. The cause of the problem.</h4>
-<p>
-1) The standard doesn't explicitly state this intent but it should. In
-particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator
-instances that compare non-equal. So it can similarly state the intent w.r.t.
-the user-defined allocators without default constructor.
-</p>
-<p>
-2) Some container operations are obviously underspecified. In particular,
-21.3.7.1p2 tells:
-</p>
-<blockquote>
-<pre>template&lt;class charT, class traits, class Allocator&gt;
- basic_string&lt;charT,traits,Allocator&gt; operator+(
- const charT* lhs,
- const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs
- );
-</pre>
-Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs) + rhs</tt>.
-</blockquote>
-<p>
-That leads to the basic_string&lt;charT,traits,Allocator&gt;(lhs, Allocator()) call.
-Obviously, the right requirement is:
-</p>
-<blockquote>
-Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs, rhs.get_allocator()) + rhs</tt>.
-</blockquote>
-<p>
-It seems like a lot of DRs can be submitted on this "Absent call to
-get_allocator()" topic.
-</p>
-
-<h4>3. Proposed actions.</h4>
-<p>
-1) Explicitly state the intent to allow for user-defined allocators without
-default constructor in 20.1.5 Allocator requirements.
-</p>
-<p>
-2) Correct all the places, where a correct allocator object is available
-through the get_allocator() call but default Allocator() gets passed instead.
-</p>
-<h4>4. Code sample.</h4>
-<p>
-Let's suppose that the following memory pool is available:
-</p>
-<blockquote><pre>class mem_pool {
- // ...
- void* allocate(size_t size);
- void deallocate(void* ptr, size_t size);
-};
-</pre></blockquote>
-<p>
-So the following allocator can be implemented via this pool:
-</p>
-<blockquote><pre>class stl_allocator {
- mem_pool&amp; pool;
-
- public:
- explicit stl_allocator(mem_pool&amp; mp) : pool(mp) {}
- stl_allocator(const stl_allocator&amp; sa) : pool(sa.pool) {}
- template &lt;class U&gt;
- stl_allocator(const stl_allocator&lt;U&gt;&amp; sa) : pool(sa.get_pool()) {}
- ~stl_allocator() {}
-
- pointer allocate(size_type n, std::allocator&lt;void&gt;::const_pointer = 0)
- {
- return (n!=0) ? static_cast&lt;pointer&gt;(pool.allocate(n*sizeof(T))) : 0;
- }
-
- void deallocate(pointer p, size_type n)
- {
- if (n!=0) pool.deallocate(p, n*sizeof(T));
- }
-
- // ...
-};
-</pre></blockquote>
-<p>
-Then the following code works well on some implementations and doesn't work on
-another:
-</p>
-<blockquote><pre>typedef basic_string&lt;char, char_traits&lt;char&gt;, stl_allocator&lt;char&gt; &gt;
- tl_string;
-mem_pool mp;
-tl_string s1("abc", stl_allocator&lt;int&gt;(mp));
-printf("(%s)\n", ("def"+s1).c_str());
-</pre></blockquote>
-<p>
-In particular, on some implementations the code can't be compiled without
-default stl_allocator() constructor.
-</p>
-<p>
-The obvious way to solve the compile-time problems is to intentionally define
-a NULL pointer dereferencing default constructor
-</p>
-<blockquote><pre>stl_allocator() : pool(*static_cast&lt;mem_pool*&gt;(0)) {}
-</pre></blockquote>
-<p>
-in a hope that it will not be called. The problem is that it really gets
-called by operator+(const char*, const string&amp;) under the current 21.3.7.1p2
-wording.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="561"><h3>561.&nbsp;inserter overly generic</h3></a><p><b>Section:</b>&nbsp;24.4.2.6.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.inserter"> [lib.inserter]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;21 Feb 2006</p>
-<p>
-The declaration of <tt>std::inserter</tt> is:
-</p>
-
-<blockquote><pre>template &lt;class Container, class Iterator&gt;
-insert_iterator&lt;Container&gt;
-inserter(Container&amp; x, Iterator i);
-</pre></blockquote>
-
-<p>
-The template parameter <tt>Iterator</tt> in this function is completely unrelated
-to the template parameter <tt>Container</tt> when it doesn't need to be. This
-causes the code to be overly generic. That is, any type at all can be deduced
-as <tt>Iterator</tt>, whether or not it makes sense. Now the same is true of
-<tt>Container</tt>. However, for every free (unconstrained) template parameter
-one has in a signature, the opportunity for a mistaken binding grows geometrically.
-</p>
-
-<p>
-It would be much better if <tt>inserter</tt> had the following signature instead:
-</p>
-
-<blockquote><pre>template &lt;class Container&gt;
-insert_iterator&lt;Container&gt;
-inserter(Container&amp; x, typename Container::iterator i);
-</pre></blockquote>
-
-<p>
-Now there is only one free template parameter. And the second argument to
-<tt>inserter</tt> must be implicitly convertible to the container's iterator,
-else the call will not be a viable overload (allowing other functions in the
-overload set to take precedence). Furthermore, the first parameter must have a
-nested type named <tt>iterator</tt>, or again the binding to <tt>std::inserter</tt>
-is not viable. Contrast this with the current situation
-where any type can bind to <tt>Container</tt> or <tt>Iterator</tt> and those
-types need not be anything closely related to containers or iterators.
-</p>
-
-<p>
-This can adversely impact well written code. Consider:
-</p>
-
-<blockquote><pre>#include &lt;iterator&gt;
-#include &lt;string&gt;
-
-namespace my
-{
-
-template &lt;class String&gt;
-struct my_type {};
-
-struct my_container
-{
-template &lt;class String&gt;
-void push_back(const my_type&lt;String&gt;&amp;);
-};
-
-template &lt;class String&gt;
-void inserter(const my_type&lt;String&gt;&amp; m, my_container&amp; c) {c.push_back(m);}
-
-} // my
-
-int main()
-{
- my::my_container c;
- my::my_type&lt;std::string&gt; m;
- inserter(m, c);
-}
-</pre></blockquote>
-
-<p>
-Today this code fails because the call to <tt>inserter</tt> binds to
-<tt>std::inserter</tt> instead of to <tt>my::inserter</tt>. However with the
-proposed change <tt>std::inserter</tt> will no longer be a viable function which
-leaves only <tt>my::inserter</tt> in the overload resolution set. Everything
-works as the client intends.
-</p>
-
-<p>
-To make matters a little more insidious, the above example works today if you
-simply change the first argument to an rvalue:
-</p>
-
-<blockquote><pre> inserter(my::my_type(), c);
-</pre></blockquote>
-
-<p>
-It will also work if instantiated with some string type other than
-<tt>std::string</tt> (or any other <tt>std</tt> type). It will also work if
-<tt>&lt;iterator&gt;</tt> happens to not get included.
-</p>
-
-<p>
-And it will fail again for such inocuous reaons as <tt>my_type</tt> or
-<tt>my_container</tt> privately deriving from any <tt>std</tt> type.
-</p>
-
-<p>
-It seems unfortunate that such simple changes in the client's code can result
-in such radically differing behavior.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 24.2:
-</p>
-
-<blockquote>
-<b>24.2 Header</b> <tt>&lt;iterator&gt;</tt> <b>synopsis</b>
-<blockquote><pre>...
-template &lt;class Container<del>, class Iterator</del>&gt;
- insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Iterator</del> <ins>typename Container::iterator</ins> i);
-...
-</pre></blockquote>
-</blockquote>
-
-<p>
-Change 24.4.2.5:
-</p>
-
-<blockquote>
-<b>24.4.2.5 Class template</b> <tt>insert_iterator</tt>
-<blockquote><pre>...
-template &lt;class Container<del>, class Iterator</del>&gt;
- insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Iterator</del> <ins>typename Container::iterator</ins> i);
-...
-</pre></blockquote>
-</blockquote>
-
-<p>
-Change 24.4.2.6.5:
-</p>
-
-<blockquote>
-<p>
-<b>24.4.2.6.5</b> <tt>inserter</tt>
-</p>
-<pre>template &lt;class Container<del>, class Inserter</del>&gt;
- insert_iterator&lt;Container&gt; inserter(Container&amp; x, <del>Inserter</del> <ins>typename Container::iterator</ins> i);
-</pre>
-<blockquote>
--1- <i>Returns:</i> <tt>insert_iterator&lt;Container&gt;(x,<del>typename Container::iterator(</del>i<del>)</del>)</tt>.
-</blockquote>
-</blockquote>
-
-<hr>
-<a name="562"><h3>562.&nbsp;stringbuf ctor inefficient</h3></a><p><b>Section:</b>&nbsp;27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Feb 2006</p>
- <p>
-
-For better efficiency, the requirement on the stringbuf ctor that
-takes a string argument should be loosened up to let it set
-<code>epptr()</code> beyond just one past the last initialized
-character just like <code>overflow()</code> has been changed to be
-allowed to do (see issue 432). That way the first call to
-<code>sputc()</code> on an object won't necessarily cause a call to
-<code>overflow</code>. The corresponding change should be made to the
-string overload of the <code>str()</code> member function.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-Change 27.7.1.1, p3 of the Working Draft, N1804, as follows:
-
- </p>
-
-<blockquote>
-<pre>explicit basic_stringbuf(const basic_string&lt;charT,traits,Allocator&gt;&amp; <i>s<del>tr</del></i>,
- ios_base::openmode <i>which</i> = ios_base::in | ios_base::out);
-</pre>
-
-<p>
--3- <i>Effects:</i> Constructs an object of class <tt>basic_stringbuf</tt>,
-initializing the base class with <tt>basic_streambuf()</tt>
-(27.5.2.1), and initializing <tt><i>mode</i></tt> with <tt><i>which</i></tt>.
-Then <ins>calls <tt>str(<i>s</i>)</tt>.</ins> <del>copies the content of
-<i>str</i> into the <tt>basic_stringbuf</tt> underlying character
-sequence. If <tt><i>which</i> &amp; ios_base::out</tt> is true, initializes the
-output sequence such that <tt>pbase()</tt> points to the first underlying
-character, <tt>epptr()</tt> points one past the last underlying character, and
-<tt>pptr()</tt> is equal to <tt>epptr()</tt> if <tt><i>which</i> &amp; ios_base::ate</tt>
-is true, otherwise <tt>pptr()</tt> is equal to <tt>pbase()</tt>. If
-<tt>which &amp; ios_base::in</tt> is true, initializes the input sequence such
-that <tt>eback()</tt> and <tt>gptr()</tt> point to the first underlying
-character and <tt>egptr()</tt> points one past the last underlying character.</del>
-</p>
-</blockquote>
-
- <p>
-
-Change the Effects clause of the <code>str()</code> in 27.7.1.2, p2 to
-read:
-
- </p>
-<blockquote>
-<p>
--2- <i>Effects:</i> Copies the content<ins>s</ins> of <tt><i>s</i></tt> into the
-<tt>basic_stringbuf</tt> underlying character sequence <ins>and
-initializes the input and output sequences according to <tt><i>mode</i></tt></ins>.
-<del>If
-<tt><i>mode</i> &amp; ios_base::out</tt> is true, initializes the output
-sequence such that <tt>pbase()</tt> points to the first underlying character,
-<tt>epptr()</tt> points one past the last underlying character, and <tt>pptr()</tt>
-is equal to <tt>epptr()</tt> if <tt><i>mode</i> &amp; ios_base::in</tt>
-is true, otherwise <tt>pptr()</tt> is equal to <tt>pbase()</tt>. If
-<tt>mode &amp; ios_base::in</tt> is true, initializes the input sequence
-such that <tt>eback()</tt> and <tt>gptr()</tt> point to the first underlying
-character and <tt>egptr()</tt> points one past the last underlying character.</del>
-</p>
-
- <p>
-
-<ins>-3- <i>Postconditions:</i> If <code>mode &amp; ios_base::out</code> is true,
-<code>pbase()</code> points to the first underlying character and
-<code>(epptr() &gt;= pbase() + s.size())</code> holds; in addition, if
-<code>mode &amp; ios_base::in</code> is true, <code>(pptr() == pbase()
-+ s.data())</code> holds, otherwise <code>(pptr() == pbase())</code>
-is true. If <code>mode &amp; ios_base::in</code> is true,
-<code>eback()</code> points to the first underlying character, and
-<code>(gptr() == eback())</code> and <code>(egptr() == eback() +
-s.size())</code> hold.</ins>
-
- </p>
-</blockquote>
-<hr>
-<a name="563"><h3>563.&nbsp;stringbuf seeking from end</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Feb 2006</p>
-<p>
-According to Table 92 (unchanged by issue 432), when <code>(way ==
-end)</code> the <code>newoff</code> value in out mode is computed as
-the difference between <code>epptr()</code> and <code>pbase()</code>.
-</p>
- <p>
-
-This value isn't meaningful unless the value of <code>epptr()</code>
-can be precisely controlled by a program. That used to be possible
-until we accepted the resolution of issue 432, but since then the
-requirements on <code>overflow()</code> have been relaxed to allow it
-to make more than 1 write position available (i.e., by setting
-<code>epptr()</code> to some unspecified value past
-<code>pptr()</code>). So after the first call to
-<code>overflow()</code> positioning the output sequence relative to
-end will have unspecified results.
-
- </p>
- <p>
-
-In addition, in <code>in|out</code> mode, since <code>(egptr() ==
-epptr())</code> need not hold, there are two different possible values
-for <code>newoff</code>: <code>epptr() - pbase()</code> and
-<code>egptr() - eback()</code>.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-Change the <code>newoff</code> column in the last row of Table 94 to
-read:
-
- </p>
-<blockquote>
-
-the <del>end</del> <ins>high mark</ins> pointer minus the beginning
-pointer (<code><del>xend</del> <ins>high_mark</ins> - xbeg</code>).
-
-</blockquote>
-<hr>
-<a name="564"><h3>564.&nbsp;stringbuf seekpos underspecified</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Feb 2006</p>
-<p>
-The effects of the <code>seekpos()</code> member function of
-<code>basic_stringbuf</code> simply say that the function positions
-the input and/or output sequences but fail to spell out exactly
-how. This is in contrast to the detail in which <code>seekoff()</code>
-is described.
-</p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-Change 27.7.1.3, p13 to read:
-
- </p>
-<blockquote>
-<p>
--13- <i>Effects:</i> <ins>Same as <tt>seekoff(off_type(<i>sp</i>), ios_base::beg,
-<i>which</i>)</tt>.</ins> <del>Alters the stream position within the controlled sequences,
-if possible, to correspond to the stream position stored in <tt><i>sp</i></tt>
-(as described below).</del>
-</p>
-<ul>
-<li><del>If <tt>(<i>which</i> &amp; ios_base::in) != 0</tt>, positions the input sequence.</del></li>
-<li><del>If <tt>(<i>which</i> &amp; ios_base::out) != 0</tt>, positions the output sequence.</del></li>
-<li><del>If <tt><i>sp</i></tt> is an invalid stream position, or if the function
-positions neither sequence, the positioning operation fails. If <tt><i>sp</i></tt>
-has not been obtained by a previous successful call to one of the positioning
-functions (<tt>seekoff</tt>, <tt>seekpos</tt>, <tt>tellg</tt>, <tt>tellp</tt>)
-the effect is undefined.</del></li>
-</ul>
-</blockquote>
-<hr>
-<a name="565"><h3>565.&nbsp;xsputn inefficient</h3></a><p><b>Section:</b>&nbsp;27.5.2.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.put"> [lib.streambuf.virt.put]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Feb 2006</p>
- <p>
-
-<tt>streambuf::xsputn()</tt> is specified to have the effect of
-"writing up to <tt>n</tt> characters to the output sequence as if by
-repeated calls to <tt>sputc(c)</tt>."
-
- </p>
- <p>
-
-Since <tt>sputc()</tt> is required to call <tt>overflow()</tt> when
-<tt>(pptr() == epptr())</tt> is true, strictly speaking
-<tt>xsputn()</tt> should do the same. However, doing so would be
-suboptimal in some interesting cases, such as in unbuffered mode or
-when the buffer is <tt>basic_stringbuf</tt>.
-
- </p>
- <p>
-
-Assuming calling <tt>overflow()</tt> is not really intended to be
-required and the wording is simply meant to describe the general
-effect of appending to the end of the sequence it would be worthwhile
-to mention in <tt>xsputn()</tt> that the function is not actually
-required to cause a call to <tt>overflow()</tt>.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-Add the following sentence to the <tt>xsputn()</tt> Effects clause in
-27.5.2.4.5, p1 (N1804):
-
- </p>
- <blockquote>
- <p>
--1- <i>Effects:</i> Writes up to <tt><i>n</i></tt> characters to the output
-sequence as if by repeated calls to <tt>sputc(<i>c</i>)</tt>. The characters
-written are obtained from successive elements of the array whose first element
-is designated by <tt><i>s</i></tt>. Writing stops when either <tt><i>n</i></tt>
-characters have been written or a call to <tt>sputc(<i>c</i>)</tt> would return
-<tt>traits::eof()</tt>. <ins>It is uspecified whether the function calls
-<tt>overflow()</tt> when <tt>(pptr() == epptr())</tt> becomes true or whether
-it achieves the same effects by other means.</ins>
- </p>
- </blockquote>
- <p>
-
-In addition, I suggest to add a footnote to this function with the
-same text as Footnote 292 to make it extra clear that derived classes
-are permitted to override <tt>xsputn()</tt> for efficiency.
-
- </p>
-<hr>
-<a name="566"><h3>566.&nbsp;array forms of unformatted input function undefined for zero-element arrays</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;23 Feb 2006</p>
- <p>
-
-The array forms of unformatted input functions don't have well-defined
-semantics for zero-element arrays in a couple of cases. The affected
-ones (<tt>istream::get()</tt> and <tt>getline()</tt>) are supposed to
-terminate when <tt>(n - 1)</tt> characters are stored, which obviously
-can never be true when <tt>(n == 0)</tt> to start with.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-I propose the following changes (references are relative to the
-Working Draft (document N1804).
-
- </p>
- <p>
-
-Change 27.6.1.3, p8 (<tt>istream::get()</tt>), bullet 1 as follows:
-
- </p>
- <blockquote>
- <p>
-
-<ins>if <tt>(n &lt; 1)</tt> is true or </ins> <tt>(n - 1)</tt>
-characters are stored;
-
- </p>
- </blockquote>
- <p>
-
-Similarly, change 27.6.1.3, p18 (<tt>istream::getline()</tt>), bullet
-3 as follows:
-
- </p>
- <blockquote>
- <p>
-
-<ins><tt>(n &lt; 1)</tt> is true or </ins><tt>(n - 1)</tt> characters
-are stored (in which case the function calls
-<tt>setstate(failbit)</tt>).
-
- </p>
- </blockquote>
- <p>
-
-Finally, change p21 as follows:
-
- </p>
- <blockquote>
- <p>
-
-In any case, <ins>provided <tt>(n &gt; 0)</tt> is true, </ins>it then
-stores a null character (using charT()) into the next successive
-location of the array.
-
- </p>
- </blockquote>
-<hr>
-<a name="567"><h3>567.&nbsp;streambuf inserter and extractor should be unformatted</h3></a><p><b>Section:</b>&nbsp;27.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.format"> [lib.iostream.format]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;25 Feb 2006</p>
- <p>
-
-Issue 60 explicitly made the extractor and inserter operators that
-take a <tt>basic_streambuf*</tt> argument formatted input and output
-functions, respectively. I believe that's wrong, certainly in the
-case of the extractor, since formatted functions begin by extracting
-and discarding whitespace. The extractor should not discard any
-characters.
-
- </p>
-<p><b>Proposed resolution:</b></p>
- <p>
-
-I propose to change each operator to behave as unformatted input and
-output function, respectively. The changes below are relative to the
-working draft document number N1804.
-
- </p>
- <p>
-
-Specifically, change 27.6.1.2.3, p14 as follows:
-
- </p>
-
- <p>
- </p><blockquote>
-
-<i>Effects</i>: Behaves as a<ins>n un</ins>formatted input function
-(as described in <del>27.6.1.2.1</del><ins>27.6.1.3, paragraph
-1</ins>).
-
- </blockquote>
- <p></p>
- <p>
-
-And change 27.6.2.5.3, p7 as follows:
-
- </p>
-
- <p>
- </p><blockquote>
-
-<i>Effects</i>: Behaves as a<ins>n un</ins>formatted output function
-(as described in <del>27.6.2.5.1</del><ins>27.6.2.6, paragraph
-1</ins>).
-
- </blockquote>
- <p></p>
-<hr>
-<a name="568"><h3>568.&nbsp;log2 overloads missing</h3></a><p><b>Section:</b>&nbsp;TR1 8.16.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cmath.over"> [tr.c99.cmath.over]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;7 Mar 2006</p>
-<p>
-<tt>log2</tt> is missing from the list of "additional overloads" in 8.16.4p1.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add <tt>log2</tt> to the list of functions in 8.16.4p1.
-</p>
-<hr>
-<a name="570"><h3>570.&nbsp;Request adding additional explicit specializations of char_traits</h3></a><p><b>Section:</b>&nbsp;21.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits"> [lib.char.traits]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Jack Reeves&nbsp; <b>Date:</b>&nbsp;6 Apr 2006</p>
-<p>
-Currently, the Standard Library specifies only a declaration for template class
-char_traits&lt;&gt; and requires the implementation provide two explicit
-specializations: char_traits&lt;char&gt; and char_traits&lt;wchar_t&gt;. I feel the Standard
-should require explicit specializations for all built-in character types, i.e.
-char, wchar_t, unsigned char, and signed char.
-</p>
-<p>
-I have put together a paper (N1985) that describes this in more detail and
-includes all the necessary wording.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="571"><h3>571.&nbsp;Update C90 references to C99?</h3></a><p><b>Section:</b>&nbsp;1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.refs"> [intro.refs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;8 Apr 2006</p>
-<p>
-1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC
-9899:1990, Programming languages - C. Should that be changed to ISO/IEC
-9899:1999?
-</p>
-<p>
-What impact does this have on the library?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 1.2/1 [intro.refs] of the WP, change:
-</p>
-<blockquote>
-<ul>
-<li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i>
-</li>
-</ul>
-</blockquote>
-
-<hr>
-<a name="572"><h3>572.&nbsp;Oops, we gave 507 WP status</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;11 Apr 2006</p>
-<p>
-In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot:
-variate_generator has been eliminated. Then in full committee we voted to give
-this issue WP status (mistakenly).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Strike the proposed resolution of issue 507.
-</p>
-<p><i>[
-post-Portland: Howard recommends NAD. The proposed resolution of 507 no longer
-exists in the current WD.
-]</i></p>
-<hr>
-<a name="573"><h3>573.&nbsp;C++0x file positioning should handle modern file sizes</h3></a><p><b>Section:</b>&nbsp;27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;12 Apr 2006</p>
-<p>
-There are two deficiencies related to file sizes:
-</p>
-<ol>
-<li>It doesn't appear that the Standard Library is specified in
- a way that handles modern file sizes, which are often too
- large to be represented by an unsigned long.</li>
-
-<li>The std::fpos class does not currently have the ability to
- set/get file positions.</li>
-</ol>
-<p>
-The Dinkumware implementation of the Standard Library as shipped with the Microsoft compiler copes with these issues by:
-</p>
-<ol type="A">
-<li>Defining fpos_t be long long, which is large enough to
- represent any file position likely in the foreseeable future.</li>
-
-<li>Adding member functions to class fpos. For example,
-<blockquote><pre>fpos_t seekpos() const;
-</pre></blockquote>
-</li>
-</ol>
-<p>
-Because there are so many types relating to file positions and offsets (fpos_t,
-fpos, pos_type, off_type, streamoff, streamsize, streampos, wstreampos, and
-perhaps more), it is difficult to know if the Dinkumware extensions are
-sufficient. But they seem a useful starting place for discussions, and they do
-represent existing practice.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="574"><h3>574.&nbsp;DR 369 Contradicts Text</h3></a><p><b>Section:</b>&nbsp;27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;18 Apr 2006</p>
-<p>
-lib.iostream.objects requires that the standard stream objects are never
-destroyed, and it requires that they be destroyed.
-</p>
-<p>
-DR 369 adds words to say that we really mean for ios_base::Init objects to force
-construction of standard stream objects. It ends, though, with the phrase "these
-stream objects shall be destroyed after the destruction of dynamically ...".
-However, the rule for destruction is stated in the standard: "The objects are
-not destroyed during program execution."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="575"><h3>575.&nbsp;the specification of ~shared_ptr is MT-unfriendly, makes implementation assumptions</h3></a><p><b>Section:</b>&nbsp;20.6.6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.util.smartptr.shared.dest"> [lib.util.smartptr.shared.dest]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;23 Apr 2006</p>
-<p>
-[tr.util.smartptr.shared.dest] says in its second bullet:
-</p>
-
-<p>
-"If *this shares ownership with another shared_ptr instance (use_count() &gt; 1),
-decrements that instance's use count."
-</p>
-
-<p>
-The problem with this formulation is that it presupposes the existence of an
-"use count" variable that can be decremented and that is part of the state of a
-shared_ptr instance (because of the "that instance's use count".)
-</p>
-
-<p>
-This is contrary to the spirit of the rest of the specification that carefully
-avoids to require an use count variable. Instead, use_count() is specified to
-return a value, a number of instances.
-</p>
-
-<p>
-In multithreaded code, the usual implicit assumption is that a shared variable
-should not be accessed by more than one thread without explicit synchronization,
-and by introducing the concept of an "use count" variable, the current wording
-implies that two shared_ptr instances that share ownership cannot be destroyed
-simultaneously.
-</p>
-
-<p>
-In addition, if we allow the interpretation that an use count variable is part
-of shared_ptr's state, this would lead to other undesirable consequences WRT
-multiple threads. For example,
-</p>
-
-<blockquote><pre>p1 = p2;
-</pre></blockquote>
-
-<p>
-would now visibly modify the state of p2, a "write" operation, requiring a lock.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the first two bullets of [lib.util.smartptr.shared.dest]/1 to:
-</p>
-
-<blockquote><p>
-</p><ul>
-<li>If <tt>*this</tt> is <i>empty</i> <ins>or shares ownership with another
-<tt>shared_ptr</tt> instance (<tt>use_count() &gt; 1</tt>)</ins>, there are no side effects.</li>
-<li><del>If <tt>*this</tt> <i>shares ownership</i> with another <tt>shared_ptr</tt> instance
-(<tt>use_count() &gt; 1</tt>), decrements that instance's use count.</del></li>
-</ul>
-<p></p></blockquote>
-
-<p>
-Add the following paragraph after [lib.util.smartptr.shared.dest]/1:
-</p>
-
-<blockquote><p>
-[<i>Note:</i> since the destruction of <tt>*this</tt> decreases the number of instances in
-<tt>*this</tt>'s ownership group by one, all <tt>shared_ptr</tt> instances that share ownership
-with <tt>*this</tt> will report an <tt>use_count()</tt> that is one lower than its previous value
-after <tt>*this</tt> is destroyed. <i>--end note</i>]
-</p></blockquote>
-<hr>
-<a name="576"><h3>576.&nbsp;find_first_of is overconstrained</h3></a><p><b>Section:</b>&nbsp;25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Doug Gregor&nbsp; <b>Date:</b>&nbsp;25 Apr 2006</p>
-<p>
-In 25.1.4 Find First [lib.alg.find.first], the two iterator type parameters to
-find_first_of are specified to require Forward Iterators, as follows:
-</p>
-
-<blockquote><pre>template&lt;class ForwardIterator1, class ForwardIterator2&gt;
- ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-template&lt;class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate&gt;
-ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-</pre></blockquote>
-
-<p>
-However, ForwardIterator1 need not actually be a Forward Iterator; an Input
-Iterator suffices, because we do not need the multi-pass property of the Forward
-Iterator or a true reference.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the declarations of <tt>find_first_of</tt> to:
-</p>
-
-<blockquote><pre>template&lt;class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2&gt;
- <del>ForwardIterator1</del><ins>InputIterator1</ins>
- find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-template&lt;class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2,
- class BinaryPredicate&gt;
-<del>ForwardIterator1</del><ins>InputIterator1</ins>
- find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-</pre></blockquote>
-
-<hr>
-<a name="577"><h3>577.&nbsp;upper_bound(first, last, ...) cannot return last</h3></a><p><b>Section:</b>&nbsp;25.3.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.upper.bound"> [lib.upper.bound]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Seungbeom Kim&nbsp; <b>Date:</b>&nbsp;3 May 2006</p>
-<p>
-ISO/IEC 14882:2003 says:
-</p>
-
-<blockquote>
-<p>
-25.3.3.2 upper_bound
-</p>
-<p>
-<i>Returns:</i> The furthermost iterator <tt>i</tt> in the range
-<tt>[<i>first</i>, <i>last</i>)</tt> such that
-for any iterator <tt>j</tt> in the range <tt>[<i>first</i>, i)</tt> the following corresponding
-conditions hold: <tt>!(value &lt; *j)</tt> or <tt><i>comp</i>(<i>value</i>, *j) == false</tt>.
-</p>
-</blockquote>
-
-<p>
-From the description above, upper_bound cannot return last, since it's
-not in the interval [first, last). This seems to be a typo, because if
-value is greater than or equal to any other values in the range, or if
-the range is empty, returning last seems to be the intended behaviour.
-The corresponding interval for lower_bound is also [first, last].
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change [lib.upper.bound]:
-</p>
-
-<blockquote>
-<p>
-<i>Returns:</i> The furthermost iterator <tt>i</tt> in the range
-<tt>[<i>first</i>, <i>last</i><del>)</del><ins>]</ins></tt> such that
-for any iterator <tt>j</tt> in the range <tt>[<i>first</i>, i)</tt> the following corresponding
-conditions hold: <tt>!(value &lt; *j)</tt> or <tt><i>comp</i>(<i>value</i>, *j) == false</tt>.
-</p>
-</blockquote>
-
-<hr>
-<a name="578"><h3>578.&nbsp;purpose of hint to allocator::allocate()</h3></a><p><b>Section:</b>&nbsp;20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;17 May 2006</p>
- <p>
-
-The description of the allocator member function
-<code>allocate()</code> requires that the <i>hint</i> argument be
-either 0 or a value previously returned from <code>allocate()</code>.
-Footnote 227 further suggests that containers may pass the address of
-an adjacent element as this argument.
-
- </p>
- <p>
-
-I believe that either the footnote is wrong or the normative
-requirement that the argument be a value previously returned from a
-call to <code>allocate()</code> is wrong. The latter is supported by
-the resolution to issue 20-004 proposed in c++std-lib-3736 by Nathan
-Myers. In addition, the <i>hint</i> is an ordinary void* and not the
-<code>pointer</code> type returned by <code>allocate()</code>, with
-the two types potentially being incompatible and the requirement
-impossible to satisfy.
-
- </p>
- <p>
-
-See also c++std-lib-14323 for some more context on where this came up
-(again).
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-Remove the requirement in 20.6.1.1, p4 that the hint be a value
-previously returned from <code>allocate()</code>. Specifically, change
-the paragraph as follows:
-
- </p>
- <p>
-
-<i>Requires</i>: <i>hint</i> <ins>is </ins>either 0 or <del>previously
-obtained from member <code>allocate</code> and not yet passed to
-member <code>deallocate</code></del><ins> the address of a byte in
-memory (1.7)</ins>.
-
- </p>
- <hr>
-<a name="579"><h3>579.&nbsp;erase(iterator) for unordered containers should not return an iterator</h3></a><p><b>Section:</b>&nbsp;23.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.unord.req"> [lib.unord.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Joaquín M López Muñoz&nbsp; <b>Date:</b>&nbsp;13 Jun 2006</p>
-<p>
-See
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
-for full discussion.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Option 1:
-</p>
-
-<p>
-The problem can be eliminated by omitting the requirement that <tt>a.erase(q)</tt> return an
-iterator. This is, however, in contrast with the equivalent requirements for other
-standard containers.
-</p>
-
-<p>
-Option 2:
-</p>
-
-<p>
-<tt>a.erase(q)</tt> can be made to compute the next iterator only when explicitly requested:
-the technique consists in returning a proxy object implicitly convertible to <tt>iterator</tt>, so
-that
-</p>
-
-<blockquote><pre>iterator q1=a.erase(q);
-</pre></blockquote>
-
-<p>
-works as expected, while
-</p>
-
-<blockquote><pre>a.erase(q);
-</pre></blockquote>
-
-<p>
-does not ever invoke the conversion-to-iterator operator, thus avoiding the associated
-computation. To allow this technique, some sections of TR1 along the line "return value
-is an iterator..." should be changed to "return value is an unspecified object implicitly
-convertible to an iterator..." Although this trick is expected to work transparently, it can
-have some collateral effects when the expression <tt>a.erase(q)</tt> is used inside generic
-code.
-</p>
-
-<hr>
-<a name="580"><h3>580.&nbsp;unused allocator members</h3></a><p><b>Section:</b>&nbsp;20.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.requirements"> [lib.allocator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;14 June 2006</p>
- <p>
-
-C++ Standard Library templates that take an allocator as an argument
-are required to call the <code>allocate()</code> and
-<code>deallocate()</code> members of the allocator object to obtain
-storage. However, they do not appear to be required to call any other
-allocator members such as <code>construct()</code>,
-<code>destroy()</code>, <code>address()</code>, and
-<code>max_size()</code>. This makes these allocator members less than
-useful in portable programs.
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-It's unclear to me whether the absence of the requirement to use these
-allocator members is an unintentional omission or a deliberate
-choice. However, since the functions exist in the standard allocator
-and since they are required to be provided by any user-defined
-allocator I believe the standard ought to be clarified to explictly
-specify whether programs should or should not be able to rely on
-standard containers calling the functions.
-
- </p>
- <p>
-
-I propose that all containers be required to make use of these
-functions.
-
- </p>
- <hr>
-<a name="581"><h3>581.&nbsp;<code>flush()</code> not unformatted function</h3></a><p><b>Section:</b>&nbsp;27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;14 June 2006</p>
- <p>
-
-The resolution of issue 60 changed <code>basic_ostream::flush()</code>
-so as not to require it to behave as an unformatted output function.
-That has at least two in my opinion problematic consequences:
-
- </p>
- <p>
-
-First, <code>flush()</code> now calls <code>rdbuf()-&gt;pubsync()</code>
-unconditionally, without regard to the state of the stream. I can't
-think of any reason why <code>flush()</code> should behave differently
-from the vast majority of stream functions in this respect.
-
- </p>
- <p>
-
-Second, <code>flush()</code> is not required to catch exceptions from
-<code>pubsync()</code> or set <code>badbit</code> in response to such
-events. That doesn't seem right either, as most other stream functions
-do so.
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-I propose to revert the resolution of issue 60 with respect to
-<code>flush()</code>. Specifically, I propose to change 27.6.2.6, p7
-as follows:
-
- </p>
-
-Effects: <ins>Behaves as an unformatted output function (as described
-in 27.6.2.6, paragraph 1). </ins>If <code>rdbuf()</code> is not a null
-pointer, <ins>constructs a sentry object. If this object returns
-<code>true</code> when converted to a value of type bool the function
-</ins>calls <code>rdbuf()-&gt;pubsync()</code>. If that function returns
--1 calls <code>setstate(badbit)</code> (which may throw
-<code>ios_base::failure</code> (27.4.4.3)). <ins>Otherwise, if the
-sentry object returns <code>false</code>, does nothing.</ins><del>Does
-not behave as an unformatted output function (as described in
-27.6.2.6, paragraph 1).</del>
-
- <hr>
-<a name="582"><h3>582.&nbsp;specialized algorithms and volatile storage</h3></a><p><b>Section:</b>&nbsp;20.6.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.uninitialized.copy"> [lib.uninitialized.copy]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;14 June 2006</p>
- <p>
-
-The specialized algorithms [lib.specialized.algorithms] are specified
-as having the general effect of invoking the following expression:
-
- </p>
- <p>
- </p><pre>
-new (static_cast&lt;void*&gt;(&amp;*i))
- typename iterator_traits&lt;ForwardIterator&gt;::value_type (x)
-
- </pre>
- <p></p>
- <p>
-
-This expression is ill-formed when the type of the subexpression
-<code>&amp;*i</code> is some volatile-qualified <code>T</code>.
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-In order to allow these algorithms to operate on volatile storage I
-propose to change the expression so as to make it well-formed even for
-pointers to volatile types. Specifically, I propose the following
-changes to clauses 20 and 24. Change 20.6.4.1, p1 to read:
-
- </p>
- <p>
- </p><pre>
-<i>Effects</i>:
-
-typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
-typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
-
-for (; first != last; ++result, ++first)
- new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*result))
- value_type (*first);
-
- </pre>
- <p></p>
- <p>
-
-change 20.6.4.2, p1 to read
-
- </p>
- <p>
- </p><pre>
-<i>Effects</i>:
-
-typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
-typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
-
-for (; first != last; ++result, ++first)
- new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*first))
- value_type (*x);
-
- </pre>
- <p></p>
- <p>
-
-and change 20.6.4.3, p1 to read
-
- </p>
- <p>
- </p><pre>
-<i>Effects</i>:
-
-typedef typename iterator_traits&lt;ForwardIterator&gt;::pointer pointer;
-typedef typename iterator_traits&lt;ForwardIterator&gt;::value_type value_type;
-
-for (; n--; ++first)
- new (static_cast&lt;void*&gt;(const_cast&lt;pointer&gt;(&amp;*first))
- value_type (*x);
-
- </pre>
- <p></p>
- <p>
-
-In addition, since there is no partial specialization for
-<code>iterator_traits&lt;volatile T*&gt;</code> I propose to add one
-to parallel such specialization for &lt;const T*&gt;. Specifically, I
-propose to add the following text to the end of 24.3.1, p3:
-
- </p>
- <p>
-
-and for pointers to volatile as
-
- </p>
- <p>
- </p><pre>
-namespace std {
-template&lt;class T&gt; struct iterator_traits&lt;volatile T*&gt; {
-typedef ptrdiff_t difference_type;
-typedef T value_type;
-typedef volatile T* pointer;
-typedef volatile T&amp; reference;
-typedef random_access_iterator_tag iterator_category;
-};
-}
-
- </pre>
- <p></p>
- <p>
-
-Note that the change to <code>iterator_traits</code> isn't necessary
-in order to implement the specialized algorithms in a way that allows
-them to operate on volatile strorage. It is only necesassary in order
-to specify their effects in terms of <code>iterator_traits</code> as
-is done here. Implementations can (and some do) achieve the same
-effect by means of function template overloading.
-
- </p>
- <hr>
-<a name="583"><h3>583.&nbsp;div() for unsigned integral types</h3></a><p><b>Section:</b>&nbsp;26.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.c.math"> [lib.c.math]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;15 Jun 2006</p>
-<p>
-There is no div() function for unsigned integer types.
-</p>
-<p>
-There are several possible resolutions. The simplest one is noted below. Other
-possibilities include a templated solution.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add to 26.7 [lib.c.math] paragraph 8:
-</p>
-
-<blockquote><pre>struct udiv_t div(unsigned, unsigned);
-struct uldiv_t div(unsigned long, unsigned long);
-struct ulldiv_t div(unsigned long long, unsigned long long);
-</pre></blockquote>
-
-<hr>
-<a name="584"><h3>584.&nbsp;missing int pow(int,int) functionality</h3></a><p><b>Section:</b>&nbsp;26.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.c.math"> [lib.c.math]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;15 Jun 2006</p>
-<p>
-There is no pow() function for any integral type.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add something like:
-</p>
-
-<blockquote><pre>template&lt; typename T&gt;
-T power( T x, int n );
-// requires: n &gt;=0
-</pre></blockquote>
-<hr>
-<a name="585"><h3>585.&nbsp;facet error reporting</h3></a><p><b>Section:</b>&nbsp;22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor, Paolo Carlini&nbsp; <b>Date:</b>&nbsp;22 June 2006</p>
- <p>
-
-Section 22.2, paragraph 2 requires facet <code>get()</code> members
-that take an <code>ios_base::iostate&amp;</code> argument,
-<code><i>err</i></code>, to ignore the (initial) value of the
-argument, but to set it to <code>ios_base::failbit</code> in case of a
-parse error.
-
- </p>
- <p>
-
-We believe there are a few minor problems with this blanket
-requirement in conjunction with the wording specific to each
-<code>get()</code> member function.
-
- </p>
- <p>
-
-First, besides <code>get()</code> there are other member functions
-with a slightly different name (for example,
-<code>get_date()</code>). It's not completely clear that the intent of
-the paragraph is to include those as well, and at least one
-implementation has interpreted the requirement literally.
-
- </p>
- <p>
-
-Second, the requirement to "set the argument to
-<code>ios_base::failbit</code> suggests that the functions are not
-permitted to set it to any other value (such as
-<code>ios_base::eofbit</code>, or even <code>ios_base::eofbit |
-ios_base::failbit</code>).
-
- </p>
- <p>
-
-However, 22.2.2.1.2, p5 (Stage 3 of <code>num_get</code> parsing) and
-p6 (<code>bool</code> parsing) specifies that the <code>do_get</code>
-functions perform <code><i>err</i> |= ios_base::eofbit</code>, which
-contradicts the earlier requirement to ignore <i>err</i>'s initial
-value.
-
- </p>
- <p>
-
-22.2.6.1.2, p1 (the Effects clause of the <code>money_get</code>
-facet's <code>do_get</code> member functions) also specifies that
-<code><i>err</i></code>'s initial value be used to compute the final
-value by ORing it with either <code>ios_base::failbit</code> or
-with<code>ios_base::eofbit | ios_base::failbit</code>.
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-We believe the intent is for all facet member functions that take an
-<code>ios_base::iostate&amp;</code> argument to:
-
- </p>
- <p>
- </p><ul>
- <li>
-
-ignore the initial value of the <code><i>err</i></code> argument,
-
- </li>
- <li>
-
-reset <code><i>err</i></code> to <code>ios_base::goodbit</code> prior
-to any further processing,
-
- </li>
- <li>
-
-and set either <code>ios_base::eofbit</code>, or
-<code>ios_base::failbit</code>, or both in <code><i>err</i></code>, as
-appropriate, in response to reaching the end-of-file or on parse
-error, or both.
-
- </li>
- </ul>
- <p></p>
- <p>
-
-To that effect we propose to change 22.2, p2 as follows:
-
- </p>
- <p>
-
-The <i>put</i><del>()</del> members make no provision for error
-reporting. (Any failures of the OutputIterator argument must be
-extracted from the returned iterator.) <ins>Unless otherwise
-specified, </ins>the <i>get</i><del>()</del> members <ins>that</ins>
-take an <code>ios_base::iostate&amp;</code> argument <del>whose value
-they ignore, but set to ios_base::failbit in case of a parse
-error.</del><ins>, <code><i>err</i></code>, start by evaluating
-<code>err = ios_base::goodbit</code>, and may subsequently set
-<i>err</i> to either <code>ios_base::eofbit</code>, or
-<code>ios_base::failbit</code>, or <code>ios_base::eofbit |
-ios_base::failbit</code> in response to reaching the end-of-file or in
-case of a parse error, or both, respectively.</ins>
-
- </p>
- <hr>
-<a name="586"><h3>586.&nbsp;string inserter not a formatted function</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;22 June 2006</p>
- <p>
-
-Section and paragraph numbers in this paper are relative to the
-working draft document number N2009 from 4/21/2006.
-
- </p>
-
- <p>
-
-The <code>basic_string</code> extractor in 21.3.7.9, p1 is clearly
-required to behave as a formatted input function, as is the
-<code>std::getline()</code> overload for string described in p7.
-
- </p>
- <p>
-
-However, the <code>basic_string</code> inserter described in p5 of the
-same section has no such requirement. This has implications on how the
-operator responds to exceptions thrown from <code>xsputn()</code>
-(formatted output functions are required to set <code>badbit</code>
-and swallow the exception unless <code>badbit</code> is also set in
-<code>exceptions()</code>; the string inserter doesn't have any such
-requirement).
-
- </p>
- <p>
-
-I don't see anything in the spec for the string inserter that would
-justify requiring it to treat exceptions differently from all other
-similar operators. (If it did, I think it should be made this explicit
-by saying that the operator "does not behave as a formatted output
-function" as has been made customary by the adoption of the resolution
-of issue 60).
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-I propose to change the Effects clause in 21.3.7.9, p5, as follows:
-
- </p>
- <p>
- </p><blockquote>
-
-<i>Effects</i>: <del>Begins by constructing a sentry object k as if k
-were constructed by typename <code>basic_ostream&lt;charT,
-traits&gt;::sentry k (os)</code>. If <code>bool(k)</code> is
-<code>true</code>, </del><ins>Behaves as a formatted output function
-(27.6.2.5.1). After constructing a <code>sentry</code> object, if
-this object returns <code>true</code> when converted to a value of
-type <code>bool</code>, determines padding as described in
-22.2.2.2.2</ins>, then inserts the resulting sequence of characters
-<code><i>seq</i></code> as if by calling <code>os.rdbuf()-&gt;sputn(seq ,
-n)</code>, where <code><i>n</i></code> is the larger of
-<code>os.width()</code> and <code>str.size()</code>; then calls
-<code>os.width(0)</code>. <del>If the call to sputn fails, calls
-<code>os.setstate(ios_base::failbit)</code>.</del>
-
- </blockquote>
- <p></p>
- <p>
-
-This proposed resilution assumes the resolution of issue 394 (i.e.,
-that all formatted output functions are required to set
-<code>ios_base::badbit</code> in response to any kind of streambuf
-failure), and implicitly assumes that a return value of
-<code>sputn(seq, <i>n</i>)</code> other than <code><i>n</i></code>
-indicates a failure.
-
- </p>
- <hr>
-<a name="587"><h3>587.&nbsp;iststream ctor missing description</h3></a><p><b>Section:</b>&nbsp;D.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.istrstream.cons"> [depr.istrstream.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;22 June 2006</p>
- <p>
-
-The <code>iststream(char*, streamsize)</code> ctor is in the class
-synopsis in D.7.2 but its signature is missing in the description
-below (in D.7.2.1).
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-This seems like a simple editorial issue and the missing signature can
-be added to the one for <code>const char*</code> in paragraph 2.
-
- </p>
- <hr>
-<a name="588"><h3>588.&nbsp;requirements on zero sized tr1::arrays and other details</h3></a><p><b>Section:</b>&nbsp;23.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array"> [lib.array]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Gennaro Prota&nbsp; <b>Date:</b>&nbsp;18 Jul 2006</p>
-<p>
-The wording used for section 23.2.1 [lib.array] seems to be subtly
-ambiguous about zero sized arrays (N==0). Specifically:
-</p>
-<p>
-* "An instance of array&lt;T, N&gt; stores N elements of type T, so that
-[...]"
-</p>
-<p>
-Does this imply that a zero sized array object stores 0 elements, i.e.
-that it cannot store any element of type T? The next point clarifies
-the rationale behind this question, basically how to implement begin()
-and end():
-</p>
-<p>
-* 23.2.1.5 [lib.array.zero], p2: "In the case that N == 0, begin() ==
-end() == unique value."
-</p>
-<p>
-What does "unique" mean in this context? Let's consider the following
-possible implementations, all relying on a partial specialization:
-</p>
-<blockquote><pre>a)
- template&lt; typename T &gt;
- class array&lt; T, 0 &gt; {
-
- ....
-
- iterator begin()
- { return iterator( reinterpret_cast&lt; T * &gt;( this ) ); }
- ....
-
- };
-</pre></blockquote>
-<p>
-This has been used in boost, probably intending that the return value
-had to be unique to the specific array object and that array couldn't
-store any T. Note that, besides relying on a reinterpret_cast, has
-(more than potential) alignment problems.
-</p>
-<blockquote><pre>b)
- template&lt; typename T &gt;
- class array&lt; T, 0 &gt; {
-
- T t;
-
- iterator begin()
- { return iterator( &amp;t ); }
- ....
-
- };
-</pre></blockquote>
-<p>
-This provides a value which is unique to the object and to the type of
-the array, but requires storing a T. Also, it would allow the user to
-mistakenly provide an initializer list with one element.
-</p>
-<p>
-A slight variant could be returning *the* null pointer of type T
-</p>
-<blockquote><pre> return static_cast&lt;T*&gt;(0);
-</pre></blockquote>
-<p>
-In this case the value would be unique to the type array&lt;T, 0&gt; but not
-to the objects (all objects of type array&lt;T, 0&gt; with the same value
-for T would yield the same pointer value).
-</p>
-<p>
-Furthermore this is inconsistent with what the standard requires from
-allocation functions (see library issue 9).
-</p>
-<p>
-c) same as above but with t being a static data member; again, the
-value would be unique to the type, not to the object.
-</p>
-<p>
-d) to avoid storing a T *directly* while disallowing the possibility
-to use a one-element initializer list a non-aggregate nested class
-could be defined
-</p>
-<blockquote><pre> struct holder { holder() {} T t; } h;
-</pre></blockquote>
-<p>
-and then begin be defined as
-</p>
-<blockquote><pre> iterator begin() { return &amp;h.t; }
-</pre></blockquote>
-<p>
-But then, it's arguable whether the array stores a T or not.
-Indirectly it does.
-</p>
-<p>
------------------------------------------------------
-</p>
-<p>
-Now, on different issues:
-</p>
-<p>
-* what's the effect of calling assign(T&amp;) on a zero-sized array? There
-seems to be only mention of front() and back(), in 23.2.1 [lib.array]
-p4 (I would also suggest to move that bullet to section 23.2.1.5
-[lib.array.zero], for locality of reference)
-</p>
-<p>
-* (minor) the opening paragraph of 23.2.1 [lib.array] wording is a bit
-inconsistent with that of other sequences: that's not a problem in
-itself, but compare it for instance with "A vector is a kind of
-sequence that supports random access iterators"; though the intent is
-obvious one might argue that the wording used for arrays doesn't tell
-what an array is, and relies on the reader to infer that it is what
-the &lt;array&gt; header defines.
-</p>
-<p>
-* it would be desiderable to have a static const data member of type
-std::size_t, with value N, for usage as integral constant expression
-</p>
-<p>
-* section 23.1 [lib.container.requirements] seem not to consider
-fixed-size containers at all, as it says: "[containers] control
-allocation and deallocation of these objects [the contained objects]
-through constructors, destructors, *insert and erase* operations"
-</p>
-<p>
-* max_size() isn't specified: the result is obvious but, technically,
-it relies on table 80: "size() of the largest possible container"
-which, again, doesn't seem to consider fixed size containers
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="589"><h3>589.&nbsp;Requirements on iterators of member template functions of containers</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;2 Aug 2006</p>
-<p>
-There appears to be no requirements on the InputIterators used in sequences in 23.1.1 in
-terms of their value_type, and the requirements in 23.1.2 appear to be overly strict
-(requires InputIterator::value_type be the same type as the container's value_type).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 23.1.1 p3:
-</p>
-
-<blockquote>
-In Tables 82 and 83, <tt>X</tt> denotes a sequence class, <tt>a</tt> denotes a
-value of <tt>X</tt>, <tt>i</tt> and <tt>j</tt> denote iterators satisfying input
-iterator requirements <ins>and refer to elements <ins>implicitly
-convertible to</ins> <tt>value_type</tt></ins>, <tt>[i, j)</tt> denotes a valid
-range, <tt>n</tt> denotes a value of <tt>X::size_type</tt>, <tt>p</tt> denotes a
-valid iterator to <tt>a</tt>, <tt>q</tt> denotes a valid dereferenceable
-iterator to <tt>a</tt>, <tt>[q1, q2)</tt> denotes a valid range in <tt>a</tt>,
-and <tt>t</tt> denotes a value of <tt>X::value_type</tt>.
-</blockquote>
-
-<p>
-Change 23.1.2 p7:
-</p>
-
-<blockquote>
-In Table 84, <tt>X</tt> is an associative container class, <tt>a</tt> is a value
-of <tt>X</tt>, <tt>a_uniq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports
-unique keys, and <tt>a_eq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports
-multiple keys, <tt>i</tt> and <tt>j</tt> satisfy input iterator requirements and
-refer to elements <del>of</del> <ins>implicitly convertible to</ins>
-<tt>value_type</tt>, <tt>[i, j)</tt> is a valid range, <tt>p</tt> is a valid
-iterator to <tt>a</tt>, <tt>q</tt> is a valid dereferenceable iterator to
-<tt>a</tt>, <tt>[q1, q2)</tt> is a valid range in <tt>a</tt>, <tt>t</tt> is a
-value of <tt>X::value_type</tt>, <tt>k</tt> is a value of <tt>X::key_type</tt>
-and <tt>c</tt> is a value of type <tt>X::key_compare</tt>.
-</blockquote>
-
-<hr>
-<a name="590"><h3>590.&nbsp;Type traits implementation latitude should be removed for C++0x</h3></a><p><b>Section:</b>&nbsp;<font color="red">20.4.9</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;10 Aug 2006</p>
-<p>
-20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type
-traits implementers that is not needed in C++0x. It includes the wording:
-</p>
-
-<blockquote>
-[<i>Note:</i> the latitude granted to implementers in this clause is temporary,
-and is expected to be removed in future revisions of this document. -- <i>end note</i>]
-</blockquote>
-
-<p>
-Note:
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028:
-Minor Modifications to the type traits Wording</a>
-also has the intent of removing this wording from the WP.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Remove 20.4.9 [lib.meta.req] in its entirety from the WP.
-</p>
-<hr>
-<a name="591"><h3>591.&nbsp;Misleading "built-in</h3></a><p><b>Section:</b>&nbsp;18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;whyglinux&nbsp; <b>Date:</b>&nbsp;8 Aug 2006</p>
-<p>
-18.2.1.2 numeric_limits members [lib.numeric.limits.members]
-Paragraph 7:
-</p>
-<blockquote>
-"For built-in integer types, the number of non-sign bits in the
-representation."
-</blockquote>
-
-<p>
-26.1 Numeric type requirements [lib.numeric.requirements]
-Footnote:
-</p>
-
-<blockquote>
-"In other words, value types. These include built-in arithmetic types,
-pointers, the library class complex, and instantiations of valarray for
-value types."
-</blockquote>
-
-<p>
-Integer types (which are bool, char, wchar_t, and the signed and
-unsigned integer types) and arithmetic types (which are integer and
-floating types) are all built-in types and thus there are no
-non-built-in (that is, user-defined) integer or arithmetic types. Since
-the redundant "built-in" in the above 2 sentences can mislead that
-there may be built-in or user-defined integer and arithmetic types
-(which is not correct), the "built-in" should be removed.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p><p>
-18.2.1.2 numeric_limits members [lib.numeric.limits.members]
-Paragraph 7:
-</p>
-<blockquote>
-"For <del>built-in</del> integer types, the number of non-sign bits in the
-representation."
-</blockquote>
-
-<p>
-26.1 Numeric type requirements [lib.numeric.requirements]
-Footnote:
-</p>
-
-<blockquote>
-"In other words, value types. These include <del>built-in</del> arithmetic types,
-pointers, the library class complex, and instantiations of valarray for
-value types."
-</blockquote>
-<p></p>
-<hr>
-<a name="592"><h3>592.&nbsp;Incorrect treatment of rdbuf()-&gt;close() return type</h3></a><p><b>Section:</b>&nbsp;27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Christopher Kohlhoff&nbsp; <b>Date:</b>&nbsp;17 Aug 2006</p>
-<p>
-I just spotted a minor problem in 27.8.1.7
-[lib.ifstream.members] para 4 and also 27.8.1.13
-[lib.fstream.members] para 4. In both places it says:
-</p>
-<blockquote>
-<pre>void close();
-</pre>
-<p>
-Effects: Calls rdbuf()-&gt;close() and, if that function returns false, ...
-</p>
-</blockquote>
-<p>
-However, basic_filebuf::close() (27.8.1.2) returns a pointer to the
-filebuf on success, null on failure, so I think it is meant to
-say "if that function returns a null pointer". Oddly, it is
-correct for basic_ofstream.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 27.8.1.7 [lib.ifstream.members], p5:
-</p>
-
-<blockquote>
-<i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
-<ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
-calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
-(27.4.4.3)).
-</blockquote>
-
-<p>
-Change 27.8.1.13 [lib.fstream.members], p5:
-</p>
-
-<blockquote>
-<i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
-<ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
-calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
-(27.4.4.3)).
-</blockquote>
-
-<hr>
-<a name="593"><h3>593.&nbsp;__STDC_CONSTANT_MACROS</h3></a><p><b>Section:</b>&nbsp;18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;28 Aug 2006</p>
-<p>
-Clause 18.3 of the current Working Paper (N2009) deals with the new C++ headers
-&lt;cstdint&gt; and &lt;stdint.h&gt;. These are of course based on the C99 header
-&lt;stdint.h&gt;, and were part of TR1.
-</p>
-
-<p>
-Per 18.3.1/1, these headers define a number of macros and function macros.
-While the WP does not mention __STDC_CONSTANT_MACROS in this context, C99
-footnotes do mention __STDC_CONSTANT_MACROS. Further, 18.3.1/2 states that "The
-header defines all ... macros the same as C99 subclause 7.18."
-</p>
-
-<p>
-Therefore, if I wish to have the above-referenced macros and function macros
-defined, must I #define __STDC_CONSTANT_MACROS before I #include &lt;cstdint&gt;, or
-does the C++ header define these macros/function macros unconditionally?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-To put this issue to rest for C++0X, I propose the following addition to
-18.3.1/2 of the Working Paper N2009:
-</p>
-
-<blockquote>
-[Note: The macros defined by &lt;cstdint&gt; are provided unconditionally: in
-particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
-(mentioned in C99 footnotes 219, 220, and 222) play no role in C++. --end note]
-</blockquote>
-<hr>
-<a name="594"><h3>594.&nbsp;Disadvantages of defining Swappable in terms of
-CopyConstructible and Assignable</h3></a><p><b>Section:</b>&nbsp;20.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.swappable"> [lib.swappable]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Niels Dekker&nbsp; <b>Date:</b>&nbsp;2 Nov 2006</p>
-<p>
-It seems undesirable to define the Swappable requirement in terms of
-CopyConstructible and Assignable requirements. And likewise, once the
-MoveConstructible and MoveAssignable requirements (N1860) have made it
-into the Working Draft, it seems undesirable to define the Swappable
-requirement in terms of those requirements. Instead, it appears
-preferable to have the Swappable requirement defined exclusively in
-terms of the existence of an appropriate swap function.
-</p>
-<p>
-Section 20.1.4 [lib.swappable] of the current Working Draft (N2009)
-says:
-</p><blockquote>
-The Swappable requirement is met by satisfying one or more of the
-following conditions:
-<ul>
-<li>
-T is Swappable if T satisfies the CopyConstructible requirements
-(20.1.3) and the Assignable requirements (23.1);
-</li>
-<li>
-T is Swappable if a namespace scope function named swap exists in the
-same namespace as the definition of T, such that the expression
-swap(t,u) is valid and has the semantics described in Table 33.
-</li>
-</ul>
-</blockquote>
-I can think of three disadvantages of this definition:
-<ol>
-<li>
-If a client's type T satisfies the first condition (T is both
-CopyConstructible and Assignable), the client cannot stop T from
-satisfying the Swappable requirement without stopping T from
-satisfying the first condition.
-<p>
-A client might want to stop T from satisfying the Swappable
-requirement, because swapping by means of copy construction and
-assignment might throw an exception, and she might find a throwing
-swap unacceptable for her type. On the other hand, she might not feel
-the need to fully implement her own swap function for this type. In
-this case she would want to be able to simply prevent algorithms that
-would swap objects of type T from being used, e.g., by declaring a
-swap function for T, and leaving this function purposely undefined.
-This would trigger a link error, if an attempt would be made to use
-such an algorithm for this type. For most standard library
-implementations, this practice would indeed have the effect of
-stopping T from satisfying the Swappable requirement.
-</p>
-</li>
-<li>
-A client's type T that does not satisfy the first condition can not be
-made Swappable by providing a specialization of std::swap for T.
-<p>
-While I'm aware about the fact that people have mixed feelings about
-providing a specialization of std::swap, it is well-defined to do so.
-It sounds rather counter-intuitive to say that T is not Swappable, if
-it has a valid and semantically correct specialization of std::swap.
-Also in practice, providing such a specialization will have the same
-effect as satisfying the Swappable requirement.
-</p>
-</li>
-<li>
-For a client's type T that satisfies both conditions of the Swappable
-requirement, it is not specified which of the two conditions prevails.
-After reading section 20.1.4 [lib.swappable], one might wonder whether
-objects of T will be swapped by doing copy construction and
-assignments, or by calling the swap function of T.
-<p>
-I'm aware that the intention of the Draft is to prefer calling the
-swap function of T over doing copy construction and assignments. Still
-in my opinion, it would be better to make this clear in the wording of
-the definition of Swappable.
-</p>
-</li>
-</ol>
-<p></p>
-<p>
-I would like to have the Swappable requirement defined in such a way
-that the following code fragment will correctly swap two objects of a
-type T, if and only if T is Swappable:
-</p><pre> using std::swap;
- swap(t, u); // t and u are of type T.
-</pre>
-This is also the way Scott Meyers recommends calling a swap function,
-in Effective C++, Third Edition, item 25.
-<p></p>
-<p>
-Most aspects of this issue have been dealt with in a discussion on
-comp.std.c++ about the Swappable requirement, from 13 September to 4
-October 2006, including valuable input by David Abrahams, Pete Becker,
-Greg Herlihy, Howard Hinnant and others.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change section 20.1.4 [lib.swappable] as follows:
-</p>
-<blockquote>
-The Swappable requirement is met by satisfying
-<del>one or more of the following conditions:</del>
-<ins>the following condition:</ins>
-<ul>
-<del>
-<li>
-T is Swappable if T satisfies the CopyConstructible requirements
-(20.1.3) and the Assignable requirements (23.1);
-</li>
-</del>
-<li>
-<del>
-T is Swappable if a namespace scope function named swap exists in the
-same namespace as the definition of T, such that the expression
-swap(t,u) is valid and has the semantics described in Table 33.
-</del>
-T is Swappable if an unqualified function call swap(t,u) is valid
-within the namespace std, and has the semantics described in Table 33.
-</li>
-</ul>
-</blockquote>
-<hr>
-<a name="595"><h3>595.&nbsp;TR1/C++0x: fabs(complex&lt;T&gt;) redundant / wrongly specified</h3></a><p><b>Section:</b>&nbsp;26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Stefan Große Pawig&nbsp; <b>Date:</b>&nbsp;24 Sep 2006</p>
-<p>
-TR1 introduced, in the C compatibility chapter, the function
-fabs(complex&lt;T&gt;):
-</p>
-<blockquote><pre>----- SNIP -----
-8.1.1 Synopsis [tr.c99.cmplx.syn]
-
- namespace std {
- namespace tr1 {
-[...]
- template&lt;class T&gt; complex&lt;T&gt; fabs(const complex&lt;T&gt;&amp; x);
- } // namespace tr1
- } // namespace std
-
-[...]
-
-8.1.8 Function fabs [tr.c99.cmplx.fabs]
-
-1 Effects: Behaves the same as C99 function cabs, defined in
- subclause 7.3.8.1.
------ SNIP -----
-</pre></blockquote>
-
-<p>
-The current C++0X draft document (n2009.pdf) adopted this
-definition in chapter 26.3.1 (under the comment // 26.3.7 values)
-and 26.3.7/7.
-</p>
-<p>
-But in C99 (ISO/IEC 9899:1999 as well as the 9899:TC2 draft document
-n1124), the referenced subclause reads
-</p>
-
-<blockquote><pre>----- SNIP -----
-7.3.8.1 The cabs functions
-
- Synopsis
-
-1 #include &lt;complex.h&gt;
- double cabs(double complex z);
- float cabsf(float complex z);
- long double cabsl(long double z);
-
- Description
-
-2 The cabs functions compute the complex absolute value (also called
- norm, modulus, or magnitude) of z.
-
- Returns
-
-3 The cabs functions return the complex absolute value.
------ SNIP -----
-</pre></blockquote>
-
-<p>
-Note that the return type of the cabs*() functions is not a complex
-type. Thus, they are equivalent to the already well established
- template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp; x);
-(26.2.7/2 in ISO/IEC 14882:1998, 26.3.7/2 in the current draft
-document n2009.pdf).
-</p>
-<p>
-So either the return value of fabs() is specified wrongly, or fabs()
-does not behave the same as C99's cabs*().
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-This depends on the intention behind the introduction of fabs().
-</p>
-<p>
-If the intention was to provide a /complex/ valued function that
-calculates the magnitude of its argument, this should be
-explicitly specified. In TR1, the categorization under "C
-compatibility" is definitely wrong, since C99 does not provide
-such a complex valued function.
-</p>
-<p>
-Also, it remains questionable if such a complex valued function
-is really needed, since complex&lt;T&gt; supports construction and
-assignment from real valued arguments. There is no difference
-in observable behaviour between
-</p>
-<blockquote><pre> complex&lt;double&gt; x, y;
- y = fabs(x);
- complex&lt;double&gt; z(fabs(x));
-</pre></blockquote>
-<p>
-and
-</p>
-<blockquote><pre> complex&lt;double&gt; x, y;
- y = abs(x);
- complex&lt;double&gt; z(abs(x));
-</pre></blockquote>
-<p>
-If on the other hand the intention was to provide the intended
-functionality of C99, fabs() should be either declared deprecated
-or (for C++0X) removed from the standard, since the functionality
-is already provided by the corresponding overloads of abs().
-</p>
-<hr>
-<a name="596"><h3>596.&nbsp;27.8.1.3 Table 112 omits "a+" and "a+b" modes</h3></a><p><b>Section:</b>&nbsp;27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Thomas Plum&nbsp; <b>Date:</b>&nbsp;26 Sep 2006</p>
-<p>
-In testing 27.8.1.3, Table 112 (in the latest N2009 draft), we invoke
-</p>
-<blockquote><pre> ostr.open("somename", ios_base::out | ios_base::in | ios_base::app)
-</pre></blockquote>
-<p>
-and we expect the open to fail, because out|in|app is not listed in
-Table 92, and just before the table we see very specific words:
-</p>
-<blockquote>
- If mode is not some combination of flags shown in the table
- then the open fails.
-</blockquote>
-<p>
-But the corresponding table in the C standard, 7.19.5.3, provides two
-modes "a+" and "a+b", to which the C++ modes out|in|app and
-out|in|app|binary would presumably apply.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-We would like to argue that the intent of Table 112 was to match the
-semantics of 7.19.5.3 and that the omission of "a+" and "a+b" was
-unintentional. (Otherwise there would be valid and useful behaviors
-available in C file I/O which are unavailable using C++, for no
-valid functional reason.)
-</p>
-<p>
-We further request that the missing modes be explicitly restored to
-the WP, for inclusion in C++0x.
-</p>
-<hr>
-<a name="597"><h3>597.&nbsp;Decimal: The notion of 'promotion' cannot be emulated by user-defined types.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.2</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Daveed Vandevoorde&nbsp; <b>Date:</b>&nbsp;5 April 2006</p>
-<p>
-In a private email, Daveed writes:
-</p>
-<blockquote>
-<p>
-I am not familiar with the C TR, but my guess is that the
-class type approach still won't match a built-in type
-approach because the notion of "promotion" cannot be
-emulated by user-defined types.
-</p>
-<p>
-Here is an example:
-</p>
-</blockquote>
-<pre>
- struct S {
- S(_Decimal32 const&amp;); // Converting constructor
- };
- void f(S);
-
- void f(_Decimal64);
-
- void g(_Decimal32 d) {
- f(d);
- }
-</pre>
-
-<blockquote>
-<p>
-If _Decimal32 is a built-in type, the call f(d) will likely
-resolve to f(_Decimal64) because that requires only a
-promotion, whereas f(S) requires a user-defined conversion.
-</p>
-<p>
-If _Decimal32 is a class type, I think the call f(d) will be
-ambiguous because both the conversion to _Decimal64 and the
-conversion to S will be user-defined conversions with neither
-better than the other.
-</p>
-</blockquote>
-<p>
-Robert comments:
-</p>
-<p>In general, a library of arithmetic types cannot exactly emulate the
-behavior of the intrinsic numeric types. There are several ways to tell
-whether an implementation of the decimal types uses compiler
-intrinisics or a library. For example:
-</p>
-<pre> _Decimal32 d1;
- d1.operator+=(5); // If d1 is a builtin type, this won't compile.
-</pre>
-<p>
-In preparing the decimal TR, we have three options:
-</p>
-<ol>
-<li>require that the decimal types be class types</li>
-<li>require that the decimal types be builtin types, like float and double</li>
-<li>specify a library of class types, but allow enough implementor
-latitude that a conforming implementation could instead provide builtin
-types</li>
-</ol>
-<p>
-We decided as a group to pursue option #3, but that approach implies
-that implementations may not agree on the semantics of certain use
-cases (first example, above), or on whether certain other cases are
-well-formed (second example). Another potentially important problem is
-that, under the present definition of POD, the decimal classes are not
-POD types, but builtins will be.
-</p>
-<p>Note that neither example above implies any problems with respect to
-C-to-C++ compatibility, since neither example can be expressed in C.
-</p>
-<p><b>Proposed resolution:</b></p>
-<hr>
-<a name="598"><h3>598.&nbsp;Decimal: Conversion to integral should truncate, not round.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.2</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Krugler&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-
-<p>
-In a private email, Daniel writes:
-</p>
-<blockquote>
-<p>
-I would like to
-ask, what where the reason for the decision to
-define the semantics of the integral conversion of the decimal types, namely
-</p>
-<pre>"operator long long() const;
-
- Returns: Returns the result of the
-conversion of *this to the type long long, as if
-performed by the expression llrounddXX(*this)."
-</pre>
-<p>
-where XX stands for either 32, 64, or 128,
-corresponding to the proper decimal type. The
-exact meaning of llrounddXX is not given in that
-paper, so I compared it to the corresponding
-definition given in C99, 2nd edition (ISO 9899), which says in 7.12.9.7 p. 2:
-</p>
-<p>
-"The lround and llround functions round their
-argument to the nearest integer value,
-rounding halfway cases away from zero, regardless
-of the current rounding direction. [..]"
-</p>
-<p>
-Now considering the fact that integral conversion
-of the usual floating-point types ("4.9
-Floating-integral conversions") has truncation
-semantic I wonder why this conversion behaviour
-has not been transferred for the decimal types.
-</p>
-</blockquote>
-<p>
-Robert comments:
-</p>
-<p>
-Also, there is a further error in the <b>Returns:</b> clause for converting <code>decimal::decimal128</code> to <code>long long</code>. It currently calls <code>llroundd64</code>, not <code>llroundd128</code>.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the <b>Returns:</b> clause in 3.2.2.4 to:
-</p>
-<blockquote>
-<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd32(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
-</blockquote>
-<p>
-Change the <b>Returns:</b> clause in 3.2.3.4 to:
-</p>
-<blockquote>
-<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd64(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
-</blockquote>
-<p>
-Change the <b>Returns:</b> clause in 3.2.4.4 to:
-</p>
-<blockquote>
-<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <del><code>llroundd64(*this)</code></del> <ins><code>llroundd128(*this)</code> while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>.
-</blockquote>
-
-<hr>
-<a name="599"><h3>599.&nbsp;Decimal: Say "octets" instead of "bytes."</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.1</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Krugler&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>
-Daniel writes in a private email:
-</p>
-
-<blockquote>
-<p>
-- 3.1 'Decimal type encodings' says in its note:
-</p>
-<p>
-"this implies that
-sizeof(std::decimal::decimal32) == 4,
-sizeof(std::decimal::decimal64) == 8, and
-sizeof(std::decimal::decimal128) == 16."
-</p><p>
-</p>
-This is a wrong assertion, because the definition
-of 'byte' in 1.7 'The C+ + memory model' of ISO
-14882 (2nd edition) does not specify that a byte
-must be necessarily 8 bits large, which would be
-necessary to compare with the specified bit sizes
-of the types decimal32, decimal64, and decimal128.
-<p></p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 3.1 as follows:
-</p>
-<blockquote>
-<p>
-The three decimal encoding formats defined in IEEE-754R correspond to the three decimal floating types as follows:
-</p>
-<ul>
-<li>
-decimal32 is a <em>decimal32</em> number, which is encoded in four consecutive <del>bytes</del> <ins>octets</ins> (32 bits)
-</li>
-<li>
-decimal64 is a <em>decimal64</em> number, which is encoded in eight consecutive <del>bytes</del> <ins>octets</ins> (64 bits)
-
-</li>
-<li>
-decimal128 is a <em>decimal128</em> number, which is encoded in 16 consecutive <del>bytes</del> <ins>octets</ins> (128 bits)
-</li>
-</ul>
-<p>
-<del>[<i>Note:</i> this implies that <code>sizeof(std::decimal::decimal32) == 4</code>, <code>sizeof(std::decimal::decimal64) == 8</code>, and <code>sizeof(std::decimal::decimal128) == 16</code>. <i>--end note</i>]</del>
-</p>
-</blockquote>
-<hr>
-<a name="600"><h3>600.&nbsp;Decimal: Wrong parameters for wcstod* functions</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.9</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Krugler&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>
-Daniel writes:
-</p>
-<blockquote>
-- 3.9.1 'Additions to &lt;cwchar&gt;' provides wrong
-signatures to the wcstod32, wcstod64, and
-wcstod128 functions ([the parameters have type pointer-to-] char instead of wchar_t).
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change "3.9.1 Additions to <code>&lt;cwchar&gt;</code> synopsis" to:
-</p>
-<pre> namespace std {
- namespace decimal {
- // 3.9.2 wcstod functions:
- decimal32 wcstod32 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
- decimal64 wcstod64 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
- decimal128 wcstod128 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr);
- }
- }
-</pre>
-<hr>
-<a name="601"><h3>601.&nbsp;Decimal: numeric_limits typos</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.3</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Krugler&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>
-Daniel writes in a private email:
-</p>
-
-<blockquote>
-<p>
-- 3.3 'Additions to header &lt;limits&gt;' contains two
-errors in the specialisation of numeric_limits&lt;decimal::decimal128&gt;:
-</p>
-<ol>
-<li>The static member max() returns DEC128_MIN, this should be DEC128_MAX.</li>
-<li>The static member digits is assigned to 384,
-this should be 34 (Probably mixed up with the
-max. exponent for decimal::decimal64).</li>
-</ol>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-In "3.3 Additions to header <code>&lt;limits&gt;</code>" change numeric_limits&lt;decimal::decimal128&gt; as follows:
-</p>
-<pre> template&lt;&gt; class numeric_limits&lt;decimal::decimal128&gt; {
- public:
- static const bool is_specialized = true;
-
- static decimal::decimal128 min() throw() { return DEC128_MIN; }
- static decimal::decimal128 max() throw() { return <del>DEC128_MIN;</del> <ins>DEC128_MAX;</ins> }
-
- static const int digits = <del>384</del> <ins>34</ins>;
- /* ... */
-</pre>
-<hr>
-<a name="602"><h3>602.&nbsp;Decimal: "generic floating type" not defined.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Krugler&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>
-The document uses the term "generic floating types," but defines it nowhere.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the first paragraph of "3 Decimal floating-point types" as follows:
-</p>
-<blockquote>
-This Technical Report introduces three decimal floating-point types, named
-decimal32, decimal64, and decimal128. The set of values of type decimal32 is a
-subset of the set of values of type decimal64; the set of values of the type
-decimal64 is a subset of the set of values of the type decimal128. Support for
-decimal128 is optional. <ins>These types supplement the Standard C++ types
-<code>float</code>, <code>double</code>, and <code>long double</code>, which are
-collectively described as the <i>basic floating types</i></ins>.
-</blockquote>
-<hr>
-<a name="603"><h3>603.&nbsp;Decimal: Trivially simplifying decimal classes.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>In c++std-lib-17198, Martin writes:</p>
-
-<blockquote>
-Each of the three classes proposed in the paper (decimal32, decimal64,
-and decimal128) explicitly declares and specifies the semantics of its
-copy constructor, copy assignment operator, and destructor. Since the
-semantics of all three functions are identical to the trivial versions
-implicitly generated by the compiler in the absence of any declarations
-it is safe to drop them from the spec. This change would make the
-proposed classes consistent with other similar classes already in the
-standard (e.g., std::complex).
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change "3.2.2 Class <code>decimal32</code>" as follows:
-</p>
-<pre> namespace std {
- namespace decimal {
- class decimal32 {
- public:
- // 3.2.2.1 construct/copy/destroy:
- decimal32();
- <del>decimal32(const decimal32 &amp; d32);</del>
- <del>decimal32 &amp; operator=(const decimal32 &amp; d32);</del>
- <del>~decimal32();</del>
- /* ... */
-</pre>
-<p>
-Change "3.2.2.1 construct/copy/destroy" as follows:
-</p>
-<pre> decimal32();
-
- Effects: Constructs an object of type decimal32 with the value 0;
-
- <del>decimal32(const decimal32 &amp; d32);</del>
- <del>decimal32 &amp; operator=(const decimal32 &amp; d32);</del>
-
- <del>Effects: Copies an object of type decimal32.</del>
-
- <del>~decimal32();</del>
-
- <del>Effects: Destroys an object of type decimal32.</del>
-
-</pre>
-<p>
-Change "3.2.3 Class <code>decimal64</code>" as follows:
-</p>
-<pre> namespace std {
- namespace decimal {
- class decimal64 {
- public:
- // 3.2.3.1 construct/copy/destroy:
- decimal64();
- <del>decimal64(const decimal64 &amp; d64);</del>
- <del>decimal64 &amp; operator=(const decimal64 &amp; d64);</del>
- <del>~decimal64();</del>
- /* ... */
-</pre>
-<p>
-Change "3.2.3.1 construct/copy/destroy" as follows:
-</p>
-<pre> decimal64();
-
- Effects: Constructs an object of type decimal64 with the value 0;
-
- <del>decimal64(const decimal64 &amp; d64);</del>
- <del>decimal64 &amp; operator=(const decimal64 &amp; d64);</del>
-
- <del>Effects: Copies an object of type decimal64.</del>
-
- <del>~decimal64();</del>
-
- <del>Effects: Destroys an object of type decimal64.</del>
-
-</pre>
-<p>
-Change "3.2.4 Class <code>decimal128</code>" as follows:
-</p>
-<pre> namespace std {
- namespace decimal {
- class decimal128 {
- public:
- // 3.2.4.1 construct/copy/destroy:
- decimal128();
- <del>decimal128(const decimal128 &amp; d128);</del>
- <del>decimal128 &amp; operator=(const decimal128 &amp; d128);</del>
- <del>~decimal128();</del>
- /* ... */
-</pre>
-<p>
-Change "3.2.4.1 construct/copy/destroy" as follows:
-</p>
-<pre> decimal128();
-
- Effects: Constructs an object of type decimal128 with the value 0;
-
- <del>decimal128(const decimal128 &amp; d128);</del>
- <del>decimal128 &amp; operator=(const decimal128 &amp; d128);</del>
-
- <del>Effects: Copies an object of type decimal128.</del>
-
- <del>~decimal128();</del>
-
- <del>Effects: Destroys an object of type decimal128.</del>
-
-</pre>
-<hr>
-<a name="604"><h3>604.&nbsp;Decimal: Storing a reference to a facet unsafe.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 May 2006</p>
-<p>
-In c++std-lib-17197, Martin writes:
-</p>
-<blockquote>
-The extended_num_get and extended_num_put facets are designed
-to store a reference to a num_get or num_put facet which the
-extended facets delegate the parsing and formatting of types
-other than decimal. One form of the extended facet's ctor (the
-default ctor and the size_t overload) obtains the reference
-from the global C++ locale while the other form takes this
-reference as an argument.
-</blockquote>
-<blockquote>
-The problem with storing a reference to a facet in another
-object (as opposed to storing the locale object in which the
-facet is installed) is that doing so bypasses the reference
-counting mechanism designed to prevent a facet that is still
-being referenced (i.e., one that is still installed in some
-locale) from being destroyed when another locale that contains
-it is destroyed. Separating a facet reference from the locale
-it comes from van make it cumbersome (and in some cases might
-even make it impossible) for programs to prevent invalidating
-the reference. (The danger of this design is highlighted in
-the paper.)
-</blockquote>
-<blockquote>
-This problem could be easily avoided by having the extended
-facets store a copy of the locale from which they would extract
-the base facet either at construction time or when needed. To
-make it possible, the forms of ctors of the extended facets that
-take a reference to the base facet would need to be changed to
-take a locale argument instead.
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-1. Change the <code>extended_num_get</code> synopsis in 3.10.2 as follows:
-</p>
-<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
-
- /* ... */
-
- <del>// <i>const std::num_get&lt;charT, InputIterator&gt; &amp; <b>base</b></i>; <i><b>exposition only</b></i></del>
- <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins>
-</pre>
-<p>
-2. Change the description of the above constructor in 3.10.2.1:
-</p>
-<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
-
-</pre>
-<blockquote>
-<p>
-<b>Effects:</b> Constructs an <code>extended_num_get</code> facet as if by:
-</p>
-<pre> extended_num_get(const <del>std::num_get&lt;charT, InputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0)
- : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>)
- { /* ... */ }
-
-</pre>
-<p>
-<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_get</code> facet.</del>
-</p>
-</blockquote>
-<p>
-3. Change the <b>Returns:</b> clause for <code>do_get(iter_type, iter_type, ios_base &amp;, ios_base::iostate &amp;, bool &amp;) const</code>, <i>et al</i> to
-</p>
-<blockquote>
-<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet&lt;std::num_get&lt;charT, InputIterator&gt; &gt;(<i>baseloc</i>)</ins>.get(<i>in</i>, <i>end</i>, <i>str</i>, <i>err</i>, <i>val</i>)</code>.
-</blockquote>
-<p>
-4. Change the <code>extended_num_put</code> synopsis in 3.10.3 as follows:
-</p>
-<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
-
- /* ... */
-
- <del>// <i>const std::num_put&lt;charT, OutputIterator&gt; &amp; <b>base</b></i>; <i><b>exposition only</b></i></del>
- <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins>
-</pre>
-<p>
-5. Change the description of the above constructor in 3.10.3.1:
-</p>
-<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0);
-</pre>
-<blockquote>
-<p>
-<b>Effects:</b> Constructs an <code>extended_num_put</code> facet as if by:
-</p>
-<pre> extended_num_put(const <del>std::num_put&lt;charT, OutputIterator&gt;</del> <ins>std::locale</ins> &amp; <i>b</i>, size_t <i>refs</i> = 0)
- : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>)
- { /* ... */ }
-
-</pre>
-<p>
-<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_put</code> facet.</del>
-</p>
-</blockquote>
-<p>
-6. Change the <b>Returns:</b> clause for <code>do_put(iter_type, ios_base &amp;, char_type, bool &amp;) const</code>, <i>et al</i> to
-</p>
-<blockquote>
-<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet&lt;std::num_put&lt;charT, OutputIterator&gt; &gt;(<i>baseloc</i>)</ins>.put(<i>s</i>, <i>f</i>, <i>fill</i>, <i>val</i>)</code>.
-</blockquote>
-
-<p><i>[
-Redmond: We would prefer to rename "extended" to "decimal".
-]</i></p>
-
-<hr>
-<a name="605"><h3>605.&nbsp;Decimal: &lt;decfloat.h&gt; doesn't live here anymore.</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.4</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a>&nbsp; <b>Submitter:</b>&nbsp;Robert Klarer&nbsp; <b>Date:</b>&nbsp;17 October 2006</p>
-<p>In Berlin, WG14 decided to drop the &lt;decfloat.h&gt; header. The
-contents of that header have been moved into &lt;float.h&gt;. For the
-sake of C compatibility, we should make corresponding changes.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-1. Change the heading of subclause 3.4, "Headers <code>&lt;cdecfloat&gt;</code> and <code>&lt;decfloat.h&gt;</code>" to "Additions to headers <code>&lt;cfloat&gt;</code> and <code>&lt;float.h&gt;</code>."
-</p>
-<p>
-2. Change the text of subclause 3.4 as follows:
-</p>
-<blockquote>
-<p>
-<del>The standard C++ headers <code>&lt;cfloat&gt;</code> and <code>&lt;float.h&gt;</code> define characteristics of the floating-point types <code>float</code>, <code>double</code>, and <code>long double</code>. Their contents remain unchanged by this Technical Report.</del>
-</p>
-<p>
-<del>Headers <code>&lt;cdecfloat&gt;</code> and <code>&lt;decfloat.h&gt;</code> define characteristics of the decimal floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code>&lt;decfloat.h&gt;</code> defines the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code>, for compatibilty with the C programming language.</del>
-</p>
-<p>
-<ins>The header <code>&lt;cfloat&gt;</code> is described in [tr.c99.cfloat]. The header <code>&lt;float.h&gt;</code>
-is described in [tr.c99.floath]. These headers are extended by this
-Technical Report to define characteristics of the decimal
-floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code>&lt;float.h&gt;</code> is extended to define the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code> for compatibility with the C programming language.</ins>
-</p>
-</blockquote>
-<p>
-3. Change the heading of subclause 3.4.1, "Header <code>&lt;cdecfloat&gt;</code> synopsis" to "Additions to header <code>&lt;cfloat&gt;</code> synopsis."
-</p>
-<p>
-4. Change the heading of subclause 3.4.2, "Header <code>&lt;decfloat.h&gt;</code> synopsis" to "Additions to header <code>&lt;float.h&gt;</code> synopsis."
-</p>
-<p>
-5. Change the contents of 3.4.2 as follows:
-</p>
-<pre> <del>#include &lt;cdecfloat&gt;</del>
-
- // <i>C-compatibility convenience typedefs:</i>
-
- typedef std::decimal::decimal32 _Decimal32;
- typedef std::decimal::decimal64 _Decimal64;
- typedef std::decimal::decimal128 _Decimal128;
-</pre>
-
-<hr>
-<a name="606"><h3>606.&nbsp;Decimal: allow narrowing conversions</h3></a><p><b>Section:</b>&nbsp;<font color="red">Decimal 3.2</font>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 June 2006</p>
-<p>
-In c++std-lib-17205, Martin writes:
-</p>
-<blockquote>
-...was it a deliberate design choice to make narrowing assignments
-ill-formed while permitting narrowing compound assignments? For
-instance:
-</blockquote>
-<pre> decimal32 d32;
- decimal64 d64;
-
- d32 = 64; // error
- d32 += 64; // okay
-</pre>
-<p>
-In c++std-lib-17229, Robert responds:
-</p>
-<blockquote>It is a vestige of an old idea that I forgot to remove from
-the paper. Narrowing assignments should be permitted. The bug is that
-the converting constructors that cause narrowing should not be
-explicit. Thanks for pointing this out.
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-1. In "3.2.2 Class <code>decimal32</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversions:
-</p>
-<pre> // <i>3.2.2.2 conversion from floating-point type:</i>
- <del>explicit</del> decimal32(decimal64 <i>d64</i>);
- <del>explicit</del> decimal32(decimal128 <i>d128</i>);
-</pre>
-<p>
-2. Do the same thing in "3.2.2.2. Conversion from floating-point type."
-</p>
-<p>
-3. In "3.2.3 Class <code>decimal64</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversion:
-</p>
-<pre> // <i>3.2.3.2 conversion from floating-point type:</i>
- <del>explicit</del> decimal64(decimal128 <i>d128</i>);
-</pre>
-<p>
-4. Do the same thing in "3.2.3.2. Conversion from floating-point type."
-</p>
-
-<p><i>[
-Redmond: We prefer explicit conversions for narrowing and implicit for widening.
-]</i></p>
-
-<hr>
-<a name="607"><h3>607.&nbsp;Concern about short seed vectors</h3></a><p><b>Section:</b>&nbsp;26.4.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.dist.iunif"> [lib.rand.dist.iunif]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Charles Karney&nbsp; <b>Date:</b>&nbsp;26 Oct 2006</p>
-<p>
-Short seed vectors of 32-bit quantities all result in different states. However
-this is not true of seed vectors of 16-bit (or smaller) quantities. For example
-these two seeds
-</p>
-
-<blockquote><pre>unsigned short seed = {1, 2, 3};
-unsigned short seed = {1, 2, 3, 0};
-</pre></blockquote>
-
-<p>
-both pack to
-</p>
-
-<blockquote><pre>unsigned seed = {0x20001, 0x3};
-</pre></blockquote>
-
-<p>
-yielding the same state.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 26.4.7.1[rand.util.seedseq]/8a, replace
-</p>
-
-<blockquote>
-<p>
-Set <tt>begin[0]</tt> to <tt>5489 + <del>s</del><ins>N</ins></tt>.
-</p>
-<p>
-where <tt>N</tt> is the bit length of the sequence used to construct the
-seed_seq in 26.4.7.1/6 [rand.util.seedseq]. (This quantity is called <tt>n</tt>
-in 26.4.7.1/6 [rand.util.seedseq], but <tt>n</tt> has a different meaning in
-26.4.7.1/8 [rand.util.seedseq]. We have <tt>32^(s-1) &lt; N &lt;= 32^s</tt>.) Now
-</p>
-
-<blockquote><pre>unsigned short seed = {1, 2, 3, 0};
-unsigned seed = {0x20001, 0x3};
-</pre></blockquote>
-
-<p>
-are equivalent (<tt>N = 64</tt>), but
-</p>
-
-<blockquote><pre>unsigned short seed = {1, 2, 3};
-</pre></blockquote>
-
-<p>
-gives a distinct state (<tt>N = 48</tt>).
-</p>
-</blockquote>
-
-<hr>
-<a name="608"><h3>608.&nbsp;Unclear seed_seq construction details</h3></a><p><b>Section:</b>&nbsp;26.4.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.dist.iunif"> [lib.rand.dist.iunif]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Charles Karney&nbsp; <b>Date:</b>&nbsp;26 Oct 2006</p>
-<p>
-In 26.4.7.1 [rand.util.seedseq] /6, the order of packing the inputs into b and the
-treatment of signed quantities is unclear. Better to spell it out.
-</p>
-<p><b>Proposed resolution:</b></p>
-<blockquote><pre>b = sum( unsigned(begin[i]) 2^(w i), 0 &lt;= i &lt; end-begin )
-</pre></blockquote>
-
-<p>
-where <tt>w</tt> is the bit-width of the InputIterator.
-</p>
-<hr>
-<a name="609"><h3>609.&nbsp;missing static const</h3></a><p><b>Section:</b>&nbsp;26.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.eng.mers"> [lib.rand.eng.mers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a>&nbsp; <b>Submitter:</b>&nbsp;Walter E. Brown&nbsp; <b>Date:</b>&nbsp;2 Nov 2006</p>
-<p>
-In preparing N2111, an error on my part resulted in the omission of the
-following line from the template synopsis in the cited section:
-</p>
-
-<blockquote><pre>static const size_t word_size = w;
-</pre></blockquote>
-
-<p>
-(This same constant is found, for example, in 26.4.3.3 [rand.eng.sub].)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add the above declaration as the first line after the comment in [rand.adapt.ibits] p4:
-</p>
-
-<blockquote><pre>// engine characteristics
-<ins>static const size_t word_size = w;</ins>
-</pre></blockquote>
-
-<p>
-and accept my apologies for the oversight.
-</p>
-<p>----- End of document -----</p>
-</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/docs/html/ext/lwg-closed.html b/libstdc++-v3/docs/html/ext/lwg-closed.html
deleted file mode 100644
index 19de85138df..00000000000
--- a/libstdc++-v3/docs/html/ext/lwg-closed.html
+++ /dev/null
@@ -1,5669 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><head><title>C++ Standard Library Closed Issues List</title>
-
-<style>ins {background-color:#FFFFA0}
-del {background-color:#FFFFA0}</style></head>
-
-<body bgcolor="#ffffff" text="#000000">
-<table>
-<tbody><tr>
-<td align="left">Doc. no.</td>
-<td align="left">N2132=06-0202</td>
-</tr>
-<tr>
-<td align="left">Date:</td>
-<td align="left">2006-11-03</td>
-</tr>
-<tr>
-<td align="left">Project:</td>
-<td align="left">Programming Language C++</td>
-</tr>
-<tr>
-<td align="left">Reply to:</td>
-<td align="left">Howard Hinnant &lt;howard.hinnant@gmail.com&gt;</td>
-</tr>
-</tbody></table>
-<h1>C++ Standard Library Closed Issues List (Revision R45)</h1>
- <p>Reference ISO/IEC IS 14882:1998(E)</p>
- <p>Also see:</p>
- <ul>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
- </ul>
-
- <p>This document contains only library issues which have been closed
- by the Library Working Group as duplicates or not defects. That is,
- issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> active issues and more
- information. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a> for issues considered
- defects. The introductory material in that document also applies to
- this document.</p>
-<h2>Revision History</h2>
-<ul>
-<li>R45:
-2006-11-03 post-Portland mailing.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>.
-</li>
-<li>R44:
-2006-09-08 pre-Portland mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.
-</li>
-<li>R43:
-2006-06-23 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.
-</li>
-<li>R42:
-2006-04-21 post-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#548">548</a> to Open.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review.
-</li>
-<li>R41:
-2006-02-24 pre-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>.
-Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.
-</li>
-<li>R40:
-2005-12-16 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.
-</li>
-<li>R39:
-2005-10-14 post-Mont Tremblant mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
-</li>
-<li>R38:
-2005-07-03 pre-Mont Tremblant mailing.
-Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
-</li>
-<li>R37:
-2005-06 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
-</li>
-<li>R36:
-2005-04 post-Lillehammer mailing. All issues in "ready" status except
-for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
-previously in "DR" status were moved to "WP".
-</li>
-<li>R35:
-2005-03 pre-Lillehammer mailing.
-</li>
-<li>R34:
-2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
-</li>
-<li>R33:
-2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
-</li>
-<li>R32:
-2004-09 pre-Redmond mailing: reflects new proposed resolutions and
-new issues received after the 2004-07 mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
-</li>
-<li>R31:
-2004-07 mid-term mailing: reflects new proposed resolutions and
-new issues received after the post-Sydney mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
-</li>
-<li>R30:
-Post-Sydney mailing: reflects decisions made at the Sydney meeting.
-Voted all "Ready" issues from R29 into the working paper.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
-</li>
-<li>R29:
-Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
-</li>
-<li>R28:
-Post-Kona mailing: reflects decisions made at the Kona meeting.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
-</li>
-<li>R27:
-Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
-</li>
-<li>R26:
-Post-Oxford mailing: reflects decisions made at the Oxford meeting.
-All issues in Ready status were voted into DR status. All issues in
-DR status were voted into WP status.
-</li>
-<li>R25:
-Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
-</li>
-<li>R24:
-Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
-meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
-moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
-at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
-concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
-</li>
-<li>R23:
-Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
-Moved issues in the TC to TC status.
-</li>
-<li>R22:
-Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
-</li>
-<li>R21:
-Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
-</li>
-<li>R20:
-Post-Redmond mailing; reflects actions taken in Redmond. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
-not discussed at the meeting.
-
-All Ready issues were moved to DR status, with the exception of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-
-Noteworthy issues discussed at Redmond include
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
-</li>
-<li>R19:
-Pre-Redmond mailing. Added new issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
-</li>
-<li>R18:
-Post-Copenhagen mailing; reflects actions taken in Copenhagen.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
-to DR.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
-to Ready.
-
-Closed issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
-as NAD.
-
-</li>
-<li>R17:
-Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
-resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
-</li>
-<li>R16:
-post-Toronto mailing; reflects actions taken in Toronto. Added new
-issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
-appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
-the bug in enough places.
-</li>
-<li>R15:
-pre-Toronto mailing. Added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
-changes so that we pass Weblint tests.
-</li>
-<li>R14:
-post-Tokyo II mailing; reflects committee actions taken in
-Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
-</li>
-<li>R13:
-pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
-</li>
-<li>R12:
-pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
-</li>
-<li>R11:
-post-Kona mailing: Updated to reflect LWG and full committee actions
-in Kona (99-0048/N1224). Note changed resolution of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
-to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
-"closed" documents. Changed the proposed resolution of issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
-</li>
-<li>R10:
-pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
-</li>
-<li>R9:
-pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
-"closed" documents. (99-0030/N1206, 25 Aug 99)
-</li>
-<li>R8:
-post-Dublin mailing. Updated to reflect LWG and full committee actions
-in Dublin. (99-0016/N1193, 21 Apr 99)
-</li>
-<li>R7:
-pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
-</li>
-<li>R6:
-pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
-and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
-</li>
-<li>R5:
-update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
-for making list public. (30 Dec 98)
-</li>
-<li>R4:
-post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
-issues corrected. (22 Oct 98)
-</li>
-<li>R3:
-post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
-added, many issues updated to reflect LWG consensus (12 Oct 98)
-</li>
-<li>R2:
-pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
-</li>
-<li>R1:
-Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
-format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
-</li>
-</ul>
-<h2>Closed Issues</h2>
-<hr>
-<a name="2"><h3>2.&nbsp;Auto_ptr conversions effects incorrect</h3></a><p><b>Section:</b>&nbsp;20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;4 Dec 1997</p>
-<p>Paragraph 1 in "Effects", says "Calls
-p-&gt;release()" where it clearly must be "Calls
-p.release()". (As it is, it seems to require using
-auto_ptr&lt;&gt;::operator-&gt; to refer to X::release, assuming that
-exists.)</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a> paragraph 1 Effects from
-"Calls p-&gt;release()" to "Calls p.release()".</p>
-<p><b>Rationale:</b></p>
-<p>Not a defect: the proposed change is already found in the standard.
-[Originally classified as a defect, later reclassified.]</p>
-<hr>
-<a name="4"><h3>4.&nbsp;Basic_string size_type and difference_type should be implementation defined</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;16 Nov 1997</p>
-<p>In Morristown we changed the size_type and difference_type typedefs
-for all the other containers to implementation defined with a
-reference to 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>. This should probably also have been
-done for strings. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. [Originally classified as a defect, later
-reclassified.] basic_string, unlike the other standard library
-template containers, is severely constrained by its use of
-char_traits. Those types are dictated by the traits class, and are far
-from implementation defined.</p>
-<hr>
-<a name="6"><h3>6.&nbsp;File position not an offset unimplementable</h3></a><p><b>Section:</b>&nbsp;27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;15 Dec 1997</p>
-<p>Table 88, in I/O, is too strict; it's unimplementable on systems
-where a file position isn't just an offset. It also never says just
-what fpos&lt;&gt; is really supposed to be. [Here's my summary, which
-Jerry agrees is more or less accurate. "I think I now know what
-the class really is, at this point: it's a magic cookie that
-encapsulates an mbstate_t and a file position (possibly represented as
-an fpos_t), it has syntactic support for pointer-like arithmetic, and
-implementors are required to have real, not just syntactic, support
-for arithmetic." This isn't standardese, of course.] </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. The LWG believes that the Standard is already clear,
-and that the above summary is what the Standard in effect says.</p>
-<hr>
-<a name="10"><h3>10.&nbsp;Codecvt&lt;&gt;::do unclear</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;14 Jan 1998</p>
-<p>Section 22.2.1.5.2 says that codecvt&lt;&gt;::do_in and do_out
-should return the value noconv if "no conversion was
-needed". However, I don't see anything anywhere that defines what
-it means for a conversion to be needed or not needed. I can think of
-several circumstances where one might plausibly think that a
-conversion is not "needed", but I don't know which one is
-intended here. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>.</p>
-<hr>
-<a name="12"><h3>12.&nbsp;Way objects hold allocators unclear</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;23 Feb 1998</p>
-<p>I couldn't find a statement in the standard saying whether the allocator object held by
-a container is held as a copy of the constructor argument or whether a pointer of
-reference is maintained internal. There is an according statement for compare objects and
-how they are maintained by the associative containers, but I couldn't find anything
-regarding allocators. </p>
-
-<p>Did I overlook it? Is it an open issue or known defect? Or is it deliberately left
-unspecified? </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. The LWG believes that the Standard is already
-clear.&nbsp; See 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>, paragraph 8.</p>
-<hr>
-<a name="43"><h3>43.&nbsp;Locale table correction</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Brendan Kehoe&nbsp; <b>Date:</b>&nbsp;1 Jun 1998</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a>.</p>
-<hr>
-<a name="45"><h3>45.&nbsp;Stringstreams read/write pointers initial position unclear</h3></a><p><b>Section:</b>&nbsp;27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matthias Mueller&nbsp; <b>Date:</b>&nbsp;27 May 1998</p>
-<p>In a comp.lang.c++.moderated Matthias Mueller wrote:</p>
-
-<p>"We are not sure how to interpret the CD2 (see 27.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.forward"> [lib.iostream.forward]</a>, 27.7.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream.cons"> [lib.ostringstream.cons]</a>, 27.7.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.cons"> [lib.stringbuf.cons]</a>)
-with respect to the question as to what the correct initial positions
-of the write and&nbsp; read pointers of a stringstream should
-be."</p>
-
-<p>"Is it the same to output two strings or to initialize the stringstream with the
-first and to output the second?"</p>
-
-<p><i>[PJ Plauger, Bjarne Stroustrup, Randy Smithey, Sean Corfield, and
-Jerry Schwarz have all offered opinions; see reflector messages
-lib-6518, 6519, 6520, 6521, 6523, 6524.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes the Standard is correct as written. The behavior
-of stringstreams is consistent with fstreams, and there is a
-constructor which can be used to obtain the desired effect. This
-behavior is known to be different from strstreams.</p>
-<hr>
-<a name="58"><h3>58.&nbsp;Extracting a char from a wide-oriented stream</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;1 Jul 1998</p>
-<p>27.6.1.2.3 has member functions for extraction of signed char and
-unsigned char, both singly and as strings. However, it doesn't say
-what it means to extract a <tt>char</tt> from a
-<tt>basic_streambuf&lt;charT, Traits&gt;</tt>. </p>
-
-<p>basic_streambuf, after all, has no members to extract a char, so
-basic_istream must somehow convert from charT to signed char or
-unsigned char. The standard doesn't say how it is to perform that
-conversion. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The Standard is correct as written. There is no such extractor and
-this is the intent of the LWG.</p>
-<hr>
-<a name="65"><h3>65.&nbsp;Underspecification of strstreambuf::seekoff</h3></a><p><b>Section:</b>&nbsp;D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;18 Aug 1998</p>
-<p>The standard says how this member function affects the current
-stream position. (<tt>gptr</tt> or <tt>pptr</tt>) However, it does not
-say how this member function affects the beginning and end of the
-get/put area. </p>
-
-<p>This is an issue when seekoff is used to position the get pointer
-beyond the end of the current read area. (Which is legal. This is
-implicit in the definition of <i>seekhigh</i> in D.7.1, paragraph 4.)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG agrees that seekoff() is underspecified, but does not wish
-to invest effort in this deprecated feature.</p>
-<hr>
-<a name="67"><h3>67.&nbsp;Setw useless for strings</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;9 Jul 1998</p>
-<p>In a comp.std.c++ posting Michel Michaud wrote: What
-should be output by: </p>
-
-<pre> string text("Hello");
- cout &lt;&lt; '[' &lt;&lt; setw(10) &lt;&lt; right &lt;&lt; text &lt;&lt; ']';
-</pre>
-
-<p>Shouldn't it be:</p>
-
-<pre> [ Hello]</pre>
-
-<p>Another person replied: Actually, according to the FDIS, the width
-of the field should be the minimum of width and the length of the
-string, so the output shouldn't have any padding. I think that this is
-a typo, however, and that what is wanted is the maximum of the
-two. (As written, setw is useless for strings. If that had been the
-intent, one wouldn't expect them to have mentioned using its value.)
-</p>
-
-<p>It's worth pointing out that this is a recent correction anyway;
-IIRC, earlier versions of the draft forgot to mention formatting
-parameters whatsoever.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a>.</p>
-<hr>
-<a name="72"><h3>72.&nbsp;Do_convert phantom member function</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;24 Aug 1998</p>
-<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> par 3, and in <font color="red">22.2.1.5.2</font> par 8, a nonexistent member function
-"do_convert" is mentioned. This member was replaced with
-"do_in" and "do_out", the proper referents in the
-contexts above.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate: see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a>.</p>
-<hr>
-<a name="73"><h3>73.&nbsp;<tt>is_open</tt> should be const</h3></a><p><b>Section:</b>&nbsp;27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;27 Aug 1998</p>
-<p>Classes <tt>basic_ifstream</tt>, <tt>basic_ofstream</tt>, and
-<tt>basic_fstream</tt> all have a member function <tt>is_open</tt>. It
-should be a <tt>const</tt> member function, since it does nothing but
-call one of <tt>basic_filebuf</tt>'s const member functions. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. This is a deliberate feature; const streams would be
-meaningless.</p>
-<hr>
-<a name="77"></a><h3><a name="77">77.&nbsp;Valarray operator[] const returning value</a></h3><p><b>Section:</b>&nbsp;26.5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.access"> [lib.valarray.access]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Levente Farkas&nbsp; <b>Date:</b>&nbsp;9 Sep 1998</p>
-<p>valarray:<br>
-<br>
-&nbsp;&nbsp;&nbsp; <tt>T operator[] (size_t) const;</tt><br>
-<br>
-why not <br>
-<br>
-&nbsp;&nbsp;&nbsp; <tt>const T&amp; operator[] (size_t) const;</tt><br>
-<br>
-as in vector ???<br>
-<br>
-One can't copy even from a const valarray eg:<br>
-<br>
-&nbsp;&nbsp;&nbsp; <tt>memcpy(ptr, &amp;v[0], v.size() * sizeof(double));<br>
-</tt><br>
-[I] find this bug in valarray is very difficult.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes that the interface was deliberately designed that
-way. That is what valarray was designed to do; that's where the
-"value array" name comes from. LWG members further comment
-that "we don't want valarray to be a full STL container."
-26.5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.access"> [lib.valarray.access]</a> specifies properties that indicate "an
-absence of aliasing" for non-constant arrays; this allows
-optimizations, including special hardware optimizations, that are not
-otherwise possible. </p>
-<hr>
-<a name="81"><h3>81.&nbsp;Wrong declaration of slice operations</h3></a><p><b>Section:</b>&nbsp;26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a>, 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a>, 26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a>, 26.3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cmplx.over"> [lib.cmplx.over]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Isn't the definition of copy constructor and assignment operators wrong?
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Instead of</p>
-
-<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array(const slice_array&amp;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array&amp; operator=(const slice_array&amp;);</pre>
-
-<p>IMHO they have to be</p>
-
-<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array(const slice_array&lt;T&gt;&amp;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array&amp; operator=(const slice_array&lt;T&gt;&amp;);</pre>
-
-<p>Same for gslice_array. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. The Standard is correct as written. </p>
-<hr>
-<a name="82"><h3>82.&nbsp;Missing constant for set elements</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Paragraph 5 specifies:</p>
-
-<blockquote>
-For set and multiset the value type is the same as the key type. For
-map and multimap it is equal to pair&lt;const Key, T&gt;.
-</blockquote>
-
-<p>Strictly speaking, this is not correct because for set and multiset
-the value type is the same as the <b>constant</b> key type.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. The Standard is correct as written; it uses a
-different mechanism (const &amp;) for <tt>set</tt> and
-<tt>multiset</tt>. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for a related
-issue.</p>
-<hr>
-<a name="84"><h3>84.&nbsp;Ambiguity with string::insert()</h3></a><p><b>Section:</b>&nbsp;21.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.modifiers"> [lib.string.modifiers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>If I try</p>
-<pre> s.insert(0,1,' ');</pre>
-
-<p>&nbsp; I get an nasty ambiguity. It might be</p>
-<pre> s.insert((size_type)0,(size_type)1,(charT)' ');</pre>
-
-<p>which inserts 1 space character at position 0, or</p>
-<pre> s.insert((char*)0,(size_type)1,(charT)' ')</pre>
-
-<p>which inserts 1 space character at iterator/address 0 (bingo!), or</p>
-<pre> s.insert((char*)0, (InputIterator)1, (InputIterator)' ')</pre>
-
-<p>which normally inserts characters from iterator 1 to iterator '
-'. But according to 23.1.1.9 (the "do the right thing" fix)
-it is equivalent to the second. However, it is still ambiguous,
-because of course I mean the first!</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Not a defect. The LWG believes this is a "genetic
-misfortune" inherent in the design of string and thus not a
-defect in the Standard as such .</p>
-<hr>
-<a name="85"><h3>85.&nbsp;String char types</h3></a><p><b>Section:</b>&nbsp;21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>The standard seems not to require that charT is equivalent to
-traits::char_type. So, what happens if charT is not equivalent to
-traits::char_type?</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>There is already wording in 21.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits"> [lib.char.traits]</a> paragraph 3 that
-requires them to be the same.</p>
-<hr>
-<a name="87"><h3>87.&nbsp;Error in description of string::compare()</h3></a><p><b>Section:</b>&nbsp;21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>The following compare() description is obviously a bug:</p>
-
-<pre>int compare(size_type pos, size_type n1,
- charT *s, size_type n2 = npos) const;
-</pre>
-
-<p>because without passing n2 it should compare up to the end of the
-string instead of comparing npos characters (which throws an
-exception) </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a>.</p>
-<hr>
-<a name="88"><h3>88.&nbsp;Inconsistency between string::insert() and string::append()</h3></a><p><b>Section:</b>&nbsp;21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, 21.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::append"> [lib.string::append]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Why does </p>
-<pre> template&lt;class InputIterator&gt;
- basic_string&amp; append(InputIterator first, InputIterator last);</pre>
-
-<p>return a string, while</p>
-<pre> template&lt;class InputIterator&gt;
- void insert(iterator p, InputIterator first, InputIterator last);</pre>
-
-<p>returns nothing ?</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes this stylistic inconsistency is not sufficiently
-serious to constitute a defect.</p>
-<hr>
-<a name="89"><h3>89.&nbsp;Missing throw specification for string::insert() and string::replace()</h3></a><p><b>Section:</b>&nbsp;21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, 21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>All insert() and replace() members for strings with an iterator as
-first argument lack a throw specification. The throw
-specification should probably be: length_error if size exceeds
-maximum. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Considered a duplicate because it will be solved by the resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
-<hr>
-<a name="93"><h3>93.&nbsp;Incomplete Valarray Subset Definitions</h3></a><p><b>Section:</b>&nbsp;26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>You can easily create subsets, but you can't easily combine them
-with other subsets. Unfortunately, you almost always needs an
-explicit type conversion to valarray. This is because the standard
-does not specify that valarray subsets provide the same operations as
-valarrays. </p>
-
-<p>For example, to multiply two subsets and assign the result to a third subset, you can't
-write the following:</p>
-
-<pre>va[slice(0,4,3)] = va[slice(1,4,3)] * va[slice(2,4,3)];</pre>
-
-<p>Instead, you have to code as follows:</p>
-
-<pre>va[slice(0,4,3)] = static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(1,4,3)]) *
- static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(2,4,3)]);</pre>
-
-<p>This is tedious and error-prone. Even worse, it costs performance because each cast
-creates a temporary objects, which could be avoided without the cast. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Extend all valarray subset types so that they offer all valarray operations.</p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard; it is a request for an extension.</p>
-<hr>
-<a name="94"><h3>94.&nbsp;May library implementors add template parameters to Standard Library classes?</h3></a><p><b>Section:</b>&nbsp;17.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.conforming"> [lib.conforming]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;22 Jan 1998</p>
-<p>Is it a permitted extension for library implementors to add template parameters to
-standard library classes, provided that those extra parameters have defaults? For example,
-instead of defining <tt>template &lt;class T, class Alloc = allocator&lt;T&gt; &gt; class
-vector;</tt> defining it as <tt>template &lt;class T, class Alloc = allocator&lt;T&gt;,
-int N = 1&gt; class vector;</tt> </p>
-
-<p>The standard may well already allow this (I can't think of any way that this extension
-could break a conforming program, considering that users are not permitted to
-forward-declare standard library components), but it ought to be explicitly permitted or
-forbidden. </p>
-
-<p>comment from Steve Cleary via comp.std.c++:</p>
-<blockquote>
-<p>I disagree [with the proposed resolution] for the following reason:
-consider user library code with template template parameters. For
-example, a user library object may be templated on the type of
-underlying sequence storage to use (deque/list/vector), since these
-classes all take the same number and type of template parameters; this
-would allow the user to determine the performance tradeoffs of the
-user library object. A similar example is a user library object
-templated on the type of underlying set storage (set/multiset) or map
-storage (map/multimap), which would allow users to change (within
-reason) the semantic meanings of operations on that object.</p>
-<p>I think that additional template parameters should be forbidden in
-the Standard classes. Library writers don't lose any expressive power,
-and can still offer extensions because additional template parameters
-may be provided by a non-Standard implementation class:</p>
-<pre>
- template &lt;class T, class Allocator = allocator&lt;T&gt;, int N = 1&gt;
- class __vector
- { ... };
- template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
- class vector: public __vector&lt;T, Allocator&gt;
- { ... };
-</pre>
-
-</blockquote>
-
-<p><b>Proposed resolution:</b></p>
-<p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>:</p>
-
-<blockquote>
- <p>17.4.4.9 Template Parameters</p> <p>A specialization of a
- template class described in the C++ Standard Library behaves the
- same as if the implementation declares no additional template
- parameters.</p> <p>Footnote: Additional template parameters with
- default values are thus permitted.</p>
-</blockquote>
-
-<p>Add "template parameters" to the list of subclauses at
-the end of 17.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.conforming"> [lib.conforming]</a> paragraph 1.</p>
-
-<p><i>[Kona: The LWG agreed the standard needs clarification. After
-discussion with John Spicer, it seems added template parameters can be
-detected by a program using template-template parameters. A straw vote
-- "should implementors be allowed to add template
-parameters?" found no consensus ; 5 - yes, 7 - no.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-There is no ambiguity; the standard is clear as written. Library
-implementors are not permitted to add template parameters to standard
-library classes. This does not fall under the "as if" rule,
-so it would be permitted only if the standard gave explicit license
-for implementors to do this. This would require a change in the
-standard.
-</p>
-
-<p>
-The LWG decided against making this change, because it would break
-user code involving template template parameters or specializations
-of standard library class templates.
-</p>
-<hr>
-<a name="95"><h3>95.&nbsp;Members added by the implementation</h3></a><p><b>Section:</b>&nbsp;17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual
-members a base class and break user derived classes.</p>
-
-<p>Example: </p>
-
-<blockquote>
- <pre>// implementation code:
-struct _Base { // _Base is in the implementer namespace
- virtual void foo ();
-};
-class vector : _Base // deriving from a class is allowed
-{ ... };
-
-// user code:
-class vector_checking : public vector
-{
- void foo (); // don't want to override _Base::foo () as the
- // user doesn't know about _Base::foo ()
-};</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Clarify the wording to make the example illegal.</p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard.&nbsp; The example is already
-illegal.&nbsp; See 17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a> paragraph 2.</p>
-<hr>
-<a name="97"><h3>97.&nbsp;Insert inconsistent definition</h3></a><p><b>Section:</b>&nbsp;23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p><tt>insert(iterator, const value_type&amp;)</tt> is defined both on
-sequences and on set, with unrelated semantics: insert here (in
-sequences), and insert with hint (in associative containers). They
-should have different names (B.S. says: do not abuse overloading).</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard. It is a genetic misfortune of
-the design, for better or for worse.</p>
-<hr>
-<a name="99"><h3>99.&nbsp;Reverse_iterator comparisons completely wrong</h3></a><p><b>Section:</b>&nbsp;24.4.1.3.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op=="> [lib.reverse.iter.op==]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>The &lt;, &gt;, &lt;=, &gt;= comparison operator are wrong: they
-return the opposite of what they should.</p>
-
-<p>Note: same problem in CD2, these were not even defined in CD1. SGI
-STL code is correct; this problem is known since the Morristown
-meeting but there it was too late</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard. A careful reading shows the Standard is correct
-as written. A review of several implementations show that they implement
-exactly what the Standard says.</p>
-<hr>
-<a name="100"><h3>100.&nbsp;Insert iterators/ostream_iterators overconstrained</h3></a><p><b>Section:</b>&nbsp;24.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.insert.iterators"> [lib.insert.iterators]</a>, 24.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iterator"> [lib.ostreambuf.iterator]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>Overspecified For an insert iterator it, the expression *it is
-required to return a reference to it. This is a simple possible
-implementation, but as the SGI STL documentation says, not the only
-one, and the user should not assume that this is the case.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes this causes no harm and is not a defect in the
-standard. The only example anyone could come up with caused some
-incorrect code to work, rather than the other way around.</p>
-<hr>
-<a name="101"><h3>101.&nbsp;No way to free storage for vector and deque</h3></a><p><b>Section:</b>&nbsp;23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, 23.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array"> [lib.array]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>Reserve can not free storage, unlike string::reserve</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard. The LWG has considered this
-issue in the past and sees no need to change the Standard. Deque has
-no reserve() member function. For vector, shrink-to-fit can be
-expressed in a single line of code (where <tt>v</tt> is
-<tt>vector&lt;T&gt;</tt>):
-</p>
-
-<blockquote>
- <p><tt>vector&lt;T&gt;(v).swap(v);&nbsp; // shrink-to-fit v</tt></p>
-</blockquote>
-<hr>
-<a name="102"><h3>102.&nbsp;Bug in insert range in associative containers</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>Table 69 of Containers say that a.insert(i,j) is linear if [i, j) is ordered. It seems
-impossible to implement, as it means that if [i, j) = [x], insert in an associative
-container is O(1)!</p>
-<p><b>Proposed resolution:</b></p>
-<p>N+log (size()) if [i,j) is sorted according to value_comp()</p>
-<p><b>Rationale:</b></p>
-<p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>.</p>
-<hr>
-<a name="104"><h3>104.&nbsp;Description of basic_string::operator[] is unclear</h3></a><p><b>Section:</b>&nbsp;21.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.access"> [lib.string.access]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>It is not clear that undefined behavior applies when pos == size ()
-for the non const version.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Rewrite as: Otherwise, if pos &gt; size () or pos == size () and
-the non-const version is used, then the behavior is undefined.</p>
-<p><b>Rationale:</b></p>
-<p>The Standard is correct. The proposed resolution already appears in
-the Standard.</p>
-<hr>
-<a name="105"><h3>105.&nbsp;fstream ctors argument types desired</h3></a><p><b>Section:</b>&nbsp;27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>fstream ctors take a const char* instead of string.<br>
-fstream ctors can't take wchar_t</p>
-
-<p>An extension to add a const wchar_t* to fstream would make the
-implementation non conforming.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect in the Standard. It might be an
-interesting extension for the next Standard. </p>
-<hr>
-<a name="107"><h3>107.&nbsp;Valarray constructor is strange</h3></a><p><b>Section:</b>&nbsp;26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>The order of the arguments is (elem, size) instead of the normal
-(size, elem) in the rest of the library. Since elem often has an
-integral or floating point type, both types are convertible to each
-other and reversing them leads to a well formed program.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Inverting the arguments could silently break programs. Introduce
-the two signatures (const T&amp;, size_t) and (size_t, const T&amp;),
-but make the one we do not want private so errors result in a
-diagnosed access violation. This technique can also be applied to STL
-containers.</p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes that while the order of arguments is unfortunate,
-it does not constitute a defect in the standard. The LWG believes that
-the proposed solution will not work for valarray&lt;size_t&gt; and
-perhaps other cases.</p>
-<hr>
-<a name="111"><h3>111.&nbsp;istreambuf_iterator::equal overspecified, inefficient</h3></a><p><b>Section:</b>&nbsp;24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;15 Oct 1998</p>
-<p>The member istreambuf_iterator&lt;&gt;::equal is specified to be
-unnecessarily inefficient. While this does not affect the efficiency
-of conforming implementations of iostreams, because they can
-"reach into" the iterators and bypass this function, it does
-affect users who use istreambuf_iterators. </p>
-
-<p>The inefficiency results from a too-scrupulous definition, which
-requires a "true" result if neither iterator is at eof. In
-practice these iterators can only usefully be compared with the
-"eof" value, so the extra test implied provides no benefit,
-but slows down users' code. </p>
-
-<p>The solution is to weaken the requirement on the function to return
-true only if both iterators are at eof. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>,
-paragraph 1, </p>
-
-<blockquote>
- <p>-1- Returns: true if and only if both iterators are at end-of-stream, or neither is at
- end-of-stream, regardless of what streambuf object they use. </p>
-</blockquote>
-
-<p>with</p>
-
-<blockquote>
- <p>-1- Returns: true if and only if both iterators are at
- end-of-stream, regardless of what streambuf object they use. </p>
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>It is not clear that this is a genuine defect. Additionally, the
-LWG was reluctant to make a change that would result in
-operator== not being a equivalence relation. One consequence of
-this change is that an algorithm that's passed the range [i, i)
-would no longer treat it as an empty range.</p>
-<hr>
-<a name="113"><h3>113.&nbsp;Missing/extra iostream sync semantics</h3></a><p><b>Section:</b>&nbsp;27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a>, 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;13 Oct 1998</p>
-<p>In 27.6.1.1, class basic_istream has a member function sync, described in 27.6.1.3,
-paragraph 36. </p>
-
-<p>Following the chain of definitions, I find that the various sync functions have defined
-semantics for output streams, but no semantics for input streams. On the other hand,
-basic_ostream has no sync function. </p>
-
-<p>The sync function should at minimum be added to basic_ostream, for internal
-consistency. </p>
-
-<p>A larger question is whether sync should have assigned semantics for input streams. </p>
-
-<p>Classic iostreams said streambuf::sync flushes pending output and attempts to return
-unread input characters to the source. It is a protected member function. The filebuf
-version (which is public) has that behavior (it backs up the read pointer). Class
-strstreambuf does not override streambuf::sync, and so sync can't be called on a
-strstream. </p>
-
-<p>If we can add corresponding semantics to the various sync functions, we should. If not,
-we should remove sync from basic_istream.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>A sync function is not needed in basic_ostream because the flush function provides the
-desired functionality.</p>
-
-<p>As for the other points, the LWG finds the standard correct as written.</p>
-<hr>
-<a name="116"><h3>116.&nbsp;bitset cannot be constructed with a const char*</h3></a><p><b>Section:</b>&nbsp;23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;6 Nov 1998</p>
-<p>The following code does not compile with the EDG compiler:</p>
-
-<blockquote>
- <pre>#include &lt;bitset&gt;
-using namespace std;
-bitset&lt;32&gt; b("111111111");</pre>
-</blockquote>
-
-<p>If you cast the ctor argument to a string, i.e.:</p>
-
-<blockquote>
- <pre>bitset&lt;32&gt; b(string("111111111"));</pre>
-</blockquote>
-
-<p>then it will compile. The reason is that bitset has the following templatized
-constructor:</p>
-
-<blockquote>
- <pre>template &lt;class charT, class traits, class Allocator&gt;
-explicit bitset (const basic_string&lt;charT, traits, Allocator&gt;&amp; str, ...);</pre>
-</blockquote>
-
-<p>According to the compiler vendor, Steve Adamcyk at EDG, the user
-cannot pass this template constructor a <tt>const char*</tt> and
-expect a conversion to <tt>basic_string</tt>. The reason is
-"When you have a template constructor, it can get used in
-contexts where type deduction can be done. Type deduction basically
-comes up with exact matches, not ones involving conversions."
-</p>
-
-<p>I don't think the intention when this constructor became
-templatized was for construction from a <tt>const char*</tt> to no
-longer work.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> a bitset constructor declaration</p>
-
-<blockquote>
- <pre>explicit bitset(const char*);</pre>
-</blockquote>
-
-<p>and in Section 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> add:</p>
-
-<blockquote>
- <pre>explicit bitset(const char* str);</pre>
- <p>Effects: <br>
- &nbsp;&nbsp;&nbsp; Calls <tt>bitset((string) str, 0, string::npos);</tt></p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Although the problem is real, the standard is designed that way so
-it is not a defect. Education is the immediate workaround. A future
-standard may wish to consider the Proposed Resolution as an
-extension.</p>
-<hr>
-<a name="121"><h3>121.&nbsp;Detailed definition for ctype&lt;wchar_t&gt; specialization</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>Section 22.1.1.1.1 has the following listed in Table 51: ctype&lt;char&gt; ,
-ctype&lt;wchar_t&gt;. </p>
-
-<p>Also Section 22.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype"> [lib.locale.ctype]</a> says: </p>
-
-<blockquote>
- <p>The instantiations required in Table 51 (22.1.1.1.1) namely ctype&lt;char&gt; and
- ctype&lt;wchar_t&gt; , implement character classing appropriate to the implementation's
- native character set. </p>
-</blockquote>
-
-<p>However, Section 22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a>
-only has a detailed description of the ctype&lt;char&gt; specialization, not the
-ctype&lt;wchar_t&gt; specialization. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the ctype&lt;wchar_t&gt; detailed class description to Section
-22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a>. </p>
-<p><b>Rationale:</b></p>
-<p>Specialization for wchar_t is not needed since the default is acceptable.</p>
-<hr>
-<a name="128"><h3>128.&nbsp;Need open_mode() function for file stream, string streams, file buffers, and string&nbsp; buffers</h3></a><p><b>Section:</b>&nbsp;27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>, 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;22 Feb 1999</p>
-<p>The following question came from Thorsten Herlemann:</p>
-
-<blockquote>
- <p>You can set a mode when constructing or opening a file-stream or
- filebuf, e.g. ios::in, ios::out, ios::binary, ... But how can I get
- that mode later on, e.g. in my own operator &lt;&lt; or operator
- &gt;&gt; or when I want to check whether a file-stream or
- file-buffer object passed as parameter is opened for input or output
- or binary? Is there no possibility? Is this a design-error in the
- standard C++ library? </p>
-</blockquote>
-
-<p>It is indeed impossible to find out what a stream's or stream
-buffer's open mode is, and without that knowledge you don't know
-how certain operations behave. Just think of the append mode. </p>
-
-<p>Both streams and stream buffers should have a <tt>mode()</tt> function that returns the
-current open mode setting. </p>
-<p><b>Proposed resolution:</b></p>
-<p>For stream buffers, add a function to the base class as a non-virtual function
-qualified as const to 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a>:</p>
-
-<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>openmode mode() const</tt>;</p>
-
-<p><b>&nbsp;&nbsp;&nbsp; Returns</b> the current open mode.</p>
-
-<p>With streams, I'm not sure what to suggest. In principle, the mode
-could already be returned by <tt>ios_base</tt>, but the mode is only
-initialized for file and string stream objects, unless I'm overlooking
-anything. For this reason it should be added to the most derived
-stream classes. Alternatively, it could be added to <tt>basic_ios</tt>
-and would be default initialized in <tt>basic_ios&lt;&gt;::init()</tt>.</p>
-<p><b>Rationale:</b></p>
-<p>This might be an interesting extension for some future, but it is
-not a defect in the current standard. The Proposed Resolution is
-retained for future reference.</p>
-<hr>
-<a name="131"><h3>131.&nbsp;list::splice throws nothing</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>What happens if a splice operation causes the size() of a list to grow
-beyond max_size()?</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Size() cannot grow beyond max_size().&nbsp; </p>
-<hr>
-<a name="135"><h3>135.&nbsp;basic_iostream doubly initialized</h3></a><p><b>Section:</b>&nbsp;27.6.1.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.cons"> [lib.iostream.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>-1- Effects Constructs an object of class basic_iostream, assigning
-initial values to the base classes by calling
-basic_istream&lt;charT,traits&gt;(sb) (lib.istream) and
-basic_ostream&lt;charT,traits&gt;(sb) (lib.ostream)</p>
-
-<p>The called for basic_istream and basic_ostream constructors call
-init(sb). This means that the basic_iostream's virtual base class is
-initialized twice.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.6.1.5.1, paragraph 1 to:</p>
-
-<p>-1- Effects Constructs an object of class basic_iostream, assigning
-initial values to the base classes by calling
-basic_istream&lt;charT,traits&gt;(sb) (lib.istream).</p>
-<p><b>Rationale:</b></p>
-<p>The LWG agreed that the <tt> init()</tt> function is called
-twice, but said that this is harmless and so not a defect in the
-standard.</p>
-<hr>
-<a name="138"><h3>138.&nbsp;Class ctype_byname&lt;char&gt; redundant and misleading</h3></a><p><b>Section:</b>&nbsp;22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;March 18, 1999</p>
-<p>Section 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> specifies that
-ctype_byname&lt;char&gt; must be a specialization of the ctype_byname
-template.</p>
-
-<p>It is common practice in the standard that specializations of class templates are only
-mentioned where the interface of the specialization deviates from the interface of the
-template that it is a specialization of. Otherwise, the fact whether or not a required
-instantiation is an actual instantiation or a specialization is left open as an
-implementation detail. </p>
-
-<p>Clause 22.2.1.4 deviates from that practice and for that reason is misleading. The
-fact, that ctype_byname&lt;char&gt; is specified as a specialization suggests that there
-must be something "special" about it, but it has the exact same interface as the
-ctype_byname template. Clause 22.2.1.4 does not have any explanatory value, is at best
-redundant, at worst misleading - unless I am missing anything. </p>
-
-<p>Naturally, an implementation will most likely implement ctype_byname&lt;char&gt; as a
-specialization, because the base class ctype&lt;char&gt; is a specialization with an
-interface different from the ctype template, but that's an implementation detail and need
-not be mentioned in the standard. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p> The standard as written is mildly misleading, but the correct fix
-is to deal with the underlying problem in the ctype_byname base class,
-not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
-<hr>
-<a name="140"><h3>140.&nbsp;map&lt;Key, T&gt;::value_type does not satisfy the assignable requirement</h3></a><p><b>Section:</b>&nbsp;23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Mark Mitchell&nbsp; <b>Date:</b>&nbsp;14 Apr 1999</p>
-<blockquote>
- <p>23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a><br>
- <br>
- expression&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return type
- &nbsp;&nbsp;&nbsp;&nbsp; pre/post-condition<br>
- -------------&nbsp;&nbsp;&nbsp;&nbsp; ----------- &nbsp;&nbsp;&nbsp;&nbsp;
- -------------------<br>
- X::value_type&nbsp;&nbsp;&nbsp; T
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- T is assignable<br>
- <br>
- 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a><br>
- <br>
- A map satisfies all the requirements of a container.<br>
- <br>
- For a map&lt;Key, T&gt; ... the value_type is pair&lt;const Key, T&gt;.</p>
-</blockquote>
-
-<p>There's a contradiction here. In particular, `pair&lt;const Key,
-T&gt;' is not assignable; the `const Key' cannot be assigned
-to. So,&nbsp; map&lt;Key, T&gt;::value_type does not satisfy the
-assignable requirement imposed by a container.</p>
-
-<p><i>[See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for the slightly related issue of
-modification of set keys.]</i></p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes that the standard is inconsistent, but that this
-is a design problem rather than a strict defect. May wish to
-reconsider for the next standard.</p>
-<hr>
-<a name="143"><h3>143.&nbsp;C .h header wording unclear</h3></a><p><b>Section:</b>&nbsp;D.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.c.headers"> [depr.c.headers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Christophe de Dinechin&nbsp; <b>Date:</b>&nbsp;4 May 1999</p>
-<p>[depr.c.headers] paragraph 2 reads:</p>
-
-<blockquote>
-
-<p>Each C header, whose name has the form name.h, behaves as if each
-name placed in the Standard library namespace by the corresponding
-cname header is also placed within the namespace scope of the
-namespace std and is followed by an explicit using-declaration
-(_namespace.udecl_)</p>
-
-</blockquote>
-
-<p>I think it should mention the global name space somewhere...&nbsp;
-Currently, it indicates that name placed in std is also placed in
-std...</p>
-
-<p>I don't know what is the correct wording. For instance, if struct
-tm is defined in time.h, ctime declares std::tm. However, the current
-wording seems ambiguous regarding which of the following would occur
-for use of both ctime and time.h:</p>
-
-<blockquote>
- <pre>// version 1:
-namespace std {
- struct tm { ... };
-}
-using std::tm;
-
-// version 2:
-struct tm { ... };
-namespace std {
- using ::tm;
-}
-
-// version 3:
-struct tm { ... };
-namespace std {
- struct tm { ... };
-}</pre>
-</blockquote>
-
-<p>I think version 1 is intended.</p>
-
-<p><i>[Kona: The LWG agreed that the wording is not clear. It also
-agreed that version 1 is intended, version 2 is not equivalent to
-version 1, and version 3 is clearly not intended. The example below
-was constructed by Nathan Myers to illustrate why version 2 is not
-equivalent to version 1.</i></p>
-
-<p><i>Although not equivalent, the LWG is unsure if (2) is enough of
-a problem to be prohibited. Points discussed in favor of allowing
-(2):</i></p>
-
-<blockquote>
- <ul>
- <li><i>It may be a convenience to implementors.</i></li>
- <li><i>The only cases that fail are structs, of which the C library
- contains only a few.</i></li>
- </ul>
-</blockquote>
-
-<p><i>]</i></p>
-
-<p><b>Example:</b></p>
-
-<blockquote>
-
-<pre>#include &lt;time.h&gt;
-#include &lt;utility&gt;
-
-int main() {
- std::tm * t;
- make_pair( t, t ); // okay with version 1 due to Koenig lookup
- // fails with version 2; make_pair not found
- return 0;
-}</pre>
-
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-
-<p>Replace D.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.c.headers"> [depr.c.headers]</a> paragraph 2 with:</p>
-
-<blockquote>
-
-<p> Each C header, whose name has the form name.h, behaves as if each
-name placed in the Standard library namespace by the corresponding
-cname header is also placed within the namespace scope of the
-namespace std by name.h and is followed by an explicit
-using-declaration (_namespace.udecl_) in global scope.</p>
-
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p> The current wording in the standard is the result of a difficult
-compromise that averted delay of the standard. Based on discussions
-in Tokyo it is clear that there is no still no consensus on stricter
-wording, so the issue has been closed. It is suggested that users not
-write code that depends on Koenig lookup of C library functions.</p>
-<hr>
-<a name="145"><h3>145.&nbsp;adjustfield lacks default value</h3></a><p><b>Section:</b>&nbsp;27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;12 May 1999</p>
-<p>There is no initial value for the adjustfield defined, although
-many people believe that the default adjustment were right. This is a
-common misunderstanding. The standard only defines that, if no
-adjustment is specified, all the predefined inserters must add fill
-characters before the actual value, which is "as if" the
-right flag were set. The flag itself need not be set.</p>
-
-<p>When you implement a user-defined inserter you cannot rely on right
-being the default setting for the adjustfield. Instead, you must be
-prepared to find none of the flags set and must keep in mind that in
-this case you should make your inserter behave "as if" the
-right flag were set. This is surprising to many people and complicates
-matters more than necessary.</p>
-
-<p>Unless there is a good reason why the adjustfield should not be
-initialized I would suggest to give it the default value that
-everybody expects anyway.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is not a defect. It is deliberate that the default is no bits
-set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> paragraph 19, Table 61 - Fill padding.</p>
-<hr>
-<a name="149"><h3>149.&nbsp;Insert should return iterator to first element inserted</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;28 Jun 1999</p>
-<p>Suppose that c and c1 are sequential containers and i is an
-iterator that refers to an element of c. Then I can insert a copy of
-c1's elements into c ahead of element i by executing </p>
-
-<blockquote>
-
-<pre>c.insert(i, c1.begin(), c1.end());</pre>
-
-</blockquote>
-
-<p>If c is a vector, it is fairly easy for me to find out where the
-newly inserted elements are, even though i is now invalid: </p>
-
-<blockquote>
-
-<pre>size_t i_loc = i - c.begin();
-c.insert(i, c1.begin(), c1.end());</pre>
-
-</blockquote>
-
-<p>and now the first inserted element is at c.begin()+i_loc and one
-past the last is at c.begin()+i_loc+c1.size().<br>
-<br>
-But what if c is a list? I can still find the location of one past the
-last inserted element, because i is still valid. To find the location
-of the first inserted element, though, I must execute something like </p>
-
-<blockquote>
-
-<pre>for (size_t n = c1.size(); n; --n)
- --i;</pre>
-
-</blockquote>
-
-<p>because i is now no longer a random-access iterator.<br>
-<br>
-Alternatively, I might write something like </p>
-
-<blockquote>
-
-<pre>bool first = i == c.begin();
-list&lt;T&gt;::iterator j = i;
-if (!first) --j;
-c.insert(i, c1.begin(), c1.end());
-if (first)
- j = c.begin();
-else
- ++j;</pre>
-
-</blockquote>
-
-<p>which, although wretched, requires less overhead.<br>
-<br>
-But I think the right solution is to change the definition of insert
-so that instead of returning void, it returns an iterator that refers
-to the first element inserted, if any, and otherwise is a copy of its
-first argument.&nbsp; </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes this was an intentional design decision and so is
-not a defect. It may be worth revisiting for the next standard.</p>
-<hr>
-<a name="157"><h3>157.&nbsp;Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>According to paragraphs 2 and 4 of 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>, the
-functions <tt>iword()</tt> and <tt>pword()</tt> "set the
-<tt>badbit</tt> (which might throw an exception)" on
-failure. ... but what does it mean for <tt>ios_base</tt> to set the
-<tt>badbit</tt>? The state facilities of the IOStream library are
-defined in <tt>basic_ios</tt>, a derived class! It would be possible
-to attempt a down cast but then it would be necessary to know the
-character type used...</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a>.</p>
-<hr>
-<a name="162"><h3>162.&nbsp;Really "formatted input functions"?</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>It appears to be somewhat nonsensical to consider the functions
-defined in the paragraphs 1 to 5 to be "Formatted input
-function" but since these functions are defined in a section
-labeled "Formatted input functions" it is unclear to me
-whether these operators are considered formatted input functions which
-have to conform to the "common requirements" from 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>: If this is the case, all manipulators, not just
-<tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set
-(... but setting <tt>noskipws</tt> using the manipulator syntax would
-also skip whitespace :-)</p>
-
-<p>See also issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#166">166</a> for the same problem in formatted
-output</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p>
-<hr>
-<a name="163"><h3>163.&nbsp;Return of <tt>gcount()</tt> after a call to <tt>gcount</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>It is not clear which functions are to be considered unformatted
-input functions. As written, it seems that all functions in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> are unformatted input functions. However, it does not
-really make much sense to construct a sentry object for
-<tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what
-happens to the <tt>gcount()</tt> if eg. <tt>gcount()</tt>,
-<tt>putback()</tt>, <tt>unget()</tt>, or <tt>sync()</tt> is called:
-These functions don't extract characters, some of them even
-"unextract" a character. Should this still be reflected in
-<tt>gcount()</tt>? Of course, it could be read as if after a call to
-<tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt> (the last
-unformatted input function, <tt>gcount()</tt>, didn't extract any
-character) and after a call to <tt>putback()</tt> <tt>gcount()</tt>
-returns <tt>-1</tt> (the last unformatted input function
-<tt>putback()</tt> did "extract" back into the
-stream). Correspondingly for <tt>unget()</tt>. Is this what is
-intended? If so, this should be clarified. Otherwise, a corresponding
-clarification should be used.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate.&nbsp; See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p>
-<hr>
-<a name="166"><h3>166.&nbsp;Really "formatted output functions"?</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters"> [lib.ostream.inserters]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>From 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a> it appears that all the functions
-defined in 27.6.2.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters"> [lib.ostream.inserters]</a> have to construct a
-<tt>sentry</tt> object. Is this really intended?</p>
-
-<p>This is basically the same problem as issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#162">162</a> but
-for output instead of input.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p>
-<hr>
-<a name="177"><h3>177.&nbsp;Complex operators cannot be explicitly instantiated</h3></a><p><b>Section:</b>&nbsp;26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;2 Jul 1999</p>
-<p>A user who tries to explicitly instantiate a complex non-member operator will
-get compilation errors. Below is a simplified example of the reason why. The
-problem is that iterator_traits cannot be instantiated on a non-pointer type
-like float, yet when the compiler is trying to decide which operator+ needs to
-be instantiated it must instantiate the declaration to figure out the first
-argument type of a reverse_iterator operator.</p>
-<pre>namespace std {
-template &lt;class Iterator&gt;
-struct iterator_traits
-{
- typedef typename Iterator::value_type value_type;
-};
-
-template &lt;class T&gt; class reverse_iterator;
-
-// reverse_iterator operator+
-template &lt;class T&gt;
-reverse_iterator&lt;T&gt; operator+
-(typename iterator_traits&lt;T&gt;::difference_type, const reverse_iterator&lt;T&gt;&amp;);
-
-template &lt;class T&gt; struct complex {};
-
-// complex operator +
-template &lt;class T&gt;
-complex&lt;T&gt; operator+ (const T&amp; lhs, const complex&lt;T&gt;&amp; rhs)
-{ return complex&lt;T&gt;();}
-}
-
-// request for explicit instantiation
-template std::complex&lt;float&gt; std::operator+&lt;float&gt;(const float&amp;,
- const std::complex&lt;float&gt;&amp;);</pre>
-<p>See also c++-stdlib reflector messages: lib-6814, 6815, 6816.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Implementors can make minor changes and the example will
-work. Users are not affected in any case.</p> <p>According to John
-Spicer, It is possible to explicitly instantiate these operators using
-different syntax: change "std::operator+&lt;float&gt;" to
-"std::operator+".</p>
-
-<p>The proposed resolution of issue 120 is that users will not be able
-to explicitly instantiate standard library templates. If that
-resolution is accepted then library implementors will be the only ones
-that will be affected by this problem, and they must use the indicated
-syntax.</p>
-<hr>
-<a name="178"><h3>178.&nbsp;Should clog and cerr initially be tied to cout?</h3></a><p><b>Section:</b>&nbsp;27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;2 Jul 1999</p>
-<p>
-Section 27.3.1 says "After the object cerr is initialized,
-cerr.flags() &amp; unitbuf is nonzero. Its state is otherwise the same as
-required for ios_base::init (lib.basic.ios.cons). It doesn't say
-anything about the the state of clog. So this means that calling
-cerr.tie() and clog.tie() should return 0 (see Table 89 for
-ios_base::init effects).
-</p>
-<p>
-Neither of the popular standard library implementations
-that I tried does this, they both tie cerr and clog
-to &amp;cout. I would think that would be what users expect.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The standard is clear as written.</p>
-<p>27.3.1/5 says that "After the object cerr is initialized, cerr.flags()
-&amp; unitbuf is nonzero. Its state is otherwise the same as required for
-ios_base::init (27.4.4.1)." Table 89 in 27.4.4.1, which gives the
-postconditions of basic_ios::init(), says that tie() is 0. (Other issues correct
-ios_base::init to basic_ios::init().)</p>
-<hr>
-<a name="180"><h3>180.&nbsp;Container member iterator arguments constness has unintended consequences</h3></a><p><b>Section:</b>&nbsp;23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;1 Jul 1999</p>
-<p>It is the constness of the container which should control whether
-it can be modified through a member function such as erase(), not the
-constness of the iterators. The iterators only serve to give
-positioning information.</p>
-
-<p>Here's a simple and typical example problem which is currently very
-difficult or impossible to solve without the change proposed
-below.</p>
-
-<p>Wrap a standard container C in a class W which allows clients to
-find and read (but not modify) a subrange of (C.begin(), C.end()]. The
-only modification clients are allowed to make to elements in this
-subrange is to erase them from C through the use of a member function
-of W.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change all non-const iterator parameters of standard library
-container member functions to accept const_iterator parameters.
-Note that this change applies to all library clauses, including
-strings.</p>
-
-<p>For example, in 21.3.5.5 change:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>iterator erase(iterator p);</tt><br>
-<br>
-to:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>iterator erase(const_iterator p);</tt>
-</p>
-<p><b>Rationale:</b></p>
-<p>The issue was discussed at length. It was generally agreed that 1)
-There is no major technical argument against the change (although
-there is a minor argument that some obscure programs may break), and
-2) Such a change would not break const correctness. The concerns about
-making the change were 1) it is user detectable (although only in
-boundary cases), 2) it changes a large number of signatures, and 3) it
-seems more of a design issue that an out-and-out defect.</p>
-
-<p>The LWG believes that this issue should be considered as part of a
-general review of const issues for the next revision of the
-standard. Also see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>.</p>
-<hr>
-<a name="188"><h3>188.&nbsp;valarray helpers missing augmented assignment operators</h3></a><p><b>Section:</b>&nbsp;26.5.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.cassign"> [lib.valarray.cassign]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Gabriel Dos Reis&nbsp; <b>Date:</b>&nbsp;15 Aug 1999</p>
-<p>26.5.2.6 defines augmented assignment operators
-valarray&lt;T&gt;::op=(const T&amp;), but fails to provide
-corresponding versions for the helper classes. Thus making the
-following illegal:</p>
-<blockquote>
-<pre>#include &lt;valarray&gt;
-
-int main()
-{
-std::valarray&lt;double&gt; v(3.14, 1999);
-
-v[99] *= 2.0; // Ok
-
-std::slice s(0, 50, 2);
-
-v[s] *= 2.0; // ERROR
-}</pre>
-</blockquote>
-<p>I can't understand the intent of that omission. It makes the
-valarray library less intuitive and less useful.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Although perhaps an unfortunate
-design decision, the omission is not a defect in the current
-standard.&nbsp; A future standard may wish to add the missing
-operators.</p>
-<hr>
-<a name="190"><h3>190.&nbsp;min() and max() functions should be std::binary_functions</h3></a><p><b>Section:</b>&nbsp;25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Mark Rintoul&nbsp; <b>Date:</b>&nbsp;26 Aug 1999</p>
-<p>Both std::min and std::max are defined as template functions. This
-is very different than the definition of std::plus (and similar
-structs) which are defined as function objects which inherit
-std::binary_function.<br>
-<br>
- This lack of inheritance leaves std::min and std::max somewhat useless in standard library algorithms which require
-a function object that inherits std::binary_function.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Although perhaps an unfortunate design decision, the omission is not a defect
-in the current standard.&nbsp; A future standard may wish to consider additional
-function objects.</p>
-<hr>
-<a name="191"><h3>191.&nbsp;Unclear complexity for algorithms such as binary search</h3></a><p><b>Section:</b>&nbsp;25.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.binary.search"> [lib.alg.binary.search]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;10 Oct 1999</p>
-<p>The complexity of binary_search() is stated as "At most
-log(last-first) + 2 comparisons", which seems to say that the
-algorithm has logarithmic complexity. However, this algorithms is
-defined for forward iterators. And for forward iterators, the need to
-step element-by-element results into linear complexity. But such a
-statement is missing in the standard. The same applies to
-lower_bound(), upper_bound(), and equal_range().&nbsp;<br>
-<br>
-However, strictly speaking the standard contains no bug here. So this
-might considered to be a clarification or improvement.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The complexity is expressed in terms of comparisons, and that
-complexity can be met even if the number of iterators accessed is
-linear. Paragraph 1 already says exactly what happens to
-iterators.</p>
-<hr>
-<a name="192"><h3>192.&nbsp;a.insert(p,t) is inefficient and overconstrained</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Ed Brey&nbsp; <b>Date:</b>&nbsp;6 Jun 1999</p>
-<p>As defined in 23.1.2, paragraph 7 (table 69), a.insert(p,t) suffers from
-several problems:</p>
-<table border="1" cellpadding="5">
- <tbody><tr>
- <td><b>expression</b></td>
- <td><b>return type</b></td>
- <td><b>pre/post-condition</b></td>
- <td><b>complexity</b></td>
- </tr>
- <tr>
- <td><tt>a.insert(p,t)</tt></td>
- <td><tt>iterator</tt></td>
- <td>inserts t if and only if there is no element with key equivalent to the key of
- t in containers with unique keys; always inserts t in containers with equivalent
- keys. always returns the iterator pointing to the element with key equivalent to
- the key of t . iterator p is a hint pointing to where the insert should start to search.</td>
- <td>logarithmic in general, but amortized constant if t is inserted right after p .</td>
- </tr>
-</tbody></table>
-<p>1. For a container with unique keys, only logarithmic complexity is
-guaranteed if no element is inserted, even though constant complexity is always
-possible if p points to an element equivalent to t.</p>
-<p>2. For a container with equivalent keys, the amortized constant complexity
-guarantee is only useful if no key equivalent to t exists in the container.
-Otherwise, the insertion could occur in one of multiple locations, at least one
-of which would not be right after p.</p>
-<p>3. By guaranteeing amortized constant complexity only when t is inserted
-after p, it is impossible to guarantee constant complexity if t is inserted at
-the beginning of the container. Such a problem would not exist if amortized
-constant complexity was guaranteed if t is inserted before p, since there is
-always some p immediately before which an insert can take place.</p>
-<p>4. For a container with equivalent keys, p does not allow specification of
-where to insert the element, but rather only acts as a hint for improving
-performance. This negates the added functionality that p would provide if it
-specified where within a sequence of equivalent keys the insertion should occur.
-Specifying the insert location provides more control to the user, while
-providing no disadvantage to the container implementation.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> paragraph 7, replace the row in table 69
-for a.insert(p,t) with the following two rows:</p>
-<table border="1" cellpadding="5">
- <tbody><tr>
- <td><b>expression</b></td>
- <td><b>return type</b></td>
- <td><b>pre/post-condition</b></td>
- <td><b>complexity</b></td>
- </tr>
- <tr>
- <td><tt>a_uniq.insert(p,t)</tt></td>
- <td><tt>iterator</tt></td>
- <td>inserts t if and only if there is no element with key equivalent to the
- key of t. returns the iterator pointing to the element with key equivalent
- to the key of t.</td>
- <td>logarithmic in general, but amortized constant if t is inserted right
- before p or p points to an element with key equivalent to t.</td>
- </tr>
- <tr>
- <td><tt>a_eq.insert(p,t)</tt></td>
- <td><tt>iterator</tt></td>
- <td>inserts t and returns the iterator pointing to the newly inserted
- element. t is inserted right before p if doing so preserves the container
- ordering.</td>
- <td>logarithmic in general, but amortized constant if t is inserted right
- before p.</td>
- </tr>
-</tbody></table>
-
-<p><b>Rationale:</b></p>
-<p>Too big a change.&nbsp; Furthermore, implementors report checking
-both before p and after p, and don't want to change this behavior.</p>
-<hr>
-<a name="194"><h3>194.&nbsp;rdbuf() functions poorly specified</h3></a><p><b>Section:</b>&nbsp;27.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios"> [lib.ios]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;7 Sep 1999</p>
-<p>In classic iostreams, base class ios had an rdbuf function that returned a
-pointer to the associated streambuf. Each derived class had its own rdbuf
-function that returned a pointer of a type reflecting the actual type derived
-from streambuf. Because in ARM C++, virtual function overrides had to have the
-same return type, rdbuf could not be virtual.</p>
-<p>In standard iostreams, we retain the non-virtual rdbuf function design, and
-in addition have an overloaded rdbuf function that sets the buffer pointer.
-There is no need for the second function to be virtual nor to be implemented in
-derived classes.</p>
-<p>Minor question: Was there a specific reason not to make the original rdbuf
-function virtual?</p>
-<p>Major problem: Friendly compilers warn about functions in derived classes
-that hide base-class overloads. Any standard implementation of iostreams will
-result in such a warning on each of the iostream classes, because of the
-ill-considered decision to overload rdbuf only in a base class.</p>
-<p>In addition, users of the second rdbuf function must use explicit
-qualification or a cast to call it from derived classes. An explicit
-qualification or cast to basic_ios would prevent access to any later overriding
-version if there was one.</p>
-<p>What I'd like to do in an implementation is add a using- declaration for the
-second rdbuf function in each derived class. It would eliminate warnings about
-hiding functions, and would enable access without using explicit qualification.
-Such a change I don't think would change the behavior of any valid program, but
-would allow invalid programs to compile:</p>
-<blockquote>
- <pre> filebuf mybuf;
- fstream f;
- f.rdbuf(mybuf); // should be an error, no visible rdbuf</pre>
-</blockquote>
-<p>I'd like to suggest this problem as a defect, with the proposed resolution to
-require the equivalent of a using-declaration for the rdbuf function that is not
-replaced in a later derived class. We could discuss whether replacing the
-function should be allowed.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>For historical reasons, the standard is correct as written. There is a subtle difference between the base
-class <tt> rdbuf()</tt> and derived class <tt>rdbuf()</tt>. The derived
-class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base class
-<tt> rdbuf()</tt> will return the "current streambuf" if that has been changed by the variant you mention.</p>
-
-<p>Permission is not required to add such an extension. See
-17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a>.</p>
-<hr>
-<a name="196"><h3>196.&nbsp;Placement new example has alignment problems</h3></a><p><b>Section:</b>&nbsp;18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Herb Sutter&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>The example in 18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> paragraph 4 reads: </p>
-
-<blockquote>
-
-<p>[Example: This can be useful for constructing an object at a known address:<br>
-<br>
-<tt>&nbsp;&nbsp; char place[sizeof(Something)];<br>
-&nbsp;&nbsp; Something* p = new (place) Something();<br>
-<br>
-</tt>end example] </p>
-
-</blockquote>
-
-<p>This example has potential alignment problems. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate: see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>.</p>
-<hr>
-<a name="197"><h3>197.&nbsp;max_size() underspecified</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;21 Oct 1999</p>
-<p>Must the value returned by max_size() be unchanged from call to call? </p>
-
-<p>Must the value returned from max_size() be meaningful? </p>
-
-<p>Possible meanings identified in lib-6827: </p>
-
-<p>1) The largest container the implementation can support given "best
-case" conditions - i.e. assume the run-time platform is "configured to
-the max", and no overhead from the program itself. This may possibly
-be determined at the point the library is written, but certainly no
-later than compile time.<br>
-<br>
-2) The largest container the program could create, given "best case"
-conditions - i.e. same platform assumptions as (1), but take into
-account any overhead for executing the program itself. (or, roughly
-"storage=storage-sizeof(program)"). This does NOT include any resource
-allocated by the program. This may (or may not) be determinable at
-compile time.<br>
-<br>
-3) The largest container the current execution of the program could
-create, given knowledge of the actual run-time platform, but again,
-not taking into account any currently allocated resource. This is
-probably best determined at program start-up.<br>
-<br>
-4) The largest container the current execution program could create at
-the point max_size() is called (or more correctly at the point
-max_size() returns :-), given it's current environment (i.e. taking
-into account the actual currently available resources). This,
-obviously, has to be determined dynamically each time max_size() is
-called. </p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>max_size() isn't useful for very many things, and the existing
- wording is sufficiently clear for the few cases that max_size() can
- be used for. None of the attempts to change the existing wording
- were an improvement.</p>
-
-<p>It is clear to the LWG that the value returned by max_size() can't
- change from call to call.</p>
-
-<hr>
-<a name="203"><h3>203.&nbsp;basic_istream::sentry::sentry() is uninstantiable with ctype&lt;user-defined type&gt;</h3></a><p><b>Section:</b>&nbsp;27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt McClure and Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;1 Jan 2000</p>
-<p>27.6.1.1.2 Paragraph 4 states:</p>
-<blockquote>
- <p>To decide if the character c is a whitespace character, the constructor
- performs ''as if'' it executes the following code fragment:&nbsp;</p>
- <pre>const ctype&lt;charT&gt;&amp; ctype = use_facet&lt;ctype&lt;charT&gt; &gt;(is.getloc());
-if (ctype.is(ctype.space,c)!=0)
-// c is a whitespace character.</pre>
-</blockquote>
-
-<p> But Table 51 in 22.1.1.1.1 only requires an implementation to
-provide specializations for ctype&lt;char&gt; and
-ctype&lt;wchar_t&gt;. If sentry's constructor is implemented using
-ctype, it will be uninstantiable for a user-defined character type
-charT, unless the implementation has provided non-working (since it
-would be impossible to define a correct ctype&lt;charT&gt; specialization
-for an arbitrary charT) definitions of ctype's virtual member
-functions.</p>
-
-<p>
-It seems the intent the standard is that sentry should behave, in
-every respect, not just during execution, as if it were implemented
-using ctype, with the burden of providing a ctype specialization
-falling on the user. But as it is written, nothing requires the
-translation of sentry's constructor to behave as if it used the above
-code, and it would seem therefore, that sentry's constructor should be
-instantiable for all character types.
-</p>
-
-<p>
-Note: If I have misinterpreted the intent of the standard with
-respect to sentry's constructor's instantiability, then a note should
-be added to the following effect:
-</p>
-
-<blockquote>
-An implementation is forbidden from using the above code if it renders
-the constructor uninstantiable for an otherwise valid character
-type.
-</blockquote>
-
-<p>In any event, some clarification is needed.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>It is possible but not easy to instantiate on types other than char
-or wchar_t; many things have to be done first. That is by intention
-and is not a defect.</p>
-<hr>
-<a name="204"><h3>204.&nbsp;distance(first, last) when "last" is before "first"</h3></a><p><b>Section:</b>&nbsp;24.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.operations"> [lib.iterator.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Rintala Matti&nbsp; <b>Date:</b>&nbsp;28 Jan 2000</p>
-<p>Section 24.3.4 describes the function distance(first, last) (where first and
-last are iterators) which calculates "the number of increments or
-decrements needed to get from 'first' to 'last'".</p>
-<p>The function should work for forward, bidirectional and random access
-iterators, and there is a requirement 24.3.4.5 which states that "'last'
-must be reachable from 'first'".</p>
-<p>With random access iterators the function is easy to implement as "last
-- first".</p>
-<p>With forward iterators it's clear that 'first' must point to a place before
-'last', because otherwise 'last' would not be reachable from 'first'.</p>
-<p>But what about bidirectional iterators? There 'last' is reachable from
-'first' with the -- operator even if 'last' points to an earlier position than
-'first'. However, I cannot see how the distance() function could be implemented
-if the implementation does not know which of the iterators points to an earlier
-position (you cannot use ++ or -- on either iterator if you don't know which
-direction is the "safe way to travel").</p>
-<p>The paragraph 24.3.4.1 states that "for ... bidirectional iterators they
-use ++ to provide linear time implementations". However, the ++ operator is
-not mentioned in the reachability requirement. Furthermore 24.3.4.4 explicitly
-mentions that distance() returns the number of increments _or decrements_,
-suggesting that it could return a negative number also for bidirectional
-iterators when 'last' points to a position before 'first'.</p>
-<p>Is a further requirement is needed to state that for forward and
-bidirectional iterators "'last' must be reachable from 'first' using the ++
-operator". Maybe this requirement might also apply to random access
-iterators so that distance() would work the same way for every iterator
-category?</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>"Reachable" is defined in the standard in 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> paragraph 6.
-The definition is only in terms of operator++(). The LWG sees no defect in
-the standard.</p>
-<hr>
-<a name="205"><h3>205.&nbsp; numeric_limits unclear on how to determine floating point types</h3></a><p><b>Section:</b>&nbsp;18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Cleary&nbsp; <b>Date:</b>&nbsp;28 Jan 2000</p>
-<p>In several places in 18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a>, a member is
-described as "Meaningful for all floating point types."
-However, no clear method of determining a floating point type is
-provided.</p>
-
-<p>In 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>, paragraph 1 states ". . . (for
-example, epsilon() is only meaningful if is_integer is
-false). . ." which suggests that a type is a floating point type
-if is_specialized is true and is_integer is false; however, this is
-unclear.</p>
-
-<p>When clarifying this, please keep in mind this need of users: what
-exactly is the definition of floating point? Would a fixed point or
-rational representation be considered one? I guess my statement here
-is that there could also be types that are neither integer or
-(strictly) floating point.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>It is up to the implementor of a user define type to decide if it is a
-floating point type.</p>
-<hr>
-<a name="207"><h3>207.&nbsp;ctype&lt;char&gt; members return clause incomplete</h3></a><p><b>Section:</b>&nbsp;22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Robert Klarer&nbsp; <b>Date:</b>&nbsp;2 Nov 1999</p>
-<p>
-The <tt>widen</tt> and <tt>narrow</tt> member functions are described
-in 22.2.1.3.2, paragraphs 9-11. In each case we have two overloaded
-signatures followed by a <b>Returns</b> clause. The <b>Returns</b>
-clause only describes one of the overloads.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>
-paragraph 10 from:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
-
-<p>to:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to),
-respectively.</p>
-
-<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> paragraph 11
-from:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(low, high, to).</p>
-
-<p>to:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(c) or do_narrow(low, high, to),
-respectively.</p>
-<p><b>Rationale:</b></p>
-<p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>, which addresses the same
-paragraphs.</p>
-<hr>
-<a name="213"><h3>213.&nbsp;Math function overloads ambiguous</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;26 Feb 2000</p>
-<p>Due to the additional overloaded versions of numeric functions for
-float and long double according to Section 26.5, calls such as int x;
-std::pow (x, 4) are ambiguous now in a standard conforming
-implementation. Current implementations solve this problem very
-different (overload for all types, don't overload for float and long
-double, use preprocessor, follow the standard and get
-ambiguities).</p> <p>This behavior should be standardized or at least
-identified as implementation defined.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>These math issues are an
-understood and accepted consequence of the design. They have
-been discussed several times in the past. Users must write casts
-or write floating point expressions as arguments.</p>
-<hr>
-<a name="215"><h3>215.&nbsp;Can a map's key_type be const?</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;29 Feb 2000</p>
-<p>A user noticed that this doesn't compile with the Rogue Wave library because
-the rb_tree class declares a key_allocator, and allocator&lt;const int&gt; is
-not legal, I think:</p>
-<blockquote>
- <pre>map &lt; const int, ... &gt; // legal?</pre>
-</blockquote>
-<p>which made me wonder whether it is legal for a map's key_type to be const. In
-email from Matt Austern he said:</p>
-<blockquote>
-<p>I'm not sure whether it's legal to declare a map with a const key type. I
-hadn't thought about that question until a couple weeks ago. My intuitive
-feeling is that it ought not to be allowed, and that the standard ought to say
-so. It does turn out to work in SGI's library, though, and someone in the
-compiler group even used it. Perhaps this deserves to be written up as an issue
-too.</p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The "key is assignable" requirement from table 69 in
-23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> already implies the key cannot be const.</p>
-<hr>
-<a name="216"><h3>216.&nbsp;setbase manipulator description flawed</h3></a><p><b>Section:</b>&nbsp;27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Hyman Rosen&nbsp; <b>Date:</b>&nbsp;29 Feb 2000</p>
-<p>27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> paragraph 5 says:</p>
-<blockquote>
-<pre>smanip setbase(int base);</pre>
-<p> Returns: An object s of unspecified type such that if out is an
-(instance of) basic_ostream then the expression out&lt;&lt;s behaves
-as if f(s) were called, in is an (instance of) basic_istream then the
-expression in&gt;&gt;s behaves as if f(s) were called. Where f can be
-defined as:</p>
-<pre>ios_base&amp; f(ios_base&amp; str, int base)
-{
- // set basefield
- str.setf(n == 8 ? ios_base::oct :
- n == 10 ? ios_base::dec :
- n == 16 ? ios_base::hex :
- ios_base::fmtflags(0), ios_base::basefield);
- return str;
-}</pre>
-</blockquote>
-<p>There are two problems here. First, f takes two parameters, so the
-description needs to say that out&lt;&lt;s and in&gt;&gt;s behave as if f(s,base)
-had been called. Second, f is has a parameter named base, but is written as if
-the parameter was named n.</p>
-<p>Actually, there's a third problem. The paragraph has grammatical errors.
-There needs to be an "and" after the first comma, and the "Where
-f" sentence fragment needs to be merged into its preceding sentence. You
-may also want to format the function a little better. The formatting above is
-more-or-less what the Standard contains.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The resolution of this defect is subsumed by the proposed resolution for
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a>.</p>
-
-<p><i>[Tokyo: The LWG agrees that this is a defect and notes that it
-occurs additional places in the section, all requiring fixes.]</i></p>
-<hr>
-<a name="218"><h3>218.&nbsp;Algorithms do not use binary predicate objects for default comparisons</h3></a><p><b>Section:</b>&nbsp;25.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.sorting"> [lib.alg.sorting]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Pablo Halpern&nbsp; <b>Date:</b>&nbsp;6 Mar 2000</p>
-<p>Many of the algorithms take an argument, pred, of template parameter type
-BinaryPredicate or an argument comp of template parameter type Compare. These
-algorithms usually have an overloaded version that does not take the predicate
-argument. In these cases pred is usually replaced by the use of operator== and
-comp is replaced by the use of operator&lt;.</p>
-<p>This use of hard-coded operators is inconsistent with other parts of the
-library, particularly the containers library, where equality is established
-using equal_to&lt;&gt; and ordering is established using less&lt;&gt;. Worse,
-the use of operator&lt;, would cause the following innocent-looking code to have
-undefined behavior:</p>
-<blockquote>
- <pre>vector&lt;string*&gt; vec;
-sort(vec.begin(), vec.end());</pre>
-</blockquote>
-<p>The use of operator&lt; is not defined for pointers to unrelated objects. If
-std::sort used less&lt;&gt; to compare elements, then the above code would be
-well-defined, since less&lt;&gt; is explicitly specialized to produce a total
-ordering of pointers.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This use of operator== and operator&lt; was a very deliberate, conscious, and
-explicitly made design decision; these operators are often more efficient. The
-predicate forms are available for users who don't want to rely on operator== and
-operator&lt;.</p>
-<hr>
-<a name="219"><h3>219.&nbsp;find algorithm missing version that takes a binary predicate argument</h3></a><p><b>Section:</b>&nbsp;25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Pablo Halpern&nbsp; <b>Date:</b>&nbsp;6 Mar 2000</p>
-<p>The find function always searches for a value using operator== to compare the
-value argument to each element in the input iterator range. This is inconsistent
-with other find-related functions such as find_end and find_first_of, which
-allow the caller to specify a binary predicate object to be used for determining
-equality. The fact that this can be accomplished using a combination of find_if
-and bind_1st or bind_2nd does not negate the desirability of a consistent,
-simple, alternative interface to find.</p>
-<p><b>Proposed resolution:</b></p>
-<blockquote>
-<p>In section 25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>, add a second prototype for find
-(between the existing prototype and the prototype for find_if), as
-follows:</p>
-<pre> template&lt;class InputIterator, class T, class BinaryPredicate&gt;
- InputIterator find(InputIterator first, InputIterator last,
- const T&amp; value, BinaryPredicate bin_pred);</pre>
-<p>Change the description of the return from:</p>
-<blockquote>
- <p>Returns: The first iterator i in the range [first, last) for which the following corresponding
- conditions hold: *i == value, pred(*i) != false. Returns last if no such iterator is found.</p>
-</blockquote>
-<p>&nbsp;to:</p>
-<blockquote>
- <p>Returns: The first iterator i in the range [first, last) for which the following&nbsp;
- corresponding condition holds: *i == value, bin_pred(*i,value) != false, pred(*)
- != false. Return last if no such iterator is found.</p>
-</blockquote>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>This is request for a pure extension, so it is not a defect in the
-current standard.&nbsp; As the submitter pointed out, "this can
-be accomplished using a combination of find_if and bind_1st or
-bind_2nd".</p>
-<hr>
-<a name="236"><h3>236.&nbsp;ctype&lt;char&gt;::is() member modifies facet</h3></a><p><b>Section:</b>&nbsp;22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;24 Apr 2000</p>
-<p>The description of the <tt>is()</tt> member in paragraph 4 of 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> is broken: According to this description, the
-second form of the <tt>is()</tt> method modifies the masks in the
-<tt>ctype</tt> object. The correct semantics if, of course, to obtain
-an array of masks. The corresponding method in the general case,
-ie. the <tt>do_is()</tt> method as described in 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> paragraph 1 does the right thing.</p>
-<p><b>Proposed resolution:</b></p>
- <p>Change paragraph 4 from</p>
- <blockquote>
- The second form, for all *p in the range [low, high), assigns
- vec[p-low] to table()[(unsigned char)*p].
- </blockquote>
- <p>to become</p>
- <blockquote>
- The second form, for all *p in the range [low, high), assigns
- table()[(unsigned char)*p] to vec[p-low].
- </blockquote>
-<p><b>Rationale:</b></p>
-<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a>.</p>
-<hr>
-<a name="244"><h3>244.&nbsp;Must <tt>find</tt>'s third argument be CopyConstructible?</h3></a><p><b>Section:</b>&nbsp;25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;02 May 2000</p>
-<p>Is the following implementation of <tt>find</tt> acceptable?</p>
-
-<pre> template&lt;class Iter, class X&gt;
- Iter find(Iter begin, Iter end, const X&amp; x)
- {
- X x1 = x; // this is the crucial statement
- while (begin != end &amp;&amp; *begin != x1)
- ++begin;
- return begin;
- }
-</pre>
-
-<p>If the answer is yes, then it is implementation-dependent as to
-whether the following fragment is well formed:</p>
-
-<pre> vector&lt;string&gt; v;
-
- find(v.begin(), v.end(), "foo");
-</pre>
-
-<p>At issue is whether there is a requirement that the third argument
-of find be CopyConstructible. There may be no problem here, but
-analysis is necessary.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>There is no indication in the standard that find's third argument
-is required to be Copy Constructible. The LWG believes that no such
-requirement was intended. As noted above, there are times when a user
-might reasonably pass an argument that is not Copy Constructible.</p>
-<hr>
-<a name="245"><h3>245.&nbsp;Which operations on <tt>istream_iterator</tt> trigger input operations?</h3></a><p><b>Section:</b>&nbsp;24.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator"> [lib.istream.iterator]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;02 May 2000</p>
-<p>I do not think the standard specifies what operation(s) on istream
-iterators trigger input operations. So, for example:</p>
-
-<pre> istream_iterator&lt;int&gt; i(cin);
-
- int n = *i++;
-</pre>
-
-<p>I do not think it is specified how many integers have been read
-from cin. The number must be at least 1, of course, but can it be 2?
-More?</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The standard is clear as written: the stream is read every time
-operator++ is called, and it is also read either when the iterator is
-constructed or when operator* is called for the first time. In the
-example above, exactly two integers are read from cin.</p>
-
-<p>There may be a problem with the interaction between istream_iterator
-and some STL algorithms, such as find. There are no guarantees about
-how many times find may invoke operator++.</p>
-<hr>
-<a name="246"><h3>246.&nbsp;<tt>a.insert(p,t)</tt> is incorrectly specified</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Mark Rodgers&nbsp; <b>Date:</b>&nbsp;19 May 2000</p>
-<p>Closed issue 192 raised several problems with the specification of
-this function, but was rejected as Not A Defect because it was too big
-a change with unacceptable impacts on existing implementations.
-However, issues remain that could be addressed with a smaller change
-and with little or no consequent impact.</p>
-
-<ol>
- <li>
-<p> The specification is inconsistent with the original
- proposal and with several implementations.</p>
-
- <p>The initial implementation by Hewlett Packard only ever looked
- immediately <i>before</i> p, and I do not believe there was any
- intention to standardize anything other than this behavior.
- Consequently, current implementations by several leading
- implementors also look immediately before p, and will only insert
- after p in logarithmic time. I am only aware of one implementation
- that does actually look after p, and it looks before p as well. It
- is therefore doubtful that existing code would be relying on the
- behavior defined in the standard, and it would seem that fixing
- this defect as proposed below would standardize existing
- practice.</p>
-</li>
-
- <li>
-<p>
- The specification is inconsistent with insertion for sequence
- containers.</p>
-
- <p>This is difficult and confusing to teach to newcomers. All
- insert operations that specify an iterator as an insertion location
- should have a consistent meaning for the location represented by
- that iterator.</p>
-</li>
-
- <li>
-<p> As specified, there is no way to hint that the insertion
- should occur at the beginning of the container, and the way to hint
- that it should occur at the end is long winded and unnatural.</p>
-
- <p>For a container containing n elements, there are n+1 possible
- insertion locations and n+1 valid iterators. For there to be a
- one-to-one mapping between iterators and insertion locations, the
- iterator must represent an insertion location immediately before
- the iterator.</p>
-</li>
-
- <li>
-<p> When appending sorted ranges using insert_iterators,
- insertions are guaranteed to be sub-optimal.</p>
-
- <p>In such a situation, the optimum location for insertion is
- always immediately after the element previously inserted. The
- mechanics of the insert iterator guarantee that it will try and
- insert after the element after that, which will never be correct.
- However, if the container first tried to insert before the hint,
- all insertions would be performed in amortized constant
- time.</p>
-</li>
-</ol>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.1.2 [lib.associative.reqmts] paragraph 7, table 69, make
-the following changes in the row for a.insert(p,t):</p>
-
-<p><i>assertion/note pre/post condition:</i>
-<br>Change the last sentence from</p>
- <blockquote>
- "iterator p is a hint pointing to where the insert should
- start to search."
- </blockquote>
-<p>to</p>
- <blockquote>
- "iterator p is a hint indicating that immediately before p
- may be a correct location where the insertion could occur."
- </blockquote>
-
-<p><i>complexity:</i><br>
-Change the words "right after" to "immediately before".</p>
-<p><b>Rationale:</b></p>
-<p>Duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>.</p>
-<hr>
-<a name="249"><h3>249.&nbsp;Return Type of <tt>auto_ptr::operator=</tt>
-</h3></a><p><b>Section:</b>&nbsp;20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Joseph Gottman&nbsp; <b>Date:</b>&nbsp;30 Jun 2000</p>
-<p>According to section 20.4.5, the function
-<tt>auto_ptr::operator=()</tt> returns a reference to an auto_ptr.
-The reason that <tt>operator=()</tt> usually returns a reference is to
-facilitate code like</p>
-
-<pre> int x,y,z;
- x = y = z = 1;
-</pre>
-
-<p>However, given analogous code for <tt>auto_ptr</tt>s,</p>
-<pre> auto_ptr&lt;int&gt; x, y, z;
- z.reset(new int(1));
- x = y = z;
-</pre>
-
-<p>the result would be that <tt>z</tt> and <tt>y</tt> would both be set to
-NULL, instead of all the <tt>auto_ptr</tt>s being set to the same value.
-This makes such cascading assignments useless and counterintuitive for
-<tt>auto_ptr</tt>s.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change <tt>auto_ptr::operator=()</tt> to return <tt>void</tt> instead
-of an <tt>auto_ptr</tt> reference.</p>
-<p><b>Rationale:</b></p>
-<p>The return value has uses other than cascaded assignments: a user can
-call an auto_ptr member function, pass the auto_ptr to a
-function, etc. Removing the return value could break working user
-code.</p>
-<hr>
-<a name="257"><h3>257.&nbsp;STL functional object and iterator inheritance.</h3></a><p><b>Section:</b>&nbsp;20.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple.tuple"> [lib.tuple.tuple]</a>, 24.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.basic"> [lib.iterator.basic]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Robert Dick &nbsp; <b>Date:</b>&nbsp;17 Aug 2000</p>
-<p>
-According to the November 1997 Draft Standard, the results of deleting an
-object of a derived class through a pointer to an object of its base class are
-undefined if the base class has a non-virtual destructor. Therefore, it is
-potentially dangerous to publicly inherit from such base classes.
-</p>
-
-<p>Defect:
-<br>
-The STL design encourages users to publicly inherit from a number of classes
-which do nothing but specify interfaces, and which contain non-virtual
-destructors.
-</p>
-
-<p>Attribution:
-<br>
-Wil Evers and William E. Kempf suggested this modification for functional
-objects.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-When a base class in the standard library is useful only as an interface
-specifier, i.e., when an object of the class will never be directly
-instantiated, specify that the class contains a protected destructor. This
-will prevent deletion through a pointer to the base class without performance,
-or space penalties (on any implementation I'm aware of).
-</p>
-
-<p>
-As an example, replace...
-</p>
-
-<pre> template &lt;class Arg, class Result&gt;
- struct unary_function {
- typedef Arg argument_type;
- typedef Result result_type;
- };
-</pre>
-
-<p>
-... with...
-</p>
-
-<pre> template &lt;class Arg, class Result&gt;
- struct unary_function {
- typedef Arg argument_type;
- typedef Result result_type;
- protected:
- ~unary_function() {}
- };
-</pre>
-
-<p>
-Affected definitions:
-<br>
- &nbsp;20.3.1 [lib.function.objects] -- unary_function, binary_function
- <br>
- &nbsp;24.3.2 [lib.iterator.basic] -- iterator
-</p>
-<p><b>Rationale:</b></p>
-<p>
-The standard is clear as written; this is a request for change, not a
-defect in the strict sense. The LWG had several different objections
-to the proposed change. One is that it would prevent users from
-creating objects of type <tt>unary_function</tt> and
-<tt>binary_function</tt>. Doing so can sometimes be legitimate, if users
-want to pass temporaries as traits or tag types in generic code.
-</p>
-<hr>
-<a name="267"><h3>267.&nbsp;interaction of strstreambuf::overflow() and seekoff()</h3></a><p><b>Section:</b>&nbsp;D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Oct 2000</p>
-<p>
-It appears that the interaction of the strstreambuf members overflow()
-and seekoff() can lead to undefined behavior in cases where defined
-behavior could reasonably be expected. The following program
-demonstrates this behavior:
-</p>
-
-<pre> #include &lt;strstream&gt;
-
- int main ()
- {
- std::strstreambuf sb;
- sb.sputc ('c');
-
- sb.pubseekoff (-1, std::ios::end, std::ios::in);
- return !('c' == sb.sgetc ());
- }
-</pre>
-
-<p>
-D.7.1.1, p1 initializes strstreambuf with a call to basic_streambuf&lt;&gt;(),
-which in turn sets all pointers to 0 in 27.5.2.1, p1.
-</p>
-
-<p>
-27.5.2.2.5, p1 says that basic_streambuf&lt;&gt;::sputc(c) calls
-overflow(traits::to_int_type(c)) if a write position isn't available (it
-isn't due to the above).
-</p>
-
-<p>
-D.7.1.3, p3 says that strstreambuf::overflow(off, ..., ios::in) makes at
-least one write position available (i.e., it allows the function to make
-any positive number of write positions available).
-</p>
-
-<p>
-D.7.1.3, p13 computes newoff = seekhigh - eback(). In D.7.1, p4 we see
-seekhigh = epptr() ? epptr() : egptr(), or seekhigh = epptr() in this
-case. newoff is then epptr() - eback().
-</p>
-
-<p>
-D.7.1.4, p14 sets gptr() so that gptr() == eback() + newoff + off, or
-gptr() == epptr() + off holds.
-</p>
-
-<p>
-If strstreambuf::overflow() made exactly one write position available
-then gptr() will be set to just before epptr(), and the program will
-return 0. Buf if the function made more than one write position
-available, epptr() and gptr() will both point past pptr() and the
-behavior of the program is undefined.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-
- <p>Change the last sentence of D.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf"> [depr.strstreambuf]</a> paragraph 4 from</p>
-
- <blockquote>
- Otherwise, seeklow equals gbeg and seekhigh is either pend, if
- pend is not a null pointer, or gend.
- </blockquote>
-
- <p>to become</p>
-
- <blockquote>
- Otherwise, seeklow equals gbeg and seekhigh is either gend if
- 0 == pptr(), or pbase() + max where max is the maximum value of
- pptr() - pbase() ever reached for this stream.
- </blockquote>
-
-<p><i>[
- pre-Copenhagen: Dietmar provided wording for proposed resolution.
-]</i></p>
-
-<p><i>[
- post-Copenhagen: Fixed a typo: proposed resolution said to fix
- 4.7.1, not D.7.1.
-]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>This is related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>: it's not clear what it
-means to seek beyond the current area. Without resolving issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a> we can't resolve this. As with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>,
-the library working group does not wish to invest time nailing down
-corner cases in a deprecated feature.</p>
-<hr>
-<a name="269"><h3>269.&nbsp;cstdarg and unnamed parameters</h3></a><p><b>Section:</b>&nbsp;18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;J. Stephen Adamczyk&nbsp; <b>Date:</b>&nbsp;10 Oct 2000</p>
-<p>
-One of our customers asks whether this is valid C++:
-</p>
-
-<pre> #include &lt;cstdarg&gt;
-
- void bar(const char *, va_list);
-
- void
- foo(const char *file, const char *, ...)
- {
- va_list ap;
- va_start(ap, file);
- bar(file, ap);
- va_end(ap);
- }
-</pre>
-
-<p>
-The issue being whether it is valid to use cstdarg when the final
-parameter before the "..." is unnamed. cstdarg is, as far
-as I can tell, inherited verbatim from the C standard. and the
-definition there (7.8.1.1 in the ISO C89 standard) refers to "the
-identifier of the rightmost parameter". What happens when there
-is no such identifier?
-</p>
-
-<p>
-My personal opinion is that this should be allowed, but some tweak
-might be required in the C++ standard.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>
-Not a defect, the C and C++ standards are clear. It is impossible to
-use varargs if the parameter immediately before "..." has no
-name, because that is the parameter that must be passed to va_start.
-The example given above is broken, because va_start is being passed
-the wrong parameter.
-</p>
-
-<p>
-There is no support for extending varargs to provide additional
-functionality beyond what's currently there. For reasons of C/C++
-compatibility, it is especially important not to make gratuitous
-changes in this part of the C++ standard. The C committee has already
-been requested not to touch this part of the C standard unless
-necessary.
-</p>
-<hr>
-<a name="277"><h3>277.&nbsp;Normative encouragement in allocator requirements unclear</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;07 Nov 2000</p>
-<p>
-In 20.1.5, paragraph 5, the standard says that "Implementors are
-encouraged to supply libraries that can accept allocators that
-encapsulate more general memory models and that support non-equal
-instances." This is intended as normative encouragement to
-standard library implementors. However, it is possible to interpret
-this sentence as applying to nonstandard third-party libraries.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 20.1.5, paragraph 5, change "Implementors" to
-"Implementors of the library described in this International
-Standard".
-</p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes the normative encouragement is already
-sufficiently clear, and that there are no important consequences
-even if it is misunderstood.</p>
-<hr>
-<a name="279"><h3>279.&nbsp;const and non-const iterators should have equivalent typedefs</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Cleary&nbsp; <b>Date:</b>&nbsp;27 Nov 2000</p>
-
-<p>
-This came from an email from Steve Cleary to Fergus in reference to
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
-this in Toronto and believes it should be a separate issue.
-</p>
-
-<p>
-Steve said: "We may want to state that the const/non-const iterators must have
-the same difference type, size_type, and category."
-</p>
-
-<p>
-(Comment from Judy)
-I'm not sure if the above sentence should be true for all
-const and non-const iterators in a particular container, or if it means
-the container's iterator can't be compared with the container's
-const_iterator unless the above it true. I suspect the former.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In <b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>,
-table 65, in the assertion/note pre/post condition for X::const_iterator,
-add the following:
-</p>
-
-<blockquote>
-<p>
-typeid(X::const_iterator::difference_type) == typeid(X::iterator::difference_type)
-</p>
-
-<p>
-typeid(X::const_iterator::size_type) == typeid(X::iterator::size_type)
-</p>
-
-<p>
-typeid(X::const_iterator::category) == typeid(X::iterator::category)
-</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Going through the types one by one: Iterators don't have a
-<tt>size_type</tt>. We already know that the difference types are
-identical, because the container requirements already say that the
-difference types of both X::iterator and X::const_iterator are both
-X::difference_type. The standard does not require that X::iterator
-and X::const_iterator have the same iterator category, but the LWG
-does not see this as a defect: it's possible to imagine cases in which
-it would be useful for the categories to be different.</p>
-
-<p>It may be desirable to require X::iterator and X::const_iterator to
-have the same value type, but that is a new issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#322">322</a>.)</p>
-
-<hr>
-<a name="287"><h3>287.&nbsp;conflicting ios_base fmtflags</h3></a><p><b>Section:</b>&nbsp;27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;30 Dec 2000</p>
-<p>
-The Effects clause for ios_base::setf(fmtflags fmtfl) says
-"Sets fmtfl in flags()". What happens if the user first calls
-ios_base::scientific and then calls ios_base::fixed or vice-versa?
-This is an issue for all of the conflicting flags, i.e. ios_base::left
-and ios_base::right or ios_base::dec, ios_base::hex and ios_base::oct.
-</p>
-
-<p>
-I see three possible solutions:
-</p>
-
-<ol>
-<li>Set ios_base::failbit whenever the user specifies a conflicting
-flag with one previously explicitly set. If the constructor is
-supposed to set ios_base::dec (see discussion below), then
-the user setting hex or oct format after construction will not
-set failbit. </li>
-<li>The last call to setf "wins", i.e. it clears any conflicting
-previous setting.</li>
-<li>All the flags that the user specifies are set, but when actually
-interpreting them, fixed always override scientific, right always
-overrides left, dec overrides hex which overrides oct.</li>
-</ol>
-
-<p>
-Most existing implementations that I tried seem to conform to resolution #3,
-except that when using the iomanip manipulator hex or oct then that always
-overrides dec, but calling setf(ios_base::hex) doesn't.
-</p>
-
-<p>
-There is a sort of related issue, which is that although the ios_base
-constructor says that each ios_base member has an indeterminate value
-after construction, all the existing implementations I tried explicitly set
-ios_base::dec.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>
-<tt>adjustfield</tt>, <tt>basefield</tt>, and <tt>floatfield</tt>
-are each multi-bit fields. It is possible to set multiple bits within
-each of those fields. (For example, <tt>dec</tt> and
-<tt>oct</tt>). These fields are used by locale facets. The LWG
-reviewed the way in which each of those three fields is used, and
-believes that in each case the behavior is well defined for any
-possible combination of bits. See for example Table 58, in 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, noting the requirement in paragraph 6 of that
-section.
-</p>
-<p>
-Users are advised to use manipulators, or else use the two-argument
-version of <tt>setf</tt>, to avoid unexpected behavior.
-</p>
-<hr>
-<a name="289"><h3>289.&nbsp;&lt;cmath&gt; requirements missing C float and long double versions</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;30 Dec 2000</p>
-<p>
- In ISO/IEC 9899:1990 Programming Languages C we find the following
- concerning &lt;math.h&gt;:
-</p>
-
-<blockquote>
- 7.13.4 Mathematics &lt;math.h&gt;
- <br>
- The names of all existing functions declared in the &lt;math.h&gt;
- header, suffixed with f or l, are reserved respectively for
- corresponding functions with float and long double arguments
- are return values.
-</blockquote>
-
-<p>
- For example, <tt>float&nbsp;sinf(float)</tt>
- is reserved.
-</p>
-
-<p>
- In the C99 standard, &lt;math.h&gt; must contain declarations
- for these functions.
-</p>
-
-<p>
-So, is it acceptable for an implementor to add these prototypes to the
-C++ versions of the math headers? Are they required?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add these Functions to Table 80, section 26.5 and to Table 99,
-section C.2:
-</p>
-
-<pre> acosf asinf atanf atan2f ceilf cosf coshf
- expf fabsf floorf fmodf frexpf ldexpf
- logf log10f modff powf sinf sinhf sqrtf
- tanf tanhf
- acosl asinl atanl atan2l ceill cosl coshl
- expl fabsl floorl fmodl frexpl ldexpl
- logl log10l modfl powl sinl sinhl sqrtl
- tanl tanhl
-</pre>
-
-<p>
-There should probably be a note saying that these functions
-are optional and, if supplied, should match the description in
-the 1999 version of the C standard. In the next round
-of C++ standardization they can then become mandatory.
-</p>
-<p><b>Rationale:</b></p>
-<p>The C90 standard, as amended, already permits (but does not
-require) these functions, and the C++ standard incorporates the
-C90 standard by reference. C99 is not an issue, because it is
-never referred to by the C++ standard.</p>
-<hr>
-<a name="293"><h3>293.&nbsp;Order of execution in transform algorithm</h3></a><p><b>Section:</b>&nbsp;25.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.transform"> [lib.alg.transform]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;04 Jan 2001</p>
-<p>This issue is related to issue 242. In case that the resolution
-proposed for issue 242 is accepted, we have have the following
-situation: The 4 numeric algorithms (accumulate and consorts) as well
-as transform would allow a certain category of side effects. The
-numeric algorithms specify that they invoke the functor "for
-every iterator i in the range [first, last) in order". transform,
-in contrast, would not give any guarantee regarding order of
-invocation of the functor, which means that the functor can be invoked
-in any arbitrary order.
-</p>
-
-<p>Why would that be a problem? Consider an example: say the
-transformator that is a simple enumerator ( or more generally
-speaking, "is order-sensitive" ). Since a standard
-compliant implementation of transform is free to invoke the enumerator
-in no definite order, the result could be a garbled enumeration.
-Strictly speaking this is not a problem, but it is certainly at odds
-with the prevalent understanding of transform as an algorithms that
-assigns "a new _corresponding_ value" to the output
-elements.
-</p>
-
-<p>All implementations that I know of invoke the transformator in
-definite order, namely starting from first and proceeding to last -
-1. Unless there is an optimization conceivable that takes advantage of
-the indefinite order I would suggest to specify the order, because it
-eliminate the uncertainty that users would otherwise have regarding
-the order of execution of their potentially order-sensitive function
-objects.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In section 25.2.3 - Transform [lib.alg.transform] change:</p>
-<blockquote>
--1- Effects: Assigns through every iterator i in the range [result,
-result + (last1 - first1)) a new corresponding
-value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
-(i - result), *(first2 + (i - result))).
-</blockquote>
-<p>to:</p>
-<blockquote>
--1- Effects: Computes values by invoking the operation op or binary_op
-for every iterator in the range [first1, last1) in order. Assigns through
-every iterator i in the range [result, result + (last1 - first1)) a new
-corresponding
-value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
-(i - result), *(first2 + (i - result))).
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>For Input Iterators an order is already guaranteed, because
-only one order is possible. If a user who passes a Forward
-Iterator to one of these algorithms really needs a specific
-order of execution, it's possible to achieve that effect by
-wrapping it in an Input Iterator adaptor.</p>
-<hr>
-<a name="296"><h3>296.&nbsp;Missing descriptions and requirements of pair operators</h3></a><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;14 Jan 2001</p>
-<p>The synopsis of the header <tt>&lt;utility&gt;</tt> in 20.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utility"> [lib.utility]</a>
-lists the complete set of equality and relational operators for <tt>pair</tt>
-but the section describing the template and the operators only describes
-<tt>operator==()</tt> and <tt>operator&lt;()</tt>, and it fails to mention
-any requirements on the template arguments. The remaining operators are
-not mentioned at all.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>20.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.operators"> [lib.operators]</a> paragraph 10 already specifies the semantics.
-That paragraph says that, if declarations of operator!=, operator&gt;,
-operator&lt;=, and operator&gt;= appear without definitions, they are
-defined as specified in 20.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.operators"> [lib.operators]</a>. There should be no user
-confusion, since that paragraph happens to immediately precede the
-specification of <tt>pair</tt>.</p>
-<hr>
-<a name="302"><h3>302.&nbsp;Need error indication from codecvt&lt;&gt;::do_length</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Gregory Bumgardner&nbsp; <b>Date:</b>&nbsp;25 Jan 2001</p>
-<p>
-The effects of <tt>codecvt&lt;&gt;::do_length()</tt> are described in
-22.2.1.5.2, paragraph 10. As implied by that paragraph, and clarified
-in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#75">75</a>, <tt>codecvt&lt;&gt;::do_length()</tt> must
-process the source data and update the <tt>stateT</tt> argument just
-as if the data had been processed by <tt>codecvt&lt;&gt;::in()</tt>.
-However, the standard does not specify how <tt>do_length()</tt> would
-report a translation failure, should the source sequence contain
-untranslatable or illegal character sequences.
-</p>
-
-<p>
-The other conversion methods return an "error" result value
-to indicate that an untranslatable character has been encountered, but
-<tt>do_length()</tt> already has a return value (the number of source
-characters that have been processed by the method).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-This issue cannot be resolved without modifying the interface. An exception
-cannot be used, as there would be no way to determine how many characters
-have been processed and the state object would be left in an indeterminate
-state.
-</p>
-
-<p>
-A source compatible solution involves adding a fifth argument to length()
-and do_length() that could be used to return position of the offending
-character sequence. This argument would have a default value that would
-allow it to be ignored:
-</p>
-
-<pre> int length(stateT&amp; state,
- const externT* from,
- const externT* from_end,
- size_t max,
- const externT** from_next = 0);
-
- virtual
- int do_length(stateT&amp; state,
- const externT* from,
- const externT* from_end,
- size_t max,
- const externT** from_next);
-</pre>
-
-<p>
-Then an exception could be used to report any translation errors and
-the from_next argument, if used, could then be used to retrieve the
-location of the offending character sequence.
-</p>
-<p><b>Rationale:</b></p>
-<p>The standard is already clear: the return value is the number of
-"valid complete characters". If it encounters an invalid sequence of
-external characters, it stops.</p>
-<hr>
-<a name="304"><h3>304.&nbsp;Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;5 Feb 2001</p>
-<p>
-We all "know" that input iterators are allowed to produce
-values when dereferenced of which there is no other in-memory copy.
-</p>
-
-<p>
-But: Table 72, with a careful reading, seems to imply that this can only be
-the case if the value_type has no members (e.g. is a built-in type).
-</p>
-
-<p>The problem occurs in the following entry:</p>
-
-<pre> a-&gt;m pre: (*a).m is well-defined
- Equivalent to (*a).m
-</pre>
-
-<p>
-<tt>*a.m</tt> can be well-defined if <tt>*a</tt> is not a reference
-type, but since <tt>operator-&gt;()</tt> must return a pointer for
-<tt>a-&gt;m</tt> to be well-formed, it needs something to return a
-pointer <i>to</i>. This seems to indicate that <tt>*a</tt> must be
-buffered somewhere to make a legal input iterator.
-</p>
-
-<p>I don't think this was intentional.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The current standard is clear and consistent. Input iterators that
- return rvalues are in fact implementable. They may in some cases
- require extra work, but it is still possible to define an operator-&gt;
- in such cases: it doesn't have to return a T*, but may return a
- proxy type. No change to the standard is justified.</p>
-<hr>
-<a name="313"><h3>313.&nbsp;set_terminate and set_unexpected question</h3></a><p><b>Section:</b>&nbsp;18.7.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.terminate"> [lib.terminate]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;3 Apr 2001</p>
-<p>
-According to section 18.7.3.3 of the standard, std::terminate() is
-supposed to call the terminate_handler in effect immediately after
-evaluating the throw expression.
-</p>
-
-<p>
-Question: what if the terminate_handler in effect is itself
-std::terminate?
-</p>
-
-<p>For example:</p>
-
-<pre> #include &lt;exception&gt;
-
- int main () {
- std::set_terminate(std::terminate);
- throw 5;
- return 0;
- }
-</pre>
-
-<p>
-Is the implementation allowed to go into an infinite loop?
-</p>
-
-<p>
-I think the same issue applies to std::set_unexpected.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Infinite recursion is to be expected: users who set the terminate
-handler to <tt>terminate</tt> are explicitly asking for <tt>terminate</tt>
-to call itself.</p>
-<hr>
-<a name="314"><h3>314.&nbsp;Is the stack unwound when terminate() is called?</h3></a><p><b>Section:</b>&nbsp;18.7.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.terminate"> [lib.terminate]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Detlef Vollmann&nbsp; <b>Date:</b>&nbsp;11 Apr 2001</p>
-
-<p>
-The standard appears to contradict itself about whether the stack is
-unwound when the implementation calls terminate().
-</p>
-
-<p>From 18.7.3.3p2:</p>
-<blockquote>
- Calls the terminate_handler function in effect immediately
- after evaluating the throw-expression (lib.terminate.handler),
- if called by the implementation [...]
-</blockquote>
-
-<p>So the stack is guaranteed not to be unwound.</p>
-
-<p>But from 15.3p9:</p>
-<blockquote>
- [...]whether or not the stack is unwound before this call
- to terminate() is implementation-defined (except.terminate).
-</blockquote>
-
-<p>
-And 15.5.1 actually defines that in most cases the stack is unwound.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>There is definitely no contradiction between the core and library
-clauses; nothing in the core clauses says that stack unwinding happens
-after <tt>terminate</tt> is called. 18.7.3.3p2 does not say anything
-about when terminate() is called; it merely specifies which
-<tt>terminate_handler</tt> is used.</p>
-<hr>
-<a name="323"><h3>323.&nbsp;abs() overloads in different headers</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;4 June 2001</p>
-<p>Currently the standard mandates the following overloads of
-abs():</p>
-
-<pre> abs(long), abs(int) in &lt;cstdlib&gt;
-
- abs(float), abs(double), abs(long double) in &lt;cmath&gt;
-
- template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;) in &lt;complex&gt;
-
- template&lt;class T&gt; valarray&lt;T&gt; abs(const valarray&lt;T&gt;&amp;); in &lt;valarray&gt;
-</pre>
-
-<p>
-The problem is that having only some overloads visible of a function
-that works on "implicitly inter-convertible" types is dangerous in
-practice. The headers that get included at any point in a translation
-unit can change unpredictably during program
-development/maintenance. The wrong overload might be unintentionally
-selected.
-</p>
-
-<p>
-Currently, there is nothing that mandates the simultaneous visibility
-of these overloads. Indeed, some vendors have begun fastidiously
-reducing dependencies among their (public) headers as a QOI issue: it
-helps people to write portable code by refusing to compile unless all
-the correct headers are #included.
-</p>
-
-<p>The same issue may exist for other functions in the library.</p>
-
-<p>Redmond: PJP reports that C99 adds two new kinds of abs: complex,
-and int_max_abs.</p>
-
-<p>Related issue: <font color="red">343</font>.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The programs that could potentially be broken by this situation are
- already fragile, and somewhat contrived: For example, a user-defined
- class that has conversion overloads both to <tt>long</tt> and
- to <tt>float</tt>. If <tt>x</tt> is a value of such a class, then
- <tt>abs(x)</tt> would give the <tt>long</tt> version if the user
- included &lt;cstdlib&gt;, the <tt>float</tt> version if the user
- included &lt;cmath&gt;, and would be diagnosed as ambiguous at
- compile time if the user included both headers. The LWG couldn't
- find an example of a program whose meaning would be changed (as
- opposed to changing it from well-formed to ill-formed) simply by
- adding another standard header.</p>
-
-<p>Since the harm seems minimal, and there don't seem to be any simple
- and noninvasive solutions, this is being closed as NAD. It is
- marked as "Future" for two reasons. First, it might be useful to
- define an <tt>&lt;all&gt;</tt> header that would include all
- Standard Library headers. Second, we should at least make sure that
- future library extensions don't make this problem worse.</p>
-<hr>
-<a name="326"><h3>326.&nbsp;Missing typedef in moneypunct_byname</h3></a><p><b>Section:</b>&nbsp;22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;05 Jul 2001</p>
-<p>The definition of the moneypunct facet contains the typedefs char_type
-and string_type. Only one of these names, string_type, is defined in
-the derived facet, moneypunct_byname.</p>
-<p><b>Proposed resolution:</b></p>
-<p>For consistency with the numpunct facet, add a typedef for
-char_type to the definition of the moneypunct_byname facet in
-22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a>.</p>
-<p><b>Rationale:</b></p>
-<p>The absence of the typedef is irrelevant. Users can still access
-the typedef, because it is inherited from the base class.</p>
-<hr>
-<a name="330"><h3>330.&nbsp;Misleading "exposition only" value in class locale definition</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Jul 2001</p>
-<p>
-The "exposition only" value of the std::locale::none constant shown in
-the definition of class locale is misleading in that it on many
-systems conflicts with the value assigned to one if the LC_XXX
-constants (specifically, LC_COLLATE on AIX, LC_ALL on HP-UX, LC_CTYPE
-on Linux and SunOS). This causes incorrect behavior when such a
-constant is passed to one of the locale member functions that accept a
-locale::category argument and interpret it as either the C LC_XXX
-constant or a bitmap of locale::category values. At least three major
-implementations adopt the suggested value without a change and
-consequently suffer from this problem.
-</p>
-
-<p>
-For instance, the following code will (presumably) incorrectly copy facets
-belonging to the collate category from the German locale on AIX:
-</p>
-
-<pre> std::locale l (std::locale ("C"), "de_DE", std::locale::none);
-</pre>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG agrees that it may be difficult to implement locale member
-functions in such a way that they can take either <tt>category</tt>
-arguments or the LC_ constants defined in &lt;cctype&gt;. In light of
-this requirement (22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 2), and in light
-of the requirement in the preceding paragraph that it is possible to
-combine <tt>category</tt> bitmask elements with bitwise operations,
-defining the <tt>category</tt> elements is delicate,
-particularly if an implementor is constrained to work with a
-preexisting C library. (Just using the existing LC_ constants would
-not work in general.) There's no set of "exposition only" values that
-could give library implementors proper guidance in such a delicate
-matter. The non-normative example we're giving is no worse than
-any other choice would be.</p>
-
-<p>See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>.</p>
-<hr>
-<a name="332"><h3>332.&nbsp;Consider adding increment and decrement operators to std::fpos&lt; T &gt; </h3></a><p><b>Section:</b>&nbsp;27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;PremAnand M. Rao&nbsp; <b>Date:</b>&nbsp;27 Aug 2001</p>
-<p>
-Increment and decrement operators are missing from
-Table 88 -- Position type requirements in 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Table 88 (section 27.4.3) -- Position type requirements
-be updated to include increment and decrement operators.
-</p>
-
-<pre>expression return type operational note
-
-++p fpos&amp; p += O(1)
-p++ fpos { P tmp = p;
- ++p;
- return tmp; }
---p fpos&amp; p -= O(1)
-p-- fpos { P tmp = p;
- --p;
- return tmp; }
-</pre>
-
-<p><b>Rationale:</b></p>
-<p>The LWG believes this is a request for extension, not a defect
-report. Additionally, nobody saw a clear need for this extension;
-<tt>fpos</tt> is used only in very limited ways.</p>
-<hr>
-<a name="344"><h3>344.&nbsp;grouping + showbase</h3></a><p><b>Section:</b>&nbsp;22.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.numeric"> [lib.category.numeric]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;13 Oct 2001</p>
-<p>
-When both grouping and showbase are active and the basefield is octal,
-does the leading 0 participate in the grouping or not? For example,
-should one format as: 0,123,456 or 0123,456?
-</p>
-<p>
-An analogy can be drawn with hexadecimal. It appears that 0x123,456 is
-preferred over 0x,123,456. However, this analogy is not universally
-accepted to apply to the octal base. The standard is not clear on how
-to format (or parse) in this manner.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Insert into 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a> paragraph 3, just before the last
-sentence:
-</p>
-<blockquote>
-The leading hexadecimal base specifier "0x" does not participate in
-grouping. The leading '0' octal base specifier may participate in
-grouping. It is unspecified if the leading '0' participates in
-formatting octal numbers. In parsing octal numbers, the implementation
-is encouraged to accept both the leading '0' participating in the
-grouping, and not participating (e.g. 0123,456 or 0,123,456).
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>
-The current behavior may be unspecified, but it's not clear that it
-matters. This is an obscure corner case, since grouping is usually
-intended for the benefit of humans and oct/hex prefixes are usually
-intended for the benefit of machines. There is not a strong enough
-consensus in the LWG for action.
-</p>
-<hr>
-<a name="348"></a><h3><a name="348">348.&nbsp;Minor issue with std::pair operator&lt;</a></h3><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;23 Oct 2001</p>
-<p>
-The current wording of 20.2.2 [lib.pairs] p6 precludes the use of
-operator&lt; on any pair type which contains a pointer.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> paragraph 6, replace:</p>
-<pre> Returns: x.first &lt; y.first || (!(y.first &lt; x.first) &amp;&amp; x.second &lt;
- y.second).
-</pre>
-<p>With:</p>
-<pre> Returns: std::less&lt;T1&gt;()( x.first, y.first ) ||
- (!std::less&lt;T1&gt;()( y.first, x.first) &amp;&amp;
- std::less&lt;T2&gt;()( x.second, y.second ) )
-</pre>
-
-<p><b>Rationale:</b></p>
-<p>This is an instance of a much more general problem. If we want
- operator&lt; to translate to std::less for pairs of pointers, where
- do we draw the line? The same issue applies to individual
- pointers, smart pointer wrappers, std::vector&lt;T*&gt;, and so
- on.</p>
-
-<p>Andy Koenig suggests that the real issue here is that we aren't
- distinguishing adequately between two different orderings, a
- "useful ordering" and a "canonical ordering" that's used just
- because we sometimes need <i>some</i> ordering without caring much
- which ordering it is. Another example of the later is typeinfo's
- <tt>before</tt>.</p>
-
-<hr>
-<a name="350"><h3>350.&nbsp;allocator&lt;&gt;::address</h3></a><p><b>Section:</b>&nbsp;20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>, 20.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.requirements"> [lib.allocator.requirements]</a>, 17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;25 Oct 2001</p>
-<p>See c++std-lib-9006 and c++std-lib-9007. This issue is taken
-verbatim from -9007.</p>
-
-<p>
-The core language feature allowing definition of operator&amp;() applied
-to any non-builtin type makes that operator often unsafe to use in
-implementing libraries, including the Standard Library. The result
-is that many library facilities fail for legal user code, such as
-the fragment</p>
-<pre> class A { private: A* operator&amp;(); };
- std::vector&lt;A&gt; aa;
-
- class B { };
- B* operator&amp;(B&amp;) { return 0; }
- std::vector&lt;B&gt; ba;
-</pre>
-
-<p>
-In particular, the requirements table for Allocator (Table 32) specifies
-no semantics at all for member address(), and allocator&lt;&gt;::address is
-defined in terms of unadorned operator &amp;.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-In 20.6.1.1, Change the definition of allocator&lt;&gt;::address from:</p>
-<blockquote>
- Returns: &amp;x
-</blockquote>
-
-<p>to:</p>
-
-<p>
- Returns: The value that the built in operator&amp;(x) would return if not
- overloaded.
-</p>
-
-<p>
-In 20.1.6, Table 32, add to the Notes column of the a.address(r) and
-a.address(s) lines, respectively:
-</p>
-
-<pre> allocator&lt;T&gt;::address(r)
- allocator&lt;T&gt;::address(s)
-</pre>
-
-<p>In addition, in clause 17.4.1.1, add a statement:</p>
-
-<blockquote>
- The Standard Library does not apply operator&amp; to any type for which
- operator&amp; may be overloaded.
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>The LWG believes both examples are ill-formed. The contained type
-is required to be CopyConstructible (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>), and that
-includes the requirement that &amp;t return the usual types and
-values. Since allocators are intended to be used in conjunction with
-containers, and since the CopyConstructible requirements appear to
-have been written to deal with the concerns of this issue, the LWG
-feels it is NAD unless someone can come up with a well-formed example
-exhibiting a problem.</p>
-
-<p>It may well be that the CopyConstructible requirements are too
- restrictive and that either the container requirements or the
- CopyConstructive requirements should be relaxed, but that's a far
- larger issue. Marking this issue as "future" as a pointer to that
- larger issue.</p>
-<hr>
-<a name="351"><h3>351.&nbsp;unary_negate and binary_negate: struct or class?</h3></a><p><b>Section:</b>&nbsp;20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Dale Riley&nbsp; <b>Date:</b>&nbsp;12 Nov 2001</p>
-<p>
-In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> the header &lt;functional&gt; synopsis declares
-the unary_negate and binary_negate function objects as struct.
-However in <font color="red">20.3.5</font> the unary_negate and binary_negate
-function objects are defined as class. Given the context, they are
-not "basic function objects" like negate, so this is either a typo or
-an editorial oversight.
-</p>
-
-<p><i>[Taken from comp.std.c++]</i></p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the synopsis to reflect the useage in <font color="red">20.3.5</font></p>
-
-<p><i>[Curaçao: Since the language permits "struct", the LWG
-views this as NAD. They suggest, however, that the Project Editor
-might wish to make the change as editorial.]</i></p>
-
-<hr>
-<a name="353"><h3>353.&nbsp;<tt>std::pair</tt> missing template assignment</h3></a><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;2 Dec 2001</p>
-<p>
-The class template <tt>std::pair</tt> defines a template ctor (20.2.2, p4) but
-no template assignment operator. This may lead to inefficient code since
-assigning an object of <tt>pair&lt;C, D&gt;</tt> to <tt>pair&lt;A, B&gt;</tt>
-where the types <tt>C</tt> and <tt>D</tt> are distinct from but convertible to
-<tt>A</tt> and <tt>B</tt>, respectively, results in a call to the template copy
-ctor to construct an unnamed temporary of type <tt>pair&lt;A, B&gt;</tt>
-followed by an ordinary (perhaps implicitly defined) assignment operator,
-instead of just a straight assignment.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add the following declaration to the definition of <tt>std::pair</tt>:
-</p>
-<pre> template&lt;class U, class V&gt;
- pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
-</pre>
-<p>
-And also add a paragraph describing the effects of the function template to the
-end of 20.2.2:
-</p>
-<pre> template&lt;class U, class V&gt;
- pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
-</pre>
-<p>
- <b>Effects</b>: <tt>first = p.first;</tt>
- <tt>second = p.second;</tt>
- <b>Returns</b>: <tt>*this</tt>
-</p>
-
-<p><i>[Curaçao: There is no indication this is was anything other than
-a design decision, and thus NAD.&nbsp; May be appropriate for a future
-standard.]</i></p>
-
-<hr>
-<a name="356"><h3>356.&nbsp;Meaning of ctype_base::mask enumerators</h3></a><p><b>Section:</b>&nbsp;22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;23 Jan 2002</p>
-
-<p>What should the following program print?</p>
-
-<pre> #include &lt;locale&gt;
- #include &lt;iostream&gt;
-
- class my_ctype : public std::ctype&lt;char&gt;
- {
- typedef std::ctype&lt;char&gt; base;
- public:
- my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
- {
- std::copy(base::classic_table(), base::classic_table() + base::table_size,
- my_table);
- my_table[(unsigned char) '_'] = (base::mask) (base::print | base::space);
- }
- private:
- mask my_table[base::table_size];
- };
-
- int main()
- {
- my_ctype ct;
- std::cout &lt;&lt; "isspace: " &lt;&lt; ct.is(std::ctype_base::space, '_') &lt;&lt; " "
- &lt;&lt; "isalpha: " &lt;&lt; ct.is(std::ctype_base::alpha, '_') &lt;&lt; std::endl;
- }
-</pre>
-
-<p>The goal is to create a facet where '_' is treated as whitespace.</p>
-
-<p>On gcc 3.0, this program prints "isspace: 1 isalpha: 0". On
-Microsoft C++ it prints "isspace: 1 isalpha: 1".</p>
-
-<p>
-I believe that both implementations are legal, and the standard does not
-give enough guidance for users to be able to use std::ctype's
-protected interface portably.</p>
-
-<p>
-The above program assumes that ctype_base::mask enumerators like
-<tt>space</tt> and <tt>print</tt> are disjoint, and that the way to
-say that a character is both a space and a printing character is to or
-those two enumerators together. This is suggested by the "exposition
-only" values in 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a>, but it is nowhere specified in
-normative text. An alternative interpretation is that the more
-specific categories subsume the less specific. The above program
-gives the results it does on the Microsoft compiler because, on that
-compiler, <tt>print</tt> has all the bits set for each specific
-printing character class.
-</p>
-
-<p>From the point of view of std::ctype's public interface, there's no
-important difference between these two techniques. From the point of
-view of the protected interface, there is. If I'm defining a facet
-that inherits from std::ctype&lt;char&gt;, I'm the one who defines the
-value that table()['a'] returns. I need to know what combination of
-mask values I should use. This isn't so very esoteric: it's exactly
-why std::ctype has a protected interface. If we care about users
-being able to write their own ctype facets, we have to give them a
-portable way to do it.
-</p>
-
-<p>
-Related reflector messages:
-lib-9224, lib-9226, lib-9229, lib-9270, lib-9272, lib-9273, lib-9274,
-lib-9277, lib-9279.
-</p>
-
-<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> is related, but not identical. The
-proposed resolution if issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> says that
-ctype_base::mask must be a bitmask type. It does not say that the
-ctype_base::mask elements are bitmask elements, so it doesn't
-directly affect this issue.</p>
-
-<p>More comments from Benjamin Kosnik, who believes that
-that C99 compatibility essentially requires what we're
-calling option 1 below.</p>
-
-<blockquote>
-<pre>I think the C99 standard is clear, that isspace -&gt; !isalpha.
---------
-
-#include &lt;locale&gt;
-#include &lt;iostream&gt;
-
-class my_ctype : public std::ctype&lt;char&gt;
-{
-private:
- typedef std::ctype&lt;char&gt; base;
- mask my_table[base::table_size];
-
-public:
- my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
- {
- std::copy(base::classic_table(), base::classic_table() + base::table_size,
- my_table);
- mask both = base::print | base::space;
- my_table[static_cast&lt;mask&gt;('_')] = both;
- }
-};
-
-int main()
-{
- using namespace std;
- my_ctype ct;
- cout &lt;&lt; "isspace: " &lt;&lt; ct.is(ctype_base::space, '_') &lt;&lt; endl;
- cout &lt;&lt; "isprint: " &lt;&lt; ct.is(ctype_base::print, '_') &lt;&lt; endl;
-
- // ISO C99, isalpha iff upper | lower set, and !space.
- // 7.5, p 193
- // -&gt; looks like g++ behavior is correct.
- // 356 -&gt; bitmask elements are required for ctype_base
- // 339 -&gt; bitmask type required for mask
- cout &lt;&lt; "isalpha: " &lt;&lt; ct.is(ctype_base::alpha, '_') &lt;&lt; endl;
-}
-</pre>
-</blockquote>
-
-<p><b>Proposed resolution:</b></p>
-<p>Informally, we have three choices:</p>
-<ol>
-<li>Require that the enumerators are disjoint (except for alnum and
-graph)</li>
-<li>Require that the enumerators are not disjoint, and specify which
-of them subsume which others. (e.g. mandate that lower includes alpha
-and print)</li>
-<li>Explicitly leave this unspecified, which the result that the above
-program is not portable.</li>
-</ol>
-
-<p>Either of the first two options is just as good from the standpoint
-of portability. Either one will require some implementations to
-change.</p>
-<p><b>Rationale:</b></p>
-<p>The LWG agrees that this is a real ambiguity, and that both
-interpretations are conforming under the existing standard. However,
-there's no evidence that it's causing problems for real users. Users
-who want to define ctype facets portably can test the ctype_base masks
-to see which interpretation is being used.</p>
-<hr>
-<a name="357"><h3>357.&nbsp;&lt;cmath&gt; float functions cannot return HUGE_VAL</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;26 Feb 2002</p>
-<p>
-The float versions of the math functions have no meaningful value to return
-for a range error. The long double versions have a value they can return,
-but it isn't necessarily the most reasonable value.
-</p>
-
-<p>
-Section 26.5 [lib.c.math], paragraph 5, says that C++ "adds float and long
-double overloaded versions of these functions, with the same semantics,"
-referring to the math functions from the C90 standard.
-</p>
-
-<p>
-The C90 standard, in section 7.5.1, paragraph 3, says that functions return
-"the value of the macro HUGE_VAL" when they encounter a range error.
-Section 7.5, paragraph 2, defines HUGE_VAL as a macro that "expands to a
-positive double expression, not necessarily representable as a float."
-</p>
-
-<p>
-Therefore, the float versions of the math functions have no way to
-signal a range error. <i>[Curaçao: The LWG notes that this isn't
-strictly correct, since errno is set.]</i> The semantics require that they
-return HUGE_VAL, but they cannot because HUGE_VAL might not be
-representable as a float.
-</p>
-
-<p>
-The problem with long double functions is less severe because HUGE_VAL is
-representable as a long double. On the other hand, it might not be a "huge"
-long double value, and might fall well within the range of normal return
-values for a long double function. Therefore, it does not make sense for a
-long double function to return a double (HUGE_VAL) for a range error.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Curaçao: C99 was faced with a similar problem, which they fixed by
-adding HUGE_VALF and HUGE_VALL in addition to HUGE_VAL.</p>
-
-<p>C++ must also fix, but it should be done in the context of the
-general C99 based changes to C++, not via DR. Thus the LWG in Curaçao
-felt the resolution should be NAD, FUTURE, but the issue is being held
-open for one more meeting to ensure LWG members not present during the
-discussion concur.</p>
-<p><b>Rationale:</b></p>
-<p>Will be fixed as part of more general work in the TR.</p>
-<hr>
-<a name="361"><h3>361.&nbsp;num_get&lt;&gt;::do_get (..., void*&amp;) checks grouping</h3></a><p><b>Section:</b>&nbsp;22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 Mar 2002</p>
-<p>
-22.2.2.2.2, p12 specifies that <tt>thousands_sep</tt> is to be inserted only
-for integral types (issue 282 suggests that this should be done for
-all arithmetic types).
-</p>
-
-<p>
-22.2.2.1.2, p12 requires that grouping be checked for all extractors
-including that for <tt>void*</tt>.
-</p>
-
-<p>
-I don't think that's right. <tt>void*</tt> values should not be checked for
-grouping, should they? (Although if they should, then <tt>num_put</tt> needs
-to write them out, otherwise their extraction will fail.)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the first sentence of 22.2.2.2.2, p12 from
-</p>
-<blockquote>
- Digit grouping is checked. That is, the positions of discarded
- separators is examined for consistency with
- use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().
- If they are not consistent then ios_base::failbit is assigned
- to err.
-</blockquote>
-
-<p>to</p>
-<blockquote>
- Except for conversions to void*, digit grouping is checked...
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>This would be a change: as it stands, the standard clearly
- specifies that grouping applies to void*. A survey of existing
- practice shows that most existing implementations do that, as they
- should.</p>
-<hr>
-<a name="366"><h3>366.&nbsp;Excessive const-qualification</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown, Marc Paterno&nbsp; <b>Date:</b>&nbsp;10 May 2002</p>
-<p>
-The following member functions are declared const, yet return non-const
-pointers. We believe they are should be changed, because they allow code
-that may surprise the user. See document N1360 for details and
-rationale.
-</p>
-
-<p><i>[Santa Cruz: the real issue is that we've got const member
-functions that return pointers to non-const, and N1360 proposes
-replacing them by overloaded pairs. There isn't a consensus about
-whether this is a real issue, since we've never said what our
-constness policy is for iostreams. N1360 relies on a distinction
-between physical constness and logical constness; that distinction, or
-those terms, does not appear in the standard.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 27.4.4 and 27.4.4.2</p>
-<p>Replace</p>
-<pre> basic_ostream&lt;charT,traits&gt;* tie() const;
-</pre>
-<p>with</p>
-<pre> basic_ostream&lt;charT,traits&gt;* tie();
- const basic_ostream&lt;charT,traits&gt;* tie() const;
-</pre>
-
-<p>and replace</p>
-<pre> basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
-</pre>
-<p>with</p>
-<pre> basic_streambuf&lt;charT,traits&gt;* rdbuf();
- const basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
-</pre>
-
-<p>In 27.5.2 and 27.5.2.3.1</p>
-<p>Replace</p>
-<pre> char_type* eback() const;
-</pre>
-<p>with</p>
-<pre> char_type* eback();
- const char_type* eback() const;
-</pre>
-
-<p>Replace</p>
-<pre> char_type gptr() const;
-</pre>
-<p>with</p>
-<pre> char_type* gptr();
- const char_type* gptr() const;
-</pre>
-
-<p>Replace</p>
-<pre> char_type* egptr() const;
-</pre>
-<p>with</p>
-<pre> char_type* egptr();
- const char_type* egptr() const;
-</pre>
-
-<p>In 27.5.2 and 27.5.2.3.2</p>
-<p>Replace</p>
-<pre> char_type* pbase() const;
-</pre>
-<p>with</p>
-<pre> char_type* pbase();
- const char_type* pbase() const;
-</pre>
-
-<p>Replace</p>
-<pre> char_type* pptr() const;
-</pre>
-<p>with</p>
-<pre> char_type* pptr();
- const char_type* pptr() const;
-</pre>
-
-<p>Replace</p>
-<pre> char_type* epptr() const;
-</pre>
-<p>with</p>
-<pre> char_type* epptr();
- const char_type* epptr() const;
-</pre>
-
-<p>In 27.7.2, 27.7.2.2, 27.7.3 27.7.3.2, 27.7.4, and 27.7.6</p>
-<p>Replace</p>
-<pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
-</pre>
-<p>with</p>
-<pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf();
- const basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
-</pre>
-
-<p>In 27.8.1.5, 27.8.1.7, 27.8.1.8, 27.8.1.10, 27.8.1.11, and 27.8.1.13</p>
-<p>Replace</p>
-<pre> basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
-</pre>
-<p>with</p>
-<pre> basic_filebuf&lt;charT,traits&gt;* rdbuf();
- const basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
-</pre>
-<p><b>Rationale:</b></p>
-<p>The existing specification is a bit sloppy, but there's no
- particular reason to change this other than tidiness, and there are
- a number of ways in which streams might have been designed
- differently if we were starting today. There's no evidence that the
- existing constness policy is harming users. We might consider
- a different constness policy as part of a full stream redesign.</p>
-<hr>
-<a name="367"><h3>367.&nbsp;remove_copy/remove_copy_if and Input Iterators</h3></a><p><b>Section:</b>&nbsp;25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Anthony Williams&nbsp; <b>Date:</b>&nbsp;13 May 2002</p>
-<p>
-remove_copy and remove_copy_if (25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a>) permit their
-input range to be marked with Input Iterators. However, since two
-operations are required against the elements to copy (comparison and
-assigment), when the input range uses Input Iterators, a temporary
-copy must be taken to avoid dereferencing the iterator twice. This
-therefore requires the value type of the InputIterator to be
-CopyConstructible. If the iterators are at least Forward Iterators,
-then the iterator can be dereferenced twice, or a reference to the
-result maintained, so the temporary is not required.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add "If InputIterator does not meet the requirements of forward
-iterator, then the value type of InputIterator must be copy
-constructible. Otherwise copy constructible is not required." to
-25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a> paragraph 6.
-</p>
-<p><b>Rationale:</b></p>
-<p>The assumption is that an input iterator can't be dereferenced
- twice. There's no basis for that assumption in the Standard.</p>
-<hr>
-<a name="368"><h3>368.&nbsp;basic_string::replace has two "Throws" paragraphs</h3></a><p><b>Section:</b>&nbsp;21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;3 Jun 2002</p>
-<p>
-21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a> basic_string::replace, second
-signature, given in paragraph 1, has two "Throws" paragraphs (3 and
-5).
-</p>
-
-<p>
-In addition, the second "Throws" paragraph (5) includes specification
-(beginning with "Otherwise, the function replaces ...") that should be
-part of the "Effects" paragraph.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is editorial. Both "throws" statements are true. The bug is
- just that the second one should be a sentence, part of the "Effects"
- clause, not a separate "Throws". The project editor has been
- notified.</p>
-<hr>
-<a name="372"><h3>372.&nbsp;Inconsistent description of stdlib exceptions</h3></a><p><b>Section:</b>&nbsp;17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>, 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>, &nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Randy Maddox&nbsp; <b>Date:</b>&nbsp;22 Jul 2002</p>
-
-<p>Paragraph 3 under clause 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>, Restrictions on
-Exception Handling, states that "Any other functions defined in the
-C++ Standard Library that do not have an exception-specification may
-throw implementation-defined exceptions unless otherwise specified."
-This statement is followed by a reference to footnote 178 at the
-bottom of that page which states, apparently in reference to the C++
-Standard Library, that "Library implementations are encouraged (but
-not required) to report errors by throwing exceptions from (or derived
-from) the standard exceptions."</p>
-
-<p>These statements appear to be in direct contradiction to clause
-18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>, which states "The class exception defines the
-base class for the types of objects thrown as exceptions by the C++
-Standard library components ...".</p>
-
-<p>Is this inconsistent?</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Clause 17 is setting the overall library requirements, and it's
- clear and consistent. This sentence from Clause 18 is descriptive,
- not setting a requirement on any other class.
-</p>
-<hr>
-<a name="374"><h3>374.&nbsp;moneypunct::frac_digits returns int not unsigned</h3></a><p><b>Section:</b>&nbsp;22.2.6.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.members"> [lib.locale.moneypunct.members]</a>, 22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;8 Aug 2002</p>
-<p>
-In section 22.2.6.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.members"> [lib.locale.moneypunct.members]</a>, frac_digits() returns type
-"int". This implies that frac_digits() might return a negative value,
-but a negative value is nonsensical. It should return "unsigned".
-</p>
-
-<p>
-Similarly, in section 22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a>, do_frac_digits()
-should return "unsigned".
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Regardless of whether the return value is int or unsigned, it's
-always conceivable that frac_digits might return a nonsensical
-value. (Is 4294967295 really any better than -1?) The clients of
-moneypunct, the get and put facets, can and do perform range
-checks.</p>
-<hr>
-<a name="377"><h3>377.&nbsp;basic_string::insert and length_error</h3></a><p><b>Section:</b>&nbsp;21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;16 Aug 2002</p>
-<p>
-Section 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, paragraph 4, contains the following,
-"Then throws length_error if size() &gt;= npos - rlen."
-</p>
-
-<p>
-Related to DR 83, this sentence should probably be removed.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This requirement is redundant but correct. No change is
-needed.</p>
-<hr>
-<a name="378"><h3>378.&nbsp;locale immutability and locale::operator=()</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;6 Sep 2002</p>
-<p>
-I think there is a problem with 22.1.1, p6 which says that
-</p>
-<pre> -6- An instance of locale is immutable; once a facet reference
- is obtained from it, that reference remains usable as long
- as the locale value itself exists.
-</pre>
-<p>
-and 22.1.1.2, p4:
-</p>
-<pre> const locale&amp; operator=(const locale&amp; other) throw();
-
- -4- Effects: Creates a copy of other, replacing the current value.
-</pre>
-<p>
-How can a reference to a facet obtained from a locale object remain
-valid after an assignment that clearly must replace all the facets
-in the locale object? Imagine a program such as this
-</p>
-<pre> std::locale loc ("de_DE");
- const std::ctype&lt;char&gt; &amp;r0 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
- loc = std::locale ("en_US");
- const std::ctype&lt;char&gt; &amp;r1 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
-</pre>
-<p>
-Is r0 really supposed to be preserved and destroyed only when loc goes
-out of scope?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[Summer '04 mid-meeting mailing: Martin and Dietmar believe this
- is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a> and recommend that it be
- closed.
-]</i></p>
-
-<hr>
-<a name="388"><h3>388.&nbsp;Use of complex as a key in associative containers</h3></a><p><b>Section:</b>&nbsp;26.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cfenv"> [lib.cfenv]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Gabriel Dos Reis&nbsp; <b>Date:</b>&nbsp;8 Nov 2002</p>
-<p>
-Practice with std::complex&lt;&gt; and the associative containers
-occasionally reveals artificial and distracting issues with constructs
-resembling: std::set&lt;std::complex&lt;double&gt; &gt; s;
-</p>
-
-<p>
-The main reason for the above to fail is the absence of an approriate
-definition for std::less&lt;std::complex&lt;T&gt; &gt;. That in turn comes from
-the definition of the primary template std::less&lt;&gt; in terms of
-operator&lt;.
-</p>
-
-<p>
-The usual argument goes as follows: Since there is no ordering over
-the complex field compatible with field operations it makes little
-sense to define a function operator&lt; operating on the datatype
-std::complex&lt;T&gt;. That is fine. However, that reasoning does not carry
-over to std::less&lt;T&gt; which is used, among other things, by associative
-containers as an ordering useful to meet complexity requirements.
-</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Informally: Add a specialization of std::less for std::complex.</p>
-<p><b>Rationale:</b></p>
-<p>Discussed in Santa Cruz. An overwhelming majority of the LWG
-believes this should not be treated a DR: it's a request for a design
-change, not a defect in the existing standard. Most people (10-3)
-believed that we probably don't want this change, period: as with
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, it's hard to know where to draw the line.
-The LWG noted that users who want to put objects into an associative
-container for which <tt>operator&lt;</tt> isn't defined can simply
-provide their own comparison function object.</p>
-<hr>
-<a name="390"><h3>390.&nbsp;CopyConstructible requirements too strict</h3></a><p><b>Section:</b>&nbsp;20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a>&nbsp; <b>Submitter:</b>&nbsp;Doug Gregor&nbsp; <b>Date:</b>&nbsp;24 Oct 2002</p>
-<p>
-The CopyConstructible requirements in Table 30 state that for an
-object t of type T (where T is CopyConstructible), the expression &amp;t
-returns the address of t (with type T*). This requirement is overly
-strict, in that it disallows types that overload operator&amp; to not
-return a value of type T*. This occurs, for instance, in the <a href="http://www.boost.org/libs/lambda">Boost.Lambda</a> library, where
-operator&amp; is overloaded for a Boost.Lambda function object to return
-another function object.
-</p>
-
-<p>Example:</p>
-
-<pre> std::vector&lt;int&gt; u, v;
- int x;
- // ...
- std::transform(u.begin(), u.end(), std::back_inserter(v), _1 * x);
-</pre>
-
-<p>
-_1 * x returns an unnamed function object with operator&amp; overloaded to
-not return T* , therefore rendering the std::transform call ill-formed.
-However, most standard library implementations will compile this code
-properly, and the viability of such binder libraries is severely hindered
-by the unnecessary restriction in the CopyConstructible requirements.
-</p>
-
-<p>
-For reference, the address of an object can be retrieved without using
-the address-of operator with the following function template:
-</p>
-
-<pre> template &lt;typename T&gt; T* addressof(T&amp; v)
- {
- return reinterpret_cast&lt;T*&gt;(
- &amp;const_cast&lt;char&amp;&gt;(reinterpret_cast&lt;const volatile char &amp;&gt;(v)));
- }
-</pre>
-
-<p>
-Note: this relates directly to library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, which
-will need to be reexamined if the CopyConstructible requirements
-change.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Remove the last two rows of Table 30, eliminating the requirements
-that &amp;t and &amp;u return the address of t and u, respectively.
-</p>
-<p><b>Rationale:</b></p>
-<p>This was a deliberate design decision. Perhaps it should be
- reconsidered for C++0x. </p>
-<hr>
-<a name="392"><h3>392.&nbsp;'equivalence' for input iterators</h3></a><p><b>Section:</b>&nbsp;24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Corwin Joy&nbsp; <b>Date:</b>&nbsp;11 Dec 2002</p>
-
-<p>
-In section 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> table 72 -
-'Input Iterator Requirements' we have as a postcondition of *a:
-"If a==b and (a, b) is in the domain of == then *a is equivalent to *b".
-</p>
-
-<p>
-In section 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a> it states that
-"istreambuf_iterator::equal returns true if and only if both iterators
-are at end-of-stream, or neither is at end-of-stream, <i>regardless of
-what streambuf object they use</i>." (My emphasis).
-</p>
-
-<p>
-The defect is that either 'equivalent' needs to be more precisely
-defined or the conditions for equality in 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>
-are incorrect. (Or both).
-</p>
-
-<p>Consider the following example:</p>
-<pre> #include &lt;iostream&gt;
- #include &lt;fstream&gt;
- #include &lt;iterator&gt;
- using namespace std;
-
- int main() {
- ifstream file1("file1.txt"), file2("file2.txt");
- istreambuf_iterator&lt;char&gt; f1(file1), f2(file2);
- cout &lt;&lt; "f1 == f2 : " &lt;&lt; boolalpha &lt;&lt; (f1 == f2) &lt;&lt; endl;
- cout &lt;&lt; "f1 = " &lt;&lt; *f1 &lt;&lt; endl;
- cout &lt;&lt; "f2 = " &lt;&lt; *f2 &lt;&lt; endl;
- return 0;
- }
-</pre>
-
-<p>Now assuming that neither f1 or f2 are at the end-of-stream then
-f1 == f2 by 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>.</p>
-
-<p>However, it is unlikely that *f1 will give the same value as *f2 except
-by accident.</p>
-
-<p>So what does *f1 'equivalent' to *f2 mean? I think the standard should
-be clearer on this point, or at least be explicit that this does not
-mean that *f1 and *f2 are required to have the same value in the case
-of input iterators.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The two iterators aer not in the domain of ==</p>
-<hr>
-<a name="399"><h3>399.&nbsp;volations of unformatted input function requirements</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Jan 2003</p>
- <p>
-The Effects clauses for the two functions below violate the
-general requirements on unformatted input functions outlined
-in 27.6.1.3: they do not begin by constructing a sentry object.
-Instead, they begin by calling widen ('\n'), which may throw
-an exception. The exception is then allowed to propagate from
-the unformatted input function irrespective of the setting of
-exceptions().
- </p>
- <p>
-Note that in light of 27.6.1.1, p3 and p4, the fact that the
-functions allow exceptions thrown from widen() to propagate
-may not strictly speaking be a defect (but the fact that the
-functions do not start by constructing a sentry object still
-is). However, since an exception thrown from ctype&lt;charT&gt;
-::widen() during any other input operation (say, from within
-a call to num_get&lt;charT&gt;::get()) will be caught and cause
-badbit to be set, these two functions should not be treated
-differently for the sake of consistency.
- </p>
- <p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>
-Not a defect. The standard is consistent, and the behavior required
-by the standard is unambiguous. Yes, it's theoretically possible for
-widen to throw. (Not that this will happen for the default ctype
-facet or for most real-world replacement ctype facets.) Users who
-define ctype facets that can throw, and who care about this behavior,
-can use alternative signatures that don't call widen.
-</p>
-<hr>
-<a name="429"><h3>429.&nbsp;typo in basic_ios::clear(iostate)</h3></a><p><b>Section:</b>&nbsp;27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
- <p>
-
-The Effects clause in 27.4.4.3, p5 describing the effects of a call to
-the ios_base member function clear(iostate state) says that the function
-only throws if the respective bits are already set prior to the function
-call. That's obviously not the intent. If it was, a call to clear(badbit)
-on an object for which (rdstate() == goodbit &amp;&amp; exceptions() == badbit)
-holds would not result in an exception being thrown.
-
- </p>
- <p><b>Proposed resolution:</b></p>
- <p>
-
-The text ought to be changed from
-<br>
-
-"If (rdstate() &amp; exceptions()) == 0, returns. ..."
-<br>
-
-to
-<br>
-
-"If (state &amp; exceptions()) == 0, returns. ..."
- </p>
-<p><b>Rationale:</b></p>
-<p>This is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a>.</p>
-<hr>
-<a name="433"><h3>433.&nbsp;Contradiction in specification of unexpected()</h3></a><p><b>Section:</b>&nbsp;18.7.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.unexpected"> [lib.unexpected]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Vyatcheslav Sysoltsev&nbsp; <b>Date:</b>&nbsp;29 Sep 2003</p>
-<p>
-Clause 15.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/except.html#except.unexpected"> [except.unexpected]</a> paragraph 1 says that "void unexpected();
-is called (18.7.2) immediately after completing the stack unwinding
-for the former function", but 18.7.2.4 (Effects) says that "void
-unexpected(); . . . Calls the unexpected_handler function in effect
-immediately after evaluating the throwexpression (18.7.2.2),". Isn't
-here a contradiction: 15.5.2 requires stack have been unwound when in
-void unexpected() and therefore in unexpected_handler but 18.7.2.4
-claims that unexpected_handler is called "in effect immediately" after
-evaluation of throw expression is finished, so there is no space left
-for stack to be unwound therefore? I think the phrase "in effect
-immediately" should be removed from the standard because it brings
-ambiguity in understanding.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>There is no contradiction. The phrase "in effect immediately" is
- just to clarify which handler is to be called.</p>
-<hr>
-<a name="437"><h3>437.&nbsp;Formatted output of function pointers is confusing</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.arithmetic"> [lib.ostream.inserters.arithmetic]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Ivan Godard&nbsp; <b>Date:</b>&nbsp;24 Oct 2003</p>
-<p>
-Given:
-</p>
-<pre>void f(int) {}
-void(*g)(int) = f;
-cout &lt;&lt; g;
-</pre>
-
-<p>
-(with the expected #include and usings), the value printed is a rather
-surprising "true". Rather useless too.
-</p>
-
-<p>The standard defines:</p>
-
-<pre>ostream&amp; operator&lt;&lt;(ostream&amp;, void*);</pre>
-
-<p>which picks up all data pointers and prints their hex value, but does
-not pick up function pointers because there is no default conversion
-from function pointer to void*. Absent that, we fall back to legacy
-conversions from C and the function pointer is converted to bool.
-</p>
-
-<p>There should be an analogous inserter that prints the address of a
- function pointer.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is indeed a wart, but there is no good way to solve it. C
- doesn't provide a portable way of outputting the address of a
- function point either.</p>
-<hr>
-<a name="439"><h3>439.&nbsp;Should facets be copyable?</h3></a><p><b>Section:</b>&nbsp;22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;2 Nov 2003</p>
-<p>The following facets classes have no copy constructors described in
- the standard, which, according to the standard, means that they are
- supposed to use the compiler-generated defaults. Default copy
- behavior is probably inappropriate. We should either make these
- classes uncopyable or else specify exactly what their constructors do.</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#421">421</a>.</p>
-
-<pre> ctype_base
- ctype
- ctype_byname
- ctype&lt;char&gt;
- ctype_byname&lt;char&gt;
- codecvt_base
- codecvt
- codecvt_byname
- num_get
- num_put
- numpunct
- numpunct_byname
- collate
- collate_byname
- time_base
- time_get
- time_get_byname
- time_put
- time_put_byname
- money_get
- money_put
- money_base
- moneypunct
- moneypunct_byname
- messages_base
- messages
- messages_byname
-</pre>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The copy constructor in the base class is private.</p>
-<hr>
-<a name="440"></a><h3><a name="440">440.&nbsp;Should std::complex use unqualified transcendentals?</a></h3><p><b>Section:</b>&nbsp;26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;5 Nov 2003</p>
-<p>
-Operations like <tt>pow</tt> and <tt>exp</tt> on
-<tt>complex&lt;T&gt;</tt> are typically implemented in terms of
-operations like <tt>sin</tt> and <tt>cos</tt> on <tt>T</tt>.
-Should implementations write this as <tt>std::sin</tt>, or as plain
-unqualified <tt>sin</tt>?
-</p>
-
-<p>The issue, of course, is whether we want to use
-argument-dependent lookup in the case where <tt>T</tt> is a
-user-defined type. This is similar to the issue of valarray
-transcendentals, as discussed in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>.</p>
-
-<p>This issue differs from valarray transcendentals in two important
-ways. First, "the effect of instantiating the template
-<tt>complex</tt> for types other than float, double or long double is
-unspecified." (26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>) Second, the standard does not
-dictate implementation, so there is no guarantee that a particular
-real math function is used in the implementation of a particular
-complex function.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>If you instantiate std::complex for user-defined types, all bets
-are off.</p>
-<hr>
-<a name="447"><h3>447.&nbsp;Wrong template argument for time facets</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;26 Dec 2003</p>
-<p>
-22.1.1.1.1/4, table 52, "Required Instantiations", lists, among others:
-</p>
-<pre> time_get&lt;char,InputIterator&gt;
- time_get_byname&lt;char,InputIterator&gt;
- time_get&lt;wchar_t,OutputIterator&gt;
- time_get_byname&lt;wchar_t,OutputIterator&gt;
-</pre>
-
-<p>
-The second argument to the last two should be InputIterator, not
-OutputIterator.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the second template argument to InputIterator.
-</p>
-<p><b>Rationale:</b></p>
-Duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a>
-<hr>
-<a name="450"><h3>450.&nbsp;set::find is inconsistent with associative container requirements</h3></a><p><b>Section:</b>&nbsp;23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<p>map/multimap have:</p>
-
-<pre> iterator find(const key_type&amp; x) const;
- const_iterator find(const key_type&amp; x) const;
-</pre>
-
-<p>
-which is consistent with the table of associative container requirements.
-But set/multiset have:
-</p>
-<pre> iterator find(const key_type&amp;) const;
-</pre>
-
-<p>
-set/multiset should look like map/multimap, and honor the requirements
-table, in this regard.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a>.</p>
-<hr>
-<a name="451"><h3>451.&nbsp;Associative erase should return an iterator</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, 23.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative"> [lib.associative]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<p>map/multimap/set/multiset have:</p>
-<pre> void erase(iterator);
- void erase(iterator, iterator);
-</pre>
-
-<p>But there's no good reason why these can't return an iterator, as for
-vector/deque/list:</p>
-<pre> iterator erase(iterator);
- iterator erase(iterator, iterator);
-</pre>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Informally: The table of associative container requirements, and the
-relevant template classes, should return an iterator designating the
-first element beyond the erased subrange.
-</p>
-<p><b>Rationale:</b></p>
-<p>Duplicate of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p>
-<hr>
-<a name="452"><h3>452.&nbsp; locale::combine should be permitted to generate a named locale</h3></a><p><b>Section:</b>&nbsp;22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<pre>template&lt;class Facet&gt;
- locale::combine(const locale&amp;) const;
-</pre>
-<p>
-is obliged to create a locale that has no name. This is overspecification
-and overkill. The resulting locale should follow the usual rules -- it
-has a name if the locale argument has a name and Facet is one of the
-standard facets.
-</p>
-
-<p><i>[
- Sydney and post-Sydney (see c++std-lib-13439, c++std-lib-13440,
- c++std-lib-13443): agreed that it's overkill to say that the locale
- is obligated to be nameless. However, we also can't require it to
- have a name. At the moment, locale names are based on categories
- and not on individual facets. If a locale contains two different
- facets of different names from the same category, then this would
- not fit into existing naming schemes. We need to give
- implementations more freedom. Bill will provide wording.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>After further discussion the LWG decided to close this as NAD.
- The fundamental problem is that names right now are per-category,
- not per-facet. The <tt>combine</tt> member function works at the
- wrong level of granularity.</p>
-<hr>
-<a name="472"><h3>472.&nbsp;Missing "Returns" clause in std::equal_range</h3></a><p><b>Section:</b>&nbsp;25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Prateek R Karandikar&nbsp; <b>Date:</b>&nbsp;29 Feb 1900</p>
-<p>
-There is no "Returns:" clause for std::equal_range, which returns non-void.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Fixed as part of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>.</p>
-<hr>
-<a name="476"><h3>476.&nbsp;Forward Iterator implied mutability</h3></a><p><b>Section:</b>&nbsp;24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;9 Jul 2004</p>
-
-<p>24.1/3 says:</p>
-<blockquote>
- Forward iterators satisfy all the requirements of the input and
- output iterators and can be used whenever either kind is specified
-</blockquote>
-
-<p>
-The problem is that satisfying the requirements of output iterator
-means that you can always assign *something* into the result of
-dereferencing it. That makes almost all non-mutable forward
-iterators non-conforming. I think we need to sever the refinement
-relationship between forward iterator and output iterator.
-</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>. But this is not a dup.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Yes, 24.1/3 does say that. But it's introductory material. The
-precise specification is in 24.1.3, and the requrements table there is
-right. We don't need to fine-tune introductory wording. (Especially
-since this wording is likely to be changed as part of the iterator
-overhaul.)</p>
-<hr>
-<a name="477"><h3>477.&nbsp;Operator-&gt; for const forward iterators</h3></a><p><b>Section:</b>&nbsp;24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;11 Jul 2004</p>
-<p>
-The Forward Iterator requirements table contains the following:
-</p>
-<pre> expression return type operational precondition
- semantics
- ========== ================== =========== ==========================
- a-&gt;m U&amp; if X is mutable, (*a).m pre: (*a).m is well-defined.
- otherwise const U&amp;
-
- r-&gt;m U&amp; (*r).m pre: (*r).m is well-defined.
-</pre>
-
-<p>
-The first line is exactly right. The second line is wrong. Basically
-it implies that the const-ness of the iterator affects the const-ness
-of referenced members. But Paragraph 11 of [lib.iterator.requirements] says:
-</p>
-
-<blockquote>
- In the following sections, a and b denote values of type const X, n
- denotes a value of the difference type Distance, u, tmp, and m
- denote identifiers, r denotes a value of X&amp;, t denotes a value of
- value type T, o denotes a value of some type that is writable to
- the output iterator.
-</blockquote>
-
-<p>AFAICT if we need the second line at all, it should read the same
-as the first line.</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG agrees that this is a real problem. Marked as a DUP
- because the LWG chose to adopt the solution proposed in
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
-</p>
-<hr>
-<a name="480"><h3>480.&nbsp;unary_function and binary_function should have protected nonvirtual destructors</h3></a><p><b>Section:</b>&nbsp;20.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple.tuple"> [lib.tuple.tuple]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Joe Gottman&nbsp; <b>Date:</b>&nbsp;19 Aug 2004</p>
-<p>The classes std::unary_function and std::binary_function are both
-designed to be inherited from but contain no virtual functions. This
-makes it too easy for a novice programmer to write code like
-binary_function&lt;int, int, int&gt; *p = new plus&lt;int&gt;; delete p;</p>
-
-<p>There are two common ways to prevent this source of undefined
-behavior: give the base class a public virtual destructor, or give it
-a protected nonvirtual destructor. Since unary_function and
-binary_function have no other virtual functions, (note in particular
-the absence of an operator()() ), it would cost too much to give them
-public virtual destructors. Therefore, they should be given protected
-nonvirtual destructors.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change Paragraph 20.3.1 of the Standard from</p>
-<pre> template &lt;class Arg, class Result&gt;
- struct unary_function {
- typedef Arg argument_type;
- typedef Result result_type;
- };
-
- template &lt;class Arg1, class Arg2, class Result&gt;
- struct binary_function {
- typedef Arg1 first_argument_type;
- typedef Arg2 second_argument_type;
- typedef Result result_type;
- };
-</pre>
-
-<p>to</p>
-<pre> template &lt;class Arg, class Result&gt;
- struct unary_function {
- typedef Arg argument_type;
- typedef Result result_type;
- protected:
- ~unary_function() {}
- };
-
- template &lt;class Arg1, class Arg2, class Result&gt;
- struct binary_function {
- typedef Arg1 first_argument_type;
- typedef Arg2 second_argument_type;
- typedef Result result_type;
- protected:
- ~binary_function() {}
- };
-</pre>
-<p><b>Rationale:</b></p>
-<p>The LWG doesn't believe the existing definition causes anybody any
- concrete harm.</p>
-<hr>
-<a name="481"><h3>481.&nbsp;unique's effects on the range [result, last)</h3></a><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;30 Aug 2004</p>
-<p>
-The standard says that unique(first, last) "eliminates all but the
-first element from every consecutive group of equal elements" in
-[first, last) and returns "the end of the resulting range". So a
-postcondition is that [first, result) is the same as the old [first,
-last) except that duplicates have been eliminated.
-</p>
-
-<p>What postconditions are there on the range [result, last)? One
- might argue that the standard says nothing about those values, so
- they can be anything. One might also argue that the standard
- doesn't permit those values to be changed, so they must not be.
- Should the standard say something explicit one way or the other?</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<p><b>Rationale:</b></p>
-<p>We don't want to make many guarantees about what's in [result,
-end). Maybe we aren't being quite explicit enough about not being
-explicit, but it's hard to think that's a major problem.</p>
-<hr>
-<a name="483"><h3>483.&nbsp;Heterogeneous equality and EqualityComparable</h3></a><p><b>Section:</b>&nbsp;25.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.nonmodifying"> [lib.alg.nonmodifying]</a>, 25.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.modifying.operations"> [lib.alg.modifying.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;20 Sep 2004</p>
-<p>c++std-lib-14262</p>
-
-<p>[lib.alg.find] requires T to be EqualityComparable:</p>
-
-<pre>template &lt;class InputIterator, class T&gt;
- InputIterator find(InputIterator first, InputIterator last,
- const T&amp; value);
-</pre>
-
-<p>
-However the condition being tested, as specified in the Effects
-clause, is actually *i == value, where i is an InputIterator.
-</p>
-
-<p>
-The two clauses are in agreement only if the type of *i is T, but this
-isn't necessarily the case. *i may have a heterogeneous comparison
-operator that takes a T, or a T may be convertible to the type of *i.
-</p>
-
-<p>Further discussion (c++std-lib-14264): this problem affects a
- number of algorithsm in clause 25, not just <tt>find</tt>. We
- should try to resolve this problem everywhere it appears.</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>[lib.alg.find]:</p>
-<blockquote>
- Remove [lib.alg.find]/1.
-</blockquote>
-
-<p>[lib.alg.count]:</p>
-<blockquote>
- Remove [lib.alg.count]/1.
-</blockquote>
-
-<p>[lib.alg.search]:</p>
-<blockquote>
- Remove "Type T is EqualityComparable (20.1.1), " from [lib.alg.search]/4.
-</blockquote>
-
-<p>[lib.alg.replace]:</p>
-
-<blockquote>
- <p>
- Remove [lib.alg.replace]/1.
- Replace [lb.alg.replace]/2 with:
- </p>
-
- <blockquote>
- For every iterator i in the range [first, last) for which *i == value
- or pred(*i) holds perform *i = new_value.
- </blockquote>
-
- <p>
- Remove the first sentence of /4.
- Replace the beginning of /5 with:
- </p>
-
- <blockquote>
- For every iterator i in the range [result, result + (last -
- first)), assign to *i either...
- </blockquote>
-
- <p>(Note the defect here, current text says assign to i, not *i).</p>
-</blockquote>
-
-<p>[lib.alg.fill]:</p>
-
-<blockquote>
- <p>
- Remove "Type T is Assignable (23.1), " from /1.
- Replace /2 with:
- </p>
-
- <blockquote>
- For every iterator i in the range [first, last) or [first, first + n),
- perform *i = value.
- </blockquote>
-</blockquote>
-
-<p>[lib.alg.remove]:</p>
-<blockquote>
- Remove /1.
- Remove the first sentence of /6.
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>Duplicate of (a subset of) issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a>.</p>
-<hr>
-<a name="486"><h3>486.&nbsp;min/max CopyConstructible requirement is too strict</h3></a><p><b>Section:</b>&nbsp;25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;13 Oct 2004</p>
-<p>A straightforward implementation of these algorithms does not need to
-copy T.</p>
-<p><b>Proposed resolution:</b></p>
-<p>drop the the words "and CopyConstructible" from paragraphs 1 and 4</p>
-<p><b>Rationale:</b></p>
-<p>Dup of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a>.</p>
-<hr>
-<a name="487"><h3>487.&nbsp;Allocator::construct is too limiting</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Dhruv Matani&nbsp; <b>Date:</b>&nbsp;17 Oct 2004</p>
-<p>
-The standard's version of allocator::construct(pointer,
-const_reference) severely limits what you can construct using this
-function. Say you can construct a socket from a file descriptor. Now,
-using this syntax, I first have to manually construct a socket from
-the fd, and then pass the constructed socket to the construct()
-function so it will just to an uninitialized copy of the socket I
-manually constructed. Now it may not always be possible to copy
-construct a socket eh! So, I feel that the changes should go in the
-allocator::construct(), making it:
-</p>
-<pre> template&lt;typename T&gt;
- struct allocator{
- template&lt;typename T1&gt;
- void construct(pointer T1 const&amp; rt1);
- };
-</pre>
-
-<p>
-Now, the ctor of the class T which matches the one that takes a T1 can
-be called! Doesn't that sound great?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>NAD. STL uses copying all the time, and making it possible for
- allocators to construct noncopyable objects is useless in the
- absence of corresponding container changes. We might consider this
- as part of a larger redesign of STL.</p>
-<hr>
-<a name="489"><h3>489.&nbsp;std::remove / std::remove_if wrongly specified</h3></a><p><b>Section:</b>&nbsp;25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Thomas Mang&nbsp; <b>Date:</b>&nbsp;12 Dec 2004</p>
-<p>In Section 25.2.7 [lib.alg.remove], paragraphs 1 to 5 describe the
-behavior of the mutating sequence operations std::remove and
-std::remove_if. However, the wording does not reflect the intended
-behavior [Note: See definition of intended behavior below] of these
-algorithms, as it is known to the C++ community [1].
-</p>
-
-
-
-<p>1) Analysis of current wording:</p>
-
-
-<p>25.2.7 [lib.alg.remove], paragraph 2:</p>
-
-<p>Current wording says:
-"Effects: Eliminates all the elements referred to by iterator i in the
-range [first, last) for which the following corresponding conditions
-hold: *i == value, pred(*i) != false."</p>
-
-<p>
-This sentences expresses specifically that all elements denoted by the
-(original) range [first, last) for which the corresponding condition
-hold will be eliminated. Since there is no formal definition of the term
-"eliminate" provided, the meaning of "eliminate" in everyday language
-implies that as postcondition, no element in the range denoted by
-[first, last) will hold the corresponding condition on reiteration over
-the range [first, last).
-</p>
-
-<p>
-However, this is neither the intent [Note: See definition of intended
-behavior below] nor a general possible approach. It can be easily proven
-that if all elements of the original range[first, last) will hold the
-condition, it is not possible to substitute them by an element for which
-the condition will not hold.
-</p>
-
-
-<p>25.2.7 [lib.alg.remove], paragraph 3:</p>
-
-<p>
-Current wording says:
-"Returns: The end of the resulting range."
-</p>
-
-<p>
-The resulting range is not specified. In combination with 25.2.7
-[lib.alg.remove], paragraph 2, the only reasonable interpretation of
-this so-called resulting range is the range [first,last) - thus
-returning always the ForwardIterator 'last' parameter.
-</p>
-
-
-<p>
-25.2.7 [lib.alg.remove], paragraph 4:
-</p>
-
-<p>
-Current wording says:
-"Notes: Stable: the relative order of the elements that are not removed
-is the same as their relative order in the original range"
-</p>
-
-<p>
-This sentences makes use of the term "removed", which is neither
-specified, nor used in a previous paragraph (which uses the term
-"eliminate"), nor unamgiuously separated from the name of the algorithm.
-</p>
-
-
-<p>2) Description of intended behavior:</p>
-
-<p>
-For the rest of this Defect Report, it is assumed that the intended
-behavior was that all elements of the range [first, last) which do not
-hold the condition *i == value (std::remove) or pred(*i) != false
-(std::remove_if)], call them s-elements [Note: s...stay], will be placed
-into a contiguous subrange of [first, last), denoted by the iterators
-[first, return value). The number of elements in the resulting range
-[first, return value) shall be equal to the number of s-elements in the
-original range [first, last). The relative order of the elements in the
-resulting subrange[first, return value) shall be the same as the
-relative order of the corresponding elements in the original range. It
-is undefined whether any elements in the resulting subrange [return
-value, last) will hold the corresponding condition, or not.
-</p>
-
-<p>
-All implementations known to the author of this Defect Report comply
-with this intent. Since the intent of the behavior (contrary to the
-current wording) is also described in various utility references serving
-the C++ community [1], it is not expected that fixing the paragraphs
-will influence current code - unless the code relies on the behavior as
-it is described by current wording and the implementation indeed
-reflects the current wording, and not the intent.
-</p>
-
-
-
-<p>3) Proposed fixes:</p>
-
-
-<p>Change 25.2.7 [lib.alg.remove], paragraph 2 to:</p>
-
-<p>
-"Effect: Places all the elements referred to by iterator i in the range
-[first, last) for which the following corresponding conditions hold :
-!(*i == value), pred(*i) == false into the subrange [first, k) of the
-original range, where k shall denote a value of type ForwardIterator. It
-is undefined whether any elements in the resulting subrange [k, last)
-will hold the corresponding condition, or not."
-</p>
-
-<p>Comments to the new wording:</p>
-
-<p>
-a) "Places" has no special meaning, and the everyday language meaning
-should fit.
-b) The corresponding conditions were negated compared to the current
-wording, becaue the new wording requires it.
-c) The wording "of the original range" might be redundant, since any
-subrange starting at 'first' and containing no more elements than the
-original range is implicitly a subrange of the original range [first,
-last).
-d) The iterator k was introduced instead of "return value" in order to
-avoid a cyclic dependency on 25.2.7/3. The wording ", where k shall
-denote a value of type ForwardIterator" might be redundant, because it
-follows implicitly by 25.2.7/3.
-e) "Places" does, in the author's opinion, explicitly forbid duplicating
-any element holding the corresponding condition in the original range
-[first, last) within the resulting range [first, k). If there is doubt
-this term might be not unambiguous regarding this, it is suggested that
-k is specified more closely by the following wording: "k shall denote a
-value of type ForwardIterator [Note: see d)] so that k - first is equal
-to the number of elements in the original range [first, last) for which
-the corresponding condition did hold". This could also be expressed as a
-separate paragraph "Postcondition:"
-f) The senctence "It is undefined whether any elements in the resulting
-subrange [k, last) will hold the corresponding condition, or not." was
-added consciously so the term "Places" does not imply if the original
-range [first, last) contains n elements holding the corresponding
-condition, the identical range[first, last) will also contain exactly n
-elements holding the corresponding condition after application of the
-algorithm.
-</p>
-
-<p>
-Change 25.2.7 [lib.alg.remove], paragraph 3 to:
-
-"Returns: The iterator k."
-</p>
-
-<p>
-Change 25.2.7 [lib.alg.remove], paragraph 4 to:
-
-"Notes: Stable: the relative order of the elements that are placed into
-the subrange [first, return value) shall be the same as their relative
-order was in the original range [first, last) prior to application of
-the algorithm."
-</p>
-
-<p>
-Comments to the new wording:
-</p>
-
-<p>
-a) the wording "was ... prior to application of the algorithm" is used
-to explicitly distinguish the original range not only by means of
-iterators, but also by a 'chronological' factor from the resulting range
-[first, return value). It might be redundant.
-</p>
-
-<p>
-[1]:
-The wording of these references is not always unambiguous, and provided
-examples partially contradict verbal description of the algorithms,
-because the verbal description resembles the problematic wording of
-ISO/IEC 14882:2003.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes that the standard is sufficiently clear, and that
- there is no evidence of any real-world confusion about this point.</p>
-<hr>
-<a name="490"><h3>490.&nbsp;std::unique wrongly specified</h3></a><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Thomas Mang&nbsp; <b>Date:</b>&nbsp;12 Dec 2004</p>
-<p>In Section 25.2.8 [lib.alg.unique], paragraphs 1 to 3 describe the
-behavior of the mutating sequence operation std::unique. However, the
-wording does not reflect the intended behavior [Note: See definition of
-intended behavior below] of these algorithms, as it is known to the C++
-community [1].</p>
-
-
-
-<p>1) Analysis of current wording:</p>
-
-
-<p>25.2.8 [lib.alg.unique], paragraph 1:</p>
-
-<p>
-Current wording says:
-"Effects: Eliminates all but the first element from every consecutive
-group of equal elements referred to by the iterator i in the range
-[first, last) for which the following corresponding conditions hold: *i
-== *(i - 1) or pred(*i, *(i -1)) != false"
-</p>
-
-<p>
-This sentences expresses specifically that all elements denoted by the
-(original) range [first, last) which are not but the first element from
-a consecutive group of equal elements (where equality is defined as *i
-== *(i - 1) or pred(*i, *(i - 1)) ! = false) [Note: See DR 202], call
-them r-elements [Note: r...remove], will be eliminated. Since there is
-no formal definition of the term "eliminate" provided, it is undefined
-how this "elimination" takes place. But the meaning of "eliminate" in
-everyday language seems to disallow explicitly that after application of
-the algorithm, any r-element will remain at any position of the range
-[first, last) [2].
-</p>
-
-<p>
-Another defect in the current wording concerns the iterators used to
-compare two elements for equality: The current wording contains the
-expression "(i - 1)", which is not covered by 25/9 [Note: See DR
-submitted by Thomas Mang regarding invalid iterator arithmetic
-expressions].
-</p>
-
-
-<p>
-25.2.8 [lib.alg.unique], paragraph 2:
-</p>
-<p>Current wording says:
-"Returns: The end of the resulting range."</p>
-
-<p>
-The resulting range is not specified. In combination with 25.2.8
-[lib.alg.unique], paragraph 1, one reasonable interpretation (in the
-author's opinion even the only possible interpretation) of this
-so-called resulting range is the range [first, last) - thus returning
-always the ForwardIterator 'last' parameter.
-</p>
-
-<p>2) Description of intended behavior:</p>
-
-<p>
-For the rest of this Defect Report, it is assumed that the intended
-behavior was that all elements denoted by the original range [first,
-last) which are the first element from a consecutive group of elements
-for which the corresponding conditions: *(i-1) == *i (for the version of
-unique without a predicate argument) or pred(*(i-1), *i) ! = false (for
-the version of unique with a predicate argument) [Note: If such a group
-of elements consists of only a single element, this is also considered
-the first element] [Note: See resolutions of DR 202], call them
-s-elements [Note: s...stay], will be placed into a contiguous subrange
-of [first, last), denoted by the iterators [first, return value). The
-number of elements in the resulting range [first, return value) shall be
-equal to the number of s-elements in the original range [first, last).
-Invalid iterator arithmetic expressions are expected to be resolved as
-proposed in DR submitted by Thomas Mang regarding invalid iterator
-arithmetic expressions. It is also assumed by the author that the
-relative order of the elements in the resulting subrange [first, return
-value) shall be the same as the relative order of the corresponding
-elements (the s-elements) in the original range [Note: If this was not
-intended behavior, the additional proposed paragraph about stable order
-will certainly become obsolete].
-Furthermore, the resolutions of DR 202 are partially considered.
-</p>
-
-<p>
-All implementations known to the author of this Defect Report comply
-with this intent [Note: Except possible effects of DR 202]. Since this
-intent of the behavior (contrary to the current wording) is also
-described in various utility references serving the C++ community [1],
-it is not expected that fixing the paragraphs will influence current
-code [Note: Except possible effects of DR 202] - unless the code relies
-on the behavior as it is described by current wording and the
-implementation indeed reflects the current wording, and not the intent.
-</p>
-
-
-
-<p>3) Proposed fixes:</p>
-
-<p>
-Change 25.2.8 [lib.alg.unique], paragraph 1 to:
-</p>
-
-<p>
-"Effect: Places the first element from every consecutive group of
-elements, referred to by the iterator i in the range [first, last), for
-which the following conditions hold: *(i-1) == *i (for the version of
-unique without a predicate argument) or pred(*(i -1), *i) != false (for
-the version of unique with a predicate argument), into the subrange
-[first, k) of the original range, where k shall denote a value of type
-ForwardIterator."
-</p>
-
-<p>Comments to the new wording:</p>
-
-<p>
-a) The new wording was influenced by the resolutions of DR 202. If DR
-202 is resolved in another way, the proposed wording need also
-additional review.
-b) "Places" has no special meaning, and the everyday language meaning
-should fit.
-c) The expression "(i - 1)" was left, but is expected that DR submitted
-by Thomas Mang regarding invalid iterator arithmetic expressions will
-take this into account.
-d) The wording "(for the version of unique without a predicate
-argument)" and "(for the version of unique with a predicate argument)"
-was added consciously for clarity and is in resemblence with current
-23.2.2.4 [lib.list.ops], paragraph 19. It might be considered redundant.
-e) The wording "of the original range" might be redundant, since any
-subrange starting at first and containing no more elements than the
-original range is implicitly a subrange of the original range [first,
-last).
-f) The iterator k was introduced instead of "return value" in order to
-avoid a cyclic dependency on 25.2.8 [lib.alg.unique], paragraph 2. The
-wording ", where k shall denote a value of type ForwardIterator" might
-be redundant, because it follows implicitly by 25.2.8 [lib.alg.unique],
-paragraph 2.
-g) "Places" does, in the author's opinion, explicitly forbid duplicating
-any s-element in the original range [first, last) within the resulting
-range [first, k). If there is doubt this term might be not unambiguous
-regarding this, it is suggested that k is specified more closely by the
-following wording: "k shall denote a value of type ForwardIterator
-[Note: See f)] so that k - first is equal to the number of elements in
-the original range [first, last) being the first element from every
-consecutive group of elements for which the corresponding condition did
-hold". This could also be expressed as a separate paragraph
-"Postcondition:".
-h) If it is considered that the wording is unclear whether it declares
-the element of a group which consists of only a single element
-implicitly to be the first element of this group [Note: Such an
-interpretation could eventually arise especially in case last - first ==
-1] , the following additional sentence is proposed: "If such a group of
-elements consists of only a single element, this element is also
-considered the first element."
-</p>
-
-<p>
-Change 25.2.8 [lib.alg.unique], paragraph 2 to:
-"Returns: The iterator k."
-</p>
-
-<p>
-Add a separate paragraph "Notes:" as 25.2.8 [lib.alg.unique], paragraph
-2a or 3a, or a separate paragraph "Postcondition:" before 25.2.8
-[lib.alg.unique], paragraph 2 (wording inside {} shall be eliminated if
-the preceding expressions are used, or the preceding expressions shall
-be eliminated if wording inside {} is used):
-</p>
-
-<p>
-"Notes:{Postcondition:} Stable: the relative order of the elements that
-are placed into the subrange [first, return value {k}) shall be the same
-as their relative order was in the original range [first, last) prior to
-application of the algorithm."
-</p>
-
-<p>Comments to the new wording:</p>
-
-<p>
-a) It is assumed by the author that the algorithm was intended to be
-stable.
-In case this was not the intent, this paragraph becomes certainly
-obsolete.
-b) The wording "was ... prior to application of the algorithm" is used
-to explicitly distinguish the original range not only by means of
-iterators, but also by a 'chronological' factor from the resulting range
-[first, return value). It might be redundant.
-</p>
-
-<p>
-25.2.8 [lib.alg.unique], paragraph 3:
-</p>
-<p>See DR 239.</p>
-
-<p>
-4) References to other DRs:
-</p>
-
-<p>
-See DR 202, but which does not address any of the problems described in
-this Defect Report [Note: This DR is supposed to complement DR 202].
-See DR 239.
-See DR submitted by Thomas Mang regarding invalid iterator arithmetic
-expressions.
-</p>
-
-<p>
-[1]:
-The wording of these references is not always unambiguous, and provided
-examples partially contradict verbal description of the algorithms,
-because the verbal description resembles the problematic wording of
-ISO/IEC 14882:2003.
-</p>
-
-<p>
-[2]:
-Illustration of conforming implementations according to current wording:
-</p>
-
-<p>
-One way the author of this DR considers how this "elimination" could be
-achieved by a conforming implementation according to current wording is
-by substituting each r-element by _any_ s-element [Note: s...stay; any
-non-r-element], since all r-elements are "eliminated".
-</p>
-
-<p>
-In case of a sequence consisting of elements being all 'equal' [Note:
-See DR 202], substituting each r-element by the single s-element is the
-only possible solution according to current wording.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes the standard is sufficiently clear. No
-implementers get it wrong, and changing it wouldn't cause any code to
-change, so there is no real-world harm here.</p>
-<hr>
-<a name="491"><h3>491.&nbsp;std::list&lt;&gt;::unique incorrectly specified</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Thomas Mang&nbsp; <b>Date:</b>&nbsp;12 Dec 2004</p>
-<p>In Section 23.2.2.4 [lib.list.ops], paragraphs 19 to 21 describe the
-behavior of the std::list&lt;T, Allocator&gt;::unique operation. However, the
-current wording is defective for various reasons.</p>
-
-
-
-<p>
-1) Analysis of current wording:
-</p>
-
-<p>23.2.2.4 [lib.list.ops], paragraph 19:</p>
-
-<p>
-Current wording says:
-"Effects: Eliminates all but the first element from every consecutive
-group of equal elements referred to by the iterator i in the range
-[first + 1, last) for which *i == *(i - 1) (for the version of unique
-with no argument) or pred(*i, *(i -1)) (for the version of unique with a
-predicate argument) holds."</p>
-
-<p>
-This sentences makes use of the undefined term "Eliminates". Although it
-is, to a certain degree, reasonable to consider the term "eliminate"
-synonymous with "erase", using "Erase" in the first place, as the
-wording of 23.2.2.4 [lib.list.ops], paragraph 15 does, would be clearer.</p>
-
-<p>
-The range of the elements referred to by iterator i is "[first + 1,
-last)". However, neither "first" nor "last" is defined.</p>
-
-<p>
-The sentence makes three times use of iterator arithmetic expressions (
-"first + 1", "*i == *(i - 1)", "pred(*i, *(i -1))" ) which is not
-defined for bidirectional iterator [see DR submitted by Thomas Mang
-regarding invalid iterator arithmetic expressions].</p>
-
-<p>
-The same problems as pointed out in DR 202 (equivalence relation / order
-of arguments for pred()) apply to this paragraph.</p>
-
-<p>
-23.2.2.4 [lib.list.ops], paragraph 20:
-</p>
-
-<p>
-Current wording says:
-"Throws: Nothing unless an exception in thrown by *i == *(i-1) or
-pred(*i, *(i - 1))"</p>
-
-<p>
-The sentence makes two times use of invalid iterator arithmetic
-expressions ( "*i == *(i - 1)", "pred(*i, *(i -1))" ).
-</p>
-<p>
-[Note: Minor typos: "in" / missing dot at end of sentence.]
-</p>
-
-<p>
-23.2.2.4 [lib.list.ops], paragraph 21:</p>
-
-<p>
-Current wording says:
-"Complexity: If the range (last - first) is not empty, exactly (last -
-first) - 1 applications of the corresponding predicate, otherwise no
-application of the predicate.</p>
-
-<p>
-See DR 315 regarding "(last - first)" not yielding a range.</p>
-
-<p>
-Invalid iterator arithmetic expression "(last - first) - 1" left .</p>
-
-
-<p>2) Description of intended behavior:</p>
-
-<p>
-For the rest of this Defect Report, it is assumed that "eliminate" is
-supposed to be synonymous to "erase", that "first" is equivalent to an
-iterator obtained by a call to begin(), "last" is equivalent to an
-iterator obtained by a call to end(), and that all invalid iterator
-arithmetic expressions are resolved as described in DR submitted by
-Thomas Mang regarding invalid iterator arithmetic expressions.</p>
-
-<p>
-Furthermore, the resolutions of DR 202 are considered regarding
-equivalence relation and order of arguments for a call to pred.</p>
-
-<p>
-All implementations known to the author of this Defect Report comply
-with these assumptions, apart from the impact of the alternative
-resolution of DR 202. Except for the changes implied by the resolutions
-of DR 202, no impact on current code is expected.</p>
-
-<p>
-3) Proposed fixes:</p>
-
-<p>
-Change 23.2.2.4 [lib.list.ops], paragraph 19 to:</p>
-
-<p>
-"Effect: Erases all but the first element from every consecutive group
-of elements, referred to by the iterator i in the range [begin(),
-end()), for which the following conditions hold: *(i-1) == *i (for the
-version of unique with no argument) or pred(*(i-1), *i) != false (for
-the version of unique with a predicate argument)."</p>
-
-<p>
-Comments to the new wording:</p>
-
-<p>
-a) The new wording was influenced by DR 202 and the resolutions
-presented there. If DR 202 is resolved in another way, the proposed
-wording need also additional review.
-b) "Erases" refers in the author's opinion unambiguously to the member
-function "erase". In case there is doubt this might not be unamgibuous,
-a direct reference to the member function "erase" is suggested [Note:
-This would also imply a change of 23.2.2.4 [lib.list.ops], paragraph
-15.].
-c) The expression "(i - 1)" was left, but is expected that DR submitted
-by Thomas Mang regarding invalid iterator arithmetic expressions will
-take this into account.
-d) The wording "(for the version of unique with no argument)" and "(for
-the version of unique with a predicate argument)" was kept consciously
-for clarity.
-e) "begin()" substitutes "first", and "end()" substitutes "last". The
-range need adjustment from "[first + 1, last)" to "[begin(), end())" to
-ensure a valid range in case of an empty list.
-f) If it is considered that the wording is unclear whether it declares
-the element of a group which consists of only a single element
-implicitly to be the first element of this group [Note: Such an
-interpretation could eventually arise especially in case size() == 1] ,
-the following additional sentence is proposed: "If such a group of
-elements consists of only a single element, this element is also
-considered the first element."</p>
-
-<p>
-Change 23.2.2.4 [lib.list.ops], paragraph 20 to:</p>
-
-<p>
-"Throws: Nothing unless an exception is thrown by *(i-1) == *i or
-pred(*(i-1), *i)."</p>
-
-<p>
-Comments to the new wording:</p>
-
-<p>
-a) The wording regarding the conditions is identical to proposed
-23.2.2.4 [lib.list.ops], paragraph 19. If 23.2.2.4 [lib.list.ops],
-paragraph 19 is resolved in another way, the proposed wording need also
-additional review.
-b) The expression "(i - 1)" was left, but is expected that DR submitted
-by Thomas Mang regarding invalid iterator arithmetic expressions will
-take this into account.
-c) Typos fixed.</p>
-
-<p>
-Change 23.2.2.4 [lib.list.ops], paragraph 21 to:</p>
-
-<p>
-"Complexity: If empty() == false, exactly size() - 1 applications of the
-corresponding predicate, otherwise no applications of the corresponding
-predicate."</p>
-
-<p>
-Comments to the new wording:</p>
-
-<p>
-a) The new wording is supposed to also replace the proposed resolution
-of DR 315, which suffers from the problem of undefined "first" / "last".
-</p>
-
-<p>
-5) References to other DRs:</p>
-
-<p>See DR 202.
-See DR 239.
-See DR 315.
-See DR submitted by Thomas Mang regarding invalid iterator arithmetic
-expressions.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>"All implementations known to the author of this Defect Report
-comply with these assumption", and "no impact on current code is
-expected", i.e. there is no evidence of real-world confusion or
-harm.</p>
-<hr>
-<a name="493"><h3>493.&nbsp;Undefined Expression in Input Iterator Note Title</h3></a><p><b>Section:</b>&nbsp;24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Chris Jefferson&nbsp; <b>Date:</b>&nbsp;13 Dec 2004</p>
-<p>1) In 24.1.1/3, the following text is currently present.</p>
-
-<p>"Note: For input iterators, a==b does not imply ++a=++b (Equality does
-not guarantee the substitution property or referential transparency)."</p>
-
-<p>However, when in Table 72, part of the definition of ++r is given as:</p>
-
-<p>"pre: r is dereferenceable.
-post: any copies of the previous value of r are no longer required
-either to be dereferenceable ..."</p>
-
-<p>While a==b does not imply that b is a copy of a, this statement should
-perhaps still be made more clear.</p>
-
-<p>2) There are no changes to intended behaviour</p>
-
-<p>
-3) This Note should be altered to say "Note: For input iterators a==b,
-when its behaviour is defined ++a==++b may still be false (Equality does
-not guarantee the substitution property or referential transparency).</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>This is descriptive text, not normative, and the meaning is clear.</p>
-<hr>
-<a name="494"><h3>494.&nbsp;Wrong runtime complexity for associative container's insert and delete</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Hans B os&nbsp; <b>Date:</b>&nbsp;19 Dec 2004</p>
-<p>According to [lib.associative.reqmts] table 69, the runtime comlexity
-of insert(p, t) and erase(q) can be done in amortized constant time.</p>
-
-<p>It was my understanding that an associative container could be
-implemented as a balanced binary tree.</p>
-
-<p>For inser(p, t), you 'll have to iterate to p's next node to see if t
-can be placed next to p. Furthermore, the insertion usually takes
-place at leaf nodes. An insert next to the root node will be done at
-the left of the root next node</p>
-
-<p>So when p is the root node you 'll have to iterate from the root to
-its next node, which takes O(log(size)) time in a balanced tree.</p>
-
-<p>If you insert all values with insert(root, t) (where root is the
-root of the tree before insertion) then each insert takes O(log(size))
-time. The amortized complexity per insertion will be O(log(size))
-also.</p>
-
-<p>For erase(q), the normal algorithm for deleting a node that has no
-empty left or right subtree, is to iterate to the next (or previous),
-which is a leaf node. Then exchange the node with the next and delete
-the leaf node. Furthermore according to DR 130, erase should return
-the next node of the node erased. Thus erasing the root node,
-requires iterating to the next node.</p>
-
-<p>Now if you empty a map by deleting the root node until the map is
-empty, each operation will take O(log(size)), and the amortized
-complexity is still O(log(size)).</p>
-
-<p>The operations can be done in amortized constant time if iterating
-to the next node can be done in (non amortized) constant time. This
-can be done by putting all nodes in a double linked list. This
-requires two extra links per node. To me this is a bit overkill since
-you can already efficiently insert or erase ranges with erase(first,
-last) and insert(first, last).</p>
-
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>Only "amortized constant" in special circumstances, and we believe
- that's implementable. That is: doing this N times will be O(N), not
- O(log N).</p>
-<hr>
-<a name="499"><h3>499.&nbsp;Std. doesn't seem to require stable_sort() to be stable!</h3></a><p><b>Section:</b>&nbsp;25.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.stable.sort"> [lib.stable.sort]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Prateek Karandikar&nbsp; <b>Date:</b>&nbsp;12 Apr 2005</p>
-<blockquote>
-<p>
-17.3.1.1 Summary</p>
-
-<p>
-1 The Summary provides a synopsis of the category, and introduces the
-first-level subclauses. Each subclause also provides a summary, listing
-the headers specified in the subclause and the library entities
-provided in each header.
-</p>
-<p>
-2 Paragraphs labelled "Note(s):" or "Example(s):" are informative,
-other paragraphs are normative.
-</p>
-</blockquote>
-
-<p>So this means that a "Notes" paragraph wouldn't be normative. </p>
-
-<blockquote>
-<p>
-25.3.1.2 stable_sort
-</p>
-<pre>template&lt;class RandomAccessIterator&gt;
-void stable_sort(RandomAccessIterat or first, RandomAccessIterator last);
-
-template&lt;class RandomAccessIterator, class Compare&gt;
-void stable_sort(RandomAccessIterat or first, RandomAccessIterator last, Compare comp);
-</pre>
-<p>
-1 Effects: Sorts the elements in the range [first, last).
-</p>
-<p>
-2 Complexity: It does at most N(log N)^2 (where N == last - first)
-comparisons; if enough extra memory is available, it is N log N.
-</p>
-<p>
-3 Notes: Stable: the relative order of the equivalent elements is
-preserved.
-</p>
-</blockquote>
-
-<p>
-The Notes para is informative, and nowhere else is stability mentioned above.
-</p>
-
-<p>
-Also, I just searched for the word "stable" in my copy of the Standard.
-and the phrase "Notes: Stable: the relative order of the elements..."
-is repeated several times in the Standard library clauses for
-describing various functions. How is it that stability is talked about
-in the informative paragraph? Or am I missing something obvious?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<p><b>Rationale:</b></p>
-<p>
-This change has already been made.
-</p>
-<hr>
-<a name="500"><h3>500.&nbsp;do_length cannot be implemented correctly</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Krzysztof ¯elechowski&nbsp; <b>Date:</b>&nbsp;24 May 2005</p>
-<ol>
-<li>codecvt::do_length is of type int;</li>
-<li>it is assumed to be sort-of returning from_next - from of type ptrdiff_t;</li>
-<li>ptrdiff_t cannot be cast to an int without data loss.</li>
-</ol>
-<p>
-Contradiction.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-</p>
-<hr>
-<a name="501"><h3>501.&nbsp;Proposal: strengthen guarantees of lib.comparisons</h3></a><p><b>Section:</b>&nbsp;20.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.base"> [lib.base]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Me &lt;anti_spam_email2003@yahoo.com&gt;&nbsp; <b>Date:</b>&nbsp;7 Jun 2005</p>
-<blockquote>
-"For templates greater, less, greater_equal, and less_equal,
-the specializations for any pointer type yield a total order, even if
-the built-in operators &lt;, &gt;, &lt;=, &gt;= do not."
-</blockquote>
-
-<p>
-The standard should do much better than guarantee that these provide a
-total order, it should guarantee that it can be used to test if memory
-overlaps, i.e. write a portable memmove. You can imagine a platform
-where the built-in operators use a uint32_t comparison (this tests for
-overlap on this platform) but the less&lt;T*&gt; functor is allowed to be
-defined to use a int32_t comparison. On this platform, if you use
-std::less with the intent of making a portable memmove, comparison on
-an array that straddles the 0x7FFFFFFF/0x8000000 boundary can give
-incorrect results.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add a footnote to 20.5.3/8 saying:
-</p>
-
-<blockquote>
-Given a p1 and p2 such that p1 points to N objects of type T and p2
-points to M objects of type T. If [p1,p1+N) does not overlap [p2,p2+M),
-less returns the same value when comparing all pointers in [p1,p1+N) to
-all pointers in [p2,p2+M). Otherwise, there is a value Q and a value R
-such that less returns the same value when comparing all pointers in
-[p1,p1+Q) to all pointers in [p2,p2+R) and an opposite value when
-comparing all pointers in [p1+Q,p1+N) to all pointers in [p2+R,p2+M).
-For the sake of completeness, the null pointer value (4.10) for T is
-considered to be an array of 1 object that doesn't overlap with any
-non-null pointer to T. less_equal, greater, greater_equal, equal_to,
-and not_equal_to give the expected results based on the total ordering
-semantics of less. For T of void, treat it as having similar semantics
-as T of char i.e. less&lt;cv T*&gt;(a, b) gives the same results as less&lt;cv
-void*&gt;(a, b) which gives the same results as less&lt;cv char*&gt;((cv
-char*)(cv void*)a, (cv char*)(cv void*)b).
-</blockquote>
-
-<p>
-I'm also thinking there should be a footnote to 20.5.3/1 saying that if
-A and B are similar types (4.4/4), comp&lt;A&gt;(a,b) returns the same value
-as comp&lt;B&gt;(a,b) (where comp is less, less_equal, etc.). But this might
-be problematic if there is some really funky operator overloading going
-on that does different things based on cv (that should be undefined
-behavior if somebody does that though). This at least should be
-guaranteed for all POD types (especially pointers) that use the
-built-in comparison operators.
-</p>
-
-<p><b>Rationale:</b></p>
-less is already required to provide a strict weak ordering which is good enough
-to detect overlapping memory situations.
-<hr>
-<a name="504"><h3>504.&nbsp;Integer types in pseudo-random number engine requirements</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-In [tr.rand.req], Paragraph 2 states that "... s is a value of integral type,
-g is an ... object returning values of unsigned integral type ..."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 5.1.1 [tr.rand.req], Paragraph 2 replace
-</p>
-
-<blockquote>
-... s is a value of integral type, g is an lvalue of a type other than X that
-defines a zero-argument function object returning values of <del>unsigned integral</del> type
-<ins><tt>unsigned long int</tt></ins>,
-...
-</blockquote>
-
-<p>
-In 5.1.1 [tr.rand.seq], Table 16, replace in the line for X(s)
-</p>
-
-<blockquote>
-creates an engine with the initial internal state
-determined by <ins><tt>static_cast&lt;unsigned long&gt;(</tt></ins><tt><i>s</i></tt><ins><tt>)</tt></ins>
-</blockquote>
-
-<p><i>[
-Mont Tremblant: Both s and g should be unsigned long.
-This should refer to the constructor signatures. Jens provided wording post Mont Tremblant.
-]</i></p>
-
-<p><i>[
-Berlin: N1932 adopts the proposed resolution: see 26.3.1.3/1e and Table 3 row 2. Moved
-to Ready.
-]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-Jens: Just requiring X(unsigned long) still makes it possible
-for an evil library writer to also supply a X(int) that does something
-unexpected. The wording above requires that X(s) always performs
-as if X(unsigned long) would have been called. I believe that is
-sufficient and implements our intentions from Mont Tremblant. I
-see no additional use in actually requiring a X(unsigned long)
-signature. u.seed(s) is covered by its reference to X(s), same
-arguments.
-</p>
-<hr>
-<a name="506"><h3>506.&nbsp;Requirements of Distribution parameter for variate_generator</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 3 requires that template argument U (which corresponds to template
-parameter Engine) satisfy all uniform random number generator requirements.
-However, there is no analogous requirement regarding the template argument
-that corresponds to template parameter Distribution. We believe there should
-be, and that it should require that this template argument satisfy all random
-distribution requirements.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18.
-</p>
-<p>
-Consequence 2: Add max() and min() functions to those distributions that
-do not already have them.
-</p>
-
-<p><i>[
-Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere.
-Marc supports having min and max to satisfy generic programming interface.
-]</i></p>
-
-<p><b>Rationale:</b></p>
-Berlin: N1932 makes this moot: variate_generator has been eliminated.
-<hr>
-<a name="509"><h3>509.&nbsp;Uniform_int template parameters</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.iunif"> [tr.rand.dist.iunif]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-In [tr.rand.dist.iunif] the uniform_int distribution currently has a single
-template parameter, IntType, used as the input_type and as the result_type
-of the distribution. We believe there is no reason to conflate these types
-in this way.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-We recommend that there be a second template parameter to
-reflect the distributionÕs input_type, and that the existing first template
-parameter continue to reflect (solely) the result_type:
-</p>
-<blockquote><pre>template&lt; class IntType = int, UIntType = unsigned int &gt;
-class uniform_int
-{
-public:
- // types
- typedef UIntType input_type;
- typedef IntType result_type;
-</pre></blockquote>
-
-<p><i>[
-Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
-eliminated.
-]</i></p>
-
-<hr>
-<a name="510"><h3>510.&nbsp;Input_type for bernoulli_distribution</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bern"> [tr.rand.dist.bern]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-In [tr.rand.dist.bern] the distribution currently requires;
-</p>
-<blockquote><pre>typedef int input_type;
-</pre></blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-We believe this is an unfortunate choice, and recommend instead:
-</p>
-<blockquote><pre>typedef unsigned int input_type;
-</pre></blockquote>
-
-<p><i>[
-Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
-eliminated.
-]</i></p>
-
-<hr>
-<a name="511"><h3>511.&nbsp;Input_type for binomial_distribution</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bin"> [tr.rand.dist.bin]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Unlike all other distributions in TR1, this binomial_distribution has an
-implementation-defined input_type. We believe this is an unfortunate choice,
-because it hinders users from writing portable code. It also hinders the
-writing of compliance tests. We recommend instead:
-</p>
-<blockquote><pre>typedef RealType input_type;
-</pre></blockquote>
-<p>
-While this choice is somewhat arbitrary (as it was for some of the other
-distributions), we make this particular choice because (unlike all other
-distributions) otherwise this template would not publish its RealType
-argument and so users could not write generic code that accessed this
-second template parameter. In this respect, the choice is consistent with
-the other distributions in TR1.
-</p>
-<p>
-We have two reasons for recommending that a real type be specified instead.
-One reason is based specifically on characteristics of binomial distribution
-implementations, while the other is based on mathematical characteristics of
-probability distribution functions in general.
-</p>
-<p>
-Implementations of binomial distributions commonly use Stirling approximations
-for values in certain ranges. It is far more natural to use real values to
-represent these approximations than it would be to use integral values to do
-so. In other ranges, implementations reply on the Bernoulli distribution to
-obtain values. While TR1Õs bernoulli_distribution::input_type is specified as
-int, we believe this would be better specified as double.
-</p>
-<p>
-This brings us to our main point: The notion of a random distribution rests
-on the notion of a cumulative distribution function, which in turn mathematically
-depends on a continuous dependent variable. Indeed, such a distribution function
-would be meaningless if it depended on discrete values such as integersÑand this
-remains true even if the distribution function were to take discrete steps.
-</p>
-<p>
-Although this note is specifically about binomial_distribution::input_type,
-we intend to recommend that all of the random distributionsÕ input_types be
-specified as a real type (either a RealType template parameter, or double,
-as appropriate).
-</p>
-<p>
-Of the nine distributions in TR1, four already have this characteristic
-(uniform_real, exponential_distribution, normal_distribution, and
-gamma_distribution). We have already argued the case for the binomial the
-remaining four distributions.
-</p>
-<p>
-In the case of uniform_int, we believe that the calculations to produce an
-integer result in a specified range from an integer in a different specified
-range is best done using real arithmetic. This is because it involves a
-product, one of whose terms is the ratio of the extents of the two ranges.
-Without real arithmetic, the results become less uniform: some numbers become
-more (or less) probable that they should be. This is, of course, undesireable
-behavior in a uniform distribution.
-</p>
-<p>
-Finally, we believe that in the case of the bernoulli_distribution (briefly
-mentioned earlier), as well as the cases of the geometric_distribution and the
-poisson_distribution, it would be far more natural to have a real input_type.
-This is because the most natural computation involves the random number
-delivered and the distributionÕs parameter p (in the case of bernoulli_distribution,
-for example, the computation is a comparison against p), and p is already specified
-in each case as having some real type.
-</p>
-<p><b>Proposed resolution:</b></p>
-<blockquote><pre>typedef RealType input_type;
-</pre></blockquote>
-
-<p><i>[
-Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
-eliminated.
-]</i></p>
-<hr>
-<a name="512"><h3>512.&nbsp;Seeding subtract_with_carry_01 from a single unsigned long</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 8 specifies the algorithm by which a subtract_with_carry_01 engine
-is to be seeded given a single unsigned long. This algorithm is seriously
-flawed in the case where the engine parameter w (also known as word_size)
-exceeds 31 [bits]. The key part of the paragraph reads:
-</p>
-<blockquote>
-sets x(-r) ... x(-1) to (lcg(1)*2**(-w)) mod 1
-</blockquote>
-<p>
-and so forth.
-</p>
-<p>
-Since the specified linear congruential engine, lcg, delivers numbers with
-a maximum of 2147483563 (just a shade under 31 bits), then when w is, for
-example, 48, each of the x(i) will be less than 2**-17. The consequence
-is that roughly the first 400 numbers delivered will be conspicuously
-close to either zero or one.
-</p>
-<p>
-Unfortunately, this is not an innocuous flaw: One of the predefined engines
-in [tr.rand.predef], namely ranlux64_base_01, has w = 48 and would exhibit
-this poor behavior, while the original N1378 proposal states that these
-pre-defined engines are intended to be of "known good properties."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 5.1.4.4 [tr.rand.eng.sub1], replace the "effects" clause for
-void seed(unsigned long value = 19780503) by
-</p>
-
-<blockquote>
-<i>Effects:</i> If <tt>value == 0</tt>, sets value to <tt>19780503</tt>. In any
-case, <del>with a linear congruential generator <tt>lcg</tt>(i) having parameters
-<tt><i>m<sub>lcg</sub></i> = 2147483563</tt>, <tt><i>a<sub>lcg</sub></i> = 40014</tt>,
-<tt><i>c<sub>lcg</sub></i> = 0</tt>, and <tt><i>lcg</i>(0) = value</tt>,</del>
-sets <ins>carry<tt>(-1)</tt> and</ins> <tt>x(-r) &#8230; x(-1)</tt>
-<ins>as if executing</ins>
-
-<blockquote><pre><ins>
-linear_congruential&lt;unsigned long, 40014, 0, 2147483563&gt; lcg(value);
-seed(lcg);
-</ins></pre></blockquote>
-
-<del>to <tt>(<i>lcg</i>(1) · 2<sup>-<i>w</i></sup>) mod 1
-&#8230; (<i>lcg</i>(<i>r</i>) · 2<sup>-<i>w</i></sup>) mod 1</tt>,
-respectively. If <tt><i>x</i>(-1) == 0</tt>, sets carry<tt>(-1) = 2<sup>-<i>w</i></sup></tt>,
-else sets carry<tt>(-1) = 0</tt>.</del>
-</blockquote>
-
-<p><i>[
-Jens provided revised wording post Mont Tremblant.
-]</i></p>
-
-<p><i>[
-Berlin: N1932 adopts the originally-proposed resolution of the issue.
-Jens's supplied wording is a clearer description of what is
-intended. Moved to Ready.
-]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-Jens: I'm using an explicit type here, because fixing the
-prose would probably not qualify for the (with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a> even
-stricter) requirements we have for seed(Gen&amp;).
-</p>
-
-<p><i>[
-Portland: Subsumed by N2111.
-]</i></p>
-<hr>
-<a name="513"><h3>513.&nbsp;Size of state for subtract_with_carry_01</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 3 begins:
-</p>
-<blockquote>
-The size of the state is r.
-</blockquote>
-<p>
-However, this is not quite consistent with the remainder of the paragraph
-which specifies a total of nr+1 items in the textual representation of
-the state. We recommend the sentence be corrected to match:
-</p>
-<blockquote>
-The size of the state is nr+1.
-</blockquote>
-<p>
-To give meaning to the coefficient n, it may be also desirable to move
-nÕs definition from later in the paragraph. Either of the following
-seem reasonable formulations:
-</p>
-<blockquote>
-With n=..., the size of the state is nr+1.
-</blockquote>
-<blockquote>
-The size of the state is nr+1, where n=... .
-</blockquote>
-<p>
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[
-Jens: I plead for "NAD" on the grounds that "size of state" is only
-used as an argument for big-O complexity notation, thus
-constant factors and additions don't count.
-]</i></p>
-
-<p><i>[
-Berlin: N1932 adopts the proposed NAD.
-]</i></p>
-
-<hr>
-<a name="514"><h3>514.&nbsp;Size of state for subtract_with_carry</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub"> [tr.rand.eng.sub]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 2 begins:
-</p>
-<blockquote>
-The size of the state is r.
-</blockquote>
-<p>
-However, the next sentence specifies a total of r+1 items in the textual
-representation of the state, r specific xÕs as well as a specific carry.
-This makes a total of r+1 items that constitute the size of the state,
-rather than r.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-We recommend the sentence be corrected to match:
-</p>
-<blockquote>
- The size of the state is r+1.
-</blockquote>
-
-<p><i>[
-Jens: I plead for "NAD" on the grounds that "size of state" is only
-used as an argument for big-O complexity notation, thus
-constant factors and additions don't count.
-]</i></p>
-
-<p><i>[
-Berlin: N1932 adopts the proposed NAD.
-]</i></p>
-
-<hr>
-<a name="516"><h3>516.&nbsp;Seeding subtract_with_carry_01 using a generator</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 6 says:
-</p>
-<blockquote>
-... obtained by successive invocations of g, ...
-</blockquote>
-<p>
-We recommend instead:
-</p>
-<blockquote>
-... obtained by taking successive invocations of g mod 2**32, ...
-</blockquote>
-<p>
-as the context seems to require only 32-bit quantities be used here.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7. Moved to Ready.
-</p>
-
-<p><i>[
-Portland: Subsumed by N2111.
-]</i></p>
-<hr>
-<a name="517"><h3>517.&nbsp;Should include name in external representation</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-The last two rows of Table 16 deal with the i/o requirements of an engine,
-specifying that the textual representation of an engineÕs state,
-appropriately formatted, constitute the engineÕs external representation.
-</p>
-<p>
-This seems adequate when an engineÕs type is known. However, it seems
-inadequate in the context of generic code, where it becomes useful and
-perhaps even necessary to determine an engineÕs type via input.
-</p>
-<p>
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-We therefore recommend that, in each of these two rows of Table 16, the
-text "textual representation" be expanded so as to read "engine name
-followed by the textual representation."
-</p>
-
-<p><i>[
-Berlin: N1932 considers this NAD. This is a QOI issue.
-]</i></p>
-
-<hr>
-<a name="544"><h3>544.&nbsp;minor NULL problems in C.2</h3></a><p><b>Section:</b>&nbsp;C.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/diff.html#diff.library"> [diff.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;25 Nov 2005</p>
-<p>
-According to C.2.2.3, p1, "the macro NULL, defined in any of &lt;clocale&gt;,
-&lt;cstddef&gt;, &lt;cstdio&gt;, &lt;cstdlib&gt;, &lt;cstring&gt;, &lt;ctime&gt;,
-or &lt;cwchar&gt;." This is consistent with the C standard.
-</p>
-<p>
-However, Table 95 in C.2 fails to mention &lt;clocale&gt; and &lt;cstdlib&gt;.
-</p>
-<p>
-In addition, C.2, p2 claims that "The C++ Standard library provides
-54 standard macros from the C library, as shown in Table 95." While
-table 95 does have 54 entries, since a couple of them (including the
-NULL macro) are listed more than once, the actual number of macros
-defined by the C++ Standard Library may not be 54.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-I propose we add &lt;clocale&gt; and &lt;cstdlib&gt; to Table 96 and remove the
-number of macros from C.2, p2 and reword the sentence as follows:
-</p>
-<blockquote>
-The C++ Standard library <del>provides 54 standard macros from</del>
-<ins>defines a number macros corresponding to those defined by</ins> the C
-<ins>Standard</ins> library, as shown in Table 96.
-</blockquote>
-
-<p><i>[
-Portland: Resolution is considered editorial. It will be incorporated into the WD.
-]</i></p>
-
-<hr>
-<a name="549"><h3>549.&nbsp;Undefined variable in binomial_distribution</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bin"> [tr.rand.dist.bin]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;10 Jan 2006</p>
-<p>
-Paragraph 1 says that "A binomial distributon random distribution produces
-integer values i&gt;0 with p(i) = (n choose i) * p*i * (1-p)^(t-i), where t and
-p are the parameters of the distribution. OK, that tells us what t, p, and i
-are. What's n?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1.
-</p>
-
-<p><i>[
-Portland: Subsumed by N2111.
-]</i></p>
-<hr>
-<a name="554"><h3>554.&nbsp;Problem with lwg DR 184 numeric_limits&lt;bool&gt;</h3></a><p><b>Section:</b>&nbsp;18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;29 Jan 2006</p>
-<p>
-I believe we have a bug in the resolution of:
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">lwg 184</a>
-(WP status).
-</p>
-
-<p>
-The resolution spells out each member of <tt>numeric_limits&lt;bool&gt;</tt>.
-The part I'm having a little trouble with is:
-</p>
-<blockquote><pre>static const bool traps = false;
-</pre></blockquote>
-
-<p>
-Should this not be implementation defined? Given:
-</p>
-
-<blockquote><pre>int main()
-{
- bool b1 = true;
- bool b2 = false;
- bool b3 = b1/b2;
-}
-</pre></blockquote>
-
-<p>
-If this causes a trap, shouldn't <tt>numeric_limits&lt;bool&gt;::traps</tt> be
-<tt>true</tt>?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 18.2.1.5p3:
-</p>
-
-<blockquote>
--3- The specialization for <tt>bool</tt> shall be provided as follows:
-<blockquote><pre>namespace std {
- template &lt;&gt; class numeric_limits&lt;bool&gt; {
- ...
- static const bool traps = <del>false</del> <ins><i>implementation-defined</i></ins>;
- ...
- };
-}
-</pre></blockquote>
-</blockquote>
-
-<p><i>[
-Redmond: NAD because traps refers to values, not operations. There is no bool
-value that will trap.
-]</i></p>
-
-<hr>
-<a name="555"><h3>555.&nbsp;TR1, 8.21/1: typo</h3></a><p><b>Section:</b>&nbsp;TR1 8.21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.boolh"> [tr.c99.boolh]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;2 Feb 2006</p>
-<p>
-This one, if nobody noticed it yet, seems really editorial:
-s/cstbool/cstdbool/
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 8.21p1:
-</p>
-<blockquote>
--1- The header behaves as if it defines the additional macro defined in
-<tt>&lt;cst<ins>d</ins>bool&gt;</tt> by including the header <tt>&lt;cstdbool&gt;</tt>.
-</blockquote>
-
-<p><i>[
-Redmond: Editorial.
-]</i></p>
-
-<hr>
-<a name="558"><h3>558.&nbsp;lib.input.iterators Defect</h3></a><p><b>Section:</b>&nbsp;24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>&nbsp; <b>Submitter:</b>&nbsp;David Abrahams&nbsp; <b>Date:</b>&nbsp;9 Feb 2006</p>
-<blockquote>
-<p>
- 24.1.1 Input iterators [lib.input.iterators]
-</p>
-<p>
- 1 A class or a built-in type X satisfies the requirements of an
- input iterator for the value type T if the following expressions are
- valid, where U is the type of any specified member of type T, as
- shown in Table 73.
-</p>
-</blockquote>
-<p>
-There is no capital U used in table 73. There is a lowercase u, but
-that is clearly not meant to denote a member of type T. Also, there's
-no description in 24.1.1 of what lowercase a means. IMO the above
-should have been...Hah, a and b are already covered in 24.1/11, so maybe it
-should have just been:
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 24.1.1p1:
-</p>
-<blockquote>
--1- A class or a built-in type <tt>X</tt> satisfies the requirements of an
-input iterator for the value type <tt>T</tt> if the following expressions
-are valid<del>, where <tt>U</tt> is the type of any specified member of type
-<tt>T</tt>,</del> as shown in Table 73.
-</blockquote>
-
-<p><i>[
-Portland: Editorial.
-]</i></p>
-
-<hr>
-<a name="569"><h3>569.&nbsp;Postcondition for basic_ios::clear(iostate) incorrectly stated</h3></a><p><b>Section:</b>&nbsp;27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>&nbsp; <b>Submitter:</b>&nbsp;Seungbeom Kim&nbsp; <b>Date:</b>&nbsp;10 Mar 2006</p>
-<p>
-Section: 27.4.4.3 [lib.iostate.flags]
-</p>
-<p>
-Paragraph 4 says:
-</p>
-<blockquote>
-<blockquote><pre>void clear(iostate <i>state</i> = goodbit);
-</pre></blockquote>
-<p>
-<i>Postcondition:</i> If <tt>rdbuf()!=0</tt> then <tt><i>state</i> == rdstate();</tt>
-otherwise <tt>rdstate()==<i>state</i>|ios_base::badbit</tt>.
-</p>
-</blockquote>
-
-<p>
-The postcondition "rdstate()==state|ios_base::badbit" is parsed as
-"(rdstate()==state)|ios_base::badbit", which is probably what the
-committee meant.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Rationale:</b></p>
-<p>
-This is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a>.
-</p>
-<p>----- End of document -----</p>
-</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/docs/html/ext/lwg-defects.html b/libstdc++-v3/docs/html/ext/lwg-defects.html
deleted file mode 100644
index 94e4cb0a5d4..00000000000
--- a/libstdc++-v3/docs/html/ext/lwg-defects.html
+++ /dev/null
@@ -1,15124 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><head><title>C++ Standard Library Defect Report List</title>
-
-<style>ins {background-color:#FFFFA0}
-del {background-color:#FFFFA0}</style></head>
-
-<body bgcolor="#ffffff" text="#000000">
-<table>
-<tbody><tr>
-<td align="left">Doc. no.</td>
-<td align="left">N2131=06-0201</td>
-</tr>
-<tr>
-<td align="left">Date:</td>
-<td align="left">2006-11-03</td>
-</tr>
-<tr>
-<td align="left">Project:</td>
-<td align="left">Programming Language C++</td>
-</tr>
-<tr>
-<td align="left">Reply to:</td>
-<td align="left">Howard Hinnant &lt;howard.hinnant@gmail.com&gt;</td>
-</tr>
-</tbody></table>
-<h1>C++ Standard Library Defect Report List (Revision R45)</h1>
- <p>Reference ISO/IEC IS 14882:1998(E)</p>
- <p>Also see:</p>
- <ul>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
- <li>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
- <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li>
- </ul>
- <p>This document contains only library issues which have been closed
- by the Library Working Group (LWG) after being found to be defects
- in the standard. That is, issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a>. See the
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a> for issues closed as non-defects. See the
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> for active issues and more information. The
- introductory material in that document also applies to this
- document.</p>
-<h2>Revision History</h2>
-<ul>
-<li>R45:
-2006-11-03 post-Portland mailing.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>.
-</li>
-<li>R44:
-2006-09-08 pre-Portland mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.
-</li>
-<li>R43:
-2006-06-23 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.
-</li>
-<li>R42:
-2006-04-21 post-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#548">548</a> to Open.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review.
-</li>
-<li>R41:
-2006-02-24 pre-Berlin mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>.
-Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.
-Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.
-</li>
-<li>R40:
-2005-12-16 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.
-</li>
-<li>R39:
-2005-10-14 post-Mont Tremblant mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
-Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
-Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
-</li>
-<li>R38:
-2005-07-03 pre-Mont Tremblant mailing.
-Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
-</li>
-<li>R37:
-2005-06 mid-term mailing.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
-</li>
-<li>R36:
-2005-04 post-Lillehammer mailing. All issues in "ready" status except
-for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
-previously in "DR" status were moved to "WP".
-</li>
-<li>R35:
-2005-03 pre-Lillehammer mailing.
-</li>
-<li>R34:
-2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
-</li>
-<li>R33:
-2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
-</li>
-<li>R32:
-2004-09 pre-Redmond mailing: reflects new proposed resolutions and
-new issues received after the 2004-07 mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
-</li>
-<li>R31:
-2004-07 mid-term mailing: reflects new proposed resolutions and
-new issues received after the post-Sydney mailing. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
-</li>
-<li>R30:
-Post-Sydney mailing: reflects decisions made at the Sydney meeting.
-Voted all "Ready" issues from R29 into the working paper.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#462">462</a>.
-</li>
-<li>R29:
-Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
-</li>
-<li>R28:
-Post-Kona mailing: reflects decisions made at the Kona meeting.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
-</li>
-<li>R27:
-Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
-</li>
-<li>R26:
-Post-Oxford mailing: reflects decisions made at the Oxford meeting.
-All issues in Ready status were voted into DR status. All issues in
-DR status were voted into WP status.
-</li>
-<li>R25:
-Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
-</li>
-<li>R24:
-Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
-meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
-moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
-at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
-concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
-</li>
-<li>R23:
-Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
-Moved issues in the TC to TC status.
-</li>
-<li>R22:
-Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
-</li>
-<li>R21:
-Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
-</li>
-<li>R20:
-Post-Redmond mailing; reflects actions taken in Redmond. Added
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
-not discussed at the meeting.
-
-All Ready issues were moved to DR status, with the exception of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-
-Noteworthy issues discussed at Redmond include
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
-</li>
-<li>R19:
-Pre-Redmond mailing. Added new issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
-</li>
-<li>R18:
-Post-Copenhagen mailing; reflects actions taken in Copenhagen.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
-new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
-to DR.
-
-Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
-to Ready.
-
-Closed issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
-as NAD.
-
-</li>
-<li>R17:
-Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
-resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
-Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
-</li>
-<li>R16:
-post-Toronto mailing; reflects actions taken in Toronto. Added new
-issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
-appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
-the bug in enough places.
-</li>
-<li>R15:
-pre-Toronto mailing. Added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
-changes so that we pass Weblint tests.
-</li>
-<li>R14:
-post-Tokyo II mailing; reflects committee actions taken in
-Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
-</li>
-<li>R13:
-pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
-</li>
-<li>R12:
-pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
-</li>
-<li>R11:
-post-Kona mailing: Updated to reflect LWG and full committee actions
-in Kona (99-0048/N1224). Note changed resolution of issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
-to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
-"closed" documents. Changed the proposed resolution of issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
-of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
-</li>
-<li>R10:
-pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#190">190</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
-</li>
-<li>R9:
-pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
-"closed" documents. (99-0030/N1206, 25 Aug 99)
-</li>
-<li>R8:
-post-Dublin mailing. Updated to reflect LWG and full committee actions
-in Dublin. (99-0016/N1193, 21 Apr 99)
-</li>
-<li>R7:
-pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
-</li>
-<li>R6:
-pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#128">128</a>,
-and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
-</li>
-<li>R5:
-update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
-for making list public. (30 Dec 98)
-</li>
-<li>R4:
-post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
-issues corrected. (22 Oct 98)
-</li>
-<li>R3:
-post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
-added, many issues updated to reflect LWG consensus (12 Oct 98)
-</li>
-<li>R2:
-pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
-</li>
-<li>R1:
-Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
-format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
-</li>
-</ul>
-<h2>Defect Reports</h2>
-<hr>
-<a name="1"><h3>1.&nbsp;C library linkage editing oversight</h3></a><p><b>Section:</b>&nbsp;17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;16 Nov 1997</p>
-<p>The change specified in the proposed resolution below did not make
-it into the Standard. This change was accepted in principle at the
-London meeting, and the exact wording below was accepted at the
-Morristown meeting.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a> paragraph 2
-from:</p>
-
-<blockquote>
- <p>It is unspecified whether a name from the Standard C library
- declared with external linkage has either extern "C" or
- extern "C++" linkage.</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- <p>Whether a name from the Standard C library declared with external
- linkage has extern "C" or extern "C++" linkage
- is implementation defined. It is recommended that an implementation
- use extern "C++" linkage for this purpose.</p>
-</blockquote>
-<hr>
-<a name="3"><h3>3.&nbsp;Atexit registration during atexit() call is not described</h3></a><p><b>Section:</b>&nbsp;18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;12 Dec 1997</p>
-<p>We appear not to have covered all the possibilities of
- exit processing with respect to
-atexit registration. <br>
-<br>
-Example 1: (C and C++)</p>
-
-<pre> #include &lt;stdlib.h&gt;
- void f1() { }
- void f2() { atexit(f1); }
-
- int main()
- {
- atexit(f2); // the only use of f2
- return 0; // for C compatibility
- }</pre>
-
-<p>At program exit, f2 gets called due to its registration in
-main. Running f2 causes f1 to be newly registered during the exit
-processing. Is this a valid program? If so, what are its
-semantics?</p>
-
-<p>
-Interestingly, neither the C standard, nor the C++ draft standard nor
-the forthcoming C9X Committee Draft says directly whether you can
-register a function with atexit during exit processing.</p>
-
-<p>
-All 3 standards say that functions are run in reverse order of their
-registration. Since f1 is registered last, it ought to be run first,
-but by the time it is registered, it is too late to be first.</p>
-
-<p>If the program is valid, the standards are self-contradictory about
-its semantics.</p>
-
-<p>Example 2: (C++ only)</p>
-
-<pre>
- void F() { static T t; } // type T has a destructor
-
- int main()
- {
- atexit(F); // the only use of F
- }
-</pre>
-
-<p>Function F registered with atexit has a local static variable t,
-and F is called for the first time during exit processing. A local
-static object is initialized the first time control flow passes
-through its definition, and all static objects are destroyed during
-exit processing. Is the code valid? If so, what are its semantics?</p>
-
-<p>
-Section 18.3 "Start and termination" says that if a function
-F is registered with atexit before a static object t is initialized, F
-will not be called until after t's destructor completes.</p>
-
-<p>
-In example 2, function F is registered with atexit before its local
-static object O could possibly be initialized. On that basis, it must
-not be called by exit processing until after O's destructor
-completes. But the destructor cannot be run until after F is called,
-since otherwise the object could not be constructed in the first
-place.</p>
-
-<p>If the program is valid, the standard is self-contradictory about
-its semantics.</p>
-
-<p>I plan to submit Example 1 as a public comment on the C9X CD, with
-a recommendation that the results be undefined. (Alternative: make it
-unspecified. I don't think it is worthwhile to specify the case where
-f1 itself registers additional functions, each of which registers
-still more functions.)</p>
-
-<p>I think we should resolve the situation in the whatever way the C
-committee decides. </p>
-
-<p>For Example 2, I recommend we declare the results undefined.</p>
-
-<p><i>[See reflector message lib-6500 for further discussion.]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change section 18.3/8 from:</p>
-<blockquote>
- First, objects with static storage duration are destroyed and
- functions registered by calling atexit are called. Objects with
- static storage duration are destroyed in the reverse order of the
- completion of their constructor. (Automatic objects are not
- destroyed as a result of calling exit().) Functions registered with
- atexit are called in the reverse order of their registration. A
- function registered with atexit before an object obj1 of static
- storage duration is initialized will not be called until obj1's
- destruction has completed. A function registered with atexit after
- an object obj2 of static storage duration is initialized will be
- called before obj2's destruction starts.
-</blockquote>
-<p>to:</p>
-<blockquote>
- First, objects with static storage duration are destroyed and
- functions registered by calling atexit are called. Non-local objects
- with static storage duration are destroyed in the reverse order of
- the completion of their constructor. (Automatic objects are not
- destroyed as a result of calling exit().) Functions registered with
- atexit are called in the reverse order of their registration, except
- that a function is called after any previously registered functions
- that had already been called at the time it was registered. A
- function registered with atexit before a non-local object obj1 of
- static storage duration is initialized will not be called until
- obj1's destruction has completed. A function registered with atexit
- after a non-local object obj2 of static storage duration is
- initialized will be called before obj2's destruction starts. A local
- static object obj3 is destroyed at the same time it would be if a
- function calling the obj3 destructor were registered with atexit at
- the completion of the obj3 constructor.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>See 99-0039/N1215, October 22, 1999, by Stephen D. Clamage for the analysis
-supporting to the proposed resolution.</p>
-<hr>
-<a name="5"><h3>5.&nbsp;String::compare specification questionable</h3></a><p><b>Section:</b>&nbsp;21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Jack Reeves&nbsp; <b>Date:</b>&nbsp;11 Dec 1997</p>
-<p>At the very end of the basic_string class definition is the signature: int
-compare(size_type pos1, size_type n1, const charT* s, size_type n2 = npos) const; In the
-following text this is defined as: returns
-basic_string&lt;charT,traits,Allocator&gt;(*this,pos1,n1).compare(
-basic_string&lt;charT,traits,Allocator&gt;(s,n2); </p>
-
-<p>Since the constructor basic_string(const charT* s, size_type n, const Allocator&amp; a
-= Allocator()) clearly requires that s != NULL and n &lt; npos and further states that it
-throws length_error if n == npos, it appears the compare() signature above should always
-throw length error if invoked like so: str.compare(1, str.size()-1, s); where 's' is some
-null terminated character array. </p>
-
-<p>This appears to be a typo since the obvious intent is to allow either the call above or
-something like: str.compare(1, str.size()-1, s, strlen(s)-1); </p>
-
-<p>This would imply that what was really intended was two signatures int compare(size_type
-pos1, size_type n1, const charT* s) const int compare(size_type pos1, size_type n1, const
-charT* s, size_type n2) const; each defined in terms of the corresponding constructor. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace the compare signature in 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>
-(at the very end of the basic_string synopsis) which reads:</p>
-
-<blockquote>
- <p><tt>int compare(size_type pos1, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s,
- size_type n2 = npos) const;</tt></p>
-</blockquote>
-
-<p>with:</p>
-
-<blockquote>
- <p><tt>int compare(size_type pos1, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s) const;<br>
- int compare(size_type pos1, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT* s,
- size_type n2) const;</tt></p>
-</blockquote>
-
-<p>Replace the portion of 21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a>
-paragraphs 5 and 6 which read:</p>
-
-<blockquote>
- <p><tt>int compare(size_type pos, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charT * s, size_type n2
- = npos) const;<br>
- </tt>Returns:<tt><br>
- basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- basic_string&lt;charT,traits,Allocator&gt;( s, n2))</tt></p>
-</blockquote>
-
-<p>with:</p>
-
-<blockquote>
- <p><tt>int compare(size_type pos, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT * s) const;<br>
- </tt>Returns:<tt><br>
- basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- basic_string&lt;charT,traits,Allocator&gt;( s ))<br>
- <br>
- int compare(size_type pos, size_type n1,<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const charT * s,
- size_type n2) const;<br>
- </tt>Returns:<tt><br>
- basic_string&lt;charT,traits,Allocator&gt;(*this, pos, n1).compare(<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- basic_string&lt;charT,traits,Allocator&gt;( s, n2))</tt></p>
-</blockquote>
-
-<p>Editors please note that in addition to splitting the signature, the third argument
-becomes const, matching the existing synopsis.</p>
-<p><b>Rationale:</b></p>
-<p>While the LWG dislikes adding signatures, this is a clear defect in
-the Standard which must be fixed.&nbsp; The same problem was also
-identified in issues 7 (item 5) and 87.</p>
-<hr>
-<a name="7"><h3>7.&nbsp;String clause minor problems</h3></a><p><b>Section:</b>&nbsp;21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;15 Dec 1997</p>
-<p>(1) In 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, the description of template
-&lt;class InputIterator&gt; insert(iterator, InputIterator,
-InputIterator) makes no sense. It refers to a member function that
-doesn't exist. It also talks about the return value of a void
-function. </p>
-
-<p>(2) Several versions of basic_string::replace don't appear in the
-class synopsis. </p>
-
-<p>(3) basic_string::push_back appears in the synopsis, but is never
-described elsewhere. In the synopsis its argument is const charT,
-which doesn't makes much sense; it should probably be charT, or
-possible const charT&amp;. </p>
-
-<p>(4) basic_string::pop_back is missing. </p>
-
-<p>(5) int compare(size_type pos, size_type n1, charT* s, size_type n2
-= npos) make no sense. First, it's const charT* in the synopsis and
-charT* in the description. Second, given what it says in RETURNS,
-leaving out the final argument will always result in an exception
-getting thrown. This is paragraphs 5 and 6 of
-21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a></p>
-
-<p>(6) In table 37, in section 21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a>,
-there's a note for X::move(s, p, n). It says "Copies correctly
-even where p is in [s, s+n)". This is correct as far as it goes,
-but it doesn't go far enough; it should also guarantee that the copy
-is correct even where s in in [p, p+n). These are two orthogonal
-guarantees, and neither one follows from the other. Both guarantees
-are necessary if X::move is supposed to have the same sort of
-semantics as memmove (which was clearly the intent), and both
-guarantees are necessary if X::move is actually supposed to be
-useful. </p>
-<p><b>Proposed resolution:</b></p>
-<p>ITEM 1: In 21.3.5.4 [lib.string::insert], change paragraph 16 to <br>
-<br>
-&nbsp;&nbsp;&nbsp; EFFECTS: Equivalent to insert(p - begin(), basic_string(first, last)).<br>
-<br>
-ITEM 2:&nbsp; Not a defect; the Standard is clear.. There are ten versions of replace() in
-the synopsis, and ten versions in 21.3.5.6 [lib.string::replace].<br>
-<br>
-ITEM 3: Change the declaration of push_back in the string synopsis (21.3,
-[lib.basic.string]) from:</p>
-
-<p>&nbsp;&nbsp;&nbsp;&nbsp; void push_back(const charT)<br>
-<br>
-to<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; void push_back(charT)<br>
-<br>
-Add the following text immediately after 21.3.5.2 [lib.string::append], paragraph 10.<br>
-<br>
-&nbsp;&nbsp;&nbsp; void basic_string::push_back(charT c);<br>
-&nbsp;&nbsp;&nbsp; EFFECTS: Equivalent to append(static_cast&lt;size_type&gt;(1), c);<br>
-<br>
-ITEM 4: Not a defect. The omission appears to have been deliberate.<br>
-<br>
-ITEM 5: Duplicate; see issue 5 (and 87).<br>
-<br>
-ITEM 6: In table 37, Replace:<br>
-<br>
-&nbsp;&nbsp;&nbsp; "Copies correctly even where p is in [s, s+n)."<br>
-<br>
-with:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; "Copies correctly even where the ranges [p, p+n) and [s,
-s+n) overlap."</p>
-<hr>
-<a name="8"><h3>8.&nbsp;Locale::global lacks guarantee</h3></a><p><b>Section:</b>&nbsp;22.1.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.statics"> [lib.locale.statics]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;24 Dec 1997</p>
-<p>It appears there's an important guarantee missing from clause
-22. We're told that invoking locale::global(L) sets the C locale if L
-has a name. However, we're not told whether or not invoking
-setlocale(s) sets the global C++ locale. </p>
-
-<p>The intent, I think, is that it should not, but I can't find any
-such words anywhere. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add a sentence at the end of 22.1.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.statics"> [lib.locale.statics]</a>,
-paragraph 2:&nbsp; </p>
-
-<blockquote>
- <p>No library function other than <tt>locale::global()</tt> shall affect
- the value returned by <tt>locale()</tt>. </p>
-
-</blockquote>
-<hr>
-<a name="9"><h3>9.&nbsp;Operator new(0) calls should not yield the same pointer</h3></a><p><b>Section:</b>&nbsp;18.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete"> [lib.new.delete]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;4 Jan 1998</p>
-<p>Scott Meyers, in a comp.std.c++ posting: I just noticed that
-section 3.7.3.1 of CD2 seems to allow for the possibility that all
-calls to operator new(0) yield the same pointer, an implementation
-technique specifically prohibited by ARM 5.3.3.Was this prohibition
-really lifted? Does the FDIS agree with CD2 in the regard? [Issues
-list maintainer's note: the IS is the same.]</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the last paragraph of 3.7.3 from:</p>
-<blockquote>
- <p>Any allocation and/or deallocation functions defined in a C++ program shall
- conform to the semantics specified in 3.7.3.1 and 3.7.3.2.</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>Any allocation and/or deallocation functions defined in a C++ program,
- including the default versions in the library, shall conform to the semantics
- specified in 3.7.3.1 and 3.7.3.2.</p>
-</blockquote>
-<p>Change 3.7.3.1/2, next-to-last sentence, from :</p>
-<blockquote>
- <p>If the size of the space requested is zero, the value returned shall not be
- a null pointer value (4.10).</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>Even if the size of the space requested is zero, the request can fail. If
- the request succeeds, the value returned shall be a non-null pointer value
- (4.10) p0 different from any previously returned value p1, unless that value
- p1 was since passed to an operator delete.</p>
-</blockquote>
-<p>5.3.4/7 currently reads:</p>
-<blockquote>
- <p>When the value of the expression in a direct-new-declarator is zero, the
- allocation function is called to allocate an array with no elements. The
- pointer returned by the new-expression is non-null. [Note: If the library
- allocation function is called, the pointer returned is distinct from the
- pointer to any other object.]</p>
-</blockquote>
-<p>Retain the first sentence, and delete the remainder.</p>
-<p>18.5.1 currently has no text. Add the following:</p>
-<blockquote>
- <p>Except where otherwise specified, the provisions of 3.7.3 apply to the
- library versions of operator new and operator delete.</p>
-</blockquote>
-<p>To 18.5.1.3, add the following text:</p>
-<blockquote>
- <p>The provisions of 3.7.3 do not apply to these reserved placement forms of
- operator new and operator delete.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>See 99-0040/N1216, October 22, 1999, by Stephen D. Clamage for the analysis
-supporting to the proposed resolution.</p>
-<hr>
-<a name="11"><h3>11.&nbsp;Bitset minor problems</h3></a><p><b>Section:</b>&nbsp;23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;22 Jan 1998</p>
-<p>(1) bitset&lt;&gt;::operator[] is mentioned in the class synopsis (23.3.5), but it is
-not documented in 23.3.5.2. </p>
-
-<p>(2) The class synopsis only gives a single signature for bitset&lt;&gt;::operator[],
-reference operator[](size_t pos). This doesn't make much sense. It ought to be overloaded
-on const. reference operator[](size_t pos); bool operator[](size_t pos) const. </p>
-
-<p>(3) Bitset's stream input function (23.3.5.3) ought to skip all whitespace before
-trying to extract 0s and 1s. The standard doesn't explicitly say that, though. This should
-go in the Effects clause.</p>
-<p><b>Proposed resolution:</b></p>
-<p>ITEMS 1 AND 2:<br>
-<br>
-In the bitset synopsis (23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>),
-replace the member function <br>
-<br>
-<tt>&nbsp;&nbsp;&nbsp; reference operator[](size_t pos);<br>
-</tt><br>
-with the two member functions<br>
-<br>
-<tt>&nbsp;&nbsp;&nbsp; bool operator[](size_t pos) const; <br>
-&nbsp;&nbsp;&nbsp; reference operator[](size_t pos); <br>
-</tt><br>
-Add the following text at the end of 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>,
-immediately after paragraph 45:</p>
-
-<blockquote>
- <p><tt>bool operator[](size_t pos) const;</tt><br>
- Requires: pos is valid<br>
- Throws: nothing<br>
- Returns: <tt>test(pos)</tt><br>
- <br>
- <tt>bitset&lt;N&gt;::reference operator[](size_t pos);</tt> <br>
- Requires: pos is valid<br>
- Throws: nothing<br>
- Returns: An object of type <tt>bitset&lt;N&gt;::reference</tt> such that <tt>(*this)[pos]
- == this-&gt;test(pos)</tt>, and such that <tt>(*this)[pos] = val</tt> is equivalent to <tt>this-&gt;set(pos,
- val);</tt></p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG believes Item 3 is not a defect. "Formatted
-input" implies the desired semantics. See 27.6.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted"> [lib.istream.formatted]</a>.
-</p>
-<hr>
-<a name="13"><h3>13.&nbsp;Eos refuses to die</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;William M. Miller&nbsp; <b>Date:</b>&nbsp;3 Mar 1998</p>
-<p>In 27.6.1.2.3, there is a reference to "eos", which is
-the only one in the whole draft (at least using Acrobat search), so
-it's undefined. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, replace "eos" with
-"charT()"</p>
-<hr>
-<a name="14"><h3>14.&nbsp;Locale::combine should be const</h3></a><p><b>Section:</b>&nbsp;22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>locale::combine is the only member function of locale (other than constructors and
-destructor) that is not const. There is no reason for it not to be const, and good reasons
-why it should have been const. Furthermore, leaving it non-const conflicts with 22.1.1
-paragraph 6: "An instance of a locale is immutable." </p>
-
-<p>History: this member function originally was a constructor. it happened that the
-interface it specified had no corresponding language syntax, so it was changed to a member
-function. As constructors are never const, there was no "const" in the interface
-which was transformed into member "combine". It should have been added at that
-time, but the omission was not noticed. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> and also in 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>, add
-"const" to the declaration of member combine: </p>
-<blockquote>
- <pre>template &lt;class Facet&gt; locale combine(const locale&amp; other) const; </pre>
-</blockquote>
-<hr>
-<a name="15"><h3>15.&nbsp;Locale::name requirement inconsistent</h3></a><p><b>Section:</b>&nbsp;22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>locale::name() is described as returning a string that can be passed to a locale
-constructor, but there is no matching constructor. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>, paragraph 5, replace
-"<tt>locale(name())</tt>" with
-"<tt>locale(name().c_str())</tt>".
-</p>
-<hr>
-<a name="16"><h3>16.&nbsp;Bad ctype_byname&lt;char&gt; decl</h3></a><p><b>Section:</b>&nbsp;22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The new virtual members ctype_byname&lt;char&gt;::do_widen and do_narrow did not get
-edited in properly. Instead, the member do_widen appears four times, with wrong argument
-lists. </p>
-<p><b>Proposed resolution:</b></p>
-<p>The correct declarations for the overloaded members
-<tt>do_narrow</tt> and <tt>do_widen</tt> should be copied
-from 22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a>.</p>
-<hr>
-<a name="17"><h3>17.&nbsp;Bad bool parsing</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>This section describes the process of parsing a text boolean value from the input
-stream. It does not say it recognizes either of the sequences "true" or
-"false" and returns the corresponding bool value; instead, it says it recognizes
-only one of those sequences, and chooses which according to the received value of a
-reference argument intended for returning the result, and reports an error if the other
-sequence is found. (!) Furthermore, it claims to get the names from the ctype&lt;&gt;
-facet rather than the numpunct&lt;&gt; facet, and it examines the "boolalpha"
-flag wrongly; it doesn't define the value "loc"; and finally, it computes
-wrongly whether to use numeric or "alpha" parsing.<br>
-<br>
-I believe the correct algorithm is "as if": </p>
-
-<pre> // in, err, val, and str are arguments.
- err = 0;
- const numpunct&lt;charT&gt;&amp; np = use_facet&lt;numpunct&lt;charT&gt; &gt;(str.getloc());
- const string_type t = np.truename(), f = np.falsename();
- bool tm = true, fm = true;
- size_t pos = 0;
- while (tm &amp;&amp; pos &lt; t.size() || fm &amp;&amp; pos &lt; f.size()) {
- if (in == end) { err = str.eofbit; }
- bool matched = false;
- if (tm &amp;&amp; pos &lt; t.size()) {
- if (!err &amp;&amp; t[pos] == *in) matched = true;
- else tm = false;
- }
- if (fm &amp;&amp; pos &lt; f.size()) {
- if (!err &amp;&amp; f[pos] == *in) matched = true;
- else fm = false;
- }
- if (matched) { ++in; ++pos; }
- if (pos &gt; t.size()) tm = false;
- if (pos &gt; f.size()) fm = false;
- }
- if (tm == fm || pos == 0) { err |= str.failbit; }
- else { val = tm; }
- return in;</pre>
-
-<p>Notice this works reasonably when the candidate strings are both empty, or equal, or
-when one is a substring of the other. The proposed text below captures the logic of the
-code above.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, in the first line of paragraph 14,
-change "&amp;&amp;" to "&amp;".</p>
-
-<p>Then, replace paragraphs 15 and 16 as follows:</p>
-
-<blockquote>
-
- <p>Otherwise target sequences are determined "as if" by
- calling the members <tt>falsename()</tt> and
- <tt>truename()</tt> of the facet obtained by
- <tt>use_facet&lt;numpunct&lt;charT&gt;&nbsp;&gt;(str.getloc())</tt>.
- Successive characters in the range <tt>[in,end)</tt> (see
- [lib.sequence.reqmts]) are obtained and matched against
- corresponding positions in the target sequences only as necessary to
- identify a unique match. The input iterator <tt>in</tt> is
- compared to <tt>end</tt> only when necessary to obtain a
- character. If and only if a target sequence is uniquely matched,
- <tt>val</tt> is set to the corresponding value.</p>
-
-</blockquote>
-
-<blockquote>
- <p>The <tt>in</tt> iterator is always left pointing one position beyond the last character
- successfully matched. If <tt>val</tt> is set, then err is set to <tt>str.goodbit</tt>; or to
- <tt>str.eofbit</tt> if, when seeking another character to match, it is found that
- <tt>(in==end)</tt>. If <tt>val</tt> is not set, then <i>err</i> is set to <tt>str.failbit</tt>; or to
- <tt>(str.failbit|str.eofbit)</tt>if
- the reason for the failure was that <tt>(in==end)</tt>. [Example: for targets
- <tt>true</tt>:"a" and <tt>false</tt>:"abb", the input sequence "a" yields
- <tt>val==true</tt> and <tt>err==str.eofbit</tt>; the input sequence "abc" yields
- <tt>err=str.failbit</tt>, with <tt>in</tt> ending at the 'c' element. For targets
- <tt>true</tt>:"1"
- and <tt>false</tt>:"0", the input sequence "1" yields <tt>val==true</tt>
- and <tt>err=str.goodbit</tt>. For empty targets (""), any input sequence yields
- <tt>err==str.failbit</tt>. --end example]</p>
-</blockquote>
-<hr>
-<a name="18"><h3>18.&nbsp;Get(...bool&amp;) omitted</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the list of num_get&lt;&gt; non-virtual members on page 22-23, the member
-that parses bool values was omitted from the list of definitions of non-virtual
-members, though it is listed in the class definition and the corresponding
-virtual is listed everywhere appropriate. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add at the beginning of 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>
-another get member for bool&amp;, copied from the entry in
-22.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.num.get"> [lib.locale.num.get]</a>.</p>
-<hr>
-<a name="19"><h3>19.&nbsp;"Noconv" definition too vague</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>
-In the definitions of codecvt&lt;&gt;::do_out and do_in, they are
-specified to return noconv if "no conversion is
-needed". This definition is too vague, and does not say
-normatively what is done with the buffers.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the entry for noconv in the table under paragraph 4 in section
-<font color="red">22.2.1.5.2</font> to read:
-</p>
-<blockquote>
- <p><tt>noconv</tt>: <tt>internT</tt> and <tt>externT</tt> are the same type,
- and input sequence is identical to converted sequence.</p>
-</blockquote>
-<p>Change the Note in paragraph 2 to normative text as follows:</p>
-<blockquote>
- <p>If returns <tt>noconv</tt>, <tt>internT</tt> and <tt>externT</tt> are the
- same type and the converted sequence is identical to the input sequence <tt>[from,from_next)</tt>.
- <tt>to_next</tt> is set equal to <tt>to</tt>, the value of <tt>state</tt> is
- unchanged, and there are no changes to the values in <tt>[to, to_limit)</tt>.</p>
-</blockquote>
-<hr>
-<a name="20"></a><h3><a name="20">20.&nbsp;Thousands_sep returns wrong type</a></h3><p><b>Section:</b>&nbsp;22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The synopsis for numpunct&lt;&gt;::do_thousands_sep, and the
-definition of numpunct&lt;&gt;::thousands_sep which calls it, specify
-that it returns a value of type char_type. Here it is erroneously
-described as returning a "string_type". </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>, above paragraph 2, change
-"string_type" to "char_type". </p>
-<hr>
-<a name="21"><h3>21.&nbsp;Codecvt_byname&lt;&gt; instantiations</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the second table in the section, captioned "Required
-instantiations", the instantiations for codecvt_byname&lt;&gt;
-have been omitted. These are necessary to allow users to construct a
-locale by name from facets. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add in 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> to the table captioned
-"Required instantiations", in the category "ctype"
-the lines </p>
-
-<blockquote>
- <pre>codecvt_byname&lt;char,char,mbstate_t&gt;,
-codecvt_byname&lt;wchar_t,char,mbstate_t&gt; </pre>
-</blockquote>
-<hr>
-<a name="22"><h3>22.&nbsp;Member open vs. flags</h3></a><p><b>Section:</b>&nbsp;27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The description of basic_istream&lt;&gt;::open leaves unanswered questions about how it
-responds to or changes flags in the error status for the stream. A strict reading
-indicates that it ignores the bits and does not change them, which confuses users who do
-not expect eofbit and failbit to remain set after a successful open. There are three
-reasonable resolutions: 1) status quo 2) fail if fail(), ignore eofbit 3) clear failbit
-and eofbit on call to open(). </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> paragraph 3, <i>and</i> in 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a> paragraph 3, under open() effects, add a footnote:
-</p>
-
-<blockquote>
- <p>A successful open does not change the error state.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>This may seem surprising to some users, but it's just an instance
-of a general rule: error flags are never cleared by the
-implementation. The only way error flags are are ever cleared is if
-the user explicitly clears them by hand.</p>
-
-<p>The LWG believed that preserving this general rule was
-important enough so that an exception shouldn't be made just for this
-one case. The resolution of this issue clarifies what the LWG
-believes to have been the original intent.</p>
-
-<hr>
-<a name="24"><h3>24.&nbsp;"do_convert" doesn't exist</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The description of codecvt&lt;&gt;::do_out and do_in mentions a
-symbol "do_convert" which is not defined in the
-standard. This is a leftover from an edit, and should be "do_in
-and do_out". </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>, paragraph 3, change
-"do_convert" to "do_in or do_out". Also, in <font color="red">22.2.1.5.2</font>, change "do_convert()" to "do_in
-or do_out". </p>
-<hr>
-<a name="25"><h3>25.&nbsp;String operator&lt;&lt; uses width() value wrong</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the description of operator&lt;&lt; applied to strings, the standard says that uses
-the smaller of os.width() and str.size(), to pad "as described in stage 3"
-elsewhere; but this is inconsistent, as this allows no possibility of space for padding. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 4 from:<br>
-<br>
-&nbsp;&nbsp;&nbsp; "... where <tt>n</tt> is the smaller of <tt>os.width()</tt> and <tt>str.size()</tt>;
-..."<br>
-<br>
-to: <br>
-<br>
-&nbsp;&nbsp;&nbsp; "... where <tt>n</tt> is the larger of <tt>os.width()</tt> and <tt>str.size()</tt>;
-..."</p>
-<hr>
-<a name="26"><h3>26.&nbsp;Bad sentry example</h3></a><p><b>Section:</b>&nbsp;27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In paragraph 6, the code in the example: </p>
-
-<pre> template &lt;class charT, class traits = char_traits&lt;charT&gt; &gt;
- basic_istream&lt;charT,traits&gt;::sentry(
- basic_istream&lt;charT,traits&gt;&amp; is, bool noskipws = false) {
- ...
- int_type c;
- typedef ctype&lt;charT&gt; ctype_type;
- const ctype_type&amp; ctype = use_facet&lt;ctype_type&gt;(is.getloc());
- while ((c = is.rdbuf()-&gt;snextc()) != traits::eof()) {
- if (ctype.is(ctype.space,c)==0) {
- is.rdbuf()-&gt;sputbackc (c);
- break;
- }
- }
- ...
- }</pre>
-
-<p>fails to demonstrate correct use of the facilities described. In
-particular, it fails to use traits operators, and specifies incorrect
-semantics. (E.g. it specifies skipping over the first character in the
-sequence without examining it.) </p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the example above from 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>
-paragraph 6.</p>
-<p><b>Rationale:</b></p>
-<p>The originally proposed replacement code for the example was not
-correct. The LWG tried in Kona and again in Tokyo to correct it
-without success. In Tokyo, an implementor reported that actual working
-code ran over one page in length and was quite complicated. The LWG
-decided that it would be counter-productive to include such a lengthy
-example, which might well still contain errors.</p>
-<hr>
-<a name="27"><h3>27.&nbsp;String::erase(range) yields wrong iterator</h3></a><p><b>Section:</b>&nbsp;21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The string::erase(iterator first, iterator last) is specified to return an element one
-place beyond the next element after the last one erased. E.g. for the string
-"abcde", erasing the range ['b'..'d') would yield an iterator for element 'e',
-while 'd' has not been erased. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a>, paragraph 10, change: </p>
-
-<blockquote>
- <p>Returns: an iterator which points to the element immediately following _last_ prior to
- the element being erased. </p>
-</blockquote>
-
-<p>to read </p>
-
-<blockquote>
- <p>Returns: an iterator which points to the element pointed to by _last_ prior to the
- other elements being erased. </p>
-</blockquote>
-<hr>
-<a name="28"><h3>28.&nbsp;Ctype&lt;char&gt;is ambiguous</h3></a><p><b>Section:</b>&nbsp;22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The description of the vector form of ctype&lt;char&gt;::is can be interpreted to mean
-something very different from what was intended. Paragraph 4 says </p>
-
-<blockquote>
- <p>Effects: The second form, for all *p in the range [low, high), assigns vec[p-low] to
- table()[(unsigned char)*p]. </p>
-</blockquote>
-
-<p>This is intended to copy the value indexed from table()[] into the place identified in
-vec[]. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>, paragraph 4, to read </p>
-
-<blockquote>
- <p>Effects: The second form, for all *p in the range [low, high), assigns into vec[p-low]
- the value table()[(unsigned char)*p]. </p>
-</blockquote>
-<hr>
-<a name="29"><h3>29.&nbsp;Ios_base::init doesn't exist</h3></a><p><b>Section:</b>&nbsp;27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Sections 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> and 27.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.wide.stream.objects"> [lib.wide.stream.objects]</a> mention
-a function ios_base::init, which is not defined. Probably they mean
-basic_ios&lt;&gt;::init, defined in 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>,
-paragraph 3. </p>
-<p><b>Proposed resolution:</b></p>
-<p>[R12: modified to include paragraph 5.]</p>
-
-<p>In 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> paragraph 2 and 5, change </p>
-
-<blockquote>
- <p>ios_base::init </p>
-</blockquote>
-
-<p>to </p>
-
-<blockquote>
- <p>basic_ios&lt;char&gt;::init </p>
-</blockquote>
-
-<p>Also, make a similar change in 27.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.wide.stream.objects"> [lib.wide.stream.objects]</a> except it
-should read </p>
-
-<blockquote>
- <p>basic_ios&lt;wchar_t&gt;::init </p>
-</blockquote>
-<hr>
-<a name="30"><h3>30.&nbsp;Wrong header for LC_*</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Paragraph 2 implies that the C macros LC_CTYPE etc. are defined in &lt;cctype&gt;,
-where they are in fact defined elsewhere to appear in &lt;clocale&gt;. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 2, change
-"&lt;cctype&gt;" to read "&lt;clocale&gt;". </p>
-<hr>
-<a name="31"><h3>31.&nbsp;Immutable locale values</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Paragraph 6, says "An instance of <tt>locale</tt> is
-<i>immutable</i>; once a facet reference is obtained from it,
-...". This has caused some confusion, because locale variables
-are manifestly assignable. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> replace paragraph 6</p>
-
-<blockquote>
- <p>An instance of <tt>locale</tt> is immutable; once a facet
- reference is obtained from it, that reference remains usable as long
- as the locale value itself exists.</p>
-</blockquote>
-
-<p>with</p>
-
-<blockquote>
- <p>Once a facet reference is obtained from a locale object by
- calling use_facet&lt;&gt;, that reference remains usable, and the
- results from member functions of it may be cached and re-used, as
- long as some locale object refers to that facet.</p>
-</blockquote>
-<hr>
-<a name="32"><h3>32.&nbsp;Pbackfail description inconsistent</h3></a><p><b>Section:</b>&nbsp;27.5.2.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.pback"> [lib.streambuf.virt.pback]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The description of the required state before calling virtual member
-basic_streambuf&lt;&gt;::pbackfail requirements is inconsistent with the conditions
-described in 27.5.2.2.4 [lib.streambuf.pub.pback] where member sputbackc calls it.
-Specifically, the latter says it calls pbackfail if: </p>
-
-<p>&nbsp;&nbsp;&nbsp; traits::eq(c,gptr()[-1]) is false </p>
-
-<p>where pbackfail claims to require: </p>
-
-<p>&nbsp;&nbsp;&nbsp; traits::eq(*gptr(),traits::to_char_type(c)) returns false </p>
-
-<p>It appears that the pbackfail description is wrong. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.5.2.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.pback"> [lib.streambuf.virt.pback]</a>, paragraph 1, change:</p>
-
-<blockquote>
- <p>"<tt>traits::eq(*gptr(),traits::to_char_type( c))</tt>"</p>
-</blockquote>
-
-<p>to </p>
-
-<blockquote>
- <p>"<tt>traits::eq(traits::to_char_type(c),gptr()[-1])</tt>"
- </p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Note deliberate reordering of arguments for clarity in addition to the correction of
-the argument value.</p>
-<hr>
-<a name="33"><h3>33.&nbsp;Codecvt&lt;&gt; mentions from_type</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the table defining the results from do_out and do_in, the specification for the
-result <i>error</i> says </p>
-
-<blockquote>
- <p>encountered a from_type character it could not convert </p>
-</blockquote>
-
-<p>but from_type is not defined. This clearly is intended to be an externT for do_in, or
-an internT for do_out. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In <font color="red">22.2.1.5.2</font> paragraph 4, replace the definition
-in the table for the case of _error_ with </p>
-
-<blockquote>
- <p>encountered a character in <tt>[from,from_end)</tt> that it could not convert. </p>
-</blockquote>
-<hr>
-<a name="34"><h3>34.&nbsp;True/falsename() not in ctype&lt;&gt;</h3></a><p><b>Section:</b>&nbsp;22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In paragraph 19, Effects:, members truename() and falsename are used from facet
-ctype&lt;charT&gt;, but it has no such members. Note that this is also a problem in
-22.2.2.1.2, addressed in (4). </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, paragraph 19, in the Effects:
-clause for member put(...., bool), replace the initialization of the
-string_type value s as follows: </p>
-
-<blockquote>
- <pre>const numpunct&amp; np = use_facet&lt;numpunct&lt;charT&gt; &gt;(loc);
-string_type s = val ? np.truename() : np.falsename(); </pre>
-</blockquote>
-<hr>
-<a name="35"><h3>35.&nbsp;No manipulator unitbuf in synopsis</h3></a><p><b>Section:</b>&nbsp;27.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreams.base"> [lib.iostreams.base]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In 27.4.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.manip"> [lib.fmtflags.manip]</a>, we have a definition for a manipulator
-named "unitbuf". Unlike other manipulators, it's not listed
-in synopsis. Similarly for "nounitbuf". </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to the synopsis for &lt;ios&gt; in 27.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreams.base"> [lib.iostreams.base]</a>, after
-the entry for "nouppercase", the prototypes: </p>
-
-<blockquote>
- <pre>ios_base&amp; unitbuf(ios_base&amp; str);
-ios_base&amp; nounitbuf(ios_base&amp; str); </pre>
-</blockquote>
-<hr>
-<a name="36"><h3>36.&nbsp;Iword &amp; pword storage lifetime omitted</h3></a><p><b>Section:</b>&nbsp;27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the definitions for ios_base::iword and pword, the lifetime of the storage is
-specified badly, so that an implementation which only keeps the last value stored appears
-to conform. In particular, it says: </p>
-
-<p>The reference returned may become invalid after another call to the object's iword
-member with a different index ... </p>
-
-<p>This is not idle speculation; at least one implementation was done this way. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add in 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>, in both paragraph 2 and also in
-paragraph 4, replace the sentence: </p>
-
-<blockquote>
- <p>The reference returned may become invalid after another call to the object's iword
- [pword] member with a different index, after a call to its copyfmt member, or when the
- object is destroyed. </p>
-</blockquote>
-
-<p>with: </p>
-
-<blockquote>
- <p>The reference returned is invalid after any other operations on the object. However,
- the value of the storage referred to is retained, so that until the next call to copyfmt,
- calling iword [pword] with the same index yields another reference to the same value. </p>
-</blockquote>
-
-<p>substituting "iword" or "pword" as appropriate. </p>
-<hr>
-<a name="37"><h3>37.&nbsp;Leftover "global" reference</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>In the overview of locale semantics, paragraph 4, is the sentence </p>
-
-<blockquote>
- <p>If Facet is not present in a locale (or, failing that, in the global locale), it throws
- the standard exception bad_cast. </p>
-</blockquote>
-
-<p>This is not supported by the definition of use_facet&lt;&gt;, and represents semantics
-from an old draft. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>, paragraph 4, delete the parenthesized
-expression </p>
-
-<blockquote>
- <p>(or, failing that, in the global locale) </p>
-</blockquote>
-<hr>
-<a name="38"><h3>38.&nbsp;Facet definition incomplete</h3></a><p><b>Section:</b>&nbsp;22.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.global.templates"> [lib.locale.global.templates]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>It has been noticed by Esa Pulkkinen that the definition of
-"facet" is incomplete. In particular, a class derived from
-another facet, but which does not define a member <i>id</i>, cannot
-safely serve as the argument <i>F</i> to use_facet&lt;F&gt;(loc),
-because there is no guarantee that a reference to the facet instance
-stored in <i>loc</i> is safely convertible to <i>F</i>. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In the definition of std::use_facet&lt;&gt;(), replace the text in paragraph 1 which
-reads: </p>
-
-<blockquote>
- <p>Get a reference to a facet of a locale. </p>
-</blockquote>
-
-<p>with: </p>
-
-<blockquote>
- <p>Requires: <tt>Facet</tt> is a facet class whose definition
- contains the public static member <tt>id</tt> as defined in 22.1.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.facet"> [lib.locale.facet]</a>. </p>
-</blockquote>
-
-<p><i>[
-Kona: strike as overspecification the text "(not inherits)"
-from the original resolution, which read "... whose definition
-contains (not inherits) the public static member
-<tt>id</tt>..."
-]</i></p>
-
-<hr>
-<a name="39"><h3>39.&nbsp;istreambuf_iterator&lt;&gt;::operator++(int) definition garbled</h3></a><p><b>Section:</b>&nbsp;24.5.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op++"> [lib.istreambuf.iterator::op++]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Following the definition of istreambuf_iterator&lt;&gt;::operator++(int) in paragraph
-3, the standard contains three lines of garbage text left over from a previous edit. </p>
-
-<blockquote>
- <pre>istreambuf_iterator&lt;charT,traits&gt; tmp = *this;
-sbuf_-&gt;sbumpc();
-return(tmp); </pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>In 24.5.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op++"> [lib.istreambuf.iterator::op++]</a>, delete the three lines of code at the
-end of paragraph 3. </p>
-<hr>
-<a name="40"><h3>40.&nbsp;Meaningless normative paragraph in examples</h3></a><p><b>Section:</b>&nbsp;22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Paragraph 3 of the locale examples is a description of part of an
-implementation technique that has lost its referent, and doesn't mean
-anything. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Delete 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 3 which begins "This
-initialization/identification system depends...", or (at the
-editor's option) replace it with a place-holder to keep the paragraph
-numbering the same. </p>
-<hr>
-<a name="41"><h3>41.&nbsp;Ios_base needs clear(), exceptions()</h3></a><p><b>Section:</b>&nbsp;27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The description of ios_base::iword() and pword() in 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>, say that if they fail, they "set badbit,
-which may throw an exception". However, ios_base offers no
-interface to set or to test badbit; those interfaces are defined in
-basic_ios&lt;&gt;. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the description in 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a> in
-paragraph 2, and also in paragraph 4, as follows. Replace</p>
-
-<blockquote>
- <p>If the function fails it sets badbit, which may throw an exception.</p>
-</blockquote>
-
-<p>with</p>
-
-<blockquote>
- <p>If the function fails, and <tt>*this</tt> is a base sub-object of
- a <tt>basic_ios&lt;&gt;</tt> object or sub-object, the effect is
- equivalent to calling <tt>basic_ios&lt;&gt;::setstate(badbit)</tt>
- on the derived object (which may throw <tt>failure</tt>).</p>
-</blockquote>
-
-<p><i>[Kona: LWG reviewed wording; setstate(failbit) changed to
-setstate(badbit).]</i></p>
-
-<hr>
-<a name="42"><h3>42.&nbsp;String ctors specify wrong default allocator</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The basic_string&lt;&gt; copy constructor: </p>
-
-<pre>basic_string(const basic_string&amp; str, size_type pos = 0,
- size_type n = npos, const Allocator&amp; a = Allocator()); </pre>
-
-<p>specifies an Allocator argument default value that is
-counter-intuitive. The natural choice for a the allocator to copy from
-is str.get_allocator(). Though this cannot be expressed in
-default-argument notation, overloading suffices. </p>
-
-<p>Alternatively, the other containers in Clause 23 (deque, list,
-vector) do not have this form of constructor, so it is inconsistent,
-and an evident source of confusion, for basic_string&lt;&gt; to have
-it, so it might better be removed. </p>
-<p><b>Proposed resolution:</b></p>
-<p> In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, replace the declaration of the copy
-constructor as follows: </p>
-
-<blockquote>
- <pre>basic_string(const basic_string&amp; str);
-basic_string(const basic_string&amp; str, size_type pos, size_type n = npos,
- const Allocator&amp; a = Allocator());</pre>
-</blockquote>
-
-<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace the copy constructor declaration
-as above. Add to paragraph 5, Effects:</p>
-
-<blockquote>
- <p>In the first form, the Allocator value used is copied from
- <tt>str.get_allocator()</tt>.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG believes the constructor is actually broken, rather than
-just an unfortunate design choice.</p>
-
-<p>The LWG considered two other possible resolutions:</p>
-
-<p>A. In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, replace the declaration of the copy
-constructor as follows:</p>
-
-<blockquote>
- <pre>basic_string(const basic_string&amp; str, size_type pos = 0,
- size_type n = npos);
-basic_string(const basic_string&amp; str, size_type pos,
- size_type n, const Allocator&amp; a); </pre>
-</blockquote>
-
-<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace the copy constructor declaration
-as above. Add to paragraph 5, Effects: </p>
-
-<blockquote>
- <p>When no <tt>Allocator</tt> argument is provided, the string is constructed using the
- value <tt>str.get_allocator()</tt>. </p>
-</blockquote>
-
-<p>B. In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, and also in 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace
-the declaration of the copy constructor as follows: </p>
-
-<blockquote>
- <pre>basic_string(const basic_string&amp; str, size_type pos = 0,
- size_type n = npos); </pre>
-</blockquote>
-
-<p>The proposed resolution reflects the original intent of the LWG. It
-was also noted by Pete Becker that this fix "will cause
-a small amount of existing code to now work correctly."</p>
-
-<p><i>[
-Kona: issue editing snafu fixed - the proposed resolution now correctly
-reflects the LWG consensus.
-]</i></p>
-<hr>
-<a name="44"><h3>44.&nbsp;Iostreams use operator== on int_type values</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>Many of the specifications for iostreams specify that character
-values or their int_type equivalents are compared using operators ==
-or !=, though in other places traits::eq() or traits::eq_int_type is
-specified to be used throughout. This is an inconsistency; we should
-change uses of == and != to use the traits members instead. </p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Pre-Kona: Dietmar supplied wording]</i></p>
-
-<p>List of changes to clause 27:</p>
-<ol>
-<li>
- In lib.basic.ios.members paragraph 13 (postcondition clause for
- 'fill(cT)') change
-
-<blockquote>
- fillch == fill()
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(fillch, fill())
-</blockquote>
-
-
-</li>
-<li>
- In lib.istream.unformatted paragraph 7 (effects clause for
- 'get(cT,streamsize,cT)'), third bullet, change
-
-<blockquote>
- c == delim for the next available input character c
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(c, delim) for the next available input character c
- </blockquote>
-
-</li>
-<li>
- In lib.istream.unformatted paragraph 12 (effects clause for
- 'get(basic_streambuf&lt;cT,Tr&gt;&amp;,cT)'), third bullet, change
-
-<blockquote>
- c == delim for the next available input character c
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(c, delim) for the next available input character c
-</blockquote>
-
-</li>
-<li>
- In lib.istream.unformatted paragraph 17 (effects clause for
- 'getline(cT,streamsize,cT)'), second bullet, change
-
-<blockquote>
- c == delim for the next available input character c
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(c, delim) for the next available input character c
- </blockquote>
-
-</li>
-<li>
- In lib.istream.unformatted paragraph 24 (effects clause for
- 'ignore(int,int_type)'), second bullet, change
-
-<blockquote>
- c == delim for the next available input character c
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq_int_type(c, delim) for the next available input
- character c
-</blockquote>
-
-</li>
-<li>
- In lib.istream.unformatted paragraph 25 (notes clause for
- 'ignore(int,int_type)'), second bullet, change
-
-<blockquote>
- The last condition will never occur if delim == traits::eof()
-</blockquote>
-
- to
-
-<blockquote>
- The last condition will never occur if
- traits::eq_int_type(delim, traits::eof()).
-</blockquote>
-
-</li>
-<li>
- In lib.istream.sentry paragraph 6 (example implementation for the
- sentry constructor) change
-
-<blockquote>
- while ((c = is.rdbuf()-&gt;snextc()) != traits::eof()) {
-</blockquote>
-
- to
-
-<blockquote>
- while (!traits::eq_int_type(c = is.rdbuf()-&gt;snextc(), traits::eof())) {
-</blockquote>
-
-</li>
-</ol>
-
-<p>List of changes to Chapter 21:</p>
-
-<ol>
-<li>
- In lib.string::find paragraph 1 (effects clause for find()),
- second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-
-</li>
-<li>
- In lib.string::rfind paragraph 1 (effects clause for rfind()),
- second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-
-</li>
-<li>
- In lib.string::find.first.of paragraph 1 (effects clause for
- find_first_of()), second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-
-</li>
-<li>
- In lib.string::find.last.of paragraph 1 (effects clause for
- find_last_of()), second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-
-</li>
-<li>
- In lib.string::find.first.not.of paragraph 1 (effects clause for
- find_first_not_of()), second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-</li>
-
-<li>
- In lib.string::find.last.not.of paragraph 1 (effects clause for
- find_last_not_of()), second bullet, change
-
-<blockquote>
- at(xpos+I) == str.at(I) for all elements ...
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(at(xpos+I), str.at(I)) for all elements ...
-</blockquote>
-</li>
-
-<li>
- In lib.string.ios paragraph 5 (effects clause for getline()),
- second bullet, change
-
-<blockquote>
- c == delim for the next available input character c
-</blockquote>
-
- to
-
-<blockquote>
- traits::eq(c, delim) for the next available input character c
-</blockquote>
-</li>
-
-</ol>
-
-<p>Notes:</p>
-<ul>
-<li>
- Fixing this issue highlights another sloppyness in
- lib.istream.unformatted paragraph 24: this clause mentions a "character"
- which is then compared to an 'int_type' (see item 5. in the list
- below). It is not clear whether this requires explicit words and
- if so what these words are supposed to be. A similar issue exists,
- BTW, for operator*() of istreambuf_iterator which returns the result
- of sgetc() as a character type (see lib.istreambuf.iterator::op*
- paragraph 1), and for operator++() of istreambuf_iterator which
- passes the result of sbumpc() to a constructor taking a char_type
- (see lib.istreambuf.iterator::operator++ paragraph 3). Similarily, the
- assignment operator ostreambuf_iterator passes a char_type to a function
- taking an int_type (see lib.ostreambuf.iter.ops paragraph 1).
-</li>
-<li>
- It is inconsistent to use comparisons using the traits functions in
- Chapter 27 while not using them in Chapter 21, especially as some
- of the inconsistent uses actually involve streams (eg. getline() on
- streams). To avoid leaving this issue open still longer due to this
- inconsistency (it is open since 1998), a list of changes to Chapter
- 21 is below.
-</li>
-<li>
- In Chapter 24 there are several places with statements like "the end
- of stream is reached (streambuf_type::sgetc() returns traits::eof())"
- (lib.istreambuf.iterator paragraph 1, lib.ostreambuf.iter.ops
- paragraph 5). It is unclear whether these should be clarified to use
- traits::eq_int_type() for detecting traits::eof().
-</li>
-</ul>
-
-<hr>
-<a name="46"><h3>46.&nbsp;Minor Annex D errors</h3></a><p><b>Section:</b>&nbsp;D.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.str.strstreams"> [depr.str.strstreams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Brendan Kehoe&nbsp; <b>Date:</b>&nbsp; 1 Jun 1998</p>
-<p>See lib-6522 and edit-814.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change D.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf"> [depr.strstreambuf]</a> (since streambuf is a typedef of
-basic_streambuf&lt;char&gt;) from:</p>
-
-<pre> virtual streambuf&lt;char&gt;* setbuf(char* s, streamsize n);</pre>
-
-<p>to:</p>
-
-<pre> virtual streambuf* setbuf(char* s, streamsize n);</pre>
-
-<p>In D.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream"> [depr.strstream]</a> insert the semicolon now missing after
-int_type:</p>
-
-<pre> namespace std {
- class strstream
- : public basic_iostream&lt;char&gt; {
- public:
- // Types
- typedef char char_type;
- typedef typename char_traits&lt;char&gt;::int_type int_type
- typedef typename char_traits&lt;char&gt;::pos_type pos_type;</pre>
-<hr>
-<a name="47"><h3>47.&nbsp;Imbue() and getloc() Returns clauses swapped</h3></a><p><b>Section:</b>&nbsp;27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;21 Jun 1998</p>
-<p>Section 27.4.2.3 specifies how imbue() and getloc() work. That
-section has two RETURNS clauses, and they make no sense as
-stated. They make perfect sense, though, if you swap them. Am I
-correct in thinking that paragraphs 2 and 4 just got mixed up by
-accident?</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> swap paragraphs 2 and 4.</p>
-<hr>
-<a name="48"><h3>48.&nbsp;Use of non-existent exception constructor</h3></a><p><b>Section:</b>&nbsp;27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;21 Jun 1998</p>
-<p>27.4.2.1.1, paragraph 2, says that class failure initializes the
-base class, exception, with exception(msg). Class exception (see
-18.6.1) has no such constructor.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace 27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a>, paragraph 2, with</p>
-
-<blockquote>
- <p>EFFECTS: Constructs an object of class <tt>failure</tt>.</p>
-</blockquote>
-<hr>
-<a name="49"><h3>49.&nbsp;Underspecification of ios_base::sync_with_stdio</h3></a><p><b>Section:</b>&nbsp;27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;21 Jun 1998</p>
-<p>Two problems</p>
-
-<p>(1) 27.4.2.4 doesn't say what ios_base::sync_with_stdio(f)
-returns. Does it return f, or does it return the previous
-synchronization state? My guess is the latter, but the standard
-doesn't say so.</p>
-
-<p>(2) 27.4.2.4 doesn't say what it means for streams to be
-synchronized with stdio. Again, of course, I can make some
-guesses. (And I'm unhappy about the performance implications of those
-guesses, but that's another matter.)</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the following sentence in 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>
-returns clause from:</p>
-
-<blockquote>
- <p><tt>true</tt> if the standard iostream objects (27.3) are
- synchronized and otherwise returns <tt>false</tt>.</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- <p><tt>true</tt> if the previous state of the standard iostream
- objects (27.3) was synchronized and otherwise returns
- <tt>false</tt>.</p>
-</blockquote>
-
-<p>Add the following immediately after 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>,
-paragraph 2:</p>
-
-<blockquote>
-<p>When a standard iostream object str is <i>synchronized</i> with a
-standard stdio stream f, the effect of inserting a character c by</p>
-<pre> fputc(f, c);
-</pre>
-
-<p>is the same as the effect of</p>
-<pre> str.rdbuf()-&gt;sputc(c);
-</pre>
-
-<p>for any sequence of characters; the effect of extracting a
-character c by</p>
-<pre> c = fgetc(f);
-</pre>
-
-<p>is the same as the effect of:</p>
-<pre> c = str.rdbuf()-&gt;sbumpc(c);
-</pre>
-
-<p>for any sequences of characters; and the effect of pushing
-back a character c by</p>
-<pre> ungetc(c, f);
-</pre>
-
-<p>is the same as the effect of</p>
-<pre> str.rdbuf()-&gt;sputbackc(c);
-</pre>
-
-<p>for any sequence of characters. [<i>Footnote</i>: This implies
-that operations on a standard iostream object can be mixed arbitrarily
-with operations on the corresponding stdio stream. In practical
-terms, synchronization usually means that a standard iostream object
-and a standard stdio object share a buffer. <i>--End Footnote</i>]</p>
-</blockquote>
-
-<p><i>[pre-Copenhagen: PJP and Matt contributed the definition
-of "synchronization"]</i></p>
-
-<p><i>[post-Copenhagen: proposed resolution was revised slightly:
-text was added in the non-normative footnote to say that operations
-on the two streams can be mixed arbitrarily.]</i></p>
-<hr>
-<a name="50"><h3>50.&nbsp;Copy constructor and assignment operator of ios_base</h3></a><p><b>Section:</b>&nbsp;27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;21 Jun 1998</p>
-<p>As written, ios_base has a copy constructor and an assignment
-operator. (Nothing in the standard says it doesn't have one, and all
-classes have copy constructors and assignment operators unless you
-take specific steps to avoid them.) However, nothing in 27.4.2 says
-what the copy constructor and assignment operator do. </p>
-
-<p>My guess is that this was an oversight, that ios_base is, like
-basic_ios, not supposed to have a copy constructor or an assignment
-operator.</p>
-
-<p>
-Jerry Schwarz comments: Yes, its an oversight, but in the opposite
-sense to what you're suggesting. At one point there was a definite
-intention that you could copy ios_base. It's an easy way to save the
-entire state of a stream for future use. As you note, to carry out
-that intention would have required a explicit description of the
-semantics (e.g. what happens to the iarray and parray stuff).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a>, class ios_base, specify the copy
-constructor and operator= members as being private.</p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes the difficulty of specifying correct semantics
-outweighs any benefit of allowing ios_base objects to be copyable.</p>
-<hr>
-<a name="51"><h3>51.&nbsp;Requirement to not invalidate iterators missing</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;David Vandevoorde&nbsp; <b>Date:</b>&nbsp;23 Jun 1998</p>
-<p>The std::sort algorithm can in general only sort a given sequence
-by moving around values. The list&lt;&gt;::sort() member on the other
-hand could move around values or just update internal pointers. Either
-method can leave iterators into the list&lt;&gt; dereferencable, but
-they would point to different things. </p>
-
-<p>Does the FDIS mandate anywhere which method should be used for
-list&lt;&gt;::sort()?</p>
-
-<p>Matt Austern comments:</p>
-
-<p>I think you've found an omission in the standard. </p>
-
-<p>The library working group discussed this point, and there was
-supposed to be a general requirement saying that list, set, map,
-multiset, and multimap may not invalidate iterators, or change the
-values that iterators point to, except when an operation does it
-explicitly. So, for example, insert() doesn't invalidate any iterators
-and erase() and remove() only invalidate iterators pointing to the
-elements that are being erased. </p>
-
-<p>I looked for that general requirement in the FDIS, and, while I
-found a limited form of it for the sorted associative containers, I
-didn't find it for list. It looks like it just got omitted. </p>
-
-<p>The intention, though, is that list&lt;&gt;::sort does not
-invalidate any iterators and does not change the values that any
-iterator points to. There would be no reason to have the member
-function otherwise.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add a new paragraph at the end of 23.1:</p>
-
-<blockquote>
- <p>Unless otherwise specified (either explicitly or by defining a function in terms of
- other functions), invoking a container member function or passing a container as an
- argument to a library function shall not invalidate iterators to, or change the values of,
- objects within that container. </p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>This was US issue CD2-23-011; it was accepted in London but the
-change was not made due to an editing oversight. The wording in the
-proposed resolution below is somewhat updated from CD2-23-011,
-particularly the addition of the phrase "or change the values
-of"</p>
-<hr>
-<a name="52"><h3>52.&nbsp;Small I/O problems</h3></a><p><b>Section:</b>&nbsp;27.4.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.operations"> [lib.fpos.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;23 Jun 1998</p>
-<p>First, 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>, table 89. This is pretty obvious:
-it should be titled "basic_ios&lt;&gt;() effects", not
-"ios_base() effects". </p>
-
-<p>[The second item is a duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#6">6</a> for
-resolution.]</p>
-
-<p>Second, 27.4.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.operations"> [lib.fpos.operations]</a> table 88 . There are a couple
-different things wrong with it, some of which I've already discussed
-with Jerry, but the most obvious mechanical sort of error is that it
-uses expressions like P(i) and p(i), without ever defining what sort
-of thing "i" is.
-</p>
-
-<p>(The other problem is that it requires support for streampos
-arithmetic. This is impossible on some systems, i.e. ones where file
-position is a complicated structure rather than just a number. Jerry
-tells me that the intention was to require syntactic support for
-streampos arithmetic, but that it wasn't actually supposed to do
-anything meaningful except on platforms, like Unix, where genuine
-arithmetic is possible.) </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> table 89 title from
-"ios_base() effects" to "basic_ios&lt;&gt;()
-effects". </p>
-<hr>
-<a name="53"><h3>53.&nbsp;Basic_ios destructor unspecified</h3></a><p><b>Section:</b>&nbsp;27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;23 Jun 1998</p>
-<p>There's nothing in 27.4.4 saying what basic_ios's destructor does.
-The important question is whether basic_ios::~basic_ios() destroys
-rdbuf().</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add after 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> paragraph 2:</p>
-
-<blockquote>
- <p><tt>virtual ~basic_ios();</tt></p>
- <p><b>Notes</b>: The destructor does not destroy <tt>rdbuf()</tt>.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG reviewed the additional question of whether or not
-<tt>rdbuf(0)</tt> may set <tt>badbit</tt>. The answer is
-clearly yes; it may be set via <tt>clear()</tt>. See 27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a>, paragraph 6. This issue was reviewed at length
-by the LWG, which removed from the original proposed resolution a
-footnote which incorrectly said "<tt>rdbuf(0)</tt> does not set
-<tt>badbit</tt>".</p>
-<hr>
-<a name="54"><h3>54.&nbsp;Basic_streambuf's destructor</h3></a><p><b>Section:</b>&nbsp;27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;25 Jun 1998</p>
-<p>The class synopsis for basic_streambuf shows a (virtual)
-destructor, but the standard doesn't say what that destructor does. My
-assumption is that it does nothing, but the standard should say so
-explicitly. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add after 27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a> paragraph 2:</p>
-
-<blockquote>
- <p><tt>virtual&nbsp; ~basic_streambuf();</tt></p>
- <p><b>Effects</b>: None.</p>
-</blockquote>
-<hr>
-<a name="55"><h3>55.&nbsp;Invalid stream position is undefined</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;26 Jun 1998</p>
-<p>Several member functions in clause 27 are defined in certain
-circumstances to return an "invalid stream position", a term
-that is defined nowhere in the standard. Two places (27.5.2.4.2,
-paragraph 4, and 27.8.1.4, paragraph 15) contain a cross-reference to
-a definition in _lib.iostreams.definitions_, a nonexistent
-section. </p>
-
-<p>I suspect that the invalid stream position is just supposed to be
-pos_type(-1). Probably best to say explicitly in (for example)
-27.5.2.4.2 that the return value is pos_type(-1), rather than to use
-the term "invalid stream position", define that term
-somewhere, and then put in a cross-reference. </p>
-
-<p>The phrase "invalid stream position" appears ten times in
-the C++ Standard. In seven places it refers to a return value, and it
-should be changed. In three places it refers to an argument, and it
-should not be changed. Here are the three places where "invalid
-stream position" should not be changed:</p>
-
-<blockquote>
- <p>27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, paragraph 14<br>
- 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 14<br>
- D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 17
- </p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 4, change "Returns an
-object of class pos_type that stores an invalid stream position
-(_lib.iostreams.definitions_)" to "Returns
-<tt>pos_type(off_type(-1))</tt>".
-</p>
-
-<p>In 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 6, change "Returns
-an object of class pos_type that stores an invalid stream
-position" to "Returns <tt>pos_type(off_type(-1))</tt>".</p>
-
-<p>In 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, paragraph 13, change "the object
-stores an invalid stream position" to "the return value is
-<tt>pos_type(off_type(-1))</tt>". </p>
-
-<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 13, change "returns an
-invalid stream position (27.4.3)" to "returns
-<tt>pos_type(off_type(-1))</tt>" </p>
-
-<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 15, change "Otherwise
-returns an invalid stream position (_lib.iostreams.definitions_)"
-to "Otherwise returns <tt>pos_type(off_type(-1))</tt>"
-</p>
-
-<p>In D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 15, change "the object
-stores an invalid stream position" to "the return value is
-<tt>pos_type(off_type(-1))</tt>" </p>
-
-<p>In D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 18, change "the object
-stores an invalid stream position" to "the return value is
-<tt>pos_type(off_type(-1))</tt>"</p>
-<hr>
-<a name="56"><h3>56.&nbsp;Showmanyc's return type</h3></a><p><b>Section:</b>&nbsp;27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;29 Jun 1998</p>
-<p>The class summary for basic_streambuf&lt;&gt;, in 27.5.2, says that
-showmanyc has return type int. However, 27.5.2.4.3 says that its
-return type is streamsize. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change <tt>showmanyc</tt>'s return type in the
-27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> class summary to <tt>streamsize</tt>.</p>
-<hr>
-<a name="57"><h3>57.&nbsp;Mistake in char_traits</h3></a><p><b>Section:</b>&nbsp;21.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.wchar.t"> [lib.char.traits.specializations.wchar.t]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;1 Jul 1998</p>
-<p>21.1.3.2, paragraph 3, says "The types streampos and
-wstreampos may be different if the implementation supports no shift
-encoding in narrow-oriented iostreams but supports one or more shift
-encodings in wide-oriented streams". </p>
-
-<p>That's wrong: the two are the same type. The &lt;iosfwd&gt; summary
-in 27.2 says that streampos and wstreampos are, respectively, synonyms
-for fpos&lt;char_traits&lt;char&gt;::state_type&gt; and
-fpos&lt;char_traits&lt;wchar_t&gt;::state_type&gt;, and, flipping back
-to clause 21, we see in 21.1.3.1 and 21.1.3.2 that
-char_traits&lt;char&gt;::state_type and
-char_traits&lt;wchar_t&gt;::state_type must both be mbstate_t. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the sentence in 21.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.wchar.t"> [lib.char.traits.specializations.wchar.t]</a> paragraph 3 which
-begins "The types streampos and wstreampos may be
-different..." . </p>
-<hr>
-<a name="59"><h3>59.&nbsp;Ambiguity in specification of gbump</h3></a><p><b>Section:</b>&nbsp;27.5.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.get.area"> [lib.streambuf.get.area]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;28 Jul 1998</p>
-<p>27.5.2.3.1 says that basic_streambuf::gbump() "Advances the
-next pointer for the input sequence by n." </p>
-
-<p>The straightforward interpretation is that it is just gptr() +=
-n. An alternative interpretation, though, is that it behaves as if it
-calls sbumpc n times. (The issue, of course, is whether it might ever
-call underflow.) There is a similar ambiguity in the case of
-pbump. </p>
-
-<p>(The "classic" AT&amp;T implementation used the
-former interpretation.)</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.5.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.get.area"> [lib.streambuf.get.area]</a> paragraph 4 gbump effects from:</p>
-
-<blockquote>
- <p>Effects: Advances the next pointer for the input sequence by n.</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- <p>Effects: Adds <tt>n</tt> to the next pointer for the input sequence.</p>
-</blockquote>
-
-<p>Make the same change to 27.5.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.put.area"> [lib.streambuf.put.area]</a> paragraph 4 pbump
-effects.</p>
-<hr>
-<a name="60"><h3>60.&nbsp;What is a formatted input function?</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;3 Aug 1998</p>
-<p>Paragraph 1 of 27.6.1.2.1 contains general requirements for all
-formatted input functions. Some of the functions defined in section
-27.6.1.2 explicitly say that those requirements apply ("Behaves
-like a formatted input member (as described in 27.6.1.2.1)"), but
-others don't. The question: is 27.6.1.2.1 supposed to apply to
-everything in 27.6.1.2, or only to those member functions that
-explicitly say "behaves like a formatted input member"? Or
-to put it differently: are we to assume that everything that appears
-in a section called "Formatted input functions" really is a
-formatted input function? I assume that 27.6.1.2.1 is intended to
-apply to the arithmetic extractors (27.6.1.2.2), but I assume that it
-is not intended to apply to extractors like </p>
-
-<pre> basic_istream&amp; operator&gt;&gt;(basic_istream&amp; (*pf)(basic_istream&amp;));</pre>
-
-<p>and </p>
-
-<pre> basic_istream&amp; operator&gt;&gt;(basic_streammbuf*);</pre>
-
-<p>There is a similar ambiguity for unformatted input, formatted output, and unformatted
-output. </p>
-
-<p>Comments from Judy Ward: It seems like the problem is that the
-basic_istream and basic_ostream operator &lt;&lt;()'s that are used
-for the manipulators and streambuf* are in the wrong section and
-should have their own separate section or be modified to make it clear
-that the "Common requirements" listed in section 27.6.1.2.1
-(for basic_istream) and section 27.6.2.5.1 (for basic_ostream) do not
-apply to them. </p>
-
-<p>Additional comments from Dietmar Kühl: It appears to be somewhat
-nonsensical to consider the functions defined in 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> paragraphs 1 to 5 to be "Formatted input
-function" but since these functions are defined in a section
-labeled "Formatted input functions" it is unclear to me
-whether these operators are considered formatted input functions which
-have to conform to the "common requirements" from 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>: If this is the case, all manipulators, not
-just <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is
-set (... but setting <tt>noskipws</tt> using the manipulator syntax
-would also skip whitespace :-)</p> <p>It is not clear which functions
-are to be considered unformatted input functions. As written, it seems
-that all functions in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> are unformatted input
-functions. However, it does not really make much sense to construct a
-sentry object for <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is
-unclear what happens to the <tt>gcount()</tt> if
-eg. <tt>gcount()</tt>, <tt>putback()</tt>, <tt>unget()</tt>, or
-<tt>sync()</tt> is called: These functions don't extract characters,
-some of them even "unextract" a character. Should this still
-be reflected in <tt>gcount()</tt>? Of course, it could be read as if
-after a call to <tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt>
-(the last unformatted input function, <tt>gcount()</tt>, didn't
-extract any character) and after a call to <tt>putback()</tt>
-<tt>gcount()</tt> returns <tt>-1</tt> (the last unformatted input
-function <tt>putback()</tt> did "extract" back into the
-stream). Correspondingly for <tt>unget()</tt>. Is this what is
-intended? If so, this should be clarified. Otherwise, a corresponding
-clarification should be used.</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 27.6.1.2.2 [lib.istream.formatted.arithmetic], paragraph 1.
-Change the beginning of the second sentence from "The conversion
-occurs" to "These extractors behave as formatted input functions (as
-described in 27.6.1.2.1). After a sentry object is constructed,
-the conversion occurs"
-</p>
-
-<p>
-In 27.6.1.2.3, [lib.istream::extractors], before paragraph 1.
-Add an effects clause. "Effects: None. This extractor does
-not behave as a formatted input function (as described in
-27.6.1.2.1).
-</p>
-
-<p>
-In 27.6.1.2.3, [lib.istream::extractors], paragraph 2. Change the
-effects clause to "Effects: Calls pf(*this). This extractor does not
-behave as a formatted input function (as described in 27.6.1.2.1).
-</p>
-
-<p>
-In 27.6.1.2.3, [lib.istream::extractors], paragraph 4. Change the
-effects clause to "Effects: Calls pf(*this). This extractor does not
-behave as a formatted input function (as described in 27.6.1.2.1).
-</p>
-
-<p>
-In 27.6.1.2.3, [lib.istream::extractors], paragraph 12. Change the
-first two sentences from "If sb is null, calls setstate(failbit),
-which may throw ios_base::failure (27.4.4.3). Extracts characters
-from *this..." to "Behaves as a formatted input function (as described
-in 27.6.1.2.1). If sb is null, calls setstate(failbit), which may
-throw ios_base::failure (27.4.4.3). After a sentry object is
-constructed, extracts characters from *this...".
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], before paragraph 2. Add an
-effects clause. "Effects: none. This member function does not behave
-as an unformatted input function (as described in 27.6.1.3, paragraph 1)."
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 3. Change the
-beginning of the first sentence of the effects clause from "Extracts a
-character" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts a
-character"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 5. Change the
-beginning of the first sentence of the effects clause from "Extracts a
-character" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts a
-character"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 7. Change the
-beginning of the first sentence of the effects clause from "Extracts
-characters" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
-characters"
-</p>
-
-<p>
-[No change needed in paragraph 10, because it refers to paragraph 7.]
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 12. Change the
-beginning of the first sentence of the effects clause from "Extracts
-characters" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
-characters"
-</p>
-
-<p>
-[No change needed in paragraph 15.]
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 17. Change the
-beginning of the first sentence of the effects clause from "Extracts
-characters" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
-characters"
-</p>
-
-<p>
-[No change needed in paragraph 23.]
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 24. Change the
-beginning of the first sentence of the effects clause from "Extracts
-characters" to "Behaves as an unformatted input function (as described
-in 27.6.1.3, paragraph 1). After constructing a sentry object, extracts
-characters"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], before paragraph 27. Add an
-Effects clause: "Effects: Behaves as an unformatted input function (as
-described in 27.6.1.3, paragraph 1). After constructing a sentry
-object, reads but does not extract the current input character."
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 28. Change the
-first sentence of the Effects clause from "If !good() calls" to
-Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1). After constructing a sentry object, if !good() calls"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 30. Change the
-first sentence of the Effects clause from "If !good() calls" to
-"Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1). After constructing a sentry object, if !good() calls"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 32. Change the
-first sentence of the Effects clause from "If !good() calls..." to
-"Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1). After constructing a sentry object, if !good()
-calls..." Add a new sentence to the end of the Effects clause:
-"[Note: this function extracts no characters, so the value returned
-by the next call to gcount() is 0.]"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 34. Change the
-first sentence of the Effects clause from "If !good() calls" to
-"Behaves as an unformatted input function (as described in 27.6.1.3,
-paragraph 1). After constructing a sentry object, if !good() calls".
-Add a new sentence to the end of the Effects clause: "[Note: this
-function extracts no characters, so the value returned by the next
-call to gcount() is 0.]"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 36. Change the
-first sentence of the Effects clause from "If !rdbuf() is" to "Behaves
-as an unformatted input function (as described in 27.6.1.3, paragraph
-1), except that it does not count the number of characters extracted
-and does not affect the value returned by subsequent calls to
-gcount(). After constructing a sentry object, if rdbuf() is"
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], before paragraph 37. Add an
-Effects clause: "Effects: Behaves as an unformatted input function (as
-described in 27.6.1.3, paragraph 1), except that it does not count the
-number of characters extracted and does not affect the value returned
-by subsequent calls to gcount()." Change the first sentence of
-paragraph 37 from "if fail()" to "after constructing a sentry object,
-if fail()".
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 38. Change the
-first sentence of the Effects clause from "If fail()" to "Behaves
-as an unformatted input function (as described in 27.6.1.3, paragraph
-1), except that it does not count the number of characters extracted
-and does not affect the value returned by subsequent calls to
-gcount(). After constructing a sentry object, if fail()
-</p>
-
-<p>
-In 27.6.1.3, [lib.istream.unformatted], paragraph 40. Change the
-first sentence of the Effects clause from "If fail()" to "Behaves
-as an unformatted input function (as described in 27.6.1.3, paragraph
-1), except that it does not count the number of characters extracted
-and does not affect the value returned by subsequent calls to
-gcount(). After constructing a sentry object, if fail()
-</p>
-
-<p>
-In 27.6.2.5.2 [lib.ostream.inserters.arithmetic], paragraph 1. Change
-the beginning of the third sentence from "The formatting conversion"
-to "These extractors behave as formatted output functions (as
-described in 27.6.2.5.1). After the sentry object is constructed, the
-conversion occurs".
-</p>
-
-<p>
-In 27.6.2.5.3 [lib.ostream.inserters], before paragraph 1. Add an
-effects clause: "Effects: None. Does not behave as a formatted output
-function (as described in 27.6.2.5.1).".
-</p>
-
-<p>
-In 27.6.2.5.3 [lib.ostream.inserters], paragraph 2. Change the
-effects clause to "Effects: calls pf(*this). This extractor does not
-behave as a formatted output function (as described in 27.6.2.5.1).".
-</p>
-
-<p>
-In 27.6.2.5.3 [lib.ostream.inserters], paragraph 4. Change the
-effects clause to "Effects: calls pf(*this). This extractor does not
-behave as a formatted output function (as described in 27.6.2.5.1).".
-</p>
-
-<p>
-In 27.6.2.5.3 [lib.ostream.inserters], paragraph 6. Change the first
-sentence from "If sb" to "Behaves as a formatted output function (as
-described in 27.6.2.5.1). After the sentry object is constructed, if
-sb".
-</p>
-
-<p>
-In 27.6.2.6 [lib.ostream.unformatted], paragraph 2. Change the first
-sentence from "Inserts the character" to "Behaves as an unformatted
-output function (as described in 27.6.2.6, paragraph 1). After
-constructing a sentry object, inserts the character".
-</p>
-
-<p>
-In 27.6.2.6 [lib.ostream.unformatted], paragraph 5. Change the first
-sentence from "Obtains characters" to "Behaves as an unformatted
-output function (as described in 27.6.2.6, paragraph 1). After
-constructing a sentry object, obtains characters".
-</p>
-
-<p>
-In 27.6.2.6 [lib.ostream.unformatted], paragraph 7. Add a new
-sentence at the end of the paragraph: "Does not behave as an
-unformatted output function (as described in 27.6.2.6, paragraph 1)."
-</p>
-<p><b>Rationale:</b></p>
-<p>See J16/99-0043==WG21/N1219, Proposed Resolution to Library Issue 60,
-by Judy Ward and Matt Austern. This proposed resolution is section
-VI of that paper.</p>
-<hr>
-<a name="61"><h3>61.&nbsp;Ambiguity in iostreams exception policy</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The introduction to the section on unformatted input (27.6.1.3)
-says that every unformatted input function catches all exceptions that
-were thrown during input, sets badbit, and then conditionally rethrows
-the exception. That seems clear enough. Several of the specific
-functions, however, such as get() and read(), are documented in some
-circumstances as setting eofbit and/or failbit. (The standard notes,
-correctly, that setting eofbit or failbit can sometimes result in an
-exception being thrown.) The question: if one of these functions
-throws an exception triggered by setting failbit, is this an exception
-"thrown during input" and hence covered by 27.6.1.3, or does
-27.6.1.3 only refer to a limited class of exceptions? Just to make
-this concrete, suppose you have the following snippet. </p>
-
-<pre>
- char buffer[N];
- istream is;
- ...
- is.exceptions(istream::failbit); // Throw on failbit but not on badbit.
- is.read(buffer, N);</pre>
-
-<p>Now suppose we reach EOF before we've read N characters. What
-iostate bits can we expect to be set, and what exception (if any) will
-be thrown? </p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 27.6.1.3, paragraph 1, after the sentence that begins
-"If an exception is thrown...", add the following
-parenthetical comment: "(Exceptions thrown from
-<tt>basic_ios&lt;&gt;::clear()</tt> are not caught or rethrown.)"
-</p>
-<p><b>Rationale:</b></p>
-<p>The LWG looked to two alternative wordings, and choose the proposed
-resolution as better standardese.</p>
-<hr>
-<a name="62"><h3>62.&nbsp;<tt>Sync</tt>'s return value</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;6 Aug 1998</p>
-<p>The Effects clause for sync() (27.6.1.3, paragraph 36) says that it
-"calls rdbuf()-&gt;pubsync() and, if that function returns -1
-... returns traits::eof()." </p>
-
-<p>That looks suspicious, because traits::eof() is of type
-traits::int_type while the return type of sync() is int. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, paragraph 36, change "returns
-<tt>traits::eof()</tt>" to "returns <tt>-1</tt>".
-</p>
-<hr>
-<a name="63"><h3>63.&nbsp;Exception-handling policy for unformatted output</h3></a><p><b>Section:</b>&nbsp;27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;11 Aug 1998</p>
-<p>Clause 27 details an exception-handling policy for formatted input,
-unformatted input, and formatted output. It says nothing for
-unformatted output (27.6.2.6). 27.6.2.6 should either include the same
-kind of exception-handling policy as in the other three places, or
-else it should have a footnote saying that the omission is
-deliberate. </p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 27.6.2.6, paragraph 1, replace the last sentence ("In any
-case, the unformatted output function ends by destroying the sentry
-object, then returning the value specified for the formatted output
-function.") with the following text:
-</p>
-<blockquote>
-If an exception is thrown during output, then <tt>ios::badbit</tt> is
-turned on [Footnote: without causing an <tt>ios::failure</tt> to be
-thrown.] in <tt>*this</tt>'s error state. If <tt>(exceptions() &amp;
-badbit) != 0</tt> then the exception is rethrown. In any case, the
-unformatted output function ends by destroying the sentry object,
-then, if no exception was thrown, returning the value specified for
-the formatted output function.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>
-This exception-handling policy is consistent with that of formatted
-input, unformatted input, and formatted output.
-</p>
-<hr>
-<a name="64"><h3>64.&nbsp;Exception handling in <tt>basic_istream::operator&gt;&gt;(basic_streambuf*)</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;11 Aug 1998 </p>
-<p>27.6.1.2.3, paragraph 13, is ambiguous. It can be interpreted two
-different ways, depending on whether the second sentence is read as an
-elaboration of the first. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, paragraph 13, which begins
-"If the function inserts no characters ..." with:</p>
-
-<blockquote>
- <p>If the function inserts no characters, it calls
- <tt>setstate(failbit)</tt>, which may throw
- <tt>ios_base::failure</tt> (27.4.4.3). If it inserted no characters
- because it caught an exception thrown while extracting characters
- from <tt>sb</tt> and <tt>failbit</tt> is on in <tt>exceptions()</tt>
- (27.4.4.3), then the caught exception is rethrown. </p>
-</blockquote>
-<hr>
-<a name="66"><h3>66.&nbsp;Strstreambuf::setbuf</h3></a><p><b>Section:</b>&nbsp;D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;18 Aug 1998</p>
-<p>D.7.1.3, paragraph 19, says that strstreambuf::setbuf
-"Performs an operation that is defined separately for each class
-derived from strstreambuf". This is obviously an incorrect
-cut-and-paste from basic_streambuf. There are no classes derived from
-strstreambuf. </p>
-<p><b>Proposed resolution:</b></p>
-<p>D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 19, replace the setbuf effects
-clause which currently says "Performs an operation that is
-defined separately for each class derived from strstreambuf"
-with:</p>
-
-<blockquote>
- <p><b>Effects</b>: implementation defined, except that
- <tt>setbuf(0,0)</tt> has no effect.</p>
-</blockquote>
-<hr>
-<a name="68"><h3>68.&nbsp;Extractors for char* should store null at end</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;14 Jul 1998</p>
-<p>Extractors for char* (27.6.1.2.3) do not store a null character
-after the extracted character sequence whereas the unformatted
-functions like get() do. Why is this?</p>
-
-<p>Comment from Jerry Schwarz: There is apparently an editing
-glitch. You'll notice that the last item of the list of what stops
-extraction doesn't make any sense. It was supposed to be the line that
-said a null is stored.</p>
-<p><b>Proposed resolution:</b></p>
-<p>27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, paragraph 7, change the last list
-item from:</p>
-
-<blockquote>
- A null byte (<tt>charT()</tt>) in the next position, which may be
- the first position if no characters were extracted.
-</blockquote>
-
-<p>to become a new paragraph which reads:</p>
-
-<blockquote>
- Operator&gt;&gt; then stores a null byte (<tt>charT()</tt>) in the
- next position, which may be the first position if no characters were
- extracted.
-</blockquote>
-<hr>
-<a name="69"><h3>69.&nbsp;Must elements of a vector be contiguous?</h3></a><p><b>Section:</b>&nbsp;23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;29 Jul 1998</p>
-<p>The issue is this: Must the elements of a vector be in contiguous memory?</p>
-
-<p>(Please note that this is entirely separate from the question of
-whether a vector iterator is required to be a pointer; the answer to
-that question is clearly "no," as it would rule out
-debugging implementations)</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following text to the end of 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>,
-paragraph 1. </p>
-
-<blockquote>
- <p>The elements of a vector are stored contiguously, meaning that if
- v is a <tt>vector&lt;T, Allocator&gt;</tt> where T is some type
- other than <tt>bool</tt>, then it obeys the identity <tt>&amp;v[n]
- == &amp;v[0] + n</tt> for all <tt>0 &lt;= n &lt; v.size()</tt>.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG feels that as a practical matter the answer is clearly
-"yes". There was considerable discussion as to the best way
-to express the concept of "contiguous", which is not
-directly defined in the standard. Discussion included:</p>
-
-<ul>
- <li>An operational definition similar to the above proposed resolution is
- already used for valarray (<font color="red">26.3.2.3</font>).</li>
- <li>There is no need to explicitly consider a user-defined operator&amp;
- because elements must be copyconstructible (23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> para 3)
- and copyconstructible (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>) specifies
- requirements for operator&amp;.</li>
- <li>There is no issue of one-past-the-end because of language rules.</li>
-</ul>
-<hr>
-<a name="70"><h3>70.&nbsp;Uncaught_exception() missing throw() specification</h3></a><p><b>Section:</b>&nbsp;18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a>, 18.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.uncaught"> [lib.uncaught]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;Unknown</p>
-<p>In article 3E04@pratique.fr, Valentin Bonnard writes: </p>
-
-<p>uncaught_exception() doesn't have a throw specification.</p>
-
-<p>It is intentional ? Does it means that one should be prepared to
-handle exceptions thrown from uncaught_exception() ?</p>
-
-<p>uncaught_exception() is called in exception handling contexts where
-exception safety is very important.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 15.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/except.html#except.uncaught"> [except.uncaught]</a>, paragraph 1, 18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a>, and 18.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.uncaught"> [lib.uncaught]</a>, add "throw()" to uncaught_exception().</p>
-<hr>
-<a name="71"><h3>71.&nbsp;Do_get_monthname synopsis missing argument</h3></a><p><b>Section:</b>&nbsp;22.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get"> [lib.locale.time.get]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;13 Aug 1998</p>
-<p>The locale facet member <tt>time_get&lt;&gt;::do_get_monthname</tt>
-is described in 22.2.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get.virtuals"> [lib.locale.time.get.virtuals]</a> with five arguments,
-consistent with do_get_weekday and with its specified use by member
-get_monthname. However, in the synopsis, it is specified instead with
-four arguments. The missing argument is the "end" iterator
-value.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get"> [lib.locale.time.get]</a>, add an "end" argument to
-the declaration of member do_monthname as follows:</p>
-
-<pre> virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&amp;,
- ios_base::iostate&amp; err, tm* t) const;</pre>
-<hr>
-<a name="74"><h3>74.&nbsp;Garbled text for <tt>codecvt::do_max_length</tt>
-</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;8 Sep 1998</p>
-<p>The text of <tt>codecvt::do_max_length</tt>'s "Returns"
-clause (22.2.1.5.2, paragraph 11) is garbled. It has unbalanced
-parentheses and a spurious <b>n</b>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace <font color="red">22.2.1.5.2</font> paragraph 11 with the
-following:</p>
-
-<blockquote>
- <b>Returns</b>: The maximum value that
- <tt>do_length(state, from, from_end, 1)</tt> can return for any
- valid range <tt>[from, from_end)</tt> and <tt>stateT</tt> value
- <tt>state</tt>. The specialization <tt>codecvt&lt;char, char,
- mbstate_t&gt;::do_max_length()</tt> returns 1.
-</blockquote>
-<hr>
-<a name="75"><h3>75.&nbsp;Contradiction in <tt>codecvt::length</tt>'s argument types</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp; Matt
-Austern&nbsp; <b>Date:</b>&nbsp; 18 Sep 1998</p>
-<p>The class synopses for classes <tt>codecvt&lt;&gt;</tt> (22.2.1.5)
-and <tt>codecvt_byname&lt;&gt;</tt> (22.2.1.6) say that the first
-parameter of the member functions <tt>length</tt> and
-<tt>do_length</tt> is of type <tt>const stateT&amp;</tt>. The member
-function descriptions, however (22.2.1.5.1, paragraph 6; 22.2.1.5.2,
-paragraph 9) say that the type is <tt>stateT&amp;</tt>. Either the
-synopsis or the summary must be changed. </p>
-
-<p>If (as I believe) the member function descriptions are correct,
-then we must also add text saying how <tt>do_length</tt> changes its
-<tt>stateT</tt> argument. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>, and also in <font color="red">22.2.1.6</font>,
-change the <tt>stateT</tt> argument type on both member
-<tt>length()</tt> and member <tt>do_length()</tt> from </p>
-
-<blockquote>
- <p><tt>const stateT&amp;</tt></p>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- <p><tt>stateT&amp;</tt></p>
-</blockquote>
-
-<p>In <font color="red">22.2.1.5.2</font>, add to the definition for member
-<tt>do_length</tt> a paragraph:</p>
-
-<blockquote>
- <p>Effects: The effect on the <tt>state</tt> argument is ``as if''
- it called <tt>do_in(state, from, from_end, from, to, to+max,
- to)</tt> for <tt>to</tt> pointing to a buffer of at least
- <tt>max</tt> elements.</p>
-</blockquote>
-<hr>
-<a name="76"><h3>76.&nbsp;Can a <tt>codecvt</tt> facet always convert one internal character at a time?</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;25 Sep 1998</p>
-<p>This issue concerns the requirements on classes derived from
-<tt>codecvt</tt>, including user-defined classes. What are the
-restrictions on the conversion from external characters
-(e.g. <tt>char</tt>) to internal characters (e.g. <tt>wchar_t</tt>)?
-Or, alternatively, what assumptions about <tt>codecvt</tt> facets can
-the I/O library make? </p>
-
-<p>The question is whether it's possible to convert from internal
-characters to external characters one internal character at a time,
-and whether, given a valid sequence of external characters, it's
-possible to pick off internal characters one at a time. Or, to put it
-differently: given a sequence of external characters and the
-corresponding sequence of internal characters, does a position in the
-internal sequence correspond to some position in the external
-sequence? </p>
-
-<p>To make this concrete, suppose that <tt>[first, last)</tt> is a
-sequence of <i>M</i> external characters and that <tt>[ifirst,
-ilast)</tt> is the corresponding sequence of <i>N</i> internal
-characters, where <i>N &gt; 1</i>. That is, <tt>my_encoding.in()</tt>,
-applied to <tt>[first, last)</tt>, yields <tt>[ifirst,
-ilast)</tt>. Now the question: does there necessarily exist a
-subsequence of external characters, <tt>[first, last_1)</tt>, such
-that the corresponding sequence of internal characters is the single
-character <tt>*ifirst</tt>?
-</p>
-
-<p>(What a "no" answer would mean is that
-<tt>my_encoding</tt> translates sequences only as blocks. There's a
-sequence of <i>M</i> external characters that maps to a sequence of
-<i>N</i> internal characters, but that external sequence has no
-subsequence that maps to <i>N-1</i> internal characters.) </p>
-
-<p>Some of the wording in the standard, such as the description of
-<tt>codecvt::do_max_length</tt> (<font color="red">22.2.1.5.2</font>,
-paragraph 11) and <tt>basic_filebuf::underflow</tt> (27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 3) suggests that it must always be
-possible to pick off internal characters one at a time from a sequence
-of external characters. However, this is never explicitly stated one
-way or the other. </p>
-
-<p>This issue seems (and is) quite technical, but it is important if
-we expect users to provide their own encoding facets. This is an area
-where the standard library calls user-supplied code, so a well-defined
-set of requirements for the user-supplied code is crucial. Users must
-be aware of the assumptions that the library makes. This issue affects
-positioning operations on <tt>basic_filebuf</tt>, unbuffered input,
-and several of <tt>codecvt</tt>'s member functions. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following text as a new paragraph, following <font color="red">22.2.1.5.2</font> paragraph 2:</p>
-
-<blockquote>
-<p>A <tt>codecvt</tt> facet that is used by <tt>basic_filebuf</tt>
-(27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>) must have the property that if</p>
-<pre> do_out(state, from, from_end, from_next, to, to_lim, to_next)
-</pre>
-would return <tt>ok</tt>, where <tt>from != from_end</tt>, then
-<pre> do_out(state, from, from + 1, from_next, to, to_end, to_next)
-</pre>
-must also return <tt>ok</tt>, and that if
-<pre> do_in(state, from, from_end, from_next, to, to_lim, to_next)
-</pre>
-would return <tt>ok</tt>, where <tt>to != to_lim</tt>, then
-<pre> do_in(state, from, from_end, from_next, to, to + 1, to_next)
-</pre>
-<p>must also return <tt>ok</tt>. [<i>Footnote:</i> Informally, this
-means that <tt>basic_filebuf</tt> assumes that the mapping from
-internal to external characters is 1 to N: a <tt>codecvt</tt> that is
-used by <tt>basic_filebuf</tt> must be able to translate characters
-one internal character at a time. <i>--End Footnote</i>]</p>
-</blockquote>
-
-<p><i>[Redmond: Minor change in proposed resolution. Original
-proposed resolution talked about "success", with a parenthetical
-comment that success meant returning <tt>ok</tt>. New wording
-removes all talk about "success", and just talks about the
-return value.]</i></p>
-
-<p><b>Rationale:</b></p>
-
- <p>The proposed resoluion says that conversions can be performed one
- internal character at a time. This rules out some encodings that
- would otherwise be legal. The alternative answer would mean there
- would be some internal positions that do not correspond to any
- external file position.</p>
- <p>
- An example of an encoding that this rules out is one where the
- <tt>internT</tt> and <tt>externT</tt> are of the same type, and
- where the internal sequence <tt>c1 c2</tt> corresponds to the
- external sequence <tt>c2 c1</tt>.
- </p>
- <p>It was generally agreed that <tt>basic_filebuf</tt> relies
- on this property: it was designed under the assumption that
- the external-to-internal mapping is N-to-1, and it is not clear
- that <tt>basic_filebuf</tt> is implementable without that
- restriction.
- </p>
- <p>
- The proposed resolution is expressed as a restriction on
- <tt>codecvt</tt> when used by <tt>basic_filebuf</tt>, rather
- than a blanket restriction on all <tt>codecvt</tt> facets,
- because <tt>basic_filebuf</tt> is the only other part of the
- library that uses <tt>codecvt</tt>. If a user wants to define
- a <tt>codecvt</tt> facet that implements a more general N-to-M
- mapping, there is no reason to prohibit it, so long as the user
- does not expect <tt>basic_filebuf</tt> to be able to use it.
- </p>
-<hr>
-<a name="78"><h3>78.&nbsp;Typo: event_call_back</h3></a><p><b>Section:</b>&nbsp;27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>typo: event_call_back should be event_callback &nbsp; </p>
-<p><b>Proposed resolution:</b></p>
-<p>In the 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> synopsis change
-"event_call_back" to "event_callback". </p>
-<hr>
-<a name="79"><h3>79.&nbsp;Inconsistent declaration of polar()</h3></a><p><b>Section:</b>&nbsp;26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>, 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>In 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a> polar is declared as follows:</p>
-<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;); </pre>
-
-<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> it is declared as follows:</p>
-<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp; rho, const T&amp; theta = 0); </pre>
-
-<p>Thus whether the second parameter is optional is not clear. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a> change:</p>
-<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp;, const T&amp;);</pre>
-
-<p>to:</p>
-<pre> template&lt;class T&gt; complex&lt;T&gt; polar(const T&amp; rho, const T&amp; theta = 0); </pre>
-<hr>
-<a name="80"><h3>80.&nbsp;Global Operators of complex declared twice</h3></a><p><b>Section:</b>&nbsp;26.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cfenv.syn"> [lib.cfenv.syn]</a>, 26.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.fenv"> [lib.fenv]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Both 26.2.1 and 26.2.2 contain declarations of global operators for
-class complex. This redundancy should be removed.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Reduce redundancy according to the general style of the standard. </p>
-<hr>
-<a name="83"><h3>83.&nbsp;String::npos vs. string::max_size()</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Many string member functions throw if size is getting or exceeding
-npos. However, I wonder why they don't throw if size is getting or
-exceeding max_size() instead of npos. May be npos is known at compile
-time, while max_size() is known at runtime. However, what happens if
-size exceeds max_size() but not npos, then? It seems the standard
-lacks some clarifications here.</p>
-<p><b>Proposed resolution:</b></p>
-<p>After 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 4 ("The functions
-described in this clause...") add a new paragraph:</p>
-
-<blockquote>
- <p>For any string operation, if as a result of the operation, <tt> size()</tt> would exceed
- <tt> max_size()</tt> then
- the operation throws <tt>length_error</tt>.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG believes length_error is the correct exception to throw.</p>
-<hr>
-<a name="86"><h3>86.&nbsp;String constructors don't describe exceptions</h3></a><p><b>Section:</b>&nbsp;21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>The constructor from a range:</p>
-
-<pre>template&lt;class InputIterator&gt;
- basic_string(InputIterator begin, InputIterator end,
- const Allocator&amp; a = Allocator());</pre>
-
-<p>lacks a throws clause. However, I would expect that it throws
-according to the other constructors if the numbers of characters in
-the range equals npos (or exceeds max_size(), see above). </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, Strike throws paragraphs for
-constructors which say "Throws: length_error if n ==
-npos."</p>
-<p><b>Rationale:</b></p>
-<p>Throws clauses for length_error if n == npos are no longer needed
-because they are subsumed by the general wording added by the
-resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
-<hr>
-<a name="90"><h3>90.&nbsp;Incorrect description of operator &gt;&gt; for strings</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>The effect of operator &gt;&gt; for strings contain the following item:</p>
-
-<p>&nbsp;&nbsp;&nbsp; <tt>isspace(c,getloc())</tt> is true for the next available input
-character c.</p>
-
-<p>Here <tt>getloc()</tt> has to be replaced by <tt>is.getloc()</tt>. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 1 Effects clause replace:</p>
-
-<blockquote>
- <p><tt>isspace(c,getloc())</tt> is true for the next available input character c.</p>
-</blockquote>
-
-<p>with:</p>
-
-<blockquote>
- <p><tt>isspace(c,is.getloc())</tt> is true for the next available input character c.</p>
-</blockquote>
-<hr>
-<a name="91"><h3>91.&nbsp;Description of operator&gt;&gt; and getline() for string&lt;&gt; might cause endless loop</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>Operator &gt;&gt; and getline() for strings read until eof()
-in the input stream is true. However, this might never happen, if the
-stream can't read anymore without reaching EOF. So shouldn't it be
-changed into that it reads until !good() ? </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>, paragraph 1, replace:</p>
-<blockquote>
-Effects: Begins by constructing a sentry object k as if k were
-constructed by typename basic_istream&lt;charT,traits&gt;::sentry k( is). If
-bool( k) is true, it calls str.erase() and then extracts characters
-from is and appends them to str as if by calling str.append(1, c). If
-is.width() is greater than zero, the maximum number n of characters
-appended is is.width(); otherwise n is str.max_size(). Characters are
-extracted and appended until any of the following occurs:
-</blockquote>
-<p>with:</p>
-<blockquote>
-Effects: Behaves as a formatted input function (27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>). After constructing a sentry object, if the
-sentry converts to true, calls str.erase() and then extracts
-characters from is and appends them to str as if by calling
-str.append(1,c). If is.width() is greater than zero, the maximum
-number n of characters appended is is.width(); otherwise n is
-str.max_size(). Characters are extracted and appended until any of the
-following occurs:
-</blockquote>
-
-<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>, paragraph 6, replace</p>
-<blockquote>
-Effects: Begins by constructing a sentry object k as if by typename
-basic_istream&lt;charT,traits&gt;::sentry k( is, true). If bool( k) is true,
-it calls str.erase() and then extracts characters from is and appends
-them to str as if by calling str.append(1, c) until any of the
-following occurs:
-</blockquote>
-<p>with:</p>
-<blockquote>
-Effects: Behaves as an unformatted input function (27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), except that it does not affect the value returned
-by subsequent calls to basic_istream&lt;&gt;::gcount(). After
-constructing a sentry object, if the sentry converts to true, calls
-str.erase() and then extracts characters from is and appends them to
-str as if by calling str.append(1,c) until any of the following
-occurs:
-</blockquote>
-
-<p><i>[Redmond: Made changes in proposed resolution. <tt>operator&gt;&gt;</tt>
-should be a formatted input function, not an unformatted input function.
-<tt>getline</tt> should not be required to set <tt>gcount</tt>, since
-there is no mechanism for <tt>gcount</tt> to be set except by one of
-<tt>basic_istream</tt>'s member functions.]</i></p>
-
-<p><i>[Curaçao: Nico agrees with proposed resolution.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The real issue here is whether or not these string input functions
-get their characters from a streambuf, rather than by calling an
-istream's member functions, a streambuf signals failure either by
-returning eof or by throwing an exception; there are no other
-possibilities. The proposed resolution makes it clear that these two
-functions do get characters from a streambuf.</p>
-<hr>
-<a name="92"><h3>92.&nbsp;Incomplete Algorithm Requirements</h3></a><p><b>Section:</b>&nbsp;25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;29 Sep 1998</p>
-<p>The standard does not state, how often a function object is copied,
-called, or the order of calls inside an algorithm. This may lead to
-surprising/buggy behavior. Consider the following example: </p>
-
-<pre>class Nth { // function object that returns true for the nth element
- private:
- int nth; // element to return true for
- int count; // element counter
- public:
- Nth (int n) : nth(n), count(0) {
- }
- bool operator() (int) {
- return ++count == nth;
- }
-};
-....
-// remove third element
- list&lt;int&gt;::iterator pos;
- pos = remove_if(coll.begin(),coll.end(), // range
- Nth(3)), // remove criterion
- coll.erase(pos,coll.end()); </pre>
-
-<p>This call, in fact removes the 3rd <b>AND the 6th</b> element. This
-happens because the usual implementation of the algorithm copies the
-function object internally: </p>
-
-<pre>template &lt;class ForwIter, class Predicate&gt;
-ForwIter std::remove_if(ForwIter beg, ForwIter end, Predicate op)
-{
- beg = find_if(beg, end, op);
- if (beg == end) {
- return beg;
- }
- else {
- ForwIter next = beg;
- return remove_copy_if(++next, end, beg, op);
- }
-} </pre>
-
-<p>The algorithm uses find_if() to find the first element that should
-be removed. However, it then uses a copy of the passed function object
-to process the resulting elements (if any). Here, Nth is used again
-and removes also the sixth element. This behavior compromises the
-advantage of function objects being able to have a state. Without any
-cost it could be avoided (just implement it directly instead of
-calling find_if()). </p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add a new paragraph following 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> paragraph 8:</p>
-<blockquote>
-[Note: Unless otherwise specified, algorithms that take function
-objects as arguments are permitted to copy those function objects
-freely. Programmers for whom object identity is important should
-consider using a wrapper class that points to a noncopied
-implementation object, or some equivalent solution.]
-</blockquote>
-
-<p><i>[Dublin: Pete Becker felt that this may not be a defect,
-but rather something that programmers need to be educated about.
-There was discussion of adding wording to the effect that the number
-and order of calls to function objects, including predicates, not
-affect the behavior of the function object.]</i></p>
-
-<p><i>[Pre-Kona: Nico comments: It seems the problem is that we don't
-have a clear statement of "predicate" in the
-standard. People including me seemed to think "a function
-returning a Boolean value and being able to be called by an STL
-algorithm or be used as sorting criterion or ... is a
-predicate". But a predicate has more requirements: It should
-never change its behavior due to a call or being copied. IMHO we have
-to state this in the standard. If you like, see section 8.1.4 of my
-library book for a detailed discussion.]</i></p>
-
-<p><i>[Kona: Nico will provide wording to the effect that "unless
-otherwise specified, the number of copies of and calls to function
-objects by algorithms is unspecified".&nbsp; Consider placing in
-25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> after paragraph 9.]</i></p>
-
-<p><i>[Santa Cruz: The standard doesn't currently guarantee that
- functions object won't be copied, and what isn't forbidden is
- allowed. It is believed (especially since implementations that were
- written in concert with the standard do make copies of function
- objects) that this was intentional. Thus, no normative change is
- needed. What we should put in is a non-normative note suggesting to
- programmers that if they want to guarantee the lack of copying they
- should use something like the <tt>ref</tt> wrapper.]</i></p>
-
-<p><i>[Oxford: Matt provided wording.]</i></p>
-
-
-<hr>
-<a name="98"><h3>98.&nbsp;Input iterator requirements are badly written</h3></a><p><b>Section:</b>&nbsp;24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>Table 72 in 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> specifies semantics for
-<tt>*r++</tt> of:</p>
-
-<p>&nbsp;&nbsp; <tt>{ T tmp = *r; ++r; return tmp; }</tt></p>
-
-<p>There are two problems with this. First, the return type is
-specified to be "T", as opposed to something like "convertible to T".
-This is too specific: we want to allow *r++ to return an lvalue.</p>
-
-<p>Second, writing the semantics in terms of code misleadingly
-suggests that the effects *r++ should precisely replicate the behavior
-of this code, including side effects. (Does this mean that *r++
-should invoke the copy constructor exactly as many times as the sample
-code above would?) See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#334">334</a> for a similar
-problem.</p>
-
-<p><b>Proposed resolution:</b></p>
-In Table 72 in 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>, change the return type
-for <tt>*r++</tt> from <tt>T</tt> to "convertible to T".
-<p><b>Rationale:</b></p>
-<p>This issue has two parts: the return type, and the number of times
- the copy constructor is invoked.</p>
-
-<p>The LWG believes the the first part is a real issue. It's
- inappropriate for the return type to be specified so much more
- precisely for *r++ than it is for *r. In particular, if r is of
- (say) type <tt>int*</tt>, then *r++ isn't <tt>int</tt>,
- but <tt>int&amp;</tt>.</p>
-
-<p>The LWG does not believe that the number of times the copy
- constructor is invoked is a real issue. This can vary in any case,
- because of language rules on copy constructor elision. That's too
- much to read into these semantics clauses.</p>
-
-<p>Additionally, as Dave Abrahams pointed out (c++std-lib-13703): since
- we're told (24.1/3) that forward iterators satisfy all the requirements
- of input iterators, we can't impose any requirements in the Input
- Iterator requirements table that forward iterators don't satisfy.</p>
-<hr>
-<a name="103"><h3>103.&nbsp;set::iterator is required to be modifiable, but this allows modification of keys</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>Set::iterator is described as implementation-defined with a
-reference to the container requirement; the container requirement says
-that const_iterator is an iterator pointing to const T and iterator an
-iterator pointing to T.</p>
-
-<p>23.1.2 paragraph 2 implies that the keys should not be modified to
-break the ordering of elements. But that is not clearly
-specified. Especially considering that the current standard requires
-that iterator for associative containers be different from
-const_iterator. Set, for example, has the following: </p>
-
-<p><tt>typedef implementation defined iterator;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // See _lib.container.requirements_</tt></p>
-
-<p>23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> actually requires that iterator type pointing
-to T (table 65). Disallowing user modification of keys by changing the
-standard to require an iterator for associative container to be the
-same as const_iterator would be overkill since that will unnecessarily
-significantly restrict the usage of associative container. A class to
-be used as elements of set, for example, can no longer be modified
-easily without either redesigning the class (using mutable on fields
-that have nothing to do with ordering), or using const_cast, which
-defeats requiring iterator to be const_iterator. The proposed solution
-goes in line with trusting user knows what he is doing. </p>
-
-<p><b>Other Options Evaluated:</b> </p>
-
-<p>Option A.&nbsp;&nbsp; In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, paragraph 2, after
-first sentence, and before "In addition,...", add one line:
-</p>
-
-<blockquote>
- <p>Modification of keys shall not change their strict weak ordering. </p>
-</blockquote>
-
-<p>Option B.&nbsp;Add three new sentences to 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>:</p>
-
-<blockquote>
- <p>At the end of paragraph 5: "Keys in an associative container
- are immutable." At the end of paragraph 6: "For
- associative containers where the value type is the same as the key
- type, both <tt>iterator</tt> and <tt>const_iterator</tt> are
- constant iterators. It is unspecified whether or not
- <tt>iterator</tt> and <tt>const_iterator</tt> are the same
- type."</p>
-</blockquote>
-
-<p>Option C.&nbsp;To 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, paragraph 3, which
-currently reads:</p>
-
-<blockquote>
- <p>The phrase ``equivalence of keys'' means the equivalence relation imposed by the
- comparison and not the operator== on keys. That is, two keys k1 and k2 in the same
- container are considered to be equivalent if for the comparison object comp, comp(k1, k2)
- == false &amp;&amp; comp(k2, k1) == false.</p>
-</blockquote>
-
-<p>&nbsp; add the following:</p>
-
-<blockquote>
- <p>For any two keys k1 and k2 in the same container, comp(k1, k2) shall return the same
- value whenever it is evaluated. [Note: If k2 is removed from the container and later
- reinserted, comp(k1, k2) must still return a consistent value but this value may be
- different than it was the first time k1 and k2 were in the same container. This is
- intended to allow usage like a string key that contains a filename, where comp compares
- file contents; if k2 is removed, the file is changed, and the same k2 (filename) is
- reinserted, comp(k1, k2) must again return a consistent value but this value may be
- different than it was the previous time k2 was in the container.]</p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following to 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> at
-the indicated location:</p>
-
-<blockquote>
- <p>At the end of paragraph 3: "For any two keys k1 and k2 in the same container,
- calling comp(k1, k2) shall always return the same
- value."</p>
- <p>At the end of paragraph 5: "Keys in an associative container are immutable."</p>
- <p>At the end of paragraph 6: "For associative containers where the value type is the
- same as the key type, both <tt>iterator</tt> and <tt>const_iterator</tt> are constant
- iterators. It is unspecified whether or not <tt>iterator</tt> and <tt>const_iterator</tt>
- are the same type."</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Several arguments were advanced for and against allowing set elements to be
-mutable as long as the ordering was not effected. The argument which swayed the
-LWG was one of safety; if elements were mutable, there would be no compile-time
-way to detect of a simple user oversight which caused ordering to be
-modified. There was a report that this had actually happened in practice,
-and had been painful to diagnose. If users need to modify elements,
-it is possible to use mutable members or const_cast.</p>
-
-<p>Simply requiring that keys be immutable is not sufficient, because the comparison
-object may indirectly (via pointers) operate on values outside of the keys.</p>
-
-<p>
-The types <tt>iterator</tt> and <tt>const_iterator</tt> are permitted
-to be different types to allow for potential future work in which some
-member functions might be overloaded between the two types. No such
-member functions exist now, and the LWG believes that user functionality
-will not be impaired by permitting the two types to be the same. A
-function that operates on both iterator types can be defined for
-<tt>const_iterator</tt> alone, and can rely on the automatic
-conversion from <tt>iterator</tt> to <tt>const_iterator</tt>.
-</p>
-
-<p><i>[Tokyo: The LWG crafted the proposed resolution and rationale.]</i></p>
-<hr>
-<a name="106"><h3>106.&nbsp;Numeric library private members are implementation defined</h3></a><p><b>Section:</b>&nbsp;26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>This is the only place in the whole standard where the implementation has to document
-something private.</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Remove the comment which says "// remainder implementation defined" from:
-</p>
-
-<ul>
- <li>26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a>
-</li>
- <li>26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a>
-</li>
- <li>26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a>
-</li>
- <li>26.3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cmplx.over"> [lib.cmplx.over]</a>
-</li>
-</ul>
-<hr>
-<a name="108"><h3>108.&nbsp;Lifetime of exception::what() return unspecified</h3></a><p><b>Section:</b>&nbsp;18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;AFNOR&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-<p>In 18.6.1, paragraphs 8-9, the lifetime of the return value of
-exception::what() is left unspecified. This issue has implications
-with exception safety of exception handling: some exceptions should
-not throw bad_alloc.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> paragraph 9 (exception::what notes
-clause) the sentence:</p>
-
-<blockquote>
- <p>The return value remains valid until the exception object from which it is obtained is
- destroyed or a non-const member function of the exception object is called.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>If an exception object has non-const members, they may be used
-to set internal state that should affect the contents of the string
-returned by <tt>what()</tt>.
-</p>
-<hr>
-<a name="109"><h3>109.&nbsp;Missing binders for non-const sequence elements</h3></a><p><b>Section:</b>&nbsp;20.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.arithmetic.operations"> [lib.arithmetic.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Bjarne Stroustrup&nbsp; <b>Date:</b>&nbsp;7 Oct 1998</p>
-
-<p>There are no versions of binders that apply to non-const elements
-of a sequence. This makes examples like for_each() using bind2nd() on
-page 521 of "The C++ Programming Language (3rd)"
-non-conforming. Suitable versions of the binders need to be added.</p>
-
-<p>Further discussion from Nico:</p>
-
-<p>What is probably meant here is shown in the following example:</p>
-
-<pre>class Elem {
- public:
- void print (int i) const { }
- void modify (int i) { }
-}; </pre>
-<pre>int main()
-{
- vector&lt;Elem&gt; coll(2);
- for_each (coll.begin(), coll.end(), bind2nd(mem_fun_ref(&amp;Elem::print),42)); // OK
- for_each (coll.begin(), coll.end(), bind2nd(mem_fun_ref(&amp;Elem::modify),42)); // ERROR
-}</pre>
-
-<p>The error results from the fact that bind2nd() passes its first
-argument (the argument of the sequence) as constant reference. See the
-following typical implementation:</p>
-
-<blockquote>
- <pre>template &lt;class Operation&gt;
-class binder2nd
- : public unary_function&lt;typename Operation::first_argument_type,
- typename Operation::result_type&gt; {
-protected:
- Operation op;
- typename Operation::second_argument_type value;
-public:
- binder2nd(const Operation&amp; o,
- const typename Operation::second_argument_type&amp; v)
- : op(o), value(v) {} </pre>
- <pre> typename Operation::result_type
- operator()(const typename Operation::first_argument_type&amp; x) const {
- return op(x, value);
- }
-};</pre>
-</blockquote>
-
-<p>The solution is to overload operator () of bind2nd for non-constant arguments:</p>
-
-<blockquote>
- <pre>template &lt;class Operation&gt;
-class binder2nd
- : public unary_function&lt;typename Operation::first_argument_type,
- typename Operation::result_type&gt; {
-protected:
- Operation op;
- typename Operation::second_argument_type value;
-public:
- binder2nd(const Operation&amp; o,
- const typename Operation::second_argument_type&amp; v)
- : op(o), value(v) {} </pre>
- <pre> typename Operation::result_type
- operator()(const typename Operation::first_argument_type&amp; x) const {
- return op(x, value);
- }
- typename Operation::result_type
- operator()(typename Operation::first_argument_type&amp; x) const {
- return op(x, value);
- }
-};</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-
-<p><b>Howard believes there is a flaw</b> in this resolution.
-See c++std-lib-9127. We may need to reopen this issue.</p>
-
-<p>In <font color="red">20.5.6.1</font> in the declaration of binder1st after:</p>
-<blockquote>
- <p><tt>typename Operation::result_type<br>
- &nbsp;operator()(const typename Operation::second_argument_type&amp; x) const;</tt></p>
-</blockquote>
-<p>insert:</p>
-<blockquote>
- <p><tt>typename Operation::result_type<br>
- &nbsp;operator()(typename Operation::second_argument_type&amp; x) const;</tt></p>
-</blockquote>
-<p>In <font color="red">20.5.6.3</font> in the declaration of binder2nd after:</p>
-<blockquote>
- <p><tt>typename Operation::result_type<br>
- &nbsp;operator()(const typename Operation::first_argument_type&amp; x) const;</tt></p>
-</blockquote>
-<p>insert:</p>
-<blockquote>
- <p><tt>typename Operation::result_type<br>
- &nbsp;operator()(typename Operation::first_argument_type&amp; x) const;</tt></p>
-</blockquote>
-
-<p><i>[Kona: The LWG discussed this at some length.It was agreed that
-this is a mistake in the design, but there was no consensus on whether
-it was a defect in the Standard. Straw vote: NAD - 5. Accept
-proposed resolution - 3. Leave open - 6.]</i></p>
-
-<p><i>[Copenhagen: It was generally agreed that this was a defect.
-Strap poll: NAD - 0. Accept proposed resolution - 10.
-Leave open - 1.]</i></p>
-
-<hr>
-<a name="110"><h3>110.&nbsp;istreambuf_iterator::equal not const</h3></a><p><b>Section:</b>&nbsp;24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a>, 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;15 Oct 1998</p>
-<p>Member istreambuf_iterator&lt;&gt;::equal is not declared
-"const", yet 24.5.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op=="> [lib.istreambuf.iterator::op==]</a> says that operator==,
-which is const, calls it. This is contradictory. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a> and also in 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>,
-replace:</p>
-
-<blockquote>
- <pre>bool equal(istreambuf_iterator&amp; b);</pre>
-</blockquote>
-
-<p>with:</p>
-
-<blockquote>
- <pre>bool equal(const istreambuf_iterator&amp; b) const;</pre>
-</blockquote>
-<hr>
-<a name="112"><h3>112.&nbsp;Minor typo in <tt>ostreambuf_iterator</tt> constructor</h3></a><p><b>Section:</b>&nbsp;24.5.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iter.cons"> [lib.ostreambuf.iter.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;20 Oct 1998</p>
-<p>The <b>requires</b> clause for <tt>ostreambuf_iterator</tt>'s
-constructor from an <tt>ostream_type</tt> (24.5.4.1, paragraph 1)
-reads "<i>s</i> is not null". However, <i>s</i> is a
-reference, and references can't be null. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 24.5.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iter.cons"> [lib.ostreambuf.iter.cons]</a>:</p>
-
-<p>Move the current paragraph 1, which reads "Requires: s is not
-null.", from the first constructor to the second constructor.</p>
-
-<p>Insert a new paragraph 1 Requires clause for the first constructor
-reading:</p>
-
-<blockquote>
- <p><b>Requires</b>: <tt>s.rdbuf()</tt> is not null.</p>
-</blockquote>
-<hr>
-<a name="114"><h3>114.&nbsp;Placement forms example in error twice</h3></a><p><b>Section:</b>&nbsp;18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;28 Oct 1998</p>
-<p>Section 18.5.1.3 contains the following example: </p>
-
-<pre>[Example: This can be useful for constructing an object at a known address:
- char place[sizeof(Something)];
- Something* p = new (place) Something();
- -end example]</pre>
-
-<p>First code line: "place" need not have any special alignment, and the
-following constructor could fail due to misaligned data.</p>
-
-<p>Second code line: Aren't the parens on Something() incorrect?&nbsp; [Dublin: the LWG
-believes the () are correct.]</p>
-
-<p>Examples are not normative, but nevertheless should not show code that is invalid or
-likely to fail.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace the <u> first line of code</u> in the example in
-18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> with:
-</p>
-
-<blockquote>
- <pre>void* place = operator new(sizeof(Something));</pre>
-</blockquote>
-<hr>
-<a name="115"><h3>115.&nbsp;Typo in strstream constructors</h3></a><p><b>Section:</b>&nbsp;D.7.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream.cons"> [depr.strstream.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;2 Nov 1998</p>
-<p>D.7.4.1 strstream constructors paragraph 2 says: </p>
-
-<blockquote>
- <p>Effects: Constructs an object of class strstream, initializing the base class with
- iostream(&amp; sb) and initializing sb with one of the two constructors: </p>
- <p>- If mode&amp;app==0, then s shall designate the first element of an array of n
- elements. The constructor is strstreambuf(s, n, s). </p>
- <p>- If mode&amp;app==0, then s shall designate the first element of an array of n
- elements that contains an NTBS whose first element is designated by s. The constructor is
- strstreambuf(s, n, s+std::strlen(s)).</p>
-</blockquote>
-
-<p>Notice the second condition is the same as the first. I think the second condition
-should be "If mode&amp;app==app", or "mode&amp;app!=0", meaning that
-the append bit is set.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In D.7.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ostrstream.cons"> [depr.ostrstream.cons]</a> paragraph 2 and D.7.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream.cons"> [depr.strstream.cons]</a>
-paragraph 2, change the first condition to <tt>(mode&amp;app)==0</tt>
-and the second condition to <tt>(mode&amp;app)!=0</tt>.</p>
-<hr>
-<a name="117"><h3>117.&nbsp;<tt>basic_ostream</tt> uses nonexistent <tt>num_put</tt> member functions</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.arithmetic"> [lib.ostream.inserters.arithmetic]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;20 Nov 1998</p>
-<p>The <b>effects</b> clause for numeric inserters says that
-insertion of a value <tt>x</tt>, whose type is either <tt>bool</tt>,
-<tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned
-int</tt>, <tt>long</tt>, <tt>unsigned long</tt>, <tt>float</tt>,
-<tt>double</tt>, <tt>long double</tt>, or <tt>const void*</tt>, is
-delegated to <tt>num_put</tt>, and that insertion is performed as if
-through the following code fragment: </p>
-
-<pre>bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(), val). failed();</pre>
-
-<p>This doesn't work, because <tt>num_put&lt;&gt;</tt>::put is only
-overloaded for the types <tt>bool</tt>, <tt>long</tt>, <tt>unsigned
-long</tt>, <tt>double</tt>, <tt>long double</tt>, and <tt>const
-void*</tt>. That is, the code fragment in the standard is incorrect
-(it is diagnosed as ambiguous at compile time) for the types
-<tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned
-int</tt>, and <tt>float</tt>. </p>
-
-<p>We must either add new member functions to <tt>num_put</tt>, or
-else change the description in <tt>ostream</tt> so that it only calls
-functions that are actually there. I prefer the latter. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace 27.6.2.5.2, paragraph 1 with the following: </p>
-
-<blockquote>
-<p>
-The classes num_get&lt;&gt; and num_put&lt;&gt; handle locale­dependent numeric
-formatting and parsing. These inserter functions use the imbued
-locale value to perform numeric formatting. When val is of type bool,
-long, unsigned long, double, long double, or const void*, the
-formatting conversion occurs as if it performed the following code
-fragment:
-</p>
-
-<pre>bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(), val). failed();
-</pre>
-
-<p>
-When val is of type short the formatting conversion occurs as if it
-performed the following code fragment:
-</p>
-
-<pre>ios_base::fmtflags baseflags = ios_base::flags() &amp; ios_base::basefield;
-bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(),
- baseflags == ios_base::oct || baseflags == ios_base::hex
- ? static_cast&lt;long&gt;(static_cast&lt;unsigned short&gt;(val))
- : static_cast&lt;long&gt;(val)). failed();
-</pre>
-
-<p>
-When val is of type int the formatting conversion occurs as if it performed
-the following code fragment:
-</p>
-
-<pre>ios_base::fmtflags baseflags = ios_base::flags() &amp; ios_base::basefield;
-bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(),
- baseflags == ios_base::oct || baseflags == ios_base::hex
- ? static_cast&lt;long&gt;(static_cast&lt;unsigned int&gt;(val))
- : static_cast&lt;long&gt;(val)). failed();
-</pre>
-
-<p>
-When val is of type unsigned short or unsigned int the formatting conversion
-occurs as if it performed the following code fragment:
-</p>
-
-<pre>bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(), static_cast&lt;unsigned long&gt;(val)).
-failed();
-</pre>
-
-<p>
-When val is of type float the formatting conversion occurs as if it
-performed the following code fragment:
-</p>
-
-<pre>bool failed = use_facet&lt;
- num_put&lt;charT,ostreambuf_iterator&lt;charT,traits&gt; &gt;
- &gt;(getloc()).put(*this, *this, fill(), static_cast&lt;double&gt;(val)).
-failed();
-</pre>
-
-</blockquote>
-
-<p><i>[post-Toronto: This differs from the previous proposed
-resolution; PJP provided the new wording. The differences are in
-signed short and int output.]</i></p>
-<p><b>Rationale:</b></p>
-<p>The original proposed resolution was to cast int and short to long,
-unsigned int and unsigned short to unsigned long, and float to double,
-thus ensuring that we don't try to use nonexistent num_put&lt;&gt;
-member functions. The current proposed resolution is more
-complicated, but gives more expected results for hex and octal output
-of signed short and signed int. (On a system with 16-bit short, for
-example, printing short(-1) in hex format should yield 0xffff.)</p>
-<hr>
-<a name="118"><h3>118.&nbsp;<tt>basic_istream</tt> uses nonexistent <tt>num_get</tt> member functions</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;20 Nov 1998</p>
-<p>Formatted input is defined for the types <tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>,
-<tt>unsigned int</tt>, <tt>long</tt>, <tt>unsigned long</tt>, <tt>float</tt>, <tt>double</tt>,
-<tt>long double</tt>, <tt>bool</tt>, and <tt>void*</tt>. According to section 27.6.1.2.2,
-formatted input of a value <tt>x</tt> is done as if by the following code fragment: </p>
-
-<pre>typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
-iostate err = 0;
-use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, val);
-setstate(err);</pre>
-
-<p>According to section 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>, however,
-<tt>num_get&lt;&gt;::get()</tt> is only overloaded for the types
-<tt>bool</tt>, <tt>long</tt>, <tt>unsigned short</tt>, <tt>unsigned
-int</tt>, <tt>unsigned long</tt>, <tt>unsigned long</tt>,
-<tt>float</tt>, <tt>double</tt>, <tt>long double</tt>, and
-<tt>void*</tt>. Comparing the lists from the two sections, we find
-that 27.6.1.2.2 is using a nonexistent function for types
-<tt>short</tt> and <tt>int</tt>. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> Arithmetic Extractors, remove the
-two lines (1st and 3rd) which read:</p>
-<blockquote>
- <pre>operator&gt;&gt;(short&amp; val);
-...
-operator&gt;&gt;(int&amp; val);</pre>
-</blockquote>
-
-<p>And add the following at the end of that section (27.6.1.2.2) :</p>
-
-<blockquote>
- <pre>operator&gt;&gt;(short&amp; val);</pre>
- <p>The conversion occurs as if performed by the following code fragment (using
- the same notation as for the preceding code fragment):</p>
- <pre> typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
- iostate err = 0;
- long lval;
- use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, lval);
- if (err == 0
- &amp;&amp; (lval &lt; numeric_limits&lt;short&gt;::min() || numeric_limits&lt;short&gt;::max() &lt; lval))
- err = ios_base::failbit;
- setstate(err);</pre>
- <pre>operator&gt;&gt;(int&amp; val);</pre>
- <p>The conversion occurs as if performed by the following code fragment (using
- the same notation as for the preceding code fragment):</p>
- <pre> typedef num_get&lt; charT,istreambuf_iterator&lt;charT,traits&gt; &gt; numget;
- iostate err = 0;
- long lval;
- use_facet&lt; numget &gt;(loc).get(*this, 0, *this, err, lval);
- if (err == 0
- &amp;&amp; (lval &lt; numeric_limits&lt;int&gt;::min() || numeric_limits&lt;int&gt;::max() &lt; lval))
- err = ios_base::failbit;
- setstate(err);</pre>
-</blockquote>
-
-<p><i>[Post-Tokyo: PJP provided the above wording.]</i></p>
-<hr>
-<a name="119"><h3>119.&nbsp;Should virtual functions be allowed to strengthen the exception specification?</h3></a><p><b>Section:</b>&nbsp;17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>Section 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> states: </p>
-
-<p>"An implementation may strengthen the exception-specification
-for a function by removing listed exceptions." </p>
-
-<p>The problem is that if an implementation is allowed to do this for
-virtual functions, then a library user cannot write a class that
-portably derives from that class. </p>
-
-<p>For example, this would not compile if ios_base::failure::~failure
-had an empty exception specification: </p>
-
-<pre>#include &lt;ios&gt;
-#include &lt;string&gt;
-
-class D : public std::ios_base::failure {
-public:
- D(const std::string&amp;);
- ~D(); // error - exception specification must be compatible with
- // overridden virtual function ios_base::failure::~failure()
-};</pre>
-<p><b>Proposed resolution:</b></p>
-<p>Change Section 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> from:</p>
-
-<p>&nbsp;&nbsp;&nbsp;&nbsp; "may strengthen the
-exception-specification for a function"</p>
-
-<p>to:</p>
-
-<p>&nbsp;&nbsp;&nbsp;&nbsp; "may strengthen the
-exception-specification for a non-virtual function". </p>
-<hr>
-<a name="120"><h3>120.&nbsp;Can an implementor add specializations?</h3></a><p><b>Section:</b>&nbsp;17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-
-<p>The original issue asked whether a library implementor could
-specialize standard library templates for built-in types. (This was
-an issue because users are permitted to explicitly instantiate
-standard library templates.)</p>
-
-<p>Specializations are no longer a problem, because of the resolution
-to core issue 259. Under the proposed resolution, it will be legal
-for a translation unit to contain both a specialization and an
-explicit instantiation of the same template, provided that the
-specialization comes first. In such a case, the explicit
-instantiation will be ignored. Further discussion of library issue
-120 assumes that the core 259 resolution will be adopted.</p>
-
-<p>However, as noted in lib-7047, one piece of this issue still
-remains: what happens if a standard library implementor explicitly
-instantiates a standard library templates? It's illegal for a program
-to contain two different explicit instantiations of the same template
-for the same type in two different translation units (ODR violation),
-and the core working group doesn't believe it is practical to relax
-that restriction.</p>
-
-<p>The issue, then, is: are users allowed to explicitly instantiate
-standard library templates for non-user defined types? The status quo
-answer is 'yes'. Changing it to 'no' would give library implementors
-more freedom.</p>
-
-<p>This is an issue because, for performance reasons, library
-implementors often need to explicitly instantiate standard library
-templates. (for example, std::basic_string&lt;char&gt;) Does giving
-users freedom to explicitly instantiate standard library templates for
-non-user defined types make it impossible or painfully difficult for
-library implementors to do this?</p>
-
-<p>John Spicer suggests, in lib-8957, that library implementors have a
-mechanism they can use for explicit instantiations that doesn't
-prevent users from performing their own explicit instantiations: put
-each explicit instantiation in its own object file. (Different
-solutions might be necessary for Unix DSOs or MS-Windows DLLs.) On
-some platforms, library implementors might not need to do anything
-special: the "undefined behavior" that results from having two
-different explicit instantiations might be harmless.</p>
-
-<p><b>Proposed resolution:</b></p>
- <p>Append to 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> paragraph 1: </p>
- <blockquote>
- A program may explicitly instantiate any templates in the standard
- library only if the declaration depends on the name of a user-defined
- type of external linkage and the instantiation meets the standard library
- requirements for the original template.
- </blockquote>
-
-<p><i>[Kona: changed the wording from "a user-defined name" to "the name of
- a user-defined type"]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG considered another possible resolution:</p>
-<blockquote>
- <p>In light of the resolution to core issue 259, no normative changes
- in the library clauses are necessary. Add the following non-normative
- note to the end of 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> paragraph 1:</p>
- <blockquote>
- [<i>Note:</i> A program may explicitly instantiate standard library
- templates, even when an explicit instantiation does not depend on
- a user-defined name. <i>--end note</i>]
- </blockquote>
-</blockquote>
-
-<p>The LWG rejected this because it was believed that it would make
- it unnecessarily difficult for library implementors to write
- high-quality implementations. A program may not include an
- explicit instantiation of the same template, for the same template
- arguments, in two different translation units. If users are
- allowed to provide explicit instantiations of Standard Library
- templates for built-in types, then library implementors aren't,
- at least not without nonportable tricks.</p>
-
-<p>The most serious problem is a class template that has writeable
- static member variables. Unfortunately, such class templates are
- important and, in existing Standard Library implementations, are
- often explicitly specialized by library implementors: locale facets,
- which have a writeable static member variable <tt>id</tt>. If a
- user's explicit instantiation collided with the implementations
- explicit instantiation, iostream initialization could cause locales
- to be constructed in an inconsistent state.</p>
-
-<p>One proposed implementation technique was for Standard Library
- implementors to provide explicit instantiations in separate object
- files, so that they would not be picked up by the linker when the
- user also provides an explicit instantiation. However, this
- technique only applies for Standard Library implementations that
- are packaged as static archives. Most Standard Library
- implementations nowadays are packaged as dynamic libraries, so this
- technique would not apply.</p>
-
-<p>The Committee is now considering standardization of dynamic
- linking. If there are such changes in the future, it may be
- appropriate to revisit this issue later.</p>
-<hr>
-<a name="122"><h3>122.&nbsp;streambuf/wstreambuf description should not say they are specializations</h3></a><p><b>Section:</b>&nbsp;27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>Section 27.5.2 describes the streambuf classes this way: </p>
-
-<blockquote>
-
-<p>The class streambuf is a specialization of the template class basic_streambuf
-specialized for the type char. </p>
-
-<p>The class wstreambuf is a specialization of the template class basic_streambuf
-specialized for the type wchar_t. </p>
-
-</blockquote>
-
-<p>This implies that these classes must be template specializations, not typedefs. </p>
-
-<p>It doesn't seem this was intended, since Section 27.5 has them declared as typedefs. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> paragraphs 2 and 3 (the above two
-sentences). </p>
-<p><b>Rationale:</b></p>
-<p>The <tt>streambuf</tt> synopsis already has a declaration for the
-typedefs and that is sufficient. </p>
-<hr>
-<a name="123"><h3>123.&nbsp;Should valarray helper arrays fill functions be const?</h3></a><p><b>Section:</b>&nbsp;26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a>, 26.5.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.fill"> [lib.gslice.array.fill]</a>, 26.5.8.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.fill"> [lib.mask.array.fill]</a>, 26.5.9.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.fill"> [lib.indirect.array.fill]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998 </p>
-<p>One of the operator= in the valarray helper arrays is const and one
-is not. For example, look at slice_array. This operator= in Section
-26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a> is const: </p>
-
-<p>&nbsp;&nbsp;&nbsp; <tt>void operator=(const valarray&lt;T&gt;&amp;) const;</tt> </p>
-
-<p>but this one in Section 26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a> is not: </p>
-
-<p>&nbsp;&nbsp;&nbsp; <tt>void operator=(const T&amp;); </tt></p>
-
-<p>The description of the semantics for these two functions is similar. </p>
-<p><b>Proposed resolution:</b></p>
-
-<p>26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a> Template class slice_array</p>
-<blockquote>
-
- <p>In the class template definition for slice_array, replace the member
- function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>with</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a> slice_array fill function</p>
-<blockquote>
-
- <p>Change the function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>to</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a> Template class gslice_array</p>
-<blockquote>
-
- <p>In the class template definition for gslice_array, replace the member
- function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>with</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.fill"> [lib.gslice.array.fill]</a> gslice_array fill function</p>
-<blockquote>
-
- <p>Change the function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>to</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a> Template class mask_array</p>
-<blockquote>
-
- <p>In the class template definition for mask_array, replace the member
- function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>with</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.8.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.fill"> [lib.mask.array.fill]</a> mask_array fill function</p>
-<blockquote>
-
- <p>Change the function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>to</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a> Template class indirect_array</p>
-<blockquote>
-
- <p>In the class template definition for indirect_array, replace the member
- function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>with</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-<p>26.5.9.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.fill"> [lib.indirect.array.fill]</a> indirect_array fill function</p>
-<blockquote>
-
- <p>Change the function declaration</p>
- <pre> void operator=(const T&amp;);
- </pre>
- <p>to</p>
- <pre> void operator=(const T&amp;) const;
- </pre>
-</blockquote>
-
-
-<p><i>[Redmond: Robert provided wording.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>There's no good reason for one version of operator= being const and
-another one not. Because of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, this now
-matters: these functions are now callable in more circumstances. In
-many existing implementations, both versions are already const.</p>
-<hr>
-<a name="124"><h3>124.&nbsp;ctype_byname&lt;charT&gt;::do_scan_is &amp; do_scan_not return type should be const charT*</h3></a><p><b>Section:</b>&nbsp;22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>In Section 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a>
-ctype_byname&lt;charT&gt;::do_scan_is() and do_scan_not() are declared
-to return a const char* not a const charT*. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change Section 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a> <tt>do_scan_is()</tt> and
-<tt>do_scan_not()</tt> to return a <tt> const
-charT*</tt>. </p>
-<hr>
-<a name="125"><h3>125.&nbsp;valarray&lt;T&gt;::operator!() return type is inconsistent</h3></a><p><b>Section:</b>&nbsp;26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>In Section 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> valarray&lt;T&gt;::operator!() is
-declared to return a valarray&lt;T&gt;, but in Section <font color="red">26.3.2.5</font> it is declared to return a valarray&lt;bool&gt;. The
-latter appears to be correct. </p>
-<p><b>Proposed resolution:</b></p>
-<p>Change in Section 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> the declaration of
-<tt>operator!()</tt> so that the return type is
-<tt>valarray&lt;bool&gt;</tt>. </p>
-<hr>
-<a name="126"><h3>126.&nbsp;typos in Effects clause of ctype::do_narrow()</h3></a><p><b>Section:</b>&nbsp;22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;15 Dec 1998</p>
-<p>Typos in 22.2.1.1.2 need to be fixed.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In Section 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> change: </p>
-
-<pre> do_widen(do_narrow(c),0) == c</pre>
-
-<p>to:</p>
-
-<pre> do_widen(do_narrow(c,0)) == c</pre>
-
-<p>and change:</p>
-
-<pre> (is(M,c) || !ctc.is(M, do_narrow(c),dfault) )</pre>
-
-<p>to:</p>
-
-<pre> (is(M,c) || !ctc.is(M, do_narrow(c,dfault)) )</pre>
-<hr>
-<a name="127"><h3>127.&nbsp;auto_ptr&lt;&gt; conversion issues</h3></a><p><b>Section:</b>&nbsp;20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Greg Colvin&nbsp; <b>Date:</b>&nbsp;17 Feb 1999</p>
-<p>There are two problems with the current <tt>auto_ptr</tt> wording
-in the standard: </p>
-
-<p>First, the <tt>auto_ptr_ref</tt> definition cannot be nested
-because <tt>auto_ptr&lt;Derived&gt;::auto_ptr_ref</tt> is unrelated to
-<tt>auto_ptr&lt;Base&gt;::auto_ptr_ref</tt>. <i>Also submitted by
-Nathan Myers, with the same proposed resolution.</i></p>
-
-<p>Second, there is no <tt>auto_ptr</tt> assignment operator taking an
-<tt>auto_ptr_ref</tt> argument. </p>
-
-<p>I have discussed these problems with my proposal coauthor, Bill
-Gibbons, and with some compiler and library implementors, and we
-believe that these problems are not desired or desirable implications
-of the standard. </p>
-
-<p>25 Aug 1999: The proposed resolution now reflects changes suggested
-by Dave Abrahams, with Greg Colvin's concurrence; 1) changed
-"assignment operator" to "public assignment
-operator", 2) changed effects to specify use of release(), 3)
-made the conversion to auto_ptr_ref const. </p>
-
-<p>2 Feb 2000: Lisa Lippincott comments: [The resolution of] this issue
-states that the conversion from auto_ptr to auto_ptr_ref should
-be const. This is not acceptable, because it would allow
-initialization and assignment from _any_ const auto_ptr! It also
-introduces an implementation difficulty in writing this conversion
-function -- namely, somewhere along the line, a const_cast will be
-necessary to remove that const so that release() may be called. This
-may result in undefined behavior [7.1.5.1/4]. The conversion
-operator does not have to be const, because a non-const implicit
-object parameter may be bound to an rvalue [13.3.3.1.4/3]
-[13.3.1/5]. </p>
-
- <p>Tokyo: The LWG removed the following from the proposed resolution:</p>
-
- <p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, and 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a>,
- paragraph 2, make the conversion to auto_ptr_ref const:</p>
- <blockquote>
- <pre>template&lt;class Y&gt; operator auto_ptr_ref&lt;Y&gt;() const throw();</pre>
- </blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, move
-the <tt>auto_ptr_ref</tt> definition to namespace scope.</p>
-
-<p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, add
-a public assignment operator to the <tt>auto_ptr</tt> definition: </p>
-
-<blockquote>
- <pre>auto_ptr&amp; operator=(auto_ptr_ref&lt;X&gt; r) throw();</pre>
-</blockquote>
-
-<p>Also add the assignment operator to 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a>: </p>
-
-<blockquote>
- <pre>auto_ptr&amp; operator=(auto_ptr_ref&lt;X&gt; r) throw()</pre>
-
- <b>Effects:</b> Calls <tt>reset(p.release())</tt> for the <tt>auto_ptr
- p</tt> that <tt>r</tt> holds a reference to.<br>
- <b>Returns: </b><tt>*this</tt>.
-
-</blockquote>
-<hr>
-<a name="129"><h3>129.&nbsp;Need error indication from seekp() and seekg()</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, 27.6.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.seeks"> [lib.ostream.seeks]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;22 Feb 1999</p>
-<p>Currently, the standard does not specify how seekg() and seekp()
-indicate failure. They are not required to set failbit, and they can't
-return an error indication because they must return *this, i.e. the
-stream. Hence, it is undefined what happens if they fail. And they
-<i>can</i> fail, for instance, when a file stream is disconnected from the
-underlying file (is_open()==false) or when a wide character file
-stream must perform a state-dependent code conversion, etc. </p>
-
-<p>The stream functions seekg() and seekp() should set failbit in the
-stream state in case of failure.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to the Effects: clause of&nbsp; seekg() in
-27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> and to the Effects: clause of seekp() in
-27.6.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.seeks"> [lib.ostream.seeks]</a>: </p>
-
-<blockquote>
- <p>In case of failure, the function calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>).
- </p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Setting failbit is the usual error reporting mechanism for streams</p>
-<hr>
-<a name="130"><h3>130.&nbsp;Return type of container::erase(iterator) differs for associative containers</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;2 Mar 1999</p>
-<p>Table 67 (23.1.1) says that container::erase(iterator) returns an
-iterator. Table 69 (23.1.2) says that in addition to this requirement,
-associative containers also say that container::erase(iterator)
-returns void. That's not an addition; it's a change to the
-requirements, which has the effect of making associative containers
-fail to meet the requirements for containers.</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>
-In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in Table 69 Associative container
-requirements, change the return type of <tt>a.erase(q)</tt> from
-<tt>void</tt> to <tt>iterator</tt>. Change the
-assertion/not/pre/post-condition from "erases the element pointed to
-by <tt>q</tt>" to "erases the element pointed to by <tt>q</tt>.
-Returns an iterator pointing to the element immediately following q
-prior to the element being erased. If no such element exists, a.end()
-is returned."
-</p>
-
-<p>
-In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in Table 69 Associative container
-requirements, change the return type of <tt>a.erase(q1, q2)</tt>
-from <tt>void</tt> to <tt>iterator</tt>. Change the
-assertion/not/pre/post-condition from "erases the elements in the
-range <tt>[q1, q2)</tt>" to "erases the elements in the range <tt>[q1,
-q2)</tt>. Returns q2."
-</p>
-
-<p>
-In 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, in the <tt>map</tt> class synopsis; and
-in 23.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multimap"> [lib.multimap]</a>, in the <tt>multimap</tt> class synopsis; and
-in 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a>, in the <tt>set</tt> class synopsis; and
-in 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a>, in the <tt>multiset</tt> class synopsis:
-change the signature of the first <tt>erase</tt> overload to
-</p>
-<pre> iterator erase(iterator position);
-</pre>
-<p>and change the signature of the third <tt>erase</tt> overload to</p>
-<pre> iterator erase(iterator first, iterator last);
-</pre>
-
-
-<p><i>[Pre-Kona: reopened at the request of Howard Hinnant]</i></p>
-
-<p><i>[Post-Kona: the LWG agrees the return type should be
-<tt>iterator</tt>, not <tt>void</tt>. (Alex Stepanov agrees too.)
-Matt provided wording.]</i></p>
-
-<p><i>[
- Sydney: the proposed wording went in the right direction, but it
- wasn't good enough. We want to return an iterator from the range form
- of erase as well as the single-iterator form. Also, the wording is
- slightly different from the wording we have for sequences; there's no
- good reason for having a difference. Matt provided new wording,
- which we will review at the next meeting.
-]</i></p>
-
-<hr>
-<a name="132"><h3>132.&nbsp;list::resize description uses random access iterators</h3></a><p><b>Section:</b>&nbsp;23.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.capacity"> [lib.deque.capacity]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>The description reads:</p>
-
-<p>-1- Effects:</p>
-
-<pre> if (sz &gt; size())
- insert(end(), sz-size(), c);
- else if (sz &lt; size())
- erase(begin()+sz, end());
- else
- ; // do nothing</pre>
-
-<p>Obviously list::resize should not be specified in terms of random access iterators.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 23.2.2.2 paragraph 1 to:</p>
-
-<p>Effects:</p>
-
-<pre> if (sz &gt; size())
- insert(end(), sz-size(), c);
- else if (sz &lt; size())
- {
- iterator i = begin();
- advance(i, sz);
- erase(i, end());
- }</pre>
-
-<p><i>[Dublin: The LWG asked Howard to discuss exception safety offline
-with David Abrahams. They had a discussion and believe there is
-no issue of exception safety with the proposed resolution.]</i></p>
-<hr>
-<a name="133"><h3>133.&nbsp;map missing get_allocator()</h3></a><p><b>Section:</b>&nbsp;23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>The title says it all.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Insert in 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, paragraph 2,
-after operator= in the map declaration:</p>
-
-<pre> allocator_type get_allocator() const;</pre>
-<hr>
-<a name="134"><h3>134.&nbsp;vector constructors over specified</h3></a><p><b>Section:</b>&nbsp;23.2.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.queue"> [lib.queue]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>The complexity description says: "It does at most 2N calls to the copy constructor
-of T and logN reallocations if they are just input iterators ...".</p>
-
-<p>This appears to be overly restrictive, dictating the precise memory/performance
-tradeoff for the implementor.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 23.2.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.queue"> [lib.queue]</a>, paragraph 1 to:</p>
-
-<p>-1- Complexity: The constructor template &lt;class
-InputIterator&gt; vector(InputIterator first, InputIterator last)
-makes only N calls to the copy constructor of T (where N is the
-distance between first and last) and no reallocations if iterators
-first and last are of forward, bidirectional, or random access
-categories. It makes order N calls to the copy constructor of T and
-order logN reallocations if they are just input iterators.
-</p>
-<p><b>Rationale:</b></p>
-<p>"at most 2N calls" is correct only if the growth factor
-is greater than or equal to 2.
-</p>
-<hr>
-<a name="136"><h3>136.&nbsp;seekp, seekg setting wrong streams?</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;6 Mar 1999</p>
-<p>I may be misunderstanding the intent, but should not seekg set only
-the input stream and seekp set only the output stream? The description
-seems to say that each should set both input and output streams. If
-that's really the intent, I withdraw this proposal.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In section 27.6.1.3 change:</p>
-
-<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type pos);
-Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos). </pre>
-
-<p>To:</p>
-
-<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(pos_type pos);
-Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos, ios_base::in). </pre>
-
-<p>In section 27.6.1.3 change:</p>
-
-<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type&amp; off, ios_base::seekdir dir);
-Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir). </pre>
-
-<p>To:</p>
-
-<pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type&amp; off, ios_base::seekdir dir);
-Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir, ios_base::in). </pre>
-
-<p>In section 27.6.2.4, paragraph 2 change:</p>
-
-<pre>-2- Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos). </pre>
-
-<p>To:</p>
-
-<pre>-2- Effects: If fail() != true, executes rdbuf()-&gt;pubseekpos(pos, ios_base::out). </pre>
-
-<p>In section 27.6.2.4, paragraph 4 change:</p>
-
-<pre>-4- Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir). </pre>
-
-<p>To:</p>
-
-<pre>-4- Effects: If fail() != true, executes rdbuf()-&gt;pubseekoff(off, dir, ios_base::out). </pre>
-
-<p><i>[Dublin: Dietmar Kühl thinks this is probably correct, but would
-like the opinion of more iostream experts before taking action.]</i></p>
-
-<p><i>[Tokyo: Reviewed by the LWG. PJP noted that although his docs are
-incorrect, his implementation already implements the Proposed
-Resolution.]</i></p>
-
-<p><i>[Post-Tokyo: Matt Austern comments:<br>
-Is it a problem with basic_istream and basic_ostream, or is it a problem
-with basic_stringbuf?
-We could resolve the issue either by changing basic_istream and
-basic_ostream, or by changing basic_stringbuf. I prefer the latter
-change (or maybe both changes): I don't see any reason for the standard to
-require that std::stringbuf s(std::string("foo"), std::ios_base::in);
-s.pubseekoff(0, std::ios_base::beg); must fail.<br>
-This requirement is a bit weird. There's no similar requirement
-for basic_streambuf&lt;&gt;::seekpos, or for basic_filebuf&lt;&gt;::seekoff or
-basic_filebuf&lt;&gt;::seekpos.]</i></p>
-<hr>
-<a name="137"><h3>137.&nbsp;Do use_facet and has_facet look in the global locale?</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;17 Mar 1999</p>
-<p>Section 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> says:</p>
-
-<p>-4- In the call to use_facet&lt;Facet&gt;(loc), the type argument
-chooses a facet, making available all members of the named type. If
-Facet is not present in a locale (or, failing that, in the global
-locale), it throws the standard exception bad_cast. A C++ program can
-check if a locale implements a particular facet with the template
-function has_facet&lt;Facet&gt;(). </p>
-
-<p>This contradicts the specification given in section
-22.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.global.templates"> [lib.locale.global.templates]</a>:
-<br><br>
-template &lt;class&nbsp; Facet&gt; const&nbsp; Facet&amp; use_facet(const
-locale&amp;&nbsp; loc); <br>
-<br>
--1- Get a reference to a facet of a locale. <br>
--2- Returns: a reference to the corresponding facet of loc, if present. <br>
--3- Throws: bad_cast if has_facet&lt;Facet&gt;(loc) is false. <br>
--4- Notes: The reference returned remains valid at least as long as any copy of loc exists
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the phrase "(or, failing that, in the global locale)"
-from section 22.1.1. </p>
-<p><b>Rationale:</b></p>
-<p>Needed for consistency with the way locales are handled elsewhere
-in the standard.</p>
-<hr>
-<a name="139"><h3>139.&nbsp;Optional sequence operation table description unclear</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;30 Mar 1999</p>
-<p>The sentence introducing the Optional sequence operation table
-(23.1.1 paragraph 12) has two problems:</p>
-
-<p>A. It says ``The operations in table 68 are provided only for the containers for which
-they take constant time.''<br>
-<br>
-That could be interpreted in two ways, one of them being ``Even though table 68 shows
-particular operations as being provided, implementations are free to omit them if they
-cannot implement them in constant time.''<br>
-<br>
-B. That paragraph says nothing about amortized constant time, and it should.&nbsp;</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace the wording in 23.1.1 paragraph 12&nbsp; which begins ``The operations in table 68 are provided only..."
-with:</p>
-
-<blockquote>
- <p>Table 68 lists sequence operations that are provided for some types of sequential
- containers but not others. An implementation shall provide these operations for all
- container types shown in the ``container'' column, and shall implement them so as to take
- amortized constant time.</p>
-</blockquote>
-<hr>
-<a name="141"><h3>141.&nbsp;basic_string::find_last_of, find_last_not_of say pos instead of xpos</h3></a><p><b>Section:</b>&nbsp;21.3.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::find.last.of"> [lib.string::find.last.of]</a>, 21.3.6.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::find.last.not.of"> [lib.string::find.last.not.of]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Arch Robison&nbsp; <b>Date:</b>&nbsp;28 Apr 1999</p>
-<p>Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1 surely have misprints where they
-say:<br>
-<br>
-&#8212; <tt>xpos &lt;= pos</tt> and <tt>pos &lt; size();</tt></p>
-
-<p>Surely the document meant to say ``<tt>xpos &lt; size()</tt>'' in both places.</p>
-
-<p><i>[Judy Ward also sent in this issue for 21.3.6.4 with the same
-proposed resolution.]</i></p>
-<p><b>Proposed resolution:</b></p>
-<p>Change Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1, the line which says:<br>
-<br>
-&#8212; <tt>xpos &lt;= pos</tt> and <tt>pos &lt; size();<br>
-<br>
-</tt>to:<br>
-<tt><br>
-</tt>&#8212; <tt>xpos &lt;= pos</tt> and <tt>xpos &lt; size();</tt></p>
-<hr>
-<a name="142"><h3>142.&nbsp;lexicographical_compare complexity wrong</h3></a><p><b>Section:</b>&nbsp;25.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.lex.comparison"> [lib.alg.lex.comparison]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;20 Jun 1999</p>
-<p>The lexicographical_compare complexity is specified as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; "At most min((last1 - first1), (last2 - first2))
-applications of the corresponding comparison."<br>
-<br>
-The best I can do is twice that expensive.</p>
-
-<p>Nicolai Josuttis comments in lib-6862: You mean, to check for
-equality you have to check both &lt; and &gt;? Yes, IMO you are
-right! (and Matt states this complexity in his book)</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.lex.comparison"> [lib.alg.lex.comparison]</a> complexity to:</p>
- <blockquote>
- At most <tt>2*min((last1 - first1), (last2 - first2))</tt>
- applications of the corresponding comparison.
- </blockquote>
-
-<p>Change the example at the end of paragraph 3 to read:</p>
- <blockquote>
- [Example:<br>
- <br>
- &nbsp;&nbsp;&nbsp; for ( ; first1 != last1 &amp;&amp; first2 != last2 ;
- ++first1, ++first2) {<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (*first1 &lt; *first2) return true;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (*first2 &lt; *first1) return false;<br>
- &nbsp;&nbsp;&nbsp; }<br>
- &nbsp;&nbsp;&nbsp; return first1 == last1 &amp;&amp; first2 != last2;<br>
- &nbsp;&nbsp;&nbsp;<br>
- --end example]
- </blockquote>
-<hr>
-<a name="144"><h3>144.&nbsp;Deque constructor complexity wrong </h3></a><p><b>Section:</b>&nbsp;23.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.cons"> [lib.array.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Herb Sutter&nbsp; <b>Date:</b>&nbsp;9 May 1999</p>
-<p>In 23.2.1.1 paragraph 6, the deque ctor that takes an iterator range appears
-to have complexity requirements which are incorrect, and which contradict the
-complexity requirements for insert(). I suspect that the text in question,
-below, was taken from vector:</p>
-<blockquote>
- <p>Complexity: If the iterators first and last are forward iterators,
- bidirectional iterators, or random access iterators the constructor makes only
- N calls to the copy constructor, and performs no reallocations, where N is
- last - first.</p>
-</blockquote>
-<p>The word "reallocations" does not really apply to deque. Further,
-all of the following appears to be spurious:</p>
-<blockquote>
- <p>It makes at most 2N calls to the copy constructor of T and log N
- reallocations if they are input iterators.1)</p>
- <p>1) The complexity is greater in the case of input iterators because each
- element must be added individually: it is impossible to determine the distance
- between first abd last before doing the copying.</p>
-</blockquote>
-<p>This makes perfect sense for vector, but not for deque. Why should deque gain
-an efficiency advantage from knowing in advance the number of elements to
-insert?</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.2.1.1 paragraph 6, replace the Complexity description, including the
-footnote, with the following text (which also corrects the "abd"
-typo):</p>
-<blockquote>
- <p>Complexity: Makes last - first calls to the copy constructor of T.</p>
-</blockquote>
-<hr>
-<a name="146"><h3>146.&nbsp;complex&lt;T&gt; Inserter and Extractor need sentries</h3></a><p><b>Section:</b>&nbsp;26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;12 May 1999</p>
-<p>The <u> extractor</u> for complex numbers is specified as:&nbsp;</p>
-
-<blockquote>
-
-<p> template&lt;class T, class charT, class traits&gt;&nbsp;<br>
- basic_istream&lt;charT, traits&gt;&amp;&nbsp;<br>
- operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, complex&lt;T&gt;&amp; x);<br>
-&nbsp;<br>
-Effects: Extracts a complex number x of the form: u, (u), or (u,v),
-where u is the real part and v is the imaginary part
-(lib.istream.formatted).&nbsp;<br>
-Requires: The input values be convertible to T. If bad input is
-encountered, calls is.setstate(ios::failbit) (which may throw
-ios::failure (lib.iostate.flags).&nbsp;<br>
-Returns: is .</p>
-
-</blockquote>
-<p>Is it intended that the extractor for complex numbers does not skip
-whitespace, unlike all other extractors in the standard library do?
-Shouldn't a sentry be used?&nbsp;<br>
-<br>
-The <u>inserter</u> for complex numbers is specified as:</p>
-
-<blockquote>
-
-<p> template&lt;class T, class charT, class traits&gt;&nbsp;<br>
- basic_ostream&lt;charT, traits&gt;&amp;&nbsp;<br>
- operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; o, const complex&lt;T&gt;&amp; x);<br>
-<br>
-Effects: inserts the complex number x onto the stream o as if it were implemented as follows:<br>
-<br>
- template&lt;class T, class charT, class traits&gt;&nbsp;<br>
- basic_ostream&lt;charT, traits&gt;&amp;&nbsp;<br>
- operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; o, const complex&lt;T&gt;&amp; x)&nbsp;<br>
- {&nbsp;<br>
- basic_ostringstream&lt;charT, traits&gt; s;&nbsp;<br>
- s.flags(o.flags());&nbsp;<br>
- s.imbue(o.getloc());&nbsp;<br>
- s.precision(o.precision());&nbsp;<br>
- s &lt;&lt; '(' &lt;&lt; x.real() &lt;&lt; "," &lt;&lt; x.imag() &lt;&lt; ')';&nbsp;<br>
- return o &lt;&lt; s.str();&nbsp;<br>
- }</p>
-
-</blockquote>
-
-<p>Is it intended that the inserter for complex numbers ignores the
-field width and does not do any padding? If, with the suggested
-implementation above, the field width were set in the stream then the
-opening parentheses would be adjusted, but the rest not, because the
-field width is reset to zero after each insertion.</p>
-
-<p>I think that both operations should use sentries, for sake of
-consistency with the other inserters and extractors in the
-library. Regarding the issue of padding in the inserter, I don't know
-what the intent was.&nbsp;</p>
-<p><b>Proposed resolution:</b></p>
-<p>After 26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a> paragraph 14 (operator&gt;&gt;), add a
-Notes clause:</p>
-
-<blockquote>
-
-<p>Notes: This extraction is performed as a series of simpler
-extractions. Therefore, the skipping of whitespace is specified to be the
-same for each of the simpler extractions.</p>
-
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>For extractors, the note is added to make it clear that skipping whitespace
-follows an "all-or-none" rule.</p>
-
-<p>For inserters, the LWG believes there is no defect; the standard is correct
-as written.</p>
-<hr>
-<a name="147"><h3>147.&nbsp;Library Intro refers to global functions that aren't global</h3></a><p><b>Section:</b>&nbsp;17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Lois Goldthwaite&nbsp; <b>Date:</b>&nbsp;4 Jun 1999</p>
-<p>The library had many global functions until 17.4.1.1 [lib.contents]
-paragraph 2 was added: </p>
-
-<blockquote>
-
-<p>All library entities except macros, operator new and operator
-delete are defined within the namespace std or namespaces nested
-within namespace std. </p>
-
-</blockquote>
-
-<p>It appears "global function" was never updated in the following: </p>
-
-<blockquote>
-
-<p>17.4.4.3 - Global functions [lib.global.functions]<br>
-<br>
--1- It is unspecified whether any global functions in the C++ Standard
-Library are defined as inline (dcl.fct.spec).<br>
-<br>
--2- A call to a global function signature described in Clauses
-lib.language.support through lib.input.output behaves the same as if
-the implementation declares no additional global function
-signatures.*<br>
-<br>
- [Footnote: A valid C++ program always calls the expected library
- global function. An implementation may also define additional
- global functions that would otherwise not be called by a valid C++
- program. --- end footnote]<br>
-<br>
--3- A global function cannot be declared by the implementation as
-taking additional default arguments.&nbsp;<br>
-<br>
-17.4.4.4 - Member functions [lib.member.functions]<br>
-<br>
--2- An implementation can declare additional non-virtual member
-function signatures within a class: </p>
-
- <blockquote>
-
-<p>-- by adding arguments with default values to a member function
-signature; The same latitude does not extend to the implementation of
-virtual or global functions, however. </p>
-
- </blockquote>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p> Change "global" to "global or non-member" in:</p>
-<blockquote>
- <p>17.4.4.3 [lib.global.functions] section title,<br>
- 17.4.4.3 [lib.global.functions] para 1,<br>
- 17.4.4.3 [lib.global.functions] para 2 in 2 places plus 2
- places in the footnote,<br>
- 17.4.4.3 [lib.global.functions] para 3,<br>
- 17.4.4.4 [lib.member.functions] para 2</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>
-Because operator new and delete are global, the proposed resolution
-was changed from "non-member" to "global or non-member.
-</p>
-<hr>
-<a name="148"><h3>148.&nbsp;Functions in the example facet BoolNames should be const</h3></a><p><b>Section:</b>&nbsp;22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Jeremy Siek&nbsp; <b>Date:</b>&nbsp;3 Jun 1999</p>
-<p>In 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 13, the do_truename() and
-do_falsename() functions in the example facet BoolNames should be
-const. The functions they are overriding in
-numpunct_byname&lt;char&gt; are const. </p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 13, insert "const" in
-two places:</p>
-<blockquote>
- <p><tt>string do_truename() const { return "Oui Oui!"; }<br>
- string do_falsename() const { return "Mais Non!"; }</tt></p>
-</blockquote>
-<hr>
-<a name="150"><h3>150.&nbsp;Find_first_of says integer instead of iterator </h3></a><p><b>Section:</b>&nbsp;25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt McClure&nbsp; <b>Date:</b>&nbsp;30 Jun 1999</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a> paragraph 2 from:</p>
-
-<blockquote>
-<p>Returns: The first iterator i in the range [first1, last1) such
-that for some <u>integer</u> j in the range [first2, last2) ...</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>Returns: The first iterator i in the range [first1, last1) such
-that for some iterator j in the range [first2, last2) ...</p>
-</blockquote>
-<hr>
-<a name="151"><h3>151.&nbsp;Can't currently clear() empty container</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Ed Brey&nbsp; <b>Date:</b>&nbsp;21 Jun 1999</p>
-<p>For both sequences and associative containers, a.clear() has the
-semantics of erase(a.begin(),a.end()), which is undefined for an empty
-container since erase(q1,q2) requires that q1 be dereferenceable
-(23.1.1,3 and 23.1.2,7). When the container is empty, a.begin() is
-not dereferenceable.<br>
-<br>
-The requirement that q1 be unconditionally dereferenceable causes many
-operations to be intuitively undefined, of which clearing an empty
-container is probably the most dire.<br>
-<br>
-Since q1 and q2 are only referenced in the range [q1, q2), and [q1,
-q2) is required to be a valid range, stating that q1 and q2 must be
-iterators or certain kinds of iterators is unnecessary.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.1.1, paragraph 3, change:</p>
-<blockquote>
- <p>p and q2 denote valid iterators to a, q <u> and q1</u> denote valid dereferenceable iterators to a, [q1, q2) denotes a valid range</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>p denotes a valid iterator to a, q denotes a valid dereferenceable iterator to a, [q1, q2) denotes a valid range<u>
- in a</u></p>
-</blockquote>
-<p>In 23.1.2, paragraph 7, change:</p>
-<blockquote>
- <p>p and q2 are valid iterators to a, q <u> and q1</u> are valid dereferenceable
- iterators to a, [q1, q2) is a valid range</p>
-</blockquote>
-<p>to</p>
-<blockquote>
- <p>p is a valid iterator to a, q is a valid dereferenceable iterator to a, [q1, q2) is a valid range
- <u>into a</u></p>
-</blockquote>
-<hr>
-<a name="152"><h3>152.&nbsp;Typo in <tt>scan_is()</tt> semantics</h3></a><p><b>Section:</b>&nbsp;22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The semantics of <tt>scan_is()</tt> (paragraphs 4 and 6) is not exactly described
-because there is no function <tt>is()</tt> which only takes a character as
-argument. Also, in the effects clause (paragraph 3), the semantic is also kept
-vague.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> paragraphs 4 and 6, change the returns
-clause from:</p>
-<blockquote>
- <p>"... such that <tt>is(*p)</tt>
-would..."</p>
-</blockquote>
-<p>to:&nbsp; "... such that <tt>is(m, *p)</tt>
- would...."</p>
-<hr>
-<a name="153"><h3>153.&nbsp;Typo in <tt>narrow()</tt> semantics</h3></a><p><b>Section:</b>&nbsp;22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The description of the array version of <tt>narrow()</tt> (in
-paragraph 11) is flawed: There is no member <tt>do_narrow()</tt> which
-takes only three arguments because in addition to the range a default
-character is needed.</p>
-
-<p>Additionally, for both <tt>widen</tt> and <tt>narrow</tt> we have
-two signatures followed by a <b>Returns</b> clause that only addresses
-one of them.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>
-paragraph 10 from:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
-
-<p>to:</p>
-<p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to),
-respectively.</p>
-
-<p>Change 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> paragraph 10 and 11 from:</p>
-<pre> char narrow(char c, char /*dfault*/) const;
- const char* narrow(const char* low, const char* high,
- char /*dfault*/, char* to) const;</pre>
-<pre> Returns: do_narrow(low, high, to).</pre>
-<p>to:</p>
-<pre> char narrow(char c, char dfault) const;
- const char* narrow(const char* low, const char* high,
- char dfault, char* to) const;</pre>
-<pre> Returns: do_narrow(c, dfault) or
- do_narrow(low, high, dfault, to), respectively.</pre>
-
-<p><i>[Kona: 1) the problem occurs in additional places, 2) a user
-defined version could be different.]</i></p>
-
-<p><i>[Post-Tokyo: Dietmar provided the above wording at the request of
-the LWG. He could find no other places the problem occurred. He
-asks for clarification of the Kona "a user defined
-version..." comment above. Perhaps it was a circuitous way of
-saying "dfault" needed to be uncommented?]</i></p>
-
-<p><i>[Post-Toronto: the issues list maintainer has merged in the
-proposed resolution from issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#207">207</a>, which addresses the
-same paragraphs.]</i></p>
-<hr>
-<a name="154"><h3>154.&nbsp;Missing <tt>double</tt> specifier for <tt>do_get()</tt>
-</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The table in paragraph 7 for the length modifier does not list the length
-modifier <tt>l</tt> to be applied if the type is <tt>double</tt>. Thus, the
-standard asks the implementation to do undefined things when using <tt>scanf()</tt>
-(the missing length modifier for <tt>scanf()</tt> when scanning <tt>double</tt>s
-is actually a problem I found quite often in production code, too).</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, paragraph 7, add a row in the Length
-Modifier table to say that for <tt>double</tt> a length modifier
-<tt>l</tt> is to be used.</p>
-<p><b>Rationale:</b></p>
-<p>The standard makes an embarrassing beginner's mistake.</p>
-<hr>
-<a name="155"><h3>155.&nbsp;Typo in naming the class defining the class <tt>Init</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>There are conflicting statements about where the class
-<tt>Init</tt> is defined. According to 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> paragraph 2
-it is defined as <tt>basic_ios::Init</tt>, according to 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> it is defined as <tt>ios_base::Init</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> paragraph 2 from
-"<tt>basic_ios::Init"</tt> to
-"<tt>ios_base::Init"</tt>.</p>
-<p><b>Rationale:</b></p>
-<p>Although not strictly wrong, the standard was misleading enough to warrant
-the change.</p>
-<hr>
-<a name="156"><h3>156.&nbsp;Typo in <tt>imbue()</tt> description</h3></a><p><b>Section:</b>&nbsp;27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>There is a small discrepancy between the declarations of
-<tt>imbue()</tt>: in 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> the argument is passed as
-<tt>locale const&amp;</tt> (correct), in 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> it
-is passed as <tt>locale const</tt> (wrong).</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> change the <tt>imbue</tt> argument
-from "<tt>locale const" to "locale
-const&amp;".</tt></p>
-<hr>
-<a name="158"><h3>158.&nbsp;Underspecified semantics for <tt>setbuf()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The default behavior of <tt>setbuf()</tt> is described only for the
-situation that <tt>gptr() != 0 &amp;&amp; gptr() != egptr()</tt>:
-namely to do nothing. What has to be done in other situations&nbsp;
-is not described although there is actually only one reasonable
-approach, namely to do nothing, too.</p>
-
-<p>Since changing the buffer would almost certainly mess up most
-buffer management of derived classes unless these classes do it
-themselves, the default behavior of <tt>setbuf()</tt> should always be
-to do nothing.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 3, Default behavior,
-to: "Default behavior: Does nothing. Returns this."</p>
-<hr>
-<a name="159"><h3>159.&nbsp;Strange use of <tt>underflow()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.5.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.get"> [lib.streambuf.virt.get]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The description of the meaning of the result of
-<tt>showmanyc()</tt> seems to be rather strange: It uses calls to
-<tt>underflow()</tt>. Using <tt>underflow()</tt> is strange because
-this function only reads the current character but does not extract
-it, <tt>uflow()</tt> would extract the current character. This should
-be fixed to use <tt>sbumpc()</tt> instead.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.5.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.get"> [lib.streambuf.virt.get]</a> paragraph 1,
-<tt>showmanyc()</tt>returns clause, by replacing the word
-"supplied" with the words "extracted from the
-stream".</p>
-<hr>
-<a name="160"><h3>160.&nbsp;Typo: Use of non-existing function <tt>exception()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The paragraph 4 refers to the function <tt>exception()</tt> which
-is not defined. Probably, the referred function is
-<tt>basic_ios&lt;&gt;::exceptions()</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a>, 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, paragraph 1,
-27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, paragraph 3, and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>,
-paragraph 1, change "<tt>exception()" to
-"exceptions()"</tt>.</p>
-
-<p><i>[Note to Editor: "exceptions" with an "s"
-is the correct spelling.]</i></p>
-<hr>
-<a name="161"><h3>161.&nbsp;Typo: <tt>istream_iterator</tt> vs. <tt>istreambuf_iterator</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The note in the second paragraph pretends that the first argument
-is an object of type <tt>istream_iterator</tt>. This is wrong: It is
-an object of type <tt>istreambuf_iterator</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> from:</p>
-<blockquote>
- <p>The first argument provides an object of the istream_iterator class...</p>
-</blockquote>
-<p>to</p>
-<blockquote>
- <p>The first argument provides an object of the istreambuf_iterator class...</p>
-</blockquote>
-<hr>
-<a name="164"><h3>164.&nbsp;do_put() has apparently unused fill argument</h3></a><p><b>Section:</b>&nbsp;22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-<p>In 22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a> the do_put() function is specified
-as taking a fill character as an argument, but the description of the
-function does not say whether the character is used at all and, if so,
-in which way. The same holds for any format control parameters that
-are accessible through the ios_base&amp; argument, such as the
-adjustment or the field width. Is strftime() supposed to use the fill
-character in any way? In any case, the specification of
-time_put.do_put() looks inconsistent to me.<br> <br> Is the
-signature of do_put() wrong, or is the effects clause incomplete?</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following note after 22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a>
-paragraph 2:</p>
-<blockquote>
- <p> [Note: the <tt>fill</tt> argument may be used in the implementation-defined formats, or by derivations. A space character is a reasonable default
- for this argument. --end Note]</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The LWG felt that while the normative text was correct,
-users need some guidance on what to pass for the <tt>fill</tt>
-argument since the standard doesn't say how it's used.</p>
-<hr>
-<a name="165"><h3>165.&nbsp;<tt>xsputn()</tt>, <tt>pubsync()</tt> never called by <tt>basic_ostream</tt> members?</h3></a><p><b>Section:</b>&nbsp;27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>Paragraph 2 explicitly states that none of the <tt>basic_ostream</tt>
-functions falling into one of the groups "formatted output functions"
-and "unformatted output functions" calls any stream buffer function
-which might call a virtual function other than <tt>overflow()</tt>. Basically
-this is fine but this implies that <tt>sputn()</tt> (this function would call
-the virtual function <tt>xsputn()</tt>) is never called by any of the standard
-output functions. Is this really intended? At minimum it would be convenient to
-call <tt>xsputn()</tt> for strings... Also, the statement that <tt>overflow()</tt>
-is the only virtual member of <tt>basic_streambuf</tt> called is in conflict
-with the definition of <tt>flush()</tt> which calls <tt>rdbuf()-&gt;pubsync()</tt>
-and thereby the virtual function <tt>sync()</tt> (<tt>flush()</tt> is listed
-under "unformatted output functions").</p>
-<p>In addition, I guess that the sentence starting with "They may use other
-public members of <tt>basic_ostream</tt> ..." probably was intended to
-start with "They may use other public members of <tt>basic_streamuf</tt>..."
-although the problem with the virtual members exists in both cases.</p>
-<p>I see two obvious resolutions:</p>
-<ol>
- <li>state in a footnote that this means that <tt>xsputn()</tt> will never be
- called by any ostream member and that this is intended.</li>
- <li>relax the restriction and allow calling <tt>overflow()</tt> and <tt>xsputn()</tt>.
- Of course, the problem with <tt>flush()</tt> has to be resolved in some way.</li>
-</ol>
-<p><b>Proposed resolution:</b></p>
-<p>Change the last sentence of 27.6.2.1 (lib.ostream) paragraph 2 from:</p>
-<blockquote>
- <p>They may use other public members of basic_ostream except that they do not
- invoke any virtual members of rdbuf() except overflow().</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>They may use other public members of basic_ostream except that they shall
- not invoke any virtual members of rdbuf() except overflow(), xsputn(), and
- sync().</p>
-</blockquote>
-
-<p><i>[Kona: the LWG believes this is a problem. Wish to ask Jerry or
-PJP why the standard is written this way.]</i></p>
-
-<p><i>[Post-Tokyo: Dietmar supplied wording at the request of the
-LWG. He comments: The rules can be made a little bit more specific if
-necessary be explicitly spelling out what virtuals are allowed to be
-called from what functions and eg to state specifically that flush()
-is allowed to call sync() while other functions are not.]</i></p>
-<hr>
-<a name="167"><h3>167.&nbsp;Improper use of <tt>traits_type::length()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>Paragraph 4 states that the length is determined using
-<tt>traits::length(s)</tt>. Unfortunately, this function is not
-defined for example if the character type is <tt>wchar_t</tt> and the
-type of <tt>s</tt> is <tt>char const*</tt>. Similar problems exist if
-the character type is <tt>char</tt> and the type of <tt>s</tt> is
-either <tt>signed char const*</tt> or <tt>unsigned char
-const*</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> paragraph 4 from:</p>
-<blockquote>
- <p>Effects: Behaves like an formatted inserter (as described in
- lib.ostream.formatted.reqmts) of out. After a sentry object is
- constructed it inserts characters. The number of characters starting
- at s to be inserted is traits::length(s). Padding is determined as
- described in lib.facet.num.put.virtuals. The traits::length(s)
- characters starting at s are widened using out.widen
- (lib.basic.ios.members). The widened characters and any required
- padding are inserted into out. Calls width(0).</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>Effects: Behaves like a formatted inserter (as described in
- lib.ostream.formatted.reqmts) of out. After a sentry object is
- constructed it inserts <i>n</i> characters starting at <i>s</i>,
- where <i>n</i> is the number that would be computed as if by:</p>
- <ul>
- <li>traits::length(s) for the overload where the first argument is of
- type basic_ostream&lt;charT, traits&gt;&amp; and the second is
- of type const charT*, and also for the overload where the first
- argument is of type basic_ostream&lt;char, traits&gt;&amp; and
- the second is of type const char*.</li>
- <li>std::char_traits&lt;char&gt;::length(s)
- for the overload where the first argument is of type
- basic_ostream&lt;charT, traits&gt;&amp; and the second is of type
- const char*.</li>
- <li>traits::length(reinterpret_cast&lt;const char*&gt;(s))
- for the other two overloads.</li>
- </ul>
- <p>Padding is determined as described in
- lib.facet.num.put.virtuals. The <i>n</i> characters starting at
- <i>s</i> are widened using out.widen (lib.basic.ios.members). The
- widened characters and any required padding are inserted into
- out. Calls width(0).</p>
-</blockquote>
-
-<p><i>[Santa Cruz: Matt supplied new wording]</i></p>
-
-<p><i>[Kona: changed "where <i>n</i> is" to " where <i>n</i> is the
- number that would be computed as if by"]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>We have five separate cases. In two of them we can use the
-user-supplied traits class without any fuss. In the other three we
-try to use something as close to that user-supplied class as possible.
-In two cases we've got a traits class that's appropriate for
-char and what we've got is a const signed char* or a const
-unsigned char*; that's close enough so we can just use a reinterpret
-cast, and continue to use the user-supplied traits class. Finally,
-there's one case where we just have to give up: where we've got a
-traits class for some arbitrary charT type, and we somehow have to
-deal with a const char*. There's nothing better to do but fall back
-to char_traits&lt;char&gt;</p>
-<hr>
-<a name="168"><h3>168.&nbsp;Typo: formatted vs. unformatted</h3></a><p><b>Section:</b>&nbsp;27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The first paragraph begins with a descriptions what has to be done
-in <i>formatted</i> output functions. Probably this is a typo and the
-paragraph really want to describe unformatted output functions...</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a> paragraph 1, the first and last
-sentences, change the word "formatted" to
-"unformatted":</p>
-<blockquote>
- <p>"Each <b>unformatted </b> output function begins ..."<br>
- "... value specified for the <b>unformatted </b> output
- function."</p>
-</blockquote>
-<hr>
-<a name="169"><h3>169.&nbsp;Bad efficiency of <tt>overflow()</tt> mandated</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>Paragraph 8, Notes, of this section seems to mandate an extremely
-inefficient way of buffer handling for <tt>basic_stringbuf</tt>,
-especially in view of the restriction that <tt>basic_ostream</tt>
-member functions are not allowed to use <tt>xsputn()</tt> (see 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>): For each character to be inserted, a new buffer
-is to be created.</p>
-<p>Of course, the resolution below requires some handling of
-simultaneous input and output since it is no longer possible to update
-<tt>egptr()</tt> whenever <tt>epptr()</tt> is changed. A possible
-solution is to handle this in <tt>underflow()</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> paragraph 8, Notes, insert the words
-"at least" as in the following:</p>
-<blockquote>
- <p>To make a write position available, the function reallocates (or initially
- allocates) an array object with a sufficient number of elements to hold the
- current array object (if any), plus <b>at least</b> one additional write
- position.</p>
-</blockquote>
-<hr>
-<a name="170"><h3>170.&nbsp;Inconsistent definition of <tt>traits_type</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>The classes <tt>basic_stringstream</tt> (27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a>),
-<tt>basic_istringstream</tt> (27.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istringstream"> [lib.istringstream]</a>), and
-<tt>basic_ostringstream</tt> (27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a>) are inconsistent
-in their definition of the type <tt>traits_type</tt>: For
-<tt>istringstream</tt>, this type is defined, for the other two it is
-not. This should be consistent.</p>
-<p><b>Proposed resolution:</b></p>
-<p><b>Proposed resolution:</b></p> <p>To the declarations of
-<tt>basic_ostringstream</tt> (27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a>) and
-<tt>basic_stringstream</tt> (27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a>) add:</p>
-<blockquote>
-<pre>typedef traits traits_type;</pre>
-</blockquote>
-<hr>
-<a name="171"><h3>171.&nbsp;Strange <tt>seekpos()</tt> semantics due to joint position</h3></a><p><b>Section:</b>&nbsp;27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Jul 1999</p>
-<p>Overridden virtual functions, seekpos()</p> <p>In 27.8.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf"> [lib.filebuf]</a> paragraph 3, it is stated that a joint input and
-output position is maintained by <tt>basic_filebuf</tt>. Still, the
-description of <tt>seekpos()</tt> seems to talk about different file
-positions. In particular, it is unclear (at least to me) what is
-supposed to happen to the output buffer (if there is one) if only the
-input position is changed. The standard seems to mandate that the
-output buffer is kept and processed as if there was no positioning of
-the output position (by changing the input position). Of course, this
-can be exactly what you want if the flag <tt>ios_base::ate</tt> is
-set. However, I think, the standard should say something like
-this:</p>
-<ul>
- <li>If <tt>(which &amp; mode) == 0</tt> neither read nor write position is
- changed and the call fails. Otherwise, the joint read and write position is
- altered to correspond to <tt>sp</tt>.</li>
- <li>If there is an output buffer, the output sequences is updated and any
- unshift sequence is written before the position is altered.</li>
- <li>If there is an input buffer, the input sequence is updated after the
- position is altered.</li>
-</ul>
-<p>Plus the appropriate error handling, that is...</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the unnumbered paragraph in 27.8.1.4 (lib.filebuf.virtuals) before
-paragraph 14 from:</p>
-<blockquote>
- <p>pos_type seekpos(pos_type sp, ios_base::openmode = ios_base::in |
- ios_base::out);</p>
- <p>Alters the file position, if possible, to correspond to the position stored
- in sp (as described below).</p>
- <p>- if (which&amp;ios_base::in)!=0, set the file position to sp, then update
- the input sequence</p>
- <p>- if (which&amp;ios_base::out)!=0, then update the output sequence, write
- any unshift sequence, and set the file position to sp.</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>pos_type seekpos(pos_type sp, ios_base::openmode = ios_base::in |
- ios_base::out);</p>
- <p>Alters the file position, if possible, to correspond to the position stored
- in sp (as described below). Altering the file position performs as follows:</p>
- <p>1. if (om &amp; ios_base::out)!=0, then update the output sequence and
- write any unshift sequence;</p>
- <p>2. set the file position to sp;</p>
- <p>3. if (om &amp; ios_base::in)!=0, then update the input sequence;</p>
- <p>where om is the open mode passed to the last call to open(). The operation
- fails if is_open() returns false.</p>
-</blockquote>
-
-<p><i>[Kona: Dietmar is working on a proposed resolution.]</i></p>
-<p><i>[Post-Tokyo: Dietmar supplied the above wording.]</i></p>
-<hr>
-<a name="172"><h3>172.&nbsp;Inconsistent types for <tt>basic_istream::ignore()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Greg Comeau, Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-<p>In 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a> the function
-<tt>ignore()</tt> gets an object of type <tt>streamsize</tt> as first
-argument. However, in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>
-paragraph 23 the first argument is of type <tt>int.</tt></p>
-
-<p>As far as I can see this is not really a contradiction because
-everything is consistent if <tt>streamsize</tt> is typedef to be
-<tt>int</tt>. However, this is almost certainly not what was
-intended. The same thing happened to <tt>basic_filebuf::setbuf()</tt>,
-as described in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#173">173</a>.</p>
-
-<p>Darin Adler also
-submitted this issue, commenting: Either 27.6.1.1 should be modified
-to show a first parameter of type int, or 27.6.1.3 should be modified
-to show a first parameter of type streamsize and use
-numeric_limits&lt;streamsize&gt;::max.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> paragraph 23 and 24, change both uses
-of <tt>int</tt> in the description of <tt>ignore()</tt> to
-<tt>streamsize</tt>.</p>
-<hr>
-<a name="173"><h3>173.&nbsp;Inconsistent types for <tt>basic_filebuf::setbuf()</tt>
-</h3></a><p><b>Section:</b>&nbsp;27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Greg Comeau, Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-
-<p>
-In 27.8.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf"> [lib.filebuf]</a> the function <tt>setbuf()</tt> gets an
-object of type <tt>streamsize</tt> as second argument. However, in
-27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> paragraph 9 the second argument is of type
-<tt>int</tt>.
-</p>
-
-<p>
-As far as I can see this is not really a contradiction because
-everything is consistent if <tt>streamsize</tt> is typedef to be
-<tt>int</tt>. However, this is almost certainly not what was
-intended. The same thing happened to <tt>basic_istream::ignore()</tt>,
-as described in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#172">172</a>.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> paragraph 9, change all uses of
-<tt>int</tt> in the description of <tt>setbuf()</tt> to
-<tt>streamsize</tt>.</p>
-<hr>
-<a name="174"><h3>174.&nbsp;Typo: <tt>OFF_T</tt> vs. <tt>POS_T</tt>
-</h3></a><p><b>Section:</b>&nbsp;D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-<p>According to paragraph 1 of this section, <tt>streampos</tt> is the
-type <tt>OFF_T</tt>, the same type as <tt>streamoff</tt>. However, in
-paragraph 6 the <tt>streampos</tt> gets the type <tt>POS_T</tt></p>
-<p><b>Proposed resolution:</b></p>
-<p>Change D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 1 from "<tt>typedef
-OFF_T streampos;</tt>" to "<tt>typedef POS_T
-streampos;</tt>"</p>
-<hr>
-<a name="175"><h3>175.&nbsp;Ambiguity for <tt>basic_streambuf::pubseekpos()</tt> and a few other functions.</h3></a><p><b>Section:</b>&nbsp;D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-<p>According to paragraph 8 of this section, the methods
-<tt>basic_streambuf::pubseekpos()</tt>,
-<tt>basic_ifstream::open()</tt>, and <tt>basic_ofstream::open</tt>
-"may" be overloaded by a version of this function taking the
-type <tt>ios_base::open_mode</tt> as last argument argument instead of
-<tt>ios_base::openmode</tt> (<tt>ios_base::open_mode</tt> is defined
-in this section to be an alias for one of the integral types). The
-clause specifies, that the last argument has a default argument in
-three cases. However, this generates an ambiguity with the overloaded
-version because now the arguments are absolutely identical if the last
-argument is not specified.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 8, remove the default arguments for
-<tt>basic_streambuf::pubseekpos()</tt>,
-<tt>basic_ifstream::open()</tt>, and
-<tt>basic_ofstream::open().</tt></p>
-<hr>
-<a name="176"><h3>176.&nbsp;<tt>exceptions()</tt> in <tt>ios_base</tt>...?</h3></a><p><b>Section:</b>&nbsp;D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;23 Jul 1999</p>
-<p>The "overload" for the function <tt>exceptions()</tt> in
-paragraph 8 gives the impression that there is another function of
-this function defined in class <tt>ios_base</tt>. However, this is not
-the case. Thus, it is hard to tell how the semantics (paragraph 9) can
-be implemented: "Call the corresponding member function specified
-in clause 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>."</p>
-<p><b>Proposed resolution:</b></p>
-<p>In D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 8, move the declaration of the
-function <tt>exceptions()</tt>into class <tt>basic_ios</tt>.</p>
-<hr>
-<a name="179"><h3>179.&nbsp;Comparison of const_iterators to iterators doesn't work</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;2 Jul 1998</p>
-<p>Currently the following will not compile on two well-known standard
-library implementations:</p>
-
-<blockquote>
- <pre>#include &lt;set&gt;
-using namespace std;
-
-void f(const set&lt;int&gt; &amp;s)
-{
- set&lt;int&gt;::iterator i;
- if (i==s.end()); // s.end() returns a const_iterator
-}</pre>
-</blockquote>
-
-<p>
-The reason this doesn't compile is because operator== was implemented
-as a member function of the nested classes set:iterator and
-set::const_iterator, and there is no conversion from const_iterator to
-iterator. Surprisingly, (s.end() == i) does work, though, because of
-the conversion from iterator to const_iterator.
-</p>
-
-<p>
-I don't see a requirement anywhere in the standard that this must
-work. Should there be one? If so, I think the requirement would need
-to be added to the tables in section 24.1.1. I'm not sure about the
-wording. If this requirement existed in the standard, I would think
-that implementors would have to make the comparison operators
-non-member functions.</p>
-
-<p>This issues was also raised on comp.std.c++ by Darin
-Adler.&nbsp; The example given was:</p>
-
-<blockquote>
- <pre>bool check_equal(std::deque&lt;int&gt;::iterator i,
-std::deque&lt;int&gt;::const_iterator ci)
-{
-return i == ci;
-}</pre>
-</blockquote>
-
-<p>Comment from John Potter:</p>
-<blockquote>
- <p>
- In case nobody has noticed, accepting it will break reverse_iterator.
- </p>
-
- <p>
- The fix is to make the comparison operators templated on two types.
- </p>
-
- <pre> template &lt;class Iterator1, class Iterator2&gt;
- bool operator== (reverse_iterator&lt;Iterator1&gt; const&amp; x,
- reverse_iterator&lt;Iterator2&gt; const&amp; y);
- </pre>
-
- <p>
- Obviously: return x.base() == y.base();
- </p>
-
- <p>
- Currently, no reverse_iterator to const_reverse_iterator compares are
- valid.
- </p>
-
- <p>
- BTW, I think the issue is in support of bad code. Compares should be
- between two iterators of the same type. All std::algorithms require
- the begin and end iterators to be of the same type.
- </p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Insert this paragraph after 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 7:</p>
-<blockquote>
- <p>In the expressions</p>
- <pre> i == j
- i != j
- i &lt; j
- i &lt;= j
- i &gt;= j
- i &gt; j
- i - j
- </pre>
- <p>Where i and j denote objects of a container's iterator type,
- either or both may be replaced by an object of the container's
- const_iterator type referring to the same element with no
- change in semantics.</p>
-</blockquote>
-
-<p><i>[post-Toronto: Judy supplied a proposed resolution saying that
-<tt>iterator</tt> and <tt>const_iterator</tt> could be freely mixed in
-iterator comparison and difference operations.]</i></p>
-
-<p><i>[Redmond: Dave and Howard supplied a new proposed resolution which
-explicitly listed expressions; there was concern that the previous
-proposed resolution was too informal.]</i></p>
-<p><b>Rationale:</b></p>
-<p>
-The LWG believes it is clear that the above wording applies only to
-the nested types <tt>X::iterator</tt> and <tt>X::const_iterator</tt>,
-where <tt>X</tt> is a container. There is no requirement that
-<tt>X::reverse_iterator</tt> and <tt>X::const_reverse_iterator</tt>
-can be mixed. If mixing them is considered important, that's a
-separate issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>.)
-</p>
-<hr>
-<a name="181"><h3>181.&nbsp;make_pair() unintended behavior</h3></a><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;3 Aug 1999</p>
-<p>The claim has surfaced in Usenet that expressions such as<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>make_pair("abc", 3)</tt><br>
-<br>
-are illegal, notwithstanding their use in examples, because template instantiation tries to bind the first template
-parameter to <tt> const char (&amp;)[4]</tt>, which type is uncopyable.<br>
-<br>
-I doubt anyone intended that behavior...
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 20.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utility"> [lib.utility]</a>, paragraph 1 change the following
-declaration of make_pair():</p>
-<blockquote>
- <pre>template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(const T1&amp;, const T2&amp;);</pre>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <pre>template &lt;class T1, class T2&gt; pair&lt;T1,T2&gt; make_pair(T1, T2);</pre>
-</blockquote>
-<p> In 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> paragraph 7 and the line before, change:</p>
-<blockquote>
-<pre>template &lt;class T1, class T2&gt;
-pair&lt;T1, T2&gt; make_pair(const T1&amp; x, const T2&amp; y);</pre>
-</blockquote>
-<p>to:</p>
-<blockquote>
-<pre>template &lt;class T1, class T2&gt;
-pair&lt;T1, T2&gt; make_pair(T1 x, T2 y);</pre>
-</blockquote>
-<p>and add the following footnote to the effects clause:</p>
-<blockquote>
- <p> According to 12.8 [class.copy], an implementation is permitted
- to not perform a copy of an argument, thus avoiding unnecessary
- copies.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Two potential fixes were suggested by Matt Austern and Dietmar
-Kühl, respectively, 1) overloading with array arguments, and 2) use of
-a reference_traits class with a specialization for arrays. Andy
-Koenig suggested changing to pass by value. In discussion, it appeared
-that this was a much smaller change to the standard that the other two
-suggestions, and any efficiency concerns were more than offset by the
-advantages of the solution. Two implementors reported that the
-proposed resolution passed their test suites.</p>
-<hr>
-<a name="182"><h3>182.&nbsp;Ambiguous references to size_t</h3></a><p><b>Section:</b>&nbsp;17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Al Stevens&nbsp; <b>Date:</b>&nbsp;15 Aug 1999</p>
-<p>Many references to <tt> size_t</tt> throughout the document
-omit the <tt> std::</tt> namespace qualification.</p> <p>For
-example, 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 2:</p>
-<blockquote>
-<pre>&#8212; operator new(size_t)
-&#8212; operator new(size_t, const std::nothrow_t&amp;)
-&#8212; operator new[](size_t)
-&#8212; operator new[](size_t, const std::nothrow_t&amp;)</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p> In 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 2: replace:</p>
-<blockquote>
-<p><tt> - operator new(size_t)<br>
- - operator new(size_t, const std::nothrow_t&amp;)<br>
- - operator new[](size_t)<br>
- - operator new[](size_t, const std::nothrow_t&amp;)</tt></p>
-</blockquote>
-<p> by:</p>
-<blockquote>
-<pre>- operator new(std::size_t)
-- operator new(std::size_t, const std::nothrow_t&amp;)
-- operator new[](std::size_t)
-- operator new[](std::size_t, const std::nothrow_t&amp;)</pre>
-</blockquote>
-<p>In [lib.allocator.requirements] 20.1.5, paragraph 4: replace:</p>
-<blockquote>
- <p>The typedef members pointer, const_pointer, size_type, and difference_type
- are required to be T*, T const*, size_t, and ptrdiff_t, respectively.</p>
-</blockquote>
-<p>&nbsp;by:</p>
-<blockquote>
- <p>The typedef members pointer, const_pointer, size_type, and difference_type
- are required to be T*, T const*, std::size_t, and std::ptrdiff_t,
- respectively.</p>
-</blockquote>
-<p>In [lib.allocator.members] 20.4.1.1, paragraphs 3 and 6: replace:</p>
-<blockquote>
- <p>3 Notes: Uses ::operator new(size_t) (18.4.1).</p>
- <p>6 Note: the storage is obtained by calling ::operator new(size_t), but it
- is unspecified when or how often this function is called. The use of hint is
- unspecified, but intended as an aid to locality if an implementation so
- desires.</p>
-</blockquote>
-<p>by:</p>
-<blockquote>
- <p>3 Notes: Uses ::operator new(std::size_t) (18.4.1).</p>
- <p>6 Note: the storage is obtained by calling ::operator new(std::size_t), but
- it is unspecified when or how often this function is called. The use of hint
- is unspecified, but intended as an aid to locality if an implementation so
- desires.</p>
-</blockquote>
-<p>In [lib.char.traits.require] 21.1.1, paragraph 1: replace:</p>
-<blockquote>
- <p>In Table 37, X denotes a Traits class defining types and functions for the
- character container type CharT; c and d denote values of type CharT; p and q
- denote values of type const CharT*; s denotes a value of type CharT*; n, i and
- j denote values of type size_t; e and f denote values of type X::int_type; pos
- denotes a value of type X::pos_type; and state denotes a value of type X::state_type.</p>
-</blockquote>
-<p>by:</p>
-<blockquote>
- <p>In Table 37, X denotes a Traits class defining types and functions for the
- character container type CharT; c and d denote values of type CharT; p and q
- denote values of type const CharT*; s denotes a value of type CharT*; n, i and
- j denote values of type std::size_t; e and f denote values of type X::int_type;
- pos denotes a value of type X::pos_type; and state denotes a value of type X::state_type.</p>
-</blockquote>
-<p>In [lib.char.traits.require] 21.1.1, table 37: replace the return type of
-X::length(p): "size_t" by "std::size_t".</p>
-<p> In [lib.std.iterator.tags] 24.3.3, paragraph 2: replace:<br>
-&nbsp;&nbsp;&nbsp; typedef ptrdiff_t difference_type;<br>
- by:<br>
-&nbsp;&nbsp;&nbsp; typedef std::ptrdiff_t difference_type;</p>
-<p> In [lib.locale.ctype] 22.2.1.1 put namespace std { ...} around the
-declaration of template &lt;class charT&gt; class ctype.<br>
-<br>
- In [lib.iterator.traits] 24.3.1, paragraph 2 put namespace std { ...} around the declaration of:<br>
-<br>
-&nbsp;&nbsp;&nbsp; template&lt;class Iterator&gt; struct iterator_traits<br>
-&nbsp;&nbsp;&nbsp; template&lt;class T&gt; struct iterator_traits&lt;T*&gt;<br>
-&nbsp;&nbsp;&nbsp; template&lt;class T&gt; struct iterator_traits&lt;const T*&gt;</p>
-<p><b>Rationale:</b></p>
-<p>The LWG believes correcting names like <tt>size_t</tt> and
-<tt>ptrdiff_t</tt> to <tt>std::size_t</tt> and <tt>std::ptrdiff_t</tt>
-to be essentially editorial. There there can't be another size_t or
-ptrdiff_t meant anyway because, according to 17.4.3.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.extern.types"> [lib.extern.types]</a>,</p>
-
-<blockquote>
-For each type T from the Standard C library, the types ::T and std::T
-are reserved to the implementation and, when defined, ::T shall be
-identical to std::T.
-</blockquote>
-
-<p>The issue is treated as a Defect Report to make explicit the Project
-Editor's authority to make this change.</p>
-
-<p><i>[Post-Tokyo: Nico Josuttis provided the above wording at the
-request of the LWG.]</i></p>
-
-<p><i>[Toronto: This is tangentially related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>, but only tangentially: the intent of this issue is to
-address use of the name <tt>size_t</tt> in contexts outside of
-namespace std, such as in the description of <tt>::operator new</tt>.
-The proposed changes should be reviewed to make sure they are
-correct.]</i></p>
-
-<p><i>[pre-Copenhagen: Nico has reviewed the changes and believes
-them to be correct.]</i></p>
-
-<hr>
-<a name="183"><h3>183.&nbsp;I/O stream manipulators don't work for wide character streams</h3></a><p><b>Section:</b>&nbsp;27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;7 Jul 1999</p>
-<p>27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> paragraph 3 says (clause numbering added for
-exposition):</p>
-<blockquote>
-<p>Returns: An object s of unspecified type such that if [1] out is an (instance
-of) basic_ostream then the expression out&lt;&lt;s behaves as if f(s) were
-called, and if [2] in is an (instance of) basic_istream then the expression
-in&gt;&gt;s behaves as if f(s) were called. Where f can be defined as: ios_base&amp;
-f(ios_base&amp; str, ios_base::fmtflags mask) { // reset specified flags
-str.setf(ios_base::fmtflags(0), mask); return str; } [3] The expression
-out&lt;&lt;s has type ostream&amp; and value out. [4] The expression in&gt;&gt;s
-has type istream&amp; and value in.</p>
-</blockquote>
-<p>Given the definitions [1] and [2] for out and in, surely [3] should read:
-"The expression out &lt;&lt; s has type basic_ostream&amp; ..." and
-[4] should read: "The expression in &gt;&gt; s has type basic_istream&amp;
-..."</p>
-<p>If the wording in the standard is correct, I can see no way of implementing
-any of the manipulators so that they will work with wide character streams.</p>
-<p>e.g. wcout &lt;&lt; setbase( 16 );</p>
-<p>Must have value 'wcout' (which makes sense) and type 'ostream&amp;' (which
-doesn't).</p>
-<p>The same "cut'n'paste" type also seems to occur in Paras 4,5,7 and
-8. In addition, Para 6 [setfill] has a similar error, but relates only to
-ostreams.</p>
-<p>I'd be happier if there was a better way of saying this, to make it clear
-that the value of the expression is "the same specialization of
-basic_ostream as out"&amp;</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace section 27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> except paragraph 1 with the
-following:</p>
-<blockquote>
-<p>2- The type designated smanip in each of the following function
-descriptions is implementation-specified and may be different for each
-function.<br>
-<br>
-<tt>smanip resetiosflags(ios_base::fmtflags mask);</tt><br>
-<br>
--3- Returns: An object s of unspecified type such that if out is an
-instance of basic_ostream&lt;charT,traits&gt; then the expression
-out&lt;&lt;s behaves
-as if f(s, mask) were called, or if in is an instance of
-basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
-behaves as if
-f(s, mask) were called. The function f can be defined as:*<br>
-<br>
-[Footnote: The expression cin &gt;&gt; resetiosflags(ios_base::skipws)
-clears ios_base::skipws in the format flags stored in the
-basic_istream&lt;charT,traits&gt; object cin (the same as cin &gt;&gt;
-noskipws), and the expression cout &lt;&lt;
-resetiosflags(ios_base::showbase) clears
-ios_base::showbase in the format flags stored in the
-basic_ostream&lt;charT,traits&gt; object cout (the same as cout
-&lt;&lt;
-noshowbase). --- end footnote]<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, ios_base::fmtflags mask)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // reset specified flags<br>
-&nbsp;&nbsp; str.setf(ios_base::fmtflags(0), mask);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
-The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
-<br>
-&nbsp;<tt>smanip setiosflags(ios_base::fmtflags mask);</tt><br>
-<br>
--4- Returns: An object s of unspecified type such that if out is an
-instance of basic_ostream&lt;charT,traits&gt; then the expression
-out&lt;&lt;s behaves
-as if f(s, mask) were called, or if in is an instance of
-basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
-behaves as if f(s,
-mask) were called. The function f can be defined as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, ios_base::fmtflags mask)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // set specified flags<br>
-&nbsp;&nbsp; str.setf(mask);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
-The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
-<br>
-<tt>smanip setbase(int base);</tt><br>
-<br>
--5- Returns: An object s of unspecified type such that if out is an
-instance of basic_ostream&lt;charT,traits&gt; then the expression
-out&lt;&lt;s behaves
-as if f(s, base) were called, or if in is an instance of
-basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
-behaves as if f(s,
-base) were called. The function f can be defined as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int base)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // set basefield<br>
-&nbsp;&nbsp; str.setf(base == 8 ? ios_base::oct :<br>
-&nbsp;&nbsp; base == 10 ? ios_base::dec :<br>
-&nbsp;&nbsp; base == 16 ? ios_base::hex :<br>
-&nbsp;&nbsp; ios_base::fmtflags(0), ios_base::basefield);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
-The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in.<br>
-<br>
-<tt>smanip setfill(char_type c);<br>
-</tt><br>
--6- Returns: An object s of unspecified type such that if out is (or is
-derived from) basic_ostream&lt;charT,traits&gt; and c has type charT
-then the
-expression out&lt;&lt;s behaves as if f(s, c) were called. The function
-f can be
-defined as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>template&lt;class charT, class traits&gt;<br>
-&nbsp;&nbsp; basic_ios&lt;charT,traits&gt;&amp; f(basic_ios&lt;charT,traits&gt;&amp; str, charT c)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // set fill character<br>
-&nbsp;&nbsp; str.fill(c);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.<br>
-<br>
-<tt>smanip setprecision(int n);</tt><br>
-<br>
--7- Returns: An object s of unspecified type such that if out is an
-instance of basic_ostream&lt;charT,traits&gt; then the expression
-out&lt;&lt;s behaves
-as if f(s, n) were called, or if in is an instance of
-basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
-behaves as if f(s, n)
-were called. The function f can be defined as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int n)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // set precision<br>
-&nbsp;&nbsp; str.precision(n);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type basic_ostream&lt;charT,traits&gt;&amp; and value out.
-The expression in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value in<br>
-.<br>
-<tt>smanip setw(int n);<br>
-</tt><br>
--8- Returns: An object s of unspecified type such that if out is an
-instance of basic_ostream&lt;charT,traits&gt; then the expression
-out&lt;&lt;s behaves
-as if f(s, n) were called, or if in is an instance of
-basic_istream&lt;charT,traits&gt; then the expression in&gt;&gt;s
-behaves as if f(s, n)
-were called. The function f can be defined as:<br>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tt>ios_base&amp; f(ios_base&amp; str, int n)<br>
-&nbsp;&nbsp; {<br>
-&nbsp;&nbsp; // set width<br>
-&nbsp;&nbsp; str.width(n);<br>
-&nbsp;&nbsp; return str;<br>
-&nbsp;&nbsp; }<br>
-</tt><br>
-The expression out&lt;&lt;s has type
-basic_ostream&lt;charT,traits&gt;&amp; and value out. The expression
-in&gt;&gt;s has type basic_istream&lt;charT,traits&gt;&amp; and value
-in.
-</p>
-</blockquote>
-
-<p><i>[Kona: Andy Sawyer and Beman Dawes will work to improve the wording of
-the proposed resolution.]</i></p>
-
-<p><i>[Tokyo - The LWG noted that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> involves
-the same paragraphs.]</i></p>
-
-<p><i>[Post-Tokyo: The issues list maintainer combined the proposed
-resolution of this issue with the proposed resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> as they both involved the same paragraphs, and were so
-intertwined that dealing with them separately appear fraught with
-error. The full text was supplied by Bill Plauger; it was cross
-checked against changes supplied by Andy Sawyer. It should be further
-checked by the LWG.]</i></p>
-<hr>
-<a name="184"><h3>184.&nbsp;numeric_limits&lt;bool&gt; wording problems</h3></a><p><b>Section:</b>&nbsp;18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Gabriel Dos Reis&nbsp; <b>Date:</b>&nbsp;21 Jul 1999</p>
-<p>bools are defined by the standard to be of integer types, as per
-3.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.fundamental"> [basic.fundamental]</a> paragraph 7. However "integer types"
-seems to have a special meaning for the author of 18.2. The net effect
-is an unclear and confusing specification for
-numeric_limits&lt;bool&gt; as evidenced below.</p>
-
-<p>18.2.1.2/7 says numeric_limits&lt;&gt;::digits is, for built-in integer
-types, the number of non-sign bits in the representation.</p>
-
-<p>4.5/4 states that a bool promotes to int ; whereas 4.12/1 says any non zero
-arithmetical value converts to true.</p>
-
-<p>I don't think it makes sense at all to require
-numeric_limits&lt;bool&gt;::digits and numeric_limits&lt;bool&gt;::digits10 to
-be meaningful.</p>
-
-<p>The standard defines what constitutes a signed (resp. unsigned) integer
-types. It doesn't categorize bool as being signed or unsigned. And the set of
-values of bool type has only two elements.</p>
-
-<p>I don't think it makes sense to require numeric_limits&lt;bool&gt;::is_signed
-to be meaningful.</p>
-
-<p>18.2.1.2/18 for numeric_limits&lt;integer_type&gt;::radix&nbsp; says:</p>
-<blockquote>
- <p>For integer types, specifies the base of the representation.186)</p>
-</blockquote>
-
-<p>This disposition is at best misleading and confusing for the standard
-requires a "pure binary numeration system" for integer types as per
-3.9.1/7</p>
-
-<p>The footnote 186) says: "Distinguishes types with base other than 2 (e.g
-BCD)."&nbsp; This also erroneous as the standard never defines any integer
-types with base representation other than 2.</p>
-
-<p>Furthermore, numeric_limits&lt;bool&gt;::is_modulo and
-numeric_limits&lt;bool&gt;::is_signed have similar problems.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Append to the end of 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>:</p>
-<blockquote>
- <p>The specialization for bool shall be provided as follows:</p>
- <pre> namespace std {
- template&lt;&gt; class numeric_limits&lt;bool&gt; {
- public:
- static const bool is_specialized = true;
- static bool min() throw() { return false; }
- static bool max() throw() { return true; }
-
- static const int digits = 1;
- static const int digits10 = 0;
- static const bool is_signed = false;
- static const bool is_integer = true;
- static const bool is_exact = true;
- static const int radix = 2;
- static bool epsilon() throw() { return 0; }
- static bool round_error() throw() { return 0; }
-
- static const int min_exponent = 0;
- static const int min_exponent10 = 0;
- static const int max_exponent = 0;
- static const int max_exponent10 = 0;
-
- static const bool has_infinity = false;
- static const bool has_quiet_NaN = false;
- static const bool has_signaling_NaN = false;
- static const float_denorm_style has_denorm = denorm_absent;
- static const bool has_denorm_loss = false;
- static bool infinity() throw() { return 0; }
- static bool quiet_NaN() throw() { return 0; }
- static bool signaling_NaN() throw() { return 0; }
- static bool denorm_min() throw() { return 0; }
-
- static const bool is_iec559 = false;
- static const bool is_bounded = true;
- static const bool is_modulo = false;
-
- static const bool traps = false;
- static const bool tinyness_before = false;
- static const float_round_style round_style = round_toward_zero;
- };
- }</pre>
-</blockquote>
-
-<p><i>[Tokyo:&nbsp; The LWG desires wording that specifies exact values
-rather than more general wording in the original proposed
-resolution.]</i></p>
-
-<p><i>[Post-Tokyo:&nbsp; At the request of the LWG in Tokyo, Nico
-Josuttis provided the above wording.]</i></p>
-<hr>
-<a name="185"><h3>185.&nbsp;Questionable use of term "inline"</h3></a><p><b>Section:</b>&nbsp;20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;UK Panel&nbsp; <b>Date:</b>&nbsp;26 Jul 1999</p>
-<p>Paragraph 4 of 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> says:</p>
-<blockquote>
- <p>&nbsp;[Example: To negate every element of a: transform(a.begin(), a.end(),
- a.begin(), negate&lt;double&gt;()); The corresponding functions will inline
- the addition and the negation. end example]</p>
-</blockquote>
-<p>(Note: The "addition" referred to in the above is in para 3) we can
-find no other wording, except this (non-normative) example which suggests that
-any "inlining" will take place in this case.</p>
-<p>Indeed both:</p>
-<blockquote>
- <p>17.4.4.3 Global Functions [lib.global.functions] 1 It is
- unspecified whether any global functions in the C++ Standard Library
- are defined as inline (7.1.2).</p>
-</blockquote>
-<p>and</p>
-<blockquote>
- <p>17.4.4.4 Member Functions [lib.member.functions] 1 It is
- unspecified whether any member functions in the C++ Standard Library
- are defined as inline (7.1.2).</p>
-</blockquote>
-<p>take care to state that this may indeed NOT be the case.</p>
-<p>Thus the example "mandates" behavior that is explicitly
-not required elsewhere.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 1, remove the sentence:</p>
-<blockquote>
-<p>They are important for the effective use of the library.</p>
-</blockquote>
-<p>Remove 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 2, which reads:</p>
-<blockquote>
- <p> Using function objects together with function templates
- increases the expressive power of the library as well as making the
- resulting code much more efficient.</p>
-</blockquote>
-<p>In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 4, remove the sentence:</p>
-<blockquote>
- <p>The corresponding functions will inline the addition and the
- negation.</p>
-</blockquote>
-
-<p><i>[Kona: The LWG agreed there was a defect.]</i></p>
-<p><i>[Tokyo: The LWG crafted the proposed resolution.]</i></p>
-<hr>
-<a name="186"><h3>186.&nbsp;bitset::set() second parameter should be bool</h3></a><p><b>Section:</b>&nbsp;23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Darin Adler&nbsp; <b>Date:</b>&nbsp;13 Aug 1999</p>
-<p>In section 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>, paragraph 13 defines the
-bitset::set operation to take a second parameter of type int. The
-function tests whether this value is non-zero to determine whether to
-set the bit to true or false. The type of this second parameter should
-be bool. For one thing, the intent is to specify a Boolean value. For
-another, the result type from test() is bool. In addition, it's
-possible to slice an integer that's larger than an int. This can't
-happen with bool, since conversion to bool has the semantic of
-translating 0 to false and any non-zero value to true.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> Para 1 Replace:</p>
-<blockquote>
-<pre>bitset&lt;N&gt;&amp; set(size_t pos, int val = true ); </pre>
-</blockquote>
-<p>With:</p>
-<blockquote>
- <pre>bitset&lt;N&gt;&amp; set(size_t pos, bool val = true );</pre>
-</blockquote>
-<p>In 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> Para 12(.5) Replace:</p>
-<blockquote>
- <pre>bitset&lt;N&gt;&amp; set(size_t pos, int val = 1 );</pre>
-</blockquote>
-<p>With:</p>
-<blockquote>
- <pre>bitset&lt;N&gt;&amp; set(size_t pos, bool val = true );</pre>
-</blockquote>
-
-<p><i>[Kona: The LWG agrees with the description.&nbsp; Andy Sawyer will work
-on better P/R wording.]</i></p>
-<p><i>[Post-Tokyo: Andy provided the above wording.]</i></p>
-<p><b>Rationale:</b></p>
-<p><tt>bool</tt> is a better choice. It is believed that binary
-compatibility is not an issue, because this member function is
-usually implemented as <tt>inline</tt>, and because it is already
-the case that users cannot rely on the type of a pointer to a
-nonvirtual member of a standard library class.</p>
-<hr>
-<a name="187"><h3>187.&nbsp;iter_swap underspecified</h3></a><p><b>Section:</b>&nbsp;25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;14 Aug 1999</p>
-<p>The description of iter_swap in 25.2.2 paragraph 7,says that it
-``exchanges the values'' of the objects to which two iterators
-refer.<br> <br> What it doesn't say is whether it does so using swap
-or using the assignment operator and copy constructor.<br> <br> This
-question is an important one to answer, because swap is specialized to
-work efficiently for standard containers.<br> For example:</p>
-<blockquote>
-<pre>vector&lt;int&gt; v1, v2;
-iter_swap(&amp;v1, &amp;v2);</pre>
-</blockquote>
-<p>Is this call to iter_swap equivalent to calling swap(v1, v2)?&nbsp;
-Or is it equivalent to</p>
-<blockquote>
-<pre>{
-vector&lt;int&gt; temp = v1;
-v1 = v2;
-v2 = temp;
-}</pre>
-</blockquote>
-<p>The first alternative is O(1); the second is O(n).</p>
-<p>A LWG member, Dave Abrahams, comments:</p>
-<blockquote>
-<p>Not an objection necessarily, but I want to point out the cost of
-that requirement:</p>
- <blockquote>
-<p><tt>iter_swap(list&lt;T&gt;::iterator, list&lt;T&gt;::iterator)</tt></p>
- </blockquote>
-<p>can currently be specialized to be more efficient than
-iter_swap(T*,T*) for many T (by using splicing). Your proposal would
-make that optimization illegal.&nbsp;</p>
-</blockquote>
-
-<p><i>[Kona: The LWG notes the original need for iter_swap was proxy iterators
-which are no longer permitted.]</i></p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the effect clause of iter_swap in 25.2.2 paragraph 7 from:</p>
-<blockquote>
-<p>Exchanges the values pointed to by the two iterators a and b.</p>
-</blockquote>
-<p>to</p>
-<blockquote>
-<p><tt>swap(*a, *b)</tt>.</p>
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>It's useful to say just what <tt>iter_swap</tt> does. There may be
- some iterators for which we want to specialize <tt>iter_swap</tt>,
- but the fully general version should have a general specification.</p>
-
-<p>Note that in the specific case of <tt>list&lt;T&gt;::iterator</tt>,
-iter_swap should not be specialized as suggested above. That would do
-much more than exchanging the two iterators' values: it would change
-predecessor/successor relationships, possibly moving the iterator from
-one list to another. That would surely be inappropriate.</p>
-<hr>
-<a name="189"><h3>189.&nbsp;setprecision() not specified correctly</h3></a><p><b>Section:</b>&nbsp;27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;25 Aug 1999</p>
-<p>27.4.2.2 paragraph 9 claims that setprecision() sets the precision,
-and includes a parenthetical note saying that it is the number of
-digits after the decimal point.<br>
-<br>
-This claim is not strictly correct. For example, in the default
-floating-point output format, setprecision sets the number of
-significant digits printed, not the number of digits after the decimal
-point.<br>
-<br>
-I would like the committee to look at the definition carefully and
-correct the statement in 27.4.2.2</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove from 27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a>, paragraph 9, the text
-"(number of digits after the decimal point)".</p>
-<hr>
-<a name="193"><h3>193.&nbsp;Heap operations description incorrect</h3></a><p><b>Section:</b>&nbsp;25.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.heap.operations"> [lib.alg.heap.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Markus Mauhart&nbsp; <b>Date:</b>&nbsp;24 Sep 1999</p>
-<p>25.3.6 [lib.alg.heap.operations] states two key properties of a heap [a,b), the first of them
-is<br>
-<br>
-&nbsp;&nbsp;&nbsp; `"(1) *a is the largest element"<br>
-<br>
-I think this is incorrect and should be changed to the wording in the proposed
-resolution.</p>
-<p>Actually there are two independent changes:</p>
-<blockquote>
- <p>A-"part of largest equivalence class" instead of "largest", cause 25.3
- [lib.alg.sorting] asserts "strict weak ordering" for all its sub clauses.</p>
- <p>B-Take
-'an oldest' from that equivalence class, otherwise the heap functions
-could not be used for a priority queue as explained in 23.2.3.2.2
-[lib.priqueue.members] (where I assume that a "priority queue" respects
-priority AND time).</p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.heap.operations"> [lib.alg.heap.operations]</a> property (1) from:</p>
-<blockquote>
- <p>(1) *a is the largest element</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>(1) There is no element greater than <tt>*a</tt></p>
-</blockquote>
-<hr>
-<a name="195"><h3>195.&nbsp;Should <tt>basic_istream::sentry</tt>'s constructor ever set eofbit?</h3></a><p><b>Section:</b>&nbsp;27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;13 Oct 1999</p>
-<p>Suppose that <tt>is.flags() &amp; ios_base::skipws</tt> is nonzero.
-What should <tt>basic_istream&lt;&gt;::sentry</tt>'s constructor do if it
-reaches eof while skipping whitespace? 27.6.1.1.2/5 suggests it
-should set failbit. Should it set eofbit as well? The standard
-doesn't seem to answer that question.</p>
-
-<p>On the one hand, nothing in 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> says that
-<tt>basic_istream&lt;&gt;::sentry</tt> should ever set eofbit. On the
-other hand, 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a> paragraph 4 says that if
-extraction from a <tt>streambuf</tt> "returns
-<tt>traits::eof()</tt>, then the input function, except as explicitly
-noted otherwise, completes its actions and does
-<tt>setstate(eofbit)"</tt>. So the question comes down to
-whether <tt>basic_istream&lt;&gt;::sentry</tt>'s constructor is an
-input function.</p>
-
-<p>Comments from Jerry Schwarz:</p>
-<blockquote>
-<p>It was always my intention that eofbit should be set any time that a
-virtual returned something to indicate eof, no matter what reason
-iostream code had for calling the virtual.</p>
-<p>
-The motivation for this is that I did not want to require streambufs
-to behave consistently if their virtuals are called after they have
-signaled eof.</p>
-<p>
-The classic case is a streambuf reading from a UNIX file. EOF isn't
-really a state for UNIX file descriptors. The convention is that a
-read on UNIX returns 0 bytes to indicate "EOF", but the file
-descriptor isn't shut down in any way and future reads do not
-necessarily also return 0 bytes. In particular, you can read from
-tty's on UNIX even after they have signaled "EOF". (It
-isn't always understood that a ^D on UNIX is not an EOF indicator, but
-an EOL indicator. By typing a "line" consisting solely of
-^D you cause a read to return 0 bytes, and by convention this is
-interpreted as end of file.)</p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Add a sentence to the end of 27.6.1.1.2 paragraph 2:</p>
-<blockquote>
-<p>If <tt>is.rdbuf()-&gt;sbumpc()</tt> or <tt>is.rdbuf()-&gt;sgetc()</tt>
-returns <tt>traits::eof()</tt>, the function calls
-<tt>setstate(failbit | eofbit)</tt> (which may throw
-<tt>ios_base::failure</tt>).
-</p>
-</blockquote>
-<hr>
-<a name="198"><h3>198.&nbsp;Validity of pointers and references unspecified after iterator destruction</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;3 Nov 1999</p>
-<p>
-Is a pointer or reference obtained from an iterator still valid after
-destruction of the iterator?
-</p>
-<p>
-Is a pointer or reference obtained from an iterator still valid after the value
-of the iterator changes?
-</p>
-<blockquote>
-<pre>#include &lt;iostream&gt;
-#include &lt;vector&gt;
-#include &lt;iterator&gt;
-
-int main()
-{
- typedef std::vector&lt;int&gt; vec_t;
- vec_t v;
- v.push_back( 1 );
-
- // Is a pointer or reference obtained from an iterator still
- // valid after destruction of the iterator?
- int * p = &amp;*v.begin();
- std::cout &lt;&lt; *p &lt;&lt; '\n'; // OK?
-
- // Is a pointer or reference obtained from an iterator still
- // valid after the value of the iterator changes?
- vec_t::iterator iter( v.begin() );
- p = &amp;*iter++;
- std::cout &lt;&lt; *p &lt;&lt; '\n'; // OK?
-
- return 0;
-}
-</pre>
-</blockquote>
-
-<p>The standard doesn't appear to directly address these
-questions. The standard needs to be clarified. At least two real-world
-cases have been reported where library implementors wasted
-considerable effort because of the lack of clarity in the
-standard. The question is important because requiring pointers and
-references to remain valid has the effect for practical purposes of
-prohibiting iterators from pointing to cached rather than actual
-elements of containers.</p>
-
-<p>The standard itself assumes that pointers and references obtained
-from an iterator are still valid after iterator destruction or
-change. The definition of reverse_iterator::operator*(), 24.4.1.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.conv"> [lib.reverse.iter.conv]</a>, which returns a reference, defines
-effects:</p>
-
-<blockquote>
- <pre>Iterator tmp = current;
-return *--tmp;</pre>
-</blockquote>
-<p>The definition of reverse_iterator::operator-&gt;(), 24.4.1.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op.star"> [lib.reverse.iter.op.star]</a>, which returns a pointer, defines effects:</p>
-<blockquote>
- <pre>return &amp;(operator*());</pre>
-</blockquote>
-
-<p>Because the standard itself assumes pointers and references remain
-valid after iterator destruction or change, the standard should say so
-explicitly. This will also reduce the chance of user code breaking
-unexpectedly when porting to a different standard library
-implementation.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add a new paragraph to 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>:</p>
-<blockquote>
-Destruction of an iterator may invalidate pointers and references
-previously obtained from that iterator.
-</blockquote>
-
-<p>Replace paragraph 1 of 24.4.1.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.conv"> [lib.reverse.iter.conv]</a> with:</p>
-
-<blockquote>
-<p><b>Effects:</b></p>
-<pre> this-&gt;tmp = current;
- --this-&gt;tmp;
- return *this-&gt;tmp;
-</pre>
-
-<p>
-[<i>Note:</i> This operation must use an auxiliary member variable,
-rather than a temporary variable, to avoid returning a reference that
-persists beyond the lifetime of its associated iterator. (See
-24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>.) The name of this member variable is shown for
-exposition only. <i>--end note</i>]
-</p>
-</blockquote>
-
-<p><i>[Post-Tokyo: The issue has been reformulated purely
-in terms of iterators.]</i></p>
-
-<p><i>[Pre-Toronto: Steve Cleary pointed out the no-invalidation
-assumption by reverse_iterator. The issue and proposed resolution was
-reformulated yet again to reflect this reality.]</i></p>
-
-<p><i>[Copenhagen: Steve Cleary pointed out that reverse_iterator
-assumes its underlying iterator has persistent pointers and
-references. Andy Koenig pointed out that it is possible to rewrite
-reverse_iterator so that it no longer makes such an assupmption.
-However, this issue is related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a>. If we
-decide it is intentional that <tt>p[n]</tt> may return by value
-instead of reference when <tt>p</tt> is a Random Access Iterator,
-other changes in reverse_iterator will be necessary.]</i></p>
-<p><b>Rationale:</b></p>
-<p>This issue has been discussed extensively. Note that it is
-<i>not</i> an issue about the behavior of predefined iterators. It is
-asking whether or not user-defined iterators are permitted to have
-transient pointers and references. Several people presented examples
-of useful user-defined iterators that have such a property; examples
-include a B-tree iterator, and an "iota iterator" that doesn't point
-to memory. Library implementors already seem to be able to cope with
-such iterators: they take pains to avoid forming references to memory
-that gets iterated past. The only place where this is a problem is
-<tt>reverse_iterator</tt>, so this issue changes
-<tt>reverse_iterator</tt> to make it work.</p>
-
-<p>This resolution does not weaken any guarantees provided by
-predefined iterators like <tt>list&lt;int&gt;::iterator</tt>.
-Clause 23 should be reviewed to make sure that guarantees for
-predefined iterators are as strong as users expect.</p>
-
-<hr>
-<a name="199"><h3>199.&nbsp;What does <tt>allocate(0)</tt> return?</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;19 Nov 1999</p>
-<p>
-Suppose that <tt>A</tt> is a class that conforms to the
-Allocator requirements of Table 32, and <tt>a</tt> is an
-object of class <tt>A</tt> What should be the return
-value of <tt>a.allocate(0)</tt>? Three reasonable
-possibilities: forbid the argument <tt>0</tt>, return
-a null pointer, or require that the return value be a
-unique non-null pointer.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add a note to the <tt>allocate</tt> row of Table 32:
-"[<i>Note:</i> If <tt>n == 0</tt>, the return value is unspecified. <i>--end note</i>]"</p>
-<p><b>Rationale:</b></p>
-<p>A key to understanding this issue is that the ultimate use of
-allocate() is to construct an iterator, and that iterator for zero
-length sequences must be the container's past-the-end
-representation. Since this already implies special case code, it
-would be over-specification to mandate the return value.
-</p>
-<hr>
-<a name="200"><h3>200.&nbsp;Forward iterator requirements don't allow constant iterators</h3></a><p><b>Section:</b>&nbsp;24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;19 Nov 1999</p>
-<p>
-In table 74, the return type of the expression <tt>*a</tt> is given
-as <tt>T&amp;</tt>, where <tt>T</tt> is the iterator's value type.
-For constant iterators, however, this is wrong. ("Value type"
-is never defined very precisely, but it is clear that the value type
-of, say, <tt>std::list&lt;int&gt;::const_iterator</tt> is supposed to be
-<tt>int</tt>, not <tt>const int</tt>.)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In table 74, in the <tt>*a</tt> and <tt>*r++</tt> rows, change the
-return type from "<tt>T&amp;</tt>" to "<tt>T&amp;</tt>
-if <tt>X</tt> is mutable, otherwise <tt>const T&amp;</tt>".
-In the <tt>a-&gt;m</tt> row, change the return type from
-"<tt>U&amp;</tt>" to "<tt>U&amp;</tt> if <tt>X</tt> is mutable,
-otherwise <tt>const U&amp;</tt>".
-</p>
-
-<p><i>[Tokyo: The LWG believes this is the tip of a larger iceberg;
-there are multiple const problems with the STL portion of the library
-and that these should be addressed as a single package.&nbsp; Note
-that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a> has already been declared NAD Future for
-that very reason.]</i></p>
-
-<p><i>[Redmond: the LWG thinks this is separable from other constness
-issues. This issue is just cleanup; it clarifies language that was
-written before we had iterator_traits. Proposed resolution was
-modified: the original version only discussed *a. It was pointed out
-that we also need to worry about *r++ and a-&gt;m.]</i></p>
-
-<hr>
-<a name="202"><h3>202.&nbsp;unique() effects unclear when predicate not an equivalence relation</h3></a><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Koenig&nbsp; <b>Date:</b>&nbsp;13 Jan 2000</p>
-<p>
-What should unique() do if you give it a predicate that is not an
-equivalence relation? There are at least two plausible answers:
-</p>
-
-<blockquote>
-
-<p>
- 1. You can't, because 25.2.8 says that it it "eliminates all but
- the first element from every consecutive group of equal
- elements..." and it wouldn't make sense to interpret "equal" as
- meaning anything but an equivalence relation. [It also doesn't
- make sense to interpret "equal" as meaning ==, because then there
- would never be any sense in giving a predicate as an argument at
- all.]
-</p>
-
-<p>
- 2. The word "equal" should be interpreted to mean whatever the
- predicate says, even if it is not an equivalence relation
- (and in particular, even if it is not transitive).
-</p>
-
-</blockquote>
-
-<p>
-The example that raised this question is from Usenet:
-</p>
-
-<blockquote>
-
-<pre>int f[] = { 1, 3, 7, 1, 2 };
-int* z = unique(f, f+5, greater&lt;int&gt;());</pre>
-
-</blockquote>
-
-<p>
-If one blindly applies the definition using the predicate
-greater&lt;int&gt;, and ignore the word "equal", you get:
-</p>
-
-<blockquote>
-
-<p>
- Eliminates all but the first element from every consecutive group
- of elements referred to by the iterator i in the range [first, last)
- for which *i &gt; *(i - 1).
-</p>
-
-</blockquote>
-
-<p>
-The first surprise is the order of the comparison. If we wanted to
-allow for the predicate not being an equivalence relation, then we
-should surely compare elements the other way: pred(*(i - 1), *i). If
-we do that, then the description would seem to say: "Break the
-sequence into subsequences whose elements are in strictly increasing
-order, and keep only the first element of each subsequence". So the
-result would be 1, 1, 2. If we take the description at its word, it
-would seem to call for strictly DEcreasing order, in which case the
-result should be 1, 3, 7, 2.<br>
-<br>
-In fact, the SGI implementation of unique() does neither: It yields 1,
-3, 7.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> paragraph 1 to:</p>
-<blockquote>
-For a nonempty range, eliminates all but the first element from every
-consecutive group of equivalent elements referred to by the iterator
-<tt>i</tt> in the range [first+1, last) for which the following
-conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) !=
-false</tt>.
-</blockquote>
-
-<p>
-Also insert a new paragraph, paragraph 2a, that reads: "Requires: The
-comparison function must be an equivalence relation."
-</p>
-
-<p><i>[Redmond: discussed arguments for and against requiring the
-comparison function to be an equivalence relation. Straw poll:
-14-2-5. First number is to require that it be an equivalence
-relation, second number is to explicitly not require that it be an
-equivalence relation, third number is people who believe they need
-more time to consider the issue. A separate issue: Andy Sawyer
-pointed out that "i-1" is incorrect, since "i" can refer to the first
-iterator in the range. Matt provided wording to address this
-problem.]</i></p>
-
-<p><i>[Curaçao: The LWG changed "... the range (first,
-last)..." to "... the range [first+1, last)..." for
-clarity. They considered this change close enough to editorial to not
-require another round of review.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG also considered an alternative resolution: change
-25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> paragraph 1 to:</p>
-
-<blockquote>
-For a nonempty range, eliminates all but the first element from every
-consecutive group of elements referred to by the iterator
-<tt>i</tt> in the range (first, last) for which the following
-conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) !=
-false</tt>.
-</blockquote>
-
-<p>
-Also insert a new paragraph, paragraph 1a, that reads: "Notes: The
-comparison function need not be an equivalence relation."
-</p>
-
-
-<p>Informally: the proposed resolution imposes an explicit requirement
-that the comparison function be an equivalence relation. The
-alternative resolution does not, and it gives enough information so
-that the behavior of unique() for a non-equivalence relation is
-specified. Both resolutions are consistent with the behavior of
-existing implementations.</p>
-<hr>
-<a name="208"><h3>208.&nbsp;Unnecessary restriction on past-the-end iterators</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Stephen Cleary&nbsp; <b>Date:</b>&nbsp;02 Feb 2000</p>
-<p>In 24.1 paragraph 5, it is stated ". . . Dereferenceable and
-past-the-end values are always non-singular."</p>
-<p>This places an unnecessary restriction on past-the-end iterators for
-containers with forward iterators (for example, a singly-linked list). If the
-past-the-end value on such a container was a well-known singular value, it would
-still satisfy all forward iterator requirements.</p>
-<p>Removing this restriction would allow, for example, a singly-linked list
-without a "footer" node.</p>
-<p>This would have an impact on existing code that expects past-the-end
-iterators obtained from different (generic) containers being not equal.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> paragraph 5, the last sentence, from:</p>
-<blockquote>
-<p>Dereferenceable and past-the-end values are always non-singular.</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
-<p>Dereferenceable values are always non-singular.&nbsp;</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>For some kinds of containers, including singly linked lists and
-zero-length vectors, null pointers are perfectly reasonable past-the-end
-iterators. Null pointers are singular.
-</p>
-<hr>
-<a name="209"><h3>209.&nbsp;basic_string declarations inconsistent</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Igor Stauder&nbsp; <b>Date:</b>&nbsp;11 Feb 2000</p>
-<p>In Section 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> the basic_string member function
-declarations use a consistent style except for the following functions:</p>
-<blockquote>
- <pre>void push_back(const charT);
-basic_string&amp; assign(const basic_string&amp;);
-void swap(basic_string&lt;charT,traits,Allocator&gt;&amp;);</pre>
-</blockquote>
-<p>- push_back, assign, swap: missing argument name&nbsp;<br>
-- push_back: use of const with charT (i.e. POD type passed by value
-not by reference - should be charT or const charT&amp; )<br>
-- swap: redundant use of template parameters in argument
-basic_string&lt;charT,traits,Allocator&gt;&amp;</p>
-<p><b>Proposed resolution:</b></p>
-<p>In Section 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> change the basic_string member
-function declarations push_back, assign, and swap to:</p>
-<blockquote>
- <pre>void push_back(charT c);
-
-basic_string&amp; assign(const basic_string&amp; str);
-void swap(basic_string&amp; str);</pre>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Although the standard is in general not consistent in declaration
-style, the basic_string declarations are consistent other than the
-above. The LWG felt that this was sufficient reason to merit the
-change.
-</p>
-<hr>
-<a name="210"><h3>210.&nbsp;distance first and last confused</h3></a><p><b>Section:</b>&nbsp;25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Lisa Lippincott&nbsp; <b>Date:</b>&nbsp;15 Feb 2000</p>
-<p>In paragraph 9 of section 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>, it is written:</p>
-<blockquote>
- <p> In the description of the algorithms operators + and - are used
- for some of the iterator categories for which they do not have to
- be defined. In these cases the semantics of [...] a-b is the same
- as of<br>
- <br>
- &nbsp;&nbsp;&nbsp;&nbsp; <tt>return distance(a, b);</tt></p>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>On the last line of paragraph 9 of section 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> change
-<tt>"a-b"</tt> to <tt>"b-a".</tt></p>
-<p><b>Rationale:</b></p>
-<p>There are two ways to fix the defect; change the description to b-a
-or change the return to distance(b,a). The LWG preferred the
-former for consistency.</p>
-<hr>
-<a name="211"><h3>211.&nbsp;operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Scott Snyder&nbsp; <b>Date:</b>&nbsp;4 Feb 2000</p>
-<p>The description of the stream extraction operator for std::string (section
-21.3.7.9 [lib.string.io]) does not contain a requirement that failbit be set in
-the case that the operator fails to extract any characters from the input
-stream.</p>
-<p>This implies that the typical construction</p>
-<blockquote>
- <pre>std::istream is;
-std::string str;
-...
-while (is &gt;&gt; str) ... ;</pre>
-</blockquote>
-<p>(which tests failbit) is not required to terminate at EOF.</p>
-<p>Furthermore, this is inconsistent with other extraction operators,
-which do include this requirement. (See sections 27.6.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted"> [lib.istream.formatted]</a> and 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), where this
-requirement is present, either explicitly or implicitly, for the
-extraction operators. It is also present explicitly in the description
-of getline (istream&amp;, string&amp;, charT) in section 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 8.)</p>
-<p><b>Proposed resolution:</b></p>
-<p>Insert new paragraph after paragraph 2 in section 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>:</p>
-<blockquote>
-
-<p>If the function extracts no characters, it calls
-is.setstate(ios::failbit) which may throw ios_base::failure
-(27.4.4.3).</p>
-</blockquote>
-<hr>
-<a name="212"><h3>212.&nbsp;Empty range behavior unclear for several algorithms</h3></a><p><b>Section:</b>&nbsp;25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Nico Josuttis&nbsp; <b>Date:</b>&nbsp;26 Feb 2000</p>
-<p>The standard doesn't specify what min_element() and max_element() shall
-return if the range is empty (first equals last). The usual implementations
-return last. This problem seems also apply to partition(), stable_partition(),
-next_permutation(), and prev_permutation().</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> - Minimum and maximum, paragraphs 7 and
-9, append: Returns last if first==last.</p>
-<p><b>Rationale:</b></p>
-<p>The LWG looked in some detail at all of the above mentioned
-algorithms, but believes that except for min_element() and
-max_element() it is already clear that last is returned if first ==
-last.</p>
-<hr>
-<a name="214"><h3>214.&nbsp;set::find() missing const overload</h3></a><p><b>Section:</b>&nbsp;23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a>, 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;28 Feb 2000</p>
-<p>The specification for the associative container requirements in
-Table 69 state that the find member function should "return
-iterator; const_iterator for constant a". The map and multimap
-container descriptions have two overloaded versions of find, but set
-and multiset do not, all they have is:</p>
-<blockquote>
- <pre>iterator find(const key_type &amp; x) const;</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Change the prototypes for find(), lower_bound(), upper_bound(), and
-equal_range() in section 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a> and section 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a> to each have two overloads:</p>
-<blockquote>
- <pre>iterator find(const key_type &amp; x);
-const_iterator find(const key_type &amp; x) const;</pre>
- <pre>iterator lower_bound(const key_type &amp; x);
-const_iterator lower_bound(const key_type &amp; x) const;</pre>
- <pre>iterator upper_bound(const key_type &amp; x);
-const_iterator upper_bound(const key_type &amp; x) const;</pre>
- <pre>pair&lt;iterator, iterator&gt; equal_range(const key_type &amp; x);
-pair&lt;const_iterator, const_iterator&gt; equal_range(const key_type &amp; x) const;</pre>
-</blockquote>
-
-<p><i>[Tokyo: At the request of the LWG, Judy Ward provided wording
-extending the proposed resolution to lower_bound, upper_bound, and
-equal_range.]</i></p>
-<hr>
-<a name="217"><h3>217.&nbsp;Facets example (Classifying Japanese characters) contains errors</h3></a><p><b>Section:</b>&nbsp;22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;29 Feb 2000</p>
-<p>The example in 22.2.8, paragraph 11 contains the following errors:</p>
-<p>1) The member function `My::JCtype::is_kanji()' is non-const; the function
-must be const in order for it to be callable on a const object (a reference to
-which which is what std::use_facet&lt;&gt;() returns).</p>
-<p>2) In file filt.C, the definition of `JCtype::id' must be qualified with the
-name of the namespace `My'.</p>
-<p>3) In the definition of `loc' and subsequently in the call to use_facet&lt;&gt;()
-in main(), the name of the facet is misspelled: it should read `My::JCtype'
-rather than `My::JCType'.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace the "Classifying Japanese characters" example in 22.2.8,
-paragraph 11 with the following:</p>
-<pre>#include &lt;locale&gt;</pre>
-<pre>namespace My {
- using namespace std;
- class JCtype : public locale::facet {
- public:
- static locale::id id; // required for use as a new locale facet
- bool is_kanji (wchar_t c) const;
- JCtype() {}
- protected:
- ~JCtype() {}
- };
-}</pre>
-<pre>// file: filt.C
-#include &lt;iostream&gt;
-#include &lt;locale&gt;
-#include "jctype" // above
-std::locale::id My::JCtype::id; // the static JCtype member
-declared above.</pre>
-<pre>int main()
-{
- using namespace std;
- typedef ctype&lt;wchar_t&gt; wctype;
- locale loc(locale(""), // the user's preferred locale...
- new My::JCtype); // and a new feature ...
- wchar_t c = use_facet&lt;wctype&gt;(loc).widen('!');
- if (!use_facet&lt;My::JCtype&gt;(loc).is_kanji(c))
- cout &lt;&lt; "no it isn't!" &lt;&lt; endl;
- return 0;
-}</pre>
-<hr>
-<a name="220"><h3>220.&nbsp;~ios_base() usage valid?</h3></a><p><b>Section:</b>&nbsp;27.4.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.cons"> [lib.ios.base.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Jonathan Schilling, Howard Hinnant&nbsp; <b>Date:</b>&nbsp;13 Mar 2000</p>
-<p>The pre-conditions for the ios_base destructor are described in 27.4.2.7
-paragraph 2:</p>
-<blockquote>
- <p>Effects: Destroys an object of class ios_base. Calls each registered
- callback pair (fn,index) (27.4.2.6) as (*fn)(erase_event,*this,index) at such
- time that any ios_base member function called from within fn has well defined
- results.</p>
-</blockquote>
-<p>But what is not clear is: If no callback functions were ever registered, does
-it matter whether the ios_base members were ever initialized?</p>
-<p>For instance, does this program have defined behavior:</p>
-<blockquote>
- <pre>#include &lt;ios&gt;</pre>
- <pre>class D : public std::ios_base { };</pre>
- <pre>int main() { D d; }</pre>
-</blockquote>
-<p>It seems that registration of a callback function would surely affect the
-state of an ios_base. That is, when you register a callback function with an
-ios_base, the ios_base must record that fact somehow.</p>
-<p>But if after construction the ios_base is in an indeterminate state, and that
-state is not made determinate before the destructor is called, then how would
-the destructor know if any callbacks had indeed been registered? And if the
-number of callbacks that had been registered is indeterminate, then is not the
-behavior of the destructor undefined?</p>
-<p>By comparison, the basic_ios class description in 27.4.4.1 paragraph 2 makes
-it explicit that destruction before initialization results in undefined
-behavior.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Modify 27.4.2.7 paragraph 1 from</p>
-<blockquote>
- <p>Effects: Each ios_base member has an indeterminate value after
- construction.</p>
-</blockquote>
-<p>to</p>
-<blockquote>
- <p>Effects: Each ios_base member has an indeterminate
-value after construction. These members must be initialized by calling
-basic_ios::init. If an ios_base object is destroyed before these
-initializations have taken place, the behavior is undefined.</p>
-</blockquote>
-<hr>
-<a name="221"><h3>221.&nbsp;num_get&lt;&gt;::do_get stage 2 processing broken</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;14 Mar 2000</p>
-<p>Stage 2 processing of numeric conversion is broken.</p>
-
-<p>Table 55 in 22.2.2.1.2 says that when basefield is 0 the integral
-conversion specifier is %i. A %i specifier determines a number's base
-by its prefix (0 for octal, 0x for hex), so the intention is clearly
-that a 0x prefix is allowed. Paragraph 8 in the same section,
-however, describes very precisely how characters are processed. (It
-must be done "as if" by a specified code fragment.) That
-description does not allow a 0x prefix to be recognized.</p>
-
-<p>Very roughly, stage 2 processing reads a char_type ct. It converts
-ct to a char, not by using narrow but by looking it up in a
-translation table that was created by widening the string literal
-"0123456789abcdefABCDEF+-". The character "x" is
-not found in that table, so it can't be recognized by stage 2
-processing.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.1.2 paragraph 8, replace the line:</p>
-<blockquote>
- <pre>static const char src[] = "0123456789abcdefABCDEF+-";</pre>
-</blockquote>
-<p>with the line:</p>
-<blockquote>
- <pre>static const char src[] = "0123456789abcdefxABCDEFX+-";</pre>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>If we're using the technique of widening a string literal, the
-string literal must contain every character we wish to recognize.
-This technique has the consequence that alternate representations
-of digits will not be recognized. This design decision was made
-deliberately, with full knowledge of that limitation.</p>
-<hr>
-<a name="222"><h3>222.&nbsp;Are throw clauses necessary if a throw is already implied by the effects clause?</h3></a><p><b>Section:</b>&nbsp;17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;17 Mar 2000</p>
-<p>Section 21.3.6.8 describes the basic_string::compare function this way:</p>
-<blockquote>
- <pre>21.3.6.8 - basic_string::compare [lib.string::compare]
-
-int compare(size_type pos1, size_type n1,
- const basic_string&lt;charT,traits,Allocator&gt;&amp; str ,
- size_type pos2 , size_type n2 ) const;
-
--4- Returns:
-
- basic_string&lt;charT,traits,Allocator&gt;(*this,pos1,n1).compare(
- basic_string&lt;charT,traits,Allocator&gt;(str,pos2,n2)) .</pre>
-</blockquote>
-<p>and the constructor that's implicitly called by the above is
-defined to throw an out-of-range exception if pos &gt; str.size(). See
-section 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a> paragraph 4.</p>
-
-<p>On the other hand, the compare function descriptions themselves don't have
-"Throws: " clauses and according to 17.3.1.3, paragraph 3, elements
-that do not apply to a function are omitted.</p>
-<p>So it seems there is an inconsistency in the standard -- are the
-"Effects" clauses correct, or are the "Throws" clauses
-missing?</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> paragraph 3, the footnote 148 attached to
-the sentence "Descriptions of function semantics contain the
-following elements (as appropriate):", insert the word
-"further" so that the foot note reads:</p>
-<blockquote>
- <p>To save space, items that do not apply to a function are
- omitted. For example, if a function does not specify any further
- preconditions, there will be no "Requires" paragraph.</p>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The standard is somewhat inconsistent, but a failure to note a
-throw condition in a throws clause does not grant permission not to
-throw. The inconsistent wording is in a footnote, and thus
-non-normative. The proposed resolution from the LWG clarifies the
-footnote.</p>
-<hr>
-<a name="223"><h3>223.&nbsp;reverse algorithm should use iter_swap rather than swap</h3></a><p><b>Section:</b>&nbsp;25.2.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.reverse"> [lib.alg.reverse]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;21 Mar 2000</p>
-<p>Shouldn't the effects say "applies iter_swap to all pairs..."?</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 25.2.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.reverse"> [lib.alg.reverse]</a>, replace:</p>
- <blockquote>
- Effects: For each non-negative integer i &lt;= (last - first)/2,
- applies swap to all pairs of iterators first + i, (last - i) - 1.
- </blockquote>
-<p>with:</p>
- <blockquote>
- Effects: For each non-negative integer i &lt;= (last - first)/2,
- applies iter_swap to all pairs of iterators first + i, (last - i) - 1.
- </blockquote>
-<hr>
-<a name="224"><h3>224.&nbsp;clear() complexity for associative containers refers to undefined N</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Ed Brey&nbsp; <b>Date:</b>&nbsp;23 Mar 2000</p>
-<p>In the associative container requirements table in 23.1.2 paragraph 7,
-a.clear() has complexity "log(size()) + N". However, the meaning of N
-is not defined.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In the associative container requirements table in 23.1.2 paragraph
-7, the complexity of a.clear(), change "log(size()) + N" to
-"linear in <tt>size()</tt>".</p>
-<p><b>Rationale:</b></p>
-<p>It's the "log(size())", not the "N", that is in
-error: there's no difference between <i>O(N)</i> and <i>O(N +
-log(N))</i>. The text in the standard is probably an incorrect
-cut-and-paste from the range version of <tt>erase</tt>.</p>
-<hr>
-<a name="225"><h3>225.&nbsp;std:: algorithms use of other unqualified algorithms</h3></a><p><b>Section:</b>&nbsp;17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;01 Apr 2000</p>
-<p>Are algorithms in std:: allowed to use other algorithms without qualification, so functions in
-user namespaces might be found through Koenig lookup?</p>
-<p>For example, a popular standard library implementation includes this
-implementation of std::unique:</p>
-<blockquote>
-<pre>namespace std {
- template &lt;class _ForwardIter&gt;
- _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
- __first = adjacent_find(__first, __last);
- return unique_copy(__first, __last, __first);
- }
- }</pre>
-</blockquote>
-<p>Imagine two users on opposite sides of town, each using unique on his own
-sequences bounded by my_iterators . User1 looks at his standard library
-implementation and says, "I know how to implement a more efficient
-unique_copy for my_iterators", and writes:</p>
-<blockquote>
-<pre>namespace user1 {
- class my_iterator;
- // faster version for my_iterator
- my_iterator unique_copy(my_iterator, my_iterator, my_iterator);
- }</pre>
-</blockquote>
-<p>user1::unique_copy() is selected by Koenig lookup, as he intended.</p>
-<p>User2 has other needs, and writes:</p>
-<blockquote>
-<pre>namespace user2 {
- class my_iterator;
- // Returns true iff *c is a unique copy of *a and *b.
- bool unique_copy(my_iterator a, my_iterator b, my_iterator c);
- }</pre>
-</blockquote>
-<p>User2 is shocked to find later that his fully-qualified use of
-std::unique(user2::my_iterator, user2::my_iterator, user2::my_iterator) fails to
-compile (if he's lucky). Looking in the standard, he sees the following Effects
-clause for unique():</p>
-<blockquote>
- <p>Effects: Eliminates all but the first element from every consecutive group
- of equal elements referred to by the iterator i in the range [first, last) for
- which the following corresponding conditions hold: *i == *(i - 1) or pred(*i,
- *(i - 1)) != false</p>
-</blockquote>
-<p>The standard gives user2 absolutely no reason to think he can interfere with
-std::unique by defining names in namespace user2. His standard library has been
-built with the template export feature, so he is unable to inspect the
-implementation. User1 eventually compiles his code with another compiler, and
-his version of unique_copy silently stops being called. Eventually, he realizes
-that he was depending on an implementation detail of his library and had no
-right to expect his unique_copy() to be called portably.</p>
-<p>On the face of it, and given above scenario, it may seem obvious that the
-implementation of unique() shown is non-conforming because it uses unique_copy()
-rather than ::std::unique_copy(). Most standard library implementations,
-however, seem to disagree with this notion.</p>
-<p> <i>[Tokyo:&nbsp; Steve Adamczyk from
-the core working group indicates that "std::" is sufficient;&nbsp;
-leading "::" qualification is not required because any namespace
-qualification is sufficient to suppress Koenig lookup.]</i></p>
-<p><b>Proposed resolution:</b></p>
-<p>Add a paragraph and a note at the end of
-17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a>:</p>
-<blockquote>
-
-<p>Unless otherwise specified, no global or non-member function in the
-standard library shall use a function from another namespace which is
-found through <i>argument-dependent name lookup</i> (3.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.lookup.koenig"> [basic.lookup.koenig]</a>).</p>
-
-<p>[Note: the phrase "unless otherwise specified" is intended to
-allow Koenig lookup in cases like that of ostream_iterators:<br>
-
-<br>
- Effects:</p>
- <blockquote>
-<p>*out_stream &lt;&lt; value;<br>
- if(delim != 0) *out_stream &lt;&lt; delim;<br>
- return (*this);</p>
- <p>--end note]</p>
- </blockquote>
-</blockquote>
-
-<p><i>[Tokyo: The LWG agrees that this is a defect in the standard, but
-is as yet unsure if the proposed resolution is the best
-solution. Furthermore, the LWG believes that the same problem of
-unqualified library names applies to wording in the standard itself,
-and has opened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> accordingly. Any resolution of
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be coordinated with the resolution of
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>.]</i></p>
-
-<p><i>[Toronto: The LWG is not sure if this is a defect in the
-standard. Most LWG members believe that an implementation of
-<tt>std::unique</tt> like the one quoted in this issue is already
-illegal, since, under certain circumstances, its semantics are not
-those specified in the standard. The standard's description of
-<tt>unique</tt> does not say that overloading <tt>adjacent_find</tt>
-should have any effect.]</i></p>
-
-<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
-225, 226, and 229. Their conclusion was that the issues should be
-separated into an LWG portion (Howard's paper, N1387=02-0045), and a
-EWG portion (Dave will write a proposal). The LWG and EWG had
-(separate) discussions of this plan the next day. The proposed
-resolution for this issue is in accordance with Howard's paper.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>It could be argued that this proposed isn't strictly necessary,
- that the Standard doesn't grant implementors license to write a
- standard function that behaves differently than specified in the
- Standard just because of an unrelated user-defined name in some
- other namespace. However, this is at worst a clarification. It is
- surely right that algorithsm shouldn't pick up random names, that
- user-defined names should have no effect unless otherwise specified.
- Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> deals with the question of when it is
- appropriate for the standard to explicitly specify otherwise.</p>
-<hr>
-<a name="226"><h3>226.&nbsp;User supplied specializations or overloads of namespace std function templates</h3></a><p><b>Section:</b>&nbsp;17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;01 Apr 2000</p>
-<p>The issues are:&nbsp;</p>
-<p>1. How can a 3rd party library implementor (lib1) write a version of a standard
-algorithm which is specialized to work with his own class template?&nbsp;</p>
-<p>2. How can another library implementor (lib2) write a generic algorithm which
-will take advantage of the specialized algorithm in lib1?</p>
-<p>This appears to be the only viable answer under current language rules:</p>
-<blockquote>
- <pre>namespace lib1
-{
- // arbitrary-precision numbers using T as a basic unit
- template &lt;class T&gt;
- class big_num { //...
- };
- </pre>
- <pre> // defining this in namespace std is illegal (it would be an
- // overload), so we hope users will rely on Koenig lookup
- template &lt;class T&gt;
- void swap(big_int&lt;T&gt;&amp;, big_int&lt;T&gt;&amp;);
-}</pre>
- <pre>#include &lt;algorithm&gt;
-namespace lib2
-{
- template &lt;class T&gt;
- void generic_sort(T* start, T* end)
- {
- ...
- // using-declaration required so we can work on built-in types
- using std::swap;
- // use Koenig lookup to find specialized algorithm if available
- swap(*x, *y);
- }
-}</pre>
-</blockquote>
-<p>This answer has some drawbacks. First of all, it makes writing lib2 difficult
-and somewhat slippery. The implementor needs to remember to write the
-using-declaration, or generic_sort will fail to compile when T is a built-in
-type. The second drawback is that the use of this style in lib2 effectively
-"reserves" names in any namespace which defines types which may
-eventually be used with lib2. This may seem innocuous at first when applied to
-names like swap, but consider more ambiguous names like unique_copy() instead.
-It is easy to imagine the user wanting to define these names differently in his
-own namespace. A definition with semantics incompatible with the standard
-library could cause serious problems (see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>).</p>
-<p>Why, you may ask, can't we just partially specialize std::swap()? It's
-because the language doesn't allow for partial specialization of function
-templates. If you write:</p>
-<blockquote>
- <pre>namespace std
-{
- template &lt;class T&gt;
- void swap(lib1::big_int&lt;T&gt;&amp;, lib1::big_int&lt;T&gt;&amp;);
-}</pre>
-</blockquote>
-<p>You have just overloaded std::swap, which is illegal under the current
-language rules. On the other hand, the following full specialization is legal:</p>
-<blockquote>
- <pre>namespace std
-{
- template &lt;&gt;
- void swap(lib1::other_type&amp;, lib1::other_type&amp;);
-}</pre>
-</blockquote>
-
-<p>This issue reflects concerns raised by the "Namespace issue
-with specialized swap" thread on comp.lang.c++.moderated. A
-similar set of concerns was earlier raised on the boost.org mailing
-list and the ACCU-general mailing list. Also see library reflector
-message c++std-lib-7354.</p>
-
-<p>
-J. C. van Winkel points out (in c++std-lib-9565) another unexpected
-fact: it's impossible to output a container of std::pair's using copy
-and an ostream_iterator, as long as both pair-members are built-in or
-std:: types. That's because a user-defined operator&lt;&lt; for (for
-example) std::pair&lt;const std::string, int&gt; will not be found:
-lookup for operator&lt;&lt; will be performed only in namespace std.
-Opinions differed on whether or not this was a defect, and, if so,
-whether the defect is that something is wrong with user-defined
-functionality and std, or whether it's that the standard library does
-not provide an operator&lt;&lt; for std::pair&lt;&gt;.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Adopt the wording proposed in Howard Hinnant's paper
- N1523=03-0106, "Proposed Resolution To LWG issues 225, 226, 229".</p>
-
-
-<p><i>[Tokyo: Summary, "There is no conforming way to extend
-std::swap for user defined templates."&nbsp; The LWG agrees that
-there is a problem. Would like more information before
-proceeding. This may be a core issue. Core issue 229 has been opened
-to discuss the core aspects of this problem. It was also noted that
-submissions regarding this issue have been received from several
-sources, but too late to be integrated into the issues list.
-]</i></p>
-
-<p><i>[Post-Tokyo: A paper with several proposed resolutions,
-J16/00-0029==WG21/N1252, "Shades of namespace std functions
-" by Alan Griffiths, is in the Post-Tokyo mailing. It
-should be considered a part of this issue.]</i></p>
-
-<p><i>[Toronto: Dave Abrahams and Peter Dimov have proposed a
-resolution that involves core changes: it would add partial
-specialization of function template. The Core Working Group is
-reluctant to add partial specialization of function templates. It is
-viewed as a large change, CWG believes that proposal presented leaves
-some syntactic issues unanswered; if the CWG does add partial
-specialization of function templates, it wishes to develop its own
-proposal. The LWG continues to believe that there is a serious
-problem: there is no good way for users to force the library to use
-user specializations of generic standard library functions, and in
-certain cases (e.g. transcendental functions called by
-<tt>valarray</tt> and <tt>complex</tt>) this is important. Koenig
-lookup isn't adequate, since names within the library must be
-qualified with <tt>std</tt> (see issue 225), specialization doesn't
-work (we don't have partial specialization of function templates), and
-users aren't permitted to add overloads within namespace std.
-]</i></p>
-
-<p><i>[Copenhagen: Discussed at length, with no consensus. Relevant
-papers in the pre-Copenhagen mailing: N1289, N1295, N1296. Discussion
-focused on four options. (1) Relax restrictions on overloads within
-namespace std. (2) Mandate that the standard library use unqualified
-calls for <tt>swap</tt> and possibly other functions. (3) Introduce
-helper class templates for <tt>swap</tt> and possibly other functions.
-(4) Introduce partial specialization of function templates. Every
-option had both support and opposition. Straw poll (first number is
-support, second is strongly opposed): (1) 6, 4; (2) 6, 7; (3) 3, 8;
-(4) 4, 4.]</i></p>
-
-<p><i>[Redmond: Discussed, again no consensus. Herb presented an
-argument that a user who is defining a type <tt>T</tt> with an
-associated <tt>swap</tt> should not be expected to put that
-<tt>swap</tt> in namespace std, either by overloading or by partial
-specialization. The argument is that <tt>swap</tt> is part of
-<tt>T</tt>'s interface, and thus should to in the same namespace as
-<tt>T</tt> and only in that namespace. If we accept this argument,
-the consequence is that standard library functions should use
-unqualified call of <tt>swap</tt>. (And which other functions? Any?)
-A small group (Nathan, Howard, Jeremy, Dave, Matt, Walter, Marc) will
-try to put together a proposal before the next meeting.]</i></p>
-
-<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
-225, 226, and 229. Their conclusion was that the issues should be
-separated into an LWG portion (Howard's paper, N1387=02-0045), and a
-EWG portion (Dave will write a proposal). The LWG and EWG had
-(separate) discussions of this plan the next day. The proposed
-resolution is the one proposed by Howard.]</i></p>
-
-<p><i>[Santa Cruz: the LWG agreed with the general direction of
- Howard's paper, N1387. (Roughly: Koenig lookup is disabled unless
- we say otherwise; this issue is about when we do say otherwise.)
- However, there were concerns about wording. Howard will provide new
- wording. Bill and Jeremy will review it.]</i></p>
-
-<p><i>[Kona: Howard proposed the new wording. The LWG accepted his
- proposed resolution.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>Informally: introduce a Swappable concept, and specify that the
- value types of the iterators passed to certain standard algorithms
- (such as iter_swap, swap_ranges, reverse, rotate, and sort) conform
- to that concept. The Swappable concept will make it clear that
- these algorithms use unqualified lookup for the calls
- to <tt>swap</tt>. Also, in <font color="red">26.3.3.3</font> paragraph 1,
- state that the valarray transcendentals use unqualified lookup.</p>
-<hr>
-<a name="227"><h3>227.&nbsp;std::swap() should require CopyConstructible or DefaultConstructible arguments</h3></a><p><b>Section:</b>&nbsp;25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;09 Apr 2000</p>
-<p>25.2.2 reads:</p>
-<blockquote>
- <p><tt> template&lt;class T&gt; void swap(T&amp; a, T&amp; b);</tt><br>
- <br>
- Requires: Type T is Assignable (_lib.container.requirements_).<br>
- Effects: Exchanges values stored in two locations.</p>
-</blockquote>
-<p>The only reasonable** generic implementation of swap requires construction of a
- new temporary copy of one of its arguments:</p>
-<blockquote>
-<pre>template&lt;class T&gt; void swap(T&amp; a, T&amp; b);
- {
- T tmp(a);
- a = b;
- b = tmp;
- }</pre>
-</blockquote>
-<p>But a type which is only Assignable cannot be swapped by this implementation.</p>
-<p>**Yes, there's also an unreasonable implementation which would require T to be
- DefaultConstructible instead of CopyConstructible. I don't think this is worthy
- of consideration:</p>
-<blockquote>
-<pre>template&lt;class T&gt; void swap(T&amp; a, T&amp; b);
-{
- T tmp;
- tmp = a;
- a = b;
- b = tmp;
-}</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.2.2 paragraph 1 from:</p>
-<blockquote>
-<p> Requires: Type T is Assignable (23.1).</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
-<p> Requires: Type T is CopyConstructible (20.1.3) and Assignable (23.1)</p>
-</blockquote>
-<hr>
-<a name="228"><h3>228.&nbsp;Incorrect specification of "..._byname" facets</h3></a><p><b>Section:</b>&nbsp;22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;20 Apr 2000</p>
-<p>The sections 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a>, 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a>,
-<font color="red">22.2.1.6</font>, 22.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct.byname"> [lib.locale.numpunct.byname]</a>, 22.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.collate.byname"> [lib.locale.collate.byname]</a>, 22.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.byname"> [lib.locale.time.put.byname]</a>, 22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a>, and 22.2.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.messages.byname"> [lib.locale.messages.byname]</a> overspecify the
-definitions of the "..._byname" classes by listing a bunch
-of virtual functions. At the same time, no semantics of these
-functions are defined. Real implementations do not define these
-functions because the functional part of the facets is actually
-implemented in the corresponding base classes and the constructor of
-the "..._byname" version just provides suitable date used by
-these implementations. For example, the 'numpunct' methods just return
-values from a struct. The base class uses a statically initialized
-struct while the derived version reads the contents of this struct
-from a table. However, no virtual function is defined in
-'numpunct_byname'.</p>
-
-<p>For most classes this does not impose a problem but specifically
-for 'ctype' it does: The specialization for 'ctype_byname&lt;char&gt;'
-is required because otherwise the semantics would change due to the
-virtual functions defined in the general version for 'ctype_byname':
-In 'ctype&lt;char&gt;' the method 'do_is()' is not virtual but it is
-made virtual in both 'ctype&lt;cT&gt;' and 'ctype_byname&lt;cT&gt;'.
-Thus, a class derived from 'ctype_byname&lt;char&gt;' can tell whether
-this class is specialized or not under the current specification:
-Without the specialization, 'do_is()' is virtual while with
-specialization it is not virtual.</p>
-<p><b>Proposed resolution:</b></p>
-<p>&nbsp; Change section 22.2.1.2 (lib.locale.ctype.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT&gt;
- class ctype_byname : public ctype&lt;charT&gt; {
- public:
- typedef ctype&lt;charT&gt;::mask mask;
- explicit ctype_byname(const char*, size_t refs = 0);
- protected:
- ~ctype_byname(); // virtual
- };
- }</pre>
-<p>&nbsp; Change section 22.2.1.6 (lib.locale.codecvt.byname) to become:</p>
-<pre> namespace std {
- template &lt;class internT, class externT, class stateT&gt;
- class codecvt_byname : public codecvt&lt;internT, externT, stateT&gt; {
- public:
- explicit codecvt_byname(const char*, size_t refs = 0);
- protected:
- ~codecvt_byname(); // virtual
- };
- }
-</pre>
-<p>&nbsp; Change section 22.2.3.2 (lib.locale.numpunct.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT&gt;
- class numpunct_byname : public numpunct&lt;charT&gt; {
- // this class is specialized for char and wchar_t.
- public:
- typedef charT char_type;
- typedef basic_string&lt;charT&gt; string_type;
- explicit numpunct_byname(const char*, size_t refs = 0);
- protected:
- ~numpunct_byname(); // virtual
- };
- }</pre>
-<p>&nbsp; Change section 22.2.4.2 (lib.locale.collate.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT&gt;
- class collate_byname : public collate&lt;charT&gt; {
- public:
- typedef basic_string&lt;charT&gt; string_type;
- explicit collate_byname(const char*, size_t refs = 0);
- protected:
- ~collate_byname(); // virtual
- };
- }</pre>
-<p>&nbsp; Change section 22.2.5.2 (lib.locale.time.get.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT, class InputIterator = istreambuf_iterator&lt;charT&gt; &gt;
- class time_get_byname : public time_get&lt;charT, InputIterator&gt; {
- public:
- typedef time_base::dateorder dateorder;
- typedef InputIterator iter_type</pre>
-<pre> explicit time_get_byname(const char*, size_t refs = 0);
- protected:
- ~time_get_byname(); // virtual
- };
- }</pre>
-<p>&nbsp; Change section 22.2.5.4 (lib.locale.time.put.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT, class OutputIterator = ostreambuf_iterator&lt;charT&gt; &gt;
- class time_put_byname : public time_put&lt;charT, OutputIterator&gt;
- {
- public:
- typedef charT char_type;
- typedef OutputIterator iter_type;</pre>
-<pre> explicit time_put_byname(const char*, size_t refs = 0);
- protected:
- ~time_put_byname(); // virtual
- };
- }"</pre>
-<p>&nbsp; Change section 22.2.6.4 (lib.locale.moneypunct.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT, bool Intl = false&gt;
- class moneypunct_byname : public moneypunct&lt;charT, Intl&gt; {
- public:
- typedef money_base::pattern pattern;
- typedef basic_string&lt;charT&gt; string_type;</pre>
-<pre> explicit moneypunct_byname(const char*, size_t refs = 0);
- protected:
- ~moneypunct_byname(); // virtual
- };
- }</pre>
-<p>&nbsp; Change section 22.2.7.2 (lib.locale.messages.byname) to become:</p>
-<pre> namespace std {
- template &lt;class charT&gt;
- class messages_byname : public messages&lt;charT&gt; {
- public:
- typedef messages_base::catalog catalog;
- typedef basic_string&lt;charT&gt; string_type;</pre>
-<pre> explicit messages_byname(const char*, size_t refs = 0);
- protected:
- ~messages_byname(); // virtual
- };
- }</pre>
-<p>Remove section 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> completely (because in
-this case only those members are defined to be virtual which are
-defined to be virtual in 'ctype&lt;cT&gt;'.)</p>
-
-<p><i>[Post-Tokyo: Dietmar Kühl submitted this issue at the request of
-the LWG to solve the underlying problems raised by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>.]</i></p>
-
-<p><i>[Copenhagen: proposed resolution was revised slightly, to remove
-three last virtual functions from <tt>messages_byname</tt>.]</i></p>
-
-<hr>
-<a name="229"><h3>229.&nbsp;Unqualified references of other library entities</h3></a><p><b>Section:</b>&nbsp;17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;19 Apr 2000</p>
-<p>Throughout the library chapters, the descriptions of library entities refer
-to other library entities without necessarily qualifying the names.</p>
-
-<p>For example, section 25.2.2 "Swap" describes the effect of
-swap_ranges in terms of the unqualified name "swap". This section
-could reasonably be interpreted to mean that the library must be implemented so
-as to do a lookup of the unqualified name "swap", allowing users to
-override any ::std::swap function when Koenig lookup applies.</p>
-
-<p>Although it would have been best to use explicit qualification with
-"::std::" throughout, too many lines in the standard would have to be
-adjusted to make that change in a Technical Corrigendum.</p>
-
-<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>, which addresses qualification of
-<tt>size_t</tt>, is a special case of this.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>To section 17.4.1.1 "Library contents" Add the following paragraph:</p>
-<blockquote>
- <p>Whenever a name x defined in the standard library is mentioned, the name x
- is assumed to be fully qualified as ::std::x, unless explicitly described
- otherwise. For example, if the Effects section for library function F is
- described as calling library function G, the function ::std::G is meant.</p>
-</blockquote>
-
-<p><i>[Post-Tokyo: Steve Clamage submitted this issue at the request of
-the LWG to solve a problem in the standard itself similar to the
-problem within implementations of library identified by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>. Any resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be
-coordinated with the resolution of this issue.]</i></p>
-
-<p><i>[post-Toronto: Howard is undecided about whether it is
-appropriate for all standard library function names referred to in
-other standard library functions to be explicitly qualified by
-<tt>std</tt>: it is common advice that users should define global
-functions that operate on their class in the same namespace as the
-class, and this requires argument-dependent lookup if those functions
-are intended to be called by library code. Several LWG members are
-concerned that valarray appears to require argument-dependent lookup,
-but that the wording may not be clear enough to fall under
-"unless explicitly described otherwise".]</i></p>
-
-<p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues
-225, 226, and 229. Their conclusion was that the issues should be
-separated into an LWG portion (Howard's paper, N1387=02-0045), and a
-EWG portion (Dave will write a proposal). The LWG and EWG had
-(separate) discussions of this plan the next day. This paper resolves
-issues 225 and 226. In light of that resolution, the proposed
-resolution for the current issue makes sense.]</i></p>
-
-<hr>
-<a name="230"><h3>230.&nbsp;Assignable specified without also specifying CopyConstructible</h3></a><p><b>Section:</b>&nbsp;17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;26 Apr 2000</p>
-<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> identified an instance (std::swap) where
-Assignable was specified without also specifying
-CopyConstructible. The LWG asked that the standard be searched to
-determine if the same defect existed elsewhere.</p>
-
-<p>There are a number of places (see proposed resolution below) where
-Assignable is specified without also specifying
-CopyConstructible. There are also several cases where both are
-specified. For example, 26.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.req"> [lib.rand.req]</a>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> table 65 for value_type:
-change "T is Assignable" to "T is CopyConstructible and
-Assignable"
-</p>
-
-<p>In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> table 69 X::key_type; change
-"Key is Assignable" to "Key is
-CopyConstructible and Assignable"<br>
-</p>
-
-<p>In 24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a> paragraph 1, change:
-</p>
-<blockquote>
-<p> A class or a built-in type X satisfies the requirements of an
-output iterator if X is an Assignable type (23.1) and also the
-following expressions are valid, as shown in Table 73:
-</p>
-</blockquote>
-<p>to:
-</p>
-<blockquote>
-<p> A class or a built-in type X satisfies the requirements of an
-output iterator if X is a CopyConstructible (20.1.3) and Assignable
-type (23.1) and also the following expressions are valid, as shown in
-Table 73:
-</p>
-</blockquote>
-
-<p><i>[Post-Tokyo: Beman Dawes submitted this issue at the request of
-the LWG. He asks that the 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> and 25.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.fill"> [lib.alg.fill]</a> changes be studied carefully, as it is not clear that
-CopyConstructible is really a requirement and may be
-overspecification.]</i></p>
-
-<p><i>[Portions of the resolution for issue 230 have been superceded by
-the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#276">276</a>.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The original proposed resolution also included changes to input
-iterator, fill, and replace. The LWG believes that those changes are
-not necessary. The LWG considered some blanket statement, where an
-Assignable type was also required to be Copy Constructible, but
-decided against this because fill and replace really don't require the
-Copy Constructible property.</p>
-<hr>
-<a name="231"><h3>231.&nbsp;Precision in iostream?</h3></a><p><b>Section:</b>&nbsp;22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;James Kanze, Stephen Clamage&nbsp; <b>Date:</b>&nbsp; 25 Apr 2000</p>
-<p>What is the following program supposed to output?</p>
-<pre>#include &lt;iostream&gt;
-
- int
- main()
- {
- std::cout.setf( std::ios::scientific , std::ios::floatfield ) ;
- std::cout.precision( 0 ) ;
- std::cout &lt;&lt; 1.00 &lt;&lt; '\n' ;
- return 0 ;
- }</pre>
-<p>From my C experience, I would expect "1e+00"; this is what
-<tt>printf("%.0e" , 1.00 );</tt> does. G++ outputs
-"1.000000e+00".</p>
-
-<p>The only indication I can find in the standard is 22.2.2.2.2/11,
-where it says "For conversion from a floating-point type, if
-(flags &amp; fixed) != 0 or if str.precision() &gt; 0, then
-str.precision() is specified in the conversion specification."
-This is an obvious error, however, fixed is not a mask for a field,
-but a value that a multi-bit field may take -- the results of and'ing
-fmtflags with ios::fixed are not defined, at least not if
-ios::scientific has been set. G++'s behavior corresponds to what might
-happen if you do use (flags &amp; fixed) != 0 with a typical
-implementation (floatfield == 3 &lt;&lt; something, fixed == 1
-&lt;&lt; something, and scientific == 2 &lt;&lt; something).</p>
-
-<p>Presumably, the intent is either (flags &amp; floatfield) != 0, or
-(flags &amp; floatfield) == fixed; the first gives something more or
-less like the effect of precision in a printf floating point
-conversion. Only more or less, of course. In order to implement printf
-formatting correctly, you must know whether the precision was
-explicitly set or not. Say by initializing it to -1, instead of 6, and
-stating that for floating point conversions, if precision &lt; -1, 6
-will be used, for fixed point, if precision &lt; -1, 1 will be used,
-etc. Plus, of course, if precision == 0 and flags &amp; floatfield ==
-0, 1 should be = used. But it probably isn't necessary to emulate all
-of the anomalies of printf:-).</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Replace 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, paragraph 11, with the following
-sentence:
-</p>
-<blockquote>
-For conversion from a floating-point type,
-<tt><i>str</i>.precision()</tt> is specified in the conversion
-specification.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The floatfield determines whether numbers are formatted as if
-with %f, %e, or %g. If the <tt>fixed</tt> bit is set, it's %f,
-if <tt>scientific</tt> it's %e, and if both bits are set, or
-neither, it's %g.</p>
-<p>Turning to the C standard, a precision of 0 is meaningful
-for %f and %e. For %g, precision 0 is taken to be the same as
-precision 1.</p>
-<p>The proposed resolution has the effect that if neither
-<tt>fixed</tt> nor <tt>scientific</tt> is set we'll be
-specifying a precision of 0, which will be internally
-turned into 1. There's no need to call it out as a special
-case.</p>
-<p>The output of the above program will be "1e+00".</p>
-
-<p><i>[Post-Curaçao: Howard provided improved wording covering the case
-where precision is 0 and mode is %g.]</i></p>
-
-<hr>
-<a name="232"><h3>232.&nbsp;"depends" poorly defined in 17.4.3.1</h3></a><p><b>Section:</b>&nbsp;17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;18 Apr 2000</p>
-<p>17.4.3.1/1 uses the term "depends" to limit the set of allowed
-specializations of standard templates to those that "depend on a
-user-defined name of external linkage."</p>
-<p>This term, however, is not adequately defined, making it possible to
-construct a specialization that is, I believe, technically legal according to
-17.4.3.1/1, but that specializes a standard template for a built-in type such as
-'int'.</p>
-<p>The following code demonstrates the problem:</p>
-<blockquote>
- <pre>#include &lt;algorithm&gt;</pre>
- <pre>template&lt;class T&gt; struct X
-{
- typedef T type;
-};</pre>
- <pre>namespace std
-{
- template&lt;&gt; void swap(::X&lt;int&gt;::type&amp; i, ::X&lt;int&gt;::type&amp; j);
-}</pre>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Change "user-defined name" to "user-defined
-type".</p>
-<p><b>Rationale:</b></p>
-<p>This terminology is used in section 2.5.2 and 4.1.1 of <i>The C++
-Programming Language</i>. It disallows the example in the issue,
-since the underlying type itself is not user-defined. The only
-possible problem I can see is for non-type templates, but there's no
-possible way for a user to come up with a specialization for bitset,
-for example, that might not have already been specialized by the
-implementor?</p>
-
-<p><i>[Toronto: this may be related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a>.]</i></p>
-
-<p><i>[post-Toronto: Judy provided the above proposed resolution and
-rationale.]</i></p>
-<hr>
-<a name="234"><h3>234.&nbsp;Typos in allocator definition</h3></a><p><b>Section:</b>&nbsp;20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;24 Apr 2000</p>
-<p>In paragraphs 12 and 13 the effects of <tt>construct()</tt> and
-<tt>destruct()</tt> are described as returns but the functions actually
-return <tt>void</tt>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Substitute "Returns" by "Effect".</p>
-<hr>
-<a name="235"><h3>235.&nbsp;No specification of default ctor for reverse_iterator</h3></a><p><b>Section:</b>&nbsp;24.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterator"> [lib.reverse.iterator]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;24 Apr 2000</p>
-<p>The declaration of <tt>reverse_iterator</tt> lists a default
-constructor. However, no specification is given what this constructor
-should do.</p>
-<p><b>Proposed resolution:</b></p>
- <p>In section 24.4.1.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.cons"> [lib.reverse.iter.cons]</a> add the following
- paragraph:</p>
- <blockquote>
- <p><tt>reverse_iterator()</tt></p>
-
- <p>Default initializes <tt>current</tt>. Iterator operations
- applied to the resulting iterator have defined behavior if and
- only if the corresponding operations are defined on a default
- constructed iterator of type <tt>Iterator</tt>.</p>
- </blockquote>
- <p><i>[pre-Copenhagen: Dietmar provide wording for proposed
- resolution.]</i></p>
-<hr>
-<a name="237"><h3>237.&nbsp;Undefined expression in complexity specification</h3></a><p><b>Section:</b>&nbsp;23.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.cons"> [lib.deque.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;24 Apr 2000</p>
-<p>The complexity specification in paragraph 6 says that the complexity
-is linear in <tt>first - last</tt>. Even if <tt>operator-()</tt> is
-defined on iterators this term is in general undefined because it
-would have to be <tt>last - first</tt>.</p>
-<p><b>Proposed resolution:</b></p>
- <p>Change paragraph 6 from</p>
- <blockquote>Linear in <i>first - last</i>.</blockquote>
- <p>to become</p>
- <blockquote>Linear in <i>distance(first, last)</i>.</blockquote>
-<hr>
-<a name="238"><h3>238.&nbsp;Contradictory results of stringbuf initialization.</h3></a><p><b>Section:</b>&nbsp;27.7.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.cons"> [lib.stringbuf.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dietmar Kühl&nbsp; <b>Date:</b>&nbsp;11 May 2000</p>
-<p>In 27.7.1.1 paragraph 4 the results of calling the constructor of
-'basic_stringbuf' are said to be <tt>str() == str</tt>. This is fine
-that far but consider this code:</p>
-
-<pre> std::basic_stringbuf&lt;char&gt; sbuf("hello, world", std::ios_base::openmode(0));
- std::cout &lt;&lt; "'" &lt;&lt; sbuf.str() &lt;&lt; "'\n";
-</pre>
-
-<p>Paragraph 3 of 27.7.1.1 basically says that in this case neither
-the output sequence nor the input sequence is initialized and
-paragraph 2 of 27.7.1.2 basically says that <tt>str()</tt> either
-returns the input or the output sequence. None of them is initialized,
-ie. both are empty, in which case the return from <tt>str()</tt> is
-defined to be <tt>basic_string&lt;cT&gt;()</tt>.</p>
-
-<p>However, probably only test cases in some testsuites will detect this
-"problem"...</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove 27.7.1.1 paragraph 4.</p>
-<p><b>Rationale:</b></p>
-<p>We could fix 27.7.1.1 paragraph 4, but there would be no point. If
-we fixed it, it would say just the same thing as text that's already
-in the standard.</p>
-<hr>
-<a name="239"><h3>239.&nbsp;Complexity of unique() and/or unique_copy incorrect</h3></a><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;May 15 2000</p>
-<p>The complexity of unique and unique_copy are inconsistent with each
-other and inconsistent with the implementations.&nbsp; The standard
-specifies:</p>
-
-<p>for unique():</p>
-
-<blockquote>-3- Complexity: If the range (last - first) is not empty, exactly
-(last - first) - 1 applications of the corresponding predicate, otherwise
-no applications of the predicate.</blockquote>
-
-<p>for unique_copy():</p>
-
-<blockquote>-7- Complexity: Exactly last - first applications of the corresponding
-predicate.</blockquote>
-
-<p>
-The implementations do it the other way round: unique() applies the
-predicate last-first times and unique_copy() applies it last-first-1
-times.</p>
-
-<p>As both algorithms use the predicate for pair-wise comparison of
-sequence elements I don't see a justification for unique_copy()
-applying the predicate last-first times, especially since it is not
-specified to which pair in the sequence the predicate is applied
-twice.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change both complexity sections in 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> to:</p>
-
-<blockquote>Complexity: For nonempty ranges, exactly last - first - 1
-applications of the corresponding predicate.</blockquote>
-
-<hr>
-<a name="240"><h3>240.&nbsp;Complexity of adjacent_find() is meaningless</h3></a><p><b>Section:</b>&nbsp;25.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.adjacent.find"> [lib.alg.adjacent.find]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;May 15 2000</p>
-<p>The complexity section of adjacent_find is defective:</p>
-
-<blockquote>
-<pre>template &lt;class ForwardIterator&gt;
-ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last
- BinaryPredicate pred);
-</pre>
-
-<p>-1- Returns: The first iterator i such that both i and i + 1 are in
-the range [first, last) for which the following corresponding
-conditions hold: *i == *(i + 1), pred(*i, *(i + 1)) != false. Returns
-last if no such iterator is found.</p>
-
-<p>-2- Complexity: Exactly find(first, last, value) - first applications
-of the corresponding predicate.
-</p>
-</blockquote>
-
-<p>In the Complexity section, it is not defined what "value"
-is supposed to mean. My best guess is that "value" means an
-object for which one of the conditions pred(*i,value) or
-pred(value,*i) is true, where i is the iterator defined in the Returns
-section. However, the value type of the input sequence need not be
-equality-comparable and for this reason the term find(first, last,
-value) - first is meaningless.</p>
-
-<p>A term such as find_if(first, last, bind2nd(pred,*i)) - first or
-find_if(first, last, bind1st(pred,*i)) - first might come closer to
-the intended specification. Binders can only be applied to function
-objects that have the function call operator declared const, which is
-not required of predicates because they can have non-const data
-members. For this reason, a specification using a binder could only be
-an "as-if" specification.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the complexity section in 25.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.adjacent.find"> [lib.alg.adjacent.find]</a> to:</p>
-<blockquote>
-For a nonempty range, exactly <tt>min((<i>i</i> - <i>first</i>) + 1,
-(<i>last</i> - <i>first</i>) - 1)</tt> applications of the
-corresponding predicate, where <i>i</i> is <tt>adjacent_find</tt>'s
-return value.
-</blockquote>
-
-<p><i>[Copenhagen: the original resolution specified an upper
-bound. The LWG preferred an exact count.]</i></p>
-
-<hr>
-<a name="241"><h3>241.&nbsp;Does unique_copy() require CopyConstructible and Assignable?</h3></a><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;May 15 2000</p>
-
-<p>Some popular implementations of unique_copy() create temporary
-copies of values in the input sequence, at least if the input iterator
-is a pointer. Such an implementation is built on the assumption that
-the value type is CopyConstructible and Assignable.</p>
-
-<p>It is common practice in the standard that algorithms explicitly
-specify any additional requirements that they impose on any of the
-types used by the algorithm. An example of an algorithm that creates
-temporary copies and correctly specifies the additional requirements
-is accumulate(), 26.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.req"> [lib.rand.req]</a>.</p>
-
-<p>Since the specifications of unique() and unique_copy() do not
-require CopyConstructible and Assignable of the InputIterator's value
-type the above mentioned implementations are not standard-compliant. I
-cannot judge whether this is a defect in the standard or a defect in
-the implementations.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 25.2.8 change:</p>
-
-<blockquote>
--4- Requires: The ranges [first, last) and [result, result+(last-first))
-shall not overlap.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- <p>-4- Requires: The ranges [first, last) and [result,
- result+(last-first)) shall not overlap. The expression *result =
- *first must be valid. If neither InputIterator nor OutputIterator
- meets the requirements of forward iterator then the value type of
- InputIterator must be copy constructible. Otherwise copy
- constructible is not required. </p>
-</blockquote>
-
-<p><i>[Redmond: the original proposed resolution didn't impose an
-explicit requirement that the iterator's value type must be copy
-constructible, on the grounds that an input iterator's value type must
-always be copy constructible. Not everyone in the LWG thought that
-this requirement was clear from table 72. It has been suggested that
-it might be possible to implement <tt>unique_copy</tt> without
-requiring assignability, although current implementations do impose
-that requirement. Howard provided new wording.]</i></p>
-
-<p><i>[
-Curaçao: The LWG changed the PR editorially to specify
-"neither...nor...meet..." as clearer than
-"both...and...do not meet...". Change believed to be so
-minor as not to require re-review.
-]</i></p>
-
-<hr>
-<a name="242"><h3>242.&nbsp;Side effects of function objects</h3></a><p><b>Section:</b>&nbsp;25.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.transform"> [lib.alg.transform]</a>, 26.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand"> [lib.rand]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Angelika Langer&nbsp; <b>Date:</b>&nbsp;May 15 2000</p>
-<p>The algorithms transform(), accumulate(), inner_product(),
-partial_sum(), and adjacent_difference() require that the function
-object supplied to them shall not have any side effects.</p>
-
-<p>The standard defines a side effect in 1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.execution"> [intro.execution]</a> as:</p>
-<blockquote>-7- Accessing an object designated by a volatile lvalue (basic.lval),
-modifying an object, calling a library I/O function, or calling a function
-that does any of those operations are all side effects, which are changes
-in the state of the execution environment.</blockquote>
-
-<p>As a consequence, the function call operator of a function object supplied
-to any of the algorithms listed above cannot modify data members, cannot
-invoke any function that has a side effect, and cannot even create and
-modify temporary objects.&nbsp; It is difficult to imagine a function object
-that is still useful under these severe limitations. For instance, any
-non-trivial transformator supplied to transform() might involve creation
-and modification of temporaries, which is prohibited according to the current
-wording of the standard.</p>
-
-<p>On the other hand, popular implementations of these algorithms exhibit
-uniform and predictable behavior when invoked with a side-effect-producing
-function objects. It looks like the strong requirement is not needed for
-efficient implementation of these algorithms.</p>
-
-<p>The requirement of&nbsp; side-effect-free function objects could be
-replaced by a more relaxed basic requirement (which would hold for all
-function objects supplied to any algorithm in the standard library):</p>
-<blockquote>A function objects supplied to an algorithm shall not invalidate
-any iterator or sequence that is used by the algorithm. Invalidation of
-the sequence includes destruction of the sorting order if the algorithm
-relies on the sorting order (see section 25.3 - Sorting and related operations
-[lib.alg.sorting]).</blockquote>
-
-<p>I can't judge whether it is intended that the function objects supplied
-to transform(), accumulate(), inner_product(), partial_sum(), or adjacent_difference()
-shall not modify sequence elements through dereferenced iterators.</p>
-
-<p>It is debatable whether this issue is a defect or a change request.
-Since the consequences for user-supplied function objects are drastic and
-limit the usefulness of the algorithms significantly I would consider it
-a defect.</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>Things to notice about these changes:</i></p>
-
-<ol>
-<li> <i>The fully-closed ("[]" as opposed to half-closed "[)" ranges
- are intentional. we want to prevent side-effects from
- invalidating the end iterators.</i>
-</li>
-
-<li> <i>That has the unintentional side-effect of prohibiting
- modification of the end element as a side-effect. This could
- conceivably be significant in some cases.</i>
-</li>
-
-<li> <i>The wording also prevents side-effects from modifying elements
- of the output sequence. I can't imagine why anyone would want
- to do this, but it is arguably a restriction that implementors
- don't need to place on users.</i>
-</li>
-
-<li> <i>Lifting the restrictions imposed in #2 and #3 above is possible
- and simple, but would require more verbiage.</i>
-</li>
-</ol>
-
-<p>Change 25.2.3/2 from:</p>
-
-<blockquote>
- -2- Requires: op and binary_op shall not have any side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -2- Requires: in the ranges [first1, last1], [first2, first2 +
- (last1 - first1)] and [result, result + (last1- first1)], op and
- binary_op shall neither modify elements nor invalidate iterators or
- subranges.
- [Footnote: The use of fully closed ranges is intentional --end footnote]
-</blockquote>
-
-
-<p>Change 25.2.3/2 from:</p>
-
-<blockquote>
- -2- Requires: op and binary_op shall not have any side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -2- Requires: op and binary_op shall not invalidate iterators or
- subranges, or modify elements in the ranges [first1, last1],
- [first2, first2 + (last1 - first1)], and [result, result + (last1
- - first1)].
- [Footnote: The use of fully closed ranges is intentional --end footnote]
-</blockquote>
-
-
-<p>Change 26.4.1/2 from:</p>
-
-<blockquote>
- -2- Requires: T must meet the requirements of CopyConstructible
- (lib.copyconstructible) and Assignable (lib.container.requirements)
- types. binary_op shall not cause side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -2- Requires: T must meet the requirements of CopyConstructible
- (lib.copyconstructible) and Assignable
- (lib.container.requirements) types. In the range [first, last],
- binary_op shall neither modify elements nor invalidate iterators
- or subranges.
- [Footnote: The use of a fully closed range is intentional --end footnote]
-</blockquote>
-
-<p>Change 26.4.2/2 from:</p>
-
-<blockquote>
- -2- Requires: T must meet the requirements of CopyConstructible
- (lib.copyconstructible) and Assignable (lib.container.requirements)
- types. binary_op1 and binary_op2 shall not cause side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -2- Requires: T must meet the requirements of CopyConstructible
- (lib.copyconstructible) and Assignable (lib.container.requirements)
- types. In the ranges [first, last] and [first2, first2 + (last -
- first)], binary_op1 and binary_op2 shall neither modify elements
- nor invalidate iterators or subranges.
- [Footnote: The use of fully closed ranges is intentional --end footnote]
-</blockquote>
-
-
-<p>Change 26.4.3/4 from:</p>
-
-<blockquote>
- -4- Requires: binary_op is expected not to have any side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -4- Requires: In the ranges [first, last] and [result, result +
- (last - first)], binary_op shall neither modify elements nor
- invalidate iterators or subranges.
- [Footnote: The use of fully closed ranges is intentional --end footnote]
-</blockquote>
-
-<p>Change 26.4.4/2 from:</p>
-
-<blockquote>
- -2- Requires: binary_op shall not have any side effects.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -2- Requires: In the ranges [first, last] and [result, result +
- (last - first)], binary_op shall neither modify elements nor
- invalidate iterators or subranges.
- [Footnote: The use of fully closed ranges is intentional --end footnote]
-</blockquote>
-
-<p><i>[Toronto: Dave Abrahams supplied wording.]</i></p>
-
-<p><i>[Copenhagen: Proposed resolution was modified slightly. Matt
-added footnotes pointing out that the use of closed ranges was
-intentional.]</i></p>
-
-<hr>
-<a name="243"><h3>243.&nbsp;<tt>get</tt> and <tt>getline</tt> when sentry reports failure</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;May 15 2000</p>
-<p>basic_istream&lt;&gt;::get(), and basic_istream&lt;&gt;::getline(),
-are unclear with respect to the behavior and side-effects of the named
-functions in case of an error.</p>
-
-<p>27.6.1.3, p1 states that "... If the sentry object returns
-true, when converted to a value of type bool, the function endeavors
-to obtain the requested input..." It is not clear from this (or
-the rest of the paragraph) what precisely the behavior should be when
-the sentry ctor exits by throwing an exception or when the sentry
-object returns false. In particular, what is the number of characters
-extracted that gcount() returns supposed to be?</p>
-
-<p>27.6.1.3 p8 and p19 say about the effects of get() and getline():
-"... In any case, it then stores a null character (using
-charT()) into the next successive location of the array." Is not
-clear whether this sentence applies if either of the conditions above
-holds (i.e., when sentry fails).</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to 27.6.1.3, p1 after the sentence</p>
-
-<blockquote>
-"... If the sentry object returns true, when converted to a value of
-type bool, the function endeavors to obtain the requested input."
-</blockquote>
-
-<p>the following</p>
-
-
-<blockquote>
-"Otherwise, if the sentry constructor exits by throwing an exception or
-if the sentry object returns false, when converted to a value of type
-bool, the function returns without attempting to obtain any input. In
-either case the number of extracted characters is set to 0; unformatted
-input functions taking a character array of non-zero size as an argument
-shall also store a null character (using charT()) in the first location
-of the array."
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Although the general philosophy of the input functions is that the
-argument should not be modified upon failure, <tt>getline</tt>
-historically added a terminating null unconditionally. Most
-implementations still do that. Earlier versions of the draft standard
-had language that made this an unambiguous requirement; those words
-were moved to a place where their context made them less clear. See
-Jerry Schwarz's message c++std-lib-7618.</p>
-<hr>
-<a name="247"><h3>247.&nbsp;<tt>vector</tt>, <tt>deque::insert</tt> complexity</h3></a><p><b>Section:</b>&nbsp;23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Lisa Lippincott&nbsp; <b>Date:</b>&nbsp;06 June 2000</p>
-<p>Paragraph 2 of 23.2.4.3 [lib.vector.modifiers] describes the complexity
-of <tt>vector::insert</tt>:</p>
-
- <blockquote>
- Complexity: If first and last are forward iterators, bidirectional
- iterators, or random access iterators, the complexity is linear in
- the number of elements in the range [first, last) plus the distance
- to the end of the vector. If they are input iterators, the complexity
- is proportional to the number of elements in the range [first, last)
- times the distance to the end of the vector.
- </blockquote>
-
-<p>First, this fails to address the non-iterator forms of
-<tt>insert</tt>.</p>
-
-<p>Second, the complexity for input iterators misses an edge case --
-it requires that an arbitrary number of elements can be added at
-the end of a <tt>vector</tt> in constant time.</p>
-
-<p>I looked to see if <tt>deque</tt> had a similar problem, and was
-surprised to find that <tt>deque</tt> places no requirement on the
-complexity of inserting multiple elements (23.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.size"> [lib.array.size]</a>,
-paragraph 3):</p>
-
- <blockquote>
- Complexity: In the worst case, inserting a single element into a
- deque takes time linear in the minimum of the distance from the
- insertion point to the beginning of the deque and the distance
- from the insertion point to the end of the deque. Inserting a
- single element either at the beginning or end of a deque always
- takes constant time and causes a single call to the copy constructor
- of T.
- </blockquote>
-<p><b>Proposed resolution:</b></p>
-
-<p>Change Paragraph 2 of 23.2.4.3 [lib.vector.modifiers] to</p>
- <blockquote>
- Complexity: The complexity is linear in the number of elements
- inserted plus the distance to the end of the vector.
- </blockquote>
-
- <p><i>[For input iterators, one may achieve this complexity by first
- inserting at the end of the <tt>vector</tt>, and then using
- <tt>rotate</tt>.]</i></p>
-
-<p>Change 23.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.size"> [lib.array.size]</a>, paragraph 3, to:</p>
-
- <blockquote>
- Complexity: The complexity is linear in the number of elements
- inserted plus the shorter of the distances to the beginning and
- end of the deque. Inserting a single element at either the
- beginning or the end of a deque causes a single call to the copy
- constructor of T.
- </blockquote>
-
-<p><b>Rationale:</b></p>
-<p>This is a real defect, and proposed resolution fixes it: some
- complexities aren't specified that should be. This proposed
- resolution does constrain deque implementations (it rules out the
- most naive possible implementations), but the LWG doesn't see a
- reason to permit that implementation.</p>
-<hr>
-<a name="248"><h3>248.&nbsp;time_get fails to set eofbit</h3></a><p><b>Section:</b>&nbsp;22.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.time"> [lib.category.time]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;22 June 2000</p>
-<p>There is no requirement that any of time_get member functions set
-ios::eofbit when they reach the end iterator while parsing their input.
-Since members of both the num_get and money_get facets are required to
-do so (22.2.2.1.2, and 22.2.6.1.2, respectively), time_get members
-should follow the same requirement for consistency.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add paragraph 2 to section 22.2.5.1 with the following text:</p>
-
-<blockquote>
-If the end iterator is reached during parsing by any of the get()
-member functions, the member sets ios_base::eofbit in err.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Two alternative resolutions were proposed. The LWG chose this one
-because it was more consistent with the way eof is described for other
-input facets.</p>
-<hr>
-<a name="250"><h3>250.&nbsp;splicing invalidates iterators</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Brian Parker &nbsp; <b>Date:</b>&nbsp;14 Jul 2000</p>
-<p>
-Section 23.2.2.4 [lib.list.ops] states that
-</p>
-<pre> void splice(iterator position, list&lt;T, Allocator&gt;&amp; x);
-</pre>
-<p>
-<i>invalidates</i> all iterators and references to list <tt>x</tt>.
-</p>
-
-<p>
-This is unnecessary and defeats an important feature of splice. In
-fact, the SGI STL guarantees that iterators to <tt>x</tt> remain valid
-after <tt>splice</tt>.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add a footnote to 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, paragraph 1:</p>
-<blockquote>
-[<i>Footnote:</i> As specified in 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, paragraphs
-4-5, the semantics described in this clause applies only to the case
-where allocators compare equal. --end footnote]
-</blockquote>
-
-<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 4 with:</p>
-<blockquote>
-Effects: Inserts the contents of x before position and x becomes
-empty. Pointers and references to the moved elements of x now refer to
-those same elements but as members of *this. Iterators referring to the
-moved elements will continue to refer to their elements, but they now
-behave as iterators into *this, not into x.
-</blockquote>
-
-<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 7 with:</p>
-<blockquote>
-Effects: Inserts an element pointed to by i from list x before
-position and removes the element from x. The result is unchanged if
-position == i or position == ++i. Pointers and references to *i continue
-to refer to this same element but as a member of *this. Iterators to *i
-(including i itself) continue to refer to the same element, but now
-behave as iterators into *this, not into x.
-</blockquote>
-
-<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 12 with:</p>
-<blockquote>
-Requires: [first, last) is a valid range in x. The result is
-undefined if position is an iterator in the range [first, last).
-Pointers and references to the moved elements of x now refer to those
-same elements but as members of *this. Iterators referring to the moved
-elements will continue to refer to their elements, but they now behave as
-iterators into *this, not into x.
-</blockquote>
-
-<p><i>[pre-Copenhagen: Howard provided wording.]</i></p>
-<p><b>Rationale:</b></p>
-<p>The original proposed resolution said that iterators and references
-would remain "valid". The new proposed resolution clarifies what that
-means. Note that this only applies to the case of equal allocators.
-From 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> paragraph 4, the behavior of list when
-allocators compare nonequal is outside the scope of the standard.</p>
-<hr>
-<a name="251"><h3>251.&nbsp;basic_stringbuf missing allocator_type</h3></a><p><b>Section:</b>&nbsp;27.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf"> [lib.stringbuf]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jul 2000</p>
-<p>The synopsis for the template class <tt>basic_stringbuf</tt>
-doesn't list a typedef for the template parameter
-<tt>Allocator</tt>. This makes it impossible to determine the type of
-the allocator at compile time. It's also inconsistent with all other
-template classes in the library that do provide a typedef for the
-<tt>Allocator</tt> parameter.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add to the synopses of the class templates basic_stringbuf (27.7.1),
-basic_istringstream (27.7.2), basic_ostringstream (27.7.3), and
-basic_stringstream (27.7.4) the typedef:</p>
-<pre> typedef Allocator allocator_type;
-</pre>
-<hr>
-<a name="252"><h3>252.&nbsp;missing casts/C-style casts used in iostreams</h3></a><p><b>Section:</b>&nbsp;27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jul 2000</p>
-<p>27.7.2.2, p1 uses a C-style cast rather than the more appropriate
-const_cast&lt;&gt; in the Returns clause for basic_istringstream&lt;&gt;::rdbuf().
-The same C-style cast is being used in 27.7.3.2, p1, D.7.2.2, p1, and
-D.7.3.2, p1, and perhaps elsewhere. 27.7.6, p1 and D.7.2.2, p1 are missing
-the cast altogether.</p>
-
-<p>C-style casts have not been deprecated, so the first part of this
-issue is stylistic rather than a matter of correctness.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.7.2.2, p1 replace </p>
-<pre> -1- Returns: (basic_stringbuf&lt;charT,traits,Allocator&gt;*)&amp;sb.</pre>
-
-<p>with</p>
-<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
-
-
-<p>In 27.7.3.2, p1 replace</p>
-<pre> -1- Returns: (basic_stringbuf&lt;charT,traits,Allocator&gt;*)&amp;sb.</pre>
-
-<p>with</p>
-<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
-
-<p>In 27.7.6, p1, replace</p>
-<pre> -1- Returns: &amp;sb</pre>
-
-<p>with</p>
-<pre> -1- Returns: const_cast&lt;basic_stringbuf&lt;charT,traits,Allocator&gt;*&gt;(&amp;sb).</pre>
-
-<p>In D.7.2.2, p1 replace</p>
-<pre> -2- Returns: &amp;sb. </pre>
-
-<p>with</p>
-<pre> -2- Returns: const_cast&lt;strstreambuf*&gt;(&amp;sb).</pre>
-<hr>
-<a name="253"><h3>253.&nbsp;valarray helper functions are almost entirely useless</h3></a><p><b>Section:</b>&nbsp;26.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.cons"> [lib.valarray.cons]</a>, 26.5.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.assign"> [lib.valarray.assign]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Robert Klarer&nbsp; <b>Date:</b>&nbsp;31 Jul 2000</p>
-<p>This discussion is adapted from message c++std-lib-7056 posted
-November 11, 1999. I don't think that anyone can reasonably claim
-that the problem described below is NAD.</p>
-
-<p>These valarray constructors can never be called:</p>
-
-<pre> template &lt;class T&gt;
- valarray&lt;T&gt;::valarray(const slice_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt;::valarray(const gslice_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt;::valarray(const mask_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt;::valarray(const indirect_array&lt;T&gt; &amp;);
-</pre>
-
-<p>Similarly, these valarray assignment operators cannot be
-called:</p>
-
-<pre> template &lt;class T&gt;
- valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const slice_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const gslice_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const mask_array&lt;T&gt; &amp;);
- template &lt;class T&gt;
- valarray&lt;T&gt; valarray&lt;T&gt;::operator=(const indirect_array&lt;T&gt; &amp;);
-</pre>
-
-<p>Please consider the following example:</p>
-
-<pre> #include &lt;valarray&gt;
- using namespace std;
-
- int main()
- {
- valarray&lt;double&gt; va1(12);
- valarray&lt;double&gt; va2(va1[slice(1,4,3)]); // line 1
- }
-</pre>
-
-
-<p>Since the valarray va1 is non-const, the result of the sub-expression
-va1[slice(1,4,3)] at line 1 is an rvalue of type const
-std::slice_array&lt;double&gt;. This slice_array rvalue is then used to
-construct va2. The constructor that is used to construct va2 is
-declared like this:</p>
-
-<pre> template &lt;class T&gt;
- valarray&lt;T&gt;::valarray(const slice_array&lt;T&gt; &amp;);
-</pre>
-
-<p>Notice the constructor's const reference parameter. When the
-constructor is called, a slice_array must be bound to this reference.
-The rules for binding an rvalue to a const reference are in 8.5.3,
-paragraph 5 (see also 13.3.3.1.4). Specifically, paragraph 5
-indicates that a second slice_array rvalue is constructed (in this
-case copy-constructed) from the first one; it is this second rvalue
-that is bound to the reference parameter. Paragraph 5 also requires
-that the constructor that is used for this purpose be callable,
-regardless of whether the second rvalue is elided. The
-copy-constructor in this case is not callable, however, because it is
-private. Therefore, the compiler should report an error.</p>
-
-<p>Since slice_arrays are always rvalues, the valarray constructor that has a
-parameter of type const slice_array&lt;T&gt; &amp; can never be called. The
-same reasoning applies to the three other constructors and the four
-assignment operators that are listed at the beginning of this post.
-Furthermore, since these functions cannot be called, the valarray helper
-classes are almost entirely useless.</p>
-<p><b>Proposed resolution:</b></p>
-<p>slice_array:</p>
-<ul>
-<li> Make the copy constructor and copy-assignment operator declarations
- public in the slice_array class template definition in 26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a> </li>
-<li> remove paragraph 3 of 26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a>
-</li>
-<li> remove the copy constructor declaration from 26.5.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cons.slice.arr"> [lib.cons.slice.arr]</a>
-</li>
-<li> change paragraph 1 of 26.5.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cons.slice.arr"> [lib.cons.slice.arr]</a> to read "This constructor is declared
- to be private. This constructor need not be defined."</li>
-<li> remove the first sentence of paragraph 1 of 26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a>
-</li>
-<li> Change the first three words of the second sentence of paragraph 1 of
- 26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a> to "These assignment operators have"</li>
-</ul>
-
-<p>gslice_array:</p>
-<ul>
-<li> Make the copy constructor and copy-assignment operator declarations
- public in the gslice_array class template definition in 26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a> </li>
-<li> remove the note in paragraph 3 of 26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a>
-</li>
-<li> remove the copy constructor declaration from 26.5.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.cons"> [lib.gslice.array.cons]</a>
-</li>
-<li> change paragraph 1 of 26.5.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.cons"> [lib.gslice.array.cons]</a> to read "This constructor is declared
- to be private. This constructor need not be defined."</li>
-<li> remove the first sentence of paragraph 1 of 26.5.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.assign"> [lib.gslice.array.assign]</a>
-</li>
-<li> Change the first three words of the second sentence of paragraph 1 of
- 26.5.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.assign"> [lib.gslice.array.assign]</a> to "These assignment operators have"</li>
-</ul>
-
-<p>mask_array:</p>
-<ul>
-<li> Make the copy constructor and copy-assignment operator declarations
- public in the mask_array class template definition in 26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a> </li>
-<li> remove the note in paragraph 2 of 26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a>
-</li>
-<li> remove the copy constructor declaration from 26.5.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.cons"> [lib.mask.array.cons]</a>
-</li>
-<li> change paragraph 1 of 26.5.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.cons"> [lib.mask.array.cons]</a> to read "This constructor is declared
- to be private. This constructor need not be defined."</li>
-<li> remove the first sentence of paragraph 1 of 26.5.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.assign"> [lib.mask.array.assign]</a>
-</li>
-<li> Change the first three words of the second sentence of paragraph 1 of
- 26.5.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.assign"> [lib.mask.array.assign]</a> to "These assignment operators have"</li>
-</ul>
-
-<p>indirect_array:</p>
-<ul>
-<li>Make the copy constructor and copy-assignment operator declarations
- public in the indirect_array class definition in 26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a>
-</li>
-<li> remove the note in paragraph 2 of 26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a>
-</li>
-<li> remove the copy constructor declaration from 26.5.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.cons"> [lib.indirect.array.cons]</a>
-</li>
-<li> change the descriptive text in 26.5.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.cons"> [lib.indirect.array.cons]</a> to read "This constructor is
- declared to be private. This constructor need not be defined."</li>
-<li> remove the first sentence of paragraph 1 of 26.5.9.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.assign"> [lib.indirect.array.assign]</a>
-</li>
-<li> Change the first three words of the second sentence of paragraph 1 of
- 26.5.9.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.assign"> [lib.indirect.array.assign]</a> to "These assignment operators have"</li>
-</ul>
-<p><i>[Proposed resolution was modified in Santa Cruz: explicitly make
-copy constructor and copy assignment operators public, instead of
-removing them.]</i></p>
-<p><b>Rationale:</b></p>
-<p>Keeping the valarray constructors private is untenable. Merely
-making valarray a friend of the helper classes isn't good enough,
-because access to the copy constructor is checked in the user's
-environment.</p>
-
-<p>Making the assignment operator public is not strictly necessary to
-solve this problem. A majority of the LWG <i>(straw poll: 13-4)</i>
-believed we should make the assignment operators public, in addition
-to the copy constructors, for reasons of symmetry and user
-expectation.</p>
-<hr>
-<a name="256"><h3>256.&nbsp;typo in 27.4.4.2, p17: copy_event does not exist</h3></a><p><b>Section:</b>&nbsp;27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;21 Aug 2000</p>
-<p>
-27.4.4.2, p17 says
-</p>
-
-<blockquote>
--17- Before copying any parts of rhs, calls each registered callback
-pair (fn,index) as (*fn)(erase_event,*this,index). After all parts but
-exceptions() have been replaced, calls each callback pair that was
-copied from rhs as (*fn)(copy_event,*this,index).
-</blockquote>
-
-<p>
-The name copy_event isn't defined anywhere. The intended name was
-copyfmt_event.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace copy_event with copyfmt_event in the named paragraph.</p>
-<hr>
-<a name="259"><h3>259.&nbsp;<tt>basic_string::operator[]</tt> and const correctness</h3></a><p><b>Section:</b>&nbsp;21.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.access"> [lib.string.access]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Chris Newton &nbsp; <b>Date:</b>&nbsp;27 Aug 2000</p>
-<p>
-<i>Paraphrased from a message that Chris Newton posted to comp.std.c++:</i>
-</p>
-
-<p>
-The standard's description of <tt>basic_string&lt;&gt;::operator[]</tt>
-seems to violate const correctness.
-</p>
-
-<p>
-The standard (21.3.4/1) says that "If <tt>pos &lt; size()</tt>,
-returns <tt>data()[pos]</tt>." The types don't work. The
-return value of <tt>data()</tt> is <tt>const charT*</tt>, but
-<tt>operator[]</tt> has a non-const version whose return type is <tt>reference</tt>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In section 21.3.4, paragraph 1, change
-"<tt>data()[<i>pos</i>]</tt>" to "<tt>*(begin() +
-<i>pos</i>)</tt>".
-</p>
-<hr>
-<a name="260"><h3>260.&nbsp;Inconsistent return type of <tt>istream_iterator::operator++(int)</tt>
-</h3></a><p><b>Section:</b>&nbsp;24.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator.ops"> [lib.istream.iterator.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;27 Aug 2000</p>
-<p>The synopsis of istream_iterator::operator++(int) in 24.5.1 shows
-it as returning the iterator by value. 24.5.1.2, p5 shows the same
-operator as returning the iterator by reference. That's incorrect
-given the Effects clause below (since a temporary is returned). The
-`&amp;' is probably just a typo.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the declaration in 24.5.1.2, p5 from</p>
- <pre> istream_iterator&lt;T,charT,traits,Distance&gt;&amp; operator++(int);
- </pre>
-<p>to</p>
- <pre> istream_iterator&lt;T,charT,traits,Distance&gt; operator++(int);
- </pre>
-<p>(that is, remove the `&amp;').</p>
-<hr>
-<a name="261"><h3>261.&nbsp;Missing description of <tt>istream_iterator::operator!=</tt>
-</h3></a><p><b>Section:</b>&nbsp;24.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator.ops"> [lib.istream.iterator.ops]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;27 Aug 2000</p>
-<p>
-24.5.1, p3 lists the synopsis for
-</p>
-
-<pre> template &lt;class T, class charT, class traits, class Distance&gt;
- bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
- const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
-</pre>
-
-<p>
-but there is no description of what the operator does (i.e., no Effects
-or Returns clause) in 24.5.1.2.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add paragraph 7 to the end of section 24.5.1.2 with the following text:
-</p>
-
-<pre> template &lt;class T, class charT, class traits, class Distance&gt;
- bool operator!=(const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; x,
- const istream_iterator&lt;T,charT,traits,Distance&gt;&amp; y);
-</pre>
-
-<p>-7- Returns: !(x == y).</p>
-<hr>
-<a name="262"><h3>262.&nbsp;Bitmask operator ~ specified incorrectly</h3></a><p><b>Section:</b>&nbsp;17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;03 Sep 2000</p>
-<p>
-The ~ operation should be applied after the cast to int_type.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 17.3.2.1.2 [lib.bitmask.types] operator~ from:
-</p>
-
-<pre> bitmask operator~ ( bitmask X )
- { return static_cast&lt; bitmask&gt;(static_cast&lt;int_type&gt;(~ X)); }
-</pre>
-
-<p>
-to:
-</p>
-
-<pre> bitmask operator~ ( bitmask X )
- { return static_cast&lt; bitmask&gt;(~static_cast&lt;int_type&gt;(X)); }
-</pre>
-<hr>
-<a name="263"><h3>263.&nbsp;Severe restriction on <tt>basic_string</tt> reference counting</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Kevlin Henney&nbsp; <b>Date:</b>&nbsp;04 Sep 2000</p>
-<p>
-The note in paragraph 6 suggests that the invalidation rules for
-references, pointers, and iterators in paragraph 5 permit a reference-
-counted implementation (actually, according to paragraph 6, they permit
-a "reference counted implementation", but this is a minor editorial fix).
-</p>
-
-<p>
-However, the last sub-bullet is so worded as to make a reference-counted
-implementation unviable. In the following example none of the
-conditions for iterator invalidation are satisfied:
-</p>
-
-<pre> // first example: "*******************" should be printed twice
- string original = "some arbitrary text", copy = original;
- const string &amp; alias = original;
-
- string::const_iterator i = alias.begin(), e = alias.end();
- for(string::iterator j = original.begin(); j != original.end(); ++j)
- *j = '*';
- while(i != e)
- cout &lt;&lt; *i++;
- cout &lt;&lt; endl;
- cout &lt;&lt; original &lt;&lt; endl;
-</pre>
-
-<p>
-Similarly, in the following example:
-</p>
-
-<pre> // second example: "some arbitrary text" should be printed out
- string original = "some arbitrary text", copy = original;
- const string &amp; alias = original;
-
- string::const_iterator i = alias.begin();
- original.begin();
- while(i != alias.end())
- cout &lt;&lt; *i++;
-</pre>
-
-<p>
-I have tested this on three string implementations, two of which were
-reference counted. The reference-counted implementations gave
-"surprising behavior" because they invalidated iterators on
-the first call to non-const begin since construction. The current
-wording does not permit such invalidation because it does not take
-into account the first call since construction, only the first call
-since various member and non-member function calls.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the following sentence in 21.3 paragraph 5 from
-</p>
-
-<blockquote>
- Subsequent to any of the above uses except the forms of insert() and
- erase() which return iterators, the first call to non-const member
- functions operator[](), at(), begin(), rbegin(), end(), or rend().
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- Following construction or any of the above uses, except the forms of
- insert() and erase() that return iterators, the first call to non-
- const member functions operator[](), at(), begin(), rbegin(), end(),
- or rend().
-</blockquote>
-<hr>
-<a name="264"></a><h3><a name="264">264.&nbsp;Associative container <tt>insert(i, j)</tt> complexity requirements are not feasible.</a></h3><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;John Potter&nbsp; <b>Date:</b>&nbsp;07 Sep 2000</p>
-<p>
-Table 69 requires linear time if [i, j) is sorted. Sorted is necessary but not sufficient.
-Consider inserting a sorted range of even integers into a set&lt;int&gt; containing the odd
-integers in the same range.
-</p>
-
-<p><i>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#102">102</a></i></p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In Table 69, in section 23.1.2, change the complexity clause for
-insertion of a range from "N log(size() + N) (N is the distance
-from i to j) in general; linear if [i, j) is sorted according to
-value_comp()" to "N log(size() + N), where N is the distance
-from i to j".
-</p>
-
-<p><i>[Copenhagen: Minor fix in proposed resolution: fixed unbalanced
-parens in the revised wording.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-Testing for valid insertions could be less efficient than simply
-inserting the elements when the range is not both sorted and between
-two adjacent existing elements; this could be a QOI issue.
-</p>
-
-<p>
-The LWG considered two other options: (a) specifying that the
-complexity was linear if [i, j) is sorted according to value_comp()
-and between two adjacent existing elements; or (b) changing to
-Klog(size() + N) + (N - K) (N is the distance from i to j and K is the
-number of elements which do not insert immediately after the previous
-element from [i, j) including the first). The LWG felt that, since
-we can't guarantee linear time complexity whenever the range to be
-inserted is sorted, it's more trouble than it's worth to say that it's
-linear in some special cases.
-</p>
-<hr>
-<a name="265"><h3>265.&nbsp;std::pair::pair() effects overly restrictive</h3></a><p><b>Section:</b>&nbsp;20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;11 Sep 2000</p>
-<p>
-I don't see any requirements on the types of the elements of the
-std::pair container in 20.2.2. From the descriptions of the member
-functions it appears that they must at least satisfy the requirements of
-20.1.3 [lib.copyconstructible] and 20.1.4 [lib.default.con.req], and in
-the case of the [in]equality operators also the requirements of 20.1.1
-[lib.equalitycomparable] and 20.1.2 [lib.lessthancomparable].
-</p>
-
-<p>
-I believe that the the CopyConstructible requirement is unnecessary in
-the case of 20.2.2, p2.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the Effects clause in 20.2.2, p2 from</p>
-
-<blockquote>
--2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() :
-first(T1()), second(T2()) {} </tt>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
--2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() :
-first(), second() {} </tt>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>The existing specification of pair's constructor appears to be a
-historical artifact: there was concern that pair's members be properly
-zero-initialized when they are built-in types. At one time there was
-uncertainty about whether they would be zero-initialized if the
-default constructor was written the obvious way. This has been
-clarified by core issue 178, and there is no longer any doubt that
-the straightforward implementation is correct.</p>
-<hr>
-<a name="266"><h3>266.&nbsp;bad_exception::~bad_exception() missing Effects clause</h3></a><p><b>Section:</b>&nbsp;18.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.bad.exception"> [lib.bad.exception]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;24 Sep 2000</p>
-<p>
-The synopsis for std::bad_exception lists the function ~bad_exception()
-but there is no description of what the function does (the Effects
-clause is missing).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Remove the destructor from the class synopses of
-<tt>bad_alloc</tt> (<font color="red">18.4.2.1</font>),
-<tt>bad_cast</tt> (18.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.alloc.errors"> [lib.alloc.errors]</a>),
-<tt>bad_typeid</tt> (<font color="red">18.5.3</font>),
-and <tt>bad_exception</tt> (18.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.bad.exception"> [lib.bad.exception]</a>).
-</p>
-<p><b>Rationale:</b></p>
-<p>
-This is a general problem with the exception classes in clause 18.
-The proposed resolution is to remove the destructors from the class
-synopses, rather than to document the destructors' behavior, because
-removing them is more consistent with how exception classes are
-described in clause 19.
-</p>
-<hr>
-<a name="268"><h3>268.&nbsp;Typo in locale synopsis</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;5 Oct 2000</p>
-<p>The synopsis of the class std::locale in 22.1.1 contains two typos:
-the semicolons after the declarations of the default ctor
-locale::locale() and the copy ctor locale::locale(const locale&amp;)
-are missing.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the missing semicolons, i.e., change</p>
-
-<pre> // construct/copy/destroy:
- locale() throw()
- locale(const locale&amp; other) throw()
-</pre>
-
-<p>in the synopsis in 22.1.1 to</p>
-
-<pre> // construct/copy/destroy:
- locale() throw();
- locale(const locale&amp; other) throw();
-</pre>
-<hr>
-<a name="270"><h3>270.&nbsp;Binary search requirements overly strict</h3></a><p><b>Section:</b>&nbsp;25.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.binary.search"> [lib.alg.binary.search]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;18 Oct 2000</p>
-<p>
-Each of the four binary search algorithms (lower_bound, upper_bound,
-equal_range, binary_search) has a form that allows the user to pass a
-comparison function object. According to 25.3, paragraph 2, that
-comparison function object has to be a strict weak ordering.
-</p>
-
-<p>
-This requirement is slightly too strict. Suppose we are searching
-through a sequence containing objects of type X, where X is some
-large record with an integer key. We might reasonably want to look
-up a record by key, in which case we would want to write something
-like this:
-</p>
-<pre> struct key_comp {
- bool operator()(const X&amp; x, int n) const {
- return x.key() &lt; n;
- }
- }
-
- std::lower_bound(first, last, 47, key_comp());
-</pre>
-
-<p>
-key_comp is not a strict weak ordering, but there is no reason to
-prohibit its use in lower_bound.
-</p>
-
-<p>
-There's no difficulty in implementing lower_bound so that it allows
-the use of something like key_comp. (It will probably work unless an
-implementor takes special pains to forbid it.) What's difficult is
-formulating language in the standard to specify what kind of
-comparison function is acceptable. We need a notion that's slightly
-more general than that of a strict weak ordering, one that can encompass
-a comparison function that involves different types. Expressing that
-notion may be complicated.
-</p>
-
-<p><i>Additional questions raised at the Toronto meeting:</i></p>
-<ul>
-<li> Do we really want to specify what ordering the implementor must
- use when calling the function object? The standard gives
- specific expressions when describing these algorithms, but it also
- says that other expressions (with different argument order) are
- equivalent.</li>
-<li> If we are specifying ordering, note that the standard uses both
- orderings when describing <tt>equal_range</tt>.</li>
-<li> Are we talking about requiring these algorithms to work properly
- when passed a binary function object whose two argument types
- are not the same, or are we talking about requirements when
- they are passed a binary function object with several overloaded
- versions of <tt>operator()</tt>?</li>
-<li> The definition of a strict weak ordering does not appear to give
- any guidance on issues of overloading; it only discusses expressions,
- and all of the values in these expressions are of the same type.
- Some clarification would seem to be in order.</li>
-</ul>
-
-<p><i>Additional discussion from Copenhagen:</i></p>
-<ul>
-<li>It was generally agreed that there is a real defect here: if
-the predicate is merely required to be a Strict Weak Ordering, then
-it's possible to pass in a function object with an overloaded
-operator(), where the version that's actually called does something
-completely inappropriate. (Such as returning a random value.)</li>
-
-<li>An alternative formulation was presented in a paper distributed by
-David Abrahams at the meeting, "Binary Search with Heterogeneous
-Comparison", J16-01/0027 = WG21 N1313: Instead of viewing the
-predicate as a Strict Weak Ordering acting on a sorted sequence, view
-the predicate/value pair as something that partitions a sequence.
-This is almost equivalent to saying that we should view binary search
-as if we are given a unary predicate and a sequence, such that f(*p)
-is true for all p below a specific point and false for all p above it.
-The proposed resolution is based on that alternative formulation.</li>
-</ul>
-<p><b>Proposed resolution:</b></p>
-
-<p>Change 25.3 [lib.alg.sorting] paragraph 3 from:</p>
-
-<blockquote>
- 3 For all algorithms that take Compare, there is a version that uses
- operator&lt; instead. That is, comp(*i, *j) != false defaults to *i &lt;
- *j != false. For the algorithms to work correctly, comp has to
- induce a strict weak ordering on the values.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- 3 For all algorithms that take Compare, there is a version that uses
- operator&lt; instead. That is, comp(*i, *j) != false defaults to *i
- &lt; *j != false. For algorithms other than those described in
- lib.alg.binary.search (25.3.3) to work correctly, comp has to induce
- a strict weak ordering on the values.
-</blockquote>
-
-<p>Add the following paragraph after 25.3 [lib.alg.sorting] paragraph 5:</p>
-
-<blockquote>
- -6- A sequence [start, finish) is partitioned with respect to an
- expression f(e) if there exists an integer n such that
- for all 0 &lt;= i &lt; distance(start, finish), f(*(begin+i)) is true if
- and only if i &lt; n.
-</blockquote>
-
-<p>Change 25.3.3 [lib.alg.binary.search] paragraph 1 from:</p>
-
-<blockquote>
- -1- All of the algorithms in this section are versions of binary
- search and assume that the sequence being searched is in order
- according to the implied or explicit comparison function. They work
- on non-random access iterators minimizing the number of
- comparisons, which will be logarithmic for all types of
- iterators. They are especially appropriate for random access
- iterators, because these algorithms do a logarithmic number of
- steps through the data structure. For non-random access iterators
- they execute a linear number of steps.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -1- All of the algorithms in this section are versions of binary
- search and assume that the sequence being searched is partitioned
- with respect to an expression formed by binding the search key to
- an argument of the implied or explicit comparison function. They
- work on non-random access iterators minimizing the number of
- comparisons, which will be logarithmic for all types of
- iterators. They are especially appropriate for random access
- iterators, because these algorithms do a logarithmic number of
- steps through the data structure. For non-random access iterators
- they execute a linear number of steps.
-</blockquote>
-
-<p>Change 25.3.3.1 [lib.lower.bound] paragraph 1 from:</p>
-
-<blockquote>
- -1- Requires: Type T is LessThanComparable
- (lib.lessthancomparable).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -1- Requires: The elements e of [first, last) are partitioned with
- respect to the expression e &lt; value or comp(e, value)
-</blockquote>
-
-
-<p>Remove 25.3.3.1 [lib.lower.bound] paragraph 2:</p>
-
-<blockquote>
- -2- Effects: Finds the first position into which value can be
- inserted without violating the ordering.
-</blockquote>
-
-<p>Change 25.3.3.2 [lib.upper.bound] paragraph 1 from:</p>
-
-<blockquote>
- -1- Requires: Type T is LessThanComparable (lib.lessthancomparable).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -1- Requires: The elements e of [first, last) are partitioned with
- respect to the expression !(value &lt; e) or !comp(value, e)
-</blockquote>
-
-<p>Remove 25.3.3.2 [lib.upper.bound] paragraph 2:</p>
-
-<blockquote>
- -2- Effects: Finds the furthermost position into which value can be
- inserted without violating the ordering.
-</blockquote>
-
-<p>Change 25.3.3.3 [lib.equal.range] paragraph 1 from:</p>
-
-<blockquote>
- -1- Requires: Type T is LessThanComparable
- (lib.lessthancomparable).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -1- Requires: The elements e of [first, last) are partitioned with
- respect to the expressions e &lt; value and !(value &lt; e) or
- comp(e, value) and !comp(value, e). Also, for all elements e of
- [first, last), e &lt; value implies !(value &lt; e) or comp(e,
- value) implies !comp(value, e)
-</blockquote>
-
-<p>Change 25.3.3.3 [lib.equal.range] paragraph 2 from:</p>
-
-<blockquote>
- -2- Effects: Finds the largest subrange [i, j) such that the value
- can be inserted at any iterator k in it without violating the
- ordering. k satisfies the corresponding conditions: !(*k &lt; value)
- &amp;&amp; !(value &lt; *k) or comp(*k, value) == false &amp;&amp; comp(value, *k) ==
- false.
-</blockquote>
-
-<p>to:</p>
-
-<pre> -2- Returns:
- make_pair(lower_bound(first, last, value),
- upper_bound(first, last, value))
- or
- make_pair(lower_bound(first, last, value, comp),
- upper_bound(first, last, value, comp))
-</pre>
-
-<p>Change 25.3.3.3 [lib.binary.search] paragraph 1 from:</p>
-
-<blockquote>
- -1- Requires: Type T is LessThanComparable
- (lib.lessthancomparable).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
- -1- Requires: The elements e of [first, last) are partitioned with
- respect to the expressions e &lt; value and !(value &lt; e) or comp(e,
- value) and !comp(value, e). Also, for all elements e of [first,
- last), e &lt; value implies !(value &lt; e) or comp(e, value) implies
- !comp(value, e)
-</blockquote>
-
-<p><i>[Copenhagen: Dave Abrahams provided this wording]</i></p>
-
-<p><i>[Redmond: Minor changes in wording. (Removed "non-negative", and
-changed the "other than those described in" wording.) Also, the LWG
-decided to accept the "optional" part.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The proposed resolution reinterprets binary search. Instead of
-thinking about searching for a value in a sorted range, we view that
-as an important special case of a more general algorithm: searching
-for the partition point in a partitioned range.</p>
-
-<p>We also add a guarantee that the old wording did not: we ensure
-that the upper bound is no earlier than the lower bound, that
-the pair returned by equal_range is a valid range, and that the first
-part of that pair is the lower bound.</p>
-<hr>
-<a name="271"><h3>271.&nbsp;basic_iostream missing typedefs</h3></a><p><b>Section:</b>&nbsp;27.6.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreamclass"> [lib.iostreamclass]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Nov 2000</p>
-<p>
-Class template basic_iostream has no typedefs. The typedefs it
-inherits from its base classes can't be used, since (for example)
-basic_iostream&lt;T&gt;::traits_type is ambiguous.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add the following to basic_iostream's class synopsis in
-27.6.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreamclass"> [lib.iostreamclass]</a>, immediately after <tt>public</tt>:</p>
-
-<pre> // types:
- typedef charT char_type;
- typedef typename traits::int_type int_type;
- typedef typename traits::pos_type pos_type;
- typedef typename traits::off_type off_type;
- typedef traits traits_type;
-</pre>
-<hr>
-<a name="272"><h3>272.&nbsp;Missing parentheses around subexpression</h3></a><p><b>Section:</b>&nbsp;27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Nov 2000</p>
-<p>
-27.4.4.3, p4 says about the postcondition of the function: If
-rdbuf()!=0 then state == rdstate(); otherwise
-rdstate()==state|ios_base::badbit.
-</p>
-
-<p>
-The expression on the right-hand-side of the operator==() needs to be
-parenthesized in order for the whole expression to ever evaluate to
-anything but non-zero.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add parentheses like so: rdstate()==(state|ios_base::badbit).
-</p>
-<hr>
-<a name="273"><h3>273.&nbsp;Missing ios_base qualification on members of a dependent class</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Nov 2000</p>
-<p>27.5.2.4.2, p4, and 27.8.1.6, p2, 27.8.1.7, p3, 27.8.1.9, p2,
-27.8.1.10, p3 refer to in and/or out w/o ios_base:: qualification.
-That's incorrect since the names are members of a dependent base
-class (14.6.2 [temp.dep]) and thus not visible.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Qualify the names with the name of the class of which they are
-members, i.e., ios_base.</p>
-<hr>
-<a name="274"><h3>274.&nbsp;a missing/impossible allocator requirement</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Nov 2000</p>
-<p>
-I see that table 31 in 20.1.5, p3 allows T in std::allocator&lt;T&gt; to be of
-any type. But the synopsis in 20.4.1 calls for allocator&lt;&gt;::address() to
-be overloaded on reference and const_reference, which is ill-formed for
-all T = const U. In other words, this won't work:
-</p>
-
-<p>
-template class std::allocator&lt;const int&gt;;
-</p>
-
-<p>
-The obvious solution is to disallow specializations of allocators on
-const types. However, while containers' elements are required to be
-assignable (which rules out specializations on const T's), I think that
-allocators might perhaps be potentially useful for const values in other
-contexts. So if allocators are to allow const types a partial
-specialization of std::allocator&lt;const T&gt; would probably have to be
-provided.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the text in row 1, column 2 of table 32 in 20.1.5, p3 from</p>
-
- <blockquote>
- any type
- </blockquote>
-
-<p>to</p>
- <blockquote>
- any non-const, non-reference type
- </blockquote>
-
-<p><i>[Redmond: previous proposed resolution was "any non-const,
-non-volatile, non-reference type". Got rid of the "non-volatile".]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-Two resolutions were originally proposed: one that partially
-specialized std::allocator for const types, and one that said an
-allocator's value type may not be const. The LWG chose the second.
-The first wouldn't be appropriate, because allocators are intended for
-use by containers, and const value types don't work in containers.
-Encouraging the use of allocators with const value types would only
-lead to unsafe code.
-</p>
-<p>
-The original text for proposed resolution 2 was modified so that it
-also forbids volatile types and reference types.
-</p>
-
-<p><i>[Curaçao: LWG double checked and believes volatile is correctly
-excluded from the PR.]</i></p>
-
-<hr>
-<a name="275"><h3>275.&nbsp;Wrong type in num_get::get() overloads</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;02 Nov 2000</p>
-<p>
-In 22.2.2.1.1, we have a list of overloads for num_get&lt;&gt;::get().
-There are eight overloads, all of which are identical except for the
-last parameter. The overloads are:
-</p>
-<ul>
-<li> long&amp; </li>
-<li> unsigned short&amp; </li>
-<li> unsigned int&amp; </li>
-<li> unsigned long&amp; </li>
-<li> short&amp; </li>
-<li> double&amp; </li>
-<li> long double&amp; </li>
-<li> void*&amp; </li>
-</ul>
-
-<p>
-There is a similar list, in 22.2.2.1.2, of overloads for
-num_get&lt;&gt;::do_get(). In this list, the last parameter has
-the types:
-</p>
-<ul>
-<li> long&amp; </li>
-<li> unsigned short&amp; </li>
-<li> unsigned int&amp; </li>
-<li> unsigned long&amp; </li>
-<li> float&amp; </li>
-<li> double&amp; </li>
-<li> long double&amp; </li>
-<li> void*&amp; </li>
-</ul>
-
-<p>
-These two lists are not identical. They should be, since
-<tt>get</tt> is supposed to call <tt>do_get</tt> with exactly
-the arguments it was given.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>, change</p>
-<pre> iter_type get(iter_type in, iter_type end, ios_base&amp; str,
- ios_base::iostate&amp; err, short&amp; val) const;
-</pre>
-<p>to</p>
-<pre> iter_type get(iter_type in, iter_type end, ios_base&amp; str,
- ios_base::iostate&amp; err, float&amp; val) const;
-</pre>
-<hr>
-<a name="276"></a><h3><a name="276">276.&nbsp;Assignable requirement for container value type overly strict</a></h3><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Peter Dimov&nbsp; <b>Date:</b>&nbsp;07 Nov 2000</p>
-<p>
-23.1/3 states that the objects stored in a container must be
-Assignable. 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, paragraph 2,
-states that map satisfies all requirements for a container, while in
-the same time defining value_type as pair&lt;const Key, T&gt; - a type
-that is not Assignable.
-</p>
-
-<p>
-It should be noted that there exists a valid and non-contradictory
-interpretation of the current text. The wording in 23.1/3 avoids
-mentioning value_type, referring instead to "objects stored in a
-container." One might argue that map does not store objects of
-type map::value_type, but of map::mapped_type instead, and that the
-Assignable requirement applies to map::mapped_type, not
-map::value_type.
-</p>
-
-<p>
-However, this makes map a special case (other containers store objects of
-type value_type) and the Assignable requirement is needlessly restrictive in
-general.
-</p>
-
-<p>
-For example, the proposed resolution of active library issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> is to make set::iterator a constant iterator; this
-means that no set operations can exploit the fact that the stored
-objects are Assignable.
-</p>
-
-<p>
-This is related to, but slightly broader than, closed issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>23.1/3: Strike the trailing part of the sentence:</p>
- <blockquote>
- , and the additional requirements of Assignable types from 23.1/3
- </blockquote>
-<p>so that it reads:</p>
- <blockquote>
- -3- The type of objects stored in these components must meet the
- requirements of CopyConstructible types (lib.copyconstructible).
- </blockquote>
-
-<p>23.1/4: Modify to make clear that this requirement is not for all
-containers. Change to:</p>
-
-<blockquote>
--4- Table 64 defines the Assignable requirement. Some containers
-require this property of the types to be stored in the container. T is
-the type used to instantiate the container. t is a value of T, and u is
-a value of (possibly const) T.
-</blockquote>
-
-<p>23.1, Table 65: in the first row, change "T is Assignable" to "T is
-CopyConstructible".</p>
-
-<p>23.2.1/2: Add sentence for Assignable requirement. Change to:</p>
-
-<blockquote>
--2- A deque satisfies all of the requirements of a container and of a
-reversible container (given in tables in lib.container.requirements) and
-of a sequence, including the optional sequence requirements
-(lib.sequence.reqmts). In addition to the requirements on the stored
-object described in 23.1[lib.container.requirements], the stored object
-must also meet the requirements of Assignable. Descriptions are
-provided here only for operations on deque that are not described in one
-of these tables or for operations where there is additional semantic
-information.
-</blockquote>
-
-<p>23.2.2/2: Add Assignable requirement to specific methods of list.
-Change to:</p>
-
-<blockquote>
-<p>-2- A list satisfies all of the requirements of a container and of a
-reversible container (given in two tables in lib.container.requirements)
-and of a sequence, including most of the the optional sequence
-requirements (lib.sequence.reqmts). The exceptions are the operator[]
-and at member functions, which are not provided.
-
-[Footnote: These member functions are only provided by containers whose
-iterators are random access iterators. --- end foonote]
-</p>
-
-<p>list does not require the stored type T to be Assignable unless the
-following methods are instantiated:
-
-[Footnote: Implementors are permitted but not required to take advantage
-of T's Assignable properties for these methods. -- end foonote]
-</p>
-<pre> list&lt;T,Allocator&gt;&amp; operator=(const list&lt;T,Allocator&gt;&amp; x );
- template &lt;class InputIterator&gt;
- void assign(InputIterator first, InputIterator last);
- void assign(size_type n, const T&amp; t);
-</pre>
-
-
-<p>Descriptions are provided here only for operations on list that are not
-described in one of these tables or for operations where there is
-additional semantic information.</p>
-</blockquote>
-
-<p>23.2.4/2: Add sentence for Assignable requirement. Change to:</p>
-
-<blockquote>
--2- A vector satisfies all of the requirements of a container and of a
-reversible container (given in two tables in lib.container.requirements)
-and of a sequence, including most of the optional sequence requirements
-(lib.sequence.reqmts). The exceptions are the push_front and pop_front
-member functions, which are not provided. In addition to the
-requirements on the stored object described in
-23.1[lib.container.requirements], the stored object must also meet the
-requirements of Assignable. Descriptions are provided here only for
-operations on vector that are not described in one of these tables or
-for operations where there is additional semantic information.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>list, set, multiset, map, multimap are able to store non-Assignables.
-However, there is some concern about <tt>list&lt;T&gt;</tt>:
-although in general there's no reason for T to be Assignable, some
-implementations of the member functions <tt>operator=</tt> and
-<tt>assign</tt> do rely on that requirement. The LWG does not want
-to forbid such implementations.</p>
-
-<p>Note that the type stored in a standard container must still satisfy
-the requirements of the container's allocator; this rules out, for
-example, such types as "const int". See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#274">274</a>
-for more details.
-</p>
-
-<p>In principle we could also relax the "Assignable" requirement for
-individual <tt>vector</tt> member functions, such as
-<tt>push_back</tt>. However, the LWG did not see great value in such
-selective relaxation. Doing so would remove implementors' freedom to
-implement <tt>vector::push_back</tt> in terms of
-<tt>vector::insert</tt>.</p>
-
-<hr>
-<a name="278"><h3>278.&nbsp;What does iterator validity mean?</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;P.J. Plauger&nbsp; <b>Date:</b>&nbsp;27 Nov 2000</p>
-<p>
-Section 23.2.2.4 [lib.list.ops] states that
-</p>
-<pre> void splice(iterator position, list&lt;T, Allocator&gt;&amp; x);
-</pre>
-<p>
-<i>invalidates</i> all iterators and references to list <tt>x</tt>.
-</p>
-
-<p>
-But what does the C++ Standard mean by "invalidate"? You
-can still dereference the iterator to a spliced list element, but
-you'd better not use it to delimit a range within the original
-list. For the latter operation, it has definitely lost some of its
-validity.
-</p>
-
-<p>
-If we accept the proposed resolution to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>,
-then we'd better clarify that a "valid" iterator need no
-longer designate an element within the same container as it once did.
-We then have to clarify what we mean by invalidating a past-the-end
-iterator, as when a vector or string grows by reallocation. Clearly,
-such an iterator has a different kind of validity. Perhaps we should
-introduce separate terms for the two kinds of "validity."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following text to the end of section 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>,
-after paragraph 5:</p>
-<blockquote>
-An <i>invalid</i> iterator is an iterator that may be
-singular. [Footnote: This definition applies to pointers, since
-pointers are iterators. The effect of dereferencing an iterator that
-has been invalidated is undefined.]
-</blockquote>
-
-<p><i>[post-Copenhagen: Matt provided wording.]</i></p>
-
-<p><i>[Redmond: General agreement with the intent, some objections to
-the wording. Dave provided new wording.]</i></p>
-<p><b>Rationale:</b></p>
-<p>This resolution simply defines a term that the Standard uses but
- never defines, "invalid", in terms of a term that is defined,
- "singular".</p>
-
-<p>Why do we say "may be singular", instead of "is singular"? That's
- becuase a valid iterator is one that is known to be nonsingular.
- Invalidating an iterator means changing it in such a way that it's
- no longer known to be nonsingular. An example: inserting an
- element into the middle of a vector is correctly said to invalidate
- all iterators pointing into the vector. That doesn't necessarily
- mean they all become singular.</p>
-<hr>
-<a name="280"><h3>280.&nbsp;Comparison of reverse_iterator to const reverse_iterator</h3></a><p><b>Section:</b>&nbsp;24.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterators"> [lib.reverse.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Cleary&nbsp; <b>Date:</b>&nbsp;27 Nov 2000</p>
-<p>
-This came from an email from Steve Cleary to Fergus in reference to
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
-this in Toronto and believed it should be a separate issue. There was
-also some reservations about whether this was a worthwhile problem to
-fix.
-</p>
-
-<p>
-Steve said: "Fixing reverse_iterator. std::reverse_iterator can
-(and should) be changed to preserve these additional
-requirements." He also said in email that it can be done without
-breaking user's code: "If you take a look at my suggested
-solution, reverse_iterator doesn't have to take two parameters; there
-is no danger of breaking existing code, except someone taking the
-address of one of the reverse_iterator global operator functions, and
-I have to doubt if anyone has ever done that. . . <i>But</i>, just in
-case they have, you can leave the old global functions in as well --
-they won't interfere with the two-template-argument functions. With
-that, I don't see how <i>any</i> user code could break."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-<b>Section:</b> 24.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterator"> [lib.reverse.iterator]</a>
-add/change the following declarations:</p>
-<pre> A) Add a templated assignment operator, after the same manner
- as the templated copy constructor, i.e.:
-
- template &lt; class U &gt;
- reverse_iterator &lt; Iterator &gt;&amp; operator=(const reverse_iterator&lt; U &gt;&amp; u);
-
- B) Make all global functions (except the operator+) have
- two template parameters instead of one, that is, for
- operator ==, !=, &lt;, &gt;, &lt;=, &gt;=, - replace:
-
- template &lt; class Iterator &gt;
- typename reverse_iterator&lt; Iterator &gt;::difference_type operator-(
- const reverse_iterator&lt; Iterator &gt;&amp; x,
- const reverse_iterator&lt; Iterator &gt;&amp; y);
-
- with:
-
- template &lt; class Iterator1, class Iterator2 &gt;
- typename reverse_iterator &lt; Iterator1 &gt;::difference_type operator-(
- const reverse_iterator &lt; Iterator1 &gt; &amp; x,
- const reverse_iterator &lt; Iterator2 &gt; &amp; y);
-</pre>
-<p>
-Also make the addition/changes for these signatures in
-24.4.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.ops"> [lib.reverse.iter.ops]</a>.
-</p>
-
-<p><i>[
-Copenhagen: The LWG is concerned that the proposed resolution
-introduces new overloads. Experience shows that introducing
-overloads is always risky, and that it would be inappropriate to
-make this change without implementation experience. It may be
-desirable to provide this feature in a different way.
-]</i></p>
-
-<p><i>[
-Lillehammer: We now have implementation experience, and agree that
-this solution is safe and correct.
-]</i></p>
-
-<hr>
-<a name="281"><h3>281.&nbsp;std::min() and max() requirements overly restrictive</h3></a><p><b>Section:</b>&nbsp;25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Dec 2000</p>
-<p>The requirements in 25.3.7, p1 and 4 call for T to satisfy the
-requirements of <tt>LessThanComparable</tt> (20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>)
-and <tt>CopyConstructible</tt> (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>).
-Since the functions take and return their arguments and result by
-const reference, I believe the <tt>CopyConstructible</tt> requirement
-is unnecessary.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the <tt>CopyConstructible</tt> requirement. Specifically, replace
-25.3.7, p1 with</p>
-<p><b>-1- Requires:</b> Type T is <tt>LessThanComparable</tt>
-(20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>).
-</p>
-<p>and replace 25.3.7, p4 with</p>
-<p><b>-4- Requires:</b> Type T is <tt>LessThanComparable</tt>
-(20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>).
-</p>
-<hr>
-<a name="282"><h3>282.&nbsp;What types does numpunct grouping refer to?</h3></a><p><b>Section:</b>&nbsp;22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;5 Dec 2000</p>
-<p>
-Paragraph 16 mistakenly singles out integral types for inserting
-thousands_sep() characters. This conflicts with the syntax for floating
-point numbers described under 22.2.3.1/2.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change paragraph 16 from:</p>
-
-<blockquote>
-For integral types, punct.thousands_sep() characters are inserted into
-the sequence as determined by the value returned by punct.do_grouping()
-using the method described in 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>.
-</blockquote>
-
-<p>To:</p>
-
-<blockquote>
-For arithmetic types, punct.thousands_sep() characters are inserted into
-the sequence as determined by the value returned by punct.do_grouping()
-using the method described in 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>.
-</blockquote>
-
-<p><i>[
-Copenhagen: Opinions were divided about whether this is actually an
-inconsistency, but at best it seems to have been unintentional. This
-is only an issue for floating-point output: The standard is
-unambiguous that implementations must parse thousands_sep characters
-when performing floating-point. The standard is also unambiguous that
-this requirement does not apply to the "C" locale.
-]</i></p>
-
-<p><i>[
-A survey of existing practice is needed; it is believed that some
-implementations do insert thousands_sep characters for floating-point
-output and others fail to insert thousands_sep characters for
-floating-point input even though this is unambiguously required by the
-standard.
-]</i></p>
-
-<p><i>[Post-Curaçao: the above proposed resolution is the consensus of
-Howard, Bill, Pete, Benjamin, Nathan, Dietmar, Boris, and Martin.]</i></p>
-
-<hr>
-<a name="283"><h3>283.&nbsp;std::replace() requirement incorrect/insufficient</h3></a><p><b>Section:</b>&nbsp;25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Dec 2000</p>
-<p>
-(revision of the further discussion)
-There are a number of problems with the requires clauses for the
-algorithms in 25.1 and 25.2. The requires clause of each algorithm
-should describe the necessary and sufficient requirements on the inputs
-to the algorithm such that the algorithm compiles and runs properly.
-Many of the requires clauses fail to do this. Here is a summary of the kinds
-of mistakes:
-</p>
-
-<ol>
-<li>
-Use of EqualityComparable, which only puts requirements on a single
-type, when in fact an equality operator is required between two
-different types, typically either T and the iterator's value type
-or between the value types of two different iterators.
-</li>
-<li>
-Use of Assignable for T when in fact what was needed is Assignable
-for the value_type of the iterator, and convertability from T to the
-value_type of the iterator. Or for output iterators, the requirement
-should be that T is writable to the iterator (output iterators do
-not have value types).
-</li>
-</ol>
-
-<p>
-Here is the list of algorithms that contain mistakes:
-</p>
-
-<ul>
-<li>25.1.2 std::find</li>
-<li>25.1.6 std::count</li>
-<li>25.1.8 std::equal</li>
-<li>25.1.9 std::search, std::search_n</li>
-<li>25.2.4 std::replace, std::replace_copy</li>
-<li>25.2.5 std::fill</li>
-<li>25.2.7 std::remove, std::remove_copy</li>
-</ul>
-
-<p>
-Also, in the requirements for EqualityComparable, the requirement that
-the operator be defined for const objects is lacking.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>20.1.1 Change p1 from</p>
-
-<p>In Table 28, <tt>T</tt> is a type to be supplied by a C++ program
-instantiating a template, <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
-values of type <tt>T</tt>.
-</p>
-
-<p>to</p>
-
-<p>
-In Table 28, <tt>T</tt> is a type to be supplied by a C++ program
-instantiating a template, <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are
-values of type <tt>const T</tt>.
-</p>
-
-<p>25 Between p8 and p9</p>
-
-<p>Add the following sentence:</p>
-
-<p>When the description of an algorithm gives an expression such as
-<tt>*first == value</tt> for a condition, it is required that the expression
-evaluate to either true or false in boolean contexts.</p>
-
-<p>25.1.2 Change p1 by deleting the requires clause.</p>
-
-<p>25.1.6 Change p1 by deleting the requires clause.</p>
-
-<p>25.1.9</p>
-
-<p>Change p4 from</p>
-
-<p>-4- Requires: Type <tt>T</tt> is <tt>EqualityComparable</tt>
-(20.1.1), type Size is convertible to integral type (4.7.12.3).
-</p>
-
-<p>to</p>
-
-<p>-4- Requires: The type <tt>Size</tt> is convertible to integral
-type (4.7.12.3).</p>
-
-<p>25.2.4 Change p1 from</p>
-
-<p>-1- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1 ) (and, for <tt>replace()</tt>, <tt>EqualityComparable</tt> (20.1.1 )).</p>
-
-<p>to</p>
-
-<p>-1- Requires: The expression <tt>*first = new_value</tt> must be valid.</p>
-
-<p>and change p4 from</p>
-
-<p>-4- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1) (and,
-for <tt>replace_copy()</tt>, <tt>EqualityComparable</tt>
-(20.1.1)). The ranges <tt>[first, last)</tt> and <tt>[result, result +
-(last - first))</tt> shall not overlap.</p>
-
-<p>to</p>
-
-<p>-4- Requires: The results of the expressions <tt>*first</tt> and
-<tt>new_value</tt> must be writable to the result output iterator. The
-ranges <tt>[first, last)</tt> and <tt>[result, result + (last -
-first))</tt> shall not overlap.</p>
-
-
-<p>25.2.5 Change p1 from</p>
-
-<p>-1- Requires: Type <tt>T</tt> is <tt>Assignable</tt> (23.1). The
-type <tt>Size</tt> is convertible to an integral type (4.7.12.3).</p>
-
-<p>to</p>
-
-<p>-1- Requires: The expression <tt>value</tt> must be is writable to
-the output iterator. The type <tt>Size</tt> is convertible to an
-integral type (4.7.12.3).</p>
-
-<p>25.2.7 Change p1 from</p>
-
-<p>-1- Requires: Type <tt>T</tt> is <tt>EqualityComparable</tt> (20.1.1).</p>
-
-<p>to</p>
-
-<p>
--1- Requires: The value type of the iterator must be
-<tt>Assignable</tt> (23.1).
-</p>
-
-<p><b>Rationale:</b></p>
-<p>
-The general idea of the proposed solution is to remove the faulty
-requires clauses and let the returns and effects clauses speak for
-themselves. That is, the returns clauses contain expressions that must
-be valid, and therefore already imply the correct requirements. In
-addition, a sentence is added at the beginning of chapter 25 saying
-that expressions given as conditions must evaluate to true or false in
-a boolean context. An alternative would be to say that the type of
-these condition expressions must be literally bool, but that would be
-imposing a greater restriction that what the standard currently says
-(which is convertible to bool).
-</p>
-<hr>
-<a name="284"><h3>284.&nbsp;unportable example in 20.3.7, p6</h3></a><p><b>Section:</b>&nbsp;20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;26 Dec 2000</p>
-<p>The example in 20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a>, p6 shows how to use the C
-library function <tt>strcmp()</tt> with the function pointer adapter
-<tt>ptr_fun()</tt>. But since it's unspecified whether the C library
-functions have <tt>extern "C"</tt> or <tt>extern
-"C++"</tt> linkage [17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a>], and since
-function pointers with different the language linkage specifications
-(7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.link"> [dcl.link]</a>) are incompatible, whether this example is
-well-formed is unspecified.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a> paragraph 6 from:</p>
-<blockquote>
- <p>[<i>Example:</i></p>
- <pre> replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++");
- </pre>
- <p>replaces each <tt>C</tt> with <tt>C++</tt> in sequence <tt>v</tt>.</p>
-</blockquote>
-
-
-<p>to:</p>
-<blockquote>
- <p>[<i>Example:</i></p>
- <pre> int compare(const char*, const char*);
- replace_if(v.begin(), v.end(),
- not1(bind2nd(ptr_fun(compare), "abc")), "def");
- </pre>
- <p>replaces each <tt>abc</tt> with <tt>def</tt> in sequence <tt>v</tt>.</p>
-</blockquote>
-
-<p>Also, remove footnote 215 in that same paragraph.</p>
-
-<p><i>[Copenhagen: Minor change in the proposed resolution. Since this
-issue deals in part with C and C++ linkage, it was believed to be too
-confusing for the strings in the example to be "C" and "C++".
-]</i></p>
-
-<p><i>[Redmond: More minor changes. Got rid of the footnote (which
-seems to make a sweeping normative requirement, even though footnotes
-aren't normative), and changed the sentence after the footnote so that
-it corresponds to the new code fragment.]</i></p>
-
-<hr>
-<a name="285"><h3>285.&nbsp;minor editorial errors in fstream ctors</h3></a><p><b>Section:</b>&nbsp;27.8.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.cons"> [lib.ifstream.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;31 Dec 2000</p>
-<p>27.8.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.cons"> [lib.ifstream.cons]</a>, p2, 27.8.1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.cons"> [lib.ofstream.cons]</a>, p2, and
-27.8.1.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.cons"> [lib.fstream.cons]</a>, p2 say about the effects of each constructor:
-</p>
-
-<p>... If that function returns a null pointer, calls
-<tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>).
-</p>
-
-<p>The parenthetical note doesn't apply since the ctors cannot throw an
-exception due to the requirement in 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>, p3
-that <tt>exceptions()</tt> be initialized to <tt>ios_base::goodbit</tt>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Strike the parenthetical note from the Effects clause in each of the
-paragraphs mentioned above.
-</p>
-<hr>
-<a name="286"><h3>286.&nbsp;&lt;cstdlib&gt; requirements missing size_t typedef</h3></a><p><b>Section:</b>&nbsp;25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;30 Dec 2000</p>
-<p>
-The &lt;cstdlib&gt; header file contains prototypes for bsearch and
-qsort (C++ Standard section 25.4 paragraphs 3 and 4) and other
-prototypes (C++ Standard section 21.4 paragraph 1 table 49) that
-require the typedef size_t. Yet size_t is not listed in the
-&lt;cstdlib&gt; synopsis table 78 in section 25.4.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add the type size_t to Table 78 (section 25.4) and add
-the type size_t &lt;cstdlib&gt; to Table 97 (section C.2).
-</p>
-<p><b>Rationale:</b></p>
-<p>Since size_t is in &lt;stdlib.h&gt;, it must also be in &lt;cstdlib&gt;.</p>
-<hr>
-<a name="288"><h3>288.&nbsp;&lt;cerrno&gt; requirements missing macro EILSEQ</h3></a><p><b>Section:</b>&nbsp;19.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.errno"> [lib.errno]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Judy Ward&nbsp; <b>Date:</b>&nbsp;30 Dec 2000</p>
-<p>
-ISO/IEC 9899:1990/Amendment1:1994 Section 4.3 States: "The list
-of macros defined in &lt;errno.h&gt; is adjusted to include a new
-macro, EILSEQ"
-</p>
-
-<p>
-ISO/IEC 14882:1998(E) section 19.3 does not refer
-to the above amendment.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Update Table 26 (section 19.3) "Header &lt;cerrno&gt; synopsis"
-and Table 95 (section C.2) "Standard Macros" to include EILSEQ.
-</p>
-<hr>
-<a name="291"><h3>291.&nbsp;Underspecification of set algorithms</h3></a><p><b>Section:</b>&nbsp;25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;03 Jan 2001</p>
-<p>
-The standard library contains four algorithms that compute set
-operations on sorted ranges: <tt>set_union</tt>, <tt>set_intersection</tt>,
-<tt>set_difference</tt>, and <tt>set_symmetric_difference</tt>. Each
-of these algorithms takes two sorted ranges as inputs, and writes the
-output of the appropriate set operation to an output range. The elements
-in the output range are sorted.
-</p>
-
-<p>
-The ordinary mathematical definitions are generalized so that they
-apply to ranges containing multiple copies of a given element. Two
-elements are considered to be "the same" if, according to an
-ordering relation provided by the user, neither one is less than the
-other. So, for example, if one input range contains five copies of an
-element and another contains three, the output range of <tt>set_union</tt>
-will contain five copies, the output range of
-<tt>set_intersection</tt> will contain three, the output range of
-<tt>set_difference</tt> will contain two, and the output range of
-<tt>set_symmetric_difference</tt> will contain two.
-</p>
-
-<p>
-Because two elements can be "the same" for the purposes
-of these set algorithms, without being identical in other respects
-(consider, for example, strings under case-insensitive comparison),
-this raises a number of unanswered questions:
-</p>
-
-<ul>
-<li>If we're copying an element that's present in both of the
-input ranges, which one do we copy it from?</li>
-<li>If there are <i>n</i> copies of an element in the relevant
-input range, and the output range will contain fewer copies (say
-<i>m</i>) which ones do we choose? The first <i>m</i>, or the last
-<i>m</i>, or something else?</li>
-<li>Are these operations stable? That is, does a run of equivalent
-elements appear in the output range in the same order as as it
-appeared in the input range(s)?</li>
-</ul>
-
-<p>
-The standard should either answer these questions, or explicitly
-say that the answers are unspecified. I prefer the former option,
-since, as far as I know, all existing implementations behave the
-same way.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Add the following to the end of 25.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.union"> [lib.set.union]</a> paragraph 5:</p>
-<blockquote>
-If [first1, last1) contains <i>m</i> elements that are equivalent to
-each other and [first2, last2) contains <i>n</i> elements that are
-equivalent to them, then max(<i>m</i>, <i>n</i>) of these elements
-will be copied to the output range: all <i>m</i> of these elements
-from [first1, last1), and the last max(<i>n-m</i>, 0) of them from
-[first2, last2), in that order.
-</blockquote>
-
-<p>Add the following to the end of 25.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.intersection"> [lib.set.intersection]</a> paragraph 5:</p>
-<blockquote>
-If [first1, last1) contains <i>m</i> elements that are equivalent to each
-other and [first2, last2) contains <i>n</i> elements that are
-equivalent to them, the first min(<i>m</i>, <i>n</i>) of those
-elements from [first1, last1) are copied to the output range.
-</blockquote>
-
-<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.difference"> [lib.set.difference]</a>
-paragraph 4:</p>
-<blockquote>
-If [first1, last1) contains <i>m</i> elements that are equivalent to each
-other and [first2, last2) contains <i>n</i> elements that are
-equivalent to them, the last max(<i>m-n</i>, 0) elements from
-[first1, last1) are copied to the output range.
-</blockquote>
-
-<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.symmetric.difference"> [lib.set.symmetric.difference]</a>
-paragraph 4:</p>
-<blockquote>
-If [first1, last1) contains <i>m</i> elements that are equivalent to
-each other and [first2, last2) contains <i>n</i> elements that are
-equivalent to them, then |<i>m - n</i>| of those elements will be
-copied to the output range: the last <i>m - n</i> of these elements
-from [first1, last1) if <i>m</i> &gt; <i>n</i>, and the last <i>n -
-m</i> of these elements from [first2, last2) if <i>m</i> &lt; <i>n</i>.
-</blockquote>
-
-<p><i>[Santa Cruz: it's believed that this language is clearer than
- what's in the Standard. However, it's also believed that the
- Standard may already make these guarantees (although not quite in
- these words). Bill and Howard will check and see whether they think
- that some or all of these changes may be redundant. If so, we may
- close this issue as NAD.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>For simple cases, these descriptions are equivalent to what's
- already in the Standard. For more complicated cases, they describe
- the behavior of existing implementations.</p>
-<hr>
-<a name="292"><h3>292.&nbsp;effects of a.copyfmt (a)</h3></a><p><b>Section:</b>&nbsp;27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;05 Jan 2001</p>
-<p>The Effects clause of the member function <tt>copyfmt()</tt> in
-27.4.4.2, p15 doesn't consider the case where the left-hand side
-argument is identical to the argument on the right-hand side, that is
-<tt>(this == &amp;rhs)</tt>. If the two arguments are identical there
-is no need to copy any of the data members or call any callbacks
-registered with <tt>register_callback()</tt>. Also, as Howard Hinnant
-points out in message c++std-lib-8149 it appears to be incorrect to
-allow the object to fire <tt>erase_event</tt> followed by
-<tt>copyfmt_event</tt> since the callback handling the latter event
-may inadvertently attempt to access memory freed by the former.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the Effects clause in 27.4.4.2, p15 from</p>
-
-<blockquote>
-<b>-15- Effects:</b>Assigns to the member objects of <tt>*this</tt>
-the corresponding member objects of <tt>rhs</tt>, except that...
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-<b>-15- Effects:</b>If <tt>(this == &amp;rhs)</tt> does nothing. Otherwise
-assigns to the member objects of <tt>*this</tt> the corresponding member
-objects of <tt>rhs</tt>, except that...
-</blockquote>
-<hr>
-<a name="294"><h3>294.&nbsp;User defined macros and standard headers</h3></a><p><b>Section:</b>&nbsp;17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;James Kanze&nbsp; <b>Date:</b>&nbsp;11 Jan 2001</p>
-<p>Paragraph 2 of 17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a> reads: "A
-translation unit that includes a header shall not contain any macros
-that define names declared in that header." As I read this, it
-would mean that the following program is legal:</p>
-
-<pre> #define npos 3.14
- #include &lt;sstream&gt;
-</pre>
-
-<p>since npos is not defined in &lt;sstream&gt;. It is, however, defined
-in &lt;string&gt;, and it is hard to imagine an implementation in
-which &lt;sstream&gt; didn't include &lt;string&gt;.</p>
-
-<p>I think that this phrase was probably formulated before it was
-decided that a standard header may freely include other standard
-headers. The phrase would be perfectly appropriate for C, for
-example. In light of 17.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.headers"> [lib.res.on.headers]</a> paragraph 1, however,
-it isn't stringent enough.</p>
-<p><b>Proposed resolution:</b></p>
-<p>For 17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a>, replace the current wording, which reads:</p>
-<blockquote>
- <p>Each name defined as a macro in a header is reserved to the
- implementation for any use if the translation unit includes
- the header.168)</p>
-
- <p>A translation unit that includes a header shall not contain any
- macros that define names declared or defined in that header. Nor shall
- such a translation unit define macros for names lexically
- identical to keywords.</p>
-
- <p>168) It is not permissible to remove a library macro definition by
- using the #undef directive.</p>
-</blockquote>
-
-<p>with the wording:</p>
-
-<blockquote>
- <p>A translation unit that includes a standard library header shall not
- #define or #undef names declared in any standard library header.</p>
-
- <p>A translation unit shall not #define or #undef names lexically
- identical to keywords.</p>
-</blockquote>
-
-<p><i>[Lillehammer: Beman provided new wording]</i></p>
-
-<hr>
-<a name="295"><h3>295.&nbsp;Is abs defined in &lt;cmath&gt;?</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Jens Maurer&nbsp; <b>Date:</b>&nbsp;12 Jan 2001</p>
-<p>
-Table 80 lists the contents of the &lt;cmath&gt; header. It does not
-list <tt>abs()</tt>. However, 26.5, paragraph 6, which lists added
-signatures present in &lt;cmath&gt;, does say that several overloads
-of <tt>abs()</tt> should be defined in &lt;cmath&gt;.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add <tt>abs</tt> to Table 80. Also, remove the parenthetical list
-of functions "(abs(), div(), rand(), srand())" from 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>,
-paragraph 1.
-</p>
-
-<p><i>[Copenhagen: Modified proposed resolution so that it also gets
-rid of that vestigial list of functions in paragraph 1.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>All this DR does is fix a typo; it's uncontroversial. A
-separate question is whether we're doing the right thing in
-putting some overloads in &lt;cmath&gt; that we aren't also
-putting in &lt;cstdlib&gt;. That's issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.</p>
-<hr>
-<a name="297"><h3>297.&nbsp;const_mem_fun_t&lt;&gt;::argument_type should be const T*</h3></a><p><b>Section:</b>&nbsp;20.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.logical.operations"> [lib.logical.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;6 Jan 2001</p>
-<p>The class templates <tt>const_mem_fun_t</tt> in 20.5.8, p8 and
-<tt>const_mem_fun1_t</tt>
-in 20.5.8, p9 derive from <tt>unary_function&lt;T*, S&gt;</tt>, and
-<tt>binary_function&lt;T*,
-A, S&gt;</tt>, respectively. Consequently, their <tt>argument_type</tt>, and
-<tt>first_argument_type</tt>
-members, respectively, are both defined to be <tt>T*</tt> (non-const).
-However, their function call member operator takes a <tt>const T*</tt>
-argument. It is my opinion that <tt>argument_type</tt> should be <tt>const
-T*</tt> instead, so that one can easily refer to it in generic code. The
-example below derived from existing code fails to compile due to the
-discrepancy:
-</p>
-
-<p><tt>template &lt;class T&gt;</tt>
-<br><tt>void foo (typename T::argument_type arg)&nbsp;&nbsp; // #1</tt>
-<br><tt>{</tt>
-<br><tt>&nbsp;&nbsp;&nbsp; typename T::result_type (T::*pf) (typename
-T::argument_type)
-const =&nbsp;&nbsp; // #2</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;T::operator();</tt>
-<br><tt>}</tt>
-</p>
-
-<p><tt>struct X { /* ... */ };</tt></p>
-
-<p><tt>int main ()</tt>
-<br><tt>{</tt>
-<br><tt>&nbsp;&nbsp;&nbsp; const X x;</tt>
-<br><tt>&nbsp;&nbsp;&nbsp; foo&lt;std::const_mem_fun_t&lt;void, X&gt;
-&gt;(&amp;x);&nbsp;&nbsp;
-// #3</tt>
-<br><tt>}</tt>
-</p>
-
-<p>#1 <tt>foo()</tt> takes a plain unqualified <tt>X*</tt> as an argument
-<br>#2 the type of the pointer is incompatible with the type of the member
-function
-<br>#3 the address of a constant being passed to a function taking a non-const
-<tt>X*</tt>
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace the top portion of the definition of the class template
-const_mem_fun_t in 20.5.8, p8
-</p>
-<p><tt>template &lt;class S, class T&gt; class const_mem_fun_t</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
-unary_function&lt;T*, S&gt; {</tt>
-</p>
-<p>with</p>
-<p><tt>template &lt;class S, class T&gt; class const_mem_fun_t</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
-unary_function&lt;<b>const</b> T*, S&gt; {</tt>
-</p>
-<p>Also replace the top portion of the definition of the class template
-const_mem_fun1_t in 20.5.8, p9</p>
-<p><tt>template &lt;class S, class T, class A&gt; class const_mem_fun1_t</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
-binary_function&lt;T*, A, S&gt; {</tt>
-</p>
-<p>with</p>
-<p><tt>template &lt;class S, class T, class A&gt; class const_mem_fun1_t</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : public
-binary_function&lt;<b>const</b> T*, A, S&gt; {</tt>
-</p>
-<p><b>Rationale:</b></p>
-<p>This is simply a contradiction: the <tt>argument_type</tt> typedef,
-and the argument type itself, are not the same.</p>
-<hr>
-<a name="298"><h3>298.&nbsp;::operator delete[] requirement incorrect/insufficient</h3></a><p><b>Section:</b>&nbsp;18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;John A. Pedretti&nbsp; <b>Date:</b>&nbsp;10 Jan 2001</p>
-<p>
-The default behavior of <tt>operator delete[]</tt> described in 18.5.1.2, p12 -
-namely that for non-null value of <i>ptr</i>, the operator reclaims storage
-allocated by the earlier call to the default <tt>operator new[]</tt> - is not
-correct in all cases. Since the specified <tt>operator new[]</tt> default
-behavior is to call <tt>operator new</tt> (18.5.1.2, p4, p8), which can be
-replaced, along with <tt>operator delete</tt>, by the user, to implement their
-own memory management, the specified default behavior of<tt> operator
-delete[]</tt> must be to call <tt>operator delete</tt>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 18.5.1.2, p12 from</p>
-<blockquote>
-<b>-12-</b> <b>Default behavior:</b>
-<ul>
-<li>
-For a null value of <i><tt>ptr</tt></i> , does nothing.
-</li>
-<li>
-Any other value of <i><tt>ptr</tt></i> shall be a value returned
-earlier by a call to the default <tt>operator new[](std::size_t)</tt>.
-[Footnote: The value must not have been invalidated by an intervening
-call to <tt>operator delete[](void*)</tt> (17.4.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.arguments"> [lib.res.on.arguments]</a>).
---- end footnote]
-For such a non-null value of <i><tt>ptr</tt></i> , reclaims storage
-allocated by the earlier call to the default <tt>operator new[]</tt>.
-</li>
-</ul>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-<b>-12-</b> <b>Default behavior: </b>Calls <tt>operator
-delete(</tt><i>ptr</i>)
-or <tt>operator delete(<i>ptr</i>, std::nothrow)</tt> respectively.
-</blockquote>
-<p>and expunge paragraph 13.</p>
-<hr>
-<a name="300"><h3>300.&nbsp;list::merge() specification incomplete</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;John Pedretti&nbsp; <b>Date:</b>&nbsp;23 Jan 2001</p>
-<p>
-The "Effects" clause for list::merge() (23.2.2.4, p23)
-appears to be incomplete: it doesn't cover the case where the argument
-list is identical to *this (i.e., this == &amp;x). The requirement in the
-note in p24 (below) is that x be empty after the merge which is surely
-unintended in this case.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraps 23-25 with:</p>
-<blockquote>
-<p>
-23 Effects: if (&amp;x == this) does nothing; otherwise, merges the two
-sorted ranges [begin(), end()) and [x.begin(), x.end()). The result
-is a range in which the elements will be sorted in non-decreasing
-order according to the ordering defined by comp; that is, for every
-iterator i in the range other than the first, the condition comp(*i,
-*(i - 1)) will be false.
-</p>
-
-<p>
-24 Notes: Stable: if (&amp;x != this), then for equivalent elements in the
-two original ranges, the elements from the original range [begin(),
-end()) always precede the elements from the original range [x.begin(),
-x.end()). If (&amp;x != this) the range [x.begin(), x.end()) is empty
-after the merge.
-</p>
-
-<p>
-25 Complexity: At most size() + x.size() - 1 applications of comp if
-(&amp;x ! = this); otherwise, no applications of comp are performed. If
-an exception is thrown other than by a comparison there are no
-effects.
-</p>
-
-</blockquote>
-
-<p><i>[Copenhagen: The original proposed resolution did not fix all of
-the problems in 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, p22-25. Three different
-paragraphs (23, 24, 25) describe the effects of <tt>merge</tt>.
-Changing p23, without changing the other two, appears to introduce
-contradictions. Additionally, "merges the argument list into the
-list" is excessively vague.]</i></p>
-
-<p><i>[Post-Curaçao: Robert Klarer provided new wording.]</i></p>
-
-<hr>
-<a name="301"><h3>301.&nbsp;basic_string template ctor effects clause omits allocator argument</h3></a><p><b>Section:</b>&nbsp;21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;27 Jan 2001</p>
-<p>
-The effects clause for the basic_string template ctor in 21.3.1, p15
-leaves out the third argument of type Allocator. I believe this to be
-a mistake.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace</p>
-
-<blockquote>
- <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral
- type, equivalent to</p>
-
- <blockquote><tt>basic_string(static_cast&lt;size_type&gt;(begin),
- static_cast&lt;value_type&gt;(end))</tt></blockquote>
-</blockquote>
-
-<p>with</p>
-
-<blockquote>
- <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral
- type, equivalent to</p>
-
- <blockquote><tt>basic_string(static_cast&lt;size_type&gt;(begin),
- static_cast&lt;value_type&gt;(end), <b>a</b>)</tt></blockquote>
-</blockquote>
-<hr>
-<a name="303"><h3>303.&nbsp;Bitset input operator underspecified</h3></a><p><b>Section:</b>&nbsp;23.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.operators"> [lib.bitset.operators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;5 Feb 2001</p>
-<p>
-In 23.3.5.3, we are told that <tt>bitset</tt>'s input operator
-"Extracts up to <i>N</i> (single-byte) characters from
-<i>is</i>.", where <i>is</i> is a stream of type
-<tt>basic_istream&lt;charT, traits&gt;</tt>.
-</p>
-
-<p>
-The standard does not say what it means to extract single byte
-characters from a stream whose character type, <tt>charT</tt>, is in
-general not a single-byte character type. Existing implementations
-differ.
-</p>
-
-<p>
-A reasonable solution will probably involve <tt>widen()</tt> and/or
-<tt>narrow()</tt>, since they are the supplied mechanism for
-converting a single character between <tt>char</tt> and
-arbitrary <tt>charT</tt>.
-</p>
-
-<p>Narrowing the input characters is not the same as widening the
-literals <tt>'0'</tt> and <tt>'1'</tt>, because there may be some
-locales in which more than one wide character maps to the narrow
-character <tt>'0'</tt>. Narrowing means that alternate
-representations may be used for bitset input, widening means that
-they may not be.</p>
-
-<p>Note that for numeric input, <tt>num_get&lt;&gt;</tt>
-(22.2.2.1.2/8) compares input characters to widened version of narrow
-character literals.</p>
-
-<p>From Pete Becker, in c++std-lib-8224:</p>
-<blockquote>
-<p>
-Different writing systems can have different representations for the
-digits that represent 0 and 1. For example, in the Unicode representation
-of the Devanagari script (used in many of the Indic languages) the digit 0
-is 0x0966, and the digit 1 is 0x0967. Calling narrow would translate those
-into '0' and '1'. But Unicode also provides the ASCII values 0x0030 and
-0x0031 for for the Latin representations of '0' and '1', as well as code
-points for the same numeric values in several other scripts (Tamil has no
-character for 0, but does have the digits 1-9), and any of these values
-would also be narrowed to '0' and '1'.
-</p>
-
-<p>...</p>
-
-<p>
-It's fairly common to intermix both native and Latin
-representations of numbers in a document. So I think the rule has to be
-that if a wide character represents a digit whose value is 0 then the bit
-should be cleared; if it represents a digit whose value is 1 then the bit
-should be set; otherwise throw an exception. So in a Devanagari locale,
-both 0x0966 and 0x0030 would clear the bit, and both 0x0967 and 0x0031
-would set it. Widen can't do that. It would pick one of those two values,
-and exclude the other one.
-</p>
-
-</blockquote>
-
-<p>From Jens Maurer, in c++std-lib-8233:</p>
-
-<blockquote>
-<p>
-Whatever we decide, I would find it most surprising if
-bitset conversion worked differently from int conversion
-with regard to alternate local representations of
-numbers.
-</p>
-
-<p>Thus, I think the options are:</p>
-<ul>
- <li> Have a new defect issue for 22.2.2.1.2/8 so that it will
-require the use of narrow().</li>
-
- <li> Have a defect issue for bitset() which describes clearly
-that widen() is to be used.</li>
-</ul>
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-
- <p>Replace the first two sentences of paragraph 5 with:</p>
-
- <blockquote>
- Extracts up to <i>N</i> characters from <i>is</i>. Stores these
- characters in a temporary object <i>str</i> of type
- <tt>basic_string&lt;charT, traits&gt;</tt>, then evaluates the
- expression <tt><i>x</i> = bitset&lt;N&gt;(<i>str</i>)</tt>.
- </blockquote>
-
- <p>Replace the third bullet item in paragraph 5 with:</p>
- <ul><li>
- the next input character is neither <tt><i>is</i>.widen(0)</tt>
- nor <tt><i>is</i>.widen(1)</tt> (in which case the input character
- is not extracted).
- </li></ul>
-
-<p><b>Rationale:</b></p>
-<p>Input for <tt>bitset</tt> should work the same way as numeric
-input. Using <tt>widen</tt> does mean that alternative digit
-representations will not be recognized, but this was a known
-consequence of the design choice.</p>
-<hr>
-<a name="305"><h3>305.&nbsp;Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;24 Jan 2001</p>
-<p>22.2.1.5/3 introduces codecvt in part with:</p>
-
-<blockquote>
- codecvt&lt;wchar_t,char,mbstate_t&gt; converts between the native
- character sets for tiny and wide characters. Instantiations on
- mbstate_t perform conversion between encodings known to the library
- implementor.
-</blockquote>
-
-<p>But 22.2.1.5.2/10 describes do_length in part with:</p>
-
-<blockquote>
- ... codecvt&lt;wchar_t, char, mbstate_t&gt; ... return(s) the lesser of max and
- (from_end-from).
-</blockquote>
-
-<p>
-The semantics of do_in and do_length are linked. What one does must
-be consistent with what the other does. 22.2.1.5/3 leads me to
-believe that the vendor is allowed to choose the algorithm that
-codecvt&lt;wchar_t,char,mbstate_t&gt;::do_in performs so that it makes
-his customers happy on a given platform. But 22.2.1.5.2/10 explicitly
-says what codecvt&lt;wchar_t,char,mbstate_t&gt;::do_length must
-return. And thus indirectly specifies the algorithm that
-codecvt&lt;wchar_t,char,mbstate_t&gt;::do_in must perform. I believe
-that this is not what was intended and is a defect.
-</p>
-
-<p>Discussion from the -lib reflector:
-
-<br>This proposal would have the effect of making the semantics of
-all of the virtual functions in <tt>codecvt&lt;wchar_t, char,
-mbstate_t&gt;</tt> implementation specified. Is that what we want, or
-do we want to mandate specific behavior for the base class virtuals
-and leave the implementation specified behavior for the codecvt_byname
-derived class? The tradeoff is that former allows implementors to
-write a base class that actually does something useful, while the
-latter gives users a way to get known and specified---albeit
-useless---behavior, and is consistent with the way the standard
-handles other facets. It is not clear what the original intention
-was.</p>
-
-<p>
-Nathan has suggest a compromise: a character that is a widened version
-of the characters in the basic execution character set must be
-converted to a one-byte sequence, but there is no such requirement
-for characters that are not part of the basic execution character set.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 22.2.1.5.2/5 from:
-</p>
-<p>
-The instantiations required in Table 51 (lib.locale.category), namely
-codecvt&lt;wchar_t,char,mbstate_t&gt; and
-codecvt&lt;char,char,mbstate_t&gt;, store no characters. Stores no more
-than (to_limit-to) destination elements. It always leaves the to_next
-pointer pointing one beyond the last element successfully stored.
-</p>
-<p>
-to:
-</p>
-<p>
-Stores no more than (to_limit-to) destination elements, and leaves the
-to_next pointer pointing one beyond the last element successfully
-stored. codecvt&lt;char,char,mbstate_t&gt; stores no characters.
-</p>
-
-<p>Change 22.2.1.5.2/10 from:</p>
-
-<blockquote>
--10- Returns: (from_next-from) where from_next is the largest value in
-the range [from,from_end] such that the sequence of values in the
-range [from,from_next) represents max or fewer valid complete
-characters of type internT. The instantiations required in Table 51
-(21.1.1.1.1), namely codecvt&lt;wchar_t, char, mbstate_t&gt; and
-codecvt&lt;char, char, mbstate_t&gt;, return the lesser of max and
-(from_end-from).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
--10- Returns: (from_next-from) where from_next is the largest value in
-the range [from,from_end] such that the sequence of values in the range
-[from,from_next) represents max or fewer valid complete characters of
-type internT. The instantiation codecvt&lt;char, char, mbstate_t&gt; returns
-the lesser of max and (from_end-from).
-</blockquote>
-
-<p><i>[Redmond: Nathan suggested an alternative resolution: same as
-above, but require that, in the default encoding, a character from the
-basic execution character set would map to a single external
-character. The straw poll was 8-1 in favor of the proposed
-resolution.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The default encoding should be whatever users of a given platform
-would expect to be the most natural. This varies from platform to
-platform. In many cases there is a preexisting C library, and users
-would expect the default encoding to be whatever C uses in the default
-"C" locale. We could impose a guarantee like the one Nathan suggested
-(a character from the basic execution character set must map to a
-single external character), but this would rule out important
-encodings that are in common use: it would rule out JIS, for
-example, and it would rule out a fixed-width encoding of UCS-4.</p>
-
-<p><i>[Curaçao: fixed rationale typo at the request of Ichiro Koshida;
-"shift-JIS" changed to "JIS".]</i></p>
-
-<hr>
-<a name="306"><h3>306.&nbsp;offsetof macro and non-POD types</h3></a><p><b>Section:</b>&nbsp;18.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.types"> [lib.support.types]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;21 Feb 2001</p>
-<p>Spliced together from reflector messages c++std-lib-8294 and -8295:</p>
-
-<p>18.1, paragraph 5, reads: "The macro <tt>offsetof</tt>
-accepts a restricted set of <i>type</i> arguments in this
-International Standard. <i>type</i> shall be a POD structure or a POD
-union (clause 9). The result of applying the offsetof macro to a field
-that is a static data member or a function member is
-undefined."</p>
-
-<p>For the POD requirement, it doesn't say "no diagnostic
-required" or "undefined behavior". I read 1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.compliance"> [intro.compliance]</a>, paragraph 1, to mean that a diagnostic is required.
-It's not clear whether this requirement was intended. While it's
-possible to provide such a diagnostic, the extra complication doesn't
-seem to add any value.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 18.1, paragraph 5, to "If <i>type</i> is not a POD
-structure or a POD union the results are undefined."</p>
-
-<p><i>[Copenhagen: straw poll was 7-4 in favor. It was generally
-agreed that requiring a diagnostic was inadvertent, but some LWG
-members thought that diagnostics should be required whenever
-possible.]</i></p>
-
-<hr>
-<a name="307"><h3>307.&nbsp;Lack of reference typedefs in container adaptors</h3></a><p><b>Section:</b>&nbsp;23.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list"> [lib.list]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;13 Mar 2001</p>
-
-<p>From reflector message c++std-lib-8330. See also lib-8317.</p>
-
-<p>
-The standard is currently inconsistent in 23.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.capacity"> [lib.list.capacity]</a>
-paragraph 1 and 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a> paragraph 1.
-23.2.3.3/1, for example, says:
-</p>
-
-<blockquote>
--1- Any sequence supporting operations back(), push_back() and pop_back()
-can be used to instantiate stack. In particular, vector (lib.vector), list
-(lib.list) and deque (lib.deque) can be used.
-</blockquote>
-
-<p>But this is false: vector&lt;bool&gt; can not be used, because the
-container adaptors return a T&amp; rather than using the underlying
-container's reference type.</p>
-
-<p>This is a contradiction that can be fixed by:</p>
-
-<ol>
-<li>Modifying these paragraphs to say that vector&lt;bool&gt;
- is an exception.</li>
-<li>Removing the vector&lt;bool&gt; specialization.</li>
-<li>Changing the return types of stack and priority_queue to use
- reference typedef's.</li>
-</ol>
-
-<p>
-I propose 3. This does not preclude option 2 if we choose to do it
-later (see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#96">96</a>); the issues are independent. Option
-3 offers a small step towards support for proxied containers. This
-small step fixes a current contradiction, is easy for vendors to
-implement, is already implemented in at least one popular lib, and
-does not break any code.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Summary: Add reference and const_reference typedefs to queue,
-priority_queue and stack. Change return types of "value_type&amp;" to
-"reference". Change return types of "const value_type&amp;" to
-"const_reference". Details:</p>
-
-<p>Change 23.2.3.1/1 from:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = deque&lt;T&gt; &gt;
- class queue {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
-
- public:
- explicit queue(const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- value_type&amp; front() { return c.front(); }
- const value_type&amp; front() const { return c.front(); }
- value_type&amp; back() { return c.back(); }
- const value_type&amp; back() const { return c.back(); }
- void push(const value_type&amp; x) { c.push_back(x); }
- void pop() { c.pop_front(); }
- };
-</pre>
-
-<p>to:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = deque&lt;T&gt; &gt;
- class queue {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
-
- public:
- explicit queue(const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- reference front() { return c.front(); }
- const_reference front() const { return c.front(); }
- reference back() { return c.back(); }
- const_reference back() const { return c.back(); }
- void push(const value_type&amp; x) { c.push_back(x); }
- void pop() { c.pop_front(); }
- };
-</pre>
-
-<p>Change 23.2.3.2/1 from:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = vector&lt;T&gt;,
- class Compare = less&lt;typename Container::value_type&gt; &gt;
- class priority_queue {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
- Compare comp;
-
- public:
- explicit priority_queue(const Compare&amp; x = Compare(),
- const Container&amp; = Container());
- template &lt;class InputIterator&gt;
- priority_queue(InputIterator first, InputIterator last,
- const Compare&amp; x = Compare(),
- const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- const value_type&amp; top() const { return c.front(); }
- void push(const value_type&amp; x);
- void pop();
- };
- // no equality is provided
- }
-</pre>
-
-<p>to:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = vector&lt;T&gt;,
- class Compare = less&lt;typename Container::value_type&gt; &gt;
- class priority_queue {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
- Compare comp;
-
- public:
- explicit priority_queue(const Compare&amp; x = Compare(),
- const Container&amp; = Container());
- template &lt;class InputIterator&gt;
- priority_queue(InputIterator first, InputIterator last,
- const Compare&amp; x = Compare(),
- const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- const_reference top() const { return c.front(); }
- void push(const value_type&amp; x);
- void pop();
- };
- // no equality is provided
- }
-</pre>
-
-<p>And change 23.2.3.3/1 from:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = deque&lt;T&gt; &gt;
- class stack {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
-
- public:
- explicit stack(const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- value_type&amp; top() { return c.back(); }
- const value_type&amp; top() const { return c.back(); }
- void push(const value_type&amp; x) { c.push_back(x); }
- void pop() { c.pop_back(); }
- };
-
- template &lt;class T, class Container&gt;
- bool operator==(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator!=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- }
-</pre>
-
-<p>to:</p>
-
-<pre> namespace std {
- template &lt;class T, class Container = deque&lt;T&gt; &gt;
- class stack {
- public:
- typedef typename Container::value_type value_type;
- typedef typename Container::reference reference;
- typedef typename Container::const_reference const_reference;
- typedef typename Container::size_type size_type;
- typedef Container container_type;
- protected:
- Container c;
-
- public:
- explicit stack(const Container&amp; = Container());
-
- bool empty() const { return c.empty(); }
- size_type size() const { return c.size(); }
- reference top() { return c.back(); }
- const_reference top() const { return c.back(); }
- void push(const value_type&amp; x) { c.push_back(x); }
- void pop() { c.pop_back(); }
- };
-
- template &lt;class T, class Container&gt;
- bool operator==(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&lt; (const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator!=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&gt; (const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&gt;=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- template &lt;class T, class Container&gt;
- bool operator&lt;=(const stack&lt;T, Container&gt;&amp; x,
- const stack&lt;T, Container&gt;&amp; y);
- }
-</pre>
-
-<p><i>[Copenhagen: This change was discussed before the IS was released
-and it was deliberately not adopted. Nevertheless, the LWG believes
-(straw poll: 10-2) that it is a genuine defect.]</i></p>
-
-<hr>
-<a name="308"><h3>308.&nbsp;Table 82 mentions unrelated headers</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Mar 2001</p>
-<p>
-Table 82 in section 27 mentions the header &lt;cstdlib&gt; for String
-streams (27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>) and the headers &lt;cstdio&gt; and
-&lt;cwchar&gt; for File streams (27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>). It's not clear
-why these headers are mentioned in this context since they do not
-define any of the library entities described by the
-subclauses. According to 17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a>, only such headers
-are to be listed in the summary.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove &lt;cstdlib&gt; and &lt;cwchar&gt; from
-Table 82.</p>
-
-<p><i>[Copenhagen: changed the proposed resolution slightly. The
-original proposed resolution also said to remove &lt;cstdio&gt; from
-Table 82. However, &lt;cstdio&gt; is mentioned several times within
-section 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>, including 27.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.c.files"> [lib.c.files]</a>.]</i></p>
-
-<hr>
-<a name="310"><h3>310.&nbsp;Is errno a macro?</h3></a><p><b>Section:</b>&nbsp;17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>, 19.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.errno"> [lib.errno]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;21 Mar 2001</p>
- <p>
- Exactly how should errno be declared in a conforming C++ header?
- </p>
-
- <p>
- The C standard says in 7.1.4 that it is unspecified whether errno is a
- macro or an identifier with external linkage. In some implementations
- it can be either, depending on compile-time options. (E.g., on
- Solaris in multi-threading mode, errno is a macro that expands to a
- function call, but is an extern int otherwise. "Unspecified" allows
- such variability.)
- </p>
-
- <p>The C++ standard:</p>
- <ul>
- <li>17.4.1.2 says in a note that errno must be macro in C. (false)</li>
- <li>17.4.3.1.3 footnote 166 says errno is reserved as an external
- name (true), and implies that it is an identifier.</li>
- <li>19.3 simply lists errno as a macro (by what reasoning?) and goes
- on to say that the contents of of C++ &lt;errno.h&gt; are the
- same as in C, begging the question.</li>
- <li>C.2, table 95 lists errno as a macro, without comment.</li>
- </ul>
-
- <p>I find no other references to errno.</p>
-
- <p>We should either explicitly say that errno must be a macro, even
- though it need not be a macro in C, or else explicitly leave it
- unspecified. We also need to say something about namespace std.
- A user who includes &lt;cerrno&gt; needs to know whether to write
- <tt>errno</tt>, or <tt>::errno</tt>, or <tt>std::errno</tt>, or
- else &lt;cerrno&gt; is useless.</p>
-
- <p>Two acceptable fixes:</p>
- <ul>
- <li><p>errno must be a macro. This is trivially satisfied by adding<br>
- &nbsp;&nbsp;#define errno (::std::errno)<br>
- to the headers if errno is not already a macro. You then always
- write errno without any scope qualification, and it always expands
- to a correct reference. Since it is always a macro, you know to
- avoid using errno as a local identifer.</p></li>
- <li><p>errno is in the global namespace. This fix is inferior, because
- ::errno is not guaranteed to be well-formed.</p></li>
- </ul>
-
- <p><i>[
- This issue was first raised in 1999, but it slipped through
- the cracks.
- ]</i></p>
-<p><b>Proposed resolution:</b></p>
- <p>Change the Note in section 17.4.1.2p5 from</p>
-
- <blockquote>
- Note: the names defined as macros in C include the following:
- assert, errno, offsetof, setjmp, va_arg, va_end, and va_start.
- </blockquote>
-
- <p>to</p>
-
- <blockquote>
- Note: the names defined as macros in C include the following:
- assert, offsetof, setjmp, va_arg, va_end, and va_start.
- </blockquote>
-
- <p>In section 19.3, change paragraph 2 from</p>
-
- <blockquote>
- The contents are the same as the Standard C library header
- &lt;errno.h&gt;.
- </blockquote>
-
- <p>to</p>
-
- <blockquote>
- The contents are the same as the Standard C library header
- &lt;errno.h&gt;, except that errno shall be defined as a macro.
- </blockquote>
-<p><b>Rationale:</b></p>
-<p>C++ must not leave it up to the implementation to decide whether or
-not a name is a macro; it must explicitly specify exactly which names
-are required to be macros. The only one that really works is for it
-to be a macro.</p>
-
-<p><i>[Curaçao: additional rationale added.]</i></p>
-
-<hr>
-<a name="311"><h3>311.&nbsp;Incorrect wording in basic_ostream class synopsis</h3></a><p><b>Section:</b>&nbsp;27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;21 Mar 2001</p>
-
-<p>In 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, the synopsis of class basic_ostream says:</p>
-
-<pre> // partial specializationss
- template&lt;class traits&gt;
- basic_ostream&lt;char,traits&gt;&amp; operator&lt;&lt;( basic_ostream&lt;char,traits&gt;&amp;,
- const char * );
-</pre>
-
-<p>Problems:</p>
-<ul>
-<li>Too many 's's at the end of "specializationss" </li>
-<li>This is an overload, not a partial specialization</li>
-</ul>
-
-<p><b>Proposed resolution:</b></p>
-<p>In the synopsis in 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, remove the
-<i>// partial specializationss</i> comment. Also remove the same
-comment (correctly spelled, but still incorrect) from the synopsis in
-27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a>.
-</p>
-
-<p><i>[
-Pre-Redmond: added 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> because of Martin's
-comment in c++std-lib-8939.
-]</i></p>
-
-<hr>
-<a name="312"><h3>312.&nbsp;Table 27 is missing headers</h3></a><p><b>Section:</b>&nbsp;20 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utilities"> [lib.utilities]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;29 Mar 2001</p>
-<p>Table 27 in section 20 lists the header &lt;memory&gt; (only) for
-Memory (lib.memory) but neglects to mention the headers
-&lt;cstdlib&gt; and &lt;cstring&gt; that are discussed in 20.4.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.rel"> [lib.meta.rel]</a>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add &lt;cstdlib&gt; and &lt;cstring&gt; to Table 27, in the same row
-as &lt;memory&gt;.</p>
-<hr>
-<a name="315"><h3>315.&nbsp;Bad "range" in list::unique complexity</h3></a><p><b>Section:</b>&nbsp;23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;1 May 2001</p>
-<p>
-23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, Para 21 describes the complexity of
-list::unique as: "If the range (last - first) is not empty, exactly
-(last - first) -1 applications of the corresponding predicate,
-otherwise no applications of the predicate)".
-</p>
-
-<p>
-"(last - first)" is not a range.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the "range" from (last - first) to [first, last).
-</p>
-<hr>
-<a name="316"><h3>316.&nbsp;Vague text in Table 69</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;4 May 2001</p>
-<p>Table 69 says this about a_uniq.insert(t):</p>
-
-<blockquote>
-inserts t if and only if there is no element in the container with key
-equivalent to the key of t. The bool component of the returned pair
-indicates whether the insertion takes place and the iterator component of the
-pair points to the element with key equivalent to the key of t.
-</blockquote>
-
-<p>The description should be more specific about exactly how the bool component
-indicates whether the insertion takes place.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the text in question to</p>
-
-<blockquote>
-...The bool component of the returned pair is true if and only if the insertion
-takes place...
-</blockquote>
-<hr>
-<a name="317"><h3>317.&nbsp;Instantiation vs. specialization of facets</h3></a><p><b>Section:</b>&nbsp;22 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.localization"> [lib.localization]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;4 May 2001</p>
-<p>
-The localization section of the standard refers to specializations of
-the facet templates as instantiations even though the required facets
-are typically specialized rather than explicitly (or implicitly)
-instantiated. In the case of ctype&lt;char&gt; and
-ctype_byname&lt;char&gt; (and the wchar_t versions), these facets are
-actually required to be specialized. The terminology should be
-corrected to make it clear that the standard doesn't mandate explicit
-instantiation (the term specialization encompasses both explicit
-instantiations and specializations).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In the following paragraphs, replace all occurrences of the word
-instantiation or instantiations with specialization or specializations,
-respectively:
-</p>
-
-<blockquote>
-22.1.1.1.1, p4, Table 52, 22.2.1.1, p2, 22.2.1.5, p3, 22.2.1.5.1, p5,
-22.2.1.5.2, p10, 22.2.2, p2, 22.2.3.1, p1, 22.2.3.1.2, p1, p2 and p3,
-22.2.4.1, p1, 22.2.4.1.2, p1, 22,2,5, p1, 22,2,6, p2, 22.2.6.3.2, p7, and
-Footnote 242.
-</blockquote>
-
-<p>And change the text in 22.1.1.1.1, p4 from</p>
-
-<blockquote>
- An implementation is required to provide those instantiations
- for facet templates identified as members of a category, and
- for those shown in Table 52:
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- An implementation is required to provide those specializations...
-</blockquote>
-
-<p><i>[Nathan will review these changes, and will look for places where
-explicit specialization is necessary.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>This is a simple matter of outdated language. The language to
-describe templates was clarified during the standardization process,
-but the wording in clause 22 was never updated to reflect that
-change.</p>
-<hr>
-<a name="318"><h3>318.&nbsp;Misleading comment in definition of numpunct_byname</h3></a><p><b>Section:</b>&nbsp;22.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct.byname"> [lib.locale.numpunct.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 May 2001</p>
-<p>The definition of the numpunct_byname template contains the following
-comment:</p>
-
-<pre> namespace std {
- template &lt;class charT&gt;
- class numpunct_byname : public numpunct&lt;charT&gt; {
- // this class is specialized for char and wchar_t.
- ...
-</pre>
-
-<p>There is no documentation of the specializations and it seems
-conceivable that an implementation will not explicitly specialize the
-template at all, but simply provide the primary template.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the comment from the text in 22.2.3.2 and from the proposed
-resolution of library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
-<hr>
-<a name="319"><h3>319.&nbsp;Storage allocation wording confuses "Required behavior", "Requires"</h3></a><p><b>Section:</b>&nbsp;18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a>, 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;15 May 2001</p>
-<p>The standard specifies 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> that "Required
-behavior" elements describe "the semantics of a function definition
-provided by either the implementation or a C++ program."</p>
-
-<p>The standard specifies 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> that "Requires"
-elements describe "the preconditions for calling the function."</p>
-
-<p>In the sections noted below, the current wording specifies
-"Required Behavior" for what are actually preconditions, and thus
-should be specified as "Requires".</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>In 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> Para 12 Change:</p>
-<blockquote>
- <p>Required behavior: accept a value of ptr that is null or that was
- returned by an earlier call ...</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>Requires: the value of ptr is null or the value returned by an
- earlier call ...</p>
-</blockquote>
-
-<p>In 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a> Para 11 Change:</p>
-<blockquote>
- <p>Required behavior: accept a value of ptr that is null or that was
- returned by an earlier call ...</p>
-</blockquote>
-<p>to:</p>
-<blockquote>
- <p>Requires: the value of ptr is null or the value returned by an
- earlier call ...</p>
-</blockquote>
-
-<hr>
-<a name="320"><h3>320.&nbsp;list::assign overspecified</h3></a><p><b>Section:</b>&nbsp;23.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.cons"> [lib.deque.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;17 May 2001</p>
-<p>
-Section 23.2.2.1, paragraphs 6-8 specify that list assign (both forms) have
-the "effects" of a call to erase followed by a call to insert.
-</p>
-
-<p>
-I would like to document that implementers have the freedom to implement
-assign by other methods, as long as the end result is the same and the
-exception guarantee is as good or better than the basic guarantee.
-</p>
-
-<p>
-The motivation for this is to use T's assignment operator to recycle
-existing nodes in the list instead of erasing them and reallocating
-them with new values. It is also worth noting that, with careful
-coding, most common cases of assign (everything but assignment with
-true input iterators) can elevate the exception safety to strong if
-T's assignment has a nothrow guarantee (with no extra memory cost).
-Metrowerks does this. However I do not propose that this subtlety be
-standardized. It is a QoI issue. </p>
-
-<p>Existing practise:
-Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 23.2.2.1/7 from:</p>
-
-<blockquote>
-<p>Effects:</p>
-
-<pre> erase(begin(), end());
- insert(begin(), first, last);
-</pre>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>Effects: Replaces the contents of the list with the range [first, last).</p>
-</blockquote>
-
-<p>In 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>, in Table 67 (sequence requirements),
-add two new rows:</p>
-<pre> a.assign(i,j) void pre: i,j are not iterators into a.
- Replaces elements in a with a copy
- of [i, j).
-
- a.assign(n,t) void pre: t is not a reference into a.
- Replaces elements in a with n copies
- of t.
-</pre>
-
-<p>Change 23.2.2.1/8 from:</p>
-
-<blockquote>
-<p>Effects:</p>
-<pre> erase(begin(), end());
- insert(begin(), n, t);
-</pre>
-</blockquote>
-<p>to:</p>
-
-<blockquote>
-<p>Effects: Replaces the contents of the list with n copies of t.</p>
-</blockquote>
-
-<p><i>[Redmond: Proposed resolution was changed slightly. Previous
-version made explicit statement about exception safety, which wasn't
-consistent with the way exception safety is expressed elsewhere.
-Also, the change in the sequence requirements is new. Without that
-change, the proposed resolution would have required that assignment of
-a subrange would have to work. That too would have been
-overspecification; it would effectively mandate that assignment use a
-temporary. Howard provided wording.
-]</i></p>
-
-<p><i>[Curaçao: Made editorial improvement in wording; changed
-"Replaces elements in a with copies of elements in [i, j)."
-with "Replaces the elements of a with a copy of [i, j)."
-Changes not deemed serious enough to requre rereview.]</i></p>
-
-<hr>
-<a name="321"><h3>321.&nbsp;Typo in num_get</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Kevin Djang&nbsp; <b>Date:</b>&nbsp;17 May 2001</p>
-<p>
-Section 22.2.2.1.2 at p7 states that "A length specifier is added to
-the conversion function, if needed, as indicated in Table 56."
-However, Table 56 uses the term "length modifier", not "length
-specifier".
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 22.2.2.1.2 at p7, change the text "A length specifier is added ..."
-to be "A length modifier is added ..."
-</p>
-<p><b>Rationale:</b></p>
-<p>C uses the term "length modifier". We should be consistent.</p>
-<hr>
-<a name="322"><h3>322.&nbsp;iterator and const_iterator should have the same value type</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;17 May 2001</p>
-<p>
-It's widely assumed that, if X is a container,
-iterator_traits&lt;X::iterator&gt;::value_type and
-iterator_traits&lt;X::const_iterator&gt;::value_type should both be
-X::value_type. However, this is nowhere stated. The language in
-Table 65 is not precise about the iterators' value types (it predates
-iterator_traits), and could even be interpreted as saying that
-iterator_traits&lt;X::const_iterator&gt;::value_type should be "const
-X::value_type".
-</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In Table 65 ("Container Requirements"), change the return type for
-X::iterator to "iterator type whose value type is T". Change the
-return type for X::const_iterator to "constant iterator type whose
-value type is T".</p>
-<p><b>Rationale:</b></p>
-<p>
-This belongs as a container requirement, rather than an iterator
-requirement, because the whole notion of iterator/const_iterator
-pairs is specific to containers' iterator.
-</p>
-<p>
-It is existing practice that (for example)
-iterator_traits&lt;list&lt;int&gt;::const_iterator&gt;::value_type
-is "int", rather than "const int". This is consistent with
-the way that const pointers are handled: the standard already
-requires that iterator_traits&lt;const int*&gt;::value_type is int.
-</p>
-<hr>
-<a name="324"><h3>324.&nbsp;Do output iterators have value types?</h3></a><p><b>Section:</b>&nbsp;24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;7 June 2001</p>
-
-<p>Table 73 suggests that output iterators have value types. It
-requires the expression "*a = t". Additionally, although Table 73
-never lists "a = t" or "X(a) = t" in the "expressions" column, it
-contains a note saying that "a = t" and "X(a) = t" have equivalent
-(but nowhere specified!) semantics.</p>
-
-<p>According to 24.1/9, t is supposed to be "a value of value type
-T":</p>
-
- <blockquote>
- In the following sections, a and b denote values of X, n denotes a
- value of the difference type Distance, u, tmp, and m denote
- identifiers, r denotes a value of X&amp;, t denotes a value of
- value type T.
- </blockquote>
-
-<p>Two other parts of the standard that are relevant to whether
-output iterators have value types:</p>
-
-<ul>
- <li>24.1/1 says "All iterators i support the expression *i,
- resulting in a value of some class, enumeration, or built-in type
- T, called the value type of the iterator".</li>
-
- <li>
- 24.3.1/1, which says "In the case of an output iterator, the types
- iterator_traits&lt;Iterator&gt;::difference_type
- iterator_traits&lt;Iterator&gt;::value_type are both defined as void."
- </li>
-</ul>
-
-<p>The first of these passages suggests that "*i" is supposed to
-return a useful value, which contradicts the note in 24.1.2/2 saying
-that the only valid use of "*i" for output iterators is in an
-expression of the form "*i = t". The second of these passages appears
-to contradict Table 73, because it suggests that "*i"'s return value
-should be void. The second passage is also broken in the case of a an
-iterator type, like non-const pointers, that satisfies both the output
-iterator requirements and the forward iterator requirements.</p>
-
-<p>What should the standard say about <tt>*i</tt>'s return value when
-i is an output iterator, and what should it say about that t is in the
-expression "*i = t"? Finally, should the standard say anything about
-output iterators' pointer and reference types?</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>24.1 p1, change</p>
-
-<blockquote>
-<p>All iterators <tt>i</tt> support the expression <tt>*i</tt>, resulting
-in a value of some class, enumeration, or built-in type <tt>T</tt>,
-called the value type of the iterator.</p>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-<p>All input iterators <tt>i</tt> support the expression <tt>*i</tt>,
-resulting in a value of some class, enumeration, or built-in type
-<tt>T</tt>, called the value type of the iterator. All output
-iterators support the expression <tt>*i = o</tt> where <tt>o</tt> is a
-value of some type that is in the set of types that are <i>writable</i> to
-the particular iterator type of <tt>i</tt>.
-</p>
-</blockquote>
-
-<p>24.1 p9, add</p>
-
-<blockquote>
-<p><tt>o</tt> denotes a value of some type that is writable to the
-output iterator.
-</p>
-</blockquote>
-
-<p>Table 73, change</p>
-
-<blockquote>
-<pre>*a = t
-</pre>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-<pre>*r = o
-</pre>
-</blockquote>
-
-<p>and change</p>
-
-<blockquote>
-<pre>*r++ = t
-</pre>
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
-<pre>*r++ = o
-</pre>
-</blockquote>
-
-<p><i>[post-Redmond: Jeremy provided wording]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG considered two options: change all of the language that
-seems to imply that output iterators have value types, thus making it
-clear that output iterators have no value types, or else define value
-types for output iterator consistently. The LWG chose the former
-option, because it seems clear that output iterators were never
-intended to have value types. This was a deliberate design decision,
-and any language suggesting otherwise is simply a mistake.</p>
-
-<p>A future revision of the standard may wish to revisit this design
-decision.</p>
-<hr>
-<a name="325"><h3>325.&nbsp;Misleading text in moneypunct&lt;&gt;::do_grouping</h3></a><p><b>Section:</b>&nbsp;22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;02 Jul 2001</p>
-<p>The Returns clause in 22.2.6.3.2, p3 says about
-moneypunct&lt;charT&gt;::do_grouping()
-</p>
-
-<blockquote>
- Returns: A pattern defined identically as the result of
- numpunct&lt;charT&gt;::do_grouping().241)
-</blockquote>
-
-<p>Footnote 241 then reads</p>
-
-<blockquote>
- This is most commonly the value "\003" (not "3").
-</blockquote>
-
-<p>
-The returns clause seems to imply that the two member functions must
-return an identical value which in reality may or may not be true,
-since the facets are usually implemented in terms of struct std::lconv
-and return the value of the grouping and mon_grouping, respectively.
-The footnote also implies that the member function of the moneypunct
-facet (rather than the overridden virtual functions in moneypunct_byname)
-most commonly return "\003", which contradicts the C standard which
-specifies the value of "" for the (most common) C locale.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Replace the text in Returns clause in 22.2.6.3.2, p3 with the following:</p>
-
-<blockquote>
- Returns: A pattern defined identically as, but not necessarily
- equal to, the result of numpunct&lt;charT&gt;::do_grouping().241)
-</blockquote>
-
-<p>and replace the text in Footnote 241 with the following:</p>
-
-<blockquote>
- To specify grouping by 3s the value is "\003", not "3".
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>
-The fundamental problem is that the description of the locale facet
-virtuals serves two purposes: describing the behavior of the base
-class, and describing the meaning of and constraints on the behavior
-in arbitrary derived classes. The new wording makes that separation a
-little bit clearer. The footnote (which is nonnormative) is not
-supposed to say what the grouping is in the "C" locale or in any other
-locale. It is just a reminder that the values are interpreted as small
-integers, not ASCII characters.
-</p>
-<hr>
-<a name="327"><h3>327.&nbsp;Typo in time_get facet in table 52</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Tiki Wan&nbsp; <b>Date:</b>&nbsp;06 Jul 2001</p>
-<p>The <tt>wchar_t</tt> versions of <tt>time_get</tt> and
-<tt>time_get_byname</tt> are listed incorrectly in table 52,
-required instantiations. In both cases the second template
-parameter is given as OutputIterator. It should instead be
-InputIterator, since these are input facets.</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In table 52, required instantiations, in
-22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, change</p>
-<pre> time_get&lt;wchar_t, OutputIterator&gt;
- time_get_byname&lt;wchar_t, OutputIterator&gt;
-</pre>
-<p>to</p>
-<pre> time_get&lt;wchar_t, InputIterator&gt;
- time_get_byname&lt;wchar_t, InputIterator&gt;
-</pre>
-
-<p><i>[Redmond: Very minor change in proposed resolution. Original had
-a typo, wchart instead of wchar_t.]</i></p>
-
-<hr>
-<a name="328"><h3>328.&nbsp;Bad sprintf format modifier in money_put&lt;&gt;::do_put()</h3></a><p><b>Section:</b>&nbsp;22.2.6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.money.put.virtuals"> [lib.locale.money.put.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;07 Jul 2001</p>
-<p>The sprintf format string , "%.01f" (that's the digit one), in the
-description of the do_put() member functions of the money_put facet in
-22.2.6.2.2, p1 is incorrect. First, the f format specifier is wrong
-for values of type long double, and second, the precision of 01
-doesn't seem to make sense. What was most likely intended was
-"%.0Lf"., that is a precision of zero followed by the L length
-modifier.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the format string to "%.0Lf".</p>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo</p>
-<hr>
-<a name="329"><h3>329.&nbsp;vector capacity, reserve and reallocation</h3></a><p><b>Section:</b>&nbsp;23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a>, 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Anthony Williams&nbsp; <b>Date:</b>&nbsp;13 Jul 2001</p>
-<p>
-There is an apparent contradiction about which circumstances can cause
-a reallocation of a vector in Section 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> and
-section 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>.
-</p>
-
-<p>23.2.4.2p5 says:</p>
-<blockquote>
-Notes: Reallocation invalidates all the references, pointers, and iterators
-referring to the elements in the sequence. It is guaranteed that no
-reallocation takes place during insertions that happen after a call to
-reserve() until the time when an insertion would make the size of the vector
-greater than the size specified in the most recent call to reserve().
-</blockquote>
-
-<p>Which implies if I do</p>
-
-<pre> std::vector&lt;int&gt; vec;
- vec.reserve(23);
- vec.reserve(0);
- vec.insert(vec.end(),1);
-</pre>
-
-<p>then the implementation may reallocate the vector for the insert,
-as the size specified in the previous call to reserve was zero.</p>
-
-<p>However, the previous paragraphs (23.2.4.2, p1-2) state:</p>
-<blockquote>
-<p>
-(capacity) Returns: The total number of elements the vector
-can hold without requiring reallocation
-</p>
-<p>
-...After reserve(), capacity() is greater or equal to the
-argument of reserve if reallocation happens; and equal to the previous value
-of capacity() otherwise...
-</p>
-</blockquote>
-
-<p>
-This implies that vec.capacity() is still 23, and so the insert()
-should not require a reallocation, as vec.size() is 0. This is backed
-up by 23.2.4.3p1:
-</p>
-<blockquote>
-(insert) Notes: Causes reallocation if the new size is greater than the old
-capacity.
-</blockquote>
-
-<p>
-Though this doesn't rule out reallocation if the new size is less
-than the old capacity, I think the intent is clear.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change the wording of 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> paragraph 5 to:</p>
-
-<blockquote>
-Notes: Reallocation invalidates all the references, pointers, and
-iterators referring to the elements in the sequence. It is guaranteed
-that no reallocation takes place during insertions that happen after a
-call to reserve() until the time when an insertion would make the size
-of the vector greater than the value of capacity().
-</blockquote>
-
-<p><i>[Redmond: original proposed resolution was modified slightly. In
-the original, the guarantee was that there would be no reallocation
-until the size would be greater than the value of capacity() after the
-most recent call to reserve(). The LWG did not believe that the
-"after the most recent call to reserve()" added any useful
-information.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>There was general agreement that, when reserve() is called twice in
-succession and the argument to the second invocation is smaller than
-the argument to the first, the intent was for the second invocation to
-have no effect. Wording implying that such cases have an effect on
-reallocation guarantees was inadvertant.</p>
-<hr>
-<a name="331"><h3>331.&nbsp;bad declaration of destructor for ios_base::failure</h3></a><p><b>Section:</b>&nbsp;27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;PremAnand M. Rao&nbsp; <b>Date:</b>&nbsp;23 Aug 2001</p>
-<p>
-With the change in 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> to state
- "An implementation may strengthen the exception-specification for a
- non-virtual function by removing listed exceptions."
-(issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#119">119</a>)
-and the following declaration of ~failure() in ios_base::failure
-</p>
-<pre> namespace std {
- class ios_base::failure : public exception {
- public:
- ...
- virtual ~failure();
- ...
- };
- }
-</pre>
-<p>the class failure cannot be implemented since in 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> the destructor of class exception has an empty
-exception specification:</p>
-<pre> namespace std {
- class exception {
- public:
- ...
- virtual ~exception() throw();
- ...
- };
- }
-</pre>
-<p><b>Proposed resolution:</b></p>
-<p>Remove the declaration of ~failure().</p>
-<p><b>Rationale:</b></p>
-<p>The proposed resolution is consistent with the way that destructors
-of other classes derived from <tt>exception</tt> are handled.</p>
-<hr>
-<a name="333"><h3>333.&nbsp;does endl imply synchronization with the device?</h3></a><p><b>Section:</b>&nbsp;27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;PremAnand M. Rao&nbsp; <b>Date:</b>&nbsp;27 Aug 2001</p>
-<p>A footnote in 27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a> states:</p>
-<blockquote>
- [Footnote: The effect of executing cout &lt;&lt; endl is to insert a
- newline character in the output sequence controlled by cout, then
- synchronize it with any external file with which it might be
- associated. --- end foonote]
-</blockquote>
-
-<p>
-Does the term "file" here refer to the external device?
-This leads to some implementation ambiguity on systems with fully
-buffered files where a newline does not cause a flush to the device.
-</p>
-
-<p>
-Choosing to sync with the device leads to significant performance
-penalties for each call to endl, while not sync-ing leads to
-errors under special circumstances.
-</p>
-
-<p>
-I could not find any other statement that explicitly defined
-the behavior one way or the other.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove footnote 300 from section 27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a>.</p>
-<p><b>Rationale:</b></p>
-<p>We already have normative text saying what <tt>endl</tt> does: it
-inserts a newline character and calls <tt>flush</tt>. This footnote
-is at best redundant, at worst (as this issue says) misleading,
-because it appears to make promises about what <tt>flush</tt>
-does.</p>
-<hr>
-<a name="334"><h3>334.&nbsp;map::operator[] specification forces inefficient implementation</h3></a><p><b>Section:</b>&nbsp;23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andrea Griffini&nbsp; <b>Date:</b>&nbsp;02 Sep 2001</p>
-<p>
-The current standard describes map::operator[] using a
-code example. That code example is however quite
-inefficient because it requires several useless copies
-of both the passed key_type value and of default
-constructed mapped_type instances.
-My opinion is that was not meant by the comitee to
-require all those temporary copies.
-</p>
-
-<p>Currently map::operator[] behaviour is specified as: </p>
-<pre> Returns:
- (*((insert(make_pair(x, T()))).first)).second.
-</pre>
-
-<p>
-This specification however uses make_pair that is a
-template function of which parameters in this case
-will be deduced being of type const key_type&amp; and
-const T&amp;. This will create a pair&lt;key_type,T&gt; that
-isn't the correct type expected by map::insert so
-another copy will be required using the template
-conversion constructor available in pair to build
-the required pair&lt;const key_type,T&gt; instance.
-</p>
-
-<p>If we consider calling of key_type copy constructor
-and mapped_type default constructor and copy
-constructor as observable behaviour (as I think we
-should) then the standard is in this place requiring
-two copies of a key_type element plus a default
-construction and two copy construction of a mapped_type
-(supposing the addressed element is already present
-in the map; otherwise at least another copy
-construction for each type).
-</p>
-
-<p>A simple (half) solution would be replacing the description with:</p>
-<pre> Returns:
- (*((insert(value_type(x, T()))).first)).second.
-</pre>
-
-<p>This will remove the wrong typed pair construction that
-requires one extra copy of both key and value.</p>
-
-<p>However still the using of map::insert requires temporary
-objects while the operation, from a logical point of view,
-doesn't require any. </p>
-
-<p>I think that a better solution would be leaving free an
-implementer to use a different approach than map::insert
-that, because of its interface, forces default constructed
-temporaries and copies in this case.
-The best solution in my opinion would be just requiring
-map::operator[] to return a reference to the mapped_type
-part of the contained element creating a default element
-with the specified key if no such an element is already
-present in the container. Also a logarithmic complexity
-requirement should be specified for the operation.
-</p>
-
-<p>
-This would allow library implementers to write alternative
-implementations not using map::insert and reaching optimal
-performance in both cases of the addressed element being
-present or absent from the map (no temporaries at all and
-just the creation of a new pair inside the container if
-the element isn't present).
-Some implementer has already taken this option but I think
-that the current wording of the standard rules that as
-non-conforming.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>
-Replace 23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a> paragraph 1 with
-</p>
-<blockquote>
-<p>
--1- Effects: If there is no key equivalent to x in the map, inserts
-value_type(x, T()) into the map.
-</p>
-<p>
--2- Returns: A reference to the mapped_type corresponding to x in *this.
-</p>
-<p>
--3- Complexity: logarithmic.
-</p>
-</blockquote>
-
-<p><i>[This is the second option mentioned above. Howard provided
-wording. We may also wish to have a blanket statement somewhere in
-clause 17 saying that we do not intend the semantics of sample code
-fragments to be interpreted as specifing exactly how many copies are
-made. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#98">98</a> for a similar problem.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-This is the second solution described above; as noted, it is
-consistent with existing practice.
-</p>
-
-<p>Note that we now need to specify the complexity explicitly, because
-we are no longer defining <tt>operator[]</tt> in terms of
-<tt>insert</tt>.</p>
-<hr>
-<a name="335"><h3>335.&nbsp;minor issue with char_traits, table 37</h3></a><p><b>Section:</b>&nbsp;21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;06 Sep 2001</p>
-<p>
-Table 37, in 21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a>, descibes char_traits::assign
-as:
-</p>
-<pre> X::assign(c,d) assigns c = d.
-</pre>
-
-<p>And para 1 says:</p>
-
-<blockquote>
- [...] c and d denote values of type CharT [...]
-</blockquote>
-
-<p>
-Naturally, if c and d are <i>values</i>, then the assignment is
-(effectively) meaningless. It's clearly intended that (in the case of
-assign, at least), 'c' is intended to be a reference type.
-</p>
-
-<p>I did a quick survey of the four implementations I happened to have
-lying around, and sure enough they all have signatures:</p>
-<pre> assign( charT&amp;, const charT&amp; );
-</pre>
-
-<p>(or the equivalent). It's also described this way in Nico's book.
-(Not to mention the synopses of char_traits&lt;char&gt; in 21.1.3.1
-and char_traits&lt;wchar_t&gt; in 21.1.3.2...)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following to 21.1.1 para 1:</p>
-<blockquote>
- r denotes an lvalue of CharT
-</blockquote>
-
-<p>and change the description of assign in the table to:</p>
-<pre> X::assign(r,d) assigns r = d
-</pre>
-<hr>
-<a name="336"><h3>336.&nbsp;Clause 17 lack of references to deprecated headers</h3></a><p><b>Section:</b>&nbsp;17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Detlef Vollmann&nbsp; <b>Date:</b>&nbsp;05 Sep 2001</p>
-<p>From c++std-edit-873:</p>
-
-<p>17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>, Table 11. In this table, the header
-&lt;strstream&gt; is missing.</p>
-
-<p>This shows a general problem: The whole clause 17 refers quite
-often to clauses 18 through 27, but D.7 is also a part of the standard
-library (though a deprecated one).</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>To 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> Table 11, C++ Library Headers, add
-"&lt;strstream&gt;".</p>
-
-<p>In the following places, change "clauses 17 through 27" to "clauses
-17 through 27 and Annex D":</p>
-
-<ul>
-<li>1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.refs"> [intro.refs]</a> Normative references/1/footnote 1</li>
-<li>1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.defs"> [intro.defs]</a> Definitions/1</li>
-<li>7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.dcl"> [dcl.dcl]</a> Library introduction/9</li>
-<li>17.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.description"> [lib.description]</a> Method of description (Informative)/1</li>
-<li>17.3.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.character.seq"> [lib.character.seq]</a> Character sequences/1/bullet 2</li>
-<li>17.3.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.functions.within.classes"> [lib.functions.within.classes]</a> Functions within classes/1</li>
-<li>17.3.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.objects.within.classes"> [lib.objects.within.classes]</a> Private members/1/(2 places)</li>
-<li>17.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.requirements"> [lib.requirements]</a> Library-wide requirements/1</li>
-<li>17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> Headers/4</li>
-<li>17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> Replacement functions/1</li>
-<li>17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a> Global or non-member functions/2</li>
-<li>17.4.4.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.protection.within.classes"> [lib.protection.within.classes]</a> Protection within classes/1</li>
-</ul>
-
-
-<hr>
-<a name="337"><h3>337.&nbsp;replace_copy_if's template parameter should be InputIterator</h3></a><p><b>Section:</b>&nbsp;25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Detlef Vollmann&nbsp; <b>Date:</b>&nbsp;07 Sep 2001</p>
-<p>From c++std-edit-876:</p>
-
-<p>
-In section 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> before p4: The name of the first
-parameter of template replace_copy_if should be "InputIterator"
-instead of "Iterator". According to 17.3.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.type.descriptions"> [lib.type.descriptions]</a> p1 the
-parameter name conveys real normative meaning.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change <tt>Iterator</tt> to <tt>InputIterator</tt>.</p>
-<hr>
-<a name="338"><h3>338.&nbsp; is whitespace allowed between `-' and a digit?</h3></a><p><b>Section:</b>&nbsp;22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;17 Sep 2001</p>
-<p>
-From Stage 2 processing in 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, p8 and 9 (the
-original text or the text corrected by the proposed resolution of
-issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>) it seems clear that no whitespace is allowed
-within a number, but 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a>, p2, which gives the
-format for integer and floating point values, says that whitespace is
-optional between a plusminus and a sign.
-</p>
-
-<p>
-The text needs to be clarified to either consistently allow or
-disallow whitespace between a plusminus and a sign. It might be
-worthwhile to consider the fact that the C library stdio facility does
-not permit whitespace embedded in numbers and neither does the C or
-C++ core language (the syntax of integer-literals is given in 2.13.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lex.html#lex.icon"> [lex.icon]</a>, that of floating-point-literals in 2.13.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lex.html#lex.fcon"> [lex.fcon]</a> of the C++ standard).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the first part of 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a> paragraph 2 from:</p>
-<blockquote>
-<p>
-The syntax for number formats is as follows, where <tt>digit</tt>
-represents the radix set specified by the <tt>fmtflags</tt> argument
-value, <tt>whitespace</tt> is as determined by the facet
-<tt>ctype&lt;charT&gt;</tt> (22.2.1.1), and <tt>thousands-sep</tt> and
-<tt>decimal-point</tt> are the results of corresponding
-<tt>numpunct&lt;charT&gt;</tt> members. Integer values have the
-format:
-</p>
-<pre> integer ::= [sign] units
- sign ::= plusminus [whitespace]
- plusminus ::= '+' | '-'
- units ::= digits [thousands-sep units]
- digits ::= digit [digits]
-</pre>
-</blockquote>
-<p>to:</p>
-<blockquote>
-<p>
-The syntax for number formats is as follows, where <tt>digit</tt>
-represents the radix set specified by the <tt>fmtflags</tt> argument
-value, and <tt>thousands-sep</tt> and <tt>decimal-point</tt> are the
-results of corresponding <tt>numpunct&lt;charT&gt;</tt> members.
-Integer values have the format:
-</p>
-<pre> integer ::= [sign] units
- sign ::= plusminus
- plusminus ::= '+' | '-'
- units ::= digits [thousands-sep units]
- digits ::= digit [digits]
-</pre>
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>It's not clear whether the format described in 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a> paragraph 2 has any normative weight: nothing in the
-standard says how, or whether, it's used. However, there's no reason
-for it to differ gratuitously from the very specific description of
-numeric processing in 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>. The proposed
-resolution removes all mention of "whitespace" from that format.</p>
-<hr>
-<a name="339"><h3>339.&nbsp;definition of bitmask type restricted to clause 27</h3></a><p><b>Section:</b>&nbsp;22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a>, 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;17 September 2001</p>
-<p>
-The ctype_category::mask type is declared to be an enum in 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a> with p1 then stating that it is a bitmask type, most
-likely referring to the definition of bitmask type in 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>, p1. However, the said definition only applies to
-clause 27, making the reference in 22.2.1 somewhat dubious.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Clarify 17.3.2.1.2, p1 by changing the current text from</p>
- <blockquote>
- Several types defined in clause 27 are bitmask types. Each bitmask type
- can be implemented as an enumerated type that overloads certain operators,
- as an integer type, or as a bitset (23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>).
- </blockquote>
-<p>to read</p>
- <blockquote>
- Several types defined in clauses lib.language.support through
- lib.input.output and Annex D are bitmask types. Each bitmask type can
- be implemented as an enumerated type that overloads certain operators,
- as an integer type, or as a bitset (lib.template.bitset).
- </blockquote>
-
-<p>
-Additionally, change the definition in 22.2.1 to adopt the same
-convention as in clause 27 by replacing the existing text with the
-following (note, in particluar, the cross-reference to 17.3.2.1.2 in
-22.2.1, p1):
-</p>
-
-<blockquote>
-<p>22.2.1 The ctype category [lib.category.ctype]</p>
-<pre>namespace std {
- class ctype_base {
- public:
- typedef <b><i>T</i></b> mask;
-
- // numeric values are for exposition only.
- static const mask space = 1 &lt;&lt; 0;
- static const mask print = 1 &lt;&lt; 1;
- static const mask cntrl = 1 &lt;&lt; 2;
- static const mask upper = 1 &lt;&lt; 3;
- static const mask lower = 1 &lt;&lt; 4;
- static const mask alpha = 1 &lt;&lt; 5;
- static const mask digit = 1 &lt;&lt; 6;
- static const mask punct = 1 &lt;&lt; 7;
- static const mask xdigit = 1 &lt;&lt; 8;
- static const mask alnum = alpha | digit;
- static const mask graph = alnum | punct;
- };
-}
-</pre>
-
-<p>The type <tt>mask</tt> is a bitmask type (17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>).</p>
-</blockquote>
-
-<p><i>[Curaçao: The LWG notes that T above should be bold-italics to be
-consistent with the rest of the standard.]</i></p>
-
-<hr>
-<a name="340"><h3>340.&nbsp;interpretation of <tt>has_facet&lt;Facet&gt;(loc)</tt>
-</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2001</p>
-<p>
-It's unclear whether 22.1.1.1.1, p3 says that
-<tt>has_facet&lt;Facet&gt;(loc)</tt> returns true for any <tt>Facet</tt>
-from Table 51 or whether it includes Table 52 as well:
-</p>
-
-<blockquote>
-For any locale <tt>loc</tt> either constructed, or returned by
-locale::classic(), and any facet <tt>Facet</tt> that is a member of a
-standard category, <tt>has_facet&lt;Facet&gt;(loc)</tt> is true. Each
-locale member function which takes a <tt>locale::category</tt>
-argument operates on the corresponding set of facets.
-</blockquote>
-
-<p>
-It seems that it comes down to which facets are considered to be members of a
-standard category. Intuitively, I would classify all the facets in Table 52 as
-members of their respective standard categories, but there are an unbounded set
-of them...
-</p>
-
-<p>
-The paragraph implies that, for instance, <tt>has_facet&lt;num_put&lt;C,
-OutputIterator&gt; &gt;(loc)</tt> must always return true. I don't think that's
-possible. If it were, then <tt>use_facet&lt;num_put&lt;C, OutputIterator&gt;
-&gt;(loc)</tt> would have to return a reference to a distinct object for each
-valid specialization of <tt>num_put&lt;C, OutputIteratory&gt;</tt>, which is
-clearly impossible.
-</p>
-
-<p>
-On the other hand, if none of the facets in Table 52 is a member of a standard
-category then none of the locale member functions that operate on entire
-categories of facets will work properly.
-</p>
-
-<p>
-It seems that what p3 should mention that it's required (permitted?)
-to hold only for specializations of <tt>Facet</tt> from Table 52 on
-<tt>C</tt> from the set { <tt>char</tt>, <tt>wchar_t</tt> }, and
-<tt>InputIterator</tt> and <tt>OutputIterator</tt> from the set of
-{
-{i,o}<tt>streambuf_iterator</tt>&lt;{<tt>char</tt>,<tt>wchar_t</tt>}<tt>&gt;</tt>
-}.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 3, change
-"that is a member of a standard category" to "shown in Table 51".</p>
-<p><b>Rationale:</b></p>
-<p>The facets in Table 52 are an unbounded set. Locales should not be
-required to contain an infinite number of facets.</p>
-
-<p>It's not necessary to talk about which values of InputIterator and
-OutputIterator must be supported. Table 51 already contains a
-complete list of the ones we need.</p>
-<hr>
-<a name="341"><h3>341.&nbsp;Vector reallocation and swap</h3></a><p><b>Section:</b>&nbsp;23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Anthony Williams&nbsp; <b>Date:</b>&nbsp;27 Sep 2001</p>
-<p>It is a common idiom to reduce the capacity of a vector by swapping it with
-an empty one:</p>
-<pre> std::vector&lt;SomeType&gt; vec;
- // fill vec with data
- std::vector&lt;SomeType&gt;().swap(vec);
- // vec is now empty, with minimal capacity
-</pre>
-
-<p>However, the wording of 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a>paragraph 5 prevents
-the capacity of a vector being reduced, following a call to
-reserve(). This invalidates the idiom, as swap() is thus prevented
-from reducing the capacity. The proposed wording for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#329">329</a> does not affect this. Consequently, the example above
-requires the temporary to be expanded to cater for the contents of
-vec, and the contents be copied across. This is a linear-time
-operation.</p>
-
-<p>However, the container requirements state that swap must have constant
-complexity (23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> note to table 65).</p>
-
-<p>This is an important issue, as reallocation affects the validity of
-references and iterators.</p>
-
-<p>If the wording of 23.2.4.2p5 is taken to be the desired intent, then
-references and iterators remain valid after a call to swap, if they refer to
-an element before the new end() of the vector into which they originally
-pointed, in which case they refer to the element at the same index position.
-Iterators and references that referred to an element whose index position
-was beyond the new end of the vector are invalidated.</p>
-
-<p>If the note to table 65 is taken as the desired intent, then there are two
-possibilities with regard to iterators and references:</p>
-
-<ol>
-<li>All Iterators and references into both vectors are invalidated.</li>
-<li>Iterators and references into either vector remain valid, and remain
-pointing to the same element. Consequently iterators and references that
-referred to one vector now refer to the other, and vice-versa.</li>
-</ol>
-<p><b>Proposed resolution:</b></p>
-<p>Add a new paragraph after 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> paragraph 5:</p>
-<blockquote>
-<pre> void swap(vector&lt;T,Allocator&gt;&amp; x);
-</pre>
-<p><b>Effects:</b> Exchanges the contents and capacity() of <tt>*this</tt>
-with that of <tt>x</tt>.</p>
-<p><b>Complexity:</b> Constant time.</p>
-</blockquote>
-
-<p><i>[This solves the problem reported for this issue. We may also
-have a problem with a circular definition of swap() for other
-containers.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-swap should be constant time. The clear intent is that it should just
-do pointer twiddling, and that it should exchange all properties of
-the two vectors, including their reallocation guarantees.
-</p>
-<hr>
-<a name="345"><h3>345.&nbsp;type tm in &lt;cwchar&gt;</h3></a><p><b>Section:</b>&nbsp;21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Clark Nelson&nbsp; <b>Date:</b>&nbsp;19 Oct 2001</p>
-<p>
-C99, and presumably amendment 1 to C90, specify that &lt;wchar.h&gt;
-declares struct tm as an incomplete type. However, table 48 in 21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a> does not mention the type tm as being declared in
-&lt;cwchar&gt;. Is this omission intentional or accidental?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In section 21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a>, add "tm" to table 48.</p>
-<hr>
-<a name="346"></a><h3><a name="346">346.&nbsp;Some iterator member functions should be const</a></h3><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Jeremy Siek&nbsp; <b>Date:</b>&nbsp;20 Oct 2001</p>
-<p>Iterator member functions and operators that do not change the state
-of the iterator should be defined as const member functions or as
-functions that take iterators either by const reference or by
-value. The standard does not explicitly state which functions should
-be const. Since this a fairly common mistake, the following changes
-are suggested to make this explicit.</p>
-
-<p>The tables almost indicate constness properly through naming: r
-for non-const and a,b for const iterators. The following changes
-make this more explicit and also fix a couple problems.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> Change the first section of p9 from
-"In the following sections, a and b denote values of X..." to
-"In the following sections, a and b denote values of type const X...".</p>
-
-<p>In Table 73, change</p>
-<pre> a-&gt;m U&amp; ...
-</pre>
-
-<p>to</p>
-
-<pre> a-&gt;m const U&amp; ...
- r-&gt;m U&amp; ...
-</pre>
-
-<p>In Table 73 expression column, change</p>
-
-<pre> *a = t
-</pre>
-
-<p>to</p>
-
-<pre> *r = t
-</pre>
-
-<p><i>[Redmond: The container requirements should be reviewed to see if
-the same problem appears there.]</i></p>
-
-<hr>
-<a name="347"><h3>347.&nbsp;locale::category and bitmask requirements</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;P.J. Plauger, Nathan Myers&nbsp; <b>Date:</b>&nbsp;23 Oct 2001</p>
-<p>
-In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> paragraph 1, the category members
-are described as bitmask elements. In fact, the bitmask requirements
-in 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a> don't seem quite right: <tt>none</tt>
-and <tt>all</tt> are bitmask constants, not bitmask elements.</p>
-
-<p>In particular, the requirements for <tt>none</tt> interact poorly
-with the requirement that the LC_* constants from the C library must
-be recognizable as C++ locale category constants. LC_* values should
-not be mixed with these values to make category values.</p>
-
-<p>We have two options for the proposed resolution. Informally:
-option 1 removes the requirement that LC_* values be recognized as
-category arguments. Option 2 changes the category type so that this
-requirement is implementable, by allowing <tt>none</tt> to be some
-value such as 0x1000 instead of 0.</p>
-
-<p>Nathan writes: "I believe my proposed resolution [Option 2] merely
-re-expresses the status quo more clearly, without introducing any
-changes beyond resolving the DR.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Replace the first two paragraphs of 22.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.types"> [lib.locale.types]</a> with:</p>
-<blockquote>
-<pre> typedef int category;
-</pre>
-
-<p>Valid category values include the <tt>locale</tt> member bitmask
-elements <tt>collate</tt>, <tt>ctype</tt>, <tt>monetary</tt>,
-<tt>numeric</tt>, <tt>time</tt>, and <tt>messages</tt>, each of which
-represents a single locale category. In addition, <tt>locale</tt> member
-bitmask constant <tt>none</tt> is defined as zero and represents no
-category. And locale member bitmask constant <tt>all</tt> is defined such that
-the expression</p>
-<pre> (collate | ctype | monetary | numeric | time | messages | all) == all
-</pre>
-<p>
-is <tt>true</tt>, and represents the union of all categories. Further
-the expression <tt>(X | Y)</tt>, where <tt>X</tt> and <tt>Y</tt> each
-represent a single category, represents the union of the two
-categories.
-</p>
-
-<p>
-<tt>locale</tt> member functions expecting a <tt>category</tt>
-argument require one of the <tt>category</tt> values defined above, or
-the union of two or more such values. Such a <tt>category</tt>
-argument identifies a set of locale categories. Each locale category,
-in turn, identifies a set of locale facets, including at least those
-shown in Table 51:
-</p>
-</blockquote>
-<p><i>[Curaçao: need input from locale experts.]</i></p>
-
-<p><b>Rationale:</b></p>
-
-<p>The LWG considered, and rejected, an alternate proposal (described
- as "Option 2" in the discussion). The main reason for rejecting it
- was that library implementors were concerened about implementation
- difficult, given that getting a C++ library to work smoothly with a
- separately written C library is already a delicate business. Some
- library implementers were also concerned about the issue of adding
- extra locale categories.</p>
-
-<blockquote>
-<p><b>Option 2:</b> <br>
-Replace the first paragraph of 22.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.types"> [lib.locale.types]</a> with:</p>
-<blockquote>
-<p>
-Valid category values include the enumerated values. In addition, the
-result of applying commutative operators | and &amp; to any two valid
-values is valid, and results in the setwise union and intersection,
-respectively, of the argument categories. The values <tt>all</tt> and
-<tt>none</tt> are defined such that for any valid value <tt>cat</tt>, the
-expressions <tt>(cat | all == all)</tt>, <tt>(cat &amp; all == cat)</tt>,
-<tt>(cat | none == cat)</tt> and <tt>(cat &amp; none == none)</tt> are
-true. For non-equal values <tt>cat1</tt> and <tt>cat2</tt> of the
-remaining enumerated values, <tt>(cat1 &amp; cat2 == none)</tt> is true.
-For any valid categories <tt>cat1</tt> and <tt>cat2</tt>, the result
-of <tt>(cat1 &amp; ~cat2)</tt> is valid, and equals the setwise union of
-those categories found in <tt>cat1</tt> but not found in <tt>cat2</tt>.
-[Footnote: it is not required that <tt>all</tt> equal the setwise union
-of the other enumerated values; implementations may add extra categories.]
-</p>
-</blockquote>
-</blockquote>
-<hr>
-<a name="349"><h3>349.&nbsp;Minor typographical error in ostream_iterator</h3></a><p><b>Section:</b>&nbsp;24.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostream.iterator"> [lib.ostream.iterator]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andy Sawyer&nbsp; <b>Date:</b>&nbsp;24 Oct 2001</p>
-<p>24.5.2 [lib.ostream.iterator] states:</p>
-<pre> [...]
-
- private:
- // basic_ostream&lt;charT,traits&gt;* out_stream; exposition only
- // const char* delim; exposition only
-</pre>
-
-<p>Whilst it's clearly marked "exposition only", I suspect 'delim'
-should be of type 'const charT*'.</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 24.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostream.iterator"> [lib.ostream.iterator]</a>, replace <tt>const char* delim</tt> with
-<tt>const charT* delim</tt>.
-</p>
-<hr>
-<a name="352"><h3>352.&nbsp;missing fpos requirements</h3></a><p><b>Section:</b>&nbsp;21.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.typedefs"> [lib.char.traits.typedefs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;2 Dec 2001</p>
-<p>
-<i>(1)</i>
-There are no requirements on the <tt>stateT</tt> template parameter of
-<tt>fpos</tt> listed in 27.4.3. The interface appears to require that
-the type be at least Assignable and CopyConstructible (27.4.3.1, p1),
-and I think also DefaultConstructible (to implement the operations in
-Table 88).
-</p>
-<p>
-21.1.2, p3, however, only requires that
-<tt>char_traits&lt;charT&gt;::state_type</tt> meet the requirements of
-CopyConstructible types.
-</p>
-<p>
-<i>(2)</i>
-Additionally, the <tt>stateT</tt> template argument has no
-corresponding typedef in fpos which might make it difficult to use in
-generic code.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Modify 21.1.2, p4 from
-</p>
-<p>
- Requires: <tt>state_type</tt> shall meet the requirements of
- CopyConstructible types (20.1.3).
-</p>
-<p>
- Requires: state_type shall meet the requirements of Assignable
- (23.1, p4), CopyConstructible (20.1.3), and
- DefaultConstructible (20.1.4) types.
-</p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG feels this is two issues, as indicated above. The first is
-a defect---std::basic_fstream is unimplementable without these
-additional requirements---and the proposed resolution fixes it. The
-second is questionable; who would use that typedef? The class
-template fpos is used only in a very few places, all of which know the
-state type already. Unless motivation is provided, the second should
-be considered NAD.</p>
-<hr>
-<a name="354"><h3>354.&nbsp;Associative container lower/upper bound requirements</h3></a><p><b>Section:</b>&nbsp;23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Hans Aberg&nbsp; <b>Date:</b>&nbsp;17 Dec 2001</p>
-<p>
-Discussions in the thread "Associative container lower/upper bound
-requirements" on comp.std.c++ suggests that there is a defect in the
-C++ standard, Table 69 of section 23.1.2, "Associative containers",
-[lib.associative.reqmts]. It currently says:</p>
-
-<blockquote>
-<p>
-a.find(k): returns an iterator pointing to an element with the key equivalent to
-k, or a.end() if such an element is not found.
-</p>
-
-<p>
-a.lower_bound(k): returns an iterator pointing to the first element with
-key not less than k.
-</p>
-
-<p>
-a.upper_bound(k): returns an iterator pointing to the first element with
-key greater than k.
-</p>
-</blockquote>
-
-<p>
-We have "or a.end() if such an element is not found" for
-<tt>find</tt>, but not for <tt>upper_bound</tt> or
-<tt>lower_bound</tt>. As the text stands, one would be forced to
-insert a new element into the container and return an iterator to that
-in case the sought iterator does not exist, which does not seem to be
-the intention (and not possible with the "const" versions).
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Change Table 69 of section 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> indicated entries
-to:</p>
-
-<blockquote>
-<p>
-a.lower_bound(k): returns an iterator pointing to the first element with
-key not less than k, or a.end() if such an element is not found.
-</p>
-
-<p>
-a.upper_bound(k): returns an iterator pointing to the first element with
-key greater than k, or a.end() if such an element is not found.
-</p>
-</blockquote>
-
-<p><i>[Curaçao: LWG reviewed PR.]</i></p>
-
-<hr>
-<a name="355"><h3>355.&nbsp;Operational semantics for a.back()</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Yaroslav Mironov&nbsp; <b>Date:</b>&nbsp;23 Jan 2002</p>
-
-<p>Table 68 "Optional Sequence Operations" in 23.1.1/12
-specifies operational semantics for "a.back()" as
-"*--a.end()", which may be ill-formed <i>[because calling
-operator-- on a temporary (the return) of a built-in type is
-ill-formed]</i>, provided a.end() returns a simple pointer rvalue
-(this is almost always the case for std::vector::end(), for
-example). Thus, the specification is not only incorrect, it
-demonstrates a dangerous construct: "--a.end()" may
-successfully compile and run as intended, but after changing the type
-of the container or the mode of compilation it may produce
-compile-time error. </p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change the specification in table 68 "Optional Sequence
-Operations" in 23.1.1/12 for "a.back()" from</p>
-
-
-<blockquote>
-*--a.end()
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- { iterator tmp = a.end(); --tmp; return *tmp; }
-</blockquote>
-
-<p>and the specification for "a.pop_back()" from</p>
-
-<blockquote>
-a.erase(--a.end())
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- { iterator tmp = a.end(); --tmp; a.erase(tmp); }
-</blockquote>
-
-<p><i>[Curaçao: LWG changed PR from "{ X::iterator tmp =
-a.end(); return *--tmp; }" to "*a.rbegin()", and from
-"{ X::iterator tmp = a.end(); a.erase(--tmp); }" to
-"a.erase(rbegin())".]</i></p>
-
-<p><i>[There is a second possible defect; table 68 "Optional
-Sequence Operations" in the "Operational Semantics"
-column uses operations present only in the "Reversible
-Container" requirements, yet there is no stated dependency
-between these separate requirements tables. Ask in Santa Cruz if the
-LWG would like a new issue opened.]</i></p>
-
-<p><i>[Santa Cruz: the proposed resolution is even worse than what's in
- the current standard: erase is undefined for reverse iterator. If
- we're going to make the change, we need to define a temporary and
- use operator--. Additionally, we don't know how prevalent this is:
- do we need to make this change in more than one place? Martin has
- volunteered to review the standard and see if this problem occurs
- elsewhere.]</i></p>
-
-<p><i>[Oxford: Matt provided new wording to address the concerns raised
- in Santa Cruz. It does not appear that this problem appears
- anywhere else in clauses 23 or 24.]</i></p>
-
-<p><i>[Kona: In definition of operational semantics of back(), change
-"*tmp" to "return *tmp;"]</i></p>
-
-<hr>
-<a name="358"><h3>358.&nbsp;interpreting <tt>thousands_sep</tt> after a <tt>decimal_point</tt>
-</h3></a><p><b>Section:</b>&nbsp;22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 Mar 2002</p>
-<p>
-I don't think <tt>thousands_sep</tt> is being treated correctly after
-decimal_point has been seen. Since grouping applies only to the
-integral part of the number, the first such occurrence should, IMO,
-terminate Stage 2. (If it does not terminate it, then 22.2.2.1.2, p12
-and 22.2.3.1.2, p3 need to explain how <tt>thousands_sep</tt> is to be
-interpreted in the fractional part of a number.)
-</p>
-
-<p>
-The easiest change I can think of that resolves this issue would be
-something like below.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the first sentence of 22.2.2.1.2, p9 from
-</p>
-
-<blockquote>
- If discard is true then the position of the character is
- remembered, but the character is otherwise ignored. If it is not
- discarded, then a check is made to determine if c is allowed as
- the next character of an input field of the conversion specifier
- returned by stage 1. If so it is accumulated.
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- If <tt>discard</tt> is true, then if <tt>'.'</tt> has not yet been
- accumulated, then the position of the character is remembered, but
- the character is otherwise ignored. Otherwise, if <tt>'.'</tt> has
- already been accumulated, the character is discarded and Stage 2
- terminates. ...
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>We believe this reflects the intent of the Standard. Thousands sep
- characters after the decimal point are not useful in any locale.
- Some formatting conventions do group digits that follow the decimal
- point, but they usually introduce a different grouping character
- instead of reusing the thousand sep character. If we want to add
- support for such conventions, we need to do so explicitly.</p>
-
-<hr>
-<a name="359"><h3>359.&nbsp;num_put&lt;&gt;::do_put (..., bool) undocumented</h3></a><p><b>Section:</b>&nbsp;22.2.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.members"> [lib.facet.num.put.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 Mar 2002</p>
-<p>22.2.2.2.1, p1:</p>
-
- <pre> iter_type put (iter_type out, ios_base&amp; str, char_type fill,
- bool val) const;
- ...
-
- 1 Returns: do_put (out, str, fill, val).
- </pre>
-
-<p>AFAICS, the behavior of do_put (..., bool) is not documented anywhere,
-however, 22.2.2.2.2, p23:</p>
-
-<blockquote>
-<pre>iter_type put (iter_type out, ios_base&amp; str, char_type fill,
- bool val) const;
-</pre>
-
-
- Effects: If (str.flags() &amp; ios_base::boolalpha) == 0 then do
- out = do_put(out, str, fill, (int)val)
- Otherwise do
-<pre> string_type s =
- val ? use_facet&lt;ctype&lt;charT&gt; &gt;(loc).truename()
- : use_facet&lt;ctype&lt;charT&gt; &gt;(loc).falsename();
-</pre>
- and then insert the characters of s into out. <i>out</i>.
-</blockquote>
-
-<p>
-This means that the bool overload of <tt>do_put()</tt> will never be called,
-which contradicts the first paragraph. Perhaps the declaration
-should read <tt>do_put()</tt>, and not <tt>put()</tt>?
-</p>
-
-<p>
-Note also that there is no <b>Returns</b> clause for this function, which
-should probably be corrected, just as should the second occurrence
-of <i>"out."</i> in the text.
-</p>
-
-<p>
-I think the least invasive change to fix it would be something like
-the following:
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, just above paragraph 1, remove
- the <tt>bool</tt> overload.</p>
-
-<p>
-In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, p23, make the following changes
-</p>
-
-<blockquote>
- Replace <tt>put()</tt> with <tt>do_put()</tt> in the declaration
- of the member function.
-</blockquote>
-
-<blockquote>
- Change the <b>Effects</b> clause to a <b>Returns</b> clause (to
- avoid the requirement to call <tt>do_put(..., int)</tt> from <tt>
- do_put (..., bool))</tt>
- like so:
-</blockquote>
-
-<blockquote>
- 23 <b>Returns</b>: If <tt>(str.flags() &amp;
- ios_base::boolalpha) == 0</tt> then
- <tt>do_put (out, str, fill, (long)val)</tt>
- Otherwise the function obtains a string <tt>s</tt> as if by
-<pre> string_type s =
- val ? use_facet&lt;ctype&lt;charT&gt; &gt;(loc).truename()
- : use_facet&lt;ctype&lt;charT&gt; &gt;(loc).falsename();
-</pre>
- and then inserts each character <tt>c</tt> of s into out via
- <tt>*out++ = c</tt>
- and returns <tt>out</tt>.
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>
-This fixes a couple of obvious typos, and also fixes what appears to
-be a requirement of gratuitous inefficiency.
-</p>
-<hr>
-<a name="360"><h3>360.&nbsp;locale mandates inefficient implementation</h3></a><p><b>Section:</b>&nbsp;22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;12 Mar 2002</p>
-<p>
-22.1.1, p7 (copied below) allows iostream formatters and extractors
-to make assumptions about the values returned from facet members.
-However, such assumptions are apparently not guaranteed to hold
-in other cases (e.g., when the facet members are being called directly
-rather than as a result of iostream calls, or between successive
-calls to the same iostream functions with no interevening calls to
-<tt>imbue()</tt>, or even when the facet member functions are called
-from other member functions of other facets). This restriction
-prevents locale from being implemented efficiently.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the first sentence in 22.1.1, p7 from</p>
-<blockquote>
- In successive calls to a locale facet member function during
- a call to an iostream inserter or extractor or a streambuf member
- function, the returned result shall be identical. [Note: This
- implies that such results may safely be reused without calling
- the locale facet member function again, and that member functions
- of iostream classes cannot safely call <tt>imbue()</tt>
- themselves, except as specified elsewhere. --end note]
-</blockquote>
-
-<p>to</p>
-
-<blockquote>
- In successive calls to a locale facet member function on a facet
- object installed in the same locale, the returned result shall be
- identical. ...
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>This change is reasonable becuase it clarifies the intent of this
- part of the standard.</p>
-<hr>
-<a name="362"><h3>362.&nbsp;bind1st/bind2nd type safety</h3></a><p><b>Section:</b>&nbsp;D.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.lib.binders"> [depr.lib.binders]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Andrew Demkin&nbsp; <b>Date:</b>&nbsp;26 Apr 2002</p>
-<p>
-The definition of bind1st() (<font color="red">20.5.6.2</font>) can result in
-the construction of an unsafe binding between incompatible pointer
-types. For example, given a function whose first parameter type is
-'pointer to T', it's possible without error to bind an argument of
-type 'pointer to U' when U does not derive from T:
-</p>
-<pre> foo(T*, int);
-
- struct T {};
- struct U {};
-
- U u;
-
- int* p;
- int* q;
-
- for_each(p, q, bind1st(ptr_fun(foo), &amp;u)); // unsafe binding
-</pre>
-
-<p>
-The definition of bind1st() includes a functional-style conversion to
-map its argument to the expected argument type of the bound function
-(see below):
-</p>
-<pre> typename Operation::first_argument_type(x)
-</pre>
-
-<p>
-A functional-style conversion (5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/expr.html#expr.type.conv"> [expr.type.conv]</a>) is defined to be
-semantically equivalent to an explicit cast expression (5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/expr.html#expr.cast"> [expr.cast]</a>), which may (according to 5.4, paragraph 5) be interpreted
-as a reinterpret_cast, thus masking the error.
-</p>
-
-<p>The problem and proposed change also apply to <font color="red">20.5.6.4</font>.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add this sentence to the end of 20.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.arithmetic.operations"> [lib.arithmetic.operations]</a>/1:
- "Binders <tt>bind1st</tt> and <tt>bind2nd</tt> are deprecated in
- favor of <tt>std::tr1::bind</tt>."</p>
-
-<p>(Notes to editor: (1) when and if tr1::bind is incorporated into
- the standard, "std::tr1::bind" should be changed to "std::bind". (2)
- 20.5.6 should probably be moved to Annex D.</p>
-<p><b>Rationale:</b></p>
-<p>There is no point in fixing bind1st and bind2nd. tr1::bind is a
- superior solution. It solves this problem and others.</p>
-<hr>
-<a name="363"><h3>363.&nbsp;Missing exception specification in 27.4.2.1.1</h3></a><p><b>Section:</b>&nbsp;27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown and Marc Paterno&nbsp; <b>Date:</b>&nbsp;20 May 2002</p>
-<p>
-The destructor of ios_base::failure should have an empty throw
-specification, because the destructor of its base class, exception, is
-declared in this way.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the destructor to</p>
-<pre> virtual ~failure() throw();
-</pre>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious glitch. This is almost editorial.</p>
-<hr>
-<a name="364"><h3>364.&nbsp;Inconsistent wording in 27.5.2.4.2</h3></a><p><b>Section:</b>&nbsp;27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown, Marc Paterno&nbsp; <b>Date:</b>&nbsp;10 May 2002</p>
-<p>
-27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a> paragraph 1 is inconsistent with the Effects
-clause for seekoff.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Make this paragraph, the Effects clause for setbuf, consistent in wording
-with the Effects clause for seekoff in paragraph 3 by amending paragraph 1
-to indicate the purpose of setbuf:
-</p>
-
-<p>Original text:</p>
-
-<blockquote>
-1 Effects: Performs an operation that is defined separately for each
-class derived from basic_streambuf in this clause (27.7.1.3, 27.8.1.4).
-</blockquote>
-
-<p>Proposed text:</p>
-
-<blockquote>
-1 Effects: Influences stream buffering in a way that is defined separately
-for each class derived from basic_streambuf in this clause
-(27.7.1.3, 27.8.1.4).
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>The LWG doesn't believe there is any normative difference between
- the existing wording and what's in the proposed resolution, but the
- change may make the intent clearer.</p>
-<hr>
-<a name="365"><h3>365.&nbsp;Lack of const-qualification in clause 27</h3></a><p><b>Section:</b>&nbsp;27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown, Marc Paterno&nbsp; <b>Date:</b>&nbsp;10 May 2002</p>
-<p>
-Some stream and streambuf member functions are declared non-const,
-even thought they appear only to report information rather than to
-change an object's logical state. They should be declared const. See
-document N1360 for details and rationale.
-</p>
-
-<p>The list of member functions under discussion: <tt>in_avail</tt>,
-<tt>showmanyc</tt>, <tt>tellg</tt>, <tt>tellp</tt>, <tt>is_open</tt>.</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 27.8.1.5, 27.8.1.7, 27.8.1.8, 27.8.1.10, 27.8.1.11, and 27.8.1.13</p>
-<p>Replace</p>
-<pre> bool is_open();
-</pre>
-<p>with</p>
-<pre> bool is_open() const;
-</pre>
-<p><b>Rationale:</b></p>
-<p>Of the changes proposed in N1360, the only one that is safe is
-changing the filestreams' is_open to const. The LWG believed that
-this was NAD the first time it considered this issue (issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a>), but now thinks otherwise. The corresponding streambuf
-member function, after all,is already const.</p>
-
-<p>The other proposed changes are less safe, because some streambuf
-functions that appear merely to report a value do actually perform
-mutating operations. It's not even clear that they should be
-considered "logically const", because streambuf has two interfaces, a
-public one and a protected one. These functions may, and often do,
-change the state as exposed by the protected interface, even if the
-state exposed by the public interface is unchanged.</p>
-
-<p>Note that implementers can make this change in a binary compatible
-way by providing both overloads; this would be a conforming extension.</p>
-
-<hr>
-<a name="369"><h3>369.&nbsp;io stream objects and static ctors</h3></a><p><b>Section:</b>&nbsp;27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Ruslan Abdikeev&nbsp; <b>Date:</b>&nbsp;8 Jul 2002</p>
-<p>
-Is it safe to use standard iostream objects from constructors of
-static objects? Are standard iostream objects constructed and are
-their associations established at that time?
-</p>
-
-<p>Surpisingly enough, Standard does NOT require that.</p>
-
-<p>
-27.3/2 [lib.iostream.objects] guarantees that standard iostream
-objects are constructed and their associations are established before
-the body of main() begins execution. It also refers to ios_base::Init
-class as the panacea for constructors of static objects.
-</p>
-
-<p>
-However, there's nothing in 27.3 [lib.iostream.objects],
-in 27.4.2 [lib.ios.base], and in 27.4.2.1.6 [lib.ios::Init],
-that would require implementations to allow access to standard
-iostream objects from constructors of static objects.
-</p>
-
-<p>Details:</p>
-
-<p>Core text refers to some magic object ios_base::Init, which will
-be discussed below:</p>
-
-<blockquote>
- "The [standard iostream] objects are constructed, and their
- associations are established at some time prior to or during
- first time an object of class basic_ios&lt;charT,traits&gt;::Init
- is constructed, and in any case before the body of main
- begins execution." (27.3/2 [lib.iostream.objects])
-</blockquote>
-
-<p>
-The first <i>non-normative</i> footnote encourages implementations
-to initialize standard iostream objects earlier than required.
-</p>
-
-<p>However, the second <i>non-normative</i> footnote makes an explicit
-and unsupported claim:</p>
-
-<blockquote>
- "Constructors and destructors for static objects can access these
- [standard iostream] objects to read input from stdin or write output
- to stdout or stderr." (27.3/2 footnote 265 [lib.iostream.objects])
-</blockquote>
-
-<p>
-The only bit of magic is related to that ios_base::Init class. AFAIK,
-the rationale behind ios_base::Init was to bring an instance of this
-class to each translation unit which #included &lt;iostream&gt; or
-related header. Such an inclusion would support the claim of footnote
-quoted above, because in order to use some standard iostream object it
-is necessary to #include &lt;iostream&gt;.
-</p>
-
-<p>
-However, while Standard explicitly describes ios_base::Init as
-an appropriate class for doing the trick, I failed to found a
-mention of an _instance_ of ios_base::Init in Standard.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add to 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>, p2, immediately before the last sentence
-of the paragraph, the following two sentences:</p>
-
-<blockquote>
-If a translation unit includes &lt;iostream&gt;, or explicitly
-constructs an ios_base::Init object, these stream objects shall
-be constructed before dynamic initialization of non-local
-objects defined later in that translation unit, and these stream
-objects shall be destroyed after the destruction of dynamically
-initialized non-local objects defined later in that translation unit.
-</blockquote>
-
-<p><i>[Lillehammer: Matt provided wording.]</i></p>
-<p><i>[Mont Tremblant: Matt provided revised wording.]</i></p>
-<p><b>Rationale:</b></p>
-<p>
-The original proposed resolution unconditionally required
-implementations to define an ios_base::Init object of some
-implementation-defined name in the header &lt;iostream&gt;. That's an
-overspecification. First, defining the object may be unnecessary
-and even detrimental to performance if an implementation can
-guarantee that the 8 standard iostream objects will be initialized
-before any other user-defined object in a program. Second, there
-is no need to require implementations to document the name of the
-object.</p>
-
-<p>
-The new proposed resolution gives users guidance on what they need to
-do to ensure that stream objects are constructed during startup.</p>
-<hr>
-<a name="370"><h3>370.&nbsp;Minor error in basic_istream::get</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;15 Jul 2002</p>
-<p>Defect report for description of basic_istream::get (section 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), paragraph 15. The description for the get function
-with the following signature:</p>
-
-<pre> basic_istream&lt;charT,traits&gt;&amp; get(basic_streambuf&lt;char_type,traits&gt;&amp;
- sb);
-</pre>
-
-<p>is incorrect. It reads</p>
-
-<blockquote>
- Effects: Calls get(s,n,widen('\n'))
-</blockquote>
-
-<p>which I believe should be:</p>
-
-<blockquote>
- Effects: Calls get(sb,widen('\n'))
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>Change the <b>Effects</b> paragraph to:</p>
-<blockquote>
- Effects: Calls get(sb,this-&gt;widen('\n'))
-</blockquote>
-
-<p><i>[Pre-Oxford: Minor correction from Howard: replaced 'widen'
- with 'this-&gt;widen'.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo.</p>
-<hr>
-<a name="371"><h3>371.&nbsp;Stability of multiset and multimap member functions</h3></a><p><b>Section:</b>&nbsp;23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Frank Compagner&nbsp; <b>Date:</b>&nbsp;20 Jul 2002</p>
-<p>
-The requirements for multiset and multimap containers (23.1
-[lib.containers.requirements], 23.1.2 [lib.associative.reqmnts],
-23.3.2 [lib.multimap] and 23.3.4 [lib.multiset]) make no mention of
-the stability of the required (mutating) member functions. It appears
-the standard allows these functions to reorder equivalent elements of
-the container at will, yet the pervasive red-black tree implementation
-appears to provide stable behaviour.
-</p>
-
-<p>This is of most concern when considering the behaviour of erase().
-A stability requirement would guarantee the correct working of the
-following 'idiom' that removes elements based on a certain predicate
-function.
-</p>
-
-<pre> multimap&lt;int, int&gt; m;
- multimap&lt;int, int&gt;::iterator i = m.begin();
- while (i != m.end()) {
- if (pred(i))
- m.erase (i++);
- else
- ++i;
- }
-</pre>
-
-<p>
-Although clause 23.1.2/8 guarantees that i remains a valid iterator
-througout this loop, absence of the stability requirement could
-potentially result in elements being skipped. This would make
-this code incorrect, and, furthermore, means that there is no way
-of erasing these elements without iterating first over the entire
-container, and second over the elements to be erased. This would
-be unfortunate, and have a negative impact on both performance and
-code simplicity.
-</p>
-
-<p>
-If the stability requirement is intended, it should be made explicit
-(probably through an extra paragraph in clause 23.1.2).
-</p>
-<p>
-If it turns out stability cannot be guaranteed, i'd argue that a
-remark or footnote is called for (also somewhere in clause 23.1.2) to
-warn against relying on stable behaviour (as demonstrated by the code
-above). If most implementations will display stable behaviour, any
-problems emerging on an implementation without stable behaviour will
-be hard to track down by users. This would also make the need for an
-erase_if() member function that much greater.
-</p>
-
-<p>This issue is somewhat related to LWG issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>.</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Add the following to the end of 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> paragraph 4:
-"For <tt>multiset</tt> and <tt>multimap</tt>, <tt>insert</tt>and <tt>erase</tt>
- are <i>stable</i>: they preserve the relative ordering of equivalent
- elements.</p>
-
-<p><i>[Lillehammer: Matt provided wording]</i></p>
-<p><i>[Joe Gottman points out that the provided wording does not address
-multimap and multiset. N1780 also addresses this issue and suggests
-wording.]</i></p>
-
-<p><i>[Mont Tremblant: Changed set and map to multiset and multimap.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG agrees that this guarantee is necessary for common user
- idioms to work, and that all existing implementations provide this
- property. Note that this resolution guarantees stability for
- multimap and multiset, not for all associative containers in
- general.</p>
-
-<hr>
-<a name="373"><h3>373.&nbsp;Are basic_istream and basic_ostream to use (exceptions()&amp;badbit) != 0 ?</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>, 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Keith Baker&nbsp; <b>Date:</b>&nbsp;23 Jul 2002</p>
-
-<p>
-In 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a> and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>
-(exception()&amp;badbit) != 0 is used in testing for rethrow, yet
-exception() is the constructor to class std::exception in 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> that has no return type. Should member function
-exceptions() found in 27.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios"> [lib.ios]</a> be used instead?
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-In 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a> and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>, change
-"(exception()&amp;badbit) != 0" to "(exceptions()&amp;badbit) != 0".
-</p>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo.</p>
-<hr>
-<a name="375"><h3>375.&nbsp;basic_ios should be ios_base in 27.7.1.3</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;14 Aug 2002</p>
-<p>
-In Section 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>: Table 90, Table 91, and paragraph
-14 all contain references to "basic_ios::" which should be
-"ios_base::".
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change all references to "basic_ios" in Table 90, Table 91, and
-paragraph 14 to "ios_base".
-</p>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo.</p>
-<hr>
-<a name="376"><h3>376.&nbsp;basic_streambuf semantics</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;14 Aug 2002</p>
-<p>
-In Section 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, Table 90, the implication is that
-the four conditions should be mutually exclusive, but they are not.
-The first two cases, as written, are subcases of the third.</p>
-
-<p>
-As written, it is unclear what should be the result if cases 1 and 2
-are both true, but case 3 is false.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>Rewrite these conditions as:</p>
-<blockquote>
-<p>
- (which &amp; (ios_base::in|ios_base::out)) == ios_base::in
-</p>
-
-<p>
- (which &amp; (ios_base::in|ios_base::out)) == ios_base::out
-</p>
-
-<p>
- (which &amp; (ios_base::in|ios_base::out)) ==
-(ios_base::in|ios_base::out)
- and way == either ios_base::beg or ios_base::end
-</p>
-
-<p>Otherwise</p>
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>It's clear what we wanted to say, we just failed to say it. This
- fixes it.</p>
-<hr>
-<a name="379"><h3>379.&nbsp;nonsensical ctype::do_widen() requirement</h3></a><p><b>Section:</b>&nbsp;22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;6 Sep 2002</p>
-<p>
-The last sentence in 22.2.1.1.2, p11 below doesn't seem to make sense.
-</p>
-<pre> charT do_widen (char c) const;
-
- -11- Effects: Applies the simplest reasonable transformation from
- a char value or sequence of char values to the corresponding
- charT value or values. The only characters for which unique
- transformations are required are those in the basic source
- character set (2.2). For any named ctype category with a
- ctype&lt;charT&gt; facet ctw and valid ctype_base::mask value
- M (is(M, c) || !ctw.is(M, do_widen(c))) is true.
-</pre>
-<p>
-Shouldn't the last sentence instead read
-</p>
-<pre> For any named ctype category with a ctype&lt;char&gt; facet ctc
- and valid ctype_base::mask value M
- (ctc.is(M, c) || !is(M, do_widen(c))) is true.
-</pre>
-<p>
-I.e., if the narrow character c is not a member of a class of
-characters then neither is the widened form of c. (To paraphrase
-footnote 224.)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Replace the last sentence of 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>, p11 with the
-following text:
-</p>
-<pre> For any named ctype category with a ctype&lt;char&gt; facet ctc
- and valid ctype_base::mask value M,
- (ctc.is(M, c) || !is(M, do_widen(c))) is true.
-</pre>
-
-<p><i>[Kona: Minor edit. Added a comma after the <i>M</i> for clarity.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG believes this is just a typo, and that this is the correct fix.</p>
-<hr>
-<a name="380"><h3>380.&nbsp;typos in codecvt tables 53 and 54</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;6 Sep 2002</p>
-<p>
-Tables 53 and 54 in 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> are both titled "convert
-result values," when surely "do_in/do_out result values" must have
-been intended for Table 53 and "do_unshift result values" for Table
-54.
-</p>
-<p>
-Table 54, row 3 says that the meaning of partial is "more characters
-needed to be supplied to complete termination." The function is not
-supplied any characters, it is given a buffer which it fills with
-characters or, more precisely, destination elements (i.e., an escape
-sequence). So partial means that space for more than (to_limit - to)
-destination elements was needed to terminate a sequence given the
-value of state.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the title of Table 53 to "do_in/do_out result values" and
-the title of Table 54 to "do_unshift result values."
-</p>
-<p>
-Change the text in Table 54, row 3 (the <b>partial</b> row), under the
-heading Meaning, to "space for more than (to_limit - to) destination
-elements was needed to terminate a sequence given the value of state."
-</p>
-<hr>
-<a name="381"><h3>381.&nbsp;detection of invalid mbstate_t in codecvt</h3></a><p><b>Section:</b>&nbsp;22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;6 Sep 2002</p>
-<p>
-All but one codecvt member functions that take a state_type argument
-list as one of their preconditions that the state_type argument have
-a valid value. However, according to 22.2.1.5.2, p6,
-codecvt::do_unshift() is the only codecvt member that is supposed to
-return error if the state_type object is invalid.
-</p>
-
-<p>
-It seems to me that the treatment of state_type by all codecvt member
-functions should be the same and the current requirements should be
-changed. Since the detection of invalid state_type values may be
-difficult in general or computationally expensive in some specific
-cases, I propose the following:
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add a new paragraph before 22.2.1.5.2, p5, and after the function
-declaration below
-</p>
-<pre> result do_unshift(stateT&amp; state,
- externT* to, externT* to_limit, externT*&amp; to_next) const;
-</pre>
-<p>
-as follows:
-</p>
-<pre> Requires: (to &lt;= to_end) well defined and true; state initialized,
- if at the beginning of a sequence, or else equal to the result of
- converting the preceding characters in the sequence.
-</pre>
-<p>
-and change the text in Table 54, row 4, the <b>error</b> row, under
-the heading Meaning, from
-</p>
-<pre> state has invalid value
-</pre>
-<p>
-to
-</p>
-<pre> an unspecified error has occurred
-</pre>
-<p><b>Rationale:</b></p>
-<p>The intent is that implementations should not be required to detect
-invalid state values; such a requirement appears nowhere else. An
-invalid state value is a precondition violation, <i>i.e.</i> undefined
-behavior. Implementations that do choose to detect invalid state
-values, or that choose to detect any other kind of error, may return
-<b>error</b> as an indication.</p>
-<hr>
-<a name="383"><h3>383.&nbsp;Bidirectional iterator assertion typo</h3></a><p><b>Section:</b>&nbsp;24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;ysapir (submitted via comp.std.c++)&nbsp; <b>Date:</b>&nbsp;17 Oct 2002</p>
-<p>
-Following a discussion on the boost list regarding end iterators and
-the possibility of performing operator--() on them, it seems to me
-that there is a typo in the standard. This typo has nothing to do
-with that discussion.
-</p>
-
-<p>
-I have checked this newsgroup, as well as attempted a search of the
-Active/Defect/Closed Issues List on the site for the words "s is
-derefer" so I believe this has not been proposed before. Furthermore,
-the "Lists by Index" mentions only DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a> on section
-24.1.4, and DR <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a> is not related to this issue.
-</p>
-
-<p>
-The standard makes the following assertion on bidirectional iterators,
-in section 24.1.4 [lib.bidirectional.iterators], Table 75:
-</p>
-
-<pre> operational assertion/note
-expression return type semantics pre/post-condition
-
---r X&amp; pre: there exists s such
- that r == ++s.
- post: s is dereferenceable.
- --(++r) == r.
- --r == --s implies r == s.
- &amp;r == &amp;--r.
-</pre>
-
-<p>
-(See <a href="http://aspn.activestate.com/ASPN/Mail/Message/boost/1395763">http://aspn.activestate.com/ASPN/Mail/Message/boost/1395763</a>.)
-</p>
-
-<p>
-In particular, "s is dereferenceable" seems to be in error. It seems
-that the intention was to say "r is dereferenceable".
-</p>
-
-<p>
-If it were to say "r is dereferenceable" it would
-make perfect sense. Since s must be dereferenceable prior to
-operator++, then the natural result of operator-- (to undo operator++)
-would be to make r dereferenceable. Furthermore, without other
-assertions, and basing only on precondition and postconditions, we
-could not otherwise know this. So it is also interesting information.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the guarantee to "postcondition: r is dereferenceable."
-</p>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo</p>
-<hr>
-<a name="384"><h3>384.&nbsp;equal_range has unimplementable runtime complexity</h3></a><p><b>Section:</b>&nbsp;25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Hans Bos&nbsp; <b>Date:</b>&nbsp;18 Oct 2002</p>
-<p>
-Section 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a>
-states that at most 2 * log(last - first) + 1
-comparisons are allowed for equal_range.
-</p>
-
-<p>It is not possible to implement equal_range with these constraints.</p>
-
-<p>In a range of one element as in:</p>
-<pre> int x = 1;
- equal_range(&amp;x, &amp;x + 1, 1)
-</pre>
-
-<p>it is easy to see that at least 2 comparison operations are needed.</p>
-
-<p>For this case at most 2 * log(1) + 1 = 1 comparison is allowed.</p>
-
-<p>I have checked a few libraries and they all use the same (nonconforming)
-algorithm for equal_range that has a complexity of</p>
-<pre> 2* log(distance(first, last)) + 2.
-</pre>
-<p>I guess this is the algorithm that the standard assumes for equal_range.</p>
-
-<p>
-It is easy to see that 2 * log(distance) + 2 comparisons are enough
-since equal range can be implemented with lower_bound and upper_bound
-(both log(distance) + 1).
-</p>
-
-<p>
-I think it is better to require something like 2log(distance) + O(1) (or
-even logarithmic as multiset::equal_range).
-Then an implementation has more room to optimize for certain cases (e.g.
-have log(distance) characteristics when at most match is found in the range
-but 2log(distance) + 4 for the worst case).
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 25.3.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.lower.bound"> [lib.lower.bound]</a>/4, change <tt>log(last - first) + 1</tt>
-to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
-
-<p>In 25.3.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.upper.bound"> [lib.upper.bound]</a>/4, change <tt>log(last - first) + 1</tt>
-to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
-
-<p>In 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a>/4, change <tt>2*log(last - first) + 1</tt>
-to <tt>2*log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p>
-
-<p><i>[Matt provided wording]</i></p>
-<p><b>Rationale:</b></p>
-<p>The LWG considered just saying <i>O</i>(log n) for all three, but
-Ê decided that threw away too much valuable information.Ê The fact
-Ê that lower_bound is twice as fast as equal_range is important.
-Ê However, it's better to allow an arbitrary additive constant than to
-Ê specify an exact count.Ê An exact count would have to
-Ê involve <tt>floor</tt> or <tt>ceil</tt>.Ê It would be too easy to
-Ê get this wrong, and don't provide any substantial value for users.</p>
-<hr>
-<a name="386"><h3>386.&nbsp;Reverse iterator's operator[] has impossible return type</h3></a><p><b>Section:</b>&nbsp;24.4.1.3.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op-="> [lib.reverse.iter.op-=]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;23 Oct 2002</p>
-<p>In 24.4.1.3.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op-="> [lib.reverse.iter.op-=]</a>, <tt>reverse_iterator&lt;&gt;::operator[]</tt>
-is specified as having a return type of <tt>reverse_iterator::reference</tt>,
-which is the same as <tt>iterator_traits&lt;Iterator&gt;::reference</tt>.
-(Where <tt>Iterator</tt> is the underlying iterator type.)</p>
-
-<p>The trouble is that <tt>Iterator</tt>'s own operator[] doesn't
- necessarily have a return type
- of <tt>iterator_traits&lt;Iterator&gt;::reference</tt>. Its
- return type is merely required to be convertible
- to <tt>Iterator</tt>'s value type. The return type specified for
- reverse_iterator's operator[] would thus appear to be impossible.</p>
-
-<p>With the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#299">299</a>, the type of
- <tt>a[n]</tt> will continue to be required (for random access
- iterators) to be convertible to the value type, and also <tt>a[n] =
- t</tt> will be a valid expression. Implementations of
- <tt>reverse_iterator</tt> will likely need to return a proxy from
- <tt>operator[]</tt> to meet these requirements. As mentioned in the
- comment from Dave Abrahams, the simplest way to specify that
- <tt>reverse_iterator</tt> meet this requirement to just mandate
- it and leave the return type of <tt>operator[]</tt> unspecified.</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>In 24.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.requirements"> [lib.reverse.iter.requirements]</a> change:</p>
-
-<blockquote>
-<pre>reference operator[](difference_type n) const;
-</pre>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<pre><b><i>unspecified</i></b> operator[](difference_type n) const; // see <font color="red">lib.random.access.iterators</font>
-</pre>
-</blockquote>
-
-
-
-
-<p><i>[
-Comments from Dave Abrahams: IMO we should resolve 386 by just saying
- that the return type of reverse_iterator's operator[] is
- unspecified, allowing the random access iterator requirements to
- impose an appropriate return type. If we accept 299's proposed
- resolution (and I think we should), the return type will be
- readable and writable, which is about as good as we can do.
-]</i></p>
-<hr>
-<a name="389"><h3>389.&nbsp;Const overload of valarray::operator[] returns by value</h3></a><p><b>Section:</b>&nbsp;26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Gabriel Dos Reis&nbsp; <b>Date:</b>&nbsp;8 Nov 2002</p>
-<p>Consider the following program:</p>
-<pre> #include &lt;iostream&gt;
- #include &lt;ostream&gt;
- #include &lt;vector&gt;
- #include &lt;valarray&gt;
- #include &lt;algorithm&gt;
- #include &lt;iterator&gt;
- template&lt;typename Array&gt;
- void print(const Array&amp; a)
- {
- using namespace std;
- typedef typename Array::value_type T;
- copy(&amp;a[0], &amp;a[0] + a.size(),
- ostream_iterator&lt;T&gt;(std::cout, " "));
- }
- template&lt;typename T, unsigned N&gt;
- unsigned size(T(&amp;)[N]) { return N; }
- int main()
- {
- double array[] = { 0.89, 9.3, 7, 6.23 };
- std::vector&lt;double&gt; v(array, array + size(array));
- std::valarray&lt;double&gt; w(array, size(array));
- print(v); // #1
- std::cout &lt;&lt; std::endl;
- print(w); // #2
- std::cout &lt;&lt; std::endl;
- }
-</pre>
-
-<p>While the call numbered #1 succeeds, the call numbered #2 fails
-because the const version of the member function
-valarray&lt;T&gt;::operator[](size_t) returns a value instead of a
-const-reference. That seems to be so for no apparent reason, no
-benefit. Not only does that defeats users' expectation but it also
-does hinder existing software (written either in C or Fortran)
-integration within programs written in C++. There is no reason why
-subscripting an expression of type valarray&lt;T&gt; that is const-qualified
-should not return a const T&amp;.</p>
-<p><b>Proposed resolution:</b></p>
-<p>In the class synopsis in 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a>, and in
-<font color="red">26.3.2.3</font> just above paragraph 1, change</p>
-<pre> T operator[](size_t const);
-</pre>
-<p>to</p>
-<pre> const T&amp; operator[](size_t const);
-</pre>
-
-<p><i>[Kona: fixed a minor typo: put semicolon at the end of the line
- wehre it belongs.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>Return by value seems to serve no purpose. Valaray was explicitly
-designed to have a specified layout so that it could easily be
-integrated with libraries in other languages, and return by value
-defeats that purpose. It is believed that this change will have no
-impact on allowable optimizations.</p>
-<hr>
-<a name="391"><h3>391.&nbsp;non-member functions specified as const</h3></a><p><b>Section:</b>&nbsp;22.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.conversions"> [lib.conversions]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;James Kanze&nbsp; <b>Date:</b>&nbsp;10 Dec 2002</p>
-<p>
-The specifications of toupper and tolower both specify the functions as
-const, althought they are not member functions, and are not specified as
-const in the header file synopsis in section 22.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locales"> [lib.locales]</a>.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 22.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.conversions"> [lib.conversions]</a>, remove <tt>const</tt> from the function
- declarations of std::toupper and std::tolower</p>
-<p><b>Rationale:</b></p>
-<p>Fixes an obvious typo</p>
-<hr>
-<a name="395"><h3>395.&nbsp;inconsistencies in the definitions of rand() and random_shuffle()</h3></a><p><b>Section:</b>&nbsp;26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;James Kanze&nbsp; <b>Date:</b>&nbsp;3 Jan 2003</p>
-<p>
-In 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>, the C++ standard refers to the C standard for the
-definition of rand(); in the C standard, it is written that "The
-implementation shall behave as if no library function calls the rand
-function."
-</p>
-
-<p>
-In 25.2.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.random.shuffle"> [lib.alg.random.shuffle]</a>, there is no specification as to
-how the two parameter version of the function generates its random
-value. I believe that all current implementations in fact call rand()
-(in contradiction with the requirement avove); if an implementation does
-not call rand(), there is the question of how whatever random generator
-it does use is seeded. Something is missing.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-In [lib.c.math], add a paragraph specifying that the C definition of
-rand shal be modified to say that "Unless otherwise specified, the
-implementation shall behave as if no library function calls the rand
-function."
-</p>
-
-<p>
-In [lib.alg.random.shuffle], add a sentence to the effect that "In
-the two argument form of the function, the underlying source of
-random numbers is implementation defined. [Note: in particular, an
-implementation is permitted to use <tt>rand</tt>.]
-</p>
-<p><b>Rationale:</b></p>
-<p>The original proposed resolution proposed requiring the
- two-argument from of <tt>random_shuffle</tt> to
- use <tt>rand</tt>. We don't want to do that, because some existing
- implementations already use something else: gcc
- uses <tt>lrand48</tt>, for example. Using <tt>rand</tt> presents a
- problem if the number of elements in the sequence is greater than
- RAND_MAX.</p>
-<hr>
-<a name="400"><h3>400.&nbsp;redundant type cast in lib.allocator.members</h3></a><p><b>Section:</b>&nbsp;20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Markus Mauhart&nbsp; <b>Date:</b>&nbsp;27 Feb 2003</p>
-<p>
-20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> allocator members, contains
-the following 3 lines:
-</p>
-
-<pre> 12 Returns: new((void *) p) T( val)
- void destroy(pointer p);
- 13 Returns: ((T*) p)-&gt;~T()
-</pre>
-
-<p>
-The type cast "(T*) p" in the last line is redundant cause
-we know that std::allocator&lt;T&gt;::pointer is a typedef for T*.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Replace "((T*) p)" with "p".
-</p>
-<p><b>Rationale:</b></p>
-<p>Just a typo, this is really editorial.</p>
-<hr>
-<a name="402"><h3>402.&nbsp;wrong new expression in [some_]allocator::construct</h3></a><p><b>Section:</b>&nbsp;20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>, &nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Markus Mauhart&nbsp; <b>Date:</b>&nbsp;27 Feb 2003</p>
-<p>
-This applies to the new expression that is contained in both par12 of
-20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> and in par2 (table 32) of 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>.
-I think this new expression is wrong, involving unintended side
-effects.
-</p>
-
-
-<p>20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> contains the following 3 lines:</p>
-
-<pre> 11 Returns: the largest value N for which the call allocate(N,0) might succeed.
- void construct(pointer p, const_reference val);
- 12 Returns: new((void *) p) T( val)
-</pre>
-
-
-<p>20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> in table 32 has the following line:</p>
-<pre> a.construct(p,t) Effect: new((void*)p) T(t)
-</pre>
-
-<p>
-.... with the prerequisits coming from the preceding two paragraphs,
-especially from table 31:
-</p>
-
-<pre> alloc&lt;T&gt; a ;// an allocator for T
- alloc&lt;T&gt;::pointer p ;// random access iterator
- // (may be different from T*)
- alloc&lt;T&gt;::reference r = *p;// T&amp;
- T const&amp; t ;
-</pre>
-
-<p>
-Cause of using "new" but not "::new", any existing "T::operator new"
-function will hide the global placement new function. When there is no
-"T::operator new" with adequate signature,
-every_alloc&lt;T&gt;::construct(..) is ill-formed, and most
-std::container&lt;T,every_alloc&lt;T&gt;&gt; use it; a workaround
-would be adding placement new and delete functions with adequate
-signature and semantic to class T, but class T might come from another
-party. Maybe even worse is the case when T has placement new and
-delete functions with adequate signature but with "unknown" semantic:
-I dont like to speculate about it, but whoever implements
-any_container&lt;T,any_alloc&gt; and wants to use construct(..)
-probably must think about it.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Replace "new" with "::new" in both cases.
-</p>
-<hr>
-<a name="403"><h3>403.&nbsp;basic_string::swap should not throw exceptions</h3></a><p><b>Section:</b>&nbsp;21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;25 Mar 2003</p>
-
-<p>
-std::basic_string, 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 2 says that
-basic_string "conforms to the requirements of a Sequence, as specified
-in (23.1.1)." The sequence requirements specified in (23.1.1) to not
-include any prohibition on swap members throwing exceptions.
-</p>
-
-<p>
-Section 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 does limit conditions under
-which exceptions may be thrown, but applies only to "all container
-types defined in this clause" and so excludes basic_string::swap
-because it is defined elsewhere.
-</p>
-
-<p>
-Eric Niebler points out that 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 5 explicitly
-permits basic_string::swap to invalidates iterators, which is
-disallowed by 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10. Thus the standard would
-be contradictory if it were read or extended to read as having
-basic_string meet 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 requirements.
-</p>
-
-<p>
-Yet several LWG members have expressed the belief that the original
-intent was that basic_string::swap should not throw exceptions as
-specified by 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10, and that the standard is
-unclear on this issue. The complexity of basic_string::swap is
-specified as "constant time", indicating the intent was to avoid
-copying (which could cause a bad_alloc or other exception). An
-important use of swap is to ensure that exceptions are not thrown in
-exception-safe code.
-</p>
-
-<p>
-Note: There remains long standing concern over whether or not it is
-possible to reasonably meet the 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 swap
-requirements when allocators are unequal. The specification of
-basic_string::swap exception requirements is in no way intended to
-address, prejudice, or otherwise impact that concern.
-</p>
-
-
-
-
-
-<p><b>Proposed resolution:</b></p>
-<p>
-In 21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a>, add a throws clause:
-</p>
-
-<p>
-Throws: Shall not throw exceptions.
-</p>
-<hr>
-<a name="404"><h3>404.&nbsp;May a replacement allocation function be declared inline?</h3></a><p><b>Section:</b>&nbsp;17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a>, 18.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete"> [lib.new.delete]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;24 Apr 2003</p>
-<p>
-The eight basic dynamic memory allocation functions (single-object
-and array versions of ::operator new and ::operator delete, in the
-ordinary and nothrow forms) are replaceable. A C++ program may
-provide an alternative definition for any of them, which will be used
-in preference to the implementation's definition.
-</p>
-
-<p>
-Three different parts of the standard mention requirements on
-replacement functions: 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a>, 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a>
-and 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a>, and 3.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.stc.dynamic"> [basic.stc.dynamic]</a>.
-</p>
-
-<p>None of these three places say whether a replacement function may
- be declared inline. 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> paragraph 2 specifies a
- signature for the replacement function, but that's not enough:
- the <tt>inline</tt> specifier is not part of a function's signature.
- One might also reason from 7.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.fct.spec"> [dcl.fct.spec]</a> paragraph 2, which
- requires that "an inline function shall be defined in every
- translation unit in which it is used," but this may not be quite
- specific enough either. We should either explicitly allow or
- explicitly forbid inline replacement memory allocation
- functions.</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add a new sentence to the end of 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 3:
-"The program's definitions shall not be specified as <tt>inline</tt>.
-No diagnostic is required."
-</p>
-
-<p><i>[Kona: added "no diagnostic is required"]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>
-The fact that <tt>inline</tt> isn't mentioned appears to have been
-nothing more than an oversight. Existing implementations do not
-permit inline functions as replacement memory allocation functions.
-Providing this functionality would be difficult in some cases, and is
-believed to be of limited value.
-</p>
-<hr>
-<a name="405"><h3>405.&nbsp;qsort and POD</h3></a><p><b>Section:</b>&nbsp;25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Ray Lischner&nbsp; <b>Date:</b>&nbsp;08 Apr 2003</p>
-<p>
-Section 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> describes bsearch and qsort, from the C
-standard library. Paragraph 4 does not list any restrictions on qsort,
-but it should limit the base parameter to point to POD. Presumably,
-qsort sorts the array by copying bytes, which requires POD.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> paragraph 4, just after the declarations and
-before the nonnormative note, add these words: "both of which have the
-same behavior as the original declaration. The behavior is undefined
-unless the objects in the array pointed to by <i>base</i> are of POD
-type."
-</p>
-
-<p><i>[Something along these lines is clearly necessary. Matt
- provided wording.]</i></p>
-<hr>
-<a name="406"><h3>406.&nbsp;vector::insert(s) exception safety</h3></a><p><b>Section:</b>&nbsp;23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;27 Apr 2003</p>
-<p>
-There is a possible defect in the standard: the standard text was
-never intended to prevent arbitrary ForwardIterators, whose operations
-may throw exceptions, from being passed, and it also wasn't intended
-to require a temporary buffer in the case where ForwardIterators were
-passed (and I think most implementations don't use one). As is, the
-standard appears to impose requirements that aren't met by any
-existing implementation.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> paragraph 1 with:</p>
-<blockquote>
- 1- Notes: Causes reallocation if the new size is greater than the
- old capacity. If no reallocation happens, all the iterators and
- references before the insertion point remain valid. If an exception
- is thrown other than by the copy constructor or assignment operator
- of T or by any InputIterator operation there are no effects.
-</blockquote>
-
-<p><i>[We probably need to say something similar for deque.]</i></p>
-
-<hr>
-<a name="407"><h3>407.&nbsp;Can singular iterators be destroyed?</h3></a><p><b>Section:</b>&nbsp;24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;3 June 2003</p>
-<p>
-Clause 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>, paragraph 5, says that the only expression
-that is defined for a singular iterator is "an assignment of a
-non-singular value to an iterator that holds a singular value". This
-means that destroying a singular iterator (e.g. letting an automatic
-variable go out of scope) is technically undefined behavior. This
-seems overly strict, and probably unintentional.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the sentence in question to "... the only exceptions are
-destroying an iterator that holds a singular value, or the assignment
-of a non-singular value to an iterator that holds a singular value."
-</p>
-<hr>
-<a name="409"><h3>409.&nbsp;Closing an fstream should clear error state</h3></a><p><b>Section:</b>&nbsp;27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>, 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Nathan Myers&nbsp; <b>Date:</b>&nbsp;3 June 2003</p>
-<p>
-A strict reading of 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> shows that opening or
-closing a basic_[io]fstream does not affect the error bits. This
-means, for example, that if you read through a file up to EOF, and
-then close the stream and reopen it at the beginning of the file,
-the EOF bit in the stream's error state is still set. This is
-counterintuitive.
-</p>
-<p>
-The LWG considered this issue once before, as issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#22">22</a>,
-and put in a footnote to clarify that the strict reading was indeed
-correct. We did that because we believed the standard was
-unambiguous and consistent, and that we should not make architectural
-changes in a TC. Now that we're working on a new revision of the
-language, those considerations no longer apply.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Change 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>, para. 3 from:</p>
-
-<blockquote>
-Calls rdbuf()-&gt;open(s,mode|in). If that function returns a null
-pointer, calls setstate(failbit) (which may throw ios_base::failure
-[Footnote: (lib.iostate.flags)].
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>Calls rdbuf()-&gt;open(s,mode|in). If that function returns
-a null pointer, calls setstate(failbit) (which may throw
-ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear().
-</blockquote>
-
-<p>Change 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a>, para. 3 from:</p>
-
-<blockquote>Calls rdbuf()-&gt;open(s,mode|out). If that function
-returns a null pointer, calls setstate(failbit) (which may throw
-ios_base::failure [Footnote: (lib.iostate.flags)).
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>Calls rdbuf()-&gt;open(s,mode|out). If that function
-returns a null pointer, calls setstate(failbit) (which may throw
-ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear().
-</blockquote>
-
-<p>Change 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a>, para. 3 from:</p>
-
-<blockquote>Calls rdbuf()-&gt;open(s,mode), If that function returns a
-null pointer, calls setstate(failbit), (which may throw
-ios_base::failure). (lib.iostate.flags) )
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>Calls rdbuf()-&gt;open(s,mode), If that function returns a
-null pointer, calls setstate(failbit), (which may throw
-ios_base::failure). (lib.iostate.flags) ), else calls clear().
-</blockquote>
-
-
-
-<p><i>[Kona: the LWG agrees this is a good idea. Post-Kona: Bill
-provided wording. He suggests having open, not close, clear the error
-flags.]</i></p>
-
-<p><i>[Post-Sydney: Howard provided a new proposed resolution. The
- old one didn't make sense because it proposed to fix this at the
- level of basic_filebuf, which doesn't have access to the stream's
- error state. Howard's proposed resolution fixes this at the level
- of the three fstream class template instead.]</i></p>
-
-<hr>
-<a name="410"><h3>410.&nbsp;Missing semantics for stack and queue comparison operators</h3></a><p><b>Section:</b>&nbsp;23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a>, 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Hans Bos&nbsp; <b>Date:</b>&nbsp;7 Jun 2003</p>
-<p>
-Sections 23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> and 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a> list
-comparison operators (==, !=, &lt;, &lt;=, &gt;, =&gt;) for queue and
-stack. Only the semantics for queue::operator== (23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> par2) and queue::operator&lt; (23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a>
-par3) are defined.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add the following new paragraphs after 23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a>
- paragraph 3:</p>
-
-<blockquote>
-
-<pre> operator!=
-</pre>
-<p>Returns: <tt>x.c != y.c</tt></p>
-
-<pre> operator&gt;
-</pre>
-<p>Returns: <tt>x.c &gt; y.c</tt></p>
-
-<pre> operator&lt;=
-</pre>
-<p>Returns: <tt>x.c &lt;= y.c</tt></p>
-
-<pre> operator&gt;=
-</pre>
-<p>Returns: <tt>x.c &gt;= y.c</tt></p>
-
-</blockquote>
-
-<p>Add the following paragraphs at the end of 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a>:</p>
-
-<blockquote>
-
-<pre> operator==
-</pre>
-<p>Returns: <tt>x.c == y.c</tt></p>
-
-<pre> operator&lt;
-</pre>
-<p>Returns: <tt>x.c &lt; y.c</tt></p>
-
-<pre> operator!=
-</pre>
-<p>Returns: <tt>x.c != y.c</tt></p>
-
-<pre> operator&gt;
-</pre>
-<p>Returns: <tt>x.c &gt; y.c</tt></p>
-
-<pre> operator&lt;=
-</pre>
-<p>Returns: <tt>x.c &lt;= y.c</tt></p>
-
-<pre> operator&gt;=
-</pre>
-<p>Returns: <tt>x.c &gt;= y.c</tt></p>
-
-</blockquote>
-
-
-<p><i>[Kona: Matt provided wording.]</i></p>
-
-<p><b>Rationale:</b></p>
-There isn't any real doubt about what these operators are
-supposed to do, but we ought to spell it out.
-<hr>
-<a name="411"><h3>411.&nbsp;Wrong names of set member functions</h3></a><p><b>Section:</b>&nbsp;25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Daniel Frey&nbsp; <b>Date:</b>&nbsp;9 Jul 2003</p>
-<p>
-25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a> paragraph 1 reads:
-"The semantics of the set operations are generalized to multisets in a
-standard way by defining union() to contain the maximum number of
-occurrences of every element, intersection() to contain the minimum, and
-so on."
-</p>
-
-<p>
-This is wrong. The name of the functions are set_union() and
-set_intersection(), not union() and intersection().
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change that sentence to use the correct names.</p>
-<hr>
-<a name="412"><h3>412.&nbsp;Typo in 27.4.4.3</h3></a><p><b>Section:</b>&nbsp;27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;10 Jul 2003</p>
-<p>
-The Effects clause in 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> paragraph 5 says that the
-function only throws if the respective bits are already set prior to
-the function call. That's obviously not the intent. The typo ought to
-be corrected and the text reworded as: "If (<i>state</i> &amp;
-exceptions()) == 0, returns. ..."
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> paragraph 5, replace "If (rdstate() &amp;
-exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit))
-&amp; exceptions()) == 0".
-</p>
-
-<p><i>[Kona: the original proposed resolution wasn't quite right. We
- really do mean rdstate(); the ambiguity is that the wording in the
- standard doesn't make it clear whether we mean rdstate() before
- setting the new state, or rdsate() after setting it. We intend the
- latter, of course. Post-Kona: Martin provided wording.]</i></p>
-
-<hr>
-<a name="413"><h3>413.&nbsp;Proposed resolution to LDR#64 still wrong</h3></a><p><b>Section:</b>&nbsp;27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Bo Persson&nbsp; <b>Date:</b>&nbsp;13 Jul 2003</p>
-<p>
-The second sentence of the proposed resolution says:
-</p>
-
-<p>
-"If it inserted no characters because it caught an exception thrown
-while extracting characters from sb and ..."
-</p>
-
-<p>
-However, we are not extracting from sb, but extracting from the
-basic_istream (*this) and inserting into sb. I can't really tell if
-"extracting" or "sb" is a typo.
-</p>
-
-<p><i>[
-Sydney: Definitely a real issue. We are, indeed, extracting characters
-from an istream and not from sb. The problem was there in the FDIS and
-wasn't fixed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a>. Probably what was intended was
-to have *this instead of sb. We're talking about the exception flag
-state of a basic_istream object, and there's only one basic_istream
-object in this discussion, so that would be a consistent
-interpretation. (But we need to be careful: the exception policy of
-this member function must be consistent with that of other
-extractors.) PJP will provide wording.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change the sentence from:</p>
-
-<blockquote>
-If it inserted no characters because it caught an exception thrown
-while extracting characters from sb and failbit is on in exceptions(),
-then the caught exception is rethrown.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-If it inserted no characters because it caught an exception thrown
-while extracting characters from *this and failbit is on in exceptions(),
-then the caught exception is rethrown.
-</blockquote>
-<hr>
-<a name="414"><h3>414.&nbsp;Which iterators are invalidated by v.erase()?</h3></a><p><b>Section:</b>&nbsp;23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;19 Aug 2003</p>
-<p>
-Consider the following code fragment:
-</p>
-<blockquote>
-<pre>int A[8] = { 1,3,5,7,9,8,4,2 };
-std::vector&lt;int&gt; v(A, A+8);
-
-std::vector&lt;int&gt;::iterator i1 = v.begin() + 3;
-std::vector&lt;int&gt;::iterator i2 = v.begin() + 4;
-v.erase(i1);
-</pre>
-</blockquote>
-
-<p>
-Which iterators are invalidated by <tt>v.erase(i1)</tt>: i1, i2,
-both, or neither?
-</p>
-
-<p>
-On all existing implementations that I know of, the status of i1 and
-i2 is the same: both of them will be iterators that point to some
-elements of the vector (albeit not the same elements they did
-before). You won't get a crash if you use them. Depending on
-exactly what you mean by "invalidate", you might say that neither one
-has been invalidated because they still point to <i>something</i>,
-or you might say that both have been invalidated because in both
-cases the elements they point to have been changed out from under the
-iterator.
-</p>
-
-<p>
-The standard doesn't say either of those things. It says that erase
-invalidates all iterators and references "after the point of the
-erase". This doesn't include i1, since it's at the point of the
-erase instead of after it. I can't think of any sensible definition
-of invalidation by which one can say that i2 is invalidated but i1
-isn't.
-</p>
-
-<p>
-(This issue is important if you try to reason about iterator validity
-based only on the guarantees in the standard, rather than reasoning
-from typical implementation techniques. Strict debugging modes,
-which some programmers find useful, do not use typical implementation
-techniques.)
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> paragraph 3, change "Invalidates all the
-iterators and references after the point of the erase" to
-"Invalidates iterators and references at or after the point of the
-erase".
-</p>
-<p><b>Rationale:</b></p>
-<p>I believe this was essentially a typographical error, and that it
- was taken for granted that erasing an element invalidates iterators
- that point to it. The effects clause in question treats iterators
- and references in parallel, and it would seem counterintuitive to
- say that a reference to an erased value remains valid.</p>
-<hr>
-<a name="415"><h3>415.&nbsp;behavior of std::ws</h3></a><p><b>Section:</b>&nbsp;27.6.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.manip"> [lib.istream.manip]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-According to 27.6.1.4, the ws() manipulator is not required to construct
-the sentry object. The manipulator is also not a member function so the
-text in 27.6.1, p1 through 4 that describes the exception policy for
-istream member functions does not apply. That seems inconsistent with
-the rest of extractors and all the other input functions (i.e., ws will
-not cause a tied stream to be flushed before extraction, it doesn't check
-the stream's exceptions or catch exceptions thrown during input, and it
-doesn't affect the stream's gcount).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add to 27.6.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.manip"> [lib.istream.manip]</a>, immediately before the first sentence
-of paragraph 1, the following text:
-</p>
-
- <blockquote>
- Behaves as an unformatted input function (as described in
- 27.6.1.3, paragraph 1), except that it does not count the number
- of characters extracted and does not affect the value returned by
- subsequent calls to is.gcount(). After constructing a sentry
- object...
- </blockquote>
-
-<p><i>[Post-Kona: Martin provided wording]</i></p>
-
-<hr>
-<a name="420"><h3>420.&nbsp;is std::FILE a complete type?</h3></a><p><b>Section:</b>&nbsp;27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-7.19.1, p2, of C99 requires that the FILE type only be declared in
-&lt;stdio.h&gt;. None of the (implementation-defined) members of the
-struct is mentioned anywhere for obvious reasons.
-</p>
-
-<p>
-C++ says in 27.8.1, p2 that FILE is a type that's defined in &lt;cstdio&gt;. Is
-it really the intent that FILE be a complete type or is an implementation
-allowed to just declare it without providing a full definition?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In the first sentence of 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> paragraph 2, change
- "defined" to "declared".</p>
-<p><b>Rationale:</b></p>
-<p>We don't want to impose any restrictions beyond what the C standard
- already says. We don't want to make anything implementation defined,
- because that imposes new requirements in implementations.</p>
-<hr>
-<a name="425"><h3>425.&nbsp;return value of std::get_temporary_buffer</h3></a><p><b>Section:</b>&nbsp;20.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.help"> [lib.meta.help]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The standard is not clear about the requirements on the value returned from
-a call to get_temporary_buffer(0). In particular, it fails to specify whether
-the call should return a distinct pointer each time it is called (like
-operator new), or whether the value is unspecified (as if returned by
-malloc). The standard also fails to mention what the required behavior
-is when the argument is less than 0.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 20.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.help"> [lib.meta.help]</a> paragraph 2 from "...or a pair of 0
-values if no storage can be obtained" to "...or a pair of 0 values if
-no storage can be obtained or if <i>n</i> &lt;= 0."</p>
-<p><i>[Kona: Matt provided wording]</i></p>
-<hr>
-<a name="426"><h3>426.&nbsp;search_n(), fill_n(), and generate_n() with negative n</h3></a><p><b>Section:</b>&nbsp;25.1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.search"> [lib.alg.search]</a>, 25.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.fill"> [lib.alg.fill]</a>, 25.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.generate"> [lib.alg.generate]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-The complexity requirements for these function templates are incorrect
-(or don't even make sense) for negative n:</p>
-
-<p>25.1.9, p7 (search_n):
-<br>
-Complexity: At most (last1 - first1) * count applications
-of the corresponding predicate.</p>
-
-<p>25.2.5, p3 (fill_n):
-<br>
-Complexity: Exactly last - first (or n) assignments.</p>
-<br>
-
-<p>25.2.6, p3 (generate_n):
-<br>
-Complexity: Exactly last - first (or n) assignments.</p>
-
-<p>
-In addition, the Requirements or the Effects clauses for the latter two
-templates don't say anything about the behavior when n is negative.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 25.1.9, p7 to</p>
-
-<blockquote>
-Complexity: At most (last1 - first1) * count applications
-of the corresponding predicate if count is positive,
-or 0 otherwise.
-</blockquote>
-
-<p>Change 25.2.5, p2 to</p>
-<blockquote>
-Effects: Assigns value through all the iterators in the range [first,
-last), or [first, first + n) if n is positive, none otherwise.
-</blockquote>
-
-<p>Change 25.2.5, p3 to:</p>
-<blockquote>
-Complexity: Exactly last - first (or n if n is positive,
-or 0 otherwise) assignments.
-</blockquote>
-
-<p>
-Change 25.2.6, p1
-to (notice the correction for the misspelled "through"):
-</p>
-<blockquote>
-Effects: Invokes the function object genand assigns the return
-value of gen through all the iterators in the range [first, last),
-or [first, first + n) if n is positive, or [first, first)
-otherwise.
-</blockquote>
-
-<p>Change 25.2.6, p3 to:</p>
-<blockquote>
-Complexity: Exactly last - first (or n if n is positive,
-or 0 otherwise) assignments.
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>Informally, we want to say that whenever we see a negative number
- we treat it the same as if it were zero. We believe the above
- changes do that (although they may not be the minimal way of saying
- so). The LWG considered and rejected the alternative of saying that
- negative numbers are undefined behavior.</p>
-<hr>
-<a name="428"><h3>428.&nbsp;string::erase(iterator) validity</h3></a><p><b>Section:</b>&nbsp;21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;18 Sep 2003</p>
-<p>
-23.1.1, p3 along with Table 67 specify as a prerequisite for a.erase(q)
-that q must be a valid dereferenceable iterator into the sequence a.
-</p>
-
-<p>
-However, 21.3.5.5, p5 describing string::erase(p) only requires that
-p be a valid iterator.
-</p>
-
-<p>
-This may be interepreted as a relaxation of the general requirement,
-which is most likely not the intent.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Remove 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a> paragraph 5.</p>
-<p><b>Rationale:</b></p>
-<p>The LWG considered two options: changing the string requirements to
- match the general container requirements, or just removing the
- erroneous string requirements altogether. The LWG chose the latter
- option, on the grounds that duplicating text always risks the
- possibility that it might be duplicated incorrectly.</p>
-<hr>
-<a name="432"><h3>432.&nbsp;stringbuf::overflow() makes only one write position available</h3></a><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Christian W Brock&nbsp; <b>Date:</b>&nbsp;24 Sep 2003</p>
-<p>27.7.1.3 par 8 says:</p>
-<blockquote>
-Notes: The function can make a write position available only if
- ( mode &amp; ios_base::out) != 0. To make a write position
- available, the function reallocates (or initially allocates) an
- array object with a sufficient number of elements to hold the
- current array object (if any), plus one additional write position.
- If ( mode &amp; ios_base::in) != 0, the function alters the read end
- pointer egptr() to point just past the new write position (as
- does the write end pointer epptr()).
-</blockquote>
-
-<p>
-The sentences "plus one additional write position." and especially
- "(as does the write end pointer epptr())" COULD by interpreted
- (and is interpreted by at least my library vendor) as:
-</p>
-
-<blockquote>
- post-condition: epptr() == pptr()+1
-</blockquote>
-
-<p>
-This WOULD force sputc() to call the virtual overflow() each time.
-</p>
-
-<p>The proposed change also affects Defect Report 169.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>27.7.1.1/2 Change:</p>
-
-<blockquote>
-2- Notes: The function allocates no array object.
-</blockquote>
-
-<p>
-to:
-</p>
-
-<blockquote>
-2- Postcondition: str() == "".
-</blockquote>
-
-<p>
-27.7.1.1/3 Change:
-</p>
-
-<blockquote>
-<p>
--3- Effects: Constructs an object of class basic_stringbuf,
-initializing the base class with basic_streambuf()
-(lib.streambuf.cons), and initializing mode with which . Then copies
-the content of str into the basic_stringbuf underlying character
-sequence and initializes the input and output sequences according to
-which. If which &amp; ios_base::out is true, initializes the output
-sequence with the underlying sequence. If which &amp; ios_base::in is
-true, initializes the input sequence with the underlying sequence.
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
--3- Effects: Constructs an object of class basic_stringbuf,
-initializing the base class with basic_streambuf()
-(lib.streambuf.cons), and initializing mode with which. Then copies
-the content of str into the basic_stringbuf underlying character
-sequence. If which &amp; ios_base::out is true, initializes the output
-sequence such that pbase() points to the first underlying character,
-epptr() points one past the last underlying character, and if (which &amp;
-ios_base::ate) is true, pptr() is set equal to
-epptr() else pptr() is set equal to pbase(). If which &amp; ios_base::in
-is true, initializes the input sequence such that eback() and gptr()
-point to the first underlying character and egptr() points one past
-the last underlying character.
-</p>
-</blockquote>
-
-<p>27.7.1.2/1 Change:</p>
-
-<blockquote>
-<p>
--1- Returns: A basic_string object whose content is equal to the
-basic_stringbuf underlying character sequence. If the buffer is only
-created in input mode, the underlying character sequence is equal to
-the input sequence; otherwise, it is equal to the output sequence. In
-case of an empty underlying character sequence, the function returns
-basic_string&lt;charT,traits,Allocator&gt;().
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
--1- Returns: A basic_string object whose content is equal to the
-basic_stringbuf underlying character sequence. If the basic_stringbuf
-was created only in input mode, the resultant basic_string contains
-the character sequence in the range [eback(), egptr()). If the
-basic_stringbuf was created with (which &amp; ios_base::out) being true
-then the resultant basic_string contains the character sequence in the
-range [pbase(), high_mark) where high_mark represents the position one
-past the highest initialized character in the buffer. Characters can
-be initialized either through writing to the stream, or by
-constructing the basic_stringbuf with a basic_string, or by calling
-the str(basic_string) member function. In the case of calling the
-str(basic_string) member function, all characters initialized prior to
-the call are now considered uninitialized (except for those
-characters re-initialized by the new basic_string). Otherwise the
-basic_stringbuf has been created in neither input nor output mode and
-a zero length basic_string is returned.
-</p>
-</blockquote>
-
-<p>
-27.7.1.2/2 Change:
-</p>
-
-<blockquote>
-<p>
--2- Effects: If the basic_stringbuf's underlying character sequence is
-not empty, deallocates it. Then copies the content of s into the
-basic_stringbuf underlying character sequence and initializes the
-input and output sequences according to the mode stored when creating
-the basic_stringbuf object. If (mode&amp;ios_base::out) is true, then
-initializes the output sequence with the underlying sequence. If
-(mode&amp;ios_base::in) is true, then initializes the input sequence with
-the underlying sequence.
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
--2- Effects: Copies the content of s into the basic_stringbuf
-underlying character sequence. If mode &amp; ios_base::out is true,
-initializes the output sequence such that pbase() points to the first
-underlying character, epptr() points one past the last underlying
-character, and if (mode &amp; ios_base::ate) is true,
-pptr() is set equal to epptr() else pptr() is set equal to pbase(). If
-mode &amp; ios_base::in is true, initializes the input sequence such that
-eback() and gptr() point to the first underlying character and egptr()
-points one past the last underlying character.
-</p>
-</blockquote>
-
-<p>Remove 27.2.1.2/3. (Same rationale as issue 238: incorrect and unnecessary.)</p>
-
-<p>27.7.1.3/1 Change:</p>
-
-<blockquote>
-<p>
-1- Returns: If the input sequence has a read position available,
-returns traits::to_int_type(*gptr()). Otherwise, returns
-traits::eof().
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
-1- Returns: If the input sequence has a read position available,
-returns traits::to_int_type(*gptr()). Otherwise, returns
-traits::eof(). Any character in the underlying buffer which has been
-initialized is considered to be part of the input sequence.
-</p>
-</blockquote>
-
-<p>27.7.1.3/9 Change:</p>
-
-<blockquote>
-<p>
--9- Notes: The function can make a write position available only if (
-mode &amp; ios_base::out) != 0. To make a write position available, the
-function reallocates (or initially allocates) an array object with a
-sufficient number of elements to hold the current array object (if
-any), plus one additional write position. If ( mode &amp; ios_base::in) !=
-0, the function alters the read end pointer egptr() to point just past
-the new write position (as does the write end pointer epptr()).
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
--9- The function can make a write position available only if ( mode &amp;
-ios_base::out) != 0. To make a write position available, the function
-reallocates (or initially allocates) an array object with a sufficient
-number of elements to hold the current array object (if any), plus one
-additional write position. If ( mode &amp; ios_base::in) != 0, the
-function alters the read end pointer egptr() to point just past the
-new write position.
-</p>
-</blockquote>
-
-<p>27.7.1.3/12 Change:</p>
-
-<blockquote>
-<p>
--12- _ If (newoff + off) &lt; 0, or (xend - xbeg) &lt; (newoff + off), the
-positioning operation fails. Otherwise, the function assigns xbeg +
-newoff + off to the next pointer xnext .
-</p>
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-<p>
--12- _ If (newoff + off) &lt; 0, or if (newoff + off) refers to an
-uninitialized character (as defined in 27.7.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.members"> [lib.stringbuf.members]</a>
-paragraph 1), the positioning operation fails. Otherwise, the function
-assigns xbeg + newoff + off to the next pointer xnext .
-</p>
-</blockquote>
-
-<p><i>[post-Kona: Howard provided wording. At Kona the LWG agreed that
- something along these lines was a good idea, but the original
- proposed resolution didn't say enough about the effect of various
- member functions on the underlying character sequences.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The current basic_stringbuf description is over-constrained in such
-a way as to prohibit vendors from making this the high-performance
-in-memory stream it was meant to be. The fundamental problem is that
-the pointers: eback(), gptr(), egptr(), pbase(), pptr(), epptr() are
-observable from a derived client, and the current description
-restricts the range [pbase(), epptr()) from being grown geometrically.
-This change allows, but does not require, geometric growth of this
-range.</p>
-
-<p>Backwards compatibility issues: These changes will break code that
-derives from basic_stringbuf, observes epptr(), and depends upon
-[pbase(), epptr()) growing by one character on each call to overflow()
-(i.e. test suites). Otherwise there are no backwards compatibility
-issues.</p>
-
-<p>27.7.1.1/2: The non-normative note is non-binding, and if it were
-binding, would be over specification. The recommended change focuses
-on the important observable fact.</p>
-
-<p>27.7.1.1/3: This change does two things: 1. It describes exactly
-what must happen in terms of the sequences. The terms "input
-sequence" and "output sequence" are not well defined. 2. It
-introduces a common extension: open with app or ate mode. I concur
-with issue 238 that paragraph 4 is both wrong and unnecessary.</p>
-
-<p>27.7.1.2/1: This change is the crux of the efficiency issue. The
-resultant basic_string is not dependent upon epptr(), and thus
-implementors are free to grow the underlying buffer geometrically
-during overflow() *and* place epptr() at the end of that buffer.</p>
-
-<p>27.7.1.2/2: Made consistent with the proposed 27.7.1.1/3.</p>
-
-<p>27.7.1.3/1: Clarifies that characters written to the stream beyond
-the initially specified string are available for reading in an i/o
-basic_streambuf.</p>
-
-<p>27.7.1.3/9: Made normative by removing "Notes:", and removed the
-trailing parenthetical comment concerning epptr().</p>
-
-<p>27.7.1.3/12: Restricting the positioning to [xbeg, xend) is no
-longer allowable since [pbase(), epptr()) may now contain
-uninitialized characters. Positioning is only allowable over the
-initialized range.</p>
-<hr>
-<a name="434"><h3>434.&nbsp;bitset::to_string() hard to use</h3></a><p><b>Section:</b>&nbsp;23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Oct 2003</p>
-<p>
-It has been pointed out a number of times that the bitset to_string() member
-function template is tedious to use since callers must explicitly specify the
-entire template argument list (3 arguments). At least two implementations
-provide a number of overloads of this template to make it easier to use.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In order to allow callers to specify no template arguments at all, just the
-first one (charT), or the first 2 (charT and traits), in addition to all
-three template arguments, add the following three overloads to both the
-interface (declarations only) of the class template bitset as well as to
-section 23.3.5.2, immediately after p34, the Returns clause of the existing
-to_string() member function template:</p>
-
-<pre> template &lt;class charT, class traits&gt;
- basic_string&lt;charT, traits, allocator&lt;charT&gt; &gt;
- to_string () const;
-
- -34.1- Returns: to_string&lt;charT, traits, allocator&lt;charT&gt; &gt;().
-
- template &lt;class charT&gt;
- basic_string&lt;charT, char_traits&lt;charT&gt;, allocator&lt;charT&gt; &gt;
- to_string () const;
-
- -34.2- Returns: to_string&lt;charT, char_traits&lt;charT&gt;, allocator&lt;charT&gt; &gt;().
-
- basic_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt; &gt;
- to_string () const;
-
- -34.3- Returns: to_string&lt;char, char_traits&lt;char&gt;, allocator&lt;char&gt; &gt;().
-</pre>
-
-<p><i>[Kona: the LWG agrees that this is an improvement over the
- status quo. Dietmar thought about an alternative using a proxy
- object but now believes that the proposed resolution above is the
- right choice.
-]</i></p>
-
-<hr>
-<a name="435"><h3>435.&nbsp;bug in DR 25</h3></a><p><b>Section:</b>&nbsp;21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Oct 2003</p>
-
-<p>
-It has been pointed out that the proposed resolution in DR 25 may not be
-quite up to snuff: <br>
-http://gcc.gnu.org/ml/libstdc++/2003-09/msg00147.html
-http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#25<br>
-</p>
-
-<p>
-It looks like Petur is right. The complete corrected text is copied below.
-I think we may have have been confused by the reference to 22.2.2.2.2 and
-the subsequent description of `n' which actually talks about the second
-argument to sputn(), not about the number of fill characters to pad with.
-</p>
-
-<p>
-So the question is: was the original text correct? If the intent was to
-follow classic iostreams then it most likely wasn't, since setting width()
-to less than the length of the string doesn't truncate it on output. This
-is also the behavior of most implementations (except for SGI's standard
-iostreams where the operator does truncate).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change the text in 21.3.7.9, p4 from</p>
- <blockquote>
- If bool(k) is true, inserts characters as if by calling
- os.rdbuf()-&gt;sputn(str.data(), n), padding as described in stage 3
- of lib.facet.num.put.virtuals, where n is the larger of os.width()
- and str.size();
- </blockquote>
-<p>to</p>
- <blockquote>
- If bool(k) is true, determines padding as described in
- lib.facet.num.put.virtuals, and then inserts the resulting
- sequence of characters <tt>seq</tt> as if by calling
- <tt>os.rdbuf()-&gt;sputn(seq, n)</tt>, where <tt>n</tt> is the larger of
- <tt>os.width()</tt> and <tt>str.size()</tt>;
- </blockquote>
-
-<p><i>[Kona: it appears that neither the original wording, DR25, nor the
- proposed resolution, is quite what we want. We want to say that
- the string will be output, padded to os.width() if necessary. We
- don't want to duplicate the padding rules in clause 22, because
- they're complicated, but we need to be careful because they weren't
- quite written with quite this case in mind. We need to say what
- the character sequence is, and then defer to clause 22. Post-Kona:
- Benjamin provided wording.]</i></p>
-
-<hr>
-<a name="436"><h3>436.&nbsp;are cv-qualified facet types valid facets?</h3></a><p><b>Section:</b>&nbsp;22.1.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.facet"> [lib.locale.facet]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Oct 2003</p>
-<p>
-Is "const std::ctype&lt;char&gt;" a valid template argument to has_facet, use_facet,
-and the locale template ctor? And if so, does it designate the same Facet as
-the non-const "std::ctype&lt;char&gt;?" What about "volatile std::ctype&lt;char&gt;?"
-Different implementations behave differently: some fail to compile, others
-accept such types but behave inconsistently.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change 22.1.1.1.2, p1 to read:</p>
-
-<p>Template parameters in this clause which are required to be facets
-are those named Facet in declarations. A program that passes a type
-that is not a facet, or a type that refers to volatile-qualified
-facet, as an (explicit or deduced) template parameter to a locale
-function expecting a facet, is ill-formed. A const-qualified facet is
-a valid template argument to any locale function that expects a Facet
-template parameter.</p>
-
-<p><i>[Kona: changed the last sentence from a footnote to normative
-text.]</i></p>
-
-<hr>
-<a name="438"><h3>438.&nbsp;Ambiguity in the "do the right thing" clause</h3></a><p><b>Section:</b>&nbsp;23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;20 Oct 2003</p>
-
-<p>Section 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>, paragraphs 9-11, fixed up the problem
-noticed with statements like:</p>
-<pre>vector&lt;int&gt; v(10, 1);
-</pre>
-
-<p>The intent of the above statement was to construct with:</p>
-<pre>vector(size_type, const value_type&amp;);
-</pre>
-
-<p>but early implementations failed to compile as they bound to:</p>
-<pre>template &lt;class InputIterator&gt;
-vector(InputIterator f, InputIterator l);
-</pre>
-<p>instead.</p>
-
-<p>Paragraphs 9-11 say that if InputIterator is an integral type, then the
-member template constructor will have the same effect as:</p>
-<pre>vector&lt;static_cast&lt;size_type&gt;(f), static_cast&lt;value_type&gt;(l));
-</pre>
-<p>(and similarly for the other member template functions of sequences).</p>
-
-<p>There is also a note that describes one implementation technique:</p>
-<blockquote>
- One way that sequence implementors can satisfy this requirement is to
- specialize the member template for every integral type.
-</blockquote>
-
-<p>This might look something like:</p>
-<blockquote>
-<pre>template &lt;class T&gt;
-struct vector
-{
- typedef unsigned size_type;
-
- explicit vector(size_type) {}
- vector(size_type, const T&amp;) {}
-
- template &lt;class I&gt;
- vector(I, I);
-
- // ...
-};
-
-template &lt;class T&gt;
-template &lt;class I&gt;
-vector&lt;T&gt;::vector(I, I) { ... }
-
-template &lt;&gt;
-template &lt;&gt;
-vector&lt;int&gt;::vector(int, int) { ... }
-
-template &lt;&gt;
-template &lt;&gt;
-vector&lt;int&gt;::vector(unsigned, unsigned) { ... }
-
-// ...
-</pre>
-</blockquote>
-
-<p>Label this solution 'A'.</p>
-
-<p>The standard also says:</p>
-<blockquote>
- Less cumbersome implementation techniques also exist.
-</blockquote>
-<p>
-A popular technique is to not specialize as above, but instead catch
-every call with the member template, detect the type of InputIterator,
-and then redirect to the correct logic. Something like:
-</p>
-<blockquote>
-<pre>template &lt;class T&gt;
-template &lt;class I&gt;
-vector&lt;T&gt;::vector(I f, I l)
-{
- choose_init(f, l, int2type&lt;is_integral&lt;I&gt;::value&gt;());
-}
-
-template &lt;class T&gt;
-template &lt;class I&gt;
-vector&lt;T&gt;::choose_init(I f, I l, int2type&lt;false&gt;)
-{
- // construct with iterators
-}
-
-template &lt;class T&gt;
-template &lt;class I&gt;
-vector&lt;T&gt;::choose_init(I f, I l, int2type&lt;true&gt;)
-{
- size_type sz = static_cast&lt;size_type&gt;(f);
- value_type v = static_cast&lt;value_type&gt;(l);
- // construct with sz,v
-}
-</pre>
-</blockquote>
-
-<p>Label this solution 'B'.</p>
-
-<p>Both of these solutions solve the case the standard specifically
-mentions:</p>
-<pre>vector&lt;int&gt; v(10, 1); // ok, vector size 10, initialized to 1
-</pre>
-
-<p>
-However, (and here is the problem), the two solutions have different
-behavior in some cases where the value_type of the sequence is not an
-integral type. For example consider:
-</p>
-<blockquote><pre> pair&lt;char, char&gt; p('a', 'b');
- vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt; d('a', 'b');
-</pre></blockquote>
-<p>
-The second line of this snippet is likely an error. Solution A catches
-the error and refuses to compile. The reason is that there is no
-specialization of the member template constructor that looks like:
-</p>
-<pre>template &lt;&gt;
-template &lt;&gt;
-vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt;::vector(char, char) { ... }
-</pre>
-
-<p>
-So the expression binds to the unspecialized member template
-constructor, and then fails (compile time) because char is not an
-InputIterator.
-</p>
-
-<p>
-Solution B compiles the above example though. 'a' is casted to an
-unsigned integral type and used to size the outer vector. 'b' is
-static casted to the inner vector using it's explicit constructor:
-</p>
-
-<pre>explicit vector(size_type n);
-</pre>
-
-<p>
-and so you end up with a static_cast&lt;size_type&gt;('a') by
-static_cast&lt;size_type&gt;('b') matrix.
-</p>
-
-<p>
-It is certainly possible that this is what the coder intended. But the
-explicit qualifier on the inner vector has been thwarted at any rate.
-</p>
-
-<p>
-The standard is not clear whether the expression:
-</p>
-
-<pre> vector&lt;vector&lt;pair&lt;char, char&gt; &gt; &gt; d('a', 'b');
-</pre>
-
-<p>
-(and similar expressions) are:
-</p>
-
-<ol>
-<li> undefined behavior.</li>
-<li> illegal and must be rejected.</li>
-<li> legal and must be accepted.</li>
-</ol>
-
-<p>My preference is listed in the order presented.</p>
-
-<p>There are still other techniques for implementing the requirements of
-paragraphs 9-11, namely the "restricted template technique" (e.g.
-enable_if). This technique is the most compact and easy way of coding
-the requirements, and has the behavior of #2 (rejects the above
-expression).
-</p>
-
-<p>
-Choosing 1 would allow all implementation techniques I'm aware of.
-Choosing 2 would allow only solution 'A' and the enable_if technique.
-Choosing 3 would allow only solution 'B'.
-</p>
-
-<p>
-Possible wording for a future standard if we wanted to actively reject
-the expression above would be to change "static_cast" in paragraphs
-9-11 to "implicit_cast" where that is defined by:
-</p>
-
-<blockquote>
-<pre>template &lt;class T, class U&gt;
-inline
-T implicit_cast(const U&amp; u)
-{
- return u;
-}
-</pre>
-</blockquote>
-
-<p><b>Proposed resolution:</b></p>
-
-Replace 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> paragraphs 9 - 11 with:
-
-<p>For every sequence defined in this clause and in clause lib.strings:</p>
-
-<ul>
- <li>
- <p>If the constructor</p>
- <pre> template &lt;class InputIterator&gt;
- X(InputIterator f, InputIterator l,
- const allocator_type&amp; a = allocator_type())
- </pre>
- <p>is called with a type InputIterator that does not qualify as
- an input iterator, then the constructor will behave as if the
- overloaded constructor:</p>
- <pre> X(size_type, const value_type&amp; = value_type(),
- const allocator_type&amp; = allocator_type())
- </pre>
- <p>were called instead, with the arguments static_cast&lt;size_type&gt;(f), l and a, respectively.</p>
- </li>
-
- <li>
- <p>If the member functions of the forms:</p>
- <pre> template &lt;class InputIterator&gt; // such as insert()
- rt fx1(iterator p, InputIterator f, InputIterator l);
-
- template &lt;class InputIterator&gt; // such as append(), assign()
- rt fx2(InputIterator f, InputIterator l);
-
- template &lt;class InputIterator&gt; // such as replace()
- rt fx3(iterator i1, iterator i2, InputIterator f, InputIterator l);
- </pre>
- <p>are called with a type InputIterator that does not qualify as
- an input iterator, then these functions will behave as if the
- overloaded member functions:</p>
- <pre> rt fx1(iterator, size_type, const value_type&amp;);
-
- rt fx2(size_type, const value_type&amp;);
-
- rt fx3(iterator, iterator, size_type, const value_type&amp;);
- </pre>
- <p>were called instead, with the same arguments.</p>
- </li>
-</ul>
-
-<p>In the previous paragraph the alternative binding will fail if f
-is not implicitly convertible to X::size_type or if l is not implicitly
-convertible to X::value_type.</p>
-
-<p>
-The extent to which an implementation determines that a type cannot be
-an input iterator is unspecified, except that as a minimum integral
-types shall not qualify as input iterators.
-</p>
-
-
-
-<p><i>[
-Kona: agreed that the current standard requires <tt>v('a', 'b')</tt>
-to be accepted, and also agreed that this is surprising behavior. The
-LWG considered several options, including something like
-implicit_cast, which doesn't appear to be quite what we want. We
-considered Howards three options: allow acceptance or rejection,
-require rejection as a compile time error, and require acceptance. By
-straw poll (1-6-1), we chose to require a compile time error.
-Post-Kona: Howard provided wording.
-]</i></p>
-
-<p><i>[
-Sydney: The LWG agreed with this general direction, but there was some
-discomfort with the wording in the original proposed resolution.
-Howard submitted new wording, and we will review this again in
-Redmond.
-]</i></p>
-
-<p><i>[Redmond: one very small change in wording: the first argument
- is cast to size_t. This fixes the problem of something like
- <tt>vector&lt;vector&lt;int&gt; &gt;(5, 5)</tt>, where int is not
- implicitly convertible to the value type.]</i></p>
-
-<p><b>Rationale:</b></p>
-<p>The proposed resolution fixes:</p>
-
-<pre> vector&lt;int&gt; v(10, 1);
-</pre>
-
-<p>
-since as integral types 10 and 1 must be disqualified as input
-iterators and therefore the (size,value) constructor is called (as
-if).</p>
-
-<p>The proposed resolution breaks:</p>
-
-<pre> vector&lt;vector&lt;T&gt; &gt; v(10, 1);
-</pre>
-
-<p>
-because the integral type 1 is not *implicitly* convertible to
-vector&lt;T&gt;. The wording above requires a diagnostic.</p>
-
-<p>
-The proposed resolution leaves the behavior of the following code
-unspecified.
-</p>
-
-<pre> struct A
- {
- operator int () const {return 10;}
- };
-
- struct B
- {
- B(A) {}
- };
-
- vector&lt;B&gt; v(A(), A());
-</pre>
-
-<p>
-The implementation may or may not detect that A is not an input
-iterator and employee the (size,value) constructor. Note though that
-in the above example if the B(A) constructor is qualified explicit,
-then the implementation must reject the constructor as A is no longer
-implicitly convertible to B.
-</p>
-<hr>
-<a name="441"><h3>441.&nbsp;Is fpos::state const?</h3></a><p><b>Section:</b>&nbsp;27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Vincent Leloup&nbsp; <b>Date:</b>&nbsp;17 Nov 2003</p>
-<p>
-In section 27.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.members"> [lib.fpos.members]</a> fpos&lt;stateT&gt;::state() is declared
-non const, but in section 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> it is declared const.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In section 27.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.members"> [lib.fpos.members]</a>, change the declaration of
-<tt>fpos&lt;stateT&gt;::state()</tt> to const.
-</p>
-<hr>
-<a name="442"><h3>442.&nbsp;sentry::operator bool() inconsistent signature</h3></a><p><b>Section:</b>&nbsp;27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Vincent Leloup&nbsp; <b>Date:</b>&nbsp;18 Nov 2003</p>
-<p>
-In section 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> paragraph 4, in description part
-basic_ostream&lt;charT, traits&gt;::sentry::operator bool() is declared
-as non const, but in section 27.6.2.3, in synopsis it is declared
-const.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-In section 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> paragraph 4, change the declaration
-of <tt>sentry::operator bool()</tt> to const.
-</p>
-<hr>
-<a name="443"><h3>443.&nbsp;filebuf::close() inconsistent use of EOF</h3></a><p><b>Section:</b>&nbsp;27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Vincent Leloup&nbsp; <b>Date:</b>&nbsp;20 Nov 2003</p>
-<p>
-In section 27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a> par6, in effects description of
-basic_filebuf&lt;charT, traits&gt;::close(), overflow(EOF) is used twice;
-should be overflow(traits::eof()).
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change overflow(EOF) to overflow(traits::eof()).
-</p>
-<hr>
-<a name="444"><h3>444.&nbsp;Bad use of casts in fstream</h3></a><p><b>Section:</b>&nbsp;27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Vincent Leloup&nbsp; <b>Date:</b>&nbsp;20 Nov 2003</p>
-<p>
-27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> p1, 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a> p1, 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a> p1 seems have same problem as exposed in LWG issue
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a>.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><i>[Sydney: Genuine defect. 27.8.1.13 needs a cast to cast away
- constness. The other two places are stylistic: we could change the
- C-style casts to const_cast. Post-Sydney: Howard provided wording.
-]</i></p>
-
-<p>Change 27.8.1.7/1 from:</p>
-<blockquote>
- Returns: (basic_filebuf&lt;charT,traits&gt;*)&amp;sb.
-</blockquote>
-
-<p>to:</p>
-<blockquote>
- Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
-</blockquote>
-
-<p>Change 27.8.1.10/1 from:</p>
-<blockquote>
- Returns: (basic_filebuf&lt;charT,traits&gt;*)&amp;sb.
-</blockquote>
-
-<p>to:</p>
-<blockquote>
- Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
-</blockquote>
-
-<p>Change 27.8.1.13/1 from:</p>
-<blockquote>
- Returns: &amp;sb.
-</blockquote>
-
-<p>to:</p>
-<blockquote>
- Returns: const_cast&lt;basic_filebuf&lt;charT,traits&gt;*&gt;(&amp;sb).
-</blockquote>
-
-
-
-<hr>
-<a name="445"><h3>445.&nbsp;iterator_traits::reference unspecified for some iterator categories</h3></a><p><b>Section:</b>&nbsp;24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;9 Dec 2003</p>
-<p>
-The standard places no restrictions at all on the reference type
-of input, output, or forward iterators (for forward iterators it
-only specifies that *x must be value_type&amp; and doesn't mention
-the reference type). Bidirectional iterators' reference type is
-restricted only by implication, since the base iterator's
-reference type is used as the return type of reverse_iterator's
-operator*, which must be T&amp; in order to be a conforming forward
-iterator.
-</p>
-
-<p>
-Here's what I think we ought to be able to expect from an input
-or forward iterator's reference type R, where a is an iterator
-and V is its value_type
-</p>
-
-<ul>
- <li>
- *a is convertible to R
- </li>
-
- <li>
- R is convertible to V
- </li>
-
- <li>
- static_cast&lt;V&gt;(static_cast&lt;R&gt;(*a)) is equivalent to
- static_cast&lt;V&gt;(*a)
- </li>
-</ul>
-
-<p>A mutable forward iterator ought to satisfy, for x of type V:</p>
- <li>
- { R r = *a; r = x; } is equivalent to *a = x;
- </li>
-
-<p>
-I think these requirements capture existing container iterators
-(including vector&lt;bool&gt;'s), but render istream_iterator invalid;
-its reference type would have to be changed to a constant
-reference.
-</p>
-
-
-<p>
-(Jeremy Siek) During the discussion in Sydney, it was felt that a
-simpler long term solution for this was needed. The solution proposed
-was to require <tt>reference</tt> to be the same type as <tt>*a</tt>
-and <tt>pointer</tt> to be the same type as <tt>a-&gt;</tt>. Most
-iterators in the Standard Library already meet this requirement. Some
-iterators are output iterators, and do not need to meet the
-requirement, and others are only specified through the general
-iterator requirements (which will change with this resolution). The
-sole case where there is an explicit definition of the reference type
-that will need to change is <tt>istreambuf_iterator</tt> which returns
-<tt>charT</tt> from <tt>operator*</tt> but has a reference type of
-<tt>charT&amp;</tt>. We propose changing the reference type of
-<tt>istreambuf_iterator</tt> to <tt>charT</tt>.
-</p>
-
-<p>The other option for resolving the issue with <tt>pointer</tt>,
- mentioned in the note below, is to remove <tt>pointer</tt>
- altogether. I prefer placing requirements on <tt>pointer</tt> to
- removing it for two reasons. First, <tt>pointer</tt> will become
- useful for implementing iterator adaptors and in particular,
- <tt>reverse_iterator</tt> will become more well defined. Second,
- removing <tt>pointer</tt> is a rather drastic and publicly-visible
- action to take.</p>
-
-<p>The proposed resolution technically enlarges the requirements for
-iterators, which means there are existing iterators (such as
-<tt>istreambuf_iterator</tt>, and potentially some programmer-defined
-iterators) that will no longer meet the requirements. Will this break
-existing code? The scenario in which it would is if an algorithm
-implementation (say in the Standard Library) is changed to rely on
-<tt>iterator_traits::reference</tt>, and then is used with one of the
-iterators that do not have an appropriately defined
-<tt>iterator_traits::reference</tt>.
-</p>
-
-
-<p>The proposed resolution makes one other subtle change. Previously,
-it was required that output iterators have a <tt>difference_type</tt>
-and <tt>value_type</tt> of <tt>void</tt>, which means that a forward
-iterator could not be an output iterator. This is clearly a mistake,
-so I've changed the wording to say that those types may be
-<tt>void</tt>.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>In 24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a>, after:</p>
-
-<blockquote>
-be defined as the iterator's difference type, value type and iterator
-category, respectively.
-</blockquote>
-
-<p>add</p>
-
-<blockquote>
-In addition, the types
-<pre>iterator_traits&lt;Iterator&gt;::reference
-iterator_traits&lt;Iterator&gt;::pointer
-</pre>
-must be defined as the iterator's reference and pointer types, that
-is, the same type as the type of <tt>*a</tt> and <tt>a-&gt;</tt>,
-respectively.
-</blockquote>
-
-<p>In 24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a>, change:</p>
-
-<blockquote>
-In the case of an output iterator, the types
-<pre>iterator_traits&lt;Iterator&gt;::difference_type
-iterator_traits&lt;Iterator&gt;::value_type
-</pre>
-are both defined as <tt>void</tt>.
-</blockquote>
-
-<p>to:</p>
-<blockquote>
-In the case of an output iterator, the types
-<pre>iterator_traits&lt;Iterator&gt;::difference_type
-iterator_traits&lt;Iterator&gt;::value_type
-iterator_traits&lt;Iterator&gt;::reference
-iterator_traits&lt;Iterator&gt;::pointer
-</pre>
-may be defined as <tt>void</tt>.
-</blockquote>
-
-<p>In 24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a>, change:</p>
-<blockquote>
-<pre>typename traits::off_type, charT*, charT&amp;&gt;
-</pre>
-</blockquote>
-<p>to:</p>
-<blockquote>
-<pre>typename traits::off_type, charT*, charT&gt;
-</pre>
-</blockquote>
-
-<p><i>[
-Redmond: there was concern in Sydney that this might not be the only place
-where things were underspecified and needed to be changed. Jeremy
-reviewed iterators in the standard and confirmed that nothing else
-needed to be changed.
-]</i></p>
-
-<hr>
-<a name="448"><h3>448.&nbsp;Random Access Iterators over abstract classes</h3></a><p><b>Section:</b>&nbsp;24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;7 Jan 2004</p>
-<p>
-Table 76, the random access iterator requirement table, says that the
-return type of a[n] must be "convertible to T". When an iterator's
-value_type T is an abstract class, nothing is convertible to T.
-Surely this isn't an intended restriction?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change the return type to "convertible to T const&amp;".
-</p>
-<hr>
-<a name="449"><h3>449.&nbsp;Library Issue 306 Goes Too Far</h3></a><p><b>Section:</b>&nbsp;18.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.types"> [lib.support.types]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;15 Jan 2004</p>
-<p>Original text:</p>
-<blockquote>
-The macro offsetof accepts a restricted set of type arguments in this
-International Standard. type shall be a POD structure or a POD union
-(clause 9). The result of applying the offsetof macro to a field that
-is a static data member or a function member is undefined."
-</blockquote>
-
-<p>Revised text:</p>
-<blockquote>
-"If type is not a POD structure or a POD union the results are undefined."
-</blockquote>
-
-<p>
-Looks to me like the revised text should have replaced only the second
-sentence. It doesn't make sense standing alone.
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change 18.1, paragraph 5, to:</p>
-
-<blockquote>
-The macro offsetof accepts a restricted set of type arguments in this
-International Standard. If type is not a POD structure or a POD union
-the results are undefined. The result of applying the offsetof macro
-to a field that is a static data member or a function member is
-undefined."
-</blockquote>
-<hr>
-<a name="453"></a><h3><a name="453">453.&nbsp;basic_stringbuf::seekoff need not always fail for an empty stream</a></h3><p><b>Section:</b>&nbsp;27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<pre> pos_type basic_stringbuf::seekoff(off_type, ios_base::seekdir,
- ios_base::openmode);
-</pre>
-<p>
-is obliged to fail if nothing has been inserted into the stream. This
-is unnecessary and undesirable. It should be permissible to seek to
-an effective offset of zero.</p>
-
-<p><i>[
- Sydney: Agreed that this is an annoying problem: seeking to zero should be
- legal. Bill will provide wording.
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Change the sentence from:</p>
-<blockquote>
-For a sequence to be positioned, if its next pointer (either
-gptr() or pptr()) is a null pointer, the positioning operation
-fails.
-</blockquote>
-
-<p>to:</p>
-
-<blockquote>
-For a sequence to be positioned, if its next pointer (either
-gptr() or pptr()) is a null pointer and the new offset newoff
-is nonzero, the positioning operation fails.
-</blockquote>
-<hr>
-<a name="455"><h3>455.&nbsp;cerr::tie() and wcerr::tie() are overspecified</h3></a><p><b>Section:</b>&nbsp;27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<p>
-Both cerr::tie() and wcerr::tie() are obliged to be null at program
-startup. This is overspecification and overkill. It is both traditional
-and useful to tie cerr to cout, to ensure that standard output is drained
-whenever an error message is written. This behavior should at least be
-permitted if not required. Same for wcerr::tie().
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Add to the description of cerr:</p>
-<blockquote>
-After the object cerr is initialized, cerr.tie() returns &amp;cout.
-Its state is otherwise the same as required for basic_ios&lt;char&gt;::init
-(lib.basic.ios.cons).
-</blockquote>
-
-<p>Add to the description of wcerr:</p>
-
-<blockquote>
-After the object wcerr is initialized, wcerr.tie() returns &amp;wcout.
-Its state is otherwise the same as required for basic_ios&lt;wchar_t&gt;::init
-(lib.basic.ios.cons).
-</blockquote>
-
-<p><i>[Sydney: straw poll (3-1): we should <i>require</i>, not just
- permit, cout and cerr to be tied on startup. Pre-Redmond: Bill will
- provide wording.]</i></p>
-<hr>
-<a name="457"><h3>457.&nbsp;bitset constructor: incorrect number of initialized bits</h3></a><p><b>Section:</b>&nbsp;23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Dag Henriksson&nbsp; <b>Date:</b>&nbsp;30 Jan 2004</p>
-<p>
-The constructor from unsigned long says it initializes "the first M
-bit positions to the corresponding bit values in val. M is the smaller
-of N and the value CHAR_BIT * sizeof(unsigned long)."
-</p>
-
-<p>
-Object-representation vs. value-representation strikes again. CHAR_BIT *
-sizeof (unsigned long) does not give us the number of bits an unsigned long
-uses to hold the value. Thus, the first M bit position above is not
-guaranteed to have any corresponding bit values in val.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> paragraph 2, change "M is the smaller of
- N and the value CHAR_BIT * sizeof (unsigned long). (249)" to
- "<tt>M</tt> is the smaller of <tt>N</tt> and the number of bits in
- the value representation (section 3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.types"> [basic.types]</a>) of <tt>unsigned
- long</tt>."
-</p>
-<hr>
-<a name="460"><h3>460.&nbsp;Default modes missing from basic_fstream member specifications</h3></a><p><b>Section:</b>&nbsp;27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Ben Hutchings&nbsp; <b>Date:</b>&nbsp;1 Apr 2004</p>
-<p>
-The second parameters of the non-default constructor and of the open
-member function for basic_fstream, named "mode", are optional
-according to the class declaration in 27.8.1.11 [lib.fstream]. The
-specifications of these members in 27.8.1.12 [lib.fstream.cons] and
-27.8.1.13 lib.fstream.members] disagree with this, though the
-constructor declaration has the "explicit" function-specifier implying
-that it is intended to be callable with one argument.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>In 27.8.1.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.cons"> [lib.fstream.cons]</a>, change</p>
-<pre> explicit basic_fstream(const char* s, ios_base::openmode mode);
-</pre>
-<p>to</p>
-<pre> explicit basic_fstream(const char* s,
- ios_base::openmode mode = ios_base::in|ios_base::out);
-</pre>
-<p>In 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a>, change</p>
-<pre> void open(const char*s, ios_base::openmode mode);
-</pre>
-<p>to</p>
- void open(const char*s,
- ios_base::openmode mode = ios_base::in|ios_base::out);
-<hr>
-<a name="461"><h3>461.&nbsp;time_get hard or impossible to implement</h3></a><p><b>Section:</b>&nbsp;22.2.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get.virtuals"> [lib.locale.time.get.virtuals]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Bill Plauger&nbsp; <b>Date:</b>&nbsp;23 Mar 2004</p>
-<p>
-Template time_get currently contains difficult, if not impossible,
-requirements for do_date_order, do_get_time, and do_get_date. All require
-the implementation to scan a field generated by the %x or %X conversion
-specifier in strftime. Yes, do_date_order can always return no_order, but
-that doesn't help the other functions. The problem is that %x can be
-nearly anything, and it can vary widely with locales. It's horribly
-onerous to have to parse "third sunday after Michaelmas in the year of
-our Lord two thousand and three," but that's what we currently ask of
-do_get_date. More practically, it leads some people to think that if
-%x produces 10.2.04, we should know to look for dots as separators. Still
-not easy.
-</p>
-
-<p>
-Note that this is the <i>opposite</i> effect from the intent stated in the
-footnote earlier in this subclause:
-</p>
-
-<blockquote>
-"In other words, user confirmation is required for reliable parsing of
-user-entered dates and times, but machine-generated formats can be
-parsed reliably. This allows parsers to be aggressive about interpreting
-user variations on standard formats."
-</blockquote>
-
-<p>
-We should give both implementers and users an easier and more reliable
-alternative: provide a (short) list of alternative delimiters and say
-what the default date order is for no_order. For backward compatibility,
-and maximum latitude, we can permit an implementation to parse whatever
-%x or %X generates, but we shouldn't require it.
-</p>
-<p><b>Proposed resolution:</b></p>
-
-<p><b>In the description:</b></p>
-<pre>iter_type do_get_time(iter_type s, iter_type end, ios_base&amp; str,
- ios_base::iostate&amp; err, tm* t) const;
-</pre>
-
-<p>
-2 Effects: Reads characters starting at suntil it has extracted those
-struct tm members, and remaining format characters, used by
-time_put&lt;&gt;::put to produce the format specified by 'X', or until it
-encounters an error or end of sequence.
-</p>
-
-<p><b>change:</b> 'X'</p>
-
-<p><b>to:</b> "%H:%M:%S"</p>
-
-
-<p>Change</p>
-<pre>iter_type do_get_date(iter_type s, iter_type end, ios_base&amp; str,
- ios_base::iostate&amp; err, tm* t) const;
-
-4 Effects: Reads characters starting at s until it has extracted those
-struct tm members, and remaining format characters, used by
-time_put&lt;&gt;::put to produce the format specified by 'x', or until it
-encounters an error.
-</pre>
-
-<p>to</p>
-iter_type do_get_date(iter_type s, iter_type end, ios_base&amp; str,
- ios_base::iostate&amp; err, tm* t) const;
-
-4 Effects: Reads characters starting at s until it has extracted those
-struct tm members, and remaining format characters, used by
-time_put&lt;&gt;::put to produce one of the following formats, or until it
-encounters an error. The format depends on the value returned by
-date_order() as follows:
-
- date_order() format
-
- no_order "%m/%d/%y"
- dmy "%d/%m/%y"
- mdy "%m/%d/%y"
- ymd "%y/%m/%d"
- ydm "%y/%d/%m"
-
-An implementation may also accept additional implementation-defined formats.
-<pre></pre>
-
-<p><i>[Redmond: agreed that this is a real problem. The solution is
- probably to match C99's parsing rules. Bill provided wording.
-]</i></p>
-
-<hr>
-<a name="464"><h3>464.&nbsp;Suggestion for new member functions in standard containers</h3></a><p><b>Section:</b>&nbsp;23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Thorsten Ottosen&nbsp; <b>Date:</b>&nbsp;12 May 2004</p>
-
-<p>To add slightly more convenience to vector&lt;T&gt; and map&lt;Key,T&gt; we should consider to add</p>
-<ol>
-<li> add vector&lt;T&gt;::data() member (const and non-const version)
-semantics: if( empty() ) return 0; else return buffer_;</li>
-<li> add map&lt;Key,T&gt;::at( const Key&amp; k ) member (const and non-const version)
-<i>semantics</i>: iterator i = find( k ); if( i != end() ) return *i; else throw range_error();</li>
-</ol>
-
-<p>Rationale:</p>
-
-<ul>
-<li>To obtain a pointer to the vector's buffer, one must use either
-operator[]() (which can give undefined behavior for empty vectors) or
-at() (which will then throw if the vector is empty). </li>
-<li>tr1::array&lt;T,sz&gt; already has a data() member</li>
-<li>e cannot use operator[]() when T is not DefaultDonstructible</li>
-<li>Neither when the map is const.</li>
-<li>when we want to make sure we don't add an element accidently</li>
-<li>when it should be considered an error if a key is not in the map</li>
-</ul>
-
-<p><b>Proposed resolution:</b></p>
-<p>In 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, add the following to the <tt>vector</tt>
- synopsis after "element access" and before "modifiers":</p>
-<pre> // <i>[lib.vector.data] data access</i>
- pointer data();
- const_pointer data() const;
-</pre>
-
-<p>Add a new subsection of 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>:</p>
-<blockquote>
-<p>23.2.4.x <tt>vector</tt> data access</p>
-<pre> pointer data();
- const_pointer data() const;
-</pre>
-<p><b>Returns:</b> A pointer such that [data(), data() + size()) is a valid
- range. For a non-empty vector, data() == &amp;front().</p>
-<p><b>Complexity:</b> Constant time.</p>
-<p><b>Throws:</b> Nothing.</p>
-</blockquote>
-
-<p>In 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, add the following to the <tt>map</tt>
-synopsis immediately after the line for operator[]:</p>
-<pre> T&amp; at(const key_type&amp; x);
- const T&amp; at(const key_type&amp; x) const;
-</pre>
-
-<p>Add the following to 23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a>:</p>
-<blockquote>
-<pre> T&amp; at(const key_type&amp; x);
- const T&amp; at(const key_type&amp; x) const;
-</pre>
-
-<p><b>Returns:</b> A reference to the element whose key is equivalent
- to x, if such an element is present in the map.</p>
-<p><b>Throws:</b> <tt>out_of_range</tt> if no such element is present.</p>
-
-</blockquote>
-
-<p><b>Rationale:</b></p>
-<p>Neither of these additions provides any new functionality but the
- LWG agreed that they are convenient, especially for novices. The
- exception type chosen for <tt>at</tt>, <tt>std::out_of_range</tt>,
- was chosen to match <tt>vector::at</tt>.</p>
-<hr>
-<a name="465"><h3>465.&nbsp;Contents of &lt;ciso646&gt;</h3></a><p><b>Section:</b>&nbsp;17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Steve Clamage&nbsp; <b>Date:</b>&nbsp;3 Jun 2004</p>
-<p>C header &lt;iso646.h&gt; defines macros for some operators, such as
-not_eq for !=.</p>
-
-<p>Section 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> "Headers" says that except as noted in
-clauses 18 through 27, the &lt;cname&gt; C++ header contents are the same
-as the C header &lt;name.h&gt;. In particular, table 12 lists
-&lt;ciso646&gt; as a C++ header.</p>
-
-<p>I don't find any other mention of &lt;ciso646&gt;, or any mention of
-&lt;iso646.h&gt;, in clauses 17 thorough 27. That implies that the
-contents of &lt;ciso646&gt; are the same as C header &lt;iso646.h&gt;.</p>
-
-<p>Annex C (informative, not normative) in [diff.header.iso646.h] C.2.2.2
-"Header &lt;iso646.h&gt;" says that the alternative tokens are not
-defined as macros in &lt;ciso646&gt;, but does not mention the contents
-of &lt;iso646.h&gt;.</p>
-
-<p>I don't find any normative text to support C.2.2.2.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Add to section 17.4.1.2 Headers [lib.headers] a new paragraph after
- paragraph 6 (the one about functions must be functions):</p>
-
-<blockquote>
-<p>Identifiers that are keywords or operators in C++ shall not be defined
-as macros in C++ standard library headers.
-[Footnote:In particular, including the standard header &lt;iso646.h&gt;
-or &lt;ciso646&gt; has no effect. </p>
-</blockquote>
-
-<p><i>[post-Redmond: Steve provided wording.]</i></p>
-
-<hr>
-<a name="467"><h3>467.&nbsp;char_traits::lt(), compare(), and memcmp()</h3></a><p><b>Section:</b>&nbsp;21.1.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.char"> [lib.char.traits.specializations.char]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jun 2004</p>
-
-<p>
-Table 37 describes the requirements on Traits::compare() in terms of
-those on Traits::lt(). 21.1.3.1, p6 requires char_traits&lt;char&gt;::lt()
-to yield the same result as operator&lt;(char, char).
-</p>
-
-<p>
-Most, if not all, implementations of char_traits&lt;char&gt;::compare()
-call memcmp() for efficiency. However, the C standard requires both
-memcmp() and strcmp() to interpret characters under comparison as
-unsigned, regardless of the signedness of char. As a result, all
-these char_traits implementations fail to meet the requirement
-imposed by Table 37 on compare() when char is signed.
-</p>
-
-
-<p>Read email thread starting with c++std-lib-13499 for more. </p>
-<p><b>Proposed resolution:</b></p>
-
-
-<p>Change 21.1.3.1, p6 from</p>
-<blockquote>
- The two-argument members assign, eq, and lt are defined identically
- to the built-in operators =, ==, and &lt; respectively.
-</blockquote>
-<p>to</p>
-<blockquote>
- The two-argument member assign is defined identically to
- the built-in operator =. The two
- argument members eq and lt are defined identically to
- the built-in operators == and &lt; for type unsigned char.
-</blockquote>
-
-<p><i>[Redmond: The LWG agreed with this general direction, but we
- also need to change <tt>eq</tt> to be consistent with this change.
- Post-Redmond: Martin provided wording.]</i></p>
-
-<hr>
-<a name="468"><h3>468.&nbsp;unexpected consequences of ios_base::operator void*()</h3></a><p><b>Section:</b>&nbsp;27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jun 2004</p>
-
-<p>The program below is required to compile but when run it typically
-produces unexpected results due to the user-defined conversion from
-std::cout or any object derived from basic_ios to void*.
-</p>
-
-<pre> #include &lt;cassert&gt;
- #include &lt;iostream&gt;
-
- int main ()
- {
- assert (std::cin.tie () == std::cout);
- // calls std::cout.ios::operator void*()
- }
-</pre>
-
-<p><b>Proposed resolution:</b></p>
-
-<p>
-Replace std::basic_ios&lt;charT, traits&gt;::operator void*() with another
-conversion operator to some unspecified type that is guaranteed not
-to be convertible to any other type except for bool (a pointer-to-member
-might be one such suitable type). In addition, make it clear that the
-pointer type need not be a pointer to a complete type and when non-null,
-the value need not be valid.
-</p>
-
-<p>Specifically, change in [lib.ios] the signature of</p>
-<pre> operator void*() const;
-</pre>
-<p>to</p>
-<pre> operator unspecified-bool-type() const;
-</pre>
-<p>and change [lib.iostate.flags], p1 from</p>
-<pre> operator void*() const;
-</pre>
-<p>to</p>
-<pre>operator unspecified-bool-type() const;
-
- -1- Returns: if fail() then a value that will evaluate false in a
- boolean context; otherwise a value that will evaluate true in a
- boolean context. The value type returned shall not be
- convertible to int.
-
- -2- [Note: This conversion can be used in contexts where a bool
- is expected (e.g., an if condition); however, implicit
- conversions (e.g., to int) that can occur with bool are not
- allowed, eliminating some sources of user error. One possible
- implementation choice for this type is pointer-to-member. - end
- note]
-</pre>
-
-<p><i>[Redmond: 5-4 straw poll in favor of doing this.]</i></p>
-<p><i>[Lillehammer: Doug provided revised wording for
- "unspecified-bool-type".]</i></p>
-
-<hr>
-<a name="469"><h3>469.&nbsp;vector&lt;bool&gt; ill-formed relational operators</h3></a><p><b>Section:</b>&nbsp;23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;28 Jun 2004</p>
-
-<p>
-The overloads of relational operators for vector&lt;bool&gt; specified
-in [lib.vector.bool] are redundant (they are semantically identical
-to those provided for the vector primary template) and may even be
-diagnosed as ill-formed (refer to Daveed Vandevoorde's explanation
-in c++std-lib-13647).
-</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-Remove all overloads of overloads of relational operators for
-vector&lt;bool&gt; from [lib.vector.bool].
-</p>
-<hr>
-<a name="474"><h3>474.&nbsp;confusing Footnote 297</h3></a><p><b>Section:</b>&nbsp;27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;1 Jul 2004</p>
-
-<p>
-I think Footnote 297 is confused. The paragraph it applies to seems
-quite clear in that widen() is only called if the object is not a char
-stream (i.e., not basic_ostream&lt;char&gt;), so it's irrelevant what the
-value of widen(c) is otherwise.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-I propose to strike the Footnote.
-</p>
-<hr>
-<a name="475"><h3>475.&nbsp;May the function object passed to for_each modify the elements of the iterated sequence?</h3></a><p><b>Section:</b>&nbsp;25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Stephan T. Lavavej, Jaakko Jarvi&nbsp; <b>Date:</b>&nbsp;9 Jul 2004</p>
-<p>
-It is not clear whether the function object passed to for_each is allowed to
-modify the elements of the sequence being iterated over.
-</p>
-
-<p>
-for_each is classified without explanation in [lib.alg.nonmodifying], "25.1
-Non-modifying sequence operations". 'Non-modifying sequence operation' is
-never defined.
-</p>
-
-<p>
-25(5) says: "If an algorithm's Effects section says that a value pointed to
-by any iterator passed as an argument is modified, then that algorithm has
-an additional type requirement: The type of that argument shall satisfy the
-requirements of a mutable iterator (24.1)."
-</p>
-
-<p>for_each's Effects section does not mention whether arguments can be
-modified:</p>
-
-<blockquote>
- "Effects: Applies f to the result of dereferencing every iterator in the
- range [first, last), starting from first and proceeding to last - 1."
-</blockquote>
-
-<p>
-Every other algorithm in [lib.alg.nonmodifying] is "really" non-modifying in
-the sense that neither the algorithms themselves nor the function objects
-passed to the algorithms may modify the sequences or elements in any way.
-This DR affects only for_each.
-</p>
-
-<p>
-We suspect that for_each's classification in "non-modifying sequence
-operations" means that the algorithm itself does not inherently modify the
-sequence or the elements in the sequence, but that the function object
-passed to it may modify the elements it operates on.
-</p>
-
-<p>
-The original STL document by Stepanov and Lee explicitly prohibited the
-function object from modifying its argument.
-The "obvious" implementation of for_each found in several standard library
-implementations, however, does not impose this restriction.
-As a result, we suspect that the use of for_each with function objects that modify
-their arguments is wide-spread.
-If the restriction was reinstated, all such code would become non-conforming.
-Further, none of the other algorithms in the Standard
-could serve the purpose of for_each (transform does not guarantee the order in
-which its function object is called).
-</p>
-
-<p>
-We suggest that the standard be clarified to explicitly allow the function object
-passed to for_each modify its argument.</p>
-
-<p><b>Proposed resolution:</b></p>
-<p>Add a nonnormative note to the Effects in 25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a>: If
-the type of 'first' satisfies the requirements of a mutable iterator,
-'f' may apply nonconstant functions through the dereferenced iterators
-passed to it.
-</p>
-
-<p><b>Rationale:</b></p>
-<p>The LWG believes that nothing in the standard prohibits function
- objects that modify the sequence elements. The problem is that
- for_each is in a secion entitled "nonmutating algorithms", and the
- title may be confusing. A nonnormative note should clarify that.</p>
-<hr>
-<a name="478"><h3>478.&nbsp;Should forward iterator requirements table have a line for r-&gt;m?</h3></a><p><b>Section:</b>&nbsp;24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Dave Abrahams&nbsp; <b>Date:</b>&nbsp;11 Jul 2004</p>
-<p>
-The Forward Iterator requirements table contains the following:
-</p>
-<pre> expression return type operational precondition
- semantics
- ========== ================== =========== ==========================
- a-&gt;m U&amp; if X is mutable, (*a).m pre: (*a).m is well-defined.
- otherwise const U&amp;
-
- r-&gt;m U&amp; (*r).m pre: (*r).m is well-defined.
-</pre>
-
-<p>The second line may be unnecessary. Paragraph 11 of
- [lib.iterator.requirements] says:
-</p>
-
-<blockquote>
- In the following sections, a and b denote values of type const X, n
- denotes a value of the difference type Distance, u, tmp, and m
- denote identifiers, r denotes a value of X&amp;, t denotes a value of
- value type T, o denotes a value of some type that is writable to
- the output iterator.
-</blockquote>
-
-<p>
-Because operators can be overloaded on an iterator's const-ness, the
-current requirements allow iterators to make many of the operations
-specified using the identifiers a and b invalid for non-const
-iterators.</p>
-
-<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#477">477</a></p>
-<p><b>Proposed resolution:</b></p>
-
-<p>Remove the "r-&gt;m" line from the Forward Iterator requirements
-table. Change</p>
-<blockquote>
- "const X"
-</blockquote>
-
-<p> to </p>
-
-<blockquote>
- "X or const X"
-</blockquote>
-
-<p>in paragraph 11 of [lib.iterator.requirements].</p>
-
-
-<p><b>Rationale:</b></p>
-<p>
-This is a defect because it constrains an lvalue to returning a modifiable lvalue.
-</p>
-<hr>
-<a name="495"><h3>495.&nbsp;Clause 22 template parameter requirements</h3></a><p><b>Section:</b>&nbsp;22 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.localization"> [lib.localization]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;10 Jan 2005</p>
-<p>It appears that there are no requirements specified for many of the
-template parameters in clause 22. It looks like this issue has never
-come up, except perhaps for Facet.</p>
-
-<p>Clause 22 isn't even listed in 17.3.2.1 [lib.type.descriptions],
-either, which is the wording that allows requirements on template
-parameters to be identified by name.</p>
-
-<p>So one issue is that 17.3.2.1 [lib.type.descriptions] Should be
-changed to cover clause 22. A better change, which will cover us in
-the future, would be to say that it applies to all the library
-clauses. Then if a template gets added to any library clause we are
-covered.</p>
-
-<p>charT, InputIterator, and other names with requirements defined
-elsewhere are fine, assuming the 17.3.2.1 [lib.type.descriptions] fix.
-But there are a few template arguments names which I don't think have
-requirements given elsewhere:</p>
-
-<ul>
-<li>internT and externT. The fix is to add wording saying that internT
-and externT must meet the same requirements as template arguments
-named charT.</li>
-
-<li>stateT. I'm not sure about this one. There already is some wording,
-but it seems a bit vague.</li>
-
-<li>Intl. [lib.locale.moneypunct.byname] The fix for this one is to
-rename "Intl" to "International". The name is important because other
-text identifies the requirements for the name International but not
-for Intl.</li>
-</ul>
-<p><b>Proposed resolution:</b></p>
-<p>Change 17.3.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.type.descriptions"> [lib.type.descriptions]</a>, paragraph 1, from:</p>
-<blockquote>
-The Requirements subclauses may describe names that are used to
-specify constraints on template arguments.153) These names are used in
-clauses 20, 23, 25, and 26 to describe the types that may be supplied
-as arguments by a C++ program when instantiating template components
-from the library.
-</blockquote>
-<p>to:</p>
-<blockquote>
-The Requirements subclauses may describe names that are used to
-specify constraints on template arguments.153) These names are used in
-library clauses to describe the types that may be supplied as
-arguments by a C++ program when instantiating template components from
-the library.
-</blockquote>
-
-<p>In the front matter of class 22, locales, add:</p>
-<blockquote>
-Template parameter types internT and externT shall meet the
-requirements of charT (described in 21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a>).
-</blockquote>
-<p><b>Rationale:</b></p>
-<p>
- Again, a blanket clause isn't blanket enough. Also, we've got a
- couple of names that we don't have blanket requirement statements
- for. The only issue is what to do about stateT. This wording is
- thin, but probably adequate.</p>
-<hr>
-<a name="496"><h3>496.&nbsp;Illegal use of "T" in vector&lt;bool&gt;</h3></a><p><b>Section:</b>&nbsp;23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;richard@ex-parrot.com&nbsp; <b>Date:</b>&nbsp;10 Feb 2005</p>
-<p>
-In the synopsis of the std::vector&lt;bool&gt; specialisation in 23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a>,
-the non-template assign() function has the signature</p>
-
-<pre> void assign( size_type n, const T&amp; t );
-</pre>
-
-<p>The type, T, is not defined in this context.</p>
-<p><b>Proposed resolution:</b></p>
-<p>Replace "T" with "value_type".</p>
-<hr>
-<a name="497"><h3>497.&nbsp;meaning of numeric_limits::traps for floating point types</h3></a><p><b>Section:</b>&nbsp;18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;2 Mar 2005</p>
-
-<p>18.2.1.2, p59 says this much about the traps member of numeric_limits:</p>
-
-<blockquote>
-<p>static const bool traps;<br>
--59- true if trapping is implemented for the type.204)
-<br>
-Footnote 204: Required by LIA-1.
-</p>
-</blockquote>
-
-<p>It's not clear what is meant by "is implemented" here.</p>
-
-<p>
-In the context of floating point numbers it seems reasonable to expect
-to be able to use traps to determine whether a program can "safely" use
-infinity(), quiet_NaN(), etc., in arithmetic expressions, that is
-without causing a trap (i.e., on UNIX without having to worry about
-getting a signal). When traps is true, I would expect any of the
-operations in section 7 of IEEE 754 to cause a trap (and my program
-to get a SIGFPE). So, for example, on Alpha, I would expect traps
-to be true by default (unless I compiled my program with the -ieee
-option), false by default on most other popular architectures,
-including IA64, MIPS, PA-RISC, PPC, SPARC, and x86 which require
-traps to be explicitly enabled by the program.
-</p>
-
-<p>
-Another possible interpretation of p59 is that traps should be true
-on any implementation that supports traps regardless of whether they
-are enabled by default or not. I don't think such an interpretation
-makes the traps member very useful, even though that is how traps is
-implemented on several platforms. It is also the only way to implement
-traps on platforms that allow programs to enable and disable trapping
-at runtime.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Change p59 to read:</p>
-<blockquote>True if, at program startup, there exists a value of the type that
- would cause an arithmetic operation using that value to trap.</blockquote>
-<p><b>Rationale:</b></p>
-<p>
- Real issue, since trapping can be turned on and off. Unclear what a
- static query can say about a dynamic issue. The real advice we should
- give users is to use cfenv for these sorts of queries. But this new
- proposed resolution is at least consistent and slightly better than
- nothing.</p>
-<hr>
-<a name="505"><h3>505.&nbsp;Result_type in random distribution requirements</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Table 17: Random distribution requirements
-</p>
-<p>
-Row 1 requires that each random distribution provide a nested type "input_type";
-this type denotes the type of the values that the distribution consumes.
-</p>
-<p>
-Inspection of all distributions in [tr.rand.dist] reveals that each distribution
-provides a second typedef ("result_type") that denotes the type of the values the
-distribution produces when called.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-It seems to me that this is also a requirement
-for all distributions and should therefore be indicated as such via a new second
-row to this table 17:
-</p>
-<table border="1" cellpadding="5">
-<tbody><tr>
-<td>X::result_type</td>
-<td>T</td>
-<td>---</td>
-<td>compile-time</td>
-</tr>
-</tbody></table>
-
-<p><i>[
-Berlin: Voted to WP. N1932 adopts the proposed resolution: see Table 5 row 1.
-]</i></p>
-
-<hr>
-<a name="507"><h3>507.&nbsp;Missing requirement for variate_generator::operator()</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-Paragraph 11 of [tr.rand.var] equires that the member template
-</p>
-<blockquote><pre>template&lt;class T&gt; result_type operator() (T value);
-</pre></blockquote>
-<p>
-return
-</p>
-<blockquote><pre>distribution()(e, value)
-</pre></blockquote>
-<p>
-However, not all distributions have an operator() with a corresponding signature.
-</p>
-
-<p><i>[
-Berlin: As a working group we voted in favor of N1932 which makes this moot:
-variate_generator has been eliminated. Then in full committee we voted to give
-this issue WP status (mistakenly).
-]</i></p>
-
-<p><b>Proposed resolution:</b></p>
-<p>
-We therefore recommend that we insert the following precondition before paragraph 11:
-</p>
-<blockquote>
-Precondition: <tt>distribution().operator()(e,value)</tt> is well-formed.
-</blockquote>
-<hr>
-<a name="508"><h3>508.&nbsp;Bad parameters for ranlux64_base_01</h3></a><p><b>Section:</b>&nbsp;TR1 5.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.predef"> [tr.rand.predef]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Walter Brown&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-The fifth of these engines with predefined parameters, ranlux64_base_01,
-appears to have an unintentional error for which there is a simple correction.
-The two pre-defined subtract_with_carry_01 engines are given as:
-</p>
-<blockquote><pre>typedef subtract_with_carry_01&lt;float, 24, 10, 24&gt; ranlux_base_01;
-typedef subtract_with_carry_01&lt;double, 48, 10, 24&gt; ranlux64_base_01;
-</pre></blockquote>
-<p>
-We demonstrate below that ranlux64_base_01 fails to meet the intent of the
-random number generation proposal, but that the simple correction to
-</p>
-<blockquote><pre>typedef subtract_with_carry_01&lt;double, 48, 5, 12&gt; ranlux64_base_01;
-</pre></blockquote>
-<p>
-does meet the intent of defining well-known good parameterizations.
-</p>
-<p>
-The ranlux64_base_01 engine as presented fails to meet the intent for
-predefined engines, stated in proposal N1398 (section E):
-</p>
-<blockquote><p>
-In order to make good random numbers available to a large number of library
-users, this proposal not only defines generic random-number engines, but also
-provides a number of predefined well-known good parameterizations for those.
-</p></blockquote>
-<p>
-The predefined ranlux_base_01 engine has been proven [1,2,3] to have a very
-long period and so meets this criterion. This property makes it suitable for
-use in the excellent discard_block engines defined subsequently. The proof
-of long period relies on the fact (proven in [1]) that 2**(w*r) - 2**(w*s)
-+ 1 is prime (w, r, and s are template parameters to subtract_with_carry_01,
-as defined in [tr.rand.eng.sub1]).
-</p>
-<p>
-The ranlux64_base_01 engine as presented in [tr.rand.predef] uses w=48, r=24, s=10.
-For these numbers, the combination 2**(w*r)-2**(w*s)+1 is non-prime (though
-explicit factorization would be a challenge). In consequence, while it is
-certainly possible for some seeding states that this engine would have a very
-long period, it is not at all Òwell-knownÓ that this is the case. The intent
-in the N1398 proposal involved the base of the ranlux64 engine, which finds heavy
-use in the physics community. This is isomorphic to the predefined ranlux_base_01,
-but exploits the ability of double variables to hold (at least) 48 bits of mantissa,
-to deliver 48 random bits at a time rather than 24.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-To achieve this intended behavior, the correct template parameteriztion would be:
-</p>
-<blockquote><pre>typedef subtract_with_carry_01&lt;double, 48, 5, 12&gt; ranlux64_base_01;
-</pre></blockquote>
-<p>
-The sequence of mantissa bits delivered by this is isomorphic (treating each
-double as having the bits of two floats) to that delivered by ranlux_base_01.
-</p>
-<p>
-<b>References:</b>
-</p>
-<ol>
-<li>F. James, Comput. Phys. Commun. 60(1990) 329</li>
-<li>G. Marsaglia and A. Zaman, Ann. Appl. Prob 1(1991) 462</li>
-<li>M. Luscher, Comput. Phys. Commun. 79(1994) 100-110</li>
-</ol>
-
-<p><i>[
-Berlin: Voted to WP. N1932 adopts the proposed resolution in 26.3.5,
-just above paragraph 5.
-]</i></p>
-
-<hr>
-<a name="519"><h3>519.&nbsp;Data() undocumented</h3></a><p><b>Section:</b>&nbsp;TR1 6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.array.array"> [tr.array.array]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-<tt>array&lt;&gt;::data()</tt> is present in the class synopsis, but not documented.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Add a new section, after 6.2.2.3:
-</p>
-<blockquote><pre>T* data()
-const T* data() const;
-</pre></blockquote>
-<p>
-<b>Returns:</b> <tt>elems</tt>.
-</p>
-<p>
-Change 6.2.2.4/2 to:
-</p>
-<blockquote>
-In the case where <tt>N == 0</tt>, <tt>begin() == end()</tt>. The return value
-of <tt>data()</tt> is unspecified.
-</blockquote>
-<hr>
-<a name="520"><h3>520.&nbsp;Result_of and pointers to data members</h3></a><p><b>Section:</b>&nbsp;TR1 3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.func.bind"> [tr.func.bind]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-In the original proposal for binders, the return type of bind() when
-called with a pointer to member data as it's callable object was
-defined to be mem_fn(ptr); when Peter Dimov and I unified the
-descriptions of the TR1 function objects we hoisted the descriptions
-of return types into the INVOKE pseudo-function and into result_of.
-Unfortunately, we left pointer to member data out of result_of, so
-bind doesn't have any specified behavior when called with a pointer
-to member data.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p><i>[
-Pete and Peter will provide wording.
-]</i></p>
-
-<p>
-In 20.5.4 [lib.func.ret] ([tr.func.ret]) p3 add the following bullet after bullet 2:
-</p>
-<ol start="3">
-<li>If <tt>F</tt> is a member data pointer type <tt>R T::*</tt>, <tt>type</tt>
-shall be <tt><i>cv</i> R&amp;</tt> when <tt>T1</tt> is <tt><i>cv</i> U1&amp;</tt>,
-<tt>R</tt> otherwise.</li>
-</ol>
-
-<p><i>[
-Peter provided wording.
-]</i></p>
-<hr>
-<a name="521"><h3>521.&nbsp;Garbled requirements for argument_type in reference_wrapper</h3></a><p><b>Section:</b>&nbsp;TR1 2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.refwrp.refwrp"> [tr.util.refwrp.refwrp]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Pete Becker&nbsp; <b>Date:</b>&nbsp;3 Jul 2005</p>
-<p>
-2.1.2/3, second bullet item currently says that reference_wrapper&lt;T&gt; is
-derived from unary_function&lt;T, R&gt; if T is:
-</p>
-<blockquote>
-a pointer to member function type with cv-qualifier cv and no arguments;
-the type T1 is cv T* and R is the return type of the pointer to member function;
-</blockquote>
-<p>
-The type of T1 can't be cv T*, 'cause that's a pointer to a pointer to member
-function. It should be a pointer to the class that T is a pointer to member of.
-Like this:
-</p>
-<blockquote>
-a pointer to a member function R T0::f() cv (where cv represents the member
-function's cv-qualifiers); the type T1 is cv T0*
-</blockquote>
-<p>
-Similarly, bullet item 2 in 2.1.2/4 should be:
-</p>
-<blockquote>
-a pointer to a member function R T0::f(T2) cv (where cv represents the member
-function's cv-qualifiers); the type T1 is cv T0*
-</blockquote>
-<p><b>Proposed resolution:</b></p>
-
-<p>
-Change bullet item 2 in 2.1.2/3:
-</p>
-
-<blockquote>
-<ul>
-<li>
-a pointer to member function <del>type with cv-qualifier <tt><i>cv</i></tt> and no arguments;
-the type <tt>T1</tt> is <tt><i>cv</i> T*</tt> and <tt>R</tt> is the return
-type of the pointer to member function</del> <ins><tt>R T0::f() <i>cv</i></tt>
-(where <tt><i>cv</i></tt> represents the member function's cv-qualifiers);
-the type <tt>T1</tt> is <tt><i>cv</i> T0*</tt></ins>
-</li>
-</ul>
-</blockquote>
-
-<p>
-Change bullet item 2 in 2.1.2/4:
-</p>
-
-<blockquote>
-<ul>
-<li>
-a pointer to member function <del>with cv-qualifier <tt><i>cv</i></tt> and taking one argument
-of type <tt>T2</tt>; the type <tt>T1</tt> is <tt><i>cv</i> T*</tt> and
-<tt>R</tt> is the return type of the pointer to member function</del>
-<ins><tt>R T0::f(T2) <i>cv</i></tt> (where <tt><i>cv</i></tt> represents the member
-function's cv-qualifiers); the type <tt>T1</tt> is <tt><i>cv</i> T0*</tt></ins>
-</li>
-</ul>
-</blockquote>
-
-<hr>
-<a name="530"><h3>530.&nbsp;Must elements of a string be contiguous?</h3></a><p><b>Section:</b>&nbsp;21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Matt Austern&nbsp; <b>Date:</b>&nbsp;15 Nov 2005</p>
-<p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69">69</a>, which was incorporated into C++03, mandated
-&nbsp;&nbsp; that the elements of a vector must be stored in contiguous memory.
-&nbsp;&nbsp; Should the same also apply to <tt>basic_string</tt>?</p>
-
-<p>We almost require contiguity already. Clause 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a>
-&nbsp; defines <tt>operator[]</tt> as <tt>data()[pos]</tt>. What's missing
-&nbsp; is a similar guarantee if we access the string's elements via the
-&nbsp; iterator interface.</p>
-
-<p>Given the existence of <tt>data()</tt>, and the definition of
-&nbsp; <tt>operator[]</tt> and <tt>at</tt> in terms of <tt>data</tt>,
-&nbsp; I don't believe it's possible to write a useful and standard-
-&nbsp; conforming <tt>basic_string</tt> that isn't contiguous. I'm not
-&nbsp; aware of any non-contiguous implementation. We should just require
-&nbsp; it.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>Add the following text to the end of 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>,
-paragraph 2. </p>
-
-<blockquote>
-&nbsp; <p>The characters in a string are stored contiguously, meaning that if
-&nbsp; <tt>s</tt> is a <tt>basic_string&lt;charT, Allocator&gt;</tt>, then
-&nbsp; it obeys the identity
-&nbsp; <tt>&amp;*(s.begin() + n) == &amp;*s.begin() + n</tt>
-&nbsp; for all <tt>0 &lt;= n &lt; s.size()</tt>.
- </p>
-</blockquote>
-<hr>
-<a name="533"><h3>533.&nbsp;typo in 2.2.3.10/1</h3></a><p><b>Section:</b>&nbsp;TR1 2.2.3.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.getdeleter"> [tr.util.smartptr.getdeleter]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;9 Nov 2005</p>
-<p>
-I'm seeing something that looks like a typo. The Return of <tt>get_deleter</tt>
-says:
-</p>
-<blockquote>
-If <tt>*this</tt> <i>owns</i> a deleter <tt>d</tt>...
-</blockquote>
-<p>
-but <tt>get_deleter</tt> is a free function!
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Therefore, I think should be:
-</p>
-<blockquote>
-If <tt><del>*this</del> <ins>p</ins></tt> <i>owns</i> a deleter <tt>d</tt>...
-</blockquote>
-<hr>
-<a name="535"><h3>535.&nbsp;std::string::swap specification poorly worded</h3></a><p><b>Section:</b>&nbsp;21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Beman Dawes&nbsp; <b>Date:</b>&nbsp;14 Dec 2005</p>
-<p>
-std::string::swap currently says for effects and postcondition:
-</p>
-
-<blockquote>
-<p>
-<i>Effects:</i> Swaps the contents of the two strings.
-</p>
-
-<p>
-<i>Postcondition:</i> <tt>*this</tt> contains the characters that were in <tt><i>s</i></tt>,
-<tt><i>s</i></tt> contains the characters that were in <tt>*this</tt>.
-</p>
-</blockquote>
-
-<p>
-Specifying both Effects and Postcondition seems redundant, and the postcondition
-needs to be made stronger. Users would be unhappy if the characters were not in
-the same order after the swap.
-</p>
-<p><b>Proposed resolution:</b></p>
-<blockquote>
-<p>
-<del><i>Effects:</i> Swaps the contents of the two strings.</del>
-</p>
-
-<p>
-<i>Postcondition:</i> <tt>*this</tt> contains the <ins>same sequence of</ins>
-characters that <del>were</del> <ins>was</ins> in <tt><i>s</i></tt>,
-<tt><i>s</i></tt> contains the <ins>same sequence of</ins> characters that
-<del>were</del> <ins>was</ins> in <tt>*this</tt>.
-</p>
-</blockquote>
-<hr>
-<a name="537"><h3>537.&nbsp;Typos in the signatures in 27.6.1.3/42-43 and 27.6.2.4</h3></a><p><b>Section:</b>&nbsp;27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Paolo Carlini&nbsp; <b>Date:</b>&nbsp;12 Feb 2006</p>
-<p>
-In the most recent working draft, I'm still seeing:
-</p>
-
-<blockquote><pre>seekg(off_type&amp; off, ios_base::seekdir dir)
-</pre></blockquote>
-
-<p>
-and
-</p>
-
-<blockquote><pre>seekp(pos_type&amp; pos)
-
-seekp(off_type&amp; off, ios_base::seekdir dir)
-</pre></blockquote>
-
-<p>
-that is, by reference off and pos arguments.
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-After 27.6.1.3p42 change:
-</p>
-
-<blockquote><pre>basic_istream&lt;charT,traits&gt;&amp; seekg(off_type<del>&amp;</del> <i>off</i>, ios_base::seekdir <i>dir</i>);
-</pre></blockquote>
-
-<p>
-After 27.6.2.4p1 change:
-</p>
-
-<blockquote><pre>basic_ostream&lt;charT,traits&gt;&amp; seekp(pos_type<del>&amp;</del> <i>pos</i>);
-</pre></blockquote>
-
-<p>
-After 27.6.2.4p3 change:
-</p>
-
-<blockquote><pre>basic_ostream&lt;charT,traits&gt;&amp; seekp(off_type<del>&amp;</del> <i>off</i>, ios_base::seekdir <i>dir</i>);
-</pre></blockquote>
-<hr>
-<a name="538"></a><h3><a name="538">538.&nbsp;241 again: Does unique_copy() require CopyConstructible and Assignable?</a></h3><p><b>Section:</b>&nbsp;25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Howard Hinnant&nbsp; <b>Date:</b>&nbsp;9 Feb 2006</p>
-<p>
-I believe I botched the resolution of
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">
-241 "Does unique_copy() require CopyConstructible and Assignable?"</a> which now
-has WP status.
-</p>
-
-<p>
-This talks about <tt>unique_copy</tt> requirements and currently reads:
-</p>
-
-<blockquote>
--5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and
-<tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt>
-shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt> shall
-be valid. If neither <tt>InputIterator</tt> nor <tt>OutputIterator</tt> meets the
-requirements of forward iterator then the value type of <tt>InputIterator</tt>
-must be CopyConstructible (20.1.3). Otherwise CopyConstructible is not required.
-</blockquote>
-
-<p>
-The problem (which Paolo discovered) is that when the iterators are at their
-most restrictive (<tt>InputIterator</tt>, <tt>OutputIterator</tt>), then we want
-<tt>InputIterator::value_type</tt> to be both <tt>CopyConstructible</tt> and
-<tt>CopyAssignable</tt> (for the most efficient implementation). However this
-proposed resolution only makes it clear that it is <tt>CopyConstructible</tt>,
-and that one can assign from <tt>*<i>first</i></tt> to <tt>*<i>result</i></tt>.
-This latter requirement does not necessarily imply that you can:
-</p>
-
-<blockquote><pre>*<i>first</i> = *<i>first</i>;
-</pre></blockquote>
-<p><b>Proposed resolution:</b></p>
-<blockquote>
--5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and
-<tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt>
-shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt>
-shall
-be valid. If neither <tt>InputIterator</tt> nor <tt>OutputIterator</tt> meets the
-requirements of forward iterator then the <del>value type</del>
-<ins><tt>value_type</tt></ins> of <tt>InputIterator</tt>
-must be CopyConstructible (20.1.3) <ins>and Assignable</ins>.
-Otherwise CopyConstructible is not required.
-</blockquote>
-<hr>
-<a name="540"><h3>540.&nbsp;shared_ptr&lt;void&gt;::operator*()</h3></a><p><b>Section:</b>&nbsp;TR1 2.2.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.obs"> [tr.util.smartptr.shared.obs]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;15 Oct 2005</p>
-<p>
-I'm trying to reconcile the note in tr.util.smartptr.shared.obs, p6
-that talks about the operator*() member function of shared_ptr:
-</p>
-
-<blockquote>
- Notes: When T is void, attempting to instantiate this member function
- renders the program ill-formed. [Note: Instantiating shared_ptr&lt;void&gt;
- does not necessarily result in instantiating this member function.
- --end note]
-</blockquote>
-
-<p>
-with the requirement in temp.inst, p1:
-</p>
-
-<blockquote>
- The implicit instantiation of a class template specialization causes
- the implicit instantiation of the declarations, but not of the
- definitions...
-</blockquote>
-
-<p>
-I assume that what the note is really trying to say is that
-"instantiating shared_ptr&lt;void&gt; *must not* result in instantiating
-this member function." That is, that this function must not be
-declared a member of shared_ptr&lt;void&gt;. Is my interpretation
-correct?
-</p>
-<p><b>Proposed resolution:</b></p>
-<p>
-Change 2.2.3.5p6
-</p>
-
-<blockquote>
--6- <del><i>Notes:</i></del> When <tt>T</tt> is <tt>void</tt>, <del>attempting to instantiate
-this member function renders the program ill-formed. [<i>Note:</i>
-Instantiating <tt>shared_ptr&lt;void&gt;</tt> does not necessarily result in
-instantiating this member function. <i>--end note</i>]</del> <ins>it is
-unspecified whether this member function is declared or not, and if so, what its
-return type is, except that the declaration (although not necessarily the
-definition) of the function shall be well-formed.</ins>
-</blockquote>
-
-<hr>
-<a name="541"><h3>541.&nbsp;shared_ptr template assignment and void</h3></a><p><b>Section:</b>&nbsp;TR1 2.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared"> [tr.util.smartptr.shared]</a>&nbsp; <b>Status:</b>&nbsp;<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a>&nbsp; <b>Submitter:</b>&nbsp;Martin Sebor&nbsp; <b>Date:</b>&nbsp;16 Oct 2005</p>
-<p>
-Is the void specialization of the template assignment operator taking
-a shared_ptr&lt;void&gt; as an argument supposed be well-formed?
-</p>
-<p>
-I.e., is this snippet well-formed:
-</p>
-<blockquote><pre>shared_ptr&lt;void&gt; p;
-p.operator=&lt;void&gt;(p);
-</pre></blockquote>
-
-<p>
-Gcc complains about auto_ptr&lt;void&gt;::operator*() returning a reference
-to void. I suspect it's because shared_ptr has two template assignment
-operators, one of which takes auto_ptr, and the auto_ptr template gets
-implicitly instantiated in the process of overload resolution.
-</p>
-
-<p>
-The only way I see around it is to do the same trick with auto_ptr&lt;void&gt;
-operator*() as with the same operator in shared_ptr&lt;void&gt;.
-</p>
-
-<p>
-PS Strangely enough, the EDG front end doesn't mind the code, even
-though in a small test case (below) I can reproduce the error with
-it as well.
-</p>
-
-<blockquote><pre>template &lt;class T&gt;
-struct A { T&amp; operator*() { return *(T*)0; } };
-
-template &lt;class T&gt;
-struct B {
- void operator= (const B&amp;) { }
- template &lt;class U&gt;
- void operator= (const B&lt;U&gt;&amp;) { }
- template &lt;class U&gt;
- void operator= (const A&lt;U&gt;&amp;) { }
-};
-
-int main ()
-{
- B&lt;void&gt; b;
- b.operator=&lt;void&gt;(b);
-}
-</pre></blockquote>
-<p><b>Proposed resolution:</b></p>
-<p>
-In [lib.memory] change:
-</p>
-<blockquote><pre>template&lt;class X&gt; class auto_ptr;
-<ins>template&lt;&gt; class auto_ptr&lt;void&gt;;</ins>
-</pre></blockquote>
-
-<p>
-In [lib.auto.ptr]/2 add the following before the last closing brace:
-</p>
-
-<blockquote><pre>template&lt;&gt; class auto_ptr&lt;void&gt;
-{
-public:
-&nbsp; &nbsp; typedef void element_type;
-};
-</pre></blockquote>
-
-<p>----- End of document -----</p>
-</body></html> \ No newline at end of file
diff --git a/libstdc++-v3/docs/html/ext/mt_allocator.html b/libstdc++-v3/docs/html/ext/mt_allocator.html
deleted file mode 100644
index e91760e8b48..00000000000
--- a/libstdc++-v3/docs/html/ext/mt_allocator.html
+++ /dev/null
@@ -1,558 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="Stefan Olsson &lt;stefan@xapa.se&gt;" />
- <meta name="KEYWORDS" content="c++, libstdc++, g++, allocator, memory" />
- <meta name="DESCRIPTION" content="Allocators and allocation" />
- <meta name="GENERATOR" content="emacs and ten fingers" />
- <title>A fixed-size, multi-thread optimized allocator</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Extensions" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">A fixed-size, multi-thread optimized allocator</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<h3 class="left">
- <a name="intro">Introduction</a>
-</h3>
-
-<p> The mt allocator [hereinafter referred to simply as "the
-allocator"] is a fixed size (power of two) allocator that was
-initially developed specifically to suit the needs of multi threaded
-applications [hereinafter referred to as an MT application]. Over time
-the allocator has evolved and been improved in many ways, in
-particular it now also does a good job in single threaded applications
-[hereinafter referred to as a ST application]. (Note: In this
-document, when referring to single threaded applications this also
-includes applications that are compiled with gcc without thread
-support enabled. This is accomplished using ifdef's on
-__GTHREADS). This allocator is tunable, very flexible, and capable of
-high-performance.
-</p>
-
-<p>
-The aim of this document is to describe - from a application point of
-view - the "inner workings" of the allocator.
-</p>
-
-<h3 class="left">
- <a name="design">Design Overview</a>
-</h3>
-
-<p> There are three general components to the allocator: a datum
-describing the characteristics of the memory pool, a policy class
-containing this pool that links instantiation types to common or
-individual pools, and a class inheriting from the policy class that is
-the actual allocator.
-</p>
-
-<p>The datum describing pools characteristics is
- <pre>
- template&lt;bool _Thread&gt;
- class __pool
- </pre>
-This class is parametrized on thread support, and is explicitly
-specialized for both multiple threads (with <code>bool==true</code>)
-and single threads (via <code>bool==false</code>.) It is possible to
-use a custom pool datum instead of the default class that is provided.
-</p>
-
-<p> There are two distinct policy classes, each of which can be used
-with either type of underlying pool datum.
-</p>
-
-<pre>
- template&lt;bool _Thread&gt;
- struct __common_pool_policy
-
- template&lt;typename _Tp, bool _Thread&gt;
- struct __per_type_pool_policy
-</pre>
-
-<p> The first policy, <code>__common_pool_policy</code>, implements a
-common pool. This means that allocators that are instantiated with
-different types, say <code>char</code> and <code>long</code> will both
-use the same pool. This is the default policy.
-</p>
-
-<p> The second policy, <code>__per_type_pool_policy</code>, implements
-a separate pool for each instantiating type. Thus, <code>char</code>
-and <code>long</code> will use separate pools. This allows per-type
-tuning, for instance.
-</p>
-
-<p> Putting this all together, the actual allocator class is
-<pre>
- template&lt;typename _Tp, typename _Poolp = __default_policy&gt;
- class __mt_alloc : public __mt_alloc_base&lt;_Tp&gt;, _Poolp
-</pre>
-This class has the interface required for standard library allocator
-classes, namely member functions <code>allocate</code> and
-<code>deallocate</code>, plus others.
-</p>
-
-<h3 class="left">
- <a name="init">Tunable parameters</a>
-</h3>
-
-<p>Certain allocation parameters can be modified, or tuned. There
-exists a nested <pre>struct __pool_base::_Tune</pre> that contains all
-these parameters, which include settings for
-</p>
- <ul>
- <li>Alignment </li>
- <li>Maximum bytes before calling <code>::operator new</code> directly</li>
- <li>Minimum bytes</li>
- <li>Size of underlying global allocations</li>
- <li>Maximum number of supported threads</li>
- <li>Migration of deallocations to the global free list</li>
- <li>Shunt for global <code>new</code> and <code>delete</code></li>
- </ul>
-<p>Adjusting parameters for a given instance of an allocator can only
-happen before any allocations take place, when the allocator itself is
-initialized. For instance:
-</p>
-<pre>
-#include &lt;ext/mt_allocator.h&gt;
-
-struct pod
-{
- int i;
- int j;
-};
-
-int main()
-{
- typedef pod value_type;
- typedef __gnu_cxx::__mt_alloc&lt;value_type&gt; allocator_type;
- typedef __gnu_cxx::__pool_base::_Tune tune_type;
-
- tune_type t_default;
- tune_type t_opt(16, 5120, 32, 5120, 20, 10, false);
- tune_type t_single(16, 5120, 32, 5120, 1, 10, false);
-
- tune_type t;
- t = allocator_type::_M_get_options();
- allocator_type::_M_set_options(t_opt);
- t = allocator_type::_M_get_options();
-
- allocator_type a;
- allocator_type::pointer p1 = a.allocate(128);
- allocator_type::pointer p2 = a.allocate(5128);
-
- a.deallocate(p1, 128);
- a.deallocate(p2, 5128);
-
- return 0;
-}
-</pre>
-
-<h3 class="left">
- <a name="init">Initialization</a>
-</h3>
-
-<p>
-The static variables (pointers to freelists, tuning parameters etc)
-are initialized as above, or are set to the global defaults.
-</p>
-
-<p>
-The very first allocate() call will always call the
-_S_initialize_once() function. In order to make sure that this
-function is called exactly once we make use of a __gthread_once call
-in MT applications and check a static bool (_S_init) in ST
-applications.
-</p>
-
-<p>
-The _S_initialize() function:
-- If the GLIBCXX_FORCE_NEW environment variable is set, it sets the bool
- _S_force_new to true and then returns. This will cause subsequent calls to
- allocate() to return memory directly from a new() call, and deallocate will
- only do a delete() call.
-</p>
-
-<p>
-- If the GLIBCXX_FORCE_NEW environment variable is not set, both ST and MT
- applications will:
- - Calculate the number of bins needed. A bin is a specific power of two size
- of bytes. I.e., by default the allocator will deal with requests of up to
- 128 bytes (or whatever the value of _S_max_bytes is when _S_init() is
- called). This means that there will be bins of the following sizes
- (in bytes): 1, 2, 4, 8, 16, 32, 64, 128.
-
- - Create the _S_binmap array. All requests are rounded up to the next
- "large enough" bin. I.e., a request for 29 bytes will cause a block from
- the "32 byte bin" to be returned to the application. The purpose of
- _S_binmap is to speed up the process of finding out which bin to use.
- I.e., the value of _S_binmap[ 29 ] is initialized to 5 (bin 5 = 32 bytes).
-</p>
-<p>
- - Create the _S_bin array. This array consists of bin_records. There will be
- as many bin_records in this array as the number of bins that we calculated
- earlier. I.e., if _S_max_bytes = 128 there will be 8 entries.
- Each bin_record is then initialized:
- - bin_record-&gt;first = An array of pointers to block_records. There will be
- as many block_records pointers as there are maximum number of threads
- (in a ST application there is only 1 thread, in a MT application there
- are _S_max_threads).
- This holds the pointer to the first free block for each thread in this
- bin. I.e., if we would like to know where the first free block of size 32
- for thread number 3 is we would look this up by: _S_bin[ 5 ].first[ 3 ]
-
- The above created block_record pointers members are now initialized to
- their initial values. I.e. _S_bin[ n ].first[ n ] = NULL;
-</p>
-
-<p>
-- Additionally a MT application will:
- - Create a list of free thread id's. The pointer to the first entry
- is stored in _S_thread_freelist_first. The reason for this approach is
- that the __gthread_self() call will not return a value that corresponds to
- the maximum number of threads allowed but rather a process id number or
- something else. So what we do is that we create a list of thread_records.
- This list is _S_max_threads long and each entry holds a size_t thread_id
- which is initialized to 1, 2, 3, 4, 5 and so on up to _S_max_threads.
- Each time a thread calls allocate() or deallocate() we call
- _S_get_thread_id() which looks at the value of _S_thread_key which is a
- thread local storage pointer. If this is NULL we know that this is a newly
- created thread and we pop the first entry from this list and saves the
- pointer to this record in the _S_thread_key variable. The next time
- we will get the pointer to the thread_record back and we use the
- thread_record-&gt;thread_id as identification. I.e., the first thread that
- calls allocate will get the first record in this list and thus be thread
- number 1 and will then find the pointer to its first free 32 byte block
- in _S_bin[ 5 ].first[ 1 ]
- When we create the _S_thread_key we also define a destructor
- (_S_thread_key_destr) which means that when the thread dies, this
- thread_record is returned to the front of this list and the thread id
- can then be reused if a new thread is created.
- This list is protected by a mutex (_S_thread_freelist_mutex) which is only
- locked when records are removed/added to the list.
-</p>
-<p>
- - Initialize the free and used counters of each bin_record:
- - bin_record-&gt;free = An array of size_t. This keeps track of the number
- of blocks on a specific thread's freelist in each bin. I.e., if a thread
- has 12 32-byte blocks on it's freelists and allocates one of these, this
- counter would be decreased to 11.
-
- - bin_record-&gt;used = An array of size_t. This keeps track of the number
- of blocks currently in use of this size by this thread. I.e., if a thread
- has made 678 requests (and no deallocations...) of 32-byte blocks this
- counter will read 678.
-
- The above created arrays are now initialized with their initial values.
- I.e. _S_bin[ n ].free[ n ] = 0;
-</p>
-<p>
- - Initialize the mutex of each bin_record: The bin_record-&gt;mutex
- is used to protect the global freelist. This concept of a global
- freelist is explained in more detail in the section "A multi
- threaded example", but basically this mutex is locked whenever a
- block of memory is retrieved or returned to the global freelist
- for this specific bin. This only occurs when a number of blocks
- are grabbed from the global list to a thread specific list or when
- a thread decides to return some blocks to the global freelist.
-</p>
-
-<p> Notes about deallocation. This allocator does not explicitly
-release memory. Because of this, memory debugging programs like
-valgrind or purify may notice leaks: sorry about this
-inconvenience. Operating systems will reclaim allocated memory at
-program termination anyway. If sidestepping this kind of noise is
-desired, there are three options: use an allocator, like
-<code>new_allocator</code> that releases memory while debugging, use
-GLIBCXX_FORCE_NEW to bypass the allocator's internal pools, or use a
-custom pool datum that releases resources on destruction.</p>
-
-<p>On systems with the function <code>__cxa_atexit</code>, the
-allocator can be forced to free all memory allocated before program
-termination with the member function
-<code>__pool_type::_M_destroy</code>. However, because this member
-function relies on the precise and exactly-conforming ordering of
-static destructors, including those of a static local
-<code>__pool</code> object, it should not be used, ever, on systems
-that don't have the necessary underlying support. In addition, in
-practice, forcing deallocation can be tricky, as it requires the
-<code>__pool</code> object to be fully-constructed before the object
-that uses it is fully constructed. For most (but not all) STL
-containers, this works, as an instance of the allocator is constructed
-as part of a container's constructor. However, this assumption is
-implementation-specific, and subject to change. For an example of a
-pool that frees memory, see the following
- <a href="http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc%2b%2b-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc">
- example.</a>
-</p>
-
-<h3 class="left">
- <a name="st_example">A single threaded example (and a primer for the multi threaded example!)</a>
-</h3>
-
-<p>
-Let's start by describing how the data on a freelist is laid out in memory.
-This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes):
-</p>
-<pre>
-+----------------+
-| next* ---------|--+ (_S_bin[ 3 ].first[ 3 ] points here)
-| | |
-| | |
-| | |
-+----------------+ |
-| thread_id = 3 | |
-| | |
-| | |
-| | |
-+----------------+ |
-| DATA | | (A pointer to here is what is returned to the
-| | | the application when needed)
-| | |
-| | |
-| | |
-| | |
-| | |
-| | |
-+----------------+ |
-+----------------+ |
-| next* |&lt;-+ (If next == NULL it's the last one on the list)
-| |
-| |
-| |
-+----------------+
-| thread_id = 3 |
-| |
-| |
-| |
-+----------------+
-| DATA |
-| |
-| |
-| |
-| |
-| |
-| |
-| |
-+----------------+
-</pre>
-
-<p>
-With this in mind we simplify things a bit for a while and say that there is
-only one thread (a ST application). In this case all operations are made to
-what is referred to as the global pool - thread id 0 (No thread may be
-assigned this id since they span from 1 to _S_max_threads in a MT application).
-</p>
-<p>
-When the application requests memory (calling allocate()) we first look at the
-requested size and if this is &gt; _S_max_bytes we call new() directly and return.
-</p>
-<p>
-If the requested size is within limits we start by finding out from which
-bin we should serve this request by looking in _S_binmap.
-</p>
-<p>
-A quick look at _S_bin[ bin ].first[ 0 ] tells us if there are any blocks of
-this size on the freelist (0). If this is not NULL - fine, just remove the
-block that _S_bin[ bin ].first[ 0 ] points to from the list,
-update _S_bin[ bin ].first[ 0 ] and return a pointer to that blocks data.
-</p>
-<p>
-If the freelist is empty (the pointer is NULL) we must get memory from the
-system and build us a freelist within this memory. All requests for new memory
-is made in chunks of _S_chunk_size. Knowing the size of a block_record and
-the bytes that this bin stores we then calculate how many blocks we can create
-within this chunk, build the list, remove the first block, update the pointer
-(_S_bin[ bin ].first[ 0 ]) and return a pointer to that blocks data.
-</p>
-
-<p>
-Deallocation is equally simple; the pointer is casted back to a block_record
-pointer, lookup which bin to use based on the size, add the block to the front
-of the global freelist and update the pointer as needed
-(_S_bin[ bin ].first[ 0 ]).
-</p>
-
-<p>
-The decision to add deallocated blocks to the front of the freelist was made
-after a set of performance measurements that showed that this is roughly 10%
-faster than maintaining a set of "last pointers" as well.
-</p>
-
-<h3 class="left">
- <a name="mt_example">A multi threaded example</a>
-</h3>
-
-<p>
-In the ST example we never used the thread_id variable present in each block.
-Let's start by explaining the purpose of this in a MT application.
-</p>
-
-<p>
-The concept of "ownership" was introduced since many MT applications
-allocate and deallocate memory to shared containers from different
-threads (such as a cache shared amongst all threads). This introduces
-a problem if the allocator only returns memory to the current threads
-freelist (I.e., there might be one thread doing all the allocation and
-thus obtaining ever more memory from the system and another thread
-that is getting a longer and longer freelist - this will in the end
-consume all available memory).
-</p>
-
-<p>
-Each time a block is moved from the global list (where ownership is
-irrelevant), to a threads freelist (or when a new freelist is built
-from a chunk directly onto a threads freelist or when a deallocation
-occurs on a block which was not allocated by the same thread id as the
-one doing the deallocation) the thread id is set to the current one.
-</p>
-
-<p>
-What's the use? Well, when a deallocation occurs we can now look at
-the thread id and find out if it was allocated by another thread id
-and decrease the used counter of that thread instead, thus keeping the
-free and used counters correct. And keeping the free and used counters
-corrects is very important since the relationship between these two
-variables decides if memory should be returned to the global pool or
-not when a deallocation occurs.
-</p>
-
-<p>
-When the application requests memory (calling allocate()) we first
-look at the requested size and if this is &gt; _S_max_bytes we call new()
-directly and return.
-</p>
-
-<p>
-If the requested size is within limits we start by finding out from which
-bin we should serve this request by looking in _S_binmap.
-</p>
-
-<p>
-A call to _S_get_thread_id() returns the thread id for the calling thread
-(and if no value has been set in _S_thread_key, a new id is assigned and
-returned).
-</p>
-
-<p>
-A quick look at _S_bin[ bin ].first[ thread_id ] tells us if there are
-any blocks of this size on the current threads freelist. If this is
-not NULL - fine, just remove the block that _S_bin[ bin ].first[
-thread_id ] points to from the list, update _S_bin[ bin ].first[
-thread_id ], update the free and used counters and return a pointer to
-that blocks data.
-</p>
-
-<p>
-If the freelist is empty (the pointer is NULL) we start by looking at
-the global freelist (0). If there are blocks available on the global
-freelist we lock this bins mutex and move up to block_count (the
-number of blocks of this bins size that will fit into a _S_chunk_size)
-or until end of list - whatever comes first - to the current threads
-freelist and at the same time change the thread_id ownership and
-update the counters and pointers. When the bins mutex has been
-unlocked, we remove the block that _S_bin[ bin ].first[ thread_id ]
-points to from the list, update _S_bin[ bin ].first[ thread_id ],
-update the free and used counters, and return a pointer to that blocks
-data.
-</p>
-
-<p>
-The reason that the number of blocks moved to the current threads
-freelist is limited to block_count is to minimize the chance that a
-subsequent deallocate() call will return the excess blocks to the
-global freelist (based on the _S_freelist_headroom calculation, see
-below).
-</p>
-
-<p>
-However if there isn't any memory on the global pool we need to get
-memory from the system - this is done in exactly the same way as in a
-single threaded application with one major difference; the list built
-in the newly allocated memory (of _S_chunk_size size) is added to the
-current threads freelist instead of to the global.
-</p>
-
-<p>
-The basic process of a deallocation call is simple: always add the
-block to the front of the current threads freelist and update the
-counters and pointers (as described earlier with the specific check of
-ownership that causes the used counter of the thread that originally
-allocated the block to be decreased instead of the current threads
-counter).
-</p>
-
-<p>
-And here comes the free and used counters to service. Each time a
-deallocation() call is made, the length of the current threads
-freelist is compared to the amount memory in use by this thread.
-</p>
-
-<p>
-Let's go back to the example of an application that has one thread
-that does all the allocations and one that deallocates. Both these
-threads use say 516 32-byte blocks that was allocated during thread
-creation for example. Their used counters will both say 516 at this
-point. The allocation thread now grabs 1000 32-byte blocks and puts
-them in a shared container. The used counter for this thread is now
-1516.
-</p>
-
-<p>
-The deallocation thread now deallocates 500 of these blocks. For each
-deallocation made the used counter of the allocating thread is
-decreased and the freelist of the deallocation thread gets longer and
-longer. But the calculation made in deallocate() will limit the length
-of the freelist in the deallocation thread to _S_freelist_headroom %
-of it's used counter. In this case, when the freelist (given that the
-_S_freelist_headroom is at it's default value of 10%) exceeds 52
-(516/10) blocks will be returned to the global pool where the
-allocating thread may pick them up and reuse them.
-</p>
-
-<p>
-In order to reduce lock contention (since this requires this bins
-mutex to be locked) this operation is also made in chunks of blocks
-(just like when chunks of blocks are moved from the global freelist to
-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>
-
-<hr />
-<p>Return <a href="#top">to the top of the page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/ds_gen.html b/libstdc++-v3/docs/html/ext/pb_ds/ds_gen.html
deleted file mode 100644
index 5c3eea6a423..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/ds_gen.html
+++ /dev/null
@@ -1,344 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>Data-Structure Genericity</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1>Data-Structure Genericity</h1>
-
- <h2><a name="problem" id="problem">The Basic Problem</a></h2>
-
- <p>The design attempts to address the following problem. When
- writing a function manipulating a generic container object,
- what is the behavior of the object? <i>E.g.</i>, suppose one
- writes</p>
- <pre>
-<b>template</b>&lt;<b>typename</b> Cntnr&gt;
-<b>void</b>
-some_op_sequence(Cntnr &amp;r_container)
-{
- ...
-}
-</pre>then one needs to address the following questions in the body
-of <tt>some_op_sequence</tt>:
-
- <ol>
- <li>Which types and methods does <tt>Cntnr</tt> support?
- Containers based on hash tables can be queries for the
- hash-functor type and object; this is meaningless for
- tree-based containers. Containers based on trees can be
- split, joined, or can erase iterators and return the
- following iterator; this cannot be done by hash-based
- containers.</li>
-
- <li>What are the guarantees of <tt>Cntnr</tt>? A container
- based on a probing hash-table invalidates all iterators when
- it is modified; this is not the case for containers based on
- node-based trees. Containers based on a node-based tree can
- be split or joined without exceptions; this is not the case
- for containers based on vector-based trees.</li>
-
- <li>How does the container maintain its elements? Tree-based
- and Trie-based containers store elements by key order;
- others, typically, do not. A container based on a splay trees
- or lists with update policies "cache" "frequently accessed"
- elements; containers based on most other underlying
- data structures do not.</li>
- </ol>
-
- <p>The remainder of this section deals with these issues.</p>
-
- <h2><a name="ds_hierarchy" id="ds_hierarchy">Container
- Hierarchy</a></h2>
-
- <p>Figure <a href="#cd">Container class hierarchy</a> shows the
- container hierarchy.</p>
-
- <h6 class="c1"><a name="cd" id="cd"><img src="container_cd.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Container class hierarchy.</h6>
-
- <ol>
- <li><a href=
- "container_base.html"><tt>container_base</tt></a> is an
- abstract base class for associative containers.</li>
-
- <li>Tree-Like-Based Associative-Containers:
-
- <ol>
- <li><a href=
- "basic_tree.html"><tt>basic_tree</tt></a>
- is an abstract base class for tree-like-based
- associative-containers</li>
-
- <li><a href=
- "tree.html"><tt>tree</tt></a>
- is a concrete base class for tree-based
- associative-containers</li>
-
- <li><a href=
- "trie.html"><tt>trie</tt></a>
- is a concrete base class trie-based
- associative-containers</li>
- </ol>
- </li>
-
- <li>Hash-Based Associative-Containers:
-
- <ol>
- <li><a href=
- "basic_hash_table.html"><tt>basic_hash_table</tt></a>
- is an abstract base class for hash-based
- associative-containers</li>
-
- <li><a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a>
- is a concrete collision-chaining hash-based
- associative-containers</li>
-
- <li><a href=
- "gp_hash_table.html"><tt>gp_hash_table</tt></a>
- is a concrete (general) probing hash-based
- associative-containers</li>
- </ol>
- </li>
-
- <li>List-Based Associative-Containers:
-
- <ol>
- <li><a href=
- "list_update.html"><tt>list_update</tt></a> -
- list-based update-policy associative container</li>
- </ol>
- </li>
- </ol>
-
- <p>The hierarchy is composed naturally so that commonality is
- captured by base classes. Thus <tt><b>operator[]</b></tt> is
- defined <a href=
- "container_base.html"><tt>container_base</tt></a>, since
- all containers support it. Conversely <tt>split</tt> is defined
- in <a href=
- "basic_tree.html"><tt>basic_tree</tt></a>,
- since only tree-like containers support it. <a href=
- "#container_traits">Data-Structure Tags and Traits</a> discusses how
- to query which types and methods each container supports.</p>
-
- <h2><a name="container_traits" id="container_traits">Data-Structure Tags and
- Traits</a></h2>
-
- <p>Tags and traits are very useful for manipulating generic
- types. For example, if <tt>It</tt> is an iterator class, then
- <tt><b>typename</b> It::iterator_category</tt> or
- <tt><b>typename</b>
- std::iterator_traits&lt;It&gt;::iterator_category</tt> will
- yield its category, and <tt><b>typename</b>
- std::iterator_traits&lt;It&gt;::value_type</tt> will yield its
- value type.</p>
-
- <p><tt>pb_ds</tt> contains a tag hierarchy corresponding to the
- hierarchy in Figure <a href="#cd">Class hierarchy</a>. The tag
- hierarchy is shown in Figure <a href=
- "#tag_cd">Data-structure tag class hierarchy</a>.</p>
-
- <h6 class="c1"><a name="tag_cd" id="tag_cd"><img src=
- "assoc_container_tag_cd.png" alt="no image" /></a></h6>
-
- <h6 class="c1">Data-structure tag class hierarchy.</h6>
-
- <p><a href=
- "container_base.html"><tt>container_base</tt></a>
- publicly defines <tt>container_category</tt> as one of the classes in
- Figure <a href="#tag_cd">Data-structure tag class
- hierarchy</a>. Given any container <tt>Cntnr</tt>, the tag of
- the underlying data structure can be found via
- <tt><b>typename</b> Cntnr::container_category</tt>.</p>
-
- <p>Additionally, a traits mechanism can be used to query a
- container type for its attributes. Given any container
- <tt>Cntnr</tt>, then <tt><a href=
- "assoc_container_traits.html">pb_ds::container_traits</a>&lt;Cntnr&gt;</tt>
- is a traits class identifying the properties of the
- container.</p>
-
- <p>To find if a container can throw when a key is erased (which
- is true for vector-based trees, for example), one can
- use</p><a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::erase_can_throw</tt>,
- for example.
-
- <p>Some of the definitions in <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a> are
- dependent on other definitions. <i>E.g.</i>, if <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::order_preserving</tt>
- is <tt><b>true</b></tt> (which is the case for containers based
- on trees and tries), then the container can be split or joined;
- in this case, <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
- indicates whether splits or joins can throw exceptions (which
- is true for vector-based trees); otherwise <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>
- will yield a compilation error. (This is somewhat similar to a
- compile-time version of the COM model [<a href=
- "references.html#mscom">mscom</a>]).</p>
-
- <h2><a name="find_range" id="find_range">Point-Type and
- Range-Type Methods and Iterators</a></h2>
-
- <h3><a name="it_unordered" id="it_unordered">Iterators in
- Unordered Container Types</a></h3>
-
- <p><tt>pb_ds</tt> differentiates between two types of methods
- and iterators: point-type methods and iterators, and range-type
- methods and iterators (see <a href=
- "motivation.html#assoc_diff_it">Motivation::Associative
- Containers::Differentiating between Iterator Types</a> and
- <a href="tutorial.html#assoc_find_range">Tutorial::Associative
- Containers::Point-Type and Range-Type Methods and
- Iterators</a>). Each associative container's interface includes
- the methods:</p>
- <pre>
-const_point_iterator
-find(const_key_reference r_key) const;
-
-point_iterator
-find(const_key_reference r_key);
-
-std::pair&lt;point_iterator,<b>bool</b>&gt;
-insert(const_reference r_val);
-</pre>
-
- <p>The relationship between these iterator types varies between
- container types. Figure <a href=
- "#point_iterators_cd">Point-type and range-type iterators</a>-A
- shows the most general invariant between point-type and
- range-type iterators: <tt>iterator</tt>, <i>e.g.</i>, can
- always be converted to <tt>point_iterator</tt>. Figure <a href=
- "#point_iterators_cd">Point-type and range-type iterators</a>-B
- shows invariants for order-preserving containers: point-type
- iterators are synonymous with range-type iterators.
- Orthogonally, Figure <a href="#point_iterators_cd">Point-type
- and range-type iterators</a>-C shows invariants for "set"
- containers: iterators are synonymous with const iterators.</p>
-
- <h6 class="c1"><a name="point_iterators_cd" id=
- "point_iterators_cd"><img src="point_iterators_cd.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Point-type and range-type iterators.</h6>
-
- <p>Note that point-type iterators in self-organizing containers
- (<i>e.g.</i>, hash-based associative containers) lack movement
- operators, such as <tt><b>operator++</b></tt> - in fact, this
- is the reason why <tt>pb_ds</tt> differentiates from the STL's
- design on this point.</p>
-
- <p>Typically, one can determine an iterator's movement
- capabilities in the STL using
- <tt>std::iterator_traits&lt;It&gt;iterator_category</tt>, which
- is a <tt><b>struct</b></tt> indicating the iterator's movement
- capabilities. Unfortunately, none of the STL's predefined
- categories reflect a pointer's <u>not</u> having any movement
- capabilities whatsoever. Consequently, <tt>pb_ds</tt> adds a
- type <a href=
- "trivial_iterator_tag.html"><tt>trivial_iterator_tag</tt></a>
- (whose name is taken from a concept in [<a href=
- "references.html#sgi_stl">sgi_stl</a>]), which is the category
- of iterators with no movement capabilities. All other STL tags,
- such as <tt>forward_iterator_tag</tt> retain their common
- use.</p>
-
- <h3><a name="inv_guar" id="inv_guar">Invalidation
- Guarantees</a></h3>
-
- <p><a href=
- "motivation.html#assoc_inv_guar">Motivation::Associative
- Containers::Differentiating between Iterator
- Types::Invalidation Guarantees</a> posed a problem. Given three
- different types of associative containers, a modifying
- operation (in that example, <tt>erase</tt>) invalidated
- iterators in three different ways: the iterator of one
- container remained completely valid - it could be de-referenced
- and incremented; the iterator of a different container could
- not even be de-referenced; the iterator of the third container
- could be de-referenced, but its "next" iterator changed
- unpredictably.</p>
-
- <p>Distinguishing between find and range types allows
- fine-grained invalidation guarantees, because these questions
- correspond exactly to the question of whether point-type
- iterators and range-type iterators are valid. <a href=
- "#invalidation_guarantee_cd">Invalidation guarantees class
- hierarchy</a> shows tags corresponding to different types of
- invalidation guarantees.</p>
-
- <h6 class="c1"><a name="invalidation_guarantee_cd" id=
- "invalidation_guarantee_cd"><img src=
- "invalidation_guarantee_cd.png" alt="no image" /></a></h6>
-
- <h6 class="c1">Invalidation guarantees class hierarchy.</h6>
-
- <ol>
- <li><a href=
- "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>
- corresponds to a basic guarantee that a point-type iterator,
- a found pointer, or a found reference, remains valid as long
- as the container object is not modified.</li>
-
- <li><a href=
- "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>
- corresponds to a guarantee that a point-type iterator, a
- found pointer, or a found reference, remains valid even if
- the container object is modified.</li>
-
- <li><a href=
- "range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>
- corresponds to a guarantee that a range-type iterator remains
- valid even if the container object is modified.</li>
- </ol>
-
- <p>As shown in <a href=
- "tutorial.html#assoc_find_range">Tutorial::Associative
- Containers::Point-Type and Range-Type Methods and
- Iterators</a>, to find the invalidation guarantee of a
- container, one can use</p>
- <pre>
-<b>typename</b> <a href=
-"assoc_container_traits.html">container_traits</a>&lt;Cntnr&gt;::invalidation_guarantee
-</pre>
-
- <p>which is one of the classes in Figure <a href=
- "#invalidation_guarantee_cd">Invalidation guarantees class
- hierarchy</a>.</p>
-
- <p>Note that this hierarchy corresponds to the logic it
- represents: if a container has range-invalidation guarantees,
- then it must also have find invalidation guarantees;
- correspondingly, its invalidation guarantee (in this case
- <a href=
- "range_invalidation_guarantee.html"><tt>range_invalidation_guarantee</tt></a>)
- can be cast to its base class (in this case <a href=
- "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>).
- This means that this this hierarchy can be used easily using
- standard metaprogramming techniques, by specializing on the
- type of <tt>invalidation_guarantee</tt>.</p>
-
- <p>(These types of problems were addressed, in a more general
- setting, in [<a href=
- "references.html#meyers96more">meyers96more</a>] - Item 2. In
- our opinion, an invalidation-guarantee hierarchy would solve
- these problems in all container types - not just associative
- containers.)</p>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html b/libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html
deleted file mode 100644
index fed7a4869d0..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/hash_based_containers.html
+++ /dev/null
@@ -1,835 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>Hash-Based Containers</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1>Hash Table Design</h1>
-
- <h2><a name="overview" id="overview">Overview</a></h2>
-
- <p>The collision-chaining hash-based container has the
- following declaration.</p>
- <pre>
-<b>template</b>&lt;
- <b>typename</b> Key,
- <b>typename</b> Mapped,
- <b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
- <b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
- <b>typename</b> Comb_Hash_Fn = <a href=
-"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
- <b>typename</b> Resize_Policy = <i>default explained below.</i>
- <b>bool</b> Store_Hash = <b>false</b>,
- <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
-<b>class</b> <a href=
-"cc_hash_table.html">cc_hash_table</a>;
-</pre>
-
- <p>The parameters have the following meaning:</p>
-
- <ol>
- <li><tt>Key</tt> is the key type.</li>
-
- <li><tt>Mapped</tt> is the mapped-policy, and is explained in
- <a href="tutorial.html#assoc_ms">Tutorial::Associative
- Containers::Associative Containers Others than Maps</a>.</li>
-
- <li><tt>Hash_Fn</tt> is a key hashing functor.</li>
-
- <li><tt>Eq_Fn</tt> is a key equivalence functor.</li>
-
- <li><tt>Comb_Hash_Fn</tt> is a <i>range-hashing_functor</i>;
- it describes how to translate hash values into positions
- within the table. This is described in <a href=
- "#hash_policies">Hash Policies</a>.</li>
-
- <li><tt>Resize_Policy</tt> describes how a container object
- should change its internal size. This is described in
- <a href="#resize_policies">Resize Policies</a>.</li>
-
- <li><tt>Store_Hash</tt> indicates whether the hash value
- should be stored with each entry. This is described in
- <a href="#policy_interaction">Policy Interaction</a>.</li>
-
- <li><tt>Allocator</tt> is an allocator
- type.</li>
- </ol>
-
- <p>The probing hash-based container has the following
- declaration.</p>
- <pre>
-<b>template</b>&lt;
- <b>typename</b> Key,
- <b>typename</b> Mapped,
- <b>typename</b> Hash_Fn = std::hash&lt;Key&gt;,
- <b>typename</b> Eq_Fn = std::equal_to&lt;Key&gt;,
- <b>typename</b> Comb_Probe_Fn = <a href=
-"direct_mask_range_hashing.html">direct_mask_range_hashing</a>&lt;&gt;
- <b>typename</b> Probe_Fn = <i>default explained below.</i>
- <b>typename</b> Resize_Policy = <i>default explained below.</i>
- <b>bool</b> Store_Hash = <b>false</b>,
- <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
-<b>class</b> <a href=
-"gp_hash_table.html">gp_hash_table</a>;
-</pre>
-
- <p>The parameters are identical to those of the
- collision-chaining container, except for the following.</p>
-
- <ol>
- <li><tt>Comb_Probe_Fn</tt> describes how to transform a probe
- sequence into a sequence of positions within the table.</li>
-
- <li><tt>Probe_Fn</tt> describes a probe sequence policy.</li>
- </ol>
-
- <p>Some of the default template values depend on the values of
- other parameters, and are explained in <a href=
- "#policy_interaction">Policy Interaction</a>.</p>
-
- <h2><a name="hash_policies" id="hash_policies">Hash
- Policies</a></h2>
-
- <h3><a name="general_terms" id="general_terms">General
- Terms</a></h3>
-
- <p>Following is an explanation of some functions which hashing
- involves. Figure <a href=
- "#hash_ranged_hash_range_hashing_fns">Hash functions,
- ranged-hash functions, and range-hashing functions</a>)
- illustrates the discussion.</p>
-
- <h6 class="c1"><a name="hash_ranged_hash_range_hashing_fns" id=
- "hash_ranged_hash_range_hashing_fns"><img src=
- "hash_ranged_hash_range_hashing_fns.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Hash functions, ranged-hash functions, and
- range-hashing functions.</h6>
-
- <p>Let <i>U</i> be a domain (<i>e.g.</i>, the integers, or the
- strings of 3 characters). A hash-table algorithm needs to map
- elements of <i>U</i> "uniformly" into the range <i>[0,..., m -
- 1]</i> (where <i>m</i> is a non-negative integral value, and
- is, in general, time varying). <i>I.e.</i>, the algorithm needs
- a <i>ranged-hash</i> function</p>
-
- <p><i>f : U &times; Z<sub>+</sub> &rarr; Z<sub>+</sub></i>
- ,</p>
-
- <p>such that for any <i>u</i> in <i>U</i> ,</p>
-
- <p><i>0 &le; f(u, m) &le; m - 1</i> ,</p>
-
- <p>and which has "good uniformity" properties [<a href=
- "references.html#knuth98sorting">knuth98sorting</a>]. One
- common solution is to use the composition of the hash
- function</p>
-
- <p><i>h : U &rarr; Z<sub>+</sub></i> ,</p>
-
- <p>which maps elements of <i>U</i> into the non-negative
- integrals, and</p>
-
- <p class="c2">g : Z<sub>+</sub> &times; Z<sub>+</sub> &rarr;
- Z<sub>+</sub>,</p>
-
- <p>which maps a non-negative hash value, and a non-negative
- range upper-bound into a non-negative integral in the range
- between 0 (inclusive) and the range upper bound (exclusive),
- <i>i.e.</i>, for any <i>r</i> in <i>Z<sub>+</sub></i>,</p>
-
- <p><i>0 &le; g(r, m) &le; m - 1</i> .</p>
-
- <p>The resulting ranged-hash function, is</p>
-
- <p><i><a name="ranged_hash_composed_of_hash_and_range_hashing"
- id="ranged_hash_composed_of_hash_and_range_hashing">f(u , m) =
- g(h(u), m)</a></i> (1) .</p>
-
- <p>From the above, it is obvious that given <i>g</i> and
- <i>h</i>, <i>f</i> can always be composed (however the converse
- is not true). The STL's hash-based containers allow specifying
- a hash function, and use a hard-wired range-hashing function;
- the ranged-hash function is implicitly composed.</p>
-
- <p>The above describes the case where a key is to be mapped
- into a <i>single position</i> within a hash table, <i>e.g.</i>,
- in a collision-chaining table. In other cases, a key is to be
- mapped into a <i>sequence of positions</i> within a table,
- <i>e.g.</i>, in a probing table. Similar terms apply in this
- case: the table requires a <i>ranged probe</i> function,
- mapping a key into a sequence of positions withing the table.
- This is typically achieved by composing a <i>hash function</i>
- mapping the key into a non-negative integral type, a
- <i>probe</i> function transforming the hash value into a
- sequence of hash values, and a <i>range-hashing</i> function
- transforming the sequence of hash values into a sequence of
- positions.</p>
-
- <h3><a name="range_hashing_fns" id=
- "range_hashing_fns">Range-Hashing Functions</a></h3>
-
- <p>Some common choices for range-hashing functions are the
- division, multiplication, and middle-square methods [<a href=
- "references.html#knuth98sorting">knuth98sorting</a>], defined
- as</p>
-
- <p><i><a name="division_method" id="division_method">g(r, m) =
- r mod m</a></i> (2) ,</p>
-
- <p><i>g(r, m) = &lceil; u/v ( a r mod v ) &rceil;</i> ,</p>
-
- <p>and</p>
-
- <p><i>g(r, m) = &lceil; u/v ( r<sup>2</sup> mod v ) &rceil;</i>
- ,</p>
-
- <p>respectively, for some positive integrals <i>u</i> and
- <i>v</i> (typically powers of 2), and some <i>a</i>. Each of
- these range-hashing functions works best for some different
- setting.</p>
-
- <p>The division method <a href="#division_method">(2)</a> is a
- very common choice. However, even this single method can be
- implemented in two very different ways. It is possible to
- implement <a href="#division_method">(2)</a> using the low
- level <i>%</i> (modulo) operation (for any <i>m</i>), or the
- low level <i>&amp;</i> (bit-mask) operation (for the case where
- <i>m</i> is a power of 2), <i>i.e.</i>,</p>
-
- <p><i><a name="division_method_prime_mod" id=
- "division_method_prime_mod">g(r, m) = r % m</a></i> (3) ,</p>
-
- <p>and</p>
-
- <p><i><a name="division_method_bit_mask" id=
- "division_method_bit_mask">g(r, m) = r &amp; m - 1, (m =
- 2<sup>k</sup>)</a></i> for some <i>k)</i> (4),</p>
-
- <p>respectively.</p>
-
- <p>The <i>%</i> (modulo) implementation <a href=
- "#division_method_prime_mod">(3)</a> has the advantage that for
- <i>m</i> a prime far from a power of 2, <i>g(r, m)</i> is
- affected by all the bits of <i>r</i> (minimizing the chance of
- collision). It has the disadvantage of using the costly modulo
- operation. This method is hard-wired into SGI's implementation
- [<a href="references.html#sgi_stl">sgi_stl</a>].</p>
-
- <p>The <i>&amp;</i> (bit-mask) implementation <a href=
- "#division_method_bit_mask">(4)</a> has the advantage of
- relying on the fast bit-wise and operation. It has the
- disadvantage that for <i>g(r, m)</i> is affected only by the
- low order bits of <i>r</i>. This method is hard-wired into
- Dinkumware's implementation [<a href=
- "references.html#dinkumware_stl">dinkumware_stl</a>].</p>
-
- <h3><a name="hash_policies_ranged_hash_policies" id=
- "hash_policies_ranged_hash_policies">Ranged-Hash
- Functions</a></h3>
-
- <p>In cases it is beneficial to allow the
- client to directly specify a ranged-hash hash function. It is
- true, that the writer of the ranged-hash function cannot rely
- on the values of <i>m</i> having specific numerical properties
- suitable for hashing (in the sense used in [<a href=
- "references.html#knuth98sorting">knuth98sorting</a>]), since
- the values of <i>m</i> are determined by a resize policy with
- possibly orthogonal considerations.</p>
-
- <p>There are two cases where a ranged-hash function can be
- superior. The firs is when using perfect hashing [<a href=
- "references.html#knuth98sorting">knuth98sorting</a>]; the
- second is when the values of <i>m</i> can be used to estimate
- the "general" number of distinct values required. This is
- described in the following.</p>
-
- <p>Let</p>
-
- <p class="c2">s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>]</p>
-
- <p>be a string of <i>t</i> characters, each of which is from
- domain <i>S</i>. Consider the following ranged-hash
- function:</p>
-
- <p><a name="total_string_dna_hash" id=
- "total_string_dna_hash"><i>f<sub>1</sub>(s, m) = &sum; <sub>i =
- 0</sub><sup>t - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
- <i>m</i></a> (5) ,</p>
-
- <p>where <i>a</i> is some non-negative integral value. This is
- the standard string-hashing function used in SGI's
- implementation (with <i>a = 5</i>) [<a href=
- "references.html#sgi_stl">sgi_stl</a>]. Its advantage is that
- it takes into account all of the characters of the string.</p>
-
- <p>Now assume that <i>s</i> is the string representation of a
- of a long DNA sequence (and so <i>S = {'A', 'C', 'G',
- 'T'}</i>). In this case, scanning the entire string might be
- prohibitively expensive. A possible alternative might be to use
- only the first <i>k</i> characters of the string, where</p>
-
- <p>k <sup>|S|</sup> &ge; m ,</p>
-
- <p><i>i.e.</i>, using the hash function</p>
-
- <p><a name="only_k_string_dna_hash" id=
- "only_k_string_dna_hash"><i>f<sub>2</sub>(s, m) = &sum; <sub>i
- = 0</sub><sup>k - 1</sup> s<sub>i</sub> a<sup>i</sup></i> mod
- <i>m</i></a> , (6)</p>
-
- <p>requiring scanning over only</p>
-
- <p><i>k =</i> log<i><sub>4</sub>( m )</i></p>
-
- <p>characters.</p>
-
- <p>Other more elaborate hash-functions might scan <i>k</i>
- characters starting at a random position (determined at each
- resize), or scanning <i>k</i> random positions (determined at
- each resize), <i>i.e.</i>, using</p>
-
- <p><i>f<sub>3</sub>(s, m) = &sum; <sub>i =
- r</sub>0</i><sup>r<sub>0</sub> + k - 1</sup> s<sub>i</sub>
- a<sup>i</sup> mod <i>m</i> ,</p>
-
- <p>or</p>
-
- <p><i>f<sub>4</sub>(s, m) = &sum; <sub>i = 0</sub><sup>k -
- 1</sup> s<sub>r</sub>i</i> a<sup>r<sub>i</sub></sup> mod
- <i>m</i> ,</p>
-
- <p>respectively, for <i>r<sub>0</sub>,..., r<sub>k-1</sub></i>
- each in the (inclusive) range <i>[0,...,t-1]</i>.</p>
-
- <p>It should be noted that the above functions cannot be
- decomposed as <a href=
- "#ranged_hash_composed_of_hash_and_range_hashing">(1)</a> .</p>
-
- <h3><a name="pb_ds_imp" id="pb_ds_imp">Implementation</a></h3>
-
- <p>This sub-subsection describes the implementation of the
- above in <tt>pb_ds</tt>. It first explains range-hashing
- functions in collision-chaining tables, then ranged-hash
- functions in collision-chaining tables, then probing-based
- tables, and, finally, lists the relevant classes in
- <tt>pb_ds</tt>.</p>
-
- <h4>Range-Hashing and Ranged-Hashes in Collision-Chaining
- Tables</h4>
-
- <p><a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a> is
- parametrized by <tt>Hash_Fn</tt> and <tt>Comb_Hash_Fn</tt>, a
- hash functor and a combining hash functor, respectively.</p>
-
- <p>In general, <tt>Comb_Hash_Fn</tt> is considered a
- range-hashing functor. <a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a>
- synthesizes a ranged-hash function from <tt>Hash_Fn</tt> and
- <tt>Comb_Hash_Fn</tt> (see <a href=
- "#ranged_hash_composed_of_hash_and_range_hashing">(1)</a>
- above). Figure <a href="#hash_range_hashing_seq_diagram">Insert
- hash sequence diagram</a> shows an <tt>insert</tt> sequence
- diagram for this case. The user inserts an element (point A),
- the container transforms the key into a non-negative integral
- using the hash functor (points B and C), and transforms the
- result into a position using the combining functor (points D
- and E).</p>
-
- <h6 class="c1"><a name="hash_range_hashing_seq_diagram" id=
- "hash_range_hashing_seq_diagram"><img src=
- "hash_range_hashing_seq_diagram.png" alt="no image" /></a></h6>
-
- <h6 class="c1">Insert hash sequence diagram.</h6>
-
- <p>If <a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a>'s
- hash-functor, <tt>Hash_Fn</tt> is instantiated by <a href=
- "null_hash_fn.html"><tt>null_hash_fn</tt></a> (see <a href=
- "concepts.html#concepts_null_policies">Interface::Concepts::Null
- Policy Classes</a>), then <tt>Comb_Hash_Fn</tt> is taken to be
- a ranged-hash function. Figure <a href=
- "#hash_range_hashing_seq_diagram2">Insert hash sequence diagram
- with a null hash policy</a> shows an <tt>insert</tt> sequence
- diagram. The user inserts an element (point A), the container
- transforms the key into a position using the combining functor
- (points B and C).</p>
-
- <h6 class="c1"><a name="hash_range_hashing_seq_diagram2" id=
- "hash_range_hashing_seq_diagram2"><img src=
- "hash_range_hashing_seq_diagram2.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Insert hash sequence diagram with a null hash
- policy.</h6>
-
- <h4>Probing Tables</h4>
-
- <p><a href=
- "gp_hash_table.html"></a><tt>gp_hash_table</tt> is
- parametrized by <tt>Hash_Fn</tt>, <tt>Probe_Fn</tt>, and
- <tt>Comb_Probe_Fn</tt>. As before, if <tt>Probe_Fn</tt> and
- <tt>Comb_Probe_Fn</tt> are, respectively, <a href=
- "null_hash_fn.html"><tt>null_hash_fn</tt></a> and <a href=
- "null_probe_fn.html"><tt>null_probe_fn</tt></a>, then
- <tt>Comb_Probe_Fn</tt> is a ranged-probe functor. Otherwise,
- <tt>Hash_Fn</tt> is a hash functor, <tt>Probe_Fn</tt> is a
- functor for offsets from a hash value, and
- <tt>Comb_Probe_Fn</tt> transforms a probe sequence into a
- sequence of positions within the table.</p>
-
- <h4>Pre-Defined Policies</h4>
-
- <p><tt>pb_ds</tt> contains some pre-defined classes
- implementing range-hashing and probing functions:</p>
-
- <ol>
- <li><a href=
- "direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
- and <a href=
- "direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
- are range-hashing functions based on a bit-mask and a modulo
- operation, respectively.</li>
-
- <li><a href=
- "linear_probe_fn.html"><tt>linear_probe_fn</tt></a>, and
- <a href=
- "quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a> are
- a linear probe and a quadratic probe function,
- respectively.</li>
- </ol>Figure <a href="#hash_policy_cd">Hash policy class
- diagram</a> shows a class diagram.
-
- <h6 class="c1"><a name="hash_policy_cd" id=
- "hash_policy_cd"><img src="hash_policy_cd.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Hash policy class diagram.</h6>
-
- <h2><a name="resize_policies" id="resize_policies">Resize
- Policies</a></h2>
-
- <h3><a name="general" id="general">General Terms</a></h3>
-
- <p>Hash-tables, as opposed to trees, do not naturally grow or
- shrink. It is necessary to specify policies to determine how
- and when a hash table should change its size. Usually, resize
- policies can be decomposed into orthogonal policies:</p>
-
- <ol>
- <li>A <i>size policy</i> indicating <i>how</i> a hash table
- should grow (<i>e.g.,</i> it should multiply by powers of
- 2).</li>
-
- <li>A <i>trigger policy</i> indicating <i>when</i> a hash
- table should grow (<i>e.g.,</i> a load factor is
- exceeded).</li>
- </ol>
-
- <h3><a name="size_policies" id="size_policies">Size
- Policies</a></h3>
-
- <p>Size policies determine how a hash table changes size. These
- policies are simple, and there are relatively few sensible
- options. An exponential-size policy (with the initial size and
- growth factors both powers of 2) works well with a mask-based
- range-hashing function (see <a href=
- "#hash_policies">Range-Hashing Policies</a>), and is the
- hard-wired policy used by Dinkumware [<a href=
- "references.html#dinkumware_stl">dinkumware_stl</a>]. A
- prime-list based policy works well with a modulo-prime range
- hashing function (see <a href="#hash_policies">Range-Hashing
- Policies</a>), and is the hard-wired policy used by SGI's
- implementation [<a href=
- "references.html#sgi_stl">sgi_stl</a>].</p>
-
- <h3><a name="trigger_policies" id="trigger_policies">Trigger
- Policies</a></h3>
-
- <p>Trigger policies determine when a hash table changes size.
- Following is a description of two policies: <i>load-check</i>
- policies, and collision-check policies.</p>
-
- <p>Load-check policies are straightforward. The user specifies
- two factors, <i>&alpha;<sub>min</sub></i> and
- <i>&alpha;<sub>max</sub></i>, and the hash table maintains the
- invariant that</p>
-
- <p><i><a name="load_factor_min_max" id=
- "load_factor_min_max">&alpha;<sub>min</sub> &le; (number of
- stored elements) / (hash-table size) &le;
- &alpha;<sub>max</sub></a></i> (1) .</p>
-
- <p>Collision-check policies work in the opposite direction of
- load-check policies. They focus on keeping the number of
- collisions moderate and hoping that the size of the table will
- not grow very large, instead of keeping a moderate load-factor
- and hoping that the number of collisions will be small. A
- maximal collision-check policy resizes when the longest
- probe-sequence grows too large.</p>
-
- <p>Consider Figure <a href="#balls_and_bins">Balls and
- bins</a>. Let the size of the hash table be denoted by
- <i>m</i>, the length of a probe sequence be denoted by
- <i>k</i>, and some load factor be denoted by &alpha;. We would
- like to calculate the minimal length of <i>k</i>, such that if
- there were <i>&alpha; m</i> elements in the hash table, a probe
- sequence of length <i>k</i> would be found with probability at
- most <i>1/m</i>.</p>
-
- <h6 class="c1"><a name="balls_and_bins" id=
- "balls_and_bins"><img src="balls_and_bins.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Balls and bins.</h6>
-
- <p>Denote the probability that a probe sequence of length
- <i>k</i> appears in bin <i>i</i> by <i>p<sub>i</sub></i>, the
- length of the probe sequence of bin <i>i</i> by
- <i>l<sub>i</sub></i>, and assume uniform distribution. Then</p>
-
- <p><a name="prob_of_p1" id=
- "prob_of_p1"><i>p<sub>1</sub></i></a> = (3)</p>
-
- <p class="c2"><b>P</b>(l<sub>1</sub> &ge; k) =</p>
-
- <p><i><b>P</b>(l<sub>1</sub> &ge; &alpha; ( 1 + k / &alpha; - 1
- ) &le;</i> (a)</p>
-
- <p><i>e ^ ( - ( &alpha; ( k / &alpha; - 1 )<sup>2</sup> ) /2
- )</i> ,</p>
-
- <p>where (a) follows from the Chernoff bound [<a href=
- "references.html#motwani95random">motwani95random</a>]. To
- calculate the probability that <i>some</i> bin contains a probe
- sequence greater than <i>k</i>, we note that the
- <i>l<sub>i</sub></i> are negatively-dependent [<a href=
- "references.html#dubhashi98neg">dubhashi98neg</a>]. Let
- <i><b>I</b>(.)</i> denote the indicator function. Then</p>
-
- <p><a name="at_least_k_i_n_some_bin" id=
- "at_least_k_i_n_some_bin"><i><b>P</b>( exists<sub>i</sub>
- l<sub>i</sub> &ge; k ) =</i> (3)</a></p>
-
- <p class="c2"><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup>
- <b>I</b>(l<sub>i</sub> &ge; k) &ge; 1 ) =</p>
-
- <p><i><b>P</b> ( &sum; <sub>i = 1</sub><sup>m</sup> <b>I</b> (
- l<sub>i</sub> &ge; k ) &ge; m p<sub>1</sub> ( 1 + 1 / (m
- p<sub>1</sub>) - 1 ) ) &le;</i> (a)</p>
-
- <p class="c2">e ^ ( ( - m p<sub>1</sub> ( 1 / (m p<sub>1</sub>)
- - 1 ) <sup>2</sup> ) / 2 ) ,</p>
-
- <p>where (a) follows from the fact that the Chernoff bound can
- be applied to negatively-dependent variables [<a href=
- "references.html#dubhashi98neg">dubhashi98neg</a>]. Inserting
- <a href="#prob_of_p1">(2)</a> into <a href=
- "#at_least_k_i_n_some_bin">(3)</a>, and equating with
- <i>1/m</i>, we obtain</p>
-
- <p><i>k ~ &radic; ( 2 &alpha;</i> ln <i>2 m</i> ln<i>(m) )
- )</i> .</p>
-
- <h3><a name="imp_pb_ds" id="imp_pb_ds">Implementation</a></h3>
-
- <p>This sub-subsection describes the implementation of the
- above in <tt>pb_ds</tt>. It first describes resize policies and
- their decomposition into trigger and size policies, then
- describes pre-defined classes, and finally discusses controlled
- access the policies' internals.</p>
-
- <h4>Resize Policies and Their Decomposition</h4>
-
- <p>Each hash-based container is parametrized by a
- <tt>Resize_Policy</tt> parameter; the container derives
- <tt><b>public</b></tt>ly from <tt>Resize_Policy</tt>. For
- example:</p>
- <pre>
-<a href="cc_hash_table.html">cc_hash_table</a>&lt;
- <b>typename</b> Key,
- <b>typename</b> Mapped,
- ...
- <b>typename</b> Resize_Policy
- ...&gt; :
- <b>public</b> Resize_Policy
-</pre>
-
- <p>As a container object is modified, it continuously notifies
- its <tt>Resize_Policy</tt> base of internal changes
- (<i>e.g.</i>, collisions encountered and elements being
- inserted). It queries its <tt>Resize_Policy</tt> base whether
- it needs to be resized, and if so, to what size.</p>
-
- <p>Figure <a href="#insert_resize_sequence_diagram1">Insert
- resize sequence diagram</a> shows a (possible) sequence diagram
- of an insert operation. The user inserts an element; the hash
- table notifies its resize policy that a search has started
- (point A); in this case, a single collision is encountered -
- the table notifies its resize policy of this (point B); the
- container finally notifies its resize policy that the search
- has ended (point C); it then queries its resize policy whether
- a resize is needed, and if so, what is the new size (points D
- to G); following the resize, it notifies the policy that a
- resize has completed (point H); finally, the element is
- inserted, and the policy notified (point I).</p>
-
- <h6 class="c1"><a name="insert_resize_sequence_diagram1" id=
- "insert_resize_sequence_diagram1"><img src=
- "insert_resize_sequence_diagram1.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Insert resize sequence diagram.</h6>
-
- <p>In practice, a resize policy can be usually orthogonally
- decomposed to a size policy and a trigger policy. Consequently,
- the library contains a single class for instantiating a resize
- policy: <a href=
- "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- is parametrized by <tt>Size_Policy</tt> and
- <tt>Trigger_Policy</tt>, derives <tt><b>public</b></tt>ly from
- both, and acts as a standard delegate [<a href=
- "references.html#gamma95designpatterns">gamma95designpatterns</a>]
- to these policies.</p>
-
- <p>Figures <a href="#insert_resize_sequence_diagram2">Standard
- resize policy trigger sequence diagram</a> and <a href=
- "#insert_resize_sequence_diagram3">Standard resize policy size
- sequence diagram</a> show sequence diagrams illustrating the
- interaction between the standard resize policy and its trigger
- and size policies, respectively.</p>
-
- <h6 class="c1"><a name="insert_resize_sequence_diagram2" id=
- "insert_resize_sequence_diagram2"><img src=
- "insert_resize_sequence_diagram2.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Standard resize policy trigger sequence
- diagram.</h6>
-
- <h6 class="c1"><a name="insert_resize_sequence_diagram3" id=
- "insert_resize_sequence_diagram3"><img src=
- "insert_resize_sequence_diagram3.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Standard resize policy size sequence
- diagram.</h6>
-
- <h4>Pre-Defined Policies</h4>
-
- <p>The library includes the following
- instantiations of size and trigger policies:</p>
-
- <ol>
- <li><a href=
- "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- implements a load check trigger policy.</li>
-
- <li><a href=
- "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
- implements a collision check trigger policy.</li>
-
- <li><a href=
- "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
- implements an exponential-size policy (which should be used
- with mask range hashing).</li>
-
- <li><a href=
- "hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
- implementing a size policy based on a sequence of primes
- [<a href="references.html#sgi_stl">sgi_stl</a>] (which should
- be used with mod range hashing</li>
- </ol>
-
- <p>Figure <a href="#resize_policy_cd">Resize policy class
- diagram</a> gives an overall picture of the resize-related
- classes. <a href=
- "basic_hash_table.html"><tt>basic_hash_table</tt></a>
- is parametrized by <tt>Resize_Policy</tt>, which it subclasses
- publicly. This class is currently instantiated only by <a href=
- "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.
- <a href=
- "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- itself is parametrized by <tt>Trigger_Policy</tt> and
- <tt>Size_Policy</tt>. Currently, <tt>Trigger_Policy</tt> is
- instantiated by <a href=
- "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>,
- or <a href=
- "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>;
- <tt>Size_Policy</tt> is instantiated by <a href=
- "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>,
- or <a href=
- "hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>.</p>
-
- <h6 class="c1"><a name="resize_policy_cd" id=
- "resize_policy_cd"><img src="resize_policy_cd.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Resize policy class diagram.</h6>
-
- <h4>Controlled Access to Policies' Internals</h4>
-
- <p>There are cases where (controlled) access to resize
- policies' internals is beneficial. <i>E.g.</i>, it is sometimes
- useful to query a hash-table for the table's actual size (as
- opposed to its <tt>size()</tt> - the number of values it
- currently holds); it is sometimes useful to set a table's
- initial size, externally resize it, or change load factors.</p>
-
- <p>Clearly, supporting such methods both decreases the
- encapsulation of hash-based containers, and increases the
- diversity between different associative-containers' interfaces.
- Conversely, omitting such methods can decrease containers'
- flexibility.</p>
-
- <p>In order to avoid, to the extent possible, the above
- conflict, the hash-based containers themselves do not address
- any of these questions; this is deferred to the resize policies,
- which are easier to change or replace. Thus, for example,
- neither <a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a> nor
- <a href=
- "gp_hash_table.html"><tt>gp_hash_table</tt></a>
- contain methods for querying the actual size of the table; this
- is deferred to <a href=
- "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>.</p>
-
- <p>Furthermore, the policies themselves are parametrized by
- template arguments that determine the methods they support
- ([<a href=
- "references.html#alexandrescu01modern">alexandrescu01modern</a>]
- shows techniques for doing so). <a href=
- "hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- is parametrized by <tt>External_Size_Access</tt> that
- determines whether it supports methods for querying the actual
- size of the table or resizing it. <a href=
- "hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- is parametrized by <tt>External_Load_Access</tt> that
- determines whether it supports methods for querying or
- modifying the loads. <a href=
- "cc_hash_max_collision_check_resize_trigger.html"><tt>cc_hash_max_collision_check_resize_trigger</tt></a>
- is parametrized by <tt>External_Load_Access</tt> that
- determines whether it supports methods for querying the
- load.</p>
-
- <p>Some operations, for example, resizing a container at
- run time, or changing the load factors of a load-check trigger
- policy, require the container itself to resize. As mentioned
- above, the hash-based containers themselves do not contain
- these types of methods, only their resize policies.
- Consequently, there must be some mechanism for a resize policy
- to manipulate the hash-based container. As the hash-based
- container is a subclass of the resize policy, this is done
- through virtual methods. Each hash-based container has a
- <tt><b>private</b></tt> <tt><b>virtual</b></tt> method:</p>
- <pre>
-<b>virtual void</b>
- do_resize
- (size_type new_size);
-</pre>
-
- <p>which resizes the container. Implementations of
- <tt>Resize_Policy</tt> can export public methods for resizing
- the container externally; these methods internally call
- <tt>do_resize</tt> to resize the table.</p>
-
- <h2><a name="policy_interaction" id="policy_interaction">Policy
- Interaction</a></h2>
-
- <p>Hash-tables are unfortunately especially susceptible to
- choice of policies. One of the more complicated aspects of this
- is that poor combinations of good policies can form a poor
- container. Following are some considerations.</p>
-
- <h3><a name="policy_interaction_probe_size_trigger" id=
- "policy_interaction_probe_size_trigger">Probe Policies, Size
- Policies, and Trigger Policies</a></h3>
-
- <p>Some combinations do not work well for probing containers.
- For example, combining a quadratic probe policy with an
- exponential size policy can yield a poor container: when an
- element is inserted, a trigger policy might decide that there
- is no need to resize, as the table still contains unused
- entries; the probe sequence, however, might never reach any of
- the unused entries.</p>
-
- <p>Unfortunately, <tt>pb_ds</tt> cannot detect such problems at
- compilation (they are halting reducible). It therefore defines
- an exception class <a href=
- "insert_error.html"><tt>insert_error</tt></a> to throw an
- exception in this case.</p>
-
- <h3><a name="policy_interaction_hash_trigger" id=
- "policy_interaction_hash_trigger">Hash Policies and Trigger
- Policies</a></h3>
-
- <p>Some trigger policies are especially susceptible to poor
- hash functions. Suppose, as an extreme case, that the hash
- function transforms each key to the same hash value. After some
- inserts, a collision detecting policy will always indicate that
- the container needs to grow.</p>
-
- <p>The library, therefore, by design, limits each operation to
- one resize. For each <tt>insert</tt>, for example, it queries
- only once whether a resize is needed.</p>
-
- <h3><a name="policy_interaction_eq_sth_hash" id=
- "policy_interaction_eq_sth_hash">Equivalence Functors, Storing
- Hash Values, and Hash Functions</a></h3>
-
- <p><a href=
- "cc_hash_table.html"><tt>cc_hash_table</tt></a> and
- <a href=
- "gp_hash_table.html"><tt>gp_hash_table</tt></a> are
- parametrized by an equivalence functor and by a
- <tt>Store_Hash</tt> parameter. If the latter parameter is
- <tt><b>true</b></tt>, then the container stores with each entry
- a hash value, and uses this value in case of collisions to
- determine whether to apply a hash value. This can lower the
- cost of collision for some types, but increase the cost of
- collisions for other types.</p>
-
- <p>If a ranged-hash function or ranged probe function is
- directly supplied, however, then it makes no sense to store the
- hash value with each entry. <tt>pb_ds</tt>'s container will
- fail at compilation, by design, if this is attempted.</p>
-
- <h3><a name="policy_interaction_size_load_check" id=
- "policy_interaction_size_load_check">Size Policies and
- Load-Check Trigger Policies</a></h3>
-
- <p>Assume a size policy issues an increasing sequence of sizes
- <i>a, a q, a q<sup>1</sup>, a q<sup>2</sup>, ...</i> For
- example, an exponential size policy might issue the sequence of
- sizes <i>8, 16, 32, 64, ...</i></p>
-
- <p>If a load-check trigger policy is used, with loads
- <i>&alpha;<sub>min</sub></i> and <i>&alpha;<sub>max</sub></i>,
- respectively, then it is a good idea to have:</p>
-
- <ol>
- <li><i>&alpha;<sub>max</sub> ~ 1 / q</i></li>
-
- <li><i>&alpha;<sub>min</sub> &lt; 1 / (2 q)</i></li>
- </ol>
-
- <p>This will ensure that the amortized hash cost of each
- modifying operation is at most approximately 3.</p>
-
- <p><i>&alpha;<sub>min</sub> ~ &alpha;<sub>max</sub></i> is, in
- any case, a bad choice, and <i>&alpha;<sub>min</sub> &gt;
- &alpha;<sub>max</sub></i> is horrendous.</p>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/index.html b/libstdc++-v3/docs/html/ext/pb_ds/index.html
deleted file mode 100644
index 9288544d04c..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/index.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>Policy-Based Data Structures</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1>Policy-Based Data Structures</h1>
-
- <h5>Ami Tavory and Vladimir Dreizin, IBM Haifa Research
- Laboratories, and Benjamin Kosnik, Red Hat</h5>
-
- <h5><a href="mailto:pbassoc@gmail.com">pbassoc@gmail.com</a></h5>
-
- <p>This is a library of policy-based elementary
- data structures: associative containers and priority queues. It
- is designed for high-performance, flexibility, semantic safety,
- and conformance to the corresponding containers in <tt>std</tt>
- and std::tr1 (except for some points where it differs by
- design).</p>
-
- <p>The documentation is organized as follows:</p>
-
- <ol>
- <li>
- <a href="introduction.html">Introductory</a>
-
- <ol>
- <li><a href="introduction.html">Introduction</a></li>
-
- <li><a href="motivation.html">Motivation</a></li>
-
- <li><a href="prerequisites.html">Usage
- Prerequisites</a></li>
- </ol>
- </li>
-
- <li>
- <a href="interface.html">Interface</a>
-
- <ol>
- <li><a href="tutorial.html">Short Tutorial</a></li>
-
- <li><a href="concepts.html">Concepts</a></li>
-
- <li><a href="interface.html">Specifics</a</li>
- </ol>
- </li>
-
- <li>
- <a href="design.html">Design</a>
-
- <ol>
- <li>
- <a href="assoc_design.html">Associative Containers</a>
-
- <ol>
- <li><a href="ds_gen.html">Data-Structure
- Genericity and Interface</a> </li>
-
- <li><a href="tree_based_containers.html">Tree-Based
- Containers</a></li>
-
- <li><a href="trie_based_containers.html">Trie-Based
- Containers</a></li>
-
- <li><a href="hash_based_containers.html">Hash-Based
- Containers</a></li>
-
- <li><a href="lu_based_containers.html">List-Based
- Containers</a> </li>
- </ol>
- </li>
-
- <li><a href="pq_design.html">Priority Queues</a></li>
- </ol>
- </li>
-
- <li>
- <a href="examples.html">Examples</a>
-
- <ol>
- <li><a href="assoc_examples.html">Associative
- Containers</a></li>
-
- <li><a href="pq_examples.html">Priority Queues</a></li>
- </ol>
- </li>
-
- <li>
- <a href="tests.html">Tests</a>
-
- <ol>
- <li>
- <a href="assoc_tests.html">Associative Containers</a>
-
- <ol>
- <li><a href="assoc_regression_tests.html">Regression
- Tests</a></li>
-
- <li><a href=
- "assoc_performance_tests.html">Performance
- Tests</a></li>
- </ol>
- </li>
-
- <li>
- <a href="pq_tests.html">Priority Queues</a>
-
- <ol>
- <li><a href="pq_regression_tests.html">Regression
- Tests</a></li>
-
- <li><a href="pq_performance_tests.html">Performance
- Tests</a></li>
- </ol>
- </li>
- </ol>
- </li>
-
- <li>
- <a href="misc.html">Misc.</a>
-
- <ol>
- <li><a href="acks.html">Acknowledgments</a></li>
-
- <li><a href="contact.html">Contact</a></li>
-
- <li><a href="disclaimer.html">Disclaimer and
- Copyright</a></li>
-
- <li><a href="references.html">References</a></li>
- </ol>
- </li>
- </ol>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large.html
deleted file mode 100644
index e3b1a2cd6bc..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_large.html
+++ /dev/null
@@ -1,215 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>"Multimap" Text Find Timing Test with Large Average
- Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Find Timing Test with Large Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 100 distinct primary keys, and the ratio of secondary keys
- to primary keys ranges to about 20.</p>
-<p>The test measures the average find-time as a function of the
- number of values inserted. For <tt>pb_ds</tt>'s containers, it
- finds the secondary key from a container obtained from finding
- a primary key. For the native multimaps, it searches a range
- obtained using <tt>std::equal_range</tt> on a primary key.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_find_timing.cc"><tt>multimap_text_find_timing_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the find-time scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Mapping Semantics</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_find_timing_test_large_s2p_tree">
-<div id="NTG_assoc">
-<div id="NTG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_find_timing_test_large_s2p_tree">
-<div id="NTM_assoc">
-<div id="NTM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_find_timing_test_large_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_find_timing_test_large_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_find_timing_test_large_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_find_timing_test_large_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small.html
deleted file mode 100644
index cec52ff8090..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_find_timing_test_small.html
+++ /dev/null
@@ -1,215 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>"Multimap" Text Find Timing Test with Small Average
- Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Find Timing Test with Small Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 400 distinct primary keys, and the ratio of secondary keys
- to primary keys ranges from 1 to 5.</p>
-<p>The test measures the average find-time as a function of the
- number of values inserted. For <tt>pb_ds</tt>'s containers, it
- finds the secondary key from a container obtained from finding
- a primary key. For the native multimaps, it searches a range
- obtained using <tt>std::equal_range</tt> on a primary key.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_find_timing.cc"><tt>multimap_text_find_timing_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 400 1 1 6)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the find-time scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Mapping Semantics</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_find_timing_test_small_s2p_tree">
-<div id="NTG_assoc">
-<div id="NHG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: NHG Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_find_timing_test_small_s2p_tree">
-<div id="NTM_assoc">
-<div id="NHM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_find_timing_test_small_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_find_timing_test_small_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_find_timing_test_small_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_find_timing_test_small_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html
deleted file mode 100644
index 00d4146d7dc..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_large.html
+++ /dev/null
@@ -1,210 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>Hash-List "Multimap" Text Memory Use Test with Large
- Average Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Memory Use Test with Large Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 100 distinct primary keys. The test measures the memory use
- as a function of the number of values inserted.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 100 200 2100 100)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the memory scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Mapping Semantics</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_insert_mem_usage_test_large_s2p_tree">
-<div id="NTG_assoc">
-<div id="NHG_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: NHG Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_insert_mem_usage_test_large_s2p_tree">
-<div id="NTM_assoc">
-<div id="NHM_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_insert_mem_usage_test_large_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_mem_usage_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_insert_mem_usage_test_large_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_insert_mem_usage_test_large_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_insert_mem_usage_test_large_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL__Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_mem_usage_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html
deleted file mode 100644
index 63ec4a9c9db..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_mem_usage_test_small.html
+++ /dev/null
@@ -1,212 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>Hash-List "Multimap" Text Memory Use Test with Small
- Average Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Memory Use Test with Small Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 100 distinct primary keys, and the ratio of secondary keys
- to primary keys ranges to about 20.</p>
-<p>The test measures the memory use as a function of the number
- of values inserted.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the memory scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Mapping Semantics</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_insert_mem_usage_test_small_s2p_tree">
-<div id="NTG_assoc">
-<div id="NTG_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_insert_mem_usage_test_small_s2p_tree">
-<div id="NTM_assoc">
-<div id="NHM_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_insert_mem_usage_test_small_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_mem_usage_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_insert_mem_usage_test_small_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_insert_mem_usage_test_small_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types mem usage test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_insert_mem_usage_test_small_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL__Native_and_primary_hash-based_multimap_types_mem_usage_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_mem_usage_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large.html
deleted file mode 100644
index 770bae9bd64..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_large.html
+++ /dev/null
@@ -1,212 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>"Multimap" Text Insert Timing Test with Large Average
- Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Insert Timing Test with Large Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 100 distinct primary keys, and the ratio of secondary keys
- to primary keys ranges to about 20.</p>
-<p>The test measures the memory use as a function of the number
- of values inserted.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 400 1 6 6)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the insert-time scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Mapping Semantics</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_insert_timing_test_large_s2p_tree">
-<div id="NTG_assoc">
-<div id="NTG_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_timing_test_large_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_insert_timing_test_large_s2p_tree">
-<div id="NTM_assoc">
-<div id="NHM_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_timing_test_large_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_insert_timing_test_large_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_timing_test_large_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_insert_timing_test_large_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_timing_test_large_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_insert_timing_test_large_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_timing_test_large_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_insert_timing_test_large_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL__Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_timing_test_large_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small.html b/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small.html
deleted file mode 100644
index bf9ff30b364..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/multimap_text_insert_timing_test_small.html
+++ /dev/null
@@ -1,217 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
-<meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-<title>"Multimap" Text Insert Timing Test with Small Average
- Secondary-Key to Primary-Key Ratio</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<div id="page">
-<h1>"Multimap" Text Insert Timing Test with Small Average
- Secondary-Key to Primary-Key Ratio</h1>
-<h2><a name="description" id="description">Description</a></h2>
-<p>This test inserts a number of pairs into a container. The
- first item of each pair is a string from an arbitrary text
- [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
- the second is a uniform i.i.d.integer. The container is a
- "multimap" - it considers the first member of each pair as a
- primary key, and the second member of each pair as a secondary
- key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>). There
- are 400 distinct primary keys, and the ratio of secondary keys
- to primary keys ranges from 1 to 5.</p>
-<p>The test measures the average insert-time as a function of
- the number of values inserted. For <tt>pb_ds</tt>'s containers,
- it inserts a primary key into the primary associative
- container, then a secondary key into the secondary associative
- container. For the native multimaps, it obtains a range using
- <tt>std::equal_range</tt>, and inserts a value only if it was
- not contained already.</p>
-<p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_insert_timing.cc"><tt>multimap_text_insert_timing_test</tt></a>
- thirty_years_among_the_dead_preproc.txt 400 1 1 6)</p>
-<h2><a name="purpose" id="purpose">Purpose</a></h2>
-<p>The test checks the insert-time scalability of different
- "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
- Containers::Alternative to Multiple Equivalent Keys</a>).</p>
-<h2><a name="results" id="results">Results</a></h2>
-<p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
- <a href="#NTL">NTL</a> show the results for "multimaps" which
- use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
- <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
- "multimaps" which use a hash-based container for primary keys,
- in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
- <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
- and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
- respectively.</p>
-<div id="NTG_res_div">
-<div id="NTG_gcc">
-<div id="NTG_multimap_text_insert_timing_test_small_s2p_tree">
-<div id="NTG_assoc">
-<div id="NTG_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_insert_timing_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTM_res_div">
-<div id="NTM_msvc">
-<div id="NTM_multimap_text_insert_timing_test_small_s2p_tree">
-<div id="NTM_assoc">
-<div id="NHM_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_insert_timing_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_mmap-
-<tt>std::multimap</tt></li>
-<li>
-rb_tree_mmap_lu_mtf_set-
-<a href="tree.html"><tt>tree</tt></a>
- with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
-, and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
-, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NTL_res_div">
-<div id="NTL_local">
-<div id="NTL_multimap_text_insert_timing_test_small_s2p_tree">
-<div id="NTL_assoc">
-<div id="NTL_Native_and_primary_tree-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_insert_timing_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHG_res_div">
-<div id="NHG_gcc">
-<div id="NHG_multimap_text_insert_timing_test_small_s2p_hash">
-<div id="NHG_assoc">
-<div id="NHG_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_insert_timing_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-n_hash_mmap-
-<tt>__gnucxx::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHM_res_div">
-<div id="NHM_msvc">
-<div id="NHM_multimap_text_insert_timing_test_small_s2p_hash">
-<div id="NHM_assoc">
-<div id="NHM_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_insert_timing_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types insert timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
-<ol>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
-<li>
-n_hash_mmap-
-<tt>stdext::hash_multimap</tt></li>
-<li>
-cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
-<a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
-with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
-, and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
- with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
-, and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
- with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
- with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
-</li>
-</ol>
-</div><div style="width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<div id="NHL_res_div">
-<div id="NHL_local">
-<div id="NHL_multimap_text_insert_timing_test_small_s2p_hash">
-<div id="NHL_assoc">
-<div id="NHL_Native_and_primary_hash-based_multimap_types_insert_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_insert_timing_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types insert timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
-</div>
-</div>
-</div>
-</div>
-<h2><a name="observations" id="observations">Observations</a></h2>
-<p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
- Considerations</a>.</p>
-</div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/pq_design.html b/libstdc++-v3/docs/html/ext/pb_ds/pq_design.html
deleted file mode 100644
index f33d963a9ad..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/pq_design.html
+++ /dev/null
@@ -1,381 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>Priority-Queues</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1>Priority-Queue Design</h1>
-
- <h2><a name="overview" id="overview">Overview</a></h2>
-
- <p>The priority-queue container has the following
- declaration:</p>
- <pre>
-<b>template</b>&lt;
- <b>typename</b> Value_Type,
- <b>typename</b> Cmp_Fn = std::less&lt;Value_Type&gt;,
- <b>typename</b> Tag = <a href="pairing_heap_tag.html">pairing_heap_tag</a>,
- <b>typename</b> Allocator = std::allocator&lt;<b>char</b>&gt; &gt;
-<b>class</b> <a href="priority_queue.html">priority_queue</a>;
-</pre>
-
- <p>The parameters have the following meaning:</p>
-
- <ol>
- <li><tt>Value_Type</tt> is the value type.</li>
-
- <li><tt>Cmp_Fn</tt> is a value comparison functor</li>
-
- <li><tt>Tag</tt> specifies which underlying data structure
- to use.</li>
-
- <li><tt>Allocator</tt> is an allocator
- type.</li>
- </ol>
-
- <p>The <tt>Tag</tt> parameter specifies which underlying
- data structure to use. Instantiating it by <a href=
- "pairing_heap_tag.html"><tt>pairing_heap_tag</tt></a>,
- <a href=
- "binary_heap_tag.html"><tt>binary_heap_tag</tt></a>,
- <a href=
- "binomial_heap_tag.html"><tt>binomial_heap_tag</tt></a>,
- <a href=
- "rc_binomial_heap_tag.html"><tt>rc_binomial_heap_tag</tt></a>,
- or <a href=
- "thin_heap_tag.html"><tt>thin_heap_tag</tt></a>,
- specifies, respectively, an underlying pairing heap [<a href=
- "references.html#fredman86pairing">fredman86pairing</a>],
- binary heap [<a href="references.html#clrs2001">clrs2001</a>],
- binomial heap [<a href=
- "references.html#clrs2001">clrs2001</a>], a binomial heap with
- a redundant binary counter [<a href=
- "references.html#maverik_lowerbounds">maverik_lowerbounds</a>],
- or a thin heap [<a href=
- "references.html#kt99fat_heaps">kt99fat_heas</a>]. These are
- explained further in <a href="#pq_imp">Implementations</a>.</p>
-
- <p>As mentioned in <a href=
- "tutorial.html#pq">Tutorial::Priority Queues</a>,
- <a href=
- "priority_queue.html"><tt>pb_ds::priority_queue</tt></a>
- shares most of the same interface with <tt>std::priority_queue</tt>.
- <i>E.g.</i> if <tt>q</tt> is a priority queue of type
- <tt>Q</tt>, then <tt>q.top()</tt> will return the "largest"
- value in the container (according to <tt><b>typename</b>
- Q::cmp_fn</tt>). <a href=
- "priority_queue.html"><tt>pb_ds::priority_queue</tt></a>
- has a larger (and very slightly different) interface than
- <tt>std::priority_queue</tt>, however, since typically
- <tt>push</tt> and <tt>pop</tt> are deemed insufficient for
- manipulating priority-queues. </p>
-
- <p>Different settings require different priority-queue
- implementations which are described in <a href=
- "#pq_imp">Implementations</a>; <a href="#pq_traits">Traits</a>
- discusses ways to differentiate between the different traits of
- different implementations.</p>
-
- <h2><a name="pq_it" id="pq_it">Iterators</a></h2>
-
- <p>There are many different underlying-data structures for
- implementing priority queues. Unfortunately, most such
- structures are oriented towards making <tt>push</tt> and
- <tt>top</tt> efficient, and consequently don't allow efficient
- access of other elements: for instance, they cannot support an efficient
- <tt>find</tt> method. In the use case where it
- is important to both access and "do something with" an
- arbitrary value, one would be out of luck. For example, many graph algorithms require
- modifying a value (typically increasing it in the sense of the
- priority queue's comparison functor).</p>
-
- <p>In order to access and manipulate an arbitrary value in a
- priority queue, one needs to reference the internals of the
- priority queue from some form of an associative container -
- this is unavoidable. Of course, in order to maintain the
- encapsulation of the priority queue, this needs to be done in a
- way that minimizes exposure to implementation internals.</p>
-
- <p>In <tt>pb_ds</tt> the priority queue's <tt>insert</tt>
- method returns an iterator, which if valid can be used for subsequent <tt>modify</tt> and
- <tt>erase</tt> operations. This both preserves the priority
- queue's encapsulation, and allows accessing arbitrary values (since the
- returned iterators from the <tt>push</tt> operation can be
- stored in some form of associative container).</p>
-
- <p>Priority queues' iterators present a problem regarding their
- invalidation guarantees. One assumes that calling
- <tt><b>operator</b>++</tt> on an iterator will associate it
- with the "next" value. Priority-queues are
- self-organizing: each operation changes what the "next" value
- means. Consequently, it does not make sense that <tt>push</tt>
- will return an iterator that can be incremented - this can have
- no possible use. Also, as in the case of hash-based containers,
- it is awkward to define if a subsequent <tt>push</tt> operation
- invalidates a prior returned iterator: it invalidates it in the
- sense that its "next" value is not related to what it
- previously considered to be its "next" value. However, it might not
- invalidate it, in the sense that it can be
- de-referenced and used for <tt>modify</tt> and <tt>erase</tt>
- operations.</p>
-
- <p>Similarly to the case of the other unordered associative
- containers, <tt>pb_ds</tt> uses a distinction between
- point-type and range type iterators. A priority queue's <tt>iterator</tt> can always be
- converted to a <tt>point_iterator</tt>, and a
- <tt>const_iterator</tt> can always be converted to a
- <tt>const_point_iterator</tt>.</p>
-
- <p>The following snippet demonstrates manipulating an arbitrary
- value:</p>
- <pre>
-<i>// A priority queue of integers.</i>
-<a href=
-"priority_queue.html">priority_queue</a>&lt;<b>int</b>&gt; p;
-
-<i>// Insert some values into the priority queue.</i>
-<a href=
-"priority_queue.html">priority_queue</a>&lt;<b>int</b>&gt;::point_iterator it = p.push(0);
-
-p.push(1);
-p.push(2);
-
-<i>// Now modify a value.</i>
-p.modify(it, 3);
-
-assert(p.top() == 3);
-</pre>
-
- <p>(<a href="pq_examples.html#xref">Priority Queue
- Examples::Cross-Referencing</a> shows a more detailed
- example.)</p>
-
- <p>It should be noted that an alternative design could embed an
- associative container in a priority queue. Could, but most probably should not. To begin with, it should be noted that one
- could always encapsulate a priority queue and an associative
- container mapping values to priority queue iterators with no
- performance loss. One cannot, however, "un-encapsulate" a
- priority queue embedding an associative container, which might
- lead to performance loss. Assume, that one needs to
- associate each value with some data unrelated to priority
- queues. Then using <tt>pb_ds</tt>'s design, one could use an
- associative container mapping each value to a pair consisting
- of this data and a priority queue's iterator. Using the
- embedded method would need to use two associative
- containers. Similar problems might arise in cases where a value
- can reside simultaneously in many priority queues.</p>
-
- <h2><a name="pq_imp" id="pq_imp">Implementations</a></h2>
-
- <p>There are three main implementations of priority queues: the
- first employs a binary heap, typically one which uses a
- sequence; the second uses a tree (or forest of trees), which is
- typically less structured than an associative container's tree;
- the third simply uses an associative container. These are
- shown, respectively, in Figures <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> A1 and A2, Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> B, and Figures <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> C.</p>
-
- <h6 class="c1"><a name="pq_different_underlying_dss" id=
- "pq_different_underlying_dss"><img src=
- "pq_different_underlying_dss.png" alt="no image" /></a></h6>
-
- <h6 class="c1">Underlying Priority-Queue Data-Structures.</h6>
-
- <p>Roughly speaking, any value that is both pushed and popped
- from a priority queue must incur a logarithmic expense (in the
- amortized sense). Any priority queue implementation that would
- avoid this, would violate known bounds on comparison-based
- sorting (see, <i>e.g.</i>, [<a href=
- "references.html#clrs2001">clrs2001</a>] and <a href=
- "references.html#brodal96priority">brodal96priority</a>]).</p>
-
- <p>Most implementations do
- not differ in the asymptotic amortized complexity of
- <tt>push</tt> and <tt>pop</tt> operations, but they differ in
- the constants involved, in the complexity of other operations
- (<i>e.g.</i>, <tt>modify</tt>), and in the worst-case
- complexity of single operations. In general, the more
- "structured" an implementation (<i>i.e.</i>, the more internal
- invariants it possesses) - the higher its amortized complexity
- of <tt>push</tt> and <tt>pop</tt> operations.</p>
-
- <p><tt>pb_ds</tt> implements different algorithms using a
- single class: <a href="priority_queue.html">priority_queue</a>.
- Instantiating the <tt>Tag</tt> template parameter, "selects"
- the implementation:</p>
-
- <ol>
- <li>Instantiating <tt>Tag = <a href=
- "binary_heap_tag.html">binary_heap_tag</a></tt> creates
- a binary heap of the form in Figures <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> A1 or A2. The former is internally
- selected by <a href="priority_queue.html">priority_queue</a>
- if <tt>Value_Type</tt> is instantiated by a primitive type
- (<i>e.g.</i>, an <tt><b>int</b></tt>); the latter is
- internally selected for all other types (<i>e.g.</i>,
- <tt>std::string</tt>). This implementations is relatively
- unstructured, and so has good <tt>push</tt> and <tt>pop</tt>
- performance; it is the "best-in-kind" for primitive
- types, <i>e.g.</i>, <tt><b>int</b></tt>s. Conversely, it has
- high worst-case performance, and can support only linear-time
- <tt>modify</tt> and <tt>erase</tt> operations; this is
- explained further in <a href="#pq_traits">Traits</a>.</li>
-
- <li>Instantiating <tt>Tag = <a href=
- "pairing_heap_tag.html">pairing_heap_tag</a></tt>
- creates a pairing heap of the form in Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> B. This implementations too is relatively
- unstructured, and so has good <tt>push</tt> and <tt>pop</tt>
- performance; it is the "best-in-kind" for non-primitive
- types, <i>e.g.</i>, <tt>std:string</tt>s. It also has very
- good worst-case <tt>push</tt> and <tt>join</tt> performance
- (<i>O(1)</i>), but has high worst-case <tt>pop</tt>
- complexity.</li>
-
- <li>Instantiating <tt>Tag = <a href=
- "binomial_heap_tag.html">binomial_heap_tag</a></tt>
- creates a binomial heap of the form in Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> B. This implementations is more
- structured than a pairing heap, and so has worse
- <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
- has sub-linear worst-case bounds for <tt>pop</tt>,
- <i>e.g.</i>, and so it might be preferred in cases where
- responsiveness is important.</li>
-
- <li>Instantiating <tt>Tag = <a href=
- "rc_binomial_heap_tag.html">rc_binomial_heap_tag</a></tt>
- creates a binomial heap of the form in Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> B, accompanied by a redundant counter
- which governs the trees. This implementations is therefore
- more structured than a binomial heap, and so has worse
- <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
- guarantees <i>O(1)</i> <tt>push</tt> complexity, and so it
- might be preferred in cases where the responsiveness of a
- binomial heap is insufficient.</li>
-
- <li>Instantiating <tt>Tag = <a href=
- "thin_heap_tag.html">thin_heap_tag</a></tt> creates a
- thin heap of the form in Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> B. This implementations too is more
- structured than a pairing heap, and so has worse
- <tt>push</tt> and <tt>pop</tt> performance. Conversely, it
- has better worst-case and identical amortized complexities
- than a Fibonacci heap, and so might be more appropriate for
- some graph algorithms.</li>
- </ol>
-
- <p><a href="pq_performance_tests.html">Priority-Queue
- Performance Tests</a> shows some results for the above, and
- discusses these points further.</p>
-
- <p>Of course, one can use any order-preserving associative
- container as a priority queue, as in Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> C, possibly by creating an adapter class
- over the associative container (much as
- <tt>std::priority_queue</tt> can adapt <tt>std::vector</tt>).
- This has the advantage that no cross-referencing is necessary
- at all; the priority queue itself is an associative container.
- Most associative containers are too structured to compete with
- priority queues in terms of <tt>push</tt> and <tt>pop</tt>
- performance.</p>
-
- <h2><a name="pq_traits" id="pq_traits">Traits</a></h2>
-
- <p>It would be nice if all priority queues could
- share exactly the same behavior regardless of implementation. Sadly, this is not possible. Just one for instance is in join operations: joining
- two binary heaps might throw an exception (not corrupt
- any of the heaps on which it operates), but joining two pairing
- heaps is exception free.</p>
-
- <p>Tags and traits are very useful for manipulating generic
- types. <a href=
- "priority_queue.html"><tt>pb_ds::priority_queue</tt></a>
- publicly defines <tt>container_category</tt> as one of the tags
- discussed in <a href="#pq_imp">Implementations</a>. Given any
- container <tt>Cntnr</tt>, the tag of the underlying
- data structure can be found via <tt><b>typename</b>
- Cntnr::container_category</tt>; this is one of the types shown in
- Figure <a href="#pq_tag_cd">Data-structure tag class
- hierarchy</a>.</p>
-
- <h6 class="c1"><a name="pq_tag_cd" id=
- "pq_tag_cd"><img src="priority_queue_tag_cd.png" alt=
- "no image" /></a></h6>
-
- <h6 class="c1">Data-structure tag class hierarchy.</h6>
-
- <p>Additionally, a traits mechanism can be used to query a
- container type for its attributes. Given any container
- <tt>Cntnr</tt>, then <tt><a href=
- "assoc_container_traits.html">pb_ds::container_traits</a>&lt;Cntnr&gt;</tt>
- is a traits class identifying the properties of the
- container.</p>
-
- <p>To find if a container might throw if two of its objects are
- joined, one can use <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::split_join_can_throw</tt>,
- for example.</p>
-
- <p>Different priority-queue implementations have different invalidation guarantees. This is
- especially important, since as explained in <a href=
- "#pq_it">Iterators</a>, there is no way to access an arbitrary
- value of priority queues except for iterators. Similarly to
- associative containers, one can use
- <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::invalidation_guarantee</tt>
- to get the invalidation guarantee type of a priority queue.</p>
-
- <p>It is easy to understand from Figure <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a>, what <a href=
- "assoc_container_traits.html"><tt>container_traits</tt></a><tt>&lt;Cntnr&gt;::invalidation_guarantee</tt>
- will be for different implementations. All implementations of
- type <a href="#pq_different_underlying_dss">Underlying
- Priority-Queue Data-Structures</a> B have <a href=
- "point_invalidation_guarantee.html"><tt>point_invalidation_guarantee</tt></a>:
- the container can freely internally reorganize the nodes -
- range-type iterators are invalidated, but point-type iterators
- are always valid. Implementations of type <a href=
- "#pq_different_underlying_dss">Underlying Priority-Queue
- Data-Structures</a> A1 and A2 have <a href=
- "basic_invalidation_guarantee.html"><tt>basic_invalidation_guarantee</tt></a>:
- the container can freely internally reallocate the array - both
- point-type and range-type iterators might be invalidated.</p>
-
- <p>This has major implications, and constitutes a good reason to avoid
- using binary heaps. A binary heap can perform <tt>modify</tt>
- or <tt>erase</tt> efficiently <u>given a valid point-type
- iterator</u>. However, inn order to supply it with a valid point-type
- iterator, one needs to iterate (linearly) over all
- values, then supply the relevant iterator (recall that a
- range-type iterator can always be converted to a point-type
- iterator). This means that if the number of <tt>modify</tt> or
- <tt>erase</tt> operations is non-negligible (say
- super-logarithmic in the total sequence of operations) - binary
- heaps will perform badly.</p>
- <pre>
-
-</pre>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/string_trie_e_access_traits.html b/libstdc++-v3/docs/html/ext/pb_ds/string_trie_e_access_traits.html
deleted file mode 100644
index 58a8be62269..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/string_trie_e_access_traits.html
+++ /dev/null
@@ -1,400 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>string_trie_e_access_traits Interface</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1><tt>string_trie_e_access_traits</tt> Interface</h1>
-
- <p>Element access traits for string types.</p>
-
- <p>Defined in: <a href=
- "../../../../include/ext/pb_ds/trie_policy.hpp"><tt>trie_policy.hpp</tt></a></p>
-
- <h2><a name="link1" id="link1">Template Parameters</a></h2>
-
- <table class="c1" width="100%" border="1" summary=
- "Template Parameters">
- <tr>
- <td width="20%" align="left"><b>Parameter</b></td>
-
- <td width="50%" align="left"><b>Description</b></td>
-
- <td width="30%" align="left"><b>Default Value</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="String349403" id="String349403"><b>class</b> String </a>
-</pre>
- </td>
-
- <td>
- <p>String type.</p>
- </td>
-
- <td><tt>std::string</tt></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Min_E_Val40354618" id=
-"Min_E_Val40354618"><b>typename</b> </a><a href=
-"#String349403"><tt>String</tt></a>::value_type Min_E_Val
-</pre>
- </td>
-
- <td>
- <p>Minimal element.</p>
- </td>
-
- <td><tt>SCHAR_MIN</tt></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Max_E_Val39885868" id=
-"Max_E_Val39885868"><b>typename</b> </a><a href=
-"#String349403"><tt>String</tt></a>::value_type Max_E_Val
-</pre>
- </td>
-
- <td>
- <p>Maximal element.</p>
- </td>
-
- <td><tt>SCHAR_MAX</tt></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Reverse1686776" id=
-"Reverse1686776"><b>bool</b> Reverse </a>
-</pre>
- </td>
-
- <td>
- <p>Indicates whether reverse iteration should be
- used.</p>
- </td>
-
- <td><tt><b>false</b></tt></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Allocator35940069" id=
-"Allocator35940069"><b>class</b> Allocator </a>
-</pre>
- </td>
-
- <td>
- <p>Allocator type.</p>
- </td>
-
- <td>
- <pre>
-std::allocator&lt;<b>char</b>&gt;
-</pre>
- </td>
- </tr>
- </table>
-
- <h2><a name="link2" id="link2">Public Types and
- Constants</a></h2>
-
- <h3><a name="link3" id="link3">General Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="size_type55424436" id="size_type55424436">size_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#Allocator35940069"><tt>Allocator</tt></a>::size_type
-</pre>
- </td>
-
- <td>
- <p>Size type.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link4" id="link4">Key-Type Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="key_type10393186" id="key_type10393186">key_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#String349403"><tt>String</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Key type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_key_reference3185471705" id=
-"const_key_reference3185471705">const_key_reference</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#Allocator35940069"><tt>Allocator</tt></a>::<b>template</b> rebind&lt;
- <a href=
-"#key_type10393186"><tt>key_type</tt></a>&gt;::other::const_reference
-</pre>
- </td>
-
- <td>
- <p>Const key reference type.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link5" id="link5">Element-Type
- Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="reverse2186776" id="reverse2186776">reverse</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#Reverse1686776"><tt>Reverse</tt></a>
-</pre>
- </td>
-
- <td>
- <p><a href="#Reverse1686776"><tt>Reverse</tt></a>
- iteration indicator.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_iterator98626788" id=
-"const_iterator98626788">const_iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> pb_ds::detail::__conditional_type&lt;
- <a href="#Reverse1686776"><tt>Reverse</tt></a>,
- <b>typename</b> <a href=
-"#String349403"><tt>String</tt></a>::const_reverse_iterator,
- <b>typename</b> <a href=
-"#String349403"><tt>String</tt></a>::const_iterator&gt;::__type
-</pre>
- </td>
-
- <td>
- <p>Element <tt><b>const</b></tt> iterator type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="e_type393186" id="e_type393186">e_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> std::iterator_traits&lt;<a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;::value_type
-</pre>
- </td>
-
- <td>
- <p>Element type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="min_e_val52875418" id="min_e_val52875418">min_e_val</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#Min_E_Val40354618"><tt>Min_E_Val</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Minimal element.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="max_e_val52406668" id="max_e_val52406668">max_e_val</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#Max_E_Val39885868"><tt>Max_E_Val</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Maximal element.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="max_size10483336" id="max_size10483336">max_size</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#max_e_val52406668"><tt>max_e_val</tt></a> - <a href=
-"#min_e_val52875418"><tt>min_e_val</tt></a> + 1
-</pre>
- </td>
-
- <td>
- <p>Number of distinct elements.</p>
- </td>
- </tr>
- </table>
-
- <h2><a name="link6" id="link6">Public Methods</a></h2>
-
- <h3><a name="link7" id="link7">Access Methods</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Methods">
- <tr>
- <td width="45%" align="left"><b>Method</b></td>
-
- <td width="55%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>inline</b> <b>static</b> <a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>
- begin
- (<a href=
-"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
-</pre>
- </td>
-
- <td>
- <p>Returns a <a href=
- "#const_iterator98626788"><tt>const_iterator</tt></a> to
- the first element of <span class=
- "c1"><tt>r_key</tt></span>.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>inline</b> <b>static</b> <a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>
- end
- (<a href=
-"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
-</pre>
- </td>
-
- <td>
- <p>Returns a <a href=
- "#const_iterator98626788"><tt>const_iterator</tt></a> to
- the after-last element of <span class=
- "c1"><tt>r_key</tt></span>.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>inline</b> <b>static</b> <a href=
-"#size_type55424436"><tt>size_type</tt></a>
- e_pos
- (<a href="#e_type393186"><tt>e_type</tt></a> e)
-</pre>
- </td>
-
- <td>
- <p>Maps an <span class="c1"><tt>e</tt></span>element to a
- position.</p>
- </td>
- </tr>
- </table>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/pb_ds/trie_prefix_search_node_update.html b/libstdc++-v3/docs/html/ext/pb_ds/trie_prefix_search_node_update.html
deleted file mode 100644
index e3d5e273042..00000000000
--- a/libstdc++-v3/docs/html/ext/pb_ds/trie_prefix_search_node_update.html
+++ /dev/null
@@ -1,628 +0,0 @@
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
-
- <title>trie_prefix_search_node_update Interface</title>
- <meta http-equiv="Content-Type" content=
- "text/html; charset=us-ascii" />
- </head>
-
-<body>
- <div id="page">
- <h1><tt>trie_prefix_search_node_update</tt> Interface</h1>
-
- <p>A node updater that allows tries to be searched for the
- range of values that match a certain prefix.</p>
-
- <p>Defined in: <a href=
- "../../../../include/ext/pb_ds/trie_policy.hpp"><tt>trie_policy.hpp</tt></a></p>
-
- <h2><a name="link1" id="link1">Template Parameters</a></h2>
-
- <table class="c1" width="100%" border="1" summary=
- "Template Parameters">
- <tr>
- <td width="20%" align="left"><b>Parameter</b></td>
-
- <td width="50%" align="left"><b>Description</b></td>
-
- <td width="30%" align="left"><b>Default Value</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Const_Node_Iterator1933878761" id=
-"Const_Node_Iterator1933878761"><b>class</b> Const_Node_Iterator</a>
-</pre>
- </td>
-
- <td>
- <p>Const node iterator type.</p>
- </td>
-
- <td>-</td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Node_Iterator4206909839" id=
-"Node_Iterator4206909839"><b>class</b> Node_Iterator</a>
-</pre>
- </td>
-
- <td>
- <p>Node iterator type.</p>
- </td>
-
- <td>-</td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="E_Access_Traits686553840" id=
-"E_Access_Traits686553840"><b>class</b> E_Access_Traits</a>
-</pre>
- </td>
-
- <td>
- <p>Comparison functor.</p>
- </td>
-
- <td>-</td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="Allocator35940069" id=
-"Allocator35940069"><b>class</b> Allocator</a>
-</pre>
- </td>
-
- <td>
- <p>Allocator type.</p>
- </td>
-
- <td>-</td>
- </tr>
- </table>
-
- <h2><a name="link2" id="link2">Public Types and
- Constants</a></h2>
-
- <h3><a name="link3" id="link3">Key-Type Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="key_type10393186" id="key_type10393186">key_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-The instantiating container's key type.
-</pre>
- </td>
-
- <td>
- <p>Key type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_key_reference3185471705" id=
-"const_key_reference3185471705">const_key_reference</a>
-</pre>
- </td>
-
- <td>
- <pre>
-The instantiating container's const key reference type.
-</pre>
- </td>
-
- <td>
- <p>Const key reference.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link4" id="link4">Policy Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="e_access_traits1948190928" id=
-"e_access_traits1948190928">e_access_traits</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#E_Access_Traits686553840"><tt>E_Access_Traits</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Element access traits.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_e_iterator2450008044" id=
-"const_e_iterator2450008044">const_e_iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#e_access_traits1948190928"><tt>e_access_traits</tt></a>::const_iterator
-</pre>
- </td>
-
- <td>
- <p>Const element iterator.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="allocator48440069" id="allocator48440069">allocator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#Allocator35940069"><tt>Allocator</tt></a>
-</pre>
- </td>
-
- <td>
- <p><a href="#Allocator35940069"><tt>Allocator</tt></a>
- type.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link5" id="link5">General Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="size_type55424436" id="size_type55424436">size_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#allocator48440069"><tt>allocator</tt></a>::size_type
-</pre>
- </td>
-
- <td>
- <p>Size type.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link6" id="link6">Metadata-Type
- Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="metadata_type2849297114" id=
-"metadata_type2849297114">metadata_type</a>
-</pre>
- </td>
-
- <td>
- <pre>
-pb_ds::detail::null_node_metadata
-</pre>
- </td>
-
- <td>
- <p>Metadata type.</p>
- </td>
- </tr>
- </table>
-
- <h3><a name="link7" id="link7">Iterator Definitions</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Types">
- <tr>
- <td width="30%" align="left"><b>Type</b></td>
-
- <td width="55%" align="left"><b>Definition</b></td>
-
- <td width="15%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_node_iterator4205924553" id=
-"const_node_iterator4205924553">const_node_iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href=
-"#Const_Node_Iterator1933878761"><tt>Const_Node_Iterator</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Const node iterator type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="node_iterator3431975247" id=
-"node_iterator3431975247">node_iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<a href="#Node_Iterator4206909839"><tt>Node_Iterator</tt></a>
-</pre>
- </td>
-
- <td>
- <p>Node iterator type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="const_iterator98626788" id=
-"const_iterator98626788">const_iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>::value_type
-</pre>
- </td>
-
- <td>
- <p>Const iterator type.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<a name="iterator10418194" id="iterator10418194">iterator</a>
-</pre>
- </td>
-
- <td>
- <pre>
-<b>typename</b> <a href=
-"#node_iterator3431975247"><tt>node_iterator</tt></a>::value_type
-</pre>
- </td>
-
- <td>
- <p>Iterator type.</p>
- </td>
- </tr>
- </table>
-
- <h2><a name="link8" id="link8">Public Methods</a></h2>
-
- <h3><a name="link9" id="link9">Find Methods</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Methods">
- <tr>
- <td width="45%" align="left"><b>Method</b></td>
-
- <td width="55%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-std::pair&lt;
- <a href="#const_iterator98626788"><tt>const_iterator</tt></a>,
- <a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;
- prefix_range
- (<a href=
-"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key) <b>const</b>
-</pre>
- </td>
-
- <td>
- <p>Finds the <tt><b>const</b></tt> <a href=
- "#iterator10418194"><tt>iterator</tt></a> range
- corresponding to all values whose prefixes match
- <span class="c1"><tt>r_key</tt></span>.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-std::pair&lt;
- <a href="#iterator10418194"><tt>iterator</tt></a>,
- <a href="#iterator10418194"><tt>iterator</tt></a>&gt;
- prefix_range
- (<a href=
-"#const_key_reference3185471705"><tt>const_key_reference</tt></a> r_key)
-</pre>
- </td>
-
- <td>
- <p>Finds the <a href=
- "#iterator10418194"><tt>iterator</tt></a> range
- corresponding to all values whose prefixes match
- <span class="c1"><tt>r_key</tt></span>.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-std::pair&lt;
- <a href="#const_iterator98626788"><tt>const_iterator</tt></a>,
- <a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>&gt;
- prefix_range
- (<a href=
-"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> b,
- <a href=
-"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> e) <b>const</b>
-</pre>
- </td>
-
- <td>
- <p>Finds the <tt><b>const</b></tt> <a href=
- "#iterator10418194"><tt>iterator</tt></a> range
- corresponding to all values whose prefixes match [b,
- <span class="c1"><tt>e</tt></span>).</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-std::pair&lt;
- <a href="#iterator10418194"><tt>iterator</tt></a>,
- <a href="#iterator10418194"><tt>iterator</tt></a>&gt;
- prefix_range
- (<a href=
-"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> b,
- <a href=
-"#const_e_iterator2450008044"><tt>const_e_iterator</tt></a> e)
-</pre>
- </td>
-
- <td>
- <p>Finds the <a href=
- "#iterator10418194"><tt>iterator</tt></a> range
- corresponding to all values whose prefixes match [b,
- <span class="c1"><tt>e</tt></span>).</p>
- </td>
- </tr>
- </table>
-
- <h2><a name="link10" id="link10">Protected Methods</a></h2>
-
- <h3><a name="link11" id="link11">Operators</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Methods">
- <tr>
- <td width="45%" align="left"><b>Method</b></td>
-
- <td width="55%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>inline</b> <b>void</b>
- <b>operator</b>()
- (<a href=
-"#node_iterator3431975247"><tt>node_iterator</tt></a> node_it,
- <a href=
-"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a> end_nd_it) <b>const</b>
-</pre>
- </td>
-
- <td>
- <p>Called to update a node's metadata.</p>
- </td>
- </tr>
- </table>
-
- <h2><a name="link12" id="link12">Private Methods</a></h2>
-
- <h3><a name="link13" id="link13">Overrides</a></h3>
-
- <table class="c1" width="100%" border="1" summary="Methods">
- <tr>
- <td width="45%" align="left"><b>Method</b></td>
-
- <td width="55%" align="left"><b>Description</b></td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href=
-"#const_iterator98626788"><tt>const_iterator</tt></a>
- end
- () <b>const</b> = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <tt><b>const</b></tt> <a href=
- "#iterator10418194"><tt>iterator</tt></a> associated with
- the just-after last element.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href="#iterator10418194"><tt>iterator</tt></a>
- end
- () = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <a href=
- "#iterator10418194"><tt>iterator</tt></a> associated with
- the just-after last element.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href=
-"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
- node_begin
- () <b>const</b> = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <a href=
- "#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
- associated with the trie's root node.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href=
-"#node_iterator3431975247"><tt>node_iterator</tt></a>
- node_begin
- () = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <a href=
- "#node_iterator3431975247"><tt>node_iterator</tt></a>
- associated with the trie's root node.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href=
-"#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
- node_end
- () <b>const</b> = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <a href=
- "#const_node_iterator4205924553"><tt>const_node_iterator</tt></a>
- associated with a just-after leaf node.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <a href=
-"#node_iterator3431975247"><tt>node_iterator</tt></a>
- node_end
- () = 0
-</pre>
- </td>
-
- <td>
- <p>Returns the <a href=
- "#node_iterator3431975247"><tt>node_iterator</tt></a>
- associated with a just-after leaf node.</p>
- </td>
- </tr>
-
- <tr>
- <td>
- <pre>
-<b>virtual</b> <b>const</b> <a href=
-"#e_access_traits1948190928"><tt>e_access_traits</tt></a> &amp;
- get_e_access_traits
- () <b>const</b> = 0
-</pre>
- </td>
-
- <td>
- <p>Access to the cmp_fn object.</p>
- </td>
- </tr>
- </table>
- </div>
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/sgiexts.html b/libstdc++-v3/docs/html/ext/sgiexts.html
deleted file mode 100644
index 515fc151e39..00000000000
--- a/libstdc++-v3/docs/html/ext/sgiexts.html
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++, STL, SGI" />
- <meta name="DESCRIPTION" content="SGI extensions preserved in libstdc++-v3." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>SGI extensions to the library in libstdc++-v3</title>
-<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
-<link rel="Start" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Subsection" href="sgiexts.html" type="text/html" title="Extensions" />
-<link rel="Bookmark" href="howto.html" type="text/html" title="Extensions" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">SGI extensions to the library in
-libstdc++-v3</a></h1>
-
-<p>This page describes the extensions that SGI made to their version of the
- STL subset of the Standard C++ Library. For a time we
- <a href="../faq/index.html#5_3">tracked and imported changes and updates
- from most of the SGI STL</a>, up through their (apparently) final release.
- Their extensions were mostly preserved.
-</p>
-
-<p>They are listed according to the chapters of the library that they
- extend (see <a href="../documentation.html#3">the chapter-specific notes</a>
- for a description). Not every chapter may have extensions, and the
- extensions may come and go. Also, this page is incomplete because the
- author is pressed for time. Check back often; the latest change was on
- $Date: 2003/04/16 17:02:47 $ (UTC).
-</p>
-
-<p>Descriptions range from the scanty to the verbose. You should also check
- the <a href="../documentation.html#4">generated documentation</a> for notes
- and comments, especially for entries marked with '*'. For more complete
- doumentation, see the SGI website. For <em>really</em> complete
- documentation, buy a copy of Matt Austern's book. *grin*
-</p>
-
-<p>Back to the <a href="howto.html">libstdc++-v3 extensions</a>.
-</p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h3><a name="ch20">Chapter 20</a></h3>
-<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:
-</p>
-<ul>
- <li><code>identity_element</code> for addition and multiplication. * </li>
- <li>The functor <code>identity</code>, whose <code>operator()</code>
- returns the argument unchanged. * </li>
- <li>Composition functors <code>unary_function</code> and
- <code>binary_function</code>, and their helpers <code>compose1</code>
- and <code>compose2</code>. * </li>
- <li><code>select1st</code> and <code>select2nd</code>, to strip pairs. * </li>
- <li><code>project1st</code> and <code>project2nd</code>. * </li>
- <li>A set of functors/functions which always return the same result. They
- are <code>constant_void_fun</code>, <code>constant_binary_fun</code>,
- <code>constant_unary_fun</code>, <code>constant0</code>,
- <code>constant1</code>, and <code>constant2</code>. * </li>
- <li>The class <code>subtractive_rng</code>. * </li>
- <li>mem_fun adaptor helpers <code>mem_fun1</code> and
- <code>mem_fun1_ref</code> are provided for backwards compatibility. </li>
-</ul>
-<p>20.4.1 can use several different allocators; they are described on the
- main extensions page.
-</p>
-<p>20.4.3 is extended with a special version of
- <code>get_temporary_buffer</code> taking a second argument. The argument
- is a pointer, which is ignored, but can be used to specify the template
- type (instead of using explicit function template arguments like the
- standard version does). That is, in addition to
-</p>
- <pre>
- get_temporary_buffer&lt;int&gt;(5);</pre>
- you can also use
- <pre>
- get_temporary_buffer(5, (int*)0);</pre>
-<p>A class <code>temporary_buffer</code> is given in stl_tempbuf.h. *
-</p>
-<p>The specialized algorithms of section 20.4.4 are extended with
- <code>uninitialized_copy_n</code>. *
-</p>
-<p>Return <a href="howto.html">to the main extensions page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<hr />
-<h3><a name="ch23">Chapter 23</a></h3>
-<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:
-</p>
-<p>The old pre-standard <code>bit_vector</code> class is present for
- backwards compatibility. It is simply a typedef for the
- <code>vector&lt;bool&gt;</code> specialization.
-</p>
-<p>The <code>bitset</code> class has a number of extensions, described in the
- rest of this item. First, we'll mention that this implementation of
- <code>bitset&lt;N&gt;</code> is specialized for cases where N number of
- bits will fit into a single word of storage. If your choice of N is
- within that range (&lt;=32 on i686-pc-linux-gnu, for example), then all
- of the operations will be faster.
-</p>
-<p>There are
- versions of single-bit test, set, reset, and flip member functions which
- do no range-checking. If we call them member functions of an instantiation
- of &quot;bitset&lt;N&gt;,&quot; then their names and signatures are:
-</p>
- <pre>
- bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos);
- bitset&lt;N&gt;&amp; _Unchecked_set (size_t pos, int val);
- bitset&lt;N&gt;&amp; _Unchecked_reset (size_t pos);
- bitset&lt;N&gt;&amp; _Unchecked_flip (size_t pos);
- bool _Unchecked_test (size_t pos);</pre>
-<p>Note that these may in fact be removed in the future, although we have
- no present plans to do so (and there doesn't seem to be any immediate
- reason to).
-</p>
-<p>The semantics of member function <code>operator[]</code> are not specified
- in the C++ standard. A long-standing defect report calls for sensible
- obvious semantics, which are already implemented here: <code>op[]</code>
- on a const bitset returns a bool, and for a non-const bitset returns a
- <code>reference</code> (a nested type). However, this implementation does
- no range-checking on the index argument, which is in keeping with other
- containers' <code>op[]</code> requirements. The defect report's proposed
- resolution calls for range-checking to be done. We'll just wait and see...
-</p>
-<p>Finally, two additional searching functions have been added. They return
- the index of the first &quot;on&quot; bit, and the index of the first
- &quot;on&quot; bit that is after <code>prev</code>, respectively:
-</p>
- <pre>
- 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>
-<p>Return <a href="howto.html">to the main extensions page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<hr />
-<h3><a name="ch24">Chapter 24</a></h3>
-<p>24.3.2 describes <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:
-</p>
- <ul>
- <li>input_iterator</li>
- <li>output_iterator</li>
- <li>forward_iterator</li>
- <li>bidirectional_iterator</li>
- <li>random_access_iterator</li>
- </ul>
-<p>24.3.4 describes iterator operation <code>distance</code>, which takes
- 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>
-<p>Return <a href="howto.html">to the main extensions page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<hr />
-<h3><a name="ch25">Chapter 25</a></h3>
-<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.,
-</p>
- <pre>
- void count (first, last, value, n);</pre>
-<p>25.2 (mutating algorithms) is extended with two families of signatures,
- random_sample and random_sample_n.
-</p>
-<p>25.2.1 (copy) is extended with
-</p>
- <pre>
- copy_n (_InputIter first, _Size count, _OutputIter result);</pre>
-<p>which copies the first 'count' elements at 'first' into 'result'.
-</p>
-<p>25.3 (sorting 'n' heaps 'n' stuff) is extended with some helper
- predicates. Look in the doxygen-generated pages for notes on these.
-</p>
- <ul>
- <li><code>is_heap</code> tests whether or not a range is a heap.</li>
- <li><code>is_sorted</code> tests whether or not a range is sorted in
- nondescending order.</li>
- </ul>
-<p>25.3.8 (lexigraphical_compare) is extended with
-</p>
- <pre>
- lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
- _InputIter2 first2, _InputIter2 last2)</pre>
-<p>which does... what?
-</p>
-<p>Return <a href="howto.html">to the main extensions page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<hr />
-<h3><a name="ch26">Chapter 26</a></h3>
-<p>26.4, the generalized numeric operations such as accumulate, are extended
- with the following functions:
-</p>
- <pre>
- power (x, n);
- power (x, n, moniod_operation);</pre>
-<p>Returns, in FORTRAN syntax, &quot;x ** n&quot; where n&gt;=0. In the
- case of n == 0, returns the <a href="#ch20">identity element</a> for the
- monoid operation. The two-argument signature uses multiplication (for
- a true &quot;power&quot; implementation), but addition is supported as well.
- The operation functor must be associative.
-</p>
-<p>The <code>iota</code> function wins the award for Extension With the
- Coolest Name. It &quot;assigns sequentially increasing values to a range.
- That is, it assigns value to *first, value + 1 to *(first + 1) and so
- on.&quot; Quoted from SGI documentation.
-</p>
- <pre>
- void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre>
-<p>Return <a href="howto.html">to the main extensions page</a> or
- <a href="http://gcc.gnu.org/libstdc++/">to the homepage</a>.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/ext/tr1.html b/libstdc++-v3/docs/html/ext/tr1.html
deleted file mode 100644
index 4a021df09a6..00000000000
--- a/libstdc++-v3/docs/html/ext/tr1.html
+++ /dev/null
@@ -1,2322 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link rev="made" href="mailto:gcc@gcc.gnu.org" />
- <link rel="shortcut icon" href="http://gcc.gnu.org/favicon.ico" />
-
- <title>
- Status of TR1 features in GCC
- - GNU Project - Free Software Foundation (FSF)
- </title>
-
-</head>
-
-<body>
-
-<h1 align="center">
- Status of TR1 features in GCC
-</h1>
-
-<p>
-This table is based on the table of contents of ISO/IEC DTR 19768
-Doc No: N1836=05-0096 Date: 2005-06-24
-Draft Technical Report on C++ Library Extensions
-</p>
-
-<p>
-In this implementation the header names are prefixed by
-<code>tr1/</code>, for instance <code>&lt;tr1/functional&gt;</code>,
-<code>&lt;tr1/memory&gt;</code>, and so on.
-</p>
-
-<p>
-This page describes the TR1 support in mainline GCC CVS, not in any particular
-release.
-</p>
-
-<table border="1">
- <thead>
- <tr>
- <td><span style="font-weight: bold;">Section</span></td>
- <td><span style="font-weight: bold;">Description</span></td>
- <td><span style="font-weight: bold;">Done</span></td>
- <td><span style="font-weight: bold;">Broken</span></td>
- <td><span style="font-weight: bold;">Missing</span></td>
- <td><span style="font-weight: bold;">Comments</span></td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><b>2</b></td>
- <td colspan="5"><b>General Utilities</b></td>
- </tr>
- <tr>
- <td>2.1</td>
- <td>Reference wrappers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.1</td>
- <td>Additions to header <code>&lt;functional&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2</td>
- <td>Class template <code>reference_wrapper</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2.1</td>
- <td><code>reference_wrapper</code> construct/copy/destroy</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2.2</td>
- <td><code>reference_wrapper</code> assignment</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2.3</td>
- <td><code>reference_wrapper</code> access</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2.4</td>
- <td><code>reference_wrapper</code> invocation</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.1.2.5</td>
- <td><code>reference_wrapper</code> helper functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2</td>
- <td>Smart pointers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.1</td>
- <td>Additions to header <code>&lt;memory&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.2</td>
- <td>Class <code>bad_weak_ptr</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3</td>
- <td>Class template <code>shared_ptr</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td><a href="tr1.html#1">1</a></td>
- </tr>
- <tr>
- <td>2.2.3.1</td>
- <td><code>shared_ptr</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.2</td>
- <td><code>shared_ptr</code> destructor</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.3</td>
- <td><code>shared_ptr</code> assignment</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.4</td>
- <td><code>shared_ptr</code> modifiers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.5</td>
- <td><code>shared_ptr</code> observers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.6</td>
- <td><code>shared_ptr</code> comparison</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.7</td>
- <td><code>shared_ptr</code> I/O</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.8</td>
- <td><code>shared_ptr</code> specialized algorithms</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.9</td>
- <td><code>shared_ptr</code> casts</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.3.10</td>
- <td><code>get_deleter</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4</td>
- <td>Class template <code>weak_ptr</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.1</td>
- <td><code>weak_ptr</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.2</td>
- <td><code>weak_ptr</code> destructor</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.3</td>
- <td><code>weak_ptr</code> assignment</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.4</td>
- <td><code>weak_ptr</code> modifiers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.5</td>
- <td><code>weak_ptr</code> observers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.6</td>
- <td><code>weak_ptr</code> comparison</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.4.7</td>
- <td><code>weak_ptr</code> specialized algorithms</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2.2.5</td>
- <td>Class template <code>enable_shared_from_this</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td><b>3</b></td>
- <td colspan="5"><b>Function objects</b></td>
- </tr>
- <tr>
- <td>3.1</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.2</td>
- <td>Additions to <code>&lt;functional&gt; synopsis</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.3</td>
- <td>Requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.4</td>
- <td>Function return types</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.5</td>
- <td>Function template <code>mem_fn</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.6</td>
- <td>Function object binders</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.6.1</td>
- <td>Class template <code>is_bind_expression</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.6.2</td>
- <td>Class template <code>is_placeholder</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.6.3</td>
- <td>Function template <code>bind</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.6.4</td>
- <td>Placeholders</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7</td>
- <td>Polymorphic function wrappers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.1</td>
- <td>Class <code>bad_function_call<code></code></code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.1.1</td>
- <td><code>bad_function_call</code> constructor</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2</td>
- <td>Class template <code>function</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.1</td>
- <td><code>function</code> construct/copy/destroy</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.2</td>
- <td><code>function</code> modifiers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.3</td>
- <td><code>function</code> capacity</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.4</td>
- <td><code>function</code> invocation</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.5</td>
- <td><code>function</code> target access</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.6</td>
- <td>undefined operators</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.7</td>
- <td>null pointer comparison operators</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3.7.2.8</td>
- <td>specialized algorithms</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td><b>4</b></td>
- <td colspan="5"><b>Metaprogramming and type traits</b></td>
- </tr>
- <tr>
- <td>4.1</td>
- <td>Requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.2</td>
- <td>Header <code>&lt;type_traits&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.3</td>
- <td>Helper classes</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.4</td>
- <td>General Requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.5</td>
- <td>Unary Type Traits</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.5.1</td>
- <td>Primary Type Categories</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.5.2</td>
- <td>Composite type traits</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.5.3</td>
- <td>Type properties</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.6</td>
- <td>Relationships between types</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.7</td>
- <td>Transformations between types</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.7.1</td>
- <td>Const-volatile modifications</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.7.2</td>
- <td>Reference modifications</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.7.3</td>
- <td>Array modifications</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.7.4</td>
- <td>Pointer modifications</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.8</td>
- <td>Other transformations</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>4.9</td>
- <td>Implementation requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td><b>5</b></td>
- <td colspan="5"><b>Numerical facilities</b></td>
- </tr>
- <tr>
- <td>5.1</td>
- <td>Random number generation</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.1</td>
- <td>Requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.2</td>
- <td>Header <code>&lt;random&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.3</td>
- <td>Class template <code>variate_generator</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4</td>
- <td>Random number engine class templates</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.1</td>
- <td>Class template <code>linear_congruential</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.2</td>
- <td>Class template <code>mersenne_twister</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.3</td>
- <td>Class template <code>subtract_with_carry</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.4</td>
- <td>Class template <code>subtract_with_carry_01</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.5</td>
- <td>Class template <code>discard_block</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.4.6</td>
- <td>Class template <code>xor_combine</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>operator()() per N2079</td>
- </tr>
- <tr>
- <td>5.1.5</td>
- <td>Engines with predefined parameters</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.6</td>
- <td>Class <code>random_device</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7</td>
- <td>Random distribution class templates</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.1</td>
- <td>Class template <code>uniform_int</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.2</td>
- <td>Class <code>bernoulli_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.3</td>
- <td>Class template <code>geometric_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.4</td>
- <td>Class template <code>poisson_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.5</td>
- <td>Class template <code>binomial_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.6</td>
- <td>Class template <code>uniform_real</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.7</td>
- <td>Class template <code>exponential_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.8</td>
- <td>Class template <code>normal_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.1.7.9</td>
- <td>Class template <code>gamma_distribution</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2</td>
- <td>Mathematical special functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1</td>
- <td>Additions to header <code>&lt;cmath&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.1</td>
- <td>associated Laguerre polynomials</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.2</td>
- <td>associated Legendre functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.3</td>
- <td>beta function</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.4</td>
- <td>(complete) elliptic integral of the first kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.5</td>
- <td>(complete) elliptic integral of the second kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.6</td>
- <td>(complete) elliptic integral of the third kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.7</td>
- <td>confluent hypergeometric functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.8</td>
- <td>regular modified cylindrical Bessel functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.9</td>
- <td>cylindrical Bessel functions (of the first kind)</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.10</td>
- <td>irregular modified cylindrical Bessel functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.11</td>
- <td>cylindrical Neumann functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.12</td>
- <td>(incomplete) elliptic integral of the first kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.13</td>
- <td>(incomplete) elliptic integral of the second kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.14</td>
- <td>(incomplete) elliptic integral of the third kind</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.15</td>
- <td>exponential integral</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.16</td>
- <td>Hermite polynomials</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.17</td>
- <td>hypergeometric functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.18</td>
- <td>Laguerre polynomials</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.19</td>
- <td>Legendre polynomials</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.20</td>
- <td>Riemann zeta function</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.21</td>
- <td>spherical Bessel functions (of the first kind)</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.22</td>
- <td>spherical associated Legendre functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.1.23</td>
- <td>spherical Neumann functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>5.2.2</td>
- <td>Additions to header <code>&lt;math.h&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td><b>6</b></td>
- <td colspan="5"><b>Containers</b></td>
- </tr>
- <tr>
- <td>6.1</td>
- <td>Tuple types</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.1</td>
- <td>Header <code>&lt;tuple&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.2</td>
- <td>Additions to header <code>&lt;utility&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3</td>
- <td>Class template <code>tuple</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3.1</td>
- <td>Construction</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3.2</td>
- <td>Tuple creation functions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3.3</td>
- <td>Tuple helper classes</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3.4</td>
- <td>Element access</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.3.5</td>
- <td>Relational operators</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.1.4</td>
- <td>Pairs</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2</td>
- <td>Fixed size array</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.1</td>
- <td>Header <code>&lt;array&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2</td>
- <td>Class template <code>array</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2.1</td>
- <td><code>array</code> constructors, copy, and assignment</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2.2</td>
- <td><code>array</code> specialized algorithms</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2.3</td>
- <td><code>array</code> size</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2.4</td>
- <td>Zero sized <code>array</code>s</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.2.2.5</td>
- <td>Tuple interface to class template <code>array</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3</td>
- <td>Unordered associative containers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.1</td>
- <td>Unordered associative container requirements</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.1.1</td>
- <td>Exception safety guarantees</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.2</td>
- <td>Additions to header <code>&lt;functional&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.3</td>
- <td>Class template <code>hash</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4</td>
- <td>Unordered associative container classes</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.1</td>
- <td>Header <code>&lt;unordered_set&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.2</td>
- <td>Header <code>&lt;unordered_map&gt;</code> synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.3</td>
- <td>Class template <code>unordered_set</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.3.1</td>
- <td><code>unordered_set</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.3.2</td>
- <td><code>unordered_set</code> swap</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.4</td>
- <td>Class template <code>unordered_map</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.4.1</td>
- <td><code>unordered_map</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.4.2</td>
- <td><code>unordered_map</code> element access</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.4.3</td>
- <td><code>unordered_map</code> swap</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.5</td>
- <td>Class template <code>unordered_multiset<code></code></code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.5.1</td>
- <td><code>unordered_multiset</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.5.2</td>
- <td><code>unordered_multiset</code> swap</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.6</td>
- <td>Class template <code>unordered_multimap</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.6.1</td>
- <td><code>unordered_multimap</code> constructors</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>6.3.4.6.2</td>
- <td><code>unordered_multimap</code> swap</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td><b>7</b></td>
- <td colspan="5"><b>Regular expressions</b></td>
- </tr>
- <tr>
- <td>7.1</td>
- <td>Definitions</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.2</td>
- <td>Requirements</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.3</td>
- <td>Regular expressions summary</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.4</td>
- <td>Header <code>&lt;regex&gt;</code> synopsis</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.5</td>
- <td>Namespace <code>tr1::regex_constants</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.5.1</td>
- <td>Bitmask Type <code>syntax_option_type</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.5.2</td>
- <td>Bitmask Type <code>regex_constants::match_flag_type</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.5.3</td>
- <td>Implementation defined <code>error_type</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.6</td>
- <td>Class <code>regex_error</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.7</td>
- <td>Class template <code>regex_traits</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8</td>
- <td>Class template <code>basic_regex</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.1</td>
- <td><code>basic_regex</code> constants</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.2</td>
- <td><code>basic_regex</code> constructors</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.3</td>
- <td><code>basic_regex</code> assign</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.4</td>
- <td><code>basic_regex</code> constant operations</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.5</td>
- <td><code>basic_regex</code> locale</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.6</td>
- <td><code>basic_regex</code> swap</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.7</td>
- <td><code>basic_regex</code> non-member functions</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.8.7.1</td>
- <td><code>basic_regex</code> non-member swap</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.9</td>
- <td>Class template <code>sub_match</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.9.1</td>
- <td><code>sub_match</code> members</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.9.2</td>
- <td><code>sub_match</code> non-member operators</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10</td>
- <td>Class template <code>match_results</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.1</td>
- <td><code>match_results</code> constructors</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.2</td>
- <td><code>match_results</code> size</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.3</td>
- <td><code>match_results</code> element access</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.4</td>
- <td><code>match_results</code> formatting</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.5</td>
- <td><code>match_results</code> allocator</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.10.6</td>
- <td><code>match_results</code> swap</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.11</td>
- <td>Regular expression algorithms</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.11.1</td>
- <td>exceptions</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.11.2</td>
- <td><code>regex_match</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.11.3</td>
- <td><code>regex_search</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.11.4</td>
- <td><code>regex_replace</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12</td>
- <td>Regular expression Iterators</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.1</td>
- <td>Class template <code>regex_iterator</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.1.1</td>
- <td><code>regex_iterator</code> constructors</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.1.2</td>
- <td><code>regex_iterator</code> comparisons</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.1.3</td>
- <td><code>regex_iterator</code> dereference</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.1.4</td>
- <td><code>regex_iterator</code> increment</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.2</td>
- <td>Class template <code>regex_token_iterator</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.2.1</td>
- <td><code>regex_token_iterator</code> constructors</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.2.2</td>
- <td><code>regex_token_iterator</code> comparisons</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.2.3</td>
- <td><code>regex_token_iterator</code> dereference</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.12.2.4</td>
- <td><code>regex_token_iterator</code> increment</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>7.13</td>
- <td>Modified ECMAScript regular expression grammar</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td><b>8</b></td>
- <td colspan="5"><b>C compatibility</b></td>
- </tr>
- <tr>
- <td>8.1</td>
- <td>Additions to header <code>&lt;complex&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.2</td>
- <td>Function <code>acos</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.3</td>
- <td>Function <code>asin</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.4</td>
- <td>Function <code>atan</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.5</td>
- <td>Function <code>acosh</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.6</td>
- <td>Function <code>asinh</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.7</td>
- <td>Function <code>atanh</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.8</td>
- <td>Function <code>fabs</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.1.9</td>
- <td>Additional Overloads</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.2</td>
- <td>Header <code>&lt;ccomplex&gt;</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td>DR 551</td>
- </tr>
- <tr>
- <td>8.3</td>
- <td>Header <code>&lt;complex.h&gt;</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td>DR 551</td>
- </tr>
- <tr>
- <td>8.4</td>
- <td>Additions to header <code>&lt;cctype&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.4.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.4.2</td>
- <td>Function <code>isblank</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.5</td>
- <td>Additions to header <code>&lt;ctype.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.6</td>
- <td>Header <code>&lt;cfenv&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.6.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.6.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.7</td>
- <td>Header <code>&lt;fenv.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.8</td>
- <td>Additions to header <code>&lt;cfloat&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.9</td>
- <td>Additions to header <code>&lt;float.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.10</td>
- <td>Additions to header <code>&lt;ios&gt;</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>8.10.1</td>
- <td>Synopsis</td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>8.10.2</td>
- <td>Function <code>hexfloat</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>8.11</td>
- <td>Header <code>&lt;cinttypes&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.11.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>DR 557</td>
- </tr>
- <tr>
- <td>8.11.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.12</td>
- <td>Header <code>&lt;inttypes.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.13</td>
- <td>Additions to header <code>&lt;climits&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.14</td>
- <td>Additions to header <code>&lt;limits.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.15</td>
- <td>Additions to header <code>&lt;locale&gt;</code></td>
- <td></td>
- <td></td>
- <td>missing</td>
- <td></td>
- </tr>
- <tr>
- <td>8.16</td>
- <td>Additions to header <code>&lt;cmath&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.16.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.16.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.16.3</td>
- <td>Function template definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.16.4</td>
- <td>Additional overloads</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>DR 568; DR 550</td>
- </tr>
- <tr>
- <td>8.17</td>
- <td>Additions to header <code>&lt;math.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.18</td>
- <td>Additions to header <code>&lt;cstdarg&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.19</td>
- <td>Additions to header <code>&lt;stdarg.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.20</td>
- <td>The header <code>&lt;cstdbool&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.21</td>
- <td>The header <code>&lt;stdbool.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.22</td>
- <td>The header <code>&lt;cstdint&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.22.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.22.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.23</td>
- <td>The header <code>&lt;stdint.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.24</td>
- <td>Additions to header <code>&lt;cstdio&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.24.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.24.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.24.3</td>
- <td>Additional format specifiers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>C library responsability</td>
- </tr>
- <tr>
- <td>8.24.4</td>
- <td>Additions to header <code>&lt;stdio.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.25</td>
- <td>Additions to header <code>&lt;cstdlib&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.25.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.25.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.25.3</td>
- <td>Function <code>abs</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.25.4</td>
- <td>Function <code>div</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.26</td>
- <td>Additions to header <code>&lt;stdlib.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.27</td>
- <td>Header <code>&lt;ctgmath&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>DR 551</td>
- </tr>
- <tr>
- <td>8.28</td>
- <td>Header <code>&lt;tgmath.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>DR 551</td>
- </tr>
- <tr>
- <td>8.29</td>
- <td>Additions to header <code>&lt;ctime&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>C library responsability</td>
- </tr>
- <tr>
- <td>8.30</td>
- <td>Additions to header <code>&lt;cwchar&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.30.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.30.2</td>
- <td>Definitions</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.30.3</td>
- <td>Additional wide format specifiers</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td>C library responsability</td>
- </tr>
- <tr>
- <td>8.31</td>
- <td>Additions to header <code>&lt;wchar.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.32</td>
- <td>Additions to header <code>&lt;cwctype&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.32.1</td>
- <td>Synopsis</td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.32.2</td>
- <td>Function <code>iswblank</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>8.33</td>
- <td>Additions to header <code>&lt;wctype.h&gt;</code></td>
- <td>done</td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<h3>Footnotes</h3>
-
-<ol>
-
- <li>
- <a name="1"/>
- The shared_ptr implementation uses some code from the
- <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">Boost
- shared_ptr</a> library.
- </li>
-
-</ol>
-
-<p>
-Please send FSF &amp; GNU inquiries &amp; questions to
-<a href="mailto:gnu@gnu.org">gnu@gnu.org</a>.
-There are also <a href="http://www.gnu.org/home.html#ContactInfo">other ways
-to contact</a> the FSF.
-</p>
-
-<p>
-These pages are maintained by
-<a href="http://gcc.gnu.org/about.html">the GCC team</a>.
-</p>
-
-<address>
-For questions related to the use of GCC, please consult these web
-pages and the <a href="http://gcc.gnu.org/onlinedocs/">GCC manuals</a>. If
-that fails, the <a href="mailto:gcc-help@gcc.gnu.org">gcc-help@gcc.gnu.org</a>
-mailing list might help.<br />
-Please send comments on these web pages and the development of GCC to our
-developer mailing list at <a href="mailto:gcc@gnu.org">gcc@gnu.org</a>
-or <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a>. All of our lists
-have <a href="http://gcc.gnu.org/lists.html">public archives</a>.
-</address>
-
-<p>
-Copyright (C) Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
-</p>
-<p>
-Verbatim copying and distribution of this entire article is
-permitted in any medium, provided this notice is preserved.
-</p>
-
-<table width="100%" border="0">
-<tr>
- <td>
- <!-- IGNORE DIFF -->Last modified 2006-10-01
- </td>
- <td align="right" valign="bottom">
- <a href="http://validator.w3.org/check/referer">
- <img src="http://www.w3.org/Icons/valid-xhtml10"
- alt="Valid XHTML 1.0" border="0" width="88" height="31" />
- </a>
- </td>
-</tr>
-</table>
-
-</body>
-</html>
diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html
deleted file mode 100644
index 298ae37cdb6..00000000000
--- a/libstdc++-v3/docs/html/faq/index.html
+++ /dev/null
@@ -1,1210 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++, libg++, STL" />
- <meta name="DESCRIPTION" content="FAQ for the GNU libstdc++ effort." />
- <title>libstdc++-v3 FAQ</title>
-<link rel="StyleSheet" href="../lib3styles.css" />
-<link rel="Start" rev="Help" href="../documentation.html" type="text/html"
- title="GNU C++ Standard Library" />
-<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered">libstdc++ Frequently Asked Questions</h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/faq/">
- http://gcc.gnu.org/onlinedocs/libstdc++/faq/</a>. The main documentation
- page is at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<h1>Questions</h1>
-<ol>
- <li><a href="#1_0">General Information</a>
- <!-- I suspect these will mostly be links to/into existing documents. -->
- <ol>
- <li><a href="#1_1">What is libstdc++-v3?</a> </li>
- <li><a href="#1_2">Why should I use libstdc++?</a> </li>
- <li><a href="#1_3">Who's in charge of it?</a> </li>
- <li><a href="#1_4">How do I get libstdc++?</a> </li>
- <li><a href="#1_5">When is libstdc++ going to be finished?</a> </li>
- <li><a href="#1_6">How do I contribute to the effort?</a> </li>
- <li><a href="#1_7">What happened to libg++? I need that!</a> </li>
- <li><a href="#1_8">What if I have more questions?</a> </li>
- <li><a href="#1_9">What are the license terms for libstdc++-v3?</a> </li>
- </ol>
- </li>
-
- <li><a href="#2_0">Installation</a>
- <ol>
- <li><a href="#2_1">How do I install libstdc++-v3?</a> </li>
- <li><a href="#2_2">[removed]</a> </li>
- <li><a href="#2_3">What is this SVN thing that you keep
- mentioning?</a> </li>
- <li><a href="#2_4">How do I know if it works?</a> </li>
- <li><a href="#2_5">This library is HUGE! And what's libsupc++?</a> </li>
- <li><a href="#2_6">Why do I get an error saying
- <code>libstdc++.so.X</code> is missing when I
- run my program?</a> </li>
- </ol>
- </li>
-
- <li><a href="#3_0">Platform-Specific Issues</a>
- <ol>
- <li><a href="#3_1">Can libstdc++-v3 be used with &lt;my
- favorite compiler&gt;?</a> </li>
- <li><a href="#3_2">[removed]</a> </li>
- <li><a href="#3_3">[removed]</a> </li>
- <li><a href="#3_4">I can't use 'long long' on Solaris</a> </li>
- <li><a href="#3_5"><code>_XOPEN_SOURCE</code> /
- <code>_GNU_SOURCE</code> / etc is always defined</a>
- </li>
- <li><a href="#3_6">OS X ctype.h is broken! How can I hack it?</a></li>
- <li><a href="#3_7">Threading is broken on i386</a></li>
- <li><a href="#3_8">Recent GNU/Linux glibc required?</a></li>
- <li><a href="#3_9">Can't use wchar_t/wstring on FreeBSD</a></li>
- <li><a href="#3_10">MIPS atomic operations</a></li>
- </ol>
- </li>
-
- <li><a href="#4_0">Known Bugs and Non-Bugs</a>
- <ol>
- <li><a href="#4_1">What works already?</a> </li>
- <li><a href="#4_2">Bugs in gcc/g++ (not libstdc++-v3)</a> </li>
- <li><a href="#4_3">Bugs in the C++ language/lib specification</a> </li>
- <li><a href="#4_4">Things in libstdc++ that only look like bugs</a><ul>
- <li><a href="#4_4_iostreamclear">reopening a stream fails</a> </li>
- <li><a href="#4_4_Weff">-Weffc++ complains too much</a> </li>
- <li><a href="#4_4_rel_ops">&quot;ambiguous overloads&quot;
- after including an old-style header</a> </li>
- <li><a href="#4_4_interface">The g++-3 headers are
- <strong>not ours</strong></a> </li>
- <li><a href="#4_4_glibc">compilation errors from streambuf.h</a> </li>
- <li><a href="#4_4_checks">errors about <em>*Concept</em> and
- <em>constraints</em> in the STL...</a> </li>
- <li><a href="#4_4_dlsym">program crashes when using library code
- in a dynamically-loaded library</a> </li>
- <li><a href="#4_4_leak">"memory leaks" in containers</a> </li>
- </ul>
- </li>
- <li><a href="#4_5">Aw, that's easy to fix!</a> </li>
- </ol>
- </li>
-
- <li><a href="#5_0">Miscellaneous</a>
- <ol>
- <li><a href="#5_1">string::iterator is not char*;
- vector&lt;T&gt;::iterator is not T*</a> </li>
- <li><a href="#5_2">What's next after libstdc++-v3?</a> </li>
- <li><a href="#5_3">What about the STL from SGI?</a> </li>
- <li><a href="#5_4">Extensions and Backward Compatibility</a> </li>
- <li><a href="#5_5">Does libstdc++ support TR1?</a> </li>
- <li><a href="#5_6">Is libstdc++-v3 thread-safe?</a> </li>
- <li><a href="#5_7">How do I get a copy of the ISO C++ Standard?</a> </li>
- <li><a href="#5_8">What's an ABI and why is it so messy?</a> </li>
- <li><a href="#5_9">How do I make std::vector&lt;T&gt;::capacity()
- == std::vector&lt;T&gt;::size?</a> </li>
- </ol>
- </li>
-
-</ol>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h1><a name="1_0">1.0 General Information</a></h1>
-<!-- I suspect these will mostly be links to/into existing documents. -->
- <h2><a name="1_1">1.1 What is libstdc++-v3?</a></h2>
- <p>The GNU Standard C++ Library v3 is an
- ongoing project to implement the ISO 14882 Standard C++ library
- as described in chapters 17 through 27 and annex D.
- For those who want to see exactly how
- far the project has come, or just want the latest
- bleeding-edge code, the up-to-date source is available over
- anonymous SVN, and can even be browsed over the Web (see
- <a href="#1_4">1.4</a> below).
- </p>
- <p>The older libstdc++-v2 project is no longer maintained; the code
- has been completely replaced and rewritten.
- <a href="#4_4_interface">If you are using V2</a>, then you need to
- report bugs to your system vendor, not to the V3 list.
- </p>
- <p>A more formal description of the V3 goals can be found in the
- official <a href="../17_intro/DESIGN">design document</a>.
- </p>
-
-<hr />
- <h2><a name="1_2">1.2 Why should I use libstdc++?</a></h2>
- <p>The completion of the ISO C++ standardization gave the
- C++ community a powerful set of reuseable tools in the form
- of the C++ Standard Library. However, all existing C++
- implementations are (as the Draft Standard used to say)
- &quot;incomplet and incorrekt,&quot; and many suffer from
- limitations of the compilers that use them.
- </p>
- <p>The GNU C/C++/FORTRAN/&lt;pick-a-language&gt; compiler
- (<code>gcc</code>, <code>g++</code>, etc) is widely considered to be
- one of the leading compilers in the world. Its development
- is overseen by the
- <a href="http://gcc.gnu.org/">GCC team</a>. All of
- the rapid development and near-legendary
- <a href="http://gcc.gnu.org/gcc-3.3/buildstat.html">portability</a>
- that are the hallmarks of an open-source project are being
- applied to libstdc++.
- </p>
- <p>That means that all of the Standard classes and functions
- (such as <code>string</code>, <code>vector&lt;&gt;</code>, iostreams,
- and algorithms) will be freely available and fully compliant.
- Programmers will no longer need to &quot;roll their own&quot;
- nor be worried about platform-specific incompatibilities.
- </p>
-
-<hr />
- <h2><a name="1_3">1.3 Who's in charge of it?</a></h2>
- <p>The libstdc++ project is contributed to by several developers
- all over the world, in the same way as GCC or Linux.
- Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper,
- Loren James Rittle, and Paolo Carlini are the lead maintainers of
- the SVN archive.
- </p>
- <p>Development and discussion is held on the libstdc++ mailing
- list. Subscribing to the list, or searching the list
- archives, is open to everyone. You can read instructions for
- doing so on the <a href="http://gcc.gnu.org/libstdc++/">homepage</a>.
- If you have questions, ideas, code, or are just curious, sign up!
- </p>
-
-<hr />
- <h2><a name="1_4">1.4 How do I get libstdc++?</a></h2>
- <p>The <a href="http://gcc.gnu.org/libstdc++/">homepage</a>
- has instructions for retrieving the latest SVN sources, and for
- browsing the SVN sources over the web.
- </p>
- <p>Stable versions of libstdc++-v3 are included with releases of
- <a href="http://gcc.gnu.org/releases.html">the GCC compilers</a>.
- </p>
- <p>The subset commonly known as the Standard Template Library
- (chapters 23 through 25, mostly) is adapted from the final release
- of the SGI STL, with extensive changes.
- </p>
-
-<hr />
- <h2><a name="1_5">1.5 When is libstdc++ going to be finished?</a></h2>
-<!-- <p>Nathan Myers gave the best of all possible answers in <a
- href="http://www.deja.com/getdoc.xp?AN=469581698&fmt=text">a
- Usenet article</a>.</p>
-which is no longer available, thanks deja...-->
- <p>Nathan Myers gave the best of all possible answers, responding to a
- Usenet article asking this question: <em>Sooner, if you help.</em>
- </p>
-
-<hr />
- <h2><a name="1_6">1.6 How do I contribute to the effort?</a></h2>
- <p>Here is <a href="../17_intro/contribute.html">a
- page devoted to this topic</a>. Subscribing to the mailing
- list (see above, or the homepage) is a very good idea if you
- have something to contribute, or if you have spare time and
- want to help. Contributions don't have to be in the form of
- source code; anybody who is willing to help write
- documentation, for example, or has found a bug in code that
- we all thought was working, is more than welcome!
- </p>
-
-<hr />
- <h2><a name="1_7">1.7 What happened to libg++? I need that!</a></h2>
- <p>The most recent libg++ README states that libg++ is no longer
- being actively maintained. It should not be used for new
- projects, and is only being kicked along to support older code.
- </p>
- <p>The libg++ was designed and created when there was no Standard
- to provide guidance. Classes like linked lists are now provided
- for by <code>list&lt;T&gt;</code> and do not need to be created by
- <code>genclass</code>. (For that matter, templates exist now and
- are well-supported, whereas genclass (mostly) predates them.)
- </p>
- <p>There are other classes in libg++ that are not specified in the
- ISO Standard (e.g., statistical analysis). While there are a
- lot of really useful things that are used by a lot of people
- (e.g., statistics :-), the Standards Committee couldn't include
- everything, and so a lot of those &quot;obvious&quot; classes
- didn't get included.
- </p>
- <p>Since libstdc++ is an implementation of the Standard Library, we
- have no plans at this time to include non-Standard utilities
- in the implementation, however handy they are. (The extensions
- provided in the SGI STL aren't maintained by us and don't get
- a lot of our attention, because they don't require a lot of our
- time.) It is entirely plausible that the &quot;useful stuff&quot;
- from libg++ might be extracted into an updated utilities library,
- but nobody has started such a project yet.
- </p>
- <p>(The <a href="http://www.boost.org/">Boost</a> site houses free
- C++ libraries that do varying things, and happened to be started
- by members of the Standards Committee. Certain &quot;useful
- stuff&quot; classes will probably migrate there.)
- </p>
- <p>For the bold and/or desperate, the
- <a href="http://gcc.gnu.org/extensions.html">GCC extensions page</a>
- describes where to find the last libg++ source.
- </p>
-
-<hr />
- <h2><a name="1_8">1.8 What if I have more questions?</a></h2>
- <p>If you have read the README and RELEASE-NOTES files, and your
- question remains unanswered, then just ask the mailing list.
- At present, you do not need to be subscribed to the list to
- send a message to it. More information is available on the
- homepage (including how to browse the list archives); to send
- to the list, use <a href="mailto:libstdc++@gcc.gnu.org">
- <code>libstdc++@gcc.gnu.org</code></a>.
- </p>
- <p>If you have a question that you think should be included here,
- or if you have a question <em>about</em> a question/answer here,
- contact <a href="mailto:pme@gcc.gnu.org">Phil Edwards</a>
- or <a href="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</a>.
- </p>
-
-<hr />
- <h2><a name="1_9">1.9 What are the license terms for libstdc++-v3?</a></h2>
- <p>See <a href="../17_intro/license.html">our license description</a>
- for these and related questions.
- </p>
-
-<hr />
-<h1><a name="2_0">2.0 Installation</a></h1>
- <h2><a name="2_1">2.1 How do I install libstdc++-v3?</a></h2>
- <p>Complete instructions are not given here (this is a FAQ, not
- an installation document), but the tools required are few:
- </p>
- <ul>
- <li> A 3.x release of GCC. Note that building GCC is much
- easier and more automated than building the GCC 2.[78]
- series was. If you are using GCC 2.95, you can still
- build earlier snapshots of libstdc++.
- </li>
- <li> GNU Make is required for GCC 3.4 and later.
- </li>
- <li> The GNU Autotools are needed if you are messing with
- the configury or makefiles.
- </li>
- </ul>
- <p>The file <a href="../documentation.html">documentation.html</a>
- provides a good overview of the steps necessary to build, install,
- and use the library. Instructions for configuring the library
- with new flags such as --enable-threads are there also, as well as
- patches and instructions for working with GCC 2.95.
- </p>
- <p>The top-level install.html and
- <a href="../17_intro/RELEASE-NOTES">RELEASE-NOTES</a> files contain
- the exact build and installation instructions. You may wish to
- browse those files over ViewVC ahead of time to get a feel for
- what's required. RELEASE-NOTES is located in the
- &quot;.../docs/17_intro/&quot; directory of the distribution.
- </p>
-
-<hr />
- <h2><a name="2_2">2.2 [removed]</a></h2>
- <p>This question has become moot and has been removed. The stub
- is here to preserve numbering (and hence links/bookmarks).
- </p>
-
-<hr />
- <h2><a name="2_3">2.3 What is this SVN thing that you
- keep mentioning?</a></h2>
- <p><em>Subversion</em> is one of several revision control packages.
- It was selected for GNU projects because it's free (speech), free (beer),
- and very high quality. The <a href="http://subversion.tigris.org">
- Subversion home page</a> has a better description.
- </p>
- <p>The &quot;anonymous client checkout&quot; feature of SVN is
- similar to anonymous FTP in that it allows anyone to retrieve
- the latest libstdc++ sources.
- </p>
- <p>After the first of April, American users will have a
- &quot;/pharmacy&quot; command-line option...
- <!-- wonder how long that'll live -->
- </p>
-
-<hr />
- <h2><a name="2_4">2.4 How do I know if it works?</a></h2>
- <p>libstdc++-v3 comes with its own testsuite. You do not need
- to actually install the library (&quot;<code>make
- install</code>&quot;) to run the testsuite, but you do need
- DejaGNU, as described
- <a href="http://gcc.gnu.org/install/test.html">here</a>.
- </p>
- <p>To run the testsuite on the library after building it, use
- &quot;make check&quot; while in your build directory. To run
- the testsuite on the library after building and installing it,
- use &quot;make check-install&quot; instead.
- </p>
- <p>If you find bugs in the testsuite programs themselves, or if you
- think of a new test program that should be added to the suite,
- <strong>please</strong> write up your idea and send it to the list!
- </p>
-
-<hr />
- <h2><a name="2_5">2.5 This library is HUGE! And what's libsupc++?</a></h2>
- <p>Usually the size of libraries on disk isn't noticeable. When a
- link editor (or simply &quot;linker&quot;) pulls things from a
- static archive library, only the necessary object files are copied
- into your executable, not the entire library. Unfortunately, even
- if you only need a single function or variable from an object file,
- the entire object file is extracted. (There's nothing unique to C++
- or libstdc++-v3 about this; it's just common behavior, given here
- for background reasons.)
- </p>
- <p>Some of the object files which make up libstdc++.a are rather large.
- If you create a statically-linked executable with
- <code> -static</code>, those large object files are suddenly part
- of your executable. Historically the best way around this was to
- only place a very few functions (often only a single one) in each
- source/object file; then extracting a single function is the same
- as extracting a single .o file. For libstdc++-v3 this is only
- possible to a certain extent; the object files in question contain
- template classes and template functions, pre-instantiated, and
- splitting those up causes severe maintenance headaches.
- </p>
- <p>It's not a bug, and it's not really a problem. Nevertheless, some
- people don't like it, so here are two pseudo-solutions:
- </p>
- <p>If the only functions from libstdc++.a which you need are
- language support functions (those listed in <a
- href="../18_support/howto.html">clause 18</a> of the
- standard, e.g., <code>new</code> and <code>delete</code>),
- then try linking against <code>libsupc++.a</code> (Using
- <code>gcc</code> instead of <code>g++</code> and explicitly
- linking in <code>-lsupc++</code> for the final link step will
- do it). This library contains only those support routines,
- one per object file. But if you are using anything from the
- rest of the library, such as IOStreams or vectors, then
- you'll still need pieces from <code>libstdc++.a</code>.
- </p>
- <p>The second method is one we hope to incorporate into the library
- build process. Some platforms can place each function and variable
- into its own section in a .o file. The GNU linker can then perform
- garbage collection on unused sections; this reduces the situation
- to only copying needed functions into the executable, as before,
- but all happens automatically.
- </p>
- <p>Unfortunately the garbage collection in GNU ld is buggy; sections
- (corresponding to functions and variables) which <em>are</em> used
- are mistakenly removed, leading to horrible crashes when your
- executable starts up. For the time being, this feature is not used
- when building the library.
- </p>
-
-<hr />
- <h2><a name="2_6">2.6 Why do I get an error saying
- <code>libstdc++.so.X</code> is missing when I run
- my program?</a></h2>
- <p>Depending on your platform and library version, the message might
- be similar to one of the following:
- </p>
- <pre>
- ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
-
- /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found </pre>
-
- <p>This doesn't mean that the shared library isn't installed, only
- that the dynamic linker can't find it. When a dynamically-linked
- executable is run the linker finds and loads the required shared
- libraries by searching a pre-configured list of directories. If
- the directory where you've installed libstdc++ is not in this
- list then the libraries won't be found. The simplest way to fix
- this is to use the <code>LD_LIBRARY_PATH</code> environment
- variable, which is a colon-separated list of directories in which
- the linker will search for shared libraries:
- </p>
- <pre>
- LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH </pre>
- <p>The exact environment variable to use will depend on your platform,
- e.g. DYLD_LIBRARY_PATH for Darwin,
- LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit,
- LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs
- and SHLIB_PATH for HP-UX.
- </p>
- <p>See the man pages for <code>ld(1)</code>, <code>ldd(1)</code> and
- <code>ldconfig(8)</code> for more information. The dynamic linker
- has different names on different platforms but the man page is
- usually called something such as <code>ld.so / rtld / dld.so</code>.
- </p>
-
-<hr />
-<h1><a name="3_0">3.0 Platform-Specific Issues</a></h1>
- <h2><a name="3_1">3.1 Can libstdc++-v3 be used with &lt;my
- favorite compiler&gt;?</a></h2>
- <p>Probably not. Yet.</p>
- <p>Because GCC advances so rapidly, development and testing of
- libstdc++ is being done almost entirely under that compiler.
- If you are curious about whether other, lesser compilers
- (*grin*) support libstdc++, you are more than welcome to try.
- Configuring and building the library (see above) will still
- require certain tools, however. Also keep in mind that
- <em>building</em> libstdc++ does not imply that your compiler
- will be able to <em>use</em> all of the features found in the
- C++ Standard Library.
- </p>
- <p>Since the goal of ISO Standardization is for all C++
- implementations to be able to share code, the final libstdc++
- should, in theory, be usable under any ISO-compliant
- compiler. It will still be targeted and optimized for
- GCC/g++, however.
- </p>
-
-<hr />
- <h2><a name="3_2">3.2 [removed]</a></h2>
- <p>This question has become moot and has been removed. The stub
- is here to preserve numbering (and hence links/bookmarks).
- </p>
-
-<hr />
- <h2><a name="3_3">3.3 [removed]</a></h2>
- <p>This question has become moot and has been removed. The stub
- is here to preserve numbering (and hence links/bookmarks).
- </p>
-
-<hr />
- <h2><a name="3_4">3.4 I can't use 'long long' on Solaris</a></h2>
- <p>By default we try to support the C99 <code>long long</code> type.
- This requires that certain functions from your C library be present.
- </p>
- <p>Up through release 3.0.2 the tests performed were too general, and
- this feature was disabled when it did not need to be. The most
- commonly reported platform affected was Solaris.
- </p>
- <p>This has been fixed for 3.0.3 and onwards.
- </p>
-
-<hr />
- <h2><a name="3_5">3.5 <code>_XOPEN_SOURCE</code> / <code>_GNU_SOURCE</code>
- / etc is always defined</a></h2>
- <p>On Solaris, g++ (but not gcc) always defines the preprocessor
- macro <code>_XOPEN_SOURCE</code>. On GNU/Linux, the same happens
- with <code>_GNU_SOURCE</code>. (This is not an exhaustive list;
- other macros and other platforms are also affected.)
- </p>
- <p>These macros are typically used in C library headers, guarding new
- versions of functions from their older versions. The C++ standard
- library includes the C standard library, but it requires the C90
- version, which for backwards-compatibility reasons is often not the
- default for many vendors.
- </p>
- <p>More to the point, the C++ standard requires behavior which is only
- available on certain platforms after certain symbols are defined.
- Usually the issue involves I/O-related typedefs. In order to
- ensure correctness, the compiler simply predefines those symbols.
- </p>
- <p>Note that it's not enough to #define them only when the library is
- being built (during installation). Since we don't have an 'export'
- keyword, much of the library exists as headers, which means that
- the symbols must also be defined as your programs are parsed and
- compiled.
- </p>
- <p>To see which symbols are defined, look for CPLUSPLUS_CPP_SPEC in
- the gcc config headers for your target (and try changing them to
- see what happens when building complicated code). You can also run
- <code>&quot;g++ -E -dM - &lt; /dev/null&quot;</code> to display
- a list of predefined macros for any particular installation.
- </p>
- <p>This has been discussed on the mailing lists
- <a href="http://gcc.gnu.org/cgi-bin/htsearch?method=and&amp;format=builtin-long&amp;sort=score&amp;words=_XOPEN_SOURCE+Solaris">quite a bit</a>.
- </p>
- <p>This method is something of a wart. We'd like to find a cleaner
- solution, but nobody yet has contributed the time.
- </p>
-
-<hr />
- <h2><a name="3_6">3.6 OS X ctype.h is broken! How can I hack it?</a></h2>
- <p>This is a long-standing bug in the OS X support. Fortunately,
- the patch is quite simple, and well-known.
- <a href="http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html"> Here's a
- link to the solution.</a>
- </p>
-
-<hr />
- <h2><a name="3_7">3.7 Threading is broken on i386</a></h2>
- <p>Support for atomic integer operations is/was broken on i386
- platforms. The assembly code accidentally used opcodes that are
- only available on the i486 and later. So if you configured GCC
- to target, for example, i386-linux, but actually used the programs
- on an i686, then you would encounter no problems. Only when
- actually running the code on a i386 will the problem appear.
- </p>
- <p>This is fixed in 3.2.2.
- </p>
-
-<hr />
- <h2><a name="3_8">3.8 Recent GNU/Linux glibc required?</a></h2>
- <p>When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
- 5.0.1) and later uses localization and formatting code from the system
- C library (glibc) version 2.2.5. That version of glibc is over a
- year old and contains necessary bugfixes. Many GNU/Linux distros make
- glibc version 2.3.x available now.
- </p>
- <p>The guideline is simple: the more recent the C++ library, the
- more recent the C library. (This is also documented in the main
- GCC installation instructions.)
- </p>
-
-<hr />
- <h2><a name="3_9">3.9 Can't use wchar_t/wstring on FreeBSD</a></h2>
- <p>At the moment there are a few problems in FreeBSD's support for
- wide character functions, and as a result the libstdc++ configury
- decides that wchar_t support should be disabled. Once the underlying
- problems are fixed in FreeBSD (soon), the library support will
- automatically enable itself.
- </p>
- <p>You can fix the problems yourself, and learn more about the situation,
- by reading
- <a href="http://gcc.gnu.org/ml/libstdc++/2003-02/subjects.html#00286">
- this short thread</a> (&quot;_GLIBCPP_USE_WCHAR_T undefined in
- FreeBSD's c++config.h?&quot;).
- </p>
-
-<hr />
- <h2><a name="3_10">3.10 MIPS atomic operations</a></h2>
- <p>The atomic locking routines for MIPS targets requires MIPS II
- and later. A patch went in just after the 3.3 release to
- make mips* use the generic implementation instead. You can also
- configure for mipsel-elf as a workaround.
- </p>
- <p>mips*-*-linux* continues to use the MIPS II routines, and more
- work in this area is expected.
- </p>
-
-<hr />
-<h1><a name="4_0">4.0 Known Bugs and Non-Bugs</a></h1>
- <em>Note that this section can get rapidly outdated -- such is the
- nature of an open-source project. For the latest information, join
- the mailing list or look through recent archives. The RELEASE-
- NOTES and BUGS files are generally kept up-to-date.</em>
-
- <p>For 3.0.1, the most common &quot;bug&quot; is an apparently missing
- &quot;<code>../</code>&quot; in include/Makefile, resulting in files
- like gthr.h and gthr-single.h not being found. Please read
- <a href="http://gcc.gnu.org/install/configure.html">the configuration
- instructions for GCC</a>,
- specifically the part about configuring in a separate build directory,
- and how strongly recommended it is. Building in the source directory
- is fragile, is rarely tested, and tends to break, as in this case.
- This was fixed for 3.0.2.
- </p>
-
- <p>For 3.1, the most common &quot;bug&quot; is a parse error when using
- <code>&lt;fstream&gt;</code>, ending with a message,
- &quot;<code>bits/basic_file.h:52: parse error before `{'
- token</code>.&quot; Please read
- <a href="http://gcc.gnu.org/install/">the installation instructions for
- GCC</a>, specifically the part about not installing newer versions on
- top of older versions. If you install 3.1 over a 3.0.x release, then
- the wrong basic_file.h header will be found (its location changed
- between releases).
- </p>
-
- <p><strong>Please do not report these as bugs. We know about them.</strong>
- Reporting this -- or any other problem that's already been fixed --
- hinders the development of GCC, because we have to take time to
- respond to your report. Thank you.
- </p>
-
-<hr />
- <h2><a name="4_1">4.1 What works already?</a></h2>
- <p>Short answer: Pretty much everything <em>works</em> except for some
- corner cases. Also, localization is incomplete. For whether it works
- well, or as you expect it to work, see 5.2.
- </p>
- <p>Long answer: See the docs/html/17_intro/CHECKLIST file, which is
- badly outdated... Also see the RELEASE-NOTES file, which is kept
- more up to date.
- </p>
-
-<hr />
- <h2><a name="4_2">4.2 Bugs in gcc/g++ (not libstdc++-v3)</a></h2>
- <p>This is by no means meant to be complete nor exhaustive, but
- mentions some problems that users may encounter when building
- or using libstdc++. If you are experiencing one of these
- problems, you can find more information on the libstdc++ and
- the GCC mailing lists.
- </p>
- <p>Before reporting a bug, examine the
- <a href="http://gcc.gnu.org/bugs.html">bugs database</a> with the
- category set to &quot;libstdc++&quot;. The BUGS file in the source
- tree also tracks known serious problems.
- </p>
- <ul>
- <li>Debugging is problematic, due to bugs in line-number generation
- (mostly fixed in the compiler) and gdb lagging behind the
- compiler (lack of personnel). We recommend configuring the
- compiler using <code>--with-dwarf2</code> if the DWARF2
- debugging format is not already the default on your platform.
- Also,
-<a href="http://gcc.gnu.org/ml/libstdc++/2002-02/msg00034.html">changing your
- GDB settings</a> can have a profound effect on your C++ debugging
- experiences. :-)</li>
- </ul>
-
-<hr />
- <h2><a name="4_3">4.3 Bugs in the C++ language/lib specification</a></h2>
- <p>Yes, unfortunately, there are some. In a
- <a href="http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html">message
- to the list</a>, Nathan Myers announced that he has started a list of
- problems in the ISO C++ Standard itself, especially with
- regard to the chapters that concern the library. The list
- itself is
- <a href="http://www.cantrip.org/draft-bugs.txt">posted on his
- website</a>. Developers who are having problems interpreting
- the Standard may wish to consult his notes.
- </p>
- <p>For those people who are not part of the ISO Library Group
- (i.e., nearly all of us needing to read this page in the first
- place :-), a public list of the library defects is occasionally
- published <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/">here</a>.
- Some of these have resulted in <a href="#5_2">code changes</a>.
- </p>
-
-<hr />
- <h2><a name="4_4">4.4 Things in libstdc++ that only look like bugs</a></h2>
- <p>There are things which are not bugs in the compiler (4.2) nor
- the language specification (4.3), but aren't really bugs in
- libstdc++, either. Really! Please do not report these as bugs.
- </p>
- <p><a name="4_4_Weff"><strong>-Weffc++</strong></a>
- The biggest of these is the quadzillions of warnings about the
- library headers emitted when <code>-Weffc++</code> is used. Making
- libstdc++ &quot;-Weffc++-clean&quot; is not a goal of the project,
- for a few reasons. Mainly, that option tries to enforce
- object-oriented programming, while the Standard Library isn't
- necessarily trying to be OO.
- </p>
- <p><a name="4_4_iostreamclear"><strong>reopening a stream fails</strong>
- </a> Did I just say that -Weffc++ was our biggest false-bug report?
- I lied. (It used to be.) Today it seems to be reports that after
- executing a sequence like
- </p>
- <pre>
- #include &lt;fstream&gt;
- ...
- std::fstream fs(&quot;a_file&quot;);
- // .
- // . do things with fs...
- // .
- fs.close();
- fs.open(&quot;a_new_file&quot;);</pre>
- <p>all operations on the re-opened <code>fs</code> will fail, or at
- least act very strangely. Yes, they often will, especially if
- <code>fs</code> reached the EOF state on the previous file. The
- reason is that the state flags are <strong>not</strong> cleared
- on a successful call to open(). The standard unfortunately did
- not specify behavior in this case, and to everybody's great sorrow,
- the <a href="../ext/howto.html#5">proposed LWG resolution in
- DR #22</a> is to leave the flags unchanged. You must insert a call
- to <code>fs.clear()</code> between the calls to close() and open(),
- and then everything will work like we all expect it to work.
- <strong>Update:</strong> for GCC 4.0 we implemented the resolution
- of <a href="../ext/howto.html#5">DR #409</a> and open() now calls
- <code>clear()</code> on success!
- </p>
- <p><a name="4_4_rel_ops"><strong>rel_ops</strong></a>
- Another is the <code>rel_ops</code> namespace and the template
- comparison operator functions contained therein. If they become
- visible in the same namespace as other comparison functions
- (e.g., '<code>using</code>' them and the &lt;iterator&gt; header),
- then you will suddenly be faced with huge numbers of ambiguity
- errors. This was discussed on the -v3 list; Nathan Myers
- <a href="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html">sums
- things up here</a>. The collisions with vector/string iterator
- types have been fixed for 3.1. <!-- more links to email here -->
- </p>
- <h3><a name="4_4_interface">The g++-3 headers are <em>not ours</em></a></h3>
- <p>If you have found an extremely broken header file which is
- causing problems for you, look carefully before submitting a
- &quot;high&quot; priority bug report (which you probably shouldn't
- do anyhow; see the last paragraph of the page describing
- <a href="http://gcc.gnu.org/bugs.html">the GCC bug database</a>).
- </p>
- <p>If the headers are in <code>${prefix}/include/g++-3</code>, or if
- the installed library's name looks like <code>libstdc++-2.10.a</code>
- or <code>libstdc++-libc6-2.10.so</code>, then you are using the old
- libstdc++-v2 library, which is nonstandard and unmaintained. Do not
- report problems with -v2 to the -v3 mailing list.
- </p>
- <p>For GCC versions 3.0 and 3.1 the libstdc++-v3 header files are
- installed in <code>${prefix}/include/g++-v3</code> (see the 'v'?).
- Starting with version 3.2 the headers are installed in
- <code>${prefix}/include/c++/${version}</code> as this prevents
- headers from previous versions being found by mistake.
- </p>
- <p><a name="4_4_glibc"><strong>glibc</strong></a>
- If you're on a GNU/Linux system and have just upgraded to
- glibc 2.2, but are still using gcc 2.95.2, then you should have
- read the glibc FAQ, specifically 2.34:
- </p>
- <pre>
-2.34. When compiling C++ programs, I get a compilation error in streambuf.h.
-
-{BH} You are using g++ 2.95.2? After upgrading to glibc 2.2, you need to
-apply a patch to the include files in /usr/include/g++, because the fpos_t
-type has changed in glibc 2.2. The patch is at
-http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
- </pre>
- <p>Note that 2.95.x shipped with the
- <a href="#4_4_interface">old v2 library</a> which is no longer
- maintained. Also note that gcc 2.95.3 fixes this problem, but
- requires a separate patch for libstdc++-v3.
- </p>
- <p><a name="4_4_checks"><strong>concept checks</strong></a>
- If you see compilation errors containing messages about
- <code> <em>foo</em>Concept </code>and a<code> constraints </code>
- member function, then most likely you have violated one of the
- requirements for types used during instantiation of template
- containers and functions. For example, EqualityComparableConcept
- appears if your types must be comparable with == and you have not
- provided this capability (a typo, or wrong visibility, or you
- just plain forgot, etc).
- </p>
- <p>More information, including how to optionally enable/disable the
- checks, is available
- <a href="../19_diagnostics/howto.html#3">here</a>.
- </p>
- <p><a name="4_4_dlsym"><strong>dlopen/dlsym</strong></a>
- If you are using the C++ library across dynamically-loaded
- objects, make certain that you are passing the correct options
- when compiling and linking:
- </p>
- <pre>
- // compile your library components
- g++ -fPIC -c a.cc
- g++ -fPIC -c b.cc
- ...
- g++ -fPIC -c z.cc
-
- // create your library
- g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
-
- // link the executable
- g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl</pre>
- <p><a name="4_4_leak"><strong>"memory leaks" in containers</strong></a>
- A few people have reported that the standard containers appear
- to leak memory when tested with memory checkers such as
- <a href="http://developer.kde.org/~sewardj/">valgrind</a>.
- The library's default allocators keep free memory in a pool
- for later reuse, rather than returning it to the OS. Although
- this memory is always reachable by the library and is never
- lost, memory debugging tools can report it as a leak. If you
- want to test the library for memory leaks please read
- <a href="../debug.html#mem">Tips for memory leak hunting</a>
- first.
- </p>
-
-<hr />
- <h2><a name="4_5">4.5 Aw, that's easy to fix!</a></h2>
- <p>If you have found a bug in the library and you think you have
- a working fix, then send it in! The main GCC site has a page
- on <a href="http://gcc.gnu.org/contribute.html">submitting
- patches</a> that covers the procedure, but for libstdc++ you
- should also send the patch to our mailing list in addition to
- the GCC patches mailing list. The libstdc++
- <a href="../17_intro/contribute.html">contributors' page</a>
- also talks about how to submit patches.
- </p>
- <p>In addition to the description, the patch, and the ChangeLog
- entry, it is a Good Thing if you can additionally create a small
- test program to test for the presence of the bug that your
- patch fixes. Bugs have a way of being reintroduced; if an old
- bug creeps back in, it will be caught immediately by the
- <a href="#2_4">testsuite</a> -- but only if such a test exists.
- </p>
-
-<hr />
-<h1><a name="5_0">5.0 Miscellaneous</a></h1>
- <h2><a name="5_1">5.1 string::iterator is not char*;
- vector&lt;T&gt;::iterator is not T*</a></h2>
- <p>If you have code that depends on container&lt;T&gt; iterators
- being implemented as pointer-to-T, your code is broken.
- </p>
- <p>While there are arguments for iterators to be implemented in
- that manner, A) they aren't very good ones in the long term,
- and B) they were never guaranteed by the Standard anyway. The
- type-safety achieved by making iterators a real class rather
- than a typedef for <code>T*</code> outweighs nearly all opposing
- arguments.
- </p>
- <p>Code which does assume that a vector iterator <code> i </code>
- is a pointer can often be fixed by changing <code> i </code> in
- certain expressions to <code> &amp;*i </code>. Future revisions
- of the Standard are expected to bless this usage for
- vector&lt;&gt; (but not for basic_string&lt;&gt;).
- </p>
-
-<hr />
- <h2><a name="5_2">5.2 What's next after libstdc++-v3?</a></h2>
- <p>Hopefully, not much. The goal of libstdc++-v3 is to produce
- a fully-compliant, fully-portable Standard Library. After that,
- we're mostly done: there won't <em>be</em> any more compliance
- work to do. However:
- </p>
- <ol>
- <li><p>The ISO Committee will meet periodically to review Defect Reports
- in the C++ Standard. Undoubtedly some of these will result in
- changes to the Standard, which will be reflected in patches to
- libstdc++. Some of that is already happening, see <a href="#4_3">4.3</a>. Some of
- those changes are being predicted by the library maintainers, and
- we add code to the library based on what the current proposed
- resolution specifies. Those additions are listed in
- <a href="../ext/howto.html#5">the extensions page</a>.
- </p></li>
- <li><p>Performance tuning. Lots of performance tuning. This too is
- already underway for post-3.0 releases, starting with memory
- expansion in container classes and buffer usage in synchronized
- stream objects.
- </p></li>
- <li><p>An ABI for libstdc++ is being developed, so that
- multiple binary-incompatible copies of the library can be replaced
- with a single backwards-compatible library, like libgcc_s.so is.
- </p></li>
- <li><p>The current libstdc++ contains extensions to the Library which
- must be explicitly requested by client code (for example, the
- hash tables from SGI). Other extensions may be added to
- libstdc++-v3 if they seem to be &quot;standard&quot; enough.
- (For example, the &quot;long long&quot; type from C99.)
- Bugfixes and rewrites (to improve or fix thread safety, for
- instance) will of course be a continuing task.
- </p></li>
- <li><p>There is an effort underway to add significant extensions to
- the standard library specification. The latest version of this effort is
- described in
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
- The C++ Library Technical Report 1</a>.
- See <a href="#5_5">5.5</a>.
- </p></li>
- </ol>
- <p><a href="http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html">This
- question</a> about the next libstdc++ prompted some brief but
- interesting
- <a href="http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html">speculation</a>.
- </p>
-
-<hr />
- <h2><a name="5_3">5.3 What about the STL from SGI?</a></h2>
- <p>The <a href="http://www.sgi.com/tech/stl/">STL from SGI</a>,
- version 3.3, was the final merge of the STL codebase. The
- code in libstdc++ contains many fixes and changes, and
- the SGI code is no longer under active
- development. We expect that no future merges will take place.
- </p>
- <p>In particular, <code>string</code> is not from SGI and makes no
- use of their &quot;rope&quot; class (which is included as an
- optional extension), nor is <code>valarray</code> and some others.
- Classes like <code>vector&lt;&gt;</code> are, however we have
- made significant changes to them since then.
- </p>
- <p>The FAQ for SGI's STL (one jump off of their main page) is
- recommended reading.
- </p>
-
-<hr />
- <h2><a name="5_4">5.4 Extensions and Backward Compatibility</a></h2>
- <p>Headers in the <code>ext</code> and <code>backward</code>
- subdirectories should be referred to by their relative paths:
- <!-- Careful, the leading spaces in PRE show up directly. -->
- </p>
- <pre>
- #include &lt;ext/hash_map&gt; </pre>
- <p>rather than using <code>-I</code> or other options. This is more
- portable and forward-compatible. (The situation is the same as
- that of other headers whose directories are not searched directly,
- e.g., <code>&lt;sys/stat.h&gt;</code>, <code>&lt;X11/Xlib.h&gt;</code>.
- </p>
-
- <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
- containers in the SGI STL. See <a href="#5_5">5.5</a> for more details.
- </p>
-
- <p>The extensions are no longer in the global or <code>std</code>
- namespaces, instead they are declared in the <code>__gnu_cxx</code>
- namespace. For maximum portability, consider defining a namespace
- alias to use to talk about extensions, e.g.:
- </p>
- <pre>
- #ifdef __GNUC__
- #if __GNUC__ &lt; 3
- #include &lt;hash_map.h&gt;
- namespace Sgi { using ::hash_map; }; // inherit globals
- #else
- #include &lt;ext/hash_map&gt;
- #if __GNUC_MINOR__ == 0
- namespace Sgi = std; // GCC 3.0
- #else
- namespace Sgi = ::__gnu_cxx; // GCC 3.1 and later
- #endif
- #endif
- #else // ... there are other compilers, right?
- namespace Sgi = std;
- #endif
-
- Sgi::hash_map&lt;int,int&gt; my_map; </pre>
- <p>This is a bit cleaner than defining typedefs for all the
- instantiations you might need.
- </p>
- <p><strong>Note:</strong> explicit template specializations must
- be declared in the same namespace as the original template.
- This means you cannot use a namespace alias when declaring
- an explicit specialization.
- </p>
- <p>Extensions to the library have
- <a href="../ext/howto.html">their own page</a>.
- </p>
-
-<hr />
- <h2><a name="5_5">5.5 Does libstdc++ support TR1?</a></h2>
-
- <p>The C++ Standard Library Technical Report adds many new features to
- the library. The latest version of this effort is described in
- <a href=
- "http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">
- Technical Report 1</a>.
- </p>
-
- <p>libstdc++ strives to implement all of TR1.
- An <a href="../ext/tr1.html">overview</a> of the implementation status
- is available.
- </p>
-
- <p>Briefly, the features of TR1 and the current status are:
- </p>
-
- <p><strong>Reference_wrapper - Complete -</strong>
- Useful to pass references to functions that take their parameters
- by value.
- </p>
-
- <p><strong>Reference-counted smart pointers - Complete -</strong>
- The shared_ptr and weak_ptr allow several object to know about a
- pointer and whether it is valid. When the last reference to the
- pointer is destroyed the pointer is freed.
- </p>
-
- <p><strong>Function objects - Complete -</strong>
- Function return types (i.e., result_of), the functions template
- mem_fn (a generalization of mem_fun and mem_fun_red), function
- object binders (e.g., bind, a generalization of bind1st and bind2nd),
- and polymorphic function wrappers (e.g, class template function).
- </p>
-
- <p><strong>Type traits - Complete -</strong>
- The type_traits class gives templates the ability to probe
- information about the input type and enable type-dependent logic
- to be performed without the need of template specializations.
- </p>
-
- <p><strong>A random number engine - Complete -</strong>
- This library contains random number generators with several different
- choices of distribution.
- </p>
-
- <p><strong>Tuples - Complete -</strong>
- The tuple class implements small heterogeneous arrays. This is an
- enhanced pair. In fact, the standard pair is enhanced with a tuple
- interface.
- </p>
-
- <p><strong>Fixed-size arrays - Complete -</strong>
- The array class implements small fixed-sized arrays with container
- semantics.
- </p>
-
- <p><strong>Unordered containers - Complete -</strong>
- The unordered_set, unordered_map, unordered_multiset, and
- unordered_multimap containers are hashed versions of the map, set,
- multimap, and multiset containers respectively. These classes are
- suitable replacements for the SGI STL hash_map and hash_set
- extensions.
- </p>
-
- <p><strong>C99 compatibility - Under construction - </strong>
- There are many features designed to minimize the divergence of the C
- and the C++ languages.
- </p>
-
- <p><strong>Special functions - Complete - </strong>
- Twenty-three mathematical functions familiar to physicists and
- engineers are included: cylindrical and spherical Bessel and Neumann
- functions, hypergeometric functions, Laguerre polynomials, Legendre
- functions, elliptic integrals, exponential integrals and the Riemann
- zeta function all for your computing pleasure.
- </p>
-
- <p><strong>A regular expression engine</strong>
- This library provides for regular expression objects with traversal
- of text with return of subexpressions.
- </p>
-
-<hr />
- <h2><a name="5_6">5.6 Is libstdc++-v3 thread-safe?</a></h2>
- <p>libstdc++-v3 strives to be thread-safe when all of the following
- conditions are met:
- </p>
- <ul>
- <li>The system's libc is itself thread-safe,</li>
- <li><code>gcc -v</code> reports a thread model other than 'single',</li>
- <li>[pre-3.3 only] a non-generic implementation of atomicity.h
- exists for the architecture in question.</li>
- </ul>
- <p>The user-code must guard against concurrent method calls which may
- access any particular library object's state. Typically, the
- application programmer may infer what object locks must be held
- based on the objects referenced in a method call. Without getting
- into great detail, here is an example which requires user-level
- locks:
- </p>
- <pre>
- library_class_a shared_object_a;
-
- thread_main () {
- library_class_b *object_b = new library_class_b;
- shared_object_a.add_b (object_b); // must hold lock for shared_object_a
- shared_object_a.mutate (); // must hold lock for shared_object_a
- }
-
- // Multiple copies of thread_main() are started in independent threads.</pre>
- <p>Under the assumption that object_a and object_b are never exposed to
- another thread, here is an example that should not require any
- user-level locks:
- </p>
- <pre>
- thread_main () {
- library_class_a object_a;
- library_class_b *object_b = new library_class_b;
- object_a.add_b (object_b);
- object_a.mutate ();
- } </pre>
- <p>All library objects are safe to use in a multithreaded program as
- long as each thread carefully locks out access by any other
- thread while it uses any object visible to another thread, i.e.,
- treat library objects like any other shared resource. In general,
- this requirement includes both read and write access to objects;
- unless otherwise documented as safe, do not assume that two threads
- may access a shared standard library object at the same time.
- </p>
- <p>See chapters <a href="../17_intro/howto.html#3">17</a> (library
- introduction), <a href="../23_containers/howto.html#3">23</a>
- (containers), and <a href="../27_io/howto.html#9">27</a> (I/O) for
- more information.
- </p>
-
-<hr />
- <h2><a name="5_7">5.7 How do I get a copy of the ISO C++ Standard?</a></h2>
- <p>Copies of the full ISO 14882 standard are available on line via the
- ISO mirror site for committee members. Non-members, or those who
- have not paid for the privilege of sitting on the committee and
- sustained their two-meeting commitment for voting rights, may get a
- copy of the standard from their respective national standards
- organization. In the USA, this national standards organization is
- ANSI and their website is right <a href="http://www.ansi.org">here</a>.
- (And if you've already registered with them, clicking this link will
- take you to directly to the place where you can
-<a href="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003">buy
- the standard on-line</a>.
- </p>
- <p>Who is your country's member body? Visit the
- <a href="http://www.iso.ch/">ISO homepage</a> and find out!
- </p>
-
-<hr />
- <h2><a name="5_8">5.8 What's an ABI and why is it so messy?</a></h2>
- <p>&quot;ABI&quot; stands for &quot;Application Binary Interface.&quot;
- Conventionally, it refers to a great mass of details about how
- arguments are arranged on the call stack and/or in registers, and
- how various types are arranged and padded in structs. A single CPU
- design may suffer multiple ABIs designed by different development
- tool vendors who made different choices, or even by the same vendor
- for different target applications or compiler versions. In ideal
- circumstances the CPU designer presents one ABI and all the OSes and
- compilers use it. In practice every ABI omits details that compiler
- implementers (consciously or accidentally) must choose for themselves.
- </p>
- <p>That ABI definition suffices for compilers to generate code so a
- program can interact safely with an OS and its lowest-level libraries.
- Users usually want an ABI to encompass more detail, allowing libraries
- built with different compilers (or different releases of the same
- compiler!) to be linked together. For C++, this includes many more
- details than for C, and CPU designers (for good reasons elaborated
- below) have not stepped up to publish C++ ABIs. The details include
- virtual function implementation, struct inheritance layout, name
- mangling, and exception handling. Such an ABI has been defined for
- GNU C++, and is immediately useful for embedded work relying only on
- a &quot;free-standing implementation&quot; that doesn't include (much
- of) the standard library. It is a good basis for the work to come.
- </p>
- <p>A useful C++ ABI must also incorporate many details of the standard
- library implementation. For a C ABI, the layouts of a few structs
- (such as FILE, stat, jmpbuf, and the like) and a few macros suffice.
- For C++, the details include the complete set of names of functions
- and types used, the offsets of class members and virtual functions,
- and the actual definitions of all inlines. C++ exposes many more
- library details to the caller than C does. It makes defining
- a complete ABI a much bigger undertaking, and requires not just
- documenting library implementation details, but carefully designing
- those details so that future bug fixes and optimizations don't
- force breaking the ABI.
- </p>
- <p>There are ways to help isolate library implementation details from the
- ABI, but they trade off against speed. Library details used in
- inner loops (e.g., getchar) must be exposed and frozen for all
- time, but many others may reasonably be kept hidden from user code,
- so they may later be changed. Deciding which, and implementing
- the decisions, must happen before you can reasonably document a
- candidate C++ ABI that encompasses the standard library.
- </p>
-
-<hr />
- <h2><a name="5_9">5.9 How do I make std::vector&lt;T&gt;::capacity()
- == std::vector&lt;T&gt;::size()?</a> </h2>
- <!-- referenced by 21_strings/howto.html#6 -->
- <p>The standard idiom for deallocating a <code>std::vector&lt;T&gt;</code>'s
- unused memory is to create a temporary copy of the vector and swap their
- contents, e.g. for <code>std::vector&lt;T&gt; v</code>
- </p>
- <pre>
- std::vector&lt;T&gt;(v).swap(v);
- </pre>
- <p>The copy will take O(n) time and the swap is constant time.
- </p>
- <p>See <a href='../21_strings/howto.html#6'>Shrink-to-fit strings</a> for
- a similar solution for strings.
- </p>
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="../17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
-
diff --git a/libstdc++-v3/docs/html/faq/index.txt b/libstdc++-v3/docs/html/faq/index.txt
deleted file mode 100644
index 907de9fd1d0..00000000000
--- a/libstdc++-v3/docs/html/faq/index.txt
+++ /dev/null
@@ -1,1118 +0,0 @@
-
- #[1]GNU C++ Standard Library [2]Copyright
-
- libstdc++ Frequently Asked Questions
-
- The latest version of this document is always available at
- [3]http://gcc.gnu.org/onlinedocs/libstdc++/faq/. The main
- documentation page is at
- [4]http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html.
-
- To the [5]libstdc++-v3 homepage.
- _________________________________________________________________
-
- Questions
-
- 1. [6]General Information
- 1. [7]What is libstdc++-v3?
- 2. [8]Why should I use libstdc++?
- 3. [9]Who's in charge of it?
- 4. [10]How do I get libstdc++?
- 5. [11]When is libstdc++ going to be finished?
- 6. [12]How do I contribute to the effort?
- 7. [13]What happened to libg++? I need that!
- 8. [14]What if I have more questions?
- 9. [15]What are the license terms for libstdc++-v3?
- 2. [16]Installation
- 1. [17]How do I install libstdc++-v3?
- 2. [18][removed]
- 3. [19]What is this SVN thing that you keep mentioning?
- 4. [20]How do I know if it works?
- 5. [21]This library is HUGE! And what's libsupc++?
- 6. [22]Why do I get an error saying libstdc++.so.X is missing
- when I run my program?
- 3. [23]Platform-Specific Issues
- 1. [24]Can libstdc++-v3 be used with <my favorite compiler>?
- 2. [25][removed]
- 3. [26][removed]
- 4. [27]I can't use 'long long' on Solaris
- 5. [28]_XOPEN_SOURCE / _GNU_SOURCE / etc is always defined
- 6. [29]OS X ctype.h is broken! How can I hack it?
- 7. [30]Threading is broken on i386
- 8. [31]Recent GNU/Linux glibc required?
- 9. [32]Can't use wchar_t/wstring on FreeBSD
- 10. [33]MIPS atomic operations
- 4. [34]Known Bugs and Non-Bugs
- 1. [35]What works already?
- 2. [36]Bugs in gcc/g++ (not libstdc++-v3)
- 3. [37]Bugs in the C++ language/lib specification
- 4. [38]Things in libstdc++ that only look like bugs
- o [39]reopening a stream fails
- o [40]-Weffc++ complains too much
- o [41]"ambiguous overloads" after including an old-style
- header
- o [42]The g++-3 headers are not ours
- o [43]compilation errors from streambuf.h
- o [44]errors about *Concept and constraints in the STL...
- o [45]program crashes when using library code in a
- dynamically-loaded library
- o [46]"memory leaks" in containers
- 5. [47]Aw, that's easy to fix!
- 5. [48]Miscellaneous
- 1. [49]string::iterator is not char*; vector<T>::iterator is not
- T*
- 2. [50]What's next after libstdc++-v3?
- 3. [51]What about the STL from SGI?
- 4. [52]Extensions and Backward Compatibility
- 5. [53]Does libstdc++ support TR1?
- 6. [54]Is libstdc++-v3 thread-safe?
- 7. [55]How do I get a copy of the ISO C++ Standard?
- 8. [56]What's an ABI and why is it so messy?
- 9. [57]How do I make std::vector<T>::capacity() ==
- std::vector<T>::size?
- _________________________________________________________________
-
- 1.0 General Information
-
-1.1 What is libstdc++-v3?
-
- The GNU Standard C++ Library v3 is an ongoing project to implement the
- ISO 14882 Standard C++ library as described in chapters 17 through 27
- and annex D. For those who want to see exactly how far the project has
- come, or just want the latest bleeding-edge code, the up-to-date
- source is available over anonymous SVN, and can even be browsed over
- the Web (see [58]1.4 below).
-
- The older libstdc++-v2 project is no longer maintained; the code has
- been completely replaced and rewritten. [59]If you are using V2, then
- you need to report bugs to your system vendor, not to the V3 list.
-
- A more formal description of the V3 goals can be found in the official
- [60]design document.
- _________________________________________________________________
-
-1.2 Why should I use libstdc++?
-
- The completion of the ISO C++ standardization gave the C++ community a
- powerful set of reuseable tools in the form of the C++ Standard
- Library. However, all existing C++ implementations are (as the Draft
- Standard used to say) "incomplet and incorrekt," and many suffer from
- limitations of the compilers that use them.
-
- The GNU C/C++/FORTRAN/<pick-a-language> compiler (gcc, g++, etc) is
- widely considered to be one of the leading compilers in the world. Its
- development is overseen by the [61]GCC team. All of the rapid
- development and near-legendary [62]portability that are the hallmarks
- of an open-source project are being applied to libstdc++.
-
- That means that all of the Standard classes and functions (such as
- string, vector<>, iostreams, and algorithms) will be freely available
- and fully compliant. Programmers will no longer need to "roll their
- own" nor be worried about platform-specific incompatibilities.
- _________________________________________________________________
-
-1.3 Who's in charge of it?
-
- The libstdc++ project is contributed to by several developers all over
- the world, in the same way as GCC or Linux. Benjamin Kosnik, Gabriel
- Dos Reis, Phil Edwards, Ulrich Drepper, Loren James Rittle, and Paolo
- Carlini are the lead maintainers of the SVN archive.
-
- Development and discussion is held on the libstdc++ mailing list.
- Subscribing to the list, or searching the list archives, is open to
- everyone. You can read instructions for doing so on the [63]homepage.
- If you have questions, ideas, code, or are just curious, sign up!
- _________________________________________________________________
-
-1.4 How do I get libstdc++?
-
- The [64]homepage has instructions for retrieving the latest SVN
- sources, and for browsing the SVN sources over the web.
-
- Stable versions of libstdc++-v3 are included with releases of [65]the
- GCC compilers.
-
- The subset commonly known as the Standard Template Library (chapters
- 23 through 25, mostly) is adapted from the final release of the SGI
- STL, with extensive changes.
- _________________________________________________________________
-
-1.5 When is libstdc++ going to be finished?
-
- Nathan Myers gave the best of all possible answers, responding to a
- Usenet article asking this question: Sooner, if you help.
- _________________________________________________________________
-
-1.6 How do I contribute to the effort?
-
- Here is [66]a page devoted to this topic. Subscribing to the mailing
- list (see above, or the homepage) is a very good idea if you have
- something to contribute, or if you have spare time and want to help.
- Contributions don't have to be in the form of source code; anybody who
- is willing to help write documentation, for example, or has found a
- bug in code that we all thought was working, is more than welcome!
- _________________________________________________________________
-
-1.7 What happened to libg++? I need that!
-
- The most recent libg++ README states that libg++ is no longer being
- actively maintained. It should not be used for new projects, and is
- only being kicked along to support older code.
-
- The libg++ was designed and created when there was no Standard to
- provide guidance. Classes like linked lists are now provided for by
- list<T> and do not need to be created by genclass. (For that matter,
- templates exist now and are well-supported, whereas genclass (mostly)
- predates them.)
-
- There are other classes in libg++ that are not specified in the ISO
- Standard (e.g., statistical analysis). While there are a lot of really
- useful things that are used by a lot of people (e.g., statistics :-),
- the Standards Committee couldn't include everything, and so a lot of
- those "obvious" classes didn't get included.
-
- Since libstdc++ is an implementation of the Standard Library, we have
- no plans at this time to include non-Standard utilities in the
- implementation, however handy they are. (The extensions provided in
- the SGI STL aren't maintained by us and don't get a lot of our
- attention, because they don't require a lot of our time.) It is
- entirely plausable that the "useful stuff" from libg++ might be
- extracted into an updated utilities library, but nobody has started
- such a project yet.
-
- (The [67]Boost site houses free C++ libraries that do varying things,
- and happened to be started by members of the Standards Committee.
- Certain "useful stuff" classes will probably migrate there.)
-
- For the bold and/or desperate, the [68]GCC extensions page describes
- where to find the last libg++ source.
- _________________________________________________________________
-
-1.8 What if I have more questions?
-
- If you have read the README and RELEASE-NOTES files, and your question
- remains unanswered, then just ask the mailing list. At present, you do
- not need to be subscribed to the list to send a message to it. More
- information is available on the homepage (including how to browse the
- list archives); to send to the list, use [69]libstdc++@gcc.gnu.org.
-
- If you have a question that you think should be included here, or if
- you have a question about a question/answer here, contact [70]Phil
- Edwards or [71]Gabriel Dos Reis.
- _________________________________________________________________
-
-1.9 What are the license terms for libstdc++-v3?
-
- See [72]our license description for these and related questions.
- _________________________________________________________________
-
- 2.0 Installation
-
-2.1 How do I install libstdc++-v3?
-
- Complete instructions are not given here (this is a FAQ, not an
- installation document), but the tools required are few:
- * A 3.x release of GCC. Note that building GCC is much easier and
- more automated than building the GCC 2.[78] series was. If you are
- using GCC 2.95, you can still build earlier snapshots of
- libstdc++.
- * GNU Make is required for GCC 3.4 and later.
- * The GNU Autotools are needed if you are messing with the configury
- or makefiles.
-
- The file [73]documentation.html provides a good overview of the steps
- necessary to build, install, and use the library. Instructions for
- configuring the library with new flags such as --enable-threads are
- there also, as well as patches and instructions for working with GCC
- 2.95.
-
- The top-level install.html and [74]RELEASE-NOTES files contain the
- exact build and installation instructions. You may wish to browse
- those files over ViewVC ahead of time to get a feel for what's
- required. RELEASE-NOTES is located in the ".../docs/17_intro/"
- directory of the distribution.
- _________________________________________________________________
-
-2.2 [removed]
-
- This question has become moot and has been removed. The stub is here
- to preserve numbering (and hence links/bookmarks).
- _________________________________________________________________
-
-2.3 What is this SVN thing that you keep mentioning?
-
- Subversion is one of several revision control packages. It was
- selected for GNU projects because it's free (speech), free (beer), and
- very high quality. The [75]Subversion home page has a better
- description.
-
- The "anonymous client checkout" feature of SVN is similar to anonymous
- FTP in that it allows anyone to retrieve the latest libstdc++ sources.
-
- After the first of April, American users will have a "/pharmacy"
- command-line option...
- _________________________________________________________________
-
-2.4 How do I know if it works?
-
- libstdc++-v3 comes with its own testsuite. You do not need to actually
- install the library ("make install") to run the testsuite, but you do
- need DejaGNU, as described [76]here.
-
- To run the testsuite on the library after building it, use "make
- check" while in your build directory. To run the testsuite on the
- library after building and installing it, use "make check-install"
- instead.
-
- If you find bugs in the testsuite programs themselves, or if you think
- of a new test program that should be added to the suite, please write
- up your idea and send it to the list!
- _________________________________________________________________
-
-2.5 This library is HUGE! And what's libsupc++?
-
- Usually the size of libraries on disk isn't noticeable. When a link
- editor (or simply "linker") pulls things from a static archive
- library, only the necessary object files are copied into your
- executable, not the entire library. Unfortunately, even if you only
- need a single function or variable from an object file, the entire
- object file is extracted. (There's nothing unique to C++ or
- libstdc++-v3 about this; it's just common behavior, given here for
- background reasons.)
-
- Some of the object files which make up libstdc++.a are rather large.
- If you create a statically-linked executable with -static, those large
- object files are suddenly part of your executable. Historically the
- best way around this was to only place a very few functions (often
- only a single one) in each source/object file; then extracting a
- single function is the same as extracting a single .o file. For
- libstdc++-v3 this is only possible to a certain extent; the object
- files in question contain template classes and template functions,
- pre-instantiated, and splitting those up causes severe maintenance
- headaches.
-
- It's not a bug, and it's not really a problem. Nevertheless, some
- people don't like it, so here are two pseudo-solutions:
-
- If the only functions from libstdc++.a which you need are language
- support functions (those listed in [77]clause 18 of the standard,
- e.g., new and delete), then try linking against libsupc++.a (Using gcc
- instead of g++ and explicitly linking in -lsupc++ for the final link
- step will do it). This library contains only those support routines,
- one per object file. But if you are using anything from the rest of
- the library, such as IOStreams or vectors, then you'll still need
- pieces from libstdc++.a.
-
- The second method is one we hope to incorporate into the library build
- process. Some platforms can place each function and variable into its
- own section in a .o file. The GNU linker can then perform garbage
- collection on unused sections; this reduces the situation to only
- copying needed functions into the executable, as before, but all
- happens automatically.
-
- Unfortunately the garbage collection in GNU ld is buggy; sections
- (corresponding to functions and variables) which are used are
- mistakenly removed, leading to horrible crashes when your executable
- starts up. For the time being, this feature is not used when building
- the library.
- _________________________________________________________________
-
-2.6 Why do I get an error saying libstdc++.so.X is missing when I run my
-program?
-
- Depending on your platform and library version, the message might be
- similar to one of the following:
- ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open
-shared object file: No such file or directory
-
- /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found
-
- This doesn't mean that the shared library isn't installed, only that
- the dynamic linker can't find it. When a dynamically-linked executable
- is run the linker finds and loads the required shared libraries by
- searching a pre-configured list of directories. If the directory where
- you've installed libstdc++ is not in this list then the libraries
- won't be found. The simplest way to fix this is to use the
- LD_LIBRARY_PATH environment variable, which is a colon-separated list
- of directories in which the linker will search for shared libraries:
- LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH
-
- The exact environment variable to use will depend on your platform,
- e.g. DYLD_LIBRARY_PATH for Darwin,
- LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit,
- LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs and
- SHLIB_PATH for HP-UX.
-
- See the man pages for ld(1), ldd(1) and ldconfig(8) for more
- information. The dynamic linker has different names on different
- platforms but the man page is usually called something such as ld.so /
- rtld / dld.so.
- _________________________________________________________________
-
- 3.0 Platform-Specific Issues
-
-3.1 Can libstdc++-v3 be used with <my favorite compiler>?
-
- Probably not. Yet.
-
- Because GCC advances so rapidly, development and testing of libstdc++
- is being done almost entirely under that compiler. If you are curious
- about whether other, lesser compilers (*grin*) support libstdc++, you
- are more than welcome to try. Configuring and building the library
- (see above) will still require certain tools, however. Also keep in
- mind that building libstdc++ does not imply that your compiler will be
- able to use all of the features found in the C++ Standard Library.
-
- Since the goal of ISO Standardization is for all C++ implementations
- to be able to share code, the final libstdc++ should, in theory, be
- usable under any ISO-compliant compiler. It will still be targeted and
- optimized for GCC/g++, however.
- _________________________________________________________________
-
-3.2 [removed]
-
- This question has become moot and has been removed. The stub is here
- to preserve numbering (and hence links/bookmarks).
- _________________________________________________________________
-
-3.3 [removed]
-
- This question has become moot and has been removed. The stub is here
- to preserve numbering (and hence links/bookmarks).
- _________________________________________________________________
-
-3.4 I can't use 'long long' on Solaris
-
- By default we try to support the C99 long long type. This requires
- that certain functions from your C library be present.
-
- Up through release 3.0.2 the tests performed were too general, and
- this feature was disabled when it did not need to be. The most
- commonly reported platform affected was Solaris.
-
- This has been fixed for 3.0.3 and onwards.
- _________________________________________________________________
-
-3.5 _XOPEN_SOURCE / _GNU_SOURCE / etc is always defined
-
- On Solaris, g++ (but not gcc) always defines the preprocessor macro
- _XOPEN_SOURCE. On GNU/Linux, the same happens with _GNU_SOURCE. (This
- is not an exhaustive list; other macros and other platforms are also
- affected.)
-
- These macros are typically used in C library headers, guarding new
- versions of functions from their older versions. The C++ standard
- library includes the C standard library, but it requires the C90
- version, which for backwards-compatability reasons is often not the
- default for many vendors.
-
- More to the point, the C++ standard requires behavior which is only
- available on certain platforms after certain symbols are defined.
- Usually the issue involves I/O-related typedefs. In order to ensure
- correctness, the compiler simply predefines those symbols.
-
- Note that it's not enough to #define them only when the library is
- being built (during installation). Since we don't have an 'export'
- keyword, much of the library exists as headers, which means that the
- symbols must also be defined as your programs are parsed and compiled.
-
- To see which symbols are defined, look for CPLUSPLUS_CPP_SPEC in the
- gcc config headers for your target (and try changing them to see what
- happens when building complicated code). You can also run "g++ -E -dM
- - < /dev/null" to display a list of predefined macros for any
- particular installation.
-
- This has been discussed on the mailing lists [78]quite a bit.
-
- This method is something of a wart. We'd like to find a cleaner
- solution, but nobody yet has contributed the time.
- _________________________________________________________________
-
-3.6 OS X ctype.h is broken! How can I hack it?
-
- This is a long-standing bug in the OS X support. Fortunately, the
- patch is quite simple, and well-known. [79]Here's a link to the
- solution.
- _________________________________________________________________
-
-3.7 Threading is broken on i386
-
- Support for atomic integer operations is/was broken on i386 platforms.
- The assembly code accidentally used opcodes that are only available on
- the i486 and later. So if you configured GCC to target, for example,
- i386-linux, but actually used the programs on an i686, then you would
- encounter no problems. Only when actually running the code on a i386
- will the problem appear.
-
- This is fixed in 3.2.2.
- _________________________________________________________________
-
-3.8 Recent GNU/Linux glibc required?
-
- When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
- 5.0.1) and later uses localization and formatting code from the system
- C library (glibc) version 2.2.5. That version of glibc is over a year
- old and contains necessary bugfixes. Many GNU/Linux distros make glibc
- version 2.3.x available now.
-
- The guideline is simple: the more recent the C++ library, the more
- recent the C library. (This is also documented in the main GCC
- installation instructions.)
- _________________________________________________________________
-
-3.9 Can't use wchar_t/wstring on FreeBSD
-
- At the moment there are a few problems in FreeBSD's support for wide
- character functions, and as a result the libstdc++ configury decides
- that wchar_t support should be disabled. Once the underlying problems
- are fixed in FreeBSD (soon), the library support will automatically
- enable itself.
-
- You can fix the problems yourself, and learn more about the situation,
- by reading [80]this short thread ("_GLIBCPP_USE_WCHAR_T undefined in
- FreeBSD's c++config.h?").
- _________________________________________________________________
-
-3.10 MIPS atomic operations
-
- The atomic locking routines for MIPS targets requires MIPS II and
- later. A patch went in just after the 3.3 release to make mips* use
- the generic implementation instead. You can also configure for
- mipsel-elf as a workaround.
-
- mips*-*-linux* continues to use the MIPS II routines, and more work in
- this area is expected.
- _________________________________________________________________
-
- 4.0 Known Bugs and Non-Bugs
-
- Note that this section can get rapdily outdated -- such is the nature
- of an open-source project. For the latest information, join the
- mailing list or look through recent archives. The RELEASE- NOTES and
- BUGS files are generally kept up-to-date.
-
- For 3.0.1, the most common "bug" is an apparently missing "../" in
- include/Makefile, resulting in files like gthr.h and gthr-single.h not
- being found. Please read [81]the configuration instructions for GCC,
- specifically the part about configuring in a separate build directory,
- and how strongly recommended it is. Building in the source directory
- is fragile, is rarely tested, and tends to break, as in this case.
- This was fixed for 3.0.2.
-
- For 3.1, the most common "bug" is a parse error when using <fstream>,
- ending with a message, "bits/basic_file.h:52: parse error before `{'
- token." Please read [82]the installation instructions for GCC,
- specifically the part about not installing newer versions on top of
- older versions. If you install 3.1 over a 3.0.x release, then the
- wrong basic_file.h header will be found (its location changed between
- releases).
-
- Please do not report these as bugs. We know about them. Reporting this
- -- or any other problem that's already been fixed -- hinders the
- development of GCC, because we have to take time to respond to your
- report. Thank you.
- _________________________________________________________________
-
-4.1 What works already?
-
- Short answer: Pretty much everything works except for some corner
- cases. Also, localization is incomplete. For whether it works well, or
- as you expect it to work, see 5.2.
-
- Long answer: See the docs/html/17_intro/CHECKLIST file, which is badly
- outdated... Also see the RELEASE-NOTES file, which is kept more up to
- date.
- _________________________________________________________________
-
-4.2 Bugs in gcc/g++ (not libstdc++-v3)
-
- This is by no means meant to be complete nor exhaustive, but mentions
- some problems that users may encounter when building or using
- libstdc++. If you are experiencing one of these problems, you can find
- more information on the libstdc++ and the GCC mailing lists.
-
- Before reporting a bug, examine the [83]bugs database with the
- category set to "libstdc++". The BUGS file in the source tree also
- tracks known serious problems.
- * Debugging is problematic, due to bugs in line-number generation
- (mostly fixed in the compiler) and gdb lagging behind the compiler
- (lack of personnel). We recommend configuring the compiler using
- --with-dwarf2 if the DWARF2 debugging format is not already the
- default on your platform. Also, [84]changing your GDB settings can
- have a profound effect on your C++ debugging experiences. :-)
- _________________________________________________________________
-
-4.3 Bugs in the C++ language/lib specification
-
- Yes, unfortunately, there are some. In a [85]message to the list,
- Nathan Myers announced that he has started a list of problems in the
- ISO C++ Standard itself, especially with regard to the chapters that
- concern the library. The list itself is [86]posted on his website.
- Developers who are having problems interpreting the Standard may wish
- to consult his notes.
-
- For those people who are not part of the ISO Library Group (i.e.,
- nearly all of us needing to read this page in the first place :-), a
- public list of the library defects is occasionally published [87]here.
- Some of these have resulted in [88]code changes.
- _________________________________________________________________
-
-4.4 Things in libstdc++ that only look like bugs
-
- There are things which are not bugs in the compiler (4.2) nor the
- language specification (4.3), but aren't really bugs in libstdc++,
- either. Really! Please do not report these as bugs.
-
- -Weffc++ The biggest of these is the quadzillions of warnings about
- the library headers emitted when -Weffc++ is used. Making libstdc++
- "-Weffc++-clean" is not a goal of the project, for a few reasons.
- Mainly, that option tries to enforce object-oriented programming,
- while the Standard Library isn't necessarily trying to be OO.
-
- reopening a stream fails Did I just say that -Weffc++ was our biggest
- false-bug report? I lied. (It used to be.) Today it seems to be
- reports that after executing a sequence like
- #include <fstream>
- ...
- std::fstream fs("a_file");
- // .
- // . do things with fs...
- // .
- fs.close();
- fs.open("a_new_file");
-
- all operations on the re-opened fs will fail, or at least act very
- strangely. Yes, they often will, especially if fs reached the EOF
- state on the previous file. The reason is that the state flags are not
- cleared on a successful call to open(). The standard unfortunately did
- not specify behavior in this case, and to everybody's great sorrow,
- the [89]proposed LWG resolution in DR #22 is to leave the flags
- unchanged. You must insert a call to fs.clear() between the calls to
- close() and open(), and then everything will work like we all expect
- it to work. Update: for GCC 4.0 we implemented the resolution of
- [90]DR #409 and open() now calls clear() on success!
-
- rel_ops Another is the rel_ops namespace and the template comparison
- operator functions contained therein. If they become visible in the
- same namespace as other comparison functions (e.g., 'using' them and
- the <iterator> header), then you will suddenly be faced with huge
- numbers of ambiguity errors. This was discussed on the -v3 list;
- Nathan Myers [91]sums things up here. The collisions with
- vector/string iterator types have been fixed for 3.1.
-
- The g++-3 headers are not ours
-
- If you have found an extremely broken header file which is causing
- problems for you, look carefully before submitting a "high" priority
- bug report (which you probably shouldn't do anyhow; see the last
- paragraph of the page describing [92]the GCC bug database).
-
- If the headers are in ${prefix}/include/g++-3, or if the installed
- library's name looks like libstdc++-2.10.a or libstdc++-libc6-2.10.so,
- then you are using the old libstdc++-v2 library, which is nonstandard
- and unmaintained. Do not report problems with -v2 to the -v3 mailing
- list.
-
- For GCC versions 3.0 and 3.1 the libstdc++-v3 header files are
- installed in ${prefix}/include/g++-v3 (see the 'v'?). Starting with
- version 3.2 the headers are installed in
- ${prefix}/include/c++/${version} as this prevents headers from
- previous versions being found by mistake.
-
- glibc If you're on a GNU/Linux system and have just upgraded to glibc
- 2.2, but are still using gcc 2.95.2, then you should have read the
- glibc FAQ, specifically 2.34:
-2.34. When compiling C++ programs, I get a compilation error in streambuf.h.
-
-{BH} You are using g++ 2.95.2? After upgrading to glibc 2.2, you need to
-apply a patch to the include files in /usr/include/g++, because the fpos_t
-type has changed in glibc 2.2. The patch is at
-http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
-
-
- Note that 2.95.x shipped with the [93]old v2 library which is no
- longer maintained. Also note that gcc 2.95.3 fixes this problem, but
- requires a separate patch for libstdc++-v3.
-
- concept checks If you see compilation errors containing messages about
- fooConcept and a constraints member function, then most likely you
- have violated one of the requirements for types used during
- instantiation of template containers and functions. For example,
- EqualityComparableConcept appears if your types must be comparable
- with == and you have not provided this capability (a typo, or wrong
- visibility, or you just plain forgot, etc).
-
- More information, including how to optionally enable/disable the
- checks, is available [94]here.
-
- dlopen/dlsym If you are using the C++ library across
- dynamically-loaded objects, make certain that you are passing the
- correct options when compiling and linking:
- // compile your library components
- g++ -fPIC -c a.cc
- g++ -fPIC -c b.cc
- ...
- g++ -fPIC -c z.cc
-
- // create your library
- g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
-
- // link the executable
- g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl
-
- "memory leaks" in containers A few people have reported that the
- standard containers appear to leak memory when tested with memory
- checkers such as [95]valgrind. The library's default allocators keep
- free memory in a pool for later reuse, rather than returning it to the
- OS. Although this memory is always reachable by the library and is
- never lost, memory debugging tools can report it as a leak. If you
- want to test the library for memory leaks please read [96]Tips for
- memory leak hunting first.
- _________________________________________________________________
-
-4.5 Aw, that's easy to fix!
-
- If you have found a bug in the library and you think you have a
- working fix, then send it in! The main GCC site has a page on
- [97]submitting patches that covers the procedure, but for libstdc++
- you should also send the patch to our mailing list in addition to the
- GCC patches mailing list. The libstdc++ [98]contributors' page also
- talks about how to submit patches.
-
- In addition to the description, the patch, and the ChangeLog entry, it
- is a Good Thing if you can additionally create a small test program to
- test for the presence of the bug that your patch fixes. Bugs have a
- way of being reintroduced; if an old bug creeps back in, it will be
- caught immediately by the [99]testsuite -- but only if such a test
- exists.
- _________________________________________________________________
-
- 5.0 Miscellaneous
-
-5.1 string::iterator is not char*; vector<T>::iterator is not T*
-
- If you have code that depends on container<T> iterators being
- implemented as pointer-to-T, your code is broken.
-
- While there are arguments for iterators to be implemented in that
- manner, A) they aren't very good ones in the long term, and B) they
- were never guaranteed by the Standard anyway. The type-safety achieved
- by making iterators a real class rather than a typedef for T*
- outweighs nearly all opposing arguments.
-
- Code which does assume that a vector iterator i is a pointer can often
- be fixed by changing i in certain expressions to &*i . Future
- revisions of the Standard are expected to bless this usage for
- vector<> (but not for basic_string<>).
- _________________________________________________________________
-
-5.2 What's next after libstdc++-v3?
-
- Hopefully, not much. The goal of libstdc++-v3 is to produce a
- fully-compliant, fully-portable Standard Library. After that, we're
- mostly done: there won't be any more compliance work to do. However:
- 1. The ISO Committee will meet periodically to review Defect Reports
- in the C++ Standard. Undoubtedly some of these will result in
- changes to the Standard, which will be reflected in patches to
- libstdc++. Some of that is already happening, see [100]4.3. Some
- of those changes are being predicted by the library maintainers,
- and we add code to the library based on what the current proposed
- resolution specifies. Those additions are listed in [101]the
- extensions page.
- 2. Performance tuning. Lots of performance tuning. This too is
- already underway for post-3.0 releases, starting with memory
- expansion in container classes and buffer usage in synchronized
- stream objects.
- 3. An ABI for libstdc++ is being developed, so that multiple
- binary-incompatible copies of the library can be replaced with a
- single backwards-compatible library, like libgcc_s.so is.
- 4. The current libstdc++ contains extensions to the Library which
- must be explicitly requested by client code (for example, the hash
- tables from SGI). Other extensions may be added to libstdc++-v3 if
- they seem to be "standard" enough. (For example, the "long long"
- type from C99.) Bugfixes and rewrites (to improve or fix thread
- safety, for instance) will of course be a continuing task.
- 5. There is an effort underway to add significant extensions to the
- standard library specification. The latest version of this effort
- is described in [102]The C++ Library Technical Report 1. See
- [103]5.5.
-
- [104]This question about the next libstdc++ prompted some brief but
- interesting [105]speculation.
- _________________________________________________________________
-
-5.3 What about the STL from SGI?
-
- The [106]STL from SGI, version 3.3, was the final merge of the STL
- codebase. The code in libstdc++ contains many fixes and changes, and
- the SGI code is no longer under active development. We expect that no
- future merges will take place.
-
- In particular, string is not from SGI and makes no use of their "rope"
- class (which is included as an optional extension), nor is valarray
- and some others. Classes like vector<> are, however we have made
- significant changes to them since then.
-
- The FAQ for SGI's STL (one jump off of their main page) is recommended
- reading.
- _________________________________________________________________
-
-5.4 Extensions and Backward Compatibility
-
- Headers in the ext and backward subdirectories should be referred to
- by their relative paths:
- #include <ext/hash_map>
-
- rather than using -I or other options. This is more portable and
- forward-compatible. (The situation is the same as that of other
- headers whose directories are not searched directly, e.g.,
- <sys/stat.h>, <X11/Xlib.h>.
-
- 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 containers in the SGI STL. See
- [107]5.5 for more details.
-
- The extensions are no longer in the global or std namespaces, instead
- they are declared in the __gnu_cxx namespace. For maximum portability,
- consider defining a namespace alias to use to talk about extensions,
- e.g.:
- #ifdef __GNUC__
- #if __GNUC__ < 3
- #include <hash_map.h>
- namespace Sgi { using ::hash_map; }; // inherit globals
- #else
- #include <ext/hash_map>
- #if __GNUC_MINOR__ == 0
- namespace Sgi = std; // GCC 3.0
- #else
- namespace Sgi = ::__gnu_cxx; // GCC 3.1 and later
- #endif
- #endif
- #else // ... there are other compilers, right?
- namespace Sgi = std;
- #endif
-
- Sgi::hash_map<int,int> my_map;
-
- This is a bit cleaner than defining typedefs for all the
- instantiations you might need.
-
- Note: explicit template specializations must be declared in the same
- namespace as the original template. This means you cannot use a
- namespace alias when declaring an explicit specialization.
-
- Extensions to the library have [108]their own page.
- _________________________________________________________________
-
-5.5 Does libstdc++ support TR1?
-
- The C++ Standard Library Technical Report adds many new features to
- the library. The latest version of this effort is described in
- [109]Technical Report 1.
-
- libstdc++ strives to implement all of TR1. An [110]overview of the
- implementation status is available.
-
- Briefly, the features of TR1 and the current status are:
-
- Reference_wrapper - Complete - Useful to pass references to functions
- that take their parameters by value.
-
- Reference-counted smart pointers - Complete - The shared_ptr and
- weak_ptr allow several object to know about a pointer and whether it
- is valid. When the last reference to the pointer is destroyed the
- pointer is freed.
-
- Function objects - Complete - Function return types (i.e, result_of),
- the functions template mem_fn (a generalization of mem_fun and
- mem_fun_red), function object binders (e.g, bind, a generalization of
- bind1st and bind2nd), and polymorhpic function wrappers (e.g, class
- template function).
-
- Type traits - Complete - The type_traits class gives templates the
- ability to probe information about the input type and enable
- type-dependent logic to be performed without the need of template
- specializations.
-
- A random number engine - Complete - This library contains randow
- number generators with several different choices of distribution.
-
- Tuples - Complete - The tuple class implements small heterogeneous
- arrays. This is an enhanced pair. In fact, the standard pair is
- enhanced with a tuple interface.
-
- Fixed-size arrays - Complete - The array class implements small
- fixed-sized arrays with container semantics.
-
- Unordered containers - Complete - The unordered_set, unordered_map,
- unordered_multiset, and unordered_multimap containers are hashed
- versions of the map, set, multimap, and multiset containers
- respectively. These classes are suitable replacements for the SGI STL
- hash_map and hash_set extensions.
-
- C99 compatibility - Under construction - There are many features
- designed to minimize the divergence of the C and the C++ languages.
-
- Special functions - Under construction - Twenty-three mathematical
- functions familiar to physicists and engineers are included:
- cylindrical and spherical Bessel and Neumann functions, hypergeometric
- functions, Laguerre polynomials, Legendre functions, elliptic
- integrals, exponential integrals and the Riemann zeta function all for
- your computing pleasure.
-
- A regular expression engine This library provides for regular
- expression objects with traversal of text with return of
- subexpressions.
- _________________________________________________________________
-
-5.6 Is libstdc++-v3 thread-safe?
-
- libstdc++-v3 strives to be thread-safe when all of the following
- conditions are met:
- * The system's libc is itself thread-safe,
- * gcc -v reports a thread model other than 'single',
- * [pre-3.3 only] a non-generic implementation of atomicity.h exists
- for the architecture in question.
-
- The user-code must guard against concurrent method calls which may
- access any particular library object's state. Typically, the
- application programmer may infer what object locks must be held based
- on the objects referenced in a method call. Without getting into great
- detail, here is an example which requires user-level locks:
- library_class_a shared_object_a;
-
- thread_main () {
- library_class_b *object_b = new library_class_b;
- shared_object_a.add_b (object_b); // must hold lock for shared_object_
-a
- shared_object_a.mutate (); // must hold lock for shared_object_
-a
- }
-
- // Multiple copies of thread_main() are started in independent threads.
-
- Under the assumption that object_a and object_b are never exposed to
- another thread, here is an example that should not require any
- user-level locks:
- thread_main () {
- library_class_a object_a;
- library_class_b *object_b = new library_class_b;
- object_a.add_b (object_b);
- object_a.mutate ();
- }
-
- All library objects are safe to use in a multithreaded program as long
- as each thread carefully locks out access by any other thread while it
- uses any object visible to another thread, i.e., treat library objects
- like any other shared resource. In general, this requirement includes
- both read and write access to objects; unless otherwise documented as
- safe, do not assume that two threads may access a shared standard
- library object at the same time.
-
- See chapters [111]17 (library introduction), [112]23 (containers), and
- [113]27 (I/O) for more information.
- _________________________________________________________________
-
-5.7 How do I get a copy of the ISO C++ Standard?
-
- Copies of the full ISO 14882 standard are available on line via the
- ISO mirror site for committee members. Non-members, or those who have
- not paid for the privilege of sitting on the committee and sustained
- their two-meeting commitment for voting rights, may get a copy of the
- standard from their respective national standards organization. In the
- USA, this national standards organization is ANSI and their website is
- right [114]here. (And if you've already registered with them, clicking
- this link will take you to directly to the place where you can
- [115]buy the standard on-line.
-
- Who is your country's member body? Visit the [116]ISO homepage and
- find out!
- _________________________________________________________________
-
-5.8 What's an ABI and why is it so messy?
-
- "ABI" stands for "Application Binary Interface." Conventionally, it
- refers to a great mass of details about how arguments are arranged on
- the call stack and/or in registers, and how various types are arranged
- and padded in structs. A single CPU design may suffer multiple ABIs
- designed by different development tool vendors who made different
- choices, or even by the same vendor for different target applications
- or compiler versions. In ideal circumstances the CPU designer presents
- one ABI and all the OSes and compilers use it. In practice every ABI
- omits details that compiler implementers (consciously or accidentally)
- must choose for themselves.
-
- That ABI definition suffices for compilers to generate code so a
- program can interact safely with an OS and its lowest-level libraries.
- Users usually want an ABI to encompass more detail, allowing libraries
- built with different compilers (or different releases of the same
- compiler!) to be linked together. For C++, this includes many more
- details than for C, and CPU designers (for good reasons elaborated
- below) have not stepped up to publish C++ ABIs. The details include
- virtual function implementation, struct inheritance layout, name
- mangling, and exception handling. Such an ABI has been defined for GNU
- C++, and is immediately useful for embedded work relying only on a
- "free-standing implementation" that doesn't include (much of) the
- standard library. It is a good basis for the work to come.
-
- A useful C++ ABI must also incorporate many details of the standard
- library implementation. For a C ABI, the layouts of a few structs
- (such as FILE, stat, jmpbuf, and the like) and a few macros suffice.
- For C++, the details include the complete set of names of functions
- and types used, the offsets of class members and virtual functions,
- and the actual definitions of all inlines. C++ exposes many more
- library details to the caller than C does. It makes defining a
- complete ABI a much bigger undertaking, and requires not just
- documenting library implementation details, but carefully designing
- those details so that future bug fixes and optimizations don't force
- breaking the ABI.
-
- There are ways to help isolate library implementation details from the
- ABI, but they trade off against speed. Library details used in inner
- loops (e.g., getchar) must be exposed and frozen for all time, but
- many others may reasonably be kept hidden from user code, so they may
- later be changed. Deciding which, and implementing the decisions, must
- happen before you can reasonably document a candidate C++ ABI that
- encompasses the standard library.
- _________________________________________________________________
-
-5.9 How do I make std::vector<T>::capacity() == std::vector<T>::size()?
-
- The standard idiom for deallocating a std::vector<T>'s unused memory
- is to create a temporary copy of the vector and swap their contents,
- e.g. for std::vector<T> v
- std::vector<T>(v).swap(v);
-
-
- The copy will take O(n) time and the swap is constant time.
-
- See [117]Shrink-to-fit strings for a similar solution for strings.
- _________________________________________________________________
-
- See [118]license.html for copying conditions. Comments and suggestions
- are welcome, and may be sent to [119]the libstdc++ mailing list.
-
-References
-
- 1. ../documentation.html
- 2. ../17_intro/license.html
- 3. http://gcc.gnu.org/onlinedocs/libstdc++/faq/
- 4. http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html
- 5. http://gcc.gnu.org/libstdc++/
- 6. ../faq/index.html#1_0
- 7. ../faq/index.html#1_1
- 8. ../faq/index.html#1_2
- 9. ../faq/index.html#1_3
- 10. ../faq/index.html#1_4
- 11. ../faq/index.html#1_5
- 12. ../faq/index.html#1_6
- 13. ../faq/index.html#1_7
- 14. ../faq/index.html#1_8
- 15. ../faq/index.html#1_9
- 16. ../faq/index.html#2_0
- 17. ../faq/index.html#2_1
- 18. ../faq/index.html#2_2
- 19. ../faq/index.html#2_3
- 20. ../faq/index.html#2_4
- 21. ../faq/index.html#2_5
- 22. ../faq/index.html#2_6
- 23. ../faq/index.html#3_0
- 24. ../faq/index.html#3_1
- 25. ../faq/index.html#3_2
- 26. ../faq/index.html#3_3
- 27. ../faq/index.html#3_4
- 28. ../faq/index.html#3_5
- 29. ../faq/index.html#3_6
- 30. ../faq/index.html#3_7
- 31. ../faq/index.html#3_8
- 32. ../faq/index.html#3_9
- 33. ../faq/index.html#3_10
- 34. ../faq/index.html#4_0
- 35. ../faq/index.html#4_1
- 36. ../faq/index.html#4_2
- 37. ../faq/index.html#4_3
- 38. ../faq/index.html#4_4
- 39. ../faq/index.html#4_4_iostreamclear
- 40. ../faq/index.html#4_4_Weff
- 41. ../faq/index.html#4_4_rel_ops
- 42. ../faq/index.html#4_4_interface
- 43. ../faq/index.html#4_4_glibc
- 44. ../faq/index.html#4_4_checks
- 45. ../faq/index.html#4_4_dlsym
- 46. ../faq/index.html#4_4_leak
- 47. ../faq/index.html#4_5
- 48. ../faq/index.html#5_0
- 49. ../faq/index.html#5_1
- 50. ../faq/index.html#5_2
- 51. ../faq/index.html#5_3
- 52. ../faq/index.html#5_4
- 53. ../faq/index.html#5_5
- 54. ../faq/index.html#5_6
- 55. ../faq/index.html#5_7
- 56. ../faq/index.html#5_8
- 57. ../faq/index.html#5_9
- 58. ../faq/index.html#1_4
- 59. ../faq/index.html#4_4_interface
- 60. ../17_intro/DESIGN
- 61. http://gcc.gnu.org/
- 62. http://gcc.gnu.org/gcc-3.3/buildstat.html
- 63. http://gcc.gnu.org/libstdc++/
- 64. http://gcc.gnu.org/libstdc++/
- 65. http://gcc.gnu.org/releases.html
- 66. ../17_intro/contribute.html
- 67. http://www.boost.org/
- 68. http://gcc.gnu.org/extensions.html
- 69. mailto:libstdc++@gcc.gnu.org
- 70. mailto:pme@gcc.gnu.org
- 71. mailto:gdr@gcc.gnu.org
- 72. ../17_intro/license.html
- 73. ../documentation.html
- 74. ../17_intro/RELEASE-NOTES
- 75. http://subversion.tigris.org/
- 76. http://gcc.gnu.org/install/test.html
- 77. ../18_support/howto.html
- 78. http://gcc.gnu.org/cgi-bin/htsearch?method=and&format=builtin-long&sort=score&words=_XOPEN_SOURCE+Solaris
- 79. http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html
- 80. http://gcc.gnu.org/ml/libstdc++/2003-02/subjects.html#00286
- 81. http://gcc.gnu.org/install/configure.html
- 82. http://gcc.gnu.org/install/
- 83. http://gcc.gnu.org/bugs.html
- 84. http://gcc.gnu.org/ml/libstdc++/2002-02/msg00034.html
- 85. http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html
- 86. http://www.cantrip.org/draft-bugs.txt
- 87. http://anubis.dkuug.dk/jtc1/sc22/wg21/
- 88. ../faq/index.html#5_2
- 89. ../ext/howto.html#5
- 90. ../ext/howto.html#5
- 91. http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html
- 92. http://gcc.gnu.org/bugs.html
- 93. ../faq/index.html#4_4_interface
- 94. ../19_diagnostics/howto.html#3
- 95. http://developer.kde.org/~sewardj/
- 96. ../debug.html#mem
- 97. http://gcc.gnu.org/contribute.html
- 98. ../17_intro/contribute.html
- 99. ../faq/index.html#2_4
- 100. ../faq/index.html#4_3
- 101. ../ext/howto.html#5
- 102. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf
- 103. ../faq/index.html#5_5
- 104. http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html
- 105. http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html
- 106. http://www.sgi.com/tech/stl/
- 107. ../faq/index.html#5_5
- 108. ../ext/howto.html
- 109. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf
- 110. ../ext/tr1.html
- 111. ../17_intro/howto.html#3
- 112. ../23_containers/howto.html#3
- 113. ../27_io/howto.html#9
- 114. http://www.ansi.org/
- 115. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003
- 116. http://www.iso.ch/
- 117. ../21_strings/howto.html#6
- 118. ../17_intro/license.html
- 119. mailto:libstdc++@gcc.gnu.org
diff --git a/libstdc++-v3/docs/html/install.html b/libstdc++-v3/docs/html/install.html
deleted file mode 100644
index ab19b6fa83a..00000000000
--- a/libstdc++-v3/docs/html/install.html
+++ /dev/null
@@ -1,241 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
- <meta name="KEYWORDS" content="libstdc++, libstdc++-v3, GCC, g++" />
- <meta name="DESCRIPTION" content="README for the GNU libstdc++ effort." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 Installation Instructions</title>
-<link rel="StyleSheet" href="lib3styles.css" type="text/css" />
-<link rel="Copyright" href="17_intro/license.html" type="text/html" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Getting started: configure, build, install</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/install.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/install.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-
-<!-- ####################################################### -->
-<hr />
-<h2>Contents</h2>
-
-<p>Because libstdc++-v3 is part of GCC, the primary source for
- installation instructions is
- <a href="http://gcc.gnu.org/install/">the GCC install page</a>.
- Additional data is given here only where it applies to libstdc++-v3.
-</p>
-
-<ul>
- <li><a href="#prereqs">Tools you will need beforehand</a></li>
- <li><a href="#config">Configuring</a></li>
- <li><a href="#usage">Using the library</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="prereqs">Tools you will need beforehand</a></h2>
- <p>The list of software needed to build the library is kept with the
- rest of the compiler, at
- <a href="http://gcc.gnu.org/install/prerequisites.html">
- http://gcc.gnu.org/install/prerequisites.html</a>. The same page
- also lists the tools you will need if you wish to modify the source.
- </p>
-
- <p>As of June 19, 2000, libstdc++ attempts to use tricky and
- space-saving features of the GNU toolchain, enabled with
- <code>-ffunction-sections -fdata-sections -Wl,--gc-sections</code>.
- To obtain maximum benefit from this, binutils after this date should
- also be used (bugs were fixed with C++ exception handling related
- to this change in libstdc++-v3). The version of these tools should
- be <code>2.10.90</code>, or later, and you can get snapshots (as
- well as releases) of binutils
- <a href="ftp://sources.redhat.com/pub/binutils">here</a>. The
- configure process will automatically detect and use these features
- if the underlying support is present.
- </p>
-
- <p>Finally, a few system-specific requirements: </p>
- <dl>
- <dt> linux </dt>
-
- <dd>If gcc 3.1.0 or later on is being used on linux, an attempt
- will be made to use "C" library functionality necessary for C++
- named locale support. For gcc 3.2.1 and later, this means that
- glibc 2.2.5 or later is required and the "C" library de_DE locale
- information must be installed.
-
- <p>
- Note however that the sanity checks involving the de_DE locale are
- skipped when an explicit --enable-clocale=gnu configure option is
- used: only the basic checks are carried out, defending against
- misconfigurations.
- </p>
-
- <p>
- If the 'gnu' locale model is being used, the following locales
- are used and tested in the libstdc++ testsuites. The first column
- is the name of the locale, the second is the character set it is
- expected to use.
- </p>
-<pre>
-de_DE ISO-8859-1
-de_DE@euro ISO-8859-15
-en_HK ISO-8859-1
-en_PH ISO-8859-1
-en_US ISO-8859-1
-en_US.ISO-8859-1 ISO-8859-1
-en_US.ISO-8859-15 ISO-8859-15
-en_US.UTF-8 UTF-8
-es_ES ISO-8859-1
-es_MX ISO-8859-1
-fr_FR ISO-8859-1
-fr_FR@euro ISO-8859-15
-is_IS UTF-8
-it_IT ISO-8859-1
-ja_JP.eucjp EUC-JP
-se_NO.UTF-8 UTF-8
-ta_IN UTF-8
-zh_TW BIG5
-</pre>
- <p>Failure to have the underlying "C" library locale
- information installed will mean that C++ named locales for the
- above regions will not work: because of this, the libstdc++
- testsuite will skip the named locale tests. If this isn't an
- issue, don't worry about it. If named locales are needed, the
- underlying locale information must be installed. Note that
- rebuilding libstdc++ after the "C" locales are installed is not
- necessary.
- </p>
-
- <p>To install support for locales, do only one of the following:
- </p>
-
- <ul>
- <li> install all locales
- <ul>
- <li>with RedHat Linux:
- <p> <code> export LC_ALL=C </code> </p>
- <p> <code> rpm -e glibc-common --nodeps </code> </p>
- <p> <code> rpm -i --define "_install_langs all"
- glibc-common-2.2.5-34.i386.rpm </code> </p>
- </li>
- <li> (instructions for other operating systems solicited) </li>
- </ul>
- </li>
- <li> install just the necessary locales
- <ul>
- <li>with Debian Linux:
- <p> Add the above list, as shown, to the file
- <code>/etc/locale.gen</code> </p>
- <p> run <code>/usr/sbin/locale-gen</code> </p>
- </li>
- <li> on most Unix-like operating systems:
- <p> <code> localedef -i de_DE -f ISO-8859-1 de_DE </code> </p>
- <p> (repeat for each entry in the above list) </p>
- </li>
- <li> (instructions for other operating systems solicited) </li>
- </ul>
- </li>
- </ul>
- </dd>
- </dl>
-
-<hr />
-
-<h2><a name="config">Configuring</a></h2>
- <p>If you have never done this before, you should read the basic
- <a href="http://gcc.gnu.org/install/">GCC Installation
- Instructions</a> first. Read <em>all of them</em>.
- <strong>Twice.</strong>
- </p>
- <p>When building libstdc++-v3 you'll have to configure
- the entire <em>gccsrcdir</em> directory. The full list of libstdc++-v3
- specific configuration options, not dependent on the specific compiler
- release being used, can be found <a href="configopts.html">here</a>.
- </p>
- <p>Consider possibly using --enable-languages=c++ to save time by only
- building the C++ language parts.
- </p>
-
- <pre>
- cd <em>gccbuilddir</em>
- <em>gccsrcdir</em>/configure --prefix=<em>destdir</em> --other-opts...</pre>
-
-
-<hr />
-<h2><a name="usage">Using the library</a></h2>
- <h3>Find the new library at runtime (shared linking only)</h3>
- <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
- against it, then you will need to find that library when you
- run the executable.
- </p>
- <p>Methods vary for different platforms and different styles, but
- the usual ones are printed to the screen during installation.
- They include:
- </p>
- <ul>
- <li>At runtime set LD_LIBRARY_PATH in your environment correctly,
- so that the shared library for libstdc++ can be found and
- loaded. Be certain that you understand all of the other
- implications and behavior of LD_LIBRARY_PATH first (few
- people do, and they get into trouble).
- </li>
- <li>Compile the path to find the library at runtime into the
- program. This can be done by passing certain options to g++,
- which will in turn pass them on to the linker. The exact
- format of the options is dependent on which linker you use:
- <ul>
- <li>GNU ld (default on Linux):<code> -Wl,--rpath,<em>destdir</em>/lib</code></li>
- <li>IRIX ld:<code> -Wl,-rpath,<em>destdir</em>/lib</code></li>
- <li>Solaris ld:<code> -Wl,-R<em>destdir</em>/lib</code></li>
- <li>More...? Let us know!</li>
- </ul>
- </li>
- </ul>
- <p>Use the <code>ldd(1)</code> utility to show which library the system
- thinks it will get at runtime.
- </p>
- <p>A libstdc++.la file is also installed, for use with Libtool. If
- you use Libtool to create your executables, these details are
- taken care of for you.
- </p>
-
-
-<!--
-<hr />
-<h2><a name=""></a></h2>
- <p>
- </p>
-
--->
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
-
diff --git a/libstdc++-v3/docs/html/lib3styles.css b/libstdc++-v3/docs/html/lib3styles.css
deleted file mode 100644
index ee88c366cd4..00000000000
--- a/libstdc++-v3/docs/html/lib3styles.css
+++ /dev/null
@@ -1,6 +0,0 @@
-.centered { text-align: center }
-.tocheader { font-size: large }
-.fineprint { font-size: x-small }
-.larger { font-size: large }
-BODY { background: #FFFFFF }
-PRE { text-align: left ; margin-left: 1em }
diff --git a/libstdc++-v3/docs/html/makedoc.awk b/libstdc++-v3/docs/html/makedoc.awk
deleted file mode 100644
index 9da77d9c1a1..00000000000
--- a/libstdc++-v3/docs/html/makedoc.awk
+++ /dev/null
@@ -1,69 +0,0 @@
-# Take apart bits of HTML and puts them back together again in new and
-# fascinating ways. Copyright (C) 2002 Free Software Foundation, Inc.
-# Contributed by Phil Edwards <pme@gcc.gnu.org>. Simple two-state automaton
-# inspired by Richard Henderson's gcc/mkmap-symver.awk.
-
-# 'file' is the name of the file on stdin
-# 'title' is the text to print at the start of the list
-
-BEGIN {
- state = "looking";
- entries = 0;
- printf (" <li>%s\n", title);
- printf (" <ul>\n");
-}
-
-# Searching for the little table of contents at the top.
-state == "looking" && /^<h1>Contents/ {
- state = "entries";
- next;
-}
-
-# Ignore everything else up to that point.
-state == "looking" {
- next;
-}
-
-# An entry in the table of contents. Pull that line apart.
-state == "entries" && /<li>/ {
- extract_info($0);
- next;
-}
-
-# End of the list. Don't bother reading the rest of the file. (It could
-# also contain more <li>'s, so that would be incorrect as well as wasteful.)
-state == "entries" && /^<\/ul>/ {
- exit;
-}
-
-END {
- for (i = 0; i < entries; i++)
- printf (" %s\n", entry[i]);
- printf (" </ul>\n </li>\n\n");
-}
-
-function extract_info(line) {
- # thistarget will be things like "#5" or "elsewhere.html"
- match(line,"href=\".*\"");
- thistarget = substr(line,RSTART+6,RLENGTH-7);
-
- # take apart the filename
- split(file,X,"/");
- if (thistarget ~ /^#/) {
- # local name, use directory and filename
- target = file thistarget
- } else {
- # different file, only use directory
- target = X[1] "/" thistarget
- }
-
- # visible text
- gsub("</a></li>","",line);
- start = index(line,"\">") + 2;
- thistext = substr(line,start);
-
- # Assemble and store the HTML for later output.
- entry[entries++] = "<li><a href=\"" target "\">" thistext "</a></li>"
-}
-
-# vim:sw=2
diff --git a/libstdc++-v3/docs/html/test.html b/libstdc++-v3/docs/html/test.html
deleted file mode 100644
index 0465503a457..00000000000
--- a/libstdc++-v3/docs/html/test.html
+++ /dev/null
@@ -1,719 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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" xml:lang="en" lang="en">
-<head>
- <meta name="AUTHOR" content="bkoz@gcc.gnu.org (Benjamin Kosnik)" />
- <meta name="KEYWORDS" content="c++, libstdc++, test, regression, g++" />
- <meta name="DESCRIPTION" content="README for the GNU libstdc++ effort." />
- <meta name="GENERATOR" content="vi and eight fingers" />
- <title>libstdc++-v3 Testing Instructions</title>
-<link rel="StyleSheet" href="lib3styles.css" />
-</head>
-<body>
-
-<h1 class="centered"><a name="top">Testing Details</a></h1>
-
-<p class="fineprint"><em>
- The latest version of this document is always available at
- <a href="http://gcc.gnu.org/onlinedocs/libstdc++/test.html">
- http://gcc.gnu.org/onlinedocs/libstdc++/test.html</a>.
-</em></p>
-
-<p><em>
- To the <a href="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</a>.
-</em></p>
-
-<!-- ####################################################### -->
-<hr />
-<h2>Contents</h2>
-<ul>
- <li><a href="#org">Testsuite organization and naming conventions</a></li>
- <li><a href="#util">Utilities: abicheck and libtestc++</a></li>
- <li><a href="#new">How to write a new test case</a></li>
- <li><a href="#check">Options for running the tests</a></li>
- <li><a href="#debug">Running debug-mode tests</a></li>
- <li><a href="#future">Future</a></li>
- <li><a href="#internals">DejaGNU internals</a></li>
-</ul>
-
-<hr />
-
-<!-- ####################################################### -->
-
-<h2><a name="org">Testsuite organization and naming conventions</a></h2>
- <p>
- The directory <em>libsrcdir/testsuite</em> contains the
- individual test cases organized in sub-directories corresponding
- to chapters of the C++ standard (detailed below), the dejagnu
- test harness support files, and sources to various testsuite
- utilities that are packaged in a separate testing library.
- </p>
-
- <p> All test cases for functionality required by the runtime
- components of the C++ standard (ISO 14882) are files within the
- following directories.
- </p>
-
- <pre>
-17_intro
-18_support
-19_diagnostics
-20_util
-21_strings
-22_locale
-23_containers
-25_algorithms
-26_numerics
-27_io
- </pre>
-
- <p>
- In addition, the following directories include test files:
- </p>
-
- <pre>
-tr1 Tests for components as described by the Technical Report on Standard Library Extensions (TR1).
-backward Tests for backwards compatibility and deprecated features.
-demangle Tests for __cxa_demangle, the IA 64 C++ ABI demangler
-ext Tests for extensions.
-performance Tests for performance analysis, and performance regressions.
-thread Tests for threads.
- </pre>
-
- <p>
- Some directories don't have test files, but instead contain
- auxiliary information (<a href="#internals">more information</a>):
- </p>
-
- <pre>
-config Files for the dejagnu test harness.
-lib Files for the dejagnu test harness.
-libstdc++* Files for the dejagnu test harness.
-data Sample text files for testing input and output.
-util Files for libtestc++, utilities and testing routines.
- </pre>
-
- <p>
- Within a directory that includes test files, there may be
- additional subdirectories, or files. Originally, test cases
- were appended to one file that represented a particular section
- of the chapter under test, and was named accordingly. For
- instance, to test items related to <code> 21.3.6.1 -
- basic_string::find [lib.string::find]</code> in the standard,
- the following was used:
- </p>
- <pre>
-21_strings/find.cc
- </pre>
- <p>
- However, that practice soon became a liability as the test cases
- became huge and unwieldy, and testing new or extended
- functionality (like wide characters or named locales) became
- frustrating, leading to aggressive pruning of test cases on some
- platforms that covered up implementation errors. Now, the test
- suite has a policy of one file, one test case, which solves the
- above issues and gives finer grained results and more manageable
- error debugging. As an example, the test case quoted above
- becomes:
- </p>
- <pre>
-21_strings/basic_string/find/char/1.cc
-21_strings/basic_string/find/char/2.cc
-21_strings/basic_string/find/char/3.cc
-21_strings/basic_string/find/wchar_t/1.cc
-21_strings/basic_string/find/wchar_t/2.cc
-21_strings/basic_string/find/wchar_t/3.cc
- </pre>
-
- <p>
- All new tests should be written with the policy of one test
- case, one file in mind.
- </p>
-
- <p>
- In addition, there are some special names and suffixes that are
- used within the testsuite to designate particular kinds of
- tests.
- </p>
-
-<ul>
-<li>
- <em>_xin.cc</em>
- <p>
- This test case expects some kind of interactive input in order
- to finish or pass. At the moment, the interactive tests are not
- run by default. Instead, they are run by hand, like:
- </p>
- <pre>
-g++ 27_io/objects/char/3_xin.cc
-cat 27_io/objects/char/3_xin.in | a.out
- </pre>
-</li>
-<li>
- <em>.in</em>
- <p>
- This file contains the expected input for the corresponding <em>
- _xin.cc</em> test case.
- </p>
-</li>
-<li>
- <em>_neg.cc</em>
- <p>
- This test case is expected to fail: it's a negative test. At the
- moment, these are almost always compile time errors.
- </p>
-</li>
-<li>
- <em>char</em>
- <p>
- This can either be a directory name or part of a longer file
- name, and indicates that this file, or the files within this
- directory are testing the <code>char</code> instantiation of a
- template.
- </p>
-</li>
-<li>
- <em>wchar_t</em>
- <p>
- This can either be a directory name or part of a longer file
- name, and indicates that this file, or the files within this
- directory are testing the <code>wchar_t</code> instantiation of
- a template. Some hosts do not support <code>wchar_t</code>
- functionality, so for these targets, all of these tests will not
- be run.
- </p>
-</li>
-<li>
- <em>thread</em>
- <p>
- This can either be a directory name or part of a longer file
- name, and indicates that this file, or the files within this
- directory are testing situations where multiple threads are
- being used.
- </p>
-</li>
-<li>
- <em>performance</em>
- <p>
- This can either be an enclosing directory name or part of a
- specific file name. This indicates a test that is used to
- analyze runtime performance, for performance regression testing,
- or for other optimization related analysis. At the moment, these
- test cases are not run by default.
- </p>
-</li>
-</ul>
-
-<hr />
-<h2><a name="util">Utilities: abi_check and libtestc++</a></h2>
- <p>
- The testsuite directory also contains some files that implement
- functionality that is intended to make writing test cases easier,
- or to avoid duplication, or to provide error checking in a way that
- is consistent across platforms and test harnesses. A stand-alone
- executable, called <em>abi_check</em>, and a static library called
- <em>libtestc++</em> are constructed. Both of these items are not
- installed, and only used during testing.
- </p>
-
- <p>
- These files include the following functionality:
- </p>
-
- <ul>
- <li>
- <em>testsuite_abi.h</em>,
- <em>testsuite_abi.cc</em>,
- <em>testsuite_abi_check.cc</em>
- <p>
- Creates the executable <em>abi_check</em>.
- Used to check correctness of symbol versioning, visibility of
- exported symbols, and compatibility on symbols in the shared
- library, for hosts that support this feature. More information
- can be found in the ABI documentation <a href="abi.html"> here</a>
- </p>
- </li>
- <li>
- <em>testsuite_allocator.h</em>,
- <em>testsuite_allocator.cc</em>
- <p>
- Contains specialized allocators that keep track of construction
- and destruction. Also, support for overriding global new and
- delete operators, including verification that new and delete
- are called during execution, and that allocation over max_size
- fails.
- </p>
- </li>
- <li>
- <em>testsuite_character.h</em>
- <p>
- Contains <code>std::char_traits</code> and
- <code>std::codecvt</code> specializations for a user-defined
- POD.
- </p>
- </li>
- <li>
- <em>testsuite_hooks.h</em>,
- <em>testsuite_hooks.cc</em>
- <p>
- A large number of utilities, including:
- </p>
- <ul>
- <li>VERIFY</li>
- <li>set_memory_limits</li>
- <li>verify_demangle</li>
- <li>run_tests_wrapped_locale</li>
- <li>run_tests_wrapped_env</li>
- <li>try_named_locale</li>
- <li>try_mkfifo</li>
- <li>func_callback</li>
- <li>counter</li>
- <li>copy_tracker</li>
- <li>copy_constructor</li>
- <li>assignment_operator</li>
- <li>destructor</li>
- <li>pod_char, pod_int and associated char_traits specializations</li>
- </ul>
- <p></p>
- </li>
- <li>
- <em>testsuite_io.h</em>
- <p>
- Error, exception, and constraint checking for
- <code>std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
- </p>
- </li>
- <li>
- <em>testsuite_iterators.h</em>
- <p>
- Wrappers for various iterators.
- </p>
- </li>
- <li>
- <em>testsuite_performance.h</em>
- <p>
- A number of class abstractions for performance counters, and
- reporting functions including:
- </p>
- <ul>
- <li>time_counter</li>
- <li>resource_counter</li>
- <li>report_performance</li>
- </ul>
- <p></p>
- </li>
- </ul>
-
-<hr />
-<h2><a name="new">How to write a new test case</a></h2>
-
- <p>
- The first step in making a new test case is to choose the correct
- directory and file name, given the organization as previously
- described.
- </p>
-
- <p>
- All files are copyright the FSF, and GPL'd: this is very
- important. The first copyright year should correspond to the date
- the file was checked in to CVS.
- </p>
-
- <p>
- As per the dejagnu instructions, always return 0 from main to
- indicate success.
- </p>
-
- <p>
- A bunch of utility functions and classes have already been
- abstracted out into the testsuite utility library, <code>
- libtestc++</code>. To use this functionality, just include the
- appropriate header file: the library or specific object files will
- automatically be linked in as part of the testsuite run.
- </p>
-
- <p>
- For a test that needs to take advantage of the dejagnu test
- harness, what follows below is a list of special keyword that
- harness uses. Basically, a test case contains dg-keywords (see
- dg.exp) indicating what to do and what kinds of behavior are to be
- expected. New test cases should be written with the new style
- DejaGnu framework in mind.
- </p>
-
- <p>
- To ease transition, here is the list of dg-keyword documentation
- lifted from dg.exp.
- </p>
-
-<pre>
-# The currently supported options are:
-#
-# dg-prms-id N
-# set prms_id to N
-#
-# dg-options "options ..." [{ target selector }]
-# specify special options to pass to the tool (eg: compiler)
-#
-# dg-do do-what-keyword [{ target/xfail selector }]
-# `do-what-keyword' is tool specific and is passed unchanged to
-# ${tool}-dg-test. An example is gcc where `keyword' can be any of:
-# preprocess|compile|assemble|link|run
-# and will do one of: produce a .i, produce a .s, produce a .o,
-# produce an a.out, or produce an a.out and run it (the default is
-# compile).
-#
-# dg-error regexp comment [{ target/xfail selector } [{.|0|linenum}]]
-# indicate an error message &lt;regexp&gt; is expected on this line
-# (the test fails if it doesn't occur)
-# Linenum=0 for general tool messages (eg: -V arg missing).
-# "." means the current line.
-#
-# dg-warning regexp comment [{ target/xfail selector } [{.|0|linenum}]]
-# indicate a warning message &lt;regexp&gt; is expected on this line
-# (the test fails if it doesn't occur)
-#
-# dg-bogus regexp comment [{ target/xfail selector } [{.|0|linenum}]]
-# indicate a bogus error message &lt;regexp&gt; use to occur here
-# (the test fails if it does occur)
-#
-# dg-build regexp comment [{ target/xfail selector }]
-# indicate the build use to fail for some reason
-# (errors covered here include bad assembler generated, tool crashes,
-# and link failures)
-# (the test fails if it does occur)
-#
-# dg-excess-errors comment [{ target/xfail selector }]
-# indicate excess errors are expected (any line)
-# (this should only be used sparingly and temporarily)
-#
-# dg-output regexp [{ target selector }]
-# indicate the expected output of the program is &lt;regexp&gt;
-# (there may be multiple occurrences of this, they are concatenated)
-#
-# dg-final { tcl code }
-# add some tcl code to be run at the end
-# (there may be multiple occurrences of this, they are concatenated)
-# (unbalanced braces must be \-escaped)
-#
-# "{ target selector }" is a list of expressions that determine whether the
-# test succeeds or fails for a particular target, or in some cases whether the
-# option applies for a particular target. If the case of `dg-do' it specifies
-# whether the test case is even attempted on the specified target.
-#
-# The target selector is always optional. The format is one of:
-#
-# { xfail *-*-* ... } - the test is expected to fail for the given targets
-# { target *-*-* ... } - the option only applies to the given targets
-#
-# At least one target must be specified, use *-*-* for "all targets".
-# At present it is not possible to specify both `xfail' and `target'.
-# "native" may be used in place of "*-*-*".
-
-Example 1: Testing compilation only
-// { dg-do compile }
-
-Example 2: Testing for expected warnings on line 36, which all targets fail
-// { dg-warning "string literals" "" { xfail *-*-* } 36
-
-Example 3: Testing for expected warnings on line 36
-// { dg-warning "string literals" "" { target *-*-* } 36
-
-Example 4: Testing for compilation errors on line 41
-// { dg-do compile }
-// { dg-error "no match for" "" { target *-*-* } 41 }
-
-Example 5: Testing with special command line settings, or without the
-use of pre-compiled headers, in particular the stdc++.h.gch file. Any
-options here will override the DEFAULT_CXXFLAGS and PCH_CXXFLAGS set
-up in the normal.exp file.
-// { dg-options "-O0" { target *-*-* } }
-</pre>
-
- <p>
- More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
- </p>
-
-<hr />
-<h2><a name="check">Options for running the tests</a></h2>
-
- <p> There are several options for running tests, including testing
- the regression tests, testing a subset of the regression tests,
- testing the performance tests, testing just compilation, testing
- installed tools, etc. In addition, there is a special rule for
- checking the exported symbols of the shared library.
- </p>
-
- <p>You can check the status of the build without installing it
- using the dejagnu harness, much like the rest of the gcc tools.</p>
- <pre> make check</pre>
- <p>in the <em>libbuilddir</em> directory.</p>
- <p>or</p>
- <pre> make check-target-libstdc++-v3</pre>
- <p>in the <em>gccbuilddir</em> directory.</p>
-
- <p>
- These commands are functionally equivalent and will create a
- 'testsuite' directory underneath <em>libbuilddir</em> containing
- the results of the tests. Two results files will be generated:
- <em> libstdc++.sum</em>, which is a PASS/FAIL summary for each
- test, and <em>libstdc++.log</em> which is a log of the exact
- command line passed to the compiler, the compiler output, and
- the executable output (if any).
- </p>
-
-
-<p>
-To debug the dejagnu test harness during runs, try invoking with a
-specific argument to the variable RUNTESTFLAGS, as below.
-</p>
-
-<pre>
-make check-target-libstdc++-v3 RUNTESTFLAGS="-v"
-</pre>
-or
-<pre>
-make check-target-libstdc++-v3 RUNTESTFLAGS="-v -v"
-</pre>
-
-<p> To run a subset of the library tests, try using a command like the
-following from the <em>libbuilddir/testsuite</em> directory:
-</p>
-<pre>
-runtest --tool libstdc++ normal.exp="`find $srcdir/17_intro -name *.cc`"
-</pre>
-
-
-<p>
-There are two ways to run on a simulator: set up DEJAGNU to point to a
-specially crafted site.exp, or pass down --target_board flags.
-</p>
-Example flags to pass down for various embedded builds are as follows:
-<pre>
---target=powerpc-eabism (libgloss/sim)
-make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=powerpc-sim"
-
---target=calmrisc32 (libgloss/sid)
-make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=calmrisc32-sid"
-
---target=xscale-elf (newlib/sim)
-make check-target-libstdc++-v3 RUNTESTFLAGS="--target_board=arm-sim"
-</pre>
-
-<p> Also, here is an example of how to run the libstdc++ testsuite for a
-multilibed build directory with different ABI settings:
-</p>
-<pre>
-make check-target-libstdc++-v3 RUNTESTFLAGS='--target_board \"unix{-mabi=32,,-mabi=64}\"'
-</pre>
-
-<p>
-You can run the tests with a compiler and library that have already
-been installed. Make sure that the compiler (e.g., <code>g++</code>)
-is in your <code>PATH</code>. If you are using shared libraries, then
-you must also ensure that the directory containing the shared version
-of libstdc++ is in your <code>LD_LIBRARY_PATH</code>, or equivalent.
-If your GCC source tree is at <code>/path/to/gcc</code>, then you can
-run the tests as follows:
-<pre>
-runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
-</pre>
-The testsuite will create a number of files in the directory in which you
-run this command,. Some of those files might use the same name as
-files created by other testsuites (like the ones for GCC and G++), so
-you should not try to run all the testsuites in parallel from the same
-directory.
-</p>
-
- <p> In addition, there are some testing options that are mostly of
- interest to library maintainers and system integrators. As such,
- these tests may not work on all cpu and host combinations, and may need to
- be executed in the <em>libbuilddir/testsuite</em> directory. These options
- include, but are not necessarily limited to, the following:
- </p>
-
- <pre>
- make testsuite_files</pre>
- <p>
- Five files are generated that determine what test files
- are run. These files are:
- </p>
- <ul>
- <li>
- <em>testsuite_files </em>
- <p> This is a list of all the test cases that will be run. Each
- test case is on a separate line, given with an absolute path
- from the <em>libsrcdir/testsuite</em> directory.
- </p>
- </li>
-
- <li>
- <em>testsuite_files_interactive </em>
- <p> This is a list of all the interactive test cases, using the
- same format as the file list above. These tests are not run by default.
- </p>
- </li>
-
- <li>
- <em>testsuite_files_performance</em>
- <p> This is a list of all the performance test cases, using the
- same format as the file list above. These tests are not run by default.
- </p>
- </li>
-
- <li>
- <em>testsuite_thread</em>
- <p> This file indicates that the host system can run tests which
- incolved multiple threads.
- </p>
- </li>
-
- <li>
- <em>testsuite_wchar_t</em>
- <p> This file indicates that the host system can run the wchar_t
- tests, and corresponds to the macro definition <code>
- _GLIBCXX_USE_WCHAR_T</code> in the file c++config.h.
- </p>
- </li>
- </ul>
-
- <pre>
- make check-abi</pre>
- <p>The library ABI can be tested. This involves testing the shared
- library against an ABI-defining previous version of symbol exports. </p>
-
- <pre>
- make check-compile</pre>
- <p>This rule compiles, but does not link or execute, the
- <em>testsuite_files</em> test cases and displays the output on stdout.</p>
-
- <pre>
- make check-performance</pre>
- <p>This rule runs through the <em>testsuite_files_performance</em>
- test cases and collects information for performance analysis and
- can be used to spot performance regressions. Various timing
- information is collected, as well as number of hard page faults,
- and memory used. This is not run by default, and the implementation
- is in flux.
-</p>
-
- <p>
- We are interested in any strange failures of the
- testsuite; please see <a href="faq/index.html#2_4">FAQ 2.4</a>
- for which files to examine.
- </p>
-
-<hr/>
-<h2><a name="debug">Running debug-mode tests</a></h2>
-<p>To run the libstdc++ test suite under the <a
- href="debug.html#safe">debug mode</a>,
- edit <code>libstdc++/scripts/testsuite_flags</code> to add the
- compile-time flag <code>-D_GLIBCXX_DEBUG</code> to the result
- printed by the <code>--build-cxx</code> option. Additionally, add
- the <code>-D_GLIBCXX_DEBUG_PEDANTIC</code> flag to turn on pedantic
- checking. The libstdc++ test suite should produce precisely the same
- results under debug mode that it does under release mode: any
- deviation indicates an error in either the library or the test
- suite.</p>
-
-<hr />
-<h2><a name="future">Future</a></h2>
-
-<p>
-Shared runs need to be implemented, for targets that support shared libraries.
-</p>
-
-<p>
-Diffing of expected output to standard streams needs to be finished off.
-</p>
-
-<p>
-The V3 testing framework supports, or will eventually support,
-additional keywords for the purpose of easing the job of writing
-test cases. All V3-keywords are of the form <code>@xxx@</code>.
-Currently plans for supported keywords include:
-</p>
-
-<dl>
-<dt> <code> @require@ &lt;files&gt; </code> </dt>
-<dd>
- <p>
- The existence of &lt;files&gt; is essential for the test to complete
- successfully. For example, a test case foo.C using bar.baz as
- input file could say
- </p>
- <pre>
- // @require@ bar.baz</pre>
- <p>
- The special variable % stands for the rootname, e.g. the
- file-name without its `.C' extension. Example of use (taken
- verbatim from 27_io/filebuf.cc)
- </p>
- <pre>
- // @require@ %-*.tst %-*.txt</pre>
-</dd>
-<dt> <code> @diff@ &lt;first-list&gt; &lt;second-list&gt; </code> </dt>
-<dd>
- <p>
- After the test case compiles and ran successfully, diff
- &lt;first-list&gt; against &lt;second-list&gt;, these lists should
- have the same length. The test fails if diff returns non-zero a
- pair of files.
- </p>
-</dd>
-</dl>
-
-<hr />
-<h2><a name="internals">DejaGNU internals</a></h2>
-
-<p>This is information for those looking at making changes to the testsuite
-structure, and/or needing to trace dejagnu's actions with --verbose. This
-will not be useful to people who are "merely" adding new tests to the existing
-structure.
-</p>
-
-<p>The first key point when working with dejagnu is the idea of a "tool".
-Files, directories, and functions are all implicitly used when they are
-named after the tool in use. Here, the tool will always be "libstdc++".
-</p>
-
-<p>The <code>lib</code> subdir contains support routines. The
-<code>lib/libstdc++.exp</code> file ("support library") is loaded
-automagically, and must explicitly load the others. For example, files can
-be copied from the core compiler's support directory into <code>lib</code>.
-</p>
-
-<p>Some routines in <code>lib/libstdc++.exp</code> are callbacks, some are
-our own. Callbacks must be prefixed with the name of the tool. To easily
-distinguish the others, by convention our own routines are named "v3-*".
-</p>
-
-<p>The next key point when working with dejagnu is "test files". Any
-directory whose name starts with the tool name will be searched for test files.
-(We have only one.) In those directories, any <code>.exp</code> file is
-considered a test file, and will be run in turn. Our main test file is called
-<code>normal.exp</code>; it runs all the tests in testsuite_files using the
-callbacks loaded from the support library.
-</p>
-
-<p>The <code>config</code> directory is searched for any particular "target
-board" information unique to this library. This is currently unused and sets
-only default variables.
-</p>
-
-
-<!-- ####################################################### -->
-
-<hr />
-<p class="fineprint"><em>
-See <a href="17_intro/license.html">license.html</a> for copying conditions.
-Comments and suggestions are welcome, and may be sent to
-<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
-</em></p>
-
-
-</body>
-</html>
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index f661ed4fe07..bd57bc4f133 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the include subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
## Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
@@ -58,6 +58,7 @@ std_headers = \
${std_srcdir}/stdexcept \
${std_srcdir}/streambuf \
${std_srcdir}/string \
+ ${std_srcdir}/system_error \
${std_srcdir}/tuple \
${std_srcdir}/type_traits \
${std_srcdir}/unordered_map \
@@ -69,12 +70,14 @@ std_headers = \
bits_srcdir = ${glibcxx_srcdir}/include/bits
bits_builddir = ./bits
bits_headers = \
+ ${bits_srcdir}/algorithmfwd.h \
${bits_srcdir}/allocator.h \
${bits_srcdir}/basic_ios.h \
${bits_srcdir}/basic_ios.tcc \
${bits_srcdir}/basic_string.h \
${bits_srcdir}/basic_string.tcc \
${bits_srcdir}/boost_concept_check.h \
+ ${bits_srcdir}/boost_sp_shared_count.h \
${bits_srcdir}/char_traits.h \
${bits_srcdir}/codecvt.h \
${bits_srcdir}/concept_check.h \
@@ -117,7 +120,7 @@ bits_headers = \
${bits_srcdir}/stl_iterator_base_types.h \
${bits_srcdir}/stl_list.h \
${bits_srcdir}/stl_map.h \
- ${bits_srcdir}/stl_auto_ptr.h \
+ ${bits_srcdir}/stl_move.h \
${bits_srcdir}/stl_multimap.h \
${bits_srcdir}/stl_multiset.h \
${bits_srcdir}/stl_numeric.h \
@@ -142,42 +145,14 @@ bits_headers = \
backward_srcdir = ${glibcxx_srcdir}/include/backward
backward_builddir = ./backward
backward_headers = \
- ${backward_srcdir}/complex.h \
- ${backward_srcdir}/iomanip.h \
- ${backward_srcdir}/istream.h \
- ${backward_srcdir}/ostream.h \
- ${backward_srcdir}/stream.h \
- ${backward_srcdir}/streambuf.h \
- ${backward_srcdir}/algo.h \
- ${backward_srcdir}/algobase.h \
- ${backward_srcdir}/alloc.h \
- ${backward_srcdir}/bvector.h \
- ${backward_srcdir}/defalloc.h \
- ${backward_srcdir}/deque.h \
- ${backward_srcdir}/function.h \
- ${backward_srcdir}/hash_map.h \
- ${backward_srcdir}/hash_set.h \
+ ${backward_srcdir}/auto_ptr.h \
+ ${backward_srcdir}/backward_warning.h \
+ ${backward_srcdir}/binders.h \
+ ${backward_srcdir}/hash_map \
+ ${backward_srcdir}/hash_set \
+ ${backward_srcdir}/hash_fun.h \
${backward_srcdir}/hashtable.h \
- ${backward_srcdir}/heap.h \
- ${backward_srcdir}/iostream.h \
- ${backward_srcdir}/iterator.h \
- ${backward_srcdir}/list.h \
- ${backward_srcdir}/map.h \
- ${backward_srcdir}/multimap.h \
- ${backward_srcdir}/new.h \
- ${backward_srcdir}/multiset.h \
- ${backward_srcdir}/pair.h \
- ${backward_srcdir}/queue.h \
- ${backward_srcdir}/rope.h \
- ${backward_srcdir}/set.h \
- ${backward_srcdir}/slist.h \
- ${backward_srcdir}/stack.h \
- ${backward_srcdir}/tempbuf.h \
- ${backward_srcdir}/tree.h \
- ${backward_srcdir}/vector.h \
- ${backward_srcdir}/fstream.h \
- ${backward_srcdir}/strstream \
- ${backward_srcdir}/backward_warning.h
+ ${backward_srcdir}/strstream
pb_srcdir = ${glibcxx_srcdir}/include/ext/pb_ds
pb_builddir = ./ext/pb_ds
@@ -371,7 +346,7 @@ pb_headers4 = \
${pb_srcdir}/detail/list_update_policy/counter_lu_policy_imp.hpp \
${pb_srcdir}/detail/list_update_policy/mtf_lu_policy_imp.hpp \
${pb_srcdir}/detail/list_update_policy/sample_update_policy.hpp \
- ${pb_srcdir}/detail/map_debug_base.hpp \
+ ${pb_srcdir}/detail/debug_map_base.hpp \
${pb_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
${pb_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
${pb_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
@@ -493,7 +468,6 @@ pb_headers7 = \
${pb_srcdir}/detail/unordered_iterator/point_iterator.hpp
-
ext_srcdir = ${glibcxx_srcdir}/include/ext
ext_builddir = ./ext
ext_headers = \
@@ -508,10 +482,6 @@ ext_headers = \
${ext_srcdir}/stdio_filebuf.h \
${ext_srcdir}/stdio_sync_filebuf.h \
${ext_srcdir}/functional \
- ${ext_srcdir}/hash_map \
- ${ext_srcdir}/hash_set \
- ${ext_srcdir}/hash_fun.h \
- ${ext_srcdir}/hashtable.h \
${ext_srcdir}/iterator \
${ext_srcdir}/malloc_allocator.h \
${ext_srcdir}/memory \
@@ -533,8 +503,12 @@ ext_headers = \
${ext_srcdir}/vstring.h \
${ext_srcdir}/vstring.tcc \
${ext_srcdir}/vstring_fwd.h \
- ${ext_srcdir}/vstring_util.h
+ ${ext_srcdir}/vstring_util.h \
+ ${ext_compat_headers}
+ext_compat_headers = \
+ ${backward_srcdir}/hash_set \
+ ${backward_srcdir}/hash_map
tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
@@ -542,6 +516,7 @@ tr1_headers = \
${tr1_srcdir}/array \
${tr1_srcdir}/bessel_function.tcc \
${tr1_srcdir}/beta_function.tcc \
+ ${tr1_srcdir}/boost_sp_shared_count.h \
${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
${tr1_srcdir}/cfenv \
@@ -602,6 +577,7 @@ tr1_impl_builddir = ./tr1_impl
tr1_impl_headers = \
${tr1_impl_srcdir}/array \
${tr1_impl_srcdir}/boost_shared_ptr.h \
+ ${tr1_impl_srcdir}/boost_sp_counted_base.h \
${tr1_impl_srcdir}/cctype \
${tr1_impl_srcdir}/cfenv \
${tr1_impl_srcdir}/cinttypes \
@@ -619,9 +595,7 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/random \
${tr1_impl_srcdir}/random.tcc \
${tr1_impl_srcdir}/regex \
- ${tr1_impl_srcdir}/tuple \
${tr1_impl_srcdir}/type_traits \
- ${tr1_impl_srcdir}/type_traitsfwd.h \
${tr1_impl_srcdir}/unordered_map \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
@@ -708,18 +682,13 @@ debug_headers = \
${debug_srcdir}/deque \
${debug_srcdir}/formatter.h \
${debug_srcdir}/functions.h \
- ${debug_srcdir}/hash_map \
- ${debug_srcdir}/hash_map.h \
- ${debug_srcdir}/hash_multimap.h \
- ${debug_srcdir}/hash_multiset.h \
- ${debug_srcdir}/hash_set \
- ${debug_srcdir}/hash_set.h \
${debug_srcdir}/list \
${debug_srcdir}/map \
${debug_srcdir}/macros.h \
${debug_srcdir}/map.h \
${debug_srcdir}/multimap.h \
${debug_srcdir}/multiset.h \
+ ${debug_srcdir}/safe_association.h \
${debug_srcdir}/safe_base.h \
${debug_srcdir}/safe_iterator.h \
${debug_srcdir}/safe_iterator.tcc \
@@ -727,8 +696,60 @@ debug_headers = \
${debug_srcdir}/set \
${debug_srcdir}/set.h \
${debug_srcdir}/string \
+ ${debug_srcdir}/unordered_map \
+ ${debug_srcdir}/unordered_set \
${debug_srcdir}/vector
+# Parallel mode headers
+parallel_srcdir = ${glibcxx_srcdir}/include/parallel
+parallel_builddir = ./parallel
+parallel_headers = \
+ ${parallel_srcdir}/algorithm \
+ ${parallel_srcdir}/algobase.h \
+ ${parallel_srcdir}/algo.h \
+ ${parallel_srcdir}/algorithm \
+ ${parallel_srcdir}/algorithmfwd.h \
+ ${parallel_srcdir}/balanced_quicksort.h \
+ ${parallel_srcdir}/base.h \
+ ${parallel_srcdir}/basic_iterator.h \
+ ${parallel_srcdir}/checkers.h \
+ ${parallel_srcdir}/compatibility.h \
+ ${parallel_srcdir}/compiletime_settings.h \
+ ${parallel_srcdir}/equally_split.h \
+ ${parallel_srcdir}/features.h \
+ ${parallel_srcdir}/find.h \
+ ${parallel_srcdir}/find_selectors.h \
+ ${parallel_srcdir}/for_each.h \
+ ${parallel_srcdir}/for_each_selectors.h \
+ ${parallel_srcdir}/iterator.h \
+ ${parallel_srcdir}/list_partition.h \
+ ${parallel_srcdir}/losertree.h \
+ ${parallel_srcdir}/merge.h \
+ ${parallel_srcdir}/multiseq_selection.h \
+ ${parallel_srcdir}/multiway_merge.h \
+ ${parallel_srcdir}/multiway_mergesort.h \
+ ${parallel_srcdir}/numeric \
+ ${parallel_srcdir}/numericfwd.h \
+ ${parallel_srcdir}/omp_loop.h \
+ ${parallel_srcdir}/omp_loop_static.h \
+ ${parallel_srcdir}/parallel.h \
+ ${parallel_srcdir}/par_loop.h \
+ ${parallel_srcdir}/partial_sum.h \
+ ${parallel_srcdir}/partition.h \
+ ${parallel_srcdir}/queue.h \
+ ${parallel_srcdir}/quicksort.h \
+ ${parallel_srcdir}/random_number.h \
+ ${parallel_srcdir}/random_shuffle.h \
+ ${parallel_srcdir}/search.h \
+ ${parallel_srcdir}/set_operations.h \
+ ${parallel_srcdir}/settings.h \
+ ${parallel_srcdir}/sort.h \
+ ${parallel_srcdir}/tags.h \
+ ${parallel_srcdir}/types.h \
+ ${parallel_srcdir}/unique_copy.h \
+ ${parallel_srcdir}/workstealing.h
+
+
# Some of the different "C" header models need extra files.
# Some "C" header schemes require the "C" compatibility headers.
# For --enable-cheaders=c_std
@@ -754,7 +775,11 @@ host_headers = \
${host_srcdir}/os_defines.h \
${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \
- ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h
+ ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h \
+ ${glibcxx_srcdir}/$(ERROR_CONSTANTS_SRCDIR)/error_constants.h \
+ ${glibcxx_srcdir}/include/precompiled/stdc++.h \
+ ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h \
+ ${glibcxx_srcdir}/include/precompiled/extc++.h
# Non-installed host_header files.
COMPATIBILITY_H = config/abi/compatibility.h
@@ -806,13 +831,11 @@ pch_output_dirs = \
${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir}
pch_output_anchors = \
${pch1_output_anchor} ${pch2_output_anchor} ${pch3_output_anchor}
-PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
+PCHFLAGS=-Winvalid-pch -x c++-header $(CXXFLAGS)
if GLIBCXX_BUILD_PCH
pch_build = ${pch_output}
-pch_install = install-pch
else
pch_build =
-pch_install =
endif
# List of all timestamp files. By keeping only one copy of this list, both
@@ -820,7 +843,7 @@ 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-host
+ stamp-tr1 stamp-tr1-impl stamp-debug stamp-parallel stamp-host
# List of all files that are created by explicit building, editing, or
# catenation.
@@ -977,6 +1000,15 @@ stamp-debug: ${debug_headers}
fi ;\
$(STAMP) stamp-debug
+stamp-parallel: ${parallel_headers}
+ @if [ ! -d "${parallel_builddir}" ]; then \
+ mkdir -p ${parallel_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-parallel ]; then \
+ (cd ${parallel_builddir} && @LN_S@ $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-parallel
+
stamp-${host_alias}:
@if [ ! -d ${host_builddir} ]; then \
mkdir -p ${host_builddir} ;\
@@ -1129,7 +1161,7 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
# the rest are taken from the original source tree.
if GLIBCXX_HOSTED
-install-data-local: install-headers ${pch_install}
+install-data-local: install-headers
else
install-data-local: install-freestanding-headers
endif
@@ -1214,21 +1246,14 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir}
for file in ${debug_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir}
+ for file in ${parallel_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${parallel_builddir}; done
$(mkinstalldirs) $(DESTDIR)${host_installdir}
for file in ${host_headers} ${host_headers_extra} \
${thread_host_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
-install-pch:
- $(mkinstalldirs) $(DESTDIR)${pch1_output_installdir}
- for file in ${pch1_output_builddir}/*; do \
- $(INSTALL_DATA) $$file $(DESTDIR)${pch1_output_installdir}; done
- $(mkinstalldirs) $(DESTDIR)${pch2_output_installdir}
- for file in ${pch2_output_builddir}/*; do \
- $(INSTALL_DATA) $$file $(DESTDIR)${pch2_output_installdir}; done
- $(INSTALL_DATA) ${pch1_output_anchor} $(DESTDIR)${host_installdir}
- $(INSTALL_DATA) ${pch2_output_anchor} $(DESTDIR)${host_installdir}
-
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = ${pch_output} ${pch_output_anchors}
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 9f5c7fb681f..47ddc5bd04c 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -41,6 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = include
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -71,6 +72,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -108,6 +110,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -118,6 +122,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
@@ -303,6 +308,7 @@ std_headers = \
${std_srcdir}/stdexcept \
${std_srcdir}/streambuf \
${std_srcdir}/string \
+ ${std_srcdir}/system_error \
${std_srcdir}/tuple \
${std_srcdir}/type_traits \
${std_srcdir}/unordered_map \
@@ -314,12 +320,14 @@ std_headers = \
bits_srcdir = ${glibcxx_srcdir}/include/bits
bits_builddir = ./bits
bits_headers = \
+ ${bits_srcdir}/algorithmfwd.h \
${bits_srcdir}/allocator.h \
${bits_srcdir}/basic_ios.h \
${bits_srcdir}/basic_ios.tcc \
${bits_srcdir}/basic_string.h \
${bits_srcdir}/basic_string.tcc \
${bits_srcdir}/boost_concept_check.h \
+ ${bits_srcdir}/boost_sp_shared_count.h \
${bits_srcdir}/char_traits.h \
${bits_srcdir}/codecvt.h \
${bits_srcdir}/concept_check.h \
@@ -362,7 +370,7 @@ bits_headers = \
${bits_srcdir}/stl_iterator_base_types.h \
${bits_srcdir}/stl_list.h \
${bits_srcdir}/stl_map.h \
- ${bits_srcdir}/stl_auto_ptr.h \
+ ${bits_srcdir}/stl_move.h \
${bits_srcdir}/stl_multimap.h \
${bits_srcdir}/stl_multiset.h \
${bits_srcdir}/stl_numeric.h \
@@ -387,42 +395,14 @@ bits_headers = \
backward_srcdir = ${glibcxx_srcdir}/include/backward
backward_builddir = ./backward
backward_headers = \
- ${backward_srcdir}/complex.h \
- ${backward_srcdir}/iomanip.h \
- ${backward_srcdir}/istream.h \
- ${backward_srcdir}/ostream.h \
- ${backward_srcdir}/stream.h \
- ${backward_srcdir}/streambuf.h \
- ${backward_srcdir}/algo.h \
- ${backward_srcdir}/algobase.h \
- ${backward_srcdir}/alloc.h \
- ${backward_srcdir}/bvector.h \
- ${backward_srcdir}/defalloc.h \
- ${backward_srcdir}/deque.h \
- ${backward_srcdir}/function.h \
- ${backward_srcdir}/hash_map.h \
- ${backward_srcdir}/hash_set.h \
+ ${backward_srcdir}/auto_ptr.h \
+ ${backward_srcdir}/backward_warning.h \
+ ${backward_srcdir}/binders.h \
+ ${backward_srcdir}/hash_map \
+ ${backward_srcdir}/hash_set \
+ ${backward_srcdir}/hash_fun.h \
${backward_srcdir}/hashtable.h \
- ${backward_srcdir}/heap.h \
- ${backward_srcdir}/iostream.h \
- ${backward_srcdir}/iterator.h \
- ${backward_srcdir}/list.h \
- ${backward_srcdir}/map.h \
- ${backward_srcdir}/multimap.h \
- ${backward_srcdir}/new.h \
- ${backward_srcdir}/multiset.h \
- ${backward_srcdir}/pair.h \
- ${backward_srcdir}/queue.h \
- ${backward_srcdir}/rope.h \
- ${backward_srcdir}/set.h \
- ${backward_srcdir}/slist.h \
- ${backward_srcdir}/stack.h \
- ${backward_srcdir}/tempbuf.h \
- ${backward_srcdir}/tree.h \
- ${backward_srcdir}/vector.h \
- ${backward_srcdir}/fstream.h \
- ${backward_srcdir}/strstream \
- ${backward_srcdir}/backward_warning.h
+ ${backward_srcdir}/strstream
pb_srcdir = ${glibcxx_srcdir}/include/ext/pb_ds
pb_builddir = ./ext/pb_ds
@@ -615,7 +595,7 @@ pb_headers4 = \
${pb_srcdir}/detail/list_update_policy/counter_lu_policy_imp.hpp \
${pb_srcdir}/detail/list_update_policy/mtf_lu_policy_imp.hpp \
${pb_srcdir}/detail/list_update_policy/sample_update_policy.hpp \
- ${pb_srcdir}/detail/map_debug_base.hpp \
+ ${pb_srcdir}/detail/debug_map_base.hpp \
${pb_srcdir}/detail/ov_tree_map_/cond_dtor.hpp \
${pb_srcdir}/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp \
${pb_srcdir}/detail/ov_tree_map_/debug_fn_imps.hpp \
@@ -750,10 +730,6 @@ ext_headers = \
${ext_srcdir}/stdio_filebuf.h \
${ext_srcdir}/stdio_sync_filebuf.h \
${ext_srcdir}/functional \
- ${ext_srcdir}/hash_map \
- ${ext_srcdir}/hash_set \
- ${ext_srcdir}/hash_fun.h \
- ${ext_srcdir}/hashtable.h \
${ext_srcdir}/iterator \
${ext_srcdir}/malloc_allocator.h \
${ext_srcdir}/memory \
@@ -775,7 +751,12 @@ ext_headers = \
${ext_srcdir}/vstring.h \
${ext_srcdir}/vstring.tcc \
${ext_srcdir}/vstring_fwd.h \
- ${ext_srcdir}/vstring_util.h
+ ${ext_srcdir}/vstring_util.h \
+ ${ext_compat_headers}
+
+ext_compat_headers = \
+ ${backward_srcdir}/hash_set \
+ ${backward_srcdir}/hash_map
tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
@@ -783,6 +764,7 @@ tr1_headers = \
${tr1_srcdir}/array \
${tr1_srcdir}/bessel_function.tcc \
${tr1_srcdir}/beta_function.tcc \
+ ${tr1_srcdir}/boost_sp_shared_count.h \
${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
${tr1_srcdir}/cfenv \
@@ -842,6 +824,7 @@ tr1_impl_builddir = ./tr1_impl
tr1_impl_headers = \
${tr1_impl_srcdir}/array \
${tr1_impl_srcdir}/boost_shared_ptr.h \
+ ${tr1_impl_srcdir}/boost_sp_counted_base.h \
${tr1_impl_srcdir}/cctype \
${tr1_impl_srcdir}/cfenv \
${tr1_impl_srcdir}/cinttypes \
@@ -859,9 +842,7 @@ tr1_impl_headers = \
${tr1_impl_srcdir}/random \
${tr1_impl_srcdir}/random.tcc \
${tr1_impl_srcdir}/regex \
- ${tr1_impl_srcdir}/tuple \
${tr1_impl_srcdir}/type_traits \
- ${tr1_impl_srcdir}/type_traitsfwd.h \
${tr1_impl_srcdir}/unordered_map \
${tr1_impl_srcdir}/unordered_set \
${tr1_impl_srcdir}/utility
@@ -942,18 +923,13 @@ debug_headers = \
${debug_srcdir}/deque \
${debug_srcdir}/formatter.h \
${debug_srcdir}/functions.h \
- ${debug_srcdir}/hash_map \
- ${debug_srcdir}/hash_map.h \
- ${debug_srcdir}/hash_multimap.h \
- ${debug_srcdir}/hash_multiset.h \
- ${debug_srcdir}/hash_set \
- ${debug_srcdir}/hash_set.h \
${debug_srcdir}/list \
${debug_srcdir}/map \
${debug_srcdir}/macros.h \
${debug_srcdir}/map.h \
${debug_srcdir}/multimap.h \
${debug_srcdir}/multiset.h \
+ ${debug_srcdir}/safe_association.h \
${debug_srcdir}/safe_base.h \
${debug_srcdir}/safe_iterator.h \
${debug_srcdir}/safe_iterator.tcc \
@@ -961,8 +937,60 @@ debug_headers = \
${debug_srcdir}/set \
${debug_srcdir}/set.h \
${debug_srcdir}/string \
+ ${debug_srcdir}/unordered_map \
+ ${debug_srcdir}/unordered_set \
${debug_srcdir}/vector
+
+# Parallel mode headers
+parallel_srcdir = ${glibcxx_srcdir}/include/parallel
+parallel_builddir = ./parallel
+parallel_headers = \
+ ${parallel_srcdir}/algorithm \
+ ${parallel_srcdir}/algobase.h \
+ ${parallel_srcdir}/algo.h \
+ ${parallel_srcdir}/algorithm \
+ ${parallel_srcdir}/algorithmfwd.h \
+ ${parallel_srcdir}/balanced_quicksort.h \
+ ${parallel_srcdir}/base.h \
+ ${parallel_srcdir}/basic_iterator.h \
+ ${parallel_srcdir}/checkers.h \
+ ${parallel_srcdir}/compatibility.h \
+ ${parallel_srcdir}/compiletime_settings.h \
+ ${parallel_srcdir}/equally_split.h \
+ ${parallel_srcdir}/features.h \
+ ${parallel_srcdir}/find.h \
+ ${parallel_srcdir}/find_selectors.h \
+ ${parallel_srcdir}/for_each.h \
+ ${parallel_srcdir}/for_each_selectors.h \
+ ${parallel_srcdir}/iterator.h \
+ ${parallel_srcdir}/list_partition.h \
+ ${parallel_srcdir}/losertree.h \
+ ${parallel_srcdir}/merge.h \
+ ${parallel_srcdir}/multiseq_selection.h \
+ ${parallel_srcdir}/multiway_merge.h \
+ ${parallel_srcdir}/multiway_mergesort.h \
+ ${parallel_srcdir}/numeric \
+ ${parallel_srcdir}/numericfwd.h \
+ ${parallel_srcdir}/omp_loop.h \
+ ${parallel_srcdir}/omp_loop_static.h \
+ ${parallel_srcdir}/parallel.h \
+ ${parallel_srcdir}/par_loop.h \
+ ${parallel_srcdir}/partial_sum.h \
+ ${parallel_srcdir}/partition.h \
+ ${parallel_srcdir}/queue.h \
+ ${parallel_srcdir}/quicksort.h \
+ ${parallel_srcdir}/random_number.h \
+ ${parallel_srcdir}/random_shuffle.h \
+ ${parallel_srcdir}/search.h \
+ ${parallel_srcdir}/set_operations.h \
+ ${parallel_srcdir}/settings.h \
+ ${parallel_srcdir}/sort.h \
+ ${parallel_srcdir}/tags.h \
+ ${parallel_srcdir}/types.h \
+ ${parallel_srcdir}/unique_copy.h \
+ ${parallel_srcdir}/workstealing.h
+
@GLIBCXX_C_HEADERS_EXTRA_FALSE@c_base_headers_extra =
# Some of the different "C" header models need extra files.
@@ -981,7 +1009,11 @@ host_headers = \
${host_srcdir}/os_defines.h \
${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \
${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h \
- ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h
+ ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h \
+ ${glibcxx_srcdir}/$(ERROR_CONSTANTS_SRCDIR)/error_constants.h \
+ ${glibcxx_srcdir}/include/precompiled/stdc++.h \
+ ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h \
+ ${glibcxx_srcdir}/include/precompiled/extc++.h
# Non-installed host_header files.
@@ -1032,18 +1064,16 @@ pch_output_dirs = \
pch_output_anchors = \
${pch1_output_anchor} ${pch2_output_anchor} ${pch3_output_anchor}
-PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
+PCHFLAGS = -Winvalid-pch -x c++-header $(CXXFLAGS)
@GLIBCXX_BUILD_PCH_FALSE@pch_build =
@GLIBCXX_BUILD_PCH_TRUE@pch_build = ${pch_output}
-@GLIBCXX_BUILD_PCH_FALSE@pch_install =
-@GLIBCXX_BUILD_PCH_TRUE@pch_install = install-pch
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
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-host
+ stamp-tr1 stamp-tr1-impl stamp-debug stamp-parallel stamp-host
# List of all files that are created by explicit building, editing, or
@@ -1370,6 +1400,15 @@ stamp-debug: ${debug_headers}
fi ;\
$(STAMP) stamp-debug
+stamp-parallel: ${parallel_headers}
+ @if [ ! -d "${parallel_builddir}" ]; then \
+ mkdir -p ${parallel_builddir} ;\
+ fi ;\
+ if [ ! -f stamp-parallel ]; then \
+ (cd ${parallel_builddir} && @LN_S@ $? . || true) ;\
+ fi ;\
+ $(STAMP) stamp-parallel
+
stamp-${host_alias}:
@if [ ! -d ${host_builddir} ]; then \
mkdir -p ${host_builddir} ;\
@@ -1512,7 +1551,7 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
# host_headers_extra are taken out of the build tree staging area;
# the rest are taken from the original source tree.
-@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers ${pch_install}
+@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers
@GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers
# This is a subset of the full install-headers rule. We only need <cstddef>,
@@ -1595,21 +1634,14 @@ install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir}
for file in ${debug_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done
+ $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir}
+ for file in ${parallel_headers}; do \
+ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${parallel_builddir}; done
$(mkinstalldirs) $(DESTDIR)${host_installdir}
for file in ${host_headers} ${host_headers_extra} \
${thread_host_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
-install-pch:
- $(mkinstalldirs) $(DESTDIR)${pch1_output_installdir}
- for file in ${pch1_output_builddir}/*; do \
- $(INSTALL_DATA) $$file $(DESTDIR)${pch1_output_installdir}; done
- $(mkinstalldirs) $(DESTDIR)${pch2_output_installdir}
- for file in ${pch2_output_builddir}/*; do \
- $(INSTALL_DATA) $$file $(DESTDIR)${pch2_output_installdir}; done
- $(INSTALL_DATA) ${pch1_output_anchor} $(DESTDIR)${host_installdir}
- $(INSTALL_DATA) ${pch2_output_anchor} $(DESTDIR)${host_installdir}
-
# To remove directories.
clean-local:
rm -rf ${pch_output_dirs}
diff --git a/libstdc++-v3/include/backward/algo.h b/libstdc++-v3/include/backward/algo.h
deleted file mode 100644
index 247460105a4..00000000000
--- a/libstdc++-v3/include/backward/algo.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGO_H
-#define _BACKWARD_ALGO_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "tempbuf.h"
-#include "iterator.h"
-#include <bits/stl_algo.h>
-#include <bits/stl_numeric.h>
-#include <ext/algorithm>
-#include <ext/numeric>
-
-// Names from <stl_algo.h>
-using std::for_each;
-using std::find;
-using std::find_if;
-using std::adjacent_find;
-using std::count;
-using std::count_if;
-using std::search;
-using std::search_n;
-using std::swap_ranges;
-using std::transform;
-using std::replace;
-using std::replace_if;
-using std::replace_copy;
-using std::replace_copy_if;
-using std::generate;
-using std::generate_n;
-using std::remove;
-using std::remove_if;
-using std::remove_copy;
-using std::remove_copy_if;
-using std::unique;
-using std::unique_copy;
-using std::reverse;
-using std::reverse_copy;
-using std::rotate;
-using std::rotate_copy;
-using std::random_shuffle;
-using std::partition;
-using std::stable_partition;
-using std::sort;
-using std::stable_sort;
-using std::partial_sort;
-using std::partial_sort_copy;
-using std::nth_element;
-using std::lower_bound;
-using std::upper_bound;
-using std::equal_range;
-using std::binary_search;
-using std::merge;
-using std::inplace_merge;
-using std::includes;
-using std::set_union;
-using std::set_intersection;
-using std::set_difference;
-using std::set_symmetric_difference;
-using std::min_element;
-using std::max_element;
-using std::next_permutation;
-using std::prev_permutation;
-using std::find_first_of;
-using std::find_end;
-
-// Names from stl_heap.h
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-// Names from stl_numeric.h
-using std::accumulate;
-using std::inner_product;
-using std::partial_sum;
-using std::adjacent_difference;
-
-// Names from ext/algorithm
-using __gnu_cxx::random_sample;
-using __gnu_cxx::random_sample_n;
-using __gnu_cxx::is_sorted;
-using __gnu_cxx::is_heap;
-using __gnu_cxx::count; // Extension returning void
-using __gnu_cxx::count_if; // Extension returning void
-
-// Names from ext/numeric
-using __gnu_cxx::power;
-using __gnu_cxx::iota;
-
-#endif /* _BACKWARD_ALGO_H */
diff --git a/libstdc++-v3/include/backward/algobase.h b/libstdc++-v3/include/backward/algobase.h
deleted file mode 100644
index 289e9886d1c..00000000000
--- a/libstdc++-v3/include/backward/algobase.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALGOBASE_H
-#define _BACKWARD_ALGOBASE_H 1
-
-#include "backward_warning.h"
-#include "pair.h"
-#include "iterator.h"
-#include <bits/stl_algobase.h>
-#include <bits/stl_uninitialized.h>
-#include <ext/algorithm>
-#include <ext/memory>
-
-// Names from stl_algobase.h
-using std::iter_swap;
-using std::swap;
-using std::min;
-using std::max;
-using std::copy;
-using std::copy_backward;
-using std::fill;
-using std::fill_n;
-using std::mismatch;
-using std::equal;
-using std::lexicographical_compare;
-
-// Names from stl_uninitialized.h
-using std::uninitialized_copy;
-using std::uninitialized_fill;
-using std::uninitialized_fill_n;
-
-// Names from ext/algorithm
-using __gnu_cxx::copy_n;
-using __gnu_cxx::lexicographical_compare_3way;
-
-// Names from ext/memory
-using __gnu_cxx::uninitialized_copy_n;
-
-#endif /* _BACKWARD_ALGOBASE_H */
diff --git a/libstdc++-v3/include/backward/alloc.h b/libstdc++-v3/include/backward/alloc.h
deleted file mode 100644
index 40a0af1f999..00000000000
--- a/libstdc++-v3/include/backward/alloc.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996-1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ALLOC_H
-#define _BACKWARD_ALLOC_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/allocator.h>
-
-using std::allocator;
-
-#endif
diff --git a/libstdc++-v3/include/backward/auto_ptr.h b/libstdc++-v3/include/backward/auto_ptr.h
new file mode 100644
index 00000000000..2787d1a7114
--- /dev/null
+++ b/libstdc++-v3/include/backward/auto_ptr.h
@@ -0,0 +1,297 @@
+// auto_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 backward/auto_ptr.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_AUTO_PTR_H
+#define _STL_AUTO_PTR_H 1
+
+#include <bits/c++config.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * A wrapper class to provide auto_ptr with reference semantics.
+ * For example, an auto_ptr can be assigned (or constructed from)
+ * the result of a function which returns an auto_ptr by value.
+ *
+ * All the auto_ptr_ref stuff should happen behind the scenes.
+ */
+ template<typename _Tp1>
+ struct auto_ptr_ref
+ {
+ _Tp1* _M_ptr;
+
+ explicit
+ auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+
+ /**
+ * @brief A simple smart pointer providing strict ownership semantics.
+ *
+ * The Standard says:
+ * <pre>
+ * An @c auto_ptr owns the object it holds a pointer to. Copying
+ * an @c auto_ptr copies the pointer and transfers ownership to the
+ * destination. If more than one @c auto_ptr owns the same object
+ * at the same time the behavior of the program is undefined.
+ *
+ * The uses of @c auto_ptr include providing temporary
+ * exception-safety for dynamically allocated memory, passing
+ * ownership of dynamically allocated memory to a function, and
+ * returning dynamically allocated memory from a function. @c
+ * auto_ptr does not meet the CopyConstructible and Assignable
+ * requirements for Standard Library <a
+ * href="tables.html#65">container</a> elements and thus
+ * instantiating a Standard Library container with an @c auto_ptr
+ * results in undefined behavior.
+ * </pre>
+ * Quoted from [20.4.5]/3.
+ *
+ * Good examples of what can and cannot be done with auto_ptr can
+ * be found in the libstdc++ testsuite.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * 127. auto_ptr<> conversion issues
+ * These resolutions have all been incorporated.
+ */
+ template<typename _Tp>
+ class auto_ptr
+ {
+ private:
+ _Tp* _M_ptr;
+
+ public:
+ /// The pointed-to type.
+ typedef _Tp element_type;
+
+ /**
+ * @brief An %auto_ptr is usually constructed from a raw pointer.
+ * @param p A pointer (defaults to NULL).
+ *
+ * This object now @e owns the object pointed to by @a p.
+ */
+ explicit
+ auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
+
+ /**
+ * @brief An %auto_ptr can be constructed from another %auto_ptr.
+ * @param a Another %auto_ptr of the same type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership.
+ */
+ auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
+
+ /**
+ * @brief An %auto_ptr can be constructed from another %auto_ptr.
+ * @param a Another %auto_ptr of a different but related type.
+ *
+ * A pointer-to-Tp1 must be convertible to a
+ * pointer-to-Tp/element_type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership.
+ */
+ template<typename _Tp1>
+ auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
+
+ /**
+ * @brief %auto_ptr assignment operator.
+ * @param a Another %auto_ptr of the same type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership. The object that this one @e
+ * used to own and track has been deleted.
+ */
+ auto_ptr&
+ operator=(auto_ptr& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+
+ /**
+ * @brief %auto_ptr assignment operator.
+ * @param a Another %auto_ptr of a different but related type.
+ *
+ * A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership. The object that this one @e
+ * used to own and track has been deleted.
+ */
+ template<typename _Tp1>
+ auto_ptr&
+ operator=(auto_ptr<_Tp1>& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+
+ /**
+ * When the %auto_ptr goes out of scope, the object it owns is
+ * deleted. If it no longer owns anything (i.e., @c get() is
+ * @c NULL), then this has no effect.
+ *
+ * The C++ standard says there is supposed to be an empty throw
+ * specification here, but omitting it is standard conforming. Its
+ * presence can be detected only if _Tp::~_Tp() throws, but this is
+ * prohibited. [17.4.3.6]/2
+ */
+ ~auto_ptr() { delete _M_ptr; }
+
+ /**
+ * @brief Smart pointer dereferencing.
+ *
+ * If this %auto_ptr no longer owns anything, then this
+ * operation will crash. (For a smart pointer, "no longer owns
+ * anything" is the same as being a null pointer, and you know
+ * what happens when you dereference one of those...)
+ */
+ element_type&
+ operator*() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
+
+ /**
+ * @brief Smart pointer dereferencing.
+ *
+ * This returns the pointer itself, which the language then will
+ * automatically cause to be dereferenced.
+ */
+ element_type*
+ operator->() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
+
+ /**
+ * @brief Bypassing the smart pointer.
+ * @return The raw pointer being managed.
+ *
+ * You can get a copy of the pointer that this object owns, for
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
+ *
+ * @note This %auto_ptr still owns the memory.
+ */
+ element_type*
+ get() const throw() { return _M_ptr; }
+
+ /**
+ * @brief Bypassing the smart pointer.
+ * @return The raw pointer being managed.
+ *
+ * You can get a copy of the pointer that this object owns, for
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
+ *
+ * @note This %auto_ptr no longer owns the memory. When this object
+ * goes out of scope, nothing will happen.
+ */
+ element_type*
+ release() throw()
+ {
+ element_type* __tmp = _M_ptr;
+ _M_ptr = 0;
+ return __tmp;
+ }
+
+ /**
+ * @brief Forcibly deletes the managed object.
+ * @param p A pointer (defaults to NULL).
+ *
+ * This object now @e owns the object pointed to by @a p. The
+ * previous object has been deleted.
+ */
+ void
+ reset(element_type* __p = 0) throw()
+ {
+ if (__p != _M_ptr)
+ {
+ delete _M_ptr;
+ _M_ptr = __p;
+ }
+ }
+
+ /**
+ * @brief Automatic conversions
+ *
+ * These operations convert an %auto_ptr into and from an auto_ptr_ref
+ * automatically as needed. This allows constructs such as
+ * @code
+ * auto_ptr<Derived> func_returning_auto_ptr(.....);
+ * ...
+ * auto_ptr<Base> ptr = func_returning_auto_ptr(.....);
+ * @endcode
+ */
+ auto_ptr(auto_ptr_ref<element_type> __ref) throw()
+ : _M_ptr(__ref._M_ptr) { }
+
+ auto_ptr&
+ operator=(auto_ptr_ref<element_type> __ref) throw()
+ {
+ if (__ref._M_ptr != this->get())
+ {
+ delete _M_ptr;
+ _M_ptr = __ref._M_ptr;
+ }
+ return *this;
+ }
+
+ template<typename _Tp1>
+ operator auto_ptr_ref<_Tp1>() throw()
+ { return auto_ptr_ref<_Tp1>(this->release()); }
+
+ template<typename _Tp1>
+ operator auto_ptr<_Tp1>() throw()
+ { return auto_ptr<_Tp1>(this->release()); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 541. shared_ptr template assignment and void
+ template<>
+ class auto_ptr<void>
+ {
+ public:
+ typedef void element_type;
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_AUTO_PTR_H */
diff --git a/libstdc++-v3/include/backward/backward_warning.h b/libstdc++-v3/include/backward/backward_warning.h
index 80eabfe878c..bf8ca86a457 100644
--- a/libstdc++-v3/include/backward/backward_warning.h
+++ b/libstdc++-v3/include/backward/backward_warning.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,11 +29,32 @@
#define _BACKWARD_BACKWARD_WARNING_H 1
#ifdef __DEPRECATED
-#warning This file includes at least one deprecated or antiquated header. \
-Please consider using one of the 32 headers found in section 17.4.1.2 of the \
-C++ standard. Examples include substituting the <X> header for the <X.h> \
-header for C++ includes, or <iostream> instead of the deprecated header \
-<iostream.h>. To disable this warning use -Wno-deprecated.
+#warning \
+ This file includes at least one deprecated or antiquated header which \
+ may be removed without further notice at a future date. Please use a \
+ non-deprecated interface with equivalent functionality instead. For a \
+ listing of replacement headers and interfaces, consult the file \
+ backward_warning.h. To disable this warning use -Wno-deprecated.
+
+/*
+ A list of valid replacements is as follows:
+
+ Use: Instead of:
+ <sstream>, basic_stringbuf <strstream>, strstreambuf
+ <sstream>, basic_istringstream <strstream>, istrstream
+ <sstream>, basic_ostringstream <strstream>, ostrstream
+ <sstream>, basic_stringstream <strstream>, strstream
+ <unordered_set>, unordered_set <ext/hash_set>, hash_set
+ <unordered_set>, unordered_multiset <ext/hash_set>, hash_multiset
+ <unordered_map>, unordered_map <ext/hash_set>, hash_map
+ <unordered_map>, unordered_multimap <ext/hash_set>, hash_multimap
+ <functional>, bind <functional>, binder1st
+ <functional>, bind <functional>, binder2nd
+ <functional>, bind <functional>, bind1st
+ <functional>, bind <functional>, bind2nd
+ <memory>, unique_ptr <memory>, auto_ptr
+*/
+
#endif
#endif
diff --git a/libstdc++-v3/include/backward/binders.h b/libstdc++-v3/include/backward/binders.h
new file mode 100644
index 00000000000..bf16a8af367
--- /dev/null
+++ b/libstdc++-v3/include/backward/binders.h
@@ -0,0 +1,171 @@
+// Functor implementations -*- 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) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file backward/binders.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BINDERS_H
+#define _GLIBCXX_BINDERS_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 20.3.6 binders
+ /** @defgroup s20_3_6_binder Binder Classes
+ * Binders turn functions/functors with two arguments into functors with
+ * a single argument, storing an argument to be applied later. For
+ * example, a variable @c B of type @c binder1st is constructed from a
+ * functor @c f and an argument @c x. Later, B's @c operator() is called
+ * with a single argument @c y. The return value is the value of @c f(x,y).
+ * @c B can be "called" with various arguments (y1, y2, ...) and will in
+ * turn call @c f(x,y1), @c f(x,y2), ...
+ *
+ * The function @c bind1st is provided to save some typing. It takes the
+ * function and an argument as parameters, and returns an instance of
+ * @c binder1st.
+ *
+ * The type @c binder2nd and its creator function @c bind2nd do the same
+ * thing, but the stored argument is passed as the second parameter instead
+ * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
+ * functor whose @c operator() accepts a floating-point number, subtracts
+ * 1.3 from it, and returns the result. (If @c bind1st had been used,
+ * the functor would perform "1.3 - x" instead.
+ *
+ * Creator-wrapper functions like @c bind1st are intended to be used in
+ * calling algorithms. Their return values will be temporary objects.
+ * (The goal is to not require you to type names like
+ * @c std::binder1st<std::plus<int>> for declaring a variable to hold the
+ * return value from @c bind1st(std::plus<int>,5).
+ *
+ * These become more useful when combined with the composition functions.
+ *
+ * @{
+ */
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template<typename _Operation>
+ class binder1st
+ : public unary_function<typename _Operation::second_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::first_argument_type value;
+
+ public:
+ binder1st(const _Operation& __x,
+ const typename _Operation::first_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ typename _Operation::result_type
+ operator()(const typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template<typename _Operation, typename _Tp>
+ inline binder1st<_Operation>
+ bind1st(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::first_argument_type _Arg1_type;
+ return binder1st<_Operation>(__fn, _Arg1_type(__x));
+ }
+
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template<typename _Operation>
+ class binder2nd
+ : public unary_function<typename _Operation::first_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::second_argument_type value;
+
+ public:
+ binder2nd(const _Operation& __x,
+ const typename _Operation::second_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ typename _Operation::result_type
+ operator()(const typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ /// One of the @link s20_3_6_binder binder functors@endlink.
+ template<typename _Operation, typename _Tp>
+ inline binder2nd<_Operation>
+ bind2nd(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::second_argument_type _Arg2_type;
+ return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+ }
+ /** @} */
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_BINDERS_H */
diff --git a/libstdc++-v3/include/backward/bvector.h b/libstdc++-v3/include/backward/bvector.h
deleted file mode 100644
index 9a2c44da144..00000000000
--- a/libstdc++-v3/include/backward/bvector.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_BVECTOR_H
-#define _BACKWARD_BVECTOR_H 1
-
-#include "backward_warning.h"
-#include <vector>
-
-typedef std::vector<bool, std::allocator<bool> > bit_vector;
-
-#endif /* _BACKWARD_BVECTOR_H */
diff --git a/libstdc++-v3/include/backward/complex.h b/libstdc++-v3/include/backward/complex.h
deleted file mode 100644
index 7972cf7303f..00000000000
--- a/libstdc++-v3/include/backward/complex.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_COMPLEX_H
-#define _BACKWARD_COMPLEX_H 1
-
-#include "backward_warning.h"
-#include <complex>
-
-using std::complex;
-typedef complex<float> float_complex;
-typedef complex<double> double_complex;
-typedef complex<long double> long_double_complex;
-
-#endif
diff --git a/libstdc++-v3/include/backward/defalloc.h b/libstdc++-v3/include/backward/defalloc.h
deleted file mode 100644
index ffa9b16828b..00000000000
--- a/libstdc++-v3/include/backward/defalloc.h
+++ /dev/null
@@ -1,117 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-// Inclusion of this file is DEPRECATED. This is the original HP
-// default allocator. It is provided only for backward compatibility.
-// This file WILL BE REMOVED in a future release.
-//
-// DO NOT USE THIS FILE unless you have an old container implementation
-// that requires an allocator with the HP-style interface.
-//
-// Standard-conforming allocators have a very different interface. The
-// standard default allocator is declared in the header <memory>.
-
-#ifndef _BACKWARD_DEFALLOC_H
-#define _BACKWARD_DEFALLOC_H 1
-
-#include "backward_warning.h"
-#include "new.h"
-#include <stddef.h>
-#include <stdlib.h>
-#include <limits.h>
-#include "iostream.h"
-#include "algobase.h"
-
-
-template <class _Tp>
-inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
- set_new_handler(0);
- _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
- if (__tmp == 0) {
- cerr << "out of memory" << endl;
- exit(1);
- }
- return __tmp;
-}
-
-
-template <class _Tp>
-inline void deallocate(_Tp* __buffer) {
- ::operator delete(__buffer);
-}
-
-template <class _Tp>
-class allocator {
-public:
- typedef _Tp value_type;
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- pointer allocate(size_type __n) {
- return ::allocate((difference_type)__n, (pointer)0);
- }
- void deallocate(pointer __p) { ::deallocate(__p); }
- pointer address(reference __x) { return (pointer)&__x; }
- const_pointer const_address(const_reference __x) {
- return (const_pointer)&__x;
- }
- size_type init_page_size() {
- return max(size_type(1), size_type(4096/sizeof(_Tp)));
- }
- size_type max_size() const {
- return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp)));
- }
-};
-
-class allocator<void> {
-public:
- typedef void* pointer;
-};
-
-
-
-#endif /* _BACKWARD_DEFALLOC_H */
diff --git a/libstdc++-v3/include/backward/deque.h b/libstdc++-v3/include/backward/deque.h
deleted file mode 100644
index a4a6b418117..00000000000
--- a/libstdc++-v3/include/backward/deque.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_DEQUE_H
-#define _BACKWARD_DEQUE_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <deque>
-
-using std::deque;
-
-#endif /* _BACKWARD_DEQUE_H */
diff --git a/libstdc++-v3/include/backward/fstream.h b/libstdc++-v3/include/backward/fstream.h
deleted file mode 100644
index 92835f9b844..00000000000
--- a/libstdc++-v3/include/backward/fstream.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_FSTREAM_H
-#define _BACKWARD_FSTREAM_H 1
-
-#include "backward_warning.h"
-#include <fstream>
-
-using std::filebuf;
-using std::ifstream;
-using std::ofstream;
-using std::fstream;
-using std::streampos;
-
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wfilebuf;
-using std::wifstream;
-using std::wofstream;
-using std::wfstream;
-using std::wstreampos;
-#endif
-
-#endif
diff --git a/libstdc++-v3/include/backward/function.h b/libstdc++-v3/include/backward/function.h
deleted file mode 100644
index b5be371d8cd..00000000000
--- a/libstdc++-v3/include/backward/function.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_FUNCTION_H
-#define _BACKWARD_FUNCTION_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <stddef.h>
-#include <bits/stl_function.h>
-#include <ext/functional>
-
-// Names from stl_function.h
-using std::unary_function;
-using std::binary_function;
-using std::plus;
-using std::minus;
-using std::multiplies;
-using std::divides;
-using std::modulus;
-using std::negate;
-using std::equal_to;
-using std::not_equal_to;
-using std::greater;
-using std::less;
-using std::greater_equal;
-using std::less_equal;
-using std::logical_and;
-using std::logical_or;
-using std::logical_not;
-using std::unary_negate;
-using std::binary_negate;
-using std::not1;
-using std::not2;
-using std::binder1st;
-using std::binder2nd;
-using std::bind1st;
-using std::bind2nd;
-using std::pointer_to_unary_function;
-using std::pointer_to_binary_function;
-using std::ptr_fun;
-using std::mem_fun_t;
-using std::const_mem_fun_t;
-using std::mem_fun_ref_t;
-using std::const_mem_fun_ref_t;
-using std::mem_fun1_t;
-using std::const_mem_fun1_t;
-using std::mem_fun1_ref_t;
-using std::const_mem_fun1_ref_t;
-using std::mem_fun;
-using std::mem_fun_ref;
-
-// Names from ext/functional
-using __gnu_cxx::identity_element;
-using __gnu_cxx::unary_compose;
-using __gnu_cxx::binary_compose;
-using __gnu_cxx::compose1;
-using __gnu_cxx::compose2;
-using __gnu_cxx::identity;
-using __gnu_cxx::select1st;
-using __gnu_cxx::select2nd;
-using __gnu_cxx::project1st;
-using __gnu_cxx::project2nd;
-using __gnu_cxx::constant_void_fun;
-using __gnu_cxx::constant_unary_fun;
-using __gnu_cxx::constant_binary_fun;
-using __gnu_cxx::constant0;
-using __gnu_cxx::constant1;
-using __gnu_cxx::constant2;
-using __gnu_cxx::subtractive_rng;
-using __gnu_cxx::mem_fun1;
-using __gnu_cxx::mem_fun1_ref;
-
-#endif /* _BACKWARD_FUNCTION_H */
diff --git a/libstdc++-v3/include/backward/hash_fun.h b/libstdc++-v3/include/backward/hash_fun.h
new file mode 100644
index 00000000000..e6771d77e28
--- /dev/null
+++ b/libstdc++-v3/include/backward/hash_fun.h
@@ -0,0 +1,172 @@
+// 'struct hash' from SGI -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1996-1998
+ * 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 backward/hash_fun.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_FUN_H
+#define _HASH_FUN_H 1
+
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+
+ template<class _Key>
+ struct hash { };
+
+ inline size_t
+ __stl_hash_string(const char* __s)
+ {
+ unsigned long __h = 0;
+ for ( ; *__s; ++__s)
+ __h = 5 * __h + *__s;
+ return size_t(__h);
+ }
+
+ template<>
+ struct hash<char*>
+ {
+ size_t
+ operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<>
+ struct hash<const char*>
+ {
+ size_t
+ operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<>
+ struct hash<char>
+ {
+ size_t
+ operator()(char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned char>
+ {
+ size_t
+ operator()(unsigned char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<signed char>
+ {
+ size_t
+ operator()(unsigned char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<short>
+ {
+ size_t
+ operator()(short __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned short>
+ {
+ size_t
+ operator()(unsigned short __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<int>
+ {
+ size_t
+ operator()(int __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned int>
+ {
+ size_t
+ operator()(unsigned int __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<long>
+ {
+ size_t
+ operator()(long __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned long>
+ {
+ size_t
+ operator()(unsigned long __x) const
+ { return __x; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/backward/hash_map b/libstdc++-v3/include/backward/hash_map
new file mode 100644
index 00000000000..6b10cda6e3f
--- /dev/null
+++ b/libstdc++-v3/include/backward/hash_map
@@ -0,0 +1,595 @@
+// Hashing map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hash_map
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_MAP
+#define _HASH_MAP 1
+
+#include "backward_warning.h"
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Select1st;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp, class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
+ class hash_map
+ {
+ private:
+ typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >,
+ _EqualKey, _Alloc> _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_map()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_map(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_map& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_unique_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ _Tp&
+ operator[](const key_type& __key)
+ { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator==(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator!=(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp,
+ class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>,
+ class _Alloc = allocator<_Tp> >
+ class hash_multimap
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFn, size_t, _Key, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
+ _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multimap()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multimap(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multimap& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_map
+ // and hash_multimap.
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++() { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/backward/hash_map.h b/libstdc++-v3/include/backward/hash_map.h
deleted file mode 100644
index aa1452200a3..00000000000
--- a/libstdc++-v3/include/backward/hash_map.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_MAP_H
-#define _BACKWARD_HASH_MAP_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include <ext/hash_map>
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_map;
-using __gnu_cxx::hash_multimap;
-
-#endif /* _BACKWARD_HASH_MAP_H */
diff --git a/libstdc++-v3/include/backward/hash_set b/libstdc++-v3/include/backward/hash_set
new file mode 100644
index 00000000000..59c88c9e30a
--- /dev/null
+++ b/libstdc++-v3/include/backward/hash_set
@@ -0,0 +1,563 @@
+// Hashing set implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file backward/hash_set
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_SET
+#define _HASH_SET 1
+
+#include "backward_warning.h"
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Identity;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value, class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_set
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_set()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_set(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_set& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_set<_Val, _HF, _EqK, _Al>&,
+ const hash_set<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p = _M_ht.insert_unique(__obj);
+ return pair<iterator,bool>(__p.first, __p.second);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p
+ = _M_ht.insert_unique_noresize(__obj);
+ return pair<iterator, bool>(__p.first, __p.second);
+ }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value,
+ class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_multiset
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multiset()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multiset(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multiset& hs)
+ { _M_ht.swap(hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multiset<_Val, _HF, _EqK, _Al>&,
+ const hash_multiset<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_set
+ // and hash_multiset.
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int) { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/backward/hash_set.h b/libstdc++-v3/include/backward/hash_set.h
deleted file mode 100644
index c2c6e393e42..00000000000
--- a/libstdc++-v3/include/backward/hash_set.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_HASH_SET_H
-#define _BACKWARD_HASH_SET_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include <ext/hash_set>
-
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
-using __gnu_cxx::hash_set;
-using __gnu_cxx::hash_multiset;
-
-#endif /* _BACKWARD_HASH_SET_H */
-
diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
index 7b7511b832c..7efb8ea5b12 100644
--- a/libstdc++-v3/include/backward/hashtable.h
+++ b/libstdc++-v3/include/backward/hashtable.h
@@ -1,6 +1,7 @@
-// Backward-compat support -*- C++ -*-
+// Hashtable implementation used by containers -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -53,20 +54,1077 @@
*
*/
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
+/** @file backward/hashtable.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
*/
-#ifndef _BACKWARD_HASHTABLE_H
-#define _BACKWARD_HASHTABLE_H 1
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
-#include "backward_warning.h"
-#include <ext/hashtable.h>
-#include "algo.h"
-#include "alloc.h"
-#include "vector.h"
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
-using __gnu_cxx::hash;
-using __gnu_cxx::hashtable;
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <bits/stl_function.h>
+#include <backward/hash_fun.h>
-#endif /* _BACKWARD_HASHTABLE_H */
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+ using std::forward_iterator_tag;
+ using std::input_iterator_tag;
+ using std::_Construct;
+ using std::_Destroy;
+ using std::distance;
+ using std::vector;
+ using std::pair;
+ using std::__iterator_category;
+
+ template<class _Val>
+ struct _Hashtable_node
+ {
+ _Hashtable_node* _M_next;
+ _Val _M_val;
+ };
+
+ template<class _Val, class _Key, class _HashFcn, class _ExtractKey,
+ class _EqualKey, class _Alloc = std::allocator<_Val> >
+ class hashtable;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_iterator;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_const_iterator;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_iterator
+ {
+ typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _Val& reference;
+ typedef _Val* pointer;
+
+ _Node* _M_cur;
+ _Hashtable* _M_ht;
+
+ _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) { }
+
+ _Hashtable_iterator() { }
+
+ reference
+ operator*() const
+ { return _M_cur->_M_val; }
+
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ iterator&
+ operator++();
+
+ iterator
+ operator++(int);
+
+ bool
+ operator==(const iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+
+ bool
+ operator!=(const iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+ };
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_const_iterator
+ {
+ typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
+ _ExtractKey,_EqualKey,_Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef const _Val& reference;
+ typedef const _Val* pointer;
+
+ const _Node* _M_cur;
+ const _Hashtable* _M_ht;
+
+ _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) { }
+
+ _Hashtable_const_iterator() { }
+
+ _Hashtable_const_iterator(const iterator& __it)
+ : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
+
+ reference
+ operator*() const
+ { return _M_cur->_M_val; }
+
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ const_iterator&
+ operator++();
+
+ const_iterator
+ operator++(int);
+
+ bool
+ operator==(const const_iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+
+ bool
+ operator!=(const const_iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+ };
+
+ // Note: assumes long is at least 32 bits.
+ enum { _S_num_primes = 28 };
+
+ static const unsigned long __stl_prime_list[_S_num_primes] =
+ {
+ 53ul, 97ul, 193ul, 389ul, 769ul,
+ 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
+ 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
+ 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
+ 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
+ 1610612741ul, 3221225473ul, 4294967291ul
+ };
+
+ inline unsigned long
+ __stl_next_prime(unsigned long __n)
+ {
+ const unsigned long* __first = __stl_prime_list;
+ const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+ const unsigned long* pos = std::lower_bound(__first, __last, __n);
+ return pos == __last ? *(__last - 1) : *pos;
+ }
+
+ // Forward declaration of operator==.
+ template<class _Val, class _Key, class _HF, class _Ex,
+ class _Eq, class _All>
+ class hashtable;
+
+ template<class _Val, class _Key, class _HF, class _Ex,
+ class _Eq, class _All>
+ bool
+ operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
+
+ // Hashtables handle allocators a bit differently than other
+ // containers do. If we're using standard-conforming allocators, then
+ // a hashtable unconditionally has a member variable to hold its
+ // allocator, even if it so happens that all instances of the
+ // allocator type are identical. This is because, for hashtables,
+ // this extra storage is negligible. Additionally, a base class
+ // wouldn't serve any other purposes; it wouldn't, for example,
+ // simplify the exception-handling code.
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ class hashtable
+ {
+ public:
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef _HashFcn hasher;
+ typedef _EqualKey key_equal;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ hasher
+ hash_funct() const
+ { return _M_hash; }
+
+ key_equal
+ key_eq() const
+ { return _M_equals; }
+
+ private:
+ typedef _Hashtable_node<_Val> _Node;
+
+ public:
+ typedef typename _Alloc::template rebind<value_type>::other allocator_type;
+ allocator_type
+ get_allocator() const
+ { return _M_node_allocator; }
+
+ private:
+ typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+ typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+ typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+
+ _Node_Alloc _M_node_allocator;
+
+ _Node*
+ _M_get_node()
+ { return _M_node_allocator.allocate(1); }
+
+ void
+ _M_put_node(_Node* __p)
+ { _M_node_allocator.deallocate(__p, 1); }
+
+ private:
+ hasher _M_hash;
+ key_equal _M_equals;
+ _ExtractKey _M_get_key;
+ _Vector_type _M_buckets;
+ size_type _M_num_elements;
+
+ public:
+ typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>
+ const_iterator;
+
+ friend struct
+ _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
+
+ friend struct
+ _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>;
+
+ public:
+ hashtable(size_type __n, const _HashFcn& __hf,
+ const _EqualKey& __eql, const _ExtractKey& __ext,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+ _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(size_type __n, const _HashFcn& __hf,
+ const _EqualKey& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+ _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(const hashtable& __ht)
+ : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
+ _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
+ _M_buckets(__ht.get_allocator()), _M_num_elements(0)
+ { _M_copy_from(__ht); }
+
+ hashtable&
+ operator= (const hashtable& __ht)
+ {
+ if (&__ht != this)
+ {
+ clear();
+ _M_hash = __ht._M_hash;
+ _M_equals = __ht._M_equals;
+ _M_get_key = __ht._M_get_key;
+ _M_copy_from(__ht);
+ }
+ return *this;
+ }
+
+ ~hashtable()
+ { clear(); }
+
+ size_type
+ size() const
+ { return _M_num_elements; }
+
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ bool
+ empty() const
+ { return size() == 0; }
+
+ void
+ swap(hashtable& __ht)
+ {
+ std::swap(_M_hash, __ht._M_hash);
+ std::swap(_M_equals, __ht._M_equals);
+ std::swap(_M_get_key, __ht._M_get_key);
+ _M_buckets.swap(__ht._M_buckets);
+ std::swap(_M_num_elements, __ht._M_num_elements);
+ }
+
+ iterator
+ begin()
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ iterator
+ end()
+ { return iterator(0, this); }
+
+ const_iterator
+ begin() const
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return const_iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ const_iterator
+ end() const
+ { return const_iterator(0, this); }
+
+ template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
+ class _Al>
+ friend bool
+ operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+ const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+
+ public:
+ size_type
+ bucket_count() const
+ { return _M_buckets.size(); }
+
+ size_type
+ max_bucket_count() const
+ { return __stl_prime_list[(int)_S_num_primes - 1]; }
+
+ size_type
+ elems_in_bucket(size_type __bucket) const
+ {
+ size_type __result = 0;
+ for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
+ __result += 1;
+ return __result;
+ }
+
+ pair<iterator, bool>
+ insert_unique(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_unique_noresize(__obj);
+ }
+
+ iterator
+ insert_equal(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_equal_noresize(__obj);
+ }
+
+ pair<iterator, bool>
+ insert_unique_noresize(const value_type& __obj);
+
+ iterator
+ insert_equal_noresize(const value_type& __obj);
+
+ template<class _InputIterator>
+ void
+ insert_unique(_InputIterator __f, _InputIterator __l)
+ { insert_unique(__f, __l, __iterator_category(__f)); }
+
+ template<class _InputIterator>
+ void
+ insert_equal(_InputIterator __f, _InputIterator __l)
+ { insert_equal(__f, __l, __iterator_category(__f)); }
+
+ template<class _InputIterator>
+ void
+ insert_unique(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_unique(*__f);
+ }
+
+ template<class _InputIterator>
+ void
+ insert_equal(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_equal(*__f);
+ }
+
+ template<class _ForwardIterator>
+ void
+ insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ template<class _ForwardIterator>
+ void
+ insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+
+ reference
+ find_or_insert(const value_type& __obj);
+
+ iterator
+ find(const key_type& __key)
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ _Node* __first;
+ for (__first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ { }
+ return iterator(__first, this);
+ }
+
+ const_iterator
+ find(const key_type& __key) const
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ const _Node* __first;
+ for (__first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ { }
+ return const_iterator(__first, this);
+ }
+
+ size_type
+ count(const key_type& __key) const
+ {
+ const size_type __n = _M_bkt_num_key(__key);
+ size_type __result = 0;
+
+ for (const _Node* __cur = _M_buckets[__n]; __cur;
+ __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), __key))
+ ++__result;
+ return __result;
+ }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key);
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const;
+
+ size_type
+ erase(const key_type& __key);
+
+ void
+ erase(const iterator& __it);
+
+ void
+ erase(iterator __first, iterator __last);
+
+ void
+ erase(const const_iterator& __it);
+
+ void
+ erase(const_iterator __first, const_iterator __last);
+
+ void
+ resize(size_type __num_elements_hint);
+
+ void
+ clear();
+
+ private:
+ size_type
+ _M_next_size(size_type __n) const
+ { return __stl_next_prime(__n); }
+
+ void
+ _M_initialize_buckets(size_type __n)
+ {
+ const size_type __n_buckets = _M_next_size(__n);
+ _M_buckets.reserve(__n_buckets);
+ _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+ _M_num_elements = 0;
+ }
+
+ size_type
+ _M_bkt_num_key(const key_type& __key) const
+ { return _M_bkt_num_key(__key, _M_buckets.size()); }
+
+ size_type
+ _M_bkt_num(const value_type& __obj) const
+ { return _M_bkt_num_key(_M_get_key(__obj)); }
+
+ size_type
+ _M_bkt_num_key(const key_type& __key, size_t __n) const
+ { return _M_hash(__key) % __n; }
+
+ size_type
+ _M_bkt_num(const value_type& __obj, size_t __n) const
+ { return _M_bkt_num_key(_M_get_key(__obj), __n); }
+
+ _Node*
+ _M_new_node(const value_type& __obj)
+ {
+ _Node* __n = _M_get_node();
+ __n->_M_next = 0;
+ try
+ {
+ this->get_allocator().construct(&__n->_M_val, __obj);
+ return __n;
+ }
+ catch(...)
+ {
+ _M_put_node(__n);
+ __throw_exception_again;
+ }
+ }
+
+ void
+ _M_delete_node(_Node* __n)
+ {
+ this->get_allocator().destroy(&__n->_M_val);
+ _M_put_node(__n);
+ }
+
+ void
+ _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+
+ void
+ _M_erase_bucket(const size_type __n, _Node* __last);
+
+ void
+ _M_copy_from(const hashtable& __ht);
+ };
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++()
+ {
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur)
+ {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++(int)
+ {
+ iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++()
+ {
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur)
+ {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++(int)
+ {
+ const_iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ bool
+ operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+ {
+ typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
+
+ if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+ return false;
+
+ for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
+ {
+ _Node* __cur1 = __ht1._M_buckets[__n];
+ _Node* __cur2 = __ht2._M_buckets[__n];
+ // Check same length of lists
+ for (; __cur1 && __cur2;
+ __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+ { }
+ if (__cur1 || __cur2)
+ return false;
+ // Now check one's elements are in the other
+ for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
+ __cur1 = __cur1->_M_next)
+ {
+ bool _found__cur1 = false;
+ for (__cur2 = __ht2._M_buckets[__n];
+ __cur2; __cur2 = __cur2->_M_next)
+ {
+ if (__cur1->_M_val == __cur2->_M_val)
+ {
+ _found__cur1 = true;
+ break;
+ }
+ }
+ if (!_found__cur1)
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline bool
+ operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+ { return !(__ht1 == __ht2); }
+
+ template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
+ class _All>
+ inline void
+ swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+ hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
+ { __ht1.swap(__ht2); }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ insert_unique_noresize(const value_type& __obj)
+ {
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return pair<iterator, bool>(iterator(__cur, this), false);
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return pair<iterator, bool>(iterator(__tmp, this), true);
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ insert_equal_noresize(const value_type& __obj)
+ {
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ {
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __cur->_M_next;
+ __cur->_M_next = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+ }
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ find_or_insert(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+
+ size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return __cur->_M_val;
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return __tmp->_M_val;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ equal_range(const key_type& __key)
+ {
+ typedef pair<iterator, iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (_Node* __first = _M_buckets[__n]; __first;
+ __first = __first->_M_next)
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ for (_Node* __cur = __first->_M_next; __cur;
+ __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(iterator(__first, this), iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(iterator(__first, this),
+ iterator(_M_buckets[__m], this));
+ return _Pii(iterator(__first, this), end());
+ }
+ return _Pii(end(), end());
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ equal_range(const key_type& __key) const
+ {
+ typedef pair<const_iterator, const_iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (const _Node* __first = _M_buckets[__n]; __first;
+ __first = __first->_M_next)
+ {
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ for (const _Node* __cur = __first->_M_next; __cur;
+ __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(const_iterator(__first, this),
+ const_iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(const_iterator(__first, this),
+ const_iterator(_M_buckets[__m], this));
+ return _Pii(const_iterator(__first, this), end());
+ }
+ }
+ return _Pii(end(), end());
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const key_type& __key)
+ {
+ const size_type __n = _M_bkt_num_key(__key);
+ _Node* __first = _M_buckets[__n];
+ size_type __erased = 0;
+
+ if (__first)
+ {
+ _Node* __cur = __first;
+ _Node* __next = __cur->_M_next;
+ while (__next)
+ {
+ if (_M_equals(_M_get_key(__next->_M_val), __key))
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ ++__erased;
+ --_M_num_elements;
+ }
+ else
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ _M_buckets[__n] = __first->_M_next;
+ _M_delete_node(__first);
+ ++__erased;
+ --_M_num_elements;
+ }
+ }
+ return __erased;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const iterator& __it)
+ {
+ _Node* __p = __it._M_cur;
+ if (__p)
+ {
+ const size_type __n = _M_bkt_num(__p->_M_val);
+ _Node* __cur = _M_buckets[__n];
+
+ if (__cur == __p)
+ {
+ _M_buckets[__n] = __cur->_M_next;
+ _M_delete_node(__cur);
+ --_M_num_elements;
+ }
+ else
+ {
+ _Node* __next = __cur->_M_next;
+ while (__next)
+ {
+ if (__next == __p)
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ --_M_num_elements;
+ break;
+ }
+ else
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(iterator __first, iterator __last)
+ {
+ size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
+ : _M_buckets.size();
+
+ size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
+ : _M_buckets.size();
+
+ if (__first._M_cur == __last._M_cur)
+ return;
+ else if (__f_bucket == __l_bucket)
+ _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+ else
+ {
+ _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+ for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+ _M_erase_bucket(__n, 0);
+ if (__l_bucket != _M_buckets.size())
+ _M_erase_bucket(__l_bucket, __last._M_cur);
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const_iterator __first, const_iterator __last)
+ {
+ erase(iterator(const_cast<_Node*>(__first._M_cur),
+ const_cast<hashtable*>(__first._M_ht)),
+ iterator(const_cast<_Node*>(__last._M_cur),
+ const_cast<hashtable*>(__last._M_ht)));
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const const_iterator& __it)
+ { erase(iterator(const_cast<_Node*>(__it._M_cur),
+ const_cast<hashtable*>(__it._M_ht))); }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ resize(size_type __num_elements_hint)
+ {
+ const size_type __old_n = _M_buckets.size();
+ if (__num_elements_hint > __old_n)
+ {
+ const size_type __n = _M_next_size(__num_elements_hint);
+ if (__n > __old_n)
+ {
+ _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
+ try
+ {
+ for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
+ {
+ _Node* __first = _M_buckets[__bucket];
+ while (__first)
+ {
+ size_type __new_bucket = _M_bkt_num(__first->_M_val,
+ __n);
+ _M_buckets[__bucket] = __first->_M_next;
+ __first->_M_next = __tmp[__new_bucket];
+ __tmp[__new_bucket] = __first;
+ __first = _M_buckets[__bucket];
+ }
+ }
+ _M_buckets.swap(__tmp);
+ }
+ catch(...)
+ {
+ for (size_type __bucket = 0; __bucket < __tmp.size();
+ ++__bucket)
+ {
+ while (__tmp[__bucket])
+ {
+ _Node* __next = __tmp[__bucket]->_M_next;
+ _M_delete_node(__tmp[__bucket]);
+ __tmp[__bucket] = __next;
+ }
+ }
+ __throw_exception_again;
+ }
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+ {
+ _Node* __cur = _M_buckets[__n];
+ if (__cur == __first)
+ _M_erase_bucket(__n, __last);
+ else
+ {
+ _Node* __next;
+ for (__next = __cur->_M_next;
+ __next != __first;
+ __cur = __next, __next = __cur->_M_next)
+ ;
+ while (__next != __last)
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ --_M_num_elements;
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_erase_bucket(const size_type __n, _Node* __last)
+ {
+ _Node* __cur = _M_buckets[__n];
+ while (__cur != __last)
+ {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ _M_buckets[__n] = __cur;
+ --_M_num_elements;
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ clear()
+ {
+ for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
+ {
+ _Node* __cur = _M_buckets[__i];
+ while (__cur != 0)
+ {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ }
+ _M_buckets[__i] = 0;
+ }
+ _M_num_elements = 0;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_copy_from(const hashtable& __ht)
+ {
+ _M_buckets.clear();
+ _M_buckets.reserve(__ht._M_buckets.size());
+ _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+ try
+ {
+ for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+ const _Node* __cur = __ht._M_buckets[__i];
+ if (__cur)
+ {
+ _Node* __local_copy = _M_new_node(__cur->_M_val);
+ _M_buckets[__i] = __local_copy;
+
+ for (_Node* __next = __cur->_M_next;
+ __next;
+ __cur = __next, __next = __cur->_M_next)
+ {
+ __local_copy->_M_next = _M_new_node(__next->_M_val);
+ __local_copy = __local_copy->_M_next;
+ }
+ }
+ }
+ _M_num_elements = __ht._M_num_elements;
+ }
+ catch(...)
+ {
+ clear();
+ __throw_exception_again;
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/backward/heap.h b/libstdc++-v3/include/backward/heap.h
deleted file mode 100644
index ef2e68475aa..00000000000
--- a/libstdc++-v3/include/backward/heap.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_HEAP_H
-#define _BACKWARD_HEAP_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/stl_heap.h>
-
-using std::push_heap;
-using std::pop_heap;
-using std::make_heap;
-using std::sort_heap;
-
-#endif /* _BACKWARD_HEAP_H */
diff --git a/libstdc++-v3/include/backward/iomanip.h b/libstdc++-v3/include/backward/iomanip.h
deleted file mode 100644
index a4099a7bec4..00000000000
--- a/libstdc++-v3/include/backward/iomanip.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_IOMANIP_H
-#define _BACKWARD_IOMANIP_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-#include <iomanip>
-
-// These are from <ios> as per [27.4].
-using std::boolalpha;
-using std::noboolalpha;
-using std::showbase;
-using std::noshowbase;
-using std::showpoint;
-using std::noshowpoint;
-using std::showpos;
-using std::noshowpos;
-using std::skipws;
-using std::noskipws;
-using std::uppercase;
-using std::nouppercase;
-using std::internal;
-using std::left;
-using std::right;
-using std::dec;
-using std::hex;
-using std::oct;
-using std::fixed;
-using std::scientific;
-
-// These are from <iomanip> as per [27.6]. Manipulators from <istream>
-// and <ostream> (e.g., endl) are made available via <iostream.h>.
-using std::resetiosflags;
-using std::setiosflags;
-using std::setbase;
-using std::setfill;
-using std::setprecision;
-using std::setw;
-
-#endif
diff --git a/libstdc++-v3/include/backward/iostream.h b/libstdc++-v3/include/backward/iostream.h
deleted file mode 100644
index ed275ffa98d..00000000000
--- a/libstdc++-v3/include/backward/iostream.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_IOSTREAM_H
-#define _BACKWARD_IOSTREAM_H 1
-
-#include "backward_warning.h"
-#include <iostream>
-
-using std::iostream;
-using std::ostream;
-using std::istream;
-using std::ios;
-using std::streambuf;
-
-using std::cout;
-using std::cin;
-using std::cerr;
-using std::clog;
-#ifdef _GLIBCXX_USE_WCHAR_T
-using std::wcout;
-using std::wcin;
-using std::wcerr;
-using std::wclog;
-#endif
-
-using std::ws;
-using std::endl;
-using std::ends;
-using std::flush;
-
-#endif
diff --git a/libstdc++-v3/include/backward/istream.h b/libstdc++-v3/include/backward/istream.h
deleted file mode 100644
index b1c55d18991..00000000000
--- a/libstdc++-v3/include/backward/istream.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_ISTREAM_H
-#define _BACKWARD_ISTREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/iterator.h b/libstdc++-v3/include/backward/iterator.h
deleted file mode 100644
index 89496fb8fff..00000000000
--- a/libstdc++-v3/include/backward/iterator.h
+++ /dev/null
@@ -1,187 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ITERATOR_H
-#define _BACKWARD_ITERATOR_H 1
-
-#include "backward_warning.h"
-#include "function.h"
-#include <stddef.h>
-#include "iostream.h"
-#include <iterator>
-
-#include <bits/stl_construct.h>
-#include <bits/stl_raw_storage_iter.h>
-
-#include <ext/iterator> // For 3-parameter distance extension
-
-// Names from stl_iterator.h
-using std::input_iterator_tag;
-using std::output_iterator_tag;
-using std::forward_iterator_tag;
-using std::bidirectional_iterator_tag;
-using std::random_access_iterator_tag;
-
-#if 0
-using std::iterator;
-#endif
-
-// The base classes input_iterator, output_iterator, forward_iterator,
-// bidirectional_iterator, and random_access_iterator are not part of
-// the C++ standard. (They have been replaced by struct iterator.)
-// They are included for backward compatibility with the HP STL.
-template<typename _Tp, typename _Distance>
- struct input_iterator {
- typedef input_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-struct output_iterator {
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-};
-
-template<typename _Tp, typename _Distance>
- struct forward_iterator {
- typedef forward_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-template<typename _Tp, typename _Distance>
- struct bidirectional_iterator {
- typedef bidirectional_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-template<typename _Tp, typename _Distance>
- struct random_access_iterator {
- typedef random_access_iterator_tag iterator_category;
- typedef _Tp value_type;
- typedef _Distance difference_type;
- typedef _Tp* pointer;
- typedef _Tp& reference;
- };
-
-using std::iterator_traits;
-
-template <class _Iter>
- inline typename iterator_traits<_Iter>::iterator_category
- iterator_category(const _Iter& __i)
- { return __iterator_category(__i); }
-
-template <class _Iter>
- inline typename iterator_traits<_Iter>::difference_type*
- distance_type(const _Iter&)
- { return static_cast<typename iterator_traits<_Iter>::difference_type*>(0); }
-
-template<class _Iter>
- inline typename iterator_traits<_Iter>::value_type*
- value_type(const _Iter& __i)
- { return static_cast<typename iterator_traits<_Iter>::value_type*>(0); }
-
-using std::distance;
-using __gnu_cxx::distance; // 3-parameter extension
-using std::advance;
-
-using std::insert_iterator;
-using std::front_insert_iterator;
-using std::back_insert_iterator;
-using std::inserter;
-using std::front_inserter;
-using std::back_inserter;
-
-using std::reverse_iterator;
-
-using std::istream_iterator;
-using std::ostream_iterator;
-
-// Names from stl_construct.h
-template<class _T1, class _T2>
- inline void
- construct(_T1* __p, const _T2& __value)
- { std::_Construct(__p, __value); }
-
-template<class _T1>
- inline void
- construct(_T1* __p)
- { std::_Construct(__p); }
-
-template <class _Tp>
- inline void
- destroy(_Tp* __pointer)
- { std::_Destroy(__pointer); }
-
-template <class _ForwardIterator>
- inline void
- destroy(_ForwardIterator __first, _ForwardIterator __last)
- { std::_Destroy(__first, __last); }
-
-
-// Names from stl_raw_storage_iter.h
-using std::raw_storage_iterator;
-
-#endif /* _BACKWARD_ITERATOR_H */
diff --git a/libstdc++-v3/include/backward/list.h b/libstdc++-v3/include/backward/list.h
deleted file mode 100644
index d70a6e4ae7d..00000000000
--- a/libstdc++-v3/include/backward/list.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_LIST_H
-#define _BACKWARD_LIST_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <list>
-
-using std::list;
-
-#endif /* _BACKWARD_LIST_H */
diff --git a/libstdc++-v3/include/backward/map.h b/libstdc++-v3/include/backward/map.h
deleted file mode 100644
index 2ff3cec667e..00000000000
--- a/libstdc++-v3/include/backward/map.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MAP_H
-#define _BACKWARD_MAP_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <map>
-
-using std::map;
-
-#endif /* _BACKWARD_MAP_H */
diff --git a/libstdc++-v3/include/backward/multimap.h b/libstdc++-v3/include/backward/multimap.h
deleted file mode 100644
index 515d2995049..00000000000
--- a/libstdc++-v3/include/backward/multimap.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MULTIMAP_H
-#define _BACKWARD_MULTIMAP_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <map>
-
-using std::multimap;
-
-#endif /* _BACKWARD_MULTIMAP_H */
diff --git a/libstdc++-v3/include/backward/multiset.h b/libstdc++-v3/include/backward/multiset.h
deleted file mode 100644
index 1f857ae6eb0..00000000000
--- a/libstdc++-v3/include/backward/multiset.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_MULTISET_H
-#define _BACKWARD_MULTISET_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <set>
-
-using std::multiset;
-
-#endif /* _BACKWARD_MULTISET_H */
diff --git a/libstdc++-v3/include/backward/new.h b/libstdc++-v3/include/backward/new.h
deleted file mode 100644
index 9cfbab27fe6..00000000000
--- a/libstdc++-v3/include/backward/new.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*- forwarding header.
-// Copyright (C) 2000 Free Software Foundation
-
-// This file is part of GCC.
-//
-// GCC is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// GCC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with GCC; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_NEW_H
-#define _BACKWARD_NEW_H 1
-
-#include "backward_warning.h"
-#include <new>
-
-using std::bad_alloc;
-using std::nothrow_t;
-using std::nothrow;
-using std::new_handler;
-using std::set_new_handler;
-
-#endif
diff --git a/libstdc++-v3/include/backward/ostream.h b/libstdc++-v3/include/backward/ostream.h
deleted file mode 100644
index 07ef9b0f2b3..00000000000
--- a/libstdc++-v3/include/backward/ostream.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_OSTREAM_H
-#define _BACKWARD_OSTREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/pair.h b/libstdc++-v3/include/backward/pair.h
deleted file mode 100644
index 4985bcbfdd2..00000000000
--- a/libstdc++-v3/include/backward/pair.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_PAIR_H
-#define _BACKWARD_PAIR_H 1
-
-#include "backward_warning.h"
-#include <bits/c++config.h>
-#include <bits/stl_pair.h>
-
-using std::pair;
-using std::make_pair;
-
-#endif /* _BACKWARD_PAIR_H */
diff --git a/libstdc++-v3/include/backward/queue.h b/libstdc++-v3/include/backward/queue.h
deleted file mode 100644
index da7505c28d1..00000000000
--- a/libstdc++-v3/include/backward/queue.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_QUEUE_H
-#define _BACKWARD_QUEUE_H 1
-
-#include "backward_warning.h"
-#include <queue>
-
-using std::queue;
-using std::priority_queue;
-
-#endif
diff --git a/libstdc++-v3/include/backward/rope.h b/libstdc++-v3/include/backward/rope.h
deleted file mode 100644
index 71e88153267..00000000000
--- a/libstdc++-v3/include/backward/rope.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_ROPE_H
-#define _BACKWARD_ROPE_H 1
-
-#include "backward_warning.h"
-#include "hashtable.h"
-#include <ext/rope>
-
-using __gnu_cxx::char_producer;
-using __gnu_cxx::sequence_buffer;
-using __gnu_cxx::rope;
-using __gnu_cxx::crope;
-using __gnu_cxx::wrope;
-
-#endif /* _BACKWARD_ROPE_H */
diff --git a/libstdc++-v3/include/backward/set.h b/libstdc++-v3/include/backward/set.h
deleted file mode 100644
index 3c6a390cf49..00000000000
--- a/libstdc++-v3/include/backward/set.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_SET_H
-#define _BACKWARD_SET_H 1
-
-#include "backward_warning.h"
-#include "tree.h"
-#include <set>
-
-using std::set;
-
-#endif /* _BACKWARD_SET_H */
diff --git a/libstdc++-v3/include/backward/slist.h b/libstdc++-v3/include/backward/slist.h
deleted file mode 100644
index 9b9a43d3f0d..00000000000
--- a/libstdc++-v3/include/backward/slist.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_SLIST_H
-#define _BACKWARD_SLIST_H 1
-
-#include "backward_warning.h"
-#include <ext/slist>
-
-using __gnu_cxx::slist;
-
-#endif /* _BACKWARD_SLIST_H */
diff --git a/libstdc++-v3/include/backward/stack.h b/libstdc++-v3/include/backward/stack.h
deleted file mode 100644
index 07df41769e0..00000000000
--- a/libstdc++-v3/include/backward/stack.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_STACK_H
-#define _BACKWARD_STACK_H 1
-
-#include "backward_warning.h"
-#include "vector.h"
-#include "deque.h"
-#include "heap.h"
-#include "queue.h"
-#include <stack>
-
-using std::stack;
-
-#endif /* _BACKWARD_STACK_H */
diff --git a/libstdc++-v3/include/backward/stream.h b/libstdc++-v3/include/backward/stream.h
deleted file mode 100644
index c137601e676..00000000000
--- a/libstdc++-v3/include/backward/stream.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_STREAM_H
-#define _BACKWARD_STREAM_H 1
-
-#include "backward_warning.h"
-#include "iostream.h"
-
-#endif
diff --git a/libstdc++-v3/include/backward/streambuf.h b/libstdc++-v3/include/backward/streambuf.h
deleted file mode 100644
index bac24495a05..00000000000
--- a/libstdc++-v3/include/backward/streambuf.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2000 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#ifndef _BACKWARD_STREAMBUF_H
-#define _BACKWARD_STREAMBUF_H 1
-
-#include "backward_warning.h"
-#include <streambuf>
-
-using std::streambuf;
-
-#endif
diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream
index d0d5a13863f..18617419c35 100644
--- a/libstdc++-v3/include/backward/strstream
+++ b/libstdc++-v3/include/backward/strstream
@@ -42,11 +42,11 @@
// WARNING: The classes defined in this header are DEPRECATED. This
// header is defined in section D.7.1 of the C++ standard, and it
-// MAY BE REMOVED in a future standard revision. You should use the
+// MAY BE REMOVED in a future standard revision. One should use the
// header <sstream> instead.
-#ifndef __SGI_STL_STRSTREAM
-#define __SGI_STL_STRSTREAM
+#ifndef _GLIBCXX_STRSTREAM
+#define _GLIBCXX_STRSTREAM
#include "backward_warning.h"
#include <iosfwd>
diff --git a/libstdc++-v3/include/backward/tempbuf.h b/libstdc++-v3/include/backward/tempbuf.h
deleted file mode 100644
index af6e57daa3b..00000000000
--- a/libstdc++-v3/include/backward/tempbuf.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_TEMPBUF_H
-#define _BACKWARD_TEMPBUF_H 1
-
-#include "backward_warning.h"
-#include "pair.h"
-#include "iterator.h"
-#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <bits/cpp_type_traits.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <ext/memory>
-
-using std::get_temporary_buffer;
-using std::return_temporary_buffer;
-using __gnu_cxx::temporary_buffer;
-
-#endif /* _BACKWARD_TEMPBUF_H */
diff --git a/libstdc++-v3/include/backward/tree.h b/libstdc++-v3/include/backward/tree.h
deleted file mode 100644
index 88a2f1d7c82..00000000000
--- a/libstdc++-v3/include/backward/tree.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _BACKWARD_TREE
-#define _BACKWARD_TREE 1
-
-#include "backward_warning.h"
-#include <ext/rb_tree>
-
-using __gnu_cxx::rb_tree;
-
-#endif
diff --git a/libstdc++-v3/include/backward/vector.h b/libstdc++-v3/include/backward/vector.h
deleted file mode 100644
index 8cd8dd0f360..00000000000
--- a/libstdc++-v3/include/backward/vector.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Backward-compat support -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _BACKWARD_VECTOR_H
-#define _BACKWARD_VECTOR_H 1
-
-#include "backward_warning.h"
-#include "algobase.h"
-#include "alloc.h"
-#include <vector>
-
-using std::vector;
-
-#endif /* _BACKWARD_VECTOR_H */
diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h
new file mode 100644
index 00000000000..116e0b25e21
--- /dev/null
+++ b/libstdc++-v3/include/bits/algorithmfwd.h
@@ -0,0 +1,653 @@
+// <algorithm> declarations -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+/** @file bits/algorithmfwd.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+/*
+ adjacent_find
+ binary_search
+ copy
+ copy_backward
+ count
+ count_if
+ equal
+ equal_range
+ fill
+ fill_n
+ find
+ find_end
+ find_first_of
+ find_if
+ for_each
+ generate
+ generate_n
+ includes
+ inplace_merge
+ is_heap (C++0x)
+ is_heap_until (C++0x)
+ is_sorted (C++0x)
+ is_sorted_until (C++0x)
+ iter_swap
+ lexicographical_compare
+ lower_bound
+ make_heap
+ max
+ max_element
+ merge
+ min
+ min_element
+ minmax (C++0x)
+ minmax_element (C++0x)
+ mismatch
+ next_permutation
+ nth_element
+ partial_sort
+ partial_sort_copy
+ partition
+ pop_heap
+ prev_permutation
+ push_heap
+ random_shuffle
+ remove
+ remove_copy
+ remove_copy_if
+ remove_if
+ replace
+ replace_copy
+ replace_copy_if
+ replace_if
+ reverse
+ reverse_copy
+ rotate
+ rotate_copy
+ search
+ search_n
+ set_difference
+ set_intersection
+ set_symmetric_difference
+ set_union
+ sort
+ sort_heap
+ stable_partition
+ stable_sort
+ swap
+ swap_ranges
+ transform
+ unique
+ unique_copy
+ upper_bound
+*/
+
+#ifndef _GLIBCXX_ALGORITHMFWD_H
+#define _GLIBCXX_ALGORITHMFWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // adjacent_find
+
+ template<typename _FIter, typename _Tp>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ copy(_IIter, _IIter, _OIter);
+
+ template<typename _BIter1, typename _BIter2>
+ _BIter2
+ copy_backward(_BIter1, _BIter1, _BIter2);
+
+ // count
+ // count_if
+
+ template<typename _FIter, typename _Tp>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _FIter, typename _Tp>
+ void
+ fill(_FIter, _FIter, const _Tp&);
+
+/*
+ XXX NB: return type different from ISO C++.
+ template<typename _OIter, typename _Size, typename _Tp>
+ void
+ fill_n(_OIter, _Size, const _Tp&);
+*/
+
+ template<typename _OIter, typename _Size, typename _Tp>
+ _OIter
+ fill_n(_OIter, _Size, const _Tp&);
+
+ // find
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ // find_first_of
+ // find_if
+ // for_each
+ // generate
+ // generate_n
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+ template<typename _BIter>
+ void
+ inplace_merge(_BIter, _BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ void
+ inplace_merge(_BIter, _BIter, _BIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _RAIter>
+ bool
+ is_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ bool
+ is_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter, _Compare);
+
+ template<typename _FIter>
+ bool
+ is_sorted(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ bool
+ is_sorted(_FIter, _FIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ is_sorted_until(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ is_sorted_until(_FIter, _FIter, _Compare);
+#endif
+
+ template<typename _FIter1, typename _FIter2>
+ void
+ iter_swap(_FIter1, _FIter2);
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _RAIter>
+ void
+ make_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ make_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _Tp>
+ const _Tp&
+ max(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ max(const _Tp&, const _Tp&, _Compare);
+
+ // max_element
+ // merge
+
+ template<typename _Tp>
+ const _Tp&
+ min(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ min(const _Tp&, const _Tp&, _Compare);
+
+ // min_element
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&, _Compare);
+
+ template<typename _FIter>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter, _Compare);
+#endif
+
+ // mismatch
+
+ template<typename _BIter>
+ bool
+ next_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ next_permutation(_BIter, _BIter, _Compare);
+
+ // nth_element
+ // partial_sort
+
+ template<typename _IIter, typename _RAIter>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
+
+ template<typename _IIter, typename _RAIter, typename _Compare>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ pop_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ pop_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _BIter>
+ bool
+ prev_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ prev_permutation(_BIter, _BIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ push_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ push_heap(_RAIter, _RAIter, _Compare);
+
+ // random_shuffle
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ remove(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Predicate>
+ _FIter
+ remove_if(_FIter, _FIter, _Predicate);
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ remove_copy(_IIter, _IIter, _OIter, const _Tp&);
+
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+ // replace
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
+
+ template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
+ _OIter
+ replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
+
+ // replace_if
+
+ template<typename _BIter>
+ void
+ reverse(_BIter, _BIter);
+
+ template<typename _BIter, typename _OIter>
+ _OIter
+ reverse_copy(_BIter, _BIter, _OIter);
+
+ template<typename _FIter>
+ void
+ rotate(_FIter, _FIter, _FIter);
+
+ template<typename _FIter, typename _OIter>
+ _OIter
+ rotate_copy(_FIter, _FIter, _FIter, _OIter);
+
+ // search
+ // search_n
+ // set_difference
+ // set_intersection
+ // set_symmetric_difference
+ // set_union
+
+ template<typename _RAIter>
+ void
+ sort_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ stable_partition(_BIter, _BIter, _Predicate);
+
+ template<typename _Tp>
+ void
+ swap(_Tp&, _Tp&);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter2
+ swap_ranges(_FIter1, _FIter1, _FIter2);
+
+ // transform
+
+ template<typename _FIter>
+ _FIter
+ unique(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ unique(_FIter, _FIter, _BinaryPredicate);
+
+ // unique_copy
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ template<typename _FIter>
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ adjacent_find(_FIter, _FIter, _BinaryPredicate);
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&);
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ equal(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _IIter, typename _Tp>
+ _IIter
+ find(_IIter, _IIter, const _Tp&);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter, typename _Funct>
+ _Funct
+ for_each(_IIter, _IIter, _Funct);
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator);
+
+/*
+ XXX NB: return type different from ISO C++.
+ template<typename _OIter, typename _Size, typename _Tp>
+ void
+ generate_n(_OIter, _Size, _Generator);
+*/
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ _OIter
+ generate_n(_OIter, _Size, _Generator);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _RAIter>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ partition(_BIter, _BIter, _Predicate);
+
+ template<typename _RAIter>
+ void
+ random_shuffle(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Generator>
+ void
+ random_shuffle(_RAIter, _RAIter, _Generator&);
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&);
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _FIter, typename _Size, typename _Tp>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&);
+
+ template<typename _FIter, typename _Size, typename _Tp,
+ typename _BinaryPredicate>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
+ _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ stable_sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ stable_sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _IIter, typename _OIter, typename _UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, _UnaryOperation);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BinaryOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter);
+
+ template<typename _IIter, typename _OIter, typename _BinaryPredicate>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#ifdef _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# include <parallel/algorithmfwd.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index e233430e54f..8a0d0eec887 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -113,11 +113,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator==(const allocator<_T1>&, const allocator<_T2>&)
{ return true; }
+ template<typename _Tp>
+ inline bool
+ operator==(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return true; }
+
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
{ return false; }
+ template<typename _Tp>
+ inline bool
+ operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return false; }
+
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
@@ -146,6 +156,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
};
+ // Optimize for stateless allocators.
+ template<typename _Alloc, bool = __is_empty(_Alloc)>
+ struct __alloc_neq
+ {
+ static bool
+ _S_do_it(const _Alloc&, const _Alloc&)
+ { return false; }
+ };
+
+ template<typename _Alloc>
+ struct __alloc_neq<_Alloc, false>
+ {
+ static bool
+ _S_do_it(const _Alloc& __one, const _Alloc& __two)
+ { return __one != __two; }
+ };
+
_GLIBCXX_END_NAMESPACE
#endif
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index ea9c0dc6565..66d90f62b23 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -1,7 +1,7 @@
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -81,9 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@{
/**
- * @if maint
* These are non-standard types.
- * @endif
*/
typedef ctype<_CharT> __ctype_type;
typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
@@ -227,7 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* in the error flags, then an exception of type
* std::ios_base::failure is thrown.
*
- * If the error flage is already set when the exceptions mask is
+ * If the error flag is already set when the exceptions mask is
* added, the exception is immediately thrown. Try running the
* following under GCC 3.1 or later:
* @code
@@ -357,7 +355,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
copyfmt(const basic_ios& __rhs);
/**
- * @brief Retreives the "empty" character.
+ * @brief Retrieves the "empty" character.
* @return The current fill character.
*
* It defaults to a space (' ') in the current locale.
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 2dc3b37253e..d78e512ee34 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -1,7 +1,7 @@
// Components for manipulating sequences of characters -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,7 +64,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @doctodo
*
*
- * @if maint
* Documentation? What's that?
* Nathan Myers <ncm@cantrip.org>.
*
@@ -104,7 +103,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* All but the last paragraph is considered pretty conventional
* for a C++ string implementation.
- * @endif
*/
// 21.3 Template class basic_string
template<typename _CharT, typename _Traits, typename _Alloc>
@@ -1686,7 +1684,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find position of a character of C substring.
* @param s String containing characters to locate.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to search for.
* @return Index of first occurrence.
*
@@ -1747,7 +1745,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character of C substring.
* @param s C string containing characters to locate.
- * @param pos Index of character to search back from (default end).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to search for.
* @return Index of last occurrence.
*
@@ -1778,7 +1776,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character.
* @param c Character to locate.
- * @param pos Index of character to search back from (default 0).
+ * @param pos Index of character to search back from (default end).
* @return Index of last occurrence.
*
* Starting from @a pos, searches backward for @a c within this string.
@@ -1808,7 +1806,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to consider.
* @return Index of first occurrence.
*
@@ -1853,8 +1851,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character not in string.
* @param str String containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a str within this string. If found, returns the index
@@ -1867,9 +1865,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to consider.
- * @return Index of first occurrence.
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in the first @a n characters of @a s within this string.
@@ -1880,10 +1878,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
/**
- * @brief Find position of a character not in C string.
+ * @brief Find last position of a character not in C string.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a s within this string. If found, returns the index
@@ -1899,8 +1897,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Find last position of a different character.
* @param c Character to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character other than
* @a c within this string. If found, returns the index where it was
diff --git a/libstdc++-v3/include/bits/boost_concept_check.h b/libstdc++-v3/include/bits/boost_concept_check.h
index 3d8fe753987..83555fd7268 100644
--- a/libstdc++-v3/include/bits/boost_concept_check.h
+++ b/libstdc++-v3/include/bits/boost_concept_check.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -48,7 +48,6 @@
#include <cstddef> // for ptrdiff_t, used next
#include <bits/stl_iterator_base_types.h> // for traits and tags
-#include <utility> // for pair<>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -784,146 +783,6 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
typename _BackInsertionSequence::value_type __t;
};
- template <class _AssociativeContainer>
- struct _AssociativeContainerConcept
- {
- void __constraints() {
- __function_requires< _ForwardContainerConcept<_AssociativeContainer> >();
- __function_requires<
- _DefaultConstructibleConcept<_AssociativeContainer> >();
-
- __i = __c.find(__k);
- __r = __c.equal_range(__k);
- __c.erase(__k);
- __c.erase(__i);
- __c.erase(__r.first, __r.second);
- __const_constraints(__c);
- }
- void __const_constraints(const _AssociativeContainer& __c) {
- __ci = __c.find(__k);
- __n = __c.count(__k);
- __cr = __c.equal_range(__k);
- }
- typedef typename _AssociativeContainer::iterator _Iterator;
- typedef typename _AssociativeContainer::const_iterator _Const_iterator;
-
- _AssociativeContainer __c;
- _Iterator __i;
- std::pair<_Iterator,_Iterator> __r;
- _Const_iterator __ci;
- std::pair<_Const_iterator,_Const_iterator> __cr;
- typename _AssociativeContainer::key_type __k;
- typename _AssociativeContainer::size_type __n;
- };
-
- template <class _UniqueAssociativeContainer>
- struct _UniqueAssociativeContainerConcept
- {
- void __constraints() {
- __function_requires<
- _AssociativeContainerConcept<_UniqueAssociativeContainer> >();
-
- _UniqueAssociativeContainer __c(__first, __last);
-
- __pos_flag = __c.insert(__t);
- __c.insert(__first, __last);
- }
- std::pair<typename _UniqueAssociativeContainer::iterator, bool> __pos_flag;
- typename _UniqueAssociativeContainer::value_type __t;
- typename _UniqueAssociativeContainer::value_type *__first, *__last;
- };
-
- template <class _MultipleAssociativeContainer>
- struct _MultipleAssociativeContainerConcept
- {
- void __constraints() {
- __function_requires<
- _AssociativeContainerConcept<_MultipleAssociativeContainer> >();
-
- _MultipleAssociativeContainer __c(__first, __last);
-
- __pos = __c.insert(__t);
- __c.insert(__first, __last);
-
- }
- typename _MultipleAssociativeContainer::iterator __pos;
- typename _MultipleAssociativeContainer::value_type __t;
- typename _MultipleAssociativeContainer::value_type *__first, *__last;
- };
-
- template <class _SimpleAssociativeContainer>
- struct _SimpleAssociativeContainerConcept
- {
- void __constraints() {
- __function_requires<
- _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
- typedef typename _SimpleAssociativeContainer::key_type _Key_type;
- typedef typename _SimpleAssociativeContainer::value_type _Value_type;
- typedef typename _Aux_require_same<_Key_type, _Value_type>::_Type
- _Required;
- }
- };
-
- template <class _SimpleAssociativeContainer>
- struct _PairAssociativeContainerConcept
- {
- void __constraints() {
- __function_requires<
- _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
- typedef typename _SimpleAssociativeContainer::key_type _Key_type;
- typedef typename _SimpleAssociativeContainer::value_type _Value_type;
- typedef typename _SimpleAssociativeContainer::mapped_type _Mapped_type;
- typedef std::pair<const _Key_type, _Mapped_type> _Required_value_type;
- typedef typename _Aux_require_same<_Value_type,
- _Required_value_type>::_Type _Required;
- }
- };
-
- template <class _SortedAssociativeContainer>
- struct _SortedAssociativeContainerConcept
- {
- void __constraints() {
- __function_requires<
- _AssociativeContainerConcept<_SortedAssociativeContainer> >();
- __function_requires<
- _ReversibleContainerConcept<_SortedAssociativeContainer> >();
-
- _SortedAssociativeContainer
- __c _IsUnused(__kc),
- __c2 _IsUnused(__first, __last),
- __c3 _IsUnused(__first, __last, __kc);
-
- __p = __c.upper_bound(__k);
- __p = __c.lower_bound(__k);
- __r = __c.equal_range(__k);
-
- __c.insert(__p, __t);
- }
- void __const_constraints(const _SortedAssociativeContainer& __c) {
- __kc = __c.key_comp();
- __vc = __c.value_comp();
-
- __cp = __c.upper_bound(__k);
- __cp = __c.lower_bound(__k);
- __cr = __c.equal_range(__k);
- }
- typename _SortedAssociativeContainer::key_compare __kc;
- typename _SortedAssociativeContainer::value_compare __vc;
- typename _SortedAssociativeContainer::value_type __t;
- typename _SortedAssociativeContainer::key_type __k;
- typedef typename _SortedAssociativeContainer::iterator _Iterator;
- typedef typename _SortedAssociativeContainer::const_iterator
- _Const_iterator;
-
- _Iterator __p;
- _Const_iterator __cp;
- std::pair<_Iterator,_Iterator> __r;
- std::pair<_Const_iterator,_Const_iterator> __cr;
- typename _SortedAssociativeContainer::value_type *__first, *__last;
- };
-
- // HashedAssociativeContainer
-
_GLIBCXX_END_NAMESPACE
#undef _IsUnused
diff --git a/libstdc++-v3/include/bits/boost_sp_shared_count.h b/libstdc++-v3/include/bits/boost_sp_shared_count.h
new file mode 100644
index 00000000000..75ee16d8eb2
--- /dev/null
+++ b/libstdc++-v3/include/bits/boost_sp_shared_count.h
@@ -0,0 +1,378 @@
+// <bits/boost_sp_shared_count.h> -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file bits/boost_sp_shared_count.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+namespace std
+{
+ // counted ptr with no deleter or allocator support
+ template<typename _Ptr, _Lock_policy _Lp>
+ class _Sp_counted_ptr
+ : public _Sp_counted_base<_Lp>
+ {
+ public:
+ _Sp_counted_ptr(_Ptr __p)
+ : _M_ptr(__p) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { delete _M_ptr; }
+
+ virtual void
+ _M_destroy() // nothrow
+ { delete this; }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return 0; }
+
+ private:
+ _Sp_counted_ptr(const _Sp_counted_ptr&);
+ _Sp_counted_ptr& operator=(const _Sp_counted_ptr&);
+
+ protected:
+ _Ptr _M_ptr; // copy constructor must not throw
+ };
+
+ // support for custom deleter and/or allocator
+ template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_deleter
+ : public _Sp_counted_ptr<_Ptr, _Lp>
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_deleter>::other _My_alloc_type;
+
+ // Helper class that stores the Deleter and also acts as an allocator.
+ // Used to dispose of the owned pointer and the internal refcount
+ // Requires that copies of _Alloc can free each other's memory.
+ struct _My_Deleter
+ : public _My_alloc_type // copy constructor must not throw
+ {
+ _Deleter _M_del; // copy constructor must not throw
+ _My_Deleter(_Deleter __d, const _Alloc& __a)
+ : _My_alloc_type(__a), _M_del(__d) { }
+ };
+
+ protected:
+ typedef _Sp_counted_ptr<_Ptr, _Lp> _Base_type;
+
+ public:
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d)
+ : _Base_type(__p), _M_del(__d, _Alloc()) { }
+
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
+ : _Base_type(__p), _M_del(__d, __a) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { _M_del._M_del(_Base_type::_M_ptr); }
+
+ virtual void
+ _M_destroy() // nothrow
+ {
+ _My_alloc_type __a(_M_del);
+ this->~_Sp_counted_deleter();
+ __a.deallocate(this, 1);
+ }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; }
+
+ private:
+ _Sp_counted_deleter(const _Sp_counted_deleter&);
+ _Sp_counted_deleter& operator=(const _Sp_counted_deleter&);
+
+ protected:
+ _My_Deleter _M_del; // copy constructor must not throw
+ };
+
+ // helpers for make_shared / allocate_shared
+
+ template<typename _Tp>
+ struct _Sp_destroy_inplace
+ {
+ void operator()(_Tp* __p) const { if (__p) __p->~_Tp(); }
+ };
+
+ struct _Sp_make_shared_tag { };
+
+ template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_ptr_inplace
+ : public _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ {
+ typedef _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ _Base_type;
+
+ public:
+ _Sp_counted_ptr_inplace(_Alloc __a)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ template<typename... _Args>
+ _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(std::forward<_Args>(__args)...); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ // override because the allocator needs to know the dynamic type
+ virtual void
+ _M_destroy() // nothrow
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
+ _My_alloc_type __a(_Base_type::_M_del);
+ this->~_Sp_counted_ptr_inplace();
+ __a.deallocate(this, 1);
+ }
+
+ // sneaky trick so __shared_ptr can get the managed pointer
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ {
+ return __ti == typeid(_Sp_make_shared_tag)
+ ? static_cast<void*>(&_M_storage)
+ : _Base_type::_M_get_deleter(__ti);
+ }
+
+ private:
+ typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type
+ _M_storage;
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __weak_count;
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __shared_count
+ {
+ public:
+ __shared_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ template<typename _Ptr>
+ __shared_count(_Ptr __p) : _M_pi(0)
+ {
+ try
+ {
+ _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
+ }
+ catch(...)
+ {
+ delete __p;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter>
+ __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+ {
+ // allocator's value_type doesn't matter, will rebind it anyway
+ typedef std::allocator<int> _Alloc;
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef std::allocator<_Sp_cd_type> _Alloc2;
+ _Alloc2 __a2;
+ try
+ {
+ _M_pi = __a2.allocate(1);
+ new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
+ }
+ catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter, typename _Alloc>
+ __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
+ {
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ try
+ {
+ _M_pi = __a2.allocate(1);
+ new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
+ }
+ catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ __shared_count(_Sp_make_shared_tag, _Tp*, _Alloc __a, _Args&&... __args)
+ : _M_pi(0)
+ {
+ typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
+ typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ try
+ {
+ _M_pi = __a2.allocate(1);
+ new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
+ std::forward<_Args>(__args)...);
+ }
+ catch(...)
+ {
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+#if _GLIBCXX_DEPRECATED
+ // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+ template<typename _Tp>
+ explicit
+ __shared_count(std::auto_ptr<_Tp>& __r)
+ : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
+ { __r.release(); }
+#endif
+
+ // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+ explicit
+ __shared_count(const __weak_count<_Lp>& __r);
+
+ ~__shared_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ }
+
+ __shared_count(const __shared_count& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_copy();
+ }
+
+ __shared_count&
+ operator=(const __shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != _M_pi)
+ {
+ if (__tmp != 0)
+ __tmp->_M_add_ref_copy();
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ _M_pi = __tmp;
+ }
+ return *this;
+ }
+
+ void
+ _M_swap(__shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_unique() const // nothrow
+ { return this->_M_get_use_count() == 1; }
+
+ friend inline bool
+ operator==(const __shared_count& __a, const __shared_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ friend inline bool
+ operator<(const __shared_count& __a, const __shared_count& __b)
+ { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
+
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+ private:
+ friend class __weak_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+}
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index a51901821ac..a85f3a524f2 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -45,54 +45,160 @@
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__
-// Macro used to indicate that the native "C" includes, when compiled
-// as "C++", have declarations in namespace std and not the global
-// namespace. Note, this is unrelated to possible "C" compatibility
-// includes that inject C90/C99 names into the global namespace.
-// XXX May not be necessary
-#if __cplusplus == 199711L
-# define _GLIBCXX_NAMESPACE_GLOBAL_INJECTION 1
-#endif
-
// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
-# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
#else
-# define _GLIBCXX_VISIBILITY(V)
+# define _GLIBCXX_VISIBILITY_ATTR(V)
#endif
-// Macros for controlling various namespace association schemes and modes.
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
-// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
-// _GLIBCXX_NAMESPACE_ASSOCIATION_CXX200x
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+ namespace std
+ {
+ namespace __debug { }
+ namespace __parallel { }
+ namespace __norm { } // __normative, __shadow, __replaced
+ namespace __cxx1998 { }
+
+ namespace tr1 { }
+ }
+*/
+
#ifdef _GLIBCXX_DEBUG
# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
#endif
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
-// Macros for namespace scope.
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
// _GLIBCXX_BEGIN_NAMESPACE
// _GLIBCXX_END_NAMESPACE
// _GLIBCXX_BEGIN_NESTED_NAMESPACE
// _GLIBCXX_END_NESTED_NAMESPACE
-#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
-# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
-# define _GLIBCXX_END_NESTED_NAMESPACE } }
-# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
-# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+// _GLIBCXX_BEGIN_POTENTIAL_NESTED_NAMESPACE
+// _GLIBCXX_END_POTENTIAL_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _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
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
#else
-# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) {
-# define _GLIBCXX_END_NAMESPACE }
-# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
-# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY(default) {
-# define _GLIBCXX_END_NESTED_NAMESPACE } }
-# else
-# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
-# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD _6
+# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+// debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE 0
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE 0
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE 0
# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+# warning currently using namespace associated mode which may fail \
+ without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+namespace std
+{
+ namespace __norm { }
+ namespace __debug { }
+ namespace __cxx1998 { }
+
+ using namespace __debug __attribute__ ((strong));
+ using namespace __cxx1998 __attribute__ ((strong));
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{
+ namespace __norm { }
+ namespace __parallel { }
+ namespace __cxx1998 { }
+
+ using namespace __parallel __attribute__ ((strong));
+ using namespace __cxx1998 __attribute__ ((strong));
+}
#endif
// Namespace associations for versioning mode.
@@ -119,38 +225,6 @@ namespace std
}
#endif
-// Namespace associations for debug mode.
-#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
-namespace std
-{
- namespace __norm { }
- namespace __debug { }
- using namespace __debug __attribute__ ((strong));
-}
-
-namespace __gnu_cxx
-{
- namespace __norm { }
- namespace __debug { }
- using namespace __debug __attribute__ ((strong));
-}
-
-# define _GLIBCXX_STD __norm
-# define _GLIBCXX_EXT __norm
-# define _GLIBCXX_EXTERN_TEMPLATE 0
-# if __NO_INLINE__ && !__GXX_WEAK__
-# warning debug mode without inlining may fail due to lack of weak symbols
-# endif
-#else
-#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
-# define _GLIBCXX_STD _6
-# define _GLIBCXX_EXT _6
-#else
-# define _GLIBCXX_STD std
-# define _GLIBCXX_EXT __gnu_cxx
-#endif
-#endif
-
// Define if compatibility should be provided for -mlong-double-64.
#undef _GLIBCXX_LONG_DOUBLE_COMPAT
@@ -193,6 +267,14 @@ _GLIBCXX_END_NAMESPACE
# define _GLIBCXX_WEAK_DEFINITION
#endif
+// Macro used to indicate that the native "C" includes, when compiled
+// as "C++", have declarations in namespace std and not the global
+// namespace. Note, this is unrelated to possible "C" compatibility
+// includes that inject C90/C99 names into the global namespace.
+#if __cplusplus == 199711L
+# define _GLIBCXX_NAMESPACE_GLOBAL_INJECTION 1
+#endif
+
// The remainder of the prewritten config is automatic; all the
// user hooks are listed above.
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index a4b4e3a0d64..d01db93be49 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -43,7 +43,7 @@
#pragma GCC system_header
-#include <bits/stl_algobase.h> // For copy, fill_n
+#include <bits/stl_algobase.h> // std::copy, std::fill_n
#include <bits/postypes.h> // For streampos
#include <cstdio> // For EOF
#include <cwchar> // For WEOF, wmemmove, wmemset, etc.
@@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* types, but who don't need to change the definitions of any function
* defined in char_traits, can specialize __gnu_cxx::_Char_types
* while leaving __gnu_cxx::char_traits alone. */
- template <class _CharT>
+ template<typename _CharT>
struct _Char_types
{
typedef unsigned long int_type;
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* right, but the int_type and state_type typedefs, and the eof()
* member function, are likely to be wrong.) The reason this class
* exists is so users can specialize it. Classes in namespace std
- * may not be specialized for fundamentl types, but classes in
+ * may not be specialized for fundamental types, but classes in
* namespace __gnu_cxx may be.
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/21_strings/howto.html#5
@@ -194,6 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char_traits<_CharT>::
copy(char_type* __s1, const char_type* __s2, std::size_t __n)
{
+ // NB: Inline std::copy so no recursive dependencies.
std::copy(__s2, __s2 + __n, __s1);
return __s1;
}
@@ -203,6 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char_traits<_CharT>::
assign(char_type* __s, std::size_t __n, char_type __a)
{
+ // NB: Inline std::fill_n so no recursive dependencies.
std::fill_n(__s, __n, __a);
return __s;
}
diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h
index d8d33070ff7..8d182499d6d 100644
--- a/libstdc++-v3/include/bits/codecvt.h
+++ b/libstdc++-v3/include/bits/codecvt.h
@@ -96,7 +96,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* respectively. If the result needed no conversion, from_next and
* to_next are not affected.
*
- * The @a state argument should be intialized if the input is at the
+ * The @a state argument should be initialized if the input is at the
* beginning and carried from a previous call if continuing
* conversion. There are no guarantees about how @a state is used.
*
@@ -176,7 +176,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* respectively. If the result needed no conversion, from_next and
* to_next are not affected.
*
- * The @a state argument should be intialized if the input is at the
+ * The @a state argument should be initialized if the input is at the
* beginning and carried from a previous call if continuing
* conversion. There are no guarantees about how @a state is used.
*
diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h
index f3c71ac1be5..45b958f852d 100644
--- a/libstdc++-v3/include/bits/cpp_type_traits.h
+++ b/libstdc++-v3/include/bits/cpp_type_traits.h
@@ -353,6 +353,56 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
#endif
+ template<typename _Tp>
+ struct __is_byte
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<>
+ struct __is_byte<char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_byte<signed char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_byte<unsigned char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Move iterator type
+ //
+ template<typename _Tp>
+ struct __is_move_iterator
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Iterator>
+ class move_iterator;
+
+ template<typename _Iterator>
+ struct __is_move_iterator< move_iterator<_Iterator> >
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+#endif
+
_GLIBCXX_END_NAMESPACE
#endif //_CPP_TYPE_TRAITS_H
diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc
index 3f53f20bd9b..08b7adeeb65 100644
--- a/libstdc++-v3/include/bits/deque.tcc
+++ b/libstdc++-v3/include/bits/deque.tcc
@@ -62,7 +62,7 @@
#ifndef _DEQUE_TCC
#define _DEQUE_TCC 1
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template <typename _Tp, typename _Alloc>
deque<_Tp, _Alloc>&
@@ -106,6 +106,30 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
return _M_insert_aux(__position, __x);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ if (__position._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ push_front(std::forward<_Args>(__args)...);
+ return this->_M_impl._M_start;
+ }
+ else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ push_back(std::forward<_Args>(__args)...);
+ iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return __tmp;
+ }
+ else
+ return _M_insert_aux(__position, std::forward<_Args>(__args)...);
+ }
+#endif
+
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
@@ -117,13 +141,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
if (static_cast<size_type>(__index) < (size() >> 1))
{
if (__position != begin())
- std::copy_backward(begin(), __position, __next);
+ _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next);
pop_front();
}
else
{
if (__next != end())
- std::copy(__next, end(), __position);
+ _GLIBCXX_MOVE3(__next, end(), __position);
pop_back();
}
return begin() + __index;
@@ -146,13 +170,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
{
if (__first != begin())
- std::copy_backward(begin(), __first, __last);
+ _GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last);
_M_erase_at_begin(begin() + __n);
}
else
{
if (__last != end())
- std::copy(__last, end(), __first);
+ _GLIBCXX_MOVE3(__last, end(), __first);
_M_erase_at_end(end() - __n);
}
return begin() + __elems_before;
@@ -299,51 +323,73 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
// Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
- template <typename _Tp, typename _Alloc>
- void
- deque<_Tp, _Alloc>::
- _M_push_back_aux(const value_type& __t)
- {
- value_type __t_copy = __t;
- _M_reserve_map_at_back();
- *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
- try
- {
- this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t_copy);
- this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
- + 1);
- this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
- }
- catch(...)
- {
- _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
- __throw_exception_again;
- }
- }
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_back_aux(_Args&&... __args)
+#else
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_back_aux(const value_type& __t)
+#endif
+ {
+ _M_reserve_map_at_back();
+ *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
+ try
+ {
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+ std::forward<_Args>(__args)...);
+#else
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t);
+#endif
+ this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
+ + 1);
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
+ }
+ catch(...)
+ {
+ _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
+ __throw_exception_again;
+ }
+ }
// Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
- template <typename _Tp, typename _Alloc>
- void
- deque<_Tp, _Alloc>::
- _M_push_front_aux(const value_type& __t)
- {
- value_type __t_copy = __t;
- _M_reserve_map_at_front();
- *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
- try
- {
- this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
- - 1);
- this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
- this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t_copy);
- }
- catch(...)
- {
- ++this->_M_impl._M_start;
- _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
- __throw_exception_again;
- }
- }
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_front_aux(_Args&&... __args)
+#else
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_front_aux(const value_type& __t)
+#endif
+ {
+ _M_reserve_map_at_front();
+ *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
+ try
+ {
+ this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
+ - 1);
+ this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur,
+ std::forward<_Args>(__args)...);
+#else
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
+#endif
+ }
+ catch(...)
+ {
+ ++this->_M_impl._M_start;
+ _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
+ __throw_exception_again;
+ }
+ }
// Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
template <typename _Tp, typename _Alloc>
@@ -426,38 +472,47 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_insert_aux(__pos, __first, __last, __n);
}
- template <typename _Tp, typename _Alloc>
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, _Args&&... __args)
+ {
+ value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy
+#else
typename deque<_Tp, _Alloc>::iterator
- deque<_Tp, _Alloc>::
- _M_insert_aux(iterator __pos, const value_type& __x)
- {
- difference_type __index = __pos - this->_M_impl._M_start;
- value_type __x_copy = __x; // XXX copy
- if (static_cast<size_type>(__index) < size() / 2)
- {
- push_front(front());
- iterator __front1 = this->_M_impl._M_start;
- ++__front1;
- iterator __front2 = __front1;
- ++__front2;
- __pos = this->_M_impl._M_start + __index;
- iterator __pos1 = __pos;
- ++__pos1;
- std::copy(__front2, __pos1, __front1);
- }
- else
- {
- push_back(back());
- iterator __back1 = this->_M_impl._M_finish;
- --__back1;
- iterator __back2 = __back1;
- --__back2;
- __pos = this->_M_impl._M_start + __index;
- std::copy_backward(__pos, __back2, __back1);
- }
- *__pos = __x_copy;
- return __pos;
- }
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, const value_type& __x)
+ {
+ value_type __x_copy = __x; // XXX copy
+#endif
+ difference_type __index = __pos - this->_M_impl._M_start;
+ if (static_cast<size_type>(__index) < size() / 2)
+ {
+ push_front(_GLIBCXX_MOVE(front()));
+ iterator __front1 = this->_M_impl._M_start;
+ ++__front1;
+ iterator __front2 = __front1;
+ ++__front2;
+ __pos = this->_M_impl._M_start + __index;
+ iterator __pos1 = __pos;
+ ++__pos1;
+ _GLIBCXX_MOVE3(__front2, __pos1, __front1);
+ }
+ else
+ {
+ push_back(_GLIBCXX_MOVE(back()));
+ iterator __back1 = this->_M_impl._M_finish;
+ --__back1;
+ iterator __back2 = __back1;
+ --__back2;
+ __pos = this->_M_impl._M_start + __index;
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1);
+ }
+ *__pos = _GLIBCXX_MOVE(__x_copy);
+ return __pos;
+ }
template <typename _Tp, typename _Alloc>
void
@@ -478,16 +533,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
iterator __start_n = (this->_M_impl._M_start
+ difference_type(__n));
- std::__uninitialized_copy_a(this->_M_impl._M_start,
+ std::__uninitialized_move_a(this->_M_impl._M_start,
__start_n, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
- std::copy(__start_n, __pos, __old_start);
+ _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
std::fill(__pos - difference_type(__n), __pos, __x_copy);
}
else
{
- std::__uninitialized_copy_fill(this->_M_impl._M_start,
+ std::__uninitialized_move_fill(this->_M_impl._M_start,
__pos, __new_start,
this->_M_impl._M_start,
__x_copy,
@@ -516,17 +571,17 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
iterator __finish_n = (this->_M_impl._M_finish
- difference_type(__n));
- std::__uninitialized_copy_a(__finish_n,
+ std::__uninitialized_move_a(__finish_n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
- std::copy_backward(__pos, __finish_n, __old_finish);
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
std::fill(__pos, __pos + difference_type(__n), __x_copy);
}
else
{
- std::__uninitialized_fill_copy(this->_M_impl._M_finish,
+ std::__uninitialized_fill_move(this->_M_impl._M_finish,
__pos + difference_type(__n),
__x_copy, __pos,
this->_M_impl._M_finish,
@@ -565,18 +620,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
iterator __start_n = (this->_M_impl._M_start
+ difference_type(__n));
- std::__uninitialized_copy_a(this->_M_impl._M_start,
+ std::__uninitialized_move_a(this->_M_impl._M_start,
__start_n, __new_start,
_M_get_Tp_allocator());
this->_M_impl._M_start = __new_start;
- std::copy(__start_n, __pos, __old_start);
+ _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
std::copy(__first, __last, __pos - difference_type(__n));
}
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, difference_type(__n) - __elemsbefore);
- std::__uninitialized_copy_copy(this->_M_impl._M_start,
+ std::__uninitialized_move_copy(this->_M_impl._M_start,
__pos, __first, __mid,
__new_start,
_M_get_Tp_allocator());
@@ -604,19 +659,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
iterator __finish_n = (this->_M_impl._M_finish
- difference_type(__n));
- std::__uninitialized_copy_a(__finish_n,
+ std::__uninitialized_move_a(__finish_n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish = __new_finish;
- std::copy_backward(__pos, __finish_n, __old_finish);
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
std::copy(__first, __last, __pos);
}
else
{
_ForwardIterator __mid = __first;
std::advance(__mid, __elemsafter);
- std::__uninitialized_copy_copy(__mid, __last, __pos,
+ std::__uninitialized_copy_move(__mid, __last, __pos,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc
index 28dde161490..1ef7af50e44 100644
--- a/libstdc++-v3/include/bits/fstream.tcc
+++ b/libstdc++-v3/include/bits/fstream.tcc
@@ -212,7 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const bool __testin = _M_mode & ios_base::in;
if (__testin && !_M_writing)
{
- // Check for pback madness, and if so swich back to the
+ // Check for pback madness, and if so switch back to the
// normal buffers and jet outta here before expensive
// fileops happen...
_M_destroy_pback();
diff --git a/libstdc++-v3/include/bits/functional_hash.h b/libstdc++-v3/include/bits/functional_hash.h
index 022c5caf4cc..630a0841208 100644
--- a/libstdc++-v3/include/bits/functional_hash.h
+++ b/libstdc++-v3/include/bits/functional_hash.h
@@ -27,7 +27,7 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-/** @file functional_hash.h
+/** @file bits/functional_hash.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
@@ -59,5 +59,15 @@
# undef _GLIBCXX_INCLUDE_AS_CXX0X
#endif
+
+namespace std
+{
+ struct error_code;
+
+ template<>
+ size_t
+ hash<error_code>::operator()(error_code) const;
+}
+
#endif // _FUNCTIONAL_HASH_H
diff --git a/libstdc++-v3/include/bits/gslice.h b/libstdc++-v3/include/bits/gslice.h
index b8dc04dda28..7f305f05646 100644
--- a/libstdc++-v3/include/bits/gslice.h
+++ b/libstdc++-v3/include/bits/gslice.h
@@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
gslice(size_t, const valarray<size_t>&, const valarray<size_t>&);
// XXX: the IS says the copy-ctor and copy-assignment operators are
- // synthetized by the compiler but they are just unsuitable
+ // synthesized by the compiler but they are just unsuitable
// for a ref-counted semantic
/// Copy constructor.
gslice(const gslice&);
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index d1da5fdde21..7942d3fa165 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -27,7 +27,7 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-/** @file hashtable.h
+/** @file bits/hashtable.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index c7aa8fc7966..95a3d2b9104 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -1,7 +1,7 @@
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -452,9 +452,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected:
//@{
/**
- * @if maint
* ios_base data members (doc me)
- * @endif
*/
streamsize _M_precision;
streamsize _M_width;
@@ -613,10 +611,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Flags access.
* @return The precision to generate on certain output operations.
*
- * @if maint
* Be careful if you try to give a definition of "precision" here; see
* DR 189.
- * @endif
*/
streamsize
precision() const
@@ -903,7 +899,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __base;
}
- // [27.4.5.2] adjustfield anipulators
+ // [27.4.5.2] adjustfield manipulators
/// Calls base.setf(ios_base::internal, ios_base::adjustfield).
inline ios_base&
internal(ios_base& __base)
@@ -928,7 +924,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __base;
}
- // [27.4.5.3] basefield anipulators
+ // [27.4.5.3] basefield manipulators
/// Calls base.setf(ios_base::dec, ios_base::basefield).
inline ios_base&
dec(ios_base& __base)
@@ -953,7 +949,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __base;
}
- // [27.4.5.4] floatfield anipulators
+ // [27.4.5.4] floatfield manipulators
/// Calls base.setf(ios_base::fixed, ios_base::floatfield).
inline ios_base&
fixed(ios_base& __base)
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 2e65b4847b9..440d234023e 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__in.tie())
__in.tie()->flush();
- if (!__noskip && (__in.flags() & ios_base::skipws))
+ if (!__noskip && bool(__in.flags() & ios_base::skipws))
{
const __int_type __eof = traits_type::eof();
__streambuf_type* __sb = __in.rdbuf();
diff --git a/libstdc++-v3/include/bits/list.tcc b/libstdc++-v3/include/bits/list.tcc
index 6bde3b77d00..57ee10c4c6e 100644
--- a/libstdc++-v3/include/bits/list.tcc
+++ b/libstdc++-v3/include/bits/list.tcc
@@ -62,7 +62,7 @@
#ifndef _LIST_TCC
#define _LIST_TCC 1
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _Tp, typename _Alloc>
void
@@ -80,6 +80,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename list<_Tp, _Alloc>::iterator
+ list<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+ __tmp->hook(__position._M_node);
+ return iterator(__tmp);
+ }
+#endif
+
template<typename _Tp, typename _Alloc>
typename list<_Tp, _Alloc>::iterator
list<_Tp, _Alloc>::
@@ -220,7 +233,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template<typename _Tp, typename _Alloc>
void
list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x)
+#else
merge(list& __x)
+#endif
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 300. list::merge() specification incomplete
@@ -250,7 +267,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <typename _StrictWeakOrdering>
void
list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x, _StrictWeakOrdering __comp)
+#else
merge(list& __x, _StrictWeakOrdering __comp)
+#endif
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 300. list::merge() specification incomplete
diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h
index 60de2695677..10ca19af97d 100644
--- a/libstdc++-v3/include/bits/locale_classes.h
+++ b/libstdc++-v3/include/bits/locale_classes.h
@@ -1,7 +1,7 @@
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -97,9 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* monetary, and messages. They form a bitmask that supports union and
* intersection. The category all is the union of these values.
*
- * @if maint
* NB: Order must match _S_facet_categories definition in locale.cc
- * @endif
*/
static const category none = 0;
static const category ctype = 1L << 0;
@@ -574,13 +572,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return true if locale contains a facet of type Facet, else false.
*/
template<typename _Facet>
- inline bool
- has_facet(const locale& __loc) throw()
- {
- const size_t __i = _Facet::id._M_id();
- const locale::facet** __facets = __loc._M_impl->_M_facets;
- return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
- }
+ bool
+ has_facet(const locale& __loc) throw();
/**
* @brief Return a facet.
@@ -596,15 +589,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @throw std::bad_cast if locale doesn't contain a facet of type Facet.
*/
template<typename _Facet>
- inline const _Facet&
- use_facet(const locale& __loc)
- {
- const size_t __i = _Facet::id._M_id();
- const locale::facet** __facets = __loc._M_impl->_M_facets;
- if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i]))
- __throw_bad_cast();
- return static_cast<const _Facet&>(*__facets[__i]);
- }
+ const _Facet&
+ use_facet(const locale& __loc);
/**
diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc
index c1e698983cd..551fc90d3b6 100644
--- a/libstdc++-v3/include/bits/locale_classes.tcc
+++ b/libstdc++-v3/include/bits/locale_classes.tcc
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 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
@@ -44,7 +44,8 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Facet>
- locale::locale(const locale& __other, _Facet* __f)
+ locale::
+ locale(const locale& __other, _Facet* __f)
{
_M_impl = new _Impl(*__other._M_impl, 1);
@@ -61,7 +62,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Facet>
locale
- locale::combine(const locale& __other) const
+ locale::
+ combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
try
@@ -78,8 +80,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits, typename _Alloc>
bool
- locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
- const basic_string<_CharT, _Traits, _Alloc>& __s2) const
+ locale::
+ operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
+ const basic_string<_CharT, _Traits, _Alloc>& __s2) const
{
typedef std::collate<_CharT> __collate_type;
const __collate_type& __collate = use_facet<__collate_type>(*this);
@@ -88,6 +91,36 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
+ template<typename _Facet>
+ bool
+ has_facet(const locale& __loc) throw()
+ {
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
+ return (__i < __loc._M_impl->_M_facets_size
+#ifdef __GXX_RTTI
+ && dynamic_cast<const _Facet*>(__facets[__i]));
+#else
+ && static_cast<const _Facet*>(__facets[__i]));
+#endif
+ }
+
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale& __loc)
+ {
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
+ if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i])
+ __throw_bad_cast();
+#ifdef __GXX_RTTI
+ return dynamic_cast<const _Facet&>(*__facets[__i]);
+#else
+ return static_cast<const _Facet&>(*__facets[__i]);
+#endif
+ }
+
+
// Generic version does nothing.
template<typename _CharT>
int
diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
index 7a89927fadd..c60f04d262a 100644
--- a/libstdc++-v3/include/bits/locale_facets.h
+++ b/libstdc++-v3/include/bits/locale_facets.h
@@ -143,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This template class provides implementations of the public functions
* that forward to the protected virtual functions.
*
- * This template also provides abtract stubs for the protected virtual
+ * This template also provides abstract stubs for the protected virtual
* functions.
*/
template<typename _CharT>
@@ -972,7 +972,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return this->do_narrow(__lo, __hi, __dfault, __to);
}
- protected:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 695. ctype<char>::classic_table() not accessible.
/// Returns a pointer to the mask table provided to the constructor, or
/// the default from classic_table() if none was provided.
const mask*
@@ -982,6 +983,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/// Returns a pointer to the C locale mask table.
static const mask*
classic_table() throw();
+ protected:
/**
* @brief Destructor.
@@ -2019,7 +2021,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
* specifier. Otherwise, parses like %d for signed and %u for unsigned
* types. The matching type length modifier is also used.
*
- * Digit grouping is intrepreted according to numpunct::grouping() and
+ * Digit grouping is interpreted according to numpunct::grouping() and
* numpunct::thousands_sep(). If the pattern of digit groups isn't
* consistent, sets err to ios_base::failbit.
*
@@ -2078,7 +2080,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
* matching type length modifier is also used.
*
* The decimal point character used is numpunct::decimal_point().
- * Digit grouping is intrepreted according to numpunct::grouping() and
+ * Digit grouping is interpreted according to numpunct::grouping() and
* numpunct::thousands_sep(). If the pattern of digit groups isn't
* consistent, sets err to ios_base::failbit.
*
@@ -2117,7 +2119,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
*
* The input characters are parsed like the scanf %p specifier.
*
- * Digit grouping is intrepreted according to numpunct::grouping() and
+ * Digit grouping is interpreted according to numpunct::grouping() and
* numpunct::thousands_sep(). If the pattern of digit groups isn't
* consistent, sets err to ios_base::failbit.
*
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 1b714adf8fe..744e373f54a 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -121,7 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 1,222,444 == __grouping_tmp of "\1\3\3"
// __grouping is parsed R to L
// 1,222,444 == __grouping of "\3" == "\3\3\3"
- static bool
+ bool
__verify_grouping(const char* __grouping, size_t __grouping_size,
const string& __grouping_tmp);
@@ -874,16 +874,16 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
if (__builtin_expect(__dec, true))
{
// Decimal.
- if (__v > 0)
+ if (__v >= 0)
{
- if (__flags & ios_base::showpos
+ if (bool(__flags & ios_base::showpos)
&& __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
*--__cs = __lit[__num_base::_S_oplus], ++__len;
}
- else if (__v)
+ else
*--__cs = __lit[__num_base::_S_ominus], ++__len;
}
- else if (__flags & ios_base::showbase && __v)
+ else if (bool(__flags & ios_base::showbase) && __v)
{
if (__basefield == ios_base::oct)
*--__cs = __lit[__num_base::_S_odigits], ++__len;
@@ -1237,30 +1237,6 @@ _GLIBCXX_END_LDBL_NAMESPACE
_Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod);
}
- bool
- __verify_grouping(const char* __grouping, size_t __grouping_size,
- const string& __grouping_tmp)
- {
- const size_t __n = __grouping_tmp.size() - 1;
- const size_t __min = std::min(__n, size_t(__grouping_size - 1));
- size_t __i = __n;
- bool __test = true;
-
- // Parsed number groupings have to match the
- // numpunct::grouping string exactly, starting at the
- // right-most point of the parsed sequence of elements ...
- for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
- __test = __grouping_tmp[__i] == __grouping[__j];
- for (; __i && __test; --__i)
- __test = __grouping_tmp[__i] == __grouping[__min];
- // ... but the first parsed grouping can be <= numpunct
- // grouping (only do the check if the numpunct char is > 0
- // because <= 0 means any size is ok).
- if (static_cast<signed char>(__grouping[__min]) > 0)
- __test &= __grouping_tmp[0] <= __grouping[__min];
- return __test;
- }
-
template<typename _CharT>
_CharT*
__add_grouping(_CharT* __s, _CharT __sep,
diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
index 2db9e072423..1c569ba5bd0 100644
--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
@@ -491,7 +491,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
break;
case money_base::sign:
// Sign might not exist, or be more than one
- // charater long. In that case, add in the rest
+ // character long. In that case, add in the rest
// below.
if (__sign_size)
__res += __sign[0];
diff --git a/libstdc++-v3/include/bits/postypes.h b/libstdc++-v3/include/bits/postypes.h
index 8fc8cf986bb..2870a8e59a1 100644
--- a/libstdc++-v3/include/bits/postypes.h
+++ b/libstdc++-v3/include/bits/postypes.h
@@ -1,7 +1,7 @@
// Position types -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -54,7 +54,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// The types streamoff, streampos and wstreampos and the class
// template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2,
- // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbage, the
+ // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the
// behaviour of these types is mostly implementation defined or
// unspecified. The behaviour in this implementation is as noted
// below.
@@ -62,12 +62,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
*
- * @if maint
* In clauses 21.1.3.1 and 27.4.1 streamoff is described as an
* implementation defined type.
* Note: In versions of GCC up to and including GCC 3.3, streamoff
* was typedef long.
- * @endif
*/
#ifdef _GLIBCXX_HAVE_INT64_T
typedef int64_t streamoff;
@@ -128,7 +126,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return _M_state; }
// The standard requires that this operator must be defined, but
- // gives no semantics. In this implemenation it just adds it's
+ // gives no semantics. In this implementation it just adds its
// argument to the stored offset and returns *this.
/// Add offset to this position.
fpos&
@@ -139,8 +137,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
// The standard requires that this operator must be defined, but
- // gives no semantics. In this implemenation it just subtracts
- // it's argument from the stored offset and returns *this.
+ // gives no semantics. In this implementation it just subtracts
+ // its argument from the stored offset and returns *this.
/// Subtract offset from this position.
fpos&
operator-=(streamoff __off)
@@ -150,7 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
// The standard requires that this operator must be defined, but
- // defines it's semantics only in terms of operator-. In this
+ // defines its semantics only in terms of operator-. In this
// implementation it constructs a copy of *this, adds the
// argument to that copy using operator+= and then returns the
// copy.
@@ -164,7 +162,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
// The standard requires that this operator must be defined, but
- // defines it's semantics only in terms of operator+. In this
+ // defines its semantics only in terms of operator+. In this
// implementation it constructs a copy of *this, subtracts the
// argument from that copy using operator-= and then returns the
// copy.
@@ -178,7 +176,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
// The standard requires that this operator must be defined, but
- // defines it's semantics only in terms of operator+. In this
+ // defines its semantics only in terms of operator+. In this
// implementation it returns the difference between the offset
// stored in *this and in the argument.
/// Subtract position to return offset.
diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc
index 2e642390f5c..2a62a9cc711 100644
--- a/libstdc++-v3/include/bits/sstream.tcc
+++ b/libstdc++-v3/include/bits/sstream.tcc
@@ -105,7 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
// NB: Start ostringstream buffers at 512 chars. This is an
// experimental value (pronounced "arbitrary" in some of the
- // hipper english-speaking countries), and can be changed to
+ // hipper English-speaking countries), and can be changed to
// suit particular needs.
//
// _GLIBCXX_RESOLVE_LIB_DEFECTS
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index 160dc2f8abc..549c0cac7e7 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -1,6 +1,6 @@
// Algorithm implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -62,9 +62,10 @@
#ifndef _STL_ALGO_H
#define _STL_ALGO_H 1
+#include <cstdlib> // for rand
+#include <bits/algorithmfwd.h>
#include <bits/stl_heap.h>
#include <bits/stl_tempbuf.h> // for _Temporary_buffer
-#include <cstdlib> // for rand
#include <debug/debug.h>
// See concept_check.h for the __glibcxx_*_requires macros.
@@ -122,7 +123,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
{
// concept requirements
- __glibcxx_function_requires(_BinaryFunctionConcept<_Compare,bool,_Tp,_Tp>)
+ __glibcxx_function_requires(_BinaryFunctionConcept<_Compare, bool,
+ _Tp, _Tp>)
if (__comp(__a, __b))
if (__comp(__b, __c))
return __b;
@@ -138,34 +140,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __b;
}
- /**
- * @brief Apply a function to every element of a sequence.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param f A unary function object.
- * @return @p f.
- *
- * Applies the function object @p f to each element in the range
- * @p [first,last). @p f must not modify the order of the sequence.
- * If @p f has a return value it is ignored.
- */
- template<typename _InputIterator, typename _Function>
- _Function
- for_each(_InputIterator __first, _InputIterator __last, _Function __f)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_requires_valid_range(__first, __last);
- for (; __first != __last; ++__first)
- __f(*__first);
- return __f;
- }
+ // for_each
- /**
- * @if maint
- * This is an overload used by find() for the Input Iterator case.
- * @endif
- */
+ /// This is an overload used by find() for the Input Iterator case.
template<typename _InputIterator, typename _Tp>
inline _InputIterator
__find(_InputIterator __first, _InputIterator __last,
@@ -176,11 +153,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first;
}
- /**
- * @if maint
- * This is an overload used by find_if() for the Input Iterator case.
- * @endif
- */
+ /// This is an overload used by find_if() for the Input Iterator case.
template<typename _InputIterator, typename _Predicate>
inline _InputIterator
__find_if(_InputIterator __first, _InputIterator __last,
@@ -191,11 +164,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first;
}
- /**
- * @if maint
- * This is an overload used by find() for the RAI case.
- * @endif
- */
+ /// This is an overload used by find() for the RAI case.
template<typename _RandomAccessIterator, typename _Tp>
_RandomAccessIterator
__find(_RandomAccessIterator __first, _RandomAccessIterator __last,
@@ -243,11 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is an overload used by find_if() for the RAI case.
- * @endif
- */
+ /// This is an overload used by find_if() for the RAI case.
template<typename _RandomAccessIterator, typename _Predicate>
_RandomAccessIterator
__find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
@@ -295,457 +260,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @brief Find the first occurrence of a value in a sequence.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param val The value to find.
- * @return The first iterator @c i in the range @p [first,last)
- * such that @c *i == @p val, or @p last if no such iterator exists.
- */
- template<typename _InputIterator, typename _Tp>
- inline _InputIterator
- find(_InputIterator __first, _InputIterator __last,
- const _Tp& __val)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIterator>::value_type, _Tp>)
- __glibcxx_requires_valid_range(__first, __last);
- return std::__find(__first, __last, __val,
- std::__iterator_category(__first));
- }
-
- /**
- * @brief Find the first element in a sequence for which a predicate is true.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param pred A predicate.
- * @return The first iterator @c i in the range @p [first,last)
- * such that @p pred(*i) is true, or @p last if no such iterator exists.
- */
- template<typename _InputIterator, typename _Predicate>
- inline _InputIterator
- find_if(_InputIterator __first, _InputIterator __last,
- _Predicate __pred)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
- return std::__find_if(__first, __last, __pred,
- std::__iterator_category(__first));
- }
-
- /**
- * @brief Find element from a set in a sequence.
- * @param first1 Start of range to search.
- * @param last1 End of range to search.
- * @param first2 Start of match candidates.
- * @param last2 End of match candidates.
- * @return The first iterator @c i in the range
- * @p [first1,last1) such that @c *i == @p *(i2) such that i2 is an
- * interator in [first2,last2), or @p last1 if no such iterator exists.
- *
- * Searches the range @p [first1,last1) for an element that is equal to
- * some element in the range [first2,last2). If found, returns an iterator
- * in the range [first1,last1), otherwise returns @p last1.
- */
- template<typename _InputIterator, typename _ForwardIterator>
- _InputIterator
- find_first_of(_InputIterator __first1, _InputIterator __last1,
- _ForwardIterator __first2, _ForwardIterator __last2)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIterator>::value_type,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- for (; __first1 != __last1; ++__first1)
- for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
- if (*__first1 == *__iter)
- return __first1;
- return __last1;
- }
-
- /**
- * @brief Find element from a set in a sequence using a predicate.
- * @param first1 Start of range to search.
- * @param last1 End of range to search.
- * @param first2 Start of match candidates.
- * @param last2 End of match candidates.
- * @param comp Predicate to use.
- * @return The first iterator @c i in the range
- * @p [first1,last1) such that @c comp(*i, @p *(i2)) is true and i2 is an
- * interator in [first2,last2), or @p last1 if no such iterator exists.
- *
- * Searches the range @p [first1,last1) for an element that is equal to
- * some element in the range [first2,last2). If found, returns an iterator in
- * the range [first1,last1), otherwise returns @p last1.
- */
- template<typename _InputIterator, typename _ForwardIterator,
- typename _BinaryPredicate>
- _InputIterator
- find_first_of(_InputIterator __first1, _InputIterator __last1,
- _ForwardIterator __first2, _ForwardIterator __last2,
- _BinaryPredicate __comp)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_InputIterator>::value_type,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- for (; __first1 != __last1; ++__first1)
- for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
- if (__comp(*__first1, *__iter))
- return __first1;
- return __last1;
- }
-
- /**
- * @brief Find two adjacent values in a sequence that are equal.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @return The first iterator @c i such that @c i and @c i+1 are both
- * valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
- * or @p last if no such iterator exists.
- */
- template<typename _ForwardIterator>
- _ForwardIterator
- adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last)
- return __last;
- _ForwardIterator __next = __first;
- while(++__next != __last)
- {
- if (*__first == *__next)
- return __first;
- __first = __next;
- }
- return __last;
- }
-
- /**
- * @brief Find two adjacent values in a sequence using a predicate.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param binary_pred A binary predicate.
- * @return The first iterator @c i such that @c i and @c i+1 are both
- * valid iterators in @p [first,last) and such that
- * @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
- * exists.
- */
- template<typename _ForwardIterator, typename _BinaryPredicate>
- _ForwardIterator
- adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
- _BinaryPredicate __binary_pred)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIterator>::value_type,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
- if (__first == __last)
- return __last;
- _ForwardIterator __next = __first;
- while(++__next != __last)
- {
- if (__binary_pred(*__first, *__next))
- return __first;
- __first = __next;
- }
- return __last;
- }
-
- /**
- * @brief Count the number of copies of a value in a sequence.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param value The value to be counted.
- * @return The number of iterators @c i in the range @p [first,last)
- * for which @c *i == @p value
- */
- template<typename _InputIterator, typename _Tp>
- typename iterator_traits<_InputIterator>::difference_type
- count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIterator>::value_type, _Tp>)
- __glibcxx_requires_valid_range(__first, __last);
- typename iterator_traits<_InputIterator>::difference_type __n = 0;
- for (; __first != __last; ++__first)
- if (*__first == __value)
- ++__n;
- return __n;
- }
-
- /**
- * @brief Count the elements of a sequence for which a predicate is true.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param pred A predicate.
- * @return The number of iterators @c i in the range @p [first,last)
- * for which @p pred(*i) is true.
- */
- template<typename _InputIterator, typename _Predicate>
- typename iterator_traits<_InputIterator>::difference_type
- count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
- typename iterator_traits<_InputIterator>::difference_type __n = 0;
- for (; __first != __last; ++__first)
- if (__pred(*__first))
- ++__n;
- return __n;
- }
-
- /**
- * @brief Finds the places in ranges which don't match.
- * @param first1 An input iterator.
- * @param last1 An input iterator.
- * @param first2 An input iterator.
- * @return A pair of iterators pointing to the first mismatch.
- *
- * This compares the elements of two ranges using @c == and returns a pair
- * of iterators. The first iterator points into the first range, the
- * second iterator points into the second range, and the elements pointed
- * to by the iterators are not equal.
- */
- template<typename _InputIterator1, typename _InputIterator2>
- pair<_InputIterator1, _InputIterator2>
- mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIterator1>::value_type,
- typename iterator_traits<_InputIterator2>::value_type>)
- __glibcxx_requires_valid_range(__first1, __last1);
-
- while (__first1 != __last1 && *__first1 == *__first2)
- {
- ++__first1;
- ++__first2;
- }
- return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
- }
-
- /**
- * @brief Finds the places in ranges which don't match.
- * @param first1 An input iterator.
- * @param last1 An input iterator.
- * @param first2 An input iterator.
- * @param binary_pred A binary predicate @link s20_3_1_base functor@endlink.
- * @return A pair of iterators pointing to the first mismatch.
- *
- * This compares the elements of two ranges using the binary_pred
- * parameter, and returns a pair
- * of iterators. The first iterator points into the first range, the
- * second iterator points into the second range, and the elements pointed
- * to by the iterators are not equal.
- */
- template<typename _InputIterator1, typename _InputIterator2,
- typename _BinaryPredicate>
- pair<_InputIterator1, _InputIterator2>
- mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _BinaryPredicate __binary_pred)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_requires_valid_range(__first1, __last1);
-
- while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
- {
- ++__first1;
- ++__first2;
- }
- return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
- }
-
- /**
- * @brief Search a sequence for a matching sub-sequence.
- * @param first1 A forward iterator.
- * @param last1 A forward iterator.
- * @param first2 A forward iterator.
- * @param last2 A forward iterator.
- * @return The first iterator @c i in the range
- * @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
- * for each @c N in the range @p [0,last2-first2), or @p last1 if no
- * such iterator exists.
- *
- * Searches the range @p [first1,last1) for a sub-sequence that compares
- * equal value-by-value with the sequence given by @p [first2,last2) and
- * returns an iterator to the first element of the sub-sequence, or
- * @p last1 if the sub-sequence is not found.
- *
- * Because the sub-sequence must lie completely within the range
- * @p [first1,last1) it must start at a position less than
- * @p last1-(last2-first2) where @p last2-first2 is the length of the
- * sub-sequence.
- * This means that the returned iterator @c i will be in the range
- * @p [first1,last1-(last2-first2))
- */
- template<typename _ForwardIterator1, typename _ForwardIterator2>
- _ForwardIterator1
- search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
- _ForwardIterator2 __first2, _ForwardIterator2 __last2)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIterator1>::value_type,
- typename iterator_traits<_ForwardIterator2>::value_type>)
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- // Test for empty ranges
- if (__first1 == __last1 || __first2 == __last2)
- return __first1;
-
- // Test for a pattern of length 1.
- _ForwardIterator2 __p1(__first2);
- if (++__p1 == __last2)
- return std::find(__first1, __last1, *__first2);
-
- // General case.
- _ForwardIterator2 __p;
- _ForwardIterator1 __current = __first1;
-
- for (;;)
- {
- __first1 = std::find(__first1, __last1, *__first2);
- if (__first1 == __last1)
- return __last1;
-
- __p = __p1;
- __current = __first1;
- if (++__current == __last1)
- return __last1;
-
- while (*__current == *__p)
- {
- if (++__p == __last2)
- return __first1;
- if (++__current == __last1)
- return __last1;
- }
- ++__first1;
- }
- return __first1;
- }
-
- /**
- * @brief Search a sequence for a matching sub-sequence using a predicate.
- * @param first1 A forward iterator.
- * @param last1 A forward iterator.
- * @param first2 A forward iterator.
- * @param last2 A forward iterator.
- * @param predicate A binary predicate.
- * @return The first iterator @c i in the range
- * @p [first1,last1-(last2-first2)) such that
- * @p predicate(*(i+N),*(first2+N)) is true for each @c N in the range
- * @p [0,last2-first2), or @p last1 if no such iterator exists.
- *
- * Searches the range @p [first1,last1) for a sub-sequence that compares
- * equal value-by-value with the sequence given by @p [first2,last2),
- * using @p predicate to determine equality, and returns an iterator
- * to the first element of the sub-sequence, or @p last1 if no such
- * iterator exists.
- *
- * @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
- */
- template<typename _ForwardIterator1, typename _ForwardIterator2,
- typename _BinaryPredicate>
- _ForwardIterator1
- search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
- _ForwardIterator2 __first2, _ForwardIterator2 __last2,
- _BinaryPredicate __predicate)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIterator1>::value_type,
- typename iterator_traits<_ForwardIterator2>::value_type>)
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- // Test for empty ranges
- if (__first1 == __last1 || __first2 == __last2)
- return __first1;
-
- // Test for a pattern of length 1.
- _ForwardIterator2 __p1(__first2);
- if (++__p1 == __last2)
- {
- while (__first1 != __last1
- && !bool(__predicate(*__first1, *__first2)))
- ++__first1;
- return __first1;
- }
-
- // General case.
- _ForwardIterator2 __p;
- _ForwardIterator1 __current = __first1;
-
- for (;;)
- {
- while (__first1 != __last1
- && !bool(__predicate(*__first1, *__first2)))
- ++__first1;
- if (__first1 == __last1)
- return __last1;
-
- __p = __p1;
- __current = __first1;
- if (++__current == __last1)
- return __last1;
-
- while (__predicate(*__current, *__p))
- {
- if (++__p == __last2)
- return __first1;
- if (++__current == __last1)
- return __last1;
- }
- ++__first1;
- }
- return __first1;
- }
+ // set_difference
+ // set_intersection
+ // set_symmetric_difference
+ // set_union
+ // for_each
+ // find
+ // find_if
+ // find_first_of
+ // adjacent_find
+ // count
+ // count_if
+ // search
/**
- * @if maint
* This is an uglified
* search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
* overloaded for forward iterators.
- * @endif
*/
template<typename _ForwardIterator, typename _Integer, typename _Tp>
_ForwardIterator
@@ -753,7 +284,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_Integer __count, const _Tp& __val,
std::forward_iterator_tag)
{
- __first = std::find(__first, __last, __val);
+ __first = _GLIBCXX_STD_P::find(__first, __last, __val);
while (__first != __last)
{
typename iterator_traits<_ForwardIterator>::difference_type
@@ -769,17 +300,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first;
if (__i == __last)
return __last;
- __first = std::find(++__i, __last, __val);
+ __first = _GLIBCXX_STD_P::find(++__i, __last, __val);
}
return __last;
}
/**
- * @if maint
* This is an uglified
* search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
* overloaded for random access iterators.
- * @endif
*/
template<typename _RandomAccessIter, typename _Integer, typename _Tp>
_RandomAccessIter
@@ -826,45 +355,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @brief Search a sequence for a number of consecutive values.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param count The number of consecutive values.
- * @param val The value to find.
- * @return The first iterator @c i in the range @p [first,last-count)
- * such that @c *(i+N) == @p val for each @c N in the range @p [0,count),
- * or @p last if no such iterator exists.
- *
- * Searches the range @p [first,last) for @p count consecutive elements
- * equal to @p val.
- */
- template<typename _ForwardIterator, typename _Integer, typename _Tp>
- _ForwardIterator
- search_n(_ForwardIterator __first, _ForwardIterator __last,
- _Integer __count, const _Tp& __val)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__count <= 0)
- return __first;
- if (__count == 1)
- return std::find(__first, __last, __val);
- return std::__search_n(__first, __last, __count, __val,
- std::__iterator_category(__first));
- }
+ // search_n
/**
- * @if maint
* This is an uglified
* search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
* _BinaryPredicate)
* overloaded for forward iterators.
- * @endif
*/
template<typename _ForwardIterator, typename _Integer, typename _Tp,
typename _BinaryPredicate>
@@ -900,12 +397,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified
* search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
* _BinaryPredicate)
* overloaded for random access iterators.
- * @endif
*/
template<typename _RandomAccessIter, typename _Integer, typename _Tp,
typename _BinaryPredicate>
@@ -953,46 +448,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @brief Search a sequence for a number of consecutive values using a
- * predicate.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param count The number of consecutive values.
- * @param val The value to find.
- * @param binary_pred A binary predicate.
- * @return The first iterator @c i in the range @p [first,last-count)
- * such that @p binary_pred(*(i+N),val) is true for each @c N in the
- * range @p [0,count), or @p last if no such iterator exists.
- *
- * Searches the range @p [first,last) for @p count consecutive elements
- * for which the predicate returns true.
- */
- template<typename _ForwardIterator, typename _Integer, typename _Tp,
- typename _BinaryPredicate>
- _ForwardIterator
- search_n(_ForwardIterator __first, _ForwardIterator __last,
- _Integer __count, const _Tp& __val,
- _BinaryPredicate __binary_pred)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
- typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__count <= 0)
- return __first;
- if (__count == 1)
- {
- while (__first != __last && !bool(__binary_pred(*__first, __val)))
- ++__first;
- return __first;
- }
- return std::__search_n(__first, __last, __count, __val, __binary_pred,
- std::__iterator_category(__first));
- }
-
// find_end for forward iterators.
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator1
@@ -1008,7 +463,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (1)
{
_ForwardIterator1 __new_result
- = std::search(__first1, __last1, __first2, __last2);
+ = _GLIBCXX_STD_P::search(__first1, __last1, __first2, __last2);
if (__new_result == __last1)
return __result;
else
@@ -1037,7 +492,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (1)
{
_ForwardIterator1 __new_result
- = std::search(__first1, __last1, __first2, __last2, __comp);
+ = _GLIBCXX_STD_P::search(__first1, __last1, __first2,
+ __last2, __comp);
if (__new_result == __last1)
return __result;
else
@@ -1070,8 +526,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_RevIterator1 __rlast1(__first1);
_RevIterator2 __rlast2(__first2);
- _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
- _RevIterator2(__last2), __rlast2);
+ _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1),
+ __rlast1,
+ _RevIterator2(__last2),
+ __rlast2);
if (__rresult == __rlast1)
return __last1;
@@ -1209,261 +667,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__comp);
}
- /**
- * @brief Perform an operation on a sequence.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @param unary_op A unary operator.
- * @return An output iterator equal to @p result+(last-first).
- *
- * Applies the operator to each element in the input range and assigns
- * the results to successive elements of the output sequence.
- * Evaluates @p *(result+N)=unary_op(*(first+N)) for each @c N in the
- * range @p [0,last-first).
- *
- * @p unary_op must not alter its argument.
- */
- template<typename _InputIterator, typename _OutputIterator,
- typename _UnaryOperation>
- _OutputIterator
- transform(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result, _UnaryOperation __unary_op)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- // "the type returned by a _UnaryOperation"
- __typeof__(__unary_op(*__first))>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first, ++__result)
- *__result = __unary_op(*__first);
- return __result;
- }
-
- /**
- * @brief Perform an operation on corresponding elements of two sequences.
- * @param first1 An input iterator.
- * @param last1 An input iterator.
- * @param first2 An input iterator.
- * @param result An output iterator.
- * @param binary_op A binary operator.
- * @return An output iterator equal to @p result+(last-first).
- *
- * Applies the operator to the corresponding elements in the two
- * input ranges and assigns the results to successive elements of the
- * output sequence.
- * Evaluates @p *(result+N)=binary_op(*(first1+N),*(first2+N)) for each
- * @c N in the range @p [0,last1-first1).
- *
- * @p binary_op must not alter either of its arguments.
- */
- template<typename _InputIterator1, typename _InputIterator2,
- typename _OutputIterator, typename _BinaryOperation>
- _OutputIterator
- transform(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _OutputIterator __result,
- _BinaryOperation __binary_op)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- // "the type returned by a _BinaryOperation"
- __typeof__(__binary_op(*__first1,*__first2))>)
- __glibcxx_requires_valid_range(__first1, __last1);
-
- for (; __first1 != __last1; ++__first1, ++__first2, ++__result)
- *__result = __binary_op(*__first1, *__first2);
- return __result;
- }
-
- /**
- * @brief Replace each occurrence of one value in a sequence with another
- * value.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param old_value The value to be replaced.
- * @param new_value The replacement value.
- * @return replace() returns no value.
- *
- * For each iterator @c i in the range @p [first,last) if @c *i ==
- * @p old_value then the assignment @c *i = @p new_value is performed.
- */
- template<typename _ForwardIterator, typename _Tp>
- void
- replace(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __old_value, const _Tp& __new_value)
- {
- // concept requirements
- __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
- _ForwardIterator>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
- __glibcxx_function_requires(_ConvertibleConcept<_Tp,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first)
- if (*__first == __old_value)
- *__first = __new_value;
- }
-
- /**
- * @brief Replace each value in a sequence for which a predicate returns
- * true with another value.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param pred A predicate.
- * @param new_value The replacement value.
- * @return replace_if() returns no value.
- *
- * For each iterator @c i in the range @p [first,last) if @p pred(*i)
- * is true then the assignment @c *i = @p new_value is performed.
- */
- template<typename _ForwardIterator, typename _Predicate, typename _Tp>
- void
- replace_if(_ForwardIterator __first, _ForwardIterator __last,
- _Predicate __pred, const _Tp& __new_value)
- {
- // concept requirements
- __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
- _ForwardIterator>)
- __glibcxx_function_requires(_ConvertibleConcept<_Tp,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first)
- if (__pred(*__first))
- *__first = __new_value;
- }
-
- /**
- * @brief Copy a sequence, replacing each element of one value with another
- * value.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @param old_value The value to be replaced.
- * @param new_value The replacement value.
- * @return The end of the output sequence, @p result+(last-first).
- *
- * Copies each element in the input range @p [first,last) to the
- * output range @p [result,result+(last-first)) replacing elements
- * equal to @p old_value with @p new_value.
- */
- template<typename _InputIterator, typename _OutputIterator, typename _Tp>
- _OutputIterator
- replace_copy(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result,
- const _Tp& __old_value, const _Tp& __new_value)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_function_requires(_EqualOpConcept<
- typename iterator_traits<_InputIterator>::value_type, _Tp>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first, ++__result)
- if (*__first == __old_value)
- *__result = __new_value;
- else
- *__result = *__first;
- return __result;
- }
-
- /**
- * @brief Copy a sequence, replacing each value for which a predicate
- * returns true with another value.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @param pred A predicate.
- * @param new_value The replacement value.
- * @return The end of the output sequence, @p result+(last-first).
- *
- * Copies each element in the range @p [first,last) to the range
- * @p [result,result+(last-first)) replacing elements for which
- * @p pred returns true with @p new_value.
- */
- template<typename _InputIterator, typename _OutputIterator,
- typename _Predicate, typename _Tp>
- _OutputIterator
- replace_copy_if(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result,
- _Predicate __pred, const _Tp& __new_value)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first, ++__result)
- if (__pred(*__first))
- *__result = __new_value;
- else
- *__result = *__first;
- return __result;
- }
-
- /**
- * @brief Assign the result of a function object to each value in a
- * sequence.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param gen A function object taking no arguments.
- * @return generate() returns no value.
- *
- * Performs the assignment @c *i = @p gen() for each @c i in the range
- * @p [first,last).
- */
- template<typename _ForwardIterator, typename _Generator>
- void
- generate(_ForwardIterator __first, _ForwardIterator __last,
- _Generator __gen)
- {
- // concept requirements
- __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
- __glibcxx_function_requires(_GeneratorConcept<_Generator,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- for (; __first != __last; ++__first)
- *__first = __gen();
- }
-
- /**
- * @brief Assign the result of a function object to each value in a
- * sequence.
- * @param first A forward iterator.
- * @param n The length of the sequence.
- * @param gen A function object taking no arguments.
- * @return The end of the sequence, @p first+n
- *
- * Performs the assignment @c *i = @p gen() for each @c i in the range
- * @p [first,first+n).
- */
- template<typename _OutputIterator, typename _Size, typename _Generator>
- _OutputIterator
- generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
- {
- // concept requirements
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- // "the type returned by a _Generator"
- __typeof__(__gen())>)
-
- for (; __n > 0; --__n, ++__first)
- *__first = __gen();
- return __first;
- }
/**
* @brief Copy a sequence, removing elements of a given value.
@@ -1565,11 +768,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
__glibcxx_requires_valid_range(__first, __last);
- __first = std::find(__first, __last, __value);
- _ForwardIterator __i = __first;
- return __first == __last ? __first
- : std::remove_copy(++__i, __last,
- __first, __value);
+ __first = _GLIBCXX_STD_P::find(__first, __last, __value);
+ if(__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ ++__first;
+ for(; __first != __last; ++__first)
+ if(!(*__first == __value))
+ {
+ *__result = _GLIBCXX_MOVE(*__first);
+ ++__result;
+ }
+ return __result;
}
/**
@@ -1600,11 +810,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_ForwardIterator>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
- __first = std::find_if(__first, __last, __pred);
- _ForwardIterator __i = __first;
- return __first == __last ? __first
- : std::remove_copy_if(++__i, __last,
- __first, __pred);
+ __first = _GLIBCXX_STD_P::find_if(__first, __last, __pred);
+ if(__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ ++__first;
+ for(; __first != __last; ++__first)
+ if(!__pred(*__first))
+ {
+ *__result = _GLIBCXX_MOVE(*__first);
+ ++__result;
+ }
+ return __result;
}
/**
@@ -1632,7 +849,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
// Skip the beginning, if already unique.
- __first = std::adjacent_find(__first, __last);
+ __first = _GLIBCXX_STD_P::adjacent_find(__first, __last);
if (__first == __last)
return __last;
@@ -1641,7 +858,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
++__first;
while (++__first != __last)
if (!(*__dest == *__first))
- *++__dest = *__first;
+ *++__dest = _GLIBCXX_MOVE(*__first);
return ++__dest;
}
@@ -1673,7 +890,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
// Skip the beginning, if already unique.
- __first = std::adjacent_find(__first, __last, __binary_pred);
+ __first = _GLIBCXX_STD_P::adjacent_find(__first, __last, __binary_pred);
if (__first == __last)
return __last;
@@ -1682,16 +899,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
++__first;
while (++__first != __last)
if (!bool(__binary_pred(*__dest, *__first)))
- *++__dest = *__first;
+ *++__dest = _GLIBCXX_MOVE(*__first);
return ++__dest;
}
/**
- * @if maint
* This is an uglified unique_copy(_InputIterator, _InputIterator,
* _OutputIterator)
* overloaded for forward iterators and output iterator as result.
- * @endif
*/
template<typename _ForwardIterator, typename _OutputIterator>
_OutputIterator
@@ -1712,11 +927,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified unique_copy(_InputIterator, _InputIterator,
* _OutputIterator)
* overloaded for input iterators and output iterator as result.
- * @endif
*/
template<typename _InputIterator, typename _OutputIterator>
_OutputIterator
@@ -1737,11 +950,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified unique_copy(_InputIterator, _InputIterator,
* _OutputIterator)
* overloaded for input iterators and forward iterator as result.
- * @endif
*/
template<typename _InputIterator, typename _ForwardIterator>
_ForwardIterator
@@ -1758,12 +969,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified
* unique_copy(_InputIterator, _InputIterator, _OutputIterator,
* _BinaryPredicate)
* overloaded for forward iterators and output iterator as result.
- * @endif
*/
template<typename _ForwardIterator, typename _OutputIterator,
typename _BinaryPredicate>
@@ -1789,12 +998,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified
* unique_copy(_InputIterator, _InputIterator, _OutputIterator,
* _BinaryPredicate)
* overloaded for input iterators and output iterator as result.
- * @endif
*/
template<typename _InputIterator, typename _OutputIterator,
typename _BinaryPredicate>
@@ -1820,12 +1027,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified
* unique_copy(_InputIterator, _InputIterator, _OutputIterator,
* _BinaryPredicate)
* overloaded for input iterators and forward iterator as result.
- * @endif
*/
template<typename _InputIterator, typename _ForwardIterator,
typename _BinaryPredicate>
@@ -1847,93 +1052,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Copy a sequence, removing consecutive duplicate values.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @return An iterator designating the end of the resulting sequence.
- *
- * Copies each element in the range @p [first,last) to the range
- * beginning at @p result, except that only the first element is copied
- * from groups of consecutive elements that compare equal.
- * unique_copy() is stable, so the relative order of elements that are
- * copied is unchanged.
- *
- * @if maint
- * _GLIBCXX_RESOLVE_LIB_DEFECTS
- * DR 241. Does unique_copy() require CopyConstructible and Assignable?
- *
- * _GLIBCXX_RESOLVE_LIB_DEFECTS
- * DR 538. 241 again: Does unique_copy() require CopyConstructible and
- * Assignable?
- * @endif
- */
- template<typename _InputIterator, typename _OutputIterator>
- inline _OutputIterator
- unique_copy(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result)
- {
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_function_requires(_EqualityComparableConcept<
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return __result;
- return std::__unique_copy(__first, __last, __result,
- std::__iterator_category(__first),
- std::__iterator_category(__result));
- }
-
- /**
- * @brief Copy a sequence, removing consecutive values using a predicate.
- * @param first An input iterator.
- * @param last An input iterator.
- * @param result An output iterator.
- * @param binary_pred A binary predicate.
- * @return An iterator designating the end of the resulting sequence.
- *
- * Copies each element in the range @p [first,last) to the range
- * beginning at @p result, except that only the first element is copied
- * from groups of consecutive elements for which @p binary_pred returns
- * true.
- * unique_copy() is stable, so the relative order of elements that are
- * copied is unchanged.
- *
- * @if maint
- * _GLIBCXX_RESOLVE_LIB_DEFECTS
- * DR 241. Does unique_copy() require CopyConstructible and Assignable?
- * @endif
- */
- template<typename _InputIterator, typename _OutputIterator,
- typename _BinaryPredicate>
- inline _OutputIterator
- unique_copy(_InputIterator __first, _InputIterator __last,
- _OutputIterator __result,
- _BinaryPredicate __binary_pred)
- {
- // concept requirements -- predicates checked later
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- typename iterator_traits<_InputIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return __result;
- return std::__unique_copy(__first, __last, __result, __binary_pred,
- std::__iterator_category(__first),
- std::__iterator_category(__result));
- }
-
- /**
- * @if maint
* This is an uglified reverse(_BidirectionalIterator,
* _BidirectionalIterator)
* overloaded for bidirectional iterators.
- * @endif
*/
template<typename _BidirectionalIterator>
void
@@ -1951,11 +1072,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is an uglified reverse(_BidirectionalIterator,
* _BidirectionalIterator)
* overloaded for random access iterators.
- * @endif
*/
template<typename _RandomAccessIterator>
void
@@ -2032,10 +1151,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* This is a helper function for the rotate algorithm specialized on RAIs.
* It returns the greatest common divisor of two integer values.
- * @endif
*/
template<typename _EuclideanRingElement>
_EuclideanRingElement
@@ -2050,11 +1167,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __m;
}
- /**
- * @if maint
- * This is a helper function for the rotate algorithm.
- * @endif
- */
+ /// This is a helper function for the rotate algorithm.
template<typename _ForwardIterator>
void
__rotate(_ForwardIterator __first,
@@ -2068,7 +1181,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ForwardIterator __first2 = __middle;
do
{
- swap(*__first, *__first2);
+ std::iter_swap(__first, __first2);
++__first;
++__first2;
if (__first == __middle)
@@ -2080,7 +1193,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__first2 != __last)
{
- swap(*__first, *__first2);
+ std::iter_swap(__first, __first2);
++__first;
++__first2;
if (__first == __middle)
@@ -2090,11 +1203,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the rotate algorithm.
- * @endif
- */
+ /// This is a helper function for the rotate algorithm.
template<typename _BidirectionalIterator>
void
__rotate(_BidirectionalIterator __first,
@@ -2114,7 +1223,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__first != __middle && __middle != __last)
{
- swap(*__first, *--__last);
+ std::iter_swap(__first, --__last);
++__first;
}
@@ -2124,11 +1233,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__reverse(__first, __middle, bidirectional_iterator_tag());
}
- /**
- * @if maint
- * This is a helper function for the rotate algorithm.
- * @endif
- */
+ /// This is a helper function for the rotate algorithm.
template<typename _RandomAccessIterator>
void
__rotate(_RandomAccessIterator __first,
@@ -2162,7 +1267,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
for (_Distance __i = 0; __i < __d; __i++)
{
- _ValueType __tmp = *__first;
+ _ValueType __tmp = _GLIBCXX_MOVE(*__first);
_RandomAccessIterator __p = __first;
if (__k < __l)
@@ -2171,11 +1276,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__p > __first + __l)
{
- *__p = *(__p - __l);
+ *__p = _GLIBCXX_MOVE(*(__p - __l));
__p -= __l;
}
- *__p = *(__p + __k);
+ *__p = _GLIBCXX_MOVE(*(__p + __k));
__p += __k;
}
}
@@ -2185,15 +1290,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__p < __last - __k)
{
- *__p = *(__p + __k);
+ *__p = _GLIBCXX_MOVE(*(__p + __k));
__p += __k;
}
- *__p = * (__p - __l);
+ *__p = _GLIBCXX_MOVE(*(__p - __l));
__p -= __l;
}
}
- *__p = __tmp;
+ *__p = _GLIBCXX_MOVE(__tmp);
++__first;
}
}
@@ -2265,70 +1370,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::copy(__middle, __last, __result));
}
- /**
- * @brief Randomly shuffle the elements of a sequence.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @return Nothing.
- *
- * Reorder the elements in the range @p [first,last) using a random
- * distribution, so that every possible ordering of the sequence is
- * equally likely.
- */
- template<typename _RandomAccessIterator>
- inline void
- random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
- {
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first != __last)
- for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
- std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
- }
-
- /**
- * @brief Shuffle the elements of a sequence using a random number
- * generator.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param rand The RNG functor or function.
- * @return Nothing.
- *
- * Reorders the elements in the range @p [first,last) using @p rand to
- * provide a random distribution. Calling @p rand(N) for a positive
- * integer @p N should return a randomly chosen integer from the
- * range [0,N).
- */
- template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
- void
- random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _RandomNumberGenerator& __rand)
- {
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return;
- for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
- std::iter_swap(__i, __first + __rand((__i - __first) + 1));
- }
-
-
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator
__partition(_ForwardIterator __first, _ForwardIterator __last,
- _Predicate __pred,
- forward_iterator_tag)
+ _Predicate __pred, forward_iterator_tag)
{
if (__first == __last)
return __first;
@@ -2342,23 +1388,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (++__next != __last)
if (__pred(*__next))
{
- swap(*__first, *__next);
+ std::iter_swap(__first, __next);
++__first;
}
return __first;
}
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _BidirectionalIterator, typename _Predicate>
_BidirectionalIterator
__partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
- _Predicate __pred,
- bidirectional_iterator_tag)
+ _Predicate __pred, bidirectional_iterator_tag)
{
while (true)
{
@@ -2382,42 +1423,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @brief Move elements for which a predicate is true to the beginning
- * of a sequence.
- * @param first A forward iterator.
- * @param last A forward iterator.
- * @param pred A predicate functor.
- * @return An iterator @p middle such that @p pred(i) is true for each
- * iterator @p i in the range @p [first,middle) and false for each @p i
- * in the range @p [middle,last).
- *
- * @p pred must not modify its operand. @p partition() does not preserve
- * the relative ordering of elements in each group, use
- * @p stable_partition() if this is needed.
- */
- template<typename _ForwardIterator, typename _Predicate>
- inline _ForwardIterator
- partition(_ForwardIterator __first, _ForwardIterator __last,
- _Predicate __pred)
- {
- // concept requirements
- __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
- _ForwardIterator>)
- __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
- typename iterator_traits<_ForwardIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- return std::__partition(__first, __last, __pred,
- std::__iterator_category(__first));
- }
-
+ // partition
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _ForwardIterator, typename _Predicate, typename _Distance>
_ForwardIterator
__inplace_stable_partition(_ForwardIterator __first,
@@ -2441,11 +1449,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __begin;
}
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
typename _Distance>
_ForwardIterator
@@ -2543,120 +1547,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routines.
- * @endif
- */
+ /// This is a helper function for the sort routines.
template<typename _RandomAccessIterator>
void
__heap_select(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last)
{
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
std::make_heap(__first, __middle);
for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (*__i < *__first)
- std::__pop_heap(__first, __middle, __i, _ValueType(*__i));
+ std::__pop_heap(__first, __middle, __i);
}
- /**
- * @if maint
- * This is a helper function for the sort routines.
- * @endif
- */
+ /// This is a helper function for the sort routines.
template<typename _RandomAccessIterator, typename _Compare>
void
__heap_select(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last, _Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
std::make_heap(__first, __middle, __comp);
for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
if (__comp(*__i, *__first))
- std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
- }
-
- /**
- * @brief Sort the smallest elements of a sequence.
- * @param first An iterator.
- * @param middle Another iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Sorts the smallest @p (middle-first) elements in the range
- * @p [first,last) and moves them to the range @p [first,middle). The
- * order of the remaining elements in the range @p [middle,last) is
- * undefined.
- * After the sort if @p i and @j are iterators in the range
- * @p [first,middle) such that @i precedes @j and @k is an iterator in
- * the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
- */
- template<typename _RandomAccessIterator>
- inline void
- partial_sort(_RandomAccessIterator __first,
- _RandomAccessIterator __middle,
- _RandomAccessIterator __last)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
- __glibcxx_requires_valid_range(__first, __middle);
- __glibcxx_requires_valid_range(__middle, __last);
-
- std::__heap_select(__first, __middle, __last);
- std::sort_heap(__first, __middle);
+ std::__pop_heap(__first, __middle, __i, __comp);
}
- /**
- * @brief Sort the smallest elements of a sequence using a predicate
- * for comparison.
- * @param first An iterator.
- * @param middle Another iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Sorts the smallest @p (middle-first) elements in the range
- * @p [first,last) and moves them to the range @p [first,middle). The
- * order of the remaining elements in the range @p [middle,last) is
- * undefined.
- * After the sort if @p i and @j are iterators in the range
- * @p [first,middle) such that @i precedes @j and @k is an iterator in
- * the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
- * are both false.
- */
- template<typename _RandomAccessIterator, typename _Compare>
- inline void
- partial_sort(_RandomAccessIterator __first,
- _RandomAccessIterator __middle,
- _RandomAccessIterator __last,
- _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType, _ValueType>)
- __glibcxx_requires_valid_range(__first, __middle);
- __glibcxx_requires_valid_range(__middle, __last);
-
- std::__heap_select(__first, __middle, __last, __comp);
- std::sort_heap(__first, __middle, __comp);
- }
+ // partial_sort
/**
* @brief Copy the smallest elements of a sequence.
@@ -2791,11 +1708,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __result_real_last;
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Tp>
void
__unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val)
@@ -2811,11 +1724,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__last = __val;
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
void
__unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val,
@@ -2832,11 +1741,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__last = __val;
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator>
void
__insertion_sort(_RandomAccessIterator __first,
@@ -2859,11 +1764,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Compare>
void
__insertion_sort(_RandomAccessIterator __first,
@@ -2885,11 +1786,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator>
inline void
__unguarded_insertion_sort(_RandomAccessIterator __first,
@@ -2902,11 +1799,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__unguarded_linear_insert(__i, _ValueType(*__i));
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Compare>
inline void
__unguarded_insertion_sort(_RandomAccessIterator __first,
@@ -2920,18 +1813,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* @doctodo
* This controls some aspect of the sort routines.
- * @endif
*/
enum { _S_threshold = 16 };
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator>
void
__final_insertion_sort(_RandomAccessIterator __first,
@@ -2946,11 +1833,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__insertion_sort(__first, __last);
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Compare>
void
__final_insertion_sort(_RandomAccessIterator __first,
@@ -2966,11 +1849,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__insertion_sort(__first, __last, __comp);
}
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _RandomAccessIterator, typename _Tp>
_RandomAccessIterator
__unguarded_partition(_RandomAccessIterator __first,
@@ -2990,11 +1869,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function...
- * @endif
- */
+ /// This is a helper function...
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
_RandomAccessIterator
__unguarded_partition(_RandomAccessIterator __first,
@@ -3015,11 +1890,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Size>
void
__introsort_loop(_RandomAccessIterator __first,
@@ -3033,7 +1904,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__depth_limit == 0)
{
- std::partial_sort(__first, __last, __last);
+ _GLIBCXX_STD_P::partial_sort(__first, __last, __last);
return;
}
--__depth_limit;
@@ -3051,11 +1922,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routine.
- * @endif
- */
+ /// This is a helper function for the sort routine.
template<typename _RandomAccessIterator, typename _Size, typename _Compare>
void
__introsort_loop(_RandomAccessIterator __first,
@@ -3069,7 +1936,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
if (__depth_limit == 0)
{
- std::partial_sort(__first, __last, __last, __comp);
+ _GLIBCXX_STD_P::partial_sort(__first, __last, __last, __comp);
return;
}
--__depth_limit;
@@ -3088,91 +1955,30 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the sort routines.
- * @endif
- */
+ /// This is a helper function for the sort routines. Precondition: __n > 0.
template<typename _Size>
inline _Size
__lg(_Size __n)
{
_Size __k;
- for (__k = 0; __n != 1; __n >>= 1)
+ for (__k = 0; __n != 0; __n >>= 1)
++__k;
- return __k;
+ return __k - 1;
}
- /**
- * @brief Sort the elements of a sequence.
- * @param first An iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p *(i+1)<*i is false for each iterator @p i in the range
- * @p [first,last-1).
- *
- * The relative ordering of equivalent elements is not preserved, use
- * @p stable_sort() if this is needed.
- */
- template<typename _RandomAccessIterator>
- inline void
- sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first != __last)
- {
- std::__introsort_loop(__first, __last,
- std::__lg(__last - __first) * 2);
- std::__final_insertion_sort(__first, __last);
- }
- }
+ inline int
+ __lg(int __n)
+ { return sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); }
- /**
- * @brief Sort the elements of a sequence using a predicate for comparison.
- * @param first An iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p comp(*(i+1),*i) is false for every iterator @p i in the
- * range @p [first,last-1).
- *
- * The relative ordering of equivalent elements is not preserved, use
- * @p stable_sort() if this is needed.
- */
- template<typename _RandomAccessIterator, typename _Compare>
- inline void
- sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
+ inline long
+ __lg(long __n)
+ { return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _ValueType,
- _ValueType>)
- __glibcxx_requires_valid_range(__first, __last);
+ inline long long
+ __lg(long long __n)
+ { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
- if (__first != __last)
- {
- std::__introsort_loop(__first, __last,
- std::__lg(__last - __first) * 2, __comp);
- std::__final_insertion_sort(__first, __last, __comp);
- }
- }
+ // sort
template<typename _RandomAccessIterator, typename _Size>
void
@@ -3187,6 +1993,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
if (__depth_limit == 0)
{
std::__heap_select(__first, __nth + 1, __last);
+
// Place the nth largest element in its final position.
std::iter_swap(__first, __nth);
return;
@@ -3246,81 +2053,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__insertion_sort(__first, __last, __comp);
}
- /**
- * @brief Sort a sequence just enough to find a particular position.
- * @param first An iterator.
- * @param nth Another iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Rearranges the elements in the range @p [first,last) so that @p *nth
- * is the same element that would have been in that position had the
- * whole sequence been sorted.
- * whole sequence been sorted. The elements either side of @p *nth are
- * not completely sorted, but for any iterator @i in the range
- * @p [first,nth) and any iterator @j in the range @p [nth,last) it
- * holds that @p *j<*i is false.
- */
- template<typename _RandomAccessIterator>
- inline void
- nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
- _RandomAccessIterator __last)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
- __glibcxx_requires_valid_range(__first, __nth);
- __glibcxx_requires_valid_range(__nth, __last);
-
- if (__first == __last || __nth == __last)
- return;
-
- std::__introselect(__first, __nth, __last,
- std::__lg(__last - __first) * 2);
- }
-
- /**
- * @brief Sort a sequence just enough to find a particular position
- * using a predicate for comparison.
- * @param first An iterator.
- * @param nth Another iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Rearranges the elements in the range @p [first,last) so that @p *nth
- * is the same element that would have been in that position had the
- * whole sequence been sorted. The elements either side of @p *nth are
- * not completely sorted, but for any iterator @i in the range
- * @p [first,nth) and any iterator @j in the range @p [nth,last) it
- * holds that @p comp(*j,*i) is false.
- */
- template<typename _RandomAccessIterator, typename _Compare>
- inline void
- nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
- _RandomAccessIterator __last, _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType, _ValueType>)
- __glibcxx_requires_valid_range(__first, __nth);
- __glibcxx_requires_valid_range(__nth, __last);
-
- if (__first == __last || __nth == __last)
- return;
-
- std::__introselect(__first, __nth, __last,
- std::__lg(__last - __first) * 2, __comp);
- }
+ // nth_element
/**
* @brief Finds the first position in which @a val could be inserted
@@ -3328,8 +2061,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param first An iterator.
* @param last Another iterator.
* @param val The search term.
- * @return An iterator pointing to the first element "not less than" @a val,
- * or end() if every element is less than @a val.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val, or end() if every element is less than
+ * @a val.
* @ingroup binarysearch
*/
template<typename _ForwardIterator, typename _Tp>
@@ -3345,7 +2079,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
- __glibcxx_requires_partitioned(__first, __last, __val);
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3396,7 +2130,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType, _Tp>)
- __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3442,7 +2177,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
- __glibcxx_requires_partitioned(__first, __last, __val);
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3493,7 +2228,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>)
- __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3546,7 +2282,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
- __glibcxx_requires_partitioned(__first, __last, __val);
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3610,7 +2347,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType, _Tp>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>)
- __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
_DistanceType __len = std::distance(__first, __last);
_DistanceType __half;
@@ -3645,7 +2385,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param first An iterator.
* @param last Another iterator.
* @param val The search term.
- * @return True if @a val (or its equivelent) is in [@a first,@a last ].
+ * @return True if @a val (or its equivalent) is in [@a first,@a last ].
* @ingroup binarysearch
*
* Note that this does not actually return an iterator to @a val. For
@@ -3662,7 +2402,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
- __glibcxx_requires_partitioned(__first, __last, __val);
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
_ForwardIterator __i = std::lower_bound(__first, __last, __val);
return __i != __last && !(__val < *__i);
@@ -3674,7 +2415,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param last Another iterator.
* @param val The search term.
* @param comp A functor to use for comparisons.
- * @return True if @a val (or its equivelent) is in [@a first,@a last ].
+ * @return True if @a val (or its equivalent) is in [@a first,@a last ].
* @ingroup binarysearch
*
* Note that this does not actually return an iterator to @a val. For
@@ -3695,136 +2436,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_Tp, _ValueType>)
- __glibcxx_requires_partitioned_pred(__first, __last, __val, __comp);
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
_ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
return __i != __last && !bool(__comp(__val, *__i));
}
- /**
- * @brief Merges two sorted ranges.
- * @param first1 An iterator.
- * @param first2 Another iterator.
- * @param last1 Another iterator.
- * @param last2 Another iterator.
- * @param result An iterator pointing to the end of the merged range.
- * @return An iterator pointing to the first element "not less than" @a val.
- *
- * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
- * [result, result + (last1-first1) + (last2-first2)). Both input ranges
- * must be sorted, and the output range must not overlap with either of
- * the input ranges. The sort is @e stable, that is, for equivalent
- * elements in the two ranges, elements from the first range will always
- * come before elements from the second.
- */
- template<typename _InputIterator1, typename _InputIterator2,
- typename _OutputIterator>
- _OutputIterator
- merge(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2,
- _OutputIterator __result)
- {
- typedef typename iterator_traits<_InputIterator1>::value_type
- _ValueType1;
- typedef typename iterator_traits<_InputIterator2>::value_type
- _ValueType2;
+ // merge
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- _ValueType1>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- _ValueType2>)
- __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
-
- while (__first1 != __last1 && __first2 != __last2)
- {
- if (*__first2 < *__first1)
- {
- *__result = *__first2;
- ++__first2;
- }
- else
- {
- *__result = *__first1;
- ++__first1;
- }
- ++__result;
- }
- return std::copy(__first2, __last2, std::copy(__first1, __last1,
- __result));
- }
-
- /**
- * @brief Merges two sorted ranges.
- * @param first1 An iterator.
- * @param first2 Another iterator.
- * @param last1 Another iterator.
- * @param last2 Another iterator.
- * @param result An iterator pointing to the end of the merged range.
- * @param comp A functor to use for comparisons.
- * @return An iterator pointing to the first element "not less than" @a val.
- *
- * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
- * [result, result + (last1-first1) + (last2-first2)). Both input ranges
- * must be sorted, and the output range must not overlap with either of
- * the input ranges. The sort is @e stable, that is, for equivalent
- * elements in the two ranges, elements from the first range will always
- * come before elements from the second.
- *
- * The comparison function should have the same effects on ordering as
- * the function used for the initial sort.
- */
- template<typename _InputIterator1, typename _InputIterator2,
- typename _OutputIterator, typename _Compare>
- _OutputIterator
- merge(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2,
- _OutputIterator __result, _Compare __comp)
- {
- typedef typename iterator_traits<_InputIterator1>::value_type
- _ValueType1;
- typedef typename iterator_traits<_InputIterator2>::value_type
- _ValueType2;
-
- // concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- _ValueType1>)
- __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
- _ValueType2>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
-
- while (__first1 != __last1 && __first2 != __last2)
- {
- if (__comp(*__first2, *__first1))
- {
- *__result = *__first2;
- ++__first2;
- }
- else
- {
- *__result = *__first1;
- ++__first1;
- }
- ++__result;
- }
- return std::copy(__first2, __last2, std::copy(__first1, __last1,
- __result));
- }
-
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3>
_BidirectionalIterator3
@@ -3859,11 +2482,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3, typename _Compare>
_BidirectionalIterator3
@@ -3899,11 +2518,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _Distance>
_BidirectionalIterator1
@@ -3935,11 +2550,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator, typename _Distance,
typename _Pointer>
void
@@ -3952,7 +2563,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__first, __middle, __buffer);
- std::merge(__buffer, __buffer_end, __middle, __last, __first);
+ _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ __first);
}
else if (__len2 <= __buffer_size)
{
@@ -3994,13 +2606,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
- template<typename _BidirectionalIterator, typename _Distance, typename _Pointer,
- typename _Compare>
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Pointer, typename _Compare>
void
__merge_adaptive(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
@@ -4012,7 +2620,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = std::copy(__first, __middle, __buffer);
- std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
+ _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ __first, __comp);
}
else if (__len2 <= __buffer_size)
{
@@ -4055,11 +2664,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator, typename _Distance>
void
__merge_without_buffer(_BidirectionalIterator __first,
@@ -4102,11 +2707,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__len1 - __len11, __len2 - __len22);
}
- /**
- * @if maint
- * This is a helper function for the merge routines.
- * @endif
- */
+ /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator, typename _Distance,
typename _Compare>
void
@@ -4273,15 +2874,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__last - __first >= __two_step)
{
- __result = std::merge(__first, __first + __step_size,
- __first + __step_size, __first + __two_step,
- __result);
+ __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size,
+ __first + __two_step,
+ __result);
__first += __two_step;
}
__step_size = std::min(_Distance(__last - __first), __step_size);
- std::merge(__first, __first + __step_size, __first + __step_size, __last,
- __result);
+ _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size, __last,
+ __result);
}
template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
@@ -4296,7 +2899,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__last - __first >= __two_step)
{
- __result = std::merge(__first, __first + __step_size,
+ __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
__first + __step_size, __first + __two_step,
__result,
__comp);
@@ -4304,10 +2907,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
__step_size = std::min(_Distance(__last - __first), __step_size);
- std::merge(__first, __first + __step_size,
- __first + __step_size, __last,
- __result,
- __comp);
+ _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size, __last, __result, __comp);
}
template<typename _RandomAccessIterator, typename _Distance>
@@ -4324,7 +2925,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::__insertion_sort(__first, __last);
}
- template<typename _RandomAccessIterator, typename _Distance, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Distance,
+ typename _Compare>
void
__chunk_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last,
@@ -4446,11 +3048,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__comp);
}
- /**
- * @if maint
- * This is a helper function for the stable sorting routines.
- * @endif
- */
+ /// This is a helper function for the stable sorting routines.
template<typename _RandomAccessIterator>
void
__inplace_stable_sort(_RandomAccessIterator __first,
@@ -4469,11 +3067,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__last - __middle);
}
- /**
- * @if maint
- * This is a helper function for the stable sorting routines.
- * @endif
- */
+ /// This is a helper function for the stable sorting routines.
template<typename _RandomAccessIterator, typename _Compare>
void
__inplace_stable_sort(_RandomAccessIterator __first,
@@ -4493,89 +3087,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__comp);
}
- /**
- * @brief Sort the elements of a sequence, preserving the relative order
- * of equivalent elements.
- * @param first An iterator.
- * @param last Another iterator.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p *(i+1)<*i is false for each iterator @p i in the range
- * @p [first,last-1).
- *
- * The relative ordering of equivalent elements is preserved, so any two
- * elements @p x and @p y in the range @p [first,last) such that
- * @p x<y is false and @p y<x is false will have the same relative
- * ordering after calling @p stable_sort().
- */
- template<typename _RandomAccessIterator>
- inline void
- stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
- typedef typename iterator_traits<_RandomAccessIterator>::difference_type
- _DistanceType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
- __glibcxx_requires_valid_range(__first, __last);
-
- _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
- __last);
- if (__buf.begin() == 0)
- std::__inplace_stable_sort(__first, __last);
- else
- std::__stable_sort_adaptive(__first, __last, __buf.begin(),
- _DistanceType(__buf.size()));
- }
-
- /**
- * @brief Sort the elements of a sequence using a predicate for comparison,
- * preserving the relative order of equivalent elements.
- * @param first An iterator.
- * @param last Another iterator.
- * @param comp A comparison functor.
- * @return Nothing.
- *
- * Sorts the elements in the range @p [first,last) in ascending order,
- * such that @p comp(*(i+1),*i) is false for each iterator @p i in the
- * range @p [first,last-1).
- *
- * The relative ordering of equivalent elements is preserved, so any two
- * elements @p x and @p y in the range @p [first,last) such that
- * @p comp(x,y) is false and @p comp(y,x) is false will have the same
- * relative ordering after calling @p stable_sort().
- */
- template<typename _RandomAccessIterator, typename _Compare>
- inline void
- stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _Compare __comp)
- {
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
- typedef typename iterator_traits<_RandomAccessIterator>::difference_type
- _DistanceType;
-
- // concept requirements
- __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
- _RandomAccessIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- _ValueType,
- _ValueType>)
- __glibcxx_requires_valid_range(__first, __last);
-
- _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
- __last);
- if (__buf.begin() == 0)
- std::__inplace_stable_sort(__first, __last, __comp);
- else
- std::__stable_sort_adaptive(__first, __last, __buf.begin(),
- _DistanceType(__buf.size()), __comp);
- }
+ // stable_sort
// Set algorithms: includes, set_union, set_intersection, set_difference,
// set_symmetric_difference. All of these algorithms have the precondition
@@ -4613,8 +3125,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
while (__first1 != __last1 && __first2 != __last2)
if (*__first2 < *__first1)
@@ -4650,7 +3162,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename _Compare>
bool
includes(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _Compare __comp)
{
typedef typename iterator_traits<_InputIterator1>::value_type
_ValueType1;
@@ -4664,8 +3177,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1, _ValueType2>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first2, *__first1))
@@ -4678,6 +3191,1845 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first2 == __last2;
}
+ // nth_element
+ // merge
+ // set_difference
+ // set_intersection
+ // set_union
+ // stable_sort
+ // set_symmetric_difference
+ // min_element
+ // max_element
+
+ /**
+ * @brief Permute range into the next "dictionary" ordering.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the next one of this set.
+ * Returns true if there are more sequences to generate. If the sequence
+ * is the largest of the set, the smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator>
+ bool
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__i < *__ii)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*__i < *--__j))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the next "dictionary" ordering using
+ * comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp A comparison functor.
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the next one of this set. Returns true if there are more
+ * sequences to generate. If the sequence is the largest of the set, the
+ * smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
+ bool
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__comp(*__i, *__ii))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!bool(__comp(*__i, *--__j)))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the previous "dictionary" ordering.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the previous one of this
+ * set. Returns true if there are more sequences to generate. If the
+ * sequence is the smallest of the set, the largest is generated and false
+ * returned.
+ */
+ template<typename _BidirectionalIterator>
+ bool
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__ii < *__i)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*--__j < *__i))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the previous "dictionary" ordering using
+ * comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp A comparison functor.
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the previous one of this set. Returns true if there are
+ * more sequences to generate. If the sequence is the smallest of the set,
+ * the largest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
+ bool
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__comp(*__ii, *__i))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!bool(__comp(*--__j, *__i)))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ // replace
+ // replace_if
+
+ /**
+ * @brief Copy a sequence, replacing each element of one value with another
+ * value.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param old_value The value to be replaced.
+ * @param new_value The replacement value.
+ * @return The end of the output sequence, @p result+(last-first).
+ *
+ * Copies each element in the input range @p [first,last) to the
+ * output range @p [result,result+(last-first)) replacing elements
+ * equal to @p old_value with @p new_value.
+ */
+ template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+ _OutputIterator
+ replace_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ const _Tp& __old_value, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ if (*__first == __old_value)
+ *__result = __new_value;
+ else
+ *__result = *__first;
+ return __result;
+ }
+
+ /**
+ * @brief Copy a sequence, replacing each value for which a predicate
+ * returns true with another value.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param pred A predicate.
+ * @param new_value The replacement value.
+ * @return The end of the output sequence, @p result+(last-first).
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * @p [result,result+(last-first)) replacing elements for which
+ * @p pred returns true with @p new_value.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate, typename _Tp>
+ _OutputIterator
+ replace_copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ _Predicate __pred, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ if (__pred(*__first))
+ *__result = __new_value;
+ else
+ *__result = *__first;
+ return __result;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Determines whether the elements of a sequence are sorted.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return True if the elements are sorted, false otherwise.
+ */
+ template<typename _ForwardIterator>
+ inline bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last)
+ { return std::is_sorted_until(__first, __last) == __last; }
+
+ /**
+ * @brief Determines whether the elements of a sequence are sorted
+ * according to a comparison functor.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return True if the elements are sorted, false otherwise.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ inline bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ { return std::is_sorted_until(__first, __last, __comp) == __last; }
+
+ /**
+ * @brief Determines the end of a sorted sequence.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return An iterator pointing to the last iterator i in [first, last)
+ * for which the range [first, i) is sorted.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __last;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (*__next < *__first)
+ return __next;
+ return __next;
+ }
+
+ /**
+ * @brief Determines the end of a sorted sequence using comparison functor.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return An iterator pointing to the last iterator i in [first, last)
+ * for which the range [first, i) is sorted.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __last;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (__comp(*__next, *__first))
+ return __next;
+ return __next;
+ }
+
+ /**
+ * @brief Determines min and max at once as an ordered pair.
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+ */
+ template<typename _Tp>
+ inline pair<const _Tp&, const _Tp&>
+ minmax(const _Tp& __a, const _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+
+ return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a)
+ : pair<const _Tp&, const _Tp&>(__a, __b);
+ }
+
+ /**
+ * @brief Determines min and max at once as an ordered pair.
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @param comp A @link s20_3_3_comparisons comparison functor@endlink.
+ * @return A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+ */
+ template<typename _Tp, typename _Compare>
+ inline pair<const _Tp&, const _Tp&>
+ minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
+ {
+ return __comp(__b, __a) ? pair<const _Tp&, const _Tp&>(__b, __a)
+ : pair<const _Tp&, const _Tp&>(__a, __b);
+ }
+
+ /**
+ * @brief Return a pair of iterators pointing to the minimum and maximum
+ * elements in a range.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return make_pair(m, M), where m is the first iterator i in
+ * [first, last) such that no other element in the range is
+ * smaller, and where M is the last iterator i in [first, last)
+ * such that no other element in the range is larger.
+ */
+ template<typename _ForwardIterator>
+ pair<_ForwardIterator, _ForwardIterator>
+ minmax_element(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _ForwardIterator __next = __first;
+ if (__first == __last
+ || ++__next == __last)
+ return std::make_pair(__first, __first);
+
+ _ForwardIterator __min, __max;
+ if (*__next < *__first)
+ {
+ __min = __next;
+ __max = __first;
+ }
+ else
+ {
+ __min = __first;
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+
+ while (__first != __last)
+ {
+ __next = __first;
+ if (++__next == __last)
+ {
+ if (*__first < *__min)
+ __min = __first;
+ else if (!(*__first < *__max))
+ __max = __first;
+ break;
+ }
+
+ if (*__next < *__first)
+ {
+ if (*__next < *__min)
+ __min = __next;
+ if (!(*__first < *__max))
+ __max = __first;
+ }
+ else
+ {
+ if (*__first < *__min)
+ __min = __first;
+ if (!(*__next < *__max))
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+ }
+
+ return std::make_pair(__min, __max);
+ }
+
+ /**
+ * @brief Return a pair of iterators pointing to the minimum and maximum
+ * elements in a range.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return make_pair(m, M), where m is the first iterator i in
+ * [first, last) such that no other element in the range is
+ * smaller, and where M is the last iterator i in [first, last)
+ * such that no other element in the range is larger.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ pair<_ForwardIterator, _ForwardIterator>
+ minmax_element(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _ForwardIterator __next = __first;
+ if (__first == __last
+ || ++__next == __last)
+ return std::make_pair(__first, __first);
+
+ _ForwardIterator __min, __max;
+ if (__comp(*__next, *__first))
+ {
+ __min = __next;
+ __max = __first;
+ }
+ else
+ {
+ __min = __first;
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+
+ while (__first != __last)
+ {
+ __next = __first;
+ if (++__next == __last)
+ {
+ if (__comp(*__first, *__min))
+ __min = __first;
+ else if (!__comp(*__first, *__max))
+ __max = __first;
+ break;
+ }
+
+ if (__comp(*__next, *__first))
+ {
+ if (__comp(*__next, *__min))
+ __min = __next;
+ if (!__comp(*__first, *__max))
+ __max = __first;
+ }
+ else
+ {
+ if (__comp(*__first, *__min))
+ __min = __first;
+ if (!__comp(*__next, *__max))
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+ }
+
+ return std::make_pair(__min, __max);
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ /**
+ * @brief Apply a function to every element of a sequence.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param f A unary function object.
+ * @return @p f.
+ *
+ * Applies the function object @p f to each element in the range
+ * @p [first,last). @p f must not modify the order of the sequence.
+ * If @p f has a return value it is ignored.
+ */
+ template<typename _InputIterator, typename _Function>
+ _Function
+ for_each(_InputIterator __first, _InputIterator __last, _Function __f)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ for (; __first != __last; ++__first)
+ __f(*__first);
+ return __f;
+ }
+
+ /**
+ * @brief Find the first occurrence of a value in a sequence.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param val The value to find.
+ * @return The first iterator @c i in the range @p [first,last)
+ * such that @c *i == @p val, or @p last if no such iterator exists.
+ */
+ template<typename _InputIterator, typename _Tp>
+ inline _InputIterator
+ find(_InputIterator __first, _InputIterator __last,
+ const _Tp& __val)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::__find(__first, __last, __val,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Find the first element in a sequence for which a
+ * predicate is true.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return The first iterator @c i in the range @p [first,last)
+ * such that @p pred(*i) is true, or @p last if no such iterator exists.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ find_if(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::__find_if(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Find element from a set in a sequence.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c *i == @p *(i2) such that i2 is an
+ * iterator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for an element that is equal to
+ * some element in the range [first2,last2). If found, returns an iterator
+ * in the range [first1,last1), otherwise returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ for (; __first1 != __last1; ++__first1)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+ if (*__first1 == *__iter)
+ return __first1;
+ return __last1;
+ }
+
+ /**
+ * @brief Find element from a set in a sequence using a predicate.
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @param comp Predicate to use.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c comp(*i, @p *(i2)) is true and i2 is an
+ * iterator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+
+ * Searches the range @p [first1,last1) for an element that is
+ * equal to some element in the range [first2,last2). If found,
+ * returns an iterator in the range [first1,last1), otherwise
+ * returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _BinaryPredicate>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2,
+ _BinaryPredicate __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ for (; __first1 != __last1; ++__first1)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+ if (__comp(*__first1, *__iter))
+ return __first1;
+ return __last1;
+ }
+
+ /**
+ * @brief Find two adjacent values in a sequence that are equal.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @return The first iterator @c i such that @c i and @c i+1 are both
+ * valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
+ * or @p last if no such iterator exists.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ if (__first == __last)
+ return __last;
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (*__first == *__next)
+ return __first;
+ __first = __next;
+ }
+ return __last;
+ }
+
+ /**
+ * @brief Find two adjacent values in a sequence using a predicate.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param binary_pred A binary predicate.
+ * @return The first iterator @c i such that @c i and @c i+1 are both
+ * valid iterators in @p [first,last) and such that
+ * @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
+ * exists.
+ */
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ if (__first == __last)
+ return __last;
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ return __first;
+ __first = __next;
+ }
+ return __last;
+ }
+
+ /**
+ * @brief Count the number of copies of a value in a sequence.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param value The value to be counted.
+ * @return The number of iterators @c i in the range @p [first,last)
+ * for which @c *i == @p value
+ */
+ template<typename _InputIterator, typename _Tp>
+ typename iterator_traits<_InputIterator>::difference_type
+ count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ for (; __first != __last; ++__first)
+ if (*__first == __value)
+ ++__n;
+ return __n;
+ }
+
+ /**
+ * @brief Count the elements of a sequence for which a predicate is true.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return The number of iterators @c i in the range @p [first,last)
+ * for which @p pred(*i) is true.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ typename iterator_traits<_InputIterator>::difference_type
+ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ ++__n;
+ return __n;
+ }
+
+ /**
+ * @brief Search a sequence for a matching sub-sequence.
+ * @param first1 A forward iterator.
+ * @param last1 A forward iterator.
+ * @param first2 A forward iterator.
+ * @param last2 A forward iterator.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+ * for each @c N in the range @p [0,last2-first2), or @p last1 if no
+ * such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) and
+ * returns an iterator to the first element of the sub-sequence, or
+ * @p last1 if the sub-sequence is not found.
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIterator2 __p1(__first2);
+ if (++__p1 == __last2)
+ return _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+
+ // General case.
+ _ForwardIterator2 __p;
+ _ForwardIterator1 __current = __first1;
+
+ for (;;)
+ {
+ __first1 = _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+ if (__first1 == __last1)
+ return __last1;
+
+ __p = __p1;
+ __current = __first1;
+ if (++__current == __last1)
+ return __last1;
+
+ while (*__current == *__p)
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
+ return __first1;
+ }
+
+ /**
+ * @brief Search a sequence for a matching sub-sequence using a predicate.
+ * @param first1 A forward iterator.
+ * @param last1 A forward iterator.
+ * @param first2 A forward iterator.
+ * @param last2 A forward iterator.
+ * @param predicate A binary predicate.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that
+ * @p predicate(*(i+N),*(first2+N)) is true for each @c N in the range
+ * @p [0,last2-first2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2),
+ * using @p predicate to determine equality, and returns an iterator
+ * to the first element of the sub-sequence, or @p last1 if no such
+ * iterator exists.
+ *
+ * @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
+ typename _BinaryPredicate>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ _BinaryPredicate __predicate)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIterator2 __p1(__first2);
+ if (++__p1 == __last2)
+ {
+ while (__first1 != __last1
+ && !bool(__predicate(*__first1, *__first2)))
+ ++__first1;
+ return __first1;
+ }
+
+ // General case.
+ _ForwardIterator2 __p;
+ _ForwardIterator1 __current = __first1;
+
+ for (;;)
+ {
+ while (__first1 != __last1
+ && !bool(__predicate(*__first1, *__first2)))
+ ++__first1;
+ if (__first1 == __last1)
+ return __last1;
+
+ __p = __p1;
+ __current = __first1;
+ if (++__current == __last1)
+ return __last1;
+
+ while (__predicate(*__current, *__p))
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
+ return __first1;
+ }
+
+
+ /**
+ * @brief Search a sequence for a number of consecutive values.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param count The number of consecutive values.
+ * @param val The value to find.
+ * @return The first iterator @c i in the range @p [first,last-count)
+ * such that @c *(i+N) == @p val for each @c N in the range @p [0,count),
+ * or @p last if no such iterator exists.
+ *
+ * Searches the range @p [first,last) for @p count consecutive elements
+ * equal to @p val.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__count <= 0)
+ return __first;
+ if (__count == 1)
+ return _GLIBCXX_STD_P::find(__first, __last, __val);
+ return std::__search_n(__first, __last, __count, __val,
+ std::__iterator_category(__first));
+ }
+
+
+ /**
+ * @brief Search a sequence for a number of consecutive values using a
+ * predicate.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param count The number of consecutive values.
+ * @param val The value to find.
+ * @param binary_pred A binary predicate.
+ * @return The first iterator @c i in the range @p [first,last-count)
+ * such that @p binary_pred(*(i+N),val) is true for each @c N in the
+ * range @p [0,count), or @p last if no such iterator exists.
+ *
+ * Searches the range @p [first,last) for @p count consecutive elements
+ * for which the predicate returns true.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__count <= 0)
+ return __first;
+ if (__count == 1)
+ {
+ while (__first != __last && !bool(__binary_pred(*__first, __val)))
+ ++__first;
+ return __first;
+ }
+ return std::__search_n(__first, __last, __count, __val, __binary_pred,
+ std::__iterator_category(__first));
+ }
+
+
+ /**
+ * @brief Perform an operation on a sequence.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param unary_op A unary operator.
+ * @return An output iterator equal to @p result+(last-first).
+ *
+ * Applies the operator to each element in the input range and assigns
+ * the results to successive elements of the output sequence.
+ * Evaluates @p *(result+N)=unary_op(*(first+N)) for each @c N in the
+ * range @p [0,last-first).
+ *
+ * @p unary_op must not alter its argument.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _UnaryOperation>
+ _OutputIterator
+ transform(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _UnaryOperation __unary_op)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _UnaryOperation"
+ __typeof__(__unary_op(*__first))>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ *__result = __unary_op(*__first);
+ return __result;
+ }
+
+ /**
+ * @brief Perform an operation on corresponding elements of two sequences.
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param result An output iterator.
+ * @param binary_op A binary operator.
+ * @return An output iterator equal to @p result+(last-first).
+ *
+ * Applies the operator to the corresponding elements in the two
+ * input ranges and assigns the results to successive elements of the
+ * output sequence.
+ * Evaluates @p *(result+N)=binary_op(*(first1+N),*(first2+N)) for each
+ * @c N in the range @p [0,last1-first1).
+ *
+ * @p binary_op must not alter either of its arguments.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _BinaryOperation>
+ _OutputIterator
+ transform(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _OutputIterator __result,
+ _BinaryOperation __binary_op)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _BinaryOperation"
+ __typeof__(__binary_op(*__first1,*__first2))>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2, ++__result)
+ *__result = __binary_op(*__first1, *__first2);
+ return __result;
+ }
+
+ /**
+ * @brief Replace each occurrence of one value in a sequence with another
+ * value.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param old_value The value to be replaced.
+ * @param new_value The replacement value.
+ * @return replace() returns no value.
+ *
+ * For each iterator @c i in the range @p [first,last) if @c *i ==
+ * @p old_value then the assignment @c *i = @p new_value is performed.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ void
+ replace(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __old_value, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (*__first == __old_value)
+ *__first = __new_value;
+ }
+
+ /**
+ * @brief Replace each value in a sequence for which a predicate returns
+ * true with another value.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate.
+ * @param new_value The replacement value.
+ * @return replace_if() returns no value.
+ *
+ * For each iterator @c i in the range @p [first,last) if @p pred(*i)
+ * is true then the assignment @c *i = @p new_value is performed.
+ */
+ template<typename _ForwardIterator, typename _Predicate, typename _Tp>
+ void
+ replace_if(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ *__first = __new_value;
+ }
+
+ /**
+ * @brief Assign the result of a function object to each value in a
+ * sequence.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param gen A function object taking no arguments and returning
+ * std::iterator_traits<_ForwardIterator>::value_type
+ * @return generate() returns no value.
+ *
+ * Performs the assignment @c *i = @p gen() for each @c i in the range
+ * @p [first,last).
+ */
+ template<typename _ForwardIterator, typename _Generator>
+ void
+ generate(_ForwardIterator __first, _ForwardIterator __last,
+ _Generator __gen)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_GeneratorConcept<_Generator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ *__first = __gen();
+ }
+
+ /**
+ * @brief Assign the result of a function object to each value in a
+ * sequence.
+ * @param first A forward iterator.
+ * @param n The length of the sequence.
+ * @param gen A function object taking no arguments and returning
+ * std::iterator_traits<_ForwardIterator>::value_type
+ * @return The end of the sequence, @p first+n
+ *
+ * Performs the assignment @c *i = @p gen() for each @c i in the range
+ * @p [first,first+n).
+ */
+ template<typename _OutputIterator, typename _Size, typename _Generator>
+ _OutputIterator
+ generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _Generator"
+ __typeof__(__gen())>)
+
+ for (; __n > 0; --__n, ++__first)
+ *__first = __gen();
+ return __first;
+ }
+
+
+ /**
+ * @brief Copy a sequence, removing consecutive duplicate values.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * beginning at @p result, except that only the first element is copied
+ * from groups of consecutive elements that compare equal.
+ * unique_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 241. Does unique_copy() require CopyConstructible and Assignable?
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 538. 241 again: Does unique_copy() require CopyConstructible and
+ * Assignable?
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ return std::__unique_copy(__first, __last, __result,
+ std::__iterator_category(__first),
+ std::__iterator_category(__result));
+ }
+
+ /**
+ * @brief Copy a sequence, removing consecutive values using a predicate.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param binary_pred A binary predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * beginning at @p result, except that only the first element is copied
+ * from groups of consecutive elements for which @p binary_pred returns
+ * true.
+ * unique_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 241. Does unique_copy() require CopyConstructible and Assignable?
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements -- predicates checked later
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ return std::__unique_copy(__first, __last, __result, __binary_pred,
+ std::__iterator_category(__first),
+ std::__iterator_category(__result));
+ }
+
+
+ /**
+ * @brief Randomly shuffle the elements of a sequence.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @return Nothing.
+ *
+ * Reorder the elements in the range @p [first,last) using a random
+ * distribution, so that every possible ordering of the sequence is
+ * equally likely.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
+ }
+
+ /**
+ * @brief Shuffle the elements of a sequence using a random number
+ * generator.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param rand The RNG functor or function.
+ * @return Nothing.
+ *
+ * Reorders the elements in the range @p [first,last) using @p rand to
+ * provide a random distribution. Calling @p rand(N) for a positive
+ * integer @p N should return a randomly chosen integer from the
+ * range [0,N).
+ */
+ template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
+ void
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomNumberGenerator& __rand)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return;
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + __rand((__i - __first) + 1));
+ }
+
+
+ /**
+ * @brief Move elements for which a predicate is true to the beginning
+ * of a sequence.
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate functor.
+ * @return An iterator @p middle such that @p pred(i) is true for each
+ * iterator @p i in the range @p [first,middle) and false for each @p i
+ * in the range @p [middle,last).
+ *
+ * @p pred must not modify its operand. @p partition() does not preserve
+ * the relative ordering of elements in each group, use
+ * @p stable_partition() if this is needed.
+ */
+ template<typename _ForwardIterator, typename _Predicate>
+ inline _ForwardIterator
+ partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return std::__partition(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+
+
+
+ /**
+ * @brief Sort the smallest elements of a sequence.
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the smallest @p (middle-first) elements in the range
+ * @p [first,last) and moves them to the range @p [first,middle). The
+ * order of the remaining elements in the range @p [middle,last) is
+ * undefined.
+ * After the sort if @p i and @j are iterators in the range
+ * @p [first,middle) such that @i precedes @j and @k is an iterator in
+ * the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ std::__heap_select(__first, __middle, __last);
+ std::sort_heap(__first, __middle);
+ }
+
+ /**
+ * @brief Sort the smallest elements of a sequence using a predicate
+ * for comparison.
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the smallest @p (middle-first) elements in the range
+ * @p [first,last) and moves them to the range @p [first,middle). The
+ * order of the remaining elements in the range @p [middle,last) is
+ * undefined.
+ * After the sort if @p i and @j are iterators in the range
+ * @p [first,middle) such that @i precedes @j and @k is an iterator in
+ * the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
+ * are both false.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ std::__heap_select(__first, __middle, __last, __comp);
+ std::sort_heap(__first, __middle, __comp);
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position.
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted.
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p *j<*i is false.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ if (__first == __last || __nth == __last)
+ return;
+
+ std::__introselect(__first, __nth, __last,
+ std::__lg(__last - __first) * 2);
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position
+ * using a predicate for comparison.
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p comp(*j,*i) is false.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ if (__first == __last || __nth == __last)
+ return;
+
+ std::__introselect(__first, __nth, __last,
+ std::__lg(__last - __first) * 2, __comp);
+ }
+
+
+ /**
+ * @brief Sort the elements of a sequence.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last,
+ std::__lg(__last - __first) * 2);
+ std::__final_insertion_sort(__first, __last);
+ }
+ }
+
+ /**
+ * @brief Sort the elements of a sequence using a predicate for comparison.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for every iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last,
+ std::__lg(__last - __first) * 2, __comp);
+ std::__final_insertion_sort(__first, __last, __comp);
+ }
+ }
+
+ /**
+ * @brief Merges two sorted ranges.
+ * @param first1 An iterator.
+ * @param first2 Another iterator.
+ * @param last1 Another iterator.
+ * @param last2 Another iterator.
+ * @param result An iterator pointing to the end of the merged range.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val.
+ *
+ * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+ * [result, result + (last1-first1) + (last2-first2)). Both input ranges
+ * must be sorted, and the output range must not overlap with either of
+ * the input ranges. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+ /**
+ * @brief Merges two sorted ranges.
+ * @param first1 An iterator.
+ * @param first2 Another iterator.
+ * @param last1 Another iterator.
+ * @param last2 Another iterator.
+ * @param result An iterator pointing to the end of the merged range.
+ * @param comp A functor to use for comparisons.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val.
+ *
+ * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+ * [result, result + (last1-first1) + (last2-first2)). Both input ranges
+ * must be sorted, and the output range must not overlap with either of
+ * the input ranges. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__comp(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+
+ /**
+ * @brief Sort the elements of a sequence, preserving the relative order
+ * of equivalent elements.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p x<y is false and @p y<x is false will have the same relative
+ * ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last);
+ else
+ std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+ _DistanceType(__buf.size()));
+ }
+
+ /**
+ * @brief Sort the elements of a sequence using a predicate for comparison,
+ * preserving the relative order of equivalent elements.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for each iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p comp(x,y) is false and @p comp(y,x) is false will have the same
+ * relative ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last, __comp);
+ else
+ std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+ _DistanceType(__buf.size()), __comp);
+ }
+
+
/**
* @brief Return the union of two sorted ranges.
* @param first1 Start of first range.
@@ -4716,8 +5068,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
while (__first1 != __last1 && __first2 != __last2)
{
@@ -4784,8 +5136,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1, _ValueType2>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
while (__first1 != __last1 && __first2 != __last2)
{
@@ -4846,8 +5198,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
@@ -4904,8 +5256,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1, _ValueType2>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
@@ -4959,8 +5311,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
@@ -5021,8 +5373,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1, _ValueType2>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
@@ -5078,8 +5430,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted(__first1, __last1);
- __glibcxx_requires_sorted(__first2, __last2);
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
@@ -5146,8 +5498,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ValueType1, _ValueType2>)
__glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
_ValueType2, _ValueType1>)
- __glibcxx_requires_sorted_pred(__first1, __last1, __comp);
- __glibcxx_requires_sorted_pred(__first2, __last2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
@@ -5167,12 +5519,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
++__first1;
++__first2;
}
- return std::copy(__first2, __last2, std::copy(__first1,
- __last1, __result));
+ return std::copy(__first2, __last2,
+ std::copy(__first1, __last1, __result));
}
- // min_element and max_element, with and without an explicitly supplied
- // comparison function.
/**
* @brief Return the minimum element in a range.
@@ -5281,230 +5631,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __result;
}
- // next_permutation and prev_permutation, with and without an explicitly
- // supplied comparison function.
-
- /**
- * @brief Permute range into the next "dictionary" ordering.
- * @param first Start of range.
- * @param last End of range.
- * @return False if wrapped to first permutation, true otherwise.
- *
- * Treats all permutations of the range as a set of "dictionary" sorted
- * sequences. Permutes the current sequence into the next one of this set.
- * Returns true if there are more sequences to generate. If the sequence
- * is the largest of the set, the smallest is generated and false returned.
- */
- template<typename _BidirectionalIterator>
- bool
- next_permutation(_BidirectionalIterator __first,
- _BidirectionalIterator __last)
- {
- // concept requirements
- __glibcxx_function_requires(_BidirectionalIteratorConcept<
- _BidirectionalIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_BidirectionalIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return false;
- _BidirectionalIterator __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;)
- {
- _BidirectionalIterator __ii = __i;
- --__i;
- if (*__i < *__ii)
- {
- _BidirectionalIterator __j = __last;
- while (!(*__i < *--__j))
- {}
- std::iter_swap(__i, __j);
- std::reverse(__ii, __last);
- return true;
- }
- if (__i == __first)
- {
- std::reverse(__first, __last);
- return false;
- }
- }
- }
-
- /**
- * @brief Permute range into the next "dictionary" ordering using
- * comparison functor.
- * @param first Start of range.
- * @param last End of range.
- * @param comp
- * @return False if wrapped to first permutation, true otherwise.
- *
- * Treats all permutations of the range [first,last) as a set of
- * "dictionary" sorted sequences ordered by @a comp. Permutes the current
- * sequence into the next one of this set. Returns true if there are more
- * sequences to generate. If the sequence is the largest of the set, the
- * smallest is generated and false returned.
- */
- template<typename _BidirectionalIterator, typename _Compare>
- bool
- next_permutation(_BidirectionalIterator __first,
- _BidirectionalIterator __last, _Compare __comp)
- {
- // concept requirements
- __glibcxx_function_requires(_BidirectionalIteratorConcept<
- _BidirectionalIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_BidirectionalIterator>::value_type,
- typename iterator_traits<_BidirectionalIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return false;
- _BidirectionalIterator __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;)
- {
- _BidirectionalIterator __ii = __i;
- --__i;
- if (__comp(*__i, *__ii))
- {
- _BidirectionalIterator __j = __last;
- while (!bool(__comp(*__i, *--__j)))
- {}
- std::iter_swap(__i, __j);
- std::reverse(__ii, __last);
- return true;
- }
- if (__i == __first)
- {
- std::reverse(__first, __last);
- return false;
- }
- }
- }
-
- /**
- * @brief Permute range into the previous "dictionary" ordering.
- * @param first Start of range.
- * @param last End of range.
- * @return False if wrapped to last permutation, true otherwise.
- *
- * Treats all permutations of the range as a set of "dictionary" sorted
- * sequences. Permutes the current sequence into the previous one of this
- * set. Returns true if there are more sequences to generate. If the
- * sequence is the smallest of the set, the largest is generated and false
- * returned.
- */
- template<typename _BidirectionalIterator>
- bool
- prev_permutation(_BidirectionalIterator __first,
- _BidirectionalIterator __last)
- {
- // concept requirements
- __glibcxx_function_requires(_BidirectionalIteratorConcept<
- _BidirectionalIterator>)
- __glibcxx_function_requires(_LessThanComparableConcept<
- typename iterator_traits<_BidirectionalIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return false;
- _BidirectionalIterator __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;)
- {
- _BidirectionalIterator __ii = __i;
- --__i;
- if (*__ii < *__i)
- {
- _BidirectionalIterator __j = __last;
- while (!(*--__j < *__i))
- {}
- std::iter_swap(__i, __j);
- std::reverse(__ii, __last);
- return true;
- }
- if (__i == __first)
- {
- std::reverse(__first, __last);
- return false;
- }
- }
- }
-
- /**
- * @brief Permute range into the previous "dictionary" ordering using
- * comparison functor.
- * @param first Start of range.
- * @param last End of range.
- * @param comp
- * @return False if wrapped to last permutation, true otherwise.
- *
- * Treats all permutations of the range [first,last) as a set of
- * "dictionary" sorted sequences ordered by @a comp. Permutes the current
- * sequence into the previous one of this set. Returns true if there are
- * more sequences to generate. If the sequence is the smallest of the set,
- * the largest is generated and false returned.
- */
- template<typename _BidirectionalIterator, typename _Compare>
- bool
- prev_permutation(_BidirectionalIterator __first,
- _BidirectionalIterator __last, _Compare __comp)
- {
- // concept requirements
- __glibcxx_function_requires(_BidirectionalIteratorConcept<
- _BidirectionalIterator>)
- __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
- typename iterator_traits<_BidirectionalIterator>::value_type,
- typename iterator_traits<_BidirectionalIterator>::value_type>)
- __glibcxx_requires_valid_range(__first, __last);
-
- if (__first == __last)
- return false;
- _BidirectionalIterator __i = __first;
- ++__i;
- if (__i == __last)
- return false;
- __i = __last;
- --__i;
-
- for(;;)
- {
- _BidirectionalIterator __ii = __i;
- --__i;
- if (__comp(*__ii, *__i))
- {
- _BidirectionalIterator __j = __last;
- while (!bool(__comp(*--__j, *__i)))
- {}
- std::iter_swap(__i, __j);
- std::reverse(__ii, __last);
- return true;
- }
- if (__i == __first)
- {
- std::reverse(__first, __last);
- return false;
- }
- }
- }
-
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_ALGO_H */
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index fd9592af688..8f194537fd2 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -1,4 +1,4 @@
-// Bits and pieces used in algorithms -*- C++ -*-
+// Core algorithmic facilities -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
@@ -65,39 +65,19 @@
#include <bits/c++config.h>
#include <cstddef>
#include <bits/functexcept.h>
-#include <bits/stl_pair.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
#include <ext/numeric_traits.h>
+#include <bits/stl_pair.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <bits/concept_check.h>
#include <debug/debug.h>
+#include <bits/stl_move.h> // For std::swap and _GLIBCXX_MOVE
_GLIBCXX_BEGIN_NAMESPACE(std)
- /**
- * @brief Swaps two values.
- * @param a A thing of arbitrary type.
- * @param b Another thing of arbitrary type.
- * @return Nothing.
- *
- * This is the simple classic generic implementation. It will work on
- * any type which has a copy constructor and an assignment operator.
- */
- template<typename _Tp>
- inline void
- swap(_Tp& __a, _Tp& __b)
- {
- // concept requirements
- __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
-
- _Tp __tmp = __a;
- __a = __b;
- __b = __tmp;
- }
-
// See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
// nutshell, we are partially implementing the resolution of DR 187,
// when it's safe, i.e., the value_types are equal.
@@ -110,9 +90,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
- _ValueType1 __tmp = *__a;
- *__a = *__b;
- *__b = __tmp;
+ _ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
+ *__a = _GLIBCXX_MOVE(*__b);
+ *__b = _GLIBCXX_MOVE(__tmp);
}
};
@@ -186,12 +166,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ForwardIterator1>)
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
- __glibcxx_function_requires(_ConvertibleConcept<
- typename iterator_traits<_ForwardIterator1>::value_type,
- typename iterator_traits<_ForwardIterator2>::value_type>)
- __glibcxx_function_requires(_ConvertibleConcept<
- typename iterator_traits<_ForwardIterator2>::value_type,
- typename iterator_traits<_ForwardIterator1>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
@@ -287,19 +261,37 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// If _Iterator is a __normal_iterator return its base (a plain pointer,
// normally) otherwise return it untouched. See copy, fill, ...
template<typename _Iterator,
- bool _BoolType = __is_normal_iterator<_Iterator>::__value>
+ bool _IsNormal = __is_normal_iterator<_Iterator>::__value>
struct __niter_base
{
- static const _Iterator&
- __b(const _Iterator& __it)
+ static _Iterator
+ __b(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct __niter_base<_Iterator, true>
{
- static const typename _Iterator::_Iterator_type&
- __b(const _Iterator& __it)
+ static typename _Iterator::iterator_type
+ __b(_Iterator __it)
+ { return __it.base(); }
+ };
+
+ // Likewise, for move_iterator.
+ template<typename _Iterator,
+ bool _IsMove = __is_move_iterator<_Iterator>::__value>
+ struct __miter_base
+ {
+ static _Iterator
+ __b(_Iterator __it)
+ { return __it; }
+ };
+
+ template<typename _Iterator>
+ struct __miter_base<_Iterator, true>
+ {
+ static typename _Iterator::iterator_type
+ __b(_Iterator __it)
{ return __it.base(); }
};
@@ -309,12 +301,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count.
- template<bool, typename>
- struct __copy
+ template<bool, bool, typename>
+ struct __copy_move
{
template<typename _II, typename _OI>
static _OI
- copy(_II __first, _II __last, _OI __result)
+ __copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = *__first;
@@ -322,12 +314,27 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
};
- template<bool _BoolType>
- struct __copy<_BoolType, random_access_iterator_tag>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Category>
+ struct __copy_move<true, false, _Category>
{
template<typename _II, typename _OI>
static _OI
- copy(_II __first, _II __last, _OI __result)
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ for (; __first != __last; ++__result, ++__first)
+ *__result = std::move(*__first);
+ return __result;
+ }
+ };
+#endif
+
+ template<>
+ struct __copy_move<false, false, random_access_iterator_tag>
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
@@ -340,22 +347,42 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
};
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<>
- struct __copy<true, random_access_iterator_tag>
+ struct __copy_move<true, false, random_access_iterator_tag>
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ typedef typename iterator_traits<_II>::difference_type _Distance;
+ for(_Distance __n = __last - __first; __n > 0; --__n)
+ {
+ *__result = std::move(*__first);
+ ++__first;
+ ++__result;
+ }
+ return __result;
+ }
+ };
+#endif
+
+ template<bool _IsMove>
+ struct __copy_move<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
- copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
- {
+ __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
+ {
__builtin_memmove(__result, __first,
sizeof(_Tp) * (__last - __first));
return __result + (__last - __first);
}
};
- template<typename _II, typename _OI>
+ template<bool _IsMove, typename _II, typename _OI>
inline _OI
- __copy_aux(_II __first, _II __last, _OI __result)
+ __copy_move_a(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
@@ -365,7 +392,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
&& __is_pointer<_OI>::__value
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
- return std::__copy<__simple, _Category>::copy(__first, __last, __result);
+ return std::__copy_move<_IsMove, __simple,
+ _Category>::__copy_m(__first, __last, __result);
}
// Helpers for streambuf iterators (either istream or ostream).
@@ -379,23 +407,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits>
class ostreambuf_iterator;
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
- __copy_aux(_CharT*, _CharT*,
- ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+ __copy_move_a2(_CharT*, _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
- __copy_aux(const _CharT*, const _CharT*,
- ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+ __copy_move_a2(const _CharT*, const _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
- __copy_aux(istreambuf_iterator<_CharT, char_traits<_CharT> >,
- istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
+ __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
+ istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
+
+ template<bool _IsMove, typename _II, typename _OI>
+ inline _OI
+ __copy_move_a2(_II __first, _II __last, _OI __result)
+ {
+ return _OI(std::__copy_move_a<_IsMove>
+ (std::__niter_base<_II>::__b(__first),
+ std::__niter_base<_II>::__b(__last),
+ std::__niter_base<_OI>::__b(__result)));
+ }
/**
* @brief Copies the range [first,last) into result.
@@ -423,32 +461,83 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
- return _OI(std::__copy_aux(__niter_base<_II>::__b(__first),
- __niter_base<_II>::__b(__last),
- __niter_base<_OI>::__b(__result)));
+ return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
+ (std::__miter_base<_II>::__b(__first),
+ std::__miter_base<_II>::__b(__last), __result));
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Moves the range [first,last) into result.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return result + (first - last)
+ *
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling). Result may not be contained within
+ * [first,last); the move_backward function should be used instead.
+ *
+ * Note that the end of the output range is permitted to be contained
+ * within [first,last).
+ */
+ template<typename _II, typename _OI>
+ inline _OI
+ move(_II __first, _II __last, _OI __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_II>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OI,
+ typename iterator_traits<_II>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return (std::__copy_move_a2<true>
+ (std::__miter_base<_II>::__b(__first),
+ std::__miter_base<_II>::__b(__last), __result));
}
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
+#endif
- template<bool, typename>
- struct __copy_backward
+ template<bool, bool, typename>
+ struct __copy_move_backward
{
template<typename _BI1, typename _BI2>
static _BI2
- __copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
- {
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
while (__first != __last)
*--__result = *--__last;
return __result;
}
};
- template<bool _BoolType>
- struct __copy_backward<_BoolType, random_access_iterator_tag>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Category>
+ struct __copy_move_backward<true, false, _Category>
{
template<typename _BI1, typename _BI2>
static _BI2
- __copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
- {
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ while (__first != __last)
+ *--__result = std::move(*--__last);
+ return __result;
+ }
+ };
+#endif
+
+ template<>
+ struct __copy_move_backward<false, false, random_access_iterator_tag>
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
@@ -456,22 +545,38 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
};
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<>
- struct __copy_backward<true, random_access_iterator_tag>
+ struct __copy_move_backward<true, false, random_access_iterator_tag>
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ typename iterator_traits<_BI1>::difference_type __n;
+ for (__n = __last - __first; __n > 0; --__n)
+ *--__result = std::move(*--__last);
+ return __result;
+ }
+ };
+#endif
+
+ template<bool _IsMove>
+ struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
- __copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
- {
+ __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
+ {
const ptrdiff_t _Num = __last - __first;
__builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
- template<typename _BI1, typename _BI2>
+ template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
- __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result)
+ __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename iterator_traits<_BI1>::value_type _ValueType1;
typedef typename iterator_traits<_BI2>::value_type _ValueType2;
@@ -481,11 +586,22 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
&& __is_pointer<_BI2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
- return std::__copy_backward<__simple, _Category>::__copy_b(__first,
+ return std::__copy_move_backward<_IsMove, __simple,
+ _Category>::__copy_move_b(__first,
__last,
__result);
}
+ template<bool _IsMove, typename _BI1, typename _BI2>
+ inline _BI2
+ __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ return _BI2(std::__copy_move_backward_a<_IsMove>
+ (std::__niter_base<_BI1>::__b(__first),
+ std::__niter_base<_BI1>::__b(__last),
+ std::__niter_base<_BI2>::__b(__result)));
+ }
+
/**
* @brief Copies the range [first,last) into result.
* @param first A bidirectional iterator.
@@ -503,7 +619,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Result may not be in the range [first,last). Use copy instead. Note
* that the start of the output range may overlap [first,last).
*/
- template <typename _BI1, typename _BI2>
+ template<typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
@@ -515,62 +631,77 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
- return _BI2(std::__copy_backward_aux(__niter_base<_BI1>::__b(__first),
- __niter_base<_BI1>::__b(__last),
- __niter_base<_BI2>::__b(__result)));
+ return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
+ (std::__miter_base<_BI1>::__b(__first),
+ std::__miter_base<_BI1>::__b(__last), __result));
}
-
- template<bool>
- struct __fill
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Moves the range [first,last) into result.
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @param result A bidirectional iterator.
+ * @return result - (first - last)
+ *
+ * The function has the same effect as move, but starts at the end of the
+ * range and works its way to the start, returning the start of the result.
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling).
+ *
+ * Result may not be in the range [first,last). Use move instead. Note
+ * that the start of the output range may overlap [first,last).
+ */
+ template<typename _BI1, typename _BI2>
+ inline _BI2
+ move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
- template<typename _ForwardIterator, typename _Tp>
- static void
- fill(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __value)
- {
- for (; __first != __last; ++__first)
- *__first = __value;
- }
- };
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+ __glibcxx_function_requires(_ConvertibleConcept<
+ typename iterator_traits<_BI1>::value_type,
+ typename iterator_traits<_BI2>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
- template<>
- struct __fill<true>
- {
- template<typename _ForwardIterator, typename _Tp>
- static void
- fill(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __value)
- {
- const _Tp __tmp = __value;
- for (; __first != __last; ++__first)
- *__first = __tmp;
- }
- };
+ return (std::__copy_move_backward_a2<true>
+ (std::__miter_base<_BI1>::__b(__first),
+ std::__miter_base<_BI1>::__b(__last), __result));
+ }
+
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
+#endif
template<typename _ForwardIterator, typename _Tp>
- inline void
- __fill_aux(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __value)
+ inline typename
+ __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
+ __fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value)
{
- const bool __scalar = __is_scalar<_Tp>::__value;
- std::__fill<__scalar>::fill(__first, __last, __value);
+ for (; __first != __last; ++__first)
+ *__first = __value;
+ }
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
+ __fill_a(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
+ {
+ for (; __first != __last; ++__first)
+ *__first = __value;
}
// Specialization: for char types we can use memset.
- inline void
- __fill_aux(unsigned char* __first, unsigned char* __last, unsigned char __c)
- { __builtin_memset(__first, __c, __last - __first); }
-
- inline void
- __fill_aux(signed char* __first, signed char* __last, signed char __c)
- { __builtin_memset(__first, static_cast<unsigned char>(__c),
- __last - __first); }
-
- inline void
- __fill_aux(char* __first, char* __last, char __c)
- { __builtin_memset(__first, static_cast<unsigned char>(__c),
- __last - __first); }
+ template<typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
+ __fill_a(_Tp* __first, _Tp* __last, _Tp __c)
+ { __builtin_memset(__first, static_cast<unsigned char>(__c),
+ __last - __first); }
/**
* @brief Fills the range [first,last) with copies of value.
@@ -592,67 +723,36 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ForwardIterator>)
__glibcxx_requires_valid_range(__first, __last);
- std::__fill_aux(__niter_base<_ForwardIterator>::__b(__first),
- __niter_base<_ForwardIterator>::__b(__last), __value);
+ std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
+ std::__niter_base<_ForwardIterator>::__b(__last), __value);
}
-
- template<bool>
- struct __fill_n
- {
- template<typename _OutputIterator, typename _Size, typename _Tp>
- static _OutputIterator
- fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
- {
- for (; __n > 0; --__n, ++__first)
- *__first = __value;
- return __first;
- }
- };
-
- template<>
- struct __fill_n<true>
- {
- template<typename _OutputIterator, typename _Size, typename _Tp>
- static _OutputIterator
- fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
- {
- const _Tp __tmp = __value;
- for (; __n > 0; --__n, ++__first)
- *__first = __tmp;
- return __first;
- }
- };
-
template<typename _OutputIterator, typename _Size, typename _Tp>
- inline _OutputIterator
- __fill_n_aux(_OutputIterator __first, _Size __n, const _Tp& __value)
+ inline typename
+ __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
+ __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
- const bool __scalar = __is_scalar<_Tp>::__value;
- return std::__fill_n<__scalar>::fill_n(__first, __n, __value);
+ for (; __n > 0; --__n, ++__first)
+ *__first = __value;
+ return __first;
}
- template<typename _Size>
- inline unsigned char*
- __fill_n_aux(unsigned char* __first, _Size __n, unsigned char __c)
- {
- std::__fill_aux(__first, __first + __n, __c);
- return __first + __n;
- }
-
- template<typename _Size>
- inline signed char*
- __fill_n_aux(signed char* __first, _Size __n, signed char __c)
+ template<typename _OutputIterator, typename _Size, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
+ __fill_n_a(_OutputIterator __first, _Size __n, _Tp __value)
{
- std::__fill_aux(__first, __first + __n, __c);
- return __first + __n;
+ for (; __n > 0; --__n, ++__first)
+ *__first = __value;
+ return __first;
}
- template<typename _Size>
- inline char*
- __fill_n_aux(char* __first, _Size __n, char __c)
+ template<typename _Size, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
+ __fill_n_a(_Tp* __first, _Size __n, _Tp __c)
{
- std::__fill_aux(__first, __first + __n, __c);
+ std::__fill_a(__first, __first + __n, __c);
return __first + __n;
}
@@ -674,11 +774,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
- return _OI(std::__fill_n_aux(__niter_base<_OI>::__b(__first), __n,
- __value));
+ return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
+ __n, __value));
}
-
template<bool _BoolType>
struct __equal
{
@@ -719,6 +818,110 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
+
+ template<typename, typename>
+ struct __lc_rai
+ {
+ template<typename _II1, typename _II2>
+ static _II1
+ __newlast1(_II1, _II1 __last1, _II2, _II2)
+ { return __last1; }
+
+ template<typename _II>
+ static bool
+ __cnd2(_II __first, _II __last)
+ { return __first != __last; }
+ };
+
+ template<>
+ struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
+ {
+ template<typename _RAI1, typename _RAI2>
+ static _RAI1
+ __newlast1(_RAI1 __first1, _RAI1 __last1,
+ _RAI2 __first2, _RAI2 __last2)
+ {
+ const typename iterator_traits<_RAI1>::difference_type
+ __diff1 = __last1 - __first1;
+ const typename iterator_traits<_RAI2>::difference_type
+ __diff2 = __last2 - __first2;
+ return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
+ }
+
+ template<typename _RAI>
+ static bool
+ __cnd2(_RAI, _RAI)
+ { return true; }
+ };
+
+ template<bool _BoolType>
+ struct __lexicographical_compare
+ {
+ template<typename _II1, typename _II2>
+ static bool __lc(_II1, _II1, _II2, _II2);
+ };
+
+ template<bool _BoolType>
+ template<typename _II1, typename _II2>
+ bool
+ __lexicographical_compare<_BoolType>::
+ __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
+ {
+ typedef typename iterator_traits<_II1>::iterator_category _Category1;
+ typedef typename iterator_traits<_II2>::iterator_category _Category2;
+ typedef std::__lc_rai<_Category1, _Category2> __rai_type;
+
+ __last1 = __rai_type::__newlast1(__first1, __last1,
+ __first2, __last2);
+ for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
+ ++__first1, ++__first2)
+ {
+ if (*__first1 < *__first2)
+ return true;
+ if (*__first2 < *__first1)
+ return false;
+ }
+ return __first1 == __last1 && __first2 != __last2;
+ }
+
+ template<>
+ struct __lexicographical_compare<true>
+ {
+ template<typename _Tp, typename _Up>
+ static bool
+ __lc(const _Tp* __first1, const _Tp* __last1,
+ const _Up* __first2, const _Up* __last2)
+ {
+ const size_t __len1 = __last1 - __first1;
+ const size_t __len2 = __last2 - __first2;
+ const int __result = __builtin_memcmp(__first1, __first2,
+ std::min(__len1, __len2));
+ return __result != 0 ? __result < 0 : __len1 < __len2;
+ }
+ };
+
+ template<typename _II1, typename _II2>
+ inline bool
+ __lexicographical_compare_aux(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2)
+ {
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ const bool __simple =
+ (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
+ && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
+ && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
+ && __is_pointer<_II1>::__value
+ && __is_pointer<_II2>::__value);
+
+ return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
+ __first2, __last2);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
/**
* @brief Tests a range for element-wise equality.
* @param first1 An input iterator.
@@ -742,9 +945,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename iterator_traits<_II2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
- return std::__equal_aux(__niter_base<_II1>::__b(__first1),
- __niter_base<_II1>::__b(__last1),
- __niter_base<_II2>::__b(__first2));
+ return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
+ std::__niter_base<_II1>::__b(__last1),
+ std::__niter_base<_II2>::__b(__first2));
}
/**
@@ -752,24 +955,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param first1 An input iterator.
* @param last1 An input iterator.
* @param first2 An input iterator.
- * @param binary_pred A binary predicate @link s20_3_1_base functor@endlink.
- * @return A boolean true or false.
+ * @param binary_pred A binary predicate @link s20_3_1_base
+ * functor@endlink.
+ * @return A boolean true or false.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
- template<typename _InputIterator1, typename _InputIterator2,
- typename _BinaryPredicate>
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
- equal(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2,
- _BinaryPredicate __binary_pred)
+ equal(_IIter1 __first1, _IIter1 __last1,
+ _IIter2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
@@ -792,32 +994,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
- template<typename _InputIterator1, typename _InputIterator2>
- bool
- lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2)
+ template<typename _II1, typename _II2>
+ inline bool
+ lexicographical_compare(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2)
{
// concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
- __glibcxx_function_requires(_LessThanOpConcept<
- typename iterator_traits<_InputIterator1>::value_type,
- typename iterator_traits<_InputIterator2>::value_type>)
- __glibcxx_function_requires(_LessThanOpConcept<
- typename iterator_traits<_InputIterator2>::value_type,
- typename iterator_traits<_InputIterator1>::value_type>)
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
- for (; __first1 != __last1 && __first2 != __last2;
- ++__first1, ++__first2)
- {
- if (*__first1 < *__first2)
- return true;
- if (*__first2 < *__first1)
- return false;
- }
- return __first1 == __last1 && __first2 != __last2;
+ return std::__lexicographical_compare_aux
+ (std::__niter_base<_II1>::__b(__first1),
+ std::__niter_base<_II1>::__b(__last1),
+ std::__niter_base<_II2>::__b(__first2),
+ std::__niter_base<_II2>::__b(__last2));
}
/**
@@ -829,23 +1025,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param comp A @link s20_3_3_comparisons comparison functor@endlink.
* @return A boolean true or false.
*
- * The same as the four-parameter @c lexigraphical_compare, but uses the
+ * The same as the four-parameter @c lexicographical_compare, but uses the
* comp parameter instead of @c <.
*/
- template<typename _InputIterator1, typename _InputIterator2,
- typename _Compare>
+ template<typename _II1, typename _II2, typename _Compare>
bool
- lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2,
- _Compare __comp)
+ lexicographical_compare(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2, _Compare __comp)
{
+ typedef typename iterator_traits<_II1>::iterator_category _Category1;
+ typedef typename iterator_traits<_II2>::iterator_category _Category2;
+ typedef std::__lc_rai<_Category1, _Category2> __rai_type;
+
// concept requirements
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
- __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
- for (; __first1 != __last1 && __first2 != __last2;
+ __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
+ for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (__comp(*__first1, *__first2))
@@ -856,41 +1055,80 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first1 == __last1 && __first2 != __last2;
}
- inline bool
- lexicographical_compare(const unsigned char* __first1,
- const unsigned char* __last1,
- const unsigned char* __first2,
- const unsigned char* __last2)
- {
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- const size_t __len1 = __last1 - __first1;
- const size_t __len2 = __last2 - __first2;
- const int __result = __builtin_memcmp(__first1, __first2,
- std::min(__len1, __len2));
- return __result != 0 ? __result < 0 : __len1 < __len2;
- }
-
- inline bool
- lexicographical_compare(const char* __first1, const char* __last1,
- const char* __first2, const char* __last2)
- {
- __glibcxx_requires_valid_range(__first1, __last1);
- __glibcxx_requires_valid_range(__first2, __last2);
-
- if (__gnu_cxx::__numeric_traits<char>::__is_signed)
- return std::lexicographical_compare((const signed char*) __first1,
- (const signed char*) __last1,
- (const signed char*) __first2,
- (const signed char*) __last2);
- else
- return std::lexicographical_compare((const unsigned char*) __first1,
- (const unsigned char*) __last1,
- (const unsigned char*) __first2,
- (const unsigned char*) __last2);
- }
+ /**
+ * @brief Finds the places in ranges which don't match.
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @return A pair of iterators pointing to the first mismatch.
+ *
+ * This compares the elements of two ranges using @c == and returns a pair
+ * of iterators. The first iterator points into the first range, the
+ * second iterator points into the second range, and the elements pointed
+ * to by the iterators are not equal.
+ */
+ template<typename _InputIterator1, typename _InputIterator2>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ while (__first1 != __last1 && *__first1 == *__first2)
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+ }
+
+ /**
+ * @brief Finds the places in ranges which don't match.
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param binary_pred A binary predicate @link s20_3_1_base
+ * functor@endlink.
+ * @return A pair of iterators pointing to the first mismatch.
+ *
+ * This compares the elements of two ranges using the binary_pred
+ * parameter, and returns a pair
+ * of iterators. The first iterator points into the first range, the
+ * second iterator points into the second range, and the elements pointed
+ * to by the iterators are not equal.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _BinaryPredicate>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
-_GLIBCXX_END_NAMESPACE
+ while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+// NB: This file is included within many other C++ includes, as a way
+// of getting the base algorithms. So, make sure that parallel bits
+// come in too if requested.
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algobase.h>
+#endif
#endif
diff --git a/libstdc++-v3/include/bits/stl_auto_ptr.h b/libstdc++-v3/include/bits/stl_auto_ptr.h
deleted file mode 100644
index 6e0f9c7e2ae..00000000000
--- a/libstdc++-v3/include/bits/stl_auto_ptr.h
+++ /dev/null
@@ -1,301 +0,0 @@
-// auto_ptr implementation -*- C++ -*-
-
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-// 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 stl_auto_ptr.h
- * This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STL_AUTO_PTR_H
-#define _STL_AUTO_PTR_H 1
-
-#include <bits/c++config.h>
-#include <debug/debug.h>
-
-_GLIBCXX_BEGIN_NAMESPACE(std)
-
- /**
- * A wrapper class to provide auto_ptr with reference semantics.
- * For example, an auto_ptr can be assigned (or constructed from)
- * the result of a function which returns an auto_ptr by value.
- *
- * All the auto_ptr_ref stuff should happen behind the scenes.
- */
- template<typename _Tp1>
- struct auto_ptr_ref
- {
- _Tp1* _M_ptr;
-
- explicit
- auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
- };
-
-
- /**
- * @brief A simple smart pointer providing strict ownership semantics.
- *
- * The Standard says:
- * <pre>
- * An @c auto_ptr owns the object it holds a pointer to. Copying
- * an @c auto_ptr copies the pointer and transfers ownership to the
- * destination. If more than one @c auto_ptr owns the same object
- * at the same time the behavior of the program is undefined.
- *
- * The uses of @c auto_ptr include providing temporary
- * exception-safety for dynamically allocated memory, passing
- * ownership of dynamically allocated memory to a function, and
- * returning dynamically allocated memory from a function. @c
- * auto_ptr does not meet the CopyConstructible and Assignable
- * requirements for Standard Library <a
- * href="tables.html#65">container</a> elements and thus
- * instantiating a Standard Library container with an @c auto_ptr
- * results in undefined behavior.
- * </pre>
- * Quoted from [20.4.5]/3.
- *
- * Good examples of what can and cannot be done with auto_ptr can
- * be found in the libstdc++ testsuite.
- *
- * @if maint
- * _GLIBCXX_RESOLVE_LIB_DEFECTS
- * 127. auto_ptr<> conversion issues
- * These resolutions have all been incorporated.
- * @endif
- */
- template<typename _Tp>
- class auto_ptr
- {
- private:
- _Tp* _M_ptr;
-
- public:
- /// The pointed-to type.
- typedef _Tp element_type;
-
- /**
- * @brief An %auto_ptr is usually constructed from a raw pointer.
- * @param p A pointer (defaults to NULL).
- *
- * This object now @e owns the object pointed to by @a p.
- */
- explicit
- auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
-
- /**
- * @brief An %auto_ptr can be constructed from another %auto_ptr.
- * @param a Another %auto_ptr of the same type.
- *
- * This object now @e owns the object previously owned by @a a,
- * which has given up ownsership.
- */
- auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
-
- /**
- * @brief An %auto_ptr can be constructed from another %auto_ptr.
- * @param a Another %auto_ptr of a different but related type.
- *
- * A pointer-to-Tp1 must be convertible to a
- * pointer-to-Tp/element_type.
- *
- * This object now @e owns the object previously owned by @a a,
- * which has given up ownsership.
- */
- template<typename _Tp1>
- auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
-
- /**
- * @brief %auto_ptr assignment operator.
- * @param a Another %auto_ptr of the same type.
- *
- * This object now @e owns the object previously owned by @a a,
- * which has given up ownsership. The object that this one @e
- * used to own and track has been deleted.
- */
- auto_ptr&
- operator=(auto_ptr& __a) throw()
- {
- reset(__a.release());
- return *this;
- }
-
- /**
- * @brief %auto_ptr assignment operator.
- * @param a Another %auto_ptr of a different but related type.
- *
- * A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.
- *
- * This object now @e owns the object previously owned by @a a,
- * which has given up ownsership. The object that this one @e
- * used to own and track has been deleted.
- */
- template<typename _Tp1>
- auto_ptr&
- operator=(auto_ptr<_Tp1>& __a) throw()
- {
- reset(__a.release());
- return *this;
- }
-
- /**
- * When the %auto_ptr goes out of scope, the object it owns is
- * deleted. If it no longer owns anything (i.e., @c get() is
- * @c NULL), then this has no effect.
- *
- * @if maint
- * The C++ standard says there is supposed to be an empty throw
- * specification here, but omitting it is standard conforming. Its
- * presence can be detected only if _Tp::~_Tp() throws, but this is
- * prohibited. [17.4.3.6]/2
- * @endif
- */
- ~auto_ptr() { delete _M_ptr; }
-
- /**
- * @brief Smart pointer dereferencing.
- *
- * If this %auto_ptr no longer owns anything, then this
- * operation will crash. (For a smart pointer, "no longer owns
- * anything" is the same as being a null pointer, and you know
- * what happens when you dereference one of those...)
- */
- element_type&
- operator*() const throw()
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return *_M_ptr;
- }
-
- /**
- * @brief Smart pointer dereferencing.
- *
- * This returns the pointer itself, which the language then will
- * automatically cause to be dereferenced.
- */
- element_type*
- operator->() const throw()
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return _M_ptr;
- }
-
- /**
- * @brief Bypassing the smart pointer.
- * @return The raw pointer being managed.
- *
- * You can get a copy of the pointer that this object owns, for
- * situations such as passing to a function which only accepts
- * a raw pointer.
- *
- * @note This %auto_ptr still owns the memory.
- */
- element_type*
- get() const throw() { return _M_ptr; }
-
- /**
- * @brief Bypassing the smart pointer.
- * @return The raw pointer being managed.
- *
- * You can get a copy of the pointer that this object owns, for
- * situations such as passing to a function which only accepts
- * a raw pointer.
- *
- * @note This %auto_ptr no longer owns the memory. When this object
- * goes out of scope, nothing will happen.
- */
- element_type*
- release() throw()
- {
- element_type* __tmp = _M_ptr;
- _M_ptr = 0;
- return __tmp;
- }
-
- /**
- * @brief Forcibly deletes the managed object.
- * @param p A pointer (defaults to NULL).
- *
- * This object now @e owns the object pointed to by @a p. The
- * previous object has been deleted.
- */
- void
- reset(element_type* __p = 0) throw()
- {
- if (__p != _M_ptr)
- {
- delete _M_ptr;
- _M_ptr = __p;
- }
- }
-
- /**
- * @brief Automatic conversions
- *
- * These operations convert an %auto_ptr into and from an auto_ptr_ref
- * automatically as needed. This allows constructs such as
- * @code
- * auto_ptr<Derived> func_returning_auto_ptr(.....);
- * ...
- * auto_ptr<Base> ptr = func_returning_auto_ptr(.....);
- * @endcode
- */
- auto_ptr(auto_ptr_ref<element_type> __ref) throw()
- : _M_ptr(__ref._M_ptr) { }
-
- auto_ptr&
- operator=(auto_ptr_ref<element_type> __ref) throw()
- {
- if (__ref._M_ptr != this->get())
- {
- delete _M_ptr;
- _M_ptr = __ref._M_ptr;
- }
- return *this;
- }
-
- template<typename _Tp1>
- operator auto_ptr_ref<_Tp1>() throw()
- { return auto_ptr_ref<_Tp1>(this->release()); }
-
- template<typename _Tp1>
- operator auto_ptr<_Tp1>() throw()
- { return auto_ptr<_Tp1>(this->release()); }
- };
-
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 541. shared_ptr template assignment and void
- template<>
- class auto_ptr<void>
- {
- public:
- typedef void element_type;
- };
-
-_GLIBCXX_END_NAMESPACE
-
-#endif /* _STL_AUTO_PTR_H */
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index a792b744c1f..045f20378a6 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -62,7 +62,7 @@
#ifndef _STL_BVECTOR_H
#define _STL_BVECTOR_H 1
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
typedef unsigned long _Bit_type;
enum { _S_word_bit = int(__CHAR_BIT__ * sizeof(_Bit_type)) };
@@ -385,6 +385,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_Bit_iterator _M_start;
_Bit_iterator _M_finish;
_Bit_type* _M_end_of_storage;
+
+ _Bvector_impl()
+ : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0)
+ { }
+
_Bvector_impl(const _Bit_alloc_type& __a)
: _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
{ }
@@ -405,7 +410,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
get_allocator() const
{ return allocator_type(_M_get_Bit_allocator()); }
- _Bvector_base(const allocator_type& __a) : _M_impl(__a) { }
+ _Bvector_base()
+ : _M_impl() { }
+
+ _Bvector_base(const allocator_type& __a)
+ : _M_impl(__a) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Bvector_base(_Bvector_base&& __x)
+ : _M_impl(__x._M_get_Bit_allocator())
+ {
+ this->_M_impl._M_start = __x._M_impl._M_start;
+ this->_M_impl._M_finish = __x._M_impl._M_finish;
+ this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
+ __x._M_impl._M_start = _Bit_iterator();
+ __x._M_impl._M_finish = _Bit_iterator();
+ __x._M_impl._M_end_of_storage = 0;
+ }
+#endif
~_Bvector_base()
{ this->_M_deallocate(); }
@@ -432,7 +454,7 @@ _GLIBCXX_END_NESTED_NAMESPACE
// Declare a partial specialization of vector<T, Alloc>.
#include <bits/stl_vector.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
* @brief A specialization of vector for booleans which offers fixed time
@@ -480,8 +502,11 @@ template<typename _Alloc>
using _Base::_M_get_Bit_allocator;
public:
+ vector()
+ : _Base() { }
+
explicit
- vector(const allocator_type& __a = allocator_type())
+ vector(const allocator_type& __a)
: _Base(__a) { }
explicit
@@ -501,6 +526,11 @@ template<typename _Alloc>
_M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector(vector&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+
template<typename _InputIterator>
vector(_InputIterator __first, _InputIterator __last,
const allocator_type& __a = allocator_type())
@@ -527,6 +557,17 @@ template<typename _Alloc>
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
// assign(), a generalized assignment member function. Two
// versions: one that takes a count, and one that takes a range.
// The range version is a member template, so we dispatch on whether
@@ -575,6 +616,24 @@ template<typename _Alloc>
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return this->_M_impl._M_start; }
+
+ const_iterator
+ cend() const
+ { return this->_M_impl._M_finish; }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
size_type
size() const
{ return size_type(end() - begin()); }
@@ -631,21 +690,7 @@ template<typename _Alloc>
{ _M_range_check(__n); return (*this)[__n]; }
void
- reserve(size_type __n)
- {
- if (__n > this->max_size())
- __throw_length_error(__N("vector::reserve"));
- if (this->capacity() < __n)
- {
- _Bit_type* __q = this->_M_allocate(__n);
- this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
- iterator(__q, 0));
- this->_M_deallocate();
- this->_M_impl._M_start = iterator(__q, 0);
- this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
- / int(_S_word_bit));
- }
- }
+ reserve(size_type __n);
reference
front()
@@ -681,7 +726,11 @@ template<typename _Alloc>
}
void
- swap(vector<bool, _Alloc>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
+ swap(vector& __x)
+#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
diff --git a/libstdc++-v3/include/bits/stl_construct.h b/libstdc++-v3/include/bits/stl_construct.h
index 188efa92781..1c4324eb0e1 100644
--- a/libstdc++-v3/include/bits/stl_construct.h
+++ b/libstdc++-v3/include/bits/stl_construct.h
@@ -1,6 +1,6 @@
// nonstandard construct and destroy functions -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -67,10 +67,8 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
/**
- * @if maint
* Constructs an object in existing memory by invoking an allocated
* object's constructor with an initializer.
- * @endif
*/
template<typename _T1, typename _T2>
inline void
@@ -82,24 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
- * Constructs an object in existing memory by invoking an allocated
- * object's default constructor (no initializers).
- * @endif
- */
- template<typename _T1>
- inline void
- _Construct(_T1* __p)
- {
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 402. wrong new expression in [some_]allocator::construct
- ::new(static_cast<void*>(__p)) _T1();
- }
-
- /**
- * @if maint
* Destroy the object pointed to by a pointer type.
- * @endif
*/
template<typename _Tp>
inline void
@@ -107,11 +88,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ __pointer->~_Tp(); }
/**
- * @if maint
* Destroy a range of objects. If the value_type of the object has
* a trivial destructor, the compiler should optimize all of this
* away, otherwise the objects' destructors must be invoked.
- * @endif
*/
template<typename _ForwardIterator>
inline void
@@ -125,11 +104,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* Destroy a range of objects using the supplied allocator. For
* nondefault allocators we do not optimize away invocation of
* destroy() even if _Tp has a trivial destructor.
- * @endif
*/
template <typename _Tp> class allocator;
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index 890afc58d41..6032765ed0c 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -1,6 +1,6 @@
// Deque implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -66,19 +66,17 @@
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
- * @if maint
* @brief This function controls the size of memory nodes.
* @param size The size of an element.
* @return The number (not byte size) of elements per node.
*
* This function started off as a compiler kludge from SGI, but seems to
* be a useful wrapper around a repeated constant expression. The '512' is
- * tuneable (and no other code needs to change), but no investigation has
+ * tunable (and no other code needs to change), but no investigation has
* been done since inheriting the SGI code.
- * @endif
*/
inline size_t
__deque_buf_size(size_t __size)
@@ -94,9 +92,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* elements is done as offsets of either of those two, relying on
* operator overloading in this class.
*
- * @if maint
* All the functions are op overloads except for _M_set_node.
- * @endif
*/
template<typename _Tp, typename _Ref, typename _Ptr>
struct _Deque_iterator
@@ -123,13 +119,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_Deque_iterator(_Tp* __x, _Map_pointer __y)
: _M_cur(__x), _M_first(*__y),
- _M_last(*__y + _S_buffer_size()), _M_node(__y) {}
+ _M_last(*__y + _S_buffer_size()), _M_node(__y) { }
- _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
+ _Deque_iterator()
+ : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { }
_Deque_iterator(const iterator& __x)
: _M_cur(__x._M_cur), _M_first(__x._M_first),
- _M_last(__x._M_last), _M_node(__x._M_node) {}
+ _M_last(__x._M_last), _M_node(__x._M_node) { }
reference
operator*() const
@@ -220,11 +217,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
operator[](difference_type __n) const
{ return *(*this + __n); }
- /** @if maint
+ /**
* Prepares to traverse new_node. Sets everything except
* _M_cur, which should therefore be set by the caller
* immediately afterwards, based on _M_first and _M_last.
- * @endif
*/
void
_M_set_node(_Map_pointer __new_node)
@@ -356,7 +352,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value);
/**
- * @if maint
* Deque base class. This class provides the unified face for %deque's
* allocation. This class's constructor and destructor allocate and
* deallocate (but do not initialize) storage. This makes %exception
@@ -365,7 +360,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Nothing in this class ever constructs or destroys an actual Tp element.
* (Deque handles that itself.) Only/All memory management is performed
* here.
- * @endif
*/
template<typename _Tp, typename _Alloc>
class _Deque_base
@@ -380,6 +374,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+ _Deque_base()
+ : _M_impl()
+ { _M_initialize_map(0); }
+
_Deque_base(const allocator_type& __a, size_t __num_elements)
: _M_impl(__a)
{ _M_initialize_map(__num_elements); }
@@ -388,6 +386,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
: _M_impl(__a)
{ }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Deque_base(_Deque_base&& __x)
+ : _M_impl(__x._M_get_Tp_allocator())
+ {
+ _M_initialize_map(0);
+ if (__x._M_impl._M_map)
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+ std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
+ }
+ }
+#endif
+
~_Deque_base();
protected:
@@ -406,6 +419,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
iterator _M_start;
iterator _M_finish;
+ _Deque_impl()
+ : _Tp_alloc_type(), _M_map(0), _M_map_size(0),
+ _M_start(), _M_finish()
+ { }
+
_Deque_impl(const _Tp_alloc_type& __a)
: _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
_M_start(), _M_finish()
@@ -466,14 +484,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
/**
- * @if maint
* @brief Layout storage.
* @param num_elements The count of T's for which to allocate space
* at first.
* @return Nothing.
*
* The initial underlying memory layout is a bit complicated...
- * @endif
*/
template<typename _Tp, typename _Alloc>
void
@@ -558,7 +574,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* out to violate the C++ standard (it can be detected using template
* template parameters), and it was removed.
*
- * @if maint
* Here's how a deque<Tp> manages memory. Each deque has 4 members:
*
* - Tp** _M_map
@@ -623,7 +638,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* All the implementation routines for deque itself work only through the
* start and finish iterators. This keeps the routines simple and sane,
* and we can use other standard algorithms as well.
- * @endif
*/
template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
class deque : protected _Deque_base<_Tp, _Alloc>
@@ -666,10 +680,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
using _Base::_M_deallocate_map;
using _Base::_M_get_Tp_allocator;
- /** @if maint
- * A total of four data members accumulated down the heirarchy.
+ /**
+ * A total of four data members accumulated down the hierarchy.
* May be accessed via _M_impl.*
- * @endif
*/
using _Base::_M_impl;
@@ -679,14 +692,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* @brief Default constructor creates no elements.
*/
+ deque()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %deque with no elements.
+ * @param a An allocator object.
+ */
explicit
- deque(const allocator_type& __a = allocator_type())
- : _Base(__a, 0) {}
+ deque(const allocator_type& __a)
+ : _Base(__a, 0) { }
/**
- * @brief Create a %deque with copies of an exemplar element.
+ * @brief Creates a %deque with copies of an exemplar element.
* @param n The number of elements to initially create.
* @param value An element to copy.
+ * @param a An allocator.
*
* This constructor fills the %deque with @a n copies of @a value.
*/
@@ -709,10 +730,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
this->_M_impl._M_start,
_M_get_Tp_allocator()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Deque move constructor.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The newly-created %deque contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %deque.
+ */
+ deque(deque&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+
/**
* @brief Builds a %deque from a range.
* @param first An input iterator.
* @param last An input iterator.
+ * @param a An allocator object.
*
* Create a %deque consisting of copies of the elements from [first,
* last).
@@ -736,7 +770,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* The dtor only erases the elements, and note that if the elements
* themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
+ * way. Managing the pointer is the user's responsibility.
*/
~deque()
{ _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
@@ -751,6 +785,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
deque&
operator=(const deque& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Deque move assignment operator.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this deque (without copying).
+ * @a x is a valid, but unspecified %deque.
+ */
+ deque&
+ operator=(deque&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
/**
* @brief Assigns a given value to a %deque.
* @param n Number of elements to be assigned.
@@ -861,6 +913,43 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
rend() const
{ return const_reverse_iterator(this->_M_impl._M_start); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %deque. Iteration is done in ordinary element order.
+ */
+ const_iterator
+ cbegin() const
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %deque. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ cend() const
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %deque. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %deque. Iteration is
+ * done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(this->_M_impl._M_start); }
+#endif
+
// [23.2.1.2] capacity
/** Returns the number of elements in the %deque. */
size_type
@@ -933,7 +1022,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return this->_M_impl._M_start[difference_type(__n)]; }
protected:
- /// @if maint Safety check used only from at(). @endif
+ /// Safety check used only from at().
void
_M_range_check(size_type __n) const
{
@@ -1028,6 +1117,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* data to it. Due to the nature of a %deque this operation
* can be done in constant time.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_front(const value_type& __x)
{
@@ -1039,6 +1129,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
else
_M_push_front_aux(__x);
}
+#else
+ template<typename... _Args>
+ void
+ push_front(_Args&&... __args)
+ {
+ if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+ {
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1,
+ std::forward<_Args>(__args)...);
+ --this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_push_front_aux(std::forward<_Args>(__args)...);
+ }
+#endif
/**
* @brief Add data to the end of the %deque.
@@ -1049,6 +1154,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* to it. Due to the nature of a %deque this operation can be
* done in constant time.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_back(const value_type& __x)
{
@@ -1061,6 +1167,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
else
_M_push_back_aux(__x);
}
+#else
+ template<typename... _Args>
+ void
+ push_back(_Args&&... __args)
+ {
+ if (this->_M_impl._M_finish._M_cur
+ != this->_M_impl._M_finish._M_last - 1)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux(std::forward<_Args>(__args)...);
+ }
+#endif
/**
* @brief Removes first element.
@@ -1104,6 +1226,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_pop_back_aux();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts an object in %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified location.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
/**
* @brief Inserts given value into %deque before specified iterator.
* @param position An iterator into the %deque.
@@ -1116,6 +1253,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
iterator
insert(iterator __position, const value_type& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before the
+ * specified location.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
/**
* @brief Inserts a number of copies of given data into the %deque.
* @param position An iterator into the %deque.
@@ -1160,7 +1312,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The user is cautioned that
* this function only erases the element, and that if the element is
* itself a pointer, the pointed-to memory is not touched in any way.
- * Managing the pointer is the user's responsibilty.
+ * Managing the pointer is the user's responsibility.
*/
iterator
erase(iterator __position);
@@ -1179,7 +1331,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The user is cautioned that
* this function only erases the elements, and that if the elements
* themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
+ * way. Managing the pointer is the user's responsibility.
*/
iterator
erase(iterator __first, iterator __last);
@@ -1194,7 +1346,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* std::swap(d1,d2) will feed to this function.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(deque&& __x)
+#else
swap(deque& __x)
+#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
@@ -1211,7 +1367,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Erases all the elements. Note that this function only erases the
* elements, and that if the elements themselves are pointers, the
* pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
+ * the user's responsibility.
*/
void
clear()
@@ -1246,7 +1402,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// called by the second initialize_dispatch above
//@{
/**
- * @if maint
* @brief Fills the deque with whatever is in [first,last).
* @param first An input iterator.
* @param last An input iterator.
@@ -1255,7 +1410,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* If the iterators are actually forward iterators (or better), then the
* memory layout can be done all at once. Else we move forward using
* push_back on each value from the iterator.
- * @endif
*/
template<typename _InputIterator>
void
@@ -1270,7 +1424,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
//@}
/**
- * @if maint
* @brief Fills the %deque with copies of value.
* @param value Initial value.
* @return Nothing.
@@ -1279,7 +1432,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* This function is called only when the user provides an explicit size
* (with or without an explicit exemplar value).
- * @endif
*/
void
_M_fill_initialize(const value_type& __value);
@@ -1349,14 +1501,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
//@{
- /**
- * @if maint
- * @brief Helper functions for push_* and pop_*.
- * @endif
- */
+ /// Helper functions for push_* and pop_*.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void _M_push_back_aux(const value_type&);
void _M_push_front_aux(const value_type&);
+#else
+ template<typename... _Args>
+ void _M_push_back_aux(_Args&&... __args);
+
+ template<typename... _Args>
+ void _M_push_front_aux(_Args&&... __args);
+#endif
void _M_pop_back_aux();
@@ -1407,8 +1563,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
// called by insert(p,x)
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
iterator
_M_insert_aux(iterator __pos, const value_type& __x);
+#else
+ template<typename... _Args>
+ iterator
+ _M_insert_aux(iterator __pos, _Args&&... __args);
+#endif
// called by insert(p,n,x) via fill_insert
void
@@ -1463,12 +1625,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
//@{
- /**
- * @if maint
- * @brief Memory-handling helpers for the previous internal insert
- * functions.
- * @endif
- */
+ /// Memory-handling helpers for the previous internal insert functions.
iterator
_M_reserve_elements_at_front(size_type __n)
{
@@ -1499,13 +1656,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
//@{
/**
- * @if maint
* @brief Memory-handling helpers for the major %map.
*
* Makes sure the _M_map has space for new nodes. Does not
* actually add the nodes. Can invalidate _M_map pointers.
* (And consequently, %deque iterators.)
- * @endif
*/
void
_M_reserve_map_at_back(size_type __nodes_to_add = 1)
@@ -1598,6 +1753,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>&& __x, deque<_Tp,_Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_DEQUE_H */
diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h
index 9867abe95f4..462b1f47e0a 100644
--- a/libstdc++-v3/include/bits/stl_function.h
+++ b/libstdc++-v3/include/bits/stl_function.h
@@ -99,7 +99,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* This is one of the @link s20_3_1_base functor base classes@endlink.
*/
- template <class _Arg, class _Result>
+ template<typename _Arg, typename _Result>
struct unary_function
{
typedef _Arg argument_type; ///< @c argument_type is the type of the
@@ -111,7 +111,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* This is one of the @link s20_3_1_base functor base classes@endlink.
*/
- template <class _Arg1, class _Arg2, class _Result>
+ template<typename _Arg1, typename _Arg2, typename _Result>
struct binary_function
{
typedef _Arg1 first_argument_type; ///< the type of the first argument
@@ -124,14 +124,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 20.3.2 arithmetic
/** @defgroup s20_3_2_arithmetic Arithmetic Classes
- * Because basic math often needs to be done during an algorithm, the library
- * provides functors for those operations. See the documentation for
- * @link s20_3_1_base the base classes@endlink for examples of their use.
+
+ * Because basic math often needs to be done during an algorithm,
+ * the library provides functors for those operations. See the
+ * documentation for @link s20_3_1_base the base classes@endlink
+ * for examples of their use.
*
* @{
*/
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct plus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
@@ -140,7 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct minus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
@@ -149,7 +151,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
@@ -158,7 +160,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct divides : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
@@ -167,7 +169,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct modulus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
@@ -176,7 +178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_2_arithmetic math functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct negate : public unary_function<_Tp, _Tp>
{
_Tp
@@ -193,7 +195,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @{
*/
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -202,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct not_equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -211,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct greater : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -220,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct less : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -229,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct greater_equal : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -238,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct less_equal : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -249,12 +251,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 20.3.4 logical operations
/** @defgroup s20_3_4_logical Boolean Operations Classes
- * Here are wrapper functors for Boolean operations: @c &&, @c ||, and @c !.
+ * Here are wrapper functors for Boolean operations: @c &&, @c ||,
+ * and @c !.
*
* @{
*/
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct logical_and : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -263,7 +266,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct logical_or : public binary_function<_Tp, _Tp, bool>
{
bool
@@ -272,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
- template <class _Tp>
+ template<typename _Tp>
struct logical_not : public unary_function<_Tp, bool>
{
bool
@@ -281,6 +284,32 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/** @} */
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 660. Missing Bitwise Operations.
+ template<typename _Tp>
+ struct bit_and : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x & __y; }
+ };
+
+ template<typename _Tp>
+ struct bit_or : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x | __y; }
+ };
+
+ template<typename _Tp>
+ struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x ^ __y; }
+ };
+
// 20.3.5 negators
/** @defgroup s20_3_5_negators Negators
* The functions @c not1 and @c not2 each take a predicate functor
@@ -309,15 +338,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @{
*/
/// One of the @link s20_3_5_negators negation functors@endlink.
- template <class _Predicate>
+ template<typename _Predicate>
class unary_negate
: public unary_function<typename _Predicate::argument_type, bool>
{
protected:
_Predicate _M_pred;
+
public:
explicit
- unary_negate(const _Predicate& __x) : _M_pred(__x) {}
+ unary_negate(const _Predicate& __x) : _M_pred(__x) { }
bool
operator()(const typename _Predicate::argument_type& __x) const
@@ -325,24 +355,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_5_negators negation functors@endlink.
- template <class _Predicate>
+ template<typename _Predicate>
inline unary_negate<_Predicate>
not1(const _Predicate& __pred)
{ return unary_negate<_Predicate>(__pred); }
/// One of the @link s20_3_5_negators negation functors@endlink.
- template <class _Predicate>
+ template<typename _Predicate>
class binary_negate
: public binary_function<typename _Predicate::first_argument_type,
- typename _Predicate::second_argument_type,
- bool>
+ typename _Predicate::second_argument_type, bool>
{
protected:
_Predicate _M_pred;
+
public:
explicit
- binary_negate(const _Predicate& __x)
- : _M_pred(__x) { }
+ binary_negate(const _Predicate& __x) : _M_pred(__x) { }
bool
operator()(const typename _Predicate::first_argument_type& __x,
@@ -351,112 +380,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_5_negators negation functors@endlink.
- template <class _Predicate>
+ template<typename _Predicate>
inline binary_negate<_Predicate>
not2(const _Predicate& __pred)
{ return binary_negate<_Predicate>(__pred); }
/** @} */
- // 20.3.6 binders
- /** @defgroup s20_3_6_binder Binder Classes
- * Binders turn functions/functors with two arguments into functors with
- * a single argument, storing an argument to be applied later. For
- * example, a variable @c B of type @c binder1st is constructed from a
- * functor @c f and an argument @c x. Later, B's @c operator() is called
- * with a single argument @c y. The return value is the value of @c f(x,y).
- * @c B can be "called" with various arguments (y1, y2, ...) and will in
- * turn call @c f(x,y1), @c f(x,y2), ...
- *
- * The function @c bind1st is provided to save some typing. It takes the
- * function and an argument as parameters, and returns an instance of
- * @c binder1st.
- *
- * The type @c binder2nd and its creator function @c bind2nd do the same
- * thing, but the stored argument is passed as the second parameter instead
- * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
- * functor whose @c operator() accepts a floating-point number, subtracts
- * 1.3 from it, and returns the result. (If @c bind1st had been used,
- * the functor would perform "1.3 - x" instead.
- *
- * Creator-wrapper functions like @c bind1st are intended to be used in
- * calling algorithms. Their return values will be temporary objects.
- * (The goal is to not require you to type names like
- * @c std::binder1st<std::plus<int>> for declaring a variable to hold the
- * return value from @c bind1st(std::plus<int>,5).
- *
- * These become more useful when combined with the composition functions.
- *
- * @{
- */
- /// One of the @link s20_3_6_binder binder functors@endlink.
- template <class _Operation>
- class binder1st
- : public unary_function<typename _Operation::second_argument_type,
- typename _Operation::result_type>
- {
- protected:
- _Operation op;
- typename _Operation::first_argument_type value;
- public:
- binder1st(const _Operation& __x,
- const typename _Operation::first_argument_type& __y)
- : op(__x), value(__y) {}
-
- typename _Operation::result_type
- operator()(const typename _Operation::second_argument_type& __x) const
- { return op(value, __x); }
-
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 109. Missing binders for non-const sequence elements
- typename _Operation::result_type
- operator()(typename _Operation::second_argument_type& __x) const
- { return op(value, __x); }
- };
-
- /// One of the @link s20_3_6_binder binder functors@endlink.
- template <class _Operation, class _Tp>
- inline binder1st<_Operation>
- bind1st(const _Operation& __fn, const _Tp& __x)
- {
- typedef typename _Operation::first_argument_type _Arg1_type;
- return binder1st<_Operation>(__fn, _Arg1_type(__x));
- }
-
- /// One of the @link s20_3_6_binder binder functors@endlink.
- template <class _Operation>
- class binder2nd
- : public unary_function<typename _Operation::first_argument_type,
- typename _Operation::result_type>
- {
- protected:
- _Operation op;
- typename _Operation::second_argument_type value;
- public:
- binder2nd(const _Operation& __x,
- const typename _Operation::second_argument_type& __y)
- : op(__x), value(__y) {}
-
- typename _Operation::result_type
- operator()(const typename _Operation::first_argument_type& __x) const
- { return op(__x, value); }
-
- // _GLIBCXX_RESOLVE_LIB_DEFECTS
- // 109. Missing binders for non-const sequence elements
- typename _Operation::result_type
- operator()(typename _Operation::first_argument_type& __x) const
- { return op(__x, value); }
- };
-
- /// One of the @link s20_3_6_binder binder functors@endlink.
- template <class _Operation, class _Tp>
- inline binder2nd<_Operation>
- bind2nd(const _Operation& __fn, const _Tp& __x)
- {
- typedef typename _Operation::second_argument_type _Arg2_type;
- return binder2nd<_Operation>(__fn, _Arg2_type(__x));
- }
- /** @} */
-
// 20.3.7 adaptors pointers functions
/** @defgroup s20_3_7_adaptors Adaptors for pointers to functions
* The advantage of function objects over pointers to functions is that
@@ -478,17 +407,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @{
*/
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
- template <class _Arg, class _Result>
+ template<typename _Arg, typename _Result>
class pointer_to_unary_function : public unary_function<_Arg, _Result>
{
protected:
_Result (*_M_ptr)(_Arg);
+
public:
- pointer_to_unary_function() {}
+ pointer_to_unary_function() { }
explicit
pointer_to_unary_function(_Result (*__x)(_Arg))
- : _M_ptr(__x) {}
+ : _M_ptr(__x) { }
_Result
operator()(_Arg __x) const
@@ -496,24 +426,25 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
- template <class _Arg, class _Result>
+ template<typename _Arg, typename _Result>
inline pointer_to_unary_function<_Arg, _Result>
ptr_fun(_Result (*__x)(_Arg))
{ return pointer_to_unary_function<_Arg, _Result>(__x); }
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
- template <class _Arg1, class _Arg2, class _Result>
+ template<typename _Arg1, typename _Arg2, typename _Result>
class pointer_to_binary_function
: public binary_function<_Arg1, _Arg2, _Result>
{
protected:
_Result (*_M_ptr)(_Arg1, _Arg2);
+
public:
- pointer_to_binary_function() {}
+ pointer_to_binary_function() { }
explicit
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
- : _M_ptr(__x) {}
+ : _M_ptr(__x) { }
_Result
operator()(_Arg1 __x, _Arg2 __y) const
@@ -521,13 +452,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
- template <class _Arg1, class _Arg2, class _Result>
+ template<typename _Arg1, typename _Arg2, typename _Result>
inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
ptr_fun(_Result (*__x)(_Arg1, _Arg2))
{ return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
/** @} */
- template <class _Tp>
+ template<typename _Tp>
struct _Identity : public unary_function<_Tp,_Tp>
{
_Tp&
@@ -539,7 +470,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __x; }
};
- template <class _Pair>
+ template<typename _Pair>
struct _Select1st : public unary_function<_Pair,
typename _Pair::first_type>
{
@@ -552,7 +483,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __x.first; }
};
- template <class _Pair>
+ template<typename _Pair>
struct _Select2nd : public unary_function<_Pair,
typename _Pair::second_type>
{
@@ -579,172 +510,188 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* @{
*/
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
class mem_fun_t : public unary_function<_Tp*, _Ret>
{
public:
explicit
mem_fun_t(_Ret (_Tp::*__pf)())
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(_Tp* __p) const
{ return (__p->*_M_f)(); }
+
private:
_Ret (_Tp::*_M_f)();
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
{
public:
explicit
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(const _Tp* __p) const
{ return (__p->*_M_f)(); }
+
private:
_Ret (_Tp::*_M_f)() const;
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
mem_fun_ref_t(_Ret (_Tp::*__pf)())
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(_Tp& __r) const
{ return (__r.*_M_f)(); }
+
private:
_Ret (_Tp::*_M_f)();
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(const _Tp& __r) const
{ return (__r.*_M_f)(); }
+
private:
_Ret (_Tp::*_M_f)() const;
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp, class _Arg>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
{
public:
explicit
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(_Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
+
private:
_Ret (_Tp::*_M_f)(_Arg);
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp, class _Arg>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(const _Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
+
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp, class _Arg>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(_Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
+
private:
_Ret (_Tp::*_M_f)(_Arg);
};
- /// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
- template <class _Ret, class _Tp, class _Arg>
+ /// One of the @link s20_3_8_memadaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
- : _M_f(__pf) {}
+ : _M_f(__pf) { }
_Ret
operator()(const _Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
+
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
// Mem_fun adaptor helper functions. There are only two:
// mem_fun and mem_fun_ref.
- template <class _Ret, class _Tp>
+ template<typename _Ret, typename _Tp>
inline mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)())
{ return mem_fun_t<_Ret, _Tp>(__f); }
- template <class _Ret, class _Tp>
+ template<typename _Ret, typename _Tp>
inline const_mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_t<_Ret, _Tp>(__f); }
- template <class _Ret, class _Tp>
+ template<typename _Ret, typename _Tp>
inline mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)())
{ return mem_fun_ref_t<_Ret, _Tp>(__f); }
- template <class _Ret, class _Tp>
+ template<typename _Ret, typename _Tp>
inline const_mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
- template <class _Ret, class _Tp, class _Arg>
+ template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
- template <class _Ret, class _Tp, class _Arg>
+ template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
- template <class _Ret, class _Tp, class _Arg>
+ template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
- template <class _Ret, class _Tp, class _Arg>
+ template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
@@ -753,4 +700,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_END_NAMESPACE
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+# include <backward/binders.h>
+#endif
+
#endif /* _STL_FUNCTION_H */
diff --git a/libstdc++-v3/include/bits/stl_heap.h b/libstdc++-v3/include/bits/stl_heap.h
index 2965a12e8ac..bbe76e79634 100644
--- a/libstdc++-v3/include/bits/stl_heap.h
+++ b/libstdc++-v3/include/bits/stl_heap.h
@@ -62,56 +62,68 @@
#define _STL_HEAP_H 1
#include <debug/debug.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
- // is_heap, a predicate testing whether or not a range is
- // a heap. This function is an extension, not part of the C++
- // standard.
template<typename _RandomAccessIterator, typename _Distance>
- bool
- __is_heap(_RandomAccessIterator __first, _Distance __n)
+ _Distance
+ __is_heap_until(_RandomAccessIterator __first, _Distance __n)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child)
{
if (__first[__parent] < __first[__child])
- return false;
+ return __child;
if ((__child & 1) == 0)
++__parent;
}
- return true;
+ return __n;
}
template<typename _RandomAccessIterator, typename _Distance,
- typename _StrictWeakOrdering>
- bool
- __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
- _Distance __n)
+ typename _Compare>
+ _Distance
+ __is_heap_until(_RandomAccessIterator __first, _Distance __n,
+ _Compare __comp)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child)
{
if (__comp(__first[__parent], __first[__child]))
- return false;
+ return __child;
if ((__child & 1) == 0)
++__parent;
}
- return true;
+ return __n;
}
+ // __is_heap, a predicate testing whether or not a range is a heap.
+ // This function is an extension, not part of the C++ standard.
+ template<typename _RandomAccessIterator, typename _Distance>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _Distance __n)
+ { return std::__is_heap_until(__first, __n) == __n; }
+
+ template<typename _RandomAccessIterator, typename _Compare,
+ typename _Distance>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n)
+ { return std::__is_heap_until(__first, __n, __comp) == __n; }
+
template<typename _RandomAccessIterator>
inline bool
__is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{ return std::__is_heap(__first, std::distance(__first, __last)); }
- template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
+ template<typename _RandomAccessIterator, typename _Compare>
inline bool
__is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _StrictWeakOrdering __comp)
+ _Compare __comp)
{ return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
- // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
+ // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap,
+ // + is_heap and is_heap_until in C++0x.
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
void
@@ -121,11 +133,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_Distance __parent = (__holeIndex - 1) / 2;
while (__holeIndex > __topIndex && *(__first + __parent) < __value)
{
- *(__first + __holeIndex) = *(__first + __parent);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
- *(__first + __holeIndex) = __value;
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
}
/**
@@ -153,12 +165,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_heap(__first, __last - 1);
+ _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
std::__push_heap(__first, _DistanceType((__last - __first) - 1),
- _DistanceType(0), _ValueType(*(__last - 1)));
+ _DistanceType(0), _GLIBCXX_MOVE(__value));
}
template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
- typename _Compare>
+ typename _Compare>
void
__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __topIndex, _Tp __value, _Compare __comp)
@@ -167,11 +180,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
while (__holeIndex > __topIndex
&& __comp(*(__first + __parent), __value))
{
- *(__first + __holeIndex) = *(__first + __parent);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
- *(__first + __holeIndex) = __value;
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
}
/**
@@ -201,8 +214,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_heap_pred(__first, __last - 1, __comp);
+ _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
std::__push_heap(__first, _DistanceType((__last - __first) - 1),
- _DistanceType(0), _ValueType(*(__last - 1)), __comp);
+ _DistanceType(0), _GLIBCXX_MOVE(__value), __comp);
}
template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
@@ -217,28 +231,35 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__secondChild = 2 * (__secondChild + 1);
if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
__secondChild--;
- *(__first + __holeIndex) = *(__first + __secondChild);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
__holeIndex = __secondChild;
}
if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
{
__secondChild = 2 * (__secondChild + 1);
- *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+ + (__secondChild - 1)));
__holeIndex = __secondChild - 1;
}
- std::__push_heap(__first, __holeIndex, __topIndex, __value);
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ _GLIBCXX_MOVE(__value));
}
- template<typename _RandomAccessIterator, typename _Tp>
+ template<typename _RandomAccessIterator>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _RandomAccessIterator __result, _Tp __value)
+ _RandomAccessIterator __result)
{
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
- _Distance;
- *__result = *__first;
- std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
- __value);
+ _DistanceType;
+
+ _ValueType __value = _GLIBCXX_MOVE(*__result);
+ *__result = _GLIBCXX_MOVE(*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ _GLIBCXX_MOVE(__value));
}
/**
@@ -264,8 +285,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_heap(__first, __last);
- std::__pop_heap(__first, __last - 1, __last - 1,
- _ValueType(*(__last - 1)));
+ std::__pop_heap(__first, __last - 1, __last - 1);
}
template<typename _RandomAccessIterator, typename _Distance,
@@ -282,28 +302,35 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
if (__comp(*(__first + __secondChild),
*(__first + (__secondChild - 1))))
__secondChild--;
- *(__first + __holeIndex) = *(__first + __secondChild);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
__holeIndex = __secondChild;
}
if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
{
__secondChild = 2 * (__secondChild + 1);
- *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+ + (__secondChild - 1)));
__holeIndex = __secondChild - 1;
}
- std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ _GLIBCXX_MOVE(__value), __comp);
}
- template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
+ template<typename _RandomAccessIterator, typename _Compare>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
- _RandomAccessIterator __result, _Tp __value, _Compare __comp)
+ _RandomAccessIterator __result, _Compare __comp)
{
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type
- _Distance;
- *__result = *__first;
- std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
- __value, __comp);
+ _DistanceType;
+
+ _ValueType __value = _GLIBCXX_MOVE(*__result);
+ *__result = _GLIBCXX_MOVE(*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ _GLIBCXX_MOVE(__value), __comp);
}
/**
@@ -322,17 +349,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
- typedef typename iterator_traits<_RandomAccessIterator>::value_type
- _ValueType;
-
// concept requirements
__glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIterator>)
__glibcxx_requires_valid_range(__first, __last);
__glibcxx_requires_heap_pred(__first, __last, __comp);
- std::__pop_heap(__first, __last - 1, __last - 1,
- _ValueType(*(__last - 1)), __comp);
+ std::__pop_heap(__first, __last - 1, __last - 1, __comp);
}
/**
@@ -365,8 +388,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_DistanceType __parent = (__len - 2) / 2;
while (true)
{
- std::__adjust_heap(__first, __parent, __len,
- _ValueType(*(__first + __parent)));
+ _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value));
if (__parent == 0)
return;
__parent--;
@@ -405,8 +428,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_DistanceType __parent = (__len - 2) / 2;
while (true)
{
- std::__adjust_heap(__first, __parent, __len,
- _ValueType(*(__first + __parent)), __comp);
+ _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value),
+ __comp);
if (__parent == 0)
return;
__parent--;
@@ -462,6 +486,85 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::pop_heap(__first, _RandomAccessIterator(__last--), __comp);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Search the end of a heap.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return An iterator pointing to the first element not in the heap.
+ * @ingroup heap
+ *
+ * This operation returns the last iterator i in [first, last) for which
+ * the range [first, i) is a heap.
+ */
+ template<typename _RandomAccessIterator>
+ inline _RandomAccessIterator
+ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return __first + std::__is_heap_until(__first, std::distance(__first,
+ __last));
+ }
+
+ /**
+ * @brief Search the end of a heap using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor to use.
+ * @return An iterator pointing to the first element not in the heap.
+ * @ingroup heap
+ *
+ * This operation returns the last iterator i in [first, last) for which
+ * the range [first, i) is a heap. Comparisons are made using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline _RandomAccessIterator
+ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return __first + std::__is_heap_until(__first, std::distance(__first,
+ __last),
+ __comp);
+ }
+
+ /**
+ * @brief Determines whether a range is a heap.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return True if range is a heap, false otherwise.
+ * @ingroup heap
+ */
+ template<typename _RandomAccessIterator>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ { return std::is_heap_until(__first, __last) == __last; }
+
+ /**
+ * @brief Determines whether a range is a heap using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor to use.
+ * @return True if range is a heap, false otherwise.
+ * @ingroup heap
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ { return std::is_heap_until(__first, __last, __comp) == __last; }
+#endif
+
_GLIBCXX_END_NAMESPACE
#endif /* _STL_HEAP_H */
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index d7c09260234..b041d343a09 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -1,6 +1,6 @@
// Iterators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -68,6 +68,7 @@
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
@@ -414,6 +415,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ back_insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ container->push_back(std::move(__value));
+ return *this;
+ }
+#endif
+
/// Simply returns *this.
back_insert_iterator&
operator*()
@@ -488,6 +498,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ front_insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ container->push_front(std::move(__value));
+ return *this;
+ }
+#endif
+
/// Simply returns *this.
front_insert_iterator&
operator*()
@@ -577,13 +596,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @endcode
*/
insert_iterator&
- operator=(const typename _Container::const_reference __value)
+ operator=(typename _Container::const_reference __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ iter = container->insert(iter, std::move(__value));
+ ++iter;
+ return *this;
+ }
+#endif
+
/// Simply returns *this.
insert_iterator&
operator*()
@@ -639,6 +668,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Iterator _M_current;
public:
+ typedef _Iterator iterator_type;
typedef typename iterator_traits<_Iterator>::iterator_category
iterator_category;
typedef typename iterator_traits<_Iterator>::value_type value_type;
@@ -647,8 +677,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
typedef typename iterator_traits<_Iterator>::reference reference;
typedef typename iterator_traits<_Iterator>::pointer pointer;
- typedef _Iterator _Iterator_type;
-
__normal_iterator() : _M_current(_Iterator()) { }
explicit
@@ -722,7 +750,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Note: In what follows, the left- and right-hand-side iterators are
// allowed to vary in types (conceptually in cv-qualification) so that
- // comparaison between cv-qualified and non-cv-qualified iterators be
+ // comparison between cv-qualified and non-cv-qualified iterators be
// valid. However, the greedy and unfriendly operators in std::rel_ops
// will make overload resolution ambiguous (when in scope) if we don't
// provide overloads whose operands are of the same type. Can someone
@@ -826,4 +854,175 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_GLIBCXX_END_NAMESPACE
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 24.4.3 Move iterators
+ /**
+ * Class template move_iterator is an iterator adapter with the same
+ * behavior as the underlying iterator except that its dereference
+ * operator implicitly converts the value returned by the underlying
+ * iterator's dereference operator to an rvalue reference. Some
+ * generic algorithms can be called with move iterators to replace
+ * copying with moving.
+ */
+ template<typename _Iterator>
+ class move_iterator
+ {
+ protected:
+ _Iterator _M_current;
+
+ public:
+ typedef _Iterator iterator_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
+ // NB: DR 680.
+ typedef _Iterator pointer;
+ typedef typename iterator_traits<_Iterator>::value_type value_type;
+ typedef typename iterator_traits<_Iterator>::iterator_category
+ iterator_category;
+ typedef value_type&& reference;
+
+ public:
+ move_iterator()
+ : _M_current() { }
+
+ explicit
+ move_iterator(iterator_type __i)
+ : _M_current(__i) { }
+
+ template<typename _Iter>
+ move_iterator(const move_iterator<_Iter>& __i)
+ : _M_current(__i.base()) { }
+
+ iterator_type
+ base() const
+ { return _M_current; }
+
+ reference
+ operator*() const
+ { return *_M_current; }
+
+ pointer
+ operator->() const
+ { return _M_current; }
+
+ move_iterator&
+ operator++()
+ {
+ ++_M_current;
+ return *this;
+ }
+
+ move_iterator
+ operator++(int)
+ {
+ move_iterator __tmp = *this;
+ ++_M_current;
+ return __tmp;
+ }
+
+ move_iterator&
+ operator--()
+ {
+ --_M_current;
+ return *this;
+ }
+
+ move_iterator
+ operator--(int)
+ {
+ move_iterator __tmp = *this;
+ --_M_current;
+ return __tmp;
+ }
+
+ move_iterator
+ operator+(difference_type __n) const
+ { return move_iterator(_M_current + __n); }
+
+ move_iterator&
+ operator+=(difference_type __n)
+ {
+ _M_current += __n;
+ return *this;
+ }
+
+ move_iterator
+ operator-(difference_type __n) const
+ { return move_iterator(_M_current - __n); }
+
+ move_iterator&
+ operator-=(difference_type __n)
+ {
+ _M_current -= __n;
+ return *this;
+ }
+
+ reference
+ operator[](difference_type __n) const
+ { return _M_current[__n]; }
+ };
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator==(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __x.base() == __y.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator!=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__x == __y); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __x.base() < __y.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__y < __x); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __y < __x; }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__x < __y); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline typename move_iterator<_IteratorL>::difference_type
+ operator-(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __x.base() - __y.base(); }
+
+ template<typename _Iterator>
+ inline move_iterator<_Iterator>
+ operator+(typename move_iterator<_Iterator>::difference_type __n,
+ const move_iterator<_Iterator>& __x)
+ { return __x + __n; }
+
+ template<typename _Iterator>
+ inline move_iterator<_Iterator>
+ make_move_iterator(const _Iterator& __i)
+ { return move_iterator<_Iterator>(__i); }
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
+#else
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
#endif
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_types.h b/libstdc++-v3/include/bits/stl_iterator_base_types.h
index 785abefdd34..710a2822568 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_types.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_types.h
@@ -1,6 +1,6 @@
// Types used in iterator implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* These are empty types, used to distinguish different iterators. The
* distinction is not made by what they contain, but simply by what they
* are. Different underlying algorithms can then be used based on the
- * different operations supporetd by different iterator types.
+ * different operations supported by different iterator types.
*/
/// Marking input iterators.
struct input_iterator_tag {};
@@ -158,10 +158,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/**
- * @if maint
* This function is not a part of the C++ standard but is syntactic
* sugar for internal library use only.
- * @endif
*/
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h
index 44327dab4e6..a631b0ef1ef 100644
--- a/libstdc++-v3/include/bits/stl_list.h
+++ b/libstdc++-v3/include/bits/stl_list.h
@@ -1,6 +1,6 @@
// List implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,18 +64,18 @@
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
// Supporting structures are split into common and templated types; the
// latter publicly inherits from the former in an effort to reduce code
// duplication. This results in some "needless" static_cast'ing later on,
// but it's all safe downcasting.
- /// @if maint Common part of a node in the %list. @endif
+ /// Common part of a node in the %list.
struct _List_node_base
{
- _List_node_base* _M_next; ///< Self-explanatory
- _List_node_base* _M_prev; ///< Self-explanatory
+ _List_node_base* _M_next;
+ _List_node_base* _M_prev;
static void
swap(_List_node_base& __x, _List_node_base& __y);
@@ -94,19 +94,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
unhook();
};
- /// @if maint An actual node in the %list. @endif
+ /// An actual node in the %list.
template<typename _Tp>
struct _List_node : public _List_node_base
{
- _Tp _M_data; ///< User's data.
+ ///< User's data.
+ _Tp _M_data;
};
/**
* @brief A list::iterator.
*
- * @if maint
* All the functions are op overloads.
- * @endif
*/
template<typename _Tp>
struct _List_iterator
@@ -181,9 +180,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* @brief A list::const_iterator.
*
- * @if maint
* All the functions are op overloads.
- * @endif
*/
template<typename _Tp>
struct _List_const_iterator
@@ -273,11 +270,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return __x._M_node != __y._M_node; }
- /**
- * @if maint
- * See bits/stl_deque.h's _Deque_base for an explanation.
- * @endif
- */
+ /// See bits/stl_deque.h's _Deque_base for an explanation.
template<typename _Tp, typename _Alloc>
class _List_base
{
@@ -305,6 +298,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
_List_node_base _M_node;
+ _List_impl()
+ : _Node_alloc_type(), _M_node()
+ { }
+
_List_impl(const _Node_alloc_type& __a)
: _Node_alloc_type(__a), _M_node()
{ }
@@ -339,10 +336,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
get_allocator() const
{ return allocator_type(_M_get_Node_allocator()); }
+ _List_base()
+ : _M_impl()
+ { _M_init(); }
+
_List_base(const allocator_type& __a)
: _M_impl(__a)
{ _M_init(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _List_base(_List_base&& __x)
+ : _M_impl(__x._M_get_Node_allocator())
+ {
+ _M_init();
+ _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
+ }
+#endif
+
// This is what actually destroys the list.
~_List_base()
{ _M_clear(); }
@@ -383,7 +393,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* specialized algorithms %unique to linked lists, such as
* splicing, sorting, and in-place reversal.
*
- * @if maint
* A couple points on memory allocation for list<Tp>:
*
* First, we never actually allocate a Tp, we allocate
@@ -401,7 +410,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* pointing to @e D, not to @e A! To get to the head of the %list,
* we start at the tail and move forward by one. When this member
* iterator's next/previous pointers refer to itself, the %list is
- * %empty. @endif
+ * %empty.
*/
template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
class list : protected _List_base<_Tp, _Alloc>
@@ -440,12 +449,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
using _Base::_M_get_Node_allocator;
/**
- * @if maint
* @param x An instance of user data.
*
* Allocates space for a new node and constructs a copy of @a x in it.
- * @endif
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
_Node*
_M_create_node(const value_type& __x)
{
@@ -461,6 +469,25 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
return __p;
}
+#else
+ template<typename... _Args>
+ _Node*
+ _M_create_node(_Args&&... __args)
+ {
+ _Node* __p = this->_M_get_node();
+ try
+ {
+ _M_get_Tp_allocator().construct(&__p->_M_data,
+ std::forward<_Args>(__args)...);
+ }
+ catch(...)
+ {
+ _M_put_node(__p);
+ __throw_exception_again;
+ }
+ return __p;
+ }
+#endif
public:
// [23.2.2.1] construct/copy/destroy
@@ -468,14 +495,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* @brief Default constructor creates no elements.
*/
+ list()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %list with no elements.
+ * @param a An allocator object.
+ */
explicit
- list(const allocator_type& __a = allocator_type())
+ list(const allocator_type& __a)
: _Base(__a) { }
/**
- * @brief Create a %list with copies of an exemplar element.
+ * @brief Creates a %list with copies of an exemplar element.
* @param n The number of elements to initially create.
* @param value An element to copy.
+ * @param a An allocator object.
*
* This constructor fills the %list with @a n copies of @a value.
*/
@@ -496,10 +531,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
: _Base(__x._M_get_Node_allocator())
{ _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %List move constructor.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The newly-created %list contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %list.
+ */
+ list(list&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+
/**
* @brief Builds a %list from a range.
* @param first An input iterator.
* @param last An input iterator.
+ * @param a An allocator object.
*
* Create a %list consisting of copies of the elements from
* [@a first,@a last). This is linear in N (where N is
@@ -520,7 +568,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* things. The _Base dtor only erases the elements, and note
* that if the elements themselves are pointers, the pointed-to
* memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
+ * the user's responsibility.
*/
/**
@@ -533,6 +581,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
list&
operator=(const list& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %List move assignment operator.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %list (without copying).
+ * @a x is a valid, but unspecified %list
+ */
+ list&
+ operator=(list&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
/**
* @brief Assigns a given value to a %list.
* @param n Number of elements to be assigned.
@@ -645,6 +711,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_impl._M_node._M_next); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(&this->_M_impl._M_node); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to
+ * the last element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
// [23.2.2.2] capacity
/**
* Returns true if the %list is empty. (Thus begin() would equal
@@ -729,9 +833,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* done in constant time, and does not invalidate iterators and
* references.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_front(const value_type& __x)
{ this->_M_insert(begin(), __x); }
+#else
+ template<typename... _Args>
+ void
+ push_front(_Args&&... __args)
+ { this->_M_insert(begin(), std::forward<_Args>(__args)...); }
+#endif
/**
* @brief Removes first element.
@@ -759,9 +870,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* in constant time, and does not invalidate iterators and
* references.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_back(const value_type& __x)
{ this->_M_insert(end(), __x); }
+#else
+ template<typename... _Args>
+ void
+ push_back(_Args&&... __args)
+ { this->_M_insert(end(), std::forward<_Args>(__args)...); }
+#endif
/**
* @brief Removes last element.
@@ -778,6 +896,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
pop_back()
{ this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Constructs object in %list before specified iterator.
+ * @param position A const_iterator into the %list.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified
+ * location. Due to the nature of a %list this operation can
+ * be done in constant time, and does not invalidate iterators
+ * and references.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
/**
* @brief Inserts given value into %list before specified iterator.
* @param position An iterator into the %list.
@@ -792,6 +928,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
iterator
insert(iterator __position, const value_type& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %list before specified iterator.
+ * @param position An iterator into the %list.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before
+ * the specified location. Due to the nature of a %list this
+ * operation can be done in constant time, and does not
+ * invalidate iterators and references.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
/**
* @brief Inserts a number of copies of given data into the %list.
* @param position An iterator into the %list.
@@ -846,7 +999,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* the element being removed. The user is also cautioned that
* this function only erases the element, and that if the element
* is itself a pointer, the pointed-to memory is not touched in
- * any way. Managing the pointer is the user's responsibilty.
+ * any way. Managing the pointer is the user's responsibility.
*/
iterator
erase(iterator __position);
@@ -867,7 +1020,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The user is also cautioned that this function only erases the
* elements, and that if the elements themselves are pointers, the
* pointed-to memory is not touched in any way. Managing the pointer
- * is the user's responsibilty.
+ * is the user's responsibility.
*/
iterator
erase(iterator __first, iterator __last)
@@ -887,7 +1040,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* function.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(list&& __x)
+#else
swap(list& __x)
+#endif
{
_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
@@ -901,7 +1058,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Erases all the elements. Note that this function only erases
* the elements, and that if the elements themselves are
* pointers, the pointed-to memory is not touched in any way.
- * Managing the pointer is the user's responsibilty.
+ * Managing the pointer is the user's responsibility.
*/
void
clear()
@@ -923,7 +1080,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Requires this != @a x.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x)
+#else
splice(iterator __position, list& __x)
+#endif
{
if (!__x.empty())
{
@@ -943,7 +1104,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* inserts it into the current list before @a position.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __i)
+#else
splice(iterator __position, list& __x, iterator __i)
+#endif
{
iterator __j = __i;
++__j;
@@ -969,7 +1134,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Undefined if @a position is in [first,last).
*/
void
- splice(iterator __position, list& __x, iterator __first, iterator __last)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __first,
+ iterator __last)
+#else
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+#endif
{
if (__first != __last)
{
@@ -989,7 +1160,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* function only erases the elements, and that if the elements
* themselves are pointers, the pointed-to memory is not
* touched in any way. Managing the pointer is the user's
- * responsibilty.
+ * responsibility.
*/
void
remove(const _Tp& __value);
@@ -1003,7 +1174,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* that this function only erases the elements, and that if the
* elements themselves are pointers, the pointed-to memory is
* not touched in any way. Managing the pointer is the user's
- * responsibilty.
+ * responsibility.
*/
template<typename _Predicate>
void
@@ -1017,7 +1188,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* list order. Note that this function only erases the
* elements, and that if the elements themselves are pointers,
* the pointed-to memory is not touched in any way. Managing
- * the pointer is the user's responsibilty.
+ * the pointer is the user's responsibility.
*/
void
unique();
@@ -1032,7 +1203,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* elements stay in list order. Note that this function only
* erases the elements, and that if the elements themselves are
* pointers, the pointed-to memory is not touched in any way.
- * Managing the pointer is the user's responsibilty.
+ * Managing the pointer is the user's responsibility.
*/
template<typename _BinaryPredicate>
void
@@ -1048,12 +1219,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* this list precede elements in @a x that are equal.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x);
+#else
merge(list& __x);
+#endif
/**
* @brief Merge sorted lists according to comparison function.
* @param x Sorted list to merge.
- * @param StrictWeakOrdering Comparison function definining
+ * @param StrictWeakOrdering Comparison function defining
* sort order.
*
* Assumes that both @a x and this list are sorted according to
@@ -1064,7 +1239,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/
template<typename _StrictWeakOrdering>
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&&, _StrictWeakOrdering);
+#else
merge(list&, _StrictWeakOrdering);
+#endif
/**
* @brief Reverse the elements in list.
@@ -1155,12 +1334,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ __position._M_node->transfer(__first._M_node, __last._M_node); }
// Inserts new element at position given and with value given.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
_M_insert(iterator __position, const value_type& __x)
{
_Node* __tmp = _M_create_node(__x);
__tmp->hook(__position._M_node);
}
+#else
+ template<typename... _Args>
+ void
+ _M_insert(iterator __position, _Args&&... __args)
+ {
+ _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+ __tmp->hook(__position._M_node);
+ }
+#endif
// Erases element at position given.
void
@@ -1176,7 +1365,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
void
_M_check_equal_allocators(list& __x)
{
- if (_M_get_Node_allocator() != __x._M_get_Node_allocator())
+ if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
+ _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
__throw_runtime_error(__N("list::_M_check_equal_allocators"));
}
};
@@ -1256,7 +1446,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>&& __x, list<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_LIST_H */
-
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index 741b9e6c16f..a9486708ffe 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -1,6 +1,6 @@
// Map implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -65,7 +65,7 @@
#include <bits/functexcept.h>
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
* @brief A standard container made up of (key,value) pairs, which can be
@@ -82,11 +82,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* Maps support bidirectional iterators.
*
- * @if maint
* The private tree data is declared exactly the same way for map and
* multimap; the distinction is made entirely in how the tree functions are
* called (*_unique versus *_equal, same as the standard).
- * @endif
*/
template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
@@ -124,14 +122,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
};
private:
- /// @if maint This turns a red-black tree into a [multi]map. @endif
+ /// This turns a red-black tree into a [multi]map.
typedef typename _Alloc::template rebind<value_type>::other
_Pair_alloc_type;
typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
key_compare, _Pair_alloc_type> _Rep_type;
- /// @if maint The actual tree structure. @endif
+ /// The actual tree structure.
_Rep_type _M_t;
public:
@@ -155,26 +153,40 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* @brief Default constructor creates no elements.
*/
map()
- : _M_t(_Compare(), allocator_type()) { }
+ : _M_t() { }
- // for some reason this was made a separate function
/**
- * @brief Default constructor creates no elements.
+ * @brief Creates a %map with no elements.
+ * @param comp A comparison object.
+ * @param a An allocator object.
*/
explicit
- map(const _Compare& __comp, const allocator_type& __a = allocator_type())
+ map(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) { }
/**
- * @brief Map copy constructor.
+ * @brief %Map copy constructor.
* @param x A %map of identical element and allocator types.
*
- * The newly-created %map uses a copy of the allocation object used
- * by @a x.
+ * The newly-created %map uses a copy of the allocation object
+ * used by @a x.
*/
map(const map& __x)
: _M_t(__x._M_t) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Map move constructor.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The newly-created %map contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %map.
+ */
+ map(map&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+#endif
+
/**
* @brief Builds a %map from a range.
* @param first An input iterator.
@@ -184,9 +196,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
map(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
+ : _M_t()
{ _M_t._M_insert_unique(__first, __last); }
/**
@@ -200,9 +212,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
map(_InputIterator __first, _InputIterator __last,
- const _Compare& __comp, const allocator_type& __a = allocator_type())
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
: _M_t(__comp, __a)
{ _M_t._M_insert_unique(__first, __last); }
@@ -212,11 +225,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* The dtor only erases the elements, and note that if the elements
* themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
+ * way. Managing the pointer is the user's responsibility.
*/
/**
- * @brief Map assignment operator.
+ * @brief %Map assignment operator.
* @param x A %map of identical element and allocator types.
*
* All the elements of @a x are copied, but unlike the copy constructor,
@@ -229,6 +242,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Map move assignment operator.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this map (without copying).
+ * @a x is a valid, but unspecified %map.
+ */
+ map&
+ operator=(map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
/// Get a copy of the memory allocation object.
allocator_type
get_allocator() const
@@ -307,6 +338,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
rend() const
{ return _M_t.rend(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %map. Iteration is done in ascending order according to the
+ * keys.
+ */
+ const_iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %map. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %map. Iteration is done in descending
+ * order according to the keys.
+ */
+ const_reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
// capacity
/** Returns true if the %map is empty. (Thus begin() would equal
* end().)
@@ -427,14 +496,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t._M_insert_unique_(__position, __x); }
/**
- * @brief Template function that attemps to insert a range of elements.
+ * @brief Template function that attempts to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
*
* Complexity similar to that of the range constructor.
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_unique(__first, __last); }
@@ -447,7 +516,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* iterator, from a %map. Note that this function only erases
* the element, and that if the element is itself a pointer,
* the pointed-to memory is not touched in any way. Managing
- * the pointer is the user's responsibilty.
+ * the pointer is the user's responsibility.
*/
void
erase(iterator __position)
@@ -462,7 +531,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* a %map.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
size_type
erase(const key_type& __x)
@@ -477,7 +546,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This function erases a sequence of elements from a %map.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
void
erase(iterator __first, iterator __last)
@@ -495,14 +564,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* that std::swap(m1,m2) will feed to this function.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(map&& __x)
+#else
swap(map& __x)
+#endif
{ _M_t.swap(__x._M_t); }
/**
* Erases all elements in a %map. Note that this function only
* erases the elements, and that if the elements themselves are
* pointers, the pointed-to memory is not touched in any way.
- * Managing the pointer is the user's responsibilty.
+ * Managing the pointer is the user's responsibility.
*/
void
clear()
@@ -656,15 +729,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
equal_range(const key_type& __x) const
{ return _M_t.equal_range(__x); }
- template <typename _K1, typename _T1, typename _C1, typename _A1>
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
- operator== (const map<_K1, _T1, _C1, _A1>&,
- const map<_K1, _T1, _C1, _A1>&);
+ operator==(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
- template <typename _K1, typename _T1, typename _C1, typename _A1>
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
- operator< (const map<_K1, _T1, _C1, _A1>&,
- const map<_K1, _T1, _C1, _A1>&);
+ operator<(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
};
/**
@@ -677,7 +750,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* maps. Maps are considered equivalent if their sizes are equal,
* and if corresponding elements compare equal.
*/
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
@@ -694,47 +767,61 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* See std::lexicographical_compare() for how the determination is made.
*/
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __x._M_t < __y._M_t; }
/// Based on operator==
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x == __y); }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __y < __x; }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__y < __x); }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
const map<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x < __y); }
/// See std::map::swap().
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline void
swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
map<_Key, _Tp, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Alloc>&& __x,
+ map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
+ map<_Key, _Tp, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_MAP_H */
diff --git a/libstdc++-v3/include/bits/stl_move.h b/libstdc++-v3/include/bits/stl_move.h
new file mode 100644
index 00000000000..ab5b494f1b9
--- /dev/null
+++ b/libstdc++-v3/include/bits/stl_move.h
@@ -0,0 +1,92 @@
+// Move, forward and identity for C++0x + swap -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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 stl_move.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MOVE_H
+#define _STL_MOVE_H 1
+
+#include <bits/c++config.h>
+#include <bits/concept_check.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <type_traits>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 20.2.2, forward/move
+ template<typename _Tp>
+ struct identity
+ {
+ typedef _Tp type;
+ };
+
+ template<typename _Tp>
+ inline _Tp&&
+ forward(typename std::identity<_Tp>::type&& __t)
+ { return __t; }
+
+ template<typename _Tp>
+ inline typename std::remove_reference<_Tp>::type&&
+ move(_Tp&& __t)
+ { return __t; }
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MOVE(_Tp) std::move(_Tp)
+#else
+#define _GLIBCXX_MOVE(_Tp) (_Tp)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Swaps two values.
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return Nothing.
+ */
+ template<typename _Tp>
+ inline void
+ swap(_Tp& __a, _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
+
+ _Tp __tmp = _GLIBCXX_MOVE(__a);
+ __a = _GLIBCXX_MOVE(__b);
+ __b = _GLIBCXX_MOVE(__tmp);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_MOVE_H */
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h
index 67d81cbd7c7..cfc1a69ec5f 100644
--- a/libstdc++-v3/include/bits/stl_multimap.h
+++ b/libstdc++-v3/include/bits/stl_multimap.h
@@ -1,6 +1,6 @@
// Multimap implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,7 +64,7 @@
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
* @brief A standard container made up of (key,value) pairs, which can be
@@ -81,11 +81,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* Multimaps support bidirectional iterators.
*
- * @if maint
* The private tree data is declared exactly the same way for map and
* multimap; the distinction is made entirely in how the tree functions are
* called (*_unique versus *_equal, same as the standard).
- * @endif
*/
template <typename _Key, typename _Tp,
typename _Compare = std::less<_Key>,
@@ -124,13 +122,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
};
private:
- /// @if maint This turns a red-black tree into a [multi]map. @endif
+ /// This turns a red-black tree into a [multi]map.
typedef typename _Alloc::template rebind<value_type>::other
_Pair_alloc_type;
typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
key_compare, _Pair_alloc_type> _Rep_type;
- /// @if maint The actual tree structure. @endif
+ /// The actual tree structure.
_Rep_type _M_t;
public:
@@ -153,11 +151,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* @brief Default constructor creates no elements.
*/
multimap()
- : _M_t(_Compare(), allocator_type()) { }
+ : _M_t() { }
- // for some reason this was made a separate function
/**
- * @brief Default constructor creates no elements.
+ * @brief Creates a %multimap with no elements.
+ * @param comp A comparison object.
+ * @param a An allocator object.
*/
explicit
multimap(const _Compare& __comp,
@@ -168,12 +167,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* @brief %Multimap copy constructor.
* @param x A %multimap of identical element and allocator types.
*
- * The newly-created %multimap uses a copy of the allocation object used
- * by @a x.
+ * The newly-created %multimap uses a copy of the allocation object
+ * used by @a x.
*/
multimap(const multimap& __x)
: _M_t(__x._M_t) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multimap move constructor.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The newly-created %multimap contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %multimap.
+ */
+ multimap(multimap&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+#endif
+
/**
* @brief Builds a %multimap from a range.
* @param first An input iterator.
@@ -183,10 +194,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* [first,last). This is linear in N if the range is already sorted,
* and NlogN otherwise (where N is distance(first,last)).
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
multimap(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
- { _M_t._M_insert_equal(__first, __last); }
+ : _M_t()
+ { _M_t._M_insert_unique(__first, __last); }
/**
* @brief Builds a %multimap from a range.
@@ -199,7 +210,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* [first,last). This is linear in N if the range is already sorted,
* and NlogN otherwise (where N is distance(first,last)).
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
multimap(_InputIterator __first, _InputIterator __last,
const _Compare& __comp,
const allocator_type& __a = allocator_type())
@@ -212,7 +223,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* The dtor only erases the elements, and note that if the elements
* themselves are pointers, the pointed-to memory is not touched in any
- * way. Managing the pointer is the user's responsibilty.
+ * way. Managing the pointer is the user's responsibility.
*/
/**
@@ -229,6 +240,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multimap move assignment operator.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this multimap (without copying).
+ * @a x is a valid, but unspecified multimap.
+ */
+ multimap&
+ operator=(multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
/// Get a copy of the memory allocation object.
allocator_type
get_allocator() const
@@ -307,6 +336,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
rend() const
{ return _M_t.rend(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %multimap. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %multimap. Iteration is done in ascending order according
+ * to the keys.
+ */
+ const_iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %multimap. Iteration is done in
+ * descending order according to the keys.
+ */
+ const_reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
// capacity
/** Returns true if the %multimap is empty. */
bool
@@ -365,14 +432,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t._M_insert_equal_(__position, __x); }
/**
- * @brief A template function that attemps to insert a range of elements.
+ * @brief A template function that attempts to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
*
* Complexity similar to that of the range constructor.
*/
- template <typename _InputIterator>
+ template<typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_equal(__first, __last); }
@@ -385,7 +452,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* from a %multimap. Note that this function only erases the element,
* and that if the element is itself a pointer, the pointed-to memory is
* not touched in any way. Managing the pointer is the user's
- * responsibilty.
+ * responsibility.
*/
void
erase(iterator __position)
@@ -400,7 +467,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* %multimap.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
size_type
erase(const key_type& __x)
@@ -415,7 +482,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This function erases a sequence of elements from a %multimap.
* Note that this function only erases the elements, and that if
* the elements themselves are pointers, the pointed-to memory is not
- * touched in any way. Managing the pointer is the user's responsibilty.
+ * touched in any way. Managing the pointer is the user's responsibility.
*/
void
erase(iterator __first, iterator __last)
@@ -433,14 +500,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* std::swap(m1,m2) will feed to this function.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multimap&& __x)
+#else
swap(multimap& __x)
+#endif
{ _M_t.swap(__x._M_t); }
/**
* Erases all elements in a %multimap. Note that this function only
* erases the elements, and that if the elements themselves are pointers,
* the pointed-to memory is not touched in any way. Managing the pointer
- * is the user's responsibilty.
+ * is the user's responsibility.
*/
void
clear()
@@ -587,15 +658,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
equal_range(const key_type& __x) const
{ return _M_t.equal_range(__x); }
- template <typename _K1, typename _T1, typename _C1, typename _A1>
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
- operator== (const multimap<_K1, _T1, _C1, _A1>&,
- const multimap<_K1, _T1, _C1, _A1>&);
+ operator==(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
- template <typename _K1, typename _T1, typename _C1, typename _A1>
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
friend bool
- operator< (const multimap<_K1, _T1, _C1, _A1>&,
- const multimap<_K1, _T1, _C1, _A1>&);
+ operator<(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
};
/**
@@ -608,7 +679,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* multimaps. Multimaps are considered equivalent if their sizes are equal,
* and if corresponding elements compare equal.
*/
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
@@ -625,47 +696,61 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* See std::lexicographical_compare() for how the determination is made.
*/
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __x._M_t < __y._M_t; }
/// Based on operator==
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x == __y); }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ return __y < __x; }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__y < __x); }
/// Based on operator<
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ return !(__x < __y); }
/// See std::multimap::swap().
- template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline void
swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
multimap<_Key, _Tp, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Alloc>&& __x,
+ multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ multimap<_Key, _Tp, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_MULTIMAP_H */
diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h
index 3f88e534893..2cdbdfe4cf3 100644
--- a/libstdc++-v3/include/bits/stl_multiset.h
+++ b/libstdc++-v3/include/bits/stl_multiset.h
@@ -1,6 +1,6 @@
// Multiset implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,7 +64,7 @@
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
* @brief A standard container made up of elements, which can be retrieved
@@ -80,14 +80,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* Multisets support bidirectional iterators.
*
- * @if maint
* The private tree data is declared exactly the same way for set and
* multiset; the distinction is made entirely in how the tree functions are
* called (*_unique versus *_equal, same as the standard).
- * @endif
*/
- template <class _Key, class _Compare = std::less<_Key>,
- class _Alloc = std::allocator<_Key> >
+ template <typename _Key, typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<_Key> >
class multiset
{
// concept requirements
@@ -106,12 +104,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
typedef _Alloc allocator_type;
private:
- /// @if maint This turns a red-black tree into a [multi]set. @endif
+ /// This turns a red-black tree into a [multi]set.
typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
key_compare, _Key_alloc_type> _Rep_type;
- /// @if maint The actual tree structure. @endif
+ /// The actual tree structure.
_Rep_type _M_t;
public:
@@ -130,13 +128,17 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
typedef typename _Rep_type::difference_type difference_type;
// allocation/deallocation
-
/**
* @brief Default constructor creates no elements.
*/
multiset()
- : _M_t(_Compare(), allocator_type()) { }
+ : _M_t() { }
+ /**
+ * @brief Creates a %multiset with no elements.
+ * @param comp Comparator to use.
+ * @param a An allocator object.
+ */
explicit
multiset(const _Compare& __comp,
const allocator_type& __a = allocator_type())
@@ -151,9 +153,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* [first,last). This is linear in N if the range is already sorted,
* and NlogN otherwise (where N is distance(first,last)).
*/
- template <class _InputIterator>
+ template<typename _InputIterator>
multiset(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
+ : _M_t()
{ _M_t._M_insert_equal(__first, __last); }
/**
@@ -167,7 +169,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* [first,last). This is linear in N if the range is already sorted,
* and NlogN otherwise (where N is distance(first,last)).
*/
- template <class _InputIterator>
+ template<typename _InputIterator>
multiset(_InputIterator __first, _InputIterator __last,
const _Compare& __comp,
const allocator_type& __a = allocator_type())
@@ -181,9 +183,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The newly-created %multiset uses a copy of the allocation object used
* by @a x.
*/
- multiset(const multiset<_Key,_Compare,_Alloc>& __x)
+ multiset(const multiset& __x)
: _M_t(__x._M_t) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multiset move constructor.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The newly-created %multiset contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %multiset.
+ */
+ multiset(multiset&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+#endif
+
/**
* @brief %Multiset assignment operator.
* @param x A %multiset of identical element and allocator types.
@@ -191,13 +205,31 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* All the elements of @a x are copied, but unlike the copy constructor,
* the allocator object is not copied.
*/
- multiset<_Key,_Compare,_Alloc>&
- operator=(const multiset<_Key,_Compare,_Alloc>& __x)
+ multiset&
+ operator=(const multiset& __x)
{
_M_t = __x._M_t;
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multiset move assignment operator.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %multiset (without copying).
+ * @a x is a valid, but unspecified %multiset.
+ */
+ multiset&
+ operator=(multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
// accessors:
/// Returns the comparison object.
@@ -214,41 +246,79 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t.get_allocator(); }
/**
- * Returns a read/write iterator that points to the first element in the
- * %multiset. Iteration is done in ascending order according to the
- * keys.
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
*/
iterator
begin() const
{ return _M_t.begin(); }
/**
- * Returns a read/write iterator that points one past the last element in
- * the %multiset. Iteration is done in ascending order according to the
- * keys.
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
*/
iterator
end() const
{ return _M_t.end(); }
/**
- * Returns a read/write reverse iterator that points to the last element
- * in the %multiset. Iteration is done in descending order according to
- * the keys.
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
*/
reverse_iterator
rbegin() const
{ return _M_t.rbegin(); }
/**
- * Returns a read/write reverse iterator that points to the last element
- * in the %multiset. Iteration is done in descending order according to
- * the keys.
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
*/
reverse_iterator
rend() const
{ return _M_t.rend(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
/// Returns true if the %set is empty.
bool
empty() const
@@ -276,7 +346,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* std::swap(s1,s2) will feed to this function.
*/
void
- swap(multiset<_Key, _Compare, _Alloc>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multiset&& __x)
+#else
+ swap(multiset& __x)
+#endif
{ _M_t.swap(__x._M_t); }
// insert/erase
@@ -320,14 +394,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t._M_insert_equal_(__position, __x); }
/**
- * @brief A template function that attemps to insert a range of elements.
+ * @brief A template function that attempts to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
*
* Complexity similar to that of the range constructor.
*/
- template <class _InputIterator>
+ template<typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_equal(__first, __last); }
@@ -340,7 +414,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* from a %multiset. Note that this function only erases the element,
* and that if the element is itself a pointer, the pointed-to memory is
* not touched in any way. Managing the pointer is the user's
- * responsibilty.
+ * responsibility.
*/
void
erase(iterator __position)
@@ -355,7 +429,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* %multiset.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
size_type
erase(const key_type& __x)
@@ -370,7 +444,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This function erases a sequence of elements from a %multiset.
* Note that this function only erases the elements, and that if
* the elements themselves are pointers, the pointed-to memory is not
- * touched in any way. Managing the pointer is the user's responsibilty.
+ * touched in any way. Managing the pointer is the user's responsibility.
*/
void
erase(iterator __first, iterator __last)
@@ -380,7 +454,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Erases all elements in a %multiset. Note that this function only
* erases the elements, and that if the elements themselves are pointers,
* the pointed-to memory is not touched in any way. Managing the pointer
- * is the user's responsibilty.
+ * is the user's responsibility.
*/
void
clear()
@@ -481,12 +555,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
equal_range(const key_type& __x) const
{ return _M_t.equal_range(__x); }
- template <class _K1, class _C1, class _A1>
+ template<typename _K1, typename _C1, typename _A1>
friend bool
- operator== (const multiset<_K1, _C1, _A1>&,
- const multiset<_K1, _C1, _A1>&);
+ operator==(const multiset<_K1, _C1, _A1>&,
+ const multiset<_K1, _C1, _A1>&);
- template <class _K1, class _C1, class _A1>
+ template<typename _K1, typename _C1, typename _A1>
friend bool
operator< (const multiset<_K1, _C1, _A1>&,
const multiset<_K1, _C1, _A1>&);
@@ -503,7 +577,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Multisets are considered equivalent if their sizes are equal, and if
* corresponding elements compare equal.
*/
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator==(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y)
@@ -520,47 +594,61 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* See std::lexicographical_compare() for how the determination is made.
*/
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator<(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y)
{ return __x._M_t < __y._M_t; }
/// Returns !(x == y).
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y)
{ return !(__x == __y); }
/// Returns y < x.
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator>(const multiset<_Key,_Compare,_Alloc>& __x,
const multiset<_Key,_Compare,_Alloc>& __y)
{ return __y < __x; }
/// Returns !(y < x)
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator<=(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y)
{ return !(__y < __x); }
/// Returns !(x < y)
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator>=(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y)
{ return !(__x < __y); }
/// See std::multiset::swap().
- template <class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline void
swap(multiset<_Key, _Compare, _Alloc>& __x,
multiset<_Key, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(multiset<_Key, _Compare, _Alloc>&& __x,
+ multiset<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(multiset<_Key, _Compare, _Alloc>& __x,
+ multiset<_Key, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_MULTISET_H */
diff --git a/libstdc++-v3/include/bits/stl_numeric.h b/libstdc++-v3/include/bits/stl_numeric.h
index 2c44b180840..3940e4aa970 100644
--- a/libstdc++-v3/include/bits/stl_numeric.h
+++ b/libstdc++-v3/include/bits/stl_numeric.h
@@ -65,7 +65,7 @@
#include <bits/concept_check.h>
#include <debug/debug.h>
-_GLIBCXX_BEGIN_NAMESPACE(std)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
/**
* @brief Accumulate values in a range.
@@ -79,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The final sum.
*/
template<typename _InputIterator, typename _Tp>
- _Tp
+ inline _Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{
// concept requirements
@@ -105,7 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The final sum.
*/
template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
- _Tp
+ inline _Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
_BinaryOperation __binary_op)
{
@@ -133,7 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The final inner product.
*/
template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
- _Tp
+ inline _Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init)
{
@@ -165,7 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*/
template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
typename _BinaryOperation1, typename _BinaryOperation2>
- _Tp
+ inline _Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init,
_BinaryOperation1 __binary_op1,
@@ -336,6 +336,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return ++__result;
}
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_NUMERIC_H */
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index bdc6723f748..3bda5018058 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -62,6 +62,9 @@
#ifndef _STL_PAIR_H
#define _STL_PAIR_H 1
+#include <bits/stl_move.h> // for std::move / std::forward, std::decay, and
+ // std::swap
+
_GLIBCXX_BEGIN_NAMESPACE(std)
/// pair holds two objects of arbitrary type.
@@ -85,10 +88,61 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<class _U1, class _U2>
+ pair(_U1&& __x, _U2&& __y)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_U2>(__y)) { }
+
+ pair(pair&& __p)
+ : first(std::move(__p.first)),
+ second(std::move(__p.second)) { }
+#endif
+
/** There is also a templated copy ctor for the @c pair class itself. */
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
- : first(__p.first), second(__p.second) { }
+ : first(__p.first),
+ second(__p.second) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<class _U1, class _U2>
+ pair(pair<_U1, _U2>&& __p)
+ : first(std::move(__p.first)),
+ second(std::move(__p.second)) { }
+
+ // http://gcc.gnu.org/ml/libstdc++/2007-08/msg00052.html
+ template<class _U1, class _Arg0, class... _Args>
+ pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_Arg0>(__arg0),
+ std::forward<_Args>(__args)...) { }
+
+ pair&
+ operator=(pair&& __p)
+ {
+ first = std::move(__p.first);
+ second = std::move(__p.second);
+ return *this;
+ }
+
+ template<class _U1, class _U2>
+ pair&
+ operator=(pair<_U1, _U2>&& __p)
+ {
+ first = std::move(__p.first);
+ second = std::move(__p.second);
+ return *this;
+ }
+
+ void
+ swap(pair&& __p)
+ {
+ using std::swap;
+ swap(first, __p.first);
+ swap(second, __p.second);
+ }
+#endif
};
/// Two pairs of the same type are equal iff their members are equal.
@@ -128,6 +182,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// See std::pair::swap().
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
+ { __x.swap(__y); }
+
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>&& __x, pair<_T1, _T2>& __y)
+ { __x.swap(__y); }
+
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>&& __y)
+ { __x.swap(__y); }
+#endif
+
/**
* @brief A convenience wrapper for creating a pair from two objects.
* @param x The first object.
@@ -140,10 +212,52 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
template<class _T1, class _T2>
inline pair<_T1, _T2>
make_pair(_T1 __x, _T2 __y)
{ return pair<_T1, _T2>(__x, __y); }
+#else
+ template<typename _Tp>
+ class reference_wrapper;
+
+ // Helper which adds a reference to a type when given a reference_wrapper
+ template<typename _Tp>
+ struct __strip_reference_wrapper
+ {
+ typedef _Tp __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __decay_and_strip
+ {
+ typedef typename __strip_reference_wrapper<
+ typename decay<_Tp>::type>::__type __type;
+ };
+
+ // NB: DR 706.
+ template<class _T1, class _T2>
+ inline pair<typename __decay_and_strip<_T1>::__type,
+ typename __decay_and_strip<_T2>::__type>
+ make_pair(_T1&& __x, _T2&& __y)
+ {
+ return pair<typename __decay_and_strip<_T1>::__type,
+ typename __decay_and_strip<_T2>::__type>
+ (std::forward<_T1>(__x), std::forward<_T2>(__y));
+ }
+#endif
_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h
index 469f9ec17be..4ab3c46c0b8 100644
--- a/libstdc++-v3/include/bits/stl_queue.h
+++ b/libstdc++-v3/include/bits/stl_queue.h
@@ -131,8 +131,29 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Default constructor creates no elements.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
explicit
- queue(const _Sequence& __c = _Sequence()) : c(__c) {}
+ queue(const _Sequence& __c = _Sequence())
+ : c(__c) { }
+#else
+ explicit
+ queue(const _Sequence& __c)
+ : c(__c) { }
+
+ explicit
+ queue(_Sequence&& __c = _Sequence())
+ : c(std::move(__c)) { }
+
+ queue(queue&& __q)
+ : c(std::move(__q.c)) { }
+
+ queue&
+ operator=(queue&& __q)
+ {
+ c = std::move(__q.c);
+ return *this;
+ }
+#endif
/**
* Returns true if the %queue is empty.
@@ -199,9 +220,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* to it. The time complexity of the operation depends on the
* underlying sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{ c.push_back(__x); }
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ { c.push_back(std::forward<_Args>(__args)...); }
+#endif
/**
* @brief Removes first element.
@@ -220,8 +249,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_nonempty();
c.pop_front();
}
- };
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(queue&& __q)
+ { c.swap(__q.c); }
+#endif
+ };
/**
* @brief Queue equality comparison.
@@ -281,6 +315,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x < __y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>&& __x, queue<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>&& __y)
+ { __x.swap(__y); }
+#endif
+
/**
* @brief A standard container automatically sorting its contents.
*
@@ -346,11 +397,25 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Default constructor creates no elements.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
explicit
priority_queue(const _Compare& __x = _Compare(),
const _Sequence& __s = _Sequence())
: c(__s), comp(__x)
{ std::make_heap(c.begin(), c.end(), comp); }
+#else
+ explicit
+ priority_queue(const _Compare& __x,
+ const _Sequence& __s)
+ : c(__s), comp(__x)
+ { std::make_heap(c.begin(), c.end(), comp); }
+
+ explicit
+ priority_queue(const _Compare& __x = _Compare(),
+ _Sequence&& __s = _Sequence())
+ : c(std::move(__s)), comp(__x)
+ { std::make_heap(c.begin(), c.end(), comp); }
+#endif
/**
* @brief Builds a %queue from a range.
@@ -367,6 +432,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* documentation on @link s20_3_1_base functor base
* classes@endlink.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
template<typename _InputIterator>
priority_queue(_InputIterator __first, _InputIterator __last,
const _Compare& __x = _Compare(),
@@ -377,6 +443,40 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
c.insert(c.end(), __first, __last);
std::make_heap(c.begin(), c.end(), comp);
}
+#else
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x,
+ const _Sequence& __s)
+ : c(__s), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x = _Compare(),
+ _Sequence&& __s = _Sequence())
+ : c(std::move(__s)), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+
+ priority_queue(priority_queue&& __pq)
+ : c(std::move(__pq.c)), comp(std::move(__pq.comp)) { }
+
+ priority_queue&
+ operator=(priority_queue&& __pq)
+ {
+ c = std::move(__pq.c);
+ comp = std::move(__pq.comp);
+ return *this;
+ }
+#endif
/**
* Returns true if the %queue is empty.
@@ -409,12 +509,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* The time complexity of the operation depends on the underlying
* sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{
c.push_back(__x);
std::push_heap(c.begin(), c.end(), comp);
}
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ {
+ c.push_back(std::forward<_Args>(__args)...);
+ std::push_heap(c.begin(), c.end(), comp);
+ }
+#endif
/**
* @brief Removes first element.
@@ -434,10 +545,40 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
std::pop_heap(c.begin(), c.end(), comp);
c.pop_back();
}
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(priority_queue&& __pq)
+ {
+ using std::swap;
+ c.swap(__pq.c);
+ swap(comp, __pq.comp);
+ }
+#endif
};
// No equality/comparison operators are provided for priority_queue.
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
+ priority_queue<_Tp, _Sequence, _Compare>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>&& __x,
+ priority_queue<_Tp, _Sequence, _Compare>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
+ priority_queue<_Tp, _Sequence, _Compare>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NAMESPACE
#endif /* _STL_QUEUE_H */
diff --git a/libstdc++-v3/include/bits/stl_relops.h b/libstdc++-v3/include/bits/stl_relops.h
index 11fc30dedd8..376a6b17369 100644
--- a/libstdc++-v3/include/bits/stl_relops.h
+++ b/libstdc++-v3/include/bits/stl_relops.h
@@ -1,6 +1,6 @@
// std::rel_ops implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005, 2008 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
@@ -57,7 +57,6 @@
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*
- * @if maint
* Inclusion of this file has been removed from
* all of the other STL headers for safety reasons, except std_utility.h.
* For more information, see the thread of about twenty messages starting
@@ -65,7 +64,6 @@
* FAQ at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4 .
*
* Short summary: the rel_ops operators should be avoided for the present.
- * @endif
*/
#ifndef _STL_RELOPS_H
diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h
index d2d8a6d47c4..2ef51de858f 100644
--- a/libstdc++-v3/include/bits/stl_set.h
+++ b/libstdc++-v3/include/bits/stl_set.h
@@ -1,6 +1,6 @@
// Set implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,7 +64,7 @@
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
* @brief A standard container made up of unique keys, which can be
@@ -83,14 +83,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* @param Compare Comparison function object type, defaults to less<Key>.
* @param Alloc Allocator type, defaults to allocator<Key>.
*
- * @if maint
* The private tree data is declared exactly the same way for set and
* multiset; the distinction is made entirely in how the tree functions are
* called (*_unique versus *_equal, same as the standard).
- * @endif
*/
- template<class _Key, class _Compare = std::less<_Key>,
- class _Alloc = std::allocator<_Key> >
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<_Key> >
class set
{
// concept requirements
@@ -116,7 +114,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
key_compare, _Key_alloc_type> _Rep_type;
- _Rep_type _M_t; // red-black tree representing set
+ _Rep_type _M_t; // Red-black tree representing set.
public:
//@{
@@ -137,20 +135,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
//@}
// allocation/deallocation
- /// Default constructor creates no elements.
+ /**
+ * @brief Default constructor creates no elements.
+ */
set()
- : _M_t(_Compare(), allocator_type()) {}
+ : _M_t() { }
/**
- * @brief Default constructor creates no elements.
- *
+ * @brief Creates a %set with no elements.
* @param comp Comparator to use.
- * @param a Allocator to use.
+ * @param a An allocator object.
*/
explicit
set(const _Compare& __comp,
const allocator_type& __a = allocator_type())
- : _M_t(__comp, __a) {}
+ : _M_t(__comp, __a) { }
/**
* @brief Builds a %set from a range.
@@ -161,9 +160,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
- template<class _InputIterator>
+ template<typename _InputIterator>
set(_InputIterator __first, _InputIterator __last)
- : _M_t(_Compare(), allocator_type())
+ : _M_t()
{ _M_t._M_insert_unique(__first, __last); }
/**
@@ -177,7 +176,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This is linear in N if the range is already sorted, and NlogN
* otherwise (where N is distance(first,last)).
*/
- template<class _InputIterator>
+ template<typename _InputIterator>
set(_InputIterator __first, _InputIterator __last,
const _Compare& __comp,
const allocator_type& __a = allocator_type())
@@ -185,29 +184,59 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ _M_t._M_insert_unique(__first, __last); }
/**
- * @brief Set copy constructor.
+ * @brief %Set copy constructor.
* @param x A %set of identical element and allocator types.
*
* The newly-created %set uses a copy of the allocation object used
* by @a x.
*/
- set(const set<_Key,_Compare,_Alloc>& __x)
+ set(const set& __x)
: _M_t(__x._M_t) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Set move constructor
+ * @param x A %set of identical element and allocator types.
+ *
+ * The newly-created %set contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %set.
+ */
+ set(set&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+#endif
+
/**
- * @brief Set assignment operator.
+ * @brief %Set assignment operator.
* @param x A %set of identical element and allocator types.
*
* All the elements of @a x are copied, but unlike the copy constructor,
* the allocator object is not copied.
*/
- set<_Key,_Compare,_Alloc>&
- operator=(const set<_Key, _Compare, _Alloc>& __x)
+ set&
+ operator=(const set& __x)
{
_M_t = __x._M_t;
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Set move assignment operator.
+ * @param x A %set of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %set (without copying).
+ * @a x is a valid, but unspecified %set.
+ */
+ set&
+ operator=(set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
// accessors:
/// Returns the comparison object with which the %set was constructed.
@@ -224,25 +253,27 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t.get_allocator(); }
/**
- * Returns a read/write iterator that points to the first element in the
- * %set. Iteration is done in ascending order according to the keys.
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
*/
iterator
begin() const
{ return _M_t.begin(); }
/**
- * Returns a read/write iterator that points one past the last element in
- * the %set. Iteration is done in ascending order according to the keys.
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
*/
iterator
end() const
{ return _M_t.end(); }
/**
- * Returns a read/write reverse iterator that points to the last element
- * in the %set. Iteration is done in descending order according to the
- * keys.
+ * Returns a read-only (constant) iterator that points to the last
+ * element in the %set. Iteration is done in descending order according
+ * to the keys.
*/
reverse_iterator
rbegin() const
@@ -250,13 +281,51 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* Returns a read-only (constant) reverse iterator that points to the
- * last pair in the %map. Iteration is done in descending order
+ * last pair in the %set. Iteration is done in descending order
* according to the keys.
*/
reverse_iterator
rend() const
{ return _M_t.rend(); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the last
+ * element in the %set. Iteration is done in descending order according
+ * to the keys.
+ */
+ reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %set. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
/// Returns true if the %set is empty.
bool
empty() const
@@ -284,7 +353,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* std::swap(s1,s2) will feed to this function.
*/
void
- swap(set<_Key,_Compare,_Alloc>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(set&& __x)
+#else
+ swap(set& __x)
+#endif
{ _M_t.swap(__x._M_t); }
// insert/erase
@@ -301,7 +374,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* Insertion requires logarithmic time.
*/
- std::pair<iterator,bool>
+ std::pair<iterator, bool>
insert(const value_type& __x)
{
std::pair<typename _Rep_type::iterator, bool> __p =
@@ -333,14 +406,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t._M_insert_unique_(__position, __x); }
/**
- * @brief A template function that attemps to insert a range of elements.
+ * @brief A template function that attempts to insert a range of elements.
* @param first Iterator pointing to the start of the range to be
* inserted.
* @param last Iterator pointing to the end of the range.
*
* Complexity similar to that of the range constructor.
*/
- template<class _InputIterator>
+ template<typename _InputIterator>
void
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_unique(__first, __last); }
@@ -352,7 +425,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This function erases an element, pointed to by the given iterator,
* from a %set. Note that this function only erases the element, and
* that if the element is itself a pointer, the pointed-to memory is not
- * touched in any way. Managing the pointer is the user's responsibilty.
+ * touched in any way. Managing the pointer is the user's responsibility.
*/
void
erase(iterator __position)
@@ -367,7 +440,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* a %set.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
size_type
erase(const key_type& __x)
@@ -382,7 +455,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* This function erases a sequence of elements from a %set.
* Note that this function only erases the element, and that if
* the element is itself a pointer, the pointed-to memory is not touched
- * in any way. Managing the pointer is the user's responsibilty.
+ * in any way. Managing the pointer is the user's responsibility.
*/
void
erase(iterator __first, iterator __last)
@@ -392,7 +465,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Erases all elements in a %set. Note that this function only erases
* the elements, and that if the elements themselves are pointers, the
* pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
+ * the user's responsibility.
*/
void
clear()
@@ -497,13 +570,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return _M_t.equal_range(__x); }
//@}
- template<class _K1, class _C1, class _A1>
+ template<typename _K1, typename _C1, typename _A1>
friend bool
- operator== (const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
+ operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
- template<class _K1, class _C1, class _A1>
+ template<typename _K1, typename _C1, typename _A1>
friend bool
- operator< (const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
+ operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
};
@@ -517,7 +590,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Sets are considered equivalent if their sizes are equal, and if
* corresponding elements compare equal.
*/
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator==(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
@@ -534,46 +607,58 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*
* See std::lexicographical_compare() for how the determination is made.
*/
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator<(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
{ return __x._M_t < __y._M_t; }
/// Returns !(x == y).
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator!=(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
{ return !(__x == __y); }
/// Returns y < x.
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator>(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
{ return __y < __x; }
/// Returns !(y < x)
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator<=(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
{ return !(__y < __x); }
/// Returns !(x < y)
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline bool
operator>=(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y)
{ return !(__x < __y); }
/// See std::set::swap().
- template<class _Key, class _Compare, class _Alloc>
+ template<typename _Key, typename _Compare, typename _Alloc>
inline void
swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(set<_Key, _Compare, _Alloc>&& __x, set<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_SET_H */
diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h
index 4baca258208..932388a7a68 100644
--- a/libstdc++-v3/include/bits/stl_stack.h
+++ b/libstdc++-v3/include/bits/stl_stack.h
@@ -127,9 +127,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Default constructor creates no elements.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
explicit
stack(const _Sequence& __c = _Sequence())
: c(__c) { }
+#else
+ explicit
+ stack(const _Sequence& __c)
+ : c(__c) { }
+
+ explicit
+ stack(_Sequence&& __c = _Sequence())
+ : c(std::move(__c)) { }
+#endif
/**
* Returns true if the %stack is empty.
@@ -174,9 +184,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* to it. The time complexity of the operation depends on the
* underlying sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{ c.push_back(__x); }
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ { c.push_back(std::forward<_Args>(__args)...); }
+#endif
/**
* @brief Removes first element.
@@ -195,6 +213,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__glibcxx_requires_nonempty();
c.pop_back();
}
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(stack&& __s)
+ { c.swap(__s.c); }
+#endif
};
/**
@@ -256,6 +280,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__x < __y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>&& __x, stack<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NAMESPACE
#endif /* _STL_STACK_H */
diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h
index 21adc70c9b3..e9ba10c7e8a 100644
--- a/libstdc++-v3/include/bits/stl_tempbuf.h
+++ b/libstdc++-v3/include/bits/stl_tempbuf.h
@@ -1,6 +1,6 @@
// Temporary buffer implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -69,14 +69,25 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
/**
- * @if maint
- * This is a helper function. The unused second parameter exists to
- * permit the real get_temporary_buffer to use template parameter deduction.
- * @endif
+ * @brief Allocates a temporary buffer.
+ * @param len The number of objects of type Tp.
+ * @return See full description.
+ *
+ * Reinventing the wheel, but this time with prettier spokes!
+ *
+ * This function tries to obtain storage for @c len adjacent Tp
+ * objects. The objects themselves are not constructed, of course.
+ * A pair<> is returned containing "the buffer s address and
+ * capacity (in the units of sizeof(Tp)), or a pair of 0 values if
+ * no storage can be obtained." Note that the capacity obtained
+ * may be less than that requested if the memory is unavailable;
+ * you should compare len with the .second return value.
+ *
+ * Provides the nothrow exception guarantee.
*/
template<typename _Tp>
pair<_Tp*, ptrdiff_t>
- __get_temporary_buffer(ptrdiff_t __len, _Tp*)
+ get_temporary_buffer(ptrdiff_t __len)
{
const ptrdiff_t __max =
__gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
@@ -95,28 +106,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @brief Allocates a temporary buffer.
- * @param len The number of objects of type Tp.
- * @return See full description.
- *
- * Reinventing the wheel, but this time with prettier spokes!
- *
- * This function tries to obtain storage for @c len adjacent Tp
- * objects. The objects themselves are not constructed, of course.
- * A pair<> is returned containing "the buffer s address and
- * capacity (in the units of sizeof(Tp)), or a pair of 0 values if
- * no storage can be obtained." Note that the capacity obtained
- * may be less than that requested if the memory is unavailable;
- * you should compare len with the .second return value.
- *
- * Provides the nothrow exception guarantee.
- */
- template<typename _Tp>
- inline pair<_Tp*, ptrdiff_t>
- get_temporary_buffer(ptrdiff_t __len)
- { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); }
-
- /**
* @brief The companion to get_temporary_buffer().
* @param p A buffer previously allocated by get_temporary_buffer.
* @return None.
@@ -130,11 +119,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
- * @if maint
* This class is used in two places: stl_algo.h and ext/memory,
* where it is wrapped as the temporary_buffer class. See
* temporary_buffer docs for more notes.
- * @endif
*/
template<typename _ForwardIterator, typename _Tp>
class _Temporary_buffer
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 8437c9a9952..d922a6db4dd 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -400,37 +400,25 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_Rb_tree_node_base _M_header;
size_type _M_node_count; // Keeps track of size of tree.
- _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
- const _Key_compare& __comp = _Key_compare())
- : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
+ _Rb_tree_impl()
+ : _Node_allocator(), _M_key_compare(), _M_header(),
_M_node_count(0)
- {
- this->_M_header._M_color = _S_red;
- this->_M_header._M_parent = 0;
- this->_M_header._M_left = &this->_M_header;
- this->_M_header._M_right = &this->_M_header;
- }
- };
-
- // Specialization for _Comparison types that are not capable of
- // being base classes / super classes.
- template<typename _Key_compare>
- struct _Rb_tree_impl<_Key_compare, true> : public _Node_allocator
- {
- _Key_compare _M_key_compare;
- _Rb_tree_node_base _M_header;
- size_type _M_node_count; // Keeps track of size of tree.
+ { _M_initialize(); }
- _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
- const _Key_compare& __comp = _Key_compare())
+ _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a)
: _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
_M_node_count(0)
- {
+ { _M_initialize(); }
+
+ private:
+ void
+ _M_initialize()
+ {
this->_M_header._M_color = _S_red;
this->_M_header._M_parent = 0;
this->_M_header._M_left = &this->_M_header;
this->_M_header._M_right = &this->_M_header;
- }
+ }
};
_Rb_tree_impl<_Compare> _M_impl;
@@ -571,19 +559,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
public:
// allocation/deallocation
- _Rb_tree()
- { }
+ _Rb_tree() { }
- _Rb_tree(const _Compare& __comp)
- : _M_impl(allocator_type(), __comp)
- { }
+ _Rb_tree(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__comp, __a) { }
- _Rb_tree(const _Compare& __comp, const allocator_type& __a)
- : _M_impl(__a, __comp)
- { }
-
- _Rb_tree(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x)
- : _M_impl(__x._M_get_Node_allocator(), __x._M_impl._M_key_compare)
+ _Rb_tree(const _Rb_tree& __x)
+ : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
{
if (__x._M_root() != 0)
{
@@ -594,11 +577,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Rb_tree(_Rb_tree&& __x);
+#endif
+
~_Rb_tree()
{ _M_erase(_M_begin()); }
- _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&
- operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x);
+ _Rb_tree&
+ operator=(const _Rb_tree& __x);
// Accessors.
_Compare
@@ -659,7 +646,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return get_allocator().max_size(); }
void
- swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(_Rb_tree&& __t);
+#else
+ swap(_Rb_tree& __t);
+#endif
// Insert/erase.
pair<iterator, bool>
@@ -802,6 +793,30 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x)
+ : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
+ {
+ if (__x._M_root() != 0)
+ {
+ _M_root() = __x._M_root();
+ _M_leftmost() = __x._M_leftmost();
+ _M_rightmost() = __x._M_rightmost();
+ _M_root()->_M_parent = _M_end();
+
+ __x._M_root() = 0;
+ __x._M_leftmost() = __x._M_end();
+ __x._M_rightmost() = __x._M_end();
+
+ this->_M_impl._M_node_count = __x._M_impl._M_node_count;
+ __x._M_impl._M_node_count = 0;
+ }
+ }
+#endif
+
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&
@@ -1060,7 +1075,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename _Compare, typename _Alloc>
void
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __t)
+#else
swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
+#endif
{
if (_M_root() == 0)
{
diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h
index c564c21e3fd..88dac3adcb0 100644
--- a/libstdc++-v3/include/bits/stl_uninitialized.h
+++ b/libstdc++-v3/include/bits/stl_uninitialized.h
@@ -76,7 +76,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
try
{
for (; __first != __last; ++__first, ++__cur)
- std::_Construct(&*__cur, *__first);
+ ::new(static_cast<void*>(&*__cur)) typename
+ iterator_traits<_ForwardIterator>::value_type(*__first);
return __cur;
}
catch(...)
@@ -260,6 +261,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_ForwardIterator __result, allocator<_Tp>&)
{ return std::uninitialized_copy(__first, __last, __result); }
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_move_a(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result, _Allocator& __alloc)
+ {
+ return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+ __result, __alloc);
+ }
+
template<typename _ForwardIterator, typename _Tp, typename _Allocator>
void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
@@ -311,19 +323,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ std::uninitialized_fill_n(__first, __n, __x); }
- // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,
- // __uninitialized_fill_copy. All of these algorithms take a user-
- // supplied allocator, which is used for construction and destruction.
+ // Extensions: __uninitialized_copy_move, __uninitialized_move_copy,
+ // __uninitialized_fill_move, __uninitialized_move_fill.
+ // All of these algorithms take a user-supplied allocator, which is used
+ // for construction and destruction.
- // __uninitialized_copy_copy
+ // __uninitialized_copy_move
// Copies [first1, last1) into [result, result + (last1 - first1)), and
- // copies [first2, last2) into
+ // move [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
-
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
- __uninitialized_copy_copy(_InputIterator1 __first1,
+ __uninitialized_copy_move(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
@@ -335,7 +347,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__alloc);
try
{
- return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
+ return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
catch(...)
{
@@ -344,20 +356,48 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- // __uninitialized_fill_copy
- // Fills [result, mid) with x, and copies [first, last) into
+ // __uninitialized_move_copy
+ // Moves [first1, last1) into [result, result + (last1 - first1)), and
+ // copies [first2, last2) into
+ // [result, result + (last1 - first1) + (last2 - first2)).
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _ForwardIterator, typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_move_copy(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _ForwardIterator __result,
+ _Allocator& __alloc)
+ {
+ _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
+ __result,
+ __alloc);
+ try
+ {
+ return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
+ }
+ catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ // __uninitialized_fill_move
+ // Fills [result, mid) with x, and moves [first, last) into
// [mid, mid + (last - first)).
template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
typename _Allocator>
inline _ForwardIterator
- __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
+ __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x, _InputIterator __first,
_InputIterator __last, _Allocator& __alloc)
{
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
try
{
- return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
+ return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
catch(...)
{
@@ -366,18 +406,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
}
- // __uninitialized_copy_fill
- // Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
+ // __uninitialized_move_fill
+ // Moves [first1, last1) into [first2, first2 + (last1 - first1)), and
// fills [first2 + (last1 - first1), last2) with x.
template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
typename _Allocator>
inline void
- __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
+ __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2,
_ForwardIterator __last2, const _Tp& __x,
_Allocator& __alloc)
{
- _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1,
+ _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
__first2,
__alloc);
try
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index c294f4e92f4..34bb595d528 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -1,6 +1,6 @@
// Vector implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -66,13 +66,9 @@
#include <bits/functexcept.h>
#include <bits/concept_check.h>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
- /**
- * @if maint
- * See bits/stl_deque.h's _Deque_base for an explanation.
- * @endif
- */
+ /// See bits/stl_deque.h's _Deque_base for an explanation.
template<typename _Tp, typename _Alloc>
struct _Vector_base
{
@@ -84,6 +80,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_Tp* _M_start;
_Tp* _M_finish;
_Tp* _M_end_of_storage;
+
+ _Vector_impl()
+ : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0)
+ { }
+
_Vector_impl(_Tp_alloc_type const& __a)
: _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
{ }
@@ -104,9 +105,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
get_allocator() const
{ return allocator_type(_M_get_Tp_allocator()); }
+ _Vector_base()
+ : _M_impl() { }
+
_Vector_base(const allocator_type& __a)
- : _M_impl(__a)
- { }
+ : _M_impl(__a) { }
_Vector_base(size_t __n, const allocator_type& __a)
: _M_impl(__a)
@@ -116,6 +119,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Vector_base(_Vector_base&& __x)
+ : _M_impl(__x._M_get_Tp_allocator())
+ {
+ this->_M_impl._M_start = __x._M_impl._M_start;
+ this->_M_impl._M_finish = __x._M_impl._M_finish;
+ this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
+ __x._M_impl._M_start = 0;
+ __x._M_impl._M_finish = 0;
+ __x._M_impl._M_end_of_storage = 0;
+ }
+#endif
+
~_Vector_base()
{ _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
- this->_M_impl._M_start); }
@@ -125,7 +141,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_Tp*
_M_allocate(size_t __n)
- { return _M_impl.allocate(__n); }
+ { return __n != 0 ? _M_impl.allocate(__n) : 0; }
void
_M_deallocate(_Tp* __p, size_t __n)
@@ -194,15 +210,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
/**
* @brief Default constructor creates no elements.
*/
+ vector()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %vector with no elements.
+ * @param a An allocator object.
+ */
explicit
- vector(const allocator_type& __a = allocator_type())
- : _Base(__a)
- { }
+ vector(const allocator_type& __a)
+ : _Base(__a) { }
/**
- * @brief Create a %vector with copies of an exemplar element.
+ * @brief Creates a %vector with copies of an exemplar element.
* @param n The number of elements to initially create.
* @param value An element to copy.
+ * @param a An allocator.
*
* This constructor fills the %vector with @a n copies of @a value.
*/
@@ -229,10 +252,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_get_Tp_allocator());
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Vector move constructor.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * The newly-created %vector contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %vector.
+ */
+ vector(vector&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+
/**
* @brief Builds a %vector from a range.
* @param first An input iterator.
* @param last An input iterator.
+ * @param a An allocator.
*
* Create a %vector consisting of copies of the elements from
* [first,last).
@@ -258,7 +294,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The dtor only erases the elements, and note that if the
* elements themselves are pointers, the pointed-to memory is
* not touched in any way. Managing the pointer is the user's
- * responsibilty.
+ * responsibility.
*/
~vector()
{ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
@@ -275,6 +311,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
vector&
operator=(const vector& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Vector move assignment operator.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %vector (without copying).
+ * @a x is a valid, but unspecified %vector.
+ */
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
+
/**
* @brief Assigns a given value to a %vector.
* @param n Number of elements to be assigned.
@@ -386,6 +440,44 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %vector. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %vector. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %vector. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %vector. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
// [23.2.4.2] capacity
/** Returns the number of elements in the %vector. */
size_type
@@ -486,7 +578,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return *(this->_M_impl._M_start + __n); }
protected:
- /// @if maint Safety check used only from at(). @endif
+ /// Safety check used only from at().
void
_M_range_check(size_type __n) const
{
@@ -589,6 +681,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* done in constant time if the %vector has preallocated space
* available.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_back(const value_type& __x)
{
@@ -600,6 +693,21 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
else
_M_insert_aux(end(), __x);
}
+#else
+ template<typename... _Args>
+ void
+ push_back(_Args&&... __args)
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(end(), std::forward<_Args>(__args)...);
+ }
+#endif
/**
* @brief Removes last element.
@@ -617,6 +725,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
this->_M_impl.destroy(this->_M_impl._M_finish);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts an object in %vector before specified iterator.
+ * @param position An iterator into the %vector.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified location.
+ * Note that this kind of operation could be expensive for a %vector
+ * and if it is frequently used the user should consider using
+ * std::list.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
/**
* @brief Inserts given value into %vector before specified iterator.
* @param position An iterator into the %vector.
@@ -631,6 +757,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
iterator
insert(iterator __position, const value_type& __x);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %vector before specified iterator.
+ * @param position An iterator into the %vector.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before
+ * the specified location. Note that this kind of operation
+ * could be expensive for a %vector and if it is frequently
+ * used the user should consider using std::list.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
/**
* @brief Inserts a number of copies of given data into the %vector.
* @param position An iterator into the %vector.
@@ -685,7 +828,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The user is also cautioned that this function only erases
* the element, and that if the element is itself a pointer,
* the pointed-to memory is not touched in any way. Managing
- * the pointer is the user's responsibilty.
+ * the pointer is the user's responsibility.
*/
iterator
erase(iterator __position);
@@ -706,7 +849,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* The user is also cautioned that this function only erases
* the elements, and that if the elements themselves are
* pointers, the pointed-to memory is not touched in any way.
- * Managing the pointer is the user's responsibilty.
+ * Managing the pointer is the user's responsibility.
*/
iterator
erase(iterator __first, iterator __last);
@@ -721,7 +864,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* std::swap(v1,v2) will feed to this function.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
swap(vector& __x)
+#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
@@ -738,7 +885,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Erases all the elements. Note that this function only erases the
* elements, and that if the elements themselves are pointers, the
* pointed-to memory is not touched in any way. Managing the pointer is
- * the user's responsibilty.
+ * the user's responsibility.
*/
void
clear()
@@ -746,10 +893,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
protected:
/**
- * @if maint
* Memory expansion handler. Uses the member allocation function to
* obtain @a n bytes of memory, and then copies [first,last) into it.
- * @endif
*/
template<typename _ForwardIterator>
pointer
@@ -916,8 +1061,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
// Called by insert(p,x)
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
_M_insert_aux(iterator __position, const value_type& __x);
+#else
+ template<typename... _Args>
+ void
+ _M_insert_aux(iterator __position, _Args&&... __args);
+#endif
// Called by the latter.
size_type
@@ -1006,6 +1157,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
{ __x.swap(__y); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>&& __x, vector<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _STL_VECTOR_H */
diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h
index 26cc00f8b22..037fa185262 100644
--- a/libstdc++-v3/include/bits/streambuf_iterator.h
+++ b/libstdc++-v3/include/bits/streambuf_iterator.h
@@ -1,6 +1,7 @@
// Streambuf iterators
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -67,11 +68,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
ostreambuf_iterator<_CharT2>);
- template<typename _CharT2>
+ template<bool _IsMove, typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
_CharT2*>::__type
- __copy_aux(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
- _CharT2*);
+ __copy_move_a2(istreambuf_iterator<_CharT2>,
+ istreambuf_iterator<_CharT2>, _CharT2*);
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
@@ -291,11 +292,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __result;
}
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
- __copy_aux(_CharT* __first, _CharT* __last,
- ostreambuf_iterator<_CharT> __result)
+ __copy_move_a2(_CharT* __first, _CharT* __last,
+ ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
@@ -303,11 +304,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __result;
}
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
- __copy_aux(const _CharT* __first, const _CharT* __last,
- ostreambuf_iterator<_CharT> __result)
+ __copy_move_a2(const _CharT* __first, const _CharT* __last,
+ ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
@@ -315,11 +316,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __result;
}
- template<typename _CharT>
+ template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
- __copy_aux(istreambuf_iterator<_CharT> __first,
- istreambuf_iterator<_CharT> __last, _CharT* __result)
+ __copy_move_a2(istreambuf_iterator<_CharT> __first,
+ istreambuf_iterator<_CharT> __last, _CharT* __result)
{
typedef istreambuf_iterator<_CharT> __is_iterator_type;
typedef typename __is_iterator_type::traits_type traits_type;
diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h
index 128b9deae8d..b8e5d1a7b04 100644
--- a/libstdc++-v3/include/bits/valarray_array.h
+++ b/libstdc++-v3/include/bits/valarray_array.h
@@ -239,7 +239,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__a = __t;
}
- // fill indir ect array __a[__i[<__n>]] with __i
+ // fill indirect array __a[__i[<__n>]] with __i
template<typename _Tp>
inline void
__valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc
index 09266a2a997..030cb3aabcc 100644
--- a/libstdc++-v3/include/bits/vector.tcc
+++ b/libstdc++-v3/include/bits/vector.tcc
@@ -62,7 +62,7 @@
#ifndef _VECTOR_TCC
#define _VECTOR_TCC 1
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _Tp, typename _Alloc>
void
@@ -74,8 +74,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
if (this->capacity() < __n)
{
const size_type __old_size = size();
- pointer __tmp = _M_allocate_and_copy(__n, this->_M_impl._M_start,
- this->_M_impl._M_finish);
+ pointer __tmp = _M_allocate_and_copy(__n,
+ _GLIBCXX_MAKE_MOVE_ITERATOR(this->_M_impl._M_start),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(this->_M_impl._M_finish));
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
_M_get_Tp_allocator());
_M_deallocate(this->_M_impl._M_start,
@@ -100,7 +101,17 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
++this->_M_impl._M_finish;
}
else
- _M_insert_aux(__position, __x);
+ {
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ _Tp __x_copy = __x;
+ _M_insert_aux(__position, std::move(__x_copy));
+ }
+ else
+#endif
+ _M_insert_aux(__position, __x);
+ }
return iterator(this->_M_impl._M_start + __n);
}
@@ -110,7 +121,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
erase(iterator __position)
{
if (__position + 1 != end())
- std::copy(__position + 1, end(), __position);
+ _GLIBCXX_MOVE3(__position + 1, end(), __position);
--this->_M_impl._M_finish;
this->_M_impl.destroy(this->_M_impl._M_finish);
return __position;
@@ -122,7 +133,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
erase(iterator __first, iterator __last)
{
if (__last != end())
- std::copy(__last, end(), __first);
+ _GLIBCXX_MOVE3(__last, end(), __first);
_M_erase_at_end(__first.base() + (end() - __last));
return __first;
}
@@ -240,21 +251,55 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename vector<_Tp, _Alloc>::iterator
+ vector<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ const size_type __n = __position - begin();
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
+ && __position == end())
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(__position, std::forward<_Args>(__args)...);
+ return iterator(this->_M_impl._M_start + __n);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ void
+ vector<_Tp, _Alloc>::
+ _M_insert_aux(iterator __position, _Args&&... __args)
+#else
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
_M_insert_aux(iterator __position, const _Tp& __x)
+#endif
{
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
this->_M_impl.construct(this->_M_impl._M_finish,
- *(this->_M_impl._M_finish - 1));
+ _GLIBCXX_MOVE(*(this->_M_impl._M_finish
+ - 1)));
++this->_M_impl._M_finish;
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
_Tp __x_copy = __x;
- std::copy_backward(__position.base(),
- this->_M_impl._M_finish - 2,
- this->_M_impl._M_finish - 1);
+#endif
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ this->_M_impl._M_finish - 2,
+ this->_M_impl._M_finish - 1);
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
*__position = __x_copy;
+#else
+ *__position = _Tp(std::forward<_Args>(__args)...);
+#endif
}
else
{
@@ -264,14 +309,20 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
pointer __new_finish(__new_start);
try
{
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ this->_M_impl.construct(__new_start + (__position - begin()),
+ std::forward<_Args>(__args)...);
+#endif
__new_finish =
- std::__uninitialized_copy_a(this->_M_impl._M_start,
+ std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(), __new_start,
_M_get_Tp_allocator());
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
this->_M_impl.construct(__new_finish, __x);
+#endif
++__new_finish;
__new_finish =
- std::__uninitialized_copy_a(__position.base(),
+ std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
@@ -300,21 +351,26 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{
if (__n != 0)
{
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ value_type __x_copy = __x;
+#endif
if (size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_finish) >= __n)
{
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
value_type __x_copy = __x;
+#endif
const size_type __elems_after = end() - __position;
pointer __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
- std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
+ std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n;
- std::copy_backward(__position.base(), __old_finish - __n,
- __old_finish);
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ __old_finish - __n, __old_finish);
std::fill(__position.base(), __position.base() + __n,
__x_copy);
}
@@ -325,7 +381,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
__x_copy,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n - __elems_after;
- std::__uninitialized_copy_a(__position.base(), __old_finish,
+ std::__uninitialized_move_a(__position.base(), __old_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __elems_after;
@@ -341,15 +397,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
try
{
__new_finish =
- std::__uninitialized_copy_a(this->_M_impl._M_start,
+ std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(),
__new_start,
_M_get_Tp_allocator());
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ std::__uninitialized_fill_n_a(__new_finish, __n, __x_copy,
+#else
std::__uninitialized_fill_n_a(__new_finish, __n, __x,
+#endif
_M_get_Tp_allocator());
__new_finish += __n;
__new_finish =
- std::__uninitialized_copy_a(__position.base(),
+ std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
@@ -404,13 +464,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
pointer __old_finish(this->_M_impl._M_finish);
if (__elems_after > __n)
{
- std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
+ std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
this->_M_impl._M_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n;
- std::copy_backward(__position.base(), __old_finish - __n,
- __old_finish);
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ __old_finish - __n, __old_finish);
std::copy(__first, __last, __position);
}
else
@@ -421,7 +481,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
this->_M_impl._M_finish,
_M_get_Tp_allocator());
this->_M_impl._M_finish += __n - __elems_after;
- std::__uninitialized_copy_a(__position.base(),
+ std::__uninitialized_move_a(__position.base(),
__old_finish,
this->_M_impl._M_finish,
_M_get_Tp_allocator());
@@ -438,15 +498,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
try
{
__new_finish =
- std::__uninitialized_copy_a(this->_M_impl._M_start,
+ std::__uninitialized_move_a(this->_M_impl._M_start,
__position.base(),
__new_start,
_M_get_Tp_allocator());
__new_finish =
- std::__uninitialized_copy_a(__first, __last, __new_finish,
+ std::__uninitialized_copy_a(__first, __last,
+ __new_finish,
_M_get_Tp_allocator());
__new_finish =
- std::__uninitialized_copy_a(__position.base(),
+ std::__uninitialized_move_a(__position.base(),
this->_M_impl._M_finish,
__new_finish,
_M_get_Tp_allocator());
@@ -476,6 +537,25 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template<typename _Alloc>
void
vector<bool, _Alloc>::
+ reserve(size_type __n)
+ {
+ if (__n > this->max_size())
+ __throw_length_error(__N("vector::reserve"));
+ if (this->capacity() < __n)
+ {
+ _Bit_type* __q = this->_M_allocate(__n);
+ this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
+ iterator(__q, 0));
+ this->_M_deallocate();
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit));
+ }
+ }
+
+ template<typename _Alloc>
+ void
+ vector<bool, _Alloc>::
_M_fill_insert(iterator __position, size_type __n, bool __x)
{
if (__n == 0)
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index e37f4e8fb0f..f7be4d0fd0a 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -166,7 +166,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __builtin_atan2l(__y, __x); }
template<typename _Tp, typename _Up>
- inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ inline
+ typename __gnu_cxx::__promote_2<
+ typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+ && __is_arithmetic<_Up>::__value,
+ _Tp>::__type, _Up>::__type
atan2(_Tp __y, _Up __x)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
@@ -377,7 +381,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __builtin_powil(__x, __n); }
template<typename _Tp, typename _Up>
- inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ inline
+ typename __gnu_cxx::__promote_2<
+ typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+ && __is_arithmetic<_Up>::__value,
+ _Tp>::__type, _Up>::__type
pow(_Tp __x, _Up __y)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
@@ -478,55 +486,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
inline int
__capture_fpclassify(_Tp __f) { return fpclassify(__f); }
- template<typename _Tp>
- inline int
- __capture_isfinite(_Tp __f) { return isfinite(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isinf(_Tp __f) { return isinf(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isnan(_Tp __f) { return isnan(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isnormal(_Tp __f) { return isnormal(__f); }
-
- template<typename _Tp>
- inline int
- __capture_signbit(_Tp __f) { return signbit(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isgreater(_Tp __f1, _Tp __f2)
- { return isgreater(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isgreaterequal(_Tp __f1, _Tp __f2)
- { return isgreaterequal(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_islessequal(_Tp __f1, _Tp __f2)
- { return islessequal(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_islessgreater(_Tp __f1, _Tp __f2)
- { return islessgreater(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isunordered(_Tp __f1, _Tp __f2)
- { return isunordered(__f1, __f2); }
-
_GLIBCXX_END_NAMESPACE
// Only undefine the C99 FP macros, if actually captured for namespace movement
@@ -546,58 +505,112 @@ _GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Tp>
- inline int
- fpclassify(_Tp __f) { return ::__gnu_cxx::__capture_fpclassify(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ fpclassify(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return ::__gnu_cxx::__capture_fpclassify(__type(__f));
+ }
template<typename _Tp>
- inline int
- isfinite(_Tp __f) { return ::__gnu_cxx::__capture_isfinite(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isfinite(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isfinite(__type(__f));
+ }
template<typename _Tp>
- inline int
- isinf(_Tp __f) { return ::__gnu_cxx::__capture_isinf(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isinf(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isinf(__type(__f));
+ }
template<typename _Tp>
- inline int
- isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnan(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnan(__type(__f));
+ }
template<typename _Tp>
- inline int
- isnormal(_Tp __f) { return ::__gnu_cxx::__capture_isnormal(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnormal(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnormal(__type(__f));
+ }
template<typename _Tp>
- inline int
- signbit(_Tp __f) { return ::__gnu_cxx::__capture_signbit(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ signbit(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_signbit(__type(__f));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isgreater(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isgreater(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreater(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isgreaterequal(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isgreaterequal(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreaterequal(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isless(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isless(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isless(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
islessequal(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_islessequal(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessequal(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
islessgreater(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_islessgreater(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessgreater(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isunordered(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isunordered(__type(__f1), __type(__f2));
+ }
_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath
index 897290ac089..52c1d2a3505 100644
--- a/libstdc++-v3/include/c_std/cmath
+++ b/libstdc++-v3/include/c_std/cmath
@@ -1,6 +1,7 @@
// -*- C++ -*- C forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -467,55 +468,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
inline int
__capture_fpclassify(_Tp __f) { return fpclassify(__f); }
- template<typename _Tp>
- inline int
- __capture_isfinite(_Tp __f) { return isfinite(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isinf(_Tp __f) { return isinf(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isnan(_Tp __f) { return isnan(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isnormal(_Tp __f) { return isnormal(__f); }
-
- template<typename _Tp>
- inline int
- __capture_signbit(_Tp __f) { return signbit(__f); }
-
- template<typename _Tp>
- inline int
- __capture_isgreater(_Tp __f1, _Tp __f2)
- { return isgreater(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isgreaterequal(_Tp __f1, _Tp __f2)
- { return isgreaterequal(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_islessequal(_Tp __f1, _Tp __f2)
- { return islessequal(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_islessgreater(_Tp __f1, _Tp __f2)
- { return islessgreater(__f1, __f2); }
-
- template<typename _Tp>
- inline int
- __capture_isunordered(_Tp __f1, _Tp __f2)
- { return isunordered(__f1, __f2); }
-
_GLIBCXX_END_NAMESPACE
// Only undefine the C99 FP macros, if actually captured for namespace movement
@@ -535,58 +487,112 @@ _GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Tp>
- inline int
- fpclassify(_Tp __f) { return ::__gnu_cxx::__capture_fpclassify(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ fpclassify(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return ::__gnu_cxx::__capture_fpclassify(__type(__f));
+ }
template<typename _Tp>
- inline int
- isfinite(_Tp __f) { return ::__gnu_cxx::__capture_isfinite(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isfinite(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isfinite(__type(__f));
+ }
template<typename _Tp>
- inline int
- isinf(_Tp __f) { return ::__gnu_cxx::__capture_isinf(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isinf(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isinf(__type(__f));
+ }
template<typename _Tp>
- inline int
- isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnan(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnan(__type(__f));
+ }
template<typename _Tp>
- inline int
- isnormal(_Tp __f) { return ::__gnu_cxx::__capture_isnormal(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnormal(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnormal(__type(__f));
+ }
template<typename _Tp>
- inline int
- signbit(_Tp __f) { return ::__gnu_cxx::__capture_signbit(__f); }
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ signbit(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_signbit(__type(__f));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isgreater(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isgreater(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreater(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isgreaterequal(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isgreaterequal(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreaterequal(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isless(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isless(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isless(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
islessequal(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_islessequal(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessequal(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
islessgreater(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_islessgreater(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessgreater(__type(__f1), __type(__f2));
+ }
template<typename _Tp>
- inline int
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
isunordered(_Tp __f1, _Tp __f2)
- { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); }
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isunordered(__type(__f1), __type(__f2));
+ }
_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset
index 58d4e6b82d9..db4b3c075d0 100644
--- a/libstdc++-v3/include/debug/bitset
+++ b/libstdc++-v3/include/debug/bitset
@@ -1,7 +1,6 @@
// Debugging bitset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
-// Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -45,10 +44,10 @@ namespace __debug
{
template<size_t _Nb>
class bitset
- : public _GLIBCXX_STD::bitset<_Nb>,
+ : public _GLIBCXX_STD_D::bitset<_Nb>,
public __gnu_debug::_Safe_sequence_base
{
- typedef _GLIBCXX_STD::bitset<_Nb> _Base;
+ typedef _GLIBCXX_STD_D::bitset<_Nb> _Base;
typedef __gnu_debug::_Safe_sequence_base _Safe_base;
public:
@@ -279,6 +278,7 @@ namespace __debug
{ return _M_base() != __rhs; }
using _Base::test;
+ using _Base::all;
using _Base::any;
using _Base::none;
diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h
index 95aa3d5b95e..97d6824ef0c 100644
--- a/libstdc++-v3/include/debug/debug.h
+++ b/libstdc++-v3/include/debug/debug.h
@@ -1,6 +1,6 @@
// Debugging support implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -49,15 +49,9 @@ namespace std
namespace __debug { }
}
-namespace __gnu_cxx
-{
- namespace __debug { };
-}
-
namespace __gnu_debug
{
using namespace std::__debug;
- using namespace __gnu_cxx::__debug;
}
#ifndef _GLIBCXX_DEBUG
@@ -69,8 +63,12 @@ namespace __gnu_debug
# define __glibcxx_requires_valid_range(_First,_Last)
# define __glibcxx_requires_sorted(_First,_Last)
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred)
-# define __glibcxx_requires_partitioned(_First,_Last,_Value)
-# define __glibcxx_requires_partitioned_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2)
+# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred)
+# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_heap(_First,_Last)
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred)
# define __glibcxx_requires_nonempty()
@@ -113,6 +111,7 @@ namespace std
#else
# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
#endif
+
# define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement
# define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg)
@@ -122,10 +121,18 @@ namespace std
__glibcxx_check_sorted(_First,_Last)
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \
__glibcxx_check_sorted_pred(_First,_Last,_Pred)
-# define __glibcxx_requires_partitioned(_First,_Last,_Value) \
- __glibcxx_check_partitioned(_First,_Last,_Value)
-# define __glibcxx_requires_partitioned_pred(_First,_Last,_Value,_Pred) \
- __glibcxx_check_partitioned_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \
+ __glibcxx_check_sorted_set(_First1,_Last1,_First2)
+# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \
+ __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred)
+# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \
+ __glibcxx_check_partitioned_lower(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \
+ __glibcxx_check_partitioned_upper(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
+ __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
+ __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_heap(_First,_Last) \
__glibcxx_check_heap(_First,_Last)
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \
diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque
index 6e523b882d4..2f967b49f33 100644
--- a/libstdc++-v3/include/debug/deque
+++ b/libstdc++-v3/include/debug/deque
@@ -1,6 +1,6 @@
// Debugging deque implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -45,10 +45,10 @@ namespace __debug
{
template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
class deque
- : public _GLIBCXX_STD::deque<_Tp, _Allocator>,
+ : public _GLIBCXX_STD_D::deque<_Tp, _Allocator>,
public __gnu_debug::_Safe_sequence<deque<_Tp, _Allocator> >
{
- typedef _GLIBCXX_STD::deque<_Tp, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::deque<_Tp, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<deque> _Safe_base;
public:
@@ -84,20 +84,39 @@ namespace __debug
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
{ }
- deque(const deque<_Tp,_Allocator>& __x) : _Base(__x), _Safe_base() { }
+ deque(const deque& __x)
+ : _Base(__x), _Safe_base() { }
- deque(const _Base& __x) : _Base(__x), _Safe_base() { }
+ deque(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque(deque&& __x)
+ : _Base(std::forward<deque>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~deque() { }
- deque<_Tp,_Allocator>&
- operator=(const deque<_Tp,_Allocator>& __x)
+ deque&
+ operator=(const deque& __x)
{
*static_cast<_Base*>(this) = __x;
this->_M_invalidate_all();
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque&
+ operator=(deque&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
template<class _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
@@ -149,6 +168,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -217,6 +254,7 @@ namespace __debug
}
// 23.2.1.3 modifiers:
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_front(const _Tp& __x)
{
@@ -230,6 +268,34 @@ namespace __debug
_Base::push_back(__x);
this->_M_invalidate_all();
}
+#else
+ template<typename... _Args>
+ void
+ push_front(_Args&&... __args)
+ {
+ _Base::push_front(std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ }
+
+ template<typename... _Args>
+ void
+ push_back(_Args&&... __args)
+ {
+ _Base::push_back(std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ }
+
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ typename _Base::iterator __res = _Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+#endif
iterator
insert(iterator __position, const _Tp& __x)
@@ -240,6 +306,12 @@ namespace __debug
return iterator(__res, this);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
void
insert(iterator __position, size_type __n, const _Tp& __x)
{
@@ -329,7 +401,11 @@ namespace __debug
}
void
- swap(deque<_Tp,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(deque&& __x)
+#else
+ swap(deque& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -363,7 +439,8 @@ namespace __debug
template<typename _Tp, typename _Alloc>
inline bool
- operator<(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs)
+ operator<(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
{ return __lhs._M_base() < __rhs._M_base(); }
template<typename _Tp, typename _Alloc>
@@ -380,13 +457,27 @@ namespace __debug
template<typename _Tp, typename _Alloc>
inline bool
- operator>(const deque<_Tp, _Alloc>& __lhs, const deque<_Tp, _Alloc>& __rhs)
+ 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); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>&& __lhs, deque<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/functions.h b/libstdc++-v3/include/debug/functions.h
index ee7037fad06..7e7562a940d 100644
--- a/libstdc++-v3/include/debug/functions.h
+++ b/libstdc++-v3/include/debug/functions.h
@@ -1,6 +1,6 @@
// Debugging support implementation -*- C++ -*-
-// Copyright (C) 2003, 2005, 2006
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -205,10 +205,9 @@ namespace __gnu_debug
return true;
_ForwardIterator __next = __first;
- for (++__next; __next != __last; __first = __next, ++__next) {
+ for (++__next; __next != __last; __first = __next, ++__next)
if (*__next < *__first)
return false;
- }
return true;
}
@@ -232,10 +231,9 @@ namespace __gnu_debug
return true;
_ForwardIterator __next = __first;
- for (++__next; __next != __last; __first = __next, ++__next) {
+ for (++__next; __next != __last; __first = __next, ++__next)
if (__pred(*__next, *__first))
return false;
- }
return true;
}
@@ -247,6 +245,11 @@ namespace __gnu_debug
{
typedef typename std::iterator_traits<_InputIterator>::iterator_category
_Category;
+
+ // Verify that the < operator for elements in the sequence is a
+ // StrictWeakOrdering by checking that it is irreflexive.
+ _GLIBCXX_DEBUG_ASSERT(__first == __last || !(*__first < *__first));
+
return __check_sorted_aux(__first, __last, _Category());
}
@@ -257,17 +260,87 @@ namespace __gnu_debug
{
typedef typename std::iterator_traits<_InputIterator>::iterator_category
_Category;
- return __check_sorted_aux(__first, __last, __pred,
- _Category());
+
+ // Verify that the predicate is StrictWeakOrdering by checking that it
+ // is irreflexive.
+ _GLIBCXX_DEBUG_ASSERT(__first == __last || !__pred(*__first, *__first));
+
+ return __check_sorted_aux(__first, __last, __pred, _Category());
}
+ template<typename _InputIterator1, typename _InputIterator2>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&, std::__true_type)
+ { return __check_sorted(__first, __last); }
+
+ template<typename _InputIterator1, typename _InputIterator2>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator1&,
+ const _InputIterator1&,
+ const _InputIterator2&, std::__false_type)
+ { return true; }
+
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Predicate>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&, _Predicate __pred,
+ std::__true_type)
+ { return __check_sorted(__first, __last, __pred); }
+
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Predicate>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator1&,
+ const _InputIterator1&,
+ const _InputIterator2&, _Predicate,
+ std::__false_type)
+ { return true; }
+
+ // ... special variant used in std::merge, std::includes, std::set_*.
+ template<typename _InputIterator1, typename _InputIterator2>
+ inline bool
+ __check_sorted_set(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&)
+ {
+ typedef typename std::iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename std::iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ typedef typename std::__are_same<_ValueType1, _ValueType2>::__type
+ _SameType;
+ return __check_sorted_set_aux(__first, __last, _SameType());
+ }
+
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Predicate>
+ inline bool
+ __check_sorted_set(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&, _Predicate __pred)
+ {
+ typedef typename std::iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename std::iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ typedef typename std::__are_same<_ValueType1, _ValueType2>::__type
+ _SameType;
+ return __check_sorted_set_aux(__first, __last, __pred, _SameType());
+ }
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 270. Binary search requirements overly strict
// Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp>
inline bool
- __check_partitioned(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __value)
+ __check_partitioned_lower(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value)
{
while (__first != __last && *__first < __value)
++__first;
@@ -276,15 +349,41 @@ namespace __gnu_debug
return __first == __last;
}
+ template<typename _ForwardIterator, typename _Tp>
+ inline bool
+ __check_partitioned_upper(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value)
+ {
+ while (__first != __last && !(__value < *__first))
+ ++__first;
+ while (__first != __last && __value < *__first)
+ ++__first;
+ return __first == __last;
+ }
+
// Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
- __check_partitioned(_ForwardIterator __first, _ForwardIterator __last,
- const _Tp& __value, _Pred __pred)
+ __check_partitioned_lower(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value,
+ _Pred __pred)
+ {
+ while (__first != __last && bool(__pred(*__first, __value)))
+ ++__first;
+ while (__first != __last && !bool(__pred(*__first, __value)))
+ ++__first;
+ return __first == __last;
+ }
+
+ template<typename _ForwardIterator, typename _Tp, typename _Pred>
+ inline bool
+ __check_partitioned_upper(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value,
+ _Pred __pred)
{
- while (__first != __last && __pred(*__first, __value))
+ while (__first != __last && !bool(__pred(__value, *__first)))
++__first;
- while (__first != __last && !__pred(*__first, __value))
+ while (__first != __last && bool(__pred(__value, *__first)))
++__first;
return __first == __last;
}
diff --git a/libstdc++-v3/include/debug/hash_map b/libstdc++-v3/include/debug/hash_map
deleted file mode 100644
index f44586b0ab6..00000000000
--- a/libstdc++-v3/include/debug/hash_map
+++ /dev/null
@@ -1,42 +0,0 @@
-// Debugging hash_map/hash_multimap implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_map
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MAP
-#define _GLIBCXX_DEBUG_HASH_MAP 1
-
-#include <ext/hash_map>
-#include <debug/hash_map.h>
-#include <debug/hash_multimap.h>
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_map.h b/libstdc++-v3/include/debug/hash_map.h
deleted file mode 100644
index 1eb6acb869c..00000000000
--- a/libstdc++-v3/include/debug/hash_map.h
+++ /dev/null
@@ -1,284 +0,0 @@
-// Debugging hash_map implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_map.h
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MAP_H
-#define _GLIBCXX_DEBUG_HASH_MAP_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
- template<typename _Value, typename _Tp,
- typename _HashFcn = __gnu_cxx::hash<_Value>,
- typename _EqualKey = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
- class hash_map
- : public _GLIBCXX_EXT::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>,
- public __gnu_debug::_Safe_sequence<hash_map<_Value, _Tp, _HashFcn,
- _EqualKey, _Alloc> >
- {
- typedef _GLIBCXX_EXT::hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>
- _Base;
- typedef __gnu_debug::_Safe_sequence<hash_map> _Safe_base;
-
- public:
- typedef typename _Base::key_type key_type;
- typedef typename _Base::data_type data_type;
- typedef typename _Base::mapped_type mapped_type;
- typedef typename _Base::value_type value_type;
- typedef typename _Base::hasher hasher;
- typedef typename _Base::key_equal key_equal;
- typedef typename _Base::size_type size_type;
- typedef typename _Base::difference_type difference_type;
- typedef typename _Base::pointer pointer;
- typedef typename _Base::const_pointer const_pointer;
- typedef typename _Base::reference reference;
- typedef typename _Base::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_map>
- iterator;
- typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
- hash_map>
- const_iterator;
-
- typedef typename _Base::allocator_type allocator_type;
-
- using _Base::hash_funct;
- using _Base::key_eq;
- using _Base::get_allocator;
-
- hash_map() { }
-
- explicit hash_map(size_type __n) : _Base(__n) { }
-
- hash_map(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
- hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__n, __hf, __eql, __a) { }
-
- template<typename _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
- template<typename _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
- template<typename _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
-
- template<typename _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
- __eql, __a) { }
-
- hash_map(const _Base& __x) : _Base(__x), _Safe_base() { }
-
- using _Base::size;
- using _Base::max_size;
- using _Base::empty;
-
- void
- swap(hash_map& __x)
- {
- _Base::swap(__x);
- this->_M_swap(__x);
- }
-
- iterator
- begin() { return iterator(_Base::begin(), this); }
-
- iterator
- end() { return iterator(_Base::end(), this); }
-
- const_iterator
- begin() const
- { return const_iterator(_Base::begin(), this); }
-
- const_iterator
- end() const
- { return const_iterator(_Base::end(), this); }
-
- std::pair<iterator, bool>
- insert(const value_type& __obj)
- {
- std::pair<typename _Base::iterator, bool> __res = _Base::insert(__obj);
- return std::make_pair(iterator(__res.first, this), __res.second);
- }
-
- void
- insert(const value_type* __first, const value_type* __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first, __last);
- }
-
- template<typename _InputIterator>
- void
- insert(_InputIterator __first, _InputIterator __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first.base(), __last.base());
- }
-
-
- std::pair<iterator, bool>
- insert_noresize(const value_type& __obj)
- {
- std::pair<typename _Base::iterator, bool> __res =
- _Base::insert_noresize(__obj);
- return std::make_pair(iterator(__res.first, this), __res.second);
- }
-
- iterator
- find(const key_type& __key)
- { return iterator(_Base::find(__key), this); }
-
- const_iterator
- find(const key_type& __key) const
- { return const_iterator(_Base::find(__key), this); }
-
- using _Base::operator[];
- using _Base::count;
-
- std::pair<iterator, iterator>
- equal_range(const key_type& __key)
- {
- typedef typename _Base::iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(iterator(__res.first, this),
- iterator(__res.second, this));
- }
-
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const
- {
- typedef typename _Base::const_iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(const_iterator(__res.first, this),
- const_iterator(__res.second, this));
- }
-
- size_type
- erase(const key_type& __key)
- {
- iterator __victim(_Base::find(__key), this);
- if (__victim != end())
- return this->erase(__victim), 1;
- else
- return 0;
- }
-
- void
- erase(iterator __it)
- {
- __glibcxx_check_erase(__it);
- __it._M_invalidate();
- _Base::erase(__it.base());
- }
-
- void
- erase(iterator __first, iterator __last)
- {
- __glibcxx_check_erase_range(__first, __last);
- for (iterator __tmp = __first; __tmp != __last;)
- {
- iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- _Base::erase(__first.base(), __last.base());
- }
-
- void
- clear()
- {
- _Base::clear();
- this->_M_invalidate_all();
- }
-
- using _Base::resize;
- using _Base::bucket_count;
- using _Base::max_bucket_count;
- using _Base::elems_in_bucket;
-
- _Base&
- _M_base() { return *this; }
-
- const _Base&
- _M_base() const { return *this; }
-
- private:
- void
- _M_invalidate_all()
- {
- typedef typename _Base::const_iterator _Base_const_iterator;
- typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(_M_base().end()));
- }
- };
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline bool
- operator==(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() == __y._M_base(); }
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline bool
- operator!=(const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() != __y._M_base(); }
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline void
- swap(hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
- hash_map<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
- { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_multimap.h b/libstdc++-v3/include/debug/hash_multimap.h
deleted file mode 100644
index e3c689ac7cd..00000000000
--- a/libstdc++-v3/include/debug/hash_multimap.h
+++ /dev/null
@@ -1,268 +0,0 @@
-// Debugging hash_multimap implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_multimap.h
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MULTIMAP_H
-#define _GLIBCXX_DEBUG_HASH_MULTIMAP_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
- template<typename _Value, typename _Tp,
- typename _HashFcn = __gnu_cxx::hash<_Value>,
- typename _EqualKey = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
- class hash_multimap
- : public _GLIBCXX_EXT::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>,
- public __gnu_debug::_Safe_sequence<hash_multimap<_Value, _Tp, _HashFcn,
- _EqualKey, _Alloc> >
- {
- typedef _GLIBCXX_EXT::hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>
- _Base;
- typedef __gnu_debug::_Safe_sequence<hash_multimap> _Safe_base;
-
- public:
- typedef typename _Base::key_type key_type;
- typedef typename _Base::data_type data_type;
- typedef typename _Base::mapped_type mapped_type;
- typedef typename _Base::value_type value_type;
- typedef typename _Base::hasher hasher;
- typedef typename _Base::key_equal key_equal;
- typedef typename _Base::size_type size_type;
- typedef typename _Base::difference_type difference_type;
- typedef typename _Base::pointer pointer;
- typedef typename _Base::const_pointer const_pointer;
- typedef typename _Base::reference reference;
- typedef typename _Base::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
- hash_multimap> iterator;
- typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
- hash_multimap> const_iterator;
-
- typedef typename _Base::allocator_type allocator_type;
-
- using _Base::hash_funct;
- using _Base::key_eq;
- using _Base::get_allocator;
-
- hash_multimap() { }
-
- explicit hash_multimap(size_type __n) : _Base(__n) { }
-
- hash_multimap(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
- hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__n, __hf, __eql, __a) { }
-
- template<typename _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
- template<typename _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
- template<typename _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
-
- template<typename _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
- __eql, __a) { }
-
- using _Base::size;
- using _Base::max_size;
- using _Base::empty;
-
- void
- swap(hash_multimap& __x)
- {
- _Base::swap(__x);
- this->_M_swap(__x);
- }
-
- iterator
- begin() { return iterator(_Base::begin(), this); }
-
- iterator
- end() { return iterator(_Base::end(), this); }
-
- const_iterator
- begin() const
- { return const_iterator(_Base::begin(), this); }
-
- const_iterator
- end() const
- { return const_iterator(_Base::end(), this); }
-
- iterator
- insert(const value_type& __obj)
- { return iterator(_Base::insert(__obj), this); }
-
- template <typename _InputIterator>
- void
- insert(_InputIterator __first, _InputIterator __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first.base(), __last.base());
- }
-
- iterator
- insert_noresize(const value_type& __obj)
- { return iterator(_Base::insert_noresize(__obj), this); }
-
- iterator
- find(const key_type& __key)
- { return iterator(_Base::find(__key), this); }
-
- const_iterator
- find(const key_type& __key) const
- { return const_iterator(_Base::find(__key), this); }
-
- using _Base::count;
-
- std::pair<iterator, iterator>
- equal_range(const key_type& __key)
- {
- typedef typename _Base::iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(iterator(__res.first, this),
- iterator(__res.second, this));
- }
-
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const
- {
- typedef typename _Base::const_iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(const_iterator(__res.first, this),
- const_iterator(__res.second, this));
- }
-
- size_type
- erase(const key_type& __key)
- {
- std::pair<iterator, iterator> __victims = this->equal_range(__key);
- std::size_t __num_victims = 0;
- while (__victims.first != __victims.second)
- {
- this->erase(__victims.first++);
- ++__num_victims;
- }
- return __num_victims;
- }
-
- void
- erase(iterator __it)
- {
- __glibcxx_check_erase(__it);
- __it._M_invalidate();
- _Base::erase(__it.base());
- }
-
- void
- erase(iterator __first, iterator __last)
- {
- __glibcxx_check_erase_range(__first, __last);
- for (iterator __tmp = __first; __tmp != __last;)
- {
- iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- _Base::erase(__first.base(), __last.base());
- }
-
- void
- clear()
- {
- _Base::clear();
- this->_M_invalidate_all();
- }
-
- using _Base::resize;
- using _Base::bucket_count;
- using _Base::max_bucket_count;
- using _Base::elems_in_bucket;
-
- _Base&
- _M_base() { return *this; }
-
- const _Base&
- _M_base() const { return *this; }
-
- private:
- void
- _M_invalidate_all()
- {
- typedef typename _Base::const_iterator _Base_const_iterator;
- typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(_M_base().end()));
- }
- };
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline bool
- operator==(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
- const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
- { return __x._M_base() == __y._M_base(); }
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline bool
- operator!=(const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __x,
- const hash_multimap<_Value,_Tp,_HashFcn,_EqualKey,_Alloc>& __y)
- { return __x._M_base() != __y._M_base(); }
-
- template<typename _Value, typename _Tp, typename _HashFcn,
- typename _EqualKey, typename _Alloc>
- inline void
- swap(hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __x,
- hash_multimap<_Value, _Tp, _HashFcn, _EqualKey, _Alloc>& __y)
- { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_multiset.h b/libstdc++-v3/include/debug/hash_multiset.h
deleted file mode 100644
index 93464969487..00000000000
--- a/libstdc++-v3/include/debug/hash_multiset.h
+++ /dev/null
@@ -1,243 +0,0 @@
-// Debugging hash_multiset implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_multiset.h
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_MULTISET_H
-#define _GLIBCXX_DEBUG_HASH_MULTISET_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
- template<typename _Value,
- typename _HashFcn = __gnu_cxx::hash<_Value>,
- typename _EqualKey = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
- class hash_multiset
- : public _GLIBCXX_EXT::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>,
- public __gnu_debug::_Safe_sequence<hash_multiset<_Value, _HashFcn,
- _EqualKey, _Alloc> >
- {
- typedef _GLIBCXX_EXT:: hash_multiset<_Value,_HashFcn, _EqualKey,_Alloc>
- _Base;
- typedef __gnu_debug::_Safe_sequence<hash_multiset> _Safe_base;
-
- public:
- typedef typename _Base::key_type key_type;
- typedef typename _Base::value_type value_type;
- typedef typename _Base::hasher hasher;
- typedef typename _Base::key_equal key_equal;
- typedef typename _Base::size_type size_type;
- typedef typename _Base::difference_type difference_type;
- typedef typename _Base::pointer pointer;
- typedef typename _Base::const_pointer const_pointer;
- typedef typename _Base::reference reference;
- typedef typename _Base::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
- hash_multiset> iterator;
- typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
- hash_multiset> const_iterator;
-
- typedef typename _Base::allocator_type allocator_type;
-
- using _Base::hash_funct;
- using _Base::key_eq;
- using _Base::get_allocator;
-
- hash_multiset() { }
-
- explicit hash_multiset(size_type __n) : _Base(__n) { }
-
- hash_multiset(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
- hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__n, __hf, __eql, __a)
- { }
-
- template<typename _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l)
- { }
-
- template<typename _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n)
- { }
-
- template<typename _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf)
- { }
-
- template<typename _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
- __eql, __a)
- { }
-
- hash_multiset(const _Base& __x) : _Base(__x), _Safe_base() { }
-
- using _Base::size;
- using _Base::max_size;
- using _Base::empty;
-
- void
- swap(hash_multiset& __x)
- {
- _Base::swap(__x);
- this->_M_swap(__x);
- }
-
- iterator begin() const { return iterator(_Base::begin(), this); }
- iterator end() const { return iterator(_Base::end(), this); }
-
- iterator
- insert(const value_type& __obj)
- { return iterator(_Base::insert(__obj), this); }
-
- template <typename _InputIterator>
- void
- insert(_InputIterator __first, _InputIterator __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first.base(), __last.base());
- }
-
-
- iterator
- insert_noresize(const value_type& __obj)
- { return iterator(_Base::insert_noresize(__obj), this); }
-
- iterator
- find(const key_type& __key) const
- { return iterator(_Base::find(__key), this); }
-
- using _Base::count;
-
- std::pair<iterator, iterator>
- equal_range(const key_type& __key) const
- {
- typedef typename _Base::iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(iterator(__res.first, this),
- iterator(__res.second, this));
- }
-
- size_type
- erase(const key_type& __key)
- {
- size_type __count = 0;
- std::pair<iterator, iterator> __victims = this->equal_range(__key);
- while (__victims.first != __victims.second)
- {
- this->erase(__victims++);
- ++__count;
- }
- return __count;
- }
-
- void
- erase(iterator __it)
- {
- __glibcxx_check_erase(__it);
- __it._M_invalidate();
- _Base::erase(__it.base());
- }
-
- void
- erase(iterator __first, iterator __last)
- {
- __glibcxx_check_erase_range(__first, __last);
- for (iterator __tmp = __first; __tmp != __last;)
- {
- iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- _Base::erase(__first.base(), __last.base());
- }
-
- void
- clear()
- {
- _Base::clear();
- this->_M_invalidate_all();
- }
-
- using _Base::resize;
- using _Base::bucket_count;
- using _Base::max_bucket_count;
- using _Base::elems_in_bucket;
-
- _Base& _M_base() { return *this; }
- const _Base& _M_base() const { return *this; }
-
- private:
- void
- _M_invalidate_all()
- {
- typedef typename _Base::const_iterator _Base_const_iterator;
- typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(_M_base().end()));
- }
- };
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
- inline bool
- operator==(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() == __y._M_base(); }
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
- inline bool
- operator!=(const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() != __y._M_base(); }
-
-template<typename _Value, typename _HashFcn, typename _EqualKey, typename _Alloc>
- inline void
- swap(hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_set b/libstdc++-v3/include/debug/hash_set
deleted file mode 100644
index 4b98fefab1f..00000000000
--- a/libstdc++-v3/include/debug/hash_set
+++ /dev/null
@@ -1,42 +0,0 @@
-// Debugging hash_set/hash_multiset implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_set
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_SET
-#define _GLIBCXX_DEBUG_HASH_SET 1
-
-#include <ext/hash_set>
-#include <debug/hash_set.h>
-#include <debug/hash_multiset.h>
-
-#endif
diff --git a/libstdc++-v3/include/debug/hash_set.h b/libstdc++-v3/include/debug/hash_set.h
deleted file mode 100644
index 2d3e0b303fb..00000000000
--- a/libstdc++-v3/include/debug/hash_set.h
+++ /dev/null
@@ -1,259 +0,0 @@
-// Debugging hash_set implementation -*- C++ -*-
-
-// Copyright (C) 2003, 2005, 2006
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/** @file debug/hash_set.h
- * This file is a GNU debug extension to the Standard C++ Library.
- */
-
-#ifndef _GLIBCXX_DEBUG_HASH_SET_H
-#define _GLIBCXX_DEBUG_HASH_SET_H 1
-
-#include <debug/safe_sequence.h>
-#include <debug/safe_iterator.h>
-
-namespace __gnu_cxx
-{
-namespace __debug
-{
- template<typename _Value,
- typename _HashFcn = __gnu_cxx::hash<_Value>,
- typename _EqualKey = std::equal_to<_Value>,
- typename _Alloc = std::allocator<_Value> >
- class hash_set
- : public _GLIBCXX_EXT::hash_set<_Value, _HashFcn, _EqualKey,_Alloc>,
- public __gnu_debug::_Safe_sequence<hash_set<_Value, _HashFcn, _EqualKey,
- _Alloc> >
- {
- typedef _GLIBCXX_EXT::hash_set<_Value, _HashFcn, _EqualKey,_Alloc> _Base;
- typedef __gnu_debug::_Safe_sequence<hash_set> _Safe_base;
-
- public:
- typedef typename _Base::key_type key_type;
- typedef typename _Base::value_type value_type;
- typedef typename _Base::hasher hasher;
- typedef typename _Base::key_equal key_equal;
- typedef typename _Base::size_type size_type;
- typedef typename _Base::difference_type difference_type;
- typedef typename _Base::pointer pointer;
- typedef typename _Base::const_pointer const_pointer;
- typedef typename _Base::reference reference;
- typedef typename _Base::const_reference const_reference;
-
- typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, hash_set>
- iterator;
- typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
- hash_set>
- const_iterator;
-
- typedef typename _Base::allocator_type allocator_type;
-
- using _Base::hash_funct;
- using _Base::key_eq;
- using _Base::get_allocator;
-
- hash_set() { }
-
- explicit hash_set(size_type __n) : _Base(__n) { }
-
- hash_set(size_type __n, const hasher& __hf) : _Base(__n, __hf) { }
-
- hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__n, __hf, __eql, __a) { }
-
- template<typename _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
-
- template<typename _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
-
- template<typename _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf) { }
-
- template<typename _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf,
- __eql, __a) { }
-
- hash_set(const _Base& __x) : _Base(__x), _Safe_base() { }
-
- using _Base::size;
- using _Base::max_size;
- using _Base::empty;
-
- void
- swap(hash_set& __x)
- {
- _Base::swap(__x);
- this->_M_swap(__x);
- }
-
- iterator
- begin() const { return iterator(_Base::begin(), this); }
-
- iterator
- end() const { return iterator(_Base::end(), this); }
-
- std::pair<iterator, bool>
- insert(const value_type& __obj)
- {
- std::pair<typename _Base::iterator, bool> __res =
- _Base::insert(__obj);
- return std::make_pair(iterator(__res.first, this), __res.second);
- }
-
- void
- insert(const value_type* __first, const value_type* __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first, __last);
- }
-
- template<typename _InputIterator>
- void
- insert(_InputIterator __first, _InputIterator __last)
- {
- __glibcxx_check_valid_range(__first, __last);
- _Base::insert(__first.base(), __last.base());
- }
-
-
- std::pair<iterator, bool>
- insert_noresize(const value_type& __obj)
- {
- std::pair<typename _Base::iterator, bool> __res =
- _Base::insert_noresize(__obj);
- return std::make_pair(iterator(__res.first, this), __res.second);
- }
-
- iterator
- find(const key_type& __key) const
- { return iterator(_Base::find(__key), this); }
-
- using _Base::count;
-
- std::pair<iterator, iterator>
- equal_range(const key_type& __key) const
- {
- typedef typename _Base::iterator _Base_iterator;
- std::pair<_Base_iterator, _Base_iterator> __res =
- _Base::equal_range(__key);
- return std::make_pair(iterator(__res.first, this),
- iterator(__res.second, this));
- }
-
- size_type
- erase(const key_type& __key)
- {
- iterator __victim(_Base::find(__key), this);
- if (__victim != end())
- return this->erase(__victim), 1;
- else
- return 0;
- }
-
- void
- erase(iterator __it)
- {
- __glibcxx_check_erase(__it);
- __it._M_invalidate();
- _Base::erase(__it.base());
- }
-
- void
- erase(iterator __first, iterator __last)
- {
- __glibcxx_check_erase_range(__first, __last);
- for (iterator __tmp = __first; __tmp != __last;)
- {
- iterator __victim = __tmp++;
- __victim._M_invalidate();
- }
- _Base::erase(__first.base(), __last.base());
- }
-
- void
- clear()
- {
- _Base::clear();
- this->_M_invalidate_all();
- }
-
- using _Base::resize;
- using _Base::bucket_count;
- using _Base::max_bucket_count;
- using _Base::elems_in_bucket;
-
- _Base&
- _M_base() { return *this; }
-
- const _Base&
- _M_base() const { return *this; }
-
- private:
- void
- _M_invalidate_all()
- {
- typedef typename _Base::const_iterator _Base_const_iterator;
- typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
- this->_M_invalidate_if(_Not_equal(_M_base().end()));
- }
- };
-
- template<typename _Value, typename _HashFcn, typename _EqualKey,
- typename _Alloc>
- inline bool
- operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() == __y._M_base(); }
-
- template<typename _Value, typename _HashFcn, typename _EqualKey,
- typename _Alloc>
- inline bool
- operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { return __x._M_base() != __y._M_base(); }
-
- template<typename _Value, typename _HashFcn, typename _EqualKey,
- typename _Alloc>
- inline void
- swap(hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __x,
- hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __y)
- { __x.swap(__y); }
-} // namespace __debug
-} // namespace __gnu_cxx
-
-#endif
diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list
index 939fe4da48d..b071d4fcdd6 100644
--- a/libstdc++-v3/include/debug/list
+++ b/libstdc++-v3/include/debug/list
@@ -1,6 +1,6 @@
// Debugging list implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -73,10 +73,10 @@ namespace __debug
{
template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
class list
- : public _GLIBCXX_STD::list<_Tp, _Allocator>,
+ : public _GLIBCXX_STD_D::list<_Tp, _Allocator>,
public __gnu_debug::_Safe_sequence<list<_Tp, _Allocator> >
{
- typedef _GLIBCXX_STD::list<_Tp, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::list<_Tp, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<list> _Safe_base;
public:
@@ -113,9 +113,17 @@ namespace __debug
{ }
- list(const list& __x) : _Base(__x), _Safe_base() { }
+ list(const list& __x)
+ : _Base(__x), _Safe_base() { }
- list(const _Base& __x) : _Base(__x), _Safe_base() { }
+ list(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list(list&& __x)
+ : _Base(std::forward<list>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~list() { }
@@ -127,6 +135,17 @@ namespace __debug
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list&
+ operator=(list&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
template<class _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
@@ -178,6 +197,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -264,6 +301,17 @@ namespace __debug
_Base::pop_back();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...), this);
+ }
+#endif
+
iterator
insert(iterator __position, const _Tp& __x)
{
@@ -271,6 +319,12 @@ namespace __debug
return iterator(_Base::insert(__position.base(), __x), this);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
void
insert(iterator __position, size_type __n, const _Tp& __x)
{
@@ -311,7 +365,11 @@ namespace __debug
}
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(list&& __x)
+#else
swap(list& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -326,16 +384,24 @@ namespace __debug
// 23.2.2.4 list operations:
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x)
+#else
splice(iterator __position, list& __x)
+#endif
{
_GLIBCXX_DEBUG_VERIFY(&__x != this,
_M_message(__gnu_debug::__msg_self_splice)
._M_sequence(*this, "this"));
- this->splice(__position, __x, __x.begin(), __x.end());
+ 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
{
__glibcxx_check_insert(__position);
@@ -352,11 +418,18 @@ namespace __debug
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 250. splicing invalidates iterators
this->_M_transfer_iter(__i);
- _Base::splice(__position.base(), __x._M_base(), __i.base());
+ _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+ __i.base());
}
void
- splice(iterator __position, list& __x, iterator __first, iterator __last)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __first,
+ iterator __last)
+#else
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+#endif
{
__glibcxx_check_insert(__position);
__glibcxx_check_valid_range(__first, __last);
@@ -381,8 +454,8 @@ namespace __debug
this->_M_transfer_iter(__victim);
}
- _Base::splice(__position.base(), __x._M_base(), __first.base(),
- __last.base());
+ _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+ __first.base(), __last.base());
}
void
@@ -448,7 +521,11 @@ namespace __debug
}
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x)
+#else
merge(list& __x)
+#endif
{
__glibcxx_check_sorted(_Base::begin(), _Base::end());
__glibcxx_check_sorted(__x.begin().base(), __x.end().base());
@@ -457,12 +534,16 @@ namespace __debug
iterator __victim = __tmp++;
__victim._M_attach(&__x);
}
- _Base::merge(__x._M_base());
+ _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_check_sorted_pred(_Base::begin(), _Base::end(), __comp);
__glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
@@ -472,7 +553,7 @@ namespace __debug
iterator __victim = __tmp++;
__victim._M_attach(&__x);
}
- _Base::merge(__x._M_base(), __comp);
+ _Base::merge(_GLIBCXX_MOVE(__x._M_base()), __comp);
}
void
@@ -502,38 +583,57 @@ namespace __debug
template<typename _Tp, typename _Alloc>
inline bool
- operator==(const list<_Tp, _Alloc>& __lhs, const list<_Tp, _Alloc>& __rhs)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>&& __lhs, list<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/macros.h b/libstdc++-v3/include/debug/macros.h
index ce4091924b1..6b7b2b277a8 100644
--- a/libstdc++-v3/include/debug/macros.h
+++ b/libstdc++-v3/include/debug/macros.h
@@ -1,6 +1,6 @@
// Debugging support implementation -*- C++ -*-
-// Copyright (C) 2003, 2005, 2006
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -140,21 +140,9 @@ _GLIBCXX_DEBUG_VERIFY(! this->empty(), \
_M_message(__gnu_debug::__msg_empty) \
._M_sequence(*this, "this"))
-// Verify that the < operator for elements in the sequence is a
-// StrictWeakOrdering by checking that it is irreflexive.
-#define __glibcxx_check_strict_weak_ordering(_First,_Last) \
-_GLIBCXX_DEBUG_ASSERT(_First == _Last || !(*_First < *_First))
-
-// Verify that the predicate is StrictWeakOrdering by checking that it
-// is irreflexive.
-#define __glibcxx_check_strict_weak_ordering_pred(_First,_Last,_Pred) \
-_GLIBCXX_DEBUG_ASSERT(_First == _Last || !_Pred(*_First, *_First))
-
-
// Verify that the iterator range [_First, _Last) is sorted
#define __glibcxx_check_sorted(_First,_Last) \
__glibcxx_check_valid_range(_First,_Last); \
-__glibcxx_check_strict_weak_ordering(_First,_Last); \
_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_sorted(_First, _Last), \
_M_message(__gnu_debug::__msg_unsorted) \
._M_iterator(_First, #_First) \
@@ -164,18 +152,45 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_sorted(_First, _Last), \
predicate _Pred. */
#define __glibcxx_check_sorted_pred(_First,_Last,_Pred) \
__glibcxx_check_valid_range(_First,_Last); \
-__glibcxx_check_strict_weak_ordering_pred(_First,_Last,_Pred); \
_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_sorted(_First, _Last, _Pred), \
_M_message(__gnu_debug::__msg_unsorted_pred) \
._M_iterator(_First, #_First) \
._M_iterator(_Last, #_Last) \
._M_string(#_Pred))
+// Special variant for std::merge, std::includes, std::set_*
+#define __glibcxx_check_sorted_set(_First1,_Last1,_First2) \
+__glibcxx_check_valid_range(_First1,_Last1); \
+_GLIBCXX_DEBUG_VERIFY( \
+ __gnu_debug::__check_sorted_set(_First1, _Last1, _First2), \
+ _M_message(__gnu_debug::__msg_unsorted) \
+ ._M_iterator(_First1, #_First1) \
+ ._M_iterator(_Last1, #_Last1))
+
+// Likewise with a _Pred.
+#define __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) \
+__glibcxx_check_valid_range(_First1,_Last1); \
+_GLIBCXX_DEBUG_VERIFY( \
+ __gnu_debug::__check_sorted_set(_First1, _Last1, _First2, _Pred), \
+ _M_message(__gnu_debug::__msg_unsorted_pred) \
+ ._M_iterator(_First1, #_First1) \
+ ._M_iterator(_Last1, #_Last1) \
+ ._M_string(#_Pred))
+
/** Verify that the iterator range [_First, _Last) is partitioned
w.r.t. the value _Value. */
-#define __glibcxx_check_partitioned(_First,_Last,_Value) \
+#define __glibcxx_check_partitioned_lower(_First,_Last,_Value) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
+ _Value), \
+ _M_message(__gnu_debug::__msg_unpartitioned) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Value))
+
+#define __glibcxx_check_partitioned_upper(_First,_Last,_Value) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned(_First, _Last, \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
_Value), \
_M_message(__gnu_debug::__msg_unpartitioned) \
._M_iterator(_First, #_First) \
@@ -184,9 +199,21 @@ _GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned(_First, _Last, \
/** Verify that the iterator range [_First, _Last) is partitioned
w.r.t. the value _Value and predicate _Pred. */
-#define __glibcxx_check_partitioned_pred(_First,_Last,_Value,_Pred) \
+#define __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
+ _Value, _Pred), \
+ _M_message(__gnu_debug::__msg_unpartitioned_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred) \
+ ._M_string(#_Value))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value and predicate _Pred. */
+#define __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
__glibcxx_check_valid_range(_First,_Last); \
-_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned(_First, _Last, \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
_Value, _Pred), \
_M_message(__gnu_debug::__msg_unpartitioned_pred) \
._M_iterator(_First, #_First) \
diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h
index 96591ca15c8..16575644da2 100644
--- a/libstdc++-v3/include/debug/map.h
+++ b/libstdc++-v3/include/debug/map.h
@@ -1,6 +1,6 @@
// Debugging map implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -46,10 +46,10 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
class map
- : public _GLIBCXX_STD::map<_Key, _Tp, _Compare, _Allocator>,
+ : public _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator>,
public __gnu_debug::_Safe_sequence<map<_Key, _Tp, _Compare, _Allocator> >
{
- typedef _GLIBCXX_STD::map<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<map> _Safe_base;
public:
@@ -88,21 +88,39 @@ namespace __debug
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
__comp, __a), _Safe_base() { }
- map(const map<_Key,_Tp,_Compare,_Allocator>& __x)
+ map(const map& __x)
: _Base(__x), _Safe_base() { }
- map(const _Base& __x) : _Base(__x), _Safe_base() { }
+ map(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map(map&& __x)
+ : _Base(std::forward<map>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~map() { }
- map<_Key,_Tp,_Compare,_Allocator>&
- operator=(const map<_Key,_Tp,_Compare,_Allocator>& __x)
+ map&
+ operator=(const map& __x)
{
*static_cast<_Base*>(this) = __x;
this->_M_invalidate_all();
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map&
+ operator=(map&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 133. map missing get_allocator()
using _Base::get_allocator;
@@ -140,6 +158,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -210,7 +246,11 @@ namespace __debug
}
void
- swap(map<_Key,_Tp,_Compare,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(map&& __x)
+#else
+ swap(map& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -287,47 +327,71 @@ namespace __debug
}
};
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator==(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() == __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() != __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator<(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() < __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() <= __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() >= __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ operator>(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ return __lhs._M_base() > __rhs._M_base(); }
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
inline void
- swap(map<_Key,_Tp,_Compare,_Allocator>& __lhs,
- map<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ map<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ 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); }
+
+ 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); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h
index cbd6704520f..72f4411685b 100644
--- a/libstdc++-v3/include/debug/multimap.h
+++ b/libstdc++-v3/include/debug/multimap.h
@@ -1,6 +1,6 @@
// Debugging multimap implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -46,10 +46,11 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
class multimap
- : public _GLIBCXX_STD::multimap<_Key, _Tp, _Compare, _Allocator>,
- public __gnu_debug::_Safe_sequence<multimap<_Key,_Tp,_Compare,_Allocator> >
+ : public _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<multimap<_Key, _Tp,
+ _Compare, _Allocator> >
{
- typedef _GLIBCXX_STD::multimap<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<multimap> _Safe_base;
public:
@@ -88,21 +89,39 @@ namespace __debug
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
__comp, __a) { }
- multimap(const multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+ multimap(const multimap& __x)
: _Base(__x), _Safe_base() { }
- multimap(const _Base& __x) : _Base(__x), _Safe_base() { }
+ multimap(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap(multimap&& __x)
+ : _Base(std::forward<multimap>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~multimap() { }
- multimap<_Key,_Tp,_Compare,_Allocator>&
- operator=(const multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+ multimap&
+ operator=(const multimap& __x)
{
*static_cast<_Base*>(this) = __x;
this->_M_invalidate_all();
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap&
+ operator=(multimap&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
using _Base::get_allocator;
// iterators:
@@ -138,6 +157,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -197,7 +234,11 @@ namespace __debug
}
void
- swap(multimap<_Key,_Tp,_Compare,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multimap&& __x)
+#else
+ swap(multimap& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -274,47 +315,71 @@ namespace __debug
}
};
- template<typename _Key,typename _Tp,typename _Compare,typename _Allocator>
+ 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)
+ 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>
+ 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)
+ 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>
+ 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)
+ 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>
+ 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)
+ 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>
+ 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)
+ 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>
+ 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)
+ 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>
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
inline void
- swap(multimap<_Key,_Tp,_Compare,_Allocator>& __lhs,
- multimap<_Key,_Tp,_Compare,_Allocator>& __rhs)
+ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
{ __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ 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); }
+
+ 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); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h
index a37099e1ac8..ffe5b51548f 100644
--- a/libstdc++-v3/include/debug/multiset.h
+++ b/libstdc++-v3/include/debug/multiset.h
@@ -1,6 +1,6 @@
// Debugging multiset implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -46,10 +46,10 @@ namespace __debug
template<typename _Key, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<_Key> >
class multiset
- : public _GLIBCXX_STD::multiset<_Key, _Compare, _Allocator>,
+ : public _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator>,
public __gnu_debug::_Safe_sequence<multiset<_Key, _Compare, _Allocator> >
{
- typedef _GLIBCXX_STD::multiset<_Key, _Compare, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<multiset> _Safe_base;
public:
@@ -86,21 +86,39 @@ namespace __debug
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
__comp, __a) { }
- multiset(const multiset<_Key,_Compare,_Allocator>& __x)
+ multiset(const multiset& __x)
: _Base(__x), _Safe_base() { }
- multiset(const _Base& __x) : _Base(__x), _Safe_base() { }
+ multiset(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset(multiset&& __x)
+ : _Base(std::forward<multiset>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~multiset() { }
- multiset<_Key,_Compare,_Allocator>&
- operator=(const multiset<_Key,_Compare,_Allocator>& __x)
+ multiset&
+ operator=(const multiset& __x)
{
*static_cast<_Base*>(this) = __x;
this->_M_invalidate_all();
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset&
+ operator=(multiset&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
using _Base::get_allocator;
// iterators:
@@ -136,6 +154,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -195,7 +231,11 @@ namespace __debug
}
void
- swap(multiset<_Key,_Compare,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multiset&& __x)
+#else
+ swap(multiset& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -282,45 +322,60 @@ namespace __debug
template<typename _Key, typename _Compare, typename _Allocator>
inline bool
- operator==(const multiset<_Key,_Compare,_Allocator>& __lhs,
- const multiset<_Key,_Compare,_Allocator>& __rhs)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ swap(multiset<_Key, _Compare, _Allocator>& __x,
+ multiset<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>&& __x,
+ multiset<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>& __x,
+ multiset<_Key, _Compare, _Allocator>&& __y)
{ return __x.swap(__y); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/safe_association.h b/libstdc++-v3/include/debug/safe_association.h
new file mode 100644
index 00000000000..42c050050b8
--- /dev/null
+++ b/libstdc++-v3/include/debug/safe_association.h
@@ -0,0 +1,210 @@
+// Safe associated container base class implementation -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/** @file debug/safe_association.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H
+#define _GLIBCXX_DEBUG_SAFE_ASSOCIATION_H 1
+
+#include <debug/debug.h>
+#include <debug/macros.h>
+#include <debug/functions.h>
+#include <debug/formatter.h>
+#include <debug/safe_sequence.h>
+
+namespace __gnu_debug
+{
+ /**
+ * @brief Base class for constructing a "safe" associated container type.
+ *
+ * The class template %_Safe_association simplifies the construction of
+ * "safe" associated containers.
+ */
+ template<typename _Base>
+ class _Safe_association
+ : public _Base
+ {
+ 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 __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ _Safe_association>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ _Safe_association>
+ const_iterator;
+
+ _Safe_association() { }
+
+ explicit _Safe_association(size_type __n) : _Base(__n) { }
+
+ _Safe_association(size_type __n, const hasher& __hf)
+ : _Base(__n, __hf) { }
+
+ _Safe_association(size_type __n, const hasher& __hf,
+ const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIter>
+ _Safe_association(_InputIter __f, _InputIter __l)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l) { }
+
+ template<typename _InputIter>
+ _Safe_association(_InputIter __f, _InputIter __l, size_type __n)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n) { }
+
+ template<typename _InputIter>
+ _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
+ const hasher& __hf)
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n, __hf)
+ { }
+
+ template<typename _InputIter>
+ _Safe_association(_InputIter __f, _InputIter __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l),
+ __l, __n, __hf, __eql, __a)
+ { }
+
+ _Safe_association(const _Base& __x) : _Base(__x) { }
+
+ _Safe_association(_Safe_association&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ using _Base::size;
+ using _Base::max_size;
+ using _Base::empty;
+ using _Base::get_allocator;
+ using _Base::key_eq;
+
+ using _Base::count;
+ using _Base::bucket_count;
+ using _Base::max_bucket_count;
+ using _Base::bucket;
+ using _Base::bucket_size;
+ using _Base::load_factor;
+
+ const_iterator
+ begin() const { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ end() const { return const_iterator(_Base::end(), this); }
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ void
+ insert(const value_type* __first, const value_type* __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ template<typename _InputIter>
+ void
+ insert(_InputIter __first, _InputIter __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first.base(), __last.base());
+ }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()));
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(), __last.base()));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+} // namespace __gnu_debug
+
+#endif
diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h
index 2d26f57a396..a53802489cc 100644
--- a/libstdc++-v3/include/debug/safe_base.h
+++ b/libstdc++-v3/include/debug/safe_base.h
@@ -197,7 +197,7 @@ namespace __gnu_debug
/** Revalidates all attached singular iterators. This method may
* be used to validate iterators that were invalidated before
- * (but for some reasion, such as an exception, need to become
+ * (but for some reason, such as an exception, need to become
* valid again).
*/
void
diff --git a/libstdc++-v3/include/debug/safe_iterator.tcc b/libstdc++-v3/include/debug/safe_iterator.tcc
index d23e90f048a..a4cce068e96 100644
--- a/libstdc++-v3/include/debug/safe_iterator.tcc
+++ b/libstdc++-v3/include/debug/safe_iterator.tcc
@@ -1,6 +1,6 @@
// Debugging iterator implementation (out of line) -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -54,8 +54,8 @@ namespace __gnu_debug
static_cast<const _Sequence*>(_M_sequence)->begin();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(__begin, *this);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
else
@@ -64,8 +64,8 @@ namespace __gnu_debug
static_cast<const _Sequence*>(_M_sequence)->end();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(*this, __end);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= __n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
}
diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h
index 6c2ce9fd1fc..3115610d1e1 100644
--- a/libstdc++-v3/include/debug/set.h
+++ b/libstdc++-v3/include/debug/set.h
@@ -1,6 +1,6 @@
// Debugging set implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -46,10 +46,10 @@ namespace __debug
template<typename _Key, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<_Key> >
class set
- : public _GLIBCXX_STD::set<_Key,_Compare,_Allocator>,
+ : public _GLIBCXX_STD_D::set<_Key,_Compare,_Allocator>,
public __gnu_debug::_Safe_sequence<set<_Key, _Compare, _Allocator> >
{
- typedef _GLIBCXX_STD::set<_Key,_Compare,_Allocator> _Base;
+ typedef _GLIBCXX_STD_D::set<_Key, _Compare, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<set> _Safe_base;
public:
@@ -86,21 +86,39 @@ namespace __debug
: _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
__comp, __a) { }
- set(const set<_Key,_Compare,_Allocator>& __x)
+ set(const set& __x)
: _Base(__x), _Safe_base() { }
- set(const _Base& __x) : _Base(__x), _Safe_base() { }
+ set(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set(set&& __x)
+ : _Base(std::forward<set>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+#endif
~set() { }
- set<_Key,_Compare,_Allocator>&
- operator=(const set<_Key,_Compare,_Allocator>& __x)
+ set&
+ operator=(const set& __x)
{
*static_cast<_Base*>(this) = __x;
this->_M_invalidate_all();
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set&
+ operator=(set&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
using _Base::get_allocator;
// iterators:
@@ -136,6 +154,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ 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;
@@ -200,7 +236,11 @@ namespace __debug
}
void
- swap(set<_Key,_Compare,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(set&& __x)
+#else
+ swap(set& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -287,45 +327,60 @@ namespace __debug
template<typename _Key, typename _Compare, typename _Allocator>
inline bool
- operator==(const set<_Key,_Compare,_Allocator>& __lhs,
- const set<_Key,_Compare,_Allocator>& __rhs)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ swap(set<_Key, _Compare, _Allocator>& __x,
+ set<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>&& __x,
+ set<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>& __x,
+ set<_Key, _Compare, _Allocator>&& __y)
{ return __x.swap(__y); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
new file mode 100644
index 00000000000..590d4a3478f
--- /dev/null
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -0,0 +1,254 @@
+// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
+
+// Copyright (C) 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.
+
+/** @file debug/unordered_map
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_MAP
+#define _GLIBCXX_DEBUG_UNORDERED_MAP 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_map>
+#else
+# include <c++0x_warning.h>
+#endif
+#include <debug/safe_association.h>
+#include <debug/safe_iterator.h>
+
+#define _GLIBCXX_BASE unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Tp,
+ typename _Hash = std::hash<_Key>,
+ typename _Pred = std::equal_to<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class unordered_map
+ : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+ public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+ typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef __gnu_debug::_Safe_sequence<unordered_map> _Safe_base;
+
+ public:
+ typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::hasher hasher;
+ typedef typename _Safe_assoc::key_equal key_equal;
+ typedef typename _Safe_assoc::allocator_type allocator_type;
+
+ explicit
+ unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+ unordered_map(const _Safe_assoc& __x)
+ : _Safe_assoc(__x), _Safe_base() { }
+
+ unordered_map(unordered_map&& __x)
+ : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+
+ unordered_map&
+ operator=(unordered_map&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ void
+ swap(unordered_map&& __x)
+ {
+ _Safe_assoc::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ }
+ };
+
+ 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); }
+
+ 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); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
+
+ template<typename _Key, typename _Tp,
+ typename _Hash = std::hash<_Key>,
+ typename _Pred = std::equal_to<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class unordered_multimap
+ : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+ public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+ typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef __gnu_debug::_Safe_sequence<unordered_multimap> _Safe_base;
+
+ public:
+ typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::hasher hasher;
+ typedef typename _Safe_assoc::key_equal key_equal;
+ typedef typename _Safe_assoc::allocator_type allocator_type;
+
+ explicit
+ unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+ unordered_multimap(const _Safe_assoc& __x)
+ : _Safe_assoc(__x), _Safe_base() { }
+
+ unordered_multimap(unordered_multimap&& __x)
+ : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+
+ unordered_multimap&
+ operator=(unordered_multimap&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ void
+ swap(unordered_multimap&& __x)
+ {
+ _Safe_assoc::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ }
+ };
+
+ 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); }
+
+ 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); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+} // namespace __debug
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
new file mode 100644
index 00000000000..b4b9be8a140
--- /dev/null
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -0,0 +1,249 @@
+// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
+
+// Copyright (C) 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.
+
+/** @file debug/unordered_set
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_SET
+#define _GLIBCXX_DEBUG_UNORDERED_SET 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_set>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <debug/safe_association.h>
+#include <debug/safe_iterator.h>
+
+#define _GLIBCXX_BASE unordered_set<_Value, _Hash, _Pred, _Alloc>
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Value,
+ typename _Hash = std::hash<_Value>,
+ typename _Pred = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class unordered_set
+ : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+ public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+ typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef __gnu_debug::_Safe_sequence<unordered_set> _Safe_base;
+
+ public:
+ typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::hasher hasher;
+ typedef typename _Safe_assoc::key_equal key_equal;
+ typedef typename _Safe_assoc::allocator_type allocator_type;
+
+ explicit
+ unordered_set(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+ unordered_set(const _Safe_assoc& __x)
+ : _Safe_assoc(__x), _Safe_base() { }
+
+ unordered_set(unordered_set&& __x)
+ : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+
+ unordered_set&
+ operator=(unordered_set&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ void
+ swap(unordered_set&& __x)
+ {
+ _Safe_assoc::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ }
+ };
+
+ 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); }
+
+ 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); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+#define _GLIBCXX_STD_BASE _GLIBCXX_STD_D::_GLIBCXX_BASE
+#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
+
+ template<typename _Value,
+ typename _Hash = std::hash<_Value>,
+ typename _Pred = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class unordered_multiset
+ : public __gnu_debug::_Safe_association<_GLIBCXX_STD_BASE>,
+ public __gnu_debug::_Safe_sequence<_GLIBCXX_BASE>
+ {
+ typedef typename _GLIBCXX_STD_BASE _Base;
+ typedef __gnu_debug::_Safe_association<_Base> _Safe_assoc;
+ typedef __gnu_debug::_Safe_sequence<unordered_multiset> _Safe_base;
+
+ public:
+ typedef typename _Safe_assoc::size_type size_type;
+ typedef typename _Safe_assoc::hasher hasher;
+ typedef typename _Safe_assoc::key_equal key_equal;
+ typedef typename _Safe_assoc::allocator_type allocator_type;
+
+ explicit
+ unordered_multiset(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Safe_assoc(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+ unordered_multiset(const _Safe_assoc& __x)
+ : _Safe_assoc(__x), _Safe_base() { }
+
+ unordered_multiset(unordered_multiset&& __x)
+ : _Safe_assoc(std::forward<_Safe_assoc>(__x)), _Safe_base() { }
+
+ unordered_multiset&
+ operator=(unordered_multiset&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ void
+ swap(unordered_multiset&& __x)
+ {
+ _Safe_assoc::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(this->_M_base().end()));
+ }
+ };
+
+ 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); }
+
+ 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); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+} // namespace __debug
+} // namespace std
+
+#undef _GLIBCXX_BASE
+#undef _GLIBCXX_STD_BASE
+
+#endif
diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector
index 33b8b638a77..672cb81ad9d 100644
--- a/libstdc++-v3/include/debug/vector
+++ b/libstdc++-v3/include/debug/vector
@@ -1,6 +1,6 @@
// Debugging vector implementation -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -47,10 +47,10 @@ namespace __debug
template<typename _Tp,
typename _Allocator = std::allocator<_Tp> >
class vector
- : public _GLIBCXX_STD::vector<_Tp, _Allocator>,
+ : public _GLIBCXX_STD_D::vector<_Tp, _Allocator>,
public __gnu_debug::_Safe_sequence<vector<_Tp, _Allocator> >
{
- typedef _GLIBCXX_STD::vector<_Tp, _Allocator> _Base;
+ typedef _GLIBCXX_STD_D::vector<_Tp, _Allocator> _Base;
typedef __gnu_debug::_Safe_sequence<vector> _Safe_base;
typedef typename _Base::const_iterator _Base_const_iterator;
@@ -91,17 +91,27 @@ namespace __debug
_M_guaranteed_capacity(0)
{ _M_update_guaranteed_capacity(); }
- vector(const vector<_Tp,_Allocator>& __x)
+ vector(const vector& __x)
: _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
/// Construction from a release-mode vector
vector(const _Base& __x)
: _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector(vector&& __x)
+ : _Base(std::forward<vector>(__x)), _Safe_base(),
+ _M_guaranteed_capacity(this->size())
+ {
+ this->_M_swap(__x);
+ __x._M_guaranteed_capacity = 0;
+ }
+#endif
+
~vector() { }
- vector<_Tp,_Allocator>&
- operator=(const vector<_Tp,_Allocator>& __x)
+ vector&
+ operator=(const vector& __x)
{
static_cast<_Base&>(*this) = __x;
this->_M_invalidate_all();
@@ -109,6 +119,17 @@ namespace __debug
return *this;
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+#endif
+
template<typename _InputIterator>
void
assign(_InputIterator __first, _InputIterator __last)
@@ -162,6 +183,24 @@ namespace __debug
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
// 23.2.4.2 capacity:
using _Base::size;
using _Base::max_size;
@@ -241,6 +280,7 @@ namespace __debug
using _Base::data;
// 23.2.4.3 modifiers:
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push_back(const _Tp& __x)
{
@@ -250,6 +290,18 @@ namespace __debug
this->_M_invalidate_all();
_M_update_guaranteed_capacity();
}
+#else
+ template<typename... _Args>
+ void
+ push_back(_Args&&... __args)
+ {
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ _Base::push_back(std::forward<_Args>(__args)...);
+ if (__realloc)
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+#endif
void
pop_back()
@@ -260,6 +312,25 @@ namespace __debug
_Base::pop_back();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ return iterator(__res, this);
+ }
+#endif
+
iterator
insert(iterator __position, const _Tp& __x)
{
@@ -275,6 +346,12 @@ namespace __debug
return iterator(__res, this);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+#endif
+
void
insert(iterator __position, size_type __n, const _Tp& __x)
{
@@ -335,7 +412,11 @@ namespace __debug
}
void
- swap(vector<_Tp,_Allocator>& __x)
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
+ swap(vector& __x)
+#endif
{
_Base::swap(__x);
this->_M_swap(__x);
@@ -417,6 +498,19 @@ namespace __debug
inline void
swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
{ __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
} // namespace __debug
} // namespace std
diff --git a/libstdc++-v3/include/ext/algorithm b/libstdc++-v3/include/ext/algorithm
index 10ca58aa2fd..5a24b7e6f48 100644
--- a/libstdc++-v3/include/ext/algorithm
+++ b/libstdc++-v3/include/ext/algorithm
@@ -428,6 +428,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__out_last - __out_first);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using std::is_heap;
+ using std::is_sorted;
+#else
/**
* This is an SGI extension.
* @ingroup SGIextensions
@@ -523,6 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return false;
return true;
}
+#endif
_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/include/ext/array_allocator.h b/libstdc++-v3/include/ext/array_allocator.h
index 0bbd97a2d09..d5f70923743 100644
--- a/libstdc++-v3/include/ext/array_allocator.h
+++ b/libstdc++-v3/include/ext/array_allocator.h
@@ -1,6 +1,6 @@
// array allocator -*- C++ -*-
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -38,6 +38,7 @@
#include <new>
#include <bits/functexcept.h>
#include <tr1/array>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -77,7 +78,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) value_type(__val); }
+ { ::new((void *)__p) value_type(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }
diff --git a/libstdc++-v3/include/ext/atomicity.h b/libstdc++-v3/include/ext/atomicity.h
index 975121e876b..05bac1f46d4 100644
--- a/libstdc++-v3/include/ext/atomicity.h
+++ b/libstdc++-v3/include/ext/atomicity.h
@@ -42,7 +42,7 @@
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Functions for portable atomic access.
- // To abstract locking primatives across all thread policies, use:
+ // To abstract locking primitives across all thread policies, use:
// __exchange_and_add_dispatch
// __atomic_add_dispatch
#ifdef _GLIBCXX_ATOMIC_BUILTINS
diff --git a/libstdc++-v3/include/ext/bitmap_allocator.h b/libstdc++-v3/include/ext/bitmap_allocator.h
index 93fa8e63ad5..2736a4640eb 100644
--- a/libstdc++-v3/include/ext/bitmap_allocator.h
+++ b/libstdc++-v3/include/ext/bitmap_allocator.h
@@ -1,6 +1,6 @@
// Bitmap Allocator. -*- C++ -*-
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -41,7 +41,7 @@
#include <new> // For operator new.
#include <debug/debug.h> // _GLIBCXX_DEBUG_ASSERT
#include <ext/concurrence.h>
-
+#include <bits/stl_move.h>
/** @brief The constant in the expression below is the alignment
* required in bytes.
@@ -377,7 +377,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Set the _rover to the last physical location bitmap,
// which is the bitmap which belongs to the first free
// block. Thus, the bitmaps are in exact reverse order of
- // the actual memory layout. So, we count down the bimaps,
+ // the actual memory layout. So, we count down the bitmaps,
// which is the same as moving up the memory.
// If the used count stored at the start of the Bit Map headers
@@ -608,7 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
else
{
// Deallocate the last block in the list of free lists,
- // and insert the new one in it's correct position.
+ // and insert the new one in its correct position.
::operator delete(static_cast<void*>(__free_list.back()));
__free_list.pop_back();
}
@@ -1089,7 +1089,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
construct(pointer __p, const_reference __data)
- { ::new(__p) value_type(__data); }
+ { ::new((void *)__p) value_type(__data); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p)
diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h
index c0563acb4ee..42e3c0f1477 100644
--- a/libstdc++-v3/include/ext/codecvt_specializations.h
+++ b/libstdc++-v3/include/ext/codecvt_specializations.h
@@ -47,7 +47,7 @@
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
- /// @brief Extension to use icov for dealing with character encodings.
+ /// @brief Extension to use iconv for dealing with character encodings.
// This includes conversions and comparisons between various character
// sets. This object encapsulates data that may need to be shared between
// char_traits, codecvt and ctype.
@@ -101,7 +101,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// typedef STATE_T state_type
// requires: state_type shall meet the requirements of
// CopyConstructible types (20.1.3)
- // NB: This does not preseve the actual state of the conversion
+ // NB: This does not preserve the actual state of the conversion
// descriptor member, but it does duplicate the encoding
// information.
encoding_state(const encoding_state& __obj) : _M_in_desc(0), _M_out_desc(0)
@@ -121,7 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
bool
good() const throw()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
bool __test = _M_in_desc && _M_in_desc != __err;
__test &= _M_out_desc && _M_out_desc != __err;
return __test;
@@ -159,7 +159,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
init()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size();
if (!_M_in_desc && __have_encodings)
{
@@ -192,7 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
destroy() throw()
{
- const descriptor_type __err = reinterpret_cast<iconv_t>(-1);
+ const descriptor_type __err = (iconv_t)(-1);
if (_M_in_desc && _M_in_desc != __err)
{
iconv_close(_M_in_desc);
diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h
index de4934c63c5..765b93dbdc2 100644
--- a/libstdc++-v3/include/ext/concurrence.h
+++ b/libstdc++-v3/include/ext/concurrence.h
@@ -45,7 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Available locking policies:
// _S_single single-threaded code that doesn't need to be locked.
// _S_mutex multi-threaded code that requires additional support
- // from gthr.h or abstraction layers in concurrance.h.
+ // from gthr.h or abstraction layers in concurrence.h.
// _S_atomic multi-threaded code using atomic operations.
enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
@@ -81,6 +81,22 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ return "__gnu_cxx::__concurrence_unlock_error"; }
};
+ class __concurrence_broadcast_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_broadcast_error"; }
+ };
+
+ class __concurrence_wait_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_wait_error"; }
+ };
+
// Substitute for concurrence_error object in the case of -fno-exceptions.
inline void
__throw_concurrence_lock_error()
@@ -102,6 +118,28 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#endif
}
+#ifdef __GTHREAD_HAS_COND
+ inline void
+ __throw_concurrence_broadcast_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_broadcast_error();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ inline void
+ __throw_concurrence_wait_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_wait_error();
+#else
+ __builtin_abort();
+#endif
+ }
+#endif
+
class __mutex
{
private:
@@ -147,6 +185,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
#endif
}
+
+ __gthread_mutex_t* gthread_mutex(void)
+ { return &_M_mutex; }
};
class __recursive_mutex
@@ -194,6 +235,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
#endif
}
+
+ __gthread_recursive_mutex_t* gthread_recursive_mutex(void)
+ { return &_M_mutex; }
};
/// @brief Scoped lock idiom.
@@ -218,6 +262,66 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ _M_device.unlock(); }
};
+#ifdef __GTHREAD_HAS_COND
+ class __cond
+ {
+ private:
+ __gthread_cond_t _M_cond;
+
+ __cond(const __cond&);
+ __cond& operator=(const __cond&);
+
+ public:
+ __cond()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+#if defined __GTHREAD_COND_INIT
+ __gthread_cond_t __tmp = __GTHREAD_COND_INIT;
+ _M_cond = __tmp;
+#else
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_cond);
+#endif
+ }
+#endif
+ }
+
+ void broadcast()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_cond_broadcast(&_M_cond) != 0)
+ __throw_concurrence_broadcast_error();
+ }
+#endif
+ }
+
+ void wait(__mutex *mutex)
+ {
+#if __GTHREADS
+ {
+ if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0)
+ __throw_concurrence_wait_error();
+ }
+#endif
+ }
+
+ void wait_recursive(__recursive_mutex *mutex)
+ {
+#if __GTHREADS
+ {
+ if (__gthread_cond_wait_recursive(&_M_cond,
+ mutex->gthread_recursive_mutex())
+ != 0)
+ __throw_concurrence_wait_error();
+ }
+#endif
+ }
+ };
+#endif
+
_GLIBCXX_END_NAMESPACE
#endif
diff --git a/libstdc++-v3/include/ext/hash_fun.h b/libstdc++-v3/include/ext/hash_fun.h
deleted file mode 100644
index 16c04580754..00000000000
--- a/libstdc++-v3/include/ext/hash_fun.h
+++ /dev/null
@@ -1,172 +0,0 @@
-// 'struct hash' from SGI -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file ext/hash_fun.h
- * This file is a GNU extension to the Standard C++ Library (possibly
- * containing extensions from the HP/SGI STL subset).
- */
-
-#ifndef _HASH_FUN_H
-#define _HASH_FUN_H 1
-
-#include <cstddef>
-
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- using std::size_t;
-
- template<class _Key>
- struct hash { };
-
- inline size_t
- __stl_hash_string(const char* __s)
- {
- unsigned long __h = 0;
- for ( ; *__s; ++__s)
- __h = 5 * __h + *__s;
- return size_t(__h);
- }
-
- template<>
- struct hash<char*>
- {
- size_t
- operator()(const char* __s) const
- { return __stl_hash_string(__s); }
- };
-
- template<>
- struct hash<const char*>
- {
- size_t
- operator()(const char* __s) const
- { return __stl_hash_string(__s); }
- };
-
- template<>
- struct hash<char>
- {
- size_t
- operator()(char __x) const
- { return __x; }
- };
-
- template<>
- struct hash<unsigned char>
- {
- size_t
- operator()(unsigned char __x) const
- { return __x; }
- };
-
- template<>
- struct hash<signed char>
- {
- size_t
- operator()(unsigned char __x) const
- { return __x; }
- };
-
- template<>
- struct hash<short>
- {
- size_t
- operator()(short __x) const
- { return __x; }
- };
-
- template<>
- struct hash<unsigned short>
- {
- size_t
- operator()(unsigned short __x) const
- { return __x; }
- };
-
- template<>
- struct hash<int>
- {
- size_t
- operator()(int __x) const
- { return __x; }
- };
-
- template<>
- struct hash<unsigned int>
- {
- size_t
- operator()(unsigned int __x) const
- { return __x; }
- };
-
- template<>
- struct hash<long>
- {
- size_t
- operator()(long __x) const
- { return __x; }
- };
-
- template<>
- struct hash<unsigned long>
- {
- size_t
- operator()(unsigned long __x) const
- { return __x; }
- };
-
-_GLIBCXX_END_NAMESPACE
-
-#endif
diff --git a/libstdc++-v3/include/ext/hash_map b/libstdc++-v3/include/ext/hash_map
deleted file mode 100644
index b6855ebb3be..00000000000
--- a/libstdc++-v3/include/ext/hash_map
+++ /dev/null
@@ -1,605 +0,0 @@
-// Hashing map implementation -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file ext/hash_map
- * This file is a GNU extension to the Standard C++ Library (possibly
- * containing extensions from the HP/SGI STL subset).
- */
-
-#ifndef _HASH_MAP
-#define _HASH_MAP 1
-
-#include <bits/c++config.h>
-#include <ext/hashtable.h>
-#include <bits/concept_check.h>
-
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
-
- using std::equal_to;
- using std::allocator;
- using std::pair;
- using std::_Select1st;
-
- /**
- * This is an SGI extension.
- * @ingroup SGIextensions
- * @doctodo
- */
- template<class _Key, class _Tp, class _HashFn = hash<_Key>,
- class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
- class hash_map
- {
- private:
- typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,
- _Select1st<pair<const _Key, _Tp> >,
- _EqualKey, _Alloc> _Ht;
-
- _Ht _M_ht;
-
- public:
- typedef typename _Ht::key_type key_type;
- typedef _Tp data_type;
- typedef _Tp mapped_type;
- typedef typename _Ht::value_type value_type;
- typedef typename _Ht::hasher hasher;
- typedef typename _Ht::key_equal key_equal;
-
- typedef typename _Ht::size_type size_type;
- typedef typename _Ht::difference_type difference_type;
- typedef typename _Ht::pointer pointer;
- typedef typename _Ht::const_pointer const_pointer;
- typedef typename _Ht::reference reference;
- typedef typename _Ht::const_reference const_reference;
-
- typedef typename _Ht::iterator iterator;
- typedef typename _Ht::const_iterator const_iterator;
-
- typedef typename _Ht::allocator_type allocator_type;
-
- hasher
- hash_funct() const
- { return _M_ht.hash_funct(); }
-
- key_equal
- key_eq() const
- { return _M_ht.key_eq(); }
-
- allocator_type
- get_allocator() const
- { return _M_ht.get_allocator(); }
-
- public:
- hash_map()
- : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-
- explicit
- hash_map(size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-
- hash_map(size_type __n, const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-
- hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a) {}
-
- template<class _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l)
- : _M_ht(100, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a)
- { _M_ht.insert_unique(__f, __l); }
-
- public:
- size_type
- size() const
- { return _M_ht.size(); }
-
- size_type
- max_size() const
- { return _M_ht.max_size(); }
-
- bool
- empty() const
- { return _M_ht.empty(); }
-
- void
- swap(hash_map& __hs)
- { _M_ht.swap(__hs._M_ht); }
-
- template<class _K1, class _T1, class _HF, class _EqK, class _Al>
- friend bool
- operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
- const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
-
- iterator
- begin()
- { return _M_ht.begin(); }
-
- iterator
- end()
- { return _M_ht.end(); }
-
- const_iterator
- begin() const
- { return _M_ht.begin(); }
-
- const_iterator
- end() const
- { return _M_ht.end(); }
-
- public:
- pair<iterator, bool>
- insert(const value_type& __obj)
- { return _M_ht.insert_unique(__obj); }
-
- template<class _InputIterator>
- void
- insert(_InputIterator __f, _InputIterator __l)
- { _M_ht.insert_unique(__f, __l); }
-
- pair<iterator, bool>
- insert_noresize(const value_type& __obj)
- { return _M_ht.insert_unique_noresize(__obj); }
-
- iterator
- find(const key_type& __key)
- { return _M_ht.find(__key); }
-
- const_iterator
- find(const key_type& __key) const
- { return _M_ht.find(__key); }
-
- _Tp&
- operator[](const key_type& __key)
- { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
-
- size_type
- count(const key_type& __key) const
- { return _M_ht.count(__key); }
-
- pair<iterator, iterator>
- equal_range(const key_type& __key)
- { return _M_ht.equal_range(__key); }
-
- pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const
- { return _M_ht.equal_range(__key); }
-
- size_type
- erase(const key_type& __key)
- {return _M_ht.erase(__key); }
-
- void
- erase(iterator __it)
- { _M_ht.erase(__it); }
-
- void
- erase(iterator __f, iterator __l)
- { _M_ht.erase(__f, __l); }
-
- void
- clear()
- { _M_ht.clear(); }
-
- void
- resize(size_type __hint)
- { _M_ht.resize(__hint); }
-
- size_type
- bucket_count() const
- { return _M_ht.bucket_count(); }
-
- size_type
- max_bucket_count() const
- { return _M_ht.max_bucket_count(); }
-
- size_type
- elems_in_bucket(size_type __n) const
- { return _M_ht.elems_in_bucket(__n); }
- };
-
- template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
- inline bool
- operator==(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
- const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
- { return __hm1._M_ht == __hm2._M_ht; }
-
- template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
- inline bool
- operator!=(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
- const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
- { return !(__hm1 == __hm2); }
-
- template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
- inline void
- swap(hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
- hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
- { __hm1.swap(__hm2); }
-
-
- /**
- * This is an SGI extension.
- * @ingroup SGIextensions
- * @doctodo
- */
- template<class _Key, class _Tp,
- class _HashFn = hash<_Key>,
- class _EqualKey = equal_to<_Key>,
- class _Alloc = allocator<_Tp> >
- class hash_multimap
- {
- // concept requirements
- __glibcxx_class_requires(_Key, _SGIAssignableConcept)
- __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
- __glibcxx_class_requires3(_HashFn, size_t, _Key, _UnaryFunctionConcept)
- __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
-
- private:
- typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFn,
- _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
- _Ht;
-
- _Ht _M_ht;
-
- public:
- typedef typename _Ht::key_type key_type;
- typedef _Tp data_type;
- typedef _Tp mapped_type;
- typedef typename _Ht::value_type value_type;
- typedef typename _Ht::hasher hasher;
- typedef typename _Ht::key_equal key_equal;
-
- typedef typename _Ht::size_type size_type;
- typedef typename _Ht::difference_type difference_type;
- typedef typename _Ht::pointer pointer;
- typedef typename _Ht::const_pointer const_pointer;
- typedef typename _Ht::reference reference;
- typedef typename _Ht::const_reference const_reference;
-
- typedef typename _Ht::iterator iterator;
- typedef typename _Ht::const_iterator const_iterator;
-
- typedef typename _Ht::allocator_type allocator_type;
-
- hasher
- hash_funct() const
- { return _M_ht.hash_funct(); }
-
- key_equal
- key_eq() const
- { return _M_ht.key_eq(); }
-
- allocator_type
- get_allocator() const
- { return _M_ht.get_allocator(); }
-
- public:
- hash_multimap()
- : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-
- explicit
- hash_multimap(size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-
- hash_multimap(size_type __n, const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-
- hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a) {}
-
- template<class _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l)
- : _M_ht(100, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a)
- { _M_ht.insert_equal(__f, __l); }
-
- public:
- size_type
- size() const
- { return _M_ht.size(); }
-
- size_type
- max_size() const
- { return _M_ht.max_size(); }
-
- bool
- empty() const
- { return _M_ht.empty(); }
-
- void
- swap(hash_multimap& __hs)
- { _M_ht.swap(__hs._M_ht); }
-
- template<class _K1, class _T1, class _HF, class _EqK, class _Al>
- friend bool
- operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
- const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
-
- iterator
- begin()
- { return _M_ht.begin(); }
-
- iterator
- end()
- { return _M_ht.end(); }
-
- const_iterator
- begin() const
- { return _M_ht.begin(); }
-
- const_iterator
- end() const
- { return _M_ht.end(); }
-
- public:
- iterator
- insert(const value_type& __obj)
- { return _M_ht.insert_equal(__obj); }
-
- template<class _InputIterator>
- void
- insert(_InputIterator __f, _InputIterator __l)
- { _M_ht.insert_equal(__f,__l); }
-
- iterator
- insert_noresize(const value_type& __obj)
- { return _M_ht.insert_equal_noresize(__obj); }
-
- iterator
- find(const key_type& __key)
- { return _M_ht.find(__key); }
-
- const_iterator
- find(const key_type& __key) const
- { return _M_ht.find(__key); }
-
- size_type
- count(const key_type& __key) const
- { return _M_ht.count(__key); }
-
- pair<iterator, iterator>
- equal_range(const key_type& __key)
- { return _M_ht.equal_range(__key); }
-
- pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const
- { return _M_ht.equal_range(__key); }
-
- size_type
- erase(const key_type& __key)
- { return _M_ht.erase(__key); }
-
- void
- erase(iterator __it)
- { _M_ht.erase(__it); }
-
- void
- erase(iterator __f, iterator __l)
- { _M_ht.erase(__f, __l); }
-
- void
- clear()
- { _M_ht.clear(); }
-
- public:
- void
- resize(size_type __hint)
- { _M_ht.resize(__hint); }
-
- size_type
- bucket_count() const
- { return _M_ht.bucket_count(); }
-
- size_type
- max_bucket_count() const
- { return _M_ht.max_bucket_count(); }
-
- size_type
- elems_in_bucket(size_type __n) const
- { return _M_ht.elems_in_bucket(__n); }
- };
-
- template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
- inline bool
- operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
- const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
- { return __hm1._M_ht == __hm2._M_ht; }
-
- template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
- inline bool
- operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
- const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
- { return !(__hm1 == __hm2); }
-
- template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
- inline void
- swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
- hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
- { __hm1.swap(__hm2); }
-
-_GLIBCXX_END_NESTED_NAMESPACE
-
-#ifdef _GLIBCXX_DEBUG
-# include <debug/hash_map>
-#endif
-
-_GLIBCXX_BEGIN_NAMESPACE(std)
-
- // Specialization of insert_iterator so that it will work for hash_map
- // and hash_multimap.
- template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
- class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn,
- _EqKey, _Alloc> >
- {
- protected:
- typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
- _Container;
- _Container* container;
-
- public:
- typedef _Container container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- insert_iterator(_Container& __x)
- : container(&__x) {}
-
- insert_iterator(_Container& __x, typename _Container::iterator)
- : container(&__x) {}
-
- insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value)
- {
- container->insert(__value);
- return *this;
- }
-
- insert_iterator<_Container>&
- operator*()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++() { return *this; }
-
- insert_iterator<_Container>&
- operator++(int)
- { return *this; }
- };
-
- template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
- class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
- _EqKey, _Alloc> >
- {
- protected:
- typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
- _Container;
- _Container* container;
- typename _Container::iterator iter;
-
- public:
- typedef _Container container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- insert_iterator(_Container& __x)
- : container(&__x) {}
-
- insert_iterator(_Container& __x, typename _Container::iterator)
- : container(&__x) {}
-
- insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value)
- {
- container->insert(__value);
- return *this;
- }
-
- insert_iterator<_Container>&
- operator*()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++(int)
- { return *this; }
- };
-
-_GLIBCXX_END_NAMESPACE
-
-#endif
diff --git a/libstdc++-v3/include/ext/hash_set b/libstdc++-v3/include/ext/hash_set
deleted file mode 100644
index 668fe13bd2a..00000000000
--- a/libstdc++-v3/include/ext/hash_set
+++ /dev/null
@@ -1,574 +0,0 @@
-// Hashing set implementation -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file ext/hash_set
- * This file is a GNU extension to the Standard C++ Library (possibly
- * containing extensions from the HP/SGI STL subset).
- */
-
-#ifndef _HASH_SET
-#define _HASH_SET 1
-
-#include <bits/c++config.h>
-#include <ext/hashtable.h>
-#include <bits/concept_check.h>
-
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
-
- using std::equal_to;
- using std::allocator;
- using std::pair;
- using std::_Identity;
-
- /**
- * This is an SGI extension.
- * @ingroup SGIextensions
- * @doctodo
- */
- template<class _Value, class _HashFcn = hash<_Value>,
- class _EqualKey = equal_to<_Value>,
- class _Alloc = allocator<_Value> >
- class hash_set
- {
- // concept requirements
- __glibcxx_class_requires(_Value, _SGIAssignableConcept)
- __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
- __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
-
- private:
- typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
- _EqualKey, _Alloc> _Ht;
- _Ht _M_ht;
-
- public:
- typedef typename _Ht::key_type key_type;
- typedef typename _Ht::value_type value_type;
- typedef typename _Ht::hasher hasher;
- typedef typename _Ht::key_equal key_equal;
-
- typedef typename _Ht::size_type size_type;
- typedef typename _Ht::difference_type difference_type;
- typedef typename _Alloc::pointer pointer;
- typedef typename _Alloc::const_pointer const_pointer;
- typedef typename _Alloc::reference reference;
- typedef typename _Alloc::const_reference const_reference;
-
- typedef typename _Ht::const_iterator iterator;
- typedef typename _Ht::const_iterator const_iterator;
-
- typedef typename _Ht::allocator_type allocator_type;
-
- hasher
- hash_funct() const
- { return _M_ht.hash_funct(); }
-
- key_equal
- key_eq() const
- { return _M_ht.key_eq(); }
-
- allocator_type
- get_allocator() const
- { return _M_ht.get_allocator(); }
-
- public:
- hash_set()
- : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-
- explicit
- hash_set(size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-
- hash_set(size_type __n, const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-
- hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a) {}
-
- template<class _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l)
- : _M_ht(100, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type())
- { _M_ht.insert_unique(__f, __l); }
-
- template<class _InputIterator>
- hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a)
- { _M_ht.insert_unique(__f, __l); }
-
- public:
- size_type
- size() const
- { return _M_ht.size(); }
-
- size_type
- max_size() const
- { return _M_ht.max_size(); }
-
- bool
- empty() const
- { return _M_ht.empty(); }
-
- void
- swap(hash_set& __hs)
- { _M_ht.swap(__hs._M_ht); }
-
- template<class _Val, class _HF, class _EqK, class _Al>
- friend bool
- operator==(const hash_set<_Val, _HF, _EqK, _Al>&,
- const hash_set<_Val, _HF, _EqK, _Al>&);
-
- iterator
- begin() const
- { return _M_ht.begin(); }
-
- iterator
- end() const
- { return _M_ht.end(); }
-
- public:
- pair<iterator, bool>
- insert(const value_type& __obj)
- {
- pair<typename _Ht::iterator, bool> __p = _M_ht.insert_unique(__obj);
- return pair<iterator,bool>(__p.first, __p.second);
- }
-
- template<class _InputIterator>
- void
- insert(_InputIterator __f, _InputIterator __l)
- { _M_ht.insert_unique(__f, __l); }
-
- pair<iterator, bool>
- insert_noresize(const value_type& __obj)
- {
- pair<typename _Ht::iterator, bool> __p
- = _M_ht.insert_unique_noresize(__obj);
- return pair<iterator, bool>(__p.first, __p.second);
- }
-
- iterator
- find(const key_type& __key) const
- { return _M_ht.find(__key); }
-
- size_type
- count(const key_type& __key) const
- { return _M_ht.count(__key); }
-
- pair<iterator, iterator>
- equal_range(const key_type& __key) const
- { return _M_ht.equal_range(__key); }
-
- size_type
- erase(const key_type& __key)
- {return _M_ht.erase(__key); }
-
- void
- erase(iterator __it)
- { _M_ht.erase(__it); }
-
- void
- erase(iterator __f, iterator __l)
- { _M_ht.erase(__f, __l); }
-
- void
- clear()
- { _M_ht.clear(); }
-
- public:
- void
- resize(size_type __hint)
- { _M_ht.resize(__hint); }
-
- size_type
- bucket_count() const
- { return _M_ht.bucket_count(); }
-
- size_type
- max_bucket_count() const
- { return _M_ht.max_bucket_count(); }
-
- size_type
- elems_in_bucket(size_type __n) const
- { return _M_ht.elems_in_bucket(__n); }
- };
-
- template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
- inline bool
- operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
- const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { return __hs1._M_ht == __hs2._M_ht; }
-
- template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
- inline bool
- operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
- const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { return !(__hs1 == __hs2); }
-
- template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
- inline void
- swap(hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
- hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { __hs1.swap(__hs2); }
-
-
- /**
- * This is an SGI extension.
- * @ingroup SGIextensions
- * @doctodo
- */
- template<class _Value,
- class _HashFcn = hash<_Value>,
- class _EqualKey = equal_to<_Value>,
- class _Alloc = allocator<_Value> >
- class hash_multiset
- {
- // concept requirements
- __glibcxx_class_requires(_Value, _SGIAssignableConcept)
- __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
- __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
-
- private:
- typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
- _EqualKey, _Alloc> _Ht;
- _Ht _M_ht;
-
- public:
- typedef typename _Ht::key_type key_type;
- typedef typename _Ht::value_type value_type;
- typedef typename _Ht::hasher hasher;
- typedef typename _Ht::key_equal key_equal;
-
- typedef typename _Ht::size_type size_type;
- typedef typename _Ht::difference_type difference_type;
- typedef typename _Alloc::pointer pointer;
- typedef typename _Alloc::const_pointer const_pointer;
- typedef typename _Alloc::reference reference;
- typedef typename _Alloc::const_reference const_reference;
-
- typedef typename _Ht::const_iterator iterator;
- typedef typename _Ht::const_iterator const_iterator;
-
- typedef typename _Ht::allocator_type allocator_type;
-
- hasher
- hash_funct() const
- { return _M_ht.hash_funct(); }
-
- key_equal
- key_eq() const
- { return _M_ht.key_eq(); }
-
- allocator_type
- get_allocator() const
- { return _M_ht.get_allocator(); }
-
- public:
- hash_multiset()
- : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-
- explicit
- hash_multiset(size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-
- hash_multiset(size_type __n, const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-
- hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a) {}
-
- template<class _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l)
- : _M_ht(100, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
- : _M_ht(__n, hasher(), key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf)
- : _M_ht(__n, __hf, key_equal(), allocator_type())
- { _M_ht.insert_equal(__f, __l); }
-
- template<class _InputIterator>
- hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
- const hasher& __hf, const key_equal& __eql,
- const allocator_type& __a = allocator_type())
- : _M_ht(__n, __hf, __eql, __a)
- { _M_ht.insert_equal(__f, __l); }
-
- public:
- size_type
- size() const
- { return _M_ht.size(); }
-
- size_type
- max_size() const
- { return _M_ht.max_size(); }
-
- bool
- empty() const
- { return _M_ht.empty(); }
-
- void
- swap(hash_multiset& hs)
- { _M_ht.swap(hs._M_ht); }
-
- template<class _Val, class _HF, class _EqK, class _Al>
- friend bool
- operator==(const hash_multiset<_Val, _HF, _EqK, _Al>&,
- const hash_multiset<_Val, _HF, _EqK, _Al>&);
-
- iterator
- begin() const
- { return _M_ht.begin(); }
-
- iterator
- end() const
- { return _M_ht.end(); }
-
- public:
- iterator
- insert(const value_type& __obj)
- { return _M_ht.insert_equal(__obj); }
-
- template<class _InputIterator>
- void
- insert(_InputIterator __f, _InputIterator __l)
- { _M_ht.insert_equal(__f,__l); }
-
- iterator
- insert_noresize(const value_type& __obj)
- { return _M_ht.insert_equal_noresize(__obj); }
-
- iterator
- find(const key_type& __key) const
- { return _M_ht.find(__key); }
-
- size_type
- count(const key_type& __key) const
- { return _M_ht.count(__key); }
-
- pair<iterator, iterator>
- equal_range(const key_type& __key) const
- { return _M_ht.equal_range(__key); }
-
- size_type
- erase(const key_type& __key)
- { return _M_ht.erase(__key); }
-
- void
- erase(iterator __it)
- { _M_ht.erase(__it); }
-
- void
- erase(iterator __f, iterator __l)
- { _M_ht.erase(__f, __l); }
-
- void
- clear()
- { _M_ht.clear(); }
-
- public:
- void
- resize(size_type __hint)
- { _M_ht.resize(__hint); }
-
- size_type
- bucket_count() const
- { return _M_ht.bucket_count(); }
-
- size_type
- max_bucket_count() const
- { return _M_ht.max_bucket_count(); }
-
- size_type
- elems_in_bucket(size_type __n) const
- { return _M_ht.elems_in_bucket(__n); }
- };
-
- template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
- inline bool
- operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
- const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { return __hs1._M_ht == __hs2._M_ht; }
-
- template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
- inline bool
- operator!=(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
- const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { return !(__hs1 == __hs2); }
-
- template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
- inline void
- swap(hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
- hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
- { __hs1.swap(__hs2); }
-
-_GLIBCXX_END_NESTED_NAMESPACE
-
-#ifdef _GLIBCXX_DEBUG
-# include <debug/hash_set>
-#endif
-
-_GLIBCXX_BEGIN_NAMESPACE(std)
-
- // Specialization of insert_iterator so that it will work for hash_set
- // and hash_multiset.
- template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
- class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn,
- _EqualKey, _Alloc> >
- {
- protected:
- typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>
- _Container;
- _Container* container;
-
- public:
- typedef _Container container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- insert_iterator(_Container& __x)
- : container(&__x) {}
-
- insert_iterator(_Container& __x, typename _Container::iterator)
- : container(&__x) {}
-
- insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value)
- {
- container->insert(__value);
- return *this;
- }
-
- insert_iterator<_Container>&
- operator*()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++(int)
- { return *this; }
- };
-
- template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
- class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn,
- _EqualKey, _Alloc> >
- {
- protected:
- typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>
- _Container;
- _Container* container;
- typename _Container::iterator iter;
-
- public:
- typedef _Container container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- insert_iterator(_Container& __x)
- : container(&__x) {}
-
- insert_iterator(_Container& __x, typename _Container::iterator)
- : container(&__x) {}
-
- insert_iterator<_Container>&
- operator=(const typename _Container::value_type& __value)
- {
- container->insert(__value);
- return *this;
- }
-
- insert_iterator<_Container>&
- operator*()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++()
- { return *this; }
-
- insert_iterator<_Container>&
- operator++(int) { return *this; }
- };
-
-_GLIBCXX_END_NAMESPACE
-
-#endif
diff --git a/libstdc++-v3/include/ext/hashtable.h b/libstdc++-v3/include/ext/hashtable.h
deleted file mode 100644
index 233806fb745..00000000000
--- a/libstdc++-v3/include/ext/hashtable.h
+++ /dev/null
@@ -1,1130 +0,0 @@
-// Hashtable implementation used by containers -*- C++ -*-
-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
-// Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file ext/hashtable.h
- * This file is a GNU extension to the Standard C++ Library (possibly
- * containing extensions from the HP/SGI STL subset).
- */
-
-#ifndef _HASHTABLE_H
-#define _HASHTABLE_H 1
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set, hash_map, hash_multiset, and hash_multimap.
-
-#include <vector>
-#include <iterator>
-#include <bits/stl_algo.h>
-#include <bits/stl_function.h>
-#include <ext/hash_fun.h>
-
-_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-
- using std::size_t;
- using std::ptrdiff_t;
- using std::forward_iterator_tag;
- using std::input_iterator_tag;
- using std::_Construct;
- using std::_Destroy;
- using std::distance;
- using std::vector;
- using std::pair;
- using std::__iterator_category;
-
- template<class _Val>
- struct _Hashtable_node
- {
- _Hashtable_node* _M_next;
- _Val _M_val;
- };
-
- template<class _Val, class _Key, class _HashFcn, class _ExtractKey,
- class _EqualKey, class _Alloc = std::allocator<_Val> >
- class hashtable;
-
- template<class _Val, class _Key, class _HashFcn,
- class _ExtractKey, class _EqualKey, class _Alloc>
- struct _Hashtable_iterator;
-
- template<class _Val, class _Key, class _HashFcn,
- class _ExtractKey, class _EqualKey, class _Alloc>
- struct _Hashtable_const_iterator;
-
- template<class _Val, class _Key, class _HashFcn,
- class _ExtractKey, class _EqualKey, class _Alloc>
- struct _Hashtable_iterator
- {
- typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
- _Hashtable;
- typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
- _ExtractKey, _EqualKey, _Alloc>
- iterator;
- typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
- _ExtractKey, _EqualKey, _Alloc>
- const_iterator;
- typedef _Hashtable_node<_Val> _Node;
- typedef forward_iterator_tag iterator_category;
- typedef _Val value_type;
- typedef ptrdiff_t difference_type;
- typedef size_t size_type;
- typedef _Val& reference;
- typedef _Val* pointer;
-
- _Node* _M_cur;
- _Hashtable* _M_ht;
-
- _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
- : _M_cur(__n), _M_ht(__tab) { }
-
- _Hashtable_iterator() { }
-
- reference
- operator*() const
- { return _M_cur->_M_val; }
-
- pointer
- operator->() const
- { return &(operator*()); }
-
- iterator&
- operator++();
-
- iterator
- operator++(int);
-
- bool
- operator==(const iterator& __it) const
- { return _M_cur == __it._M_cur; }
-
- bool
- operator!=(const iterator& __it) const
- { return _M_cur != __it._M_cur; }
- };
-
- template<class _Val, class _Key, class _HashFcn,
- class _ExtractKey, class _EqualKey, class _Alloc>
- struct _Hashtable_const_iterator
- {
- typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
- _Hashtable;
- typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
- _ExtractKey,_EqualKey,_Alloc>
- iterator;
- typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
- _ExtractKey, _EqualKey, _Alloc>
- const_iterator;
- typedef _Hashtable_node<_Val> _Node;
-
- typedef forward_iterator_tag iterator_category;
- typedef _Val value_type;
- typedef ptrdiff_t difference_type;
- typedef size_t size_type;
- typedef const _Val& reference;
- typedef const _Val* pointer;
-
- const _Node* _M_cur;
- const _Hashtable* _M_ht;
-
- _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
- : _M_cur(__n), _M_ht(__tab) { }
-
- _Hashtable_const_iterator() { }
-
- _Hashtable_const_iterator(const iterator& __it)
- : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
-
- reference
- operator*() const
- { return _M_cur->_M_val; }
-
- pointer
- operator->() const
- { return &(operator*()); }
-
- const_iterator&
- operator++();
-
- const_iterator
- operator++(int);
-
- bool
- operator==(const const_iterator& __it) const
- { return _M_cur == __it._M_cur; }
-
- bool
- operator!=(const const_iterator& __it) const
- { return _M_cur != __it._M_cur; }
- };
-
- // Note: assumes long is at least 32 bits.
- enum { _S_num_primes = 28 };
-
- static const unsigned long __stl_prime_list[_S_num_primes] =
- {
- 53ul, 97ul, 193ul, 389ul, 769ul,
- 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
- 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
- 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
- 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
- 1610612741ul, 3221225473ul, 4294967291ul
- };
-
- inline unsigned long
- __stl_next_prime(unsigned long __n)
- {
- const unsigned long* __first = __stl_prime_list;
- const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
- const unsigned long* pos = std::lower_bound(__first, __last, __n);
- return pos == __last ? *(__last - 1) : *pos;
- }
-
- // Forward declaration of operator==.
- template<class _Val, class _Key, class _HF, class _Ex,
- class _Eq, class _All>
- class hashtable;
-
- template<class _Val, class _Key, class _HF, class _Ex,
- class _Eq, class _All>
- bool
- operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
- const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
-
- // Hashtables handle allocators a bit differently than other
- // containers do. If we're using standard-conforming allocators, then
- // a hashtable unconditionally has a member variable to hold its
- // allocator, even if it so happens that all instances of the
- // allocator type are identical. This is because, for hashtables,
- // this extra storage is negligible. Additionally, a base class
- // wouldn't serve any other purposes; it wouldn't, for example,
- // simplify the exception-handling code.
- template<class _Val, class _Key, class _HashFcn,
- class _ExtractKey, class _EqualKey, class _Alloc>
- class hashtable
- {
- public:
- typedef _Key key_type;
- typedef _Val value_type;
- typedef _HashFcn hasher;
- typedef _EqualKey key_equal;
-
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef value_type& reference;
- typedef const value_type& const_reference;
-
- hasher
- hash_funct() const
- { return _M_hash; }
-
- key_equal
- key_eq() const
- { return _M_equals; }
-
- private:
- typedef _Hashtable_node<_Val> _Node;
-
- public:
- typedef typename _Alloc::template rebind<value_type>::other allocator_type;
- allocator_type
- get_allocator() const
- { return _M_node_allocator; }
-
- private:
- typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
- typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
- typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
-
- _Node_Alloc _M_node_allocator;
-
- _Node*
- _M_get_node()
- { return _M_node_allocator.allocate(1); }
-
- void
- _M_put_node(_Node* __p)
- { _M_node_allocator.deallocate(__p, 1); }
-
- private:
- hasher _M_hash;
- key_equal _M_equals;
- _ExtractKey _M_get_key;
- _Vector_type _M_buckets;
- size_type _M_num_elements;
-
- public:
- typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
- _EqualKey, _Alloc>
- iterator;
- typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
- _EqualKey, _Alloc>
- const_iterator;
-
- friend struct
- _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
-
- friend struct
- _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
- _EqualKey, _Alloc>;
-
- public:
- hashtable(size_type __n, const _HashFcn& __hf,
- const _EqualKey& __eql, const _ExtractKey& __ext,
- const allocator_type& __a = allocator_type())
- : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
- _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
- { _M_initialize_buckets(__n); }
-
- hashtable(size_type __n, const _HashFcn& __hf,
- const _EqualKey& __eql,
- const allocator_type& __a = allocator_type())
- : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
- _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
- { _M_initialize_buckets(__n); }
-
- hashtable(const hashtable& __ht)
- : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
- _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
- _M_buckets(__ht.get_allocator()), _M_num_elements(0)
- { _M_copy_from(__ht); }
-
- hashtable&
- operator= (const hashtable& __ht)
- {
- if (&__ht != this)
- {
- clear();
- _M_hash = __ht._M_hash;
- _M_equals = __ht._M_equals;
- _M_get_key = __ht._M_get_key;
- _M_copy_from(__ht);
- }
- return *this;
- }
-
- ~hashtable()
- { clear(); }
-
- size_type
- size() const
- { return _M_num_elements; }
-
- size_type
- max_size() const
- { return size_type(-1); }
-
- bool
- empty() const
- { return size() == 0; }
-
- void
- swap(hashtable& __ht)
- {
- std::swap(_M_hash, __ht._M_hash);
- std::swap(_M_equals, __ht._M_equals);
- std::swap(_M_get_key, __ht._M_get_key);
- _M_buckets.swap(__ht._M_buckets);
- std::swap(_M_num_elements, __ht._M_num_elements);
- }
-
- iterator
- begin()
- {
- for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
- if (_M_buckets[__n])
- return iterator(_M_buckets[__n], this);
- return end();
- }
-
- iterator
- end()
- { return iterator(0, this); }
-
- const_iterator
- begin() const
- {
- for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
- if (_M_buckets[__n])
- return const_iterator(_M_buckets[__n], this);
- return end();
- }
-
- const_iterator
- end() const
- { return const_iterator(0, this); }
-
- template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
- class _Al>
- friend bool
- operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
- const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
-
- public:
- size_type
- bucket_count() const
- { return _M_buckets.size(); }
-
- size_type
- max_bucket_count() const
- { return __stl_prime_list[(int)_S_num_primes - 1]; }
-
- size_type
- elems_in_bucket(size_type __bucket) const
- {
- size_type __result = 0;
- for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
- __result += 1;
- return __result;
- }
-
- pair<iterator, bool>
- insert_unique(const value_type& __obj)
- {
- resize(_M_num_elements + 1);
- return insert_unique_noresize(__obj);
- }
-
- iterator
- insert_equal(const value_type& __obj)
- {
- resize(_M_num_elements + 1);
- return insert_equal_noresize(__obj);
- }
-
- pair<iterator, bool>
- insert_unique_noresize(const value_type& __obj);
-
- iterator
- insert_equal_noresize(const value_type& __obj);
-
- template<class _InputIterator>
- void
- insert_unique(_InputIterator __f, _InputIterator __l)
- { insert_unique(__f, __l, __iterator_category(__f)); }
-
- template<class _InputIterator>
- void
- insert_equal(_InputIterator __f, _InputIterator __l)
- { insert_equal(__f, __l, __iterator_category(__f)); }
-
- template<class _InputIterator>
- void
- insert_unique(_InputIterator __f, _InputIterator __l,
- input_iterator_tag)
- {
- for ( ; __f != __l; ++__f)
- insert_unique(*__f);
- }
-
- template<class _InputIterator>
- void
- insert_equal(_InputIterator __f, _InputIterator __l,
- input_iterator_tag)
- {
- for ( ; __f != __l; ++__f)
- insert_equal(*__f);
- }
-
- template<class _ForwardIterator>
- void
- insert_unique(_ForwardIterator __f, _ForwardIterator __l,
- forward_iterator_tag)
- {
- size_type __n = distance(__f, __l);
- resize(_M_num_elements + __n);
- for ( ; __n > 0; --__n, ++__f)
- insert_unique_noresize(*__f);
- }
-
- template<class _ForwardIterator>
- void
- insert_equal(_ForwardIterator __f, _ForwardIterator __l,
- forward_iterator_tag)
- {
- size_type __n = distance(__f, __l);
- resize(_M_num_elements + __n);
- for ( ; __n > 0; --__n, ++__f)
- insert_equal_noresize(*__f);
- }
-
- reference
- find_or_insert(const value_type& __obj);
-
- iterator
- find(const key_type& __key)
- {
- size_type __n = _M_bkt_num_key(__key);
- _Node* __first;
- for (__first = _M_buckets[__n];
- __first && !_M_equals(_M_get_key(__first->_M_val), __key);
- __first = __first->_M_next)
- { }
- return iterator(__first, this);
- }
-
- const_iterator
- find(const key_type& __key) const
- {
- size_type __n = _M_bkt_num_key(__key);
- const _Node* __first;
- for (__first = _M_buckets[__n];
- __first && !_M_equals(_M_get_key(__first->_M_val), __key);
- __first = __first->_M_next)
- { }
- return const_iterator(__first, this);
- }
-
- size_type
- count(const key_type& __key) const
- {
- const size_type __n = _M_bkt_num_key(__key);
- size_type __result = 0;
-
- for (const _Node* __cur = _M_buckets[__n]; __cur;
- __cur = __cur->_M_next)
- if (_M_equals(_M_get_key(__cur->_M_val), __key))
- ++__result;
- return __result;
- }
-
- pair<iterator, iterator>
- equal_range(const key_type& __key);
-
- pair<const_iterator, const_iterator>
- equal_range(const key_type& __key) const;
-
- size_type
- erase(const key_type& __key);
-
- void
- erase(const iterator& __it);
-
- void
- erase(iterator __first, iterator __last);
-
- void
- erase(const const_iterator& __it);
-
- void
- erase(const_iterator __first, const_iterator __last);
-
- void
- resize(size_type __num_elements_hint);
-
- void
- clear();
-
- private:
- size_type
- _M_next_size(size_type __n) const
- { return __stl_next_prime(__n); }
-
- void
- _M_initialize_buckets(size_type __n)
- {
- const size_type __n_buckets = _M_next_size(__n);
- _M_buckets.reserve(__n_buckets);
- _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
- _M_num_elements = 0;
- }
-
- size_type
- _M_bkt_num_key(const key_type& __key) const
- { return _M_bkt_num_key(__key, _M_buckets.size()); }
-
- size_type
- _M_bkt_num(const value_type& __obj) const
- { return _M_bkt_num_key(_M_get_key(__obj)); }
-
- size_type
- _M_bkt_num_key(const key_type& __key, size_t __n) const
- { return _M_hash(__key) % __n; }
-
- size_type
- _M_bkt_num(const value_type& __obj, size_t __n) const
- { return _M_bkt_num_key(_M_get_key(__obj), __n); }
-
- _Node*
- _M_new_node(const value_type& __obj)
- {
- _Node* __n = _M_get_node();
- __n->_M_next = 0;
- try
- {
- this->get_allocator().construct(&__n->_M_val, __obj);
- return __n;
- }
- catch(...)
- {
- _M_put_node(__n);
- __throw_exception_again;
- }
- }
-
- void
- _M_delete_node(_Node* __n)
- {
- this->get_allocator().destroy(&__n->_M_val);
- _M_put_node(__n);
- }
-
- void
- _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
-
- void
- _M_erase_bucket(const size_type __n, _Node* __last);
-
- void
- _M_copy_from(const hashtable& __ht);
- };
-
- template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
- class _All>
- _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
- _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
- operator++()
- {
- const _Node* __old = _M_cur;
- _M_cur = _M_cur->_M_next;
- if (!_M_cur)
- {
- size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
- while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
- _M_cur = _M_ht->_M_buckets[__bucket];
- }
- return *this;
- }
-
- template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
- class _All>
- inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
- _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
- operator++(int)
- {
- iterator __tmp = *this;
- ++*this;
- return __tmp;
- }
-
- template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
- class _All>
- _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
- _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
- operator++()
- {
- const _Node* __old = _M_cur;
- _M_cur = _M_cur->_M_next;
- if (!_M_cur)
- {
- size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
- while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
- _M_cur = _M_ht->_M_buckets[__bucket];
- }
- return *this;
- }
-
- template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
- class _All>
- inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
- _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
- operator++(int)
- {
- const_iterator __tmp = *this;
- ++*this;
- return __tmp;
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- bool
- operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
- const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
- {
- typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
-
- if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
- return false;
-
- for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
- {
- _Node* __cur1 = __ht1._M_buckets[__n];
- _Node* __cur2 = __ht2._M_buckets[__n];
- // Check same length of lists
- for (; __cur1 && __cur2;
- __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
- { }
- if (__cur1 || __cur2)
- return false;
- // Now check one's elements are in the other
- for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
- __cur1 = __cur1->_M_next)
- {
- bool _found__cur1 = false;
- for (__cur2 = __ht2._M_buckets[__n];
- __cur2; __cur2 = __cur2->_M_next)
- {
- if (__cur1->_M_val == __cur2->_M_val)
- {
- _found__cur1 = true;
- break;
- }
- }
- if (!_found__cur1)
- return false;
- }
- }
- return true;
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- inline bool
- operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
- const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
- { return !(__ht1 == __ht2); }
-
- template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
- class _All>
- inline void
- swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
- hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
- { __ht1.swap(__ht2); }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- insert_unique_noresize(const value_type& __obj)
- {
- const size_type __n = _M_bkt_num(__obj);
- _Node* __first = _M_buckets[__n];
-
- for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
- if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
- return pair<iterator, bool>(iterator(__cur, this), false);
-
- _Node* __tmp = _M_new_node(__obj);
- __tmp->_M_next = __first;
- _M_buckets[__n] = __tmp;
- ++_M_num_elements;
- return pair<iterator, bool>(iterator(__tmp, this), true);
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- insert_equal_noresize(const value_type& __obj)
- {
- const size_type __n = _M_bkt_num(__obj);
- _Node* __first = _M_buckets[__n];
-
- for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
- if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
- {
- _Node* __tmp = _M_new_node(__obj);
- __tmp->_M_next = __cur->_M_next;
- __cur->_M_next = __tmp;
- ++_M_num_elements;
- return iterator(__tmp, this);
- }
-
- _Node* __tmp = _M_new_node(__obj);
- __tmp->_M_next = __first;
- _M_buckets[__n] = __tmp;
- ++_M_num_elements;
- return iterator(__tmp, this);
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- find_or_insert(const value_type& __obj)
- {
- resize(_M_num_elements + 1);
-
- size_type __n = _M_bkt_num(__obj);
- _Node* __first = _M_buckets[__n];
-
- for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
- if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
- return __cur->_M_val;
-
- _Node* __tmp = _M_new_node(__obj);
- __tmp->_M_next = __first;
- _M_buckets[__n] = __tmp;
- ++_M_num_elements;
- return __tmp->_M_val;
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
- typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- equal_range(const key_type& __key)
- {
- typedef pair<iterator, iterator> _Pii;
- const size_type __n = _M_bkt_num_key(__key);
-
- for (_Node* __first = _M_buckets[__n]; __first;
- __first = __first->_M_next)
- if (_M_equals(_M_get_key(__first->_M_val), __key))
- {
- for (_Node* __cur = __first->_M_next; __cur;
- __cur = __cur->_M_next)
- if (!_M_equals(_M_get_key(__cur->_M_val), __key))
- return _Pii(iterator(__first, this), iterator(__cur, this));
- for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
- if (_M_buckets[__m])
- return _Pii(iterator(__first, this),
- iterator(_M_buckets[__m], this));
- return _Pii(iterator(__first, this), end());
- }
- return _Pii(end(), end());
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
- typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- equal_range(const key_type& __key) const
- {
- typedef pair<const_iterator, const_iterator> _Pii;
- const size_type __n = _M_bkt_num_key(__key);
-
- for (const _Node* __first = _M_buckets[__n]; __first;
- __first = __first->_M_next)
- {
- if (_M_equals(_M_get_key(__first->_M_val), __key))
- {
- for (const _Node* __cur = __first->_M_next; __cur;
- __cur = __cur->_M_next)
- if (!_M_equals(_M_get_key(__cur->_M_val), __key))
- return _Pii(const_iterator(__first, this),
- const_iterator(__cur, this));
- for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
- if (_M_buckets[__m])
- return _Pii(const_iterator(__first, this),
- const_iterator(_M_buckets[__m], this));
- return _Pii(const_iterator(__first, this), end());
- }
- }
- return _Pii(end(), end());
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- erase(const key_type& __key)
- {
- const size_type __n = _M_bkt_num_key(__key);
- _Node* __first = _M_buckets[__n];
- size_type __erased = 0;
-
- if (__first)
- {
- _Node* __cur = __first;
- _Node* __next = __cur->_M_next;
- while (__next)
- {
- if (_M_equals(_M_get_key(__next->_M_val), __key))
- {
- __cur->_M_next = __next->_M_next;
- _M_delete_node(__next);
- __next = __cur->_M_next;
- ++__erased;
- --_M_num_elements;
- }
- else
- {
- __cur = __next;
- __next = __cur->_M_next;
- }
- }
- if (_M_equals(_M_get_key(__first->_M_val), __key))
- {
- _M_buckets[__n] = __first->_M_next;
- _M_delete_node(__first);
- ++__erased;
- --_M_num_elements;
- }
- }
- return __erased;
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- erase(const iterator& __it)
- {
- _Node* __p = __it._M_cur;
- if (__p)
- {
- const size_type __n = _M_bkt_num(__p->_M_val);
- _Node* __cur = _M_buckets[__n];
-
- if (__cur == __p)
- {
- _M_buckets[__n] = __cur->_M_next;
- _M_delete_node(__cur);
- --_M_num_elements;
- }
- else
- {
- _Node* __next = __cur->_M_next;
- while (__next)
- {
- if (__next == __p)
- {
- __cur->_M_next = __next->_M_next;
- _M_delete_node(__next);
- --_M_num_elements;
- break;
- }
- else
- {
- __cur = __next;
- __next = __cur->_M_next;
- }
- }
- }
- }
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- erase(iterator __first, iterator __last)
- {
- size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
- : _M_buckets.size();
-
- size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
- : _M_buckets.size();
-
- if (__first._M_cur == __last._M_cur)
- return;
- else if (__f_bucket == __l_bucket)
- _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
- else
- {
- _M_erase_bucket(__f_bucket, __first._M_cur, 0);
- for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
- _M_erase_bucket(__n, 0);
- if (__l_bucket != _M_buckets.size())
- _M_erase_bucket(__l_bucket, __last._M_cur);
- }
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- inline void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- erase(const_iterator __first, const_iterator __last)
- {
- erase(iterator(const_cast<_Node*>(__first._M_cur),
- const_cast<hashtable*>(__first._M_ht)),
- iterator(const_cast<_Node*>(__last._M_cur),
- const_cast<hashtable*>(__last._M_ht)));
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- inline void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- erase(const const_iterator& __it)
- { erase(iterator(const_cast<_Node*>(__it._M_cur),
- const_cast<hashtable*>(__it._M_ht))); }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- resize(size_type __num_elements_hint)
- {
- const size_type __old_n = _M_buckets.size();
- if (__num_elements_hint > __old_n)
- {
- const size_type __n = _M_next_size(__num_elements_hint);
- if (__n > __old_n)
- {
- _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
- try
- {
- for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
- {
- _Node* __first = _M_buckets[__bucket];
- while (__first)
- {
- size_type __new_bucket = _M_bkt_num(__first->_M_val,
- __n);
- _M_buckets[__bucket] = __first->_M_next;
- __first->_M_next = __tmp[__new_bucket];
- __tmp[__new_bucket] = __first;
- __first = _M_buckets[__bucket];
- }
- }
- _M_buckets.swap(__tmp);
- }
- catch(...)
- {
- for (size_type __bucket = 0; __bucket < __tmp.size();
- ++__bucket)
- {
- while (__tmp[__bucket])
- {
- _Node* __next = __tmp[__bucket]->_M_next;
- _M_delete_node(__tmp[__bucket]);
- __tmp[__bucket] = __next;
- }
- }
- __throw_exception_again;
- }
- }
- }
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
- {
- _Node* __cur = _M_buckets[__n];
- if (__cur == __first)
- _M_erase_bucket(__n, __last);
- else
- {
- _Node* __next;
- for (__next = __cur->_M_next;
- __next != __first;
- __cur = __next, __next = __cur->_M_next)
- ;
- while (__next != __last)
- {
- __cur->_M_next = __next->_M_next;
- _M_delete_node(__next);
- __next = __cur->_M_next;
- --_M_num_elements;
- }
- }
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- _M_erase_bucket(const size_type __n, _Node* __last)
- {
- _Node* __cur = _M_buckets[__n];
- while (__cur != __last)
- {
- _Node* __next = __cur->_M_next;
- _M_delete_node(__cur);
- __cur = __next;
- _M_buckets[__n] = __cur;
- --_M_num_elements;
- }
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- clear()
- {
- for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
- {
- _Node* __cur = _M_buckets[__i];
- while (__cur != 0)
- {
- _Node* __next = __cur->_M_next;
- _M_delete_node(__cur);
- __cur = __next;
- }
- _M_buckets[__i] = 0;
- }
- _M_num_elements = 0;
- }
-
- template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
- void
- hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
- _M_copy_from(const hashtable& __ht)
- {
- _M_buckets.clear();
- _M_buckets.reserve(__ht._M_buckets.size());
- _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
- try
- {
- for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
- const _Node* __cur = __ht._M_buckets[__i];
- if (__cur)
- {
- _Node* __local_copy = _M_new_node(__cur->_M_val);
- _M_buckets[__i] = __local_copy;
-
- for (_Node* __next = __cur->_M_next;
- __next;
- __cur = __next, __next = __cur->_M_next)
- {
- __local_copy->_M_next = _M_new_node(__next->_M_val);
- __local_copy = __local_copy->_M_next;
- }
- }
- }
- _M_num_elements = __ht._M_num_elements;
- }
- catch(...)
- {
- clear();
- __throw_exception_again;
- }
- }
-
-_GLIBCXX_END_NAMESPACE
-
-#endif
diff --git a/libstdc++-v3/include/ext/malloc_allocator.h b/libstdc++-v3/include/ext/malloc_allocator.h
index 531045b6325..a5d31684e8e 100644
--- a/libstdc++-v3/include/ext/malloc_allocator.h
+++ b/libstdc++-v3/include/ext/malloc_allocator.h
@@ -1,6 +1,6 @@
// Allocator that wraps "C" malloc -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007
+// 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
@@ -38,6 +38,7 @@
#include <cstdlib>
#include <new>
#include <bits/functexcept.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -109,7 +110,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) value_type(__val); }
+ { ::new((void *)__p) value_type(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index 6083cdb9c25..84aed823a68 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -1,6 +1,6 @@
// MT-optimized allocator -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -38,6 +38,7 @@
#include <cstdlib>
#include <bits/functexcept.h>
#include <ext/atomicity.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -85,7 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// In order to avoid fragmenting and minimize the number of
// new() calls we always request new memory using this
// value. Based on previous discussions on the libstdc++
- // mailing list we have choosen the value below.
+ // mailing list we have chosen the value below.
// See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html
// NB: At least one order of magnitude > _M_max_bytes.
size_t _M_chunk_size;
@@ -593,7 +594,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) _Tp(__val); }
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }
diff --git a/libstdc++-v3/include/ext/new_allocator.h b/libstdc++-v3/include/ext/new_allocator.h
index 938783c4b1e..14f1de91b0f 100644
--- a/libstdc++-v3/include/ext/new_allocator.h
+++ b/libstdc++-v3/include/ext/new_allocator.h
@@ -36,6 +36,7 @@
#include <new>
#include <bits/functexcept.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -104,7 +105,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) _Tp(__val); }
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }
diff --git a/libstdc++-v3/include/ext/numeric_traits.h b/libstdc++-v3/include/ext/numeric_traits.h
index 109e37efc9e..29265e749f4 100644
--- a/libstdc++-v3/include/ext/numeric_traits.h
+++ b/libstdc++-v3/include/ext/numeric_traits.h
@@ -107,6 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
static const int __max_digits10 = __glibcxx_max_digits10(_Value);
// See above comment...
+ static const bool __is_signed = true;
static const int __digits10 = __glibcxx_digits10(_Value);
static const int __max_exponent10 = __glibcxx_max_exponent10(_Value);
};
@@ -115,6 +116,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
const int __numeric_traits_floating<_Value>::__max_digits10;
template<typename _Value>
+ const bool __numeric_traits_floating<_Value>::__is_signed;
+
+ template<typename _Value>
const int __numeric_traits_floating<_Value>::__digits10;
template<typename _Value>
diff --git a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
index 271cc7600f1..e2ac37c11cc 100644
--- a/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/assoc_container.hpp
@@ -53,7 +53,7 @@
#include <ext/pb_ds/detail/container_base_dispatch.hpp>
#include <ext/pb_ds/detail/basic_tree_policy/traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
#define PB_DS_BASE_C_DEC \
detail::container_base_dispatch<Key, Mapped, Tag, Policy_Tl, Allocator>::type
@@ -495,7 +495,7 @@ namespace pb_ds
template<typename Key, typename Mapped, typename Cmp_Fn = std::less<Key>,
typename Tag = rb_tree_tag,
template<typename Const_Node_Iterator, typename Node_Iterator, typename Cmp_Fn_, typename Allocator_>
- class Node_Update = pb_ds::null_tree_node_update,
+ class Node_Update = __gnu_pbds::null_tree_node_update,
typename Allocator = std::allocator<char> >
class tree : public PB_DS_BASE_C_DEC
{
@@ -684,6 +684,6 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
index d396d7d5da5..7c136057cba 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_TREE_LIKE_POLICY_BASE_HPP
#define PB_DS_TREE_LIKE_POLICY_BASE_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -174,6 +174,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TREE_LIKE_POLICY_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
index 23991987097..88d1ba699f8 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/types_traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -68,6 +68,6 @@ namespace pb_ds
struct null_node_metadata
{ };
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
index c574bc09aa4..3a0b57d8404 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
@@ -52,7 +52,7 @@
#include <ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp>
#include <ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -81,7 +81,7 @@ namespace pb_ds
struct trie_traits;
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#include <ext/pb_ds/detail/rb_tree_map_/traits.hpp>
#include <ext/pb_ds/detail/splay_tree_/traits.hpp>
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/basic_types.hpp b/libstdc++-v3/include/ext/pb_ds/detail/basic_types.hpp
index 69288ce5ec5..01d43e50f8b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/basic_types.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/basic_types.hpp
@@ -52,7 +52,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
#include <ext/pb_ds/detail/type_utils.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -211,7 +211,7 @@ namespace pb_ds
typedef integral_constant<int, is_simple<Key>::value> indicator;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
index fa0ff416b42..6e46cedbbe9 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/exception.hpp>
#include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
#include <ext/pb_ds/detail/types_traits.hpp>
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/cond_dealtor.hpp>
#include <ext/pb_ds/detail/type_utils.hpp>
@@ -60,7 +60,7 @@
#include <functional>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -95,8 +95,8 @@ namespace pb_ds
false>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, eq_by_less<Key, Cmp_Fn>, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, Cmp_Fn>, \
typename Allocator::template rebind<Key>::other::const_reference>
#endif
@@ -132,7 +132,7 @@ namespace pb_ds
class Allocator>
class PB_DS_CLASS_NAME :
#ifdef _GLIBCXX_DEBUG
- public PB_DS_MAP_DEBUG_BASE_C_DEC,
+ public PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
#ifdef PB_DS_TREE_TRACE
public PB_DS_TREE_TRACE_BASE_C_DEC,
@@ -162,7 +162,7 @@ namespace pb_ds
typedef cond_dealtor< node, Allocator> cond_dealtor_t;
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
public:
@@ -489,7 +489,7 @@ namespace pb_ds
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#ifdef PB_DS_TREE_TRACE
#undef PB_DS_TREE_TRACE_BASE_C_DEC
@@ -500,4 +500,4 @@ namespace pb_ds
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
index a6ee9200127..295a57aee17 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
@@ -81,7 +81,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(other),
+ debug_base(other),
#endif
#ifdef PB_DS_TREE_TRACE
PB_DS_TREE_TRACE_BASE_C_DEC(other),
@@ -105,7 +105,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
}
catch(...)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
s_node_allocator.deallocate(m_p_head, 1);
__throw_exception_again;
}
@@ -130,7 +130,7 @@ void
PB_DS_CLASS_C_DEC::
value_swap(PB_DS_CLASS_C_DEC& other)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
std::swap(m_p_head, other.m_p_head);
std::swap(m_size, other.m_size);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
index eff970a3695..d0a0752dee0 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
@@ -251,7 +251,7 @@ void
PB_DS_CLASS_C_DEC::
assert_consistent_with_debug_base() const
{
- map_debug_base::check_size(m_size);
+ debug_base::check_size(m_size);
assert_consistent_with_debug_base(m_p_head->m_p_parent);
}
@@ -262,7 +262,7 @@ assert_consistent_with_debug_base(const node_pointer p_nd) const
{
if (p_nd == NULL)
return;
- map_debug_base::check_key_exists(PB_DS_V2F(p_nd->m_value));
+ debug_base::check_key_exists(PB_DS_V2F(p_nd->m_value));
assert_consistent_with_debug_base(p_nd->m_p_left);
assert_consistent_with_debug_base(p_nd->m_p_right);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
index 2006a82b680..21c116f2fd0 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
@@ -102,7 +102,7 @@ clear()
initialize();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
_GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
index 91fe41ab9d2..0f50f2262b7 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
@@ -82,13 +82,13 @@ insert_leaf(const_reference r_value)
{
_GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(
PB_DS_V2F(r_value)));
return (std::make_pair(p_pot, false));
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
PB_DS_V2F(r_value)));
p_nd = p_pot->m_p_left;
@@ -146,7 +146,7 @@ insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd)
update_to_top(p_new_nd, (node_update* )this);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
PB_DS_V2F(r_value)));
return (iterator(p_new_nd));
@@ -167,7 +167,7 @@ insert_imp_empty(const_reference r_value)
p_new_node->m_p_left = p_new_node->m_p_right = NULL;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
PB_DS_V2F(r_value)));
update_to_top(m_p_head->m_p_parent, (node_update* )this);
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp
index ce1cd22b011..1df092378d1 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -237,7 +237,7 @@ namespace pb_ds
#undef PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp
index 275177e10e0..a6e79b33a9e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -382,6 +382,6 @@ namespace pb_ds
#undef PB_DS_TREE_ODIR_IT_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
index 2bad9795b2b..303813ccd2f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
@@ -102,7 +102,7 @@ clear()
initialize();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
_GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
index 2c8e77dedf5..672560467d6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
@@ -71,7 +71,7 @@ join_prep(PB_DS_CLASS_C_DEC& other)
value_swap(other);
m_size += other.m_size;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
return true;
}
@@ -123,7 +123,7 @@ split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
return false;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
return true;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
index 4c57608cc56..dc7c232563b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp>
#include <ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -156,7 +156,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_tree_node_update<
+ __gnu_pbds::null_tree_node_update<
const_node_iterator,
node_iterator,
Cmp_Fn,
@@ -242,7 +242,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_tree_node_update<
+ __gnu_pbds::null_tree_node_update<
const_node_iterator,
node_iterator,
Cmp_Fn,
@@ -251,6 +251,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
index b32479b99d1..cf10195d28c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
@@ -67,7 +67,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -81,7 +81,7 @@ namespace pb_ds
entry_cmp<Value_Type, Cmp_Fn, is_simple<Value_Type>::value, Allocator>::type
#define PB_DS_RESIZE_POLICY_DEC \
- pb_ds::detail::resize_policy<typename Allocator::size_type>
+ __gnu_pbds::detail::resize_policy<typename Allocator::size_type>
/**
* class description = "Base class for some types of h3ap$">
@@ -358,6 +358,6 @@ namespace pb_ds
#undef PB_DS_RESIZE_POLICY_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp
index 12b96e766ba..79f36c009df 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -153,6 +153,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp
index 3a50cd6c4b1..b2b6760a50a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -145,6 +145,6 @@ namespace pb_ds
entry_pointer m_p_e;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp
index c98dae75cab..afde1cd4601 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
#define PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -94,6 +94,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp
index 25102f2c1ad..408e8559ec9 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
#define PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -94,6 +94,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
index c6021a99804..17aeb64f1f1 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
@@ -49,7 +49,7 @@
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -254,6 +254,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
index c6f361d936c..8f1826ef164 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
@@ -55,7 +55,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -119,4 +119,4 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
index 09af8cfffd7..acd1c3cf4dc 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
@@ -59,7 +59,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp>
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -235,6 +235,6 @@ namespace pb_ds
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
index 67c35a63b69..3a772fa1df8 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
@@ -53,14 +53,14 @@
#include <ext/pb_ds/exception.hpp>
#include <ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
#ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#endif
#ifdef PB_DS_HT_MAP_TRACE_
#include <iostream>
#endif
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -92,8 +92,8 @@ namespace pb_ds
types_traits<Key, Mapped, Allocator, Store_Hash>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
#endif
#ifdef PB_DS_DATA_TRUE_INDICATOR
@@ -117,7 +117,7 @@ namespace pb_ds
typename Resize_Policy >
class PB_DS_CLASS_NAME:
#ifdef _GLIBCXX_DEBUG
- protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
public PB_DS_HASH_EQ_FN_C_DEC,
public Resize_Policy,
@@ -154,7 +154,7 @@ namespace pb_ds
typedef Resize_Policy resize_base;
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
#define PB_DS_GEN_POS std::pair<entry_pointer, typename Allocator::size_type>
@@ -390,11 +390,11 @@ namespace pb_ds
resize_base::notify_insert_search_end();
if (p_e != NULL)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return (p_e->m_value.second);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return insert_new_imp(value_type(r_key, mapped_type()), pos)->second;
}
@@ -415,11 +415,11 @@ namespace pb_ds
resize_base::notify_insert_search_end();
if (p_e != NULL)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return p_e->m_value.second;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return insert_new_imp(value_type(r_key, mapped_type()),
pos_hash_pair)->second;
}
@@ -445,7 +445,7 @@ namespace pb_ds
m_entries[pos] = p_e;
resize_base::notify_inserted(++m_num_used_e);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return &p_e->m_value;
}
@@ -464,7 +464,7 @@ namespace pb_ds
p_e->m_p_next = m_entries[r_pos_hash_pair.first];
m_entries[r_pos_hash_pair.first] = p_e;
resize_base::notify_inserted(++m_num_used_e);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return &p_e->m_value;
}
@@ -485,9 +485,9 @@ namespace pb_ds
#ifdef _GLIBCXX_DEBUG
if (p_e == NULL)
- map_debug_base::check_key_does_not_exist(r_key);
+ debug_base::check_key_does_not_exist(r_key);
else
- map_debug_base::check_key_exists(r_key);
+ debug_base::check_key_exists(r_key);
#endif
return &p_e->m_value;
}
@@ -511,9 +511,9 @@ namespace pb_ds
#ifdef _GLIBCXX_DEBUG
if (p_e == NULL)
- map_debug_base::check_key_does_not_exist(r_key);
+ debug_base::check_key_does_not_exist(r_key);
else
- map_debug_base::check_key_exists(r_key);
+ debug_base::check_key_exists(r_key);
#endif
return &p_e->m_value;
}
@@ -609,7 +609,7 @@ namespace pb_ds
enum
{
store_hash_ok = !Store_Hash
- || !is_same<Hash_Fn, pb_ds::null_hash_fn>::value
+ || !is_same<Hash_Fn, __gnu_pbds::null_hash_fn>::value
};
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
@@ -632,11 +632,11 @@ namespace pb_ds
#undef PB_DS_HASH_EQ_FN_C_DEC
#undef PB_DS_RANGED_HASH_FN_C_DEC
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#undef PB_DS_CLASS_NAME
#undef PB_DS_V2F
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
index 9223da5d6f9..3a4c422839d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
@@ -68,7 +68,7 @@ cmp_with_other(const Other_Map_Type& other) const
const_mapped_pointer p_mapped_value =
const_cast<PB_DS_CLASS_C_DEC& >(*this).
- find_key_pointer(r_key, traits_base::m_store_hash_indicator);
+ find_key_pointer(r_key, traits_base::m_store_extra_indicator);
if (p_mapped_value == NULL)
return false;
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp
index bf5e0bd4710..a4bcc4b81fd 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp
@@ -44,7 +44,7 @@
* Contains a conditional key destructor, used for exception handling.
*/
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -119,5 +119,5 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
index 7da4d8a1e79..e767bbec51f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
@@ -130,7 +130,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(other),
+ debug_base(other),
#endif
PB_DS_HASH_EQ_FN_C_DEC(other),
resize_base(other), ranged_hash_fn_base(other),
@@ -171,7 +171,7 @@ swap(PB_DS_CLASS_C_DEC& other)
hash_eq_fn_base::swap(other);
resize_base::swap(other);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other));
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
_GLIBCXX_DEBUG_ONLY(assert_valid());
_GLIBCXX_DEBUG_ONLY(other.assert_valid());
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
index f2b41b37bca..2d4859a6106 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -57,5 +57,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
// At this point no exceptions can be thrown.
p->m_p_next = m_entries[pos];
m_entries[pos] = p;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
index 08a0b7b3fce..52759dec20d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -58,5 +58,5 @@ constructor_insert_new_imp(const_reference r_val, size_type pos, true_type)
p->m_hash = ranged_hash_fn_base::operator()((const_key_reference)(PB_DS_V2F(p->m_value))).second;
m_entries[pos] = p;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
index 61cbfa90d2e..fdf7dbcad35 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
@@ -51,7 +51,7 @@ void
PB_DS_CLASS_C_DEC::
assert_valid() const
{
- map_debug_base::check_size(m_num_used_e);
+ debug_base::check_size(m_num_used_e);
assert_entry_pointer_array_valid(m_entries);
}
@@ -67,7 +67,7 @@ assert_entry_pointer_array_valid(const entry_pointer_array a_p_entries) const
while (p_e != NULL)
{
++iterated_num_used_e;
- assert_entry_pointer_valid(p_e, traits_base::m_store_hash_indicator);
+ assert_entry_pointer_valid(p_e, traits_base::m_store_extra_indicator);
p_e = p_e->m_p_next;
}
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
index d179a3dc941..4e01b6ae152 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
@@ -50,6 +50,6 @@ PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
assert_entry_pointer_valid(const entry_pointer p, false_type) const
-{ map_debug_base::check_key_exists(PB_DS_V2F(p->m_value)); }
+{ debug_base::check_key_exists(PB_DS_V2F(p->m_value)); }
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
index 48dc555abea..2e7e2ff3482 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
@@ -51,7 +51,7 @@ void
PB_DS_CLASS_C_DEC::
assert_entry_pointer_valid(const entry_pointer p_e, true_type) const
{
- map_debug_base::check_key_exists(PB_DS_V2F(p_e->m_value));
+ debug_base::check_key_exists(PB_DS_V2F(p_e->m_value));
comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value));
_GLIBCXX_DEBUG_ASSERT(p_e->m_hash == pos_hash_pair.second);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
index 265a7052780..95c3fed7a45 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
@@ -49,7 +49,7 @@ inline void
PB_DS_CLASS_C_DEC::
erase_entry_pointer(entry_pointer& r_p_e)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(r_p_e->m_value)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(r_p_e->m_value)));
entry_pointer p_e = r_p_e;
r_p_e = r_p_e->m_p_next;
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
index 13a3a6d4d34..28553b1a8dd 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
@@ -65,7 +65,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
if (p_e == NULL)
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return false;
}
@@ -73,7 +73,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base:: check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_exists(r_key);)
erase_entry_pointer(m_entries[pos]);
do_resize_if_needed_no_throw();
_GLIBCXX_DEBUG_ONLY(assert_valid();)
@@ -86,7 +86,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
if (p_next_e == NULL)
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return false;
}
@@ -94,7 +94,7 @@ erase_in_pos_imp(const_key_reference r_key, size_type pos)
if (hash_eq_fn_base::operator()(PB_DS_V2F(p_next_e->m_value), r_key))
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
erase_entry_pointer(p_e->m_p_next);
do_resize_if_needed_no_throw();
_GLIBCXX_DEBUG_ONLY(assert_valid();)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
index 7eb821e0fe6..a6eff1fc4e6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
@@ -56,7 +56,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
if (p_e == NULL)
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base:: check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_does_not_exist(r_key);)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return false;
}
@@ -65,7 +65,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
r_key, r_pos_hash_pair.second))
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
erase_entry_pointer(m_entries[r_pos_hash_pair.first]);
do_resize_if_needed_no_throw();
_GLIBCXX_DEBUG_ONLY(assert_valid();)
@@ -78,7 +78,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
if (p_next_e == NULL)
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return false;
}
@@ -88,7 +88,7 @@ erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
r_pos_hash_pair.second))
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
erase_entry_pointer(p_e->m_p_next);
do_resize_if_needed_no_throw();
_GLIBCXX_DEBUG_ONLY(assert_valid();)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
index 519072a2e9e..ee85ed1dcdc 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
@@ -85,7 +85,7 @@ cmp_with_other(const Other_Map_Type& other) const
const_key_reference r_key =(const_key_reference)PB_DS_V2F(*it);
const_mapped_pointer p_mapped_value =
const_cast<PB_DS_CLASS_C_DEC& >(*this).
- find_key_pointer(r_key, traits_base::m_store_hash_indicator);
+ find_key_pointer(r_key, traits_base::m_store_extra_indicator);
if (p_mapped_value == NULL)
return false;
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
index fd158f921ad..516a409e0a8 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
@@ -66,11 +66,11 @@ insert_imp(const_reference r_val, false_type)
resize_base::notify_insert_search_end();
if (p_e != NULL)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return std::make_pair(&p_e->m_value, false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return std::make_pair(insert_new_imp(r_val, pos), true);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
index 128e11fdc0f..d7d0a61155b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
@@ -67,11 +67,11 @@ insert_imp(const_reference r_val, true_type)
resize_base::notify_insert_search_end();
if (p_e != NULL)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
return std::make_pair(&p_e->m_value, false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cond_dealtor.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cond_dealtor.hpp
index 3cf9ea91fa3..eba0f39307c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/cond_dealtor.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/cond_dealtor.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_COND_DEALTOR_HPP
#define PB_DS_COND_DEALTOR_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
@@ -125,7 +125,7 @@ namespace pb_ds
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_COND_DEALTOR_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp b/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
index 37db003fd75..cbc51433318 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/container_base_dispatch.hpp
@@ -105,7 +105,7 @@
#include <ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
#undef PB_DS_DATA_FALSE_INDICATOR
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -333,6 +333,6 @@ namespace detail
at3t::value, at4t, at5t, at2t> type;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
new file mode 100644
index 00000000000..086a50fc5fd
--- /dev/null
+++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp
@@ -0,0 +1,365 @@
+// -*- C++ -*-
+
+// Copyright (C) 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, 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.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_map_base.hpp
+ * Contains a debug-mode base for all maps.
+ */
+
+#ifndef PB_DS_DEBUG_MAP_BASE_HPP
+#define PB_DS_DEBUG_MAP_BASE_HPP
+
+#ifdef _GLIBCXX_DEBUG
+
+#include <list>
+#include <utility>
+#include <cstdlib>
+#include <ext/throw_allocator.h>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ // Need std::pair ostream extractor.
+ template<typename _CharT, typename _Traits, typename _Tp1, typename _Tp2>
+ inline std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __out,
+ const std::pair<_Tp1, _Tp2>& p)
+ { return (__out << '(' << p.first << ',' << p.second << ')'); }
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, typename Const_Key_Reference>
+
+#define PB_DS_CLASS_C_DEC \
+ debug_map_base<Key, Eq_Fn, Const_Key_Reference>
+
+ template<typename Key, class Eq_Fn, typename Const_Key_Reference>
+ class debug_map_base
+ {
+ private:
+ typedef typename std::allocator< Key> key_allocator;
+
+ typedef typename key_allocator::size_type size_type;
+
+ typedef Const_Key_Reference const_key_reference;
+
+ protected:
+ debug_map_base();
+
+ debug_map_base(const PB_DS_CLASS_C_DEC& other);
+
+ ~debug_map_base();
+
+ inline void
+ insert_new(const_key_reference r_key);
+
+ inline void
+ erase_existing(const_key_reference r_key);
+
+ void
+ clear();
+
+ inline void
+ check_key_exists(const_key_reference r_key) const;
+
+ inline void
+ check_key_does_not_exist(const_key_reference r_key) const;
+
+ inline void
+ check_size(size_type size) const;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ template<typename Cmp_Fn>
+ void
+ split(const_key_reference, Cmp_Fn, PB_DS_CLASS_C_DEC&);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+ private:
+ typedef std::list< Key> key_set;
+ typedef typename key_set::iterator key_set_iterator;
+ typedef typename key_set::const_iterator const_key_set_iterator;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+ const_key_set_iterator
+ find(const_key_reference r_key) const;
+
+ key_set_iterator
+ find(const_key_reference r_key);
+
+ key_set m_key_set;
+ Eq_Fn m_eq;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ debug_map_base()
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ debug_map_base(const PB_DS_CLASS_C_DEC& other) : m_key_set(other.m_key_set)
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ~debug_map_base()
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ insert_new(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ if (find(r_key) != m_key_set.end())
+ {
+ std::cerr << "insert_new" << r_key << std::endl;
+ std::abort();
+ }
+
+ try
+ {
+ m_key_set.push_back(r_key);
+ }
+ catch(...)
+ {
+ std::cerr << "insert_new" << r_key << std::endl;
+ std::abort();
+ }
+ alloc.set_throw_prob(orig_throw_prob);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ erase_existing(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ key_set_iterator it = find(r_key);
+ if (it == m_key_set.end())
+ {
+ std::cerr << "erase_existing" << r_key << std::endl;
+ std::abort();
+ }
+ m_key_set.erase(it);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ clear()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_key_set.clear();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_key_exists(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (find(r_key) == m_key_set.end())
+ {
+ std::cerr << "check_key_exists" << r_key << std::endl;
+ std::abort();
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_key_does_not_exist(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (find(r_key) != m_key_set.end())
+ {
+ using std::cerr;
+ using std::endl;
+ cerr << "check_key_does_not_exist" << r_key << endl;
+ std::abort();
+ }
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_size(size_type size) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const size_type key_set_size = m_key_set.size();
+ if (size != key_set_size)
+ {
+ std::cerr << "check_size " << size
+ << " " << key_set_size << std::endl;
+ std::abort();
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_key_set.swap(other.m_key_set);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_key_set_iterator
+ PB_DS_CLASS_C_DEC::
+ find(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ typedef const_key_set_iterator iterator_type;
+ for (iterator_type it = m_key_set.begin(); it != m_key_set.end(); ++it)
+ if (m_eq(*it, r_key))
+ return it;
+ return m_key_set.end();
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::key_set_iterator
+ PB_DS_CLASS_C_DEC::
+ find(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ key_set_iterator it = m_key_set.begin();
+ while (it != m_key_set.end())
+ {
+ if (m_eq(*it, r_key))
+ return it;
+ ++it;
+ }
+ return it;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ assert_valid() const
+ {
+ const_key_set_iterator prime_it = m_key_set.begin();
+ while (prime_it != m_key_set.end())
+ {
+ const_key_set_iterator sec_it = prime_it;
+ ++sec_it;
+ while (sec_it != m_key_set.end())
+ {
+ _GLIBCXX_DEBUG_ASSERT(!m_eq(*sec_it, *prime_it));
+ _GLIBCXX_DEBUG_ASSERT(!m_eq(*prime_it, *sec_it));
+ ++sec_it;
+ }
+ ++prime_it;
+ }
+ }
+#endif
+
+ PB_DS_CLASS_T_DEC
+ template<typename Cmp_Fn>
+ void
+ PB_DS_CLASS_C_DEC::
+ split(const_key_reference r_key, Cmp_Fn cmp_fn, PB_DS_CLASS_C_DEC& other)
+ {
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ other.clear();
+ key_set_iterator it = m_key_set.begin();
+ while (it != m_key_set.end())
+ if (cmp_fn(r_key, * it))
+ {
+ other.insert_new(*it);
+ it = m_key_set.erase(it);
+ }
+ else
+ ++it;
+ alloc.set_throw_prob(orig_throw_prob);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ join(PB_DS_CLASS_C_DEC& other)
+ {
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ key_set_iterator it = other.m_key_set.begin();
+ while (it != other.m_key_set.end())
+ {
+ insert_new(*it);
+ it = other.m_key_set.erase(it);
+ }
+ _GLIBCXX_DEBUG_ASSERT(other.m_key_set.empty());
+ alloc.set_throw_prob(orig_throw_prob);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp b/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp
index 6e37b544039..467b01e1eca 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp
@@ -53,7 +53,7 @@
#include <assert.h>
#include <ext/pb_ds/detail/types_traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -69,6 +69,6 @@ namespace pb_ds
}
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_EQ_BY_LESS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp b/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp
index 8218ea47ab5..706ee5ea24b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp
@@ -51,7 +51,7 @@
#include <utility>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -180,6 +180,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
index 30b8d3e7b73..6f4844cf00d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
@@ -140,7 +140,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(other),
+ debug_base(other),
#endif
hash_eq_fn_base(other),
resize_base(other),
@@ -187,7 +187,7 @@ swap(PB_DS_CLASS_C_DEC& other)
ranged_probe_fn_base::swap(other);
hash_eq_fn_base::swap(other);
resize_base::swap(other);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other));
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
_GLIBCXX_DEBUG_ONLY(assert_valid());
_GLIBCXX_DEBUG_ONLY(other.assert_valid());
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
index df4af951f1a..30df973b1eb 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -55,5 +55,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
entry* const p_e = m_entries + pos;
new (&p_e->m_value) mapped_value_type(r_val);
p_e->m_stat = valid_entry_status;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(p_e->m_value.first);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
index 0e17e36efc1..df8797ae7e7 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -56,5 +56,5 @@ constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
new (&p_e->m_value) mapped_value_type(r_val);
p_e->m_hash = ranged_probe_fn_base::operator()(PB_DS_V2F(r_val)).second;
p_e->m_stat = valid_entry_status;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(p_e->m_value.first);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
index fd8ca9abe12..15bae0d9d6c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
@@ -51,7 +51,7 @@ void
PB_DS_CLASS_C_DEC::
assert_valid() const
{
- map_debug_base::check_size(m_num_used_e);
+ debug_base::check_size(m_num_used_e);
assert_entry_array_valid(m_entries, traits_base::m_store_extra_indicator);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
index 9d3d428e3af..1a8e525e724 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
@@ -63,7 +63,7 @@ assert_entry_array_valid(const entry_array a_entries, false_type) const
case valid_entry_status:
{
const_key_reference r_key = PB_DS_V2F(p_e->m_value);
- map_debug_base::check_key_exists(r_key);
+ debug_base::check_key_exists(r_key);
++iterated_num_used_e;
break;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
index a4d8b6c651a..7acfe4c0f81 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
@@ -64,7 +64,7 @@ assert_entry_array_valid(const entry_array a_entries, true_type) const
case valid_entry_status:
{
const_key_reference r_key = PB_DS_V2F(p_e->m_value);
- map_debug_base::check_key_exists(r_key);
+ debug_base::check_key_exists(r_key);
const comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key);
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
index 9da85072586..3d194cf365f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
@@ -50,7 +50,7 @@ PB_DS_CLASS_C_DEC::
erase_entry(entry_pointer p_e)
{
_GLIBCXX_DEBUG_ASSERT(p_e->m_stat = valid_entry_status);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(p_e->m_value));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_e->m_value));)
p_e->m_value.~value_type();
p_e->m_stat = erased_entry_status;
_GLIBCXX_DEBUG_ASSERT(m_num_used_e > 0);
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
index 51acec9d4b3..a8959278b63 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
@@ -64,7 +64,7 @@ erase_imp(const_key_reference r_key, false_type)
case empty_entry_status:
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
r_key));
return false;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
index 71c498b4698..cf479082a7a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
@@ -63,7 +63,7 @@ erase_imp(const_key_reference r_key, true_type)
case empty_entry_status:
{
resize_base::notify_erase_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
r_key));
return false;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
index 24a9f1bf3ba..8da31e70e8a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
@@ -54,11 +54,11 @@
#include <iostream>
#endif
#ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#endif
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -89,8 +89,8 @@ namespace pb_ds
types_traits<Key, Mapped, Allocator, Store_Hash>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
#endif
#ifdef PB_DS_DATA_TRUE_INDICATOR
@@ -114,7 +114,7 @@ namespace pb_ds
typename Resize_Policy>
class PB_DS_CLASS_NAME :
#ifdef _GLIBCXX_DEBUG
- protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
public PB_DS_HASH_EQ_FN_C_DEC,
public Resize_Policy,
@@ -152,7 +152,7 @@ namespace pb_ds
typedef PB_DS_RANGED_PROBE_FN_C_DEC ranged_probe_fn_base;
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
typedef PB_DS_HASH_EQ_FN_C_DEC hash_eq_fn_base;
@@ -410,7 +410,7 @@ namespace pb_ds
p_e->m_stat = valid_entry_status;
resize_base::notify_inserted(++m_num_used_e);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return &p_e->m_value;
@@ -436,7 +436,7 @@ namespace pb_ds
resize_base::notify_inserted(++m_num_used_e);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return &p_e->m_value;
@@ -455,7 +455,7 @@ namespace pb_ds
if (p_e->m_stat != valid_entry_status)
return insert_new_imp(value_type(key, mapped_type()), pos)->second;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
return p_e->m_value.second;
}
@@ -471,7 +471,7 @@ namespace pb_ds
return insert_new_imp(value_type(key, mapped_type()),
pos_hash_pair)->second;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key));
return (m_entries + pos_hash_pair.first)->m_value.second;
}
#endif
@@ -494,7 +494,7 @@ namespace pb_ds
case empty_entry_status:
{
resize_base::notify_find_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
return NULL;
}
@@ -503,7 +503,7 @@ namespace pb_ds
if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), key))
{
resize_base::notify_find_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
return pointer(&p_e->m_value);
}
@@ -517,7 +517,7 @@ namespace pb_ds
resize_base::notify_find_search_collision();
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
resize_base::notify_find_search_end();
return NULL;
}
@@ -542,7 +542,7 @@ namespace pb_ds
case empty_entry_status:
{
resize_base::notify_find_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
return NULL;
}
@@ -553,7 +553,7 @@ namespace pb_ds
key, pos_hash_pair.second))
{
resize_base::notify_find_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
return pointer(&p_e->m_value);
}
break;
@@ -566,7 +566,7 @@ namespace pb_ds
resize_base::notify_find_search_collision();
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
resize_base::notify_find_search_end();
return NULL;
}
@@ -651,7 +651,7 @@ namespace pb_ds
enum
{
store_hash_ok = !Store_Hash
- || !is_same<Hash_Fn, pb_ds::null_hash_fn>::value
+ || !is_same<Hash_Fn, __gnu_pbds::null_hash_fn>::value
};
PB_DS_STATIC_ASSERT(sth, store_hash_ok);
@@ -673,11 +673,11 @@ namespace pb_ds
#undef PB_DS_HASH_EQ_FN_C_DEC
#undef PB_DS_RANGED_PROBE_FN_C_DEC
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#undef PB_DS_CLASS_NAME
#undef PB_DS_V2F
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
index 98d597051bd..b5b00bd08ba 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
@@ -68,7 +68,7 @@ find_ins_pos(const_key_reference r_key, false_type)
case empty_entry_status:
{
resize_base::notify_insert_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return (ins_pos == m_num_e) ? pos : ins_pos;
}
break;
@@ -80,7 +80,7 @@ find_ins_pos(const_key_reference r_key, false_type)
if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
{
resize_base::notify_insert_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return pos;
}
break;
@@ -107,11 +107,11 @@ insert_imp(const_reference r_val, false_type)
if (m_entries[pos].m_stat == valid_entry_status)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return std::make_pair(&(m_entries + pos)->m_value, false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return std::make_pair(insert_new_imp(r_val, pos), true);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
index b6445fae2e6..407fcd2591f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
@@ -70,7 +70,7 @@ find_ins_pos(const_key_reference r_key, true_type)
case empty_entry_status:
{
resize_base::notify_insert_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return ((ins_pos == m_num_e) ?
std::make_pair(pos, pos_hash_pair.second) :
@@ -86,7 +86,7 @@ find_ins_pos(const_key_reference r_key, true_type)
r_key, pos_hash_pair.second))
{
resize_base::notify_insert_search_end();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return std::make_pair(pos, pos_hash_pair.second);
}
break;
@@ -114,11 +114,11 @@ insert_imp(const_reference r_val, true_type)
entry_pointer p_e =& m_entries[pos_hash_pair.first];
if (p_e->m_stat == valid_entry_status)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return std::make_pair(&p_e->m_value, false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp
index f4bf7c6e472..cc67e92a062 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp
@@ -52,7 +52,7 @@
#include <ext/pb_ds/linear_probe_fn.hpp>
#include <ext/pb_ds/quadratic_probe_fn.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -66,15 +66,15 @@ namespace pb_ds
typedef
typename __conditional_type<
is_same<
- pb_ds::direct_mask_range_hashing<size_t>,
+ __gnu_pbds::direct_mask_range_hashing<size_t>,
Comb_Probe_Fn>::value,
- pb_ds::linear_probe_fn<size_type>,
- pb_ds::quadratic_probe_fn<size_type> >::__type
+ __gnu_pbds::linear_probe_fn<size_type>,
+ __gnu_pbds::quadratic_probe_fn<size_type> >::__type
type;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp
index 4aa1894bade..60d5c39991b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_MASK_BASED_RANGE_HASHING_HPP
#define PB_DS_MASK_BASED_RANGE_HASHING_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -108,6 +108,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp
index 2d5e8d6ef55..ea04f5f6dcc 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_MOD_BASED_RANGE_HASHING_HPP
#define PB_DS_MOD_BASED_RANGE_HASHING_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
@@ -109,6 +109,6 @@ namespace pb_ds
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_MOD_BASED_RANGE_HASHING_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp
index e72a47ef825..4deb23b16ff 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp
@@ -49,7 +49,7 @@
#include <functional>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -60,6 +60,6 @@ namespace pb_ds
~probe_fn_base() { }
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp
index 179e59358fc..b54f92d89ef 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp
@@ -52,7 +52,7 @@
#include <utility>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -360,6 +360,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp
index b665dbf36f8..c094026a7d5 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp
@@ -52,7 +52,7 @@
#include <utility>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -327,7 +327,7 @@ namespace pb_ds
{ comb_probe_fn_base::swap(other); }
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp
index cff9bb808dd..1d0a685143e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -163,6 +163,6 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp
index ea45b624ac1..c6ca2f0c72b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -155,6 +155,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
index e06358d2f22..196ae3010ca 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
@@ -62,7 +62,7 @@
#endif
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -350,6 +350,6 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp
index e3460add5ee..2239683d67c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -124,6 +124,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NODE_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp
index 1716fd1aa64..290745e533d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -58,6 +58,6 @@ namespace pb_ds
{ };
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
index a311a79757d..a3d96ec2f28 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
@@ -89,7 +89,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(),
+ debug_base(),
#endif
m_p_l(NULL)
{
@@ -119,7 +119,7 @@ swap(PB_DS_CLASS_C_DEC& other)
{
_GLIBCXX_DEBUG_ONLY(assert_valid();)
_GLIBCXX_DEBUG_ONLY(other.assert_valid();)
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
std::swap(m_p_l, other.m_p_l);
_GLIBCXX_DEBUG_ONLY(assert_valid();)
_GLIBCXX_DEBUG_ONLY(other.assert_valid();)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
index 1427f83749b..0ccfc97d136 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
@@ -54,10 +54,10 @@ assert_valid() const
size_type calc_size = 0;
for (const_iterator it = begin(); it != end(); ++it)
{
- map_debug_base::check_key_exists(PB_DS_V2F(*it));
+ debug_base::check_key_exists(PB_DS_V2F(*it));
++calc_size;
}
- map_debug_base::check_size(calc_size);
+ debug_base::check_size(calc_size);
}
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp
index 7d711a21d71..e2085a91b41 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_LU_MAP_ENTRY_METADATA_BASE_HPP
#define PB_DS_LU_MAP_ENTRY_METADATA_BASE_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -61,6 +61,6 @@ namespace pb_ds
struct lu_map_entry_metadata_base<null_lu_metadata>
{ };
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
index 85ac02d3012..d4ee2a18163 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
@@ -134,7 +134,7 @@ void
PB_DS_CLASS_C_DEC::
actual_erase_entry(entry_pointer p_l)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::erase_existing(PB_DS_V2F(p_l->m_value));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_l->m_value));)
p_l->~entry();
s_entry_allocator.deallocate(p_l, 1);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
index 37c173de1e4..8c792b02290 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
@@ -54,7 +54,7 @@ find_imp(const_key_reference r_key) const
if (s_eq_fn(r_key, PB_DS_V2F(m_p_l->m_value)))
{
apply_update(m_p_l, s_metadata_type_indicator);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
return m_p_l;
}
@@ -77,7 +77,7 @@ find_imp(const_key_reference r_key) const
p_l = p_next;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return NULL;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
index af60c07b507..c494c2614d4 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
@@ -56,11 +56,11 @@ insert(const_reference r_val)
if (p_l != NULL)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val));)
return std::make_pair(point_iterator(&p_l->m_value), false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val));)
p_l = allocate_new_entry(r_val, traits_base::m_no_throw_copies_indicator);
p_l->m_p_next = m_p_l;
@@ -80,7 +80,7 @@ allocate_new_entry(const_reference r_val, false_type)
value_type(r_val);
cond.set_no_action();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
init_entry_metadata(p_l, s_metadata_type_indicator);
return p_l;
}
@@ -92,7 +92,7 @@ allocate_new_entry(const_reference r_val, true_type)
{
entry_pointer p_l = s_entry_allocator.allocate(1);
new (&p_l->m_value) value_type(r_val);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
init_entry_metadata(p_l, s_metadata_type_indicator);
return p_l;
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
index e99dc735ab4..267beccceaf 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
@@ -52,14 +52,14 @@
#include <ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp>
#include <ext/pb_ds/exception.hpp>
#ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#endif
#ifdef PB_DS_LU_MAP_TRACE_
#include <iostream>
#endif
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -82,8 +82,8 @@ namespace pb_ds
types_traits<Key, Mapped, Allocator, false>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, Eq_Fn, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, \
typename Allocator::template rebind<Key>::other::const_reference>
#endif
@@ -108,7 +108,7 @@ namespace pb_ds
class Update_Policy>
class PB_DS_CLASS_NAME :
#ifdef _GLIBCXX_DEBUG
- protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
public PB_DS_TYPES_TRAITS_C_DEC
{
@@ -148,7 +148,7 @@ namespace pb_ds
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
typedef cond_dealtor<entry, Allocator> cond_dealtor_t;
@@ -355,11 +355,11 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#undef PB_DS_CLASS_NAME
#undef PB_DS_V2F
#undef PB_DS_EP2VP
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
index e02c6fbfe49..bbb539c0b50 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
@@ -44,7 +44,7 @@
* Contains implementation of a lu counter policy's metadata.
*/
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -89,4 +89,4 @@ namespace pb_ds
}
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp
deleted file mode 100644
index 95c164ace00..00000000000
--- a/libstdc++-v3/include/ext/pb_ds/detail/map_debug_base.hpp
+++ /dev/null
@@ -1,357 +0,0 @@
-// -*- C++ -*-
-
-// Copyright (C) 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, 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.
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file map_debug_base.hpp
- * Contains a debug-mode base for all maps.
- */
-
-#ifndef PB_DS_MAP_DEBUG_BASE_HPP
-#define PB_DS_MAP_DEBUG_BASE_HPP
-
-#ifdef _GLIBCXX_DEBUG
-
-#include <list>
-#include <utility>
-#include <cstdlib>
-#include <ext/throw_allocator.h>
-#include <debug/debug.h>
-
-namespace pb_ds
-{
- namespace detail
- {
-
-#define PB_DS_CLASS_T_DEC \
- template<typename Key, class Eq_Fn, typename Const_Key_Reference>
-
-#define PB_DS_CLASS_C_DEC \
- map_debug_base<Key, Eq_Fn, Const_Key_Reference>
-
- template<typename Key, class Eq_Fn, typename Const_Key_Reference>
- class map_debug_base
- {
- private:
- typedef typename std::allocator< Key> key_allocator;
-
- typedef typename key_allocator::size_type size_type;
-
- typedef Const_Key_Reference const_key_reference;
-
- protected:
- map_debug_base();
-
- map_debug_base(const PB_DS_CLASS_C_DEC& other);
-
- ~map_debug_base();
-
- inline void
- insert_new(const_key_reference r_key);
-
- inline void
- erase_existing(const_key_reference r_key);
-
- void
- clear();
-
- inline void
- check_key_exists(const_key_reference r_key) const;
-
- inline void
- check_key_does_not_exist(const_key_reference r_key) const;
-
- inline void
- check_size(size_type size) const;
-
- void
- swap(PB_DS_CLASS_C_DEC& other);
-
- template<typename Cmp_Fn>
- void
- split(const_key_reference, Cmp_Fn, PB_DS_CLASS_C_DEC&);
-
- void
- join(PB_DS_CLASS_C_DEC& other);
-
- private:
- typedef std::list< Key> key_set;
- typedef typename key_set::iterator key_set_iterator;
- typedef typename key_set::const_iterator const_key_set_iterator;
-
-#ifdef _GLIBCXX_DEBUG
- void
- assert_valid() const;
-#endif
-
- const_key_set_iterator
- find(const_key_reference r_key) const;
-
- key_set_iterator
- find(const_key_reference r_key);
-
- key_set m_key_set;
- Eq_Fn m_eq;
- };
-
- PB_DS_CLASS_T_DEC
- PB_DS_CLASS_C_DEC::
- map_debug_base()
- { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
-
- PB_DS_CLASS_T_DEC
- PB_DS_CLASS_C_DEC::
- map_debug_base(const PB_DS_CLASS_C_DEC& other) : m_key_set(other.m_key_set)
- { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
-
- PB_DS_CLASS_T_DEC
- PB_DS_CLASS_C_DEC::
- ~map_debug_base()
- { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
-
- PB_DS_CLASS_T_DEC
- inline void
- PB_DS_CLASS_C_DEC::
- insert_new(const_key_reference r_key)
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- __gnu_cxx::throw_allocator<char> alloc;
- const double orig_throw_prob = alloc.get_throw_prob();
- alloc.set_throw_prob(0);
- if (find(r_key) != m_key_set.end())
- {
- std::cerr << "insert_new " << r_key << std::endl;
- std::abort();
- }
-
- try
- {
- m_key_set.push_back(r_key);
- }
- catch(...)
- {
- std::cerr << "insert_new 1" << r_key << std::endl;
- std::abort();
- }
- alloc.set_throw_prob(orig_throw_prob);
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- inline void
- PB_DS_CLASS_C_DEC::
- erase_existing(const_key_reference r_key)
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- key_set_iterator it = find(r_key);
- if (it == m_key_set.end())
- {
- std::cerr << "erase_existing " << r_key << std::endl;
- std::abort();
- }
- m_key_set.erase(it);
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- void
- PB_DS_CLASS_C_DEC::
- clear()
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- m_key_set.clear();
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- inline void
- PB_DS_CLASS_C_DEC::
- check_key_exists(const_key_reference r_key) const
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- if (find(r_key) == m_key_set.end())
- {
- std::cerr << "check_key_exists " << r_key << std::endl;
- std::abort();
- }
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- inline void
- PB_DS_CLASS_C_DEC::
- check_key_does_not_exist(const_key_reference r_key) const
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- if (find(r_key) != m_key_set.end())
- {
- std::cerr << "check_key_does_not_exist " << r_key << std::endl;
- std::abort();
- }
- }
-
- PB_DS_CLASS_T_DEC
- inline void
- PB_DS_CLASS_C_DEC::
- check_size(size_type size) const
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- const size_type key_set_size = m_key_set.size();
- if (size != key_set_size)
- {
- std::cerr << "check_size " << size
- << " " << key_set_size << std::endl;
- std::abort();
- }
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- void
- PB_DS_CLASS_C_DEC::
- swap(PB_DS_CLASS_C_DEC& other)
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- m_key_set.swap(other.m_key_set);
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
- PB_DS_CLASS_T_DEC
- typename PB_DS_CLASS_C_DEC::const_key_set_iterator
- PB_DS_CLASS_C_DEC::
- find(const_key_reference r_key) const
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- typedef const_key_set_iterator iterator_type;
- for (iterator_type it = m_key_set.begin(); it != m_key_set.end(); ++it)
- if (m_eq(*it, r_key))
- return it;
- return m_key_set.end();
- }
-
- PB_DS_CLASS_T_DEC
- typename PB_DS_CLASS_C_DEC::key_set_iterator
- PB_DS_CLASS_C_DEC::
- find(const_key_reference r_key)
- {
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- key_set_iterator it = m_key_set.begin();
- while (it != m_key_set.end())
- {
- if (m_eq(*it, r_key))
- return it;
- ++it;
- }
- return it;
- _GLIBCXX_DEBUG_ONLY(assert_valid();)
- }
-
-#ifdef _GLIBCXX_DEBUG
- PB_DS_CLASS_T_DEC
- void
- PB_DS_CLASS_C_DEC::
- assert_valid() const
- {
- const_key_set_iterator prime_it = m_key_set.begin();
- while (prime_it != m_key_set.end())
- {
- const_key_set_iterator sec_it = prime_it;
- ++sec_it;
- while (sec_it != m_key_set.end())
- {
- _GLIBCXX_DEBUG_ASSERT(!m_eq(*sec_it, *prime_it));
- _GLIBCXX_DEBUG_ASSERT(!m_eq(*prime_it, *sec_it));
- ++sec_it;
- }
- ++prime_it;
- }
- }
-#endif
-
- PB_DS_CLASS_T_DEC
- template<typename Cmp_Fn>
- void
- PB_DS_CLASS_C_DEC::
- split(const_key_reference r_key, Cmp_Fn cmp_fn, PB_DS_CLASS_C_DEC& other)
- {
- __gnu_cxx::throw_allocator<char> alloc;
- const double orig_throw_prob = alloc.get_throw_prob();
- alloc.set_throw_prob(0);
- other.clear();
- key_set_iterator it = m_key_set.begin();
- while (it != m_key_set.end())
- if (cmp_fn(r_key, * it))
- {
- other.insert_new(*it);
- it = m_key_set.erase(it);
- }
- else
- ++it;
- alloc.set_throw_prob(orig_throw_prob);
- }
-
- PB_DS_CLASS_T_DEC
- void
- PB_DS_CLASS_C_DEC::
- join(PB_DS_CLASS_C_DEC& other)
- {
- __gnu_cxx::throw_allocator<char> alloc;
- const double orig_throw_prob = alloc.get_throw_prob();
- alloc.set_throw_prob(0);
- key_set_iterator it = other.m_key_set.begin();
- while (it != other.m_key_set.end())
- {
- insert_new(*it);
- it = other.m_key_set.erase(it);
- }
- _GLIBCXX_DEBUG_ASSERT(other.m_key_set.empty());
- alloc.set_throw_prob(orig_throw_prob);
- }
-
-#undef PB_DS_CLASS_T_DEC
-#undef PB_DS_CLASS_C_DEC
-
-} // namespace detail
-} // namespace pb_ds
-
-#endif
-
-#endif
-
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
index 83a47250f83..0f50317b879 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
@@ -86,7 +86,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_OV_TREE_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(other),
+ debug_base(other),
#endif
#ifdef PB_DS_TREE_TRACE
PB_DS_TREE_TRACE_BASE_C_DEC(other),
@@ -166,7 +166,7 @@ copy_from_ordered_range(It first_it, It last_it)
const_iterator dbg_it = m_a_values;
while (dbg_it != m_end_it)
{
- map_debug_base::insert_new(PB_DS_V2F(*dbg_it));
+ debug_base::insert_new(PB_DS_V2F(*dbg_it));
dbg_it++;
}
PB_DS_CLASS_C_DEC::assert_valid();
@@ -219,7 +219,7 @@ copy_from_ordered_range(It first_it, It last_it, It other_first_it,
const_iterator dbg_it = m_a_values;
while (dbg_it != m_end_it)
{
- map_debug_base::insert_new(PB_DS_V2F(*dbg_it));
+ debug_base::insert_new(PB_DS_V2F(*dbg_it));
dbg_it++;
}
PB_DS_CLASS_C_DEC::assert_valid();
@@ -246,7 +246,7 @@ value_swap(PB_DS_CLASS_C_DEC& other)
std::swap(m_a_metadata, other.m_a_metadata);
std::swap(m_size, other.m_size);
std::swap(m_end_it, other.m_end_it);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
}
PB_DS_CLASS_T_DEC
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
index b1a36555ce3..abbbc0f59bd 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
@@ -66,14 +66,14 @@ void
PB_DS_CLASS_C_DEC::
assert_iterators() const
{
- map_debug_base::check_size(m_size);
+ debug_base::check_size(m_size);
size_type iterated_num = 0;
const_iterator prev_it = end();
_GLIBCXX_DEBUG_ASSERT( m_end_it == m_a_values + m_size);
for (const_iterator it = begin(); it != end(); ++it)
{
++iterated_num;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(*it));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(*it));)
_GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
const_iterator upper_bound_it = upper_bound(PB_DS_V2F(*it));
--upper_bound_it;
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
index 936d5492e8d..18f9e1ce845 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
@@ -61,7 +61,7 @@ clear()
cond_dtor<size_type> cd(m_a_values, m_end_it, m_size);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
m_a_values = NULL;
m_size = 0;
m_end_it = m_a_values;
@@ -98,7 +98,7 @@ erase_if(Pred pred)
value_vector a_new_values = s_value_alloc.allocate(new_size);
iterator target_it = a_new_values;
cond_dtor<size_type> cd(a_new_values, target_it, new_size);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear());
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear());
for (source_it = begin(); source_it != m_end_it; ++source_it)
{
if (!pred(*source_it))
@@ -106,7 +106,7 @@ erase_if(Pred pred)
new (const_cast<void*>(static_cast<const void* >(target_it)))
value_type(*source_it);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(*source_it)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(*source_it)));
++target_it;
}
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp
index c63f6b0d910..5b9f9a873aa 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -293,6 +293,6 @@ namespace pb_ds
#undef PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
index f9e27144312..421a6bea617 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
#include <ext/pb_ds/detail/types_traits.hpp>
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#include <ext/pb_ds/detail/type_utils.hpp>
#include <ext/pb_ds/exception.hpp>
#include <ext/pb_ds/detail/tree_trace_base.hpp>
@@ -60,7 +60,7 @@
#include <assert.h>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -89,8 +89,8 @@ namespace pb_ds
types_traits<Key, Mapped, Allocator, false>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, eq_by_less<Key, Cmp_Fn>, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, Cmp_Fn>, \
typename Allocator::template rebind<Key>::other::const_reference>
#endif
@@ -118,7 +118,7 @@ namespace pb_ds
class Node_And_It_Traits, class Allocator>
class PB_DS_OV_TREE_CLASS_NAME :
#ifdef _GLIBCXX_DEBUG
- protected PB_DS_MAP_DEBUG_BASE_C_DEC,
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
#ifdef PB_DS_TREE_TRACE
public PB_DS_TREE_TRACE_BASE_C_DEC,
@@ -139,7 +139,7 @@ namespace pb_ds
typedef Cmp_Fn cmp_fn_base;
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
typedef typename traits_base::pointer mapped_pointer_;
@@ -244,7 +244,7 @@ namespace pb_ds
point_iterator it = lower_bound(r_key);
if (it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return it->second;
}
@@ -267,7 +267,7 @@ namespace pb_ds
if (it != end()&& !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
{
_GLIBCXX_DEBUG_ONLY(assert_valid();)
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return std::make_pair(it, false);
}
@@ -301,11 +301,11 @@ namespace pb_ds
iterator pot_it = lower_bound(r_key);
if (pot_it != end()&& !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return ++pot_it;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return pot_it;
}
@@ -320,11 +320,11 @@ namespace pb_ds
iterator pot_it = lower_bound(r_key);
if (pot_it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return pot_it;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return end();
}
@@ -423,7 +423,7 @@ namespace pb_ds
typename Allocator::group_throw_prob_adjustor adjust(m_size);
#endif
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_value)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_value)));
value_vector a_values = s_value_alloc.allocate(m_size + 1);
@@ -461,7 +461,7 @@ namespace pb_ds
++m_size;
m_a_values = a_values;
m_end_it = m_a_values + m_size;
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_value)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_value)));
update(node_begin(), (node_update* )this);
_GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
return ret_it;
@@ -514,7 +514,7 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_OV_TREE_CLASS_NAME
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#ifdef PB_DS_TREE_TRACE
#undef PB_DS_TREE_TRACE_BASE_C_DEC
#endif
@@ -525,4 +525,4 @@ namespace pb_ds
#undef PB_DS_CONST_NODE_ITERATOR_NAME
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
index 3b6abcd6c77..9528c412510 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
@@ -83,7 +83,7 @@ split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
return;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
iterator it = upper_bound(r_key);
PB_DS_CLASS_C_DEC new_other(other, other);
new_other.copy_from_ordered_range(it, end());
@@ -91,7 +91,7 @@ split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
new_this.copy_from_ordered_range(begin(), it);
// No exceptions from this point.
- _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
other.update(other.node_begin(), (node_update* )(&other));
update(node_begin(), (node_update* )this);
other.value_swap(new_other);
@@ -135,7 +135,7 @@ join(PB_DS_CLASS_C_DEC& other)
begin(), end());
// No exceptions from this point.
- _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
value_swap(new_this);
other.clear();
_GLIBCXX_DEBUG_ONLY(assert_valid();)
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp
index 182c0c8d393..92ff70d7c61 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -113,7 +113,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_tree_node_update<
+ __gnu_pbds::null_tree_node_update<
const_node_iterator,
node_iterator,
Cmp_Fn,
@@ -174,7 +174,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_tree_node_update<
+ __gnu_pbds::null_tree_node_update<
const_node_iterator,
node_iterator,
Cmp_Fn,
@@ -183,7 +183,7 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
index 64754749796..6d3790653a4 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
@@ -57,7 +57,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -219,4 +219,4 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
index a5a96a5a389..efa2e6104e5 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
@@ -81,7 +81,7 @@ PB_DS_CLASS_T_DEC
PB_DS_CLASS_C_DEC::
PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
#ifdef _GLIBCXX_DEBUG
- map_debug_base(other),
+ debug_base(other),
#endif
synth_e_access_traits(other),
node_update(other),
@@ -130,7 +130,7 @@ void
PB_DS_CLASS_C_DEC::
value_swap(PB_DS_CLASS_C_DEC& other)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::swap(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
std::swap(m_p_head, other.m_p_head);
std::swap(m_size, other.m_size);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
index a2253a6a502..d0cef7a3a6e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
@@ -77,7 +77,7 @@ assert_iterators() const
for (const_iterator it = begin(); it != end(); ++it)
{
++calc_size;
- map_debug_base::check_key_exists(PB_DS_V2F(*it));
+ debug_base::check_key_exists(PB_DS_V2F(*it));
_GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
_GLIBCXX_DEBUG_ASSERT(--upper_bound(PB_DS_V2F(*it)) == it);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
index 0fba3a4e285..42bb032701d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
@@ -52,18 +52,18 @@ erase(const_key_reference r_key)
node_pointer p_nd = find_imp(r_key);
if (p_nd == NULL || p_nd->m_type == pat_trie_internal_node_type)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return false;
}
_GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_leaf_node_type);
if (!synth_e_access_traits::equal_keys(PB_DS_V2F(reinterpret_cast<leaf_pointer>(p_nd)->value()), r_key))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
return false;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
erase_leaf(static_cast<leaf_pointer>(p_nd));
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return true;
@@ -141,7 +141,7 @@ clear()
clear_imp(m_p_head->m_p_parent);
m_size = 0;
initialize();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
index d9b3c4a9418..7a925e6a02b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
@@ -54,17 +54,17 @@ find(const_key_reference r_key)
if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return end();
}
if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_nd)->value()), r_key))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return iterator(p_nd);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return end();
}
@@ -79,17 +79,17 @@ find(const_key_reference r_key) const
if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return end();
}
if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value()), r_key))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
return const_iterator(const_cast<node_pointer>(p_nd));
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
return end();
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/head.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/head.hpp
index e8bee527350..13c1b5ddf6e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/head.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/head.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/detail/pat_trie_/node_base.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -124,7 +124,7 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
index 4916ae34ff6..ff4dd601038 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
@@ -98,7 +98,7 @@ join_prep(PB_DS_CLASS_C_DEC& other, split_join_branch_bag& r_bag)
__throw_join_error();
rec_join_prep(m_p_head->m_p_parent, other.m_p_head->m_p_parent, r_bag);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::join(other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
return true;
}
@@ -387,12 +387,12 @@ insert(const_reference r_val)
if (p_lf != NULL && p_lf->m_type == pat_trie_leaf_node_type &&
synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_lf)->value()), PB_DS_V2F(r_val)))
{
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_exists(PB_DS_V2F(r_val)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val)));
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return std::make_pair(iterator(p_lf), false);
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::check_key_does_not_exist(PB_DS_V2F(r_val)));
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val)));
leaf_pointer p_new_lf = s_leaf_allocator.allocate(1);
cond_dealtor cond(p_new_lf);
@@ -407,7 +407,7 @@ insert(const_reference r_val)
cond.set_no_action_dtor();
++m_size;
update_min_max_for_inserted_leaf(p_new_lf);
- _GLIBCXX_DEBUG_ONLY(map_debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
_GLIBCXX_DEBUG_ONLY(assert_valid();)
return std::make_pair(point_iterator(p_new_lf), true);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
index 902c9b7ca53..67a612dd58a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
@@ -49,7 +49,7 @@
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -600,6 +600,6 @@ namespace pb_ds
#undef PB_DS_LEAF_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
index 08f3761deda..310d78950a4 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
@@ -49,7 +49,7 @@
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -172,6 +172,6 @@ namespace pb_ds
#undef PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_base.hpp
index 753e66b28a5..4c71d015396 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_base.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -129,6 +129,6 @@ namespace pb_ds
#undef PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp
index 9c8a40c4fdc..b5b273aaffd 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp
@@ -49,7 +49,7 @@
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -338,7 +338,7 @@ namespace pb_ds
#undef PB_DS_PAT_TRIE_NODE_ITERATOR_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp
index 5434ff9d408..427ae03dd1e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -86,7 +86,7 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_PAT_TRIE_NODE_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
index 18c1a79414e..00a00d34bce 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
@@ -67,11 +67,11 @@
#include <assert.h>
#include <list>
#ifdef _GLIBCXX_DEBUG
-#include <ext/pb_ds/detail/map_debug_base.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
#endif
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -94,8 +94,8 @@ namespace pb_ds
types_traits<Key, Mapped, Allocator, false>
#ifdef _GLIBCXX_DEBUG
-#define PB_DS_MAP_DEBUG_BASE_C_DEC \
- map_debug_base<Key, eq_by_less<Key, \
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, \
std::less<Key> >, typename Allocator::template rebind<Key>::other::const_reference>
#endif
@@ -120,7 +120,7 @@ namespace pb_ds
typename Allocator>
class PB_DS_CLASS_NAME :
#ifdef _GLIBCXX_DEBUG
- public PB_DS_MAP_DEBUG_BASE_C_DEC,
+ public PB_DS_DEBUG_MAP_BASE_C_DEC,
#endif
public Node_And_It_Traits::synth_e_access_traits,
public Node_And_It_Traits::node_update,
@@ -155,7 +155,7 @@ namespace pb_ds
#include <ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp>
#ifdef _GLIBCXX_DEBUG
- typedef PB_DS_MAP_DEBUG_BASE_C_DEC map_debug_base;
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
#endif
#include <ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp>
@@ -512,10 +512,10 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_NAME
#undef PB_DS_TYPES_TRAITS_C_DEC
-#undef PB_DS_MAP_DEBUG_BASE_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
#undef PB_DS_V2F
#undef PB_DS_EP2VP
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp
index 1a42dc562f2..8554f260dc6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp
@@ -49,7 +49,7 @@
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -484,7 +484,7 @@ namespace pb_ds
#undef PB_DS_ODIR_IT_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
index 63553ec92a4..a119a5e8f16 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
@@ -90,7 +90,7 @@ clear()
clear_imp(m_p_head->m_p_parent);
m_size = 0;
initialize();
- _GLIBCXX_DEBUG_ONLY(map_debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
_GLIBCXX_DEBUG_ONLY(assert_valid(true, true);)
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp
index 84e6fddc088..f979e32f572 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp
@@ -119,7 +119,7 @@ rotate_parent(node_pointer p_nd)
PB_DS_CLASS_T_DEC
inline void
PB_DS_CLASS_C_DEC::
-apply_update(node_pointer /*p_nd*/, pb_ds::null_node_update* /*p_update*/)
+apply_update(node_pointer /*p_nd*/, __gnu_pbds::null_node_update* /*p_update*/)
{ }
PB_DS_CLASS_T_DEC
@@ -151,6 +151,6 @@ update_to_top(node_pointer p_nd, Node_Update_* p_update)
PB_DS_CLASS_T_DEC
inline void
PB_DS_CLASS_C_DEC::
-update_to_top(node_pointer /*p_nd*/, pb_ds::null_node_update* /*p_update*/)
+update_to_top(node_pointer /*p_nd*/, __gnu_pbds::null_node_update* /*p_update*/)
{ }
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
index ed5d890f6f2..efe96498257 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
@@ -128,7 +128,7 @@ split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other, split_join_branc
r_bag.add_branch();
p_nd = p_nd->m_p_parent;
}
- _GLIBCXX_DEBUG_ONLY(map_debug_base::split(r_key,(synth_e_access_traits& )(*this), other);)
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(synth_e_access_traits& )(*this), other);)
return (p_ret_l);
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp
index 79cd72cba2b..46e8ffa9552 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -230,6 +230,6 @@ namespace pb_ds
#undef PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
index 59aa3098268..c29f814fe55 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/traits.hpp
@@ -55,7 +55,7 @@
#include <ext/pb_ds/detail/pat_trie_/node_iterators.hpp>
#include <ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -93,7 +93,7 @@ namespace pb_ds
typedef E_Access_Traits e_access_traits;
typedef
- pb_ds::detail::synth_e_access_traits<
+ __gnu_pbds::detail::synth_e_access_traits<
type_traits,
false,
e_access_traits>
@@ -208,7 +208,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_trie_node_update<
+ __gnu_pbds::null_trie_node_update<
const_node_iterator,
node_iterator,
E_Access_Traits,
@@ -254,7 +254,7 @@ namespace pb_ds
typedef E_Access_Traits e_access_traits;
typedef
- pb_ds::detail::synth_e_access_traits<
+ __gnu_pbds::detail::synth_e_access_traits<
type_traits,
true,
e_access_traits>
@@ -341,7 +341,7 @@ namespace pb_ds
node_update;
typedef
- pb_ds::null_trie_node_update<
+ __gnu_pbds::null_trie_node_update<
const_node_iterator,
const_node_iterator,
E_Access_Traits,
@@ -350,7 +350,7 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_PAT_TRIE_NODE_AND_IT_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp b/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
index 67a705213d5..576e8657091 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
@@ -53,7 +53,7 @@
#include <ext/pb_ds/detail/binary_heap_/binary_heap_.hpp>
#include <ext/pb_ds/detail/thin_heap_/thin_heap_.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -92,6 +92,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/node.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/node.hpp
index 164f965a551..9797516a504 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/node.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/node.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -139,6 +139,6 @@ namespace pb_ds
bool m_red;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
index d08b2db69ae..b5d50a92ae8 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
@@ -69,7 +69,7 @@
#include <assert.h>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -282,5 +282,5 @@ namespace pb_ds
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp
index 67570d84204..2f91669d752 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/rb_tree_map_/node.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -125,6 +125,6 @@ namespace pb_ds
{ };
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
index dc7869ca7a7..fc90ea7dea2 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_RC_HPP
#define PB_DS_RC_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -263,6 +263,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
index 42417ed82fe..5b4a3b4122f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
@@ -54,7 +54,7 @@
#include <ext/pb_ds/detail/rc_binomial_heap_/rc.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -201,4 +201,4 @@ namespace pb_ds
#undef PB_DS_RC_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
index 9c6737515cb..8be9245110a 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
@@ -175,7 +175,7 @@ notify_externally_resized(size_type new_size)
{
m_resize_needed = false;
size_type new_grow_size = size_type(m_load_max * new_size - 1);
- size_type new_shrink_size = size_type(m_load_min * new_size );
+ size_type new_shrink_size = size_type(m_load_min * new_size);
if (new_grow_size >= m_next_grow_size)
{
_GLIBCXX_DEBUG_ASSERT(new_shrink_size > m_next_shrink_size);
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp
index 436de797d6f..f69690bb21d 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_HASH_LOAD_CHECK_RESIZE_TRIGGER_SIZE_BASE_HPP
#define PB_DS_HASH_LOAD_CHECK_RESIZE_TRIGGER_SIZE_BASE_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -95,6 +95,6 @@ namespace pb_ds
set_size(size_type size) { }
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
index 3328c9158ac..97052cef03c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
@@ -44,6 +44,8 @@
* Contains a resize size policy implementation.
*/
+#pragma GCC system_header
+
namespace detail
{
enum
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp
index db07fbbc7e0..19e54a7ab5b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp
@@ -140,6 +140,6 @@ private:
do_resize(size_type new_size);
};
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/node.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/node.hpp
index d23e9317323..29519d598aa 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/node.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/node.hpp
@@ -47,7 +47,7 @@
#ifndef PB_DS_SPLAY_TREE_NODE_HPP
#define PB_DS_SPLAY_TREE_NODE_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -126,6 +126,6 @@ namespace pb_ds
bool m_special;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
index bf905255333..1642abb068f 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
@@ -93,7 +93,7 @@
#include <assert.h>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -300,5 +300,5 @@ namespace pb_ds
#undef PB_DS_EP2VP
#undef PB_DS_V2S
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/traits.hpp
index a758ef9ddba..0755963a36c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/splay_tree_/traits.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/splay_tree_/node.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -114,6 +114,6 @@ namespace pb_ds
{ };
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_SPLAY_TREE_NODE_AND_IT_TRAITS_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/standard_policies.hpp b/libstdc++-v3/include/ext/pb_ds/detail/standard_policies.hpp
index 000e3a475de..47bc143090b 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/standard_policies.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/standard_policies.hpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -54,22 +54,22 @@
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
#include <ext/pb_ds/trie_policy.hpp>
#include <ext/pb_ds/tag_and_trait.hpp>
-#include <ext/hash_map>
+#include <tr1/functional>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
template<typename Key>
struct default_hash_fn
{
- typedef __gnu_cxx::hash< Key> type;
+ typedef std::tr1::hash<Key> type;
};
template<typename Key>
struct default_eq_fn
{
- typedef std::equal_to< Key> type;
+ typedef std::equal_to<Key> type;
};
enum
@@ -79,7 +79,7 @@ namespace pb_ds
struct default_comb_hash_fn
{
- typedef pb_ds::direct_mask_range_hashing<> type;
+ typedef __gnu_pbds::direct_mask_range_hashing<> type;
};
template<typename Comb_Hash_Fn>
@@ -88,32 +88,22 @@ namespace pb_ds
private:
typedef typename Comb_Hash_Fn::size_type size_type;
- typedef
- typename __conditional_type<
- is_same<
- pb_ds::direct_mask_range_hashing<
- size_type>,
- Comb_Hash_Fn>::value,
- pb_ds::hash_exponential_size_policy<
- size_type>,
- pb_ds::hash_prime_size_policy>::__type
- size_policy_type;
+ typedef __gnu_pbds::direct_mask_range_hashing<size_type> default_fn;
+ typedef is_same<default_fn, Comb_Hash_Fn> same_type;
+ typedef __gnu_pbds::hash_exponential_size_policy<size_type> iftrue;
+ typedef __gnu_pbds::hash_prime_size_policy iffalse;
+ typedef __conditional_type<same_type::value, iftrue, iffalse> cond_type;
+ typedef typename cond_type::__type size_policy_type;
+
+ typedef __gnu_pbds::hash_load_check_resize_trigger<false, size_type> trigger;
public:
- typedef
- pb_ds::hash_standard_resize_policy<
- size_policy_type,
- pb_ds::hash_load_check_resize_trigger<
- false,
- size_type>,
- false,
- size_type>
- type;
+ typedef __gnu_pbds::hash_standard_resize_policy<size_policy_type, trigger, false, size_type> type;
};
struct default_update_policy
{
- typedef pb_ds::move_to_front_lu_policy<> type;
+ typedef __gnu_pbds::move_to_front_lu_policy<> type;
};
template<typename Comb_Probe_Fn>
@@ -122,42 +112,31 @@ namespace pb_ds
private:
typedef typename Comb_Probe_Fn::size_type size_type;
+ typedef __gnu_pbds::direct_mask_range_hashing<size_type> default_fn;
+ typedef is_same<default_fn, Comb_Probe_Fn> same_type;
+ typedef __gnu_pbds::linear_probe_fn<size_type> iftrue;
+ typedef __gnu_pbds::quadratic_probe_fn<size_type> iffalse;
+ typedef __conditional_type<same_type::value, iftrue, iffalse> cond_type;
+
public:
- typedef
- typename __conditional_type<
- is_same<
- pb_ds::direct_mask_range_hashing<size_t>,
- Comb_Probe_Fn>::value,
- pb_ds::linear_probe_fn<
- size_type>,
- pb_ds::quadratic_probe_fn<
- size_type> >::__type
- type;
+ typedef typename cond_type::__type type;
};
template<typename Key>
struct default_trie_e_access_traits;
template<typename Char, class Char_Traits>
- struct default_trie_e_access_traits<
- std::basic_string<
- Char,
- Char_Traits,
- std::allocator<
- char> > >
+ struct default_trie_e_access_traits<std::basic_string<Char, Char_Traits, std::allocator<char> > >
{
- typedef
- pb_ds::string_trie_e_access_traits<
- std::basic_string<
- Char,
- Char_Traits,
- std::allocator<
- char> > >
- type;
+ private:
+ typedef std::basic_string<Char, Char_Traits, std::allocator<char> > string_type;
+
+ public:
+ typedef __gnu_pbds::string_trie_e_access_traits<string_type> type;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_STANDARD_POLICIES_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
index 6d1f4ba9ca8..ee874e823be 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
@@ -59,7 +59,7 @@
#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
#include <debug/debug.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -352,6 +352,6 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp b/libstdc++-v3/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp
index 3fd7dc9ac88..cbb57144e06 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
#include <ext/pb_ds/detail/types_traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -117,6 +117,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TREE_NODE_METADATA_SELECTOR_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/tree_trace_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/tree_trace_base.hpp
index 791f2fc6f2d..049a9c57527 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/tree_trace_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/tree_trace_base.hpp
@@ -52,7 +52,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
@@ -207,7 +207,7 @@ namespace pb_ds
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifdef PB_DS_TREE_TRACE
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp
index ed9e1aac6e0..ed724e191e2 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
#include <ext/pb_ds/detail/types_traits.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -117,6 +117,6 @@ namespace pb_ds
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TRIE_NODE_METADATA_SELECTOR_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp
index a8506ce6815..2a1319a4629 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -249,7 +249,7 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TRIE_POLICY_BASE_HPP
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp b/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp
index 197b17efb6b..f57e8d6109c 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/type_utils.hpp
@@ -54,7 +54,7 @@
#include <ext/type_traits.h>
#include <ext/numeric_traits.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -158,7 +158,7 @@ namespace pb_ds
};
#define PB_DS_STATIC_ASSERT(UNIQUE, E) \
- typedef pb_ds::detail::__static_assert_dumclass<sizeof(pb_ds::detail::__static_assert<bool(E)>)> UNIQUE##__static_assert_type
+ typedef __gnu_pbds::detail::__static_assert_dumclass<sizeof(__gnu_pbds::detail::__static_assert<bool(E)>)> UNIQUE##__static_assert_type
#endif
@@ -168,6 +168,6 @@ namespace pb_ds
typedef Type type;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp
index 8272c8a71a4..e493315508e 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/types_traits.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <utility>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace detail
{
@@ -74,12 +74,15 @@ namespace pb_ds
typedef typename Alloc::size_type size_type;
// Extra value (used when the extra value is stored with each value).
- typedef std::pair<size_type, size_type> comp_hash;
+ typedef std::pair<size_type, size_type> comp_hash;
- integral_constant<int, Store_Extra> m_store_extra_indicator;
- typename no_throw_copies<Key, Mapped>::indicator m_no_throw_copies_indicator;
+ typedef integral_constant<int, Store_Extra> store_extra;
+ store_extra m_store_extra_indicator;
+
+ typedef typename no_throw_copies<Key, Mapped>::indicator no_throw_copies;
+ no_throw_copies m_no_throw_copies_indicator;
};
} // namespace detail
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/exception.hpp b/libstdc++-v3/include/ext/pb_ds/exception.hpp
index 379623d2d54..77d3f2d6927 100644
--- a/libstdc++-v3/include/ext/pb_ds/exception.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/exception.hpp
@@ -50,13 +50,13 @@
#include <stdexcept>
#include <cstdlib>
-namespace pb_ds
+namespace __gnu_pbds
{
// Base class for exceptions.
struct container_error : public std::logic_error
{
container_error()
- : std::logic_error(__N("pb_ds::container_error")) { }
+ : std::logic_error(__N("__gnu_pbds::container_error")) { }
};
// An entry cannot be inserted into a container object for logical
@@ -104,6 +104,6 @@ namespace pb_ds
__throw_resize_error(void)
{ std::abort(); }
#endif
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/hash_policy.hpp b/libstdc++-v3/include/ext/pb_ds/hash_policy.hpp
index c17d97831f8..d1833c17398 100644
--- a/libstdc++-v3/include/ext/pb_ds/hash_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/hash_policy.hpp
@@ -56,7 +56,7 @@
#include <ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp>
#include <ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
// A null hash function, indicating that the combining hash function
// is actually a ranged hash function.
@@ -605,6 +605,6 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp
index 876ea3e2f38..5a63a3e16dc 100644
--- a/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/list_update_policy.hpp
@@ -50,7 +50,7 @@
#include <cstdlib>
#include <ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
// A null type that means that each link in a list-based container
// does not actually need metadata.
@@ -137,6 +137,6 @@ namespace pb_ds
#undef PB_DS_CLASS_T_DEC
#undef PB_DS_CLASS_C_DEC
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp
index c6373c5d1c9..90ffafffefa 100644
--- a/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/priority_queue.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/priority_queue_base_dispatch.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
// A priority queue.
template<typename Value_Type,
@@ -126,6 +126,6 @@ namespace pb_ds
swap(priority_queue& other)
{ base_type::swap(other); }
};
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp b/libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp
index 94039af0d80..09475a2ec95 100644
--- a/libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/tag_and_trait.hpp
@@ -50,7 +50,12 @@
#include <ext/pb_ds/detail/type_utils.hpp>
-namespace pb_ds
+/**
+ * @namespace __gnu_pbds
+ * @brief GNU extension policy-based data structures for public use.
+ */
+
+namespace __gnu_pbds
{
// A trivial iterator tag. Signifies that the iterators has none of
// the STL's movement abilities.
@@ -352,6 +357,6 @@ namespace pb_ds
reverse_iteration = base_type::reverse_iteration
};
};
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp
index 3c80fc6986a..dedabec5c48 100644
--- a/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/tree_policy.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
// A null node updator, indicating that no node updates are required.
template<typename Const_Node_Iterator,
@@ -163,6 +163,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_BASE_C_DEC
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp
index ee496a11b0b..b18de195ed8 100644
--- a/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/trie_policy.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <ext/pb_ds/detail/trie_policy/trie_policy_base.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
// A null node updator, indicating that no node updates are required.
template<typename Const_Node_Iterator,
@@ -356,6 +356,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
#undef PB_DS_BASE_C_DEC
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h
index f9dcc7fc88d..e2e38a02af5 100644
--- a/libstdc++-v3/include/ext/pool_allocator.h
+++ b/libstdc++-v3/include/ext/pool_allocator.h
@@ -1,6 +1,6 @@
// Allocators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -54,6 +54,7 @@
#include <bits/functexcept.h>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -63,7 +64,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Base class for __pool_alloc.
*
- * @if maint
* Uses various allocators to fulfill underlying requests (and makes as
* few requests as possible when in default high-speed pool mode).
*
@@ -75,8 +75,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* _S_round_up(requested_size). Thus the client has enough size
* information that we can return the object to the proper free list
* without permanently losing part of the object.
- *
- * @endif
*/
class __pool_alloc_base
{
@@ -164,7 +162,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) _Tp(__val); }
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }
diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h
index 7c0934a3084..0d3224cea10 100644
--- a/libstdc++-v3/include/ext/rc_string_base.h
+++ b/libstdc++-v3/include/ext/rc_string_base.h
@@ -1,6 +1,6 @@
// Reference-counted versatile string base -*- C++ -*-
-// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -37,11 +37,11 @@
#define _RC_STRING_BASE_H 1
#include <ext/atomicity.h>
+#include <bits/stl_iterator_base_funcs.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
- * @if maint
* Documentation? What's that?
* Nathan Myers <ncm@cantrip.org>.
*
@@ -81,7 +81,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
*
* All but the last paragraph is considered pretty conventional
* for a C++ string implementation.
- * @endif
*/
template<typename _CharT, typename _Traits, typename _Alloc>
class __rc_string_base
@@ -179,7 +178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// (NB: last two terms for rounding reasons, see _M_create below)
// Solving for m:
// m = ((npos - 2 * sizeof(_Rep) + 1) / sizeof(_CharT)) - 1
- // In addition, this implementation halfs this amount.
+ // In addition, this implementation halves this amount.
enum { _S_max_size = (((static_cast<size_type>(-1) - 2 * sizeof(_Rep)
+ 1) / sizeof(_CharT)) - 1) / 2 };
@@ -300,12 +299,18 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ _M_rep()->_M_set_length(__n); }
__rc_string_base()
- : _M_dataplus(_Alloc(), _S_empty_rep._M_refcopy()) { }
+ : _M_dataplus(_S_empty_rep._M_refcopy()) { }
__rc_string_base(const _Alloc& __a);
__rc_string_base(const __rc_string_base& __rcs);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ __rc_string_base(__rc_string_base&& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), __rcs._M_data())
+ { __rcs._M_data(_S_empty_rep._M_refcopy()); }
+#endif
+
__rc_string_base(size_type __n, _CharT __c, const _Alloc& __a);
template<typename _InputIterator>
diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope
index e0f0aa39036..e39761ec432 100644
--- a/libstdc++-v3/include/ext/rope
+++ b/libstdc++-v3/include/ext/rope
@@ -49,16 +49,15 @@
#ifndef _ROPE
#define _ROPE 1
-#include <bits/stl_algobase.h>
+#include <algorithm>
+#include <iosfwd>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
-#include <bits/stl_algo.h>
#include <bits/stl_function.h>
#include <bits/stl_numeric.h>
#include <bits/allocator.h>
-#include <ext/hash_fun.h>
-#include <iosfwd>
#include <bits/gthr.h>
+#include <tr1/functional>
# ifdef __GC
# define __GC_CONST const
@@ -130,7 +129,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ __c = 0; }
// char_producers are logically functions that generate a section of
- // a string. These can be convereted to ropes. The resulting rope
+ // a string. These can be converted to ropes. The resulting rope
// invokes the char_producer on demand. This allows, for example,
// files to be viewed as ropes without reading the entire file.
template <class _CharT>
@@ -1760,7 +1759,7 @@ protected:
// definition.
static _RopeRep* _S_balance(_RopeRep* __r);
- // Add all unbalanced subtrees to the forest of balanceed trees.
+ // Add all unbalanced subtrees to the forest of balanced trees.
// Used only by balance.
static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
@@ -1976,7 +1975,7 @@ protected:
// Embedded 0s in the input do not terminate the copy.
const _CharT* c_str() const;
- // As above, but lso use the flattened representation as the
+ // As above, but also use the flattened representation as
// the new rope representation.
const _CharT* replace_with_c_str();
@@ -2041,7 +2040,7 @@ protected:
max_size() const
{
return _S_min_len[int(__detail::_S_max_rope_depth) - 1] - 1;
- // Guarantees that the result can be sufficirntly
+ // Guarantees that the result can be sufficiently
// balanced. Longer ropes will probably still work,
// but it's harder to make guarantees.
}
@@ -2907,12 +2906,18 @@ protected:
swap(rope<_CharT, _Alloc>& __x, rope<_CharT, _Alloc>& __y)
{ __x.swap(__y); }
- // Hash functions should probably be revisited later:
+_GLIBCXX_END_NAMESPACE
+
+
+namespace std
+{
+namespace tr1
+{
template<>
- struct hash<crope>
+ struct hash<__gnu_cxx::crope>
{
size_t
- operator()(const crope& __str) const
+ operator()(const __gnu_cxx::crope& __str) const
{
size_t __size = __str.size();
if (0 == __size)
@@ -2923,10 +2928,10 @@ protected:
template<>
- struct hash<wrope>
+ struct hash<__gnu_cxx::wrope>
{
size_t
- operator()(const wrope& __str) const
+ operator()(const __gnu_cxx::wrope& __str) const
{
size_t __size = __str.size();
if (0 == __size)
@@ -2934,8 +2939,8 @@ protected:
return 13 * __str[0] + 5 * __str[__size - 1] + __size;
}
};
-
-_GLIBCXX_END_NAMESPACE
+} // namespace tr1
+} // namespace std
# include <ext/ropeimpl.h>
diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist
index 328a52e012f..7ae9ffbe101 100644
--- a/libstdc++-v3/include/ext/slist
+++ b/libstdc++-v3/include/ext/slist
@@ -1,6 +1,6 @@
// Singly-linked list implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -49,7 +49,7 @@
#ifndef _SLIST
#define _SLIST 1
-#include <bits/stl_algobase.h>
+#include <algorithm>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h
index 0b576ba35b1..9c8c1bc79d6 100644
--- a/libstdc++-v3/include/ext/sso_string_base.h
+++ b/libstdc++-v3/include/ext/sso_string_base.h
@@ -175,13 +175,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
__sso_string_base()
- : _M_dataplus(_Alloc(), _M_local_data)
+ : _M_dataplus(_M_local_data)
{ _M_set_length(0); }
__sso_string_base(const _Alloc& __a);
__sso_string_base(const __sso_string_base& __rcs);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ __sso_string_base(__sso_string_base&& __rcs);
+#endif
+
__sso_string_base(size_type __n, _CharT __c, const _Alloc& __a);
template<typename _InputIterator>
@@ -336,6 +340,30 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
: _M_dataplus(__rcs._M_get_allocator(), _M_local_data)
{ _M_construct(__rcs._M_data(), __rcs._M_data() + __rcs._M_length()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(__sso_string_base&& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), _M_local_data)
+ {
+ if (__rcs._M_is_local())
+ {
+ if (__rcs._M_length())
+ traits_type::copy(_M_local_data, __rcs._M_local_data,
+ _S_local_capacity + 1);
+ }
+ else
+ {
+ _M_data(__rcs._M_data());
+ _M_capacity(__rcs._M_allocated_capacity);
+ }
+
+ _M_length(__rcs._M_length());
+ __rcs._M_length(0);
+ __rcs._M_data(__rcs._M_local_data);
+ }
+#endif
+
template<typename _CharT, typename _Traits, typename _Alloc>
__sso_string_base<_CharT, _Traits, _Alloc>::
__sso_string_base(size_type __n, _CharT __c, const _Alloc& __a)
diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h
index 9a3dbef32fd..04204cb55fc 100644
--- a/libstdc++-v3/include/ext/throw_allocator.h
+++ b/libstdc++-v3/include/ext/throw_allocator.h
@@ -39,7 +39,7 @@
// purpose. It is provided "as is" without express or implied
// warranty.
-/** @file ext/vstring.h
+/** @file ext/throw_allocator.h
* This file is a GNU extension to the Standard C++ Library.
*
* Contains an exception-throwing allocator, useful for testing
@@ -47,10 +47,6 @@
* sanity checked.
*/
-/**
- * @file throw_allocator.h
- */
-
#ifndef _THROW_ALLOCATOR_H
#define _THROW_ALLOCATOR_H 1
@@ -64,6 +60,7 @@
#include <utility>
#include <tr1/random>
#include <bits/functexcept.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -236,6 +233,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
construct(pointer __p, const T& val)
{ return std::allocator<value_type>().construct(__p, val); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ {
+ return std::allocator<value_type>().
+ construct(__p, std::forward<_Args>(__args)...);
+ }
+#endif
+
void
destroy(pointer __p)
{ std::allocator<value_type>().destroy(__p); }
@@ -423,15 +430,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char buf[40];
const char tab('\t');
s += "address: ";
- sprintf(buf, "%p", ref.first);
+ __builtin_sprintf(buf, "%p", ref.first);
s += buf;
s += tab;
s += "label: ";
- sprintf(buf, "%u", ref.second.first);
+ unsigned long l = static_cast<unsigned long>(ref.second.first);
+ __builtin_sprintf(buf, "%lu", l);
s += buf;
s += tab;
s += "size: ";
- sprintf(buf, "%u", ref.second.second);
+ l = static_cast<unsigned long>(ref.second.second);
+ __builtin_sprintf(buf, "%lu", l);
s += buf;
s += '\n';
}
diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h
index bafa0449b23..a369cae2f0d 100644
--- a/libstdc++-v3/include/ext/vstring.h
+++ b/libstdc++-v3/include/ext/vstring.h
@@ -146,6 +146,18 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__versa_string(const __versa_string& __str)
: __vstring_base(__str) { }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief String move constructor.
+ * @param str Source string.
+ *
+ * The newly-constructed %string contains the exact contents of @a str.
+ * The contents of @a str are a valid, but unspecified string.
+ */
+ __versa_string(__versa_string&& __str)
+ : __vstring_base(std::forward<__vstring_base>(__str)) { }
+#endif
+
/**
* @brief Construct string as copy of a substring.
* @param str Source string.
@@ -230,6 +242,23 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
operator=(const __versa_string& __str)
{ return this->assign(__str); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief String move assignment operator.
+ * @param str Source string.
+ *
+ * The contents of @a str are moved into this string (without copying).
+ * @a str is a valid, but unspecified string.
+ */
+ __versa_string&
+ operator=(__versa_string&& __str)
+ {
+ if (this != &__str)
+ this->swap(__str);
+ return *this;
+ }
+#endif
+
/**
* @brief Copy contents of @a s into this string.
* @param s Source null-terminated string.
@@ -327,6 +356,42 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
rend() const
{ return const_reverse_iterator(this->begin()); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * character in the %string.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_data()); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the
+ * last character in the %string.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(this->_M_data() + this->size()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last character in the %string. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first character in the %string. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(this->begin()); }
+#endif
+
public:
// Capacity:
/// Returns the number of characters in the string, not including any
@@ -493,6 +558,40 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return this->_M_data()[__n];
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %string.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %string.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last
+ * element of the %string.
+ */
+ reference
+ back()
+ { return *(end() - 1); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the
+ * last element of the %string.
+ */
+ const_reference
+ back() const
+ { return *(end() - 1); }
+#endif
+
// Modifiers:
/**
* @brief Append a string to this string.
@@ -1243,7 +1342,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* time.
*/
void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(__versa_string&& __s)
+#else
swap(__versa_string& __s)
+#endif
{ this->_M_swap(__s); }
// String operations:
@@ -1407,7 +1510,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find position of a character of C substring.
* @param s String containing characters to locate.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to search for.
* @return Index of first occurrence.
*
@@ -1468,7 +1571,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character of C substring.
* @param s C string containing characters to locate.
- * @param pos Index of character to search back from (default end).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to search for.
* @return Index of last occurrence.
*
@@ -1499,7 +1602,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character.
* @param c Character to locate.
- * @param pos Index of character to search back from (default 0).
+ * @param pos Index of character to search back from (default end).
* @return Index of last occurrence.
*
* Starting from @a pos, searches backward for @a c within this string.
@@ -1529,7 +1632,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search from.
* @param n Number of characters from s to consider.
* @return Index of first occurrence.
*
@@ -1574,8 +1677,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character not in string.
* @param str String containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a str within this string. If found, returns the index
@@ -1589,9 +1692,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a character not in C substring.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
+ * @param pos Index of character to search back from.
* @param n Number of characters from s to consider.
- * @return Index of first occurrence.
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in the first @a n characters of @a s within this string.
@@ -1602,10 +1705,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
find_last_not_of(const _CharT* __s, size_type __pos,
size_type __n) const;
/**
- * @brief Find position of a character not in C string.
+ * @brief Find last position of a character not in C string.
* @param s C string containing characters to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character not
* contained in @a s within this string. If found, returns the index
@@ -1621,8 +1724,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Find last position of a different character.
* @param c Character to avoid.
- * @param pos Index of character to search from (default 0).
- * @return Index of first occurrence.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
*
* Starting from @a pos, searches backward for a character other than
* @a c within this string. If found, returns the index where it was
@@ -2118,6 +2221,22 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
{ __lhs.swap(__rhs); }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline void
+ swap(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
+ __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline void
+ swap(__versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
diff --git a/libstdc++-v3/include/ext/vstring_util.h b/libstdc++-v3/include/ext/vstring_util.h
index 390ef37fb3d..5725e0a3185 100644
--- a/libstdc++-v3/include/ext/vstring_util.h
+++ b/libstdc++-v3/include/ext/vstring_util.h
@@ -44,6 +44,9 @@
#include <bits/functexcept.h>
#include <bits/localefwd.h>
#include <bits/ostream_insert.h>
+#include <bits/stl_iterator.h>
+#include <ext/numeric_traits.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -89,6 +92,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
struct _Alloc_hider
: public _Alloc1
{
+ _Alloc_hider(_CharT* __ptr)
+ : _Alloc1(), _M_p(__ptr) { }
+
_Alloc_hider(const _Alloc1& __a, _CharT* __ptr)
: _Alloc1(__a), _M_p(__ptr) { }
diff --git a/libstdc++-v3/include/parallel/algo.h b/libstdc++-v3/include/parallel/algo.h
new file mode 100644
index 00000000000..e836b284fd3
--- /dev/null
+++ b/libstdc++-v3/include/parallel/algo.h
@@ -0,0 +1,2156 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/algo.h
+ * @brief Parallel STL function calls corresponding to the stl_algo.h header.
+ *
+ * The functions defined here mainly do case switches and
+ * call the actual parallelized versions in other files.
+ * Inlining policy: Functions that basically only contain one function call,
+ * are declared inline.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_ALGO_H
+#define _GLIBCXX_PARALLEL_ALGO_H 1
+
+#include <parallel/algorithmfwd.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_algo.h>
+#include <parallel/iterator.h>
+#include <parallel/base.h>
+#include <parallel/sort.h>
+#include <parallel/workstealing.h>
+#include <parallel/par_loop.h>
+#include <parallel/omp_loop.h>
+#include <parallel/omp_loop_static.h>
+#include <parallel/for_each_selectors.h>
+#include <parallel/for_each.h>
+#include <parallel/find.h>
+#include <parallel/find_selectors.h>
+#include <parallel/search.h>
+#include <parallel/random_shuffle.h>
+#include <parallel/partition.h>
+#include <parallel/merge.h>
+#include <parallel/unique_copy.h>
+#include <parallel/set_operations.h>
+
+namespace std
+{
+namespace __parallel
+{
+ // Sequential fallback
+ template<typename InputIterator, typename Function>
+ inline Function
+ for_each(InputIterator begin, InputIterator end, Function f,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::for_each(begin, end, f); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator, typename Function, typename IteratorTag>
+ inline Function
+ for_each_switch(InputIterator begin, InputIterator end, Function f,
+ IteratorTag)
+ { return for_each(begin, end, f, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename Function>
+ Function
+ for_each_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Function f, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().for_each_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy;
+ __gnu_parallel::for_each_selector<RandomAccessIterator> functionality;
+
+ return __gnu_parallel::
+ for_each_template_random_access(begin, end, f, functionality,
+ __gnu_parallel::dummy_reduct(),
+ true, dummy, -1, parallelism_tag);
+ }
+ else
+ return for_each(begin, end, f, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface
+ template<typename Iterator, typename Function>
+ inline Function
+ for_each(Iterator begin, Iterator end, Function f,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<Iterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return for_each_switch(begin, end, f, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename Iterator, typename Function>
+ inline Function
+ for_each(Iterator begin, Iterator end, Function f)
+ {
+ typedef std::iterator_traits<Iterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return for_each_switch(begin, end, f, iterator_category());
+ }
+
+
+ // Sequential fallback
+ template<typename InputIterator, typename T>
+ inline InputIterator
+ find(InputIterator begin, InputIterator end, const T& val,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::find(begin, end, val); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator, typename T, typename IteratorTag>
+ inline InputIterator
+ find_switch(InputIterator begin, InputIterator end, const T& val,
+ IteratorTag)
+ { return _GLIBCXX_STD_P::find(begin, end, val); }
+
+ // Parallel find for random access iterators
+ template<typename RandomAccessIterator, typename T>
+ RandomAccessIterator
+ find_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ const T& val, random_access_iterator_tag)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ {
+ binder2nd<__gnu_parallel::equal_to<value_type, T> >
+ comp(__gnu_parallel::equal_to<value_type, T>(), val);
+ return __gnu_parallel::find_template(begin, end, begin, comp,
+ __gnu_parallel::
+ find_if_selector()).first;
+ }
+ else
+ return _GLIBCXX_STD_P::find(begin, end, val);
+ }
+
+ // Public interface
+ template<typename InputIterator, typename T>
+ inline InputIterator
+ find(InputIterator begin, InputIterator end, const T& val)
+ {
+ typedef std::iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return find_switch(begin, end, val, iterator_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator, typename Predicate>
+ inline InputIterator
+ find_if(InputIterator begin, InputIterator end, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::find_if(begin, end, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator, typename Predicate, typename IteratorTag>
+ inline InputIterator
+ find_if_switch(InputIterator begin, InputIterator end, Predicate pred,
+ IteratorTag)
+ { return _GLIBCXX_STD_P::find_if(begin, end, pred); }
+
+ // Parallel find_if for random access iterators
+ template<typename RandomAccessIterator, typename Predicate>
+ RandomAccessIterator
+ find_if_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Predicate pred, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ return __gnu_parallel::find_template(begin, end, begin, pred,
+ __gnu_parallel::
+ find_if_selector()).first;
+ else
+ return _GLIBCXX_STD_P::find_if(begin, end, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator, typename Predicate>
+ inline InputIterator
+ find_if(InputIterator begin, InputIterator end, Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return find_if_switch(begin, end, pred, iterator_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator, typename ForwardIterator>
+ inline InputIterator
+ find_first_of(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::find_first_of(begin1, end1, begin2, end2); }
+
+ // Sequential fallback
+ template<typename InputIterator, typename ForwardIterator,
+ typename BinaryPredicate>
+ inline InputIterator
+ find_first_of(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ BinaryPredicate comp, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::find_first_of(begin1, end1, begin2, end2, comp); }
+
+ // Sequential fallback for input iterator type
+ template<typename InputIterator, typename ForwardIterator,
+ typename IteratorTag1, typename IteratorTag2>
+ inline InputIterator
+ find_first_of_switch(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ IteratorTag1, IteratorTag2)
+ { return find_first_of(begin1, end1, begin2, end2,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename ForwardIterator,
+ typename BinaryPredicate, typename IteratorTag>
+ inline RandomAccessIterator
+ find_first_of_switch(RandomAccessIterator begin1,
+ RandomAccessIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ BinaryPredicate comp, random_access_iterator_tag,
+ IteratorTag)
+ {
+ return __gnu_parallel::
+ find_template(begin1, end1, begin1, comp,
+ __gnu_parallel::find_first_of_selector
+ <ForwardIterator>(begin2, end2)).first;
+ }
+
+ // Sequential fallback for input iterator type
+ template<typename InputIterator, typename ForwardIterator,
+ typename BinaryPredicate, typename IteratorTag1,
+ typename IteratorTag2>
+ inline InputIterator
+ find_first_of_switch(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ BinaryPredicate comp, IteratorTag1, IteratorTag2)
+ { return find_first_of(begin1, end1, begin2, end2, comp,
+ __gnu_parallel::sequential_tag()); }
+
+ // Public interface
+ template<typename InputIterator, typename ForwardIterator,
+ typename BinaryPredicate>
+ inline InputIterator
+ find_first_of(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2,
+ BinaryPredicate comp)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<ForwardIterator> iteratorf_traits;
+ typedef typename iteratori_traits::iterator_category iteratori_category;
+ typedef typename iteratorf_traits::iterator_category iteratorf_category;
+
+ return find_first_of_switch(begin1, end1, begin2, end2, comp,
+ iteratori_category(), iteratorf_category());
+ }
+
+ // Public interface, insert default comparator
+ template<typename InputIterator, typename ForwardIterator>
+ inline InputIterator
+ find_first_of(InputIterator begin1, InputIterator end1,
+ ForwardIterator begin2, ForwardIterator end2)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<ForwardIterator> iteratorf_traits;
+ typedef typename iteratori_traits::value_type valuei_type;
+ typedef typename iteratorf_traits::value_type valuef_type;
+
+ return find_first_of(begin1, end1, begin2, end2, __gnu_parallel::
+ equal_to<valuei_type, valuef_type>());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ unique_copy(InputIterator begin1, InputIterator end1, OutputIterator out,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::unique_copy(begin1, end1, out); }
+
+ // Sequential fallback
+ template<typename InputIterator, typename OutputIterator,
+ typename Predicate>
+ inline OutputIterator
+ unique_copy(InputIterator begin1, InputIterator end1, OutputIterator out,
+ Predicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::unique_copy(begin1, end1, out, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator, typename OutputIterator,
+ typename Predicate, typename IteratorTag1, typename IteratorTag2>
+ inline OutputIterator
+ unique_copy_switch(InputIterator begin, InputIterator last,
+ OutputIterator out, Predicate pred,
+ IteratorTag1, IteratorTag2)
+ { return _GLIBCXX_STD_P::unique_copy(begin, last, out, pred); }
+
+ // Parallel unique_copy for random access iterators
+ template<typename RandomAccessIterator, typename RandomAccessOutputIterator,
+ typename Predicate>
+ RandomAccessOutputIterator
+ unique_copy_switch(RandomAccessIterator begin, RandomAccessIterator last,
+ RandomAccessOutputIterator out, Predicate pred,
+ random_access_iterator_tag, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(last - begin)
+ > __gnu_parallel::_Settings::get().unique_copy_minimal_n))
+ return __gnu_parallel::parallel_unique_copy(begin, last, out, pred);
+ else
+ return _GLIBCXX_STD_P::unique_copy(begin, last, out, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ unique_copy(InputIterator begin1, InputIterator end1, OutputIterator out)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori_traits::iterator_category iteratori_category;
+ typedef typename iteratori_traits::value_type value_type;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return unique_copy_switch(begin1, end1, out, equal_to<value_type>(),
+ iteratori_category(), iteratoro_category());
+ }
+
+ // Public interface
+ template<typename InputIterator, typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ unique_copy(InputIterator begin1, InputIterator end1, OutputIterator out,
+ Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori_traits::iterator_category iteratori_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return unique_copy_switch(begin1, end1, out, pred, iteratori_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_union(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_union(begin1, end1, begin2, end2, out); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_union(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_union(begin1, end1,
+ begin2, end2, out, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename OutputIterator,
+ typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
+ inline OutputIterator
+ set_union_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator result, Predicate pred, IteratorTag1,
+ IteratorTag2, IteratorTag3)
+ { return _GLIBCXX_STD_P::set_union(begin1, end1,
+ begin2, end2, result, pred); }
+
+ // Parallel set_union for random access iterators
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputRandomAccessIterator, typename Predicate>
+ OutputRandomAccessIterator
+ set_union_switch(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, RandomAccessIterator2 end2,
+ OutputRandomAccessIterator result, Predicate pred,
+ random_access_iterator_tag, random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end1 - begin1)
+ >= __gnu_parallel::_Settings::get().set_union_minimal_n
+ || static_cast<__gnu_parallel::sequence_index_t>(end2 - begin2)
+ >= __gnu_parallel::_Settings::get().set_union_minimal_n))
+ return __gnu_parallel::parallel_set_union(begin1, end1,
+ begin2, end2, result, pred);
+ else
+ return _GLIBCXX_STD_P::set_union(begin1, end1,
+ begin2, end2, result, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_union(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2, OutputIterator out)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+ typedef typename iteratori1_traits::value_type value1_type;
+ typedef typename iteratori2_traits::value_type value2_type;
+
+ return set_union_switch(begin1, end1, begin2, end2, out,
+ __gnu_parallel::less<value1_type, value2_type>(),
+ iteratori1_category(), iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_union(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return set_union_switch(begin1, end1, begin2, end2, out, pred,
+ iteratori1_category(), iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_intersection(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_intersection(begin1, end1,
+ begin2, end2, out); }
+
+ // Sequential fallback.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_intersection(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_intersection(begin1, end1, begin2, end2,
+ out, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename OutputIterator,
+ typename IteratorTag1, typename IteratorTag2,
+ typename IteratorTag3>
+ inline OutputIterator
+ set_intersection_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator result, Predicate pred,
+ IteratorTag1, IteratorTag2, IteratorTag3)
+ { return _GLIBCXX_STD_P::set_intersection(begin1, end1, begin2,
+ end2, result, pred); }
+
+ // Parallel set_intersection for random access iterators
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputRandomAccessIterator, typename Predicate>
+ OutputRandomAccessIterator
+ set_intersection_switch(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ RandomAccessIterator2 end2,
+ OutputRandomAccessIterator result,
+ Predicate pred,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end1 - begin1)
+ >= __gnu_parallel::_Settings::get().set_union_minimal_n
+ || static_cast<__gnu_parallel::sequence_index_t>(end2 - begin2)
+ >= __gnu_parallel::_Settings::get().set_union_minimal_n))
+ return __gnu_parallel::parallel_set_intersection(begin1, end1, begin2,
+ end2, result, pred);
+ else
+ return _GLIBCXX_STD_P::set_intersection(begin1, end1, begin2,
+ end2, result, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_intersection(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+ typedef typename iteratori1_traits::value_type value1_type;
+ typedef typename iteratori2_traits::value_type value2_type;
+
+ return set_intersection_switch(begin1, end1, begin2, end2, out,
+ __gnu_parallel::
+ less<value1_type, value2_type>(),
+ iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_intersection(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return set_intersection_switch(begin1, end1, begin2, end2, out, pred,
+ iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_symmetric_difference(begin1,end1,
+ begin2, end2, out); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_symmetric_difference(begin1, end1, begin2,
+ end2, out, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename OutputIterator,
+ typename IteratorTag1, typename IteratorTag2,
+ typename IteratorTag3>
+ inline OutputIterator
+ set_symmetric_difference_switch(InputIterator1 begin1,
+ InputIterator1 end1,
+ InputIterator2 begin2,
+ InputIterator2 end2,
+ OutputIterator result, Predicate pred,
+ IteratorTag1, IteratorTag2, IteratorTag3)
+ { return _GLIBCXX_STD_P::set_symmetric_difference(begin1, end1,
+ begin2, end2,
+ result, pred); }
+
+ // Parallel set_symmetric_difference for random access iterators
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputRandomAccessIterator, typename Predicate>
+ OutputRandomAccessIterator
+ set_symmetric_difference_switch(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ RandomAccessIterator2 end2,
+ OutputRandomAccessIterator result,
+ Predicate pred,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end1 - begin1)
+ >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n
+ || static_cast<__gnu_parallel::sequence_index_t>(end2 - begin2)
+ >= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n))
+ return __gnu_parallel::parallel_set_symmetric_difference(begin1, end1,
+ begin2, end2,
+ result, pred);
+ else
+ return _GLIBCXX_STD_P::set_symmetric_difference(begin1, end1,
+ begin2, end2,
+ result, pred);
+ }
+
+ // Public interface.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+ typedef typename iteratori1_traits::value_type value1_type;
+ typedef typename iteratori2_traits::value_type value2_type;
+
+ return set_symmetric_difference_switch(begin1, end1, begin2, end2, out,
+ __gnu_parallel::
+ less<value1_type, value2_type>(),
+ iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Public interface.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_symmetric_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return set_symmetric_difference_switch(begin1, end1, begin2, end2, out,
+ pred, iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_difference(begin1,end1, begin2, end2, out); }
+
+ // Sequential fallback.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::set_difference(begin1, end1,
+ begin2, end2, out, pred); }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename OutputIterator,
+ typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
+ inline OutputIterator
+ set_difference_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator result, Predicate pred,
+ IteratorTag1, IteratorTag2, IteratorTag3)
+ { return _GLIBCXX_STD_P::set_difference(begin1, end1,
+ begin2, end2, result, pred); }
+
+ // Parallel set_difference for random access iterators
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputRandomAccessIterator, typename Predicate>
+ OutputRandomAccessIterator
+ set_difference_switch(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ RandomAccessIterator2 end2,
+ OutputRandomAccessIterator result, Predicate pred,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end1 - begin1)
+ >= __gnu_parallel::_Settings::get().set_difference_minimal_n
+ || static_cast<__gnu_parallel::sequence_index_t>(end2 - begin2)
+ >= __gnu_parallel::_Settings::get().set_difference_minimal_n))
+ return __gnu_parallel::parallel_set_difference(begin1, end1,
+ begin2, end2,
+ result, pred);
+ else
+ return _GLIBCXX_STD_P::set_difference(begin1, end1,
+ begin2, end2, result, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ set_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+ typedef typename iteratori1_traits::value_type value1_type;
+ typedef typename iteratori2_traits::value_type value2_type;
+
+ return set_difference_switch(begin1, end1, begin2, end2, out,
+ __gnu_parallel::
+ less<value1_type, value2_type>(),
+ iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Predicate>
+ inline OutputIterator
+ set_difference(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator out, Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return set_difference_switch(begin1, end1, begin2, end2, out, pred,
+ iteratori1_category(),
+ iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ adjacent_find(ForwardIterator begin, ForwardIterator end,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::adjacent_find(begin, end); }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename BinaryPredicate>
+ inline ForwardIterator
+ adjacent_find(ForwardIterator begin, ForwardIterator end,
+ BinaryPredicate binary_pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::adjacent_find(begin, end, binary_pred); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator>
+ RandomAccessIterator
+ adjacent_find_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ random_access_iterator_tag)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ {
+ RandomAccessIterator spot = __gnu_parallel::
+ find_template(begin, end - 1, begin, equal_to<value_type>(),
+ __gnu_parallel::adjacent_find_selector()).first;
+ if (spot == (end - 1))
+ return end;
+ else
+ return spot;
+ }
+ else
+ return adjacent_find(begin, end, __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename IteratorTag>
+ inline ForwardIterator
+ adjacent_find_switch(ForwardIterator begin, ForwardIterator end,
+ IteratorTag)
+ { return adjacent_find(begin, end, __gnu_parallel::sequential_tag()); }
+
+ // Public interface
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ adjacent_find(ForwardIterator begin, ForwardIterator end)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return adjacent_find_switch(begin, end, iterator_category());
+ }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename BinaryPredicate,
+ typename IteratorTag>
+ inline ForwardIterator
+ adjacent_find_switch(ForwardIterator begin, ForwardIterator end,
+ BinaryPredicate pred, IteratorTag)
+ { return adjacent_find(begin, end, pred,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename BinaryPredicate>
+ RandomAccessIterator
+ adjacent_find_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ BinaryPredicate pred, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ return __gnu_parallel::find_template(begin, end, begin, pred,
+ __gnu_parallel::
+ adjacent_find_selector()).first;
+ else
+ return adjacent_find(begin, end, pred,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface
+ template<typename ForwardIterator, typename BinaryPredicate>
+ inline ForwardIterator
+ adjacent_find(ForwardIterator begin, ForwardIterator end,
+ BinaryPredicate pred)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return adjacent_find_switch(begin, end, pred, iterator_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator, typename T>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count(InputIterator begin, InputIterator end, const T& value,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::count(begin, end, value); }
+
+ // Parallel code for random access iterators
+ template<typename RandomAccessIterator, typename T>
+ typename iterator_traits<RandomAccessIterator>::difference_type
+ count_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ const T& value, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_unbalanced)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef __gnu_parallel::sequence_index_t sequence_index_t;
+
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().count_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ __gnu_parallel::count_selector<RandomAccessIterator, difference_type>
+ functionality;
+ difference_type res = 0;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end, value,
+ functionality,
+ std::plus<sequence_index_t>(),
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return count(begin, end, value, __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator, typename T, typename IteratorTag>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count_switch(InputIterator begin, InputIterator end, const T& value,
+ IteratorTag)
+ { return count(begin, end, value, __gnu_parallel::sequential_tag()); }
+
+ // Public interface.
+ template<typename InputIterator, typename T>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count(InputIterator begin, InputIterator end, const T& value,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return count_switch(begin, end, value, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename InputIterator, typename T>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count(InputIterator begin, InputIterator end, const T& value)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return count_switch(begin, end, value, iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename InputIterator, typename Predicate>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count_if(InputIterator begin, InputIterator end, Predicate pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::count_if(begin, end, pred); }
+
+ // Parallel count_if for random access iterators
+ template<typename RandomAccessIterator, typename Predicate>
+ typename iterator_traits<RandomAccessIterator>::difference_type
+ count_if_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Predicate pred, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_unbalanced)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef __gnu_parallel::sequence_index_t sequence_index_t;
+
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().count_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ difference_type res = 0;
+ __gnu_parallel::
+ count_if_selector<RandomAccessIterator, difference_type>
+ functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end, pred,
+ functionality,
+ std::plus<sequence_index_t>(),
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return count_if(begin, end, pred, __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator, typename Predicate, typename IteratorTag>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count_if_switch(InputIterator begin, InputIterator end, Predicate pred,
+ IteratorTag)
+ { return count_if(begin, end, pred, __gnu_parallel::sequential_tag()); }
+
+ // Public interface.
+ template<typename InputIterator, typename Predicate>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count_if(InputIterator begin, InputIterator end, Predicate pred,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return count_if_switch(begin, end, pred, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename InputIterator, typename Predicate>
+ inline typename iterator_traits<InputIterator>::difference_type
+ count_if(InputIterator begin, InputIterator end, Predicate pred)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return count_if_switch(begin, end, pred, iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename ForwardIterator1, typename ForwardIterator2>
+ inline ForwardIterator1
+ search(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::search(begin1, end1, begin2, end2); }
+
+ // Parallel algorithm for random access iterator
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2>
+ RandomAccessIterator1
+ search_switch(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, RandomAccessIterator2 end2,
+ random_access_iterator_tag, random_access_iterator_tag)
+ {
+ typedef std::iterator_traits<RandomAccessIterator1> iterator1_traits;
+ typedef typename iterator1_traits::value_type value1_type;
+ typedef std::iterator_traits<RandomAccessIterator2> iterator2_traits;
+ typedef typename iterator2_traits::value_type value2_type;
+
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ return __gnu_parallel::
+ search_template(begin1, end1, begin2, end2, __gnu_parallel::
+ equal_to<value1_type, value2_type>());
+ else
+ return search(begin1, end1, begin2, end2,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator1, typename ForwardIterator2,
+ typename IteratorTag1, typename IteratorTag2>
+ inline ForwardIterator1
+ search_switch(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2,
+ IteratorTag1, IteratorTag2)
+ { return search(begin1, end1, begin2, end2,
+ __gnu_parallel::sequential_tag()); }
+
+ // Public interface.
+ template<typename ForwardIterator1, typename ForwardIterator2>
+ inline ForwardIterator1
+ search(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2)
+ {
+ typedef std::iterator_traits<ForwardIterator1> iterator1_traits;
+ typedef typename iterator1_traits::iterator_category iterator1_category;
+ typedef std::iterator_traits<ForwardIterator2> iterator2_traits;
+ typedef typename iterator2_traits::iterator_category iterator2_category;
+
+ return search_switch(begin1, end1, begin2, end2,
+ iterator1_category(), iterator2_category());
+ }
+
+ // Public interface.
+ template<typename ForwardIterator1, typename ForwardIterator2,
+ typename BinaryPredicate>
+ inline ForwardIterator1
+ search(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2,
+ BinaryPredicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::search(begin1, end1, begin2, end2, pred); }
+
+ // Parallel algorithm for random access iterator.
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename BinaryPredicate>
+ RandomAccessIterator1
+ search_switch(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, RandomAccessIterator2 end2,
+ BinaryPredicate pred,
+ random_access_iterator_tag, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ return __gnu_parallel::search_template(begin1, end1,
+ begin2, end2, pred);
+ else
+ return search(begin1, end1, begin2, end2, pred,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator1, typename ForwardIterator2,
+ typename BinaryPredicate, typename IteratorTag1,
+ typename IteratorTag2>
+ inline ForwardIterator1
+ search_switch(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2,
+ BinaryPredicate pred, IteratorTag1, IteratorTag2)
+ { return search(begin1, end1, begin2, end2, pred,
+ __gnu_parallel::sequential_tag()); }
+
+ // Public interface
+ template<typename ForwardIterator1, typename ForwardIterator2,
+ typename BinaryPredicate>
+ inline ForwardIterator1
+ search(ForwardIterator1 begin1, ForwardIterator1 end1,
+ ForwardIterator2 begin2, ForwardIterator2 end2,
+ BinaryPredicate pred)
+ {
+ typedef std::iterator_traits<ForwardIterator1> iterator1_traits;
+ typedef typename iterator1_traits::iterator_category iterator1_category;
+ typedef std::iterator_traits<ForwardIterator2> iterator2_traits;
+ typedef typename iterator2_traits::iterator_category iterator2_category;
+ return search_switch(begin1, end1, begin2, end2, pred,
+ iterator1_category(), iterator2_category());
+ }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Integer, typename T>
+ inline ForwardIterator
+ search_n(ForwardIterator begin, ForwardIterator end, Integer count,
+ const T& val, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::search_n(begin, end, count, val); }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Integer, typename T,
+ typename BinaryPredicate>
+ inline ForwardIterator
+ search_n(ForwardIterator begin, ForwardIterator end, Integer count,
+ const T& val, BinaryPredicate binary_pred,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::search_n(begin, end, count, val, binary_pred); }
+
+ // Public interface.
+ template<typename ForwardIterator, typename Integer, typename T>
+ inline ForwardIterator
+ search_n(ForwardIterator begin, ForwardIterator end, Integer count,
+ const T& val)
+ {
+ typedef typename iterator_traits<ForwardIterator>::value_type value_type;
+ return search_n(begin, end, count, val,
+ __gnu_parallel::equal_to<value_type, T>());
+ }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename Integer,
+ typename T, typename BinaryPredicate>
+ RandomAccessIterator
+ search_n_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Integer count, const T& val, BinaryPredicate binary_pred,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ {
+ __gnu_parallel::pseudo_sequence<T, Integer> ps(val, count);
+ return __gnu_parallel::search_template(begin, end, ps.begin(),
+ ps.end(), binary_pred);
+ }
+ else
+ return std::__search_n(begin, end, count, val,
+ binary_pred, random_access_iterator_tag());
+ }
+
+ // Sequential fallback for input iterator case.
+ template<typename ForwardIterator, typename Integer, typename T,
+ typename BinaryPredicate, typename IteratorTag>
+ inline ForwardIterator
+ search_n_switch(ForwardIterator begin, ForwardIterator end, Integer count,
+ const T& val, BinaryPredicate binary_pred, IteratorTag)
+ { return __search_n(begin, end, count, val, binary_pred, IteratorTag()); }
+
+ // Public interface.
+ template<typename ForwardIterator, typename Integer, typename T,
+ typename BinaryPredicate>
+ inline ForwardIterator
+ search_n(ForwardIterator begin, ForwardIterator end, Integer count,
+ const T& val, BinaryPredicate binary_pred)
+ {
+ return search_n_switch(begin, end, count, val, binary_pred,
+ typename std::iterator_traits<ForwardIterator>::
+ iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename InputIterator, typename OutputIterator,
+ typename UnaryOperation>
+ inline OutputIterator
+ transform(InputIterator begin, InputIterator end, OutputIterator result,
+ UnaryOperation unary_op, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::transform(begin, end, result, unary_op); }
+
+ // Parallel unary transform for random access iterators.
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename UnaryOperation>
+ RandomAccessIterator2
+ transform1_switch(RandomAccessIterator1 begin, RandomAccessIterator1 end,
+ RandomAccessIterator2 result, UnaryOperation unary_op,
+ random_access_iterator_tag, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().transform_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy = true;
+ typedef __gnu_parallel::iterator_pair<RandomAccessIterator1,
+ RandomAccessIterator2, random_access_iterator_tag> ip;
+ ip begin_pair(begin, result), end_pair(end, result + (end - begin));
+ __gnu_parallel::transform1_selector<ip> functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin_pair, end_pair,
+ unary_op, functionality,
+ __gnu_parallel::dummy_reduct(),
+ dummy, dummy, -1, parallelism_tag);
+ return functionality.finish_iterator;
+ }
+ else
+ return transform(begin, end, result, unary_op,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case.
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename UnaryOperation, typename IteratorTag1,
+ typename IteratorTag2>
+ inline RandomAccessIterator2
+ transform1_switch(RandomAccessIterator1 begin, RandomAccessIterator1 end,
+ RandomAccessIterator2 result, UnaryOperation unary_op,
+ IteratorTag1, IteratorTag2)
+ { return transform(begin, end, result, unary_op,
+ __gnu_parallel::sequential_tag()); }
+
+ // Public interface.
+ template<typename InputIterator, typename OutputIterator,
+ typename UnaryOperation>
+ inline OutputIterator
+ transform(InputIterator begin, InputIterator end, OutputIterator result,
+ UnaryOperation unary_op,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori_traits::iterator_category iteratori_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return transform1_switch(begin, end, result, unary_op,
+ iteratori_category(), iteratoro_category(),
+ parallelism_tag);
+ }
+
+ template<typename InputIterator, typename OutputIterator,
+ typename UnaryOperation>
+ inline OutputIterator
+ transform(InputIterator begin, InputIterator end, OutputIterator result,
+ UnaryOperation unary_op)
+ {
+ typedef std::iterator_traits<InputIterator> iteratori_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori_traits::iterator_category iteratori_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return transform1_switch(begin, end, result, unary_op,
+ iteratori_category(), iteratoro_category());
+ }
+
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename BinaryOperation>
+ inline OutputIterator
+ transform(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, OutputIterator result,
+ BinaryOperation binary_op, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::transform(begin1, end1,
+ begin2, result, binary_op); }
+
+ // Parallel binary transform for random access iterators.
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename RandomAccessIterator3, typename BinaryOperation>
+ RandomAccessIterator3
+ transform2_switch(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ RandomAccessIterator3 result, BinaryOperation binary_op,
+ random_access_iterator_tag, random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ (end1 - begin1) >= __gnu_parallel::_Settings::get().transform_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy = true;
+ typedef __gnu_parallel::iterator_triple<RandomAccessIterator1,
+ RandomAccessIterator2, RandomAccessIterator3,
+ random_access_iterator_tag> ip;
+ ip begin_triple(begin1, begin2, result),
+ end_triple(end1, begin2 + (end1 - begin1),
+ result + (end1 - begin1));
+ __gnu_parallel::transform2_selector<ip> functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin_triple, end_triple,
+ binary_op, functionality,
+ __gnu_parallel::dummy_reduct(),
+ dummy, dummy, -1,
+ parallelism_tag);
+ return functionality.finish_iterator;
+ }
+ else
+ return transform(begin1, end1, begin2, result, binary_op,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename BinaryOperation,
+ typename tag1, typename tag2, typename tag3>
+ inline OutputIterator
+ transform2_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, OutputIterator result,
+ BinaryOperation binary_op, tag1, tag2, tag3)
+ { return transform(begin1, end1, begin2, result, binary_op,
+ __gnu_parallel::sequential_tag()); }
+
+ // Public interface.
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename BinaryOperation>
+ inline OutputIterator
+ transform(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, OutputIterator result,
+ BinaryOperation binary_op,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return transform2_switch(begin1, end1, begin2, result, binary_op,
+ iteratori1_category(), iteratori2_category(),
+ iteratoro_category(), parallelism_tag);
+ }
+
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename BinaryOperation>
+ inline OutputIterator
+ transform(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, OutputIterator result,
+ BinaryOperation binary_op)
+ {
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return transform2_switch(begin1, end1, begin2, result, binary_op,
+ iteratori1_category(), iteratori2_category(),
+ iteratoro_category());
+ }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename T>
+ inline void
+ replace(ForwardIterator begin, ForwardIterator end, const T& old_value,
+ const T& new_value, __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::replace(begin, end, old_value, new_value); }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename T, typename IteratorTag>
+ inline void
+ replace_switch(ForwardIterator begin, ForwardIterator end,
+ const T& old_value, const T& new_value, IteratorTag)
+ { replace(begin, end, old_value, new_value,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel replace for random access iterators
+ template<typename RandomAccessIterator, typename T>
+ inline void
+ replace_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ const T& old_value, const T& new_value,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ // XXX parallel version is where?
+ replace(begin, end, old_value, new_value,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface
+ template<typename ForwardIterator, typename T>
+ inline void
+ replace(ForwardIterator begin, ForwardIterator end, const T& old_value,
+ const T& new_value, __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ replace_switch(begin, end, old_value, new_value, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename ForwardIterator, typename T>
+ inline void
+ replace(ForwardIterator begin, ForwardIterator end, const T& old_value,
+ const T& new_value)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ replace_switch(begin, end, old_value, new_value, iterator_category());
+ }
+
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Predicate, typename T>
+ inline void
+ replace_if(ForwardIterator begin, ForwardIterator end, Predicate pred,
+ const T& new_value, __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::replace_if(begin, end, pred, new_value); }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename Predicate, typename T,
+ typename IteratorTag>
+ inline void
+ replace_if_switch(ForwardIterator begin, ForwardIterator end,
+ Predicate pred, const T& new_value, IteratorTag)
+ { replace_if(begin, end, pred, new_value,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename Predicate, typename T>
+ void
+ replace_if_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Predicate pred, const T& new_value,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().replace_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy;
+ __gnu_parallel::
+ replace_if_selector<RandomAccessIterator, Predicate, T>
+ functionality(new_value);
+ __gnu_parallel::
+ for_each_template_random_access(begin, end, pred,
+ functionality,
+ __gnu_parallel::dummy_reduct(),
+ true, dummy, -1, parallelism_tag);
+ }
+ else
+ replace_if(begin, end, pred, new_value,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename ForwardIterator, typename Predicate, typename T>
+ inline void
+ replace_if(ForwardIterator begin, ForwardIterator end,
+ Predicate pred, const T& new_value,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<ForwardIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ replace_if_switch(begin, end, pred, new_value, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename ForwardIterator, typename Predicate, typename T>
+ inline void
+ replace_if(ForwardIterator begin, ForwardIterator end,
+ Predicate pred, const T& new_value)
+ {
+ typedef std::iterator_traits<ForwardIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ replace_if_switch(begin, end, pred, new_value, iterator_category());
+ }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Generator>
+ inline void
+ generate(ForwardIterator begin, ForwardIterator end, Generator gen,
+ __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::generate(begin, end, gen); }
+
+ // Sequential fallback for input iterator case.
+ template<typename ForwardIterator, typename Generator, typename IteratorTag>
+ inline void
+ generate_switch(ForwardIterator begin, ForwardIterator end, Generator gen,
+ IteratorTag)
+ { generate(begin, end, gen, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename Generator>
+ void
+ generate_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Generator gen, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().generate_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy;
+ __gnu_parallel::generate_selector<RandomAccessIterator>
+ functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end, gen, functionality,
+ __gnu_parallel::dummy_reduct(),
+ true, dummy, -1, parallelism_tag);
+ }
+ else
+ generate(begin, end, gen, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename ForwardIterator, typename Generator>
+ inline void
+ generate(ForwardIterator begin, ForwardIterator end,
+ Generator gen, __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<ForwardIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ generate_switch(begin, end, gen, iterator_category(), parallelism_tag);
+ }
+
+ template<typename ForwardIterator, typename Generator>
+ inline void
+ generate(ForwardIterator begin, ForwardIterator end, Generator gen)
+ {
+ typedef std::iterator_traits<ForwardIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ generate_switch(begin, end, gen, iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename OutputIterator, typename Size, typename Generator>
+ inline OutputIterator
+ generate_n(OutputIterator begin, Size n, Generator gen,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::generate_n(begin, n, gen); }
+
+ // Sequential fallback for input iterator case.
+ template<typename OutputIterator, typename Size, typename Generator,
+ typename IteratorTag>
+ inline OutputIterator
+ generate_n_switch(OutputIterator begin, Size n, Generator gen, IteratorTag)
+ { return generate_n(begin, n, gen, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename Size, typename Generator>
+ inline RandomAccessIterator
+ generate_n_switch(RandomAccessIterator begin, Size n, Generator gen,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ // XXX parallel version is where?
+ return generate_n(begin, n, gen, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename OutputIterator, typename Size, typename Generator>
+ inline OutputIterator
+ generate_n(OutputIterator begin, Size n, Generator gen,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<OutputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return generate_n_switch(begin, n, gen, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename OutputIterator, typename Size, typename Generator>
+ inline OutputIterator
+ generate_n(OutputIterator begin, Size n, Generator gen)
+ {
+ typedef std::iterator_traits<OutputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return generate_n_switch(begin, n, gen, iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename RandomAccessIterator>
+ inline void
+ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end,
+ __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::random_shuffle(begin, end); }
+
+ // Sequential fallback.
+ template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ inline void
+ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end,
+ RandomNumberGenerator& rand, __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::random_shuffle(begin, end, rand); }
+
+
+ /** @brief Functor wrapper for std::rand(). */
+ template<typename must_be_int = int>
+ struct c_rand_number
+ {
+ int
+ operator()(int limit)
+ { return rand() % limit; }
+ };
+
+ // Fill in random number generator.
+ template<typename RandomAccessIterator>
+ inline void
+ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end)
+ {
+ c_rand_number<> r;
+ // Parallelization still possible.
+ random_shuffle(begin, end, r);
+ }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ void
+ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end,
+ RandomNumberGenerator& rand)
+ {
+ if (begin == end)
+ return;
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().random_shuffle_minimal_n))
+ __gnu_parallel::parallel_random_shuffle(begin, end, rand);
+ else
+ __gnu_parallel::sequential_random_shuffle(begin, end, rand);
+ }
+
+ // Sequential fallback.
+ template<typename ForwardIterator, typename Predicate>
+ inline ForwardIterator
+ partition(ForwardIterator begin, ForwardIterator end,
+ Predicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::partition(begin, end, pred); }
+
+ // Sequential fallback for input iterator case.
+ template<typename ForwardIterator, typename Predicate, typename IteratorTag>
+ inline ForwardIterator
+ partition_switch(ForwardIterator begin, ForwardIterator end,
+ Predicate pred, IteratorTag)
+ { return partition(begin, end, pred, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator, typename Predicate>
+ RandomAccessIterator
+ partition_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Predicate pred, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().partition_minimal_n))
+ {
+ typedef typename std::iterator_traits<RandomAccessIterator>::
+ difference_type difference_type;
+ difference_type middle = __gnu_parallel::
+ parallel_partition(begin, end, pred,
+ __gnu_parallel::get_max_threads());
+ return begin + middle;
+ }
+ else
+ return partition(begin, end, pred, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename ForwardIterator, typename Predicate>
+ inline ForwardIterator
+ partition(ForwardIterator begin, ForwardIterator end, Predicate pred)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return partition_switch(begin, end, pred, iterator_category());
+ }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator>
+ inline void
+ sort(RandomAccessIterator begin, RandomAccessIterator end,
+ __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::sort(begin, end); }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator, typename Comparator>
+ inline void
+ sort(RandomAccessIterator begin, RandomAccessIterator end, Comparator comp,
+ __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::sort<RandomAccessIterator, Comparator>(begin, end,
+ comp); }
+
+ // Public interface, insert default comparator
+ template<typename RandomAccessIterator>
+ inline void
+ sort(RandomAccessIterator begin, RandomAccessIterator end)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ sort(begin, end, std::less<value_type>());
+ }
+
+ template<typename RandomAccessIterator, typename Comparator>
+ void
+ sort(RandomAccessIterator begin, RandomAccessIterator end, Comparator comp)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+
+ if (begin != end)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().sort_minimal_n))
+ __gnu_parallel::parallel_sort(begin, end, comp, false);
+ else
+ sort(begin, end, comp, __gnu_parallel::sequential_tag());
+ }
+ }
+
+ // Sequential fallback.
+ template<typename RandomAccessIterator>
+ inline void
+ stable_sort(RandomAccessIterator begin, RandomAccessIterator end,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::stable_sort(begin, end); }
+
+ // Sequential fallback.
+ template<typename RandomAccessIterator, typename Comparator>
+ inline void
+ stable_sort(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::stable_sort(begin, end, comp); }
+
+ template<typename RandomAccessIterator>
+ inline void
+ stable_sort(RandomAccessIterator begin, RandomAccessIterator end)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ stable_sort(begin, end, std::less<value_type>());
+ }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename Comparator>
+ void
+ stable_sort(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp)
+ {
+ if (begin != end)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().sort_minimal_n))
+ __gnu_parallel::parallel_sort(begin, end, comp, true);
+ else
+ stable_sort(begin, end, comp, __gnu_parallel::sequential_tag());
+ }
+ }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ merge(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ InputIterator2 end2, OutputIterator result,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::merge(begin1, end1, begin2, end2, result); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Comparator>
+ inline OutputIterator
+ merge(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ InputIterator2 end2, OutputIterator result, Comparator comp,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::merge(begin1, end1, begin2, end2, result, comp); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Comparator,
+ typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
+ inline OutputIterator
+ merge_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator result, Comparator comp,
+ IteratorTag1, IteratorTag2, IteratorTag3)
+ { return _GLIBCXX_STD_P::merge(begin1, end1, begin2, end2,
+ result, comp); }
+
+ // Parallel algorithm for random access iterators
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Comparator>
+ OutputIterator
+ merge_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ OutputIterator result, Comparator comp,
+ random_access_iterator_tag, random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ (static_cast<__gnu_parallel::sequence_index_t>(end1 - begin1)
+ >= __gnu_parallel::_Settings::get().merge_minimal_n
+ || static_cast<__gnu_parallel::sequence_index_t>(end2 - begin2)
+ >= __gnu_parallel::_Settings::get().merge_minimal_n)))
+ return __gnu_parallel::parallel_merge_advance(begin1, end1,
+ begin2, end2,
+ result, (end1 - begin1)
+ + (end2 - begin2), comp);
+ else
+ return __gnu_parallel::merge_advance(begin1, end1, begin2, end2,
+ result, (end1 - begin1)
+ + (end2 - begin2), comp);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator, typename Comparator>
+ inline OutputIterator
+ merge(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ InputIterator2 end2, OutputIterator result, Comparator comp)
+ {
+ typedef typename iterator_traits<InputIterator1>::value_type value_type;
+
+ typedef std::iterator_traits<InputIterator1> iteratori1_traits;
+ typedef std::iterator_traits<InputIterator2> iteratori2_traits;
+ typedef std::iterator_traits<OutputIterator> iteratoro_traits;
+ typedef typename iteratori1_traits::iterator_category
+ iteratori1_category;
+ typedef typename iteratori2_traits::iterator_category
+ iteratori2_category;
+ typedef typename iteratoro_traits::iterator_category iteratoro_category;
+
+ return merge_switch(begin1, end1, begin2, end2, result, comp,
+ iteratori1_category(), iteratori2_category(),
+ iteratoro_category());
+ }
+
+
+ // Public interface, insert default comparator
+ template<typename InputIterator1, typename InputIterator2,
+ typename OutputIterator>
+ inline OutputIterator
+ merge(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ InputIterator2 end2, OutputIterator result)
+ {
+ typedef std::iterator_traits<InputIterator1> iterator1_traits;
+ typedef std::iterator_traits<InputIterator2> iterator2_traits;
+ typedef typename iterator1_traits::value_type value1_type;
+ typedef typename iterator2_traits::value_type value2_type;
+
+ return merge(begin1, end1, begin2, end2, result,
+ __gnu_parallel::less<value1_type, value2_type>());
+ }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator>
+ inline void
+ nth_element(RandomAccessIterator begin, RandomAccessIterator nth,
+ RandomAccessIterator end, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::nth_element(begin, nth, end); }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator, typename Comparator>
+ inline void
+ nth_element(RandomAccessIterator begin, RandomAccessIterator nth,
+ RandomAccessIterator end, Comparator comp,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::nth_element(begin, nth, end, comp); }
+
+ // Public interface
+ template<typename RandomAccessIterator, typename Comparator>
+ inline void
+ nth_element(RandomAccessIterator begin, RandomAccessIterator nth,
+ RandomAccessIterator end, Comparator comp)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().nth_element_minimal_n))
+ __gnu_parallel::parallel_nth_element(begin, nth, end, comp);
+ else
+ nth_element(begin, nth, end, comp, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface, insert default comparator
+ template<typename RandomAccessIterator>
+ inline void
+ nth_element(RandomAccessIterator begin, RandomAccessIterator nth,
+ RandomAccessIterator end)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ nth_element(begin, nth, end, std::less<value_type>());
+ }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator, typename _Compare>
+ inline void
+ partial_sort(RandomAccessIterator begin, RandomAccessIterator middle,
+ RandomAccessIterator end, _Compare comp,
+ __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::partial_sort(begin, middle, end, comp); }
+
+ // Sequential fallback
+ template<typename RandomAccessIterator>
+ inline void
+ partial_sort(RandomAccessIterator begin, RandomAccessIterator middle,
+ RandomAccessIterator end, __gnu_parallel::sequential_tag)
+ { _GLIBCXX_STD_P::partial_sort(begin, middle, end); }
+
+ // Public interface, parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename _Compare>
+ void
+ partial_sort(RandomAccessIterator begin, RandomAccessIterator middle,
+ RandomAccessIterator end, _Compare comp)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().partial_sort_minimal_n))
+ __gnu_parallel::parallel_partial_sort(begin, middle, end, comp);
+ else
+ partial_sort(begin, middle, end, comp,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface, insert default comparator
+ template<typename RandomAccessIterator>
+ inline void
+ partial_sort(RandomAccessIterator begin, RandomAccessIterator middle,
+ RandomAccessIterator end)
+ {
+ typedef iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ partial_sort(begin, middle, end, std::less<value_type>());
+ }
+
+ // Sequential fallback
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::max_element(begin, end); }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end, Comparator comp,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::max_element(begin, end, comp); }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename Comparator, typename IteratorTag>
+ inline ForwardIterator
+ max_element_switch(ForwardIterator begin, ForwardIterator end,
+ Comparator comp, IteratorTag)
+ { return max_element(begin, end, comp, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename Comparator>
+ RandomAccessIterator
+ max_element_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().max_element_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ RandomAccessIterator res(begin);
+ __gnu_parallel::identity_selector<RandomAccessIterator>
+ functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end,
+ __gnu_parallel::nothing(),
+ functionality,
+ __gnu_parallel::
+ max_element_reduct<Comparator,
+ RandomAccessIterator>(comp),
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return max_element(begin, end, comp, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface, insert default comparator
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef typename iterator_traits<ForwardIterator>::value_type value_type;
+ return max_element(begin, end, std::less<value_type>(), parallelism_tag);
+ }
+
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end)
+ {
+ typedef typename iterator_traits<ForwardIterator>::value_type value_type;
+ return max_element(begin, end, std::less<value_type>());
+ }
+
+ // Public interface
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end, Comparator comp,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return max_element_switch(begin, end, comp, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ max_element(ForwardIterator begin, ForwardIterator end, Comparator comp)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return max_element_switch(begin, end, comp, iterator_category());
+ }
+
+
+ // Sequential fallback
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::min_element(begin, end); }
+
+ // Sequential fallback
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end, Comparator comp,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::min_element(begin, end, comp); }
+
+ // Sequential fallback for input iterator case
+ template<typename ForwardIterator, typename Comparator, typename IteratorTag>
+ inline ForwardIterator
+ min_element_switch(ForwardIterator begin, ForwardIterator end,
+ Comparator comp, IteratorTag)
+ { return min_element(begin, end, comp, __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators
+ template<typename RandomAccessIterator, typename Comparator>
+ RandomAccessIterator
+ min_element_switch(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().min_element_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ RandomAccessIterator res(begin);
+ __gnu_parallel::identity_selector<RandomAccessIterator>
+ functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end,
+ __gnu_parallel::nothing(),
+ functionality,
+ __gnu_parallel::
+ min_element_reduct<Comparator,
+ RandomAccessIterator>(comp),
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return min_element(begin, end, comp, __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface, insert default comparator
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef typename iterator_traits<ForwardIterator>::value_type value_type;
+ return min_element(begin, end, std::less<value_type>(), parallelism_tag);
+ }
+
+ template<typename ForwardIterator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end)
+ {
+ typedef typename iterator_traits<ForwardIterator>::value_type value_type;
+ return min_element(begin, end, std::less<value_type>());
+ }
+
+ // Public interface
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end, Comparator comp,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return min_element_switch(begin, end, comp, iterator_category(),
+ parallelism_tag);
+ }
+
+ template<typename ForwardIterator, typename Comparator>
+ inline ForwardIterator
+ min_element(ForwardIterator begin, ForwardIterator end, Comparator comp)
+ {
+ typedef iterator_traits<ForwardIterator> traits_type;
+ typedef typename traits_type::iterator_category iterator_category;
+ return min_element_switch(begin, end, comp, iterator_category());
+ }
+} // end namespace
+} // end namespace
+
+#endif /* _GLIBCXX_ALGORITHM_H */
diff --git a/libstdc++-v3/include/parallel/algobase.h b/libstdc++-v3/include/parallel/algobase.h
new file mode 100644
index 00000000000..821985d49b1
--- /dev/null
+++ b/libstdc++-v3/include/parallel/algobase.h
@@ -0,0 +1,287 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/algobase.h
+ * @brief Parallel STL function calls corresponding to the
+ * stl_algobase.h header. The functions defined here mainly do case
+ * switches and call the actual parallelized versions in other files.
+ * Inlining policy: Functions that basically only contain one
+ * function call, are declared inline.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_ALGOBASE_H
+#define _GLIBCXX_PARALLEL_ALGOBASE_H 1
+
+#include <bits/stl_algobase.h>
+#include <parallel/base.h>
+#include <parallel/tags.h>
+#include <parallel/settings.h>
+#include <parallel/find.h>
+#include <parallel/find_selectors.h>
+
+namespace std
+{
+namespace __parallel
+{
+ // NB: equal and lexicographical_compare require mismatch.
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2>
+ inline pair<InputIterator1, InputIterator2>
+ mismatch(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::mismatch(begin1, end1, begin2); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline pair<InputIterator1, InputIterator2>
+ mismatch(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ Predicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::mismatch(begin1, end1, begin2, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename IteratorTag1, typename IteratorTag2>
+ inline pair<InputIterator1, InputIterator2>
+ mismatch_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, Predicate pred, IteratorTag1,
+ IteratorTag2)
+ { return _GLIBCXX_STD_P::mismatch(begin1, end1, begin2, pred); }
+
+ // Parallel mismatch for random access iterators
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Predicate>
+ pair<RandomAccessIterator1, RandomAccessIterator2>
+ mismatch_switch(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Predicate pred,
+ random_access_iterator_tag, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ {
+ RandomAccessIterator1 res =
+ __gnu_parallel::find_template(begin1, end1, begin2, pred,
+ __gnu_parallel::
+ mismatch_selector()).first;
+ return make_pair(res , begin2 + (res - begin1));
+ }
+ else
+ return _GLIBCXX_STD_P::mismatch(begin1, end1, begin2, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2>
+ inline pair<InputIterator1, InputIterator2>
+ mismatch(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2)
+ {
+ typedef std::iterator_traits<InputIterator1> iterator1_traits;
+ typedef std::iterator_traits<InputIterator2> iterator2_traits;
+ typedef typename iterator1_traits::value_type value1_type;
+ typedef typename iterator2_traits::value_type value2_type;
+ typedef typename iterator1_traits::iterator_category iterator1_category;
+ typedef typename iterator2_traits::iterator_category iterator2_category;
+
+ typedef __gnu_parallel::equal_to<value1_type, value2_type> equal_to_type;
+
+ return mismatch_switch(begin1, end1, begin2, equal_to_type(),
+ iterator1_category(), iterator2_category());
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline pair<InputIterator1, InputIterator2>
+ mismatch(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ Predicate pred)
+ {
+ typedef std::iterator_traits<InputIterator1> iterator1_traits;
+ typedef std::iterator_traits<InputIterator2> iterator2_traits;
+ typedef typename iterator1_traits::iterator_category iterator1_category;
+ typedef typename iterator2_traits::iterator_category iterator2_category;
+
+ return mismatch_switch(begin1, end1, begin2, pred, iterator1_category(),
+ iterator2_category());
+ }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2>
+ inline bool
+ equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::equal(begin1, end1, begin2); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline bool
+ equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ Predicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::equal(begin1, end1, begin2, pred); }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2>
+ inline bool
+ equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2)
+ { return mismatch(begin1, end1, begin2).first == end1; }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline bool
+ equal(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2,
+ Predicate pred)
+ { return mismatch(begin1, end1, begin2, pred).first == end1; }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2>
+ inline bool
+ lexicographical_compare(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::lexicographical_compare(begin1, end1,
+ begin2, end2); }
+
+ // Sequential fallback
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline bool
+ lexicographical_compare(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ Predicate pred, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::lexicographical_compare(begin1, end1,
+ begin2, end2, pred); }
+
+ // Sequential fallback for input iterator case
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate, typename IteratorTag1, typename IteratorTag2>
+ inline bool
+ lexicographical_compare_switch(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ Predicate pred, IteratorTag1, IteratorTag2)
+ { return _GLIBCXX_STD_P::lexicographical_compare(begin1, end1,
+ begin2, end2, pred); }
+
+ // Parallel lexicographical_compare for random access iterators
+ // Limitation: Both valuetypes must be the same
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Predicate>
+ bool
+ lexicographical_compare_switch(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ RandomAccessIterator2 end2, Predicate pred,
+ random_access_iterator_tag,
+ random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(true))
+ {
+ typedef iterator_traits<RandomAccessIterator1> traits1_type;
+ typedef typename traits1_type::value_type value1_type;
+
+ typedef iterator_traits<RandomAccessIterator2> traits2_type;
+ typedef typename traits2_type::value_type value2_type;
+
+ typedef __gnu_parallel::equal_from_less<Predicate, value1_type,
+ value2_type> equal_type;
+
+ // Longer sequence in first place.
+ if ((end1 - begin1) < (end2 - begin2))
+ {
+ typedef pair<RandomAccessIterator1, RandomAccessIterator2>
+ pair_type;
+ pair_type mm = mismatch_switch(begin1, end1, begin2,
+ equal_type(pred),
+ random_access_iterator_tag(),
+ random_access_iterator_tag());
+
+ return (mm.first == end1) || bool(pred(*mm.first, *mm.second));
+ }
+ else
+ {
+ typedef pair<RandomAccessIterator2, RandomAccessIterator1>
+ pair_type;
+ pair_type mm = mismatch_switch(begin2, end2, begin1,
+ equal_type(pred),
+ random_access_iterator_tag(),
+ random_access_iterator_tag());
+
+ return (mm.first != end2) && bool(pred(*mm.second, *mm.first));
+ }
+ }
+ else
+ return _GLIBCXX_STD_P::lexicographical_compare(begin1, end1,
+ begin2, end2, pred);
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2>
+ inline bool
+ lexicographical_compare(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2)
+ {
+ typedef iterator_traits<InputIterator1> traits1_type;
+ typedef typename traits1_type::value_type value1_type;
+ typedef typename traits1_type::iterator_category iterator1_category;
+
+ typedef iterator_traits<InputIterator2> traits2_type;
+ typedef typename traits2_type::value_type value2_type;
+ typedef typename traits2_type::iterator_category iterator2_category;
+ typedef __gnu_parallel::less<value1_type, value2_type> less_type;
+
+ return lexicographical_compare_switch(begin1, end1, begin2, end2,
+ less_type(), iterator1_category(),
+ iterator2_category());
+ }
+
+ // Public interface
+ template<typename InputIterator1, typename InputIterator2,
+ typename Predicate>
+ inline bool
+ lexicographical_compare(InputIterator1 begin1, InputIterator1 end1,
+ InputIterator2 begin2, InputIterator2 end2,
+ Predicate pred)
+ {
+ typedef iterator_traits<InputIterator1> traits1_type;
+ typedef typename traits1_type::iterator_category iterator1_category;
+
+ typedef iterator_traits<InputIterator2> traits2_type;
+ typedef typename traits2_type::iterator_category iterator2_category;
+
+ return lexicographical_compare_switch(begin1, end1, begin2, end2, pred,
+ iterator1_category(),
+ iterator2_category());
+ }
+} // end namespace
+} // end namespace
+
+#endif /* _GLIBCXX_ALGOBASE_H */
diff --git a/libstdc++-v3/include/parallel/algorithm b/libstdc++-v3/include/parallel/algorithm
new file mode 100644
index 00000000000..0672e372eb9
--- /dev/null
+++ b/libstdc++-v3/include/parallel/algorithm
@@ -0,0 +1,45 @@
+// Algorithm extensions -*- C++ -*-
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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 parallel/algorithm
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _PARALLEL_ALGORITHM
+#define _PARALLEL_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include <algorithm>
+#include <parallel/algorithmfwd.h>
+#include <parallel/algobase.h>
+#include <parallel/algo.h>
+
+#endif
diff --git a/libstdc++-v3/include/parallel/algorithmfwd.h b/libstdc++-v3/include/parallel/algorithmfwd.h
new file mode 100644
index 00000000000..ea6b245eb7e
--- /dev/null
+++ b/libstdc++-v3/include/parallel/algorithmfwd.h
@@ -0,0 +1,895 @@
+// <algorithm> parallel extensions -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/algorithmfwd.h
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H
+#define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1
+
+#pragma GCC system_header
+
+#include <parallel/tags.h>
+#include <parallel/settings.h>
+
+namespace std
+{
+namespace __parallel
+{
+ template<typename _FIter>
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ template<typename _FIter>
+ _FIter
+ adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _IterTag>
+ _FIter
+ adjacent_find_switch(_FIter, _FIter, _IterTag);
+
+ template<typename _RAIter>
+ _RAIter
+ adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag);
+
+
+ template<typename _FIter, typename _BiPredicate>
+ _FIter
+ adjacent_find(_FIter, _FIter, _BiPredicate);
+
+ template<typename _FIter, typename _BiPredicate>
+ _FIter
+ adjacent_find(_FIter, _FIter, _BiPredicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _BiPredicate, typename _IterTag>
+ _FIter
+ adjacent_find_switch(_FIter, _FIter, _BiPredicate, _IterTag);
+
+ template<typename _RAIter, typename _BiPredicate>
+ _RAIter
+ adjacent_find_switch(_RAIter, _RAIter, _BiPredicate,
+ random_access_iterator_tag);
+
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&);
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&, __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _Tp, typename _IterTag>
+ typename iterator_traits<_IIter>::difference_type
+ count_switch(_IIter, _IIter, const _Tp&, _IterTag);
+
+ template<typename _RAIter, typename _Tp>
+ typename iterator_traits<_RAIter>::difference_type
+ count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate, __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _Predicate, typename _IterTag>
+ typename iterator_traits<_IIter>::difference_type
+ count_if_switch(_IIter, _IIter, _Predicate, _IterTag);
+
+ template<typename _RAIter, typename _Predicate>
+ typename iterator_traits<_RAIter>::difference_type
+ count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ // algobase.h
+ template<typename _IIter1, typename _IIter2>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename Predicate>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ equal(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename Predicate>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, Predicate);
+
+ template<typename _IIter, typename _Tp>
+ _IIter
+ find(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Tp>
+ _IIter
+ find(_IIter, _IIter, const _Tp& val);
+
+ template<typename _IIter, typename _Tp, typename _IterTag>
+ _IIter
+ find_switch(_IIter, _IIter, const _Tp&, _IterTag);
+
+ template<typename _RAIter, typename _Tp>
+ _RAIter
+ find_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag);
+
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter, typename _Predicate, typename _IterTag>
+ _IIter
+ find_if_switch(_IIter, _IIter, _Predicate, _IterTag);
+
+ template<typename _RAIter, typename _Predicate>
+ _RAIter
+ find_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag);
+
+ template<typename _IIter, typename _FIter>
+ _IIter
+ find_first_of(_IIter, _IIter, _FIter, _FIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _FIter, typename _BiPredicate>
+ _IIter
+ find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _FIter, typename _BiPredicate>
+ _IIter
+ find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate);
+
+ template<typename _IIter, typename _FIter>
+ _IIter
+ find_first_of(_IIter, _IIter, _FIter, _FIter);
+
+ template<typename _IIter, typename _FIter,
+ typename _IterTag1, typename _IterTag2>
+ _IIter
+ find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2);
+
+ template<typename _RAIter, typename _FIter, typename _BiPredicate,
+ typename _IterTag>
+ _RAIter
+ find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, _BiPredicate,
+ random_access_iterator_tag, _IterTag);
+
+ template<typename _IIter, typename _FIter, typename _BiPredicate,
+ typename _IterTag1, typename _IterTag2>
+ _IIter
+ find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
+ _IterTag1, _IterTag2);
+
+
+ template<typename _IIter, typename _Function>
+ _Function
+ for_each(_IIter, _IIter, _Function);
+
+ template<typename _IIter, typename _Function>
+ _Function
+ for_each(_IIter, _IIter, _Function, __gnu_parallel::sequential_tag);
+
+ template<typename _Iterator, typename _Function>
+ _Function
+ for_each(_Iterator, _Iterator, _Function, __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _Function, typename _IterTag>
+ _Function
+ for_each_switch(_IIter, _IIter, _Function, _IterTag);
+
+ template<typename _RAIter, typename _Function>
+ _Function
+ for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator);
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator, __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Generator, typename _IterTag>
+ void
+ generate_switch(_FIter, _FIter, _Generator, _IterTag);
+
+ template<typename _RAIter, typename _Generator>
+ void
+ generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ _OIter
+ generate_n(_OIter, _Size, _Generator);
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ _OIter
+ generate_n(_OIter, _Size, _Generator, __gnu_parallel::sequential_tag);
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ _OIter
+ generate_n(_OIter, _Size, _Generator, __gnu_parallel::_Parallelism);
+
+ template<typename _OIter, typename _Size, typename _Generator,
+ typename _IterTag>
+ _OIter
+ generate_n_switch(_OIter, _Size, _Generator, _IterTag);
+
+ template<typename _RAIter, typename _Size, typename _Generator>
+ _RAIter
+ generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate);
+
+ template<typename _IIter1, typename _IIter2,
+ typename _Predicate, typename _IterTag1, typename _IterTag2>
+ bool
+ lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2,
+ _Predicate, _IterTag1, _IterTag2);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Predicate>
+ bool
+ lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
+ _Predicate, random_access_iterator_tag,
+ random_access_iterator_tag);
+
+ // algo.h
+ template<typename _IIter1, typename _IIter2>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, _Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, _Predicate);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate,
+ typename _IterTag1, typename _IterTag2>
+ pair<_IIter1, _IIter2>
+ mismatch_switch(_IIter1, _IIter1, _IIter2, _Predicate,
+ _IterTag1, _IterTag2);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Predicate>
+ pair<_RAIter1, _RAIter2>
+ mismatch_switch(_RAIter1, _RAIter1, _RAIter2, _Predicate,
+ random_access_iterator_tag, random_access_iterator_tag);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BiPredicate>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter1, typename _FIter2, typename _BiPredicate>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate);
+
+ template<typename _RAIter1, typename _RAIter2>
+ _RAIter1
+ search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
+ random_access_iterator_tag, random_access_iterator_tag);
+
+ template<typename _FIter1, typename _FIter2, typename _IterTag1,
+ typename _IterTag2>
+ _FIter1
+ search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2);
+
+ template<typename _RAIter1, typename _RAIter2, typename _BiPredicate>
+ _RAIter1
+ search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _BiPredicate,
+ random_access_iterator_tag, random_access_iterator_tag);
+
+ template<typename _FIter1, typename _FIter2, typename _BiPredicate,
+ typename _IterTag1, typename _IterTag2>
+ _FIter1
+ search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
+ _IterTag1, _IterTag2);
+
+ template<typename _FIter, typename _Integer, typename _Tp>
+ _FIter
+ search_n(_FIter, _FIter, _Integer, const _Tp&,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Integer, typename _Tp,
+ typename _BiPredicate>
+ _FIter
+ search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Integer, typename _Tp>
+ _FIter
+ search_n(_FIter, _FIter, _Integer, const _Tp&);
+
+ template<typename _FIter, typename _Integer, typename _Tp,
+ typename _BiPredicate>
+ _FIter
+ search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate);
+
+ template<typename _RAIter, typename _Integer, typename _Tp,
+ typename _BiPredicate>
+ _RAIter
+ search_n_switch(_RAIter, _RAIter, _Integer, const _Tp&,
+ _BiPredicate, random_access_iterator_tag);
+
+ template<typename _FIter, typename _Integer, typename _Tp,
+ typename _BiPredicate, typename _IterTag>
+ _FIter
+ search_n_switch(_FIter, _FIter, _Integer, const _Tp&,
+ _BiPredicate, _IterTag);
+
+
+ template<typename _IIter, typename _OIter, typename UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, UnaryOperation);
+
+ template<typename _IIter, typename _OIter, typename UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, UnaryOperation,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter, typename UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, UnaryOperation,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _OIter, typename UnaryOperation,
+ typename _IterTag1, typename _IterTag2>
+ _OIter
+ transform1_switch(_IIter, _IIter, _OIter, UnaryOperation,
+ _IterTag1, _IterTag2);
+
+
+ template<typename _RAIIter, typename _RAOIter, typename UnaryOperation>
+ _RAOIter
+ transform1_switch(_RAIIter, _RAIIter, _RAOIter, UnaryOperation,
+ random_access_iterator_tag, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BiOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BiOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BiOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _RAIter1, typename _RAIter2, typename _RAIter3,
+ typename _BiOperation>
+ _RAIter3
+ transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation,
+ random_access_iterator_tag, random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BiOperation, typename _Tag1,
+ typename _Tag2, typename _Tag3>
+ _OIter
+ transform2_switch(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
+ _Tag1, _Tag2, _Tag3);
+
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&);
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Tp, typename _IterTag>
+ void
+ replace_switch(_FIter, _FIter, const _Tp&, const _Tp&, _IterTag);
+
+ template<typename _RAIter, typename _Tp>
+ void
+ replace_switch(_RAIter, _RAIter, const _Tp&, const _Tp&,
+ random_access_iterator_tag, __gnu_parallel::_Parallelism);
+
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&);
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Predicate, typename _Tp,
+ typename _IterTag>
+ void
+ replace_if_switch(_FIter, _FIter, _Predicate, const _Tp&, _IterTag);
+
+ template<typename _RAIter, typename _Predicate, typename _Tp>
+ void
+ replace_if_switch(_RAIter, _RAIter, _Predicate, const _Tp&,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter);
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter, __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Compare, typename _IterTag>
+ _FIter
+ max_element_switch(_FIter, _FIter, _Compare, _IterTag);
+
+ template<typename _RAIter, typename _Compare>
+ _RAIter
+ max_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare, typename _IterTag1, typename _IterTag2,
+ typename _IterTag3>
+ _OIter
+ merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
+ _IterTag1, _IterTag2, _IterTag3);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
+ random_access_iterator_tag, random_access_iterator_tag,
+ random_access_iterator_tag);
+
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter);
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter, __gnu_parallel::_Parallelism parallelism_tag);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
+
+ template<typename _FIter, typename _Compare, typename _IterTag>
+ _FIter
+ min_element_switch(_FIter, _FIter, _Compare, _IterTag);
+
+ template<typename _RAIter, typename _Compare>
+ _RAIter
+ min_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _RAIter>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, _Compare,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, _Compare,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter);
+
+ template<typename _FIter, typename Predicate>
+ _FIter
+ partition(_FIter, _FIter, Predicate, __gnu_parallel::sequential_tag);
+
+ template<typename _FIter, typename Predicate>
+ _FIter
+ partition(_FIter, _FIter, Predicate);
+
+ template<typename _FIter, typename Predicate, typename _IterTag>
+ _FIter
+ partition_switch(_FIter, _FIter, Predicate, _IterTag);
+
+ template<typename _RAIter, typename Predicate>
+ _RAIter
+ partition_switch(_RAIter, _RAIter, Predicate, random_access_iterator_tag);
+
+ template<typename _RAIter>
+ void
+ random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _RandomNumberGenerator>
+ void
+ random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter>
+ void
+ random_shuffle(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _RandomNumberGenerator>
+ void
+ random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename Predicate>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate,
+ typename _OIter, typename _IterTag1, typename _IterTag2,
+ typename _IterTag3>
+ _OIter
+ set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ _Predicate, _IterTag1, _IterTag2, _IterTag3);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
+ typename _Predicate>
+ _Output_RAIter
+ set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _Output_RAIter,
+ _Predicate, random_access_iterator_tag,
+ random_access_iterator_tag, random_access_iterator_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate,
+ typename _OIter, typename _IterTag1, typename _IterTag2,
+ typename _IterTag3>
+ _OIter
+ set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ _Predicate, _IterTag1, _IterTag2, _IterTag3);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
+ typename _Predicate>
+ _Output_RAIter
+ set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
+ _Output_RAIter, _Predicate,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ _Predicate, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ _Predicate);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate,
+ typename _OIter, typename _IterTag1, typename _IterTag2,
+ typename _IterTag3>
+ _OIter
+ set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2,
+ _OIter, _Predicate, _IterTag1, _IterTag2,
+ _IterTag3);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
+ typename _Predicate>
+ _Output_RAIter
+ set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
+ _Output_RAIter, _Predicate,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag);
+
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Predicate>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2, typename _Predicate,
+ typename _OIter, typename _IterTag1, typename _IterTag2,
+ typename _IterTag3>
+ _OIter
+ set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
+ _Predicate, _IterTag1, _IterTag2, _IterTag3);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
+ typename _Predicate>
+ _Output_RAIter
+ set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
+ _Output_RAIter, _Predicate,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ random_access_iterator_tag);
+
+
+ template<typename _RAIter>
+ void
+ sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter>
+ void
+ sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
+
+ template<typename _RAIter>
+ void
+ stable_sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ stable_sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, _Predicate,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter);
+
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, _Predicate);
+
+ template<typename _IIter, typename _OIter, typename _Predicate,
+ typename _IterTag1, typename _IterTag2>
+ _OIter
+ unique_copy_switch(_IIter, _IIter, _OIter, _Predicate,
+ _IterTag1, _IterTag2);
+
+ template<typename _RAIter, typename _RandomAccess_OIter, typename _Predicate>
+ _RandomAccess_OIter
+ unique_copy_switch(_RAIter, _RAIter, _RandomAccess_OIter, _Predicate,
+ random_access_iterator_tag, random_access_iterator_tag);
+} // end namespace __parallel
+} // end namespace std
+
+#endif
diff --git a/libstdc++-v3/include/parallel/balanced_quicksort.h b/libstdc++-v3/include/parallel/balanced_quicksort.h
new file mode 100644
index 00000000000..f6b3297cb45
--- /dev/null
+++ b/libstdc++-v3/include/parallel/balanced_quicksort.h
@@ -0,0 +1,483 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/balanced_quicksort.h
+ * @brief Implementation of a dynamically load-balanced parallel quicksort.
+ *
+ * It works in-place and needs only logarithmic extra memory.
+ * The algorithm is similar to the one proposed in
+ *
+ * P. Tsigas and Y. Zhang.
+ * A simple, fast parallel implementation of quicksort and
+ * its performance evaluation on SUN enterprise 10000.
+ * In 11th Euromicro Conference on Parallel, Distributed and
+ * Network-Based Processing, page 372, 2003.
+ *
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_BAL_QUICKSORT_H
+#define _GLIBCXX_PARALLEL_BAL_QUICKSORT_H 1
+
+#include <parallel/basic_iterator.h>
+#include <bits/stl_algo.h>
+
+#include <parallel/settings.h>
+#include <parallel/partition.h>
+#include <parallel/random_number.h>
+#include <parallel/queue.h>
+#include <functional>
+
+#if _GLIBCXX_ASSERTIONS
+#include <parallel/checkers.h>
+#endif
+
+namespace __gnu_parallel
+{
+/** @brief Information local to one thread in the parallel quicksort run. */
+template<typename RandomAccessIterator>
+ struct QSBThreadLocal
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ /** @brief Continuous part of the sequence, described by an
+ iterator pair. */
+ typedef std::pair<RandomAccessIterator, RandomAccessIterator> Piece;
+
+ /** @brief Initial piece to work on. */
+ Piece initial;
+
+ /** @brief Work-stealing queue. */
+ RestrictedBoundedConcurrentQueue<Piece> leftover_parts;
+
+ /** @brief Number of threads involved in this algorithm. */
+ thread_index_t num_threads;
+
+ /** @brief Pointer to a counter of elements left over to sort. */
+ volatile difference_type* elements_leftover;
+
+ /** @brief The complete sequence to sort. */
+ Piece global;
+
+ /** @brief Constructor.
+ * @param queue_size Size of the work-stealing queue. */
+ QSBThreadLocal(int queue_size) : leftover_parts(queue_size) { }
+ };
+
+/** @brief Balanced quicksort divide step.
+ * @param begin Begin iterator of subsequence.
+ * @param end End iterator of subsequence.
+ * @param comp Comparator.
+ * @param num_threads Number of threads that are allowed to work on
+ * this part.
+ * @pre @c (end-begin)>=1 */
+template<typename RandomAccessIterator, typename Comparator>
+ typename std::iterator_traits<RandomAccessIterator>::difference_type
+ qsb_divide(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, thread_index_t num_threads)
+ {
+ _GLIBCXX_PARALLEL_ASSERT(num_threads > 0);
+
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ RandomAccessIterator pivot_pos =
+ median_of_three_iterators(begin, begin + (end - begin) / 2,
+ end - 1, comp);
+
+#if defined(_GLIBCXX_ASSERTIONS)
+ // Must be in between somewhere.
+ difference_type n = end - begin;
+
+ _GLIBCXX_PARALLEL_ASSERT(
+ (!comp(*pivot_pos, *begin) && !comp(*(begin + n / 2), *pivot_pos))
+ || (!comp(*pivot_pos, *begin) && !comp(*end, *pivot_pos))
+ || (!comp(*pivot_pos, *(begin + n / 2)) && !comp(*begin, *pivot_pos))
+ || (!comp(*pivot_pos, *(begin + n / 2)) && !comp(*end, *pivot_pos))
+ || (!comp(*pivot_pos, *end) && !comp(*begin, *pivot_pos))
+ || (!comp(*pivot_pos, *end) && !comp(*(begin + n / 2), *pivot_pos)));
+#endif
+
+ // Swap pivot value to end.
+ if (pivot_pos != (end - 1))
+ std::swap(*pivot_pos, *(end - 1));
+ pivot_pos = end - 1;
+
+ __gnu_parallel::binder2nd<Comparator, value_type, value_type, bool>
+ pred(comp, *pivot_pos);
+
+ // Divide, returning end - begin - 1 in the worst case.
+ difference_type split_pos = parallel_partition(
+ begin, end - 1, pred, num_threads);
+
+ // Swap back pivot to middle.
+ std::swap(*(begin + split_pos), *pivot_pos);
+ pivot_pos = begin + split_pos;
+
+#if _GLIBCXX_ASSERTIONS
+ RandomAccessIterator r;
+ for (r = begin; r != pivot_pos; ++r)
+ _GLIBCXX_PARALLEL_ASSERT(comp(*r, *pivot_pos));
+ for (; r != end; ++r)
+ _GLIBCXX_PARALLEL_ASSERT(!comp(*r, *pivot_pos));
+#endif
+
+ return split_pos;
+ }
+
+/** @brief Quicksort conquer step.
+ * @param tls Array of thread-local storages.
+ * @param begin Begin iterator of subsequence.
+ * @param end End iterator of subsequence.
+ * @param comp Comparator.
+ * @param iam Number of the thread processing this function.
+ * @param num_threads
+ * Number of threads that are allowed to work on this part. */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ qsb_conquer(QSBThreadLocal<RandomAccessIterator>** tls,
+ RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp,
+ thread_index_t iam, thread_index_t num_threads,
+ bool parent_wait)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type n = end - begin;
+
+ if (num_threads <= 1 || n <= 1)
+ {
+ tls[iam]->initial.first = begin;
+ tls[iam]->initial.second = end;
+
+ qsb_local_sort_with_helping(tls, comp, iam, parent_wait);
+
+ return;
+ }
+
+ // Divide step.
+ difference_type split_pos = qsb_divide(begin, end, comp, num_threads);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(0 <= split_pos && split_pos < (end - begin));
+#endif
+
+ thread_index_t num_threads_leftside =
+ std::max<thread_index_t>(1, std::min<thread_index_t>(
+ num_threads - 1, split_pos * num_threads / n));
+
+# pragma omp atomic
+ *tls[iam]->elements_leftover -= (difference_type)1;
+
+ // Conquer step.
+# pragma omp parallel num_threads(2)
+ {
+ bool wait;
+ if(omp_get_num_threads() < 2)
+ wait = false;
+ else
+ wait = parent_wait;
+
+# pragma omp sections
+ {
+# pragma omp section
+ {
+ qsb_conquer(tls, begin, begin + split_pos, comp,
+ iam,
+ num_threads_leftside,
+ wait);
+ wait = parent_wait;
+ }
+ // The pivot_pos is left in place, to ensure termination.
+# pragma omp section
+ {
+ qsb_conquer(tls, begin + split_pos + 1, end, comp,
+ iam + num_threads_leftside,
+ num_threads - num_threads_leftside,
+ wait);
+ wait = parent_wait;
+ }
+ }
+ }
+ }
+
+/**
+ * @brief Quicksort step doing load-balanced local sort.
+ * @param tls Array of thread-local storages.
+ * @param comp Comparator.
+ * @param iam Number of the thread processing this function.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ qsb_local_sort_with_helping(QSBThreadLocal<RandomAccessIterator>** tls,
+ Comparator& comp, int iam, bool wait)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef std::pair<RandomAccessIterator, RandomAccessIterator> Piece;
+
+ QSBThreadLocal<RandomAccessIterator>& tl = *tls[iam];
+
+ difference_type base_case_n = _Settings::get().sort_qsb_base_case_maximal_n;
+ if (base_case_n < 2)
+ base_case_n = 2;
+ thread_index_t num_threads = tl.num_threads;
+
+ // Every thread has its own random number generator.
+ random_number rng(iam + 1);
+
+ Piece current = tl.initial;
+
+ difference_type elements_done = 0;
+#if _GLIBCXX_ASSERTIONS
+ difference_type total_elements_done = 0;
+#endif
+
+ for (;;)
+ {
+ // Invariant: current must be a valid (maybe empty) range.
+ RandomAccessIterator begin = current.first, end = current.second;
+ difference_type n = end - begin;
+
+ if (n > base_case_n)
+ {
+ // Divide.
+ RandomAccessIterator pivot_pos = begin + rng(n);
+
+ // Swap pivot_pos value to end.
+ if (pivot_pos != (end - 1))
+ std::swap(*pivot_pos, *(end - 1));
+ pivot_pos = end - 1;
+
+ __gnu_parallel::binder2nd
+ <Comparator, value_type, value_type, bool>
+ pred(comp, *pivot_pos);
+
+ // Divide, leave pivot unchanged in last place.
+ RandomAccessIterator split_pos1, split_pos2;
+ split_pos1 = __gnu_sequential::partition(begin, end - 1, pred);
+
+ // Left side: < pivot_pos; right side: >= pivot_pos.
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(begin <= split_pos1 && split_pos1 < end);
+#endif
+ // Swap pivot back to middle.
+ if (split_pos1 != pivot_pos)
+ std::swap(*split_pos1, *pivot_pos);
+ pivot_pos = split_pos1;
+
+ // In case all elements are equal, split_pos1 == 0.
+ if ((split_pos1 + 1 - begin) < (n >> 7)
+ || (end - split_pos1) < (n >> 7))
+ {
+ // Very unequal split, one part smaller than one 128th
+ // elements not strictly larger than the pivot.
+ __gnu_parallel::unary_negate<__gnu_parallel::binder1st
+ <Comparator, value_type, value_type, bool>, value_type>
+ pred(__gnu_parallel::binder1st
+ <Comparator, value_type, value_type, bool>(comp,
+ *pivot_pos));
+
+ // Find other end of pivot-equal range.
+ split_pos2 = __gnu_sequential::partition(split_pos1 + 1,
+ end, pred);
+ }
+ else
+ // Only skip the pivot.
+ split_pos2 = split_pos1 + 1;
+
+ // Elements equal to pivot are done.
+ elements_done += (split_pos2 - split_pos1);
+#if _GLIBCXX_ASSERTIONS
+ total_elements_done += (split_pos2 - split_pos1);
+#endif
+ // Always push larger part onto stack.
+ if (((split_pos1 + 1) - begin) < (end - (split_pos2)))
+ {
+ // Right side larger.
+ if ((split_pos2) != end)
+ tl.leftover_parts.push_front(std::make_pair(split_pos2,
+ end));
+
+ //current.first = begin; //already set anyway
+ current.second = split_pos1;
+ continue;
+ }
+ else
+ {
+ // Left side larger.
+ if (begin != split_pos1)
+ tl.leftover_parts.push_front(std::make_pair(begin,
+ split_pos1));
+
+ current.first = split_pos2;
+ //current.second = end; //already set anyway
+ continue;
+ }
+ }
+ else
+ {
+ __gnu_sequential::sort(begin, end, comp);
+ elements_done += n;
+#if _GLIBCXX_ASSERTIONS
+ total_elements_done += n;
+#endif
+
+ // Prefer own stack, small pieces.
+ if (tl.leftover_parts.pop_front(current))
+ continue;
+
+# pragma omp atomic
+ *tl.elements_leftover -= elements_done;
+
+ elements_done = 0;
+
+#if _GLIBCXX_ASSERTIONS
+ double search_start = omp_get_wtime();
+#endif
+
+ // Look for new work.
+ bool successfully_stolen = false;
+ while (wait && *tl.elements_leftover > 0 && !successfully_stolen
+#if _GLIBCXX_ASSERTIONS
+ // Possible dead-lock.
+ && (omp_get_wtime() < (search_start + 1.0))
+#endif
+ )
+ {
+ thread_index_t victim;
+ victim = rng(num_threads);
+
+ // Large pieces.
+ successfully_stolen = (victim != iam)
+ && tls[victim]->leftover_parts.pop_back(current);
+ if (!successfully_stolen)
+ yield();
+#if !defined(__ICC) && !defined(__ECC)
+# pragma omp flush
+#endif
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ if (omp_get_wtime() >= (search_start + 1.0))
+ {
+ sleep(1);
+ _GLIBCXX_PARALLEL_ASSERT(omp_get_wtime()
+ < (search_start + 1.0));
+ }
+#endif
+ if (!successfully_stolen)
+ {
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(*tl.elements_leftover == 0);
+#endif
+ return;
+ }
+ }
+ }
+ }
+
+/** @brief Top-level quicksort routine.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param comp Comparator.
+ * @param n Length of the sequence to sort.
+ * @param num_threads Number of threads that are allowed to work on
+ * this part.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_sort_qsb(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp,
+ typename std::iterator_traits<RandomAccessIterator>
+ ::difference_type n,
+ thread_index_t num_threads)
+ {
+ _GLIBCXX_CALL(end - begin)
+
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef std::pair<RandomAccessIterator, RandomAccessIterator> Piece;
+
+ typedef QSBThreadLocal<RandomAccessIterator> tls_type;
+
+ if (n <= 1)
+ return;
+
+ // At least one element per processor.
+ if (num_threads > n)
+ num_threads = static_cast<thread_index_t>(n);
+
+ // Initialize thread local storage
+ tls_type** tls = new tls_type*[num_threads];
+ difference_type queue_size = num_threads * (thread_index_t)(log2(n) + 1);
+ for (thread_index_t t = 0; t < num_threads; ++t)
+ tls[t] = new QSBThreadLocal<RandomAccessIterator>(queue_size);
+
+ // There can never be more than ceil(log2(n)) ranges on the stack, because
+ // 1. Only one processor pushes onto the stack
+ // 2. The largest range has at most length n
+ // 3. Each range is larger than half of the range remaining
+ volatile difference_type elements_leftover = n;
+ for (int i = 0; i < num_threads; ++i)
+ {
+ tls[i]->elements_leftover = &elements_leftover;
+ tls[i]->num_threads = num_threads;
+ tls[i]->global = std::make_pair(begin, end);
+
+ // Just in case nothing is left to assign.
+ tls[i]->initial = std::make_pair(end, end);
+ }
+
+ // Main recursion call.
+ qsb_conquer(tls, begin, begin + n, comp, 0, num_threads, true);
+
+#if _GLIBCXX_ASSERTIONS
+ // All stack must be empty.
+ Piece dummy;
+ for (int i = 1; i < num_threads; ++i)
+ _GLIBCXX_PARALLEL_ASSERT(!tls[i]->leftover_parts.pop_back(dummy));
+#endif
+
+ for (int i = 0; i < num_threads; ++i)
+ delete tls[i];
+ delete[] tls;
+ }
+} // namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h
new file mode 100644
index 00000000000..2060d817e0c
--- /dev/null
+++ b/libstdc++-v3/include/parallel/base.h
@@ -0,0 +1,490 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/base.h
+ * @brief Sequential helper functions.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_BASE_H
+#define _GLIBCXX_PARALLEL_BASE_H 1
+
+#include <cstdio>
+#include <functional>
+#include <omp.h>
+#include <parallel/features.h>
+#include <parallel/basic_iterator.h>
+#include <parallel/parallel.h>
+
+
+// Parallel mode namespaces.
+namespace std
+{
+ namespace __parallel { }
+}
+
+/**
+ * @namespace __gnu_parallel
+ * @brief GNU parallel classes for public use.
+ */
+namespace __gnu_parallel
+{
+ // Import all the parallel versions of components in namespace std.
+ using namespace std::__parallel;
+}
+
+/**
+ * @namespace __gnu_sequential
+ * @brief GNU sequential classes for public use.
+ */
+namespace __gnu_sequential
+{
+ // Import whatever is the serial version.
+#ifdef _GLIBCXX_PARALLEL
+ using namespace std::__norm;
+#else
+ using namespace std;
+#endif
+}
+
+
+namespace __gnu_parallel
+{
+ // NB: Including this file cannot produce (unresolved) symbols from
+ // the OpenMP runtime unless the parallel mode is actually invoked
+ // and active, which imples that the OpenMP runtime is actually
+ // going to be linked in.
+ inline int
+ get_max_threads()
+ {
+ int __i = omp_get_max_threads();
+ return __i > 1 ? __i : 1;
+ }
+
+
+ inline bool
+ is_parallel(const _Parallelism __p) { return __p != sequential; }
+
+
+ // XXX remove std::duplicates from here if possible,
+ // XXX but keep minimal dependencies.
+
+/** @brief Calculates the rounded-down logarithm of @c n for base 2.
+ * @param n Argument.
+ * @return Returns 0 for argument 0.
+ */
+template<typename Size>
+ inline Size
+ log2(Size n)
+ {
+ Size k;
+ for (k = 0; n != 1; n >>= 1)
+ ++k;
+ return k;
+ }
+
+/** @brief Encode two integers into one __gnu_parallel::lcas_t.
+ * @param a First integer, to be encoded in the most-significant @c
+ * lcas_t_bits/2 bits.
+ * @param b Second integer, to be encoded in the least-significant
+ * @c lcas_t_bits/2 bits.
+ * @return __gnu_parallel::lcas_t value encoding @c a and @c b.
+ * @see decode2
+ */
+inline lcas_t
+encode2(int a, int b) //must all be non-negative, actually
+{
+ return (((lcas_t)a) << (lcas_t_bits / 2)) | (((lcas_t)b) << 0);
+}
+
+/** @brief Decode two integers from one __gnu_parallel::lcas_t.
+ * @param x __gnu_parallel::lcas_t to decode integers from.
+ * @param a First integer, to be decoded from the most-significant
+ * @c lcas_t_bits/2 bits of @c x.
+ * @param b Second integer, to be encoded in the least-significant
+ * @c lcas_t_bits/2 bits of @c x.
+ * @see encode2
+ */
+inline void
+decode2(lcas_t x, int& a, int& b)
+{
+ a = (int)((x >> (lcas_t_bits / 2)) & lcas_t_mask);
+ b = (int)((x >> 0 ) & lcas_t_mask);
+}
+
+/** @brief Equivalent to std::min. */
+template<typename T>
+ const T&
+ min(const T& a, const T& b)
+ { return (a < b) ? a : b; }
+
+/** @brief Equivalent to std::max. */
+template<typename T>
+ const T&
+ max(const T& a, const T& b)
+ { return (a > b) ? a : b; }
+
+/** @brief Constructs predicate for equality from strict weak
+ * ordering predicate
+ */
+// XXX comparator at the end, as per others
+template<typename Comparator, typename T1, typename T2>
+ class equal_from_less : public std::binary_function<T1, T2, bool>
+ {
+ private:
+ Comparator& comp;
+
+ public:
+ equal_from_less(Comparator& _comp) : comp(_comp) { }
+
+ bool operator()(const T1& a, const T2& b)
+ {
+ return !comp(a, b) && !comp(b, a);
+ }
+ };
+
+
+/** @brief Similar to std::binder1st,
+ * but giving the argument types explicitly. */
+template<typename _Predicate, typename argument_type>
+ class unary_negate
+ : public std::unary_function<argument_type, bool>
+ {
+ protected:
+ _Predicate _M_pred;
+
+ public:
+ explicit
+ unary_negate(const _Predicate& __x) : _M_pred(__x) { }
+
+ bool
+ operator()(const argument_type& __x)
+ { return !_M_pred(__x); }
+ };
+
+/** @brief Similar to std::binder1st,
+ * but giving the argument types explicitly. */
+template<typename _Operation, typename first_argument_type,
+ typename second_argument_type, typename result_type>
+ class binder1st
+ : public std::unary_function<second_argument_type, result_type>
+ {
+ protected:
+ _Operation op;
+ first_argument_type value;
+
+ public:
+ binder1st(const _Operation& __x,
+ const first_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ result_type
+ operator()(const second_argument_type& __x)
+ { return op(value, __x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ result_type
+ operator()(second_argument_type& __x) const
+ { return op(value, __x); }
+ };
+
+/**
+ * @brief Similar to std::binder2nd, but giving the argument types
+ * explicitly.
+ */
+template<typename _Operation, typename first_argument_type,
+ typename second_argument_type, typename result_type>
+ class binder2nd
+ : public std::unary_function<first_argument_type, result_type>
+ {
+ protected:
+ _Operation op;
+ second_argument_type value;
+
+ public:
+ binder2nd(const _Operation& __x,
+ const second_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ result_type
+ operator()(const first_argument_type& __x) const
+ { return op(__x, value); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ result_type
+ operator()(first_argument_type& __x)
+ { return op(__x, value); }
+ };
+
+/** @brief Similar to std::equal_to, but allows two different types. */
+template<typename T1, typename T2>
+ struct equal_to : std::binary_function<T1, T2, bool>
+ {
+ bool operator()(const T1& t1, const T2& t2) const
+ { return t1 == t2; }
+ };
+
+/** @brief Similar to std::less, but allows two different types. */
+template<typename T1, typename T2>
+ struct less : std::binary_function<T1, T2, bool>
+ {
+ bool
+ operator()(const T1& t1, const T2& t2) const
+ { return t1 < t2; }
+
+ bool
+ operator()(const T2& t2, const T1& t1) const
+ { return t2 < t1; }
+ };
+
+// Partial specialization for one type. Same as std::less.
+template<typename _Tp>
+struct less<_Tp, _Tp> : public std::binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x < __y; }
+ };
+
+
+ /** @brief Similar to std::plus, but allows two different types. */
+template<typename _Tp1, typename _Tp2>
+ struct plus : public std::binary_function<_Tp1, _Tp2, _Tp1>
+ {
+ typedef typeof(*static_cast<_Tp1*>(NULL)
+ + *static_cast<_Tp2*>(NULL)) result;
+
+ result
+ operator()(const _Tp1& __x, const _Tp2& __y) const
+ { return __x + __y; }
+ };
+
+// Partial specialization for one type. Same as std::plus.
+template<typename _Tp>
+ struct plus<_Tp, _Tp> : public std::binary_function<_Tp, _Tp, _Tp>
+ {
+ typedef typeof(*static_cast<_Tp*>(NULL)
+ + *static_cast<_Tp*>(NULL)) result;
+
+ result
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x + __y; }
+ };
+
+
+/** @brief Similar to std::multiplies, but allows two different types. */
+template<typename _Tp1, typename _Tp2>
+ struct multiplies : public std::binary_function<_Tp1, _Tp2, _Tp1>
+ {
+ typedef typeof(*static_cast<_Tp1*>(NULL)
+ * *static_cast<_Tp2*>(NULL)) result;
+
+ result
+ operator()(const _Tp1& __x, const _Tp2& __y) const
+ { return __x * __y; }
+ };
+
+// Partial specialization for one type. Same as std::multiplies.
+template<typename _Tp>
+ struct multiplies<_Tp, _Tp> : public std::binary_function<_Tp, _Tp, _Tp>
+ {
+ typedef typeof(*static_cast<_Tp*>(NULL)
+ * *static_cast<_Tp*>(NULL)) result;
+
+ result
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x * __y; }
+ };
+
+
+template<typename T, typename _DifferenceTp>
+ class pseudo_sequence;
+
+/** @brief Iterator associated with __gnu_parallel::pseudo_sequence.
+ * If features the usual random-access iterator functionality.
+ * @param T Sequence value type.
+ * @param difference_type Sequence difference type.
+ */
+template<typename T, typename _DifferenceTp>
+ class pseudo_sequence_iterator
+ {
+ public:
+ typedef _DifferenceTp difference_type;
+
+ private:
+ typedef pseudo_sequence_iterator<T, _DifferenceTp> type;
+
+ const T& val;
+ difference_type pos;
+
+ public:
+ pseudo_sequence_iterator(const T& val, difference_type pos)
+ : val(val), pos(pos) { }
+
+ // Pre-increment operator.
+ type&
+ operator++()
+ {
+ ++pos;
+ return *this;
+ }
+
+ // Post-increment operator.
+ const type
+ operator++(int)
+ { return type(pos++); }
+
+ const T&
+ operator*() const
+ { return val; }
+
+ const T&
+ operator[](difference_type) const
+ { return val; }
+
+ bool
+ operator==(const type& i2)
+ { return pos == i2.pos; }
+
+ difference_type
+ operator!=(const type& i2)
+ { return pos != i2.pos; }
+
+ difference_type
+ operator-(const type& i2)
+ { return pos - i2.pos; }
+ };
+
+/** @brief Sequence that conceptually consists of multiple copies of
+ the same element.
+ * The copies are not stored explicitly, of course.
+ * @param T Sequence value type.
+ * @param difference_type Sequence difference type.
+ */
+template<typename T, typename _DifferenceTp>
+ class pseudo_sequence
+ {
+ typedef pseudo_sequence<T, _DifferenceTp> type;
+
+ public:
+ typedef _DifferenceTp difference_type;
+
+ // Better case down to uint64, than up to _DifferenceTp.
+ typedef pseudo_sequence_iterator<T, uint64> iterator;
+
+ /** @brief Constructor.
+ * @param val Element of the sequence.
+ * @param count Number of (virtual) copies.
+ */
+ pseudo_sequence(const T& val, difference_type count)
+ : val(val), count(count) { }
+
+ /** @brief Begin iterator. */
+ iterator
+ begin() const
+ { return iterator(val, 0); }
+
+ /** @brief End iterator. */
+ iterator
+ end() const
+ { return iterator(val, count); }
+
+ private:
+ const T& val;
+ difference_type count;
+ };
+
+/** @brief Functor that does nothing */
+template<typename _ValueTp>
+ class void_functor
+ {
+ inline void
+ operator()(const _ValueTp& v) const { }
+ };
+
+/** @brief Compute the median of three referenced elements,
+ according to @c comp.
+ * @param a First iterator.
+ * @param b Second iterator.
+ * @param c Third iterator.
+ * @param comp Comparator.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ RandomAccessIterator
+ median_of_three_iterators(RandomAccessIterator a, RandomAccessIterator b,
+ RandomAccessIterator c, Comparator& comp)
+ {
+ if (comp(*a, *b))
+ if (comp(*b, *c))
+ return b;
+ else
+ if (comp(*a, *c))
+ return c;
+ else
+ return a;
+ else
+ {
+ // Just swap a and b.
+ if (comp(*a, *c))
+ return a;
+ else
+ if (comp(*b, *c))
+ return c;
+ else
+ return b;
+ }
+ }
+
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix. (Same as debug mode).
+inline void
+__replacement_assert(const char* __file, int __line,
+ const char* __function, const char* __condition)
+{
+ std::printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+ __function, __condition);
+ __builtin_abort();
+}
+
+#define _GLIBCXX_PARALLEL_ASSERT(_Condition) \
+do \
+ { \
+ if (!(_Condition)) \
+ __gnu_parallel::__replacement_assert(__FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, #_Condition); \
+ } while (false)
+
+} //namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/basic_iterator.h b/libstdc++-v3/include/parallel/basic_iterator.h
new file mode 100644
index 00000000000..4b891be80b2
--- /dev/null
+++ b/libstdc++-v3/include/parallel/basic_iterator.h
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/basic_iterator.h
+ * @brief Includes the original header files concerned with iterators
+ * except for stream iterators.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_BASIC_ITERATOR_H
+#define _GLIBCXX_PARALLEL_BASIC_ITERATOR_H 1
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+
+#endif /* _GLIBCXX_BASIC_ITERATOR_H */
diff --git a/libstdc++-v3/include/parallel/checkers.h b/libstdc++-v3/include/parallel/checkers.h
new file mode 100644
index 00000000000..1c6bc355d17
--- /dev/null
+++ b/libstdc++-v3/include/parallel/checkers.h
@@ -0,0 +1,160 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/checkers.h
+ * @brief Routines for checking the correctness of algorithm results.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_CHECKERS
+#define _GLIBCXX_PARALLEL_CHECKERS 1
+
+#include <functional>
+#include <cstdio>
+#include <bits/stl_algobase.h>
+
+namespace __gnu_parallel
+{
+ /**
+ * @brief Check whether @c [begin, @c end) is sorted according to @c comp.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param comp Comparator.
+ * @return @c true if sorted, @c false otherwise.
+ */
+ // XXX Comparator default template argument
+ template<typename InputIterator, typename Comparator>
+ bool
+ is_sorted(InputIterator begin, InputIterator end,
+ Comparator comp
+ = std::less<typename std::iterator_traits<InputIterator>::
+ value_type>())
+ {
+ if (begin == end)
+ return true;
+
+ InputIterator current(begin), recent(begin);
+
+ unsigned long long position = 1;
+ for (current++; current != end; current++)
+ {
+ if (comp(*current, *recent))
+ {
+ printf("is_sorted: check failed before position %i.\n",
+ position);
+ return false;
+ }
+ recent = current;
+ position++;
+ }
+
+ return true;
+ }
+
+ /**
+ * @brief Check whether @c [begin, @c end) is sorted according to @c comp.
+ * Prints the position in case an unordered pair is found.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param first_failure The first failure is returned in this variable.
+ * @param comp Comparator.
+ * @return @c true if sorted, @c false otherwise.
+ */
+ // XXX Comparator default template argument
+ template<typename InputIterator, typename Comparator>
+ bool
+ is_sorted_failure(InputIterator begin, InputIterator end,
+ InputIterator& first_failure,
+ Comparator comp
+ = std::less<typename std::iterator_traits<InputIterator>::
+ value_type>())
+ {
+ if (begin == end)
+ return true;
+
+ InputIterator current(begin), recent(begin);
+
+ unsigned long long position = 1;
+ for (current++; current != end; current++)
+ {
+ if (comp(*current, *recent))
+ {
+ first_failure = current;
+ printf("is_sorted: check failed before position %lld.\n",
+ position);
+ return false;
+ }
+ recent = current;
+ position++;
+ }
+
+ first_failure = end;
+ return true;
+ }
+
+ /**
+ * @brief Check whether @c [begin, @c end) is sorted according to @c comp.
+ * Prints all unordered pair, including the surrounding two elements.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param comp Comparator.
+ * @return @c true if sorted, @c false otherwise.
+ */
+ template<typename InputIterator, typename Comparator>
+ bool
+ // XXX Comparator default template argument
+ is_sorted_print_failures(InputIterator begin, InputIterator end,
+ Comparator comp
+ = std::less<typename std::iterator_traits
+ <InputIterator>::value_type>())
+ {
+ if (begin == end)
+ return true;
+
+ InputIterator recent(begin);
+ bool ok = true;
+
+ for (InputIterator pos(begin + 1); pos != end; pos++)
+ {
+ if (comp(*pos, *recent))
+ {
+ printf("%ld: %d %d %d %d\n", pos - begin, *(pos - 2),
+ *(pos- 1), *pos, *(pos + 1));
+ ok = false;
+ }
+ recent = pos;
+ }
+ return ok;
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/compatibility.h b/libstdc++-v3/include/parallel/compatibility.h
new file mode 100644
index 00000000000..18514e6f8a9
--- /dev/null
+++ b/libstdc++-v3/include/parallel/compatibility.h
@@ -0,0 +1,356 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/compatibility.h
+ * @brief Compatibility layer, mostly concerned with atomic operations.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_COMPATIBILITY_H
+#define _GLIBCXX_PARALLEL_COMPATIBILITY_H 1
+
+#include <parallel/types.h>
+#include <parallel/base.h>
+
+#if defined(__SUNPRO_CC) && defined(__sparc)
+#include <sys/atomic.h>
+#endif
+
+#if !defined(_WIN32) || defined (__CYGWIN__)
+#include <sched.h>
+#endif
+
+#if defined(_MSC_VER)
+#include <Windows.h>
+#include <intrin.h>
+#undef max
+#undef min
+#endif
+
+#ifdef __MINGW32__
+// Including <windows.h> will drag in all the windows32 names. Since
+// that can cause user code portability problems, we just declare the
+// one needed function here.
+extern "C"
+__attribute((dllimport)) void __attribute__((stdcall)) Sleep (unsigned long);
+#endif
+
+namespace __gnu_parallel
+{
+#if defined(__ICC)
+ template<typename must_be_int = int>
+ int32 faa32(int32* x, int32 inc)
+ {
+ asm volatile("lock xadd %0,%1"
+ : "=r" (inc), "=m" (*x)
+ : "0" (inc)
+ : "memory");
+ return inc;
+ }
+#if defined(__x86_64)
+ template<typename must_be_int = int>
+ int64 faa64(int64* x, int64 inc)
+ {
+ asm volatile("lock xadd %0,%1"
+ : "=r" (inc), "=m" (*x)
+ : "0" (inc)
+ : "memory");
+ return inc;
+ }
+#endif
+#endif
+
+ // atomic functions only work on integers
+
+ /** @brief Add a value to a variable, atomically.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to a 32-bit signed integer.
+ * @param addend Value to add.
+ */
+ inline int32
+ fetch_and_add_32(volatile int32* ptr, int32 addend)
+ {
+#if defined(__ICC) //x86 version
+ return _InterlockedExchangeAdd((void*)ptr, addend);
+#elif defined(__ECC) //IA-64 version
+ return _InterlockedExchangeAdd((void*)ptr, addend);
+#elif defined(__ICL) || defined(_MSC_VER)
+ return _InterlockedExchangeAdd(reinterpret_cast<volatile long*>(ptr),
+ addend);
+#elif defined(__GNUC__)
+ return __sync_fetch_and_add(ptr, addend);
+#elif defined(__SUNPRO_CC) && defined(__sparc)
+ volatile int32 before, after;
+ do
+ {
+ before = *ptr;
+ after = before + addend;
+ } while (atomic_cas_32((volatile unsigned int*)ptr, before,
+ after) != before);
+ return before;
+#else //fallback, slow
+#pragma message("slow fetch_and_add_32")
+ int32 res;
+#pragma omp critical
+ {
+ res = *ptr;
+ *(ptr) += addend;
+ }
+ return res;
+#endif
+ }
+
+ /** @brief Add a value to a variable, atomically.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to a 64-bit signed integer.
+ * @param addend Value to add.
+ */
+ inline int64
+ fetch_and_add_64(volatile int64* ptr, int64 addend)
+ {
+#if defined(__ICC) && defined(__x86_64) //x86 version
+ return faa64<int>((int64*)ptr, addend);
+#elif defined(__ECC) //IA-64 version
+ return _InterlockedExchangeAdd64((void*)ptr, addend);
+#elif defined(__ICL) || defined(_MSC_VER)
+#ifndef _WIN64
+ _GLIBCXX_PARALLEL_ASSERT(false); //not available in this case
+ return 0;
+#else
+ return _InterlockedExchangeAdd64(ptr, addend);
+#endif
+#elif defined(__GNUC__) && defined(__x86_64)
+ return __sync_fetch_and_add(ptr, addend);
+#elif defined(__GNUC__) && defined(__i386) && \
+ (defined(__i686) || defined(__pentium4) || defined(__athlon))
+ return __sync_fetch_and_add(ptr, addend);
+#elif defined(__SUNPRO_CC) && defined(__sparc)
+ volatile int64 before, after;
+ do
+ {
+ before = *ptr;
+ after = before + addend;
+ } while (atomic_cas_64((volatile unsigned long long*)ptr, before,
+ after) != before);
+ return before;
+#else //fallback, slow
+#if defined(__GNUC__) && defined(__i386)
+ // XXX doesn't work with -march=native
+ //#warning "please compile with -march=i686 or better"
+#endif
+#pragma message("slow fetch_and_add_64")
+ int64 res;
+#pragma omp critical
+ {
+ res = *ptr;
+ *(ptr) += addend;
+ }
+ return res;
+#endif
+ }
+
+ /** @brief Add a value to a variable, atomically.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to a signed integer.
+ * @param addend Value to add.
+ */
+ template<typename T>
+ inline T
+ fetch_and_add(volatile T* ptr, T addend)
+ {
+ if (sizeof(T) == sizeof(int32))
+ return (T)fetch_and_add_32((volatile int32*) ptr, (int32)addend);
+ else if (sizeof(T) == sizeof(int64))
+ return (T)fetch_and_add_64((volatile int64*) ptr, (int64)addend);
+ else
+ _GLIBCXX_PARALLEL_ASSERT(false);
+ }
+
+
+#if defined(__ICC)
+
+ template<typename must_be_int = int>
+ inline int32
+ cas32(volatile int32* ptr, int32 old, int32 nw)
+ {
+ int32 before;
+ __asm__ __volatile__("lock; cmpxchgl %1,%2"
+ : "=a"(before)
+ : "q"(nw), "m"(*(volatile long long*)(ptr)), "0"(old)
+ : "memory");
+ return before;
+ }
+
+#if defined(__x86_64)
+ template<typename must_be_int = int>
+ inline int64
+ cas64(volatile int64 *ptr, int64 old, int64 nw)
+ {
+ int64 before;
+ __asm__ __volatile__("lock; cmpxchgq %1,%2"
+ : "=a"(before)
+ : "q"(nw), "m"(*(volatile long long*)(ptr)), "0"(old)
+ : "memory");
+ return before;
+ }
+#endif
+
+#endif
+
+ /** @brief Compare @c *ptr and @c comparand. If equal, let @c
+ * *ptr=replacement and return @c true, return @c false otherwise.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to 32-bit signed integer.
+ * @param comparand Compare value.
+ * @param replacement Replacement value.
+ */
+ inline bool
+ compare_and_swap_32(volatile int32* ptr, int32 comparand, int32 replacement)
+ {
+#if defined(__ICC) //x86 version
+ return _InterlockedCompareExchange((void*)ptr, replacement,
+ comparand) == comparand;
+#elif defined(__ECC) //IA-64 version
+ return _InterlockedCompareExchange((void*)ptr, replacement,
+ comparand) == comparand;
+#elif defined(__ICL) || defined(_MSC_VER)
+ return _InterlockedCompareExchange(reinterpret_cast<volatile long*>(ptr),
+ replacement, comparand) == comparand;
+#elif defined(__GNUC__)
+ return __sync_bool_compare_and_swap(ptr, comparand, replacement);
+#elif defined(__SUNPRO_CC) && defined(__sparc)
+ return atomic_cas_32((volatile unsigned int*)ptr, comparand,
+ replacement) == comparand;
+#else
+#pragma message("slow compare_and_swap_32")
+ bool res = false;
+#pragma omp critical
+ {
+ if (*ptr == comparand)
+ {
+ *ptr = replacement;
+ res = true;
+ }
+ }
+ return res;
+#endif
+ }
+
+ /** @brief Compare @c *ptr and @c comparand. If equal, let @c
+ * *ptr=replacement and return @c true, return @c false otherwise.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to 64-bit signed integer.
+ * @param comparand Compare value.
+ * @param replacement Replacement value.
+ */
+ inline bool
+ compare_and_swap_64(volatile int64* ptr, int64 comparand, int64 replacement)
+ {
+#if defined(__ICC) && defined(__x86_64) //x86 version
+ return cas64<int>(ptr, comparand, replacement) == comparand;
+#elif defined(__ECC) //IA-64 version
+ return _InterlockedCompareExchange64((void*)ptr, replacement,
+ comparand) == comparand;
+#elif defined(__ICL) || defined(_MSC_VER)
+#ifndef _WIN64
+ _GLIBCXX_PARALLEL_ASSERT(false); //not available in this case
+ return 0;
+#else
+ return _InterlockedCompareExchange64(ptr, replacement,
+ comparand) == comparand;
+#endif
+
+#elif defined(__GNUC__) && defined(__x86_64)
+ return __sync_bool_compare_and_swap(ptr, comparand, replacement);
+#elif defined(__GNUC__) && defined(__i386) && \
+ (defined(__i686) || defined(__pentium4) || defined(__athlon))
+ return __sync_bool_compare_and_swap(ptr, comparand, replacement);
+#elif defined(__SUNPRO_CC) && defined(__sparc)
+ return atomic_cas_64((volatile unsigned long long*)ptr,
+ comparand, replacement) == comparand;
+#else
+#if defined(__GNUC__) && defined(__i386)
+ // XXX -march=native
+ //#warning "please compile with -march=i686 or better"
+#endif
+#pragma message("slow compare_and_swap_64")
+ bool res = false;
+#pragma omp critical
+ {
+ if (*ptr == comparand)
+ {
+ *ptr = replacement;
+ res = true;
+ }
+ }
+ return res;
+#endif
+ }
+
+ /** @brief Compare @c *ptr and @c comparand. If equal, let @c
+ * *ptr=replacement and return @c true, return @c false otherwise.
+ *
+ * Implementation is heavily platform-dependent.
+ * @param ptr Pointer to signed integer.
+ * @param comparand Compare value.
+ * @param replacement Replacement value. */
+ template<typename T>
+ inline bool
+ compare_and_swap(volatile T* ptr, T comparand, T replacement)
+ {
+ if (sizeof(T) == sizeof(int32))
+ return compare_and_swap_32((volatile int32*) ptr, (int32)comparand, (int32)replacement);
+ else if (sizeof(T) == sizeof(int64))
+ return compare_and_swap_64((volatile int64*) ptr, (int64)comparand, (int64)replacement);
+ else
+ _GLIBCXX_PARALLEL_ASSERT(false);
+ }
+
+ /** @brief Yield the control to another thread, without waiting for
+ the end to the time slice. */
+ inline void
+ yield()
+ {
+#if defined (_WIN32) && !defined (__CYGWIN__)
+ Sleep(0);
+#else
+ sched_yield();
+#endif
+ }
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/compiletime_settings.h b/libstdc++-v3/include/parallel/compiletime_settings.h
new file mode 100644
index 00000000000..edaea3856ad
--- /dev/null
+++ b/libstdc++-v3/include/parallel/compiletime_settings.h
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/compiletime_settings.h
+ * @brief Defines on options concerning debugging and performance, at
+ * compile-time.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#include <cstdio>
+
+/** @brief Determine verbosity level of the parallel mode.
+ * Level 1 prints a message each time a parallel-mode function is entered. */
+#define _GLIBCXX_VERBOSE_LEVEL 0
+
+/** @def _GLIBCXX_CALL
+ * @brief Macro to produce log message when entering a function.
+ * @param n Input size.
+ * @see _GLIBCXX_VERBOSE_LEVEL */
+#if (_GLIBCXX_VERBOSE_LEVEL == 0)
+#define _GLIBCXX_CALL(n)
+#endif
+#if (_GLIBCXX_VERBOSE_LEVEL == 1)
+#define _GLIBCXX_CALL(n) \
+ printf(" %s:\niam = %d, n = %ld, num_threads = %d\n", \
+ __PRETTY_FUNCTION__, omp_get_thread_num(), (n), get_max_threads());
+#endif
+
+#ifndef _GLIBCXX_SCALE_DOWN_FPU
+/** @brief Use floating-point scaling instead of modulo for mapping
+ * random numbers to a range. This can be faster on certain CPUs. */
+#define _GLIBCXX_SCALE_DOWN_FPU 0
+#endif
+
+#ifndef _GLIBCXX_ASSERTIONS
+/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
+ * Should be switched on only locally. */
+#define _GLIBCXX_ASSERTIONS 0
+#endif
+
+#ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
+/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
+ * Consider the size of the L1 cache for
+ * __gnu_parallel::parallel_random_shuffle(). */
+#define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 0
+#endif
+#ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
+/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
+ * Consider the size of the TLB for
+ * __gnu_parallel::parallel_random_shuffle(). */
+#define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 0
+#endif
+
+#ifndef _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+/** @brief First copy the data, sort it locally, and merge it back
+ * (0); or copy it back after everything is done (1).
+ *
+ * Recommendation: 0 */
+#define _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST 0
+#endif
diff --git a/libstdc++-v3/include/parallel/equally_split.h b/libstdc++-v3/include/parallel/equally_split.h
new file mode 100644
index 00000000000..37e45816727
--- /dev/null
+++ b/libstdc++-v3/include/parallel/equally_split.h
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/equally_split.h
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_EQUALLY_SPLIT_H
+#define _GLIBCXX_PARALLEL_EQUALLY_SPLIT_H 1
+
+namespace __gnu_parallel
+{
+/** @brief Function to split a sequence into parts of almost equal size.
+ *
+ * The resulting sequence s of length num_threads+1 contains the splitting
+ * positions when splitting the range [0,n) into parts of almost
+ * equal size (plus minus 1). The first entry is 0, the last one
+ * n. There may result empty parts.
+ * @param n Number of elements
+ * @param num_threads Number of parts
+ * @param s Splitters
+ * @returns End of splitter sequence, i. e. @c s+num_threads+1 */
+template<typename difference_type, typename OutputIterator>
+ OutputIterator
+ equally_split(difference_type n, thread_index_t num_threads, OutputIterator s)
+ {
+ difference_type chunk_length = n / num_threads;
+ difference_type num_longer_chunks = n % num_threads;
+ difference_type pos = 0;
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ {
+ *s++ = pos;
+ pos += (i < num_longer_chunks) ? (chunk_length + 1) : chunk_length;
+ }
+ *s++ = n;
+ return s;
+ }
+
+
+/** @brief Function to split a sequence into parts of almost equal size.
+ *
+ * Returns the position of the splitting point between
+ * thread number thread_no (included) and
+ * thread number thread_no+1 (excluded).
+ * @param n Number of elements
+ * @param num_threads Number of parts
+ * @returns _SplittingAlgorithm point */
+template<typename difference_type>
+ difference_type
+ equally_split_point(difference_type n,
+ thread_index_t num_threads,
+ thread_index_t thread_no)
+ {
+ difference_type chunk_length = n / num_threads;
+ difference_type num_longer_chunks = n % num_threads;
+ if (thread_no < num_longer_chunks)
+ return thread_no * (chunk_length + 1);
+ else
+ return num_longer_chunks * (chunk_length + 1)
+ + (thread_no - num_longer_chunks) * chunk_length;
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/features.h b/libstdc++-v3/include/parallel/features.h
new file mode 100644
index 00000000000..2e09980405e
--- /dev/null
+++ b/libstdc++-v3/include/parallel/features.h
@@ -0,0 +1,170 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/features.h
+ * @brief Defines on whether to include algorithm variants.
+ *
+ * Less variants reduce executable size and compile time.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_FEATURES_H
+#define _GLIBCXX_PARALLEL_FEATURES_H 1
+
+#ifndef _GLIBCXX_MERGESORT
+/** @def _GLIBCXX_MERGESORT
+ * @brief Include parallel multi-way mergesort.
+ * @see __gnu_parallel::_Settings::sort_algorithm */
+#define _GLIBCXX_MERGESORT 1
+#endif
+
+#ifndef _GLIBCXX_QUICKSORT
+/** @def _GLIBCXX_QUICKSORT
+ * @brief Include parallel unbalanced quicksort.
+ * @see __gnu_parallel::_Settings::sort_algorithm */
+#define _GLIBCXX_QUICKSORT 1
+#endif
+
+#ifndef _GLIBCXX_BAL_QUICKSORT
+/** @def _GLIBCXX_BAL_QUICKSORT
+ * @brief Include parallel dynamically load-balanced quicksort.
+ * @see __gnu_parallel::_Settings::sort_algorithm */
+#define _GLIBCXX_BAL_QUICKSORT 1
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE
+/** @def _GLIBCXX_LOSER_TREE
+ * @brief Include guarded (sequences may run empty) loser tree,
+ * moving objects.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE 1
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_EXPLICIT
+/** @def _GLIBCXX_LOSER_TREE_EXPLICIT
+ * @brief Include standard loser tree, storing two flags for infimum
+ * and supremum.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_EXPLICIT 0
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_REFERENCE
+/** @def _GLIBCXX_LOSER_TREE_REFERENCE
+ * @brief Include some loser tree variant.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_REFERENCE 0
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_POINTER
+/** @def _GLIBCXX_LOSER_TREE_POINTER
+ * @brief Include some loser tree variant.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_POINTER 1
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_UNGUARDED
+/** @def _GLIBCXX_LOSER_TREE_UNGUARDED
+ * @brief Include unguarded (sequences must not run empty) loser
+ * tree, moving objects.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_UNGUARDED 0
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_POINTER_UNGUARDED
+/** @def _GLIBCXX_LOSER_TREE_POINTER_UNGUARDED
+ * @brief Include some loser tree variant.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_POINTER_UNGUARDED 1
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_COMBINED
+/** @def _GLIBCXX_LOSER_TREE_COMBINED
+ * @brief Include some loser tree variant.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_COMBINED 0
+#endif
+
+#ifndef _GLIBCXX_LOSER_TREE_SENTINEL
+/** @def _GLIBCXX_LOSER_TREE_SENTINEL
+ * @brief Include some loser tree variant.
+ * @see __gnu_parallel::_Settings multiway_merge_algorithm */
+#define _GLIBCXX_LOSER_TREE_SENTINEL 0
+#endif
+
+
+#ifndef _GLIBCXX_FIND_GROWING_BLOCKS
+/** @brief Include the growing blocks variant for std::find.
+ * @see __gnu_parallel::_Settings::find_algorithm */
+#define _GLIBCXX_FIND_GROWING_BLOCKS 1
+#endif
+
+#ifndef _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS
+/** @brief Include the equal-sized blocks variant for std::find.
+ * @see __gnu_parallel::_Settings::find_algorithm */
+#define _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS 1
+#endif
+
+#ifndef _GLIBCXX_FIND_EQUAL_SPLIT
+/** @def _GLIBCXX_FIND_EQUAL_SPLIT
+ * @brief Include the equal splitting variant for std::find.
+ * @see __gnu_parallel::_Settings::find_algorithm */
+#define _GLIBCXX_FIND_EQUAL_SPLIT 1
+#endif
+
+
+#ifndef _GLIBCXX_TREE_INITIAL_SPLITTING
+/** @def _GLIBCXX_TREE_INITIAL_SPLITTING
+ * @brief Include the initial splitting variant for
+ * _Rb_tree::insert_unique(InputIterator beg, InputIterator end).
+ * @see __gnu_parallel::_Rb_tree */
+#define _GLIBCXX_TREE_INITIAL_SPLITTING 1
+#endif
+
+#ifndef _GLIBCXX_TREE_DYNAMIC_BALANCING
+/** @def _GLIBCXX_TREE_DYNAMIC_BALANCING
+ * @brief Include the dynamic balancing variant for
+ * _Rb_tree::insert_unique(InputIterator beg, InputIterator end).
+ * @see __gnu_parallel::_Rb_tree */
+#define _GLIBCXX_TREE_DYNAMIC_BALANCING 1
+#endif
+
+#ifndef _GLIBCXX_TREE_FULL_COPY
+/** @def _GLIBCXX_TREE_FULL_COPY
+ * @brief In order to sort the input sequence of
+ * _Rb_tree::insert_unique(InputIterator beg, InputIterator end) a
+ * full copy of the input elements is done.
+ * @see __gnu_parallel::_Rb_tree */
+#define _GLIBCXX_TREE_FULL_COPY 1
+#endif
+
+
+#endif
diff --git a/libstdc++-v3/include/parallel/find.h b/libstdc++-v3/include/parallel/find.h
new file mode 100644
index 00000000000..3e0084f68ab
--- /dev/null
+++ b/libstdc++-v3/include/parallel/find.h
@@ -0,0 +1,407 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/find.h
+ * @brief Parallel implementation base for std::find(), std::equal()
+ * and related functions.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze and Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_FIND_H
+#define _GLIBCXX_PARALLEL_FIND_H 1
+
+#include <bits/stl_algobase.h>
+
+#include <parallel/features.h>
+#include <parallel/parallel.h>
+#include <parallel/compatibility.h>
+#include <parallel/equally_split.h>
+
+namespace __gnu_parallel
+{
+/**
+ * @brief Parallel std::find, switch for different algorithms.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence. Must have same
+ * length as first sequence.
+ * @param pred Find predicate.
+ * @param selector Functionality (e. g. std::find_if (), std::equal(),...)
+ * @return Place of finding in both sequences.
+ */
+template<typename RandomAccessIterator1,
+ typename RandomAccessIterator2,
+ typename Pred,
+ typename Selector>
+ inline std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ find_template(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred, Selector selector)
+ {
+ switch (_Settings::get().find_algorithm)
+ {
+ case GROWING_BLOCKS:
+ return find_template(begin1, end1, begin2, pred, selector,
+ growing_blocks_tag());
+ case CONSTANT_SIZE_BLOCKS:
+ return find_template(begin1, end1, begin2, pred, selector,
+ constant_size_blocks_tag());
+ case EQUAL_SPLIT:
+ return find_template(begin1, end1, begin2, pred, selector,
+ equal_split_tag());
+ default:
+ _GLIBCXX_PARALLEL_ASSERT(false);
+ return std::make_pair(begin1, begin2);
+ }
+ }
+
+#if _GLIBCXX_FIND_EQUAL_SPLIT
+
+/**
+ * @brief Parallel std::find, equal splitting variant.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence. Second sequence
+ * must have same length as first sequence.
+ * @param pred Find predicate.
+ * @param selector Functionality (e. g. std::find_if (), std::equal(),...)
+ * @return Place of finding in both sequences.
+ */
+template<typename RandomAccessIterator1,
+ typename RandomAccessIterator2,
+ typename Pred,
+ typename Selector>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ find_template(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2,
+ Pred pred,
+ Selector selector,
+ equal_split_tag)
+ {
+ _GLIBCXX_CALL(end1 - begin1)
+
+ typedef std::iterator_traits<RandomAccessIterator1> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename traits_type::value_type value_type;
+
+ difference_type length = end1 - begin1;
+ difference_type result = length;
+ difference_type* borders;
+
+ omp_lock_t result_lock;
+ omp_init_lock(&result_lock);
+
+ thread_index_t num_threads = get_max_threads();
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ borders = new difference_type[num_threads + 1];
+ equally_split(length, num_threads, borders);
+ } //single
+
+ thread_index_t iam = omp_get_thread_num();
+ difference_type start = borders[iam], stop = borders[iam + 1];
+
+ RandomAccessIterator1 i1 = begin1 + start;
+ RandomAccessIterator2 i2 = begin2 + start;
+ for (difference_type pos = start; pos < stop; ++pos)
+ {
+ #pragma omp flush(result)
+ // Result has been set to something lower.
+ if (result < pos)
+ break;
+
+ if (selector(i1, i2, pred))
+ {
+ omp_set_lock(&result_lock);
+ if (pos < result)
+ result = pos;
+ omp_unset_lock(&result_lock);
+ break;
+ }
+ ++i1;
+ ++i2;
+ }
+ } //parallel
+
+ omp_destroy_lock(&result_lock);
+ delete[] borders;
+
+ return
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>(begin1 + result,
+ begin2 + result);
+ }
+
+#endif
+
+#if _GLIBCXX_FIND_GROWING_BLOCKS
+
+/**
+ * @brief Parallel std::find, growing block size variant.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence. Second sequence
+ * must have same length as first sequence.
+ * @param pred Find predicate.
+ * @param selector Functionality (e. g. std::find_if (), std::equal(),...)
+ * @return Place of finding in both sequences.
+ * @see __gnu_parallel::_Settings::find_sequential_search_size
+ * @see __gnu_parallel::_Settings::find_initial_block_size
+ * @see __gnu_parallel::_Settings::find_maximum_block_size
+ * @see __gnu_parallel::_Settings::find_increasing_factor
+ *
+ * There are two main differences between the growing blocks and
+ * the constant-size blocks variants.
+ * 1. For GB, the block size grows; for CSB, the block size is fixed.
+
+ * 2. For GB, the blocks are allocated dynamically;
+ * for CSB, the blocks are allocated in a predetermined manner,
+ * namely spacial round-robin.
+ */
+template<typename RandomAccessIterator1,
+ typename RandomAccessIterator2,
+ typename Pred,
+ typename Selector>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ find_template(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred, Selector selector,
+ growing_blocks_tag)
+ {
+ _GLIBCXX_CALL(end1 - begin1)
+
+ typedef std::iterator_traits<RandomAccessIterator1> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename traits_type::value_type value_type;
+
+ const _Settings& __s = _Settings::get();
+
+ difference_type length = end1 - begin1;
+
+ difference_type sequential_search_size =
+ std::min<difference_type>(length, __s.find_sequential_search_size);
+
+ // Try it sequentially first.
+ std::pair<RandomAccessIterator1, RandomAccessIterator2> find_seq_result =
+ selector.sequential_algorithm(
+ begin1, begin1 + sequential_search_size, begin2, pred);
+
+ if (find_seq_result.first != (begin1 + sequential_search_size))
+ return find_seq_result;
+
+ // Index of beginning of next free block (after sequential find).
+ difference_type next_block_start = sequential_search_size;
+ difference_type result = length;
+
+ omp_lock_t result_lock;
+ omp_init_lock(&result_lock);
+
+ thread_index_t num_threads = get_max_threads();
+# pragma omp parallel shared(result) num_threads(num_threads)
+ {
+# pragma omp single
+ num_threads = omp_get_num_threads();
+
+ // Not within first k elements -> start parallel.
+ thread_index_t iam = omp_get_thread_num();
+
+ difference_type block_size = __s.find_initial_block_size;
+ difference_type start =
+ fetch_and_add<difference_type>(&next_block_start, block_size);
+
+ // Get new block, update pointer to next block.
+ difference_type stop =
+ std::min<difference_type>(length, start + block_size);
+
+ std::pair<RandomAccessIterator1, RandomAccessIterator2> local_result;
+
+ while (start < length)
+ {
+# pragma omp flush(result)
+ // Get new value of result.
+ if (result < start)
+ {
+ // No chance to find first element.
+ break;
+ }
+
+ local_result = selector.sequential_algorithm(
+ begin1 + start, begin1 + stop, begin2 + start, pred);
+ if (local_result.first != (begin1 + stop))
+ {
+ omp_set_lock(&result_lock);
+ if ((local_result.first - begin1) < result)
+ {
+ result = local_result.first - begin1;
+
+ // Result cannot be in future blocks, stop algorithm.
+ fetch_and_add<difference_type>(&next_block_start, length);
+ }
+ omp_unset_lock(&result_lock);
+ }
+
+ block_size =
+ std::min<difference_type>(block_size * __s.find_increasing_factor,
+ __s.find_maximum_block_size);
+
+ // Get new block, update pointer to next block.
+ start =
+ fetch_and_add<difference_type>(&next_block_start, block_size);
+ stop = ((length < (start + block_size))
+ ? length : (start + block_size));
+ }
+ } //parallel
+
+ omp_destroy_lock(&result_lock);
+
+ // Return iterator on found element.
+ return
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>(begin1 + result,
+ begin2 + result);
+ }
+
+#endif
+
+#if _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS
+
+/**
+ * @brief Parallel std::find, constant block size variant.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence. Second sequence
+ * must have same length as first sequence.
+ * @param pred Find predicate.
+ * @param selector Functionality (e. g. std::find_if (), std::equal(),...)
+ * @return Place of finding in both sequences.
+ * @see __gnu_parallel::_Settings::find_sequential_search_size
+ * @see __gnu_parallel::_Settings::find_block_size
+ * There are two main differences between the growing blocks and the
+ * constant-size blocks variants.
+ * 1. For GB, the block size grows; for CSB, the block size is fixed.
+ * 2. For GB, the blocks are allocated dynamically; for CSB, the
+ * blocks are allocated in a predetermined manner, namely spacial
+ * round-robin.
+ */
+template<typename RandomAccessIterator1,
+ typename RandomAccessIterator2,
+ typename Pred,
+ typename Selector>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ find_template(RandomAccessIterator1 begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred, Selector selector,
+ constant_size_blocks_tag)
+ {
+ _GLIBCXX_CALL(end1 - begin1)
+ typedef std::iterator_traits<RandomAccessIterator1> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename traits_type::value_type value_type;
+
+ const _Settings& __s = _Settings::get();
+
+ difference_type length = end1 - begin1;
+
+ difference_type sequential_search_size = std::min<difference_type>(
+ length, __s.find_sequential_search_size);
+
+ // Try it sequentially first.
+ std::pair<RandomAccessIterator1, RandomAccessIterator2> find_seq_result =
+ selector.sequential_algorithm(begin1, begin1 + sequential_search_size,
+ begin2, pred);
+
+ if (find_seq_result.first != (begin1 + sequential_search_size))
+ return find_seq_result;
+
+ difference_type result = length;
+ omp_lock_t result_lock;
+ omp_init_lock(&result_lock);
+
+ // Not within first sequential_search_size elements -> start parallel.
+
+ thread_index_t num_threads = get_max_threads();
+# pragma omp parallel shared(result) num_threads(num_threads)
+ {
+# pragma omp single
+ num_threads = omp_get_num_threads();
+
+ thread_index_t iam = omp_get_thread_num();
+ difference_type block_size = __s.find_initial_block_size;
+
+ // First element of thread's current iteration.
+ difference_type iteration_start = sequential_search_size;
+
+ // Where to work (initialization).
+ difference_type start = iteration_start + iam * block_size;
+ difference_type stop =
+ std::min<difference_type>(length, start + block_size);
+
+ std::pair<RandomAccessIterator1, RandomAccessIterator2> local_result;
+
+ while (start < length)
+ {
+ // Get new value of result.
+# pragma omp flush(result)
+ // No chance to find first element.
+ if (result < start)
+ break;
+ local_result = selector.sequential_algorithm(
+ begin1 + start, begin1 + stop,
+ begin2 + start, pred);
+ if (local_result.first != (begin1 + stop))
+ {
+ omp_set_lock(&result_lock);
+ if ((local_result.first - begin1) < result)
+ result = local_result.first - begin1;
+ omp_unset_lock(&result_lock);
+ // Will not find better value in its interval.
+ break;
+ }
+
+ iteration_start += num_threads * block_size;
+
+ // Where to work.
+ start = iteration_start + iam * block_size;
+ stop = std::min<difference_type>(length, start + block_size);
+ }
+ } //parallel
+
+ omp_destroy_lock(&result_lock);
+
+ // Return iterator on found element.
+ return
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>(begin1 + result,
+ begin2 + result);
+ }
+#endif
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/find_selectors.h b/libstdc++-v3/include/parallel/find_selectors.h
new file mode 100644
index 00000000000..3076bd2327e
--- /dev/null
+++ b/libstdc++-v3/include/parallel/find_selectors.h
@@ -0,0 +1,198 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/find_selectors.h
+ * @brief Function objects representing different tasks to be plugged
+ * into the parallel find algorithm.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_FIND_FUNCTIONS_H
+#define _GLIBCXX_PARALLEL_FIND_FUNCTIONS_H 1
+
+#include <parallel/tags.h>
+#include <parallel/basic_iterator.h>
+#include <bits/stl_pair.h>
+
+namespace __gnu_parallel
+{
+ /** @brief Base class of all __gnu_parallel::find_template selectors. */
+ struct generic_find_selector
+ { };
+
+ /**
+ * @brief Test predicate on a single element, used for std::find()
+ * and std::find_if ().
+ */
+ struct find_if_selector : public generic_find_selector
+ {
+ /** @brief Test on one position.
+ * @param i1 Iterator on first sequence.
+ * @param i2 Iterator on second sequence (unused).
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ bool
+ operator()(RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred)
+ { return pred(*i1); }
+
+ /** @brief Corresponding sequential algorithm on a sequence.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ sequential_algorithm(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred)
+ { return std::make_pair(find_if(begin1, end1, pred,
+ sequential_tag()), begin2); }
+ };
+
+ /** @brief Test predicate on two adjacent elements. */
+ struct adjacent_find_selector : public generic_find_selector
+ {
+ /** @brief Test on one position.
+ * @param i1 Iterator on first sequence.
+ * @param i2 Iterator on second sequence (unused).
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ bool
+ operator()(RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred)
+ {
+ // Passed end iterator is one short.
+ return pred(*i1, *(i1 + 1));
+ }
+
+ /** @brief Corresponding sequential algorithm on a sequence.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ sequential_algorithm(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred)
+ {
+ // Passed end iterator is one short.
+ RandomAccessIterator1 spot = adjacent_find(begin1, end1 + 1,
+ pred, sequential_tag());
+ if (spot == (end1 + 1))
+ spot = end1;
+ return std::make_pair(spot, begin2);
+ }
+ };
+
+ /** @brief Test inverted predicate on a single element. */
+ struct mismatch_selector : public generic_find_selector
+ {
+ /**
+ * @brief Test on one position.
+ * @param i1 Iterator on first sequence.
+ * @param i2 Iterator on second sequence (unused).
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ bool
+ operator()(RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred)
+ { return !pred(*i1, *i2); }
+
+ /**
+ * @brief Corresponding sequential algorithm on a sequence.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param pred Find predicate.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ sequential_algorithm(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred)
+ { return mismatch(begin1, end1, begin2, pred, sequential_tag()); }
+ };
+
+
+ /** @brief Test predicate on several elements. */
+ template<typename ForwardIterator>
+ struct find_first_of_selector : public generic_find_selector
+ {
+ ForwardIterator begin;
+ ForwardIterator end;
+
+ explicit find_first_of_selector(ForwardIterator begin, ForwardIterator end)
+ : begin(begin), end(end) { }
+
+ /** @brief Test on one position.
+ * @param i1 Iterator on first sequence.
+ * @param i2 Iterator on second sequence (unused).
+ * @param pred Find predicate. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ bool
+ operator()(RandomAccessIterator1 i1, RandomAccessIterator2 i2, Pred pred)
+ {
+ for (ForwardIterator pos_in_candidates = begin;
+ pos_in_candidates != end; ++pos_in_candidates)
+ if (pred(*i1, *pos_in_candidates))
+ return true;
+ return false;
+ }
+
+ /** @brief Corresponding sequential algorithm on a sequence.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param pred Find predicate. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename Pred>
+ std::pair<RandomAccessIterator1, RandomAccessIterator2>
+ sequential_algorithm(RandomAccessIterator1 begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2 begin2, Pred pred)
+ { return std::make_pair(find_first_of(begin1, end1, begin, end, pred,
+ sequential_tag()), begin2); }
+ };
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/for_each.h b/libstdc++-v3/include/parallel/for_each.h
new file mode 100644
index 00000000000..8a4d702d2d5
--- /dev/null
+++ b/libstdc++-v3/include/parallel/for_each.h
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/for_each.h
+ * @brief Main interface for embarrassingly parallel functions.
+ *
+ * The explicit implementation are in other header files, like
+ * workstealing.h, par_loop.h, omp_loop.h, and omp_loop_static.h.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_FOR_EACH_H
+#define _GLIBCXX_PARALLEL_FOR_EACH_H 1
+
+#include <parallel/settings.h>
+#include <parallel/par_loop.h>
+#include <parallel/omp_loop.h>
+#include <parallel/workstealing.h>
+
+namespace __gnu_parallel
+{
+ /** @brief Chose the desired algorithm by evaluating @c parallelism_tag.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param user_op A user-specified functor (comparator, predicate,
+ * associative operator,...)
+ * @param functionality functor to "process" an element with
+ * user_op (depends on desired functionality, e. g. accumulate,
+ * for_each,...
+ * @param reduction Reduction functor.
+ * @param reduction_start Initial value for reduction.
+ * @param output Output iterator.
+ * @param bound Maximum number of elements processed.
+ * @param parallelism_tag Parallelization method */
+ template<typename InputIterator, typename UserOp,
+ typename Functionality, typename Red, typename Result>
+ UserOp
+ for_each_template_random_access(InputIterator begin, InputIterator end,
+ UserOp user_op,
+ Functionality& functionality,
+ Red reduction, Result reduction_start,
+ Result& output, typename
+ std::iterator_traits<InputIterator>::
+ difference_type bound,
+ _Parallelism parallelism_tag)
+ {
+ if (parallelism_tag == parallel_unbalanced)
+ return for_each_template_random_access_ed(begin, end, user_op,
+ functionality, reduction,
+ reduction_start,
+ output, bound);
+ else if (parallelism_tag == parallel_omp_loop)
+ return for_each_template_random_access_omp_loop(begin, end, user_op,
+ functionality,
+ reduction,
+ reduction_start,
+ output, bound);
+ else if (parallelism_tag == parallel_omp_loop_static)
+ return for_each_template_random_access_omp_loop(begin, end, user_op,
+ functionality,
+ reduction,
+ reduction_start,
+ output, bound);
+ else //e. g. parallel_balanced
+ return for_each_template_random_access_workstealing(begin, end,
+ user_op,
+ functionality,
+ reduction,
+ reduction_start,
+ output, bound);
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/for_each_selectors.h b/libstdc++-v3/include/parallel/for_each_selectors.h
new file mode 100644
index 00000000000..eaa55fc05c6
--- /dev/null
+++ b/libstdc++-v3/include/parallel/for_each_selectors.h
@@ -0,0 +1,366 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/for_each_selectors.h
+ * @brief Functors representing different tasks to be plugged into the
+ * generic parallelization methods for embarrassingly parallel functions.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H
+#define _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H 1
+
+#include <parallel/basic_iterator.h>
+
+namespace __gnu_parallel
+{
+
+ /** @brief Generic selector for embarrassingly parallel functions. */
+ template<typename It>
+ struct generic_for_each_selector
+ {
+ /** @brief Iterator on last element processed; needed for some
+ * algorithms (e. g. std::transform()).
+ */
+ It finish_iterator;
+ };
+
+
+ /** @brief std::for_each() selector. */
+ template<typename It>
+ struct for_each_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object. */
+ template<typename Op>
+ bool
+ operator()(Op& o, It i)
+ {
+ o(*i);
+ return true;
+ }
+ };
+
+ /** @brief std::generate() selector. */
+ template<typename It>
+ struct generate_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object. */
+ template<typename Op>
+ bool
+ operator()(Op& o, It i)
+ {
+ *i = o();
+ return true;
+ }
+ };
+
+ /** @brief std::fill() selector. */
+ template<typename It>
+ struct fill_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param v Current value.
+ * @param i Iterator referencing object. */
+ template<typename Val>
+ bool
+ operator()(Val& v, It i)
+ {
+ *i = v;
+ return true;
+ }
+ };
+
+ /** @brief std::transform() selector, one input sequence variant. */
+ template<typename It>
+ struct transform1_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object. */
+ template<typename Op>
+ bool
+ operator()(Op& o, It i)
+ {
+ *i.second = o(*i.first);
+ return true;
+ }
+ };
+
+ /** @brief std::transform() selector, two input sequences variant. */
+ template<typename It>
+ struct transform2_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object. */
+ template<typename Op>
+ bool
+ operator()(Op& o, It i)
+ {
+ *i.third = o(*i.first, *i.second);
+ return true;
+ }
+ };
+
+ /** @brief std::replace() selector. */
+ template<typename It, typename T>
+ struct replace_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Value to replace with. */
+ const T& new_val;
+
+ /** @brief Constructor
+ * @param new_val Value to replace with. */
+ explicit
+ replace_selector(const T &new_val) : new_val(new_val) {}
+
+ /** @brief Functor execution.
+ * @param v Current value.
+ * @param i Iterator referencing object. */
+ bool
+ operator()(T& v, It i)
+ {
+ if (*i == v)
+ *i = new_val;
+ return true;
+ }
+ };
+
+ /** @brief std::replace() selector. */
+ template<typename It, typename Op, typename T>
+ struct replace_if_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Value to replace with. */
+ const T& new_val;
+
+ /** @brief Constructor.
+ * @param new_val Value to replace with. */
+ explicit
+ replace_if_selector(const T &new_val) : new_val(new_val) { }
+
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object. */
+ bool
+ operator()(Op& o, It i)
+ {
+ if (o(*i))
+ *i = new_val;
+ return true;
+ }
+ };
+
+ /** @brief std::count() selector. */
+ template<typename It, typename Diff>
+ struct count_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param v Current value.
+ * @param i Iterator referencing object.
+ * @return 1 if count, 0 if does not count. */
+ template<typename Val>
+ Diff
+ operator()(Val& v, It i)
+ { return (v == *i) ? 1 : 0; }
+ };
+
+ /** @brief std::count_if () selector. */
+ template<typename It, typename Diff>
+ struct count_if_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator.
+ * @param i Iterator referencing object.
+ * @return 1 if count, 0 if does not count. */
+ template<typename Op>
+ Diff
+ operator()(Op& o, It i)
+ { return (o(*i)) ? 1 : 0; }
+ };
+
+ /** @brief std::accumulate() selector. */
+ template<typename It>
+ struct accumulate_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator (unused).
+ * @param i Iterator referencing object.
+ * @return The current value. */
+ template<typename Op>
+ typename std::iterator_traits<It>::value_type operator()(Op o, It i)
+ { return *i; }
+ };
+
+ /** @brief std::inner_product() selector. */
+ template<typename It, typename It2, typename T>
+ struct inner_product_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Begin iterator of first sequence. */
+ It begin1_iterator;
+
+ /** @brief Begin iterator of second sequence. */
+ It2 begin2_iterator;
+
+ /** @brief Constructor.
+ * @param b1 Begin iterator of first sequence.
+ * @param b2 Begin iterator of second sequence. */
+ explicit
+ inner_product_selector(It b1, It2 b2)
+ : begin1_iterator(b1), begin2_iterator(b2) { }
+
+ /** @brief Functor execution.
+ * @param mult Multiplication functor.
+ * @param current Iterator referencing object.
+ * @return Inner product elemental result. */
+ template<typename Op>
+ T
+ operator()(Op mult, It current)
+ {
+ typename std::iterator_traits<It>::difference_type position
+ = current - begin1_iterator;
+ return mult(*current, *(begin2_iterator + position));
+ }
+ };
+
+ /** @brief Selector that just returns the passed iterator. */
+ template<typename It>
+ struct identity_selector : public generic_for_each_selector<It>
+ {
+ /** @brief Functor execution.
+ * @param o Operator (unused).
+ * @param i Iterator referencing object.
+ * @return Passed iterator. */
+ template<typename Op>
+ It
+ operator()(Op o, It i)
+ { return i; }
+ };
+
+ /** @brief Selector that returns the difference between two adjacent
+ * elements.
+ */
+ template<typename It>
+ struct adjacent_difference_selector : public generic_for_each_selector<It>
+ {
+ template<typename Op>
+ bool
+ operator()(Op& o, It i)
+ {
+ typename It::first_type go_back_one = i.first;
+ --go_back_one;
+ *i.second = o(*i.first, *go_back_one);
+ return true;
+ }
+ };
+
+ // XXX move into type_traits?
+ /** @brief Functor doing nothing
+ *
+ * For some reduction tasks (this is not a function object, but is
+ * passed as selector dummy parameter.
+ */
+ struct nothing
+ {
+ /** @brief Functor execution.
+ * @param i Iterator referencing object. */
+ template<typename It>
+ void
+ operator()(It i) { }
+ };
+
+ /** @brief Reduction function doing nothing. */
+ struct dummy_reduct
+ {
+ bool
+ operator()(bool /*x*/, bool /*y*/) const
+ { return true; }
+ };
+
+ /** @brief Reduction for finding the maximum element, using a comparator. */
+ template<typename Comp, typename It>
+ struct min_element_reduct
+ {
+ Comp& comp;
+
+ explicit
+ min_element_reduct(Comp &c) : comp(c) { }
+
+ It
+ operator()(It x, It y)
+ {
+ if (comp(*x, *y))
+ return x;
+ else
+ return y;
+ }
+ };
+
+ /** @brief Reduction for finding the maximum element, using a comparator. */
+ template<typename Comp, typename It>
+ struct max_element_reduct
+ {
+ Comp& comp;
+
+ explicit
+ max_element_reduct(Comp& c) : comp(c) { }
+
+ It
+ operator()(It x, It y)
+ {
+ if (comp(*x, *y))
+ return y;
+ else
+ return x;
+ }
+ };
+
+ /** @brief General reduction, using a binary operator. */
+ template<typename BinOp>
+ struct accumulate_binop_reduct
+ {
+ BinOp& binop;
+
+ explicit
+ accumulate_binop_reduct(BinOp& b) : binop(b) { }
+
+ template<typename Result, typename Addend>
+ Result
+ operator()(const Result& x, const Addend& y)
+ { return binop(x, y); }
+ };
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/iterator.h b/libstdc++-v3/include/parallel/iterator.h
new file mode 100644
index 00000000000..ba20a460d5c
--- /dev/null
+++ b/libstdc++-v3/include/parallel/iterator.h
@@ -0,0 +1,205 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/iterator.h
+ * @brief Helper iterator classes for the std::transform() functions.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_ITERATOR_H
+#define _GLIBCXX_PARALLEL_ITERATOR_H 1
+
+#include <parallel/basic_iterator.h>
+#include <bits/stl_pair.h>
+
+namespace __gnu_parallel
+{
+ /** @brief A pair of iterators. The usual iterator operations are
+ * applied to both child iterators.
+ */
+ template<typename Iterator1, typename Iterator2, typename IteratorCategory>
+ class iterator_pair : public std::pair<Iterator1, Iterator2>
+ {
+ private:
+ typedef iterator_pair<Iterator1, Iterator2, IteratorCategory> type;
+ typedef std::pair<Iterator1, Iterator2> base_type;
+
+ public:
+ typedef IteratorCategory iterator_category;
+ typedef void value_type;
+
+ typedef std::iterator_traits<Iterator1> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef type* pointer;
+ typedef type& reference;
+
+ iterator_pair() { }
+
+ iterator_pair(const Iterator1& first, const Iterator2& second)
+ : base_type(first, second) { }
+
+ // Pre-increment operator.
+ type&
+ operator++()
+ {
+ ++base_type::first;
+ ++base_type::second;
+ return *this;
+ }
+
+ // Post-increment operator.
+ const type
+ operator++(int)
+ { return type(base_type::first++, base_type::second++); }
+
+ // Pre-decrement operator.
+ type&
+ operator--()
+ {
+ --base_type::first;
+ --base_type::second;
+ return *this;
+ }
+
+ // Post-decrement operator.
+ const type
+ operator--(int)
+ { return type(base_type::first--, base_type::second--); }
+
+ // Type conversion.
+ operator Iterator2() const
+ { return base_type::second; }
+
+ type&
+ operator=(const type& other)
+ {
+ base_type::first = other.first;
+ base_type::second = other.second;
+ return *this;
+ }
+
+ type
+ operator+(difference_type delta) const
+ { return type(base_type::first + delta, base_type::second + delta); }
+
+ difference_type
+ operator-(const type& other) const
+ { return base_type::first - other.first; }
+ };
+
+
+ /** @brief A triple of iterators. The usual iterator operations are
+ applied to all three child iterators.
+ */
+ template<typename Iterator1, typename Iterator2, typename Iterator3,
+ typename IteratorCategory>
+ class iterator_triple
+ {
+ private:
+ typedef iterator_triple<Iterator1, Iterator2, Iterator3,
+ IteratorCategory> type;
+
+ public:
+ typedef IteratorCategory iterator_category;
+ typedef void value_type;
+ typedef typename Iterator1::difference_type difference_type;
+ typedef type* pointer;
+ typedef type& reference;
+
+ Iterator1 first;
+ Iterator2 second;
+ Iterator3 third;
+
+ iterator_triple() { }
+
+ iterator_triple(const Iterator1& _first, const Iterator2& _second,
+ const Iterator3& _third)
+ {
+ first = _first;
+ second = _second;
+ third = _third;
+ }
+
+ // Pre-increment operator.
+ type&
+ operator++()
+ {
+ ++first;
+ ++second;
+ ++third;
+ return *this;
+ }
+
+ // Post-increment operator.
+ const type
+ operator++(int)
+ { return type(first++, second++, third++); }
+
+ // Pre-decrement operator.
+ type&
+ operator--()
+ {
+ --first;
+ --second;
+ --third;
+ return *this;
+ }
+
+ // Post-decrement operator.
+ const type
+ operator--(int)
+ { return type(first--, second--, third--); }
+
+ // Type conversion.
+ operator Iterator3() const
+ { return third; }
+
+ type&
+ operator=(const type& other)
+ {
+ first = other.first;
+ second = other.second;
+ third = other.third;
+ return *this;
+ }
+
+ type
+ operator+(difference_type delta) const
+ { return type(first + delta, second + delta, third + delta); }
+
+ difference_type
+ operator-(const type& other) const
+ { return first - other.first; }
+ };
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/list_partition.h b/libstdc++-v3/include/parallel/list_partition.h
new file mode 100644
index 00000000000..5adc5c9280d
--- /dev/null
+++ b/libstdc++-v3/include/parallel/list_partition.h
@@ -0,0 +1,182 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/list_partition.h
+ * @brief Functionality to split sequence referenced by only input
+ * iterators.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Leonor Frias Moya and Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_LIST_PARTITION_H
+#define _GLIBCXX_PARALLEL_LIST_PARTITION_H 1
+
+#include <parallel/parallel.h>
+#include <vector>
+
+namespace __gnu_parallel
+{
+ /** @brief Shrinks and doubles the ranges.
+ * @param os_starts Start positions worked on (oversampled).
+ * @param count_to_two Counts up to 2.
+ * @param range_length Current length of a chunk.
+ * @param make_twice Whether the @c os_starts is allowed to be
+ * grown or not
+ */
+ template<typename InputIterator>
+ void
+ shrink_and_double(std::vector<InputIterator>& os_starts,
+ size_t& count_to_two, size_t& range_length,
+ const bool make_twice)
+ {
+ ++count_to_two;
+ if (not make_twice or count_to_two < 2)
+ shrink(os_starts, count_to_two, range_length);
+ else
+ {
+ os_starts.resize((os_starts.size() - 1) * 2 + 1);
+ count_to_two = 0;
+ }
+ }
+
+ /** @brief Combines two ranges into one and thus halves the number of ranges.
+ * @param os_starts Start positions worked on (oversampled).
+ * @param count_to_two Counts up to 2.
+ * @param range_length Current length of a chunk. */
+ template<typename InputIterator>
+ void
+ shrink(std::vector<InputIterator>& os_starts, size_t& count_to_two,
+ size_t& range_length)
+ {
+ for (typename std::vector<InputIterator>::size_type i = 0;
+ i <= (os_starts.size() / 2); ++i)
+ os_starts[i] = os_starts[i * 2];
+ range_length *= 2;
+ }
+
+ /** @brief Splits a sequence given by input iterators into parts of
+ * almost equal size
+ *
+ * The function needs only one pass over the sequence.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param starts Start iterators for the resulting parts, dimension
+ * @c num_parts+1. For convenience, @c starts @c [num_parts]
+ * contains the end iterator of the sequence.
+ * @param lengths Length of the resulting parts.
+ * @param num_parts Number of parts to split the sequence into.
+ * @param f Functor to be applied to each element by traversing it
+ * @param oversampling Oversampling factor. If 0, then the
+ * partitions will differ in at most @f$ \sqrt{\mathrm{end} -
+ * \mathrm{begin}} @f$ elements. Otherwise, the ratio between the
+ * longest and the shortest part is bounded by @f$
+ * 1/(\mathrm{oversampling} \cdot \mathrm{num\_parts}) @f$.
+ * @return Length of the whole sequence.
+ */
+ template<typename InputIterator, typename FunctorType>
+ size_t
+ list_partition(const InputIterator begin, const InputIterator end,
+ InputIterator* starts, size_t* lengths, const int num_parts,
+ FunctorType& f, int oversampling = 0)
+ {
+ bool make_twice = false;
+
+ // The resizing algorithm is chosen according to the oversampling factor.
+ if (oversampling == 0)
+ {
+ make_twice = true;
+ oversampling = 1;
+ }
+
+ std::vector<InputIterator> os_starts(2 * oversampling * num_parts + 1);
+
+ os_starts[0]= begin;
+ InputIterator prev = begin, it = begin;
+ size_t dist_limit = 0, dist = 0;
+ size_t cur = 1, next = 1;
+ size_t range_length = 1;
+ size_t count_to_two = 0;
+ while (it != end)
+ {
+ cur = next;
+ for (; cur < os_starts.size() and it != end; ++cur)
+ {
+ for (dist_limit += range_length;
+ dist < dist_limit and it != end; ++dist)
+ {
+ f(it);
+ ++it;
+ }
+ os_starts[cur] = it;
+ }
+
+ // Must compare for end and not cur < os_starts.size() , because
+ // cur could be == os_starts.size() as well
+ if (it == end)
+ break;
+
+ shrink_and_double(os_starts, count_to_two, range_length, make_twice);
+ next = os_starts.size() / 2 + 1;
+ }
+
+ // Calculation of the parts (one must be extracted from current
+ // because the partition beginning at end, consists only of
+ // itself).
+ size_t size_part = (cur - 1) / num_parts;
+ int size_greater = static_cast<int>((cur - 1) % num_parts);
+ starts[0] = os_starts[0];
+
+ size_t index = 0;
+
+ // Smallest partitions.
+ for (int i = 1; i < (num_parts + 1 - size_greater); ++i)
+ {
+ lengths[i - 1] = size_part * range_length;
+ index += size_part;
+ starts[i] = os_starts[index];
+ }
+
+ // Biggest partitions.
+ for (int i = num_parts + 1 - size_greater; i <= num_parts; ++i)
+ {
+ lengths[i - 1] = (size_part+1) * range_length;
+ index += (size_part+1);
+ starts[i] = os_starts[index];
+ }
+
+ // Correction of the end size (the end iteration has not finished).
+ lengths[num_parts - 1] -= (dist_limit - dist);
+
+ return dist;
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/losertree.h b/libstdc++-v3/include/parallel/losertree.h
new file mode 100644
index 00000000000..ddeb0d36d6c
--- /dev/null
+++ b/libstdc++-v3/include/parallel/losertree.h
@@ -0,0 +1,1100 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/losertree.h
+* @brief Many generic loser tree variants.
+* This file is a GNU parallel extension to the Standard C++ Library.
+*/
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_LOSERTREE_H
+#define _GLIBCXX_PARALLEL_LOSERTREE_H 1
+
+#include <functional>
+
+#include <bits/stl_algobase.h>
+#include <parallel/features.h>
+#include <parallel/base.h>
+
+namespace __gnu_parallel
+{
+
+#if _GLIBCXX_LOSER_TREE_EXPLICIT
+
+/** @brief Guarded loser tree, copying the whole element into the
+* tree structure.
+*
+* Guarding is done explicitly through two flags per element, inf
+* and sup This is a quite slow variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTreeExplicit
+ {
+ private:
+ struct Loser
+ {
+ // The relevant element.
+ T key;
+
+ // Is this an infimum or supremum element?
+ bool inf, sup;
+
+ // Number of the sequence the element comes from.
+ int source;
+ };
+
+ unsigned int size, offset;
+ Loser* losers;
+ Comparator comp;
+
+ public:
+ LoserTreeExplicit(unsigned int _size, Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ size = _size;
+ offset = size;
+ losers = new Loser[size];
+ for (unsigned int l = 0; l < size; ++l)
+ {
+ //losers[l].key = ... stays unset
+ losers[l].inf = true;
+ losers[l].sup = false;
+ //losers[l].source = -1; //sentinel
+ }
+ }
+
+ ~LoserTreeExplicit()
+ { delete[] losers; }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(T key, int source, bool sup)
+ {
+ bool inf = false;
+ for (unsigned int pos = (offset + source) / 2; pos > 0; pos /= 2)
+ {
+ if ((!inf && !losers[pos].inf && !sup && !losers[pos].sup
+ && comp(losers[pos].key, key)) || losers[pos].inf || sup)
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].key, key);
+ std::swap(losers[pos].inf, inf);
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ }
+ }
+
+ losers[0].key = key;
+ losers[0].inf = inf;
+ losers[0].sup = sup;
+ losers[0].source = source;
+ }
+
+ void
+ init() { }
+
+ void
+ delete_min_insert(T key, bool sup)
+ {
+ bool inf = false;
+ int source = losers[0].source;
+ for (unsigned int pos = (offset + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if ((!inf && !losers[pos].inf && !sup && !losers[pos].sup
+ && comp(losers[pos].key, key))
+ || losers[pos].inf || sup)
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].key, key);
+ std::swap(losers[pos].inf, inf);
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ }
+ }
+
+ losers[0].key = key;
+ losers[0].inf = inf;
+ losers[0].sup = sup;
+ losers[0].source = source;
+ }
+
+ void
+ insert_start_stable(T key, int source, bool sup)
+ {
+ bool inf = false;
+ for (unsigned int pos = (offset + source) / 2; pos > 0; pos /= 2)
+ {
+ if ((!inf && !losers[pos].inf && !sup && !losers[pos].sup
+ && ((comp(losers[pos].key, key))
+ || (!comp(key, losers[pos].key)
+ && losers[pos].source < source)))
+ || losers[pos].inf || sup)
+ {
+ // Take next key.
+ std::swap(losers[pos].key, key);
+ std::swap(losers[pos].inf, inf);
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ }
+ }
+
+ losers[0].key = key;
+ losers[0].inf = inf;
+ losers[0].sup = sup;
+ losers[0].source = source;
+ }
+
+ void
+ init_stable() { }
+
+ void
+ delete_min_insert_stable(T key, bool sup)
+ {
+ bool inf = false;
+ int source = losers[0].source;
+ for (unsigned int pos = (offset + source) / 2; pos > 0; pos /= 2)
+ {
+ if ((!inf && !losers[pos].inf && !sup && !losers[pos].sup
+ && ((comp(losers[pos].key, key))
+ || (!comp(key, losers[pos].key)
+ && losers[pos].source < source)))
+ || losers[pos].inf || sup)
+ {
+ std::swap(losers[pos].key, key);
+ std::swap(losers[pos].inf, inf);
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ }
+ }
+
+ losers[0].key = key;
+ losers[0].inf = inf;
+ losers[0].sup = sup;
+ losers[0].source = source;
+ }
+ };
+
+#endif
+
+#if _GLIBCXX_LOSER_TREE
+
+/** @brief Guarded loser tree, either copying the whole element into
+* the tree structure, or looking up the element via the index.
+*
+* Guarding is done explicitly through one flag sup per element,
+* inf is not needed due to a better initialization routine. This
+* is a well-performing variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTree
+ {
+ private:
+ struct Loser
+ {
+ bool sup;
+ int source;
+ T key;
+ };
+
+ unsigned int ik, k, offset;
+ Loser* losers;
+ Comparator comp;
+ bool first_insert;
+
+ public:
+ LoserTree(unsigned int _k, Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ ik = _k;
+
+ // Next greater power of 2.
+ k = 1 << (log2(ik - 1) + 1);
+ offset = k;
+ // Avoid default-constructing losers[].key
+ losers = static_cast<Loser*>(::operator new(2 * k * sizeof(Loser)));
+ for (unsigned int i = ik - 1; i < k; ++i)
+ losers[i + k].sup = true;
+
+ first_insert = true;
+ }
+
+ ~LoserTree()
+ { ::operator delete(losers); }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(const T& key, int source, bool sup)
+ {
+ unsigned int pos = k + source;
+
+ if(first_insert)
+ {
+ // Construct all keys, so we can easily deconstruct them.
+ for (unsigned int i = 0; i < (2 * k); ++i)
+ ::new(&(losers[i].key)) T(key);
+ first_insert = false;
+ }
+ else
+ ::new(&(losers[pos].key)) T(key);
+
+ losers[pos].sup = sup;
+ losers[pos].source = source;
+ }
+
+ unsigned int
+ init_winner (unsigned int root)
+ {
+ if (root >= k)
+ {
+ return root;
+ }
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if (losers[right].sup
+ || (!losers[left].sup
+ && !comp(losers[right].key, losers[left].key)))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init()
+ { losers[0] = losers[init_winner(1)]; }
+
+ // Do not pass const reference since key will be used as local variable.
+ void
+ delete_min_insert(T key, bool sup)
+ {
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if (sup || (!losers[pos].sup && comp(losers[pos].key, key)))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].key, key);
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+ losers[0].key = key;
+ }
+
+ void
+ insert_start_stable(const T& key, int source, bool sup)
+ { return insert_start(key, source, sup); }
+
+ unsigned int
+ init_winner_stable (unsigned int root)
+ {
+ if (root >= k)
+ {
+ return root;
+ }
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if (losers[right].sup
+ || (!losers[left].sup
+ && !comp(losers[right].key, losers[left].key)))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init_stable()
+ { losers[0] = losers[init_winner_stable(1)]; }
+
+ // Do not pass const reference since key will be used as local variable.
+ void
+ delete_min_insert_stable(T key, bool sup)
+ {
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted, ties are broken by source.
+ if ( (sup && (!losers[pos].sup || losers[pos].source < source))
+ || (!sup && !losers[pos].sup
+ && ((comp(losers[pos].key, key))
+ || (!comp(key, losers[pos].key)
+ && losers[pos].source < source))))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].key, key);
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+ losers[0].key = key;
+ }
+ };
+
+#endif
+
+#if _GLIBCXX_LOSER_TREE_REFERENCE
+
+/** @brief Guarded loser tree, either copying the whole element into
+* the tree structure, or looking up the element via the index.
+*
+* Guarding is done explicitly through one flag sup per element,
+* inf is not needed due to a better initialization routine. This
+* is a well-performing variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTreeReference
+ {
+#undef COPY
+#ifdef COPY
+#define KEY(i) losers[i].key
+#define KEY_SOURCE(i) key
+#else
+#define KEY(i) keys[losers[i].source]
+#define KEY_SOURCE(i) keys[i]
+#endif
+ private:
+ struct Loser
+ {
+ bool sup;
+ int source;
+#ifdef COPY
+ T key;
+#endif
+ };
+
+ unsigned int ik, k, offset;
+ Loser* losers;
+#ifndef COPY
+ T* keys;
+#endif
+ Comparator comp;
+
+ public:
+ LoserTreeReference(unsigned int _k, Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ ik = _k;
+
+ // Next greater power of 2.
+ k = 1 << (log2(ik - 1) + 1);
+ offset = k;
+ losers = new Loser[k * 2];
+#ifndef COPY
+ keys = new T[ik];
+#endif
+ for (unsigned int i = ik - 1; i < k; ++i)
+ losers[i + k].sup = true;
+ }
+
+ ~LoserTreeReference()
+ {
+ delete[] losers;
+#ifndef COPY
+ delete[] keys;
+#endif
+ }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(T key, int source, bool sup)
+ {
+ unsigned int pos = k + source;
+
+ losers[pos].sup = sup;
+ losers[pos].source = source;
+ KEY(pos) = key;
+ }
+
+ unsigned int
+ init_winner(unsigned int root)
+ {
+ if (root >= k)
+ {
+ return root;
+ }
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if ( losers[right].sup ||
+ (!losers[left].sup && !comp(KEY(right), KEY(left))))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init()
+ {
+ losers[0] = losers[init_winner(1)];
+ }
+
+ void
+ delete_min_insert(T key, bool sup)
+ {
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if (sup || (!losers[pos].sup && comp(KEY(pos), KEY_SOURCE(source))))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+#ifdef COPY
+ std::swap(KEY(pos), KEY_SOURCE(source));
+#endif
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+#ifdef COPY
+ KEY(0) = KEY_SOURCE(source);
+#endif
+ }
+
+ void
+ insert_start_stable(T key, int source, bool sup)
+ { return insert_start(key, source, sup); }
+
+ unsigned int
+ init_winner_stable(unsigned int root)
+ {
+ if (root >= k)
+ {
+ return root;
+ }
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if (losers[right].sup
+ || (!losers[left].sup && !comp(KEY(right), KEY(left))))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init_stable()
+ { losers[0] = losers[init_winner_stable(1)]; }
+
+ void
+ delete_min_insert_stable(T key, bool sup)
+ {
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted, ties are broken by source.
+ if ((sup && (!losers[pos].sup || losers[pos].source < source))
+ || (!sup && !losers[pos].sup
+ && ((comp(KEY(pos), KEY_SOURCE(source)))
+ || (!comp(KEY_SOURCE(source), KEY(pos))
+ && losers[pos].source < source))))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+#ifdef COPY
+ std::swap(KEY(pos), KEY_SOURCE(source));
+#endif
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+#ifdef COPY
+ KEY(0) = KEY_SOURCE(source);
+#endif
+ }
+ };
+#undef KEY
+#undef KEY_SOURCE
+
+#endif
+
+#if _GLIBCXX_LOSER_TREE_POINTER
+
+/** @brief Guarded loser tree, either copying the whole element into
+ the tree structure, or looking up the element via the index.
+* Guarding is done explicitly through one flag sup per element,
+* inf is not needed due to a better initialization routine.
+* This is a well-performing variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTreePointer
+ {
+ private:
+ struct Loser
+ {
+ bool sup;
+ int source;
+ const T* keyp;
+ };
+
+ unsigned int ik, k, offset;
+ Loser* losers;
+ Comparator comp;
+
+ public:
+ LoserTreePointer(unsigned int _k, Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ ik = _k;
+
+ // Next greater power of 2.
+ k = 1 << (log2(ik - 1) + 1);
+ offset = k;
+ losers = new Loser[k * 2];
+ for (unsigned int i = ik - 1; i < k; ++i)
+ losers[i + k].sup = true;
+ }
+
+ ~LoserTreePointer()
+ { delete[] losers; }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(const T& key, int source, bool sup)
+ {
+ unsigned int pos = k + source;
+
+ losers[pos].sup = sup;
+ losers[pos].source = source;
+ losers[pos].keyp = &key;
+ }
+
+ unsigned int
+ init_winner(unsigned int root)
+ {
+ if (root >= k)
+ return root;
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if (losers[right].sup
+ || (!losers[left].sup
+ && !comp(*losers[right].keyp, *losers[left].keyp)))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init()
+ { losers[0] = losers[init_winner(1)]; }
+
+ void
+ delete_min_insert(const T& key, bool sup)
+ {
+ const T* keyp = &key;
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if (sup || (!losers[pos].sup && comp(*losers[pos].keyp, *keyp)))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].keyp, keyp);
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+ losers[0].keyp = keyp;
+ }
+
+ void
+ insert_start_stable(const T& key, int source, bool sup)
+ { return insert_start(key, source, sup); }
+
+ unsigned int
+ init_winner_stable(unsigned int root)
+ {
+ if (root >= k)
+ {
+ return root;
+ }
+ else
+ {
+ unsigned int left = init_winner (2 * root);
+ unsigned int right = init_winner (2 * root + 1);
+ if (losers[right].sup
+ || (!losers[left].sup && !comp(*losers[right].keyp,
+ *losers[left].keyp)))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init_stable()
+ { losers[0] = losers[init_winner_stable(1)]; }
+
+ void
+ delete_min_insert_stable(const T& key, bool sup)
+ {
+ const T* keyp = &key;
+ int source = losers[0].source;
+ for (unsigned int pos = (k + source) / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted, ties are broken by source.
+ if ( (sup && (!losers[pos].sup || losers[pos].source < source))
+ || (!sup && !losers[pos].sup &&
+ ((comp(*losers[pos].keyp, *keyp))
+ || (!comp(*keyp, *losers[pos].keyp)
+ && losers[pos].source < source))))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].sup, sup);
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].keyp, keyp);
+ }
+ }
+
+ losers[0].sup = sup;
+ losers[0].source = source;
+ losers[0].keyp = keyp;
+ }
+ };
+
+#endif
+
+#if _GLIBCXX_LOSER_TREE_UNGUARDED
+
+/** @brief Unguarded loser tree, copying the whole element into the
+* tree structure.
+*
+* No guarding is done, therefore not a single input sequence must
+* run empty. This is a very fast variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTreeUnguarded
+ {
+ private:
+ struct Loser
+ {
+ int source;
+ T key;
+ };
+
+ unsigned int ik, k, offset;
+ unsigned int* mapping;
+ Loser* losers;
+ Comparator comp;
+
+ void
+ map(unsigned int root, unsigned int begin, unsigned int end)
+ {
+ if (begin + 1 == end)
+ mapping[begin] = root;
+ else
+ {
+ // Next greater or equal power of 2.
+ unsigned int left = 1 << (log2(end - begin - 1));
+ map(root * 2, begin, begin + left);
+ map(root * 2 + 1, begin + left, end);
+ }
+ }
+
+ public:
+ LoserTreeUnguarded(unsigned int _k, Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ ik = _k;
+ // Next greater or equal power of 2.
+ k = 1 << (log2(ik - 1) + 1);
+ offset = k;
+ losers = new Loser[k + ik];
+ mapping = new unsigned int[ik];
+ map(1, 0, ik);
+ }
+
+ ~LoserTreeUnguarded()
+ {
+ delete[] losers;
+ delete[] mapping;
+ }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(const T& key, int source, bool)
+ {
+ unsigned int pos = mapping[source];
+ losers[pos].source = source;
+ losers[pos].key = key;
+ }
+
+ unsigned int
+ init_winner(unsigned int root, unsigned int begin, unsigned int end)
+ {
+ if (begin + 1 == end)
+ return mapping[begin];
+ else
+ {
+ // Next greater or equal power of 2.
+ unsigned int division = 1 << (log2(end - begin - 1));
+ unsigned int left = init_winner(2 * root, begin, begin + division);
+ unsigned int right =
+ init_winner(2 * root + 1, begin + division, end);
+ if (!comp(losers[right].key, losers[left].key))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init()
+ { losers[0] = losers[init_winner(1, 0, ik)]; }
+
+ // Do not pass const reference since key will be used as local variable.
+ void
+ delete_min_insert(const T& key, bool)
+ {
+ losers[0].key = key;
+ T& keyr = losers[0].key;
+ int& source = losers[0].source;
+ for (int pos = mapping[source] / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if (comp(losers[pos].key, keyr))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].key, keyr);
+ }
+ }
+ }
+
+ void
+ insert_start_stable(const T& key, int source, bool)
+ { return insert_start(key, source, false); }
+
+ void
+ init_stable()
+ { init(); }
+
+ void
+ delete_min_insert_stable(const T& key, bool)
+ {
+ losers[0].key = key;
+ T& keyr = losers[0].key;
+ int& source = losers[0].source;
+ for (int pos = mapping[source] / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted, ties are broken by source.
+ if (comp(losers[pos].key, keyr)
+ || (!comp(keyr, losers[pos].key)
+ && losers[pos].source < source))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].key, keyr);
+ }
+ }
+ }
+ };
+
+#endif
+
+#if _GLIBCXX_LOSER_TREE_POINTER_UNGUARDED
+
+/** @brief Unguarded loser tree, keeping only pointers to the
+* elements in the tree structure.
+*
+* No guarding is done, therefore not a single input sequence must
+* run empty. This is a very fast variant.
+*/
+template<typename T, typename Comparator = std::less<T> >
+ class LoserTreePointerUnguarded
+ {
+ private:
+ struct Loser
+ {
+ int source;
+ const T* keyp;
+ };
+
+ unsigned int ik, k, offset;
+ unsigned int* mapping;
+ Loser* losers;
+ Comparator comp;
+
+ void map(unsigned int root, unsigned int begin, unsigned int end)
+ {
+ if (begin + 1 == end)
+ mapping[begin] = root;
+ else
+ {
+ // Next greater or equal power of 2.
+ unsigned int left = 1 << (log2(end - begin - 1));
+ map(root * 2, begin, begin + left);
+ map(root * 2 + 1, begin + left, end);
+ }
+ }
+
+ public:
+ LoserTreePointerUnguarded(unsigned int _k,
+ Comparator _comp = std::less<T>())
+ : comp(_comp)
+ {
+ ik = _k;
+
+ // Next greater power of 2.
+ k = 1 << (log2(ik - 1) + 1);
+ offset = k;
+ losers = new Loser[k + ik];
+ mapping = new unsigned int[ik];
+ map(1, 0, ik);
+ }
+
+ ~LoserTreePointerUnguarded()
+ {
+ delete[] losers;
+ delete[] mapping;
+ }
+
+ int
+ get_min_source()
+ { return losers[0].source; }
+
+ void
+ insert_start(const T& key, int source, bool)
+ {
+ unsigned int pos = mapping[source];
+ losers[pos].source = source;
+ losers[pos].keyp = &key;
+ }
+
+ unsigned int
+ init_winner(unsigned int root, unsigned int begin, unsigned int end)
+ {
+ if (begin + 1 == end)
+ return mapping[begin];
+ else
+ {
+ // Next greater or equal power of 2.
+ unsigned int division = 1 << (log2(end - begin - 1));
+ unsigned int left = init_winner(2 * root, begin, begin + division);
+ unsigned int right = init_winner(2 * root + 1,
+ begin + division, end);
+ if (!comp(*losers[right].keyp, *losers[left].keyp))
+ {
+ // Left one is less or equal.
+ losers[root] = losers[right];
+ return left;
+ }
+ else
+ {
+ // Right one is less.
+ losers[root] = losers[left];
+ return right;
+ }
+ }
+ }
+
+ void
+ init()
+ { losers[0] = losers[init_winner(1, 0, ik)]; }
+
+ void
+ delete_min_insert(const T& key, bool)
+ {
+ const T* keyp = &key;
+ int& source = losers[0].source;
+ for (int pos = mapping[source] / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted.
+ if (comp(*losers[pos].keyp, *keyp))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].keyp, keyp);
+ }
+ }
+
+ losers[0].keyp = keyp;
+ }
+
+ void
+ insert_start_stable(const T& key, int source, bool)
+ { return insert_start(key, source, false); }
+
+ void
+ init_stable()
+ { init(); }
+
+ void
+ delete_min_insert_stable(const T& key, bool)
+ {
+ int& source = losers[0].source;
+ const T* keyp = &key;
+ for (int pos = mapping[source] / 2; pos > 0; pos /= 2)
+ {
+ // The smaller one gets promoted, ties are broken by source.
+ if (comp(*losers[pos].keyp, *keyp)
+ || (!comp(*keyp, *losers[pos].keyp)
+ && losers[pos].source < source))
+ {
+ // The other one is smaller.
+ std::swap(losers[pos].source, source);
+ std::swap(losers[pos].keyp, keyp);
+ }
+ }
+ losers[0].keyp = keyp;
+ }
+ };
+#endif
+
+template<typename _ValueTp, class Comparator>
+ struct loser_tree_traits
+ {
+#if _GLIBCXX_LOSER_TREE
+ typedef LoserTree<_ValueTp, Comparator> LT;
+#else
+# if _GLIBCXX_LOSER_TREE_POINTER
+ typedef LoserTreePointer<_ValueTp, Comparator> LT;
+# else
+# error Must define some type in losertree.h.
+# endif
+#endif
+ };
+
+template<typename _ValueTp, class Comparator>
+ struct loser_tree_unguarded_traits
+ {
+#if _GLIBCXX_LOSER_TREE_UNGUARDED
+ typedef LoserTreeUnguarded<_ValueTp, Comparator> LT;
+#else
+# if _GLIBCXX_LOSER_TREE_POINTER_UNGUARDED
+ typedef LoserTreePointerUnguarded<_ValueTp, Comparator> LT;
+# else
+# error Must define some unguarded type in losertree.h.
+# endif
+#endif
+ };
+
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/merge.h b/libstdc++-v3/include/parallel/merge.h
new file mode 100644
index 00000000000..f12f3110871
--- /dev/null
+++ b/libstdc++-v3/include/parallel/merge.h
@@ -0,0 +1,260 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/merge.h
+ * @brief Parallel implementation of std::merge().
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_MERGE_H
+#define _GLIBCXX_PARALLEL_MERGE_H 1
+
+#include <parallel/basic_iterator.h>
+#include <bits/stl_algo.h>
+
+namespace __gnu_parallel
+{
+ /** @brief Merge routine being able to merge only the @c max_length
+ * smallest elements.
+ *
+ * The @c begin iterators are advanced accordingly, they might not
+ * reach @c end, in contrast to the usual variant.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param target Target begin iterator.
+ * @param max_length Maximum number of elements to merge.
+ * @param comp Comparator.
+ * @return Output end iterator. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputIterator, typename _DifferenceTp,
+ typename Comparator>
+ OutputIterator
+ merge_advance_usual(RandomAccessIterator1& begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2& begin2,
+ RandomAccessIterator2 end2, OutputIterator target,
+ _DifferenceTp max_length, Comparator comp)
+ {
+ typedef _DifferenceTp difference_type;
+ while (begin1 != end1 && begin2 != end2 && max_length > 0)
+ {
+ // array1[i1] < array0[i0]
+ if (comp(*begin2, *begin1))
+ *target++ = *begin2++;
+ else
+ *target++ = *begin1++;
+ --max_length;
+ }
+
+ if (begin1 != end1)
+ {
+ target = std::copy(begin1, begin1 + max_length, target);
+ begin1 += max_length;
+ }
+ else
+ {
+ target = std::copy(begin2, begin2 + max_length, target);
+ begin2 += max_length;
+ }
+ return target;
+ }
+
+ /** @brief Merge routine being able to merge only the @c max_length
+ * smallest elements.
+ *
+ * The @c begin iterators are advanced accordingly, they might not
+ * reach @c end, in contrast to the usual variant.
+ * Specially designed code should allow the compiler to generate
+ * conditional moves instead of branches.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param target Target begin iterator.
+ * @param max_length Maximum number of elements to merge.
+ * @param comp Comparator.
+ * @return Output end iterator. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputIterator, typename _DifferenceTp,
+ typename Comparator>
+ OutputIterator
+ merge_advance_movc(RandomAccessIterator1& begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2& begin2,
+ RandomAccessIterator2 end2,
+ OutputIterator target,
+ _DifferenceTp max_length, Comparator comp)
+ {
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type1;
+ typedef typename std::iterator_traits<RandomAccessIterator2>::value_type
+ value_type2;
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(max_length >= 0);
+#endif
+
+ while (begin1 != end1 && begin2 != end2 && max_length > 0)
+ {
+ RandomAccessIterator1 next1 = begin1 + 1;
+ RandomAccessIterator2 next2 = begin2 + 1;
+ value_type1 element1 = *begin1;
+ value_type2 element2 = *begin2;
+
+ if (comp(element2, element1))
+ {
+ element1 = element2;
+ begin2 = next2;
+ }
+ else
+ begin1 = next1;
+
+ *target = element1;
+
+ ++target;
+ --max_length;
+ }
+ if (begin1 != end1)
+ {
+ target = std::copy(begin1, begin1 + max_length, target);
+ begin1 += max_length;
+ }
+ else
+ {
+ target = std::copy(begin2, begin2 + max_length, target);
+ begin2 += max_length;
+ }
+ return target;
+ }
+
+ /** @brief Merge routine being able to merge only the @c max_length
+ * smallest elements.
+ *
+ * The @c begin iterators are advanced accordingly, they might not
+ * reach @c end, in contrast to the usual variant.
+ * Static switch on whether to use the conditional-move variant.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param target Target begin iterator.
+ * @param max_length Maximum number of elements to merge.
+ * @param comp Comparator.
+ * @return Output end iterator. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename OutputIterator, typename _DifferenceTp,
+ typename Comparator>
+ inline OutputIterator
+ merge_advance(RandomAccessIterator1& begin1, RandomAccessIterator1 end1,
+ RandomAccessIterator2& begin2, RandomAccessIterator2 end2,
+ OutputIterator target, _DifferenceTp max_length,
+ Comparator comp)
+ {
+ _GLIBCXX_CALL(max_length)
+
+ return merge_advance_movc(begin1, end1, begin2, end2, target,
+ max_length, comp);
+ }
+
+ /** @brief Merge routine fallback to sequential in case the
+ iterators of the two input sequences are of different type.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param target Target begin iterator.
+ * @param max_length Maximum number of elements to merge.
+ * @param comp Comparator.
+ * @return Output end iterator. */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename RandomAccessIterator3, typename Comparator>
+ inline RandomAccessIterator3
+ parallel_merge_advance(RandomAccessIterator1& begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator2& begin2,
+ // different iterators, parallel implementation
+ // not available
+ RandomAccessIterator2 end2,
+ RandomAccessIterator3 target, typename
+ std::iterator_traits<RandomAccessIterator1>::
+ difference_type max_length, Comparator comp)
+ { return merge_advance(begin1, end1, begin2, end2, target,
+ max_length, comp); }
+
+ /** @brief Parallel merge routine being able to merge only the @c
+ * max_length smallest elements.
+ *
+ * The @c begin iterators are advanced accordingly, they might not
+ * reach @c end, in contrast to the usual variant.
+ * The functionality is projected onto parallel_multiway_merge.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param target Target begin iterator.
+ * @param max_length Maximum number of elements to merge.
+ * @param comp Comparator.
+ * @return Output end iterator.
+ */
+ template<typename RandomAccessIterator1, typename RandomAccessIterator3,
+ typename Comparator>
+ inline RandomAccessIterator3
+ parallel_merge_advance(RandomAccessIterator1& begin1,
+ RandomAccessIterator1 end1,
+ RandomAccessIterator1& begin2,
+ RandomAccessIterator1 end2,
+ RandomAccessIterator3 target, typename
+ std::iterator_traits<RandomAccessIterator1>::
+ difference_type max_length, Comparator comp)
+ {
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::
+ difference_type difference_type1 /* == difference_type2 */;
+ typedef typename std::iterator_traits<RandomAccessIterator3>::
+ difference_type difference_type3;
+
+ std::pair<RandomAccessIterator1, RandomAccessIterator1>
+ seqs[2] = { std::make_pair(begin1, end1),
+ std::make_pair(begin2, end2) };
+ RandomAccessIterator3
+ target_end = parallel_multiway_merge(seqs, seqs + 2, target,
+ comp, max_length, true, false);
+
+ return target_end;
+ }
+} //namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/multiseq_selection.h b/libstdc++-v3/include/parallel/multiseq_selection.h
new file mode 100644
index 00000000000..839cc4d5c1d
--- /dev/null
+++ b/libstdc++-v3/include/parallel/multiseq_selection.h
@@ -0,0 +1,632 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/multiseq_selection.h
+ * @brief Functions to find elements of a certain global rank in
+ * multiple sorted sequences. Also serves for splitting such
+ * sequence sets.
+ *
+ * The algorithm description can be found in
+ *
+ * P. J. Varman, S. D. Scheufler, B. R. Iyer, and G. R. Ricard.
+ * Merging Multiple Lists on Hierarchical-Memory Multiprocessors.
+ * Journal of Parallel and Distributed Computing, 12(2):171–177, 1991.
+ *
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_MULTISEQ_SELECTION_H
+#define _GLIBCXX_PARALLEL_MULTISEQ_SELECTION_H 1
+
+#include <vector>
+#include <queue>
+
+#include <bits/stl_algo.h>
+
+#include <parallel/sort.h>
+
+namespace __gnu_parallel
+{
+ /** @brief Compare a pair of types lexicographically, ascending. */
+ template<typename T1, typename T2, typename Comparator>
+ class lexicographic
+ : public std::binary_function<std::pair<T1, T2>, std::pair<T1, T2>, bool>
+ {
+ private:
+ Comparator& comp;
+
+ public:
+ lexicographic(Comparator& _comp) : comp(_comp) { }
+
+ bool
+ operator()(const std::pair<T1, T2>& p1,
+ const std::pair<T1, T2>& p2) const
+ {
+ if (comp(p1.first, p2.first))
+ return true;
+
+ if (comp(p2.first, p1.first))
+ return false;
+
+ // Firsts are equal.
+ return p1.second < p2.second;
+ }
+ };
+
+ /** @brief Compare a pair of types lexicographically, descending. */
+ template<typename T1, typename T2, typename Comparator>
+ class lexicographic_reverse : public std::binary_function<T1, T2, bool>
+ {
+ private:
+ Comparator& comp;
+
+ public:
+ lexicographic_reverse(Comparator& _comp) : comp(_comp) { }
+
+ bool
+ operator()(const std::pair<T1, T2>& p1,
+ const std::pair<T1, T2>& p2) const
+ {
+ if (comp(p2.first, p1.first))
+ return true;
+
+ if (comp(p1.first, p2.first))
+ return false;
+
+ // Firsts are equal.
+ return p2.second < p1.second;
+ }
+ };
+
+ /**
+ * @brief Splits several sorted sequences at a certain global rank,
+ * resulting in a splitting point for each sequence.
+ * The sequences are passed via a sequence of random-access
+ * iterator pairs, none of the sequences may be empty. If there
+ * are several equal elements across the split, the ones on the
+ * left side will be chosen from sequences with smaller number.
+ * @param begin_seqs Begin of the sequence of iterator pairs.
+ * @param end_seqs End of the sequence of iterator pairs.
+ * @param rank The global rank to partition at.
+ * @param begin_offsets A random-access sequence begin where the
+ * result will be stored in. Each element of the sequence is an
+ * iterator that points to the first element on the greater part of
+ * the respective sequence.
+ * @param comp The ordering functor, defaults to std::less<T>.
+ */
+ template<typename RanSeqs, typename RankType, typename RankIterator,
+ typename Comparator>
+ void
+ multiseq_partition(RanSeqs begin_seqs, RanSeqs end_seqs,
+ RankType rank,
+ RankIterator begin_offsets,
+ Comparator comp = std::less<
+ typename std::iterator_traits<typename
+ std::iterator_traits<RanSeqs>::value_type::
+ first_type>::value_type>()) // std::less<T>
+ {
+ _GLIBCXX_CALL(end_seqs - begin_seqs)
+
+ typedef typename std::iterator_traits<RanSeqs>::value_type::first_type
+ It;
+ typedef typename std::iterator_traits<It>::difference_type
+ difference_type;
+ typedef typename std::iterator_traits<It>::value_type value_type;
+
+ lexicographic<value_type, int, Comparator> lcomp(comp);
+ lexicographic_reverse<value_type, int, Comparator> lrcomp(comp);
+
+ // Number of sequences, number of elements in total (possibly
+ // including padding).
+ difference_type m = std::distance(begin_seqs, end_seqs), N = 0,
+ nmax, n, r;
+
+ for (int i = 0; i < m; i++)
+ N += std::distance(begin_seqs[i].first, begin_seqs[i].second);
+
+ if (rank == N)
+ {
+ for (int i = 0; i < m; i++)
+ begin_offsets[i] = begin_seqs[i].second; // Very end.
+ // Return m - 1;
+ }
+
+ _GLIBCXX_PARALLEL_ASSERT(m != 0 && N != 0 && rank >= 0 && rank < N);
+
+ difference_type* ns = new difference_type[m];
+ difference_type* a = new difference_type[m];
+ difference_type* b = new difference_type[m];
+ difference_type l;
+
+ ns[0] = std::distance(begin_seqs[0].first, begin_seqs[0].second);
+ nmax = ns[0];
+ for (int i = 0; i < m; i++)
+ {
+ ns[i] = std::distance(begin_seqs[i].first, begin_seqs[i].second);
+ nmax = std::max(nmax, ns[i]);
+ }
+
+ r = log2(nmax) + 1;
+
+ // Pad all lists to this length, at least as long as any ns[i],
+ // equality iff nmax = 2^k - 1.
+ l = (1ULL << r) - 1;
+
+ // From now on, including padding.
+ N = l * m;
+
+ for (int i = 0; i < m; i++)
+ {
+ a[i] = 0;
+ b[i] = l;
+ }
+ n = l / 2;
+
+ // Invariants:
+ // 0 <= a[i] <= ns[i], 0 <= b[i] <= l
+
+#define S(i) (begin_seqs[i].first)
+
+ // Initial partition.
+ std::vector<std::pair<value_type, int> > sample;
+
+ for (int i = 0; i < m; i++)
+ if (n < ns[i]) //sequence long enough
+ sample.push_back(std::make_pair(S(i)[n], i));
+ __gnu_sequential::sort(sample.begin(), sample.end(), lcomp);
+
+ for (int i = 0; i < m; i++) //conceptual infinity
+ if (n >= ns[i]) //sequence too short, conceptual infinity
+ sample.push_back(std::make_pair(S(i)[0] /*dummy element*/, i));
+
+ difference_type localrank = rank * m / N ;
+
+ int j;
+ for (j = 0; j < localrank && ((n + 1) <= ns[sample[j].second]); ++j)
+ a[sample[j].second] += n + 1;
+ for (; j < m; j++)
+ b[sample[j].second] -= n + 1;
+
+ // Further refinement.
+ while (n > 0)
+ {
+ n /= 2;
+
+ int lmax_seq = -1; // to avoid warning
+ const value_type* lmax = NULL; // impossible to avoid the warning?
+ for (int i = 0; i < m; i++)
+ {
+ if (a[i] > 0)
+ {
+ if (!lmax)
+ {
+ lmax = &(S(i)[a[i] - 1]);
+ lmax_seq = i;
+ }
+ else
+ {
+ // Max, favor rear sequences.
+ if (!comp(S(i)[a[i] - 1], *lmax))
+ {
+ lmax = &(S(i)[a[i] - 1]);
+ lmax_seq = i;
+ }
+ }
+ }
+ }
+
+ int i;
+ for (i = 0; i < m; i++)
+ {
+ difference_type middle = (b[i] + a[i]) / 2;
+ if (lmax && middle < ns[i] &&
+ lcomp(std::make_pair(S(i)[middle], i),
+ std::make_pair(*lmax, lmax_seq)))
+ a[i] = std::min(a[i] + n + 1, ns[i]);
+ else
+ b[i] -= n + 1;
+ }
+
+ difference_type leftsize = 0, total = 0;
+ for (int i = 0; i < m; i++)
+ {
+ leftsize += a[i] / (n + 1);
+ total += l / (n + 1);
+ }
+
+ difference_type skew = static_cast<difference_type>
+ (static_cast<uint64>(total) * rank / N - leftsize);
+
+ if (skew > 0)
+ {
+ // Move to the left, find smallest.
+ std::priority_queue<std::pair<value_type, int>,
+ std::vector<std::pair<value_type, int> >,
+ lexicographic_reverse<value_type, int, Comparator> >
+ pq(lrcomp);
+
+ for (int i = 0; i < m; i++)
+ if (b[i] < ns[i])
+ pq.push(std::make_pair(S(i)[b[i]], i));
+
+ for (; skew != 0 && !pq.empty(); --skew)
+ {
+ int source = pq.top().second;
+ pq.pop();
+
+ a[source] = std::min(a[source] + n + 1, ns[source]);
+ b[source] += n + 1;
+
+ if (b[source] < ns[source])
+ pq.push(std::make_pair(S(source)[b[source]], source));
+ }
+ }
+ else if (skew < 0)
+ {
+ // Move to the right, find greatest.
+ std::priority_queue<std::pair<value_type, int>,
+ std::vector<std::pair<value_type, int> >,
+ lexicographic<value_type, int, Comparator> > pq(lcomp);
+
+ for (int i = 0; i < m; i++)
+ if (a[i] > 0)
+ pq.push(std::make_pair(S(i)[a[i] - 1], i));
+
+ for (; skew != 0; ++skew)
+ {
+ int source = pq.top().second;
+ pq.pop();
+
+ a[source] -= n + 1;
+ b[source] -= n + 1;
+
+ if (a[source] > 0)
+ pq.push(std::make_pair(S(source)[a[source] - 1], source));
+ }
+ }
+ }
+
+ // Postconditions:
+ // a[i] == b[i] in most cases, except when a[i] has been clamped
+ // because of having reached the boundary
+
+ // Now return the result, calculate the offset.
+
+ // Compare the keys on both edges of the border.
+
+ // Maximum of left edge, minimum of right edge.
+ value_type* maxleft = NULL;
+ value_type* minright = NULL;
+ for (int i = 0; i < m; i++)
+ {
+ if (a[i] > 0)
+ {
+ if (!maxleft)
+ maxleft = &(S(i)[a[i] - 1]);
+ else
+ {
+ // Max, favor rear sequences.
+ if (!comp(S(i)[a[i] - 1], *maxleft))
+ maxleft = &(S(i)[a[i] - 1]);
+ }
+ }
+ if (b[i] < ns[i])
+ {
+ if (!minright)
+ minright = &(S(i)[b[i]]);
+ else
+ {
+ // Min, favor fore sequences.
+ if (comp(S(i)[b[i]], *minright))
+ minright = &(S(i)[b[i]]);
+ }
+ }
+ }
+
+ int seq = 0;
+ for (int i = 0; i < m; i++)
+ begin_offsets[i] = S(i) + a[i];
+
+ delete[] ns;
+ delete[] a;
+ delete[] b;
+ }
+
+
+ /**
+ * @brief Selects the element at a certain global rank from several
+ * sorted sequences.
+ *
+ * The sequences are passed via a sequence of random-access
+ * iterator pairs, none of the sequences may be empty.
+ * @param begin_seqs Begin of the sequence of iterator pairs.
+ * @param end_seqs End of the sequence of iterator pairs.
+ * @param rank The global rank to partition at.
+ * @param offset The rank of the selected element in the global
+ * subsequence of elements equal to the selected element. If the
+ * selected element is unique, this number is 0.
+ * @param comp The ordering functor, defaults to std::less.
+ */
+ template<typename T, typename RanSeqs, typename RankType,
+ typename Comparator>
+ T
+ multiseq_selection(RanSeqs begin_seqs, RanSeqs end_seqs, RankType rank,
+ RankType& offset, Comparator comp = std::less<T>())
+ {
+ _GLIBCXX_CALL(end_seqs - begin_seqs)
+
+ typedef typename std::iterator_traits<RanSeqs>::value_type::first_type
+ It;
+ typedef typename std::iterator_traits<It>::difference_type
+ difference_type;
+
+ lexicographic<T, int, Comparator> lcomp(comp);
+ lexicographic_reverse<T, int, Comparator> lrcomp(comp);
+
+ // Number of sequences, number of elements in total (possibly
+ // including padding).
+ difference_type m = std::distance(begin_seqs, end_seqs);
+ difference_type N = 0;
+ difference_type nmax, n, r;
+
+ for (int i = 0; i < m; i++)
+ N += std::distance(begin_seqs[i].first, begin_seqs[i].second);
+
+ if (m == 0 || N == 0 || rank < 0 || rank >= N)
+ {
+ // Result undefined when there is no data or rank is outside bounds.
+ throw std::exception();
+ }
+
+
+ difference_type* ns = new difference_type[m];
+ difference_type* a = new difference_type[m];
+ difference_type* b = new difference_type[m];
+ difference_type l;
+
+ ns[0] = std::distance(begin_seqs[0].first, begin_seqs[0].second);
+ nmax = ns[0];
+ for (int i = 0; i < m; ++i)
+ {
+ ns[i] = std::distance(begin_seqs[i].first, begin_seqs[i].second);
+ nmax = std::max(nmax, ns[i]);
+ }
+
+ r = log2(nmax) + 1;
+
+ // Pad all lists to this length, at least as long as any ns[i],
+ // equality iff nmax = 2^k - 1
+ l = pow2(r) - 1;
+
+ // From now on, including padding.
+ N = l * m;
+
+ for (int i = 0; i < m; ++i)
+ {
+ a[i] = 0;
+ b[i] = l;
+ }
+ n = l / 2;
+
+ // Invariants:
+ // 0 <= a[i] <= ns[i], 0 <= b[i] <= l
+
+#define S(i) (begin_seqs[i].first)
+
+ // Initial partition.
+ std::vector<std::pair<T, int> > sample;
+
+ for (int i = 0; i < m; i++)
+ if (n < ns[i])
+ sample.push_back(std::make_pair(S(i)[n], i));
+ __gnu_sequential::sort(sample.begin(), sample.end(),
+ lcomp, sequential_tag());
+
+ // Conceptual infinity.
+ for (int i = 0; i < m; i++)
+ if (n >= ns[i])
+ sample.push_back(std::make_pair(S(i)[0] /*dummy element*/, i));
+
+ difference_type localrank = rank * m / N ;
+
+ int j;
+ for (j = 0; j < localrank && ((n + 1) <= ns[sample[j].second]); ++j)
+ a[sample[j].second] += n + 1;
+ for (; j < m; ++j)
+ b[sample[j].second] -= n + 1;
+
+ // Further refinement.
+ while (n > 0)
+ {
+ n /= 2;
+
+ const T* lmax = NULL;
+ for (int i = 0; i < m; ++i)
+ {
+ if (a[i] > 0)
+ {
+ if (!lmax)
+ lmax = &(S(i)[a[i] - 1]);
+ else
+ {
+ if (comp(*lmax, S(i)[a[i] - 1])) //max
+ lmax = &(S(i)[a[i] - 1]);
+ }
+ }
+ }
+
+ int i;
+ for (i = 0; i < m; i++)
+ {
+ difference_type middle = (b[i] + a[i]) / 2;
+ if (lmax && middle < ns[i] && comp(S(i)[middle], *lmax))
+ a[i] = std::min(a[i] + n + 1, ns[i]);
+ else
+ b[i] -= n + 1;
+ }
+
+ difference_type leftsize = 0, total = 0;
+ for (int i = 0; i < m; ++i)
+ {
+ leftsize += a[i] / (n + 1);
+ total += l / (n + 1);
+ }
+
+ difference_type skew = ((unsigned long long)total * rank / N
+ - leftsize);
+
+ if (skew > 0)
+ {
+ // Move to the left, find smallest.
+ std::priority_queue<std::pair<T, int>,
+ std::vector<std::pair<T, int> >,
+ lexicographic_reverse<T, int, Comparator> > pq(lrcomp);
+
+ for (int i = 0; i < m; ++i)
+ if (b[i] < ns[i])
+ pq.push(std::make_pair(S(i)[b[i]], i));
+
+ for (; skew != 0 && !pq.empty(); --skew)
+ {
+ int source = pq.top().second;
+ pq.pop();
+
+ a[source] = std::min(a[source] + n + 1, ns[source]);
+ b[source] += n + 1;
+
+ if (b[source] < ns[source])
+ pq.push(std::make_pair(S(source)[b[source]], source));
+ }
+ }
+ else if (skew < 0)
+ {
+ // Move to the right, find greatest.
+ std::priority_queue<std::pair<T, int>,
+ std::vector<std::pair<T, int> >,
+ lexicographic<T, int, Comparator> > pq(lcomp);
+
+ for (int i = 0; i < m; ++i)
+ if (a[i] > 0)
+ pq.push(std::make_pair(S(i)[a[i] - 1], i));
+
+ for (; skew != 0; ++skew)
+ {
+ int source = pq.top().second;
+ pq.pop();
+
+ a[source] -= n + 1;
+ b[source] -= n + 1;
+
+ if (a[source] > 0)
+ pq.push(std::make_pair(S(source)[a[source] - 1], source));
+ }
+ }
+ }
+
+ // Postconditions:
+ // a[i] == b[i] in most cases, except when a[i] has been clamped
+ // because of having reached the boundary
+
+ // Now return the result, calculate the offset.
+
+ // Compare the keys on both edges of the border.
+
+ // Maximum of left edge, minimum of right edge.
+ bool maxleftset = false, minrightset = false;
+
+ // Impossible to avoid the warning?
+ T maxleft, minright;
+ for (int i = 0; i < m; ++i)
+ {
+ if (a[i] > 0)
+ {
+ if (!maxleftset)
+ {
+ maxleft = S(i)[a[i] - 1];
+ maxleftset = true;
+ }
+ else
+ {
+ // Max.
+ if (comp(maxleft, S(i)[a[i] - 1]))
+ maxleft = S(i)[a[i] - 1];
+ }
+ }
+ if (b[i] < ns[i])
+ {
+ if (!minrightset)
+ {
+ minright = S(i)[b[i]];
+ minrightset = true;
+ }
+ else
+ {
+ // Min.
+ if (comp(S(i)[b[i]], minright))
+ minright = S(i)[b[i]];
+ }
+ }
+ }
+
+ // Minright is the splitter, in any case.
+
+ if (!maxleftset || comp(minright, maxleft))
+ {
+ // Good luck, everything is split unambiguously.
+ offset = 0;
+ }
+ else
+ {
+ // We have to calculate an offset.
+ offset = 0;
+
+ for (int i = 0; i < m; ++i)
+ {
+ difference_type lb = std::lower_bound(S(i), S(i) + ns[i],
+ minright,
+ comp) - S(i);
+ offset += a[i] - lb;
+ }
+ }
+
+ delete[] ns;
+ delete[] a;
+ delete[] b;
+
+ return minright;
+ }
+}
+
+#undef S
+
+#endif
+
diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h
new file mode 100644
index 00000000000..6cc724b6015
--- /dev/null
+++ b/libstdc++-v3/include/parallel/multiway_merge.h
@@ -0,0 +1,1830 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/multiway_merge.h
+* @brief Implementation of sequential and parallel multiway merge.
+*
+* Explanations on the high-speed merging routines in the appendix of
+*
+* P. Sanders.
+* Fast priority queues for cached memory.
+* ACM Journal of Experimental Algorithmics, 5, 2000.
+*
+* This file is a GNU parallel extension to the Standard C++ Library.
+*/
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_MULTIWAY_MERGE_H
+#define _GLIBCXX_PARALLEL_MULTIWAY_MERGE_H
+
+#include <vector>
+
+#include <bits/stl_algo.h>
+#include <parallel/features.h>
+#include <parallel/parallel.h>
+#include <parallel/merge.h>
+#include <parallel/losertree.h>
+#if _GLIBCXX_ASSERTIONS
+#include <parallel/checkers.h>
+#endif
+
+/** @brief Length of a sequence described by a pair of iterators. */
+#define _GLIBCXX_PARALLEL_LENGTH(s) ((s).second - (s).first)
+
+// XXX need iterator typedefs
+namespace __gnu_parallel
+{
+template<typename RandomAccessIterator, typename Comparator>
+ class guarded_iterator;
+
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<(guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<=(guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+ /** @brief Iterator wrapper supporting an implicit supremum at the end
+ of the sequence, dominating all comparisons.
+ * Deriving from RandomAccessIterator is not possible since
+ * RandomAccessIterator need not be a class.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ class guarded_iterator
+ {
+ private:
+ /** @brief Current iterator position. */
+ RandomAccessIterator current;
+
+ /** @brief End iterator of the sequence. */
+ RandomAccessIterator end;
+
+ /** @brief Comparator. */
+ Comparator& comp;
+
+ public:
+ /** @brief Constructor. Sets iterator to beginning of sequence.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param comp Comparator provided for associated overloaded
+ * compare operators. */
+ guarded_iterator(RandomAccessIterator begin,
+ RandomAccessIterator end, Comparator& comp)
+ : current(begin), end(end), comp(comp)
+ { }
+
+ /** @brief Pre-increment operator.
+ * @return This. */
+ guarded_iterator<RandomAccessIterator, Comparator>&
+ operator++()
+ {
+ ++current;
+ return *this;
+ }
+
+ /** @brief Dereference operator.
+ * @return Referenced element. */
+ typename std::iterator_traits<RandomAccessIterator>::value_type
+ operator*()
+ { return *current; }
+
+ /** @brief Convert to wrapped iterator.
+ * @return Wrapped iterator. */
+ operator RandomAccessIterator()
+ { return current; }
+
+ friend bool
+ operator< <RandomAccessIterator, Comparator>(
+ guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+ friend bool
+ operator<= <RandomAccessIterator, Comparator>(
+ guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2);
+ };
+
+/** @brief Compare two elements referenced by guarded iterators.
+ * @param bi1 First iterator.
+ * @param bi2 Second iterator.
+ * @return @c True if less. */
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<(guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2)
+ {
+ if (bi1.current == bi1.end) //bi1 is sup
+ return bi2.current == bi2.end; //bi2 is not sup
+ if (bi2.current == bi2.end) //bi2 is sup
+ return true;
+ return (bi1.comp)(*bi1, *bi2); //normal compare
+ }
+
+/** @brief Compare two elements referenced by guarded iterators.
+ * @param bi1 First iterator.
+ * @param bi2 Second iterator.
+ * @return @c True if less equal. */
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<=(guarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ guarded_iterator<RandomAccessIterator, Comparator>& bi2)
+ {
+ if (bi2.current == bi2.end) //bi1 is sup
+ return bi1.current != bi1.end; //bi2 is not sup
+ if (bi1.current == bi1.end) //bi2 is sup
+ return false;
+ return !(bi1.comp)(*bi2, *bi1); //normal compare
+ }
+
+template<typename RandomAccessIterator, typename Comparator>
+ class unguarded_iterator;
+
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<(unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<=(unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+template<typename RandomAccessIterator, typename Comparator>
+ class unguarded_iterator
+ {
+ private:
+ /** @brief Current iterator position. */
+ RandomAccessIterator& current;
+ /** @brief Comparator. */
+ mutable Comparator& comp;
+
+ public:
+ /** @brief Constructor. Sets iterator to beginning of sequence.
+ * @param begin Begin iterator of sequence.
+ * @param end Unused, only for compatibility.
+ * @param comp Unused, only for compatibility. */
+ unguarded_iterator(RandomAccessIterator begin,
+ RandomAccessIterator end, Comparator& comp)
+ : current(begin), comp(comp)
+ { }
+
+ /** @brief Pre-increment operator.
+ * @return This. */
+ unguarded_iterator<RandomAccessIterator, Comparator>&
+ operator++()
+ {
+ ++current;
+ return *this;
+ }
+
+ /** @brief Dereference operator.
+ * @return Referenced element. */
+ typename std::iterator_traits<RandomAccessIterator>::value_type
+ operator*()
+ { return *current; }
+
+ /** @brief Convert to wrapped iterator.
+ * @return Wrapped iterator. */
+ operator RandomAccessIterator()
+ { return current; }
+
+ friend bool
+ operator< <RandomAccessIterator, Comparator>(
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2);
+
+ friend bool
+ operator<= <RandomAccessIterator, Comparator>(
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2);
+ };
+
+/** @brief Compare two elements referenced by unguarded iterators.
+ * @param bi1 First iterator.
+ * @param bi2 Second iterator.
+ * @return @c True if less. */
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<(unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2)
+ {
+ // Normal compare.
+ return (bi1.comp)(*bi1, *bi2);
+ }
+
+/** @brief Compare two elements referenced by unguarded iterators.
+ * @param bi1 First iterator.
+ * @param bi2 Second iterator.
+ * @return @c True if less equal. */
+template<typename RandomAccessIterator, typename Comparator>
+ inline bool
+ operator<=(unguarded_iterator<RandomAccessIterator, Comparator>& bi1,
+ unguarded_iterator<RandomAccessIterator, Comparator>& bi2)
+ {
+ // Normal compare.
+ return !(bi1.comp)(*bi2, *bi1);
+ }
+
+/** Prepare a set of sequences to be merged without a (end) guard
+ * @param seqs_begin
+ * @param seqs_end
+ * @param comp
+ * @param min_sequence
+ * @param stable
+ * @pre (seqs_end - seqs_begin > 0) */
+template<typename RandomAccessIteratorIterator, typename Comparator>
+ typename std::iterator_traits<
+ typename std::iterator_traits<RandomAccessIteratorIterator>::value_type
+ ::first_type>::difference_type
+ prepare_unguarded(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end, Comparator comp,
+ int& min_sequence, bool stable)
+ {
+ _GLIBCXX_CALL(seqs_end - seqs_begin)
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+ typedef typename std::iterator_traits<RandomAccessIterator1>
+ ::difference_type
+ difference_type;
+
+ if ((*seqs_begin).first == (*seqs_begin).second)
+ {
+ // Empty sequence found, it's the first one.
+ min_sequence = 0;
+ return -1;
+ }
+
+ // Last element in sequence.
+ value_type min = *((*seqs_begin).second - 1);
+ min_sequence = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin + 1; s != seqs_end; ++s)
+ {
+ if ((*s).first == (*s).second)
+ {
+ // Empty sequence found.
+ min_sequence = static_cast<int>(s - seqs_begin);
+ return -1;
+ }
+
+ // Last element in sequence.
+ const value_type& v = *((*s).second - 1);
+ if (comp(v, min)) //strictly smaller
+ {
+ min = v;
+ min_sequence = static_cast<int>(s - seqs_begin);
+ }
+ }
+
+ difference_type overhang_size = 0;
+
+ int s = 0;
+ for (s = 0; s <= min_sequence; ++s)
+ {
+ RandomAccessIterator1 split;
+ if (stable)
+ split = std::upper_bound(seqs_begin[s].first, seqs_begin[s].second,
+ min, comp);
+ else
+ split = std::lower_bound(seqs_begin[s].first, seqs_begin[s].second,
+ min, comp);
+
+ overhang_size += seqs_begin[s].second - split;
+ }
+
+ for (; s < (seqs_end - seqs_begin); ++s)
+ {
+ RandomAccessIterator1 split = std::lower_bound(
+ seqs_begin[s].first, seqs_begin[s].second, min, comp);
+ overhang_size += seqs_begin[s].second - split;
+ }
+
+ // So many elements will be left over afterwards.
+ return overhang_size;
+ }
+
+/** Prepare a set of sequences to be merged with a (end) guard (sentinel)
+ * @param seqs_begin
+ * @param seqs_end
+ * @param comp */
+template<typename RandomAccessIteratorIterator, typename Comparator>
+ typename std::iterator_traits<typename std::iterator_traits<
+ RandomAccessIteratorIterator>::value_type::first_type>::difference_type
+ prepare_unguarded_sentinel(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ Comparator comp)
+ {
+ _GLIBCXX_CALL(seqs_end - seqs_begin)
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>
+ ::value_type
+ value_type;
+ typedef typename std::iterator_traits<RandomAccessIterator1>
+ ::difference_type
+ difference_type;
+
+ // Last element in sequence.
+ value_type* max = NULL;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ {
+ if ((*s).first == (*s).second)
+ continue;
+
+ // Last element in sequence.
+ value_type& v = *((*s).second - 1);
+
+ // Strictly greater.
+ if (!max || comp(*max, v))
+ max = &v;
+ }
+
+ difference_type overhang_size = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ {
+ RandomAccessIterator1 split =
+ std::lower_bound((*s).first, (*s).second, *max, comp);
+ overhang_size += (*s).second - split;
+
+ // Set sentinel.
+ *((*s).second) = *max;
+ }
+
+ // So many elements will be left over afterwards.
+ return overhang_size;
+ }
+
+/** @brief Highly efficient 3-way merging procedure.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Unused, stable anyway.
+ * @return End iterator of output sequence. */
+template<template<typename RAI, typename C> class iterator,
+ typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_3_variant(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp, _DifferenceTp length,
+ bool stable)
+ {
+ _GLIBCXX_CALL(length);
+
+ typedef _DifferenceTp difference_type;
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ if (length == 0)
+ return target;
+
+ iterator<RandomAccessIterator1, Comparator>
+ seq0(seqs_begin[0].first, seqs_begin[0].second, comp),
+ seq1(seqs_begin[1].first, seqs_begin[1].second, comp),
+ seq2(seqs_begin[2].first, seqs_begin[2].second, comp);
+
+ if (seq0 <= seq1)
+ {
+ if (seq1 <= seq2)
+ goto s012;
+ else
+ if (seq2 < seq0)
+ goto s201;
+ else
+ goto s021;
+ }
+ else
+ {
+ if (seq1 <= seq2)
+ {
+ if (seq0 <= seq2)
+ goto s102;
+ else
+ goto s120;
+ }
+ else
+ goto s210;
+ }
+
+#define _GLIBCXX_PARALLEL_MERGE_3_CASE(a,b,c,c0,c1)\
+ s ## a ## b ## c : \
+ *target = *seq ## a; \
+ ++target; \
+ --length; \
+ ++seq ## a; \
+ if (length == 0) goto finish; \
+ if (seq ## a c0 seq ## b) goto s ## a ## b ## c; \
+ if (seq ## a c1 seq ## c) goto s ## b ## a ## c; \
+ goto s ## b ## c ## a;
+
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(0, 1, 2, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(1, 2, 0, <=, < );
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(2, 0, 1, < , < );
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(1, 0, 2, < , <=);
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(0, 2, 1, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_3_CASE(2, 1, 0, < , < );
+
+#undef _GLIBCXX_PARALLEL_MERGE_3_CASE
+
+ finish:
+ ;
+
+ seqs_begin[0].first = seq0;
+ seqs_begin[1].first = seq1;
+ seqs_begin[2].first = seq2;
+
+ return target;
+ }
+
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_3_combined(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length);
+
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int min_seq;
+ RandomAccessIterator3 target_end;
+
+ // Stable anyway.
+ difference_type overhang =
+ prepare_unguarded(seqs_begin, seqs_end, comp, min_seq, true);
+
+ difference_type total_length = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ total_length += _GLIBCXX_PARALLEL_LENGTH(*s);
+
+ if (overhang != -1)
+ {
+ difference_type unguarded_length =
+ std::min(length, total_length - overhang);
+ target_end = multiway_merge_3_variant<unguarded_iterator>
+ (seqs_begin, seqs_end, target, comp, unguarded_length, stable);
+ overhang = length - unguarded_length;
+ }
+ else
+ {
+ // Empty sequence found.
+ overhang = length;
+ target_end = target;
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length - overhang);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ switch (min_seq)
+ {
+ case 0:
+ // Iterators will be advanced accordingly.
+ target_end = merge_advance(seqs_begin[1].first, seqs_begin[1].second,
+ seqs_begin[2].first, seqs_begin[2].second,
+ target_end, overhang, comp);
+ break;
+ case 1:
+ target_end = merge_advance(seqs_begin[0].first, seqs_begin[0].second,
+ seqs_begin[2].first, seqs_begin[2].second,
+ target_end, overhang, comp);
+ break;
+ case 2:
+ target_end = merge_advance(seqs_begin[0].first, seqs_begin[0].second,
+ seqs_begin[1].first, seqs_begin[1].second,
+ target_end, overhang, comp);
+ break;
+ default:
+ _GLIBCXX_PARALLEL_ASSERT(false);
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ return target_end;
+ }
+
+/** @brief Highly efficient 4-way merging procedure.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Unused, stable anyway.
+ * @return End iterator of output sequence. */
+template<template<typename RAI, typename C> class iterator,
+ typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_4_variant(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp, _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length);
+ typedef _DifferenceTp difference_type;
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ iterator<RandomAccessIterator1, Comparator>
+ seq0(seqs_begin[0].first, seqs_begin[0].second, comp),
+ seq1(seqs_begin[1].first, seqs_begin[1].second, comp),
+ seq2(seqs_begin[2].first, seqs_begin[2].second, comp),
+ seq3(seqs_begin[3].first, seqs_begin[3].second, comp);
+
+#define _GLIBCXX_PARALLEL_DECISION(a,b,c,d) { \
+ if (seq ## d < seq ## a) goto s ## d ## a ## b ## c; \
+ if (seq ## d < seq ## b) goto s ## a ## d ## b ## c; \
+ if (seq ## d < seq ## c) goto s ## a ## b ## d ## c; \
+ goto s ## a ## b ## c ## d; }
+
+ if (seq0 <= seq1)
+ {
+ if (seq1 <= seq2)
+ _GLIBCXX_PARALLEL_DECISION(0,1,2,3)
+ else
+ if (seq2 < seq0)
+ _GLIBCXX_PARALLEL_DECISION(2,0,1,3)
+ else
+ _GLIBCXX_PARALLEL_DECISION(0,2,1,3)
+ }
+ else
+ {
+ if (seq1 <= seq2)
+ {
+ if (seq0 <= seq2)
+ _GLIBCXX_PARALLEL_DECISION(1,0,2,3)
+ else
+ _GLIBCXX_PARALLEL_DECISION(1,2,0,3)
+ }
+ else
+ _GLIBCXX_PARALLEL_DECISION(2,1,0,3)
+ }
+
+#define _GLIBCXX_PARALLEL_MERGE_4_CASE(a,b,c,d,c0,c1,c2) \
+ s ## a ## b ## c ## d: \
+ if (length == 0) goto finish; \
+ *target = *seq ## a; \
+ ++target; \
+ --length; \
+ ++seq ## a; \
+ if (seq ## a c0 seq ## b) goto s ## a ## b ## c ## d; \
+ if (seq ## a c1 seq ## c) goto s ## b ## a ## c ## d; \
+ if (seq ## a c2 seq ## d) goto s ## b ## c ## a ## d; \
+ goto s ## b ## c ## d ## a;
+
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 1, 2, 3, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 1, 3, 2, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 2, 1, 3, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 2, 3, 1, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 3, 1, 2, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(0, 3, 2, 1, <=, <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 0, 2, 3, < , <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 0, 3, 2, < , <=, <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 2, 0, 3, <=, < , <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 2, 3, 0, <=, <=, < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 3, 0, 2, <=, < , <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(1, 3, 2, 0, <=, <=, < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 0, 1, 3, < , < , <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 0, 3, 1, < , <=, < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 1, 0, 3, < , < , <=);
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 1, 3, 0, < , <=, < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 3, 0, 1, <=, < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(2, 3, 1, 0, <=, < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 0, 1, 2, < , < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 0, 2, 1, < , < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 1, 0, 2, < , < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 1, 2, 0, < , < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 2, 0, 1, < , < , < );
+ _GLIBCXX_PARALLEL_MERGE_4_CASE(3, 2, 1, 0, < , < , < );
+
+#undef _GLIBCXX_PARALLEL_MERGE_4_CASE
+#undef _GLIBCXX_PARALLEL_DECISION
+
+ finish:
+ ;
+
+ seqs_begin[0].first = seq0;
+ seqs_begin[1].first = seq1;
+ seqs_begin[2].first = seq2;
+ seqs_begin[3].first = seq3;
+
+ return target;
+ }
+
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_4_combined(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length);
+ typedef _DifferenceTp difference_type;
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int min_seq;
+ RandomAccessIterator3 target_end;
+
+ // Stable anyway.
+ difference_type overhang =
+ prepare_unguarded(seqs_begin, seqs_end, comp, min_seq, true);
+
+ difference_type total_length = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ total_length += _GLIBCXX_PARALLEL_LENGTH(*s);
+
+ if (overhang != -1)
+ {
+ difference_type unguarded_length =
+ std::min(length, total_length - overhang);
+ target_end = multiway_merge_4_variant<unguarded_iterator>
+ (seqs_begin, seqs_end, target, comp, unguarded_length, stable);
+ overhang = length - unguarded_length;
+ }
+ else
+ {
+ // Empty sequence found.
+ overhang = length;
+ target_end = target;
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length - overhang);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ std::vector<std::pair<RandomAccessIterator1, RandomAccessIterator1> >
+ one_missing(seqs_begin, seqs_end);
+ one_missing.erase(one_missing.begin() + min_seq); //remove
+
+ target_end = multiway_merge_3_variant<guarded_iterator>(
+ one_missing.begin(), one_missing.end(),
+ target_end, comp, overhang, stable);
+
+ // Insert back again.
+ one_missing.insert(one_missing.begin() + min_seq, seqs_begin[min_seq]);
+ // Write back modified iterators.
+ copy(one_missing.begin(), one_missing.end(), seqs_begin);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ return target_end;
+ }
+
+/** @brief Basic multi-way merging procedure.
+ *
+ * The head elements are kept in a sorted array, new heads are
+ * inserted linearly.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @return End iterator of output sequence.
+ */
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_bubble(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp, _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int k = static_cast<int>(seqs_end - seqs_begin);
+ int nrs; // Number of remaining sequences.
+
+ // Avoid default constructor.
+ value_type* fe = static_cast<value_type*>(
+ ::operator new(sizeof(value_type) * k)); // Front elements.
+ int* source = new int[k];
+ difference_type total_length = 0;
+
+ // Write entries into queue.
+ nrs = 0;
+ for (int pi = 0; pi < k; ++pi)
+ {
+ if (seqs_begin[pi].first != seqs_begin[pi].second)
+ {
+ ::new(&(fe[nrs])) value_type(*(seqs_begin[pi].first));
+ source[nrs] = pi;
+ ++nrs;
+ total_length += _GLIBCXX_PARALLEL_LENGTH(seqs_begin[pi]);
+ }
+ }
+
+ if (stable)
+ {
+ // Bubble sort fe and source by fe.
+ for (int k = 0; k < nrs - 1; ++k)
+ for (int pi = nrs - 1; pi > k; --pi)
+ if (comp(fe[pi], fe[pi - 1]) ||
+ (!comp(fe[pi - 1], fe[pi]) && source[pi] < source[pi - 1]))
+ {
+ std::swap(fe[pi - 1], fe[pi]);
+ std::swap(source[pi - 1], source[pi]);
+ }
+ }
+ else
+ {
+ for (int k = 0; k < nrs - 1; ++k)
+ for (int pi = nrs - 1; pi > k; --pi)
+ if (comp(fe[pi], fe[pi-1]))
+ {
+ std::swap(fe[pi-1], fe[pi]);
+ std::swap(source[pi-1], source[pi]);
+ }
+ }
+
+ // Iterate.
+ if (stable)
+ {
+ int j;
+ while (nrs > 0 && length > 0)
+ {
+ if (source[0] < source[1])
+ {
+ // fe[0] <= fe[1]
+ while ((nrs == 1 || !comp(fe[1], fe[0])) && length > 0)
+ {
+ *target = fe[0];
+ ++target;
+ ++(seqs_begin[source[0]].first);
+ --length;
+ if (seqs_begin[source[0]].first
+ == seqs_begin[source[0]].second)
+ {
+ // Move everything to the left.
+ for (int s = 0; s < nrs - 1; ++s)
+ {
+ fe[s] = fe[s + 1];
+ source[s] = source[s + 1];
+ }
+ fe[nrs - 1].~value_type(); //Destruct explicitly.
+ --nrs;
+ break;
+ }
+ else
+ fe[0] = *(seqs_begin[source[0]].first);
+ }
+ }
+ else
+ {
+ // fe[0] < fe[1]
+ while ((nrs == 1 || comp(fe[0], fe[1])) && length > 0)
+ {
+ *target = fe[0];
+ ++target;
+ ++(seqs_begin[source[0]].first);
+ --length;
+ if (seqs_begin[source[0]].first
+ == seqs_begin[source[0]].second)
+ {
+ for (int s = 0; s < nrs - 1; ++s)
+ {
+ fe[s] = fe[s + 1];
+ source[s] = source[s + 1];
+ }
+ fe[nrs - 1].~value_type(); //Destruct explicitly.
+ --nrs;
+ break;
+ }
+ else
+ fe[0] = *(seqs_begin[source[0]].first);
+ }
+ }
+
+ // Sink down.
+ j = 1;
+ while ((j < nrs) && (comp(fe[j], fe[j - 1])
+ || (!comp(fe[j - 1], fe[j])
+ && (source[j] < source[j - 1]))))
+ {
+ std::swap(fe[j - 1], fe[j]);
+ std::swap(source[j - 1], source[j]);
+ ++j;
+ }
+ }
+ }
+ else
+ {
+ int j;
+ while (nrs > 0 && length > 0)
+ {
+ // fe[0] <= fe[1]
+ while (nrs == 1 || (!comp(fe[1], fe[0])) && length > 0)
+ {
+ *target = fe[0];
+ ++target;
+ ++seqs_begin[source[0]].first;
+ --length;
+ if (seqs_begin[source[0]].first
+ == seqs_begin[source[0]].second)
+ {
+ for (int s = 0; s < (nrs - 1); ++s)
+ {
+ fe[s] = fe[s + 1];
+ source[s] = source[s + 1];
+ }
+ fe[nrs - 1].~value_type(); //Destruct explicitly.
+ --nrs;
+ break;
+ }
+ else
+ fe[0] = *(seqs_begin[source[0]].first);
+ }
+
+ // Sink down.
+ j = 1;
+ while ((j < nrs) && comp(fe[j], fe[j - 1]))
+ {
+ std::swap(fe[j - 1], fe[j]);
+ std::swap(source[j - 1], source[j]);
+ ++j;
+ }
+ }
+ }
+
+ ::operator delete(fe); //Destructors already called.
+ delete[] source;
+
+ return target;
+ }
+
+/** @brief Multi-way merging procedure for a high branching factor,
+ * guarded case.
+ *
+ * The head elements are kept in a loser tree.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @return End iterator of output sequence.
+ */
+template<typename LT,
+ typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_loser_tree(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int k = static_cast<int>(seqs_end - seqs_begin);
+
+ LT lt(k, comp);
+
+ difference_type total_length = 0;
+
+ // Default value for potentially non-default-constructible types.
+ value_type* arbitrary_element = NULL;
+
+ for (int t = 0; t < k; ++t)
+ {
+ if(arbitrary_element == NULL
+ && _GLIBCXX_PARALLEL_LENGTH(seqs_begin[t]) > 0)
+ arbitrary_element = &(*seqs_begin[t].first);
+ total_length += _GLIBCXX_PARALLEL_LENGTH(seqs_begin[t]);
+ }
+
+ if(total_length == 0)
+ return target;
+
+ for (int t = 0; t < k; ++t)
+ {
+ if (stable)
+ {
+ if (seqs_begin[t].first == seqs_begin[t].second)
+ lt.insert_start_stable(*arbitrary_element, t, true);
+ else
+ lt.insert_start_stable(*seqs_begin[t].first, t, false);
+ }
+ else
+ {
+ if (seqs_begin[t].first == seqs_begin[t].second)
+ lt.insert_start(*arbitrary_element, t, true);
+ else
+ lt.insert_start(*seqs_begin[t].first, t, false);
+ }
+ }
+
+ if (stable)
+ lt.init_stable();
+ else
+ lt.init();
+
+ total_length = std::min(total_length, length);
+
+ int source;
+
+ if (stable)
+ {
+ for (difference_type i = 0; i < total_length; ++i)
+ {
+ // Take out.
+ source = lt.get_min_source();
+
+ *(target++) = *(seqs_begin[source].first++);
+
+ // Feed.
+ if (seqs_begin[source].first == seqs_begin[source].second)
+ lt.delete_min_insert_stable(*arbitrary_element, true);
+ else
+ // Replace from same source.
+ lt.delete_min_insert_stable(*seqs_begin[source].first, false);
+
+ }
+ }
+ else
+ {
+ for (difference_type i = 0; i < total_length; ++i)
+ {
+ //take out
+ source = lt.get_min_source();
+
+ *(target++) = *(seqs_begin[source].first++);
+
+ // Feed.
+ if (seqs_begin[source].first == seqs_begin[source].second)
+ lt.delete_min_insert(*arbitrary_element, true);
+ else
+ // Replace from same source.
+ lt.delete_min_insert(*seqs_begin[source].first, false);
+ }
+ }
+
+ return target;
+ }
+
+/** @brief Multi-way merging procedure for a high branching factor,
+ * unguarded case.
+ *
+ * The head elements are kept in a loser tree.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @return End iterator of output sequence.
+ * @pre No input will run out of elements during the merge.
+ */
+template<typename LT,
+ typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp, typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_loser_tree_unguarded(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length)
+ typedef _DifferenceTp difference_type;
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int k = seqs_end - seqs_begin;
+
+ LT lt(k, comp);
+
+ difference_type total_length = 0;
+
+ for (int t = 0; t < k; ++t)
+ {
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(seqs_begin[t].first != seqs_begin[t].second);
+#endif
+ if (stable)
+ lt.insert_start_stable(*seqs_begin[t].first, t, false);
+ else
+ lt.insert_start(*seqs_begin[t].first, t, false);
+
+ total_length += _GLIBCXX_PARALLEL_LENGTH(seqs_begin[t]);
+ }
+
+ if (stable)
+ lt.init_stable();
+ else
+ lt.init();
+
+ // Do not go past end.
+ length = std::min(total_length, length);
+
+ int source;
+
+#if _GLIBCXX_ASSERTIONS
+ difference_type i = 0;
+#endif
+
+ if (stable)
+ {
+ RandomAccessIterator3 target_end = target + length;
+ while (target < target_end)
+ {
+ // Take out.
+ source = lt.get_min_source();
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(i == 0
+ || !comp(*(seqs_begin[source].first), *(target - 1)));
+#endif
+
+ *(target++) = *(seqs_begin[source].first++);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(
+ (seqs_begin[source].first != seqs_begin[source].second)
+ || (i == length - 1));
+ ++i;
+#endif
+ // Feed.
+ // Replace from same source.
+ lt.delete_min_insert_stable(*seqs_begin[source].first, false);
+
+ }
+ }
+ else
+ {
+ RandomAccessIterator3 target_end = target + length;
+ while (target < target_end)
+ {
+ // Take out.
+ source = lt.get_min_source();
+
+#if _GLIBCXX_ASSERTIONS
+ if (i > 0 && comp(*(seqs_begin[source].first), *(target - 1)))
+ printf(" %i %i %i\n", length, i, source);
+ _GLIBCXX_PARALLEL_ASSERT(i == 0
+ || !comp(*(seqs_begin[source].first), *(target - 1)));
+#endif
+
+ *(target++) = *(seqs_begin[source].first++);
+
+#if _GLIBCXX_ASSERTIONS
+ if (!((seqs_begin[source].first != seqs_begin[source].second)
+ || (i >= length - 1)))
+ printf(" %i %i %i\n", length, i, source);
+ _GLIBCXX_PARALLEL_ASSERT(
+ (seqs_begin[source].first != seqs_begin[source].second)
+ || (i >= length - 1));
+ ++i;
+#endif
+ // Feed.
+ // Replace from same source.
+ lt.delete_min_insert(*seqs_begin[source].first, false);
+ }
+ }
+
+ return target;
+ }
+
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_loser_tree_combined(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ int min_seq;
+ RandomAccessIterator3 target_end;
+ difference_type overhang = prepare_unguarded(seqs_begin, seqs_end,
+ comp, min_seq, stable);
+
+ difference_type total_length = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ total_length += _GLIBCXX_PARALLEL_LENGTH(*s);
+
+ if (overhang != -1)
+ {
+ difference_type unguarded_length =
+ std::min(length, total_length - overhang);
+ target_end = multiway_merge_loser_tree_unguarded
+ <typename loser_tree_unguarded_traits<value_type, Comparator>::LT>
+ (seqs_begin, seqs_end, target, comp, unguarded_length, stable);
+ overhang = length - unguarded_length;
+ }
+ else
+ {
+ // Empty sequence found.
+ overhang = length;
+ target_end = target;
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length - overhang);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ target_end = multiway_merge_loser_tree
+ <typename loser_tree_traits<value_type, Comparator>::LT>
+ (seqs_begin, seqs_end, target_end, comp, overhang, stable);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ return target_end;
+ }
+
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_loser_tree_sentinel(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+ typedef std::iterator_traits<RandomAccessIteratorIterator> traits_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ RandomAccessIterator3 target_end;
+ difference_type overhang =
+ prepare_unguarded_sentinel(seqs_begin, seqs_end, comp);
+
+ difference_type total_length = 0;
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ {
+ total_length += _GLIBCXX_PARALLEL_LENGTH(*s);
+
+ // Sentinel spot.
+ ++((*s).second);
+ }
+
+ difference_type unguarded_length =
+ std::min(length, total_length - overhang);
+ target_end = multiway_merge_loser_tree_unguarded
+ <typename loser_tree_unguarded_traits<value_type, Comparator>::LT>
+ (seqs_begin, seqs_end, target, comp, unguarded_length, stable);
+ overhang = length - unguarded_length;
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length - overhang);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ // Copy rest stable.
+ for (RandomAccessIteratorIterator s = seqs_begin;
+ s != seqs_end && overhang > 0; ++s)
+ {
+ // Restore.
+ --((*s).second);
+ difference_type local_length =
+ std::min<difference_type>(overhang, _GLIBCXX_PARALLEL_LENGTH(*s));
+ target_end = std::copy((*s).first, (*s).first + local_length,
+ target_end);
+ (*s).first += local_length;
+ overhang -= local_length;
+ }
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(overhang == 0);
+ _GLIBCXX_PARALLEL_ASSERT(target_end == target + length);
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target_end, comp));
+#endif
+
+ return target_end;
+ }
+
+/** @brief Sequential multi-way merging switch.
+ *
+ * The _GLIBCXX_PARALLEL_DECISION if based on the branching factor and
+ * runtime settings.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @param sentinel The sequences have a sentinel element.
+ * @return End iterator of output sequence. */
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp, _DifferenceTp length,
+ bool stable, bool sentinel,
+ sequential_tag)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+#if _GLIBCXX_ASSERTIONS
+ for (RandomAccessIteratorIterator s = seqs_begin; s != seqs_end; ++s)
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted((*s).first, (*s).second, comp));
+#endif
+
+ RandomAccessIterator3 return_target = target;
+ int k = static_cast<int>(seqs_end - seqs_begin);
+
+ _MultiwayMergeAlgorithm mwma = _Settings::get().multiway_merge_algorithm;
+
+ if (!sentinel && mwma == LOSER_TREE_SENTINEL)
+ mwma = LOSER_TREE_COMBINED;
+
+ switch (k)
+ {
+ case 0:
+ break;
+ case 1:
+ return_target = std::copy(seqs_begin[0].first,
+ seqs_begin[0].first + length,
+ target);
+ seqs_begin[0].first += length;
+ break;
+ case 2:
+ return_target = merge_advance(seqs_begin[0].first,
+ seqs_begin[0].second,
+ seqs_begin[1].first,
+ seqs_begin[1].second,
+ target, length, comp);
+ break;
+ case 3:
+ switch (mwma)
+ {
+ case LOSER_TREE_COMBINED:
+ return_target = multiway_merge_3_combined(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+ case LOSER_TREE_SENTINEL:
+ return_target =
+ multiway_merge_3_variant<unguarded_iterator>(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+ default:
+ return_target =
+ multiway_merge_3_variant<guarded_iterator>(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+ }
+ break;
+ case 4:
+ switch (mwma)
+ {
+ case LOSER_TREE_COMBINED:
+ return_target = multiway_merge_4_combined(seqs_begin,
+ seqs_end,
+ target,
+ comp, length, stable);
+ break;
+ case LOSER_TREE_SENTINEL:
+ return_target =
+ multiway_merge_4_variant<unguarded_iterator>(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+ default:
+ return_target = multiway_merge_4_variant<guarded_iterator>(
+ seqs_begin,
+ seqs_end,
+ target,
+ comp, length, stable);
+ break;
+ }
+ break;
+ default:
+ {
+ switch (mwma)
+ {
+ case BUBBLE:
+ return_target = multiway_merge_bubble(seqs_begin,
+ seqs_end,
+ target,
+ comp, length, stable);
+ break;
+#if _GLIBCXX_LOSER_TREE_EXPLICIT
+ case LOSER_TREE_EXPLICIT:
+ return_target = multiway_merge_loser_tree<
+ LoserTreeExplicit<value_type, Comparator> >(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+#endif
+#if _GLIBCXX_LOSER_TREE
+ case LOSER_TREE:
+ return_target = multiway_merge_loser_tree<
+ LoserTree<value_type, Comparator> >(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+#endif
+#if _GLIBCXX_LOSER_TREE_COMBINED
+ case LOSER_TREE_COMBINED:
+ return_target = multiway_merge_loser_tree_combined(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+#endif
+#if _GLIBCXX_LOSER_TREE_SENTINEL
+ case LOSER_TREE_SENTINEL:
+ return_target = multiway_merge_loser_tree_sentinel(seqs_begin,
+ seqs_end,
+ target,
+ comp, length,
+ stable);
+ break;
+#endif
+ default:
+ // multiway_merge algorithm not implemented.
+ _GLIBCXX_PARALLEL_ASSERT(0);
+ break;
+ }
+ }
+ }
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target + length, comp));
+#endif
+
+ return return_target;
+ }
+
+/** @brief Parallel multi-way merge routine.
+ *
+ * The _GLIBCXX_PARALLEL_DECISION if based on the branching factor
+ * and runtime settings.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @param sentinel Ignored.
+ * @return End iterator of output sequence.
+ */
+template<typename RandomAccessIteratorIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ parallel_multiway_merge(RandomAccessIteratorIterator seqs_begin,
+ RandomAccessIteratorIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length, bool stable, bool sentinel)
+ {
+ _GLIBCXX_CALL(length)
+
+ typedef _DifferenceTp difference_type;
+ typedef typename std::iterator_traits<RandomAccessIteratorIterator>
+ ::value_type::first_type
+ RandomAccessIterator1;
+ typedef typename std::iterator_traits<RandomAccessIterator1>::value_type
+ value_type;
+
+ // k sequences.
+ int k = static_cast<int>(seqs_end - seqs_begin);
+
+ difference_type total_length = 0;
+ for (RandomAccessIteratorIterator raii = seqs_begin;
+ raii != seqs_end; ++raii)
+ total_length += _GLIBCXX_PARALLEL_LENGTH(*raii);
+
+ _GLIBCXX_CALL(total_length)
+
+ if (total_length == 0 || k == 0)
+ return target;
+
+ bool tight = (total_length == length);
+
+ std::vector<std::pair<difference_type, difference_type> >* pieces;
+
+ thread_index_t num_threads = static_cast<thread_index_t>(
+ std::min<difference_type>(get_max_threads(), total_length));
+ const _Settings& __s = _Settings::get();
+
+# pragma omp parallel num_threads (num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ // Thread t will have to merge pieces[iam][0..k - 1]
+ pieces = new std::vector<
+ std::pair<difference_type, difference_type> >[num_threads];
+ for (int s = 0; s < num_threads; ++s)
+ pieces[s].resize(k);
+
+ difference_type num_samples = __s.merge_oversampling
+ * num_threads;
+
+ if (__s.multiway_merge_splitting == SAMPLING)
+ {
+ value_type* samples = static_cast<value_type*>(
+ ::operator new(sizeof(value_type) * k * num_samples));
+ // Sample.
+ for (int s = 0; s < k; ++s)
+ for (difference_type i = 0; i < num_samples; ++i)
+ {
+ difference_type sample_index =
+ static_cast<difference_type>(
+ _GLIBCXX_PARALLEL_LENGTH(seqs_begin[s])
+ * (double(i + 1) / (num_samples + 1))
+ * (double(length) / total_length));
+ ::new(&(samples[s * num_samples + i]))
+ value_type(seqs_begin[s].first[sample_index]);
+ }
+
+ if (stable)
+ __gnu_sequential::stable_sort(samples, samples
+ + (num_samples * k), comp);
+ else
+ __gnu_sequential::sort(samples, samples
+ + (num_samples * k), comp);
+
+ for (int slab = 0; slab < num_threads; ++slab)
+ // For each slab / processor.
+ for (int seq = 0; seq < k; ++seq)
+ {
+ // For each sequence.
+ if (slab > 0)
+ pieces[slab][seq].first =
+ std::upper_bound(seqs_begin[seq].first,
+ seqs_begin[seq].second,
+ samples[num_samples * k
+ * slab / num_threads],
+ comp)
+ - seqs_begin[seq].first;
+ else
+ {
+ // Absolute beginning.
+ pieces[slab][seq].first = 0;
+ }
+ if ((slab + 1) < num_threads)
+ pieces[slab][seq].second =
+ std::upper_bound(seqs_begin[seq].first,
+ seqs_begin[seq].second,
+ samples[num_samples * k
+ * (slab + 1)
+ / num_threads], comp)
+ - seqs_begin[seq].first;
+ else
+ pieces[slab][seq].second
+ = _GLIBCXX_PARALLEL_LENGTH(seqs_begin[seq]);
+ }
+ ::operator delete(samples);
+ }
+ else
+ {
+ // (_Settings::multiway_merge_splitting == _Settings::EXACT).
+ std::vector<RandomAccessIterator1>* offsets =
+ new std::vector<RandomAccessIterator1>[num_threads];
+ std::vector<
+ std::pair<RandomAccessIterator1, RandomAccessIterator1>
+ > se(k);
+
+ copy(seqs_begin, seqs_end, se.begin());
+
+ difference_type* borders =
+ new difference_type[num_threads + 1];
+ equally_split(length, num_threads, borders);
+
+ for (int s = 0; s < (num_threads - 1); ++s)
+ {
+ offsets[s].resize(k);
+ multiseq_partition(
+ se.begin(), se.end(), borders[s + 1],
+ offsets[s].begin(), comp);
+
+ // Last one also needed and available.
+ if (!tight)
+ {
+ offsets[num_threads - 1].resize(k);
+ multiseq_partition(se.begin(), se.end(),
+ difference_type(length),
+ offsets[num_threads - 1].begin(),
+ comp);
+ }
+ }
+
+
+ for (int slab = 0; slab < num_threads; ++slab)
+ {
+ // For each slab / processor.
+ for (int seq = 0; seq < k; ++seq)
+ {
+ // For each sequence.
+ if (slab == 0)
+ {
+ // Absolute beginning.
+ pieces[slab][seq].first = 0;
+ }
+ else
+ pieces[slab][seq].first =
+ pieces[slab - 1][seq].second;
+ if (!tight || slab < (num_threads - 1))
+ pieces[slab][seq].second =
+ offsets[slab][seq] - seqs_begin[seq].first;
+ else
+ {
+ // slab == num_threads - 1
+ pieces[slab][seq].second =
+ _GLIBCXX_PARALLEL_LENGTH(seqs_begin[seq]);
+ }
+ }
+ }
+ delete[] offsets;
+ }
+ } //single
+
+ thread_index_t iam = omp_get_thread_num();
+
+ difference_type target_position = 0;
+
+ for (int c = 0; c < k; ++c)
+ target_position += pieces[iam][c].first;
+
+ if (k > 2)
+ {
+ std::pair<RandomAccessIterator1, RandomAccessIterator1>* chunks
+ = new
+ std::pair<RandomAccessIterator1, RandomAccessIterator1>[k];
+
+ difference_type local_length = 0;
+ for (int s = 0; s < k; ++s)
+ {
+ chunks[s] = std::make_pair(
+ seqs_begin[s].first + pieces[iam][s].first,
+ seqs_begin[s].first + pieces[iam][s].second);
+ local_length += _GLIBCXX_PARALLEL_LENGTH(chunks[s]);
+ }
+
+ multiway_merge(
+ chunks, chunks + k, target + target_position, comp,
+ std::min(local_length, length - target_position),
+ stable, false, sequential_tag());
+
+ delete[] chunks;
+ }
+ else if (k == 2)
+ {
+ RandomAccessIterator1
+ begin0 = seqs_begin[0].first + pieces[iam][0].first,
+ begin1 = seqs_begin[1].first + pieces[iam][1].first;
+ merge_advance(begin0,
+ seqs_begin[0].first + pieces[iam][0].second,
+ begin1,
+ seqs_begin[1].first + pieces[iam][1].second,
+ target + target_position,
+ (pieces[iam][0].second - pieces[iam][0].first) +
+ (pieces[iam][1].second - pieces[iam][1].first),
+ comp);
+ }
+ } //parallel
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(is_sorted(target, target + length, comp));
+#endif
+
+ // Update ends of sequences.
+ for (int s = 0; s < k; ++s)
+ seqs_begin[s].first += pieces[num_threads - 1][s].second;
+
+ delete[] pieces;
+
+ return target + length;
+ }
+
+/**
+ * @brief Multi-way merging front-end.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @return End iterator of output sequence.
+ */
+template<typename RandomAccessIteratorPairIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge(RandomAccessIteratorPairIterator seqs_begin,
+ RandomAccessIteratorPairIterator seqs_end,
+ RandomAccessIterator3 target, Comparator comp,
+ _DifferenceTp length, bool stable)
+ {
+ typedef _DifferenceTp difference_type;
+ _GLIBCXX_CALL(seqs_end - seqs_begin)
+
+ if (seqs_begin == seqs_end)
+ return target;
+
+ const _Settings& __s = _Settings::get();
+
+ RandomAccessIterator3 target_end;
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ ((seqs_end - seqs_begin) >= __s.multiway_merge_minimal_k)
+ && ((sequence_index_t)length >= __s.multiway_merge_minimal_n)))
+ target_end = parallel_multiway_merge(seqs_begin, seqs_end,
+ target, comp,
+ static_cast<difference_type>(length),
+ stable, false);
+ else
+ target_end = multiway_merge(seqs_begin, seqs_end, target, comp, length,
+ stable, false, sequential_tag());
+
+ return target_end;
+ }
+
+/** @brief Multi-way merging front-end.
+ * @param seqs_begin Begin iterator of iterator pair input sequence.
+ * @param seqs_end End iterator of iterator pair input sequence.
+ * @param target Begin iterator out output sequence.
+ * @param comp Comparator.
+ * @param length Maximum length to merge.
+ * @param stable Stable merging incurs a performance penalty.
+ * @return End iterator of output sequence.
+ * @pre For each @c i, @c seqs_begin[i].second must be the end
+ * marker of the sequence, but also reference the one more sentinel
+ * element. */
+template<typename RandomAccessIteratorPairIterator,
+ typename RandomAccessIterator3,
+ typename _DifferenceTp,
+ typename Comparator>
+ RandomAccessIterator3
+ multiway_merge_sentinel(RandomAccessIteratorPairIterator seqs_begin,
+ RandomAccessIteratorPairIterator seqs_end,
+ RandomAccessIterator3 target,
+ Comparator comp,
+ _DifferenceTp length,
+ bool stable)
+ {
+ typedef _DifferenceTp difference_type;
+
+ if (seqs_begin == seqs_end)
+ return target;
+
+ _GLIBCXX_CALL(seqs_end - seqs_begin)
+
+ const _Settings& __s = _Settings::get();
+ const bool cond1 = seqs_end - seqs_begin >= __s.multiway_merge_minimal_k;
+ const bool cond2 = sequence_index_t(length) >= __s.multiway_merge_minimal_n;
+ if (_GLIBCXX_PARALLEL_CONDITION(cond1 && cond2))
+ return parallel_multiway_merge(seqs_begin, seqs_end, target, comp,
+ length, stable, true);
+ else
+ return multiway_merge(seqs_begin, seqs_end, target, comp, length, stable,
+ true, sequential_tag());
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/multiway_mergesort.h b/libstdc++-v3/include/parallel/multiway_mergesort.h
new file mode 100644
index 00000000000..c8ceb2f40b7
--- /dev/null
+++ b/libstdc++-v3/include/parallel/multiway_mergesort.h
@@ -0,0 +1,423 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/multiway_mergesort.h
+ * @brief Parallel multiway merge sort.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_MERGESORT_H
+#define _GLIBCXX_PARALLEL_MERGESORT_H 1
+
+#include <vector>
+
+#include <parallel/basic_iterator.h>
+#include <bits/stl_algo.h>
+#include <parallel/parallel.h>
+#include <parallel/multiway_merge.h>
+
+namespace __gnu_parallel
+{
+
+/** @brief Subsequence description. */
+template<typename _DifferenceTp>
+ struct Piece
+ {
+ typedef _DifferenceTp difference_type;
+
+ /** @brief Begin of subsequence. */
+ difference_type begin;
+
+ /** @brief End of subsequence. */
+ difference_type end;
+ };
+
+/** @brief Data accessed by all threads.
+ *
+ * PMWMS = parallel multiway mergesort */
+template<typename RandomAccessIterator>
+ struct PMWMSSortingData
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ /** @brief Number of threads involved. */
+ thread_index_t num_threads;
+
+ /** @brief Input begin. */
+ RandomAccessIterator source;
+
+ /** @brief Start indices, per thread. */
+ difference_type* starts;
+
+ /** @brief Temporary arrays for each thread.
+ *
+ * Indirection Allows using the temporary storage in different
+ * ways, without code duplication.
+ * @see _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST */
+ value_type** temporaries;
+
+#if _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+ /** @brief Storage in which to sort. */
+ RandomAccessIterator* sorting_places;
+
+ /** @brief Storage into which to merge. */
+ value_type** merging_places;
+#else
+ /** @brief Storage in which to sort. */
+ value_type** sorting_places;
+
+ /** @brief Storage into which to merge. */
+ RandomAccessIterator* merging_places;
+#endif
+ /** @brief Samples. */
+ value_type* samples;
+
+ /** @brief Offsets to add to the found positions. */
+ difference_type* offsets;
+
+ /** @brief Pieces of data to merge @c [thread][sequence] */
+ std::vector<Piece<difference_type> >* pieces;
+
+ /** @brief Stable sorting desired. */
+ bool stable;
+};
+
+/**
+ * @brief Select samples from a sequence.
+ * @param sd Pointer to algorithm data. Result will be placed in
+ * @c sd->samples.
+ * @param num_samples Number of samples to select.
+ */
+template<typename RandomAccessIterator, typename _DifferenceTp>
+ void
+ determine_samples(PMWMSSortingData<RandomAccessIterator>* sd,
+ _DifferenceTp& num_samples)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef _DifferenceTp difference_type;
+
+ thread_index_t iam = omp_get_thread_num();
+
+ num_samples = _Settings::get().sort_mwms_oversampling * sd->num_threads - 1;
+
+ difference_type* es = new difference_type[num_samples + 2];
+
+ equally_split(sd->starts[iam + 1] - sd->starts[iam],
+ num_samples + 1, es);
+
+ for (difference_type i = 0; i < num_samples; ++i)
+ ::new(&(sd->samples[iam * num_samples + i]))
+ value_type(sd->source[sd->starts[iam] + es[i + 1]]);
+
+ delete[] es;
+ }
+
+/** @brief PMWMS code executed by each thread.
+ * @param sd Pointer to algorithm data.
+ * @param comp Comparator.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_sort_mwms_pu(PMWMSSortingData<RandomAccessIterator>* sd,
+ Comparator& comp)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ thread_index_t iam = omp_get_thread_num();
+
+ // Length of this thread's chunk, before merging.
+ difference_type length_local = sd->starts[iam + 1] - sd->starts[iam];
+
+#if _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+ typedef RandomAccessIterator SortingPlacesIterator;
+
+ // Sort in input storage.
+ sd->sorting_places[iam] = sd->source + sd->starts[iam];
+#else
+ typedef value_type* SortingPlacesIterator;
+
+ // Sort in temporary storage, leave space for sentinel.
+ sd->sorting_places[iam] = sd->temporaries[iam] =
+ static_cast<value_type*>(
+ ::operator new(sizeof(value_type) * (length_local + 1)));
+
+ // Copy there.
+ std::uninitialized_copy(sd->source + sd->starts[iam],
+ sd->source + sd->starts[iam] + length_local,
+ sd->sorting_places[iam]);
+#endif
+
+ // Sort locally.
+ if (sd->stable)
+ __gnu_sequential::stable_sort(sd->sorting_places[iam],
+ sd->sorting_places[iam] + length_local,
+ comp);
+ else
+ __gnu_sequential::sort(sd->sorting_places[iam],
+ sd->sorting_places[iam] + length_local,
+ comp);
+
+ // Invariant: locally sorted subsequence in sd->sorting_places[iam],
+ // sd->sorting_places[iam] + length_local.
+ const _Settings& __s = _Settings::get();
+ if (__s.sort_splitting == SAMPLING)
+ {
+ difference_type num_samples;
+ determine_samples(sd, num_samples);
+
+# pragma omp barrier
+
+# pragma omp single
+ __gnu_sequential::sort(sd->samples,
+ sd->samples + (num_samples * sd->num_threads),
+ comp);
+
+# pragma omp barrier
+
+ for (int s = 0; s < sd->num_threads; ++s)
+ {
+ // For each sequence.
+ if (num_samples * iam > 0)
+ sd->pieces[iam][s].begin =
+ std::lower_bound(sd->sorting_places[s],
+ sd->sorting_places[s]
+ + (sd->starts[s + 1] - sd->starts[s]),
+ sd->samples[num_samples * iam],
+ comp)
+ - sd->sorting_places[s];
+ else
+ // Absolute beginning.
+ sd->pieces[iam][s].begin = 0;
+
+ if ((num_samples * (iam + 1)) < (num_samples * sd->num_threads))
+ sd->pieces[iam][s].end =
+ std::lower_bound(sd->sorting_places[s],
+ sd->sorting_places[s]
+ + (sd->starts[s + 1] - sd->starts[s]),
+ sd->samples[num_samples * (iam + 1)],
+ comp)
+ - sd->sorting_places[s];
+ else
+ // Absolute end.
+ sd->pieces[iam][s].end = sd->starts[s + 1] - sd->starts[s];
+ }
+ }
+ else if (__s.sort_splitting == EXACT)
+ {
+# pragma omp barrier
+
+ std::vector<std::pair<SortingPlacesIterator, SortingPlacesIterator> >
+ seqs(sd->num_threads);
+ for (int s = 0; s < sd->num_threads; ++s)
+ seqs[s] = std::make_pair(sd->sorting_places[s],
+ sd->sorting_places[s]
+ + (sd->starts[s + 1] - sd->starts[s]));
+
+ std::vector<SortingPlacesIterator> offsets(sd->num_threads);
+
+ // if not last thread
+ if (iam < sd->num_threads - 1)
+ multiseq_partition(seqs.begin(), seqs.end(),
+ sd->starts[iam + 1], offsets.begin(), comp);
+
+ for (int seq = 0; seq < sd->num_threads; ++seq)
+ {
+ // for each sequence
+ if (iam < (sd->num_threads - 1))
+ sd->pieces[iam][seq].end = offsets[seq] - seqs[seq].first;
+ else
+ // very end of this sequence
+ sd->pieces[iam][seq].end = (sd->starts[seq + 1]
+ - sd->starts[seq]);
+ }
+
+# pragma omp barrier
+
+ for (int seq = 0; seq < sd->num_threads; ++seq)
+ {
+ // For each sequence.
+ if (iam > 0)
+ sd->pieces[iam][seq].begin = sd->pieces[iam - 1][seq].end;
+ else
+ // Absolute beginning.
+ sd->pieces[iam][seq].begin = 0;
+ }
+ }
+
+ // Offset from target begin, length after merging.
+ difference_type offset = 0, length_am = 0;
+ for (int s = 0; s < sd->num_threads; ++s)
+ {
+ length_am += sd->pieces[iam][s].end - sd->pieces[iam][s].begin;
+ offset += sd->pieces[iam][s].begin;
+ }
+
+#if _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+ // Merge to temporary storage, uninitialized creation not possible
+ // since there is no multiway_merge calling the placement new
+ // instead of the assignment operator.
+ // XXX incorrect (de)construction
+ sd->merging_places[iam] = sd->temporaries[iam] =
+ static_cast<value_type*>(::operator new(sizeof(value_type)
+ * length_am));
+#else
+ // Merge directly to target.
+ sd->merging_places[iam] = sd->source + offset;
+#endif
+ std::vector<std::pair<SortingPlacesIterator, SortingPlacesIterator> >
+ seqs(sd->num_threads);
+
+ for (int s = 0; s < sd->num_threads; ++s)
+ {
+ seqs[s] =
+ std::make_pair(sd->sorting_places[s] + sd->pieces[iam][s].begin,
+ sd->sorting_places[s] + sd->pieces[iam][s].end);
+ }
+
+ multiway_merge(seqs.begin(), seqs.end(), sd->merging_places[iam], comp,
+ length_am, sd->stable, false, sequential_tag());
+
+# pragma omp barrier
+
+#if _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+ // Write back.
+ std::copy(sd->merging_places[iam],
+ sd->merging_places[iam] + length_am,
+ sd->source + offset);
+#endif
+
+ ::operator delete(sd->temporaries[iam]);
+ }
+
+/** @brief PMWMS main call.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param comp Comparator.
+ * @param n Length of sequence.
+ * @param num_threads Number of threads to use.
+ * @param stable Stable sorting.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_sort_mwms(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, typename
+ std::iterator_traits<RandomAccessIterator>::
+ difference_type n, int num_threads, bool stable)
+ {
+ _GLIBCXX_CALL(n)
+
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ if (n <= 1)
+ return;
+
+ // at least one element per thread
+ if (num_threads > n)
+ num_threads = static_cast<thread_index_t>(n);
+
+ // shared variables
+ PMWMSSortingData<RandomAccessIterator> sd;
+ difference_type* starts;
+ const _Settings& __s = _Settings::get();
+
+# pragma omp parallel num_threads(num_threads)
+ {
+ num_threads = omp_get_num_threads(); //no more threads than requested
+
+# pragma omp single
+ {
+ sd.num_threads = num_threads;
+ sd.source = begin;
+ sd.temporaries = new value_type*[num_threads];
+
+#if _GLIBCXX_MULTIWAY_MERGESORT_COPY_LAST
+ sd.sorting_places = new RandomAccessIterator[num_threads];
+ sd.merging_places = new value_type*[num_threads];
+#else
+ sd.sorting_places = new value_type*[num_threads];
+ sd.merging_places = new RandomAccessIterator[num_threads];
+#endif
+
+ if (__s.sort_splitting == SAMPLING)
+ {
+ unsigned int size =
+ (__s.sort_mwms_oversampling * num_threads - 1)
+ * num_threads;
+ sd.samples = static_cast<value_type*>(
+ ::operator new(size * sizeof(value_type)));
+ }
+ else
+ sd.samples = NULL;
+
+ sd.offsets = new difference_type[num_threads - 1];
+ sd.pieces = new std::vector<Piece<difference_type> >[num_threads];
+ for (int s = 0; s < num_threads; ++s)
+ sd.pieces[s].resize(num_threads);
+ starts = sd.starts = new difference_type[num_threads + 1];
+ sd.stable = stable;
+
+ difference_type chunk_length = n / num_threads;
+ difference_type split = n % num_threads;
+ difference_type pos = 0;
+ for (int i = 0; i < num_threads; ++i)
+ {
+ starts[i] = pos;
+ pos += (i < split) ? (chunk_length + 1) : chunk_length;
+ }
+ starts[num_threads] = pos;
+ }
+
+ // Now sort in parallel.
+ parallel_sort_mwms_pu(&sd, comp);
+ } //parallel
+
+ delete[] starts;
+ delete[] sd.temporaries;
+ delete[] sd.sorting_places;
+ delete[] sd.merging_places;
+
+ if (__s.sort_splitting == SAMPLING)
+ ::operator delete(sd.samples);
+
+ delete[] sd.offsets;
+ delete[] sd.pieces;
+ }
+} //namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/numeric b/libstdc++-v3/include/parallel/numeric
new file mode 100644
index 00000000000..1269c5251e4
--- /dev/null
+++ b/libstdc++-v3/include/parallel/numeric
@@ -0,0 +1,506 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/numeric
+*
+ * @brief Parallel STL function calls corresponding to stl_numeric.h.
+ * The functions defined here mainly do case switches and
+ * call the actual parallelized versions in other files.
+ * Inlining policy: Functions that basically only contain one function call,
+ * are declared inline.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_NUMERIC_H
+#define _GLIBCXX_PARALLEL_NUMERIC_H 1
+
+#include <numeric>
+#include <functional>
+#include <parallel/numericfwd.h>
+#include <parallel/iterator.h>
+#include <parallel/for_each.h>
+#include <parallel/for_each_selectors.h>
+#include <parallel/partial_sum.h>
+
+namespace std
+{
+namespace __parallel
+{
+ // Sequential fallback.
+ template<typename InputIterator, typename T>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::accumulate(begin, end, init); }
+
+ template<typename InputIterator, typename T, typename BinaryOperation>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init,
+ BinaryOperation binary_op, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::accumulate(begin, end, init, binary_op); }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator, typename T, typename IteratorTag>
+ inline T
+ accumulate_switch(InputIterator begin, InputIterator end,
+ T init, IteratorTag)
+ { return accumulate(begin, end, init, __gnu_parallel::sequential_tag()); }
+
+ template<typename InputIterator, typename T, typename BinaryOperation,
+ typename IteratorTag>
+ inline T
+ accumulate_switch(InputIterator begin, InputIterator end, T init,
+ BinaryOperation binary_op, IteratorTag)
+ { return accumulate(begin, end, init, binary_op,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename _RandomAccessIterator, typename T,
+ typename BinaryOperation>
+ T
+ accumulate_switch(_RandomAccessIterator begin, _RandomAccessIterator end,
+ T init, BinaryOperation binary_op,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_unbalanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().accumulate_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ T res = init;
+ __gnu_parallel::accumulate_selector<_RandomAccessIterator>
+ my_selector;
+ __gnu_parallel::
+ for_each_template_random_access(begin, end,
+ __gnu_parallel::nothing(),
+ my_selector,
+ __gnu_parallel::
+ accumulate_binop_reduct
+ <BinaryOperation>(binary_op),
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return accumulate(begin, end, init, binary_op,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename InputIterator, typename T>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef std::iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::value_type value_type;
+ typedef typename iterator_traits::iterator_category iterator_category;
+
+ return accumulate_switch(begin, end, init,
+ __gnu_parallel::plus<T, value_type>(),
+ iterator_category(), parallelism_tag);
+ }
+
+ template<typename InputIterator, typename T>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init)
+ {
+ typedef std::iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::value_type value_type;
+ typedef typename iterator_traits::iterator_category iterator_category;
+
+ return accumulate_switch(begin, end, init,
+ __gnu_parallel::plus<T, value_type>(),
+ iterator_category());
+ }
+
+ template<typename InputIterator, typename T, typename BinaryOperation>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init,
+ BinaryOperation binary_op,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return accumulate_switch(begin, end, init, binary_op,
+ iterator_category(), parallelism_tag);
+ }
+
+ template<typename InputIterator, typename T, typename BinaryOperation>
+ inline T
+ accumulate(InputIterator begin, InputIterator end, T init,
+ BinaryOperation binary_op)
+ {
+ typedef iterator_traits<InputIterator> iterator_traits;
+ typedef typename iterator_traits::iterator_category iterator_category;
+ return accumulate_switch(begin, end, init, binary_op,
+ iterator_category());
+ }
+
+
+ // Sequential fallback.
+ template<typename InputIterator1, typename InputIterator2, typename T>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::inner_product(first1, last1, first2, init); }
+
+ template<typename InputIterator1, typename InputIterator2, typename T,
+ typename BinaryFunction1, typename BinaryFunction2>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init, BinaryFunction1 binary_op1,
+ BinaryFunction2 binary_op2, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::inner_product(first1, last1, first2, init,
+ binary_op1, binary_op2); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename RandomAccessIterator1, typename RandomAccessIterator2,
+ typename T, typename BinaryFunction1, typename BinaryFunction2>
+ T
+ inner_product_switch(RandomAccessIterator1 first1,
+ RandomAccessIterator1 last1,
+ RandomAccessIterator2 first2, T init,
+ BinaryFunction1 binary_op1,
+ BinaryFunction2 binary_op2,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_unbalanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION((last1 - first1)
+ >= __gnu_parallel::_Settings::get().
+ accumulate_minimal_n
+ && __gnu_parallel::
+ is_parallel(parallelism_tag)))
+ {
+ T res = init;
+ __gnu_parallel::
+ inner_product_selector<RandomAccessIterator1,
+ RandomAccessIterator2, T> my_selector(first1, first2);
+ __gnu_parallel::
+ for_each_template_random_access(first1, last1, binary_op2,
+ my_selector, binary_op1,
+ res, res, -1, parallelism_tag);
+ return res;
+ }
+ else
+ return inner_product(first1, last1, first2, init,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // No parallelism for input iterators.
+ template<typename InputIterator1, typename InputIterator2, typename T,
+ typename BinaryFunction1, typename BinaryFunction2,
+ typename IteratorTag1, typename IteratorTag2>
+ inline T
+ inner_product_switch(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init,
+ BinaryFunction1 binary_op1,
+ BinaryFunction2 binary_op2,
+ IteratorTag1, IteratorTag2)
+ { return inner_product(first1, last1, first2, init,
+ binary_op1, binary_op2,
+ __gnu_parallel::sequential_tag()); }
+
+ template<typename InputIterator1, typename InputIterator2, typename T,
+ typename BinaryFunction1, typename BinaryFunction2>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init, BinaryFunction1 binary_op1,
+ BinaryFunction2 binary_op2,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator1> traits1_type;
+ typedef typename traits1_type::iterator_category iterator1_category;
+
+ typedef iterator_traits<InputIterator2> traits2_type;
+ typedef typename traits2_type::iterator_category iterator2_category;
+
+ return inner_product_switch(first1, last1, first2, init, binary_op1,
+ binary_op2, iterator1_category(),
+ iterator2_category(), parallelism_tag);
+ }
+
+ template<typename InputIterator1, typename InputIterator2, typename T,
+ typename BinaryFunction1, typename BinaryFunction2>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init, BinaryFunction1 binary_op1,
+ BinaryFunction2 binary_op2)
+ {
+ typedef iterator_traits<InputIterator1> traits1_type;
+ typedef typename traits1_type::iterator_category iterator1_category;
+
+ typedef iterator_traits<InputIterator2> traits2_type;
+ typedef typename traits2_type::iterator_category iterator2_category;
+
+ return inner_product_switch(first1, last1, first2, init, binary_op1,
+ binary_op2, iterator1_category(),
+ iterator2_category());
+ }
+
+ template<typename InputIterator1, typename InputIterator2, typename T>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator1> traits_type1;
+ typedef typename traits_type1::value_type value_type1;
+ typedef iterator_traits<InputIterator2> traits_type2;
+ typedef typename traits_type2::value_type value_type2;
+
+ typedef typename
+ __gnu_parallel::multiplies<value_type1, value_type2>::result
+ multiplies_result_type;
+ return inner_product(first1, last1, first2, init,
+ __gnu_parallel::plus<T, multiplies_result_type>(),
+ __gnu_parallel::
+ multiplies<value_type1, value_type2>(),
+ parallelism_tag);
+ }
+
+ template<typename InputIterator1, typename InputIterator2, typename T>
+ inline T
+ inner_product(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, T init)
+ {
+ typedef iterator_traits<InputIterator1> traits_type1;
+ typedef typename traits_type1::value_type value_type1;
+ typedef iterator_traits<InputIterator2> traits_type2;
+ typedef typename traits_type2::value_type value_type2;
+
+ typedef typename
+ __gnu_parallel::multiplies<value_type1, value_type2>::result
+ multiplies_result_type;
+ return inner_product(first1, last1, first2, init,
+ __gnu_parallel::plus<T, multiplies_result_type>(),
+ __gnu_parallel::
+ multiplies<value_type1, value_type2>());
+ }
+
+ // Sequential fallback.
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ partial_sum(InputIterator begin, InputIterator end, OutputIterator result,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::partial_sum(begin, end, result); }
+
+ // Sequential fallback.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ inline OutputIterator
+ partial_sum(InputIterator begin, InputIterator end, OutputIterator result,
+ BinaryOperation bin_op, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::partial_sum(begin, end, result, bin_op); }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation, typename IteratorTag1,
+ typename IteratorTag2>
+ inline OutputIterator
+ partial_sum_switch(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ IteratorTag1, IteratorTag2)
+ { return _GLIBCXX_STD_P::partial_sum(begin, end, result, bin_op); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ OutputIterator
+ partial_sum_switch(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ random_access_iterator_tag, random_access_iterator_tag)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().partial_sum_minimal_n))
+ return __gnu_parallel::parallel_partial_sum(begin, end,
+ result, bin_op);
+ else
+ return partial_sum(begin, end, result, bin_op,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ partial_sum(InputIterator begin, InputIterator end, OutputIterator result)
+ {
+ typedef typename iterator_traits<InputIterator>::value_type value_type;
+ return partial_sum(begin, end, result, std::plus<value_type>());
+ }
+
+ // Public interface
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ inline OutputIterator
+ partial_sum(InputIterator begin, InputIterator end, OutputIterator result,
+ BinaryOperation binary_op)
+ {
+ typedef iterator_traits<InputIterator> traitsi_type;
+ typedef typename traitsi_type::iterator_category iteratori_category;
+
+ typedef iterator_traits<OutputIterator> traitso_type;
+ typedef typename traitso_type::iterator_category iteratoro_category;
+
+ return partial_sum_switch(begin, end, result, binary_op,
+ iteratori_category(), iteratoro_category());
+ }
+
+ // Sequential fallback.
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result, __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::adjacent_difference(begin, end, result); }
+
+ // Sequential fallback.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ __gnu_parallel::sequential_tag)
+ { return _GLIBCXX_STD_P::adjacent_difference(begin, end, result, bin_op); }
+
+ // Sequential fallback for input iterator case.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation, typename IteratorTag1,
+ typename IteratorTag2>
+ inline OutputIterator
+ adjacent_difference_switch(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ IteratorTag1, IteratorTag2)
+ { return adjacent_difference(begin, end, result, bin_op,
+ __gnu_parallel::sequential_tag()); }
+
+ // Parallel algorithm for random access iterators.
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ OutputIterator
+ adjacent_difference_switch(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism parallelism_tag
+ = __gnu_parallel::parallel_balanced)
+ {
+ if (_GLIBCXX_PARALLEL_CONDITION(
+ static_cast<__gnu_parallel::sequence_index_t>(end - begin)
+ >= __gnu_parallel::_Settings::get().adjacent_difference_minimal_n
+ && __gnu_parallel::is_parallel(parallelism_tag)))
+ {
+ bool dummy = true;
+ typedef __gnu_parallel::iterator_pair<InputIterator, OutputIterator,
+ random_access_iterator_tag> ip;
+ *result = *begin;
+ ip begin_pair(begin + 1, result + 1),
+ end_pair(end, result + (end - begin));
+ __gnu_parallel::adjacent_difference_selector<ip> functionality;
+ __gnu_parallel::
+ for_each_template_random_access(begin_pair, end_pair, bin_op,
+ functionality,
+ __gnu_parallel::dummy_reduct(),
+ dummy, dummy, -1, parallelism_tag);
+ return functionality.finish_iterator;
+ }
+ else
+ return adjacent_difference(begin, end, result, bin_op,
+ __gnu_parallel::sequential_tag());
+ }
+
+ // Public interface.
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ return adjacent_difference(begin, end, result, std::minus<value_type>(),
+ parallelism_tag);
+ }
+
+ template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result)
+ {
+ typedef iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ return adjacent_difference(begin, end, result, std::minus<value_type>());
+ }
+
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation binary_op,
+ __gnu_parallel::_Parallelism parallelism_tag)
+ {
+ typedef iterator_traits<InputIterator> traitsi_type;
+ typedef typename traitsi_type::iterator_category iteratori_category;
+
+ typedef iterator_traits<OutputIterator> traitso_type;
+ typedef typename traitso_type::iterator_category iteratoro_category;
+
+ return adjacent_difference_switch(begin, end, result, binary_op,
+ iteratori_category(),
+ iteratoro_category(), parallelism_tag);
+ }
+
+ template<typename InputIterator, typename OutputIterator,
+ typename BinaryOperation>
+ inline OutputIterator
+ adjacent_difference(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation binary_op)
+ {
+ typedef iterator_traits<InputIterator> traitsi_type;
+ typedef typename traitsi_type::iterator_category iteratori_category;
+
+ typedef iterator_traits<OutputIterator> traitso_type;
+ typedef typename traitso_type::iterator_category iteratoro_category;
+
+ return adjacent_difference_switch(begin, end, result, binary_op,
+ iteratori_category(),
+ iteratoro_category());
+ }
+} // end namespace
+} // end namespace
+
+#endif /* _GLIBCXX_NUMERIC_H */
diff --git a/libstdc++-v3/include/parallel/numericfwd.h b/libstdc++-v3/include/parallel/numericfwd.h
new file mode 100644
index 00000000000..581ceaad6f4
--- /dev/null
+++ b/libstdc++-v3/include/parallel/numericfwd.h
@@ -0,0 +1,206 @@
+// <numeric> parallel extensions -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/numericfwd.h
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_PARALLEL_NUMERICFWD_H
+#define _GLIBCXX_PARALLEL_NUMERICFWD_H 1
+
+#pragma GCC system_header
+
+#include <parallel/tags.h>
+#include <parallel/settings.h>
+
+namespace std
+{
+namespace __parallel
+{
+ template<typename _IIter, typename _Tp>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp);
+
+ template<typename _IIter, typename _Tp>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Tp>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp, __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _Tp, typename _Tag>
+ _Tp
+ accumulate_switch(_IIter, _IIter, _Tp, _Tag);
+
+ template<typename _IIter, typename _Tp, typename _BinaryOper>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp, _BinaryOper);
+
+ template<typename _IIter, typename _Tp, typename _BinaryOper>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp, _BinaryOper,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _Tp, typename _BinaryOper>
+ _Tp
+ accumulate(_IIter, _IIter, _Tp, _BinaryOper,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _Tp, typename _BinaryOper,
+ typename _Tag>
+ _Tp
+ accumulate_switch(_IIter, _IIter, _Tp, _BinaryOper, _Tag);
+
+ template<typename _RAIter, typename _Tp, typename _BinaryOper>
+ _Tp
+ accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper,
+ typename _Tag1, typename _Tag2>
+ _OIter
+ adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
+ _Tag1, _Tag2);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
+ random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp,
+ typename _BinaryFunction1, typename _BinaryFunction2>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp,
+ _BinaryFunction1, _BinaryFunction2);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp,
+ typename _BinaryFunction1, typename _BinaryFunction2>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
+ _BinaryFunction2, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp,
+ typename BinaryFunction1, typename BinaryFunction2>
+ _Tp
+ inner_product(_IIter1, _IIter1, _IIter2, _Tp, BinaryFunction1,
+ BinaryFunction2, __gnu_parallel::_Parallelism);
+
+ template<typename _RAIter1, typename _RAIter2, typename _Tp,
+ typename BinaryFunction1, typename BinaryFunction2>
+ _Tp
+ inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1,
+ BinaryFunction2, random_access_iterator_tag,
+ random_access_iterator_tag,
+ __gnu_parallel::_Parallelism);
+
+ template<typename _IIter1, typename _IIter2, typename _Tp,
+ typename _BinaryFunction1, typename _BinaryFunction2,
+ typename _Tag1, typename _Tag2>
+ _Tp
+ inner_product_switch(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
+ _BinaryFunction2, _Tag1, _Tag2);
+
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ partial_sum(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ partial_sum(_IIter, _IIter, _OIter, _BinaryOper,
+ __gnu_parallel::sequential_tag);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ partial_sum(_IIter, _IIter, _OIter result);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ partial_sum(_IIter, _IIter, _OIter, _BinaryOper);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper,
+ typename _Tag1, typename _Tag2>
+ _OIter
+ partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2);
+
+ template<typename _IIter, typename _OIter, typename _BinaryOper>
+ _OIter
+ partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper,
+ random_access_iterator_tag, random_access_iterator_tag);
+} // end namespace
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/omp_loop.h b/libstdc++-v3/include/parallel/omp_loop.h
new file mode 100644
index 00000000000..bc34aed2857
--- /dev/null
+++ b/libstdc++-v3/include/parallel/omp_loop.h
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/omp_loop.h
+ * @brief Parallelization of embarrassingly parallel execution by
+ * means of an OpenMP for loop.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_OMP_LOOP_H
+#define _GLIBCXX_PARALLEL_OMP_LOOP_H 1
+
+#include <omp.h>
+
+#include <parallel/settings.h>
+#include <parallel/basic_iterator.h>
+#include <parallel/base.h>
+
+namespace __gnu_parallel
+{
+/** @brief Embarrassingly parallel algorithm for random access
+ * iterators, using an OpenMP for loop.
+ *
+ * @param begin Begin iterator of element sequence.
+ * @param end End iterator of element sequence.
+ * @param o User-supplied functor (comparator, predicate, adding
+ * functor, etc.).
+ * @param f Functor to "process" an element with op (depends on
+ * desired functionality, e. g. for std::for_each(), ...).
+ * @param r Functor to "add" a single result to the already
+ * processed elements (depends on functionality).
+ * @param base Base value for reduction.
+ * @param output Pointer to position where final result is written to
+ * @param bound Maximum number of elements processed (e. g. for
+ * std::count_n()).
+ * @return User-supplied functor (that may contain a part of the result).
+ */
+template<typename RandomAccessIterator,
+ typename Op,
+ typename Fu,
+ typename Red,
+ typename Result>
+ Op
+ for_each_template_random_access_omp_loop(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Op o, Fu& f, Red r, Result base,
+ Result& output,
+ typename std::iterator_traits
+ <RandomAccessIterator>::
+ difference_type bound)
+ {
+ typedef typename
+ std::iterator_traits<RandomAccessIterator>::difference_type
+ difference_type;
+
+ difference_type length = end - begin;
+ thread_index_t num_threads =
+ __gnu_parallel::min<difference_type>(get_max_threads(), length);
+
+ Result *thread_results;
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ thread_results = new Result[num_threads];
+
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ thread_results[i] = Result();
+ }
+
+ thread_index_t iam = omp_get_thread_num();
+
+# pragma omp for schedule(dynamic, _Settings::get().workstealing_chunk_size)
+ for (difference_type pos = 0; pos < length; ++pos)
+ thread_results[iam] =
+ r(thread_results[iam], f(o, begin+pos));
+ } //parallel
+
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ output = r(output, thread_results[i]);
+
+ delete [] thread_results;
+
+ // Points to last element processed (needed as return value for
+ // some algorithms like transform).
+ f.finish_iterator = begin + length;
+
+ return o;
+ }
+
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/omp_loop_static.h b/libstdc++-v3/include/parallel/omp_loop_static.h
new file mode 100644
index 00000000000..96692e8645a
--- /dev/null
+++ b/libstdc++-v3/include/parallel/omp_loop_static.h
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/omp_loop_static.h
+ * @brief Parallelization of embarrassingly parallel execution by
+ * means of an OpenMP for loop with static scheduling.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_OMP_LOOP_STATIC_H
+#define _GLIBCXX_PARALLEL_OMP_LOOP_STATIC_H 1
+
+#include <omp.h>
+
+#include <parallel/settings.h>
+#include <parallel/basic_iterator.h>
+
+namespace __gnu_parallel
+{
+
+ /** @brief Embarrassingly parallel algorithm for random access
+ * iterators, using an OpenMP for loop with static scheduling.
+ *
+ * @param begin Begin iterator of element sequence.
+ * @param end End iterator of element sequence.
+ * @param o User-supplied functor (comparator, predicate, adding
+ * functor, ...).
+ * @param f Functor to "process" an element with op (depends on
+ * desired functionality, e. g. for std::for_each(), ...).
+ * @param r Functor to "add" a single result to the already processed
+ * elements (depends on functionality).
+ * @param base Base value for reduction.
+ * @param output Pointer to position where final result is written to
+ * @param bound Maximum number of elements processed (e. g. for
+ * std::count_n()).
+ * @return User-supplied functor (that may contain a part of the result).
+ */
+template<typename RandomAccessIterator,
+ typename Op,
+ typename Fu,
+ typename Red,
+ typename Result>
+ Op
+ for_each_template_random_access_omp_loop_static(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Op o, Fu& f, Red r,
+ Result base, Result& output,
+ typename std::iterator_traits
+ <RandomAccessIterator>::
+ difference_type bound)
+ {
+ typedef typename
+ std::iterator_traits<RandomAccessIterator>::difference_type
+ difference_type;
+
+ difference_type length = end - begin;
+ thread_index_t num_threads =
+ std::min<difference_type>(get_max_threads(), length);
+
+ Result *thread_results;
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ thread_results = new Result[num_threads];
+
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ thread_results[i] = Result();
+ }
+
+ thread_index_t iam = omp_get_thread_num();
+
+# pragma omp for schedule(static, _Settings::get().workstealing_chunk_size)
+ for (difference_type pos = 0; pos < length; ++pos)
+ thread_results[iam] = r(thread_results[iam], f(o, begin+pos));
+ } //parallel
+
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ output = r(output, thread_results[i]);
+
+ delete [] thread_results;
+
+ // Points to last element processed (needed as return value for
+ // some algorithms like transform).
+ f.finish_iterator = begin + length;
+
+ return o;
+ }
+
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/par_loop.h b/libstdc++-v3/include/parallel/par_loop.h
new file mode 100644
index 00000000000..9e6c2ea641e
--- /dev/null
+++ b/libstdc++-v3/include/parallel/par_loop.h
@@ -0,0 +1,131 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/par_loop.h
+ * @brief Parallelization of embarrassingly parallel execution by
+ * means of equal splitting.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_PAR_LOOP_H
+#define _GLIBCXX_PARALLEL_PAR_LOOP_H 1
+
+#include <omp.h>
+#include <parallel/settings.h>
+#include <parallel/base.h>
+
+namespace __gnu_parallel
+{
+
+/** @brief Embarrassingly parallel algorithm for random access
+ * iterators, using hand-crafted parallelization by equal splitting
+ * the work.
+ *
+ * @param begin Begin iterator of element sequence.
+ * @param end End iterator of element sequence.
+ * @param o User-supplied functor (comparator, predicate, adding
+ * functor, ...)
+ * @param f Functor to "process" an element with op (depends on
+ * desired functionality, e. g. for std::for_each(), ...).
+ * @param r Functor to "add" a single result to the already
+ * processed elements (depends on functionality).
+ * @param base Base value for reduction.
+ * @param output Pointer to position where final result is written to
+ * @param bound Maximum number of elements processed (e. g. for
+ * std::count_n()).
+ * @return User-supplied functor (that may contain a part of the result).
+ */
+template<typename RandomAccessIterator,
+ typename Op,
+ typename Fu,
+ typename Red,
+ typename Result>
+ Op
+ for_each_template_random_access_ed(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Op o, Fu& f, Red r, Result base,
+ Result& output,
+ typename std::iterator_traits
+ <RandomAccessIterator>::
+ difference_type bound)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ const difference_type length = end - begin;
+ Result *thread_results;
+
+ thread_index_t num_threads =
+ __gnu_parallel::min<difference_type>(get_max_threads(), length);
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ thread_results = new Result[num_threads];
+ }
+
+ thread_index_t iam = omp_get_thread_num();
+
+ // Neutral element.
+ Result reduct = Result();
+
+ difference_type
+ start = equally_split_point(length, num_threads, iam),
+ stop = equally_split_point(length, num_threads, iam + 1);
+
+ if (start < stop)
+ {
+ reduct = f(o, begin + start);
+ ++start;
+ }
+
+ for (; start < stop; ++start)
+ reduct = r(reduct, f(o, begin + start));
+
+ thread_results[iam] = reduct;
+ } //parallel
+
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ output = r(output, thread_results[i]);
+
+ // Points to last element processed (needed as return value for
+ // some algorithms like transform).
+ f.finish_iterator = begin + length;
+
+ return o;
+ }
+
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/parallel.h b/libstdc++-v3/include/parallel/parallel.h
new file mode 100644
index 00000000000..63246126b8f
--- /dev/null
+++ b/libstdc++-v3/include/parallel/parallel.h
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/parallel.h
+ * @brief End-user include file. Provides advanced settings and
+ * tuning options.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze and Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_PARALLEL_H
+#define _GLIBCXX_PARALLEL_PARALLEL_H 1
+
+#include <parallel/features.h>
+#include <parallel/compiletime_settings.h>
+#include <parallel/types.h>
+#include <parallel/tags.h>
+#include <parallel/settings.h>
+
+#endif
diff --git a/libstdc++-v3/include/parallel/partial_sum.h b/libstdc++-v3/include/parallel/partial_sum.h
new file mode 100644
index 00000000000..fd4954d456d
--- /dev/null
+++ b/libstdc++-v3/include/parallel/partial_sum.h
@@ -0,0 +1,226 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/partial_sum.h
+ * @brief Parallel implementation of std::partial_sum(), i. e. prefix
+ * sums.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_PARTIAL_SUM_H
+#define _GLIBCXX_PARALLEL_PARTIAL_SUM_H 1
+
+#include <omp.h>
+#include <new>
+#include <bits/stl_algobase.h>
+#include <parallel/parallel.h>
+#include <parallel/numericfwd.h>
+
+namespace __gnu_parallel
+{
+ // Problem: there is no 0-element given.
+
+/** @brief Base case prefix sum routine.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param result Begin iterator of output sequence.
+ * @param bin_op Associative binary function.
+ * @param value Start value. Must be passed since the neutral
+ * element is unknown in general.
+ * @return End iterator of output sequence. */
+template<typename InputIterator,
+ typename OutputIterator,
+ typename BinaryOperation>
+ OutputIterator
+ parallel_partial_sum_basecase(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ typename std::iterator_traits
+ <InputIterator>::value_type value)
+ {
+ if (begin == end)
+ return result;
+
+ while (begin != end)
+ {
+ value = bin_op(value, *begin);
+ *result = value;
+ ++result;
+ ++begin;
+ }
+ return result;
+ }
+
+/** @brief Parallel partial sum implementation, two-phase approach,
+ no recursion.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param result Begin iterator of output sequence.
+ * @param bin_op Associative binary function.
+ * @param n Length of sequence.
+ * @param num_threads Number of threads to use.
+ * @return End iterator of output sequence.
+ */
+template<typename InputIterator,
+ typename OutputIterator,
+ typename BinaryOperation>
+ OutputIterator
+ parallel_partial_sum_linear(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op,
+ typename std::iterator_traits
+ <InputIterator>::difference_type n)
+ {
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ if (begin == end)
+ return result;
+
+ thread_index_t num_threads =
+ std::min<difference_type>(get_max_threads(), n - 1);
+
+ if (num_threads < 2)
+ {
+ *result = *begin;
+ return parallel_partial_sum_basecase(
+ begin + 1, end, result + 1, bin_op, *begin);
+ }
+
+ difference_type* borders;
+ value_type* sums;
+
+ const _Settings& __s = _Settings::get();
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+
+ borders = new difference_type[num_threads + 2];
+
+ if (__s.partial_sum_dilation == 1.0f)
+ equally_split(n, num_threads + 1, borders);
+ else
+ {
+ difference_type chunk_length =
+ ((double)n
+ / ((double)num_threads + __s.partial_sum_dilation)),
+ borderstart = n - num_threads * chunk_length;
+ borders[0] = 0;
+ for (int i = 1; i < (num_threads + 1); ++i)
+ {
+ borders[i] = borderstart;
+ borderstart += chunk_length;
+ }
+ borders[num_threads + 1] = n;
+ }
+
+ sums = static_cast<value_type*>(::operator new(sizeof(value_type)
+ * num_threads));
+ OutputIterator target_end;
+ } //single
+
+ thread_index_t iam = omp_get_thread_num();
+ if (iam == 0)
+ {
+ *result = *begin;
+ parallel_partial_sum_basecase(begin + 1, begin + borders[1],
+ result + 1, bin_op, *begin);
+ ::new(&(sums[iam])) value_type(*(result + borders[1] - 1));
+ }
+ else
+ {
+ ::new(&(sums[iam]))
+ value_type(std::accumulate(begin + borders[iam] + 1,
+ begin + borders[iam + 1],
+ *(begin + borders[iam]),
+ bin_op,
+ __gnu_parallel::sequential_tag()));
+ }
+
+# pragma omp barrier
+
+# pragma omp single
+ parallel_partial_sum_basecase(
+ sums + 1, sums + num_threads, sums + 1, bin_op, sums[0]);
+
+# pragma omp barrier
+
+ // Still same team.
+ parallel_partial_sum_basecase(begin + borders[iam + 1],
+ begin + borders[iam + 2],
+ result + borders[iam + 1], bin_op,
+ sums[iam]);
+ } //parallel
+
+ ::operator delete(sums);
+ delete[] borders;
+
+ return result + n;
+ }
+
+/** @brief Parallel partial sum front-end.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param result Begin iterator of output sequence.
+ * @param bin_op Associative binary function.
+ * @return End iterator of output sequence. */
+template<typename InputIterator,
+ typename OutputIterator,
+ typename BinaryOperation>
+ OutputIterator
+ parallel_partial_sum(InputIterator begin, InputIterator end,
+ OutputIterator result, BinaryOperation bin_op)
+ {
+ _GLIBCXX_CALL(begin - end)
+
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type n = end - begin;
+
+ switch (_Settings::get().partial_sum_algorithm)
+ {
+ case LINEAR:
+ // Need an initial offset.
+ return parallel_partial_sum_linear(begin, end, result, bin_op, n);
+ default:
+ // Partial_sum algorithm not implemented.
+ _GLIBCXX_PARALLEL_ASSERT(0);
+ return result + n;
+ }
+ }
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/partition.h b/libstdc++-v3/include/parallel/partition.h
new file mode 100644
index 00000000000..7747b7e9980
--- /dev/null
+++ b/libstdc++-v3/include/parallel/partition.h
@@ -0,0 +1,435 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/partition.h
+ * @brief Parallel implementation of std::partition(),
+ * std::nth_element(), and std::partial_sort().
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_PARTITION_H
+#define _GLIBCXX_PARALLEL_PARTITION_H 1
+
+#include <parallel/basic_iterator.h>
+#include <parallel/sort.h>
+#include <parallel/random_number.h>
+#include <bits/stl_algo.h>
+#include <parallel/parallel.h>
+
+/** @brief Decide whether to declare certain variables volatile. */
+#define _GLIBCXX_VOLATILE volatile
+
+namespace __gnu_parallel
+{
+/** @brief Parallel implementation of std::partition.
+ * @param begin Begin iterator of input sequence to split.
+ * @param end End iterator of input sequence to split.
+ * @param pred Partition predicate, possibly including some kind of pivot.
+ * @param num_threads Maximum number of threads to use for this task.
+ * @return Number of elements not fulfilling the predicate. */
+template<typename RandomAccessIterator, typename Predicate>
+ typename std::iterator_traits<RandomAccessIterator>::difference_type
+ parallel_partition(RandomAccessIterator begin, RandomAccessIterator end,
+ Predicate pred, thread_index_t num_threads)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type n = end - begin;
+
+ _GLIBCXX_CALL(n)
+
+ const _Settings& __s = _Settings::get();
+
+ // Shared.
+ _GLIBCXX_VOLATILE difference_type left = 0, right = n - 1;
+ _GLIBCXX_VOLATILE difference_type leftover_left, leftover_right;
+ _GLIBCXX_VOLATILE difference_type leftnew, rightnew;
+
+ bool* reserved_left = NULL, * reserved_right = NULL;
+
+ difference_type chunk_size;
+
+ omp_lock_t result_lock;
+ omp_init_lock(&result_lock);
+
+ //at least two chunks per thread
+ if(right - left + 1 >= 2 * num_threads * chunk_size)
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ reserved_left = new bool[num_threads];
+ reserved_right = new bool[num_threads];
+
+ if (__s.partition_chunk_share > 0.0)
+ chunk_size = std::max<difference_type>(__s.partition_chunk_size,
+ (double)n * __s.partition_chunk_share
+ / (double)num_threads);
+ else
+ chunk_size = __s.partition_chunk_size;
+ }
+
+ while (right - left + 1 >= 2 * num_threads * chunk_size)
+ {
+# pragma omp single
+ {
+ difference_type num_chunks = (right - left + 1) / chunk_size;
+
+ for (int r = 0; r < num_threads; ++r)
+ {
+ reserved_left[r] = false;
+ reserved_right[r] = false;
+ }
+ leftover_left = 0;
+ leftover_right = 0;
+ } //implicit barrier
+
+ // Private.
+ difference_type thread_left, thread_left_border,
+ thread_right, thread_right_border;
+ thread_left = left + 1;
+
+ // Just to satisfy the condition below.
+ thread_left_border = thread_left - 1;
+ thread_right = n - 1;
+ thread_right_border = thread_right + 1;
+
+ bool iam_finished = false;
+ while (!iam_finished)
+ {
+ if (thread_left > thread_left_border)
+ {
+ omp_set_lock(&result_lock);
+ if (left + (chunk_size - 1) > right)
+ iam_finished = true;
+ else
+ {
+ thread_left = left;
+ thread_left_border = left + (chunk_size - 1);
+ left += chunk_size;
+ }
+ omp_unset_lock(&result_lock);
+ }
+
+ if (thread_right < thread_right_border)
+ {
+ omp_set_lock(&result_lock);
+ if (left > right - (chunk_size - 1))
+ iam_finished = true;
+ else
+ {
+ thread_right = right;
+ thread_right_border = right - (chunk_size - 1);
+ right -= chunk_size;
+ }
+ omp_unset_lock(&result_lock);
+ }
+
+ if (iam_finished)
+ break;
+
+ // Swap as usual.
+ while (thread_left < thread_right)
+ {
+ while (pred(begin[thread_left])
+ && thread_left <= thread_left_border)
+ ++thread_left;
+ while (!pred(begin[thread_right])
+ && thread_right >= thread_right_border)
+ --thread_right;
+
+ if (thread_left > thread_left_border
+ || thread_right < thread_right_border)
+ // Fetch new chunk(s).
+ break;
+
+ std::swap(begin[thread_left], begin[thread_right]);
+ ++thread_left;
+ --thread_right;
+ }
+ }
+
+ // Now swap the leftover chunks to the right places.
+ if (thread_left <= thread_left_border)
+# pragma omp atomic
+ ++leftover_left;
+ if (thread_right >= thread_right_border)
+# pragma omp atomic
+ ++leftover_right;
+
+# pragma omp barrier
+
+# pragma omp single
+ {
+ leftnew = left - leftover_left * chunk_size;
+ rightnew = right + leftover_right * chunk_size;
+ }
+
+# pragma omp barrier
+
+ // <=> thread_left_border + (chunk_size - 1) >= leftnew
+ if (thread_left <= thread_left_border
+ && thread_left_border >= leftnew)
+ {
+ // Chunk already in place, reserve spot.
+ reserved_left[(left - (thread_left_border + 1)) / chunk_size]
+ = true;
+ }
+
+ // <=> thread_right_border - (chunk_size - 1) <= rightnew
+ if (thread_right >= thread_right_border
+ && thread_right_border <= rightnew)
+ {
+ // Chunk already in place, reserve spot.
+ reserved_right[((thread_right_border - 1) - right)
+ / chunk_size] = true;
+ }
+
+# pragma omp barrier
+
+ if (thread_left <= thread_left_border
+ && thread_left_border < leftnew)
+ {
+ // Find spot and swap.
+ difference_type swapstart = -1;
+ omp_set_lock(&result_lock);
+ for (int r = 0; r < leftover_left; ++r)
+ if (!reserved_left[r])
+ {
+ reserved_left[r] = true;
+ swapstart = left - (r + 1) * chunk_size;
+ break;
+ }
+ omp_unset_lock(&result_lock);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(swapstart != -1);
+#endif
+
+ std::swap_ranges(begin + thread_left_border
+ - (chunk_size - 1),
+ begin + thread_left_border + 1,
+ begin + swapstart);
+ }
+
+ if (thread_right >= thread_right_border
+ && thread_right_border > rightnew)
+ {
+ // Find spot and swap
+ difference_type swapstart = -1;
+ omp_set_lock(&result_lock);
+ for (int r = 0; r < leftover_right; ++r)
+ if (!reserved_right[r])
+ {
+ reserved_right[r] = true;
+ swapstart = right + r * chunk_size + 1;
+ break;
+ }
+ omp_unset_lock(&result_lock);
+
+#if _GLIBCXX_ASSERTIONS
+ _GLIBCXX_PARALLEL_ASSERT(swapstart != -1);
+#endif
+
+ std::swap_ranges(begin + thread_right_border,
+ begin + thread_right_border + chunk_size,
+ begin + swapstart);
+ }
+#if _GLIBCXX_ASSERTIONS
+# pragma omp barrier
+
+# pragma omp single
+ {
+ for (int r = 0; r < leftover_left; ++r)
+ _GLIBCXX_PARALLEL_ASSERT(reserved_left[r]);
+ for (int r = 0; r < leftover_right; ++r)
+ _GLIBCXX_PARALLEL_ASSERT(reserved_right[r]);
+ }
+
+# pragma omp barrier
+#endif
+
+# pragma omp barrier
+
+ left = leftnew;
+ right = rightnew;
+ }
+# pragma omp flush(left, right)
+ } // end "recursion" //parallel
+
+ difference_type final_left = left, final_right = right;
+
+ while (final_left < final_right)
+ {
+ // Go right until key is geq than pivot.
+ while (pred(begin[final_left]) && final_left < final_right)
+ ++final_left;
+
+ // Go left until key is less than pivot.
+ while (!pred(begin[final_right]) && final_left < final_right)
+ --final_right;
+
+ if (final_left == final_right)
+ break;
+ std::swap(begin[final_left], begin[final_right]);
+ ++final_left;
+ --final_right;
+ }
+
+ // All elements on the left side are < piv, all elements on the
+ // right are >= piv
+ delete[] reserved_left;
+ delete[] reserved_right;
+
+ omp_destroy_lock(&result_lock);
+
+ // Element "between" final_left and final_right might not have
+ // been regarded yet
+ if (final_left < n && !pred(begin[final_left]))
+ // Really swapped.
+ return final_left;
+ else
+ return final_left + 1;
+ }
+
+/**
+ * @brief Parallel implementation of std::nth_element().
+ * @param begin Begin iterator of input sequence.
+ * @param nth Iterator of element that must be in position afterwards.
+ * @param end End iterator of input sequence.
+ * @param comp Comparator.
+ */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_nth_element(RandomAccessIterator begin, RandomAccessIterator nth,
+ RandomAccessIterator end, Comparator comp)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ _GLIBCXX_CALL(end - begin)
+
+ RandomAccessIterator split;
+ random_number rng;
+
+ difference_type minimum_length =
+ std::max<difference_type>(2, _Settings::get().partition_minimal_n);
+
+ // Break if input range to small.
+ while (static_cast<sequence_index_t>(end - begin) >= minimum_length)
+ {
+ difference_type n = end - begin;
+
+ RandomAccessIterator pivot_pos = begin + rng(n);
+
+ // Swap pivot_pos value to end.
+ if (pivot_pos != (end - 1))
+ std::swap(*pivot_pos, *(end - 1));
+ pivot_pos = end - 1;
+
+ // XXX Comparator must have first_value_type, second_value_type,
+ // result_type
+ // Comparator == __gnu_parallel::lexicographic<S, int,
+ // __gnu_parallel::less<S, S> >
+ // pivot_pos == std::pair<S, int>*
+ // XXX binder2nd only for RandomAccessIterators??
+ __gnu_parallel::binder2nd<Comparator, value_type, value_type, bool>
+ pred(comp, *pivot_pos);
+
+ // Divide, leave pivot unchanged in last place.
+ RandomAccessIterator split_pos1, split_pos2;
+ split_pos1 = begin + parallel_partition(begin, end - 1, pred,
+ get_max_threads());
+
+ // Left side: < pivot_pos; right side: >= pivot_pos
+
+ // Swap pivot back to middle.
+ if (split_pos1 != pivot_pos)
+ std::swap(*split_pos1, *pivot_pos);
+ pivot_pos = split_pos1;
+
+ // In case all elements are equal, split_pos1 == 0
+ if ((split_pos1 + 1 - begin) < (n >> 7)
+ || (end - split_pos1) < (n >> 7))
+ {
+ // Very unequal split, one part smaller than one 128th
+ // elements not strictly larger than the pivot.
+ __gnu_parallel::unary_negate<__gnu_parallel::
+ binder1st<Comparator, value_type, value_type, bool>, value_type>
+ pred(__gnu_parallel::binder1st<Comparator, value_type,
+ value_type, bool>(comp, *pivot_pos));
+
+ // Find other end of pivot-equal range.
+ split_pos2 = __gnu_sequential::partition(split_pos1 + 1,
+ end, pred);
+ }
+ else
+ // Only skip the pivot.
+ split_pos2 = split_pos1 + 1;
+
+ // Compare iterators.
+ if (split_pos2 <= nth)
+ begin = split_pos2;
+ else if (nth < split_pos1)
+ end = split_pos1;
+ else
+ break;
+ }
+
+ // Only at most _Settings::partition_minimal_n elements left.
+ __gnu_sequential::sort(begin, end, comp);
+ }
+
+/** @brief Parallel implementation of std::partial_sort().
+* @param begin Begin iterator of input sequence.
+* @param middle Sort until this position.
+* @param end End iterator of input sequence.
+* @param comp Comparator. */
+template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_partial_sort(RandomAccessIterator begin,
+ RandomAccessIterator middle,
+ RandomAccessIterator end, Comparator comp)
+ {
+ parallel_nth_element(begin, middle, end, comp);
+ std::sort(begin, middle, comp);
+ }
+
+} //namespace __gnu_parallel
+
+#undef _GLIBCXX_VOLATILE
+
+#endif
diff --git a/libstdc++-v3/include/parallel/queue.h b/libstdc++-v3/include/parallel/queue.h
new file mode 100644
index 00000000000..27a26f3ecaa
--- /dev/null
+++ b/libstdc++-v3/include/parallel/queue.h
@@ -0,0 +1,155 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/queue.h
+ * @brief Lock-free double-ended queue.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_QUEUE_H
+#define _GLIBCXX_PARALLEL_QUEUE_H 1
+
+#include <parallel/types.h>
+#include <parallel/base.h>
+#include <parallel/compatibility.h>
+
+/** @brief Decide whether to declare certain variable volatile in this file. */
+#define _GLIBCXX_VOLATILE volatile
+
+namespace __gnu_parallel
+{
+ /**@brief Double-ended queue of bounded size, allowing lock-free
+ * atomic access. push_front() and pop_front() must not be called
+ * concurrently to each other, while pop_back() can be called
+ * concurrently at all times.
+ * @c empty(), @c size(), and @c top() are intentionally not provided.
+ * Calling them would not make sense in a concurrent setting.
+ * @param T Contained element type. */
+ template<typename T>
+ class RestrictedBoundedConcurrentQueue
+ {
+ private:
+ /** @brief Array of elements, seen as cyclic buffer. */
+ T* base;
+
+ /** @brief Maximal number of elements contained at the same time. */
+ sequence_index_t max_size;
+
+ /** @brief Cyclic begin and end pointers contained in one
+ atomically changeable value. */
+ _GLIBCXX_VOLATILE lcas_t borders;
+
+ public:
+ /** @brief Constructor. Not to be called concurrent, of course.
+ * @param max_size Maximal number of elements to be contained. */
+ RestrictedBoundedConcurrentQueue(sequence_index_t max_size)
+ {
+ this->max_size = max_size;
+ base = new T[max_size];
+ borders = encode2(0, 0);
+#pragma omp flush
+ }
+
+ /** @brief Destructor. Not to be called concurrent, of course. */
+ ~RestrictedBoundedConcurrentQueue()
+ { delete[] base; }
+
+ /** @brief Pushes one element into the queue at the front end.
+ * Must not be called concurrently with pop_front(). */
+ void
+ push_front(const T& t)
+ {
+ lcas_t former_borders = borders;
+ int former_front, former_back;
+ decode2(former_borders, former_front, former_back);
+ *(base + former_front % max_size) = t;
+#if _GLIBCXX_ASSERTIONS
+ // Otherwise: front - back > max_size eventually.
+ _GLIBCXX_PARALLEL_ASSERT(((former_front + 1) - former_back)
+ <= max_size);
+#endif
+ fetch_and_add(&borders, encode2(1, 0));
+ }
+
+ /** @brief Pops one element from the queue at the front end.
+ * Must not be called concurrently with pop_front(). */
+ bool
+ pop_front(T& t)
+ {
+ int former_front, former_back;
+#pragma omp flush
+ decode2(borders, former_front, former_back);
+ while (former_front > former_back)
+ {
+ // Chance.
+ lcas_t former_borders = encode2(former_front, former_back);
+ lcas_t new_borders = encode2(former_front - 1, former_back);
+ if (compare_and_swap(&borders, former_borders, new_borders))
+ {
+ t = *(base + (former_front - 1) % max_size);
+ return true;
+ }
+#pragma omp flush
+ decode2(borders, former_front, former_back);
+ }
+ return false;
+ }
+
+ /** @brief Pops one element from the queue at the front end.
+ * Must not be called concurrently with pop_front(). */
+ bool
+ pop_back(T& t) //queue behavior
+ {
+ int former_front, former_back;
+#pragma omp flush
+ decode2(borders, former_front, former_back);
+ while (former_front > former_back)
+ {
+ // Chance.
+ lcas_t former_borders = encode2(former_front, former_back);
+ lcas_t new_borders = encode2(former_front, former_back + 1);
+ if (compare_and_swap(&borders, former_borders, new_borders))
+ {
+ t = *(base + former_back % max_size);
+ return true;
+ }
+#pragma omp flush
+ decode2(borders, former_front, former_back);
+ }
+ return false;
+ }
+ };
+} //namespace __gnu_parallel
+
+#undef _GLIBCXX_VOLATILE
+
+#endif
diff --git a/libstdc++-v3/include/parallel/quicksort.h b/libstdc++-v3/include/parallel/quicksort.h
new file mode 100644
index 00000000000..de95549772a
--- /dev/null
+++ b/libstdc++-v3/include/parallel/quicksort.h
@@ -0,0 +1,190 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/quicksort.h
+ * @brief Implementation of a unbalanced parallel quicksort (in-place).
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_QUICKSORT_H
+#define _GLIBCXX_PARALLEL_QUICKSORT_H 1
+
+#include <parallel/parallel.h>
+#include <parallel/partition.h>
+
+namespace __gnu_parallel
+{
+ /** @brief Unbalanced quicksort divide step.
+ * @param begin Begin iterator of subsequence.
+ * @param end End iterator of subsequence.
+ * @param comp Comparator.
+ * @param pivot_rank Desired rank of the pivot.
+ * @param num_samples Choose pivot from that many samples.
+ * @param num_threads Number of threads that are allowed to work on
+ * this part.
+ */
+ template<typename RandomAccessIterator, typename Comparator>
+ typename std::iterator_traits<RandomAccessIterator>::difference_type
+ parallel_sort_qs_divide(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Comparator comp, typename std::iterator_traits
+ <RandomAccessIterator>::difference_type pivot_rank,
+ typename std::iterator_traits
+ <RandomAccessIterator>::difference_type
+ num_samples, thread_index_t num_threads)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type n = end - begin;
+ num_samples = std::min(num_samples, n);
+
+ // Allocate uninitialized, to avoid default constructor.
+ value_type* samples =
+ static_cast<value_type*>(::operator new(num_samples
+ * sizeof(value_type)));
+
+ for (difference_type s = 0; s < num_samples; ++s)
+ {
+ const unsigned long long index = static_cast<unsigned long long>(s)
+ * n / num_samples;
+ ::new(&(samples[s])) value_type(begin[index]);
+ }
+
+ __gnu_sequential::sort(samples, samples + num_samples, comp);
+
+ value_type& pivot = samples[pivot_rank * num_samples / n];
+
+ __gnu_parallel::binder2nd<Comparator, value_type, value_type, bool>
+ pred(comp, pivot);
+ difference_type split = parallel_partition(begin, end, pred, num_threads);
+
+ ::operator delete(samples);
+
+ return split;
+ }
+
+ /** @brief Unbalanced quicksort conquer step.
+ * @param begin Begin iterator of subsequence.
+ * @param end End iterator of subsequence.
+ * @param comp Comparator.
+ * @param num_threads Number of threads that are allowed to work on
+ * this part.
+ */
+ template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_sort_qs_conquer(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Comparator comp,
+ thread_index_t num_threads)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ if (num_threads <= 1)
+ {
+ __gnu_sequential::sort(begin, end, comp);
+ return;
+ }
+
+ difference_type n = end - begin, pivot_rank;
+
+ if (n <= 1)
+ return;
+
+ thread_index_t num_threads_left;
+
+ if ((num_threads % 2) == 1)
+ num_threads_left = num_threads / 2 + 1;
+ else
+ num_threads_left = num_threads / 2;
+
+ pivot_rank = n * num_threads_left / num_threads;
+
+ difference_type split =
+ parallel_sort_qs_divide(begin, end, comp, pivot_rank,
+ _Settings::get().sort_qs_num_samples_preset,
+ num_threads);
+
+#pragma omp parallel sections
+ {
+#pragma omp section
+ parallel_sort_qs_conquer(begin, begin + split,
+ comp, num_threads_left);
+#pragma omp section
+ parallel_sort_qs_conquer(begin + split, end,
+ comp, num_threads - num_threads_left);
+ }
+ }
+
+
+
+ /** @brief Unbalanced quicksort main call.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator input sequence, ignored.
+ * @param comp Comparator.
+ * @param n Length of input sequence.
+ * @param num_threads Number of threads that are allowed to work on
+ * this part.
+ */
+ template<typename RandomAccessIterator, typename Comparator>
+ void
+ parallel_sort_qs(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Comparator comp, typename std::iterator_traits
+ <RandomAccessIterator>::difference_type n,
+ int num_threads)
+ {
+ _GLIBCXX_CALL(n)
+
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ if (n == 0)
+ return;
+
+ // At least one element per processor.
+ if (num_threads > n)
+ num_threads = static_cast<thread_index_t>(n);
+
+ // Hard to avoid.
+ omp_set_num_threads(num_threads);
+
+ parallel_sort_qs_conquer(begin, begin + n, comp, num_threads);
+ }
+
+} //namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/random_number.h b/libstdc++-v3/include/parallel/random_number.h
new file mode 100644
index 00000000000..e1e11a8675c
--- /dev/null
+++ b/libstdc++-v3/include/parallel/random_number.h
@@ -0,0 +1,130 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/random_number.h
+ * @brief Random number generator based on the Mersenne twister.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_RANDOM_NUMBER_H
+#define _GLIBCXX_PARALLEL_RANDOM_NUMBER_H 1
+
+#include <parallel/types.h>
+#include <tr1/random>
+
+namespace __gnu_parallel
+{
+ /** @brief Random number generator, based on the Mersenne twister. */
+ class random_number
+ {
+ private:
+ std::tr1::mt19937 mt;
+ uint64 supremum;
+ uint64 RAND_SUP;
+ double supremum_reciprocal;
+ double RAND_SUP_REC;
+
+ // Assumed to be twice as long as the usual random number.
+ uint64 cache;
+
+ // Bit results.
+ int bits_left;
+
+ static uint32
+ scale_down(uint64 x,
+#if _GLIBCXX_SCALE_DOWN_FPU
+ uint64 /*supremum*/, double supremum_reciprocal)
+#else
+ uint64 supremum, double /*supremum_reciprocal*/)
+#endif
+ {
+#if _GLIBCXX_SCALE_DOWN_FPU
+ return uint32(x * supremum_reciprocal);
+#else
+ return static_cast<uint32>(x % supremum);
+#endif
+ }
+
+ public:
+ /** @brief Default constructor. Seed with 0. */
+ random_number()
+ : mt(0), supremum(0x100000000ULL),
+ RAND_SUP(1ULL << (sizeof(uint32) * 8)),
+ supremum_reciprocal(double(supremum) / double(RAND_SUP)),
+ RAND_SUP_REC(1.0 / double(RAND_SUP)),
+ cache(0), bits_left(0) { }
+
+ /** @brief Constructor.
+ * @param seed Random seed.
+ * @param supremum Generate integer random numbers in the
+ * interval @c [0,supremum). */
+ random_number(uint32 seed, uint64 supremum = 0x100000000ULL)
+ : mt(seed), supremum(supremum),
+ RAND_SUP(1ULL << (sizeof(uint32) * 8)),
+ supremum_reciprocal(double(supremum) / double(RAND_SUP)),
+ RAND_SUP_REC(1.0 / double(RAND_SUP)),
+ cache(0), bits_left(0) { }
+
+ /** @brief Generate unsigned random 32-bit integer. */
+ uint32
+ operator()()
+ { return scale_down(mt(), supremum, supremum_reciprocal); }
+
+ /** @brief Generate unsigned random 32-bit integer in the
+ interval @c [0,local_supremum). */
+ uint32
+ operator()(uint64 local_supremum)
+ {
+ return scale_down(mt(), local_supremum,
+ double(local_supremum * RAND_SUP_REC));
+ }
+
+ /** @brief Generate a number of random bits, run-time parameter.
+ * @param bits Number of bits to generate. */
+ unsigned long
+ genrand_bits(int bits)
+ {
+ unsigned long res = cache & ((1 << bits) - 1);
+ cache = cache >> bits;
+ bits_left -= bits;
+ if (bits_left < 32)
+ {
+ cache |= ((uint64(mt())) << bits_left);
+ bits_left += 32;
+ }
+ return res;
+ }
+};
+
+} // namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/random_shuffle.h b/libstdc++-v3/include/parallel/random_shuffle.h
new file mode 100644
index 00000000000..75d9e18d23a
--- /dev/null
+++ b/libstdc++-v3/include/parallel/random_shuffle.h
@@ -0,0 +1,521 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/random_shuffle.h
+ * @brief Parallel implementation of std::random_shuffle().
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_RANDOM_SHUFFLE_H
+#define _GLIBCXX_PARALLEL_RANDOM_SHUFFLE_H 1
+
+#include <limits>
+#include <bits/stl_numeric.h>
+#include <parallel/parallel.h>
+#include <parallel/random_number.h>
+
+namespace __gnu_parallel
+{
+/** @brief Type to hold the index of a bin.
+ *
+ * Since many variables of this type are allocated, it should be
+ * chosen as small as possible.
+ */
+typedef unsigned short bin_index;
+
+/** @brief Data known to every thread participating in
+ __gnu_parallel::parallel_random_shuffle(). */
+template<typename RandomAccessIterator>
+ struct DRandomShufflingGlobalData
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ /** @brief Begin iterator of the source. */
+ RandomAccessIterator& source;
+
+ /** @brief Temporary arrays for each thread. */
+ value_type** temporaries;
+
+ /** @brief Two-dimensional array to hold the thread-bin distribution.
+ *
+ * Dimensions (num_threads + 1) x (num_bins + 1). */
+ difference_type** dist;
+
+ /** @brief Start indexes of the threads' chunks. */
+ difference_type* starts;
+
+ /** @brief Number of the thread that will further process the
+ corresponding bin. */
+ thread_index_t* bin_proc;
+
+ /** @brief Number of bins to distribute to. */
+ int num_bins;
+
+ /** @brief Number of bits needed to address the bins. */
+ int num_bits;
+
+ /** @brief Constructor. */
+ DRandomShufflingGlobalData(RandomAccessIterator& _source)
+ : source(_source) { }
+ };
+
+/** @brief Local data for a thread participating in
+ __gnu_parallel::parallel_random_shuffle().
+ */
+template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ struct DRSSorterPU
+ {
+ /** @brief Number of threads participating in total. */
+ int num_threads;
+
+ /** @brief Begin index for bins taken care of by this thread. */
+ bin_index bins_begin;
+
+ /** @brief End index for bins taken care of by this thread. */
+ bin_index bins_end;
+
+ /** @brief Random seed for this thread. */
+ uint32 seed;
+
+ /** @brief Pointer to global data. */
+ DRandomShufflingGlobalData<RandomAccessIterator>* sd;
+ };
+
+/** @brief Generate a random number in @c [0,2^logp).
+ * @param logp Logarithm (basis 2) of the upper range bound.
+ * @param rng Random number generator to use.
+ */
+template<typename RandomNumberGenerator>
+ inline int
+ random_number_pow2(int logp, RandomNumberGenerator& rng)
+ { return rng.genrand_bits(logp); }
+
+/** @brief Random shuffle code executed by each thread.
+ * @param pus Array of thread-local data records. */
+template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ void
+ parallel_random_shuffle_drs_pu(DRSSorterPU<RandomAccessIterator,
+ RandomNumberGenerator>* pus)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ thread_index_t iam = omp_get_thread_num();
+ DRSSorterPU<RandomAccessIterator, RandomNumberGenerator>* d = &pus[iam];
+ DRandomShufflingGlobalData<RandomAccessIterator>* sd = d->sd;
+
+ // Indexing: dist[bin][processor]
+ difference_type length = sd->starts[iam + 1] - sd->starts[iam];
+ bin_index* oracles = new bin_index[length];
+ difference_type* dist = new difference_type[sd->num_bins + 1];
+ bin_index* bin_proc = new bin_index[sd->num_bins];
+ value_type** temporaries = new value_type*[d->num_threads];
+
+ // Compute oracles and count appearances.
+ for (bin_index b = 0; b < sd->num_bins + 1; ++b)
+ dist[b] = 0;
+ int num_bits = sd->num_bits;
+
+ random_number rng(d->seed);
+
+ // First main loop.
+ for (difference_type i = 0; i < length; ++i)
+ {
+ bin_index oracle = random_number_pow2(num_bits, rng);
+ oracles[i] = oracle;
+
+ // To allow prefix (partial) sum.
+ ++(dist[oracle + 1]);
+ }
+
+ for (bin_index b = 0; b < sd->num_bins + 1; ++b)
+ sd->dist[b][iam + 1] = dist[b];
+
+# pragma omp barrier
+
+# pragma omp single
+ {
+ // Sum up bins, sd->dist[s + 1][d->num_threads] now contains the
+ // total number of items in bin s
+ for (bin_index s = 0; s < sd->num_bins; ++s)
+ __gnu_sequential::partial_sum(sd->dist[s + 1],
+ sd->dist[s + 1] + d->num_threads + 1,
+ sd->dist[s + 1]);
+ }
+
+# pragma omp barrier
+
+ sequence_index_t offset = 0, global_offset = 0;
+ for (bin_index s = 0; s < d->bins_begin; ++s)
+ global_offset += sd->dist[s + 1][d->num_threads];
+
+# pragma omp barrier
+
+ for (bin_index s = d->bins_begin; s < d->bins_end; ++s)
+ {
+ for (int t = 0; t < d->num_threads + 1; ++t)
+ sd->dist[s + 1][t] += offset;
+ offset = sd->dist[s + 1][d->num_threads];
+ }
+
+ sd->temporaries[iam] = static_cast<value_type*>(
+ ::operator new(sizeof(value_type) * offset));
+
+# pragma omp barrier
+
+ // Draw local copies to avoid false sharing.
+ for (bin_index b = 0; b < sd->num_bins + 1; ++b)
+ dist[b] = sd->dist[b][iam];
+ for (bin_index b = 0; b < sd->num_bins; ++b)
+ bin_proc[b] = sd->bin_proc[b];
+ for (thread_index_t t = 0; t < d->num_threads; ++t)
+ temporaries[t] = sd->temporaries[t];
+
+ RandomAccessIterator source = sd->source;
+ difference_type start = sd->starts[iam];
+
+ // Distribute according to oracles, second main loop.
+ for (difference_type i = 0; i < length; ++i)
+ {
+ bin_index target_bin = oracles[i];
+ thread_index_t target_p = bin_proc[target_bin];
+
+ // Last column [d->num_threads] stays unchanged.
+ ::new(&(temporaries[target_p][dist[target_bin + 1]++]))
+ value_type(*(source + i + start));
+ }
+
+ delete[] oracles;
+ delete[] dist;
+ delete[] bin_proc;
+ delete[] temporaries;
+
+# pragma omp barrier
+
+ // Shuffle bins internally.
+ for (bin_index b = d->bins_begin; b < d->bins_end; ++b)
+ {
+ value_type* begin =
+ sd->temporaries[iam] +
+ ((b == d->bins_begin) ? 0 : sd->dist[b][d->num_threads]),
+ * end =
+ sd->temporaries[iam] + sd->dist[b + 1][d->num_threads];
+ sequential_random_shuffle(begin, end, rng);
+ std::copy(begin, end, sd->source + global_offset +
+ ((b == d->bins_begin) ? 0 : sd->dist[b][d->num_threads]));
+ }
+
+ ::operator delete(sd->temporaries[iam]);
+ }
+
+/** @brief Round up to the next greater power of 2.
+ * @param x Integer to round up */
+template<typename T>
+ T
+ round_up_to_pow2(T x)
+ {
+ if (x <= 1)
+ return 1;
+ else
+ return (T)1 << (log2(x - 1) + 1);
+ }
+
+/** @brief Main parallel random shuffle step.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param n Length of sequence.
+ * @param num_threads Number of threads to use.
+ * @param rng Random number generator to use.
+ */
+template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ void
+ parallel_random_shuffle_drs(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ typename std::iterator_traits
+ <RandomAccessIterator>::difference_type n,
+ thread_index_t num_threads,
+ RandomNumberGenerator& rng)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ _GLIBCXX_CALL(n)
+
+ const _Settings& __s = _Settings::get();
+
+ if (num_threads > n)
+ num_threads = static_cast<thread_index_t>(n);
+
+ bin_index num_bins, num_bins_cache;
+
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
+ // Try the L1 cache first.
+
+ // Must fit into L1.
+ num_bins_cache = std::max<difference_type>(
+ 1, n / (__s.L1_cache_size_lb / sizeof(value_type)));
+ num_bins_cache = round_up_to_pow2(num_bins_cache);
+
+ // No more buckets than TLB entries, power of 2
+ // Power of 2 and at least one element per bin, at most the TLB size.
+ num_bins = std::min<difference_type>(n, num_bins_cache);
+
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
+ // 2 TLB entries needed per bin.
+ num_bins = std::min<difference_type>(__s.TLB_size / 2, num_bins);
+#endif
+ num_bins = round_up_to_pow2(num_bins);
+
+ if (num_bins < num_bins_cache)
+ {
+#endif
+ // Now try the L2 cache
+ // Must fit into L2
+ num_bins_cache = static_cast<bin_index>(std::max<difference_type>(
+ 1, n / (__s.L2_cache_size / sizeof(value_type))));
+ num_bins_cache = round_up_to_pow2(num_bins_cache);
+
+ // No more buckets than TLB entries, power of 2.
+ num_bins = static_cast<bin_index>(
+ std::min(n, static_cast<difference_type>(num_bins_cache)));
+ // Power of 2 and at least one element per bin, at most the TLB size.
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
+ // 2 TLB entries needed per bin.
+ num_bins = std::min(
+ static_cast<difference_type>(__s.TLB_size / 2), num_bins);
+#endif
+ num_bins = round_up_to_pow2(num_bins);
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
+ }
+#endif
+
+ num_threads = std::min<bin_index>(num_threads, num_bins);
+
+ if (num_threads <= 1)
+ return sequential_random_shuffle(begin, end, rng);
+
+ DRandomShufflingGlobalData<RandomAccessIterator> sd(begin);
+ DRSSorterPU<RandomAccessIterator, random_number >* pus;
+ difference_type* starts;
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ pus = new DRSSorterPU<RandomAccessIterator, random_number>
+ [num_threads];
+
+ sd.temporaries = new value_type*[num_threads];
+ sd.dist = new difference_type*[num_bins + 1];
+ sd.bin_proc = new thread_index_t[num_bins];
+ for (bin_index b = 0; b < num_bins + 1; ++b)
+ sd.dist[b] = new difference_type[num_threads + 1];
+ for (bin_index b = 0; b < (num_bins + 1); ++b)
+ {
+ sd.dist[0][0] = 0;
+ sd.dist[b][0] = 0;
+ }
+ starts = sd.starts = new difference_type[num_threads + 1];
+ int bin_cursor = 0;
+ sd.num_bins = num_bins;
+ sd.num_bits = log2(num_bins);
+
+ difference_type chunk_length = n / num_threads,
+ split = n % num_threads, start = 0;
+ difference_type bin_chunk_length = num_bins / num_threads,
+ bin_split = num_bins % num_threads;
+ for (thread_index_t i = 0; i < num_threads; ++i)
+ {
+ starts[i] = start;
+ start += (i < split) ? (chunk_length + 1) : chunk_length;
+ int j = pus[i].bins_begin = bin_cursor;
+
+ // Range of bins for this processor.
+ bin_cursor += (i < bin_split) ?
+ (bin_chunk_length + 1) : bin_chunk_length;
+ pus[i].bins_end = bin_cursor;
+ for (; j < bin_cursor; ++j)
+ sd.bin_proc[j] = i;
+ pus[i].num_threads = num_threads;
+ pus[i].seed = rng(std::numeric_limits<uint32>::max());
+ pus[i].sd = &sd;
+ }
+ starts[num_threads] = start;
+ } //single
+ // Now shuffle in parallel.
+ parallel_random_shuffle_drs_pu(pus);
+ }
+
+ delete[] starts;
+ delete[] sd.bin_proc;
+ for (int s = 0; s < (num_bins + 1); ++s)
+ delete[] sd.dist[s];
+ delete[] sd.dist;
+ delete[] sd.temporaries;
+
+ delete[] pus;
+ }
+
+/** @brief Sequential cache-efficient random shuffle.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param rng Random number generator to use.
+ */
+template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ void
+ sequential_random_shuffle(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ RandomNumberGenerator& rng)
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type n = end - begin;
+ const _Settings& __s = _Settings::get();
+
+ bin_index num_bins, num_bins_cache;
+
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
+ // Try the L1 cache first, must fit into L1.
+ num_bins_cache =
+ std::max<difference_type>
+ (1, n / (__s.L1_cache_size_lb / sizeof(value_type)));
+ num_bins_cache = round_up_to_pow2(num_bins_cache);
+
+ // No more buckets than TLB entries, power of 2
+ // Power of 2 and at least one element per bin, at most the TLB size
+ num_bins = std::min(n, (difference_type)num_bins_cache);
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
+ // 2 TLB entries needed per bin
+ num_bins = std::min((difference_type)__s.TLB_size / 2, num_bins);
+#endif
+ num_bins = round_up_to_pow2(num_bins);
+
+ if (num_bins < num_bins_cache)
+ {
+#endif
+ // Now try the L2 cache, must fit into L2.
+ num_bins_cache =
+ static_cast<bin_index>(std::max<difference_type>(
+ 1, n / (__s.L2_cache_size / sizeof(value_type))));
+ num_bins_cache = round_up_to_pow2(num_bins_cache);
+
+ // No more buckets than TLB entries, power of 2
+ // Power of 2 and at least one element per bin, at most the TLB size.
+ num_bins = static_cast<bin_index>
+ (std::min(n, static_cast<difference_type>(num_bins_cache)));
+
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
+ // 2 TLB entries needed per bin
+ num_bins =
+ std::min<difference_type>(__s.TLB_size / 2, num_bins);
+#endif
+ num_bins = round_up_to_pow2(num_bins);
+#if _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
+ }
+#endif
+
+ int num_bits = log2(num_bins);
+
+ if (num_bins > 1)
+ {
+ value_type* target = static_cast<value_type*>(
+ ::operator new(sizeof(value_type) * n));
+ bin_index* oracles = new bin_index[n];
+ difference_type* dist0 = new difference_type[num_bins + 1],
+ * dist1 = new difference_type[num_bins + 1];
+
+ for (int b = 0; b < num_bins + 1; ++b)
+ dist0[b] = 0;
+
+ random_number bitrng(rng(0xFFFFFFFF));
+
+ for (difference_type i = 0; i < n; ++i)
+ {
+ bin_index oracle = random_number_pow2(num_bits, bitrng);
+ oracles[i] = oracle;
+
+ // To allow prefix (partial) sum.
+ ++(dist0[oracle + 1]);
+ }
+
+ // Sum up bins.
+ __gnu_sequential::partial_sum(dist0, dist0 + num_bins + 1, dist0);
+
+ for (int b = 0; b < num_bins + 1; ++b)
+ dist1[b] = dist0[b];
+
+ // Distribute according to oracles.
+ for (difference_type i = 0; i < n; ++i)
+ ::new(&(target[(dist0[oracles[i]])++])) value_type(*(begin + i));
+
+ for (int b = 0; b < num_bins; ++b)
+ {
+ sequential_random_shuffle(target + dist1[b],
+ target + dist1[b + 1],
+ rng);
+ }
+
+ delete[] dist0;
+ delete[] dist1;
+ delete[] oracles;
+ ::operator delete(target);
+ }
+ else
+ __gnu_sequential::random_shuffle(begin, end, rng);
+ }
+
+/** @brief Parallel random public call.
+ * @param begin Begin iterator of sequence.
+ * @param end End iterator of sequence.
+ * @param rng Random number generator to use.
+ */
+template<typename RandomAccessIterator, typename RandomNumberGenerator>
+ inline void
+ parallel_random_shuffle(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ RandomNumberGenerator rng = random_number())
+ {
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ difference_type n = end - begin;
+ parallel_random_shuffle_drs(begin, end, n, get_max_threads(), rng) ;
+ }
+
+}
+
+#endif
diff --git a/libstdc++-v3/include/parallel/search.h b/libstdc++-v3/include/parallel/search.h
new file mode 100644
index 00000000000..86bd2b827b9
--- /dev/null
+++ b/libstdc++-v3/include/parallel/search.h
@@ -0,0 +1,178 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/search.h
+ * @brief Parallel implementation base for std::search() and
+ * std::search_n().
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_SEARCH_H
+#define _GLIBCXX_PARALLEL_SEARCH_H 1
+
+#include <bits/stl_algobase.h>
+
+#include <parallel/parallel.h>
+#include <parallel/equally_split.h>
+
+
+namespace __gnu_parallel
+{
+ /**
+ * @brief Precalculate advances for Knuth-Morris-Pratt algorithm.
+ * @param elements Begin iterator of sequence to search for.
+ * @param length Length of sequence to search for.
+ * @param advances Returned offsets.
+ */
+template<typename RandomAccessIterator, typename _DifferenceTp>
+ void
+ calc_borders(RandomAccessIterator elements, _DifferenceTp length,
+ _DifferenceTp* off)
+ {
+ typedef _DifferenceTp difference_type;
+
+ off[0] = -1;
+ if (length > 1)
+ off[1] = 0;
+ difference_type k = 0;
+ for (difference_type j = 2; j <= length; j++)
+ {
+ while ((k >= 0) && !(elements[k] == elements[j-1]))
+ k = off[k];
+ off[j] = ++k;
+ }
+ }
+
+ // Generic parallel find algorithm (requires random access iterator).
+
+ /** @brief Parallel std::search.
+ * @param begin1 Begin iterator of first sequence.
+ * @param end1 End iterator of first sequence.
+ * @param begin2 Begin iterator of second sequence.
+ * @param end2 End iterator of second sequence.
+ * @param pred Find predicate.
+ * @return Place of finding in first sequences. */
+template<typename _RandomAccessIterator1,
+ typename _RandomAccessIterator2,
+ typename Pred>
+ _RandomAccessIterator1
+ search_template(_RandomAccessIterator1 begin1, _RandomAccessIterator1 end1,
+ _RandomAccessIterator2 begin2, _RandomAccessIterator2 end2,
+ Pred pred)
+ {
+ typedef std::iterator_traits<_RandomAccessIterator1> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ _GLIBCXX_CALL((end1 - begin1) + (end2 - begin2));
+
+ difference_type pattern_length = end2 - begin2;
+
+ // Pattern too short.
+ if(pattern_length <= 0)
+ return end1;
+
+ // Last point to start search.
+ difference_type input_length = (end1 - begin1) - pattern_length;
+
+ // Where is first occurrence of pattern? defaults to end.
+ difference_type result = (end1 - begin1);
+ difference_type *splitters;
+
+ // Pattern too long.
+ if (input_length < 0)
+ return end1;
+
+ omp_lock_t result_lock;
+ omp_init_lock(&result_lock);
+
+ thread_index_t num_threads =
+ std::max<difference_type>(1,
+ std::min<difference_type>(input_length, get_max_threads()));
+
+ difference_type advances[pattern_length];
+ calc_borders(begin2, pattern_length, advances);
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ splitters = new difference_type[num_threads + 1];
+ equally_split(input_length, num_threads, splitters);
+ }
+
+ thread_index_t iam = omp_get_thread_num();
+
+ difference_type start = splitters[iam], stop = splitters[iam + 1];
+
+ difference_type pos_in_pattern = 0;
+ bool found_pattern = false;
+
+ while (start <= stop && !found_pattern)
+ {
+ // Get new value of result.
+ #pragma omp flush(result)
+ // No chance for this thread to find first occurrence.
+ if (result < start)
+ break;
+ while (pred(begin1[start + pos_in_pattern],
+ begin2[pos_in_pattern]))
+ {
+ ++pos_in_pattern;
+ if (pos_in_pattern == pattern_length)
+ {
+ // Found new candidate for result.
+ omp_set_lock(&result_lock);
+ result = std::min(result, start);
+ omp_unset_lock(&result_lock);
+
+ found_pattern = true;
+ break;
+ }
+ }
+ // Make safe jump.
+ start += (pos_in_pattern - advances[pos_in_pattern]);
+ pos_in_pattern =
+ (advances[pos_in_pattern] < 0) ? 0 : advances[pos_in_pattern];
+ }
+ } //parallel
+
+ omp_destroy_lock(&result_lock);
+
+ delete[] splitters;
+
+ // Return iterator on found element.
+ return (begin1 + result);
+ }
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/parallel/set_operations.h b/libstdc++-v3/include/parallel/set_operations.h
new file mode 100644
index 00000000000..50c28d48d66
--- /dev/null
+++ b/libstdc++-v3/include/parallel/set_operations.h
@@ -0,0 +1,544 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/set_operations.h
+ * @brief Parallel implementations of set operations for random-access
+ * iterators.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Marius Elvert and Felix Bondarenko.
+
+#ifndef _GLIBCXX_PARALLEL_SET_OPERATIONS_H
+#define _GLIBCXX_PARALLEL_SET_OPERATIONS_H 1
+
+#include <omp.h>
+
+#include <parallel/settings.h>
+#include <parallel/multiseq_selection.h>
+
+namespace __gnu_parallel
+{
+template<typename InputIterator, typename OutputIterator>
+ OutputIterator
+ copy_tail(std::pair<InputIterator, InputIterator> b,
+ std::pair<InputIterator, InputIterator> e, OutputIterator r)
+ {
+ if (b.first != e.first)
+ {
+ do
+ {
+ *r++ = *b.first++;
+ }
+ while (b.first != e.first);
+ }
+ else
+ {
+ while (b.second != e.second)
+ *r++ = *b.second++;
+ }
+ return r;
+ }
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ struct symmetric_difference_func
+ {
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename std::pair<InputIterator, InputIterator> iterator_pair;
+
+ symmetric_difference_func(Comparator c) : comp(c) {}
+
+ Comparator comp;
+
+ OutputIterator
+ invoke(InputIterator a, InputIterator b,
+ InputIterator c, InputIterator d,
+ OutputIterator r) const
+ {
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ {
+ *r = *a;
+ ++a;
+ ++r;
+ }
+ else if (comp(*c, *a))
+ {
+ *r = *c;
+ ++c;
+ ++r;
+ }
+ else
+ {
+ ++a;
+ ++c;
+ }
+ }
+ return std::copy(c, d, std::copy(a, b, r));
+ }
+
+ difference_type
+ count(InputIterator a, InputIterator b,
+ InputIterator c, InputIterator d) const
+ {
+ difference_type counter = 0;
+
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ {
+ ++a;
+ ++counter;
+ }
+ else if (comp(*c, *a))
+ {
+ ++c;
+ ++counter;
+ }
+ else
+ {
+ ++a;
+ ++c;
+ }
+ }
+
+ return counter + (b - a) + (d - c);
+ }
+
+ OutputIterator
+ first_empty(InputIterator c, InputIterator d, OutputIterator out) const
+ { return std::copy(c, d, out); }
+
+ OutputIterator
+ second_empty(InputIterator a, InputIterator b, OutputIterator out) const
+ { return std::copy(a, b, out); }
+ };
+
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ struct difference_func
+ {
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename std::pair<InputIterator, InputIterator> iterator_pair;
+
+ difference_func(Comparator c) : comp(c) {}
+
+ Comparator comp;
+
+ OutputIterator
+ invoke(InputIterator a, InputIterator b, InputIterator c, InputIterator d,
+ OutputIterator r) const
+ {
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ {
+ *r = *a;
+ ++a;
+ ++r;
+ }
+ else if (comp(*c, *a))
+ { ++c; }
+ else
+ {
+ ++a;
+ ++c;
+ }
+ }
+ return std::copy(a, b, r);
+ }
+
+ difference_type
+ count(InputIterator a, InputIterator b,
+ InputIterator c, InputIterator d) const
+ {
+ difference_type counter = 0;
+
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ {
+ ++a;
+ ++counter;
+ }
+ else if (comp(*c, *a))
+ { ++c; }
+ else
+ { ++a; ++c; }
+ }
+
+ return counter + (b - a);
+ }
+
+ inline OutputIterator
+ first_empty(InputIterator c, InputIterator d, OutputIterator out) const
+ { return out; }
+
+ inline OutputIterator
+ second_empty(InputIterator a, InputIterator b, OutputIterator out) const
+ { return std::copy(a, b, out); }
+ };
+
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ struct intersection_func
+ {
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename std::pair<InputIterator, InputIterator> iterator_pair;
+
+ intersection_func(Comparator c) : comp(c) {}
+
+ Comparator comp;
+
+ OutputIterator
+ invoke(InputIterator a, InputIterator b, InputIterator c, InputIterator d,
+ OutputIterator r) const
+ {
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ { ++a; }
+ else if (comp(*c, *a))
+ { ++c; }
+ else
+ {
+ *r = *a;
+ ++a;
+ ++c;
+ ++r;
+ }
+ }
+
+ return r;
+ }
+
+ difference_type
+ count(InputIterator a, InputIterator b,
+ InputIterator c, InputIterator d) const
+ {
+ difference_type counter = 0;
+
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ { ++a; }
+ else if (comp(*c, *a))
+ { ++c; }
+ else
+ {
+ ++a;
+ ++c;
+ ++counter;
+ }
+ }
+
+ return counter;
+ }
+
+ inline OutputIterator
+ first_empty(InputIterator c, InputIterator d, OutputIterator out) const
+ { return out; }
+
+ inline OutputIterator
+ second_empty(InputIterator a, InputIterator b, OutputIterator out) const
+ { return out; }
+ };
+
+template<class InputIterator, class OutputIterator, class Comparator>
+ struct union_func
+ {
+ typedef typename std::iterator_traits<InputIterator>::difference_type
+ difference_type;
+
+ union_func(Comparator c) : comp(c) {}
+
+ Comparator comp;
+
+ OutputIterator
+ invoke(InputIterator a, const InputIterator b, InputIterator c,
+ const InputIterator d, OutputIterator r) const
+ {
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ {
+ *r = *a;
+ ++a;
+ }
+ else if (comp(*c, *a))
+ {
+ *r = *c;
+ ++c;
+ }
+ else
+ {
+ *r = *a;
+ ++a;
+ ++c;
+ }
+ ++r;
+ }
+ return std::copy(c, d, std::copy(a, b, r));
+ }
+
+ difference_type
+ count(InputIterator a, InputIterator b,
+ InputIterator c, InputIterator d) const
+ {
+ difference_type counter = 0;
+
+ while (a != b && c != d)
+ {
+ if (comp(*a, *c))
+ { ++a; }
+ else if (comp(*c, *a))
+ { ++c; }
+ else
+ {
+ ++a;
+ ++c;
+ }
+ ++counter;
+ }
+
+ counter += (b - a);
+ counter += (d - c);
+ return counter;
+ }
+
+ inline OutputIterator
+ first_empty(InputIterator c, InputIterator d, OutputIterator out) const
+ { return std::copy(c, d, out); }
+
+ inline OutputIterator
+ second_empty(InputIterator a, InputIterator b, OutputIterator out) const
+ { return std::copy(a, b, out); }
+ };
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Operation>
+ OutputIterator
+ parallel_set_operation(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result, Operation op)
+ {
+ _GLIBCXX_CALL((end1 - begin1) + (end2 - begin2))
+
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+ typedef typename std::pair<InputIterator, InputIterator> iterator_pair;
+
+ if (begin1 == end1)
+ return op.first_empty(begin2, end2, result);
+
+ if (begin2 == end2)
+ return op.second_empty(begin1, end1, result);
+
+ const difference_type size = (end1 - begin1) + (end2 - begin2);
+
+ const iterator_pair sequence[ 2 ] =
+ { std::make_pair(begin1, end1), std::make_pair(begin2, end2) } ;
+ OutputIterator return_value = result;
+ difference_type *borders;
+ iterator_pair *block_begins;
+ difference_type* lengths;
+
+ thread_index_t num_threads =
+ std::min<difference_type>(get_max_threads(),
+ std::min(end1 - begin1, end2 - begin2));
+
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+
+ borders = new difference_type[num_threads + 2];
+ equally_split(size, num_threads + 1, borders);
+ block_begins = new iterator_pair[num_threads + 1];
+ // Very start.
+ block_begins[0] = std::make_pair(begin1, begin2);
+ lengths = new difference_type[num_threads];
+ } //single
+
+ thread_index_t iam = omp_get_thread_num();
+
+ // Result from multiseq_partition.
+ InputIterator offset[2];
+ const difference_type rank = borders[iam + 1];
+
+ multiseq_partition(sequence, sequence + 2, rank, offset, op.comp);
+
+ // allowed to read?
+ // together
+ // *(offset[ 0 ] - 1) == *offset[ 1 ]
+ if (offset[ 0 ] != begin1 && offset[ 1 ] != end2
+ && !op.comp(*(offset[ 0 ] - 1), *offset[ 1 ])
+ && !op.comp(*offset[ 1 ], *(offset[ 0 ] - 1)))
+ {
+ // Avoid split between globally equal elements: move one to
+ // front in first sequence.
+ --offset[ 0 ];
+ }
+
+ iterator_pair block_end = block_begins[ iam + 1 ] =
+ iterator_pair(offset[ 0 ], offset[ 1 ]);
+
+ // Make sure all threads have their block_begin result written out.
+# pragma omp barrier
+
+ iterator_pair block_begin = block_begins[ iam ];
+
+ // Begin working for the first block, while the others except
+ // the last start to count.
+ if (iam == 0)
+ {
+ // The first thread can copy already.
+ lengths[ iam ] = op.invoke(block_begin.first, block_end.first,
+ block_begin.second, block_end.second,
+ result)
+ - result;
+ }
+ else
+ {
+ lengths[ iam ] = op.count(block_begin.first, block_end.first,
+ block_begin.second, block_end.second);
+ }
+
+ // Make sure everyone wrote their lengths.
+# pragma omp barrier
+
+ OutputIterator r = result;
+
+ if (iam == 0)
+ {
+ // Do the last block.
+ for (int i = 0; i < num_threads; ++i)
+ r += lengths[i];
+
+ block_begin = block_begins[num_threads];
+
+ // Return the result iterator of the last block.
+ return_value = op.invoke(
+ block_begin.first, end1, block_begin.second, end2, r);
+
+ }
+ else
+ {
+ for (int i = 0; i < iam; ++i)
+ r += lengths[ i ];
+
+ // Reset begins for copy pass.
+ op.invoke(block_begin.first, block_end.first,
+ block_begin.second, block_end.second, r);
+ }
+ }
+ return return_value;
+ }
+
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ inline OutputIterator
+ parallel_set_union(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result, Comparator comp)
+ {
+ return parallel_set_operation(begin1, end1, begin2, end2, result,
+ union_func< InputIterator, OutputIterator, Comparator>(comp));
+ }
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ inline OutputIterator
+ parallel_set_intersection(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result, Comparator comp)
+ {
+ return parallel_set_operation(begin1, end1, begin2, end2, result,
+ intersection_func<InputIterator, OutputIterator, Comparator>(comp));
+ }
+
+
+template<typename InputIterator, typename OutputIterator>
+ inline OutputIterator
+ set_intersection(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result)
+ {
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+
+ return set_intersection(begin1, end1, begin2, end2, result,
+ std::less<value_type>());
+ }
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ inline OutputIterator
+ parallel_set_difference(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result, Comparator comp)
+ {
+ return parallel_set_operation(begin1, end1, begin2, end2, result,
+ difference_func<InputIterator, OutputIterator, Comparator>(comp));
+ }
+
+template<typename InputIterator,
+ typename OutputIterator,
+ typename Comparator>
+ inline OutputIterator
+ parallel_set_symmetric_difference(InputIterator begin1, InputIterator end1,
+ InputIterator begin2, InputIterator end2,
+ OutputIterator result, Comparator comp)
+ {
+ return parallel_set_operation(begin1, end1, begin2, end2, result,
+ symmetric_difference_func<InputIterator, OutputIterator, Comparator>
+ (comp));
+ }
+
+}
+
+#endif // _GLIBCXX_SET_ALGORITHM_
diff --git a/libstdc++-v3/include/parallel/settings.h b/libstdc++-v3/include/parallel/settings.h
new file mode 100644
index 00000000000..ae1ae5ca063
--- /dev/null
+++ b/libstdc++-v3/include/parallel/settings.h
@@ -0,0 +1,287 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/settings.h
+ * @brief Runtime settings and tuning parameters, heuristics to decide
+ * whether to use parallelized algorithms.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ *
+ * @section parallelization_decision
+ * The decision whether to run an algorithm in parallel.
+ *
+ * There are several ways the user can switch on and off the parallel
+ * execution of an algorithm, both at compile- and run-time.
+ *
+ * Only sequential execution can be forced at compile-time. This
+ * reduces code size and protects code parts that have
+ * non-thread-safe side effects.
+ *
+ * Ultimately, forcing parallel execution at compile-time makes
+ * sense. Often, the sequential algorithm implementation is used as
+ * a subroutine, so no reduction in code size can be achieved. Also,
+ * the machine the program is run on might have only one processor
+ * core, so to avoid overhead, the algorithm is executed
+ * sequentially.
+ *
+ * To force sequential execution of an algorithm ultimately at
+ * compile-time, the user must add the tag
+ * __gnu_parallel::sequential_tag() to the end of the parameter list,
+ * e. g.
+ *
+ * \code
+ * std::sort(v.begin(), v.end(), __gnu_parallel::sequential_tag());
+ * \endcode
+ *
+ * This is compatible with all overloaded algorithm variants. No
+ * additional code will be instantiated, at all. The same holds for
+ * most algorithm calls with iterators not providing random access.
+ *
+ * If the algorithm call is not forced to be executed sequentially
+ * at compile-time, the decision is made at run-time.
+ * The global variable __gnu_parallel::_Settings::algorithm_strategy
+ * is checked. It is a tristate variable corresponding to:
+ *
+ * a. force_sequential, meaning the sequential algorithm is executed.
+ * b. force_parallel, meaning the parallel algorithm is executed.
+ * c. heuristic
+ *
+ * For heuristic, the parallel algorithm implementation is called
+ * only if the input size is sufficiently large. For most
+ * algorithms, the input size is the (combined) length of the input
+ * sequence(s). The threshold can be set by the user, individually
+ * for each algorithm. The according variables are called
+ * __gnu_parallel::_Settings::[algorithm]_minimal_n .
+ *
+ * For some of the algorithms, there are even more tuning options,
+ * e. g. the ability to choose from multiple algorithm variants. See
+ * below for details.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_SETTINGS_H
+#define _GLIBCXX_PARALLEL_SETTINGS_H 1
+
+#include <parallel/types.h>
+
+/**
+ * @brief Determine at compile(?)-time if the parallel variant of an
+ * algorithm should be called.
+ * @param c A condition that is convertible to bool that is overruled by
+ * __gnu_parallel::_Settings::algorithm_strategy. Usually a decision
+ * based on the input size.
+ */
+#define _GLIBCXX_PARALLEL_CONDITION(c) (__gnu_parallel::_Settings::get().algorithm_strategy != __gnu_parallel::force_sequential && ((__gnu_parallel::get_max_threads() > 1 && (c)) || __gnu_parallel::_Settings::get().algorithm_strategy == __gnu_parallel::force_parallel))
+
+/*
+inline bool
+parallel_condition(bool c)
+{
+ bool ret = false;
+ const _Settings& s = _Settings::get();
+ if (s.algorithm_strategy != force_seqential)
+ {
+ if (s.algorithm_strategy == force_parallel)
+ ret = true;
+ else
+ ret = get_max_threads() > 1 && c;
+ }
+ return ret;
+}
+*/
+
+namespace __gnu_parallel
+{
+ /// class _Settings
+ /// Run-time settings for the parallel mode, including all tunable parameters.
+ struct _Settings
+ {
+ _AlgorithmStrategy algorithm_strategy;
+
+ _SortAlgorithm sort_algorithm;
+ _PartialSumAlgorithm partial_sum_algorithm;
+ _MultiwayMergeAlgorithm multiway_merge_algorithm;
+ _FindAlgorithm find_algorithm;
+
+ _SplittingAlgorithm sort_splitting;
+ _SplittingAlgorithm merge_splitting;
+ _SplittingAlgorithm multiway_merge_splitting;
+
+ // Per-algorithm settings.
+
+ /// Minimal input size for accumulate.
+ sequence_index_t accumulate_minimal_n;
+
+ /// Minimal input size for adjacent_difference.
+ unsigned int adjacent_difference_minimal_n;
+
+ /// Minimal input size for count and count_if.
+ sequence_index_t count_minimal_n;
+
+ /// Minimal input size for fill.
+ sequence_index_t fill_minimal_n;
+
+ /// Block size increase factor for find.
+ double find_increasing_factor;
+
+ /// Initial block size for find.
+ sequence_index_t find_initial_block_size;
+
+ /// Maximal block size for find.
+ sequence_index_t find_maximum_block_size;
+
+ /// Start with looking for this many elements sequentially, for find.
+ sequence_index_t find_sequential_search_size;
+
+ /// Minimal input size for for_each.
+ sequence_index_t for_each_minimal_n;
+
+ /// Minimal input size for generate.
+ sequence_index_t generate_minimal_n;
+
+ /// Minimal input size for max_element.
+ sequence_index_t max_element_minimal_n;
+
+ /// Minimal input size for merge.
+ sequence_index_t merge_minimal_n;
+
+ /// Oversampling factor for merge.
+ unsigned int merge_oversampling;
+
+ /// Minimal input size for min_element.
+ sequence_index_t min_element_minimal_n;
+
+ /// Minimal input size for multiway_merge.
+ sequence_index_t multiway_merge_minimal_n;
+
+ /// Oversampling factor for multiway_merge.
+ int multiway_merge_minimal_k;
+
+ /// Oversampling factor for multiway_merge.
+ unsigned int multiway_merge_oversampling;
+
+ /// Minimal input size for nth_element.
+ sequence_index_t nth_element_minimal_n;
+
+ /// Chunk size for partition.
+ sequence_index_t partition_chunk_size;
+
+ /// Chunk size for partition, relative to input size. If > 0.0,
+ /// this value overrides partition_chunk_size.
+ double partition_chunk_share;
+
+ /// Minimal input size for partition.
+ sequence_index_t partition_minimal_n;
+
+ /// Minimal input size for partial_sort.
+ sequence_index_t partial_sort_minimal_n;
+
+ /// Ratio for partial_sum. Assume "sum and write result" to be
+ /// this factor slower than just "sum".
+ float partial_sum_dilation;
+
+ /// Minimal input size for partial_sum.
+ unsigned int partial_sum_minimal_n;
+
+ /// Minimal input size for random_shuffle.
+ unsigned int random_shuffle_minimal_n;
+
+ /// Minimal input size for replace and replace_if.
+ sequence_index_t replace_minimal_n;
+
+ /// Minimal input size for set_difference.
+ sequence_index_t set_difference_minimal_n;
+
+ /// Minimal input size for set_intersection.
+ sequence_index_t set_intersection_minimal_n;
+
+ /// Minimal input size for set_symmetric_difference.
+ sequence_index_t set_symmetric_difference_minimal_n;
+
+ /// Minimal input size for set_union.
+ sequence_index_t set_union_minimal_n;
+
+ /// Minimal input size for parallel sorting.
+ sequence_index_t sort_minimal_n;
+
+ /// Oversampling factor for parallel std::sort (MWMS).
+ unsigned int sort_mwms_oversampling;
+
+ /// Such many samples to take to find a good pivot (quicksort).
+ unsigned int sort_qs_num_samples_preset;
+
+ /// Maximal subsequence length to switch to unbalanced base case.
+ /// Applies to std::sort with dynamically load-balanced quicksort.
+ sequence_index_t sort_qsb_base_case_maximal_n;
+
+ /// Minimal input size for parallel std::transform.
+ sequence_index_t transform_minimal_n;
+
+ /// Minimal input size for unique_copy.
+ sequence_index_t unique_copy_minimal_n;
+
+ sequence_index_t workstealing_chunk_size;
+
+ // Hardware dependent tuning parameters.
+
+ /// Size of the L1 cache in bytes (underestimation).
+ unsigned long long L1_cache_size;
+
+ /// Size of the L2 cache in bytes (underestimation).
+ unsigned long long L2_cache_size;
+
+ /// Size of the Translation Lookaside Buffer (underestimation).
+ unsigned int TLB_size;
+
+ /// Overestimation of cache line size. Used to avoid false
+ /// sharing, i. e. elements of different threads are at least this
+ /// amount apart.
+ unsigned int cache_line_size;
+
+ // Statistics.
+
+ /// The number of stolen ranges in load-balanced quicksort.
+ sequence_index_t qsb_steals;
+
+ /// Get the global settings.
+ static const _Settings&
+ get() throw();
+
+ /// Set the global settings.
+ static void
+ set(_Settings&) throw();
+
+ explicit
+ _Settings() : algorithm_strategy(heuristic), sort_algorithm(MWMS), partial_sum_algorithm(LINEAR), multiway_merge_algorithm(LOSER_TREE), find_algorithm(CONSTANT_SIZE_BLOCKS), sort_splitting(EXACT), merge_splitting(EXACT), multiway_merge_splitting(EXACT), accumulate_minimal_n(1000), adjacent_difference_minimal_n(1000), count_minimal_n(1000), fill_minimal_n(1000), find_increasing_factor(2.0), find_initial_block_size(256), find_maximum_block_size(8192), find_sequential_search_size(256), for_each_minimal_n(1000), generate_minimal_n(1000), max_element_minimal_n(1000), merge_minimal_n(1000), merge_oversampling(10), min_element_minimal_n(1000), multiway_merge_minimal_n(1000), multiway_merge_minimal_k(2), multiway_merge_oversampling(10), nth_element_minimal_n(1000), partition_chunk_size(1000), partition_chunk_share(0.0), partition_minimal_n(1000), partial_sort_minimal_n(1000), partial_sum_dilation(1.0f), partial_sum_minimal_n(1000), random_shuffle_minimal_n(1000), replace_minimal_n(1000), set_difference_minimal_n(1000), set_intersection_minimal_n(1000), set_symmetric_difference_minimal_n(1000), set_union_minimal_n(1000), sort_minimal_n(1000), sort_mwms_oversampling(10), sort_qs_num_samples_preset(100), sort_qsb_base_case_maximal_n(100), transform_minimal_n(1000), unique_copy_minimal_n(10000), workstealing_chunk_size(100), L1_cache_size(16 << 10), L2_cache_size(256 << 10), TLB_size(128), cache_line_size(64), qsb_steals(0)
+ { }
+ };
+}
+
+#endif /* _GLIBCXX_SETTINGS_H */
diff --git a/libstdc++-v3/include/parallel/sort.h b/libstdc++-v3/include/parallel/sort.h
new file mode 100644
index 00000000000..edf4eea02d8
--- /dev/null
+++ b/libstdc++-v3/include/parallel/sort.h
@@ -0,0 +1,104 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/sort.h
+ * @brief Parallel sorting algorithm switch.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler.
+
+#ifndef _GLIBCXX_PARALLEL_SORT_H
+#define _GLIBCXX_PARALLEL_SORT_H 1
+
+#include <parallel/basic_iterator.h>
+#include <parallel/features.h>
+#include <parallel/parallel.h>
+
+#if _GLIBCXX_ASSERTIONS
+#include <parallel/checkers.h>
+#endif
+
+#if _GLIBCXX_MERGESORT
+#include <parallel/multiway_mergesort.h>
+#endif
+
+#if _GLIBCXX_QUICKSORT
+#include <parallel/quicksort.h>
+#endif
+
+#if _GLIBCXX_BAL_QUICKSORT
+#include <parallel/balanced_quicksort.h>
+#endif
+
+namespace __gnu_parallel
+{
+ /**
+ * @brief Choose a parallel sorting algorithm.
+ * @param begin Begin iterator of input sequence.
+ * @param end End iterator of input sequence.
+ * @param comp Comparator.
+ * @param stable Sort stable.
+ * @callgraph
+ */
+ template<typename RandomAccessIterator, typename Comparator>
+ inline void
+ parallel_sort(RandomAccessIterator begin, RandomAccessIterator end,
+ Comparator comp, bool stable)
+ {
+ _GLIBCXX_CALL(end - begin)
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ if (begin != end)
+ {
+ difference_type n = end - begin;
+
+ if (false) ;
+#if _GLIBCXX_MERGESORT
+ else if (stable || _Settings::get().sort_algorithm == MWMS)
+ parallel_sort_mwms(begin, end, comp, n, get_max_threads(), stable);
+#endif
+#if _GLIBCXX_QUICKSORT
+ else if (!stable && _Settings::get().sort_algorithm == QS)
+ parallel_sort_qs(begin, end, comp, n, get_max_threads());
+#endif
+#if _GLIBCXX_BAL_QUICKSORT
+ else if (!stable && _Settings::get().sort_algorithm == QS_BALANCED)
+ parallel_sort_qsb(begin, end, comp, n, get_max_threads());
+#endif
+ else
+ __gnu_sequential::sort(begin, end, comp);
+ }
+ }
+} // end namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/tags.h b/libstdc++-v3/include/parallel/tags.h
new file mode 100644
index 00000000000..b3f2ec86912
--- /dev/null
+++ b/libstdc++-v3/include/parallel/tags.h
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 2, or (at your option) any later
+// version.
+
+// This library is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 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 parallel/tags.h
+ * @brief Tags for compile-time selection.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_TAGS_H
+#define _GLIBCXX_PARALLEL_TAGS_H 1
+
+namespace __gnu_parallel
+{
+ /** @brief Forces sequential execution at compile time. */
+ struct sequential_tag { };
+
+ /** @brief Recommends parallel execution at compile time. */
+ struct parallel_tag { };
+
+ /** @brief Recommends parallel execution using dynamic
+ load-balancing at compile time. */
+ struct balanced_tag : public parallel_tag { };
+
+ /** @brief Recommends parallel execution using static
+ load-balancing at compile time. */
+ struct unbalanced_tag : public parallel_tag { };
+
+ /** @brief Recommends parallel execution using OpenMP dynamic
+ load-balancing at compile time. */
+ struct omp_loop_tag : public parallel_tag { };
+
+ /** @brief Recommends parallel execution using OpenMP static
+ load-balancing at compile time. */
+ struct omp_loop_static_tag : public parallel_tag { };
+
+
+ struct find_tag { };
+
+ /** @brief Selects the growing block size variant for std::find().
+ @see _GLIBCXX_FIND_GROWING_BLOCKS */
+ struct growing_blocks_tag : public find_tag { };
+
+ /** @brief Selects the constant block size variant for std::find().
+ @see _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS */
+ struct constant_size_blocks_tag : public find_tag { };
+
+ /** @brief Selects the equal splitting variant for std::find().
+ @see _GLIBCXX_FIND_EQUAL_SPLIT */
+ struct equal_split_tag : public find_tag { };
+}
+
+#endif /* _GLIBCXX_PARALLEL_TAGS_H */
diff --git a/libstdc++-v3/include/parallel/types.h b/libstdc++-v3/include/parallel/types.h
new file mode 100644
index 00000000000..ded617edb6d
--- /dev/null
+++ b/libstdc++-v3/include/parallel/types.h
@@ -0,0 +1,166 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/types.h
+ * @brief Basic types and typedefs.
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Johannes Singler and Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_TYPES_H
+#define _GLIBCXX_PARALLEL_TYPES_H 1
+
+#include <cstdlib>
+
+namespace __gnu_parallel
+{
+ // Enumerated types.
+
+ /// Run-time equivalents for the compile-time tags.
+ enum _Parallelism
+ {
+ /// Not parallel.
+ sequential,
+
+ /// Parallel unbalanced (equal-sized chunks).
+ parallel_unbalanced,
+
+ /// Parallel balanced (work-stealing).
+ parallel_balanced,
+
+ /// Parallel with OpenMP dynamic load-balancing.
+ parallel_omp_loop,
+
+ /// Parallel with OpenMP static load-balancing.
+ parallel_omp_loop_static,
+
+ /// Parallel with OpenMP taskqueue construct.
+ parallel_taskqueue
+ };
+
+ /// Strategies for run-time algorithm selection:
+ // force_sequential, force_parallel, heuristic.
+ enum _AlgorithmStrategy
+ {
+ heuristic,
+ force_sequential,
+ force_parallel
+ };
+
+ /// Sorting algorithms:
+ // multi-way mergesort, quicksort, load-balanced quicksort.
+ enum _SortAlgorithm
+ {
+ MWMS,
+ QS,
+ QS_BALANCED
+ };
+
+ /// Merging algorithms:
+ // bubblesort-alike, loser-tree variants, enum sentinel.
+ enum _MultiwayMergeAlgorithm
+ {
+ BUBBLE,
+ LOSER_TREE_EXPLICIT,
+ LOSER_TREE,
+ LOSER_TREE_COMBINED,
+ LOSER_TREE_SENTINEL,
+ ENUM_SENTINEL
+ };
+
+ /// Partial sum algorithms: recursive, linear.
+ enum _PartialSumAlgorithm
+ {
+ RECURSIVE,
+ LINEAR
+ };
+
+ /// Sorting/merging algorithms: sampling, exact.
+ enum _SplittingAlgorithm
+ {
+ SAMPLING,
+ EXACT
+ };
+
+ /// Find algorithms:
+ // growing blocks, equal-sized blocks, equal splitting.
+ enum _FindAlgorithm
+ {
+ GROWING_BLOCKS,
+ CONSTANT_SIZE_BLOCKS,
+ EQUAL_SPLIT
+ };
+
+ /// Integer Types.
+ // XXX need to use <cstdint>
+ /** @brief 16-bit signed integer. */
+ typedef short int16;
+
+ /** @brief 16-bit unsigned integer. */
+ typedef unsigned short uint16;
+
+ /** @brief 32-bit signed integer. */
+ typedef int int32;
+
+ /** @brief 32-bit unsigned integer. */
+ typedef unsigned int uint32;
+
+ /** @brief 64-bit signed integer. */
+ typedef long long int64;
+
+ /** @brief 64-bit unsigned integer. */
+ typedef unsigned long long uint64;
+
+ /**
+ * @brief Unsigned integer to index elements.
+ * The total number of elements for each algorithm must fit into this type.
+ */
+ typedef uint64 sequence_index_t;
+
+ /**
+ * @brief Unsigned integer to index a thread number.
+ * The maximum thread number (for each processor) must fit into this type.
+ */
+ typedef uint16 thread_index_t;
+
+ // XXX atomics interface?
+ /// Longest compare-and-swappable integer type on this platform.
+ typedef int64 lcas_t;
+
+ // XXX numeric_limits::digits?
+ /// Number of bits of ::lcas_t.
+ static const int lcas_t_bits = sizeof(lcas_t) * 8;
+
+ /// ::lcas_t with the right half of bits set to 1.
+ static const lcas_t lcas_t_mask = ((lcas_t(1) << (lcas_t_bits / 2)) - 1);
+}
+
+#endif /* _GLIBCXX_TYPES_H */
diff --git a/libstdc++-v3/include/parallel/unique_copy.h b/libstdc++-v3/include/parallel/unique_copy.h
new file mode 100644
index 00000000000..7f51e2603fd
--- /dev/null
+++ b/libstdc++-v3/include/parallel/unique_copy.h
@@ -0,0 +1,198 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/unique_copy.h
+ * @brief Parallel implementations of std::unique_copy().
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Robert Geisberger and Robin Dapp.
+
+#ifndef _GLIBCXX_PARALLEL_UNIQUE_H
+#define _GLIBCXX_PARALLEL_UNIQUE_H 1
+
+#include <parallel/parallel.h>
+#include <parallel/multiseq_selection.h>
+
+namespace __gnu_parallel
+{
+
+/** @brief Parallel std::unique_copy(), w/o explicit equality predicate.
+ * @param first Begin iterator of input sequence.
+ * @param last End iterator of input sequence.
+ * @param result Begin iterator of result sequence.
+ * @param binary_pred Equality predicate.
+ * @return End iterator of result sequence. */
+template<typename InputIterator,
+ class OutputIterator,
+ class BinaryPredicate>
+ OutputIterator
+ parallel_unique_copy(InputIterator first, InputIterator last,
+ OutputIterator result, BinaryPredicate binary_pred)
+ {
+ _GLIBCXX_CALL(last - first)
+
+ typedef std::iterator_traits<InputIterator> traits_type;
+ typedef typename traits_type::value_type value_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ difference_type size = last - first;
+
+ if (size == 0)
+ return result;
+
+ // Let the first thread process two parts.
+ difference_type *counter;
+ difference_type *borders;
+
+ thread_index_t num_threads = get_max_threads();
+ // First part contains at least one element.
+# pragma omp parallel num_threads(num_threads)
+ {
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+ borders = new difference_type[num_threads + 2];
+ equally_split(size, num_threads + 1, borders);
+ counter = new difference_type[num_threads + 1];
+ }
+
+ thread_index_t iam = omp_get_thread_num();
+
+ difference_type begin, end;
+
+ // Check for length without duplicates
+ // Needed for position in output
+ difference_type i = 0;
+ OutputIterator out = result;
+
+ if (iam == 0)
+ {
+ begin = borders[0] + 1; // == 1
+ end = borders[iam + 1];
+
+ ++i;
+ *out++ = *first;
+
+ for (InputIterator iter = first + begin; iter < first + end; ++iter)
+ {
+ if (!binary_pred(*iter, *(iter-1)))
+ {
+ ++i;
+ *out++ = *iter;
+ }
+ }
+ }
+ else
+ {
+ begin = borders[iam]; //one part
+ end = borders[iam + 1];
+
+ for (InputIterator iter = first + begin; iter < first + end; ++iter)
+ {
+ if (!binary_pred(*iter, *(iter - 1)))
+ ++i;
+ }
+ }
+ counter[iam] = i;
+
+ // Last part still untouched.
+ difference_type begin_output;
+
+# pragma omp barrier
+
+ // Store result in output on calculated positions.
+ begin_output = 0;
+
+ if (iam == 0)
+ {
+ for (int t = 0; t < num_threads; ++t)
+ begin_output += counter[t];
+
+ i = 0;
+
+ OutputIterator iter_out = result + begin_output;
+
+ begin = borders[num_threads];
+ end = size;
+
+ for (InputIterator iter = first + begin; iter < first + end; ++iter)
+ {
+ if (iter == first || !binary_pred(*iter, *(iter - 1)))
+ {
+ ++i;
+ *iter_out++ = *iter;
+ }
+ }
+
+ counter[num_threads] = i;
+ }
+ else
+ {
+ for (int t = 0; t < iam; t++)
+ begin_output += counter[t];
+
+ OutputIterator iter_out = result + begin_output;
+ for (InputIterator iter = first + begin; iter < first + end; ++iter)
+ {
+ if (!binary_pred(*iter, *(iter-1)))
+ *iter_out++ = *iter;
+ }
+ }
+ }
+
+ difference_type end_output = 0;
+ for (int t = 0; t < num_threads + 1; t++)
+ end_output += counter[t];
+
+ delete[] borders;
+
+ return result + end_output;
+ }
+
+/** @brief Parallel std::unique_copy(), without explicit equality predicate
+ * @param first Begin iterator of input sequence.
+ * @param last End iterator of input sequence.
+ * @param result Begin iterator of result sequence.
+ * @return End iterator of result sequence. */
+template<typename InputIterator, class OutputIterator>
+ inline OutputIterator
+ parallel_unique_copy(InputIterator first, InputIterator last,
+ OutputIterator result)
+ {
+ typedef typename std::iterator_traits<InputIterator>::value_type
+ value_type;
+ return parallel_unique_copy(first, last, result,
+ std::equal_to<value_type>());
+ }
+
+}//namespace __gnu_parallel
+
+#endif
diff --git a/libstdc++-v3/include/parallel/workstealing.h b/libstdc++-v3/include/parallel/workstealing.h
new file mode 100644
index 00000000000..628f12cca2c
--- /dev/null
+++ b/libstdc++-v3/include/parallel/workstealing.h
@@ -0,0 +1,312 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2008 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 parallel/workstealing.h
+ * @brief Parallelization of embarrassingly parallel execution by
+ * means of work-stealing.
+ *
+ * Work stealing is described in
+ *
+ * R. D. Blumofe and C. E. Leiserson.
+ * Scheduling multithreaded computations by work stealing.
+ * Journal of the ACM, 46(5):720–748, 1999.
+ *
+ * This file is a GNU parallel extension to the Standard C++ Library.
+ */
+
+// Written by Felix Putze.
+
+#ifndef _GLIBCXX_PARALLEL_WORKSTEALING_H
+#define _GLIBCXX_PARALLEL_WORKSTEALING_H 1
+
+#include <parallel/parallel.h>
+#include <parallel/random_number.h>
+#include <parallel/compatibility.h>
+
+namespace __gnu_parallel
+{
+
+#define _GLIBCXX_JOB_VOLATILE volatile
+
+/** @brief One job for a certain thread. */
+template<typename _DifferenceTp>
+ struct Job
+ {
+ typedef _DifferenceTp difference_type;
+
+ /** @brief First element.
+ *
+ * Changed by owning and stealing thread. By stealing thread,
+ * always incremented. */
+ _GLIBCXX_JOB_VOLATILE difference_type first;
+
+ /** @brief Last element.
+ *
+ * Changed by owning thread only. */
+ _GLIBCXX_JOB_VOLATILE difference_type last;
+
+ /** @brief Number of elements, i. e. @c last-first+1.
+ *
+ * Changed by owning thread only. */
+ _GLIBCXX_JOB_VOLATILE difference_type load;
+ };
+
+/** @brief Work stealing algorithm for random access iterators.
+ *
+ * Uses O(1) additional memory. Synchronization at job lists is
+ * done with atomic operations.
+ * @param begin Begin iterator of element sequence.
+ * @param end End iterator of element sequence.
+ * @param op User-supplied functor (comparator, predicate, adding
+ * functor, ...).
+ * @param f Functor to "process" an element with op (depends on
+ * desired functionality, e. g. for std::for_each(), ...).
+ * @param r Functor to "add" a single result to the already
+ * processed elements (depends on functionality).
+ * @param base Base value for reduction.
+ * @param output Pointer to position where final result is written to
+ * @param bound Maximum number of elements processed (e. g. for
+ * std::count_n()).
+ * @return User-supplied functor (that may contain a part of the result).
+ */
+template<typename RandomAccessIterator,
+ typename Op,
+ typename Fu,
+ typename Red,
+ typename Result>
+ Op
+ for_each_template_random_access_workstealing(RandomAccessIterator begin,
+ RandomAccessIterator end,
+ Op op, Fu& f, Red r,
+ Result base, Result& output,
+ typename std::iterator_traits
+ <RandomAccessIterator>::
+ difference_type bound)
+ {
+ _GLIBCXX_CALL(end - begin)
+
+ typedef std::iterator_traits<RandomAccessIterator> traits_type;
+ typedef typename traits_type::difference_type difference_type;
+
+ const _Settings& __s = _Settings::get();
+
+ difference_type chunk_size = static_cast<difference_type>(__s.workstealing_chunk_size);
+
+ // How many jobs?
+ difference_type length = (bound < 0) ? (end - begin) : bound;
+
+ // To avoid false sharing in a cache line.
+ const int stride = __s.cache_line_size * 10 / sizeof(Job<difference_type>) + 1;
+
+ // Total number of threads currently working.
+ thread_index_t busy = 0;
+
+ Job<difference_type> *job;
+
+ omp_lock_t output_lock;
+ omp_init_lock(&output_lock);
+
+ // Write base value to output.
+ output = base;
+
+ // No more threads than jobs, at least one thread.
+ thread_index_t num_threads =
+ __gnu_parallel::max<thread_index_t>(1,
+ __gnu_parallel::min<difference_type>(length, get_max_threads()));
+
+# pragma omp parallel shared(busy) num_threads(num_threads)
+ {
+
+# pragma omp single
+ {
+ num_threads = omp_get_num_threads();
+
+ // Create job description array.
+ job = new Job<difference_type>[num_threads * stride];
+ }
+
+ // Initialization phase.
+
+ // Flags for every thread if it is doing productive work.
+ bool iam_working = false;
+
+ // Thread id.
+ thread_index_t iam = omp_get_thread_num();
+
+ // This job.
+ Job<difference_type>& my_job = job[iam * stride];
+
+ // Random number (for work stealing).
+ thread_index_t victim;
+
+ // Local value for reduction.
+ Result result = Result();
+
+ // Number of elements to steal in one attempt.
+ difference_type steal;
+
+ // Every thread has its own random number generator
+ // (modulo num_threads).
+ random_number rand_gen(iam, num_threads);
+
+ // This thread is currently working.
+# pragma omp atomic
+ ++busy;
+
+ iam_working = true;
+
+ // How many jobs per thread? last thread gets the rest.
+ my_job.first =
+ static_cast<difference_type>(iam * (length / num_threads));
+
+ my_job.last = (iam == (num_threads - 1)) ?
+ (length - 1) : ((iam + 1) * (length / num_threads) - 1);
+ my_job.load = my_job.last - my_job.first + 1;
+
+ // Init result with first value (to have a base value for reduction).
+ if (my_job.first <= my_job.last)
+ {
+ // Cannot use volatile variable directly.
+ difference_type my_first = my_job.first;
+ result = f(op, begin + my_first);
+ ++my_job.first;
+ --my_job.load;
+ }
+
+ RandomAccessIterator current;
+
+# pragma omp barrier
+
+ // Actual work phase
+ // Work on own or stolen start
+ while (busy > 0)
+ {
+ // Work until no productive thread left.
+# pragma omp flush(busy)
+
+ // Thread has own work to do
+ while (my_job.first <= my_job.last)
+ {
+ // fetch-and-add call
+ // Reserve current job block (size chunk_size) in my queue.
+ difference_type current_job =
+ fetch_and_add<difference_type>(&(my_job.first), chunk_size);
+
+ // Update load, to make the three values consistent,
+ // first might have been changed in the meantime
+ my_job.load = my_job.last - my_job.first + 1;
+ for (difference_type job_counter = 0;
+ job_counter < chunk_size && current_job <= my_job.last;
+ ++job_counter)
+ {
+ // Yes: process it!
+ current = begin + current_job;
+ ++current_job;
+
+ // Do actual work.
+ result = r(result, f(op, current));
+ }
+
+# pragma omp flush(busy)
+ }
+
+ // After reaching this point, a thread's job list is empty.
+ if (iam_working)
+ {
+ // This thread no longer has work.
+# pragma omp atomic
+ --busy;
+
+ iam_working = false;
+ }
+
+ difference_type supposed_first, supposed_last, supposed_load;
+ do
+ {
+ // Find random nonempty deque (not own), do consistency check.
+ yield();
+# pragma omp flush(busy)
+ victim = rand_gen();
+ supposed_first = job[victim * stride].first;
+ supposed_last = job[victim * stride].last;
+ supposed_load = job[victim * stride].load;
+ }
+ while (busy > 0
+ && ((supposed_load <= 0)
+ || ((supposed_first + supposed_load - 1) != supposed_last)));
+
+ if (busy == 0)
+ break;
+
+ if (supposed_load > 0)
+ {
+ // Has work and work to do.
+ // Number of elements to steal (at least one).
+ steal = (supposed_load < 2) ? 1 : supposed_load / 2;
+
+ // Push victim's start forward.
+ difference_type stolen_first =
+ fetch_and_add<difference_type>(
+ &(job[victim * stride].first), steal);
+ difference_type stolen_try =
+ stolen_first + steal - difference_type(1);
+
+ my_job.first = stolen_first;
+ my_job.last = __gnu_parallel::min(stolen_try, supposed_last);
+ my_job.load = my_job.last - my_job.first + 1;
+
+ // Has potential work again.
+# pragma omp atomic
+ ++busy;
+ iam_working = true;
+
+# pragma omp flush(busy)
+ }
+# pragma omp flush(busy)
+ } // end while busy > 0
+ // Add accumulated result to output.
+ omp_set_lock(&output_lock);
+ output = r(output, result);
+ omp_unset_lock(&output_lock);
+ }
+
+ delete[] job;
+
+ // Points to last element processed (needed as return value for
+ // some algorithms like transform)
+ f.finish_iterator = begin + length;
+
+ omp_destroy_lock(&output_lock);
+
+ return op;
+ }
+} // end namespace
+
+#endif
diff --git a/libstdc++-v3/include/precompiled/extc++.h b/libstdc++-v3/include/precompiled/extc++.h
index 7e8ef025cd6..8d0b3de90b7 100644
--- a/libstdc++-v3/include/precompiled/extc++.h
+++ b/libstdc++-v3/include/precompiled/extc++.h
@@ -40,8 +40,6 @@
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
#include <ext/functional>
-#include <ext/hash_map>
-#include <ext/hash_set>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
#include <ext/memory>
diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h
index df9c2177d88..7e7c2682ea1 100644
--- a/libstdc++-v3/include/precompiled/stdc++.h
+++ b/libstdc++-v3/include/precompiled/stdc++.h
@@ -1,6 +1,6 @@
// C++ includes used for precompiling -*- C++ -*-
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -51,6 +51,17 @@
#include <cstring>
#include <ctime>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
// C++
#include <algorithm>
#include <bitset>
@@ -84,3 +95,14 @@
#include <utility>
#include <valarray>
#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <random>
+#include <regex>
+#include <system_error>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/libstdc++-v3/include/std/algorithm b/libstdc++-v3/include/std/algorithm
index 8f88cc0378c..9c61f2854fb 100644
--- a/libstdc++-v3/include/std/algorithm
+++ b/libstdc++-v3/include/std/algorithm
@@ -66,4 +66,8 @@
#include <bits/stl_algobase.h>
#include <bits/stl_algo.h>
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algorithm>
+#endif
+
#endif /* _GLIBCXX_ALGORITHM */
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
index 9ead05915dc..02631627182 100644
--- a/libstdc++-v3/include/std/bitset
+++ b/libstdc++-v3/include/std/bitset
@@ -1,6 +1,6 @@
// <bitset> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -62,15 +62,13 @@
((__n) < 1 ? 0 : ((__n) + _GLIBCXX_BITSET_BITS_PER_WORD - 1) \
/ _GLIBCXX_BITSET_BITS_PER_WORD)
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
/**
- * @if maint
- * Base class, general case. It is a class inveriant that _Nw will be
+ * Base class, general case. It is a class invariant that _Nw will be
* nonnegative.
*
* See documentation for bitset.
- * @endif
*/
template<size_t _Nw>
struct _Base_bitset
@@ -170,21 +168,27 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_is_equal(const _Base_bitset<_Nw>& __x) const
{
for (size_t __i = 0; __i < _Nw; ++__i)
- {
- if (_M_w[__i] != __x._M_w[__i])
- return false;
- }
+ if (_M_w[__i] != __x._M_w[__i])
+ return false;
return true;
}
+ size_t
+ _M_are_all_aux() const
+ {
+ for (size_t __i = 0; __i < _Nw - 1; __i++)
+ if (_M_w[__i] != ~static_cast<_WordT>(0))
+ return 0;
+ return ((_Nw - 1) * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_popcountl(_M_hiword()));
+ }
+
bool
_M_is_any() const
{
for (size_t __i = 0; __i < _Nw; __i++)
- {
- if (_M_w[__i] != static_cast<_WordT>(0))
- return true;
- }
+ if (_M_w[__i] != static_cast<_WordT>(0))
+ return true;
return false;
}
@@ -324,11 +328,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
} // end _M_do_find_next
/**
- * @if maint
* Base class, specialization for a single word.
*
* See documentation for bitset.
- * @endif
*/
template<>
struct _Base_bitset<1>
@@ -412,6 +414,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_is_equal(const _Base_bitset<1>& __x) const
{ return _M_w == __x._M_w; }
+ size_t
+ _M_are_all_aux() const
+ { return __builtin_popcountl(_M_w); }
+
bool
_M_is_any() const
{ return _M_w != 0; }
@@ -450,11 +456,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
};
/**
- * @if maint
* Base class, specialization for no storage (zero-length %bitset).
*
* See documentation for bitset.
- * @endif
*/
template<>
struct _Base_bitset<0>
@@ -540,6 +544,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
_M_is_equal(const _Base_bitset<0>&) const
{ return true; }
+ size_t
+ _M_are_all_aux() const
+ { return 0; }
+
bool
_M_is_any() const
{ return false; }
@@ -629,7 +637,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Also see http://gcc.gnu.org/onlinedocs/libstdc++/ext/sgiexts.html#ch23
* for a description of extensions.
*
- * @if maint
* Most of the actual code isn't contained in %bitset<> itself, but in the
* base class _Base_bitset. The base class works with whole words, not with
* individual bits. This allows us to specialize _Base_bitset for the
@@ -638,7 +645,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* Extra confusion can result due to the fact that the storage for
* _Base_bitset @e is a regular array, and is indexed as such. This is
* carefully encapsulated.
- * @endif
*/
template<size_t _Nb>
class bitset
@@ -977,13 +983,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* @note These operators do no range checking and throw no exceptions,
* as required by DR 11 to the standard.
*
- * @if maint
* _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already
* resolves DR 11 (items 1 and 2), but does not do the range-checking
* required by that DR's resolution. -pme
* The DR has since been changed: range-checking is a precondition
* (users' responsibility), and these functions must not throw. -pme
- * @endif
*/
reference
operator[](size_t __position)
@@ -995,7 +999,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
//@}
/**
- * @brief Retuns a numerical interpretation of the %bitset.
+ * @brief Returns a numerical interpretation of the %bitset.
* @return The integral equivalent of the bits.
* @throw std::overflow_error If there are too many bits to be
* represented in an @c unsigned @c long.
@@ -1005,7 +1009,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
{ return this->_M_do_to_ulong(); }
/**
- * @brief Retuns a character interpretation of the %bitset.
+ * @brief Returns a character interpretation of the %bitset.
* @return The string equivalent of the bits.
*
* Note the ordering of the bits: decreasing character positions
@@ -1089,7 +1093,17 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
__throw_out_of_range(__N("bitset::test"));
return _Unchecked_test(__position);
}
-
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 693. std::bitset::all() missing.
+ /**
+ * @brief Tests whether all the bits are on.
+ * @return True if all the bits are set.
+ */
+ bool
+ all() const
+ { return this->_M_are_all_aux() == _Nb; }
+
/**
* @brief Tests whether any of the bits are on.
* @return True if at least one bit is set.
@@ -1298,44 +1312,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
__x._M_copy_to_string(__tmp);
return __os << __tmp;
}
-
- // Specializations for zero-sized bitsets, to avoid "unsigned comparison
- // with zero" warnings.
- template<>
- inline bitset<0>&
- bitset<0>::
- set(size_t, bool)
- {
- __throw_out_of_range(__N("bitset::set"));
- return *this;
- }
-
- template<>
- inline bitset<0>&
- bitset<0>::
- reset(size_t)
- {
- __throw_out_of_range(__N("bitset::reset"));
- return *this;
- }
-
- template<>
- inline bitset<0>&
- bitset<0>::
- flip(size_t)
- {
- __throw_out_of_range(__N("bitset::flip"));
- return *this;
- }
-
- template<>
- inline bool
- bitset<0>::
- test(size_t) const
- {
- __throw_out_of_range(__N("bitset::test"));
- return false;
- }
//@}
_GLIBCXX_END_NESTED_NAMESPACE
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 2ed73f0a034..f2d9e9346ee 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -610,7 +610,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
arg(const complex<_Tp>& __z) { return __complex_arg(__z); }
#endif
- // 26.2.7/5: norm(__z) returns the squared magintude of __z.
+ // 26.2.7/5: norm(__z) returns the squared magnitude of __z.
// As defined, norm() is -not- a norm is the common mathematical
// sens used in numerics. The helper class _Norm_helper<> tries to
// distinguish between builtin floating point and the rest, so as
@@ -744,7 +744,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
exp(const complex<_Tp>& __z) { return __complex_exp(__z); }
#endif
- // 26.2.8/5 log(__z): Reurns the natural complex logaritm of __z.
+ // 26.2.8/5 log(__z): Returns the natural complex logarithm of __z.
// The branch cut is along the negative axis.
template<typename _Tp>
inline complex<_Tp>
@@ -1024,7 +1024,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
complex<float>& operator*=(float);
complex<float>& operator/=(float);
- // Let's the compiler synthetize the copy and assignment
+ // Let the compiler synthesize the copy and assignment
// operator. It always does a pretty good job.
// complex& operator= (const complex&);
template<typename _Tp>
@@ -1061,10 +1061,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __imag__ _M_value; }
inline
- complex<float>::complex(float r, float i)
+ complex<float>::complex(float __r, float __i)
{
- __real__ _M_value = r;
- __imag__ _M_value = i;
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
}
inline complex<float>&
@@ -1178,7 +1178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
complex<double>& operator*=(double);
complex<double>& operator/=(double);
- // The compiler will synthetize this, efficiently.
+ // The compiler will synthesize this, efficiently.
// complex& operator= (const complex&);
template<typename _Tp>
complex<double>& operator=(const complex<_Tp>&);
@@ -1476,7 +1476,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
inline
complex<double>::complex(const complex<long double>& __z)
- : _M_value(__z.__rep()) { }
+ : _M_value(__z.__rep()) { }
inline
complex<long double>::complex(const complex<float>& __z)
diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream
index fb56412b212..2bbbcc1f470 100644
--- a/libstdc++-v3/include/std/fstream
+++ b/libstdc++-v3/include/std/fstream
@@ -1,7 +1,7 @@
// File based streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* This class associates both its input and output sequence with an
* external disk file, and maintains a joint file position for both
- * sequences. Many of its sematics are described in terms of similar
+ * sequences. Many of its semantics are described in terms of similar
* behavior in the Standard C Library's @c FILE streams.
*/
// Requirements on traits_type, specific to this class:
@@ -91,11 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// External buffer.
__file_type _M_file;
- /**
- * @if maint
- * Place to stash in || out || in | out settings for current filebuf.
- * @endif
- */
+ /// Place to stash in || out || in | out settings for current filebuf.
ios_base::openmode _M_mode;
// Beginning state type for codecvt.
@@ -110,19 +106,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// to eback() and _M_ext_buf.
__state_type _M_state_last;
- /**
- * @if maint
- * Pointer to the beginning of internal buffer.
- * @endif
- */
+ /// Pointer to the beginning of internal buffer.
char_type* _M_buf;
/**
- * @if maint
* Actual size of internal buffer. This number is equal to the size
* of the put area + 1 position, reserved for the overflow char of
* a full area.
- * @endif
*/
size_t _M_buf_size;
@@ -130,24 +120,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
bool _M_buf_allocated;
/**
- * @if maint
* _M_reading == false && _M_writing == false for 'uncommitted' mode;
* _M_reading == true for 'read' mode;
* _M_writing == true for 'write' mode;
*
* NB: _M_reading == true && _M_writing == true is unused.
- * @endif
*/
bool _M_reading;
bool _M_writing;
//@{
/**
- * @if maint
* Necessary bits for putback buffer management.
*
* @note pbacks of over one character are not currently supported.
- * @endif
*/
char_type _M_pback;
char_type* _M_pback_cur_save;
@@ -159,37 +145,29 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const __codecvt_type* _M_codecvt;
/**
- * @if maint
* Buffer for external characters. Used for input when
* codecvt::always_noconv() == false. When valid, this corresponds
* to eback().
- * @endif
*/
char* _M_ext_buf;
/**
- * @if maint
* Size of buffer held by _M_ext_buf.
- * @endif
*/
streamsize _M_ext_buf_size;
/**
- * @if maint
* Pointers into the buffer held by _M_ext_buf that delimit a
* subsequence of bytes that have been read but not yet converted.
* When valid, _M_ext_next corresponds to egptr().
- * @endif
*/
const char* _M_ext_next;
char* _M_ext_end;
/**
- * @if maint
* Initializes pback buffers, and moves normal buffers to safety.
* Assumptions:
* _M_in_cur has already been moved back
- * @endif
*/
void
_M_create_pback()
@@ -204,11 +182,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
/**
- * @if maint
* Deactivates pback buffer contents, and restores normal buffer.
* Assumptions:
* The pback buffer has only moved forward.
- * @endif
*/
void
_M_destroy_pback() throw()
@@ -259,26 +235,31 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Table 92, adapted here, gives the relation between openmode
* combinations and the equivalent fopen() flags.
- * (NB: lines in|out|app and binary|in|out|app per DR 596)
+ * (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app,
+ * and binary|in|app per DR 596)
* +---------------------------------------------------------+
* | ios_base Flag combination stdio equivalent |
* |binary in out trunc app |
* +---------------------------------------------------------+
* | + "w" |
* | + + "a" |
+ * | + "a" |
* | + + "w" |
* | + "r" |
* | + + "r+" |
* | + + + "w+" |
* | + + + "a+" |
+ * | + + "a+" |
* +---------------------------------------------------------+
* | + + "wb" |
* | + + + "ab" |
+ * | + + "ab" |
* | + + + "wb" |
* | + + "rb" |
* | + + + "r+b" |
* | + + + + "w+b" |
* | + + + + "a+b" |
+ * | + + + "a+b" |
* +---------------------------------------------------------+
*/
__filebuf_type*
@@ -311,7 +292,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// Stroustrup, 1998, p. 628
// underflow() and uflow() functions are called to get the next
- // charater from the real input source when the buffer is empty.
+ // character from the real input source when the buffer is empty.
// Buffered input uses underflow()
virtual int_type
@@ -379,7 +360,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_terminate_output();
/**
- * @if maint
* This function sets the pointers of the internal buffer, both get
* and put areas. Typically:
*
@@ -390,7 +370,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size
* reflects the actual allocated memory and the last cell is reserved
* for the overflow char of a full put area.
- * @endif
*/
void
_M_set_buffer(streamsize __off)
@@ -671,7 +650,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// [27.8.1.11] Template class basic_fstream
/**
- * @brief Controlling intput and output for files.
+ * @brief Controlling input and output for files.
*
* This class supports reading from and writing to named files, using
* the inherited functions from std::basic_iostream. To control the
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 27e88176400..ca5c2eaf7ce 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -58,13 +58,13 @@
# if defined(_GLIBCXX_INCLUDE_AS_TR1)
# error C++0x header cannot be included from TR1 header
# endif
-# include <cmath>
-# include <string>
# include <typeinfo>
-# include <ext/type_traits.h>
+# include <new>
# include <tuple>
# include <type_traits>
+# include <bits/stringfwd.h>
# include <bits/functional_hash.h>
+# include <ext/type_traits.h>
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
# include <tr1_impl/functional>
# else
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
index 8b1666c10e3..caf670b0e35 100644
--- a/libstdc++-v3/include/std/istream
+++ b/libstdc++-v3/include/std/istream
@@ -1,7 +1,7 @@
// Input streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -77,10 +77,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected:
// Data Members:
/**
- * @if maint
* The number of characters extracted in the previous unformatted
* function; see gcount().
- * @endif
*/
streamsize _M_gcount;
@@ -93,8 +91,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* derived classes' initialization lists, which pass a pointer to
* their own stream buffer.
*/
- explicit
- basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0))
+ explicit
+ basic_istream(__streambuf_type* __sb)
+ : _M_gcount(streamsize(0))
{ this->init(__sb); }
/**
@@ -116,7 +115,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Interface for manipulators.
*
- * Manuipulators such as @c std::ws and @c std::dec use these
+ * Manipulators such as @c std::ws and @c std::dec use these
* functions in constructs like "std::cin >> std::ws". For more
* information, see the iomanip header.
*/
@@ -583,8 +582,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@}
protected:
- explicit
- basic_istream(): _M_gcount(streamsize(0)) { }
+ basic_istream()
+ : _M_gcount(streamsize(0))
+ { this->init(0); }
template<typename _ValueT>
__istream_type&
@@ -667,7 +667,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* If the stream state is still good, then the sentry state becomes
* true ("okay").
*/
- explicit
+ explicit
sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
/**
@@ -790,10 +790,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Both of the parent classes are initialized with the same
* streambuf pointer passed to this constructor.
*/
- explicit
+ explicit
basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
- : __istream_type(), __ostream_type()
- { this->init(__sb); }
+ : __istream_type(__sb), __ostream_type(__sb) { }
/**
* @brief Destructor does nothing.
@@ -802,9 +801,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
~basic_iostream() { }
protected:
- explicit
- basic_iostream() : __istream_type(), __ostream_type()
- { }
+ basic_iostream()
+ : __istream_type(), __ostream_type() { }
};
// [27.6.1.4] standard basic_istream manipulators
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
index 621a6fc347f..7f7dd9ceeca 100644
--- a/libstdc++-v3/include/std/limits
+++ b/libstdc++-v3/include/std/limits
@@ -1,6 +1,6 @@
// The template and inlines for the numeric_limits classes. -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -63,7 +63,7 @@
// double (1)
// long double (1)
//
-// GNU C++ undertstands (where supported by the host C-library)
+// GNU C++ understands (where supported by the host C-library)
// * integer
// long long, unsigned long long (2)
//
@@ -79,7 +79,7 @@
// These values can be overridden in the target configuration file.
// The default values are appropriate for many 32-bit targets.
-// GCC only intrinsicly supports modulo integral types. The only remaining
+// GCC only intrinsically supports modulo integral types. The only remaining
// integral exceptional values is division by zero. Only targets that do not
// signal division by zero in some "hard to ignore" way should use false.
#ifndef __glibcxx_integral_traps
@@ -89,7 +89,7 @@
// float
//
-// Default values. Should be overriden in configuration files if necessary.
+// Default values. Should be overridden in configuration files if necessary.
#ifndef __glibcxx_float_has_denorm_loss
# define __glibcxx_float_has_denorm_loss false
@@ -103,7 +103,7 @@
// double
-// Default values. Should be overriden in configuration files if necessary.
+// Default values. Should be overridden in configuration files if necessary.
#ifndef __glibcxx_double_has_denorm_loss
# define __glibcxx_double_has_denorm_loss false
@@ -117,7 +117,7 @@
// long double
-// Default values. Should be overriden in configuration files if necessary.
+// Default values. Should be overridden in configuration files if necessary.
#ifndef __glibcxx_long_double_has_denorm_loss
# define __glibcxx_long_double_has_denorm_loss false
@@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* The @c static @c const members are usable as integral constant
* expressions.
*
- * @note This is a seperate class for purposes of efficiency; you
+ * @note This is a separate class for purposes of efficiency; you
* should only access these members as part of an instantiation
* of the std::numeric_limits class.
*/
@@ -205,9 +205,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** True if the type is signed. */
static const bool is_signed = false;
/** True if the type is integer.
- * @if maint
* Is this supposed to be "if the type is integral"?
- * @endif
*/
static const bool is_integer = false;
/** True if the type uses an exact representation. "All integer types are
@@ -262,7 +260,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** True if trapping is implemented for this type. */
static const bool traps = false;
- /** True if tinyness is detected before rounding. (see IEC 559) */
+ /** True if tininess is detected before rounding. (see IEC 559) */
static const bool tinyness_before = false;
/** See std::float_round_style for more information. This is only
meaningful for floating types; integer types will all be
@@ -278,10 +276,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* non-fundamental types, the functions will return 0 and the data
* members will all be @c false.
*
- * @if maint
* _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
* noted, but not incorporated in this documented (yet).
- * @endif
*/
template<typename _Tp>
struct numeric_limits : public __numeric_limits_base
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory
index a099b3ed177..2e78e3f7fd0 100644
--- a/libstdc++-v3/include/std/memory
+++ b/libstdc++-v3/include/std/memory
@@ -56,7 +56,6 @@
#include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h>
#include <bits/stl_tempbuf.h>
-#include <bits/stl_auto_ptr.h>
#include <bits/stl_raw_storage_iter.h>
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -65,7 +64,6 @@
# endif
# include <exception> // std::exception
# include <typeinfo> // std::type_info in get_deleter
-# include <bits/stl_algobase.h> // std::swap
# include <iosfwd> // std::basic_ostream
# include <ext/atomicity.h>
# include <ext/concurrence.h>
@@ -73,19 +71,28 @@
# include <bits/stl_function.h> // std::less
# include <debug/debug.h>
# include <type_traits>
+# if _GLIBCXX_DEPRECATED
+# include <backward/auto_ptr.h>
+# endif
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <bits/boost_sp_shared_count.h>
# include <tr1_impl/boost_shared_ptr.h>
# else
# define _GLIBCXX_INCLUDE_AS_CXX0X
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
# define _GLIBCXX_END_NAMESPACE_TR1
# define _GLIBCXX_TR1
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <bits/boost_sp_shared_count.h>
# include <tr1_impl/boost_shared_ptr.h>
# undef _GLIBCXX_TR1
# undef _GLIBCXX_END_NAMESPACE_TR1
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
# undef _GLIBCXX_INCLUDE_AS_CXX0X
# endif
+#else
+# include <backward/auto_ptr.h>
#endif
#endif /* _GLIBCXX_MEMORY */
diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric
index 7f21b3d9e8e..dcb32943fd9 100644
--- a/libstdc++-v3/include/std/numeric
+++ b/libstdc++-v3/include/std/numeric
@@ -67,4 +67,8 @@
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_numeric.h>
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/numeric>
+#endif
+
#endif /* _GLIBCXX_NUMERIC */
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index 2287756513c..ffbb0e121f4 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -1,7 +1,7 @@
// Output streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -45,6 +45,10 @@
#include <ios>
#include <bits/ostream_insert.h>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <system_error>
+#endif
+
_GLIBCXX_BEGIN_NAMESPACE(std)
// [27.6.2.1] Template class basic_ostream
@@ -104,7 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Interface for manipulators.
*
- * Manuipulators such as @c std::endl and @c std::hex use these
+ * Manipulators such as @c std::endl and @c std::hex use these
* functions in constructs like "std::cout << std::endl". For more
* information, see the iomanip header.
*/
@@ -362,8 +366,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
seekp(off_type, ios_base::seekdir);
protected:
- explicit
- basic_ostream() { }
+ basic_ostream()
+ { this->init(0); }
template<typename _ValueT>
__ostream_type&
@@ -412,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
~sentry()
{
// XXX MT
- if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
+ if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
{
// Can't call flush directly or else will get into recursive lock.
if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
@@ -506,7 +510,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
basic_ostream<_CharT, _Traits> &
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
- // Partial specializationss
+ // Partial specializations
template<class _Traits>
inline basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
@@ -531,6 +535,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return (__out << reinterpret_cast<const char*>(__s)); }
//@}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __out, const error_code& __e)
+ { return (__out << __e.category().name().c_str() << ':' << __e.value()); }
+#endif
+
// [27.6.2.7] standard basic_ostream manipulators
/**
* @brief Write a newline and flush the stream.
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
index 66159c844f1..f8dd50a19f9 100644
--- a/libstdc++-v3/include/std/sstream
+++ b/libstdc++-v3/include/std/sstream
@@ -1,7 +1,7 @@
// String based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-// Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2008 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
@@ -77,11 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef typename __string_type::size_type __size_type;
protected:
- /**
- * @if maint
- * Place to stash in || out || in | out settings for current stringbuf.
- * @endif
- */
+ /// Place to stash in || out || in | out settings for current stringbuf.
ios_base::openmode _M_mode;
// Data Members:
@@ -290,10 +286,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @c mode|in, and passes @c &sb to the base
* class initializer. Does not allocate any buffer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_istringstream(ios_base::openmode __mode = ios_base::in)
@@ -310,10 +304,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @a str and @c mode|in, and passes @c &sb
* to the base class initializer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_istringstream(const __string_type& __str,
@@ -403,10 +395,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @c mode|out, and passes @c &sb to the base
* class initializer. Does not allocate any buffer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_ostringstream(ios_base::openmode __mode = ios_base::out)
@@ -423,10 +413,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @a str and @c mode|out, and passes @c &sb
* to the base class initializer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_ostringstream(const __string_type& __str,
@@ -514,10 +502,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @c mode, and passes @c &sb to the base
* class initializer. Does not allocate any buffer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
@@ -532,10 +518,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using @a str and @c mode, and passes @c &sb
* to the base class initializer.
*
- * @if maint
* That's a lie. We initialize the base class with NULL, because the
* string class does its own memory management.
- * @endif
*/
explicit
basic_stringstream(const __string_type& __str,
diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
index e47adb38989..f8e74102b9b 100644
--- a/libstdc++-v3/include/std/stdexcept
+++ b/libstdc++-v3/include/std/stdexcept
@@ -69,7 +69,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/** Thrown by the library, or by you, to report domain errors (domain in
- * the mathmatical sense). */
+ * the mathematical sense). */
class domain_error : public logic_error
{
public:
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index 5e710377ab4..a2e47505c6f 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -1,7 +1,7 @@
// Stream buffer classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-// Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008 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
@@ -50,11 +50,6 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
- /**
- * @if maint
- * Does stuff.
- * @endif
- */
template<typename _CharT, typename _Traits>
streamsize
__copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
@@ -138,11 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@}
//@{
- /**
- * @if maint
- * This is a non-standard type.
- * @endif
- */
+ /// This is a non-standard type.
typedef basic_streambuf<char_type, traits_type> __streambuf_type;
//@}
@@ -155,11 +146,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
friend streamsize
__copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&);
- template<typename _CharT2>
+ template<bool _IsMove, typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
_CharT2*>::__type
- __copy_aux(istreambuf_iterator<_CharT2>,
- istreambuf_iterator<_CharT2>, _CharT2*);
+ __copy_move_a2(istreambuf_iterator<_CharT2>,
+ istreambuf_iterator<_CharT2>, _CharT2*);
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
@@ -184,13 +175,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected:
//@{
/**
- * @if maint
* This is based on _IO_FILE, just reordered to be more consistent,
* and is intended to be the most minimal abstraction for an
* internal buffer.
* - get == input == read
* - put == output == write
- * @endif
*/
char_type* _M_in_beg; // Start of get area.
char_type* _M_in_cur; // Current read area.
@@ -199,11 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
char_type* _M_out_cur; // Current put area.
char_type* _M_out_end; // End of put area.
- /**
- * @if maint
- * Current locale setting.
- * @endif
- */
+ /// Current locale setting.
locale _M_buf_locale;
public:
@@ -574,7 +559,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// [27.5.2.4.2] buffer management and positioning
/**
- * @brief Maniuplates the buffer.
+ * @brief Manipulates the buffer.
*
* Each derived class provides its own appropriate behavior. See
* the next-to-last paragraph of
@@ -670,7 +655,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* next available character is returned, or @c traits::eof() to
* indicate a null pending sequence.
*
- * For a formal definiton of the pending sequence, see a good text
+ * For a formal definition of the pending sequence, see a good text
* such as Langer & Kreft, or [27.5.2.4.3]/7-14.
*
* A functioning input streambuf can be created by overriding only
@@ -751,7 +736,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* sequence verbatim.) In either case, the character @a c is also
* written out, if @a c is not @c eof().
*
- * For a formal definiton of this function, see a good text
+ * For a formal definition of this function, see a good text
* such as Langer & Kreft, or [27.5.2.4.5]/3-7.
*
* A functioning output streambuf can be created by overriding only
@@ -763,7 +748,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
overflow(int_type /* __c */ = traits_type::eof())
{ return traits_type::eof(); }
-#ifdef _GLIBCXX_DEPRECATED
+#if _GLIBCXX_DEPRECATED
// Annex D.6
public:
/**
@@ -773,11 +758,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* been read.
*
* See http://gcc.gnu.org/ml/libstdc++/2002-05/msg00168.html
- *
- * @note This function has been deprecated by the standard. You
- * must define @c _GLIBCXX_DEPRECATED to make this visible; see
- * c++config.h.
- */
+ */
void
stossc()
{
diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string
index 9bf779666c3..6848326d569 100644
--- a/libstdc++-v3/include/std/string
+++ b/libstdc++-v3/include/std/string
@@ -49,8 +49,12 @@
#include <bits/cpp_type_traits.h>
#include <bits/localefwd.h> // For operators >>, <<, and getline.
#include <bits/ostream_insert.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <bits/stl_function.h> // For less
+#include <ext/numeric_traits.h>
+#include <bits/stl_algobase.h>
#include <bits/basic_string.h>
#ifndef _GLIBCXX_EXPORT_TEMPLATE
diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error
new file mode 100644
index 00000000000..c2a1d0150c9
--- /dev/null
+++ b/libstdc++-v3/include/std/system_error
@@ -0,0 +1,157 @@
+// <system_error> -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+// 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 include/system_error
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_SYSTEM_ERROR
+#define _GLIBCXX_SYSTEM_ERROR 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#include <bits/c++config.h>
+#include <bits/error_constants.h>
+#include <iosfwd>
+#include <stdexcept>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ class system_error;
+ class error_code;
+ class error_category;
+
+ extern const error_category& system_category;
+
+ struct error_category
+ {
+ error_category() { }
+
+ bool
+ operator==(const error_category& __other) const
+ { return this == &__other; }
+
+ bool
+ operator!=(const error_category& __other) const
+ { return this != &__other; }
+
+ virtual posix_error::posix_errno
+ posix(int __v) const = 0;
+
+ virtual const string&
+ name() const = 0;
+
+ private:
+ error_category(const error_category&);
+
+ error_category&
+ operator=(const error_category&);
+ };
+
+ struct error_code
+ {
+ error_code() throw()
+ : _M_value(0), _M_cat(&system_category) { }
+
+ error_code(int __v, const error_category& __cat) throw()
+ : _M_value(__v), _M_cat(&__cat) { }
+
+ error_code(posix_error::posix_errno __v)
+ : _M_value(__v), _M_cat(&system_category) { }
+
+ void
+ assign(int __v, const error_category& __cat) throw()
+ {
+ _M_value = __v;
+ _M_cat = &__cat;
+ }
+
+ void
+ clear() throw()
+ {
+ _M_value = 0;
+ _M_cat = &system_category;
+ }
+
+ int
+ value() const throw() { return _M_value; }
+
+ const error_category&
+ category() const { return *_M_cat; }
+
+ posix_error::posix_errno
+ posix() const throw() { return this->category().posix(_M_value); }
+
+ // Safe bool idiom.
+ // explicit operator bool() const throw()
+ // { return _M_value != 0; }
+ typedef void (*__bool_type)();
+
+ static void __not_bool_type() { }
+
+ operator __bool_type() const throw()
+ { return _M_value != 0 ? &__not_bool_type : false; }
+
+ bool operator==(const error_code& __other) const
+ { return value() == __other.value() && category() == __other.category(); }
+
+ bool operator!=(const error_code& __other) const
+ { return !(this == &__other); }
+
+ private:
+ int _M_value;
+ const error_category* _M_cat;
+ };
+
+ class system_error : public std::runtime_error
+ {
+ private:
+ error_code _M_code;
+
+ public:
+ system_error(const string& __what, error_code __ec = error_code())
+ : runtime_error(__what), _M_code(__ec) { }
+
+ system_error(const string& __what, int __v, const error_category& __ecat)
+ : runtime_error(__what), _M_code(error_code(__v, __ecat)) { }
+
+ virtual ~system_error() throw();
+
+ const error_code&
+ code() const throw() { return _M_code; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 94e7ef5c086..b870234c129 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -1,6 +1,6 @@
// <tuple> -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 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
@@ -40,24 +40,605 @@
# include <c++0x_warning.h>
#endif
-#if defined(_GLIBCXX_INCLUDE_AS_TR1)
-# error C++0x header cannot be included from TR1 header
-#endif
-
#include <utility>
-#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
-# include <tr1_impl/tuple>
-#else
-# define _GLIBCXX_INCLUDE_AS_CXX0X
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1
-# define _GLIBCXX_END_NAMESPACE_TR1
-# define _GLIBCXX_TR1
-# include <tr1_impl/tuple>
-# undef _GLIBCXX_TR1
-# undef _GLIBCXX_END_NAMESPACE_TR1
-# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
-# undef _GLIBCXX_INCLUDE_AS_CXX0X
-#endif
+namespace std
+{
+ // Adds a const reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_c_ref
+ { typedef const _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_c_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ // Adds a reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_ref
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ template<int _Idx, typename _Head, bool _IsEmpty>
+ struct _Head_base;
+
+ template<int _Idx, typename _Head>
+ struct _Head_base<_Idx, _Head, true>
+ : public _Head
+ {
+ _Head_base()
+ : _Head() { }
+
+ _Head_base(const _Head& __h)
+ : _Head(__h) { }
+
+ template<typename _UHead>
+ _Head_base(_UHead&& __h)
+ : _Head(std::forward<_UHead>(__h)) { }
+
+ _Head& _M_head() { return *this; }
+ const _Head& _M_head() const { return *this; }
+ };
+
+ template<int _Idx, typename _Head>
+ struct _Head_base<_Idx, _Head, false>
+ {
+ _Head_base()
+ : _M_head_impl() { }
+
+ _Head_base(const _Head& __h)
+ : _M_head_impl(__h) { }
+
+ template<typename _UHead>
+ _Head_base(_UHead&& __h)
+ : _M_head_impl(std::forward<_UHead>(__h)) { }
+
+ _Head& _M_head() { return _M_head_impl; }
+ const _Head& _M_head() const { return _M_head_impl; }
+
+ _Head _M_head_impl;
+ };
+
+ /**
+ * Contains the actual implementation of the @c tuple template, stored
+ * as a recursive inheritance hierarchy from the first element (most
+ * derived class) to the last (least derived class). The @c Idx
+ * parameter gives the 0-based index of the element stored at this
+ * point in the hierarchy; we use it to implement a constant-time
+ * get() operation.
+ */
+ template<int _Idx, typename... _Elements>
+ struct _Tuple_impl;
+
+ /**
+ * Zero-element tuple implementation. This is the basis case for the
+ * inheritance recursion.
+ */
+ template<int _Idx>
+ struct _Tuple_impl<_Idx> { };
+
+ /**
+ * Recursive tuple implementation. Here we store the @c Head element
+ * and derive from a @c Tuple_impl containing the remaining elements
+ * (which contains the @c Tail).
+ */
+ template<int _Idx, typename _Head, typename... _Tail>
+ struct _Tuple_impl<_Idx, _Head, _Tail...>
+ : public _Tuple_impl<_Idx + 1, _Tail...>,
+ private _Head_base<_Idx, _Head, std::is_empty<_Head>::value>
+ {
+ typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
+ typedef _Head_base<_Idx, _Head, std::is_empty<_Head>::value> _Base;
+
+ _Head& _M_head() { return _Base::_M_head(); }
+ const _Head& _M_head() const { return _Base::_M_head(); }
+
+ _Inherited& _M_tail() { return *this; }
+ const _Inherited& _M_tail() const { return *this; }
+
+ _Tuple_impl()
+ : _Inherited(), _Base() { }
+
+ explicit
+ _Tuple_impl(const _Head& __head, const _Tail&... __tail)
+ : _Inherited(__tail...), _Base(__head) { }
+
+ template<typename _UHead, typename... _UTail>
+ explicit
+ _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
+ : _Inherited(std::forward<_UTail>(__tail)...),
+ _Base(std::forward<_UHead>(__head)) { }
+
+ _Tuple_impl(const _Tuple_impl& __in)
+ : _Inherited(__in._M_tail()), _Base(__in._M_head()) { }
+
+ _Tuple_impl(_Tuple_impl&& __in)
+ : _Inherited(std::move<_Inherited&&>(__in._M_tail())),
+ _Base(std::forward<_Head>(__in._M_head())) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
+ : _Inherited(__in._M_tail()), _Base(__in._M_head()) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(_Tuple_impl<_Idx, _UElements...>&& __in)
+ : _Inherited(std::move<typename _Tuple_impl<_Idx, _UElements...>::
+ _Inherited&&>(__in._M_tail())),
+ _Base(std::forward<typename _Tuple_impl<_Idx, _UElements...>::
+ _Base>(__in._M_head())) { }
+
+ _Tuple_impl&
+ operator=(const _Tuple_impl& __in)
+ {
+ _M_head() = __in._M_head();
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ _Tuple_impl&
+ operator=(_Tuple_impl&& __in)
+ {
+ _M_head() = std::move(__in._M_head());
+ _M_tail() = std::move(__in._M_tail());
+ return *this;
+ }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
+ {
+ _M_head() = __in._M_head();
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(_Tuple_impl<_Idx, _UElements...>&& __in)
+ {
+ _M_head() = std::move(__in._M_head());
+ _M_tail() = std::move(__in._M_tail());
+ return *this;
+ }
+ };
+
+ template<typename... _Elements>
+ class tuple : public _Tuple_impl<0, _Elements...>
+ {
+ typedef _Tuple_impl<0, _Elements...> _Inherited;
+
+ public:
+ tuple()
+ : _Inherited() { }
+
+ explicit
+ tuple(const _Elements&... __elements)
+ : _Inherited(__elements...) { }
+
+ template<typename... _UElements>
+ explicit
+ tuple(_UElements&&... __elements)
+ : _Inherited(std::forward<_UElements>(__elements)...) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(static_cast<const _Inherited&>(__in)) { }
+
+ tuple(tuple&& __in)
+ : _Inherited(std::move<_Inherited>(__in)) { }
+
+ template<typename... _UElements>
+ tuple(const tuple<_UElements...>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
+ { }
+
+ template<typename... _UElements>
+ tuple(tuple<_UElements...>&& __in)
+ : _Inherited(std::move<_Tuple_impl<0, _UElements...> >(__in)) { }
+
+ // XXX http://gcc.gnu.org/ml/libstdc++/2008-02/msg00047.html
+ template<typename... _UElements>
+ tuple(tuple<_UElements...>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
+ { }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(tuple&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(const tuple<_UElements...>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(tuple<_UElements...>&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+ };
+
+ template<> class tuple<> { };
+
+ // 2-element tuple, with construction and assignment from a pair.
+ template<typename _T1, typename _T2>
+ class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
+ {
+ typedef _Tuple_impl<0, _T1, _T2> _Inherited;
+
+ public:
+ tuple()
+ : _Inherited() { }
+
+ explicit
+ tuple(const _T1& __a1, const _T2& __a2)
+ : _Inherited(__a1, __a2) { }
+
+ template<typename _U1, typename _U2>
+ explicit
+ tuple(_U1&& __a1, _U2&& __a2)
+ : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(static_cast<const _Inherited&>(__in)) { }
+
+ tuple(tuple&& __in)
+ : _Inherited(std::move<_Inherited>(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const tuple<_U1, _U2>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(tuple<_U1, _U2>&& __in)
+ : _Inherited(std::move<_Tuple_impl<0, _U1, _U2> >(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const pair<_U1, _U2>& __in)
+ : _Inherited(__in.first, __in.second) { }
+
+ template<typename _U1, typename _U2>
+ tuple(pair<_U1, _U2>&& __in)
+ : _Inherited(std::move(__in.first), std::move(__in.second)) { }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(tuple&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const tuple<_U1, _U2>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(tuple<_U1, _U2>&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const pair<_U1, _U2>& __in)
+ {
+ this->_M_head() = __in.first;
+ this->_M_tail()._M_head() = __in.second;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(pair<_U1, _U2>&& __in)
+ {
+ this->_M_head() = std::move(__in.first);
+ this->_M_tail()._M_head() = std::move(__in.second);
+ return *this;
+ }
+ };
+
+
+ /// Gives the type of the ith element of a given tuple type.
+ template<int __i, typename _Tp>
+ struct tuple_element;
+
+ /**
+ * Recursive case for tuple_element: strip off the first element in
+ * the tuple and retrieve the (i-1)th element of the remaining tuple.
+ */
+ template<int __i, typename _Head, typename... _Tail>
+ struct tuple_element<__i, tuple<_Head, _Tail...> >
+ : tuple_element<__i - 1, tuple<_Tail...> > { };
+
+ /**
+ * Basis case for tuple_element: The first element is the one we're seeking.
+ */
+ template<typename _Head, typename... _Tail>
+ struct tuple_element<0, tuple<_Head, _Tail...> >
+ {
+ typedef _Head type;
+ };
+
+ /// Finds the size of a given tuple type.
+ template<typename _Tp>
+ struct tuple_size;
+
+ /// @brief class tuple_size
+ template<typename... _Elements>
+ struct tuple_size<tuple<_Elements...> >
+ {
+ static const int value = sizeof...(_Elements);
+ };
+
+ template<typename... _Elements>
+ const int tuple_size<tuple<_Elements...> >::value;
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_ref<_Head>::type
+ __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
+ { return __t._M_head(); }
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_c_ref<_Head>::type
+ __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
+ { return __t._M_head(); }
+
+ // Return a reference (const reference) to the ith element of a tuple.
+ // Any const or non-const ref elements are returned with their original type.
+ template<int __i, typename... _Elements>
+ inline typename __add_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(tuple<_Elements...>& __t)
+ { return __get_helper<__i>(__t); }
+
+ template<int __i, typename... _Elements>
+ inline typename __add_c_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(const tuple<_Elements...>& __t)
+ { return __get_helper<__i>(__t); }
+
+ // This class helps construct the various comparison operations on tuples
+ template<int __check_equal_size, int __i, int __j,
+ typename _Tp, typename _Up>
+ struct __tuple_compare;
+
+ template<int __i, int __j, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __j, _Tp, _Up>
+ {
+ static bool __eq(const _Tp& __t, const _Up& __u)
+ {
+ return (get<__i>(__t) == get<__i>(__u) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ static bool __less(const _Tp& __t, const _Up& __u)
+ {
+ return ((get<__i>(__t) < get<__i>(__u))
+ || !(get<__i>(__u) < get<__i>(__t)) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u));
+ }
+ };
+
+ template<int __i, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __i, _Tp, _Up>
+ {
+ static bool __eq(const _Tp&, const _Up&)
+ { return true; }
+
+ static bool __less(const _Tp&, const _Up&)
+ { return false; }
+ };
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator==(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator<(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator!=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t == __u); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return __u < __t; }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator<=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__u < __t); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t < __u); }
+
+ // NB: DR 705.
+ template<typename... _Elements>
+ inline tuple<typename __decay_and_strip<_Elements>::__type...>
+ make_tuple(_Elements&&... __args)
+ {
+ typedef tuple<typename __decay_and_strip<_Elements>::__type...>
+ __result_type;
+ return __result_type(std::forward<_Elements>(__args)...);
+ }
+
+ template<int...> struct __index_holder { };
+
+ template<int __i, typename _IdxHolder, typename... _Elements>
+ struct __index_holder_impl;
+
+ template<int __i, int... _Indexes, typename _IdxHolder, typename... _Elements>
+ struct __index_holder_impl<__i, __index_holder<_Indexes...>,
+ _IdxHolder, _Elements...>
+ {
+ typedef typename __index_holder_impl<__i + 1,
+ __index_holder<_Indexes..., __i>,
+ _Elements...>::type type;
+ };
+
+ template<int __i, int... _Indexes>
+ struct __index_holder_impl<__i, __index_holder<_Indexes...> >
+ { typedef __index_holder<_Indexes...> type; };
+
+ template<typename... _Elements>
+ struct __make_index_holder
+ : __index_holder_impl<0, __index_holder<>, _Elements...> { };
+
+ template<typename... _TElements, int... _TIdx,
+ typename... _UElements, int... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(const tuple<_TElements...>& __t,
+ const __index_holder<_TIdx...>&,
+ const tuple<_UElements...>& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>(get<_TIdx>(__t)...,
+ get<_UIdx>(__u)...); }
+
+ template<typename... _TElements, int... _TIdx,
+ typename... _UElements, int... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(tuple<_TElements...>&& __t,
+ const __index_holder<_TIdx...>&,
+ const tuple<_UElements...>& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (std::move(get<_TIdx>(__t))..., get<_UIdx>(__u)...); }
+
+ template<typename... _TElements, int... _TIdx,
+ typename... _UElements, int... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(const tuple<_TElements...>& __t,
+ const __index_holder<_TIdx...>&,
+ tuple<_UElements...>&& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (get<_TIdx>(__t)..., std::move(get<_UIdx>(__u))...); }
+
+ template<typename... _TElements, int... _TIdx,
+ typename... _UElements, int... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(tuple<_TElements...>&& __t,
+ const __index_holder<_TIdx...>&,
+ tuple<_UElements...>&& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (std::move(get<_TIdx>(__t))..., std::move(get<_UIdx>(__u))...); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u)
+ {
+ return __tuple_cat_helper(__t, typename
+ __make_index_holder<_TElements...>::type(),
+ __u, typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(tuple<_TElements...>&& __t, const tuple<_UElements...>& __u)
+ {
+ return __tuple_cat_helper(std::move(__t), typename
+ __make_index_holder<_TElements...>::type(),
+ __u, typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(const tuple<_TElements...>& __t, tuple<_UElements...>&& __u)
+ {
+ return __tuple_cat_helper(__t, typename
+ __make_index_holder<_TElements...>::type(),
+ std::move(__u), typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(tuple<_TElements...>&& __t, tuple<_UElements...>&& __u)
+ {
+ return __tuple_cat_helper(std::move(__t), typename
+ __make_index_holder<_TElements...>::type(),
+ std::move(__u), typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _Elements>
+ inline tuple<_Elements&...>
+ tie(_Elements&... __args)
+ { return tuple<_Elements&...>(__args...); }
+
+ // A class (and instance) which can be used in 'tie' when an element
+ // of a tuple is not required
+ struct _Swallow_assign
+ {
+ template<class _Tp>
+ _Swallow_assign&
+ operator=(const _Tp&)
+ { return *this; }
+ };
+
+ // TODO: Put this in some kind of shared file.
+ namespace
+ {
+ _Swallow_assign ignore;
+ }; // anonymous namespace
+}
#endif // _GLIBCXX_CXX0X_TUPLE
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index df5bbbb0b20..38c92abf6e8 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -240,7 +240,8 @@ namespace std
{
// "An imaginary lvalue of type From...".
static const bool __value = (__is_convertible_simple<typename
- add_reference<_From>::type, _To>::__value);
+ add_lvalue_reference<_From>::type,
+ _To>::__value);
};
template<typename _From, typename _To>
@@ -257,6 +258,27 @@ namespace std
__is_convertible_helper<_From, _To>::__value>
{ };
+ template<std::size_t _Len>
+ struct __aligned_storage_msa
+ {
+ union __type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__)) { } __align;
+ };
+ };
+
+ template<std::size_t _Len, std::size_t _Align =
+ __alignof__(typename __aligned_storage_msa<_Len>::__type)>
+ struct aligned_storage
+ {
+ union type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__((_Align)))) { } __align;
+ };
+ };
+
// Define a nested type if some predicate holds.
template<bool, typename _Tp = void>
@@ -286,21 +308,21 @@ namespace std
bool _IsFunction = is_function<_Up>::value>
struct __decay_selector;
+ // NB: DR 705.
template<typename _Up>
struct __decay_selector<_Up, false, false>
- { typedef _Up __type; };
+ { typedef typename remove_cv<_Up>::type __type; };
template<typename _Up>
struct __decay_selector<_Up, true, false>
{ typedef typename remove_extent<_Up>::type* __type; };
-
template<typename _Up>
struct __decay_selector<_Up, false, true>
{ typedef typename add_pointer<_Up>::type __type; };
template<typename _Tp>
- struct decay
+ struct decay
{
private:
typedef typename remove_reference<_Tp>::type __remove_type;
diff --git a/libstdc++-v3/include/std/unordered_map b/libstdc++-v3/include/std/unordered_map
index 016d3eaed21..5fb714dd48d 100644
--- a/libstdc++-v3/include/std/unordered_map
+++ b/libstdc++-v3/include/std/unordered_map
@@ -44,13 +44,12 @@
# error C++0x header cannot be included from TR1 header
#endif
-#include <cmath>
-#include <string>
#include <utility>
-#include <algorithm> // lower_bound
+#include <type_traits>
+#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
-#include <type_traits>
+#include <bits/stringfwd.h>
#include <bits/functional_hash.h>
#include <bits/hashtable.h>
@@ -58,9 +57,15 @@
# include <tr1_impl/unordered_map>
#else
# define _GLIBCXX_INCLUDE_AS_CXX0X
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
# define _GLIBCXX_END_NAMESPACE_TR1
-# define _GLIBCXX_TR1
+# define _GLIBCXX_TR1
+#endif
# include <tr1_impl/unordered_map>
# undef _GLIBCXX_TR1
# undef _GLIBCXX_END_NAMESPACE_TR1
diff --git a/libstdc++-v3/include/std/unordered_set b/libstdc++-v3/include/std/unordered_set
index dba781682ce..1e599840fff 100644
--- a/libstdc++-v3/include/std/unordered_set
+++ b/libstdc++-v3/include/std/unordered_set
@@ -44,13 +44,12 @@
# error C++0x header cannot be included from TR1 header
#endif
-#include <cmath>
-#include <string>
#include <utility>
-#include <algorithm> // lower_bound
+#include <type_traits>
+#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
-#include <type_traits>
+#include <bits/stringfwd.h>
#include <bits/functional_hash.h>
#include <bits/hashtable.h>
@@ -58,9 +57,15 @@
# include <tr1_impl/unordered_set>
#else
# define _GLIBCXX_INCLUDE_AS_CXX0X
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
# define _GLIBCXX_END_NAMESPACE_TR1
-# define _GLIBCXX_TR1
+# define _GLIBCXX_TR1
+#endif
# include <tr1_impl/unordered_set>
# undef _GLIBCXX_TR1
# undef _GLIBCXX_END_NAMESPACE_TR1
@@ -68,4 +73,8 @@
# undef _GLIBCXX_INCLUDE_AS_CXX0X
#endif
+#ifdef _GLIBCXX_DEBUG
+# include <debug/unordered_set>
+#endif
+
#endif // _GLIBCXX_UNORDERED_SET
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index e9376dc8c70..67e4b7338e9 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -84,29 +84,7 @@
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
# undef _GLIBCXX_INCLUDE_AS_CXX0X
# endif
-
-#include <type_traits>
-
-namespace std
-{
- // 20.2.2, forward/move
- template<typename _Tp>
- struct identity
- {
- typedef _Tp type;
- };
-
- template<typename _Tp>
- inline _Tp&&
- forward(typename std::identity<_Tp>::type&& __t)
- { return __t; }
-
- template<typename _Tp>
- inline typename std::remove_reference<_Tp>::type&&
- move(_Tp&& __t)
- { return __t; }
-}
-
+# include <bits/stl_move.h>
#endif
#endif /* _GLIBCXX_UTILITY */
diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray
index 4898c152e83..31799c04cce 100644
--- a/libstdc++-v3/include/std/valarray
+++ b/libstdc++-v3/include/std/valarray
@@ -881,7 +881,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
valarray<_Tp>::min() const
{
_GLIBCXX_DEBUG_ASSERT(_M_size > 0);
- return *std::min_element(_M_data, _M_data+_M_size);
+ return *std::min_element(_M_data, _M_data + _M_size);
}
template<typename _Tp>
@@ -889,7 +889,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
valarray<_Tp>::max() const
{
_GLIBCXX_DEBUG_ASSERT(_M_size > 0);
- return *std::max_element(_M_data, _M_data+_M_size);
+ return *std::max_element(_M_data, _M_data + _M_size);
}
template<class _Tp>
@@ -1009,7 +1009,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right)
{ \
typedef _BinClos<_Name, _Constant, _ValArray, _Tp, _Tp> _Closure; \
typedef typename __fun<_Name, _Tp>::result_type _Rt; \
- return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \
+ return _Expr<_Closure, _Rt>(_Closure(__t, __v)); \
}
_DEFINE_BINARY_OPERATOR(+, __plus)
diff --git a/libstdc++-v3/include/tr1/bessel_function.tcc b/libstdc++-v3/include/tr1/bessel_function.tcc
index eebafac41ce..19c9860d51c 100644
--- a/libstdc++-v3/include/tr1/bessel_function.tcc
+++ b/libstdc++-v3/include/tr1/bessel_function.tcc
@@ -131,7 +131,7 @@ namespace tr1
* @param __nu The order of the Bessel functions.
* @param __x The argument of the Bessel functions.
* @param __Jnu The output Bessel function of the first kind.
- * @param __Nnu The output Neumann function (Bessel fuction of the second kind).
+ * @param __Nnu The output Neumann function (Bessel function of the second kind).
* @param __Jpnu The output derivative of the Bessel function of the first kind.
* @param __Npnu The output derivative of the Neumann function.
*/
@@ -345,7 +345,7 @@ namespace tr1
/**
- * @brief This routine computes the asyptotic cylindrical Bessel
+ * @brief This routine computes the asymptotic cylindrical Bessel
* and Neumann functions of order nu: \f$ J_{\nu} \f$,
* \f$ N_{\nu} \f$.
*
@@ -358,7 +358,7 @@ namespace tr1
* @param __nu The order of the Bessel functions.
* @param __x The argument of the Bessel functions.
* @param __Jnu The output Bessel function of the first kind.
- * @param __Nnu The output Neumann function (Bessel fuction of the second kind).
+ * @param __Nnu The output Neumann function (Bessel function of the second kind).
*/
template <typename _Tp>
void
@@ -401,7 +401,7 @@ namespace tr1
* \frac{\sigma^k (x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
* @f]
* where \f$ \sigma = +1 \f$ or\f$ -1 \f$ for
- * \f$ Z = I \f$ or \f$ J \f$ respecively.
+ * \f$ Z = I \f$ or \f$ J \f$ respectively.
*
* See Abramowitz & Stegun, 9.1.10
* Abramowitz & Stegun, 9.6.7
@@ -488,7 +488,7 @@ namespace tr1
/**
- * @brief Return the Neunamm function of order \f$ \nu \f$:
+ * @brief Return the Neumann function of order \f$ \nu \f$:
* \f$ N_{\nu}(x) \f$.
*
* The Neumann function is defined by:
diff --git a/libstdc++-v3/include/tr1/boost_sp_shared_count.h b/libstdc++-v3/include/tr1/boost_sp_shared_count.h
new file mode 100644
index 00000000000..a2de21f4439
--- /dev/null
+++ b/libstdc++-v3/include/tr1/boost_sp_shared_count.h
@@ -0,0 +1,214 @@
+// <tr1/boost_sp_shared_count.h> -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file tr1/boost_sp_shared_count.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+namespace std
+{
+namespace tr1
+{
+
+ template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
+ class _Sp_counted_base_impl
+ : public _Sp_counted_base<_Lp>
+ {
+ public:
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_base_impl(_Ptr __p, _Deleter __d)
+ : _M_ptr(__p), _M_del(__d) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { _M_del(_M_ptr); }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return __ti == typeid(_Deleter) ? &_M_del : 0; }
+
+ private:
+ _Sp_counted_base_impl(const _Sp_counted_base_impl&);
+ _Sp_counted_base_impl& operator=(const _Sp_counted_base_impl&);
+
+ _Ptr _M_ptr; // copy constructor must not throw
+ _Deleter _M_del; // copy constructor must not throw
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __weak_count;
+
+ template<typename _Tp>
+ struct _Sp_deleter
+ {
+ typedef void result_type;
+ typedef _Tp* argument_type;
+ void operator()(_Tp* __p) const { delete __p; }
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __shared_count
+ {
+ public:
+ __shared_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ template<typename _Ptr>
+ __shared_count(_Ptr __p) : _M_pi(0)
+ {
+ try
+ {
+ typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp;
+ _M_pi = new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>(
+ __p, _Sp_deleter<_Tp>());
+ }
+ catch(...)
+ {
+ delete __p;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter>
+ __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+ {
+ try
+ {
+ _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
+ }
+ catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ __throw_exception_again;
+ }
+ }
+
+ // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+ template<typename _Tp>
+ explicit
+ __shared_count(std::auto_ptr<_Tp>& __r)
+ : _M_pi(new _Sp_counted_base_impl<_Tp*,
+ _Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>()))
+ { __r.release(); }
+
+ // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+ explicit
+ __shared_count(const __weak_count<_Lp>& __r);
+
+ ~__shared_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ }
+
+ __shared_count(const __shared_count& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_copy();
+ }
+
+ __shared_count&
+ operator=(const __shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != _M_pi)
+ {
+ if (__tmp != 0)
+ __tmp->_M_add_ref_copy();
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ _M_pi = __tmp;
+ }
+ return *this;
+ }
+
+ void
+ _M_swap(__shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_unique() const // nothrow
+ { return this->_M_get_use_count() == 1; }
+
+ friend inline bool
+ operator==(const __shared_count& __a, const __shared_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ friend inline bool
+ operator<(const __shared_count& __a, const __shared_count& __b)
+ { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
+
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+ private:
+ friend class __weak_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+}
+}
diff --git a/libstdc++-v3/include/tr1/cmath b/libstdc++-v3/include/tr1/cmath
index a7629d28bb3..81a3bfefde6 100644
--- a/libstdc++-v3/include/tr1/cmath
+++ b/libstdc++-v3/include/tr1/cmath
@@ -135,7 +135,7 @@ namespace tr1
return __detail::__beta<__type>(__x, __y);
}
- // 5.2.1.4 Complete elliptic interals of the first kind.
+ // 5.2.1.4 Complete elliptic integrals of the first kind.
inline float
comp_ellint_1f(float __k)
{ return __detail::__comp_ellint_1<float>(__k); }
@@ -152,7 +152,7 @@ namespace tr1
return __detail::__comp_ellint_1<__type>(__k);
}
- // 5.2.1.5 Complete elliptic interals of the second kind.
+ // 5.2.1.5 Complete elliptic integrals of the second kind.
inline float
comp_ellint_2f(float __k)
{ return __detail::__comp_ellint_2<float>(__k); }
@@ -169,7 +169,7 @@ namespace tr1
return __detail::__comp_ellint_2<__type>(__k);
}
- // 5.2.1.6 Complete elliptic interals of the third kind.
+ // 5.2.1.6 Complete elliptic integrals of the third kind.
inline float
comp_ellint_3f(float __k, float __nu)
{ return __detail::__comp_ellint_3<float>(__k, __nu); }
@@ -271,7 +271,7 @@ namespace tr1
return __detail::__cyl_neumann_n<__type>(__nu, __x);
}
- // 5.2.1.12 Incomplete elliptic interals of the first kind.
+ // 5.2.1.12 Incomplete elliptic integrals of the first kind.
inline float
ellint_1f(float __k, float __phi)
{ return __detail::__ellint_1<float>(__k, __phi); }
@@ -288,7 +288,7 @@ namespace tr1
return __detail::__ellint_1<__type>(__k, __phi);
}
- // 5.2.1.13 Incomplete elliptic interals of the second kind.
+ // 5.2.1.13 Incomplete elliptic integrals of the second kind.
inline float
ellint_2f(float __k, float __phi)
{ return __detail::__ellint_2<float>(__k, __phi); }
@@ -305,7 +305,7 @@ namespace tr1
return __detail::__ellint_2<__type>(__k, __phi);
}
- // 5.2.1.14 Incomplete elliptic interals of the third kind.
+ // 5.2.1.14 Incomplete elliptic integrals of the third kind.
inline float
ellint_3f(float __k, float __nu, float __phi)
{ return __detail::__ellint_3<float>(__k, __nu, __phi); }
diff --git a/libstdc++-v3/include/tr1/cstdbool b/libstdc++-v3/include/tr1/cstdbool
index 4e43db3064b..5f6e80eae9e 100644
--- a/libstdc++-v3/include/tr1/cstdbool
+++ b/libstdc++-v3/include/tr1/cstdbool
@@ -34,6 +34,8 @@
#ifndef _GLIBCXX_TR1_CSTDBOOL
#define _GLIBCXX_TR1_CSTDBOOL 1
+#pragma GCC system_header
+
#include <bits/c++config.h>
#if _GLIBCXX_HAVE_STDBOOL_H
diff --git a/libstdc++-v3/include/tr1/ell_integral.tcc b/libstdc++-v3/include/tr1/ell_integral.tcc
index 745b379fb9c..7eaab6f5fe3 100644
--- a/libstdc++-v3/include/tr1/ell_integral.tcc
+++ b/libstdc++-v3/include/tr1/ell_integral.tcc
@@ -313,7 +313,7 @@ namespace tr1
* Based on Carlson's algorithms:
* - B. C. Carlson Numer. Math. 33, 1 (1979)
* - B. C. Carlson, Special Functions of Applied Mathematics (1977)
- * - Nunerical Recipes in C, 2nd ed, pp. 261-269,
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
* by Press, Teukolsky, Vetterling, Flannery (1992)
*
* @param __x The first of two symmetric arguments.
@@ -494,7 +494,7 @@ namespace tr1
* Based on Carlson's algorithms:
* - B. C. Carlson Numer. Math. 33, 1 (1979)
* - B. C. Carlson, Special Functions of Applied Mathematics (1977)
- * - Nunerical Recipes in C, 2nd ed, pp. 261-269,
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
* by Press, Teukolsky, Vetterling, Flannery (1992)
*
* @param __x The first argument.
@@ -563,7 +563,7 @@ namespace tr1
* Based on Carlson's algorithms:
* - B. C. Carlson Numer. Math. 33, 1 (1979)
* - B. C. Carlson, Special Functions of Applied Mathematics (1977)
- * - Nunerical Recipes in C, 2nd ed, pp. 261-269,
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
* by Press, Teukolsky, Vetterling, Flannery (1992)
*
* @param __x The first of three symmetric arguments.
diff --git a/libstdc++-v3/include/tr1/exp_integral.tcc b/libstdc++-v3/include/tr1/exp_integral.tcc
index fa016fc5993..58c62f21de6 100644
--- a/libstdc++-v3/include/tr1/exp_integral.tcc
+++ b/libstdc++-v3/include/tr1/exp_integral.tcc
@@ -509,7 +509,7 @@ namespace tr1
/**
- * The exponential integral @f$ Ei(x) @f$.
+ * @brief Return the exponential integral @f$ Ei(x) @f$.
*
* The exponential integral is given by
* \f[
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional
index d3afe76409b..e5b5f3c5616 100644
--- a/libstdc++-v3/include/tr1/functional
+++ b/libstdc++-v3/include/tr1/functional
@@ -43,13 +43,13 @@
#include <bits/c++config.h>
#include <bits/stl_function.h>
-#include <cmath>
-#include <string>
#include <typeinfo>
-#include <ext/type_traits.h>
+#include <new>
#include <tr1/tuple>
#include <tr1/type_traits>
+#include <bits/stringfwd.h>
#include <tr1/functional_hash.h>
+#include <ext/type_traits.h>
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
# include <tr1_impl/functional>
diff --git a/libstdc++-v3/include/tr1/gamma.tcc b/libstdc++-v3/include/tr1/gamma.tcc
index 06702e3cbce..06a88d94f0e 100644
--- a/libstdc++-v3/include/tr1/gamma.tcc
+++ b/libstdc++-v3/include/tr1/gamma.tcc
@@ -383,7 +383,7 @@ namespace tr1
* @brief Return the digamma function for large argument.
* The digamma or @f$ \psi(x) @f$ function is defined by
* @f[
- * \psi(x) = \frac{Gamma'(x)}{\Gamma(x)}
+ * \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}
* @f]
*
* The asymptotic series is given by:
@@ -416,7 +416,7 @@ namespace tr1
* @brief Return the digamma function.
* The digamma or @f$ \psi(x) @f$ function is defined by
* @f[
- * \psi(x) = \frac{Gamma'(x)}{\Gamma(x)}
+ * \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}
* @f]
* For negative argument the reflection formula is used:
* @f[
diff --git a/libstdc++-v3/include/tr1/hypergeometric.tcc b/libstdc++-v3/include/tr1/hypergeometric.tcc
index 17fa959ba9b..29c388f9a43 100644
--- a/libstdc++-v3/include/tr1/hypergeometric.tcc
+++ b/libstdc++-v3/include/tr1/hypergeometric.tcc
@@ -66,7 +66,7 @@ namespace tr1
{
/**
- * @brief This routine returns the confluent hypereometric function
+ * @brief This routine returns the confluent hypergeometric function
* by series expansion.
*
* @f[
@@ -78,7 +78,7 @@ namespace tr1
*
* If a and b are integers and a < 0 and either b > 0 or b < a then the
* series is a polynomial with a finite number of terms. If b is an integer
- * and b <= 0 the the confluent hypergeometric function is undefined.
+ * and b <= 0 the confluent hypergeometric function is undefined.
*
* @param __a The "numerator" parameter.
* @param __c The "denominator" parameter.
@@ -714,7 +714,7 @@ namespace tr1
}
- /*
+ /**
* @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$.
*
* The hypogeometric function is defined by
diff --git a/libstdc++-v3/include/tr1/legendre_function.tcc b/libstdc++-v3/include/tr1/legendre_function.tcc
index 839459f49a0..da49a3aaa08 100644
--- a/libstdc++-v3/include/tr1/legendre_function.tcc
+++ b/libstdc++-v3/include/tr1/legendre_function.tcc
@@ -128,7 +128,7 @@ namespace tr1
* on @f$ l @f$.
*
* The associated Legendre function is derived from the Legendre function
- * @f$ P_l(x) @f$ by the Rodruigez formula:
+ * @f$ P_l(x) @f$ by the Rodrigues formula:
* @f[
* P_l^m(x) = (1 - x^2)^{m/2}\frac{d^m}{dx^m}P_l(x)
* @f]
diff --git a/libstdc++-v3/include/tr1/memory b/libstdc++-v3/include/tr1/memory
index 3cf92f46b1d..134b5bd3f25 100644
--- a/libstdc++-v3/include/tr1/memory
+++ b/libstdc++-v3/include/tr1/memory
@@ -54,12 +54,16 @@
#include <tr1/type_traits>
#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <tr1/boost_sp_shared_count.h>
# include <tr1_impl/boost_shared_ptr.h>
#else
# define _GLIBCXX_INCLUDE_AS_TR1
# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
# define _GLIBCXX_END_NAMESPACE_TR1 }
# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <tr1/boost_sp_shared_count.h>
# include <tr1_impl/boost_shared_ptr.h>
# undef _GLIBCXX_TR1
# undef _GLIBCXX_END_NAMESPACE_TR1
diff --git a/libstdc++-v3/include/tr1/poly_laguerre.tcc b/libstdc++-v3/include/tr1/poly_laguerre.tcc
index 46c51a57411..4164d90d231 100644
--- a/libstdc++-v3/include/tr1/poly_laguerre.tcc
+++ b/libstdc++-v3/include/tr1/poly_laguerre.tcc
@@ -286,7 +286,7 @@ namespace tr1
/**
* @brief This routine returns the associated Laguerre polynomial
- * of order n, degree m: @f$ L_n^m @f$.
+ * of order n, degree m: @f$ L_n^m(x) @f$.
*
* The associated Laguerre polynomial is defined for integral
* @f$ \alpha = m @f$ by:
@@ -314,7 +314,7 @@ namespace tr1
/**
- * @brief This routine returns the associated Laguerre polynomial
+ * @brief This routine returns the Laguerre polynomial
* of order n: @f$ L_n(x) @f$.
*
* The Laguerre polynomial is defined by:
diff --git a/libstdc++-v3/include/tr1/tuple b/libstdc++-v3/include/tr1/tuple
index 0c7ed3f60ae..ae6a36cd066 100644
--- a/libstdc++-v3/include/tr1/tuple
+++ b/libstdc++-v3/include/tr1/tuple
@@ -1,6 +1,6 @@
// class template tuple -*- C++ -*-
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -39,24 +39,389 @@
#pragma GCC system_header
-#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
-# error TR1 header cannot be included from C++0x header
-#endif
-
#include <utility>
-#if defined(_GLIBCXX_INCLUDE_AS_TR1)
-# include <tr1_impl/tuple>
-#else
-# define _GLIBCXX_INCLUDE_AS_TR1
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
-# define _GLIBCXX_END_NAMESPACE_TR1 }
-# define _GLIBCXX_TR1 tr1::
-# include <tr1_impl/tuple>
-# undef _GLIBCXX_TR1
-# undef _GLIBCXX_END_NAMESPACE_TR1
-# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
-# undef _GLIBCXX_INCLUDE_AS_TR1
-#endif
+namespace std
+{
+namespace tr1
+{
+ // Adds a const reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_c_ref
+ { typedef const _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_c_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ // Adds a reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_ref
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ /**
+ * Contains the actual implementation of the @c tuple template, stored
+ * as a recursive inheritance hierarchy from the first element (most
+ * derived class) to the last (least derived class). The @c Idx
+ * parameter gives the 0-based index of the element stored at this
+ * point in the hierarchy; we use it to implement a constant-time
+ * get() operation.
+ */
+ template<int _Idx, typename... _Elements>
+ struct _Tuple_impl;
+
+ /**
+ * Zero-element tuple implementation. This is the basis case for the
+ * inheritance recursion.
+ */
+ template<int _Idx>
+ struct _Tuple_impl<_Idx> { };
+
+ /**
+ * Recursive tuple implementation. Here we store the @c Head element
+ * and derive from a @c Tuple_impl containing the remaining elements
+ * (which contains the @c Tail).
+ */
+ template<int _Idx, typename _Head, typename... _Tail>
+ struct _Tuple_impl<_Idx, _Head, _Tail...>
+ : public _Tuple_impl<_Idx + 1, _Tail...>
+ {
+ typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
+
+ _Head _M_head;
+
+ _Inherited& _M_tail() { return *this; }
+ const _Inherited& _M_tail() const { return *this; }
+
+ _Tuple_impl() : _Inherited(), _M_head() { }
+
+ explicit
+ _Tuple_impl(typename __add_c_ref<_Head>::type __head,
+ typename __add_c_ref<_Tail>::type... __tail)
+ : _Inherited(__tail...), _M_head(__head) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
+ : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
+
+ _Tuple_impl(const _Tuple_impl& __in)
+ : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
+ {
+ _M_head = __in._M_head;
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ _Tuple_impl&
+ operator=(const _Tuple_impl& __in)
+ {
+ _M_head = __in._M_head;
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+ };
+
+ template<typename... _Elements>
+ class tuple : public _Tuple_impl<0, _Elements...>
+ {
+ typedef _Tuple_impl<0, _Elements...> _Inherited;
+
+ public:
+ tuple() : _Inherited() { }
+
+ explicit
+ tuple(typename __add_c_ref<_Elements>::type... __elements)
+ : _Inherited(__elements...) { }
+
+ template<typename... _UElements>
+ tuple(const tuple<_UElements...>& __in)
+ : _Inherited(__in) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(__in) { }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(const tuple<_UElements...>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+ };
+
+ template<> class tuple<> { };
+
+ // 2-element tuple, with construction and assignment from a pair.
+ template<typename _T1, typename _T2>
+ class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
+ {
+ typedef _Tuple_impl<0, _T1, _T2> _Inherited;
+
+ public:
+ tuple() : _Inherited() { }
+
+ explicit
+ tuple(typename __add_c_ref<_T1>::type __a1,
+ typename __add_c_ref<_T2>::type __a2)
+ : _Inherited(__a1, __a2) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const tuple<_U1, _U2>& __in)
+ : _Inherited(__in) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(__in) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const pair<_U1, _U2>& __in)
+ : _Inherited(_Tuple_impl<0,
+ typename __add_c_ref<_U1>::type,
+ typename __add_c_ref<_U2>::type>(__in.first,
+ __in.second))
+ { }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const tuple<_U1, _U2>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const pair<_U1, _U2>& __in)
+ {
+ this->_M_head = __in.first;
+ this->_M_tail()._M_head = __in.second;
+ return *this;
+ }
+ };
+
+
+ /// Gives the type of the ith element of a given tuple type.
+ template<int __i, typename _Tp>
+ struct tuple_element;
+
+ /**
+ * Recursive case for tuple_element: strip off the first element in
+ * the tuple and retrieve the (i-1)th element of the remaining tuple.
+ */
+ template<int __i, typename _Head, typename... _Tail>
+ struct tuple_element<__i, tuple<_Head, _Tail...> >
+ : tuple_element<__i - 1, tuple<_Tail...> > { };
+
+ /**
+ * Basis case for tuple_element: The first element is the one we're seeking.
+ */
+ template<typename _Head, typename... _Tail>
+ struct tuple_element<0, tuple<_Head, _Tail...> >
+ {
+ typedef _Head type;
+ };
+
+ /// Finds the size of a given tuple type.
+ template<typename _Tp>
+ struct tuple_size;
+
+ /// @brief class tuple_size
+ template<typename... _Elements>
+ struct tuple_size<tuple<_Elements...> >
+ {
+ static const int value = sizeof...(_Elements);
+ };
+
+ template<typename... _Elements>
+ const int tuple_size<tuple<_Elements...> >::value;
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_ref<_Head>::type
+ __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
+ {
+ return __t._M_head;
+ }
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_c_ref<_Head>::type
+ __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
+ {
+ return __t._M_head;
+ }
+
+ // Return a reference (const reference) to the ith element of a tuple.
+ // Any const or non-const ref elements are returned with their original type.
+ template<int __i, typename... _Elements>
+ inline typename __add_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(tuple<_Elements...>& __t)
+ {
+ return __get_helper<__i>(__t);
+ }
+
+ template<int __i, typename... _Elements>
+ inline typename __add_c_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(const tuple<_Elements...>& __t)
+ {
+ return __get_helper<__i>(__t);
+ }
+
+ // This class helps construct the various comparison operations on tuples
+ template<int __check_equal_size, int __i, int __j,
+ typename _Tp, typename _Up>
+ struct __tuple_compare;
+
+ template<int __i, int __j, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __j, _Tp, _Up>
+ {
+ static bool __eq(const _Tp& __t, const _Up& __u)
+ {
+ return (get<__i>(__t) == get<__i>(__u) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ static bool __less(const _Tp& __t, const _Up& __u)
+ {
+ return ((get<__i>(__t) < get<__i>(__u))
+ || !(get<__i>(__u) < get<__i>(__t)) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u));
+ }
+ };
+
+ template<int __i, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __i, _Tp, _Up>
+ {
+ static bool __eq(const _Tp&, const _Up&)
+ { return true; }
+
+ static bool __less(const _Tp&, const _Up&)
+ { return false; }
+ };
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator==(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator<(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator!=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t == __u); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return __u < __t; }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator<=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__u < __t); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t < __u); }
+
+ template<typename _Tp>
+ class reference_wrapper;
+
+ // Helper which adds a reference to a type when given a reference_wrapper
+ template<typename _Tp>
+ struct __strip_reference_wrapper
+ {
+ typedef _Tp __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename... _Elements>
+ inline tuple<typename __strip_reference_wrapper<_Elements>::__type...>
+ make_tuple(_Elements... __args)
+ {
+ typedef tuple<typename __strip_reference_wrapper<_Elements>::__type...>
+ __result_type;
+ return __result_type(__args...);
+ }
+
+ template<typename... _Elements>
+ inline tuple<_Elements&...>
+ tie(_Elements&... __args)
+ {
+ return tuple<_Elements&...>(__args...);
+ }
+
+ // A class (and instance) which can be used in 'tie' when an element
+ // of a tuple is not required
+ struct _Swallow_assign
+ {
+ template<class _Tp>
+ _Swallow_assign&
+ operator=(const _Tp&)
+ { return *this; }
+ };
+
+ // TODO: Put this in some kind of shared file.
+ namespace
+ {
+ _Swallow_assign ignore;
+ }; // anonymous namespace
+}
+}
#endif // _GLIBCXX_TR1_TUPLE
diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits
index b9b60cfbda1..4533ee5dc6c 100644
--- a/libstdc++-v3/include/tr1/type_traits
+++ b/libstdc++-v3/include/tr1/type_traits
@@ -60,19 +60,16 @@ namespace std
{
namespace tr1
{
-#define _DEFINE_SPEC_BODY(_Value) \
- : public integral_constant<bool, _Value> { };
-
-#define _DEFINE_SPEC_0_HELPER(_Spec, _Value) \
- template<> \
- struct _Spec \
- _DEFINE_SPEC_BODY(_Value)
+#define _DEFINE_SPEC_HELPER(_Spec) \
+ template<> \
+ struct _Spec \
+ : public true_type { };
-#define _DEFINE_SPEC(_Order, _Trait, _Type, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type const>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type volatile>, _Value) \
- _DEFINE_SPEC_##_Order##_HELPER(_Trait<_Type const volatile>, _Value)
+#define _DEFINE_SPEC(_Trait, _Type) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type const>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type volatile>) \
+ _DEFINE_SPEC_HELPER(_Trait<_Type const volatile>)
template<typename>
struct is_reference
@@ -125,20 +122,20 @@ namespace tr1
template<typename>
struct is_signed
: public false_type { };
- _DEFINE_SPEC(0, is_signed, signed char, true)
- _DEFINE_SPEC(0, is_signed, short, true)
- _DEFINE_SPEC(0, is_signed, int, true)
- _DEFINE_SPEC(0, is_signed, long, true)
- _DEFINE_SPEC(0, is_signed, long long, true)
+ _DEFINE_SPEC(is_signed, signed char)
+ _DEFINE_SPEC(is_signed, short)
+ _DEFINE_SPEC(is_signed, int)
+ _DEFINE_SPEC(is_signed, long)
+ _DEFINE_SPEC(is_signed, long long)
template<typename>
struct is_unsigned
: public false_type { };
- _DEFINE_SPEC(0, is_unsigned, unsigned char, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned short, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned int, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned long, true)
- _DEFINE_SPEC(0, is_unsigned, unsigned long long, true)
+ _DEFINE_SPEC(is_unsigned, unsigned char)
+ _DEFINE_SPEC(is_unsigned, unsigned short)
+ _DEFINE_SPEC(is_unsigned, unsigned int)
+ _DEFINE_SPEC(is_unsigned, unsigned long)
+ _DEFINE_SPEC(is_unsigned, unsigned long long)
template<typename _Base, typename _Derived>
struct __is_base_of_helper
@@ -171,6 +168,9 @@ namespace tr1
};
template<typename _Tp>
+ struct add_reference;
+
+ template<typename _Tp>
struct __is_int_or_cref
{
typedef typename remove_reference<_Tp>::type __rr_Tp;
@@ -230,9 +230,19 @@ namespace tr1
: public __add_reference_helper<_Tp>
{ };
-#undef _DEFINE_SPEC_0_HELPER
+ /// @brief other transformations [4.8].
+ template<std::size_t _Len, std::size_t _Align>
+ struct aligned_storage
+ {
+ union type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__((_Align)))) { } __align;
+ };
+ };
+
+#undef _DEFINE_SPEC_HELPER
#undef _DEFINE_SPEC
-#undef _DEFINE_SPEC_BODY
}
}
diff --git a/libstdc++-v3/include/tr1/unordered_map b/libstdc++-v3/include/tr1/unordered_map
index 85e8f0015c4..5ab294012db 100644
--- a/libstdc++-v3/include/tr1/unordered_map
+++ b/libstdc++-v3/include/tr1/unordered_map
@@ -40,12 +40,11 @@
# error TR1 header cannot be included from C++0x header
#endif
-#include <cmath>
-#include <string>
#include <utility>
-#include <algorithm> // lower_bound
+#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
#include <tr1/type_traits>
#include <tr1/functional_hash.h>
#include <tr1/hashtable.h>
diff --git a/libstdc++-v3/include/tr1/unordered_set b/libstdc++-v3/include/tr1/unordered_set
index 35c605ff681..8811d4a1f2b 100644
--- a/libstdc++-v3/include/tr1/unordered_set
+++ b/libstdc++-v3/include/tr1/unordered_set
@@ -40,12 +40,11 @@
# error TR1 header cannot be included from C++0x header
#endif
-#include <cmath>
-#include <string>
#include <utility>
-#include <algorithm> // lower_bound
+#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
#include <tr1/type_traits>
#include <tr1/functional_hash.h>
#include <tr1/hashtable.h>
diff --git a/libstdc++-v3/include/tr1_impl/array b/libstdc++-v3/include/tr1_impl/array
index 0fda088aa53..7a13ba8ff8d 100644
--- a/libstdc++-v3/include/tr1_impl/array
+++ b/libstdc++-v3/include/tr1_impl/array
@@ -36,7 +36,7 @@ namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
- /// @brief struct array [6.2.2].
+ /// @brief struct array.
/// NB: Requires complete type _Tp.
template<typename _Tp, std::size_t _Nm>
struct array
@@ -52,7 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
// Support for zero-sized arrays mandatory.
- value_type _M_instance[_Nm ? _Nm : 1] __attribute__((__aligned__));
+ value_type _M_instance[_Nm ? _Nm : 1];
// No explicit construct/copy/destroy for aggregate type.
@@ -97,6 +97,24 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
rend() const
{ return const_reverse_iterator(begin()); }
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const_iterator
+ cbegin() const
+ { return const_iterator(&_M_instance[0]); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(&_M_instance[_Nm]); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
// Capacity.
size_type
size() const { return _Nm; }
@@ -118,15 +136,17 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
reference
at(size_type __n)
- {
- _M_check<_Nm>(__n);
+ {
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
return _M_instance[__n];
}
const_reference
at(size_type __n) const
{
- _M_check<_Nm>(__n);
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
return _M_instance[__n];
}
@@ -153,21 +173,6 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const _Tp*
data() const
{ return &_M_instance[0]; }
-
- private:
- template<std::size_t _Mm>
- typename __gnu_cxx::__enable_if<_Mm, void>::__type
- _M_check(size_type __n) const
- {
- if (__builtin_expect(__n >= _Mm, false))
- std::__throw_out_of_range(__N("array::_M_check"));
- }
-
- // Avoid "unsigned comparison with zero" warnings.
- template<std::size_t _Mm>
- typename __gnu_cxx::__enable_if<!_Mm, void>::__type
- _M_check(size_type) const
- { std::__throw_out_of_range(__N("array::_M_check")); }
};
// Array comparisons.
diff --git a/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h b/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h
index d211055c58a..53f8c0febf5 100644
--- a/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h
+++ b/libstdc++-v3/include/tr1_impl/boost_shared_ptr.h
@@ -51,306 +51,11 @@
* You should not attempt to use it directly.
*/
+
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
- class bad_weak_ptr : public std::exception
- {
- public:
- virtual char const*
- what() const throw()
- { return "tr1::bad_weak_ptr"; }
- };
-
- // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
- inline void
- __throw_bad_weak_ptr()
- {
-#if __EXCEPTIONS
- throw bad_weak_ptr();
-#else
- __builtin_abort();
-#endif
- }
-
- using __gnu_cxx::_Lock_policy;
- using __gnu_cxx::__default_lock_policy;
- using __gnu_cxx::_S_single;
- using __gnu_cxx::_S_mutex;
- using __gnu_cxx::_S_atomic;
-
- template<typename _Tp>
- struct _Sp_deleter
- {
- typedef void result_type;
- typedef _Tp* argument_type;
-
- void
- operator()(_Tp* __p) const
- { delete __p; }
- };
-
- // Empty helper class except when the template argument is _S_mutex.
- template<_Lock_policy _Lp>
- class _Mutex_base
- { };
-
- template<>
- class _Mutex_base<_S_mutex>
- : public __gnu_cxx::__mutex
- { };
-
- template<_Lock_policy _Lp = __default_lock_policy>
- class _Sp_counted_base
- : public _Mutex_base<_Lp>
- {
- public:
- _Sp_counted_base()
- : _M_use_count(1), _M_weak_count(1) { }
-
- virtual
- ~_Sp_counted_base() // nothrow
- { }
-
- // Called when _M_use_count drops to zero, to release the resources
- // managed by *this.
- virtual void
- _M_dispose() = 0; // nothrow
-
- // Called when _M_weak_count drops to zero.
- virtual void
- _M_destroy() // nothrow
- { delete this; }
-
- virtual void*
- _M_get_deleter(const std::type_info&) = 0;
-
- void
- _M_add_ref_copy()
- { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
-
- void
- _M_add_ref_lock();
-
- void
- _M_release() // nothrow
- {
- if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count,
- -1) == 1)
- {
- _M_dispose();
-#ifdef __GTHREADS
- _GLIBCXX_READ_MEM_BARRIER;
- _GLIBCXX_WRITE_MEM_BARRIER;
-#endif
- if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
- -1) == 1)
- _M_destroy();
- }
- }
-
- void
- _M_weak_add_ref() // nothrow
- { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
-
- void
- _M_weak_release() // nothrow
- {
- if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
- {
-#ifdef __GTHREADS
- _GLIBCXX_READ_MEM_BARRIER;
- _GLIBCXX_WRITE_MEM_BARRIER;
-#endif
- _M_destroy();
- }
- }
-
- long
- _M_get_use_count() const // nothrow
- { return _M_use_count; } // XXX is this MT safe?
-
- private:
- _Sp_counted_base(_Sp_counted_base const&);
- _Sp_counted_base& operator=(_Sp_counted_base const&);
-
- _Atomic_word _M_use_count; // #shared
- _Atomic_word _M_weak_count; // #weak + (#shared != 0)
- };
-
- template<>
- inline void
- _Sp_counted_base<_S_single>::
- _M_add_ref_lock()
- {
- if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
- {
- _M_use_count = 0;
- __throw_bad_weak_ptr();
- }
- }
-
- template<>
- inline void
- _Sp_counted_base<_S_mutex>::
- _M_add_ref_lock()
- {
- __gnu_cxx::__scoped_lock sentry(*this);
- if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
- {
- _M_use_count = 0;
- __throw_bad_weak_ptr();
- }
- }
-
- template<>
- inline void
- _Sp_counted_base<_S_atomic>::
- _M_add_ref_lock()
- {
- // Perform lock-free add-if-not-zero operation.
- _Atomic_word __count;
- do
- {
- __count = _M_use_count;
- if (__count == 0)
- __throw_bad_weak_ptr();
-
- // Replace the current counter value with the old value + 1, as
- // long as it's not changed meanwhile.
- }
- while (!__sync_bool_compare_and_swap(&_M_use_count, __count,
- __count + 1));
- }
-
- template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
- class _Sp_counted_base_impl
- : public _Sp_counted_base<_Lp>
- {
- public:
- /**
- * @brief
- * @pre __d(__p) must not throw.
- */
- _Sp_counted_base_impl(_Ptr __p, _Deleter __d)
- : _M_ptr(__p), _M_del(__d) { }
-
- virtual void
- _M_dispose() // nothrow
- { _M_del(_M_ptr); }
-
- virtual void*
- _M_get_deleter(const std::type_info& __ti)
- { return __ti == typeid(_Deleter) ? &_M_del : 0; }
-
- private:
- _Sp_counted_base_impl(const _Sp_counted_base_impl&);
- _Sp_counted_base_impl& operator=(const _Sp_counted_base_impl&);
-
- _Ptr _M_ptr; // copy constructor must not throw
- _Deleter _M_del; // copy constructor must not throw
- };
-
- template<_Lock_policy _Lp = __default_lock_policy>
- class __weak_count;
-
- template<_Lock_policy _Lp = __default_lock_policy>
- class __shared_count
- {
- public:
- __shared_count()
- : _M_pi(0) // nothrow
- { }
-
- template<typename _Ptr, typename _Deleter>
- __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
- {
- try
- {
- _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
- }
- catch(...)
- {
- __d(__p); // Call _Deleter on __p.
- __throw_exception_again;
- }
- }
-
- // Special case for auto_ptr<_Tp> to provide the strong guarantee.
- template<typename _Tp>
- explicit
- __shared_count(std::auto_ptr<_Tp>& __r)
- : _M_pi(new _Sp_counted_base_impl<_Tp*,
- _Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>()))
- { __r.release(); }
-
- // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
- explicit
- __shared_count(const __weak_count<_Lp>& __r);
-
- ~__shared_count() // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_release();
- }
-
- __shared_count(const __shared_count& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_add_ref_copy();
- }
-
- __shared_count&
- operator=(const __shared_count& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- if (__tmp != _M_pi)
- {
- if (__tmp != 0)
- __tmp->_M_add_ref_copy();
- if (_M_pi != 0)
- _M_pi->_M_release();
- _M_pi = __tmp;
- }
- return *this;
- }
-
- void
- _M_swap(__shared_count& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- __r._M_pi = _M_pi;
- _M_pi = __tmp;
- }
-
- long
- _M_get_use_count() const // nothrow
- { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
-
- bool
- _M_unique() const // nothrow
- { return this->_M_get_use_count() == 1; }
-
- friend inline bool
- operator==(const __shared_count& __a, const __shared_count& __b)
- { return __a._M_pi == __b._M_pi; }
-
- friend inline bool
- operator<(const __shared_count& __a, const __shared_count& __b)
- { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
-
- void*
- _M_get_deleter(const std::type_info& __ti) const
- { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
-
- private:
- friend class __weak_count<_Lp>;
-
- _Sp_counted_base<_Lp>* _M_pi;
- };
-
template<_Lock_policy _Lp>
class __weak_count
{
@@ -429,6 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Sp_counted_base<_Lp>* _M_pi;
};
+ // now that __weak_count is defined we can define this constructor:
template<_Lock_policy _Lp>
inline
__shared_count<_Lp>::
@@ -440,7 +146,6 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
else
__throw_bad_weak_ptr();
}
-
// Forward declarations.
template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
@@ -483,9 +188,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{ }
+#ifdef _GLIBCXX_INCLUDE_AS_TR1
struct __static_cast_tag { };
struct __const_cast_tag { };
struct __dynamic_cast_tag { };
+#endif
/**
* @class shared_ptr <tr1/memory>
@@ -515,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp1>
explicit
__shared_ptr(_Tp1* __p)
- : _M_ptr(__p), _M_refcount(__p, _Sp_deleter<_Tp1>())
+ : _M_ptr(__p), _M_refcount(__p)
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
// __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
@@ -523,7 +230,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
//
- // Requirements: _Deleter' copy constructor and destructor must not throw
+ // Requirements: _Deleter's copy constructor and destructor must not throw
//
// __shared_ptr will release __p by calling __d(__p)
//
@@ -536,13 +243,58 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
*/
template<typename _Tp1, typename _Deleter>
__shared_ptr(_Tp1* __p, _Deleter __d)
- : _M_ptr(__p), _M_refcount(__p, __d)
+ : _M_ptr(__p), _M_refcount(__p, __d)
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
// TODO requires _Deleter CopyConstructible and __d(__p) well-formed
__enable_shared_from_this_helper(_M_refcount, __p, __p);
}
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ //
+ // Requirements: _Deleter's copy constructor and destructor must not throw
+ // _Alloc's copy constructor and destructor must not throw.
+ //
+ // __shared_ptr will release __p by calling __d(__p)
+ //
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ * and the deleter @a __d.
+ * @param __p A pointer.
+ * @param __d A deleter.
+ * @param __a An allocator.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @a __d(__p) is called.
+ */
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ __shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : _M_ptr(__p), _M_refcount(__p, __d, __a)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ /** @brief Constructs a %__shared_ptr instance that stores @a __p
+ * and shares ownership with @a __r.
+ * @param __r A %__shared_ptr.
+ * @param __p A pointer that will remain valid while @a *__r is valid.
+ * @post get() == __p && use_count() == __r.use_count()
+ *
+ * This can be used to construct a @c shared_ptr to a sub-object
+ * of an object managed by an existing @c shared_ptr.
+ *
+ * @code
+ * shared_ptr< pair<int,int> > pii(new pair<int,int>());
+ * shared_ptr<int> pi(pii, &pii->first);
+ * assert(pii.use_count() == 2);
+ * @endcode
+ */
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
+ : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
+ { }
+#endif
+
// generated copy constructor, assignment, destructor are fine.
/** @brief If @a __r is empty, constructs an empty %__shared_ptr;
@@ -550,13 +302,38 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* with @a __r.
* @param __r A %__shared_ptr.
* @post get() == __r.get() && use_count() == __r.use_count()
- * @throw std::bad_alloc, in which case
*/
template<typename _Tp1>
__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ /** @brief Move-constructs a %__shared_ptr instance from @a __r.
+ * @param __r A %__shared_ptr rvalue.
+ * @post *this contains the old value of @a __r, @a __r is empty.
+ */
+ __shared_ptr(__shared_ptr&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+
+ /** @brief Move-constructs a %__shared_ptr instance from @a __r.
+ * @param __r A %__shared_ptr rvalue.
+ * @post *this contains the old value of @a __r, @a __r is empty.
+ */
+ template<typename _Tp1>
+ __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+#endif
+
/** @brief Constructs a %__shared_ptr that shares ownership with @a __r
* and stores a copy of the pointer stored in @a __r.
* @param __r A weak_ptr.
@@ -578,18 +355,21 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* @post use_count() == 1 and __r.get() == 0
*/
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
template<typename _Tp1>
explicit
__shared_ptr(std::auto_ptr<_Tp1>& __r)
: _M_ptr(__r.get()), _M_refcount()
{
- // TODO requires __r.release() convertible to _Tp*, _Tp1 is complete,
- // delete __r.release() well-formed
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Tp1 is complete, delete __r.release() well-formed
_Tp1* __tmp = __r.get();
_M_refcount = __shared_count<_Lp>(__r);
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
}
+#endif
+#ifdef _GLIBCXX_INCLUDE_AS_TR1
template<typename _Tp1>
__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, __static_cast_tag)
: _M_ptr(static_cast<element_type*>(__r._M_ptr)),
@@ -610,6 +390,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
if (_M_ptr == 0) // need to allocate new counter -- the cast failed
_M_refcount = __shared_count<_Lp>();
}
+#endif
template<typename _Tp1>
__shared_ptr&
@@ -620,6 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
return *this;
}
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
template<typename _Tp1>
__shared_ptr&
operator=(std::auto_ptr<_Tp1>& __r)
@@ -627,6 +409,24 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__shared_ptr(__r).swap(*this);
return *this;
}
+#endif
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __shared_ptr&
+ operator=(__shared_ptr&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ template<class _Tp1>
+ __shared_ptr&
+ operator=(__shared_ptr<_Tp1, _Lp>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+#endif
void
reset() // never throws
@@ -646,10 +446,16 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
reset(_Tp1* __p, _Deleter __d)
{ __shared_ptr(__p, __d).swap(*this); }
- // Allow class instantiation when _Tp is [cv-qual] void.
#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ void
+ reset(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ { __shared_ptr(__p, __d, __a).swap(*this); }
+
+ // Allow class instantiation when _Tp is [cv-qual] void.
typename std::add_lvalue_reference<_Tp>::type
#else
+ // Allow class instantiation when _Tp is [cv-qual] void.
typename std::tr1::add_reference<_Tp>::type
#endif
operator*() const // never throws
@@ -692,6 +498,26 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_M_refcount._M_swap(__other._M_refcount);
}
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ protected:
+ // This constructor is non-standard, it is used by allocate_shared.
+ template<typename _Alloc, typename... _Args>
+ __shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : _M_ptr()
+ , _M_refcount(__tag, (_Tp*)0, __a, std::forward<_Args>(__args)...)
+ {
+ // _M_ptr needs to point to the newly constructed object.
+ // This relies on _Sp_counted_ptr_inplace::_M_get_deleter.
+ void * __p = _M_refcount._M_get_deleter(typeid(__tag));
+ _M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
+ typename... _Args>
+ friend __shared_ptr<_Tp1, _Lp1>
+ __allocate_shared(_Alloc __a, _Args&&... __args);
+#endif
+
private:
void*
_M_get_deleter(const std::type_info& __ti) const
@@ -741,9 +567,15 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- __shared_ptr<_Tp, _Lp>
+ inline __shared_ptr<_Tp, _Lp>
static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- { return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get()));
+#else
+ return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag());
+#endif
+ }
/** @warning The seemingly equivalent
* <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
@@ -751,9 +583,15 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- __shared_ptr<_Tp, _Lp>
+ inline __shared_ptr<_Tp, _Lp>
const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- { return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get()));
+#else
+ return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag());
+#endif
+ }
/** @warning The seemingly equivalent
* <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
@@ -761,9 +599,17 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- __shared_ptr<_Tp, _Lp>
+ inline __shared_ptr<_Tp, _Lp>
dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- { return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+ return __shared_ptr<_Tp, _Lp>(__r, __p);
+ return __shared_ptr<_Tp, _Lp>();
+#else
+ return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag());
+#endif
+ }
// 2.2.3.7 shared_ptr I/O
template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
@@ -856,7 +702,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
// Q: How can we get here?
// A: Another thread may have invalidated r after the
// use_count test above.
- return __shared_ptr<element_type>();
+ return __shared_ptr<element_type, _Lp>();
}
#else
@@ -984,20 +830,43 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
shared_ptr(_Tp1* __p, _Deleter __d)
: __shared_ptr<_Tp>(__p, __d) { }
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : __shared_ptr<_Tp>(__p, __d, __a) { }
+
+ // Aliasing constructor
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
+ : __shared_ptr<_Tp>(__r, __p) { }
+#endif
+
template<typename _Tp1>
shared_ptr(const shared_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ shared_ptr(shared_ptr&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+
+ template<typename _Tp1>
+ shared_ptr(shared_ptr<_Tp1>&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+#endif
+
template<typename _Tp1>
explicit
shared_ptr(const weak_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
template<typename _Tp1>
explicit
shared_ptr(std::auto_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
+#endif
+#ifdef _GLIBCXX_INCLUDE_AS_TR1
template<typename _Tp1>
shared_ptr(const shared_ptr<_Tp1>& __r, __static_cast_tag)
: __shared_ptr<_Tp>(__r, __static_cast_tag()) { }
@@ -1009,6 +878,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp1>
shared_ptr(const shared_ptr<_Tp1>& __r, __dynamic_cast_tag)
: __shared_ptr<_Tp>(__r, __dynamic_cast_tag()) { }
+#endif
template<typename _Tp1>
shared_ptr&
@@ -1018,6 +888,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
return *this;
}
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
template<typename _Tp1>
shared_ptr&
operator=(std::auto_ptr<_Tp1>& __r)
@@ -1025,22 +896,73 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
this->__shared_ptr<_Tp>::operator=(__r);
return *this;
}
+#endif
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ shared_ptr&
+ operator=(shared_ptr&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+
+ template<class _Tp1>
+ shared_ptr&
+ operator=(shared_ptr<_Tp1>&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+#endif
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ private:
+ // This constructor is non-standard, it is used by allocate_shared.
+ template<typename _Alloc, typename... _Args>
+ shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
+ { }
+
+ template<typename _Tp1, typename _Alloc, typename... _Args>
+ friend shared_ptr<_Tp1>
+ allocate_shared(_Alloc __a, _Args&&... __args);
+#endif
};
template<typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
+ inline shared_ptr<_Tp>
static_pointer_cast(const shared_ptr<_Tp1>& __r)
- { return shared_ptr<_Tp>(__r, __static_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get()));
+#else
+ return shared_ptr<_Tp>(__r, __static_cast_tag());
+#endif
+ }
template<typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
+ inline shared_ptr<_Tp>
const_pointer_cast(const shared_ptr<_Tp1>& __r)
- { return shared_ptr<_Tp>(__r, __const_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get()));
+#else
+ return shared_ptr<_Tp>(__r, __const_cast_tag());
+#endif
+ }
template<typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
+ inline shared_ptr<_Tp>
dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
- { return shared_ptr<_Tp>(__r, __dynamic_cast_tag()); }
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+ return shared_ptr<_Tp>(__r, __p);
+ return shared_ptr<_Tp>();
+#else
+ return shared_ptr<_Tp>(__r, __dynamic_cast_tag());
+#endif
+ }
// The actual TR1 weak_ptr, with forwarding constructors and
@@ -1142,5 +1064,57 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
mutable weak_ptr<_Tp> _M_weak_this;
};
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __allocate_shared(_Alloc __a, _Args&&... __args)
+ {
+ return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(),
+ std::forward<_Alloc>(__a), std::forward<_Args>(__args)...);
+ }
+
+ template<typename _Tp, _Lock_policy _Lp, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __make_shared(_Args&&... __args)
+ {
+ typedef typename std::remove_const<_Tp>::type _Tp_nc;
+ return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
+ }
+
+ /** @brief Create an object that is owned by a shared_ptr.
+ * @param __a An allocator.
+ * @param __args Arguments for the @a _Tp object's constructor.
+ * @return A shared_ptr that owns the newly created object.
+ * @throw An exception thrown from @a _Alloc::allocate or from the
+ * constructor of @a _Tp.
+ *
+ * A copy of @a __a will be used to allocate memory for the shared_ptr
+ * and the new object.
+ */
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ inline shared_ptr<_Tp>
+ allocate_shared(_Alloc __a, _Args&&... __args)
+ {
+ return shared_ptr<_Tp>(_Sp_make_shared_tag(), std::forward<_Alloc>(__a),
+ std::forward<_Args>(__args)...);
+ }
+
+ /** @brief Create an object that is owned by a shared_ptr.
+ * @param __args Arguments for the @a _Tp object's constructor.
+ * @return A shared_ptr that owns the newly created object.
+ * @throw std::bad_alloc, or an exception thrown from the
+ * constructor of @a _Tp.
+ */
+ template<typename _Tp, typename... _Args>
+ inline shared_ptr<_Tp>
+ make_shared(_Args&&... __args)
+ {
+ typedef typename std::remove_const<_Tp>::type _Tp_nc;
+ return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
+ }
+#endif
+
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h b/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h
new file mode 100644
index 00000000000..3cb4175b376
--- /dev/null
+++ b/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h
@@ -0,0 +1,244 @@
+// <tr1_impl/boost_sp_counted_base.h> -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file tr1_impl/boost_sp_counted_base.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ class bad_weak_ptr : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ { return "std::bad_weak_ptr"; }
+#else
+ { return "tr1::bad_weak_ptr"; }
+#endif
+ };
+
+ // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
+ inline void
+ __throw_bad_weak_ptr()
+ {
+#if __EXCEPTIONS
+ throw bad_weak_ptr();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ using __gnu_cxx::_Lock_policy;
+ using __gnu_cxx::__default_lock_policy;
+ using __gnu_cxx::_S_single;
+ using __gnu_cxx::_S_mutex;
+ using __gnu_cxx::_S_atomic;
+
+ // Empty helper class except when the template argument is _S_mutex.
+ template<_Lock_policy _Lp>
+ class _Mutex_base
+ {
+ protected:
+ // The atomic policy uses fully-fenced builtins, single doesn't care.
+ enum { _S_need_barriers = 0 };
+ };
+
+ template<>
+ class _Mutex_base<_S_mutex>
+ : public __gnu_cxx::__mutex
+ {
+ protected:
+ // This policy is used when atomic builtins are not available.
+ // The replacement atomic operations might not have the necessary
+ // memory barriers.
+ enum { _S_need_barriers = 1 };
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class _Sp_counted_base
+ : public _Mutex_base<_Lp>
+ {
+ public:
+ _Sp_counted_base()
+ : _M_use_count(1), _M_weak_count(1) { }
+
+ virtual
+ ~_Sp_counted_base() // nothrow
+ { }
+
+ // Called when _M_use_count drops to zero, to release the resources
+ // managed by *this.
+ virtual void
+ _M_dispose() = 0; // nothrow
+
+ // Called when _M_weak_count drops to zero.
+ virtual void
+ _M_destroy() // nothrow
+ { delete this; }
+
+ virtual void*
+ _M_get_deleter(const std::type_info&) = 0;
+
+ void
+ _M_add_ref_copy()
+ { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
+
+ void
+ _M_add_ref_lock();
+
+ void
+ _M_release() // nothrow
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
+ {
+ _M_dispose();
+ // There must be a memory barrier between dispose() and destroy()
+ // to ensure that the effects of dispose() are observed in the
+ // thread that runs destroy().
+ // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html
+ if (_Mutex_base<_Lp>::_S_need_barriers)
+ {
+ _GLIBCXX_READ_MEM_BARRIER;
+ _GLIBCXX_WRITE_MEM_BARRIER;
+ }
+
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
+ -1) == 1)
+ _M_destroy();
+ }
+ }
+
+ void
+ _M_weak_add_ref() // nothrow
+ { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
+
+ void
+ _M_weak_release() // nothrow
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
+ {
+ if (_Mutex_base<_Lp>::_S_need_barriers)
+ {
+ // See _M_release(),
+ // destroy() must observe results of dispose()
+ _GLIBCXX_READ_MEM_BARRIER;
+ _GLIBCXX_WRITE_MEM_BARRIER;
+ }
+ _M_destroy();
+ }
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ {
+ // No memory barrier is used here so there is no synchronization
+ // with other threads.
+ return const_cast<const volatile _Atomic_word&>(_M_use_count);
+ }
+
+ private:
+ _Sp_counted_base(_Sp_counted_base const&);
+ _Sp_counted_base& operator=(_Sp_counted_base const&);
+
+ _Atomic_word _M_use_count; // #shared
+ _Atomic_word _M_weak_count; // #weak + (#shared != 0)
+ };
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_single>::
+ _M_add_ref_lock()
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
+ {
+ _M_use_count = 0;
+ __throw_bad_weak_ptr();
+ }
+ }
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_mutex>::
+ _M_add_ref_lock()
+ {
+ __gnu_cxx::__scoped_lock sentry(*this);
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
+ {
+ _M_use_count = 0;
+ __throw_bad_weak_ptr();
+ }
+ }
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_atomic>::
+ _M_add_ref_lock()
+ {
+ // Perform lock-free add-if-not-zero operation.
+ _Atomic_word __count;
+ do
+ {
+ __count = _M_use_count;
+ if (__count == 0)
+ __throw_bad_weak_ptr();
+
+ // Replace the current counter value with the old value + 1, as
+ // long as it's not changed meanwhile.
+ }
+ while (!__sync_bool_compare_and_swap(&_M_use_count, __count,
+ __count + 1));
+ }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/libstdc++-v3/include/tr1_impl/cfenv b/libstdc++-v3/include/tr1_impl/cfenv
index 01535e07c30..4a1eca99d4a 100644
--- a/libstdc++-v3/include/tr1_impl/cfenv
+++ b/libstdc++-v3/include/tr1_impl/cfenv
@@ -32,6 +32,8 @@
* You should not attempt to use it directly.
*/
+#pragma GCC system_header
+
#if _GLIBCXX_USE_C99_FENV_TR1
#include_next <fenv.h>
diff --git a/libstdc++-v3/include/tr1_impl/cinttypes b/libstdc++-v3/include/tr1_impl/cinttypes
index 05b52517626..17625931100 100644
--- a/libstdc++-v3/include/tr1_impl/cinttypes
+++ b/libstdc++-v3/include/tr1_impl/cinttypes
@@ -32,6 +32,8 @@
* You should not attempt to use it directly.
*/
+#pragma GCC system_header
+
#if _GLIBCXX_USE_C99_INTTYPES_TR1
// For 8.11.1/1 (see C99, Note 184)
diff --git a/libstdc++-v3/include/tr1_impl/complex b/libstdc++-v3/include/tr1_impl/complex
index f7631829da0..5c25cae4fb4 100644
--- a/libstdc++-v3/include/tr1_impl/complex
+++ b/libstdc++-v3/include/tr1_impl/complex
@@ -44,7 +44,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp> std::complex<_Tp> acosh(const std::complex<_Tp>&);
template<typename _Tp> std::complex<_Tp> asinh(const std::complex<_Tp>&);
template<typename _Tp> std::complex<_Tp> atanh(const std::complex<_Tp>&);
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ // DR 595.
+ template<typename _Tp> _Tp fabs(const std::complex<_Tp>&);
+#else
template<typename _Tp> std::complex<_Tp> fabs(const std::complex<_Tp>&);
+#endif
/// @brief acos(__z) [8.1.2].
// Effects: Behaves the same as C99 function cacos, defined
@@ -288,7 +293,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
// Effects: Behaves the same as C99 function cabs, defined
// in subclause 7.3.8.1.
template<typename _Tp>
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ inline _Tp
+#else
inline std::complex<_Tp>
+#endif
fabs(const std::complex<_Tp>& __z)
{ return std::abs(__z); }
diff --git a/libstdc++-v3/include/tr1_impl/cstdint b/libstdc++-v3/include/tr1_impl/cstdint
index 862ee97864b..6df74c761cb 100644
--- a/libstdc++-v3/include/tr1_impl/cstdint
+++ b/libstdc++-v3/include/tr1_impl/cstdint
@@ -32,6 +32,8 @@
* You should not attempt to use it directly.
*/
+#pragma GCC system_header
+
#if _GLIBCXX_USE_C99_STDINT_TR1
// For 8.22.1/1 (see C99, Notes 219, 220, 222)
diff --git a/libstdc++-v3/include/tr1_impl/functional b/libstdc++-v3/include/tr1_impl/functional
index 0005dfcc0d0..2a522edf814 100644
--- a/libstdc++-v3/include/tr1_impl/functional
+++ b/libstdc++-v3/include/tr1_impl/functional
@@ -1,6 +1,6 @@
// TR1 functional header -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 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
@@ -40,11 +40,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
class _Mem_fn;
/**
- * @if maint
* Actual implementation of _Has_result_type, which uses SFINAE to
* determine if the type _Tp has a publicly-accessible member type
* result_type.
- * @endif
*/
template<typename _Tp>
class _Has_result_type_helper : __sfinae_types
@@ -70,10 +68,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{ };
/**
- * @if maint
- * If we have found a result_type, extract it.
- * @endif
+ *
*/
+ /// If we have found a result_type, extract it.
template<bool _Has_result_type, typename _Functor>
struct _Maybe_get_result_type
{ };
@@ -85,10 +82,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Base class for any function object that has a weak result type, as
* defined in 3.3/3 of TR1.
- * @endif
*/
template<typename _Functor>
struct _Weak_result_type_impl
@@ -96,77 +91,49 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{
};
- /**
- * @if maint
- * Retrieve the result type for a function type.
- * @endif
- */
+ /// Retrieve the result type for a function type.
template<typename _Res, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res(_ArgTypes...)>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve the result type for a function reference.
- * @endif
- */
+ /// Retrieve the result type for a function reference.
template<typename _Res, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve the result type for a function pointer.
- * @endif
- */
+ /// Retrieve the result type for a function pointer.
template<typename _Res, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve result type for a member function pointer.
- * @endif maint
- */
+ /// Retrieve result type for a member function pointer.
template<typename _Res, typename _Class, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve result type for a const member function pointer.
- * @endif maint
- */
+ /// Retrieve result type for a const member function pointer.
template<typename _Res, typename _Class, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve result type for a volatile member function pointer.
- * @endif maint
- */
+ /// Retrieve result type for a volatile member function pointer.
template<typename _Res, typename _Class, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile>
{
typedef _Res result_type;
};
- /**
- * @if maint
- * Retrieve result type for a const volatile member function pointer.
- * @endif maint
- */
+ /// Retrieve result type for a const volatile member function pointer.
template<typename _Res, typename _Class, typename... _ArgTypes>
struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)const volatile>
{
@@ -174,10 +141,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Strip top-level cv-qualifiers from the function object and let
* _Weak_result_type_impl perform the real work.
- * @endif
*/
template<typename _Functor>
struct _Weak_result_type
@@ -189,12 +154,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
class result_of;
/**
- * @if maint
* Actual implementation of result_of. When _Has_result_type is
* true, gets its result from _Weak_result_type. Otherwise, uses
* the function object's member template result to extract the
* result type.
- * @endif
*/
template<bool _Has_result_type, typename _Signature>
struct _Result_of_impl;
@@ -208,10 +171,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Determine whether we can determine a result type from @c Functor
* alone.
- * @endif
*/
template<typename _Functor, typename... _ArgTypes>
class result_of<_Functor(_ArgTypes...)>
@@ -221,11 +182,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{
};
- /**
- * @if maint
- * We already know the result type for @c Functor; use it.
- * @endif
- */
+ /// We already know the result type for @c Functor; use it.
template<typename _Functor, typename... _ArgTypes>
struct _Result_of_impl<true, _Functor(_ArgTypes...)>
{
@@ -233,10 +190,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* We need to compute the result type for this invocation the hard
* way.
- * @endif
*/
template<typename _Functor, typename... _ArgTypes>
struct _Result_of_impl<false, _Functor(_ArgTypes...)>
@@ -246,10 +201,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* It is unsafe to access ::result when there are zero arguments, so we
* return @c void instead.
- * @endif
*/
template<typename _Functor>
struct _Result_of_impl<false, _Functor()>
@@ -257,11 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
typedef void type;
};
- /**
- * @if maint
- * Determines if the type _Tp derives from unary_function.
- * @endif
- */
+ /// Determines if the type _Tp derives from unary_function.
template<typename _Tp>
struct _Derives_from_unary_function : __sfinae_types
{
@@ -277,11 +226,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
static const bool value = sizeof(__test((_Tp*)0)) == 1;
};
- /**
- * @if maint
- * Determines if the type _Tp derives from binary_function.
- * @endif
- */
+ /// Determines if the type _Tp derives from binary_function.
template<typename _Tp>
struct _Derives_from_binary_function : __sfinae_types
{
@@ -297,11 +242,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
static const bool value = sizeof(__test((_Tp*)0)) == 1;
};
- /**
- * @if maint
- * Turns a function type into a function pointer type
- * @endif
- */
+ /// Turns a function type into a function pointer type
template<typename _Tp, bool _IsFunctionType = is_function<_Tp>::value>
struct _Function_to_function_pointer
{
@@ -315,10 +256,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Invoke a function object, which may be either a member pointer or a
* function object. The first parameter will tell which.
- * @endif
*/
template<typename _Functor, typename... _Args>
inline
@@ -360,16 +299,14 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
/**
- * @if maint
* Knowing which of unary_function and binary_function _Tp derives
* from, derives from the same and ensures that reference_wrapper
* will have a weak result type. See cases below.
- * @endif
*/
template<bool _Unary, bool _Binary, typename _Tp>
struct _Reference_wrapper_base_impl;
- // Not a unary_function or binary_function, so try a weak result type
+ // Not a unary_function or binary_function, so try a weak result type.
template<typename _Tp>
struct _Reference_wrapper_base_impl<false, false, _Tp>
: _Weak_result_type<_Tp>
@@ -390,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
typename _Tp::result_type>
{ };
- // both unary_function and binary_function. import result_type to
+ // Both unary_function and binary_function. Import result_type to
// avoid conflicts.
template<typename _Tp>
struct _Reference_wrapper_base_impl<true, true, _Tp>
@@ -404,12 +341,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Derives from unary_function or binary_function when it
* can. Specializations handle all of the easy cases. The primary
* template determines what to do with a class type, which may
* derive from both unary_function and binary_function.
- * @endif
*/
template<typename _Tp>
struct _Reference_wrapper_base
@@ -570,38 +505,24 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Derives from @c unary_function or @c binary_function, or perhaps
* nothing, depending on the number of arguments provided. The
* primary template is the basis case, which derives nothing.
- * @endif maint
*/
template<typename _Res, typename... _ArgTypes>
struct _Maybe_unary_or_binary_function { };
- /**
- * @if maint
- * Derives from @c unary_function, as appropriate.
- * @endif
- */
+ /// Derives from @c unary_function, as appropriate.
template<typename _Res, typename _T1>
struct _Maybe_unary_or_binary_function<_Res, _T1>
: std::unary_function<_T1, _Res> { };
- /**
- * @if maint
- * Derives from @c binary_function, as appropriate.
- * @endif
- */
+ /// Derives from @c binary_function, as appropriate.
template<typename _Res, typename _T1, typename _T2>
struct _Maybe_unary_or_binary_function<_Res, _T1, _T2>
: std::binary_function<_T1, _T2, _Res> { };
- /**
- * @if maint
- * Implementation of @c mem_fn for member function pointers.
- * @endif
- */
+ /// Implementation of @c mem_fn for member function pointers.
template<typename _Res, typename _Class, typename... _ArgTypes>
class _Mem_fn<_Res (_Class::*)(_ArgTypes...)>
: public _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>
@@ -644,11 +565,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Functor __pmf;
};
- /**
- * @if maint
- * Implementation of @c mem_fn for const member function pointers.
- * @endif
- */
+ /// Implementation of @c mem_fn for const member function pointers.
template<typename _Res, typename _Class, typename... _ArgTypes>
class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const>
: public _Maybe_unary_or_binary_function<_Res, const _Class*,
@@ -691,11 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Functor __pmf;
};
- /**
- * @if maint
- * Implementation of @c mem_fn for volatile member function pointers.
- * @endif
- */
+ /// Implementation of @c mem_fn for volatile member function pointers.
template<typename _Res, typename _Class, typename... _ArgTypes>
class _Mem_fn<_Res (_Class::*)(_ArgTypes...) volatile>
: public _Maybe_unary_or_binary_function<_Res, volatile _Class*,
@@ -739,11 +652,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Functor __pmf;
};
- /**
- * @if maint
- * Implementation of @c mem_fn for const volatile member function pointers.
- * @endif
- */
+ /// Implementation of @c mem_fn for const volatile member function pointers.
template<typename _Res, typename _Class, typename... _ArgTypes>
class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const volatile>
: public _Maybe_unary_or_binary_function<_Res, const volatile _Class*,
@@ -914,53 +823,51 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp>
const int is_placeholder<_Tp>::value;
- /**
- * @if maint
- * The type of placeholder objects defined by libstdc++.
- * @endif
- */
+ /// The type of placeholder objects defined by libstdc++.
template<int _Num> struct _Placeholder { };
// Define a large number of placeholders. There is no way to
// simplify this with variadic templates, because we're introducing
// unique names for each.
- namespace placeholders { namespace {
- _Placeholder<1> _1;
- _Placeholder<2> _2;
- _Placeholder<3> _3;
- _Placeholder<4> _4;
- _Placeholder<5> _5;
- _Placeholder<6> _6;
- _Placeholder<7> _7;
- _Placeholder<8> _8;
- _Placeholder<9> _9;
- _Placeholder<10> _10;
- _Placeholder<11> _11;
- _Placeholder<12> _12;
- _Placeholder<13> _13;
- _Placeholder<14> _14;
- _Placeholder<15> _15;
- _Placeholder<16> _16;
- _Placeholder<17> _17;
- _Placeholder<18> _18;
- _Placeholder<19> _19;
- _Placeholder<20> _20;
- _Placeholder<21> _21;
- _Placeholder<22> _22;
- _Placeholder<23> _23;
- _Placeholder<24> _24;
- _Placeholder<25> _25;
- _Placeholder<26> _26;
- _Placeholder<27> _27;
- _Placeholder<28> _28;
- _Placeholder<29> _29;
- } }
+ namespace placeholders
+ {
+ namespace
+ {
+ _Placeholder<1> _1;
+ _Placeholder<2> _2;
+ _Placeholder<3> _3;
+ _Placeholder<4> _4;
+ _Placeholder<5> _5;
+ _Placeholder<6> _6;
+ _Placeholder<7> _7;
+ _Placeholder<8> _8;
+ _Placeholder<9> _9;
+ _Placeholder<10> _10;
+ _Placeholder<11> _11;
+ _Placeholder<12> _12;
+ _Placeholder<13> _13;
+ _Placeholder<14> _14;
+ _Placeholder<15> _15;
+ _Placeholder<16> _16;
+ _Placeholder<17> _17;
+ _Placeholder<18> _18;
+ _Placeholder<19> _19;
+ _Placeholder<20> _20;
+ _Placeholder<21> _21;
+ _Placeholder<22> _22;
+ _Placeholder<23> _23;
+ _Placeholder<24> _24;
+ _Placeholder<25> _25;
+ _Placeholder<26> _26;
+ _Placeholder<27> _27;
+ _Placeholder<28> _28;
+ _Placeholder<29> _29;
+ }
+ }
/**
- * @if maint
* Partial specialization of is_placeholder that provides the placeholder
* number for the placeholder objects defined by libstdc++.
- * @endif
*/
template<int _Num>
struct is_placeholder<_Placeholder<_Num> >
@@ -970,19 +877,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const int is_placeholder<_Placeholder<_Num> >::value;
/**
- * @if maint
* Stores a tuple of indices. Used by bind() to extract the elements
* in a tuple.
- * @endif
*/
template<int... _Indexes>
struct _Index_tuple { };
- /**
- * @if maint
- * Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
- * @endif
- */
+ /// Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
template<std::size_t _Num, typename _Tuple = _Index_tuple<> >
struct _Build_index_tuple;
@@ -1000,30 +901,24 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Used by _Safe_tuple_element to indicate that there is no tuple
* element at this position.
- * @endif
*/
struct _No_tuple_element;
/**
- * @if maint
* Implementation helper for _Safe_tuple_element. This primary
* template handles the case where it is safe to use @c
* tuple_element.
- * @endif
*/
template<int __i, typename _Tuple, bool _IsSafe>
struct _Safe_tuple_element_impl
: tuple_element<__i, _Tuple> { };
/**
- * @if maint
* Implementation helper for _Safe_tuple_element. This partial
* specialization handles the case where it is not safe to use @c
* tuple_element. We just return @c _No_tuple_element.
- * @endif
*/
template<int __i, typename _Tuple>
struct _Safe_tuple_element_impl<__i, _Tuple, false>
@@ -1043,7 +938,6 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Maps an argument to bind() into an actual argument to the bound
* function object [TR1 3.6.3/5]. Only the first parameter should
* be specified: the rest are used to determine among the various
@@ -1053,7 +947,6 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* bind expression. The first parameter is the bound argument and
* the second parameter is a tuple containing references to the
* rest of the arguments.
- * @endif
*/
template<typename _Arg,
bool _IsBindExp = is_bind_expression<_Arg>::value,
@@ -1061,10 +954,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
class _Mu;
/**
- * @if maint
* If the argument is reference_wrapper<_Tp>, returns the
* underlying reference. [TR1 3.6.3/5 bullet 1]
- * @endif
*/
template<typename _Tp>
class _Mu<reference_wrapper<_Tp>, false, false>
@@ -1083,11 +974,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* If the argument is a bind expression, we invoke the underlying
* function object with the same cv-qualifiers as we are given and
* pass along all of our arguments (unwrapped). [TR1 3.6.3/5 bullet 2]
- * @endif
*/
template<typename _Arg>
class _Mu<_Arg, true, false>
@@ -1126,11 +1015,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* If the argument is a placeholder for the Nth argument, returns
* a reference to the Nth argument to the bind function object.
* [TR1 3.6.3/5 bullet 3]
- * @endif
*/
template<typename _Arg>
class _Mu<_Arg, false, true>
@@ -1149,7 +1036,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__base_type;
public:
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ typedef typename add_lvalue_reference<__base_type>::type type;
+#else
typedef typename add_reference<__base_type>::type type;
+#endif
};
template<typename _Tuple>
@@ -1162,11 +1053,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* If the argument is just a value, returns a reference to that
* value. The cv-qualifiers on the reference are the same as the
* cv-qualifiers on the _Mu object. [TR1 3.6.3/5 bullet 4]
- * @endif
*/
template<typename _Arg>
class _Mu<_Arg, false, false>
@@ -1177,7 +1066,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _CVMu, typename _CVArg, typename _Tuple>
struct result<_CVMu(_CVArg, _Tuple)>
{
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ typedef typename add_lvalue_reference<_CVArg>::type type;
+#else
typedef typename add_reference<_CVArg>::type type;
+#endif
};
// Pick up the cv-qualifiers of the argument
@@ -1188,11 +1081,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Maps member pointers into instances of _Mem_fn but leaves all
* other function objects untouched. Used by tr1::bind(). The
* primary template handles the non--member-pointer case.
- * @endif
*/
template<typename _Tp>
struct _Maybe_wrap_member_pointer
@@ -1205,11 +1096,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
};
/**
- * @if maint
* Maps member pointers into instances of _Mem_fn but leaves all
* other function objects untouched. Used by tr1::bind(). This
* partial specialization handles the member pointer case.
- * @endif
*/
template<typename _Tp, typename _Class>
struct _Maybe_wrap_member_pointer<_Tp _Class::*>
@@ -1221,11 +1110,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{ return type(__pm); }
};
- /**
- * @if maint
- * Type of the function object returned from bind().
- * @endif
- */
+ /// Type of the function object returned from bind().
template<typename _Signature>
struct _Bind;
@@ -1343,11 +1228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
};
- /**
- * @if maint
- * Type of the function object returned from bind<R>().
- * @endif
- */
+ /// Type of the function object returned from bind<R>().
template<typename _Result, typename _Signature>
struct _Bind_result;
@@ -1439,11 +1320,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
};
- /**
- * @if maint
- * Class template _Bind is always a bind expression.
- * @endif
- */
+ /// Class template _Bind is always a bind expression.
template<typename _Signature>
struct is_bind_expression<_Bind<_Signature> >
{ static const bool value = true; };
@@ -1451,11 +1328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Signature>
const bool is_bind_expression<_Bind<_Signature> >::value;
- /**
- * @if maint
- * Class template _Bind_result is always a bind expression.
- * @endif
- */
+ /// Class template _Bind_result is always a bind expression.
template<typename _Result, typename _Signature>
struct is_bind_expression<_Bind_result<_Result, _Signature> >
{ static const bool value = true; };
@@ -1496,20 +1369,16 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
class bad_function_call : public std::exception { };
/**
- * @if maint
* The integral constant expression 0 can be converted into a
* pointer to this type. It is used by the function template to
* accept NULL pointers.
- * @endif
*/
struct _M_clear_type;
/**
- * @if maint
* Trait identifying "location-invariant" types, meaning that the
* address of the object (or any of its members) will not escape.
* Also implies a trivial copy constructor and assignment operator.
- * @endif
*/
template<typename _Tp>
struct __is_location_invariant
@@ -1556,8 +1425,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__destroy_functor
};
- /* Simple type wrapper that helps avoid annoying const problems
- when casting between void pointers and pointers-to-pointers. */
+ // Simple type wrapper that helps avoid annoying const problems
+ // when casting between void pointers and pointers-to-pointers.
template<typename _Tp>
struct _Simple_type_wrapper
{
@@ -1592,11 +1461,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Signature>
class function;
- /**
- * @if maint
- * Base class of all polymorphic function object wrappers.
- * @endif
- */
+ /// Base class of all polymorphic function object wrappers.
class _Function_base
{
public:
@@ -1685,50 +1550,36 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
static void
_M_init_functor(_Any_data& __functor, const _Functor& __f)
- {
- _M_init_functor(__functor, __f, _Local_storage());
- }
+ { _M_init_functor(__functor, __f, _Local_storage()); }
template<typename _Signature>
static bool
_M_not_empty_function(const function<_Signature>& __f)
- {
- return __f;
- }
+ { return __f; }
template<typename _Tp>
static bool
_M_not_empty_function(const _Tp*& __fp)
- {
- return __fp;
- }
+ { return __fp; }
template<typename _Class, typename _Tp>
static bool
_M_not_empty_function(_Tp _Class::* const& __mp)
- {
- return __mp;
- }
+ { return __mp; }
template<typename _Tp>
static bool
_M_not_empty_function(const _Tp&)
- {
- return true;
- }
+ { return true; }
private:
static void
_M_init_functor(_Any_data& __functor, const _Functor& __f, true_type)
- {
- new (__functor._M_access()) _Functor(__f);
- }
+ { new (__functor._M_access()) _Functor(__f); }
static void
_M_init_functor(_Any_data& __functor, const _Functor& __f, false_type)
- {
- __functor._M_access<_Functor*>() = new _Functor(__f);
- }
+ { __functor._M_access<_Functor*>() = new _Functor(__f); }
};
template<typename _Functor>
@@ -1761,7 +1612,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
static void
_M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
{
- // TBD: Use address_of function instead
+ // TBD: Use address_of function instead.
_Base::_M_init_functor(__functor, &__f.get());
}
};
@@ -1905,26 +1756,18 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
: public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
private _Function_base
{
- /**
- * @if maint
- * This class is used to implement the safe_bool idiom.
- * @endif
- */
+ /// This class is used to implement the safe_bool idiom.
struct _Hidden_type
{
_Hidden_type* _M_bool;
};
- /**
- * @if maint
- * This typedef is used to implement the safe_bool idiom.
- * @endif
- */
+ /// This typedef is used to implement the safe_bool idiom.
typedef _Hidden_type* _Hidden_type::* _Safe_bool;
typedef _Res _Signature_type(_ArgTypes...);
- struct _Useless {};
+ struct _Useless { };
public:
typedef _Res result_type;
@@ -2113,9 +1956,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
*/
template<typename _Functor> _Functor* target();
- /**
- * @overload
- */
+ /// @overload
template<typename _Functor> const _Functor* target() const;
private:
@@ -2238,19 +2079,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Signature>
inline bool
operator==(const function<_Signature>& __f, _M_clear_type*)
- {
- return !__f;
- }
+ { return !__f; }
- /**
- * @overload
- */
+ /// @overload
template<typename _Signature>
inline bool
operator==(_M_clear_type*, const function<_Signature>& __f)
- {
- return !__f;
- }
+ { return !__f; }
/**
* @brief Compares a polymorphic function object wrapper against 0
@@ -2262,19 +2097,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Signature>
inline bool
operator!=(const function<_Signature>& __f, _M_clear_type*)
- {
- return __f;
- }
+ { return __f; }
- /**
- * @overload
- */
+ /// @overload
template<typename _Signature>
inline bool
operator!=(_M_clear_type*, const function<_Signature>& __f)
- {
- return __f;
- }
+ { return __f; }
// [3.7.2.8] specialized algorithms
@@ -2286,9 +2115,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Signature>
inline void
swap(function<_Signature>& __x, function<_Signature>& __y)
- {
- __x.swap(__y);
- }
+ { __x.swap(__y); }
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/include/tr1_impl/functional_hash.h b/libstdc++-v3/include/tr1_impl/functional_hash.h
index 3b1a7583383..0dfff38e7b9 100644
--- a/libstdc++-v3/include/tr1_impl/functional_hash.h
+++ b/libstdc++-v3/include/tr1_impl/functional_hash.h
@@ -36,20 +36,31 @@ namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
- // Definition of default hash function std::tr1::hash<>. The types for
- // which std::tr1::hash<T> is defined is in clause 6.3.3. of the PDTR.
+ // Class template hash.
+ // Declaration of default hash functor std::tr1::hash. The types for
+ // which std::tr1::hash<T> is well-defined is in clause 6.3.3. of the PDTR.
template<typename _Tp>
- struct hash;
-
-#define _TR1_hashtable_define_trivial_hash(_Tp) \
- template<> \
- struct hash<_Tp> \
- : public std::unary_function<_Tp, std::size_t> \
- { \
- std::size_t \
- operator()(_Tp __val) const \
- { return static_cast<std::size_t>(__val); } \
- }
+ struct hash : public std::unary_function<_Tp, size_t>
+ {
+ size_t
+ operator()(_Tp __val) const;
+ };
+
+ // Partial specializations for pointer types.
+ template<typename _Tp>
+ struct hash<_Tp*> : public std::unary_function<_Tp*, size_t>
+ {
+ size_t
+ operator()(_Tp* __p) const
+ { return reinterpret_cast<size_t>(__p); }
+ };
+
+ // Explicit specializations for integer types.
+#define _TR1_hashtable_define_trivial_hash(_Tp) \
+ template<> \
+ inline size_t \
+ hash<_Tp>::operator()(_Tp __val) const \
+ { return static_cast<size_t>(__val); }
_TR1_hashtable_define_trivial_hash(bool);
_TR1_hashtable_define_trivial_hash(char);
@@ -67,26 +78,17 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
#undef _TR1_hashtable_define_trivial_hash
- template<typename _Tp>
- struct hash<_Tp*>
- : public std::unary_function<_Tp*, std::size_t>
- {
- std::size_t
- operator()(_Tp* __p) const
- { return reinterpret_cast<std::size_t>(__p); }
- };
-
// Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
- // (used by the next specializations of std::tr1::hash<>)
+ // (Used by the next specializations of std::tr1::hash.)
// Dummy generic implementation (for sizeof(size_t) != 4, 8).
- template<std::size_t = sizeof(std::size_t)>
+ template<size_t = sizeof(size_t)>
struct _Fnv_hash
{
- static std::size_t
- hash(const char* __first, std::size_t __length)
+ static size_t
+ hash(const char* __first, size_t __length)
{
- std::size_t __result = 0;
+ size_t __result = 0;
for (; __length > 0; --__length)
__result = (__result * 131) + *__first++;
return __result;
@@ -96,14 +98,14 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<>
struct _Fnv_hash<4>
{
- static std::size_t
- hash(const char* __first, std::size_t __length)
+ static size_t
+ hash(const char* __first, size_t __length)
{
- std::size_t __result = static_cast<std::size_t>(2166136261UL);
+ size_t __result = static_cast<size_t>(2166136261UL);
for (; __length > 0; --__length)
{
- __result ^= static_cast<std::size_t>(*__first++);
- __result *= static_cast<std::size_t>(16777619UL);
+ __result ^= static_cast<size_t>(*__first++);
+ __result *= static_cast<size_t>(16777619UL);
}
return __result;
}
@@ -112,112 +114,69 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<>
struct _Fnv_hash<8>
{
- static std::size_t
- hash(const char* __first, std::size_t __length)
+ static size_t
+ hash(const char* __first, size_t __length)
{
- std::size_t __result =
- static_cast<std::size_t>(14695981039346656037ULL);
+ size_t __result =
+ static_cast<size_t>(14695981039346656037ULL);
for (; __length > 0; --__length)
{
- __result ^= static_cast<std::size_t>(*__first++);
- __result *= static_cast<std::size_t>(1099511628211ULL);
+ __result ^= static_cast<size_t>(*__first++);
+ __result *= static_cast<size_t>(1099511628211ULL);
}
return __result;
}
};
- // XXX String and floating point hashes probably shouldn't be inline
- // member functions, since are nontrivial. Once we have the framework
- // for TR1 .cc files, these should go in one.
- template<>
- struct hash<std::string>
- : public std::unary_function<std::string, std::size_t>
- {
- std::size_t
- operator()(const std::string& __s) const
- { return _Fnv_hash<>::hash(__s.data(), __s.length()); }
- };
-
-#ifdef _GLIBCXX_USE_WCHAR_T
+ // Explicit specializations for floating point types.
template<>
- struct hash<std::wstring>
- : public std::unary_function<std::wstring, std::size_t>
+ inline size_t
+ hash<float>::operator()(float __val) const
{
- std::size_t
- operator()(const std::wstring& __s) const
- {
- return _Fnv_hash<>::hash(reinterpret_cast<const char*>(__s.data()),
- __s.length() * sizeof(wchar_t));
- }
+ size_t __result = 0;
+
+ // 0 and -0 both hash to zero.
+ if (__val != 0.0f)
+ __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__val),
+ sizeof(__val));
+ return __result;
};
-#endif
template<>
- struct hash<float>
- : public std::unary_function<float, std::size_t>
+ inline size_t
+ hash<double>::operator()(double __val) const
{
- std::size_t
- operator()(float __fval) const
- {
- std::size_t __result = 0;
+ size_t __result = 0;
// 0 and -0 both hash to zero.
- if (__fval != 0.0f)
- __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__fval),
- sizeof(__fval));
+ if (__val != 0.0)
+ __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__val),
+ sizeof(__val));
return __result;
- }
};
template<>
- struct hash<double>
- : public std::unary_function<double, std::size_t>
- {
- std::size_t
- operator()(double __dval) const
- {
- std::size_t __result = 0;
+ size_t
+ hash<long double>::operator()(long double __val) const;
- // 0 and -0 both hash to zero.
- if (__dval != 0.0)
- __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__dval),
- sizeof(__dval));
- return __result;
- }
- };
-
- // For long double, careful with random padding bits (e.g., on x86,
- // 10 bytes -> 12 bytes) and resort to frexp.
+ // Explicit specialization of member operator for types that are not builtin.
template<>
- struct hash<long double>
- : public std::unary_function<long double, std::size_t>
- {
- std::size_t
- operator()(long double __ldval) const
- {
- std::size_t __result = 0;
-
- int __exponent;
- __ldval = std::frexp(__ldval, &__exponent);
- __ldval = __ldval < 0.0l ? -(__ldval + 0.5l) : __ldval;
+ size_t
+ hash<string>::operator()(string) const;
- const long double __mult =
- __gnu_cxx::__numeric_traits<std::size_t>::__max + 1.0l;
- __ldval *= __mult;
-
- // Try to use all the bits of the mantissa (really necessary only
- // on 32-bit targets, at least for 80-bit floating point formats).
- const std::size_t __hibits = (std::size_t)__ldval;
- __ldval = (__ldval - (long double)__hibits) * __mult;
-
- const std::size_t __coeff =
- __gnu_cxx::__numeric_traits<std::size_t>::__max / __LDBL_MAX_EXP__;
+ template<>
+ size_t
+ hash<const string&>::operator()(const string&) const;
- __result = __hibits + (std::size_t)__ldval + __coeff * __exponent;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ size_t
+ hash<wstring>::operator()(wstring) const;
- return __result;
- }
- };
+ template<>
+ size_t
+ hash<const wstring&>::operator()(const wstring&) const;
+#endif
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/include/tr1_impl/hashtable b/libstdc++-v3/include/tr1_impl/hashtable
index acdeb667566..9a3ecbd094f 100644
--- a/libstdc++-v3/include/tr1_impl/hashtable
+++ b/libstdc++-v3/include/tr1_impl/hashtable
@@ -37,7 +37,7 @@
// std::tr1::unordered_multiset, and std::tr1::unordered_multimap.
// hashtable has many template parameters, partly to accommodate
// the differences between those four classes and partly to
-// accommodate policy choices that go beyond what TR1 calls for.
+// accommodate policy choices that go beyond TR1 specifications.
// Class template hashtable attempts to encapsulate all reasonable
// variation among hash tables that use chaining. It does not handle
@@ -168,7 +168,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__cache_hash_code>
const_iterator;
- template<typename _Key2, typename _Pair, typename _Hashtable>
+ template<typename _Key2, typename _Value2, typename _Ex2, bool __unique2,
+ typename _Hashtable2>
friend struct __detail::_Map_base;
private:
@@ -217,13 +218,21 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const allocator_type&);
_Hashtable(const _Hashtable&);
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _Hashtable(_Hashtable&&);
+#endif
_Hashtable&
operator=(const _Hashtable&);
-
+
~_Hashtable();
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ void swap(_Hashtable&&);
+#else
void swap(_Hashtable&);
+#endif
// Basic container operations
iterator
@@ -252,6 +261,21 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
end() const
{ return const_iterator(_M_buckets + _M_bucket_count); }
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const_iterator
+ cbegin() const
+ {
+ const_iterator __i(_M_buckets);
+ if (!__i._M_cur_node)
+ __i._M_incr_bucket();
+ return __i;
+ }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_M_buckets + _M_bucket_count); }
+#endif
+
size_type
size() const
{ return _M_element_count; }
@@ -626,6 +650,32 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
}
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _Hashtable(_Hashtable&& __ht)
+ : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>(__ht),
+ __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
+ _M_node_allocator(__ht._M_node_allocator),
+ _M_bucket_count(__ht._M_bucket_count),
+ _M_element_count(__ht._M_element_count),
+ _M_rehash_policy(__ht._M_rehash_policy),
+ _M_buckets(__ht._M_buckets)
+ {
+ size_type __n_bkt = __ht._M_rehash_policy._M_next_bkt(0);
+ __ht._M_buckets = __ht._M_allocate_buckets(__n_bkt);
+ __ht._M_bucket_count = __n_bkt;
+ __ht._M_element_count = 0;
+ __ht._M_rehash_policy = _RehashPolicy();
+ }
+#endif
+
template<typename _Key, typename _Value,
typename _Allocator, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
@@ -660,7 +710,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
void
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ swap(_Hashtable&& __x)
+#else
swap(_Hashtable& __x)
+#endif
{
// The only base class with member variables is hash_code_base. We
// define _Hash_code_base::_M_swap because different specializations
diff --git a/libstdc++-v3/include/tr1_impl/hashtable_policy.h b/libstdc++-v3/include/tr1_impl/hashtable_policy.h
index 79740fad31e..f23f8c6f51d 100644
--- a/libstdc++-v3/include/tr1_impl/hashtable_policy.h
+++ b/libstdc++-v3/include/tr1_impl/hashtable_policy.h
@@ -60,107 +60,28 @@ namespace __detail
return __distance_fw(__first, __last, _Tag());
}
- // XXX This is a hack. _Prime_rehash_policy's member functions, and
- // certainly the list of primes, should be defined in a .cc file.
- // We're temporarily putting them in a header because we don't have a
- // place to put TR1 .cc files yet. There's no good reason for any of
- // _Prime_rehash_policy's member functions to be inline, and there's
- // certainly no good reason for _Primes<> to exist at all.
- struct _LessThan
- {
- template<typename _Tp, typename _Up>
- bool
- operator()(_Tp __x, _Up __y)
- { return __x < __y; }
- };
-
- template<int __ulongsize = sizeof(unsigned long)>
- struct _Primes
- {
- static const int __n_primes = __ulongsize != 8 ? 256 : 256 + 48;
- static const unsigned long __primes[256 + 48 + 1];
- };
-
- template<int __ulongsize>
- const int _Primes<__ulongsize>::__n_primes;
-
- template<int __ulongsize>
- const unsigned long _Primes<__ulongsize>::__primes[256 + 48 + 1] =
+ template<typename _RAIter, typename _Tp>
+ _RAIter
+ __lower_bound(_RAIter __first, _RAIter __last, const _Tp& __val)
{
- 2ul, 3ul, 5ul, 7ul, 11ul, 13ul, 17ul, 19ul, 23ul, 29ul, 31ul,
- 37ul, 41ul, 43ul, 47ul, 53ul, 59ul, 61ul, 67ul, 71ul, 73ul, 79ul,
- 83ul, 89ul, 97ul, 103ul, 109ul, 113ul, 127ul, 137ul, 139ul, 149ul,
- 157ul, 167ul, 179ul, 193ul, 199ul, 211ul, 227ul, 241ul, 257ul,
- 277ul, 293ul, 313ul, 337ul, 359ul, 383ul, 409ul, 439ul, 467ul,
- 503ul, 541ul, 577ul, 619ul, 661ul, 709ul, 761ul, 823ul, 887ul,
- 953ul, 1031ul, 1109ul, 1193ul, 1289ul, 1381ul, 1493ul, 1613ul,
- 1741ul, 1879ul, 2029ul, 2179ul, 2357ul, 2549ul, 2753ul, 2971ul,
- 3209ul, 3469ul, 3739ul, 4027ul, 4349ul, 4703ul, 5087ul, 5503ul,
- 5953ul, 6427ul, 6949ul, 7517ul, 8123ul, 8783ul, 9497ul, 10273ul,
- 11113ul, 12011ul, 12983ul, 14033ul, 15173ul, 16411ul, 17749ul,
- 19183ul, 20753ul, 22447ul, 24281ul, 26267ul, 28411ul, 30727ul,
- 33223ul, 35933ul, 38873ul, 42043ul, 45481ul, 49201ul, 53201ul,
- 57557ul, 62233ul, 67307ul, 72817ul, 78779ul, 85229ul, 92203ul,
- 99733ul, 107897ul, 116731ul, 126271ul, 136607ul, 147793ul,
- 159871ul, 172933ul, 187091ul, 202409ul, 218971ul, 236897ul,
- 256279ul, 277261ul, 299951ul, 324503ul, 351061ul, 379787ul,
- 410857ul, 444487ul, 480881ul, 520241ul, 562841ul, 608903ul,
- 658753ul, 712697ul, 771049ul, 834181ul, 902483ul, 976369ul,
- 1056323ul, 1142821ul, 1236397ul, 1337629ul, 1447153ul, 1565659ul,
- 1693859ul, 1832561ul, 1982627ul, 2144977ul, 2320627ul, 2510653ul,
- 2716249ul, 2938679ul, 3179303ul, 3439651ul, 3721303ul, 4026031ul,
- 4355707ul, 4712381ul, 5098259ul, 5515729ul, 5967347ul, 6456007ul,
- 6984629ul, 7556579ul, 8175383ul, 8844859ul, 9569143ul, 10352717ul,
- 11200489ul, 12117689ul, 13109983ul, 14183539ul, 15345007ul,
- 16601593ul, 17961079ul, 19431899ul, 21023161ul, 22744717ul,
- 24607243ul, 26622317ul, 28802401ul, 31160981ul, 33712729ul,
- 36473443ul, 39460231ul, 42691603ul, 46187573ul, 49969847ul,
- 54061849ul, 58488943ul, 63278561ul, 68460391ul, 74066549ul,
- 80131819ul, 86693767ul, 93793069ul, 101473717ul, 109783337ul,
- 118773397ul, 128499677ul, 139022417ul, 150406843ul, 162723577ul,
- 176048909ul, 190465427ul, 206062531ul, 222936881ul, 241193053ul,
- 260944219ul, 282312799ul, 305431229ul, 330442829ul, 357502601ul,
- 386778277ul, 418451333ul, 452718089ul, 489790921ul, 529899637ul,
- 573292817ul, 620239453ul, 671030513ul, 725980837ul, 785430967ul,
- 849749479ul, 919334987ul, 994618837ul, 1076067617ul, 1164186217ul,
- 1259520799ul, 1362662261ul, 1474249943ul, 1594975441ul,
- 1725587117ul, 1866894511ul, 2019773507ul, 2185171673ul,
- 2364114217ul, 2557710269ul, 2767159799ul, 2993761039ul,
- 3238918481ul, 3504151727ul, 3791104843ul, 4101556399ul,
- 4294967291ul,
- // Sentinel, so we don't have to test the result of lower_bound,
- // or, on 64-bit machines, rest of the table.
- __ulongsize != 8 ? 4294967291ul : (unsigned long)6442450933ull,
- (unsigned long)8589934583ull,
- (unsigned long)12884901857ull, (unsigned long)17179869143ull,
- (unsigned long)25769803693ull, (unsigned long)34359738337ull,
- (unsigned long)51539607367ull, (unsigned long)68719476731ull,
- (unsigned long)103079215087ull, (unsigned long)137438953447ull,
- (unsigned long)206158430123ull, (unsigned long)274877906899ull,
- (unsigned long)412316860387ull, (unsigned long)549755813881ull,
- (unsigned long)824633720731ull, (unsigned long)1099511627689ull,
- (unsigned long)1649267441579ull, (unsigned long)2199023255531ull,
- (unsigned long)3298534883309ull, (unsigned long)4398046511093ull,
- (unsigned long)6597069766607ull, (unsigned long)8796093022151ull,
- (unsigned long)13194139533241ull, (unsigned long)17592186044399ull,
- (unsigned long)26388279066581ull, (unsigned long)35184372088777ull,
- (unsigned long)52776558133177ull, (unsigned long)70368744177643ull,
- (unsigned long)105553116266399ull, (unsigned long)140737488355213ull,
- (unsigned long)211106232532861ull, (unsigned long)281474976710597ull,
- (unsigned long)562949953421231ull, (unsigned long)1125899906842597ull,
- (unsigned long)2251799813685119ull, (unsigned long)4503599627370449ull,
- (unsigned long)9007199254740881ull, (unsigned long)18014398509481951ull,
- (unsigned long)36028797018963913ull, (unsigned long)72057594037927931ull,
- (unsigned long)144115188075855859ull,
- (unsigned long)288230376151711717ull,
- (unsigned long)576460752303423433ull,
- (unsigned long)1152921504606846883ull,
- (unsigned long)2305843009213693951ull,
- (unsigned long)4611686018427387847ull,
- (unsigned long)9223372036854775783ull,
- (unsigned long)18446744073709551557ull,
- (unsigned long)18446744073709551557ull
- };
+ typedef typename std::iterator_traits<_RAIter>::difference_type _DType;
+
+ _DType __len = __last - __first;
+ while (__len > 0)
+ {
+ _DType __half = __len >> 1;
+ _RAIter __middle = __first + __half;
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
// Auxiliary types used for all instantiations of _Hashtable: nodes
// and iterators.
@@ -484,10 +405,12 @@ namespace __detail
// smallest prime that keeps the load factor small enough.
struct _Prime_rehash_policy
{
- _Prime_rehash_policy(float __z = 1.0);
+ _Prime_rehash_policy(float __z = 1.0)
+ : _M_max_load_factor(__z), _M_growth_factor(2.f), _M_next_resize(0) { }
float
- max_load_factor() const;
+ max_load_factor() const
+ { return _M_max_load_factor; }
// Return a bucket size no smaller than n.
std::size_t
@@ -504,34 +427,28 @@ namespace __detail
std::pair<bool, std::size_t>
_M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
std::size_t __n_ins) const;
-
+
+ enum { _S_n_primes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 };
+
float _M_max_load_factor;
float _M_growth_factor;
mutable std::size_t _M_next_resize;
};
- inline
- _Prime_rehash_policy::
- _Prime_rehash_policy(float __z)
- : _M_max_load_factor(__z), _M_growth_factor(2.f), _M_next_resize(0)
- { }
+ extern const unsigned long __prime_list[];
- inline float
- _Prime_rehash_policy::
- max_load_factor() const
- { return _M_max_load_factor; }
+ // XXX This is a hack. There's no good reason for any of
+ // _Prime_rehash_policy's member functions to be inline.
// Return a prime no smaller than n.
inline std::size_t
_Prime_rehash_policy::
_M_next_bkt(std::size_t __n) const
{
- const unsigned long* const __last = (_Primes<>::__primes
- + _Primes<>::__n_primes);
- const unsigned long* __p = std::lower_bound(_Primes<>::__primes, __last,
- __n);
- _M_next_resize = static_cast<std::size_t>(std::ceil(*__p
- * _M_max_load_factor));
+ const unsigned long* __p = __lower_bound(__prime_list, __prime_list
+ + _S_n_primes, __n);
+ _M_next_resize =
+ static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
return *__p;
}
@@ -541,13 +458,11 @@ namespace __detail
_Prime_rehash_policy::
_M_bkt_for_elements(std::size_t __n) const
{
- const unsigned long* const __last = (_Primes<>::__primes
- + _Primes<>::__n_primes);
const float __min_bkts = __n / _M_max_load_factor;
- const unsigned long* __p = std::lower_bound(_Primes<>::__primes, __last,
- __min_bkts, _LessThan());
- _M_next_resize = static_cast<std::size_t>(std::ceil(*__p
- * _M_max_load_factor));
+ const unsigned long* __p = __lower_bound(__prime_list, __prime_list
+ + _S_n_primes, __min_bkts);
+ _M_next_resize =
+ static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
return *__p;
}
@@ -555,11 +470,11 @@ namespace __detail
// If p > __n_bkt, return make_pair(true, p); otherwise return
// make_pair(false, 0). In principle this isn't very different from
// _M_bkt_for_elements.
-
+
// The only tricky part is that we're caching the element count at
// which we need to rehash, so we don't have to do a floating-point
// multiply for every insertion.
-
+
inline std::pair<bool, std::size_t>
_Prime_rehash_policy::
_M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
@@ -572,20 +487,17 @@ namespace __detail
if (__min_bkts > __n_bkt)
{
__min_bkts = std::max(__min_bkts, _M_growth_factor * __n_bkt);
- const unsigned long* const __last = (_Primes<>::__primes
- + _Primes<>::__n_primes);
- const unsigned long* __p = std::lower_bound(_Primes<>::__primes,
- __last, __min_bkts,
- _LessThan());
- _M_next_resize =
- static_cast<std::size_t>(std::ceil(*__p * _M_max_load_factor));
+ const unsigned long* __p =
+ __lower_bound(__prime_list, __prime_list + _S_n_primes,
+ __min_bkts);
+ _M_next_resize = static_cast<std::size_t>
+ (__builtin_ceil(*__p * _M_max_load_factor));
return std::make_pair(true, *__p);
}
else
{
- _M_next_resize =
- static_cast<std::size_t>(std::ceil(__n_bkt
- * _M_max_load_factor));
+ _M_next_resize = static_cast<std::size_t>
+ (__builtin_ceil(__n_bkt * _M_max_load_factor));
return std::make_pair(false, 0);
}
}
diff --git a/libstdc++-v3/include/tr1_impl/random b/libstdc++-v3/include/tr1_impl/random
index 8d2b9eed911..c10ee577cae 100644
--- a/libstdc++-v3/include/tr1_impl/random
+++ b/libstdc++-v3/include/tr1_impl/random
@@ -1,6 +1,6 @@
// random number generation -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 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
@@ -89,11 +89,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
result_type
min() const
{
- result_type __return_value = 0;
+ result_type __return_value;
if (is_integral<_Engine_result_type>::value
&& is_integral<result_type>::value)
__return_value = _M_g.min();
- else if (!is_integral<result_type>::value)
+ else
__return_value = result_type(0);
return __return_value;
}
@@ -101,52 +101,55 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
result_type
max() const
{
- result_type __return_value = 0;
+ result_type __return_value;
if (is_integral<_Engine_result_type>::value
&& is_integral<result_type>::value)
__return_value = _M_g.max();
else if (!is_integral<result_type>::value)
__return_value = result_type(1);
+ else
+ __return_value = std::numeric_limits<result_type>::max() - 1;
return __return_value;
}
+ /*
+ * Converts a value generated by the adapted random number generator
+ * into a value in the input domain for the dependent random number
+ * distribution.
+ *
+ * Because the type traits are compile time constants only the
+ * appropriate clause of the if statements will actually be emitted
+ * by the compiler.
+ */
result_type
- operator()();
+ operator()()
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g();
+ else if (!is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type(_M_g() - _M_g.min())
+ / result_type(_M_g.max() - _M_g.min());
+ else if (is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type(_M_g() - _M_g.min())
+ / result_type(_M_g.max() - _M_g.min() + result_type(1));
+ else
+ __return_value = (((_M_g() - _M_g.min())
+ / (_M_g.max() - _M_g.min()))
+ * std::numeric_limits<result_type>::max());
+ return __return_value;
+ }
private:
_Engine _M_g;
};
-
- /*
- * Converts a value generated by the adapted random number generator into a
- * value in the input domain for the dependent random number distribution.
- *
- * Because the type traits are compile time constants only the appropriate
- * clause of the if statements will actually be emitted by the compiler.
- */
- template<typename _Engine, typename _Distribution>
- typename _Adaptor<_Engine, _Distribution>::result_type
- _Adaptor<_Engine, _Distribution>::
- operator()()
- {
- result_type __return_value = 0;
- if (is_integral<_Engine_result_type>::value
- && is_integral<result_type>::value)
- __return_value = _M_g();
- else if (is_integral<_Engine_result_type>::value
- && !is_integral<result_type>::value)
- __return_value = result_type(_M_g() - _M_g.min())
- / result_type(_M_g.max() - _M_g.min() + result_type(1));
- else if (!is_integral<_Engine_result_type>::value
- && !is_integral<result_type>::value)
- __return_value = result_type(_M_g() - _M_g.min())
- / result_type(_M_g.max() - _M_g.min());
- return __return_value;
- }
} // namespace __detail
/**
- * Produces random numbers on a given disribution function using a un uniform
+ * Produces random numbers on a given distribution function using a non-uniform
* random number generation engine.
*
* @todo the engine_value_type needs to be studied more carefully.
@@ -257,7 +260,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* A number generator is a function object with an operator() that
* takes zero arguments and returns a number.
*
- * A compliant random number generator must satisy the following
+ * A compliant random number generator must satisfy the following
* requirements. <table border=1 cellpadding=10 cellspacing=0>
* <caption align=top>Random Number Generator Requirements</caption>
* <tr><td>To be documented.</td></tr> </table>
@@ -339,7 +342,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* Gets the smallest possible value in the output range.
*
- * The minumum depends on the @p __c parameter: if it is zero, the
+ * The minimum depends on the @p __c parameter: if it is zero, the
* minimum generated must be > 0, otherwise 0 is allowed.
*/
result_type
@@ -449,7 +452,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* A generalized feedback shift register discrete random number generator.
*
- * This algorithm avoind multiplication and division and is designed to be
+ * This algorithm avoids multiplication and division and is designed to be
* friendly to a pipelined architecture. If the parameters are chosen
* correctly, this generator will produce numbers with a very long period and
* fairly good apparent entropy, although still not cryptographically strong.
@@ -644,11 +647,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
* N1688[4.13] says "the template parameter _IntType shall denote an integral
* type large enough to store values up to m."
*
- * @if maint
* @var _M_x The state of the generator. This is a ring buffer.
* @var _M_carry The carry.
* @var _M_p Current index of x(i - r).
- * @endif
*/
template<typename _IntType, _IntType __m, int __s, int __r>
class subtract_with_carry
@@ -818,12 +819,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* @brief The Marsaglia-Zaman generator (floats version).
*
- * @if maint
* @var _M_x The state of the generator. This is a ring buffer.
* @var _M_carry The carry.
* @var _M_p Current index of x(i - r).
* @var _M_npows Precomputed negative powers of 2.
- * @endif
*/
template<typename _RealType, int __w, int __s, int __r>
class subtract_with_carry_01
@@ -1042,7 +1041,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* Copy constructs a %discard_block engine.
*
- * Copies an existing base class random number geenerator.
+ * Copies an existing base class random number generator.
* @param rng An existing (base class) engine object.
*/
explicit
@@ -1230,9 +1229,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
// result_type, ArithmeticTypeConcept)
public:
- /** The type of the the first underlying generator engine. */
+ /** The type of the first underlying generator engine. */
typedef _UniformRandomNumberGenerator1 base1_type;
- /** The type of the the second underlying generator engine. */
+ /** The type of the second underlying generator engine. */
typedef _UniformRandomNumberGenerator2 base2_type;
private:
@@ -1586,7 +1585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const uniform_int<_IntType1>& __x);
/**
- * Extracts a %unform_int random number distribution
+ * Extracts a %uniform_int random number distribution
* @p __x from the input stream @p __is.
*
* @param __is An input stream.
@@ -1603,8 +1602,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _UniformRandomNumberGenerator>
result_type
_M_call(_UniformRandomNumberGenerator& __urng,
- result_type __min, result_type __max, true_type)
- { return result_type(__urng() % (__max - __min + 1)) + __min; }
+ result_type __min, result_type __max, true_type);
template<typename _UniformRandomNumberGenerator>
result_type
@@ -1657,7 +1655,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* Resets the distribution state.
*
- * Does nothing for a bernoulli distribution.
+ * Does nothing for a Bernoulli distribution.
*/
void
reset() { }
@@ -1798,7 +1796,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
/**
* @brief A discrete Poisson random number distribution.
*
- * The formula for the poisson probability mass function is
+ * The formula for the Poisson probability mass function is
* @f$ p(i) = \frac{mean^i}{i!} e^{-mean} @f$ where @f$ mean @f$ is the
* parameter of the distribution.
*/
@@ -2052,7 +2050,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const uniform_real<_RealType1>& __x);
/**
- * Extracts a %unform_real random number distribution
+ * Extracts a %uniform_real random number distribution
* @p __x from the input stream @p __is.
*
* @param __is An input stream.
diff --git a/libstdc++-v3/include/tr1_impl/random.tcc b/libstdc++-v3/include/tr1_impl/random.tcc
index e57d609ef5e..2b0f6957b14 100644
--- a/libstdc++-v3/include/tr1_impl/random.tcc
+++ b/libstdc++-v3/include/tr1_impl/random.tcc
@@ -750,6 +750,40 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
+ template<typename _IntType>
+ template<typename _UniformRandomNumberGenerator>
+ typename uniform_int<_IntType>::result_type
+ uniform_int<_IntType>::
+ _M_call(_UniformRandomNumberGenerator& __urng,
+ result_type __min, result_type __max, true_type)
+ {
+ // XXX Must be fixed to work well for *arbitrary* __urng.max(),
+ // __urng.min(), __max, __min. Currently works fine only in the
+ // most common case __urng.max() - __urng.min() >= __max - __min,
+ // with __urng.max() > __urng.min() >= 0.
+ typedef typename __gnu_cxx::__add_unsigned<typename
+ _UniformRandomNumberGenerator::result_type>::__type __urntype;
+ typedef typename __gnu_cxx::__add_unsigned<result_type>::__type
+ __utype;
+ typedef typename __gnu_cxx::__conditional_type<(sizeof(__urntype)
+ > sizeof(__utype)),
+ __urntype, __utype>::__type __uctype;
+
+ result_type __ret;
+
+ const __urntype __urnmin = __urng.min();
+ const __urntype __urnmax = __urng.max();
+ const __urntype __urnrange = __urnmax - __urnmin;
+ const __uctype __urange = __max - __min;
+ const __uctype __udenom = (__urnrange <= __urange
+ ? 1 : __urnrange / (__urange + 1));
+ do
+ __ret = (__urntype(__urng()) - __urnmin) / __udenom;
+ while (__ret > __max - __min);
+
+ return __ret + __min;
+ }
+
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream<_CharT, _Traits>&
operator<<(std::basic_ostream<_CharT, _Traits>& __os,
diff --git a/libstdc++-v3/include/tr1_impl/regex b/libstdc++-v3/include/tr1_impl/regex
index de695ddf8c4..bf4c309c762 100644
--- a/libstdc++-v3/include/tr1_impl/regex
+++ b/libstdc++-v3/include/tr1_impl/regex
@@ -193,7 +193,7 @@ namespace regex_constants
/// The expression does not match an empty sequence.
static const match_flag_type match_not_null = 1 << _S_not_null;
- /// The expression only matchs a sub-sequence that begins at first .
+ /// The expression only matches a sub-sequence that begins at first .
static const match_flag_type match_continuous = 1 << _S_continuous;
/// --first is a valid iterator position. When this flag is set then the
@@ -213,7 +213,7 @@ namespace regex_constants
/// Format strings (from ECMA-262 [15.5.4.11]):
/// $$ $
/// $& The matched substring.
- /// $` The portion of <em>string</em> that preceeds the matched substring.
+ /// $` The portion of <em>string</em> that precedes the matched substring.
/// $' The portion of <em>string</em> that follows the matched substring.
/// $n The nth capture, where n is in [1,9] and $n is not followed by a
/// decimal digit. If n <= m and the nth capture is undefined, use the
@@ -371,7 +371,7 @@ namespace regex_constants
*
* @returns the number of characters between @p *__p and the first
* default-initialized value of type @p char_type. In other words, uses
- * the C-string algorithm for determiining the length of a sequence of
+ * the C-string algorithm for determining the length of a sequence of
* characters.
*/
static std::size_t
@@ -458,7 +458,7 @@ namespace regex_constants
{ return string_type(); }
/**
- * @breief Gets a collation element by name.
+ * @brief Gets a collation element by name.
*
* @param first beginning of the collation element name.
* @param last one-past-the-end of the collation element name.
@@ -687,7 +687,7 @@ namespace regex_constants
{ _M_compile(); }
/**
- * @brief Copy-contructs a basic regular expression.
+ * @brief Copy-constructs a basic regular expression.
*
* @param rhs A @p regex object.
*/
@@ -716,7 +716,7 @@ namespace regex_constants
* @brief Constructs a basic regular expression from the range
* [first, last) interpreted according to the flags in @p f.
*
- * @param first The start of arange containing a valid regular
+ * @param first The start of a range containing a valid regular
* expression.
* @param last The end of a range containing a valid regular
* expression.
@@ -857,7 +857,7 @@ namespace regex_constants
// [7.8.4] const operations
/**
* @brief Gets the number of marked subexpressions within the regular
- * expresison.
+ * expression.
*/
unsigned int
mark_count() const
@@ -891,7 +891,7 @@ namespace regex_constants
// [7.8.6] swap
/**
- * @brief Swaps the contents of two regular expression obects.
+ * @brief Swaps the contents of two regular expression objects.
*
* @param rhs Another regular expression object.
*/
@@ -1102,7 +1102,7 @@ namespace regex_constants
* @brief Tests the ordering of two regular expression submatches.
* @param lhs First regular expression submatch.
* @param rhs Second regular expression submatch.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _BiIter>
inline bool
@@ -1181,7 +1181,7 @@ namespace regex_constants
* @brief Tests the ordering of a string and a regular expression submatch.
* @param lhs A string.
* @param rhs A regular expression submatch.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
inline bool
@@ -1265,7 +1265,7 @@ namespace regex_constants
* @brief Tests the ordering of a regular expression submatch and a string.
* @param lhs A regular expression submatch.
* @param rhs A string.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _Bi_iter, class _Ch_traits, class _Ch_alloc>
inline bool
@@ -1343,7 +1343,7 @@ namespace regex_constants
* @brief Tests the ordering of a string and a regular expression submatch.
* @param lhs A string.
* @param rhs A regular expression submatch.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _Bi_iter>
inline bool
@@ -1491,7 +1491,7 @@ namespace regex_constants
* @brief Tests the ordering of a string and a regular expression submatch.
* @param lhs A string.
* @param rhs A regular expression submatch.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _Bi_iter>
inline bool
@@ -1541,7 +1541,7 @@ namespace regex_constants
* @brief Tests the ordering of a regular expression submatch and a string.
* @param lhs A regular expression submatch.
* @param rhs A const string reference.
- * @returns true if @a lhs preceeds @a rhs, false otherwise.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
*/
template<typename _Bi_iter>
inline bool
@@ -1565,7 +1565,7 @@ namespace regex_constants
* @brief Tests the ordering of a regular expression submatch and a string.
* @param lhs A regular expression submatch.
* @param rhs A const string reference.
- * @returns true if @a lhs does not preceed @a rhs, false otherwise.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
*/
template<typename _Bi_iter>
inline bool
@@ -2021,7 +2021,7 @@ namespace regex_constants
/**
* @brief Searches for a regular expression within a C-string.
* @param s [IN] A C-string to search for the regex.
- * @param m [OUT] The set of regex mnatches.
+ * @param m [OUT] The set of regex matches.
* @param e [IN] The regex to search for in @p s.
* @param f [IN] The search flags.
* @retval true A match was found within the string.
@@ -2041,7 +2041,7 @@ namespace regex_constants
/**
* @brief Searches for a regular expression within a C-string.
* @param s [IN] The C-string to search.
- * @param e [IN] The regular expressioon to search for.
+ * @param e [IN] The regular expression to search for.
* @param f [IN] Search policy flags.
* @retval true A match was found within the string.
* @retval false No match was found within the string.
@@ -2058,7 +2058,7 @@ namespace regex_constants
/**
* @brief Searches for a regular expression within a string.
* @param s [IN] The string to search.
- * @param e [IN] The regular expressioon to search for.
+ * @param e [IN] The regular expression to search for.
* @param flags [IN] Search policy flags.
* @retval true A match was found within the string.
* @retval false No match was found within the string.
@@ -2077,7 +2077,7 @@ namespace regex_constants
/**
* @brief Searches for a regular expression within a string.
* @param s [IN] A C++ string to search for the regex.
- * @param m [OUT] The set of regex mnatches.
+ * @param m [OUT] The set of regex matches.
* @param e [IN] The regex to search for in @p s.
* @param f [IN] The search flags.
* @retval true A match was found within the string.
@@ -2273,12 +2273,12 @@ namespace regex_constants
regex_token_iterator();
/**
- * Constrcts a %regex_token_iterator...
+ * Constructs a %regex_token_iterator...
* @param a [IN] The start of the text to search.
- * @param b [IN] One-past-the-eend of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
* @param re [IN] The regular expression to search for.
* @param submatch [IN] Which submatch to return. There are some
- * special values for thsi parameter:
+ * special values for this parameter:
* - -1 each enumerated subexpression does NOT
* match the regular expression (aka field
* splitting)
@@ -2298,9 +2298,9 @@ namespace regex_constants
= regex_constants::match_default);
/**
- * Constrcts a %regex_token_iterator...
+ * Constructs a %regex_token_iterator...
* @param a [IN] The start of the text to search.
- * @param b [IN] One-past-the-eend of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
* @param re [IN] The regular expression to search for.
* @param submatches [IN] A list of subexpressions to return for each
* regular expression match within the text.
@@ -2316,9 +2316,9 @@ namespace regex_constants
= regex_constants::match_default);
/**
- * Constrcts a %regex_token_iterator...
+ * Constructs a %regex_token_iterator...
* @param a [IN] The start of the text to search.
- * @param b [IN] One-past-the-eend of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
* @param re [IN] The regular expression to search for.
* @param submatches [IN] A list of subexpressions to return for each
* regular expression match within the text.
diff --git a/libstdc++-v3/include/tr1_impl/tuple b/libstdc++-v3/include/tr1_impl/tuple
deleted file mode 100644
index 52017d617c1..00000000000
--- a/libstdc++-v3/include/tr1_impl/tuple
+++ /dev/null
@@ -1,430 +0,0 @@
-// class template tuple -*- C++ -*-
-
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 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 tr1_impl/tuple
- * This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
-*/
-
-// Chris Jefferson <chris@bubblescope.net>
-// Variadic Templates support by Douglas Gregor <doug.gregor@gmail.com>
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_TR1
-
- template<typename _Tp>
- class reference_wrapper;
-
- // Adds a const reference to a non-reference type.
- template<typename _Tp>
- struct __add_c_ref
- { typedef const _Tp& type; };
-
- template<typename _Tp>
- struct __add_c_ref<_Tp&>
- { typedef _Tp& type; };
-
- // Adds a reference to a non-reference type.
- template<typename _Tp>
- struct __add_ref
- { typedef _Tp& type; };
-
- template<typename _Tp>
- struct __add_ref<_Tp&>
- { typedef _Tp& type; };
-
- /**
- * @if maint
- * Contains the actual implementation of the @c tuple template, stored
- * as a recursive inheritance hierarchy from the first element (most
- * derived class) to the last (least derived class). The @c Idx
- * parameter gives the 0-based index of the element stored at this
- * point in the hierarchy; we use it to implement a constant-time
- * get() operation.
- * @endif
- */
- template<int _Idx, typename... _Elements>
- struct _Tuple_impl;
-
- /**
- * @if maint
- * Zero-element tuple implementation. This is the basis case for the
- * inheritance recursion.
- * @endif maint
- */
- template<int _Idx>
- struct _Tuple_impl<_Idx> { };
-
- /**
- * @if maint
- * Recursive tuple implementation. Here we store the @c Head element
- * and derive from a @c Tuple_impl containing the remaining elements
- * (which contains the @c Tail).
- * @endif
- */
- template<int _Idx, typename _Head, typename... _Tail>
- struct _Tuple_impl<_Idx, _Head, _Tail...>
- : public _Tuple_impl<_Idx + 1, _Tail...>
- {
- typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
-
- _Head _M_head;
-
- _Inherited& _M_tail() { return *this; }
- const _Inherited& _M_tail() const { return *this; }
-
- _Tuple_impl() : _Inherited(), _M_head() { }
-
- explicit
- _Tuple_impl(typename __add_c_ref<_Head>::type __head,
- typename __add_c_ref<_Tail>::type... __tail)
- : _Inherited(__tail...), _M_head(__head) { }
-
- template<typename... _UElements>
- _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
- : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
-
- _Tuple_impl(const _Tuple_impl& __in)
- : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
-
- template<typename... _UElements>
- _Tuple_impl&
- operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
- {
- _M_head = __in._M_head;
- _M_tail() = __in._M_tail();
- return *this;
- }
-
- _Tuple_impl&
- operator=(const _Tuple_impl& __in)
- {
- _M_head = __in._M_head;
- _M_tail() = __in._M_tail();
- return *this;
- }
- };
-
- template<typename... _Elements>
- class tuple : public _Tuple_impl<0, _Elements...>
- {
- typedef _Tuple_impl<0, _Elements...> _Inherited;
-
- public:
- tuple() : _Inherited() { }
-
- explicit
- tuple(typename __add_c_ref<_Elements>::type... __elements)
- : _Inherited(__elements...) { }
-
- template<typename... _UElements>
- tuple(const tuple<_UElements...>& __in)
- : _Inherited(__in) { }
-
- tuple(const tuple& __in)
- : _Inherited(__in) { }
-
- template<typename... _UElements>
- tuple&
- operator=(const tuple<_UElements...>& __in)
- {
- static_cast<_Inherited&>(*this) = __in;
- return *this;
- }
-
- tuple&
- operator=(const tuple& __in)
- {
- static_cast<_Inherited&>(*this) = __in;
- return *this;
- }
- };
-
- template<> class tuple<> { };
-
- // 2-element tuple, with construction and assignment from a pair.
- template<typename _T1, typename _T2>
- class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
- {
- typedef _Tuple_impl<0, _T1, _T2> _Inherited;
-
- public:
- tuple() : _Inherited() { }
-
- explicit
- tuple(typename __add_c_ref<_T1>::type __a1,
- typename __add_c_ref<_T2>::type __a2)
- : _Inherited(__a1, __a2) { }
-
- template<typename _U1, typename _U2>
- tuple(const tuple<_U1, _U2>& __in)
- : _Inherited(__in) { }
-
- tuple(const tuple& __in)
- : _Inherited(__in) { }
-
- template<typename _U1, typename _U2>
- tuple(const pair<_U1, _U2>& __in)
- : _Inherited(_Tuple_impl<0,
- typename __add_c_ref<_U1>::type,
- typename __add_c_ref<_U2>::type>(__in.first,
- __in.second))
- { }
-
- template<typename _U1, typename _U2>
- tuple&
- operator=(const tuple<_U1, _U2>& __in)
- {
- static_cast<_Inherited&>(*this) = __in;
- return *this;
- }
-
- tuple&
- operator=(const tuple& __in)
- {
- static_cast<_Inherited&>(*this) = __in;
- return *this;
- }
-
- template<typename _U1, typename _U2>
- tuple&
- operator=(const pair<_U1, _U2>& __in)
- {
- this->_M_head = __in.first;
- this->_M_tail()._M_head = __in.second;
- return *this;
- }
- };
-
-
- /// Gives the type of the ith element of a given tuple type.
- template<int __i, typename _Tp>
- struct tuple_element;
-
- /**
- * @if maint
- * Recursive case for tuple_element: strip off the first element in
- * the tuple and retrieve the (i-1)th element of the remaining tuple.
- * @endif
- */
- template<int __i, typename _Head, typename... _Tail>
- struct tuple_element<__i, tuple<_Head, _Tail...> >
- : tuple_element<__i - 1, tuple<_Tail...> > { };
-
- /**
- * @if maint
- * Basis case for tuple_element: The first element is the one we're seeking.
- * @endif
- */
- template<typename _Head, typename... _Tail>
- struct tuple_element<0, tuple<_Head, _Tail...> >
- {
- typedef _Head type;
- };
-
- /// Finds the size of a given tuple type.
- template<typename _Tp>
- struct tuple_size;
-
- /// @brief class tuple_size
- template<typename... _Elements>
- struct tuple_size<tuple<_Elements...> >
- {
- static const int value = sizeof...(_Elements);
- };
-
- template<typename... _Elements>
- const int tuple_size<tuple<_Elements...> >::value;
-
- template<int __i, typename _Head, typename... _Tail>
- inline typename __add_ref<_Head>::type
- __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
- {
- return __t._M_head;
- }
-
- template<int __i, typename _Head, typename... _Tail>
- inline typename __add_c_ref<_Head>::type
- __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
- {
- return __t._M_head;
- }
-
- // Return a reference (const reference) to the ith element of a tuple.
- // Any const or non-const ref elements are returned with their original type.
- template<int __i, typename... _Elements>
- inline typename __add_ref<
- typename tuple_element<__i, tuple<_Elements...> >::type
- >::type
- get(tuple<_Elements...>& __t)
- {
- return __get_helper<__i>(__t);
- }
-
- template<int __i, typename... _Elements>
- inline typename __add_c_ref<
- typename tuple_element<__i, tuple<_Elements...> >::type
- >::type
- get(const tuple<_Elements...>& __t)
- {
- return __get_helper<__i>(__t);
- }
-
- // This class helps construct the various comparison operations on tuples
- template<int __check_equal_size, int __i, int __j,
- typename _Tp, typename _Up>
- struct __tuple_compare;
-
- template<int __i, int __j, typename _Tp, typename _Up>
- struct __tuple_compare<0, __i, __j, _Tp, _Up>
- {
- static bool __eq(const _Tp& __t, const _Up& __u)
- {
- return (get<__i>(__t) == get<__i>(__u) &&
- __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u));
- }
-
- static bool __less(const _Tp& __t, const _Up& __u)
- {
- return ((get<__i>(__t) < get<__i>(__u))
- || !(get<__i>(__u) < get<__i>(__t)) &&
- __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u));
- }
- };
-
- template<int __i, typename _Tp, typename _Up>
- struct __tuple_compare<0, __i, __i, _Tp, _Up>
- {
- static bool __eq(const _Tp&, const _Up&)
- { return true; }
-
- static bool __less(const _Tp&, const _Up&)
- { return false; }
- };
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator==(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- {
- typedef tuple<_TElements...> _Tp;
- typedef tuple<_UElements...> _Up;
- return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
- 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
- }
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator<(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- {
- typedef tuple<_TElements...> _Tp;
- typedef tuple<_UElements...> _Up;
- return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value,
- 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
- }
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator!=(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- { return !(__t == __u); }
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator>(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- { return __u < __t; }
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator<=(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- { return !(__u < __t); }
-
- template<typename... _TElements, typename... _UElements>
- bool
- operator>=(const tuple<_TElements...>& __t,
- const tuple<_UElements...>& __u)
- { return !(__t < __u); }
-
- // Helper which adds a reference to a type when given a reference_wrapper
- template<typename _Tp>
- struct __strip_reference_wrapper
- {
- typedef _Tp __type;
- };
-
- template<typename _Tp>
- struct __strip_reference_wrapper<reference_wrapper<_Tp> >
- {
- typedef _Tp& __type;
- };
-
- template<typename _Tp>
- struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
- {
- typedef _Tp& __type;
- };
-
- template<typename... _Elements>
- inline tuple<typename __strip_reference_wrapper<_Elements>::__type...>
- make_tuple(_Elements... __args)
- {
- typedef tuple<typename __strip_reference_wrapper<_Elements>::__type...>
- __result_type;
- return __result_type(__args...);
- }
-
- template<typename... _Elements>
- inline tuple<_Elements&...>
- tie(_Elements&... __args)
- {
- return tuple<_Elements&...>(__args...);
- }
-
- // A class (and instance) which can be used in 'tie' when an element
- // of a tuple is not required
- struct _Swallow_assign
- {
- template<class _Tp>
- _Swallow_assign&
- operator=(const _Tp&)
- { return *this; }
- };
-
- // TODO: Put this in some kind of shared file.
- namespace
- {
- _Swallow_assign ignore;
- }; // anonymous namespace
-
-_GLIBCXX_END_NAMESPACE_TR1
-}
diff --git a/libstdc++-v3/include/tr1_impl/type_traits b/libstdc++-v3/include/tr1_impl/type_traits
index 9035fafece3..2a6227b7c97 100644
--- a/libstdc++-v3/include/tr1_impl/type_traits
+++ b/libstdc++-v3/include/tr1_impl/type_traits
@@ -32,8 +32,6 @@
* You should not attempt to use it directly.
*/
-#include <tr1_impl/type_traitsfwd.h>
-
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
@@ -131,7 +129,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
struct is_pointer
: public false_type { };
_DEFINE_SPEC(1, is_pointer, _Tp*, true)
-
+
+ template<typename _Tp>
+ struct is_reference;
+
+ template<typename _Tp>
+ struct is_function;
+
template<typename>
struct is_member_object_pointer
: public false_type { };
@@ -172,6 +176,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
: public true_type { };
template<typename _Tp>
+ struct remove_cv;
+
+ template<typename _Tp>
struct is_function
: public integral_constant<bool, (__is_function_helper<typename
remove_cv<_Tp>::type>::value)>
@@ -198,6 +205,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
{ };
template<typename _Tp>
+ struct is_member_pointer;
+
+ template<typename _Tp>
struct is_scalar
: public integral_constant<bool, (is_arithmetic<_Tp>::value
|| is_enum<_Tp>::value
@@ -268,8 +278,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
template<typename _Tp>
struct rank<_Tp[]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
-
- template<typename, unsigned>
+
+ template<typename, unsigned _Uint = 0>
struct extent
: public integral_constant<std::size_t, 0> { };
@@ -286,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
_Uint == 0 ? 0 : extent<_Tp,
_Uint - 1>::value>
{ };
-
+
/// @brief relationships between types [4.6].
template<typename, typename>
struct is_same
@@ -369,84 +379,14 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
struct remove_pointer
{ typedef _Tp type; };
_DEFINE_SPEC(1, remove_pointer, _Tp*, false)
-
+
+ template<typename _Tp>
+ struct remove_reference;
+
template<typename _Tp>
struct add_pointer
{ typedef typename remove_reference<_Tp>::type* type; };
- /// @brief other transformations [4.8].
-
- // Due to c++/19163 and c++/17743, for the time being we cannot use
- // the correct, neat implementation :-(
- //
- // template<std::size_t _Len, std::size_t _Align>
- // struct aligned_storage
- // { typedef char type[_Len] __attribute__((__aligned__(_Align))); }
- //
- // Temporary workaround, useful for Align up to 32:
- template<std::size_t, std::size_t>
- struct aligned_storage { };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 1>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(1)));
- };
- };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 2>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(2)));
- };
- };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 4>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(4)));
- };
- };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 8>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(8)));
- };
- };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 16>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(16)));
- };
- };
-
- template<std::size_t _Len>
- struct aligned_storage<_Len, 32>
- {
- union type
- {
- unsigned char __data[_Len];
- char __align __attribute__((__aligned__(32)));
- };
- };
-
#undef _DEFINE_SPEC_0_HELPER
#undef _DEFINE_SPEC_1_HELPER
#undef _DEFINE_SPEC_2_HELPER
diff --git a/libstdc++-v3/include/tr1_impl/type_traitsfwd.h b/libstdc++-v3/include/tr1_impl/type_traitsfwd.h
deleted file mode 100644
index 1565df0ba88..00000000000
--- a/libstdc++-v3/include/tr1_impl/type_traitsfwd.h
+++ /dev/null
@@ -1,178 +0,0 @@
-// TR1 type_traitsfwd.h -*- C++ -*-
-
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 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 tr1_impl/type_traitsfwd.h
- * This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
- */
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_TR1
-
- /// @brief helper classes [4.3].
- template<typename _Tp, _Tp __v>
- struct integral_constant;
- typedef integral_constant<bool, true> true_type;
- typedef integral_constant<bool, false> false_type;
-
- /// @brief primary type categories [4.5.1].
- template<typename _Tp>
- struct is_void;
-
- template<typename _Tp>
- struct is_integral;
-
- template<typename _Tp>
- struct is_floating_point;
-
- template<typename _Tp>
- struct is_array;
-
- template<typename _Tp>
- struct is_pointer;
-
- template<typename _Tp>
- struct is_reference;
-
- template<typename _Tp>
- struct is_member_object_pointer;
-
- template<typename _Tp>
- struct is_member_function_pointer;
-
- template<typename _Tp>
- struct is_enum;
-
- template<typename _Tp>
- struct is_union;
-
- template<typename _Tp>
- struct is_class;
-
- template<typename _Tp>
- struct is_function;
-
- /// @brief composite type traits [4.5.2].
- template<typename _Tp>
- struct is_arithmetic;
-
- template<typename _Tp>
- struct is_fundamental;
-
- template<typename _Tp>
- struct is_object;
-
- template<typename _Tp>
- struct is_scalar;
-
- template<typename _Tp>
- struct is_compound;
-
- template<typename _Tp>
- struct is_member_pointer;
-
- /// @brief type properties [4.5.3].
- template<typename _Tp>
- struct is_const;
-
- template<typename _Tp>
- struct is_volatile;
-
- template<typename _Tp>
- struct is_empty;
-
- template<typename _Tp>
- struct is_polymorphic;
-
- template<typename _Tp>
- struct is_abstract;
-
- template<typename _Tp>
- struct has_virtual_destructor;
-
- template<typename _Tp>
- struct alignment_of;
-
- template<typename _Tp>
- struct rank;
-
- template<typename _Tp, unsigned _Uint = 0>
- struct extent;
-
- /// @brief relationships between types [4.6].
- template<typename _Tp, typename _Up>
- struct is_same;
-
- /// @brief const-volatile modifications [4.7.1].
- template<typename _Tp>
- struct remove_const;
-
- template<typename _Tp>
- struct remove_volatile;
-
- template<typename _Tp>
- struct remove_cv;
-
- template<typename _Tp>
- struct add_const;
-
- template<typename _Tp>
- struct add_volatile;
-
- template<typename _Tp>
- struct add_cv;
-
- /// @brief reference modifications [4.7.2].
- template<typename _Tp>
- struct remove_reference;
-
- template<typename _Tp>
- struct add_reference;
-
- /// @brief array modifications [4.7.3].
- template<typename _Tp>
- struct remove_extent;
-
- template<typename _Tp>
- struct remove_all_extents;
-
- /// @brief pointer modifications [4.7.4].
- template<typename _Tp>
- struct remove_pointer;
-
- template<typename _Tp>
- struct add_pointer;
-
- /// @brief other transformations [4.8].
- template<std::size_t _Len, std::size_t _Align>
- struct aligned_storage;
-
-_GLIBCXX_END_NAMESPACE_TR1
-}
diff --git a/libstdc++-v3/include/tr1_impl/unordered_map b/libstdc++-v3/include/tr1_impl/unordered_map
index a3622960108..5ecd5c0a998 100644
--- a/libstdc++-v3/include/tr1_impl/unordered_map
+++ b/libstdc++-v3/include/tr1_impl/unordered_map
@@ -85,6 +85,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_map(__unordered_map&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
};
template<class _Key, class _Tp,
@@ -137,6 +142,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_multimap(__unordered_multimap&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
};
template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
@@ -189,6 +199,20 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_map(unordered_map&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_map&
+ operator=(unordered_map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
};
template<class _Key, class _Tp,
@@ -223,7 +247,59 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_multimap(unordered_multimap&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_multimap&
+ operator=(unordered_multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
};
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/include/tr1_impl/unordered_set b/libstdc++-v3/include/tr1_impl/unordered_set
index 2292d365979..bdc1575a445 100644
--- a/libstdc++-v3/include/tr1_impl/unordered_set
+++ b/libstdc++-v3/include/tr1_impl/unordered_set
@@ -85,6 +85,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_set(__unordered_set&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
};
template<class _Value,
@@ -135,6 +140,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
__detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_multiset(__unordered_multiset&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
};
template<class _Value, class _Hash, class _Pred, class _Alloc,
@@ -187,6 +197,20 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_set(unordered_set&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_set&
+ operator=(unordered_set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
};
template<class _Value,
@@ -221,7 +245,59 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a)
{ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_multiset(unordered_multiset&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_multiset&
+ operator=(unordered_multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+#endif
};
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in
index e0cd3a2e0ee..f423f83e53e 100644
--- a/libstdc++-v3/libmath/Makefile.in
+++ b/libstdc++-v3/libmath/Makefile.in
@@ -41,6 +41,7 @@ subdir = libmath
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -86,6 +87,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -123,6 +125,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -133,6 +137,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 5074f0f0ade..7453d3da8f1 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -43,6 +43,7 @@ DIST_COMMON = $(glibcxxinstall_HEADERS) $(srcdir)/Makefile.am \
subdir = libsupc++
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -141,6 +142,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -178,6 +180,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -188,6 +192,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc
index f1cda0c1bbf..86cfbafc229 100644
--- a/libstdc++-v3/libsupc++/eh_personality.cc
+++ b/libstdc++-v3/libsupc++/eh_personality.cc
@@ -1,5 +1,5 @@
// -*- C++ -*- The GNU C++ exception personality routine.
-// Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -446,7 +446,7 @@ PERSONALITY_FUNCTION (int version,
// Parse the LSDA header.
p = parse_lsda_header (context, language_specific_data, &info);
info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
-#ifdef HAVE_GETIPINFO
+#ifdef _GLIBCXX_HAVE_GETIPINFO
ip = _Unwind_GetIPInfo (context, &ip_before_insn);
#else
ip = _Unwind_GetIP (context);
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index eb6421689b3..e4665773ca2 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -35,12 +35,21 @@
#include <new>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
+#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
+ && defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
+# include <climits>
+# include <syscall.h>
+# define _GLIBCXX_USE_FUTEX
+# define _GLIBCXX_FUTEX_WAIT 0
+# define _GLIBCXX_FUTEX_WAKE 1
+#endif
// The IA64/generic ABI uses the first byte of the guard variable.
// The ARM EABI uses the least significant bit.
// Thread-safe static local initialization support.
#ifdef __GTHREADS
+# ifndef _GLIBCXX_USE_FUTEX
namespace
{
// A single mutex controlling all static initializations.
@@ -60,9 +69,48 @@ namespace
__gthread_once(&once, init);
return *static_mutex;
}
+
+ // Simple wrapper for exception safety.
+ struct mutex_wrapper
+ {
+ bool unlock;
+ mutex_wrapper() : unlock(true)
+ { get_static_mutex().lock(); }
+
+ ~mutex_wrapper()
+ {
+ if (unlock)
+ static_mutex->unlock();
+ }
+ };
}
+# endif
+
+# if defined(__GTHREAD_HAS_COND) && !defined(_GLIBCXX_USE_FUTEX)
+namespace
+{
+ // A single conditional variable controlling all static initializations.
+ static __gnu_cxx::__cond* static_cond;
+
+ // using a fake type to avoid initializing a static class.
+ typedef char fake_cond_t[sizeof(__gnu_cxx::__cond)]
+ __attribute__ ((aligned(__alignof__(__gnu_cxx::__cond))));
+ fake_cond_t fake_cond;
+
+ static void init_static_cond()
+ { static_cond = new (&fake_cond) __gnu_cxx::__cond(); }
-#ifndef _GLIBCXX_GUARD_TEST_AND_ACQUIRE
+ __gnu_cxx::__cond&
+ get_static_cond()
+ {
+ static __gthread_once_t once = __GTHREAD_ONCE_INIT;
+ __gthread_once(&once, init_static_cond);
+ return *static_cond;
+ }
+}
+# endif
+
+# ifndef _GLIBCXX_GUARD_TEST_AND_ACQUIRE
inline bool
__test_and_acquire (__cxxabiv1::__guard *g)
{
@@ -70,24 +118,24 @@ __test_and_acquire (__cxxabiv1::__guard *g)
_GLIBCXX_READ_MEM_BARRIER;
return b;
}
-#define _GLIBCXX_GUARD_TEST_AND_ACQUIRE(G) __test_and_acquire (G)
-#endif
+# define _GLIBCXX_GUARD_TEST_AND_ACQUIRE(G) __test_and_acquire (G)
+# endif
-#ifndef _GLIBCXX_GUARD_SET_AND_RELEASE
+# ifndef _GLIBCXX_GUARD_SET_AND_RELEASE
inline void
__set_and_release (__cxxabiv1::__guard *g)
{
_GLIBCXX_WRITE_MEM_BARRIER;
_GLIBCXX_GUARD_SET (g);
}
-#define _GLIBCXX_GUARD_SET_AND_RELEASE(G) __set_and_release (G)
-#endif
+# define _GLIBCXX_GUARD_SET_AND_RELEASE(G) __set_and_release (G)
+# endif
#else /* !__GTHREADS */
-#undef _GLIBCXX_GUARD_TEST_AND_ACQUIRE
-#undef _GLIBCXX_GUARD_SET_AND_RELEASE
-#define _GLIBCXX_GUARD_SET_AND_RELEASE(G) _GLIBCXX_GUARD_SET (G)
+# undef _GLIBCXX_GUARD_TEST_AND_ACQUIRE
+# undef _GLIBCXX_GUARD_SET_AND_RELEASE
+# define _GLIBCXX_GUARD_SET_AND_RELEASE(G) _GLIBCXX_GUARD_SET (G)
#endif /* __GTHREADS */
@@ -110,31 +158,95 @@ namespace __gnu_cxx
recursive_init_error::~recursive_init_error() throw() { }
}
+//
+// Here are C++ run-time routines for guarded initiailization of static
+// variables. There are 4 scenarios under which these routines are called:
+//
+// 1. Threads not supported (__GTHREADS not defined)
+// 2. Threads are supported but not enabled at run-time.
+// 3. Threads enabled at run-time but __gthreads_* are not fully POSIX.
+// 4. Threads enabled at run-time and __gthreads_* support all POSIX threads
+// primitives we need here.
+//
+// The old code supported scenarios 1-3 but was broken since it used a global
+// mutex for all threads and had the mutex locked during the whole duration of
+// initlization of a guarded static variable. The following created a dead-lock
+// with the old code.
+//
+// Thread 1 acquires the global mutex.
+// Thread 1 starts initializing static variable.
+// Thread 1 creates thread 2 during initialization.
+// Thread 2 attempts to acuqire mutex to initialize another variable.
+// Thread 2 blocks since thread 1 is locking the mutex.
+// Thread 1 waits for result from thread 2 and also blocks. A deadlock.
+//
+// The new code here can handle this situation and thus is more robust. Howere,
+// we need to use the POSIX thread conditional variable, which is not supported
+// in all platforms, notably older versions of Microsoft Windows. The gthr*.h
+// headers define a symbol __GTHREAD_HAS_COND for platforms that support POSIX
+// like conditional variables. For platforms that do not support conditional
+// variables, we need to fall back to the old code.
+
+// If _GLIBCXX_USE_FUTEX, no global mutex or conditional variable is used,
+// only atomic operations are used together with futex syscall.
+// Valid values of the first integer in guard are:
+// 0 No thread encountered the guarded init
+// yet or it has been aborted.
+// _GLIBCXX_GUARD_BIT The guarded static var has been successfully
+// initialized.
+// _GLIBCXX_GUARD_PENDING_BIT The guarded static var is being initialized
+// and no other thread is waiting for its
+// initialization.
+// (_GLIBCXX_GUARD_PENDING_BIT The guarded static var is being initialized
+// | _GLIBCXX_GUARD_WAITING_BIT) and some other threads are waiting until
+// it is initialized.
+
namespace __cxxabiv1
{
+#ifdef _GLIBCXX_USE_FUTEX
+ namespace
+ {
+ static inline int __guard_test_bit (const int __byte, const int __val)
+ {
+ union { int __i; char __c[sizeof (int)]; } __u = { 0 };
+ __u.__c[__byte] = __val;
+ return __u.__i;
+ }
+ }
+#endif
+
static inline int
- recursion_push (__guard* g)
- { return ((char *)g)[1]++; }
+ init_in_progress_flag(__guard* g)
+ { return ((char *)g)[1]; }
static inline void
- recursion_pop (__guard* g)
- { --((char *)g)[1]; }
+ set_init_in_progress_flag(__guard* g, int v)
+ { ((char *)g)[1] = v; }
- static int
- acquire (__guard *g)
+ static inline void
+ throw_recursive_init_exception()
{
- if (_GLIBCXX_GUARD_TEST (g))
- return 0;
-
- if (recursion_push (g))
- {
#ifdef __EXCEPTIONS
throw __gnu_cxx::recursive_init_error();
#else
// Use __builtin_trap so we don't require abort().
- __builtin_trap ();
+ __builtin_trap();
#endif
- }
+ }
+
+ // acuire() is a helper function used to acquire guard if thread support is
+ // not compiled in or is compiled in but not enabled at run-time.
+ static int
+ acquire(__guard *g)
+ {
+ // Quit if the object is already initialized.
+ if (_GLIBCXX_GUARD_TEST(g))
+ return 0;
+
+ if (init_in_progress_flag(g))
+ throw_recursive_init_exception();
+
+ set_init_in_progress_flag(g, 1);
return 1;
}
@@ -148,31 +260,75 @@ namespace __cxxabiv1
if (_GLIBCXX_GUARD_TEST_AND_ACQUIRE (g))
return 0;
+# ifdef _GLIBCXX_USE_FUTEX
+ // If __sync_* and futex syscall are supported, don't use any global
+ // mutex.
if (__gthread_active_p ())
{
- // Simple wrapper for exception safety.
- struct mutex_wrapper
- {
- bool unlock;
- mutex_wrapper() : unlock(true)
- { get_static_mutex().lock(); }
-
- ~mutex_wrapper()
+ int *gi = (int *) (void *) g;
+ const int guard_bit = _GLIBCXX_GUARD_BIT;
+ const int pending_bit = _GLIBCXX_GUARD_PENDING_BIT;
+ const int waiting_bit = _GLIBCXX_GUARD_WAITING_BIT;
+
+ while (1)
{
- if (unlock)
- static_mutex->unlock();
- }
- };
+ int old = __sync_val_compare_and_swap (gi, 0, pending_bit);
+ if (old == 0)
+ return 1; // This thread should do the initialization.
+ if (old == guard_bit)
+ return 0; // Already initialized.
+
+ if (old == pending_bit)
+ {
+ int newv = old | waiting_bit;
+ if (__sync_val_compare_and_swap (gi, old, newv) != old)
+ continue;
+
+ old = newv;
+ }
+
+ syscall (SYS_futex, gi, _GLIBCXX_FUTEX_WAIT, old, 0);
+ }
+ }
+# else
+ if (__gthread_active_p ())
+ {
mutex_wrapper mw;
- if (acquire (g))
+
+ while (1) // When this loop is executing, mutex is locked.
{
- mw.unlock = false;
- return 1;
- }
+# ifdef __GTHREAD_HAS_COND
+ // The static is already initialized.
+ if (_GLIBCXX_GUARD_TEST(g))
+ return 0; // The mutex will be unlocked via wrapper
- return 0;
+ if (init_in_progress_flag(g))
+ {
+ // The guarded static is currently being initialized by
+ // another thread, so we release mutex and wait for the
+ // conditional variable. We will lock the mutex again after
+ // this.
+ get_static_cond().wait_recursive(&get_static_mutex());
+ }
+ else
+ {
+ set_init_in_progress_flag(g, 1);
+ return 1; // The mutex will be unlocked via wrapper.
+ }
+# else
+ // This provides compatibility with older systems not supporting
+ // POSIX like conditional variables.
+ if (acquire(g))
+ {
+ mw.unlock = false;
+ return 1; // The mutex still locked.
+ }
+ return 0; // The mutex will be unlocked via wrapper.
+# endif
+ }
}
+# endif
#endif
return acquire (g);
@@ -181,8 +337,37 @@ namespace __cxxabiv1
extern "C"
void __cxa_guard_abort (__guard *g)
{
- recursion_pop (g);
-#ifdef __GTHREADS
+#ifdef _GLIBCXX_USE_FUTEX
+ // If __sync_* and futex syscall are supported, don't use any global
+ // mutex.
+ if (__gthread_active_p ())
+ {
+ int *gi = (int *) (void *) g;
+ const int waiting_bit = _GLIBCXX_GUARD_WAITING_BIT;
+ int old = __sync_lock_test_and_set (gi, 0);
+
+ if ((old & waiting_bit) != 0)
+ syscall (SYS_futex, gi, _GLIBCXX_FUTEX_WAKE, INT_MAX);
+ return;
+ }
+#elif defined(__GTHREAD_HAS_COND)
+ if (__gthread_active_p())
+ {
+ mutex_wrapper mw;
+
+ set_init_in_progress_flag(g, 0);
+
+ // If we abort, we still need to wake up all other threads waiting for
+ // the conditional variable.
+ get_static_cond().broadcast();
+ return;
+ }
+#endif
+
+ set_init_in_progress_flag(g, 0);
+#if defined(__GTHREADS) && !defined(__GTHREAD_HAS_COND)
+ // This provides compatibility with older systems not supporting POSIX like
+ // conditional variables.
if (__gthread_active_p ())
static_mutex->unlock();
#endif
@@ -191,10 +376,40 @@ namespace __cxxabiv1
extern "C"
void __cxa_guard_release (__guard *g)
{
- recursion_pop (g);
- _GLIBCXX_GUARD_SET_AND_RELEASE (g);
-#ifdef __GTHREADS
+#ifdef _GLIBCXX_USE_FUTEX
+ // If __sync_* and futex syscall are supported, don't use any global
+ // mutex.
if (__gthread_active_p ())
+ {
+ int *gi = (int *) (void *) g;
+ const int guard_bit = _GLIBCXX_GUARD_BIT;
+ const int waiting_bit = _GLIBCXX_GUARD_WAITING_BIT;
+ int old = __sync_lock_test_and_set (gi, guard_bit);
+
+ if ((old & waiting_bit) != 0)
+ syscall (SYS_futex, gi, _GLIBCXX_FUTEX_WAKE, INT_MAX);
+ return;
+ }
+#elif defined(__GTHREAD_HAS_COND)
+ if (__gthread_active_p())
+ {
+ mutex_wrapper mw;
+
+ set_init_in_progress_flag(g, 0);
+ _GLIBCXX_GUARD_SET_AND_RELEASE(g);
+
+ get_static_cond().broadcast();
+ return;
+ }
+#endif
+
+ set_init_in_progress_flag(g, 0);
+ _GLIBCXX_GUARD_SET_AND_RELEASE (g);
+
+#if defined(__GTHREADS) && !defined(__GTHREAD_HAS_COND)
+ // This provides compatibility with older systems not supporting POSIX like
+ // conditional variables.
+ if (__gthread_active_p())
static_mutex->unlock();
#endif
}
diff --git a/libstdc++-v3/libsupc++/typeinfo b/libstdc++-v3/libsupc++/typeinfo
index cfcbbcc0896..773d2f5ca4a 100644
--- a/libstdc++-v3/libsupc++/typeinfo
+++ b/libstdc++-v3/libsupc++/typeinfo
@@ -127,7 +127,13 @@ namespace std
#endif
bool operator!=(const type_info& __arg) const
{ return !operator==(__arg); }
-
+
+ // Return true if this is a pointer type of some kind
+ virtual bool __is_pointer_p() const;
+
+ // Return true if this is a function type
+ virtual bool __is_function_p() const;
+
// Try and catch a thrown type. Store an adjusted pointer to the
// caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
// THR_OBJ points to the thrown object. If THR_TYPE is a pointer
@@ -141,12 +147,6 @@ namespace std
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
- // Return true if this is a pointer type of some kind
- virtual bool __is_pointer_p() const;
-
- // Return true if this is a function type
- virtual bool __is_function_p() const;
-
protected:
const char *__name;
diff --git a/libstdc++-v3/linkage.m4 b/libstdc++-v3/linkage.m4
index 1d289b4aede..62d2c1da140 100644
--- a/libstdc++-v3/linkage.m4
+++ b/libstdc++-v3/linkage.m4
@@ -534,9 +534,6 @@ AC_DEFUN([GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT], [
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
-#
-# serial 1
-#
dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
AC_DEFUN([AC_REPLACE_MATHFUNCS],
[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 8fae1a6725d..e6a32044d1f 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -41,6 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = po
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -71,6 +72,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -108,6 +110,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -118,6 +122,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
diff --git a/libstdc++-v3/scripts/check_compile b/libstdc++-v3/scripts/check_compile
index c969f98c476..76762e675ee 100755
--- a/libstdc++-v3/scripts/check_compile
+++ b/libstdc++-v3/scripts/check_compile
@@ -28,7 +28,7 @@ PCH_FLAGS=`$flags_script --cxxpchflags`
FLAGS=`$flags_script --cxxflags`
TEST_FLAGS="-S"
COMPILER=`$flags_script --build-cxx`
-CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $TEST_FLAGS"
+CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -Wfatal-errors $TEST_FLAGS"
echo "compile line is:"
echo $CXX
@@ -49,7 +49,6 @@ do
# mv $OUTPUT_NAME binaries
rm $OUTPUT_NAME
fi
- echo ""
let UNIQUE_ID+=1
fi
done
diff --git a/libstdc++-v3/scripts/check_performance b/libstdc++-v3/scripts/check_performance
index b7bbd6d0202..4e70106a005 100755
--- a/libstdc++-v3/scripts/check_performance
+++ b/libstdc++-v3/scripts/check_performance
@@ -32,10 +32,12 @@ SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
-Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
ST_FLAG="-static"
LINK=$SH_FLAG
-CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $LINK"
+CXX="$COMPILER $INCLUDES $FLAGS $CXXFLAGS $LINK"
LIBS="./libtestc++.a"
TESTS_FILE="testsuite_files_performance"
+echo CXX is $CXX
+
for NAME in `cat $TESTS_FILE`
do
RUN=true
@@ -79,7 +81,7 @@ do
EXE_NAME="`echo $FILE_NAME.exe`"
$CXX $TESTNAME $LIBS -o $EXE_NAME
if [ -f $EXE_NAME ]; then
- ./$EXE_NAME >& tmp.$FILE_NAME
+ ./$EXE_NAME >& tmp.$FILE_NAME
else
echo "compile error:"
echo "$CXX $TESTNAME $LIBS -o $EXE_NAME"
diff --git a/libstdc++-v3/scripts/make_graphs.py b/libstdc++-v3/scripts/make_graphs.py
index 0b5daf24360..e230e7a9983 100755
--- a/libstdc++-v3/scripts/make_graphs.py
+++ b/libstdc++-v3/scripts/make_graphs.py
@@ -70,7 +70,7 @@ def make_png_str(label, test_name, build):
return ret
def process_html(html_f_name, src_dir, build_dir, htmls_xml_f_name, tests_info_xml_f_name, build_name, compiler_name):
- doc_dir = src_dir + "/docs/html/ext/pb_ds"
+ doc_dir = src_dir + "/doc/html/ext/pb_ds"
res_dir = build_dir
html_f = open(doc_dir + '/' + html_f_name)
soup = BeautifulSoup(html_f.read())
@@ -146,7 +146,7 @@ if __name__ == "__main__":
tests_info_xml_f_name = sys.argv[4]
build_name = sys.argv[5]
compiler_name = sys.argv[6]
- doc_dir = src_dir + "/docs/html/ext/pb_ds"
+ doc_dir = src_dir + "/doc/html/ext/pb_ds"
htmls_dat = minidom.parse(htmls_xml_f_name)
for html in htmls_dat.getElementsByTagName('html'):
html_f_name = html.attributes['name'].value
diff --git a/libstdc++-v3/scripts/run_doxygen b/libstdc++-v3/scripts/run_doxygen
new file mode 100644
index 00000000000..48e40ba8615
--- /dev/null
+++ b/libstdc++-v3/scripts/run_doxygen
@@ -0,0 +1,346 @@
+#!/bin/bash
+
+# Runs doxygen and massages the output files.
+# Copyright (C) 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+#
+# Synopsis: run_doxygen --mode=[html|man|xml] --host_alias=<alias> \
+# v3srcdir v3builddir
+#
+# Originally hacked together by Phil Edwards <pme@gcc.gnu.org>
+
+
+# We can check now that the version of doxygen is >= this variable.
+DOXYVER=1.5.4
+
+find_doxygen() {
+ local -r v_required=`echo $DOXYVER | \
+ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
+ local testing_version doxygen maybedoxy v_found
+ # thank you goat book
+ set `IFS=:; X="$PATH:/usr/local/bin:/bin:/usr/bin"; echo $X`
+ for dir
+ do
+ # AC_EXEEXT could come in useful here
+ maybedoxy="$dir/doxygen"
+ test -f "$maybedoxy" && testing_version=`$maybedoxy --version`
+ if test -n "$testing_version"; then
+ v_found=`echo $testing_version | \
+ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
+ if test $v_found -ge $v_required; then
+ doxygen="$maybedoxy"
+ break
+ fi
+ fi
+ done
+ if test -z "$doxygen"; then
+ echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2
+ print_usage
+ fi
+ # We need to use other tools from the same package/version.
+ echo :: Using Doxygen tools from ${dir}.
+ PATH=$dir:$PATH
+ hash -r
+}
+
+print_usage() {
+ cat 1>&2 <<EOF
+Usage: run_doxygen --mode=MODE --host_alias=BUILD_ALIAS [<options>]
+ <v3-src-dir> <v3-build-dir>
+ MODE is one of:
+ html Generate user-level HTML library documentation.
+ man Generate user-level man pages.
+ xml Generate user-level XML pages.
+
+ BUILD_ALIAS is the GCC build alias set at configure time.
+
+Note: Requires Doxygen ${DOXYVER} or later; get it at
+ ftp://ftp.stack.nl/pub/users/dimitri/doxygen-${DOXYVER}.src.tar.gz
+
+EOF
+ exit 1
+}
+
+parse_options() {
+ for o
+ do
+ # Blatantly ripped from autoconf, er, I mean, "gratefully standing
+ # on the shoulders of those giants who have gone before us."
+ case "$o" in
+ -*=*) arg=`echo "$o" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) arg= ;;
+ esac
+
+ case "$o" in
+ --mode=*)
+ mode=$arg ;;
+ --host_alias=*)
+ host_alias=$arg ;;
+ --mode | --host_alias | --help | -h)
+ print_usage ;;
+ *)
+ # this turned out to be a mess, maybe change to --srcdir=, etc
+ if test $srcdir = unset; then
+ srcdir=$o
+ elif test $outdir = unset; then
+ builddir=${o}
+ outdir=${o}/doc/doxygen
+ else
+ echo run_doxygen error: Too many arguments 1>&2
+ exit 1
+ fi
+ ;;
+ esac
+ done
+}
+
+
+# script begins here
+mode=unset
+host_alias=unset
+srcdir=unset
+outdir=unset
+do_html=false
+do_man=false
+do_xml=false
+enabled_sections=
+generate_tagfile=
+DATEtext=`date '+%Y-%m-%d'`
+
+# Show how this script is called.
+echo run_doxygen $*
+
+parse_options $*
+find_doxygen
+
+if test $srcdir = unset || test $outdir = unset || test $mode = unset || test $host_alias = unset; then
+ # this could be better
+ echo run_doxygen error: You have not given enough information...! 1>&2
+ print_usage
+fi
+
+case x"$mode" in
+ xhtml)
+ do_html=true
+ enabled_sections=maint
+ generate_tagfile="$outdir/html/libstdc++.tag"
+ ;;
+ xman)
+ do_man=true
+ ;;
+ xxml)
+ do_xml=true
+ enabled_sections=maint
+ ;;
+ *)
+ echo run_doxygen error: $mode is an invalid mode 1>&2
+ exit 1 ;;
+esac
+
+mkdir -p $outdir
+chmod u+w $outdir
+
+# work around a stupid doxygen bug
+if $do_man; then
+ mkdir -p $outdir/man/man3/ext
+ chmod -R u+w $outdir/man/man3/ext
+fi
+
+if $do_xml; then
+ mkdir -p $outdir/xml
+fi
+
+(
+ set -e
+ cd $builddir
+ sed -e "s=@outdir@=${outdir}=g" \
+ -e "s=@srcdir@=${srcdir}=g" \
+ -e "s=@builddir@=${builddir}=g" \
+ -e "s=@host_alias@=${host_alias}=g" \
+ -e "s=@html_output_dir@=html=" \
+ -e "s=@enabled_sections@=${enabled_sections}=" \
+ -e "s=@do_html@=${do_html}=" \
+ -e "s=@do_man@=${do_man}=" \
+ -e "s=@do_xml@=${do_xml}=" \
+ -e "s=@generate_tagfile@=${generate_tagfile}=" \
+ ${srcdir}/doc/doxygen/user.cfg.in > ${outdir}/${mode}.cfg
+ echo :: NOTE that this may take some time...
+ echo doxygen ${outdir}/${mode}.cfg
+ doxygen ${outdir}/${mode}.cfg
+ echo :: Finished, exit code was $?
+)
+ret=$?
+test $ret -ne 0 && exit $ret
+
+if $do_html; then
+ cd ${outdir}/html
+
+ #doxytag -t libstdc++.tag . > /dev/null 2>&1
+ sed -e '/<path>/d' libstdc++.tag > TEMP
+ mv TEMP libstdc++.tag
+
+ sed -e "s=@DATE@=${DATEtext}=" \
+ ${srcdir}/doc/doxygen/mainpage.html > index.html
+
+ # The following bit of line noise changes annoying
+ # std::foo < typename _Ugly1, typename _Ugly2, .... _DefaultUgly17 >
+ # to user-friendly
+ # std::foo
+ # in the major "Compound List" page.
+ sed -e 's=\(::[[:alnum:]_]*\)&lt; .* &gt;=\1=' annotated.html > annstrip.html
+ mv annstrip.html annotated.html
+
+ # Work around a bug in doxygen 1.3.
+# for f in class*html struct*html; do
+ for f in class*html; do
+ sed '1,10s!^<title> Template!<title>Template !' $f > TEMP
+ mv TEMP $f
+ done
+
+ cp ${srcdir}/doc/doxygen/tables.html tables.html
+ echo ::
+ echo :: HTML pages begin with
+ echo :: ${outdir}/html/index.html
+fi
+
+# Mess with the man pages. We don't need documentation of the internal
+# headers, since the man pages for those contain nothing useful anyhow. The
+# man pages for doxygen modules need to be renamed (or deleted). And the
+# generated #include lines need to be changed from the internal names to the
+# standard ones (e.g., "#include <stl_tempbuf.h>" -> "#include <memory>").
+if $do_man; then
+echo ::
+echo :: Fixing up the man pages...
+cd $outdir/man/man3
+
+# here's the other end of the "stupid doxygen bug" mentioned above
+rm -rf ext
+
+# File names with embedded spaces (EVIL!) need to be....? renamed or removed?
+find . -name "* *" -print0 | xargs -0r rm # requires GNU tools
+
+# can leave SGIextensions.3 alone, it's an okay name
+mv s20_3_1_base.3 Intro_functors.3
+mv s20_3_2_arithmetic.3 Arithmetic_functors.3
+mv s20_3_3_comparisons.3 Comparison_functors.3
+mv s20_3_4_logical.3 Logical_functors.3
+mv s20_3_5_negators.3 Negation_functors.3
+#mv s20_3_6_binder.3 Binder_functors.3
+mv s20_3_7_adaptors.3 Func_ptr_functors.3
+mv s20_3_8_memadaptors.3 Member_ptr_functors.3
+mv iterator_tags.3 Iterator_types.3
+mv std.3 Namespace_std.3
+mv __gnu_cxx.3 Namespace___gnu_cxx.3
+
+# man pages are for functions/types/other entities, not source files
+# directly. who the heck would type "man foo.h" anyhow?
+find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm
+rm -f *.h.3 *config* *.cc.3 *.tcc.3 *_t.3
+# this is used to examine what we would have deleted, for debugging
+#mkdir trash
+#find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash
+#mv *.h.3 *config* *.cc.3 *.tcc.3 *_t.3 trash
+
+# Standardize the displayed header names. If anyone who knows perl cares
+# enough to rewrite all this, feel free. This only gets run once a century,
+# and I'm off getting coffee then anyhow, so I didn't care enough to make
+# this super-fast.
+g++ ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader
+problematic=`egrep -l '#include <.*_.*>' [a-z]*.3`
+for f in $problematic; do
+ # this is also slow, but safe and easy to debug
+ oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
+ newh=`echo $oldh | ./stdheader`
+ sed "s=${oldh}=${newh}=" $f > TEMP
+ mv TEMP $f
+done
+rm stdheader
+
+# Some of the pages for generated modules have text that confuses certain
+# implementations of man(1), e.g., Linux's. We need to have another top-level
+# *roff tag to /stop/ the .SH NAME entry.
+#problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
+problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3'
+for f in $problematic; do
+ sed '/^\.SH NAME/{
+n
+a\
+\
+.SH SYNOPSIS
+ }' $f > TEMP
+ mv TEMP $f
+done
+
+# Also, break this (generated) line up. It's ugly as sin.
+problematic=`grep -l '[^^]Definition at line' *.3`
+for f in $problematic; do
+ sed 's/Definition at line/\
+.PP\
+&/' $f > TEMP
+ mv TEMP $f
+done
+
+cp ${srcdir}/doc/doxygen/Intro.3 C++Intro.3
+
+# Why didn't I do this at the start? Were rabid weasels eating my brain?
+# Who the fsck would "man std_vector" when the class isn't named that?
+
+# First, deal with nested namespaces.
+for f in *__detail_*; do
+ newname=`echo $f | sed 's/__detail_/__detail::/'`
+ mv $f $newname
+done
+for f in *__parallel_*; do
+ newname=`echo $f | sed 's/__parallel_/__parallel::/'`
+ mv $f $newname
+done
+
+# Then, clean up other top-level namespaces.
+for f in std_tr1_*; do
+ newname=`echo $f | sed 's/^std_tr1_/std::tr1::/'`
+ mv $f $newname
+done
+for f in std_*; do
+ newname=`echo $f | sed 's/^std_/std::/'`
+ mv $f $newname
+done
+for f in __gnu_cxx_*; do
+ newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'`
+ mv $f $newname
+done
+for f in __gnu_debug_*; do
+ newname=`echo $f | sed 's/^__gnu_debug_/__gnu_debug::/'`
+ mv $f $newname
+done
+for f in __gnu_parallel_*; do
+ newname=`echo $f | sed 's/^__gnu_parallel_/__gnu_parallel::/'`
+ mv $f $newname
+done
+
+# Generic removal bits, where there are things in the generated man
+# pages that need to be killed.
+for f in *_libstdc__-v3_*; do
+ rm $f
+done
+
+for f in *_src_*; do
+ rm $f
+done
+
+
+# Also, for some reason, typedefs don't get their own man pages. Sigh.
+for f in ios streambuf istream ostream iostream stringbuf \
+ istringstream ostringstream stringstream filebuf ifstream \
+ ofstream fstream string;
+do
+ echo ".so man3/std::basic_${f}.3" > std::${f}.3
+ echo ".so man3/std::basic_${f}.3" > std::w${f}.3
+done
+
+echo ::
+echo :: Man pages in ${outdir}/man
+fi
+
+# all done
+echo ::
+
+exit 0
diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
index 13bd68b699c..457adaf4d5f 100755
--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -54,10 +54,16 @@ case ${query} in
echo ${CC}
;;
--cxxflags)
- CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
- CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0
- @CXXFLAGS@ @EXTRA_CXX_FLAGS@ '
- echo ${CXXFLAGS_save} ${CXXFLAGS_config}
+ CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+ CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
+ echo ${CXXFLAGS_default} ${CXXFLAGS_config}
+ ;;
+ --cxxparallelflags)
+ CXXFLAGS_parallel="-D_GLIBCXX_PARALLEL -fopenmp
+ -B${BUILD_DIR}/../libgomp
+ -I${BUILD_DIR}/../libgomp
+ -L${BUILD_DIR}/../libgomp/.libs -lgomp"
+ echo ${CXXFLAGS_parallel}
;;
--cxxpchflags)
PCHFLAGS="@glibcxx_PCHFLAGS@"
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 47f8ceea2c5..65486190212 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -32,6 +32,7 @@ if ENABLE_SYMVERS
libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \
$(port_specific_symbol_files)
cp ${glibcxx_srcdir}/$(SYMVER_FILE) ./libstdc++-symbols.ver
+ chmod +w ./libstdc++-symbols.ver
if test "x$(port_specific_symbol_files)" != x; then \
if grep '^# Appended to version file.' \
$(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
@@ -111,8 +112,7 @@ atomicity.cc: ${atomicity_file}
# Source files linked in via configuration/make substitution for a
# particular host, but with ad hoc naming rules.
host_sources_extra = \
- basic_file.cc \
- c++locale.cc
+ basic_file.cc c++locale.cc ${ldbl_compat_sources} ${parallel_sources}
c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
$(LN_S) ${glibcxx_srcdir}/$(CLOCALE_CC) ./$@ || true
@@ -120,6 +120,12 @@ c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
+if ENABLE_PARALLEL
+parallel_sources = parallel_list.cc parallel_settings.cc
+else
+parallel_sources =
+endif
+
if GLIBCXX_LDBL_COMPAT
ldbl_compat_sources = compatibility-ldbl.cc
else
@@ -136,21 +142,26 @@ sources = \
complex_io.cc \
ctype.cc \
debug.cc \
- debug_list.cc \
functexcept.cc \
+ hash.cc \
+ hash_c++0x.cc \
globals_io.cc \
+ hashtable.cc \
+ hashtable_c++0x.cc \
ios.cc \
ios_failure.cc \
ios_init.cc \
ios_locale.cc \
limits.cc \
list.cc \
+ debug_list.cc \
locale.cc \
locale_init.cc \
locale_facets.cc \
localename.cc \
stdexcept.cc \
strstream.cc \
+ system_error.cc \
tree.cc \
allocator-inst.cc \
concept-inst.cc \
@@ -171,10 +182,10 @@ sources = \
wlocale-inst.cc \
wstring-inst.cc \
${host_sources} \
- ${host_sources_extra} \
- ${ldbl_compat_sources}
+ ${host_sources_extra}
-VPATH = $(top_srcdir)/src:$(top_srcdir)
+vpath % $(top_srcdir)/src
+vpath % $(top_srcdir)
libstdc___la_SOURCES = $(sources)
@@ -203,6 +214,34 @@ concept-inst.lo: concept-inst.cc
concept-inst.o: concept-inst.cc
$(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
+# Use special rules for parallel mode compilation.
+PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
+parallel_list.lo: parallel_list.cc
+ $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+parallel_list.o: parallel_list.cc
+ $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+
+parallel_settings.lo: parallel_settings.cc
+ $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+parallel_settings.o: parallel_settings.cc
+ $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+
+# Use special rules for the C++0x sources so that the proper flags are passed.
+system_error.lo: system_error.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+system_error.o: system_error.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
+
+hash_c++0x.lo: hash_c++0x.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+hash_c++0x.o: hash_c++0x.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
+
+hashtable_c++0x.lo: hashtable_c++0x.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+hashtable_c++0x.o: hashtable_c++0x.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
+
if GLIBCXX_LDBL_COMPAT
# Use special rules for compatibility-ldbl.cc compilation, as we need to
# pass -mlong-double-64.
@@ -268,7 +307,7 @@ endif
debugdir = debug
-# Build parallel set of debug objects here.
+# Build a set of debug objects here.
stamp-debug:
if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index d2428328b06..8c55b6f20d3 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -16,6 +16,7 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
+VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -41,6 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -69,37 +71,42 @@ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am__libstdc___la_SOURCES_DIST = bitmap_allocator.cc pool_allocator.cc \
mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \
- ctype.cc debug.cc debug_list.cc functexcept.cc globals_io.cc \
- ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \
- list.cc locale.cc locale_init.cc locale_facets.cc \
- localename.cc stdexcept.cc strstream.cc tree.cc \
- allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \
- ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \
- locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \
- streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \
- wlocale-inst.cc wstring-inst.cc atomicity.cc \
+ ctype.cc debug.cc functexcept.cc hash.cc hash_c++0x.cc \
+ globals_io.cc hashtable.cc hashtable_c++0x.cc ios.cc \
+ ios_failure.cc ios_init.cc ios_locale.cc limits.cc list.cc \
+ debug_list.cc locale.cc locale_init.cc locale_facets.cc \
+ localename.cc stdexcept.cc strstream.cc system_error.cc \
+ tree.cc allocator-inst.cc concept-inst.cc fstream-inst.cc \
+ ext-inst.cc ios-inst.cc iostream-inst.cc istream-inst.cc \
+ istream.cc locale-inst.cc misc-inst.cc ostream-inst.cc \
+ sstream-inst.cc streambuf-inst.cc streambuf.cc string-inst.cc \
+ valarray-inst.cc wlocale-inst.cc wstring-inst.cc atomicity.cc \
codecvt_members.cc collate_members.cc ctype_members.cc \
messages_members.cc monetary_members.cc numeric_members.cc \
time_members.cc basic_file.cc c++locale.cc \
- compatibility-ldbl.cc
+ compatibility-ldbl.cc parallel_list.cc parallel_settings.cc
am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
ctype_members.lo messages_members.lo monetary_members.lo \
numeric_members.lo time_members.lo
-am__objects_2 = basic_file.lo c++locale.lo
-@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_3 = compatibility-ldbl.lo
-am__objects_4 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
+@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_2 = compatibility-ldbl.lo
+@ENABLE_PARALLEL_TRUE@am__objects_3 = parallel_list.lo \
+@ENABLE_PARALLEL_TRUE@ parallel_settings.lo
+am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \
+ $(am__objects_3)
+am__objects_5 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
codecvt.lo compatibility.lo complex_io.lo ctype.lo debug.lo \
- debug_list.lo functexcept.lo globals_io.lo ios.lo \
- ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
+ functexcept.lo hash.lo hash_c++0x.lo globals_io.lo \
+ hashtable.lo hashtable_c++0x.lo ios.lo ios_failure.lo \
+ ios_init.lo ios_locale.lo limits.lo list.lo debug_list.lo \
locale.lo locale_init.lo locale_facets.lo localename.lo \
- stdexcept.lo strstream.lo tree.lo allocator-inst.lo \
- concept-inst.lo fstream-inst.lo ext-inst.lo ios-inst.lo \
- iostream-inst.lo istream-inst.lo istream.lo locale-inst.lo \
- misc-inst.lo ostream-inst.lo sstream-inst.lo streambuf-inst.lo \
- streambuf.lo string-inst.lo valarray-inst.lo wlocale-inst.lo \
- wstring-inst.lo $(am__objects_1) $(am__objects_2) \
- $(am__objects_3)
-am_libstdc___la_OBJECTS = $(am__objects_4)
+ stdexcept.lo strstream.lo system_error.lo tree.lo \
+ allocator-inst.lo concept-inst.lo fstream-inst.lo ext-inst.lo \
+ ios-inst.lo iostream-inst.lo istream-inst.lo istream.lo \
+ locale-inst.lo misc-inst.lo ostream-inst.lo sstream-inst.lo \
+ streambuf-inst.lo streambuf.lo string-inst.lo valarray-inst.lo \
+ wlocale-inst.lo wstring-inst.lo $(am__objects_1) \
+ $(am__objects_4)
+am_libstdc___la_OBJECTS = $(am__objects_5)
libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp =
@@ -112,7 +119,6 @@ DIST_SOURCES = $(am__libstdc___la_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-VPATH = $(top_srcdir)/src:$(top_srcdir)
ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@
ACLOCAL = @ACLOCAL@
ALLOCATOR_H = @ALLOCATOR_H@
@@ -121,6 +127,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -158,6 +165,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -168,6 +177,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
@@ -347,9 +357,10 @@ atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
# Source files linked in via configuration/make substitution for a
# particular host, but with ad hoc naming rules.
host_sources_extra = \
- basic_file.cc \
- c++locale.cc
+ basic_file.cc c++locale.cc ${ldbl_compat_sources} ${parallel_sources}
+@ENABLE_PARALLEL_FALSE@parallel_sources =
+@ENABLE_PARALLEL_TRUE@parallel_sources = parallel_list.cc parallel_settings.cc
@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources =
@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc
@@ -363,21 +374,26 @@ sources = \
complex_io.cc \
ctype.cc \
debug.cc \
- debug_list.cc \
functexcept.cc \
+ hash.cc \
+ hash_c++0x.cc \
globals_io.cc \
+ hashtable.cc \
+ hashtable_c++0x.cc \
ios.cc \
ios_failure.cc \
ios_init.cc \
ios_locale.cc \
limits.cc \
list.cc \
+ debug_list.cc \
locale.cc \
locale_init.cc \
locale_facets.cc \
localename.cc \
stdexcept.cc \
strstream.cc \
+ system_error.cc \
tree.cc \
allocator-inst.cc \
concept-inst.cc \
@@ -398,8 +414,7 @@ sources = \
wlocale-inst.cc \
wstring-inst.cc \
${host_sources} \
- ${host_sources_extra} \
- ${ldbl_compat_sources}
+ ${host_sources_extra}
libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \
@@ -415,6 +430,9 @@ libstdc___la_LDFLAGS = \
# deprecated include files.
GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include
+# Use special rules for parallel mode compilation.
+PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
@@ -723,6 +741,7 @@ uninstall-am: uninstall-info-am uninstall-toolexeclibLTLIBRARIES
@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \
@ENABLE_SYMVERS_TRUE@ $(port_specific_symbol_files)
@ENABLE_SYMVERS_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_FILE) ./libstdc++-symbols.ver
+@ENABLE_SYMVERS_TRUE@ chmod +w ./libstdc++-symbols.ver
@ENABLE_SYMVERS_TRUE@ if test "x$(port_specific_symbol_files)" != x; then \
@ENABLE_SYMVERS_TRUE@ if grep '^# Appended to version file.' \
@ENABLE_SYMVERS_TRUE@ $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
@@ -772,6 +791,9 @@ c++locale.cc: ${glibcxx_srcdir}/$(CLOCALE_CC)
basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
+
+vpath % $(top_srcdir)/src
+vpath % $(top_srcdir)
strstream.lo: strstream.cc
$(LTCXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
strstream.o: strstream.cc
@@ -784,6 +806,31 @@ concept-inst.lo: concept-inst.cc
$(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
concept-inst.o: concept-inst.cc
$(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
+parallel_list.lo: parallel_list.cc
+ $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+parallel_list.o: parallel_list.cc
+ $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+
+parallel_settings.lo: parallel_settings.cc
+ $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+parallel_settings.o: parallel_settings.cc
+ $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $<
+
+# Use special rules for the C++0x sources so that the proper flags are passed.
+system_error.lo: system_error.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+system_error.o: system_error.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
+
+hash_c++0x.lo: hash_c++0x.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+hash_c++0x.o: hash_c++0x.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
+
+hashtable_c++0x.lo: hashtable_c++0x.cc
+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
+hashtable_c++0x.o: hashtable_c++0x.cc
+ $(CXXCOMPILE) -std=gnu++0x -c $<
# Use special rules for compatibility-ldbl.cc compilation, as we need to
# pass -mlong-double-64.
@@ -798,7 +845,7 @@ concept-inst.o: concept-inst.cc
@GLIBCXX_BUILD_DEBUG_FALSE@all-local:
@GLIBCXX_BUILD_DEBUG_FALSE@install-data-local:
-# Build parallel set of debug objects here.
+# Build a set of debug objects here.
stamp-debug:
if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \
diff --git a/libstdc++-v3/src/globals_io.cc b/libstdc++-v3/src/globals_io.cc
index 3d67cf58b28..7b34f174def 100644
--- a/libstdc++-v3/src/globals_io.cc
+++ b/libstdc++-v3/src/globals_io.cc
@@ -75,7 +75,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_END_NAMESPACE
-namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
+namespace __gnu_internal _GLIBCXX_VISIBILITY_ATTR(hidden)
{
using namespace std;
using namespace __gnu_cxx;
diff --git a/libstdc++-v3/src/hash.cc b/libstdc++-v3/src/hash.cc
new file mode 100644
index 00000000000..e778e2bf366
--- /dev/null
+++ b/libstdc++-v3/src/hash.cc
@@ -0,0 +1,106 @@
+// std::hash and std::tr1::hash definitions -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+// 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.
+
+#include <cstddef>
+#include <string>
+#include <cmath>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <functional>
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+#else
+#include <tr1/functional>
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+#endif
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // For long double, careful with random padding bits (e.g., on x86,
+ // 10 bytes -> 12 bytes) and resort to frexp.
+ template<>
+ size_t
+ hash<long double>::operator()(long double __val) const
+ {
+ size_t __result = 0;
+
+ int __exponent;
+ __val = std::frexp(__val, &__exponent);
+ __val = __val < 0.0l ? -(__val + 0.5l) : __val;
+
+ const long double __mult =
+ __gnu_cxx::__numeric_traits<size_t>::__max + 1.0l;
+ __val *= __mult;
+
+ // Try to use all the bits of the mantissa (really necessary only
+ // on 32-bit targets, at least for 80-bit floating point formats).
+ const size_t __hibits = (size_t)__val;
+ __val = (__val - (long double)__hibits) * __mult;
+
+ const size_t __coeff =
+ __gnu_cxx::__numeric_traits<size_t>::__max / __LDBL_MAX_EXP__;
+
+ __result = __hibits + (size_t)__val + __coeff * __exponent;
+
+ return __result;
+ };
+
+ template<>
+ size_t
+ hash<string>::operator()(string __s) const
+ { return _Fnv_hash<>::hash(__s.data(), __s.length()); }
+
+ template<>
+ size_t
+ hash<const string&>::operator()(const string& __s) const
+ { return _Fnv_hash<>::hash(__s.data(), __s.length()); }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ size_t
+ hash<wstring>::operator()(wstring __s) const
+ {
+ const char* __p = reinterpret_cast<const char*>(__s.data());
+ return _Fnv_hash<>::hash(__p, __s.length() * sizeof(wchar_t));
+ }
+
+ template<>
+ size_t
+ hash<const wstring&>::operator()(const wstring& __s) const
+ {
+ const char* __p = reinterpret_cast<const char*>(__s.data());
+ return _Fnv_hash<>::hash(__p, __s.length() * sizeof(wchar_t));
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/libstdc++-v3/src/hash_c++0x.cc b/libstdc++-v3/src/hash_c++0x.cc
new file mode 100644
index 00000000000..528ffafb3e7
--- /dev/null
+++ b/libstdc++-v3/src/hash_c++0x.cc
@@ -0,0 +1,42 @@
+// std::hash definitions -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include "hash.cc"
+#include <system_error>
+
+namespace std
+{
+ template<>
+ size_t
+ hash<error_code>::operator()(error_code __e) const
+ {
+ const char* __p = reinterpret_cast<const char*>(&__e);
+ return _Fnv_hash<>::hash(__p, sizeof(__e));
+ }
+}
diff --git a/libstdc++-v3/src/hashtable.cc b/libstdc++-v3/src/hashtable.cc
new file mode 100644
index 00000000000..1a957102c23
--- /dev/null
+++ b/libstdc++-v3/src/hashtable.cc
@@ -0,0 +1,111 @@
+// std::__detail and std::tr1::__detail definitions -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+#else
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+#endif
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+namespace __detail
+{
+ extern const unsigned long __prime_list[] = // 256 + 1 or 256 + 48 + 1
+ {
+ 2ul, 3ul, 5ul, 7ul, 11ul, 13ul, 17ul, 19ul, 23ul, 29ul, 31ul,
+ 37ul, 41ul, 43ul, 47ul, 53ul, 59ul, 61ul, 67ul, 71ul, 73ul, 79ul,
+ 83ul, 89ul, 97ul, 103ul, 109ul, 113ul, 127ul, 137ul, 139ul, 149ul,
+ 157ul, 167ul, 179ul, 193ul, 199ul, 211ul, 227ul, 241ul, 257ul,
+ 277ul, 293ul, 313ul, 337ul, 359ul, 383ul, 409ul, 439ul, 467ul,
+ 503ul, 541ul, 577ul, 619ul, 661ul, 709ul, 761ul, 823ul, 887ul,
+ 953ul, 1031ul, 1109ul, 1193ul, 1289ul, 1381ul, 1493ul, 1613ul,
+ 1741ul, 1879ul, 2029ul, 2179ul, 2357ul, 2549ul, 2753ul, 2971ul,
+ 3209ul, 3469ul, 3739ul, 4027ul, 4349ul, 4703ul, 5087ul, 5503ul,
+ 5953ul, 6427ul, 6949ul, 7517ul, 8123ul, 8783ul, 9497ul, 10273ul,
+ 11113ul, 12011ul, 12983ul, 14033ul, 15173ul, 16411ul, 17749ul,
+ 19183ul, 20753ul, 22447ul, 24281ul, 26267ul, 28411ul, 30727ul,
+ 33223ul, 35933ul, 38873ul, 42043ul, 45481ul, 49201ul, 53201ul,
+ 57557ul, 62233ul, 67307ul, 72817ul, 78779ul, 85229ul, 92203ul,
+ 99733ul, 107897ul, 116731ul, 126271ul, 136607ul, 147793ul,
+ 159871ul, 172933ul, 187091ul, 202409ul, 218971ul, 236897ul,
+ 256279ul, 277261ul, 299951ul, 324503ul, 351061ul, 379787ul,
+ 410857ul, 444487ul, 480881ul, 520241ul, 562841ul, 608903ul,
+ 658753ul, 712697ul, 771049ul, 834181ul, 902483ul, 976369ul,
+ 1056323ul, 1142821ul, 1236397ul, 1337629ul, 1447153ul, 1565659ul,
+ 1693859ul, 1832561ul, 1982627ul, 2144977ul, 2320627ul, 2510653ul,
+ 2716249ul, 2938679ul, 3179303ul, 3439651ul, 3721303ul, 4026031ul,
+ 4355707ul, 4712381ul, 5098259ul, 5515729ul, 5967347ul, 6456007ul,
+ 6984629ul, 7556579ul, 8175383ul, 8844859ul, 9569143ul, 10352717ul,
+ 11200489ul, 12117689ul, 13109983ul, 14183539ul, 15345007ul,
+ 16601593ul, 17961079ul, 19431899ul, 21023161ul, 22744717ul,
+ 24607243ul, 26622317ul, 28802401ul, 31160981ul, 33712729ul,
+ 36473443ul, 39460231ul, 42691603ul, 46187573ul, 49969847ul,
+ 54061849ul, 58488943ul, 63278561ul, 68460391ul, 74066549ul,
+ 80131819ul, 86693767ul, 93793069ul, 101473717ul, 109783337ul,
+ 118773397ul, 128499677ul, 139022417ul, 150406843ul, 162723577ul,
+ 176048909ul, 190465427ul, 206062531ul, 222936881ul, 241193053ul,
+ 260944219ul, 282312799ul, 305431229ul, 330442829ul, 357502601ul,
+ 386778277ul, 418451333ul, 452718089ul, 489790921ul, 529899637ul,
+ 573292817ul, 620239453ul, 671030513ul, 725980837ul, 785430967ul,
+ 849749479ul, 919334987ul, 994618837ul, 1076067617ul, 1164186217ul,
+ 1259520799ul, 1362662261ul, 1474249943ul, 1594975441ul, 1725587117ul,
+ 1866894511ul, 2019773507ul, 2185171673ul, 2364114217ul, 2557710269ul,
+ 2767159799ul, 2993761039ul, 3238918481ul, 3504151727ul, 3791104843ul,
+ 4101556399ul, 4294967291ul,
+ // Sentinel, so we don't have to test the result of lower_bound,
+ // or, on 64-bit machines, rest of the table.
+#if __SIZEOF_LONG__ != 8
+ 4294967291ul
+#else
+ 6442450933ul, 8589934583ul, 12884901857ul, 17179869143ul,
+ 25769803693ul, 34359738337ul, 51539607367ul, 68719476731ul,
+ 103079215087ul, 137438953447ul, 206158430123ul, 274877906899ul,
+ 412316860387ul, 549755813881ul, 824633720731ul, 1099511627689ul,
+ 1649267441579ul, 2199023255531ul, 3298534883309ul, 4398046511093ul,
+ 6597069766607ul, 8796093022151ul, 13194139533241ul, 17592186044399ul,
+ 26388279066581ul, 35184372088777ul, 52776558133177ul, 70368744177643ul,
+ 105553116266399ul, 140737488355213ul, 211106232532861ul, 281474976710597ul,
+ 562949953421231ul, 1125899906842597ul, 2251799813685119ul,
+ 4503599627370449ul, 9007199254740881ul, 18014398509481951ul,
+ 36028797018963913ul, 72057594037927931ul, 144115188075855859ul,
+ 288230376151711717ul, 576460752303423433ul,
+ 1152921504606846883ul, 2305843009213693951ul,
+ 4611686018427387847ul, 9223372036854775783ul,
+ 18446744073709551557ul, 18446744073709551557ul
+#endif
+ };
+} // namespace __detail
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/libstdc++-v3/src/hashtable_c++0x.cc b/libstdc++-v3/src/hashtable_c++0x.cc
new file mode 100644
index 00000000000..a9f1ba3b1a9
--- /dev/null
+++ b/libstdc++-v3/src/hashtable_c++0x.cc
@@ -0,0 +1,30 @@
+// std::__detail definitions -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include "hashtable.cc"
diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc
index 62d42ee65b6..50621aaeb5a 100644
--- a/libstdc++-v3/src/ios_init.cc
+++ b/libstdc++-v3/src/ios_init.cc
@@ -39,7 +39,7 @@
#include <ext/stdio_filebuf.h>
#include <ext/stdio_sync_filebuf.h>
-namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden)
+namespace __gnu_internal _GLIBCXX_VISIBILITY_ATTR(hidden)
{
using namespace __gnu_cxx;
diff --git a/libstdc++-v3/src/list.cc b/libstdc++-v3/src/list.cc
index fe68ba1d7a4..0e70d231998 100644
--- a/libstdc++-v3/src/list.cc
+++ b/libstdc++-v3/src/list.cc
@@ -55,7 +55,7 @@
#include <list>
-_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
void
_List_node_base::swap(_List_node_base& __x, _List_node_base& __y)
@@ -115,7 +115,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
do
{
std::swap(__tmp->_M_next, __tmp->_M_prev);
- __tmp = __tmp->_M_prev; // Old next node is now prev.
+
+ // Old next node is now prev.
+ __tmp = __tmp->_M_prev;
}
while (__tmp != this);
}
diff --git a/libstdc++-v3/src/locale_facets.cc b/libstdc++-v3/src/locale_facets.cc
index 46de583d513..89c7e497890 100644
--- a/libstdc++-v3/src/locale_facets.cc
+++ b/libstdc++-v3/src/locale_facets.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -90,5 +91,28 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*__fptr = '\0';
}
-_GLIBCXX_END_NAMESPACE
+ bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp)
+ {
+ const size_t __n = __grouping_tmp.size() - 1;
+ const size_t __min = std::min(__n, size_t(__grouping_size - 1));
+ size_t __i = __n;
+ bool __test = true;
+
+ // Parsed number groupings have to match the
+ // numpunct::grouping string exactly, starting at the
+ // right-most point of the parsed sequence of elements ...
+ for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
+ __test = __grouping_tmp[__i] == __grouping[__j];
+ for (; __i && __test; --__i)
+ __test = __grouping_tmp[__i] == __grouping[__min];
+ // ... but the first parsed grouping can be <= numpunct
+ // grouping (only do the check if the numpunct char is > 0
+ // because <= 0 means any size is ok).
+ if (static_cast<signed char>(__grouping[__min]) > 0)
+ __test &= __grouping_tmp[0] <= __grouping[__min];
+ return __test;
+ }
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/parallel_list.cc b/libstdc++-v3/src/parallel_list.cc
new file mode 100644
index 00000000000..e038459a3df
--- /dev/null
+++ b/libstdc++-v3/src/parallel_list.cc
@@ -0,0 +1,30 @@
+// Parallel mode support code for list -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include "list.cc"
diff --git a/libstdc++-v3/src/parallel_settings.cc b/libstdc++-v3/src/parallel_settings.cc
new file mode 100644
index 00000000000..c47e1f2816d
--- /dev/null
+++ b/libstdc++-v3/src/parallel_settings.cc
@@ -0,0 +1,47 @@
+// Default settings for parallel mode -*- C++ -*-
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <parallel/settings.h>
+
+namespace
+{
+ __gnu_parallel::_Settings s;
+}
+
+namespace __gnu_parallel
+{
+ const _Settings&
+ _Settings::get() throw()
+ { return s; }
+
+ // XXX MT
+ void
+ _Settings::set(_Settings& obj) throw()
+ { s = obj; }
+}
diff --git a/libstdc++-v3/src/system_error.cc b/libstdc++-v3/src/system_error.cc
new file mode 100644
index 00000000000..81e73fcc7f9
--- /dev/null
+++ b/libstdc++-v3/src/system_error.cc
@@ -0,0 +1,71 @@
+// <system_error> implementation file
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <cstring>
+#include <system_error>
+#include <bits/functexcept.h>
+#include <limits>
+
+namespace
+{
+ struct gnu_error_category : public std::error_category
+ {
+ virtual const std::string&
+ name() const
+ {
+ static const std::string category("GNU");
+ return category;
+ }
+
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ {
+#ifdef _GLIBCXX_HAVE_SYS_NERR
+ const int last_errorno = sys_nerr;
+#else
+ const int last_errorno = std::numeric_limits<int>::max();
+#endif
+ if (__v > 0 && __v <= last_errorno)
+ return std::posix_error::posix_errno(__v);
+ else
+ return std::posix_error::no_posix_equivalent;
+ }
+ };
+
+ const gnu_error_category gnu_category;
+}
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ const error_category& system_category = gnu_category;
+
+ system_error::~system_error() throw() { }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/valarray-inst.cc b/libstdc++-v3/src/valarray-inst.cc
index aa8deb1183e..f60ff9176c4 100644
--- a/libstdc++-v3/src/valarray-inst.cc
+++ b/libstdc++-v3/src/valarray-inst.cc
@@ -69,7 +69,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__gslice_to_index(size_t __o, const valarray<size_t>& __l,
const valarray<size_t>& __s, valarray<size_t>& __i)
{
- // There are as much as dimensions as there are strides.
+ // There are as many dimensions as there are strides.
const size_t __n = __l.size();
// Holds current multi-index as we go through the gslice for the
diff --git a/libstdc++-v3/testsuite/17_intro/headers/all.cc b/libstdc++-v3/testsuite/17_intro/headers/all.cc
index c0ef4bfa5f2..662bad6b10f 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/all.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/all.cc
@@ -117,8 +117,6 @@
#include <ext/debug_allocator.h>
#include <ext/enc_filebuf.h>
#include <ext/functional>
-#include <ext/hash_map>
-#include <ext/hash_set>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
#include <ext/memory>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc b/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc
index 1052cd7cf26..9410805a085 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/all_c++200x_compatibility.cc
@@ -118,8 +118,6 @@
#include <ext/debug_allocator.h>
#include <ext/enc_filebuf.h>
#include <ext/functional>
-#include <ext/hash_map>
-#include <ext/hash_set>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
#include <ext/memory>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc b/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc
new file mode 100644
index 00000000000..2b72a3928a5
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/all_pedantic_errors.cc
@@ -0,0 +1,144 @@
+// { dg-do compile }
+// { dg-options "-pedantic-errors" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// Make sure all the includes can be compiled with -Wc++0x-compat
+// libstdc++/30571
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+// TR1
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
+
+// Extensions
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/codecvt_specializations.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/enc_filebuf.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc
index 2704e491f4d..6416734276a 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all.cc
@@ -61,8 +61,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc
index a1cb289039a..831616b9512 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc
@@ -61,8 +61,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
@@ -136,8 +140,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc
index 76566d0ac91..f1ed7cf38b5 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc
@@ -82,8 +82,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
@@ -117,6 +121,7 @@
#include <stdexcept>
#include <streambuf>
#include <string>
+#include <system_error>
#include <tuple>
#include <typeinfo>
#include <type_traits>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc
index d788be21578..9aa802c7041 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc
@@ -82,8 +82,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
@@ -188,8 +192,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
diff --git a/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc b/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
index 4751d161e8e..6cad8c00ffd 100644
--- a/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
@@ -1,7 +1,8 @@
// { dg-do compile }
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,7 +43,7 @@ namespace gnu
void test02()
{
// Must not be (void*)0
- const int j = NULL;
+ const int j __attribute__((unused)) = NULL;
#ifndef NULL
#error "NULL_must_be_a_macro"
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
new file mode 100644
index 00000000000..2609c430998
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
@@ -0,0 +1,56 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+}
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_test::test_category c1;
+ __gnu_test::test_category c2(c1);
+
+ return 0;
+}
+
+// { dg-error "is private" "" { target *-*-* } 75 }
+// { dg-error "within this context" "" { target *-*-* } 29 }
+// { dg-error "first required here" "" { target *-*-* } 48 }
+// { dg-excess-errors "copy constructor" }
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc
new file mode 100644
index 00000000000..1072cc63c67
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc
@@ -0,0 +1,61 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+
+ struct test_derived_category : public test_category
+ {
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_derived_category");
+ return s;
+ }
+ };
+}
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ // 1
+ __gnu_test::test_category c1;
+ __gnu_test::test_derived_category c2;
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc
new file mode 100644
index 00000000000..7b8a19cd7e3
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc
@@ -0,0 +1,62 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+
+ struct test_derived_category : public test_category
+ {
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_derived_category");
+ return s;
+ }
+ };
+}
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_test::test_category c1;
+ __gnu_test::test_derived_category c2;
+ VERIFY( c1 == c1 );
+ VERIFY( !(c1 == c2) );
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc
new file mode 100644
index 00000000000..043c8a207a3
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc
@@ -0,0 +1,62 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+
+ struct test_derived_category : public test_category
+ {
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_derived_category");
+ return s;
+ }
+ };
+}
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_test::test_category c1;
+ __gnu_test::test_derived_category c2;
+ VERIFY( !(c1 != c1) );
+ VERIFY( c1 != c2 );
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc
new file mode 100644
index 00000000000..ea1316d067a
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc
@@ -0,0 +1,63 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+}
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ // 1
+ std::error_code e1;
+ VERIFY( e1.value() == 0 );
+ VERIFY( e1.category() == std::system_category );
+
+ // 2
+ const __gnu_test::test_category cat;
+ std::error_code e2(e1.value(), cat);
+ VERIFY( e2.value() == e1.value() );
+ VERIFY( e2.category() == cat );
+
+ // 3
+ std::error_code e3(std::posix_error::operation_not_supported);
+ VERIFY( e3.value() == int(std::posix_error::operation_not_supported) );
+ VERIFY( e3.category() == std::system_category );
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
new file mode 100644
index 00000000000..04fd44fb677
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+// unspecified bool operator positive tests
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ // 1
+ std::error_code e1;
+ if (e1)
+ {
+ VERIFY( false );
+ }
+
+ // 2
+ std::error_code e2(std::posix_error::operation_not_supported);
+ if (e2)
+ {
+ VERIFY( true );
+ }
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
new file mode 100644
index 00000000000..6af9d13a61d
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
@@ -0,0 +1,34 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ std::error_code e;
+ int i = e;
+
+ return i;
+}
+
+// { dg-error "invalid conversion" "" { target *-*-* } 29 }
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc
new file mode 100644
index 00000000000..a98ed9023a0
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+}
+
+// unspecified bool operator positive tests
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::error_code e1;
+ std::error_code e2(std::posix_error::operation_not_supported);
+
+ VERIFY( e1 == e1 );
+ VERIFY( !(e1 == e2) );
+
+ const __gnu_test::test_category cat;
+ std::error_code e3(e2.value(), cat);
+ VERIFY( !(e2 == e3) );
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc
new file mode 100644
index 00000000000..00153456403
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc
@@ -0,0 +1,58 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-22 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+ struct test_category : public std::error_category
+ {
+ virtual std::posix_error::posix_errno
+ posix(int __v) const
+ { return std::posix_error::posix_errno(__v); }
+
+ virtual const std::string&
+ name() const
+ {
+ static std::string s("__gnu_test::test_category");
+ return s;
+ }
+ };
+}
+
+// unspecified bool operator positive tests
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::error_code e1;
+ std::error_code e2(std::posix_error::operation_not_supported);
+
+ VERIFY( !(e1 != e1) );
+ VERIFY( e1 != e2 );
+
+ const __gnu_test::test_category cat;
+ std::error_code e3(e2.value(), cat);
+ VERIFY( e2 != e3 );
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc
new file mode 100644
index 00000000000..d682a64a128
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/34538.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <stdexcept>
+#include <system_error>
+
+// libstdc++/34538
+int main()
+{
+ throw std::invalid_argument("foo");
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
new file mode 100644
index 00000000000..fc04cf55fb9
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error> // { dg-excess-errors "In file included from" }
+
+// { dg-error "upcoming ISO" "" { target *-*-* } 36 }
+
+
+
diff --git a/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
new file mode 100644
index 00000000000..31b6d4bf531
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
@@ -0,0 +1,154 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+
+namespace gnu
+{
+ using std::system_error;
+ using std::error_code;
+ using std::error_category;
+ using std::system_category;
+
+ using std::posix_error::posix_errno;
+ using std::posix_error::address_family_not_supported;
+ using std::posix_error::address_in_use;
+ using std::posix_error::address_not_available;
+ using std::posix_error::already_connected;
+ using std::posix_error::argument_list_too_long;
+ using std::posix_error::argument_out_of_domain;
+ using std::posix_error::bad_address;
+ using std::posix_error::bad_file_descriptor;
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ using std::posix_error::bad_message;
+#endif
+
+ using std::posix_error::broken_pipe;
+ using std::posix_error::connection_aborted;
+ using std::posix_error::connection_already_in_progress;
+ using std::posix_error::connection_refused;
+ using std::posix_error::connection_reset;
+ using std::posix_error::cross_device_link;
+ using std::posix_error::destination_address_required;
+ using std::posix_error::device_or_resource_busy;
+ using std::posix_error::directory_not_empty;
+ using std::posix_error::executable_format_error;
+ using std::posix_error::file_exists;
+ using std::posix_error::file_too_large;
+ using std::posix_error::filename_too_long;
+ using std::posix_error::function_not_supported;
+ using std::posix_error::host_unreachable;
+ using std::posix_error::identifier_removed;
+ using std::posix_error::illegal_byte_sequence;
+ using std::posix_error::inappropriate_io_control_operation;
+ using std::posix_error::interrupted;
+ using std::posix_error::invalid_argument;
+ using std::posix_error::invalid_seek;
+ using std::posix_error::io_error;
+ using std::posix_error::is_a_directory;
+ using std::posix_error::message_size;
+ using std::posix_error::network_down;
+ using std::posix_error::network_reset;
+ using std::posix_error::network_unreachable;
+ using std::posix_error::no_buffer_space;
+ using std::posix_error::no_child_process;
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ using std::posix_error::no_link;
+#endif
+
+ using std::posix_error::no_lock_available;
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+ using std::posix_error::no_message_available;
+#endif
+
+ using std::posix_error::no_message;
+ using std::posix_error::no_posix_equivalent;
+ using std::posix_error::no_protocol_option;
+ using std::posix_error::no_space_on_device;
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+ using std::posix_error::no_stream_resources;
+#endif
+
+ using std::posix_error::no_such_device_or_address;
+ using std::posix_error::no_such_device;
+ using std::posix_error::no_such_file_or_directory;
+ using std::posix_error::no_such_process;
+ using std::posix_error::not_a_directory;
+ using std::posix_error::not_a_socket;
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ using std::posix_error::not_a_stream;
+#endif
+
+ using std::posix_error::not_connected;
+ using std::posix_error::not_enough_memory;
+ using std::posix_error::not_supported;
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+ using std::posix_error::operation_canceled;
+#endif
+
+ using std::posix_error::operation_in_progress;
+ using std::posix_error::operation_not_permitted;
+ using std::posix_error::operation_not_supported;
+ using std::posix_error::operation_would_block;
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ using std::posix_error::owner_dead;
+#endif
+
+ using std::posix_error::permission_denied;
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+ using std::posix_error::protocol_error;
+#endif
+
+ using std::posix_error::protocol_not_supported;
+ using std::posix_error::read_only_file_system;
+ using std::posix_error::resource_deadlock_would_occur;
+ using std::posix_error::resource_unavailable_try_again;
+ using std::posix_error::result_out_of_range;
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ using std::posix_error::state_not_recoverable;
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+ using std::posix_error::stream_timeout;
+#endif
+
+ using std::posix_error::text_file_busy;
+ using std::posix_error::timed_out;
+ using std::posix_error::too_many_files_open_in_system;
+ using std::posix_error::too_many_files_open;
+ using std::posix_error::too_many_links;
+ using std::posix_error::too_many_synbolic_link_levels;
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+ using std::posix_error::value_too_large;
+#endif
+
+ using std::posix_error::wrong_protocol_type;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc
new file mode 100644
index 00000000000..2885dad2723
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc
@@ -0,0 +1,47 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-06-05 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <cstring>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+ const std::string s("too late: boulangerie out of pain au raisin");
+ const std::error_code e(std::posix_error::operation_not_supported);
+
+ // 1
+ {
+ std::system_error err1(s, e);
+ VERIFY( err1.code() == e );
+ VERIFY( std::strcmp(err1.runtime_error::what(), s.c_str()) == 0 );
+ }
+
+ // 2
+ {
+ std::system_error err2(s, 95, std::system_category);
+ VERIFY( err2.code() == std::error_code(95, std::system_category) );
+ VERIFY( std::strcmp(err2.runtime_error::what(), s.c_str()) == 0 );
+ }
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
new file mode 100644
index 00000000000..09ba2fd13e4
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <system_error>
+#include <testsuite_api.h>
+
+int main()
+{
+ typedef std::system_error test_type;
+ __gnu_test::diamond_derivation<test_type, false>::test();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc
new file mode 100644
index 00000000000..c178e542a3c
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc
@@ -0,0 +1,59 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 19.1 Exception classes
+
+#include <string>
+#include <system_error>
+#include <cstring>
+#include <testsuite_hooks.h>
+
+// libstdc++/1972
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ std::string s("lack of sunlight, no water error");
+
+ // 1
+ std::system_error obj1 = std::system_error(s);
+
+ // 2
+ std::system_error obj2(s);
+
+ VERIFY( std::strcmp(obj1.what(), s.data()) == 0 );
+ VERIFY( std::strcmp(obj2.what(), s.data()) == 0 );
+}
+
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+ std::string s("lack of sunlight error");
+ std::system_error x(s);
+
+ VERIFY( std::strcmp(x.what(), s.data()) == 0 );
+}
+
+int main(void)
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc
new file mode 100644
index 00000000000..eb8e14c9cc1
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 19.1 Exception classes
+
+#include <string>
+#include <system_error>
+#include <cstring>
+#include <testsuite_hooks.h>
+
+// libstdc++/2089
+class fuzzy_logic : public std::system_error
+{
+public:
+ fuzzy_logic() : std::system_error("whoa") { }
+};
+
+void test03()
+{
+ bool test __attribute__((unused)) = true;
+ try
+ { throw fuzzy_logic(); }
+ catch(const fuzzy_logic& obj)
+ { VERIFY( std::strcmp("whoa", obj.what()) == 0 ); }
+ catch(...)
+ { VERIFY( false ); }
+}
+
+int main(void)
+{
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc
new file mode 100644
index 00000000000..23d99a87d94
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc
@@ -0,0 +1,69 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <string>
+#include <system_error>
+#include <cstring>
+#include <testsuite_hooks.h>
+
+// test copy ctors, assignment operators, and persistence of member string data
+// libstdc++/1972
+// via Greg Bumgardner <bumgard@roguewave.com>
+void allocate_on_stack(void)
+{
+ const size_t num = 512;
+ __extension__ char array[num];
+ for (size_t i = 0; i < num; i++)
+ array[i]=0;
+}
+
+void test04()
+{
+ bool test __attribute__((unused)) = true;
+ const std::string s("CA ISO emergency once again:immediate power down");
+ const char* strlit1 = "wish I lived in Palo Alto";
+ const char* strlit2 = "...or Santa Barbara";
+ std::system_error obj1(s);
+
+ // block 01
+ {
+ const std::string s2(strlit1);
+ std::system_error obj2(s2);
+ obj1 = obj2;
+ }
+ allocate_on_stack();
+ VERIFY( std::strcmp(strlit1, obj1.what()) == 0 );
+
+ // block 02
+ {
+ const std::string s3(strlit2);
+ std::system_error obj3 = std::system_error(s3);
+ obj1 = obj3;
+ }
+ allocate_on_stack();
+ VERIFY( std::strcmp(strlit2, obj1.what()) == 0 );
+}
+
+int main(void)
+{
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc
new file mode 100644
index 00000000000..89570f04721
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 19.1 Exception classes
+
+#include <cstring>
+#include <string>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+// Make sure each invocation of what() doesn't grow the message.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ std::string s("after nine thirty, this request cannot be met");
+
+ std::system_error obj = std::system_error(s, std::posix_error::invalid_argument);
+ std::string s1(obj.what());
+ std::string s2(obj.what());
+ VERIFY( s1 == s2 );
+}
+
+int main(void)
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc
new file mode 100644
index 00000000000..765bcbf19fe
--- /dev/null
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <cstring>
+#include <string>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+// Can construct and return 10k character error string.
+void test01()
+{
+ typedef std::system_error test_type;
+
+ bool test __attribute__((unused)) = true;
+ const std::string xxx(10000, 'x');
+ test_type t(xxx);
+ VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 );
+}
+
+int main(void)
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..2b6a9d18fb9
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/explicit_instantiation.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+// 2007-09-17 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+namespace std
+{
+ typedef short test_type;
+ template struct aligned_storage<1, alignment_of<test_type>::value>;
+ template struct aligned_storage<2>;
+}
diff --git a/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc b/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
new file mode 100644
index 00000000000..2ea6fee4956
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/aligned_storage/value.cc
@@ -0,0 +1,68 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-09-17 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+struct MSAlignType { } __attribute__((__aligned__));
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::aligned_storage;
+ using std::alignment_of;
+ using namespace __gnu_test;
+
+ const std::size_t align_c = alignment_of<char>::value;
+ VERIFY( (sizeof(aligned_storage<4, align_c>::type) >= 4) );
+ VERIFY( (__alignof__(aligned_storage<4, align_c>::type) == align_c) );
+
+ const std::size_t align_s = alignment_of<short>::value;
+ VERIFY( (sizeof(aligned_storage<1, align_s>::type) >= 1) );
+ VERIFY( (__alignof__(aligned_storage<1, align_s>::type) == align_s) );
+
+ const std::size_t align_i = alignment_of<int>::value;
+ VERIFY( (sizeof(aligned_storage<7, align_i>::type) >= 7) );
+ VERIFY( (__alignof__(aligned_storage<7, align_i>::type) == align_i) );
+
+ const std::size_t align_d = alignment_of<double>::value;
+ VERIFY( (sizeof(aligned_storage<2, align_d>::type) >= 2) );
+ VERIFY( (__alignof__(aligned_storage<2, align_d>::type) == align_d) );
+
+ const std::size_t align_ai = alignment_of<int[4]>::value;
+ VERIFY( (sizeof(aligned_storage<20, align_ai>::type) >= 20) );
+ VERIFY( (__alignof__(aligned_storage<20, align_ai>::type) == align_ai) );
+
+ const std::size_t align_ct = alignment_of<ClassType>::value;
+ VERIFY( (sizeof(aligned_storage<11, align_ct>::type) >= 11) );
+ VERIFY( (__alignof__(aligned_storage<11, align_ct>::type) == align_ct) );
+
+ const std::size_t align_msa = alignment_of<MSAlignType>::value;
+ VERIFY( (sizeof(aligned_storage<5>::type) >= 5) );
+ VERIFY( (__alignof__(aligned_storage<5>::type) == align_msa) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/allocator/33807.cc b/libstdc++-v3/testsuite/20_util/allocator/33807.cc
new file mode 100644
index 00000000000..7d9c9ba198d
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/allocator/33807.cc
@@ -0,0 +1,33 @@
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <list>
+
+// libstdc++/33807
+template <class T>
+bool operator != (const T& x, const T& y) { return !(x == y); }
+
+struct foo { };
+
+void fnx()
+{
+ std::list<foo> l1, l2;
+ l1 = l2;
+}
diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc
index ffca8986fad..04a17068dfd 100644
--- a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc
@@ -1,6 +1,7 @@
// { dg-do compile }
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
+// Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -46,5 +47,5 @@ main()
test01();
return 0;
}
-// { dg-error "candidates" "" { target *-*-* } 141 }
-// { dg-error "::auto_ptr" "" { target *-*-* } 271 }
+// { dg-error "candidates" "" { target *-*-* } 139 }
+// { dg-error "::auto_ptr" "" { target *-*-* } 267 }
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/bad_function_call/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
index 6cc46c02a51..6cc46c02a51 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/bad_function_call/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
diff --git a/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs.cc
index 162ddd2ff42..30b98d518e0 100644
--- a/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs.cc
@@ -34,8 +34,9 @@ void test01()
typedef decay<bool>::type test1_type;
VERIFY( (is_same<test1_type, bool>::value) );
+ // NB: DR 705.
typedef decay<const int>::type test2_type;
- VERIFY( (is_same<test2_type, const int>::value) );
+ VERIFY( (is_same<test2_type, int>::value) );
typedef decay<int[4]>::type test3_type;
VERIFY( (is_same<test3_type, std::remove_extent<int[4]>::type*>::value) );
diff --git a/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc b/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc
new file mode 100644
index 00000000000..bbc27b02a10
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc
@@ -0,0 +1,42 @@
+// 2007-08-02 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <functional>
+#include <testsuite_hooks.cc>
+
+// DR 660. Missing Bitwise Operations.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ for (int i1 = 0; i1 < 1000; ++i1)
+ for (int i2 = 0; i2 < 1000; ++i2)
+ {
+ VERIFY( std::bit_and<int>()(i1, i2) == (i1 & i2) );
+ VERIFY( std::bit_or<int>()(i1, i2) == (i1 | i2) );
+ VERIFY( std::bit_xor<int>()(i1, i2) == (i1 ^ i2) );
+ }
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc b/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc
new file mode 100644
index 00000000000..89e82cd4a90
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++0x" }
+// 2007-08-20 <benjamin@redhat.com>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <functional>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ void
+ do_test()
+ {
+ bool test __attribute__((unused)) = true;
+
+ typedef T value_type;
+ typedef std::hash<value_type> hash_type;
+ using std::size_t;
+
+ value_type v; // default initialized is fine, same value all that matters.
+ hash_type h1;
+ size_t r1 = size_t(h1(v));
+
+ hash_type h2;
+ size_t r2 = size_t(h2(v));
+
+ VERIFY( r1 == r2 );
+ }
+
+void test01()
+{
+ do_test<std::error_code>();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/hash/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/hash/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..7b82eeeab2f
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/hash/requirements/explicit_instantiation.cc
@@ -0,0 +1,48 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#include <functional>
+#include <string>
+#include <system_error>
+
+// Verify that we can instantiate hash for every required type.
+template class std::hash<bool>;
+template class std::hash<char>;
+template class std::hash<signed char>;
+template class std::hash<unsigned char>;
+template class std::hash<short>;
+template class std::hash<int>;
+template class std::hash<long>;
+template class std::hash<unsigned short>;
+template class std::hash<unsigned int>;
+template class std::hash<unsigned long>;
+template class std::hash<float>;
+template class std::hash<double>;
+template class std::hash<long double>;
+template class std::hash<void*>;
+template class std::hash<std::string>;
+template class std::hash<std::error_code>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+template class std::hash<wchar_t>;
+template class std::hash<std::wstring>;
+#endif
+
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 774dca5af70..ff912c2cc0a 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -49,8 +49,8 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 41 }
// { dg-error "instantiated from here" "" { target *-*-* } 43 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 489 }
-// { dg-error "declaration of" "" { target *-*-* } 455 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 511 }
+// { dg-error "declaration of" "" { target *-*-* } 477 }
// { dg-excess-errors "At global scope" }
// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 56ce7b9d225..5b2b3dc9f82 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -49,8 +49,8 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 41 }
// { dg-error "instantiated from here" "" { target *-*-* } 43 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 414 }
-// { dg-error "declaration of" "" { target *-*-* } 380 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 436 }
+// { dg-error "declaration of" "" { target *-*-* } 402 }
// { dg-excess-errors "At global scope" }
// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/pair/moveable.cc b/libstdc++-v3/testsuite/20_util/pair/moveable.cc
new file mode 100644
index 00000000000..cd5de4162eb
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/moveable.cc
@@ -0,0 +1,72 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on pair, and also vector. If the implementation
+// changes this test may begin to fail.
+
+#include <vector>
+#include <utility>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+void
+test1()
+{
+ std::pair<int,int> a(1,1),b(2,2);
+ a=std::move(b);
+ VERIFY(a.first == 2 && a.second == 2 && b.first == 2 && b.second == 2);
+ std::pair<int,int> c(std::move(a));
+ VERIFY(c.first == 2 && c.second == 2 && a.first == 2 && a.second == 2);
+}
+
+void
+test2()
+{
+ std::vector<int> v,w;
+ v.push_back(1);
+ w.push_back(2);
+ w.push_back(2);
+ std::pair<int, std::vector<int> > p = make_pair(1,v);
+ std::pair<int, std::vector<int> > q = make_pair(2,w);
+ p = std::move(q);
+ VERIFY(p.first == 2 && q.first == 2 &&
+ p.second.size() == 2 && q.second.size() == 0);
+ std::pair<int, std::vector<int> > r(std::move(p));
+ VERIFY(r.first == 2 && p.first == 2 &&
+ r.second.size() == 2 && p.second.size() == 0);
+}
+
+int
+main()
+{
+ test1();
+ test2();
+}
diff --git a/libstdc++-v3/testsuite/20_util/pair/swap.cc b/libstdc++-v3/testsuite/20_util/pair/swap.cc
new file mode 100644
index 00000000000..e045097b4a2
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/swap.cc
@@ -0,0 +1,59 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <utility>
+#include <testsuite_allocator.h>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef __gnu_test::uneq_allocator<double> ua_type;
+ ua_type one(1), two(2);
+
+ std::pair<ua_type, int> p1(one, 1), p2(two, 2);
+
+ p1.swap(p2);
+ VERIFY( p1.first.get_personality() == 2 );
+ VERIFY( p1.second == 2 );
+ VERIFY( p2.first.get_personality() == 1 );
+ VERIFY( p2.second == 1 );
+
+ swap(p1, p2);
+ VERIFY( p2.first.get_personality() == 2 );
+ VERIFY( p2.second == 2 );
+ VERIFY( p1.first.get_personality() == 1 );
+ VERIFY( p1.second == 1 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
index 4a51c4c6fd3..56019a7494b 100644
--- a/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
@@ -1,7 +1,8 @@
// { dg-do compile }
// 2001-06-18 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -28,7 +29,6 @@ void test01()
using namespace std;
// Check for required typedefs
- long l;
typedef raw_storage_iterator<long*, long> test_iterator;
typedef test_iterator::value_type value_type;
typedef test_iterator::difference_type difference_type;
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc
new file mode 100644
index 00000000000..6f428ca0d34
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ }
+};
+
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from shared_ptr<Y>
+void
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+
+ a = std::shared_ptr<A>(new A);
+ VERIFY( a.get() != 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+
+ a = std::shared_ptr<A>();
+ VERIFY( a.get() == 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 1 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc
new file mode 100644
index 00000000000..2a18b486236
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc
@@ -0,0 +1,86 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from auto_ptr<Y>
+int
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a(new A);
+ std::auto_ptr<B> b(new B);
+ a = b;
+ VERIFY( a.get() != 0 );
+ VERIFY( b.get() == 0 );
+ VERIFY( A::ctor_count == 2 );
+ VERIFY( A::dtor_count == 1 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc
new file mode 100644
index 00000000000..79bb73f1a79
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B { };
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from incompatible auto_ptr<Y>
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ std::auto_ptr<B> b;
+ a = b; // { dg-error "here" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+// { dg-excess-errors "In constructor" }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc
new file mode 100644
index 00000000000..afa284931b5
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+std::auto_ptr<A> source() { return std::auto_ptr<A>(); }
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from rvalue auto_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ a = source(); // { dg-error "no match" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+// { dg-excess-errors "candidates are" }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/dr541.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/dr541.cc
new file mode 100644
index 00000000000..86f648d263a
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/dr541.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+
+// DR 541. shared_ptr template assignment and void
+void test01()
+{
+ std::shared_ptr<void> p;
+ p.operator=<void>(p);
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc
new file mode 100644
index 00000000000..34c9f8dc935
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc
@@ -0,0 +1,119 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <utility>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Rvalue assignment from shared_ptr
+void
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1;
+ std::shared_ptr<A> a2(new A);
+
+ a1 = std::move(a2);
+ VERIFY( a1.get() != 0 );
+ VERIFY( a2.get() == 0 );
+ VERIFY( a1.use_count() == 1 );
+ VERIFY( a2.use_count() == 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+
+ a1 = std::move(std::shared_ptr<A>());
+ VERIFY( a1.get() == 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 1 );
+}
+
+// Rvalue assignment from shared_ptr<Y>
+void
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ std::shared_ptr<B> b(new B);
+
+ a = std::move(b);
+ VERIFY( a.get() != 0 );
+ VERIFY( b.get() == 0 );
+ VERIFY( a.use_count() == 1 );
+ VERIFY( b.use_count() == 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ a = std::move(std::shared_ptr<A>());
+ VERIFY( a.get() == 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 1 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 1 );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc
new file mode 100644
index 00000000000..983c70e4bfc
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc
@@ -0,0 +1,97 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from shared_ptr<Y>
+void
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+
+ a = std::shared_ptr<A>();
+ VERIFY( a.get() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ a = std::shared_ptr<A>(new A);
+ VERIFY( a.get() != 0 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ a = std::shared_ptr<B>(new B);
+ VERIFY( a.get() != 0 );
+ VERIFY( A::ctor_count == 2 );
+ VERIFY( A::dtor_count == 1 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
new file mode 100644
index 00000000000..ab272d8c62f
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B { };
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.assign]
+
+// Assignment from incompatible shared_ptr<Y>
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ std::shared_ptr<B> b;
+ a = b; // { dg-error "here" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+// { dg-error "In member function" "" { target *-*-* } 0 }
+// { dg-error "cannot convert" "" { target *-*-* } 0 }
+// { dg-error "instantiated from" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/casts/1.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/casts/1.cc
new file mode 100644
index 00000000000..58ebded5ca7
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/casts/1.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2.10 shared_ptr casts [util.smartptr.shared.cast]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+// { dg-do compile }
+
+struct MyP { virtual ~MyP() { }; };
+struct MyDP : MyP { };
+
+int main()
+{
+ using __gnu_test::check_ret_type;
+ using std::shared_ptr;
+ using std::static_pointer_cast;
+ using std::const_pointer_cast;
+ using std::dynamic_pointer_cast;
+
+ shared_ptr<double> spd;
+ shared_ptr<const int> spci;
+ shared_ptr<MyP> spa;
+
+ check_ret_type<shared_ptr<void> >(static_pointer_cast<void>(spd));
+ check_ret_type<shared_ptr<int> >(const_pointer_cast<int>(spci));
+ check_ret_type<shared_ptr<MyDP> >(static_pointer_cast<MyDP>(spa));
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc
new file mode 100644
index 00000000000..55041f8ee81
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc
@@ -0,0 +1,85 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ virtual ~A() { }
+};
+
+struct B : A
+{
+};
+
+// 20.6.6.2.6 shared_ptr comparison [util.smartptr.shared.cmp]
+
+int
+test01()
+{
+ // test empty shared_ptrs compare equivalent
+ std::shared_ptr<A> p1;
+ std::shared_ptr<B> p2;
+ VERIFY( p1 == p2 );
+ VERIFY( !(p1 != p2) );
+ VERIFY( !(p1 < p2) && !(p2 < p1) );
+ return 0;
+}
+
+
+// Construction from pointer
+int
+test02()
+{
+ std::shared_ptr<A> A_default;
+
+ std::shared_ptr<A> A_from_A(new A);
+ VERIFY( A_default != A_from_A );
+ VERIFY( !(A_default == A_from_A) );
+ VERIFY( (A_default < A_from_A) || (A_from_A < A_default) );
+
+ std::shared_ptr<B> B_from_B(new B);
+ VERIFY( B_from_B != A_from_A );
+ VERIFY( !(B_from_B == A_from_A) );
+ VERIFY( (B_from_B < A_from_A) || (A_from_A < B_from_B) );
+
+ A_from_A.reset();
+ VERIFY( A_default == A_from_A );
+ VERIFY( !(A_default != A_from_A) );
+ VERIFY( !(A_default < A_from_A) && !(A_from_A < A_default) );
+
+ B_from_B.reset();
+ VERIFY( B_from_B == A_from_A );
+ VERIFY( !(B_from_B != A_from_A) );
+ VERIFY( !(B_from_B < A_from_A) && !(A_from_A < B_from_B) );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc
new file mode 100644
index 00000000000..a707740c9ec
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc
@@ -0,0 +1,108 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() : i() { }
+ virtual ~A() { }
+ int i;
+};
+
+struct B : A
+{
+ B() : A(), a() { }
+ virtual ~B() { }
+ A a;
+};
+
+void deletefunc(A* p) { delete p; }
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Aliasing constructors
+
+int test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ std::shared_ptr<bool> b1(a, &test);
+ VERIFY( b1.use_count() == 0 );
+ VERIFY( a.get() == 0 );
+ VERIFY( b1.get() == &test );
+
+ std::shared_ptr<bool> b2(b1);
+ VERIFY( b2.use_count() == 0 );
+ VERIFY( b1.get() == b2.get() );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a(new A);
+ std::shared_ptr<int> i1(a, &a->i);
+ VERIFY( i1.use_count() == 2 );
+
+ std::shared_ptr<int> i2(i1);
+ VERIFY( i2.use_count() == 3 );
+ VERIFY( i2.get() == &a->i );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<B> b(new B);
+ std::shared_ptr<A> a1(b, b.get());
+ std::shared_ptr<A> a2(b, &b->a);
+ VERIFY( a2.use_count() == 3 );
+ VERIFY( a1 == b );
+ VERIFY( a2 != b );
+ VERIFY( a1.get() != a2.get() );
+
+ std::shared_ptr<A> a3(a1);
+ VERIFY( a3 == b );
+
+ a3 = a2;
+ VERIFY( a3.get() == &b->a );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc
new file mode 100644
index 00000000000..10ee34b5a6b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc
@@ -0,0 +1,104 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using __gnu_test::tracker_allocator_counter;
+using __gnu_test::tracker_allocator;
+
+struct A { };
+void deletefunc(A* p) { delete p; }
+struct D
+{
+ void operator()(A* p) { delete p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Construction with allocator
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ tracker_allocator_counter::reset();
+
+ std::shared_ptr<A> p1(new A, deletefunc, tracker_allocator<A>());
+ std::size_t const sz = tracker_allocator_counter::get_allocation_count();
+ VERIFY( sz > 0 );
+ {
+ std::shared_ptr<A> p2(p1);
+ VERIFY( p2.use_count() == 2 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == 0 );
+ }
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == 0 );
+ p1.reset();
+ VERIFY( p1.use_count() == 0 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == sz );
+
+ return 0;
+}
+
+// Construction with allocator
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+ tracker_allocator_counter::reset();
+
+ std::shared_ptr<A> p1(new A, deletefunc, tracker_allocator<A>());
+ std::size_t const sz1 = tracker_allocator_counter::get_allocation_count();
+ VERIFY( sz1 > 0 );
+ std::shared_ptr<A> p2(new A, D(), tracker_allocator<A>());
+ std::size_t const sz2 = tracker_allocator_counter::get_allocation_count();
+ VERIFY( sz2 > sz1 );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == 0 );
+ p1 = p2;
+ VERIFY( p2.use_count() == 2 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz2 );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == sz1 );
+ p1.reset();
+ VERIFY( p2.use_count() == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz2 );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == sz1 );
+ p2.reset();
+ VERIFY( tracker_allocator_counter::get_allocation_count() == sz2 );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() == sz2 );
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc
new file mode 100644
index 00000000000..b82bcfb82f6
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Construction from auto_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::auto_ptr<A> a(new A);
+ std::shared_ptr<A> a2(a);
+ VERIFY( a.get() == 0 );
+ VERIFY( a2.get() != 0 );
+ VERIFY( a2.use_count() == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc
new file mode 100644
index 00000000000..3f9275ac114
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc
@@ -0,0 +1,49 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.3 shared_ptr assignment [util.smartptr.shared.const]
+
+// Construction from const auto_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::auto_ptr<A> a;
+ std::shared_ptr<A> p(a); // { dg-error "no match" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
+// { dg-excess-errors "candidates are" }
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc
new file mode 100644
index 00000000000..b802e4366a3
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc
@@ -0,0 +1,137 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+void deleter(A* p) { delete p; }
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ }
+};
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Copy construction
+int test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1;
+ std::shared_ptr<A> a2(a1);
+ VERIFY( a2.use_count() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1(new A);
+ std::shared_ptr<A> a2(a1);
+ VERIFY( a2.use_count() == 2 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<B> b(new B);
+ std::shared_ptr<A> a(b);
+ VERIFY( a.use_count() == 2 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test04()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<B> b(new B, &deleter);
+ std::shared_ptr<A> a(b);
+ VERIFY( a.use_count() == 2 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc
new file mode 100644
index 00000000000..b6c326b4035
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc
@@ -0,0 +1,47 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Default construction
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ VERIFY( a.get() == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc
new file mode 100644
index 00000000000..065c2555ef6
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc
@@ -0,0 +1,165 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// TR1 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <utility>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ virtual ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ virtual ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+struct D
+{
+ void operator()(B* p) const { delete p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ D::delete_count = 0;
+ }
+};
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Rvalue construction
+int test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1;
+ std::shared_ptr<A> a2(std::move(a1));
+ VERIFY( a1.use_count() == 0 );
+ VERIFY( a2.use_count() == 0 );
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1(new A);
+ std::shared_ptr<A> a2(std::move(a1));
+ VERIFY( a1.use_count() == 0 );
+ VERIFY( a2.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<B> b(new B);
+ std::shared_ptr<A> a(std::move(b));
+ VERIFY( b.use_count() == 0 );
+ VERIFY( a.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+test04()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<B> b(new B, D());
+ std::shared_ptr<A> a(std::move(b));
+ VERIFY( b.use_count() == 0 );
+ VERIFY( a.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+
+ a = std::move(std::shared_ptr<A>());
+ VERIFY( D::delete_count == 1 );
+ VERIFY( B::dtor_count == 1 );
+
+ return 0;
+}
+
+int
+test05()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a(std::move(std::shared_ptr<A>(new A)));
+ VERIFY( a.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc
new file mode 100644
index 00000000000..98d17fb287a
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc
@@ -0,0 +1,81 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Construction from pointer
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = 0;
+ std::shared_ptr<A> p(a);
+ VERIFY( p.get() == 0 );
+ VERIFY( p.use_count() == 1 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ std::shared_ptr<A> p(a);
+ VERIFY( p.get() == a );
+ VERIFY( p.use_count() == 1 );
+
+ return 0;
+}
+
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ B * const b = new B;
+ std::shared_ptr<A> p(b);
+ VERIFY( p.get() == b );
+ VERIFY( p.use_count() == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc
new file mode 100644
index 00000000000..b56fad236f1
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Construction from weak_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ std::shared_ptr<A> a1(a);
+ std::weak_ptr<A> wa(a1);
+ std::shared_ptr<A> a2(wa);
+ VERIFY( a2.get() == a );
+ VERIFY( a2.use_count() == wa.use_count() );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc
new file mode 100644
index 00000000000..7facf9252bd
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc
@@ -0,0 +1,63 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do run { xfail *-*-* } }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.1 shared_ptr constructors [util.smartptr.shared.const]
+
+// Construction from expired weak_ptr
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a1(new A);
+ std::weak_ptr<A> wa(a1);
+ a1.reset();
+ VERIFY( wa.expired() );
+ try
+ {
+ std::shared_ptr<A> a2(wa);
+ }
+ catch (const std::bad_weak_ptr&)
+ {
+ // Expected.
+ __throw_exception_again;
+ }
+ catch (...)
+ {
+ // Failed.
+ }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
new file mode 100644
index 00000000000..90fce24c73b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
@@ -0,0 +1,111 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using __gnu_test::tracker_allocator_counter;
+using __gnu_test::tracker_allocator;
+
+struct A
+{
+ A(int i, double d, char c = '\0') : i(i), d(d), c(c) { ++ctor_count; }
+ explicit A(int i) : i(i), d(), c() { ++ctor_count; }
+ A() : i(), d(), c() { ++ctor_count; }
+ ~A() { ++dtor_count; }
+ int i;
+ double d;
+ char c;
+ static int ctor_count;
+ static int dtor_count;
+};
+int A::ctor_count = 0;
+int A::dtor_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ tracker_allocator_counter::reset();
+ }
+};
+
+// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ reset_count_struct __attribute__((unused)) reset;
+
+ {
+ std::shared_ptr<A> p1 = std::allocate_shared<A>(tracker_allocator<A>());
+ VERIFY( p1.get() != 0 );
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() > 0 );
+ }
+ VERIFY( A::ctor_count == A::dtor_count );
+ VERIFY( tracker_allocator_counter::get_allocation_count()
+ == tracker_allocator_counter::get_deallocation_count() );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+ reset_count_struct __attribute__((unused)) reset;
+
+ std::shared_ptr<A> p1;
+
+ p1 = std::allocate_shared<A>(tracker_allocator<A>(), 1);
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() > 0 );
+
+ p1 = std::allocate_shared<A>(tracker_allocator<A>(), 1, 2.0);
+ VERIFY( A::ctor_count == 2 );
+ VERIFY( A::dtor_count == 1 );
+ VERIFY( tracker_allocator_counter::get_deallocation_count() > 0 );
+
+ p1 = std::allocate_shared<A>(tracker_allocator<A>(), 1, 2.0, '3');
+ VERIFY( A::ctor_count == 3 );
+ VERIFY( A::dtor_count == 2 );
+ VERIFY( p1->i == 1 );
+ VERIFY( p1->d == 2.0 );
+ VERIFY( p1->c == '3' );
+
+ p1 = std::shared_ptr<A>();
+ VERIFY( A::ctor_count == A::dtor_count );
+ VERIFY( tracker_allocator_counter::get_allocation_count()
+ == tracker_allocator_counter::get_deallocation_count() );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc
new file mode 100644
index 00000000000..b096f4ff461
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc
@@ -0,0 +1,49 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <new>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ void* operator new(size_t n) { return new char[sizeof(A)]; }
+ void operator delete(void* p, size_t) { delete (char*)p; }
+};
+
+// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p = std::make_shared<A>();
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc
new file mode 100644
index 00000000000..006208318da
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc
@@ -0,0 +1,98 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A(int i, double d, char c = '\0') : i(i), d(d), c(c) { ++ctor_count; }
+ explicit A(int i) : i(i), d(), c() { ++ctor_count; }
+ A() : i(), d(), c() { ++ctor_count; }
+ ~A() { ++dtor_count; }
+ int i;
+ double d;
+ char c;
+ static int ctor_count;
+ static int dtor_count;
+};
+int A::ctor_count = 0;
+int A::dtor_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ }
+};
+
+// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ reset_count_struct __attribute__((unused)) reset;
+
+ {
+ std::shared_ptr<A> p1 = std::make_shared<A>();
+ VERIFY( p1.get() != 0 );
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( A::ctor_count == 1 );
+ }
+ VERIFY( A::ctor_count == A::dtor_count );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+ reset_count_struct __attribute__((unused)) reset;
+
+ std::shared_ptr<A> p1;
+
+ p1 = std::make_shared<A>(1);
+ VERIFY( A::ctor_count == 1 );
+
+ p1 = std::make_shared<A>(1, 2.0);
+ VERIFY( A::ctor_count == 2 );
+ VERIFY( A::dtor_count == 1 );
+
+ p1 = std::make_shared<A>(1, 2.0, '3');
+ VERIFY( A::ctor_count == 3 );
+ VERIFY( A::dtor_count == 2 );
+ VERIFY( p1->i == 1 );
+ VERIFY( p1->d == 2.0 );
+ VERIFY( p1->c == '3' );
+
+ p1 = std::shared_ptr<A>();
+ VERIFY( A::ctor_count == A::dtor_count );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc
new file mode 100644
index 00000000000..f3e6b813016
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc
@@ -0,0 +1,135 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() { ++ctor_count; }
+ ~A() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long A::ctor_count = 0;
+long A::dtor_count = 0;
+
+struct B : A
+{
+ B() { ++ctor_count; }
+ ~B() { ++dtor_count; }
+ static long ctor_count;
+ static long dtor_count;
+};
+long B::ctor_count = 0;
+long B::dtor_count = 0;
+
+struct D
+{
+ void operator()(const B* p) { delete p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+struct reset_count_struct
+{
+ ~reset_count_struct()
+ {
+ A::ctor_count = 0;
+ A::dtor_count = 0;
+ B::ctor_count = 0;
+ B::dtor_count = 0;
+ D::delete_count = 0;
+ }
+};
+
+
+// 20.6.6.2.2 shared_ptr destructor [util.smartptr.shared.dest]
+
+// empty shared_ptr
+int
+test01()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::shared_ptr<A> a;
+ }
+ VERIFY( A::ctor_count == 0 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 0 );
+ VERIFY( B::dtor_count == 0 );
+ VERIFY( D::delete_count == 0 );
+
+ return 0;
+}
+
+// shared ownership
+int
+test02()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> a;
+ {
+ a = std::shared_ptr<A>(new B, D());
+ }
+ VERIFY( A::ctor_count == 1 );
+ VERIFY( A::dtor_count == 0 );
+ VERIFY( B::ctor_count == 1 );
+ VERIFY( B::dtor_count == 0 );
+ VERIFY( D::delete_count == 0 );
+
+ return 0;
+}
+
+// exclusive ownership
+int
+test03()
+{
+ reset_count_struct __attribute__((unused)) reset;
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::shared_ptr<A> a1(new B);
+ std::shared_ptr<A> a2(new B, D());
+ }
+ VERIFY( A::ctor_count == 2 );
+ VERIFY( A::dtor_count == 2 );
+ VERIFY( B::ctor_count == 2 );
+ VERIFY( B::dtor_count == 2 );
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc
new file mode 100644
index 00000000000..e35765638af
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc
@@ -0,0 +1,41 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+using std::get_deleter;
+
+// libstdc++/24595
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<int> sp;
+ VERIFY( !get_deleter<void(*)(int*)>(sp) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc
new file mode 100644
index 00000000000..45d9ad808ac
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.8 shared_ptr I/O [util.smartptr.shared.io]
+
+// operator<<
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p(new A);
+ std::ostringstream buf;
+ buf << p;
+ const std::string s = buf.str();
+ buf.str("");
+ buf << p.get();
+ VERIFY( s == buf.str() );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc
new file mode 100644
index 00000000000..f2e0468dad5
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.9 shared_ptr specialized algorithms [util.smartptr.shared.spec]
+
+// std::swap
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a1 = new A;
+ A * const a2 = new A;
+ std::shared_ptr<A> p1(a1);
+ std::shared_ptr<A> p2(a2);
+ std::swap(p1, p2);
+ VERIFY( p1.get() == a2 );
+ VERIFY( p2.get() == a1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/24805.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/24805.cc
new file mode 100644
index 00000000000..b555bf58f1d
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/24805.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// swap
+
+// libstdc++/24805
+using std::swap;
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc
new file mode 100644
index 00000000000..c7349469bfa
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc
@@ -0,0 +1,90 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+struct D
+{
+ void operator()(B* p) { delete p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// reset
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ std::shared_ptr<A> p1(a);
+ std::shared_ptr<A> p2(p1);
+ p1.reset();
+ VERIFY( p1.get() == 0 );
+ VERIFY( p2.get() == a );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ B * const b = new B;
+ std::shared_ptr<A> p1(a);
+ std::shared_ptr<A> p2(p1);
+ p1.reset(b);
+ VERIFY( p1.get() == b );
+ VERIFY( p2.get() == a );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ {
+ std::shared_ptr<A> p1;
+ p1.reset(new B, D());
+ }
+ VERIFY( D::delete_count == 1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc
new file mode 100644
index 00000000000..04d90519383
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc
@@ -0,0 +1,64 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+#include <testsuite_allocator.h>
+
+using __gnu_test::tracker_allocator_counter;
+using __gnu_test::tracker_allocator;
+
+struct A { };
+struct B : A { };
+struct D
+{
+ void operator()(B* p) { delete p; ++delete_count; }
+ static long delete_count;
+};
+long D::delete_count = 0;
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// Reset with allocator
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ tracker_allocator_counter::reset();
+
+ {
+ std::shared_ptr<A> p1;
+ p1.reset(new B, D(), tracker_allocator<B>());
+ VERIFY( tracker_allocator_counter::get_allocation_count() > 0 );
+ }
+ VERIFY( D::delete_count == 1 );
+ VERIFY( tracker_allocator_counter::get_allocation_count() == tracker_allocator_counter::get_deallocation_count() );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc
new file mode 100644
index 00000000000..16773539879
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// reset
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::shared_ptr<A> p1(new A);
+ p1.reset(); // { dg-error "discards qualifiers" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc
new file mode 100644
index 00000000000..5c18e65a55e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// swap
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a1 = new A;
+ A * const a2 = new A;
+ std::shared_ptr<A> p1(a1);
+ std::shared_ptr<A> p2(a2);
+ p1.swap(p2);
+ VERIFY( p1.get() == a2 );
+ VERIFY( p2.get() == a1 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc
new file mode 100644
index 00000000000..995cfc0b40c
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc
@@ -0,0 +1,49 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.4 shared_ptr modifiers [util.smartptr.shared.mod]
+
+// swap
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::shared_ptr<A> p1(new A);
+ std::shared_ptr<A> p2(new A);
+ p1.swap(p2); // { dg-error "discards qualifiers" }
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc
new file mode 100644
index 00000000000..9efe26fc28c
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc
@@ -0,0 +1,82 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.5 shared_ptr observers [util.smartptr.shared.obs]
+
+// conversion to bool
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::shared_ptr<A> p1;
+ VERIFY( p1 == false );
+ const std::shared_ptr<A> p2(p1);
+ VERIFY( p2 == false );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ VERIFY( p1 );
+ std::shared_ptr<A> p2(p1);
+ VERIFY( p2 );
+ p1.reset();
+ VERIFY( !p1 );
+ VERIFY( p2 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ std::shared_ptr<A> p2(p1);
+ p2.reset(new A);
+ VERIFY( p1 );
+ VERIFY( p2 );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc
new file mode 100644
index 00000000000..c64ed38fc70
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc
@@ -0,0 +1,82 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A
+{
+ A() : i() {}
+ int i;
+};
+
+// 20.6.6.2.5 shared_ptr observers [util.smartptr.shared.obs]
+
+// get
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ const std::shared_ptr<A> p(a);
+ VERIFY( p.get() == a );
+
+ return 0;
+}
+
+// operator*
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ const std::shared_ptr<A> p(a);
+ VERIFY( &*p == a );
+
+ return 0;
+}
+
+
+// operator->
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ A * const a = new A;
+ const std::shared_ptr<A> p(a);
+ VERIFY( &p->i == &a->i );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc
new file mode 100644
index 00000000000..de7ab15a7b0
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc
@@ -0,0 +1,82 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+
+// 20.6.6.2.5 shared_ptr observers [util.smartptr.shared.obs]
+
+// unique
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::shared_ptr<A> p1;
+ VERIFY( !p1.unique() );
+ const std::shared_ptr<A> p2(p1);
+ VERIFY( !p1.unique() );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ VERIFY( p1.unique() );
+ std::shared_ptr<A> p2(p1);
+ VERIFY( !p1.unique() );
+ p1.reset();
+ VERIFY( !p1.unique() );
+ VERIFY( p2.unique() );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ std::shared_ptr<A> p2(p1);
+ p2.reset(new A);
+ VERIFY( p1.unique() );
+ VERIFY( p2.unique() );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc
new file mode 100644
index 00000000000..8e074a8b888
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc
@@ -0,0 +1,81 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_hooks.h>
+
+struct A { };
+struct B : A { };
+
+// 20.6.6.2.5 shared_ptr observers [util.smartptr.shared.obs]
+
+// use_count
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const std::shared_ptr<A> p1;
+ VERIFY( p1.use_count() == 0 );
+ const std::shared_ptr<A> p2(p1);
+ VERIFY( p1.use_count() == 0 );
+
+ return 0;
+}
+
+int
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ std::shared_ptr<A> p2(p1);
+ p1.reset();
+ VERIFY( p1.use_count() == 0 );
+ VERIFY( p2.use_count() == 1 );
+
+ return 0;
+}
+
+int
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::shared_ptr<A> p1(new A);
+ std::shared_ptr<A> p2(p1);
+ p2.reset(new B);
+ VERIFY( p1.use_count() == 1 );
+ VERIFY( p2.use_count() == 1 );
+
+ return 0;
+}
+
+
+int
+main()
+{
+ test01();
+ test02();
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc
deleted file mode 100644
index 7e54a738fe4..00000000000
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// Copyright (C) 2007 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// 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.
-
-#include <memory>
-
-template class std::shared_ptr<int>;
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..880c38ab893
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,32 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+using std::shared_ptr;
+template class shared_ptr<int>;
+template class shared_ptr<void>;
+template class shared_ptr<ClassType>;
+template class shared_ptr<IncompleteClass>;
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..293f54881c4
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,35 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+// Check the _S_single lock policy can be instantiated. For a thread-enabled
+// library this checks the templates can be instantiated for non-default
+// lock policy, for a single-threaded lib this is redundant but harmless.
+using namespace __gnu_test;
+using std::__shared_ptr;
+using std::_S_single;
+template class __shared_ptr<int, _S_single>;
+template class __shared_ptr<ClassType, _S_single>;
+template class __shared_ptr<IncompleteClass, _S_single>;
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
new file mode 100644
index 00000000000..5bdd65c2700
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
@@ -0,0 +1,195 @@
+// Copyright (C) 2006, 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options "-pthread -std=gnu++0x" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options "-pthreads -std=gnu++0x" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+
+#include <memory>
+#include <random>
+#include <vector>
+#include <testsuite_hooks.h>
+#include <iostream>
+#include <cstdlib>
+
+#include <pthread.h>
+
+#ifdef _GLIBCXX_HAVE_UNISTD_H
+#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
+#endif
+
+/* This (brute-force) tests the atomicity and thus thread safety of the
+ * shared_ptr <- weak_ptr
+ * assignment operation by allocating a test object, retrieving a weak
+ * reference to it, and letting a number of threads repeatedly create strong
+ * references from the weak reference.
+ * Specifically, this tests the function _Sp_counted_base<true>::add_ref_lock()
+ */
+
+
+const unsigned int HAMMER_MAX_THREADS = 10;
+const unsigned int POOL_SIZE = 1000;
+const unsigned long HAMMER_REPEAT = 100000;
+const unsigned long KILL_ONE_IN = 1000;
+
+struct A
+ {
+ static _Atomic_word counter;
+ A()
+ {
+ __gnu_cxx::__atomic_add(&counter, 1);
+ }
+ ~A()
+ {
+ __gnu_cxx::__atomic_add(&counter, -1);
+ }
+ };
+
+_Atomic_word A::counter = 0;
+
+typedef std::shared_ptr<A> sp_A_t;
+typedef std::weak_ptr<A> wp_A_t;
+
+typedef std::vector<sp_A_t> sp_vector_t;
+typedef std::vector<wp_A_t> wp_vector_t;
+
+struct shared_and_weak_pools
+{
+ sp_vector_t& shared_pool;
+ wp_vector_t& weak_pool;
+
+ shared_and_weak_pools(sp_vector_t& _shared_pool, wp_vector_t& _weak_pool)
+ : shared_pool(_shared_pool), weak_pool(_weak_pool)
+ { }
+};
+
+void* thread_hammer_and_kill(void* opaque_pools)
+{
+ shared_and_weak_pools& pools = *static_cast<shared_and_weak_pools*>(opaque_pools);
+ // Using the same parameters as in the RNG test cases.
+ std::mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> rng;
+
+ sp_vector_t::iterator cur_shared = pools.shared_pool.begin();
+ wp_vector_t::iterator cur_weak = pools.weak_pool.begin();
+
+ for (unsigned int i = 0; i < HAMMER_REPEAT; ++i)
+ {
+ try
+ {
+ sp_A_t strong(*cur_weak);
+ }
+ catch (std::bad_weak_ptr& exception)
+ {
+ ++cur_weak;
+ if (cur_weak == pools.weak_pool.end())
+ break;
+ }
+
+ if (rng() % KILL_ONE_IN == 0)
+ {
+ cur_shared->reset();
+ ++cur_shared;
+ }
+ }
+ return 0;
+}
+
+void* thread_hammer(void* opaque_weak)
+{
+ wp_vector_t& weak_pool = *static_cast<wp_vector_t*>(opaque_weak);
+ // Using the same parameters as in the RNG test cases.
+ std::mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> rng;
+ wp_vector_t::iterator cur_weak = weak_pool.begin();
+
+ for (unsigned int i = 0; i < HAMMER_REPEAT; ++i)
+ {
+ try
+ {
+ sp_A_t strong(*cur_weak);
+ }
+ catch (std::bad_weak_ptr& exception)
+ {
+ ++cur_weak;
+ if (cur_weak == weak_pool.end())
+ break;
+ }
+ }
+ return 0;
+}
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ sp_vector_t obj_pool(POOL_SIZE);
+
+ for(sp_vector_t::iterator cur = obj_pool.begin(); cur != obj_pool.end(); ++cur)
+ {
+ cur->reset(new A);
+ }
+ // Obtain weak references.
+ std::vector<wp_vector_t> weak_pool(HAMMER_MAX_THREADS, wp_vector_t(obj_pool.begin(), obj_pool.end()));
+
+ // Launch threads with pointer to weak reference.
+ pthread_t threads[HAMMER_MAX_THREADS];
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
+ pthread_setconcurrency (HAMMER_MAX_THREADS);
+#endif
+
+ pthread_attr_t tattr;
+ pthread_attr_init(&tattr);
+
+ shared_and_weak_pools pools(obj_pool, weak_pool[0]);
+ pthread_create(threads, &tattr, thread_hammer_and_kill, static_cast<void*>(&pools));
+ for (unsigned int worker = 1; worker < HAMMER_MAX_THREADS; worker++)
+ {
+ if (pthread_create(&threads[worker], &tattr,
+ thread_hammer, static_cast<void*>(&weak_pool[worker])))
+ std::abort();
+ }
+ // Wait for threads to complete, then check integrity of reference.
+ void* status;
+ for (unsigned int worker = 0; worker < HAMMER_MAX_THREADS; worker++)
+ {
+ if (pthread_join(threads[worker], &status))
+ std::abort();
+ }
+ obj_pool.clear();
+
+ VERIFY( A::counter == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
new file mode 100644
index 00000000000..20c2da146e0
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
@@ -0,0 +1,197 @@
+// Copyright (C) 2006, 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+
+#include <memory>
+#include <random>
+#include <vector>
+#include <testsuite_hooks.h>
+#include <iostream>
+#include <cstdlib>
+
+#include <pthread.h>
+
+#ifdef _GLIBCXX_HAVE_UNISTD_H
+#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING
+#endif
+
+/* This (brute-force) tests the atomicity and thus thread safety of the
+ * shared_ptr <- weak_ptr
+ * assignment operation by allocating a test object, retrieving a weak
+ * reference to it, and letting a number of threads repeatedly create strong
+ * references from the weak reference.
+ * Specifically, this tests the function _Sp_counted_base<true>::add_ref_lock()
+ */
+
+
+const unsigned int HAMMER_MAX_THREADS = 10;
+const unsigned int POOL_SIZE = 1000;
+const unsigned long HAMMER_REPEAT = 100000;
+const unsigned long KILL_ONE_IN = 1000;
+
+struct A
+ {
+ static _Atomic_word counter;
+ A()
+ {
+ __gnu_cxx::__atomic_add(&counter, 1);
+ }
+ ~A()
+ {
+ __gnu_cxx::__atomic_add(&counter, -1);
+ }
+ };
+
+_Atomic_word A::counter = 0;
+
+using std::_S_mutex;
+
+typedef std::__shared_ptr<A, _S_mutex> sp_A_t;
+typedef std::__weak_ptr<A, _S_mutex> wp_A_t;
+
+typedef std::vector<sp_A_t> sp_vector_t;
+typedef std::vector<wp_A_t> wp_vector_t;
+
+struct shared_and_weak_pools
+{
+ sp_vector_t& shared_pool;
+ wp_vector_t& weak_pool;
+
+ shared_and_weak_pools(sp_vector_t& _shared_pool, wp_vector_t& _weak_pool)
+ : shared_pool(_shared_pool), weak_pool(_weak_pool)
+ { }
+};
+
+void* thread_hammer_and_kill(void* opaque_pools)
+{
+ shared_and_weak_pools& pools = *static_cast<shared_and_weak_pools*>(opaque_pools);
+ // Using the same parameters as in the RNG test cases.
+ std::mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> rng;
+
+ sp_vector_t::iterator cur_shared = pools.shared_pool.begin();
+ wp_vector_t::iterator cur_weak = pools.weak_pool.begin();
+
+ for (unsigned int i = 0; i < HAMMER_REPEAT; ++i)
+ {
+ try
+ {
+ sp_A_t strong(*cur_weak);
+ }
+ catch (std::bad_weak_ptr& exception)
+ {
+ ++cur_weak;
+ if (cur_weak == pools.weak_pool.end())
+ break;
+ }
+
+ if (rng() % KILL_ONE_IN == 0)
+ {
+ cur_shared->reset();
+ ++cur_shared;
+ }
+ }
+ return 0;
+}
+
+void* thread_hammer(void* opaque_weak)
+{
+ wp_vector_t& weak_pool = *static_cast<wp_vector_t*>(opaque_weak);
+ // Using the same parameters as in the RNG test cases.
+ std::mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18> rng;
+ wp_vector_t::iterator cur_weak = weak_pool.begin();
+
+ for (unsigned int i = 0; i < HAMMER_REPEAT; ++i)
+ {
+ try
+ {
+ sp_A_t strong(*cur_weak);
+ }
+ catch (std::bad_weak_ptr& exception)
+ {
+ ++cur_weak;
+ if (cur_weak == weak_pool.end())
+ break;
+ }
+ }
+ return 0;
+}
+
+int
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ sp_vector_t obj_pool(POOL_SIZE);
+
+ for(sp_vector_t::iterator cur = obj_pool.begin(); cur != obj_pool.end(); ++cur)
+ {
+ cur->reset(new A);
+ }
+ // Obtain weak references.
+ std::vector<wp_vector_t> weak_pool(HAMMER_MAX_THREADS, wp_vector_t(obj_pool.begin(), obj_pool.end()));
+
+ // Launch threads with pointer to weak reference.
+ pthread_t threads[HAMMER_MAX_THREADS];
+#if defined(__sun) && defined(__svr4__) && _XOPEN_VERSION >= 500
+ pthread_setconcurrency (HAMMER_MAX_THREADS);
+#endif
+
+ pthread_attr_t tattr;
+ pthread_attr_init(&tattr);
+
+ shared_and_weak_pools pools(obj_pool, weak_pool[0]);
+ pthread_create(threads, &tattr, thread_hammer_and_kill, static_cast<void*>(&pools));
+ for (unsigned int worker = 1; worker < HAMMER_MAX_THREADS; worker++)
+ {
+ if (pthread_create(&threads[worker], &tattr,
+ thread_hammer, static_cast<void*>(&weak_pool[worker])))
+ std::abort();
+ }
+ // Wait for threads to complete, then check integrity of reference.
+ void* status;
+ for (unsigned int worker = 0; worker < HAMMER_MAX_THREADS; worker++)
+ {
+ if (pthread_join(threads[worker], &status))
+ std::abort();
+ }
+ obj_pool.clear();
+
+ VERIFY( A::counter == 0 );
+
+ return 0;
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc
new file mode 100644
index 00000000000..11e07a76aea
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc
@@ -0,0 +1,67 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#include <algorithm>
+#include <iterator>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::input_iterator_wrapper;
+using __gnu_test::forward_iterator_wrapper;
+using __gnu_test::rvalstruct;
+using std::uninitialized_copy;
+
+typedef test_container<rvalstruct, input_iterator_wrapper> container_in;
+typedef test_container<rvalstruct, forward_iterator_wrapper> container_out;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ const int size = sizeof(inarray) / sizeof(int);
+
+ rvalstruct in[size], out[size];
+ std::copy(inarray, inarray + size, in);
+
+ container_in incon(in, in + size);
+ container_out outcon(out, out + size);
+
+ uninitialized_copy(std::move_iterator<input_iterator_wrapper<rvalstruct> >(incon.begin()),
+ std::move_iterator<input_iterator_wrapper<rvalstruct> >(incon.end()),
+ outcon.begin());
+ VERIFY( std::equal(out, out + size, inarray) );
+ for (int z = 0; z < size; ++z)
+ VERIFY( out[z].valid );
+ for (int z = 0; z < size; ++z)
+ VERIFY( !in[z].valid );
+}
+
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/32158.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc
index 1f9867e01b2..1f9867e01b2 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/32158.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc
diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/16505.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/16505.cc
index b20c0496ee8..b20c0496ee8 100644
--- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/16505.cc
+++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill_n/16505.cc
diff --git a/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc
new file mode 100644
index 00000000000..847785cb02b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+bool test __attribute__((unused)) = true;
+
+#define TEST1(x) VERIFY( x == x && !(x != x) && x <= x && !(x < x) )
+
+int
+main()
+{
+ int i=0;
+ int j=0;
+ int k=2;
+ tuple<int, int, int> a(0, 0, 0);
+ tuple<int, int, int> b(0, 0, 1);
+ tuple<int& , int& , int&> c(i,j,k);
+ tuple<const int&, const int&, const int&> d(c);
+ TEST1(a);
+ TEST1(b);
+ TEST1(c);
+ TEST1(d);
+ VERIFY(!(a > a) && !(b > b));
+ VERIFY(a >= a && b >= b);
+ VERIFY(a < b && !(b < a) && a <= b && !(b <= a));
+ VERIFY(b > a && !(a > b) && b >= a && !(a >= b));
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc
new file mode 100644
index 00000000000..86defaccf16
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ tuple<> ta;
+ tuple<> tb;
+ ta = tb;
+
+ tuple<int> tc(1);
+ tuple<int> td(0);
+ td = tc;
+ VERIFY(get<0>(td) == 1);
+
+ int i=0;
+ tuple<int&> te(i);
+ te = tc;
+ VERIFY(i == 1);
+
+ tuple<const int&> tf(tc);
+
+ get<0>(tc) = 2;
+ VERIFY(get<0>(tf) == 2);
+ tuple<double> tg;
+ tg = tc;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc
new file mode 100644
index 00000000000..0c60ec9ddef
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc
@@ -0,0 +1,105 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+// A simple class without conversions to check some things
+struct foo
+{ };
+
+void
+test_constructors()
+{
+ bool test __attribute__((unused)) = true;
+
+ int x1=0,x2=0;
+ const int &z1=x1;
+
+ // Test empty constructor
+ tuple<> ta __attribute__((unused));
+ tuple<int,int> tb;
+ // Test construction from values
+ tuple<int,int> tc(x1,x2);
+ tuple<int,int&> td(x1,x2);
+ tuple<const int&> te(z1);
+ x1=1;
+ x2=1;
+ VERIFY(get<0>(td) == 0 && get<1>(td) == 1 && get<0>(te) == 1);
+
+ // Test identical tuple copy constructor
+ tuple<int,int> tf(tc);
+ tuple<int,int> tg(td);
+ tuple<const int&> th(te);
+ // Test different tuple copy constructor
+ tuple<int,double> ti(tc);
+ tuple<int,double> tj(td);
+ // Test constructing from a pair
+ pair<int,int> pair1(1,1);
+ const pair<int,int> pair2(pair1);
+ tuple<int,int> tl(pair1);
+ tuple<int,const int&> tm(pair1);
+ tuple<int,int> tn(pair2);
+ tuple<int,const int&> to(pair2);
+}
+
+int
+main(void)
+{
+ //test construction
+ typedef tuple<int,int,int,int,int,int,int,int,int,int> type1;
+ type1 a(0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
+ type1 b(0, 0, 0, 0, 0, 0, 0, 0, 0, 2);
+ type1 c(a);
+ typedef tuple<int,int,int,int,int,int,int,int,int,char> type2;
+ type2 d(0, 0, 0, 0, 0, 0, 0, 0, 0, 3);
+ type1 e(d);
+ typedef tuple<foo,int,int,int,int,int,int,int,int,foo> type3;
+ // get
+ VERIFY(get<9>(a)==1 && get<9>(b)==2);
+ // comparisons
+ VERIFY(a==a && !(a!=a) && a<=a && a>=a && !(a<a) && !(a>a));
+ VERIFY(!(a==b) && a!=b && a<=b && a<b && !(a>=b) && !(a>b));
+ //tie
+ {
+ int i = 0;
+ tie(ignore, ignore, ignore, ignore, ignore, ignore, ignore, ignore,
+ ignore, i) = a;
+ VERIFY(i == 1);
+ }
+ //test_assignment
+ a=d;
+ a=b;
+ //make_tuple
+ make_tuple(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+ //tuple_size
+ VERIFY(tuple_size<type3>::value == 10);
+ //tuple_element
+ {
+ foo q1;
+ tuple_element<0,type3>::type q2(q1);
+ tuple_element<9,type3>::type q3(q1);
+ }
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc
new file mode 100644
index 00000000000..105727d7983
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc
@@ -0,0 +1,65 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007, 2008 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.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ int x1=0,x2=0;
+ const int &z1=x1;
+
+ // Test empty constructor
+ tuple<> ta __attribute__((unused));
+ tuple<int,int> tb;
+ // Test construction from values
+ tuple<int,int> tc(x1,x2);
+ tuple<int,int&> td(x1,x2);
+ tuple<const int&> te(z1);
+ x1=1;
+ x2=1;
+ VERIFY(get<0>(td) == 0 && get<1>(td) == 1 && get<0>(te) == 1);
+
+ // Test identical tuple copy constructor
+ tuple<int,int> tf(tc);
+ tuple<int,int> tg(td);
+ tuple<const int&> th(te);
+ // Test different tuple copy constructor
+ tuple<int,double> ti(tc);
+ tuple<int,double> tj(td);
+ //tuple<int&, int&> tk(tc);
+ tuple<const int&, const int&> tl(tc);
+ tuple<const int&, const int&> tm(tl);
+ // Test constructing from a pair
+ pair<int,int> pair1(1,1);
+ const pair<int,int> pair2(pair1);
+ tuple<int,int> tn(pair1);
+ tuple<int,const int&> to(pair1);
+ tuple<int,int> tp(pair2);
+ tuple<int,const int&> tq(pair2);
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc
new file mode 100644
index 00000000000..edb4aef61b0
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <utility>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+// libstdc++/23978
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ pair<int, int> p(1, 2);
+ int x = 0;
+ int y = 0;
+ tie(x, y) = p;
+ VERIFY( x == 1 && y == 2 );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc
new file mode 100644
index 00000000000..a6eba6d4154
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <functional>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ int i=0;
+ make_tuple(1,2,4.0);
+ make_tuple(ref(i)) = tuple<int>(1);
+ VERIFY(i == 1);
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc
new file mode 100644
index 00000000000..e7f5c056e4e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc
@@ -0,0 +1,43 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ int x1 = 0;
+ int x2 = 0;
+ int y1 = 0;
+ int y2 = 0;
+ tuple<int,int> ta(1,1);
+ tuple<const int&,const int&> tc(x1,x2);
+ tie(y1,y2)=ta;
+ VERIFY(y1 == 1 && y2 == 1);
+ tie(y1,y2)=tc;
+ VERIFY(y1 == 0 && y2 == 0);
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc
new file mode 100644
index 00000000000..c0b52f57a00
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc
@@ -0,0 +1,39 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <string>
+#include <testsuite_hooks.h>
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std;
+
+ int i;
+ string s;
+
+ tie(i, ignore, s) = make_tuple(42, 3.14, "C++");
+ VERIFY( i == 42 );
+ VERIFY( s == "C++" );
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc
new file mode 100644
index 00000000000..32015ee7da6
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc
@@ -0,0 +1,45 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ int j=1;
+ const int k=2;
+ tuple<int,int &,const int&> a(0,j,k);
+ const tuple<int,int &,const int&> b(1,j,k);
+ VERIFY(get<0>(a)==0 && get<1>(a)==1 && get<2>(a)==2);
+ get<0>(a)=3;
+ get<1>(a)=4;
+ VERIFY(get<0>(a)==3 && get<1>(a)==4);
+ VERIFY(j==4);
+ get<1>(b)=5;
+ VERIFY(get<0>(b)==1 && get<1>(b)==5 && get<2>(b)==2);
+ VERIFY(j==5);
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/moveable.cc b/libstdc++-v3/testsuite/20_util/tuple/moveable.cc
new file mode 100644
index 00000000000..bd2f18ad86e
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/moveable.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on tuple. If the implementation changed
+// this test may begin to fail.
+
+#include <tuple>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tuple<int, double> a(1, 2.0), b;
+ b = std::move(a);
+ VERIFY( std::get<0>(b) == 1 && std::get<1>(b) == 2.0 );
+ VERIFY( std::get<0>(a) == 1 && std::get<1>(a) == 2.0 );
+
+ std::tuple<int, double> c(std::move(b));
+ VERIFY( std::get<0>(c) == 1 && std::get<1>(c) == 2.0 );
+ VERIFY( std::get<0>(b) == 1 && std::get<1>(b) == 2.0 );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/moveable2.cc b/libstdc++-v3/testsuite/20_util/tuple/moveable2.cc
new file mode 100644
index 00000000000..ae7a4e2279d
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/moveable2.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2008 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.
+
+#include <tuple>
+#include <utility>
+
+struct MoveOnly
+{
+ MoveOnly () { }
+
+ MoveOnly (MoveOnly&&) { }
+
+ MoveOnly& operator=(MoveOnly&&)
+ { return *this; }
+
+private:
+ MoveOnly(MoveOnly const&); // = delete
+ MoveOnly& operator=(MoveOnly const&); // = delete
+};
+
+MoveOnly
+make_move_only ()
+{ return MoveOnly(); }
+
+// http://gcc.gnu.org/ml/libstdc++/2008-02/msg00046.html
+void test01()
+{
+ typedef std::tuple<MoveOnly> move_only_tuple;
+
+ move_only_tuple t1(make_move_only());
+ move_only_tuple t2(std::move(t1));
+ move_only_tuple t3 = std::move(t2);
+ t1 = std::move(t3);
+
+ typedef std::tuple<MoveOnly, MoveOnly> move_only_tuple2;
+
+ move_only_tuple2 t4(make_move_only(), make_move_only());
+ move_only_tuple2 t5(std::move(t4));
+ move_only_tuple2 t6 = std::move(t5);
+ t4 = std::move(t6);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc
index 55afcc86fdb..29b886d1266 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/requirements/explicit_instantiation.cc
@@ -28,6 +28,6 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <tr1/tuple>
+#include <tuple>
-template class std::tr1::tuple<short, int, double>;
+template class std::tuple<short, int, double>;
diff --git a/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc
new file mode 100644
index 00000000000..1b78a5ca2bb
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_element.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+
+using namespace std;
+
+struct foo
+{ };
+
+int
+main()
+{
+ // As foo isn't constructible from anything else, this
+ // lets us check if type is returning foo when it should
+ foo q1;
+ tuple_element<0,tuple<foo,void,int> >::type q2(q1);
+ tuple_element<2,tuple<void,int,foo> >::type q3(q1);
+}
diff --git a/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc
new file mode 100644
index 00000000000..f5f398ce0a1
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc
@@ -0,0 +1,39 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tuple>
+#include <testsuite_hooks.h>
+
+using namespace std;
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+
+ VERIFY(tuple_size<tuple<> >::value == 0);
+ VERIFY(tuple_size<tuple<int> >::value == 1);
+ VERIFY(tuple_size<tuple<void> >::value == 1);
+ typedef tuple<int,const int&,void> test_tuple1;
+ VERIFY(tuple_size<test_tuple1>::value == 3);
+ VERIFY(tuple_size<tuple<tuple<void> > >::value == 1);
+}
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/lock/1.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/lock/1.cc
new file mode 100644
index 00000000000..a6506e379ef
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/lock/1.cc
@@ -0,0 +1,37 @@
+// 2006-09-24 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.3 Template class weak_ptr [util.smartptr.weak]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+int main()
+{
+ using __gnu_test::check_ret_type;
+ using std::weak_ptr;
+ using std::shared_ptr;
+
+ weak_ptr<int> wp;
+ check_ret_type<shared_ptr<int> >(wp.lock());
+}
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc
deleted file mode 100644
index 1bbfe882811..00000000000
--- a/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// Copyright (C) 2007 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// 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.
-
-#include <memory>
-
-template class std::weak_ptr<int>;
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..ede053bb717
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,32 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2006, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+using std::weak_ptr;
+template class weak_ptr<int>;
+template class weak_ptr<void>;
+template class weak_ptr<ClassType>;
+template class weak_ptr<IncompleteClass>;
diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..272ef4fe444
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,36 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
+
+#include <memory>
+#include <testsuite_tr1.h>
+
+// Check the _S_single lock policy can be instantiated. For a thread-enabled
+// library this checks the templates can be instantiated for non-default
+// lock policy, for a single-threaded lib this is redundant but harmless.
+using namespace __gnu_test;
+using std::__weak_ptr;
+using std::_S_single;
+template class __weak_ptr<int, _S_single>;
+template class __weak_ptr<void, _S_single>;
+template class __weak_ptr<ClassType, _S_single>;
+template class __weak_ptr<IncompleteClass, _S_single>;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
index f67582c5f26..5f60c2ff627 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
index ff6228f1240..653f4de36db 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc
index 8b021755786..8a8951f2db2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/requirements/explicit_instantiation/debug.cc
@@ -16,15 +16,6 @@
// 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.
-
// This file tests explicit instantiation of basic_string
#include <debug/string>
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/typedefs.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/typedefs.cc
index 333142018e4..13b70390766 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/typedefs.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/typedefs.cc
@@ -1,5 +1,4 @@
// { dg-do compile }
-// { dg-options "-ansi -pedantic-errors" }
// 2001-02-11 gdr
// Origin: Craig Rodrigues <rodrigc@mediaone.net>
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
index 3a0394daf1f..2e1b631f75c 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
@@ -31,6 +31,7 @@
void test02(void)
{
+ typedef short char_type;
bool test __attribute__((unused)) = true;
// 21.1.1 character traits requirements
@@ -45,67 +46,67 @@ void test02(void)
// pos == X::pos_type
// state == X::state_type
- // void X::assign(short c, short d)
+ // void X::assign(char_type c, char_type d)
// assigns c = d;
- short c1 = 'z';
- short c2 = 'u';
+ char_type c1 = 'z';
+ char_type c2 = 'u';
VERIFY( c1 != c2 );
- std::char_traits<short>::assign(c1,c2);
+ std::char_traits<char_type>::assign(c1,c2);
VERIFY( c1 == 'u' );
- // bool X::eq(short c, short d)
+ // bool X::eq(char_type c, char_type d)
c1 = 'z';
c2 = 'u';
- VERIFY ( !std::char_traits<short>::eq(c1, c2) );
- VERIFY ( std::char_traits<short>::eq(c1, c1) );
- VERIFY ( std::char_traits<short>::eq(c2, c2) );
+ VERIFY ( !std::char_traits<char_type>::eq(c1, c2) );
+ VERIFY ( std::char_traits<char_type>::eq(c1, c1) );
+ VERIFY ( std::char_traits<char_type>::eq(c2, c2) );
- // bool X::lt(short c, short d)
+ // bool X::lt(char_type c, char_type d)
c1 = 'z';
c2 = 'u';
- VERIFY ( std::char_traits<short>::lt(c2, c1) );
- VERIFY ( !std::char_traits<short>::lt(c1, c2) );
- VERIFY ( !std::char_traits<short>::lt(c1, c1) );
- VERIFY ( !std::char_traits<short>::lt(c2, c2) );
+ VERIFY ( std::char_traits<char_type>::lt(c2, c1) );
+ VERIFY ( !std::char_traits<char_type>::lt(c1, c2) );
+ VERIFY ( !std::char_traits<char_type>::lt(c1, c1) );
+ VERIFY ( !std::char_traits<char_type>::lt(c2, c2) );
- // short* X::move(short* s, const short* p, size_t n)
+ // char_type* X::move(char_type* s, const char_type* p, size_t n)
// for each i in [0,n) performs X::assign(s[i], p[i]). Copies
// correctly even where p is in [s, s + n), and yields s.
- short array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0};
- const std::basic_string<short> str_01(array1 + 0, array1 + 10);
+ char_type array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0};
+ const std::basic_string<char_type> str_01(array1 + 0, array1 + 10);
- const short str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0};
+ const char_type str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0};
- int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1;
+ int len = sizeof(str_lit1)/sizeof(char_type) + sizeof(array1)/sizeof(char_type) - 1;
// two terminating chars
- short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
- short array2[len];
- std::char_traits<short>::copy(array2, array3, len);
+ char_type array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
+ char_type array2[len];
+ std::char_traits<char_type>::copy(array2, array3, len);
VERIFY( str_lit1[0] == 'm' );
c1 = array2[0];
c2 = str_lit1[0];
- short c3 = array2[1];
- short c4 = str_lit1[1];
- std::char_traits<short>::move(array2, str_lit1, 0);
+ char_type c3 = array2[1];
+ char_type c4 = str_lit1[1];
+ std::char_traits<char_type>::move(array2, str_lit1, 0);
VERIFY( array2[0] == c1 );
VERIFY( str_lit1[0] == c2 );
- std::char_traits<short>::move(array2, str_lit1, 1);
+ std::char_traits<char_type>::move(array2, str_lit1, 1);
VERIFY( array2[0] == c2 );
VERIFY( str_lit1[0] == c2 );
VERIFY( array2[1] == c3 );
VERIFY( str_lit1[1] == c4 );
- std::char_traits<short>::move(array2, str_lit1, 2);
+ std::char_traits<char_type>::move(array2, str_lit1, 2);
VERIFY( array2[0] == c2 );
VERIFY( str_lit1[0] == c2 );
VERIFY( array2[1] == c4 );
VERIFY( str_lit1[1] == c4 );
- short* pc1 = array1 + 1;
+ char_type* pc1 = array1 + 1;
c1 = pc1[0];
c2 = array1[0];
VERIFY( c1 != c2 );
- short* pc2 = std::char_traits<short>::move(array1, pc1, 0);
+ char_type* pc2 = std::char_traits<char_type>::move(array1, pc1, 0);
c3 = pc1[0];
c4 = array1[0];
VERIFY( c1 == c3 );
@@ -114,11 +115,11 @@ void test02(void)
c1 = pc1[0];
c2 = array1[0];
- short* pc3 = pc1;
- pc2 = std::char_traits<short>::move(array1, pc1, 10);
+ char_type* pc3 = pc1;
+ pc2 = std::char_traits<char_type>::move(array1, pc1, 10);
c3 = pc1[0];
c4 = array1[0];
- VERIFY( c1 != c3 ); // underlying short array changed.
+ VERIFY( c1 != c3 ); // underlying char_type array changed.
VERIFY( c4 != c3 );
VERIFY( pc2 == array1 );
VERIFY( pc3 == pc1 ); // but pointers o-tay
@@ -126,49 +127,47 @@ void test02(void)
c2 = array1[0];
VERIFY( c1 != c2 );
- // size_t X::length(const short* p)
- len = std::char_traits<short>::length(str_lit1);
- VERIFY( len == sizeof(str_lit1) / sizeof(short) - 1 );
+ // size_t X::length(const char_type* p)
+ len = std::char_traits<char_type>::length(str_lit1);
+ VERIFY( len == sizeof(str_lit1) / sizeof(char_type) - 1 );
- // const short* X::find(const short* s, size_t n, short c)
- const int N4 = sizeof(str_lit1) / sizeof(short);
- const short* pc4 = std::char_traits<short>::find(str_lit1, N4, 'a');
+ // const char_type* X::find(const char_type* s, size_t n, char_type c)
+ const int N4 = sizeof(str_lit1) / sizeof(char_type);
+ const char_type* pc4 = std::char_traits<char_type>::find(str_lit1, N4, 'a');
VERIFY( pc4 != 0 );
VERIFY( *pc4 == 'a' );
- pc4 = std::char_traits<short>::find(str_lit1, N4, 0x0a73);
+ pc4 = std::char_traits<char_type>::find(str_lit1, N4, 0x0a73);
VERIFY( pc4 == 0 );
- // short* X::assign(short* s, size_t n, short c)
- len = sizeof(array2) / sizeof(short);
- std::memset(array2, 0xaf, len * sizeof(short));
+ // char_type* X::assign(char_type* s, size_t n, char_type c)
+ len = sizeof(array2) / sizeof(char_type);
+ std::memset(array2, 0xaf, len * sizeof(char_type));
VERIFY( array2[0] != 0x15a8 );
- pc1 = std::char_traits<short>::assign (array2, len, 0x15a8);
+ pc1 = std::char_traits<char_type>::assign (array2, len, 0x15a8);
VERIFY( pc1 == array2 );
for (int i = 0; i < len; ++i)
VERIFY( array2[i] == 0x15a8 );
- // short* X::copy(short* s, const short* p, size_t n)
- int n1 = sizeof(str_lit1) / sizeof(short);
- pc1 = std::char_traits<short>::copy(array2, str_lit1, n1);
- len = std::char_traits<short>::length(array2);
+ // char_type* X::copy(char_type* s, const char_type* p, size_t n)
+ int n1 = sizeof(str_lit1) / sizeof(char_type);
+ pc1 = std::char_traits<char_type>::copy(array2, str_lit1, n1);
+ len = std::char_traits<char_type>::length(array2);
VERIFY( len == n1 - 1 );
for (int i = 0; i < len; ++i)
VERIFY( str_lit1[i] == array2[i] );
- // int X::compare(const short* p, const short* q, size_t n)
- const short* pconst1 = str_01.data();
- const short* pconst2 = str_lit1;
+ // int X::compare(const char_type* p, const char_type* q, size_t n)
+ const char_type* pconst1 = str_01.data();
+ const char_type* pconst2 = str_lit1;
- VERIFY( std::char_traits<short>::compare(pconst1, pconst2, 10) > 0 );
- VERIFY( std::char_traits<short>::compare(pconst2, pconst1, 10) < 0 );
- VERIFY( std::char_traits<short>::compare(pconst1, pconst1, 10) == 0 );
- VERIFY( std::char_traits<short>::compare(pconst2, pconst2, 10) == 0 );
+ VERIFY( std::char_traits<char_type>::compare(pconst1, pconst2, 10) > 0 );
+ VERIFY( std::char_traits<char_type>::compare(pconst2, pconst1, 10) < 0 );
+ VERIFY( std::char_traits<char_type>::compare(pconst1, pconst1, 10) == 0 );
+ VERIFY( std::char_traits<char_type>::compare(pconst2, pconst2, 10) == 0 );
}
-
-
int main()
{
test02();
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc
index 6026eac89af..6bd990aa11f 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc
@@ -1,5 +1,4 @@
// { dg-do compile }
-// { dg-options "-ansi -pedantic-errors" }
// 2001-02-11 gdr
// Origin: Craig Rodrigues <rodrigc@mediaone.net>
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc
index 17d6129dd90..cb3dcc228f6 100644
--- a/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwchar/macros.cc
@@ -20,6 +20,8 @@
#include <cwchar>
+#ifdef _GLIBCXX_USE_WCHAR_T
+
namespace gnu
{
#ifndef NULL
@@ -38,3 +40,5 @@ namespace gnu
#error "WEOF_must_be_a_macro"
#endif
}
+
+#endif
diff --git a/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc b/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc
index a1d78c75c00..ae2e4019192 100644
--- a/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc
+++ b/libstdc++-v3/testsuite/21_strings/headers/cwctype/macros.cc
@@ -20,9 +20,13 @@
#include <cwctype>
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+
namespace gnu
{
#ifndef WEOF
#error "WEOF_must_be_a_macro"
#endif
}
+
+#endif
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
index a784ee044a2..43bf0283d64 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
index f1f06f594f1..01935eabd97 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
@@ -128,9 +128,6 @@ void test09()
r1 = cvt->in(state01, efrom, e_lit + i, efrom_next,
ito, i_arr + esize, ito_next);
- printf("%d %d %d %x %x\n", efrom - e_lit, i, efrom_next - e_lit,
- efrom[-1], ito[-1]);
-
// It it not clear if partial should ever be returned here
// (see DR 382).
VERIFY( r1 == codecvt_base::ok || r1 == codecvt_base::partial );
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
index 55d2536fd14..76c293f11a5 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
@@ -33,7 +33,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
- int size = 25;
+ int size = 23;
locale loc = locale::classic();
c_codecvt::state_type state;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
index 16e81b3b8b9..0642e31da3e 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
@@ -51,7 +51,7 @@ void test02()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
- int size = 25;
+ int size = 23;
locale loc (locale::classic(), new length_codecvt);
c_codecvt::state_type state;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
index efef386bbba..7581e2a123b 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
index cb3ec744e56..c6ecb25c383 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
index 94064ecc993..53354292ed6 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
@@ -2,7 +2,8 @@
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,19 +49,17 @@ void test02()
// int compare(const charT*, const charT*, const charT*, const charT*) const
- const char* strlit1 = "monkey picked tikuanyin oolong";
const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
int i1;
int i2;
- int size1 = char_traits<char>::length(strlit1) - 1;
int size3 = char_traits<char>::length(strlit3) - 1;
int size4 = char_traits<char>::length(strlit4) - 1;
i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
VERIFY ( i1 == 1 );
- i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
+ i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size3);
VERIFY ( i1 == -1 );
i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
VERIFY ( i1 == 0 );
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/dr695.cc b/libstdc++-v3/testsuite/22_locale/ctype/dr695.cc
new file mode 100644
index 00000000000..7d09f35d528
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/ctype/dr695.cc
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// 2007-11-08 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 22.2.1 The ctype category
+
+#include <locale>
+
+// DR 695.
+void
+test01()
+{
+ using namespace std;
+
+ locale loc;
+ const ctype<char>& ct = use_facet<ctype<char> >(loc);
+ ct.table();
+ ct.classic_table();
+}
diff --git a/libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc b/libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc
new file mode 100644
index 00000000000..6b157e35aec
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc
@@ -0,0 +1,81 @@
+// Copyright (C) 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <string>
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Based on Langer Kreft "Standard C++ IOStreams and Locales" p 316-318
+// PR libstdc++/30127
+// PR libstdc++/34449
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ using std::locale;
+ using std::has_facet;
+ using std::use_facet;
+ typedef std::ctype<char> base_facet;
+ typedef std::ctype_byname<char> derived_facet;
+
+ locale loc_c = locale::classic();
+ locale loc_base = loc_c;
+ locale loc_derived(loc_c, new derived_facet("C"));
+
+ // Standard base facet.
+ VERIFY( has_facet<base_facet>(loc_c) );
+ VERIFY( has_facet<base_facet>(loc_base) );
+ VERIFY( has_facet<base_facet>(loc_derived) );
+
+ // Standard derived facet.
+ VERIFY( !has_facet<derived_facet>(loc_c) );
+ VERIFY( !has_facet<derived_facet>(loc_base) );
+ VERIFY( has_facet<derived_facet>(loc_derived) );
+
+
+ // 1
+ try
+ {
+ if (has_facet<derived_facet>(loc_base))
+ {
+ use_facet<derived_facet>(loc_base).widen('k');
+ VERIFY( true );
+ }
+ }
+ catch (...)
+ {
+ // Expect no exception.
+ VERIFY( true );
+ }
+
+ // 2
+ try
+ {
+ if (has_facet<base_facet>(loc_derived))
+ use_facet<base_facet>(loc_derived).widen('k');
+ else
+ VERIFY( true );
+ }
+ catch (...)
+ {
+ // Expect no exception.
+ VERIFY( true );
+ }
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc b/libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc
new file mode 100644
index 00000000000..94c41771502
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc
@@ -0,0 +1,105 @@
+// Copyright (C) 2007, 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <string>
+#include <locale>
+#include <testsuite_hooks.h>
+
+// Based on Langer Kreft "Standard C++ IOStreams and Locales" p 316-318
+struct base_facet: public std::locale::facet
+{
+ virtual std::string msg() const
+ { return "base class"; }
+
+ static std::locale::id id;
+};
+
+std::locale::id base_facet::id;
+
+
+struct derived_facet: public base_facet
+{
+ virtual std::string msg() const
+ { return "derived class"; }
+
+ virtual std::string msg_repeater() const
+ { return "derived class derived class"; }
+
+};
+
+// PR libstdc++/30127
+// PR libstdc++/34449
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ using std::locale;
+ using std::has_facet;
+ using std::use_facet;
+
+ locale loc_c = locale::classic();
+ locale loc_base(loc_c, new base_facet);
+ locale loc_derived(loc_c, new derived_facet);
+
+ // Standard facets.
+ VERIFY( has_facet<std::ctype<char> >(loc_c) );
+ VERIFY( has_facet<std::ctype<char> >(loc_base) );
+ VERIFY( has_facet<std::ctype<char> >(loc_derived) );
+
+ // User defined base facet.
+ VERIFY( !has_facet<base_facet>(loc_c) );
+ VERIFY( has_facet<base_facet>(loc_base) );
+ VERIFY( has_facet<base_facet>(loc_derived) );
+
+ // User defined derived facet.
+ VERIFY( !has_facet<derived_facet>(loc_c) );
+ VERIFY( !has_facet<derived_facet>(loc_base) );
+ VERIFY( has_facet<derived_facet>(loc_derived) );
+
+
+ // 1
+ try
+ {
+ if (has_facet<derived_facet>(loc_base))
+ {
+ use_facet<derived_facet>(loc_base).msg_repeater();
+ VERIFY( false );
+ }
+ }
+ catch (...)
+ {
+ // Expect no exception.
+ VERIFY( true );
+ }
+
+ // 2
+ try
+ {
+ if (has_facet<base_facet>(loc_derived))
+ use_facet<base_facet>(loc_derived).msg();
+ else
+ VERIFY( true );
+ }
+ catch (...)
+ {
+ // Expect no exception.
+ VERIFY( true );
+ }
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
index 266388fcc2d..1aff586a125 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
@@ -45,7 +45,6 @@ void test01()
bool b1 = true;
bool b0 = false;
unsigned long ul1 = 1294967294;
- unsigned long ul2 = 0;
unsigned long ul;
double d1 = 1.02345e+308;
double d2 = 3.15e-308;
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
index 60457f70793..a6268e2719f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
@@ -45,7 +45,6 @@ void test01()
bool b1 = true;
bool b0 = false;
unsigned long ul1 = 1294967294;
- unsigned long ul2 = 0;
unsigned long ul;
double d1 = 1.02345e+308;
double d2 = 3.15e-308;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/12.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/12.cc
new file mode 100644
index 00000000000..c17ecec8171
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/12.cc
@@ -0,0 +1,64 @@
+// 2007-11-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 22.2.2.2.1 num_put members
+
+#include <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+// http://gcc.gnu.org/ml/libstdc++/2007-11/msg00074.html
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ ostringstream oss1, oss2, oss3;
+ const num_put<char>& np1 = use_facet<num_put<char> >(oss1.getloc());
+ const num_put<char>& np2 = use_facet<num_put<char> >(oss2.getloc());
+ const num_put<char>& np3 = use_facet<num_put<char> >(oss3.getloc());
+
+ string result1, result2, result3;
+
+ long int li1 = 0;
+ long int li2 = 5;
+ double d1 = 0.0;
+
+ oss1.setf(ios_base::showpos);
+ np1.put(oss1.rdbuf(), oss1, '*', li1);
+ result1 = oss1.str();
+ VERIFY( result1 == "+0" );
+
+ oss2.setf(ios_base::showpos);
+ np2.put(oss2.rdbuf(), oss2, '*', li2);
+ result2 = oss2.str();
+ VERIFY( result2 == "+5" );
+
+ oss3.setf(ios_base::showpos);
+ np3.put(oss3.rdbuf(), oss3, '*', d1);
+ result3 = oss3.str();
+ VERIFY( result3 == "+0" );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/12.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/12.cc
new file mode 100644
index 00000000000..1467aa3d4a6
--- /dev/null
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/12.cc
@@ -0,0 +1,64 @@
+// 2007-11-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 22.2.2.2.1 num_put members
+
+#include <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+// http://gcc.gnu.org/ml/libstdc++/2007-11/msg00074.html
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ wostringstream oss1, oss2, oss3;
+ const num_put<wchar_t>& np1 = use_facet<num_put<wchar_t> >(oss1.getloc());
+ const num_put<wchar_t>& np2 = use_facet<num_put<wchar_t> >(oss2.getloc());
+ const num_put<wchar_t>& np3 = use_facet<num_put<wchar_t> >(oss3.getloc());
+
+ wstring result1, result2, result3;
+
+ long int li1 = 0;
+ long int li2 = 5;
+ double d1 = 0.0;
+
+ oss1.setf(ios_base::showpos);
+ np1.put(oss1.rdbuf(), oss1, L'*', li1);
+ result1 = oss1.str();
+ VERIFY( result1 == L"+0" );
+
+ oss2.setf(ios_base::showpos);
+ np2.put(oss2.rdbuf(), oss2, L'*', li2);
+ result2 = oss2.str();
+ VERIFY( result2 == L"+5" );
+
+ oss3.setf(ios_base::showpos);
+ np3.put(oss3.rdbuf(), oss3, L'*', d1);
+ result3 = oss3.str();
+ VERIFY( result3 == L"+0" );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
index e7a93f07df6..cf38a79902e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
@@ -1,6 +1,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -52,8 +53,9 @@ void test05()
date, date + traits::length(date));
string result5 = oss.str();
VERIFY( result5 == "Sunday, the second of April");
- iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ date_ex,
+ date_ex + traits::length(date_ex));
string result6 = oss.str();
VERIFY( result6 != result5 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
index 0bb9a2d28db..8ef33f536c6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -55,7 +56,8 @@ void test06()
string result7 = oss.str();
VERIFY( result7 == "Sonntag, the second of April");
iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result8 = oss.str();
VERIFY( result8 != result7 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
index 7753fe947bc..f17c6b94ce7 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -55,7 +56,8 @@ void test07()
string result9 = oss.str();
VERIFY( result9 == "Sunday, the second of April");
iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result10 = oss.str();
VERIFY( result10 != result9 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
index 3a1d9914277..2da9be0b146 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -54,7 +55,8 @@ void test08()
string result11 = oss.str();
VERIFY( result11 == "dimanche, the second of avril");
iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result12 = oss.str();
VERIFY( result12 != result11 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
index aaf3e391e8d..d635968c162 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
@@ -1,6 +1,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -54,8 +55,9 @@ void test05()
date, date + traits::length(date));
wstring result5 = oss.str();
VERIFY( result5 == L"Sunday, the second of April");
- iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
- date_ex, date_ex + traits::length(date));
+ iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
+ date_ex,
+ date_ex + traits::length(date_ex));
wstring result6 = oss.str();
VERIFY( result6 != result5 );
}
diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/citerators.cc
new file mode 100644
index 00000000000..4e2cccf0181
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/array/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <array>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::array<int, 7> a;
+ VERIFY( a.cbegin() == a.begin() );
+ VERIFY( a.cend() == a.end() );
+ VERIFY( a.crbegin() == a.rbegin() );
+ VERIFY( a.crend() == a.rend() );
+ VERIFY( a.cbegin() != a.cend() );
+ VERIFY( a.crbegin() != a.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/all/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/all/1.cc
new file mode 100644
index 00000000000..1464510fdbf
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/bitset/all/1.cc
@@ -0,0 +1,81 @@
+// 2007-11-23 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 23.3.5.2 bitset members
+
+#include <bitset>
+#include <testsuite_hooks.h>
+
+// DR 693. std::bitset::all() missing.
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::bitset<0> z1;
+ VERIFY( z1.all() );
+ z1.set();
+ VERIFY( z1.all() );
+
+ std::bitset<8> z2;
+ VERIFY( !z2.all() );
+ z2.set();
+ VERIFY( z2.all() );
+
+ std::bitset<16> z3;
+ VERIFY( !z3.all() );
+ z3.set();
+ VERIFY( z3.all() );
+
+ std::bitset<32> z4;
+ VERIFY( !z4.all() );
+ z4.set();
+ VERIFY( z4.all() );
+
+ std::bitset<64> z5;
+ VERIFY( !z5.all() );
+ z5.set();
+ VERIFY( z5.all() );
+
+ std::bitset<96> z6;
+ VERIFY( !z6.all() );
+ z6.set();
+ VERIFY( z6.all() );
+
+ std::bitset<128> z7;
+ VERIFY( !z7.all() );
+ z7.set();
+ VERIFY( z7.all() );
+
+ std::bitset<192> z8;
+ VERIFY( !z8.all() );
+ z8.set();
+ VERIFY( z8.all() );
+
+ std::bitset<1024> z9;
+ VERIFY( !z9.all() );
+ z9.set();
+ VERIFY( z9.all() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc
new file mode 100644
index 00000000000..812e0214c89
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/moveable.cc
@@ -0,0 +1,81 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 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, 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.
+
+#include <deque>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+
+// According to n1771, there should be two resizes, with and without
+// parameter. We only have one at present, whose second parameter defaults
+// to a default-constructed object.
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<copycounter> a;
+ copycounter::copycount = 0;
+ a.resize(10);
+ a.resize(98);
+ a.resize(99);
+ a.resize(100);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 100 );
+#else
+ VERIFY( copycounter::copycount == 100 + 4 );
+#endif
+ a.resize(99);
+ a.resize(0);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 100 );
+#else
+ VERIFY( copycounter::copycount == 100 + 6 );
+#endif
+ a.resize(100);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 200 );
+#else
+ VERIFY( copycounter::copycount == 200 + 7 );
+#endif
+ a.clear();
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 200 );
+#else
+ VERIFY( copycounter::copycount == 200 + 7 );
+#endif
+}
+
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/moveable.cc
new file mode 100644
index 00000000000..6ec082d3d81
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/cons/moveable.cc
@@ -0,0 +1,64 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <deque>
+#include <iterator>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+typedef std::deque<rvalstruct> test_type;
+
+// Empty constructor doesn't require a copy constructor
+void
+test01()
+{ test_type d; }
+
+// Constructing from a range that returns rvalue references doesn't
+// require a copy constructor.
+void
+test02(rvalstruct* begin, rvalstruct* end)
+{
+ test_type d(std::make_move_iterator(begin), std::make_move_iterator(end));
+}
+
+// Constructing from a input iterator range that returns rvalue
+// references doesn't require a copy constructor either.
+void
+test03(input_iterator_wrapper<rvalstruct> begin,
+ input_iterator_wrapper<rvalstruct> end)
+{
+ test_type d(std::make_move_iterator(begin), std::make_move_iterator(end));
+}
+
+// Neither does destroying one.
+void
+test04(test_type* d)
+{ delete d; }
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
index 167f1f2a12b..5fe41db88de 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -29,12 +29,12 @@ const int A2[] = {0, 2, 3, 4, 10, 11, 12, 13, 14, 15};
const int A3[] = {0, 2, 3, 4, 10, 11};
const int A4[] = {4, 10, 11};
const int A5[] = {4, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
void
test01()
@@ -85,17 +85,17 @@ test02()
typedef deque_type::iterator iterator_type;
deque_type v, v1, v2, v3, v4, v5;
- for (int i = 0; i < N; ++i)
+ for (unsigned i = 0; i < N; ++i)
v.push_back(std::deque<int>(1, A[i]));
- for (int i = 0; i < N1; ++i)
+ for (unsigned i = 0; i < N1; ++i)
v1.push_back(std::deque<int>(1, A1[i]));
- for (int i = 0; i < N2; ++i)
+ for (unsigned i = 0; i < N2; ++i)
v2.push_back(std::deque<int>(1, A2[i]));
- for (int i = 0; i < N3; ++i)
+ for (unsigned i = 0; i < N3; ++i)
v3.push_back(std::deque<int>(1, A3[i]));
- for (int i = 0; i < N4; ++i)
+ for (unsigned i = 0; i < N4; ++i)
v4.push_back(std::deque<int>(1, A4[i]));
- for (int i = 0; i < N5; ++i)
+ for (unsigned i = 0; i < N5; ++i)
v5.push_back(std::deque<int>(1, A5[i]));
iterator_type it1 = v.erase(v.begin() + 1);
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
index 19542d3999e..93ced1b9064 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -32,14 +32,14 @@ const int A3[] = {-5, 0, 1, 2, 8, 9, 10, 11};
const int A4[] = {2, 8, 9, 10, 11};
const int A5[] = {2, 8, 10, 11};
const int A6[] = {2, 8, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N0 = sizeof(A0) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
-const int N6 = sizeof(A6) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N0 = sizeof(A0) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
+const unsigned N6 = sizeof(A6) / sizeof(int);
template<int Size>
class My_class
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/moveable.cc
new file mode 100644
index 00000000000..879d0c25f98
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/moveable.cc
@@ -0,0 +1,71 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-28 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <deque>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace __gnu_test;
+
+ std::deque<copycounter> a(40);
+ copycounter::copycount = 0;
+
+ a.erase(a.begin() + 20);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin());
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.end() - 1);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin() + 10, a.end() - 10);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin(), a.begin() + 5);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.end() - 5, a.end());
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin(), a.end());
+ VERIFY( copycounter::copycount == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/moveable.cc
new file mode 100644
index 00000000000..c965a9d2449
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/moveable.cc
@@ -0,0 +1,143 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <deque>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+
+// Test deque::push_back makes no unneeded copies.
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<copycounter> a;
+ copycounter c(1);
+ copycounter::copycount = 0;
+ for(int i = 0; i < 1000; ++i)
+ a.push_back(c);
+ VERIFY(copycounter::copycount == 1000);
+}
+
+// Test deque::push_front makes no unneeded copies.
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<copycounter> a;
+ copycounter c(1);
+ copycounter::copycount = 0;
+ for(int i = 0; i < 1000; ++i)
+ a.push_front(c);
+ VERIFY(copycounter::copycount == 1000);
+}
+
+// Test deque::insert makes no unneeded copies.
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<copycounter> a(1000);
+ copycounter c(1);
+ copycounter::copycount = 0;
+ a.insert(a.begin(),c);
+ a.insert(a.end(),c);
+ for(int i = 0; i < 500; ++i)
+ a.insert(a.begin() + i, c);
+ VERIFY(copycounter::copycount == 502);
+}
+
+// Test deque::insert(iterator, count, value) makes no unneeded copies
+// when it has to also reallocate the deque's internal buffer.
+void
+test04()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::deque<copycounter> a(10, c);
+ copycounter::copycount = 0;
+ a.insert(a.begin(), 20, c);
+ VERIFY(copycounter::copycount == 20);
+ a.insert(a.end(), 50, c);
+ VERIFY(copycounter::copycount == 70);
+ // NOTE : These values are each one higher than might be expected, as
+ // deque::insert(iterator, count, value) copies the value it is given
+ // when it has to move elements in the deque in case that value is
+ // in the deque.
+
+ // Near the start
+ a.insert(a.begin() + 10, 100, c);
+ VERIFY(copycounter::copycount == 170 + 1);
+ // Near the end
+ a.insert(a.end() - 10, 1000, c);
+ VERIFY(copycounter::copycount == 1170 + 2);
+}
+
+// Test deque::insert(iterator, count, value) makes no unneeded copies
+// when it doesn't have to reallocate the deque's internal buffer.
+void
+test05()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::deque<copycounter> a(10, c);
+ copycounter::copycount = 0;
+ //a.reserve(1000);
+ a.insert(a.begin(), 20, c);
+ VERIFY(copycounter::copycount == 20 );
+ a.insert(a.end(), 50, c);
+ VERIFY(copycounter::copycount == 70 );
+
+ // NOTE : These values are each one higher than might be expected, as
+ // deque::insert(iterator, count, value) copies the value it is given
+ // when it has to move elements in the deque in case that value is
+ // in the deque.
+ // Near the start
+ a.insert(a.begin() + 10, 100, c);
+ VERIFY(copycounter::copycount == 170 + 1);
+ // Near the end
+ a.insert(a.end() - 10, 200, c);
+ VERIFY(copycounter::copycount == 370 + 2);
+}
+
+int main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/moveable.cc b/libstdc++-v3/testsuite/23_containers/deque/moveable.cc
new file mode 100644
index 00000000000..ae532de9780
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/moveable.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on deque (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <deque>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<int> a,b;
+ a.push_back(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b[0] == 1 && a.size() == 0 );
+
+ std::deque<int> c(std::move(b));
+ VERIFY( c.size() == 1 && c[0] == 1 );
+ VERIFY( b.size() == 0 );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/citerators.cc
new file mode 100644
index 00000000000..e869a287cb6
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <deque>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::deque<int> d(7);
+ VERIFY( d.cbegin() == d.begin() );
+ VERIFY( d.cend() == d.end() );
+ VERIFY( d.crbegin() == d.rbegin() );
+ VERIFY( d.crend() == d.rend() );
+ VERIFY( d.cbegin() != d.cend() );
+ VERIFY( d.crbegin() != d.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
index 0c47da04033..3d40c00596b 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1297 }
+// { dg-error "no matching" "" { target *-*-* } 1449 }
// { dg-excess-errors "" }
#include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
index fc0beffae3e..fb4c40ef8cc 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1232 }
+// { dg-error "no matching" "" { target *-*-* } 1388 }
// { dg-excess-errors "" }
#include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
index 403f6473f6b..1f24c98278f 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1232 }
+// { dg-error "no matching" "" { target *-*-* } 1388 }
// { dg-excess-errors "" }
#include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
index 2e2abc56c4b..522022a856d 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1377 }
+// { dg-error "no matching" "" { target *-*-* } 1533 }
// { dg-excess-errors "" }
#include <deque>
diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc
index 6c1b9adb786..697776e973d 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <deque>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/hash/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/23_containers/hash/requirements/explicit_instantiation.cc
deleted file mode 100644
index 2155ca898bc..00000000000
--- a/libstdc++-v3/testsuite/23_containers/hash/requirements/explicit_instantiation.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-#include <functional>
-
-template class std::hash<bool>;
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
index 340f336846d..4faaad688cd 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/insert/25288.cc
@@ -18,6 +18,8 @@
// 23.2.2.3 list modifiers [lib.list.modifiers]
+// { dg-require-time "" }
+
#include <list>
#include <testsuite_hooks.h>
#include <ext/throw_allocator.h>
diff --git a/libstdc++-v3/testsuite/23_containers/list/moveable.cc b/libstdc++-v3/testsuite/23_containers/list/moveable.cc
new file mode 100644
index 00000000000..d3f1031f91f
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/list/moveable.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on list (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <list>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::list<int> a,b;
+ a.push_back(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && *b.begin() == 1 && a.size() == 0 );
+
+ std::list<int> c(std::move(b));
+ VERIFY( c.size() == 1 && *c.begin() == 1 );
+ VERIFY( b.size() == 0 );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/citerators.cc
new file mode 100644
index 00000000000..d9ef7581e60
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <list>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::list<int> l(7);
+ VERIFY( l.cbegin() == l.begin() );
+ VERIFY( l.cend() == l.end() );
+ VERIFY( l.crbegin() == l.rbegin() );
+ VERIFY( l.crend() == l.rend() );
+ VERIFY( l.cbegin() != l.cend() );
+ VERIFY( l.crbegin() != l.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
index 4ad1127b9e5..1478f3de947 100644
--- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1138 }
+// { dg-error "no matching" "" { target *-*-* } 1317 }
// { dg-excess-errors "" }
#include <list>
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
index 5df6fc8532c..d5dc3908b7c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-error "no matching" "" { target *-*-* } 1286 }
// { dg-excess-errors "" }
#include <list>
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
index 6783727be7a..10f726b9f73 100644
--- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-error "no matching" "" { target *-*-* } 1286 }
// { dg-excess-errors "" }
#include <list>
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
index c8f2026052e..1a97c4b4436 100644
--- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1107 }
+// { dg-error "no matching" "" { target *-*-* } 1286 }
// { dg-excess-errors "" }
#include <list>
diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc
index 8b27d10251b..9c052d8d480 100644
--- a/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <list>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/map/moveable.cc b/libstdc++-v3/testsuite/23_containers/map/moveable.cc
new file mode 100644
index 00000000000..c3ab6b0a69b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on map (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <map>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::map<int, int> a,b;
+ a[2]=0;
+ b[1]=0;
+ b = std::move(a);
+ VERIFY(b.find(2) != b.end() && a.find(1) == a.end());
+
+ std::map<int, int> c(std::move(b));
+ VERIFY( c.find(2) != c.end());
+ VERIFY( b.find(2) == b.end());
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
index 8f27ab4c06e..35355380461 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -128,6 +128,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/citerators.cc
new file mode 100644
index 00000000000..320d46d2e29
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/map/requirements/citerators.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::map<int, int> m;
+ m[1] = 1;
+ VERIFY( m.cbegin() == m.begin() );
+ VERIFY( m.cend() == m.end() );
+ VERIFY( m.crbegin() == m.rbegin() );
+ VERIFY( m.crend() == m.rend() );
+ VERIFY( m.cbegin() != m.cend() );
+ VERIFY( m.crbegin() != m.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc
index 433349434c1..5640653b3e1 100644
--- a/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <map>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/moveable.cc b/libstdc++-v3/testsuite/23_containers/multimap/moveable.cc
new file mode 100644
index 00000000000..f3921a39bb5
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on multimap (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <map>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::multimap<int, int> a,b;
+ a.insert(std::make_pair(2,0));
+ b.insert(std::make_pair(1,0));
+ b = std::move(a);
+ VERIFY(b.find(2) != b.end() && a.find(1) == a.end());
+
+ std::multimap<int, int> c(std::move(b));
+ VERIFY( c.find(2) != c.end());
+ VERIFY( b.find(2) == b.end());
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
index 8ee2f2847d1..b781ca2f947 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/citerators.cc
new file mode 100644
index 00000000000..ec01d38afbf
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/citerators.cc
@@ -0,0 +1,55 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ typedef std::multimap<int, int> mm_type;
+ mm_type mm;
+ mm.insert(mm_type::value_type(1, 1));
+ VERIFY( mm.cbegin() == mm.begin() );
+ VERIFY( mm.cend() == mm.end() );
+ VERIFY( mm.crbegin() == mm.rbegin() );
+ VERIFY( mm.crend() == mm.rend() );
+ VERIFY( mm.cbegin() != mm.cend() );
+ VERIFY( mm.crbegin() != mm.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc
index 86527fd1fb8..2a624a5fce3 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <map>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/moveable.cc b/libstdc++-v3/testsuite/23_containers/multiset/moveable.cc
new file mode 100644
index 00000000000..a326cebb157
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on multiset (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <set>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::multiset<int> a,b;
+ a.insert(2);
+ b.insert(1);
+ b = std::move(a);
+ VERIFY(b.find(2) != b.end() && a.find(1) == a.end());
+
+ std::multiset<int> c(std::move(b));
+ VERIFY( c.find(2) != c.end());
+ VERIFY( b.find(2) == b.end());
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
index ffa386cfeb5..a37a0a1a637 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -126,6 +126,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/citerators.cc
new file mode 100644
index 00000000000..48e3d49bcb8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/citerators.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::multiset<int> ms;
+ ms.insert(1);
+ VERIFY( ms.cbegin() == ms.begin() );
+ VERIFY( ms.cend() == ms.end() );
+ VERIFY( ms.crbegin() == ms.rbegin() );
+ VERIFY( ms.crend() == ms.rend() );
+ VERIFY( ms.cbegin() != ms.cend() );
+ VERIFY( ms.crbegin() != ms.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc
index c1e69b76832..043d760acbe 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <set>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/priority_queue/moveable.cc b/libstdc++-v3/testsuite/23_containers/priority_queue/moveable.cc
new file mode 100644
index 00000000000..bda5a4c1792
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/priority_queue/moveable.cc
@@ -0,0 +1,56 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on vector (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <queue>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::priority_queue<int> a,b;
+ a.push(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b.top() == 1 && a.size() == 0 );
+
+ std::priority_queue<int> c(std::move(b));
+ VERIFY( c.size() == 1 && c.top() == 1 );
+ VERIFY( b.size() == 0 );
+}
+
+int main(void)
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/queue/moveable.cc b/libstdc++-v3/testsuite/23_containers/queue/moveable.cc
new file mode 100644
index 00000000000..6827c48795a
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/queue/moveable.cc
@@ -0,0 +1,56 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on vector (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <queue>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::queue<int> a,b;
+ a.push(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b.front() == 1 && a.size() == 0 );
+
+ std::queue<int> c(std::move(b));
+ VERIFY( c.size() == 1 && c.front() == 1 );
+ VERIFY( b.size() == 0 );
+}
+
+int main(void)
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/moveable.cc b/libstdc++-v3/testsuite/23_containers/set/moveable.cc
new file mode 100644
index 00000000000..8bfc2d27290
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on set (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <set>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::set<int> a,b;
+ a.insert(2);
+ b.insert(1);
+ b = std::move(a);
+ VERIFY(b.find(2) != b.end() && a.find(1) == a.end());
+
+ std::set<int> c(std::move(b));
+ VERIFY( c.find(2) != c.end());
+ VERIFY( b.find(2) == b.end());
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
index fcc311381a1..b0e6dc507e0 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/citerators.cc
new file mode 100644
index 00000000000..3fd624b5208
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/set/requirements/citerators.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::set<int> s;
+ s.insert(1);
+ VERIFY( s.cbegin() == s.begin() );
+ VERIFY( s.cend() == s.end() );
+ VERIFY( s.crbegin() == s.rbegin() );
+ VERIFY( s.crend() == s.rend() );
+ VERIFY( s.cbegin() != s.cend() );
+ VERIFY( s.crbegin() != s.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc
index 44bc5debb51..510e0b3d474 100644
--- a/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <set>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/moveable.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/moveable.cc
new file mode 100644
index 00000000000..4032a74d342
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on map (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <unordered_map>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_map<int, int> a,b;
+ a[2]=0;
+ b[1]=0;
+ b = std::move(a);
+ VERIFY( b.find(2) != b.end() && a.find(1) == a.end() );
+
+ std::unordered_map<int, int> c(std::move(b));
+ VERIFY( c.find(2) != c.end() );
+ VERIFY( b.find(2) == b.end() );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/citerators.cc
new file mode 100644
index 00000000000..a14ad0e4bb3
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/citerators.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <unordered_map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_map<int, int> um;
+ um[1] = 1;
+ VERIFY( um.cbegin() == um.begin() );
+ VERIFY( um.cend() == um.end() );
+ VERIFY( um.cbegin() != um.cend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
new file mode 100644
index 00000000000..a880bdc57a8
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
@@ -0,0 +1,39 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <string>
+#include <debug/unordered_map>
+
+using namespace __gnu_debug;
+
+using std::allocator;
+using std::equal_to;
+using std::hash;
+using std::pair;
+using std::string;
+
+template class unordered_map<string, float>;
+template class unordered_map<string, int,
+ hash<string>, equal_to<string>,
+ allocator<pair<const string, int> > >;
+template class unordered_map<string, float,
+ hash<string>, equal_to<string>,
+ allocator<char> >;
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/moveable.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/moveable.cc
new file mode 100644
index 00000000000..96e420bc5aa
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on multimap (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <unordered_map>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_multimap<int, int> a,b;
+ a.insert(std::make_pair(2,0));
+ b.insert(std::make_pair(1,0));
+ b = std::move(a);
+ VERIFY( b.find(2) != b.end() && a.find(1) == a.end() );
+
+ std::unordered_multimap<int, int> c(std::move(b));
+ VERIFY( c.find(2) != c.end() );
+ VERIFY( b.find(2) == b.end() );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/citerators.cc
new file mode 100644
index 00000000000..9d480726b38
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/citerators.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <unordered_map>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ typedef std::unordered_multimap<int, int> umm_type;
+ umm_type umm;
+ umm.insert(umm_type::value_type(1, 1));
+ VERIFY( umm.cbegin() == umm.begin() );
+ VERIFY( umm.cend() == umm.end() );
+ VERIFY( umm.cbegin() != umm.cend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc
new file mode 100644
index 00000000000..fe2b9af4e13
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/debug.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <string>
+#include <debug/unordered_map>
+
+using namespace __gnu_debug;
+
+using std::string;
+
+template class unordered_multimap<string, float>;
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/moveable.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/moveable.cc
new file mode 100644
index 00000000000..baa35a9653d
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on set (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <unordered_set>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_multiset<int> a,b;
+ a.insert(2);
+ b.insert(1);
+ b = std::move(a);
+ VERIFY( b.find(2) != b.end() && a.find(1) == a.end() );
+
+ std::unordered_multiset<int> c(std::move(b));
+ VERIFY( c.find(2) != c.end() );
+ VERIFY( b.find(2) == b.end() );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/citerators.cc
new file mode 100644
index 00000000000..fd54edc4c95
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/citerators.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <unordered_set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_multiset<int> ums;
+ ums.insert(1);
+ VERIFY( ums.cbegin() == ums.begin() );
+ VERIFY( ums.cend() == ums.end() );
+ VERIFY( ums.cbegin() != ums.cend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc
new file mode 100644
index 00000000000..3d09ef6e551
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/debug.cc
@@ -0,0 +1,27 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <string>
+#include <debug/unordered_set>
+
+using namespace __gnu_debug;
+
+template class unordered_multiset<int>;
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/moveable.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/moveable.cc
new file mode 100644
index 00000000000..a67e9420089
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/moveable.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on set (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <unordered_set>
+#include <utility>
+#include <testsuite_hooks.h>
+
+int main()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_set<int> a,b;
+ a.insert(2);
+ b.insert(1);
+ b = std::move(a);
+ VERIFY( b.find(2) != b.end() && a.find(1) == a.end() );
+
+ std::unordered_set<int> c(std::move(b));
+ VERIFY( c.find(2) != c.end() );
+ VERIFY( b.find(2) == b.end() );
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/citerators.cc
new file mode 100644
index 00000000000..f358a0f3c7b
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/citerators.cc
@@ -0,0 +1,51 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <unordered_set>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::unordered_set<int> us;
+ us.insert(1);
+ VERIFY( us.cbegin() == us.begin() );
+ VERIFY( us.cend() == us.end() );
+ VERIFY( us.cbegin() != us.cend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
new file mode 100644
index 00000000000..2894dff0edb
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
@@ -0,0 +1,26 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#include <debug/unordered_set>
+
+using namespace __gnu_debug;
+
+template class unordered_set<int>;
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
index 7ebec611d72..6d71b23ff30 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
@@ -27,13 +27,22 @@ void test01()
{
bool test __attribute__((unused)) = true;
- std::vector<bool> vb;
+ using std::vector;
+ using std::numeric_limits;
+
+#ifndef _GLIBCXX_DEBUG
+ using std::_S_word_bit;
+#else
+ using std::_GLIBCXX_STD_D::_S_word_bit;
+#endif
// Actually, vector<bool> is special, see libstdc++/31370.
- typedef std::vector<bool>::difference_type difference_type;
+ vector<bool> vb;
+ typedef vector<bool>::difference_type difference_type;
+ typedef vector<bool>::size_type size_type;
VERIFY( vb.max_size()
- == (std::numeric_limits<difference_type>::max()
- - int(std::_S_word_bit) + 1) );
+ == size_type(numeric_limits<difference_type>::max()
+ - int(_S_word_bit) + 1) );
}
int main()
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
index 0c4d0a8c1bd..fbbe7b4f586 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc
@@ -24,6 +24,12 @@
#include <stdexcept>
#include <testsuite_hooks.h>
+#ifndef _GLIBCXX_DEBUG
+ using std::_S_word_bit;
+#else
+ using std::_GLIBCXX_STD_D::_S_word_bit;
+#endif
+
inline void
check_cap_ge_size(const std::vector<bool>& x)
{
@@ -62,7 +68,7 @@ void test01()
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- for(int i = 0; i < std::_S_word_bit; ++i)
+ for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
}
@@ -75,7 +81,7 @@ void test01()
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- x.insert(x.end(), std::_S_word_bit, false);
+ x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
catch(std::bad_alloc&)
@@ -87,7 +93,7 @@ void test01()
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- std::vector<bool> y(std::_S_word_bit, false);
+ std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
}
@@ -101,8 +107,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- for(int i = 0; i < std::_S_word_bit; ++i)
+ x.resize(x.max_size() - _S_word_bit, false);
+ for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
}
@@ -114,8 +120,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- x.insert(x.end(), std::_S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
catch(std::bad_alloc&)
@@ -126,8 +132,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- std::vector<bool> y(std::_S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
}
@@ -141,8 +147,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- for(int i = 0; i < std::_S_word_bit + 1; ++i)
+ x.resize(x.max_size() - _S_word_bit, false);
+ for(int i = 0; i < _S_word_bit + 1; ++i)
x.push_back(false);
++myexit;
}
@@ -156,8 +162,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- x.insert(x.end(), std::_S_word_bit + 1, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ x.insert(x.end(), _S_word_bit + 1, false);
++myexit;
}
catch(std::bad_alloc)
@@ -170,8 +176,8 @@ void test01()
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- std::vector<bool> y(std::_S_word_bit + 1, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ std::vector<bool> y(_S_word_bit + 1, false);
x.insert(x.end(), y.begin(), y.end());
++myexit;
}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/requirements/citerators.cc
new file mode 100644
index 00000000000..a6ebd177a03
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<bool> vb(7);
+ VERIFY( vb.cbegin() == vb.begin() );
+ VERIFY( vb.cend() == vb.end() );
+ VERIFY( vb.crbegin() == vb.rbegin() );
+ VERIFY( vb.crend() == vb.rend() );
+ VERIFY( vb.cbegin() != vb.cend() );
+ VERIFY( vb.crbegin() != vb.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/reserve/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/reserve/moveable.cc
new file mode 100644
index 00000000000..481247f38f7
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/reserve/moveable.cc
@@ -0,0 +1,56 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-28 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace __gnu_test;
+
+ std::vector<copycounter> a(40);
+ copycounter::copycount = 0;
+
+ a.reserve(50);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.reserve(200);
+ VERIFY( copycounter::copycount == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/moveable.cc
new file mode 100644
index 00000000000..688423e39b3
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/cons/moveable.cc
@@ -0,0 +1,64 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <iterator>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+typedef std::vector<rvalstruct> test_type;
+
+// Empty constructor doesn't require a copy constructor
+void
+test01()
+{ test_type d; }
+
+// Constructing from a range that returns rvalue references doesn't
+// require a copy constructor.
+void
+test02(rvalstruct* begin, rvalstruct* end)
+{
+ test_type d(std::make_move_iterator(begin), std::make_move_iterator(end));
+}
+
+// Constructing from a input iterator range that returns rvalue
+// references doesn't require a copy constructor either.
+void
+test03(input_iterator_wrapper<rvalstruct> begin,
+ input_iterator_wrapper<rvalstruct> end)
+{
+ test_type d(std::make_move_iterator(begin), std::make_move_iterator(end));
+}
+
+// Neither does destroying one.
+void
+test04(test_type* d)
+{ delete d; }
diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/moveable.cc
new file mode 100644
index 00000000000..39e1ea26219
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/moveable.cc
@@ -0,0 +1,71 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-28 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace __gnu_test;
+
+ std::vector<copycounter> a(40);
+ copycounter::copycount = 0;
+
+ a.erase(a.begin() + 20);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin());
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.end() - 1);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin() + 10, a.end() - 10);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin(), a.begin() + 5);
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.end() - 5, a.end());
+ VERIFY( copycounter::copycount == 0 );
+
+ a.erase(a.begin(), a.end());
+ VERIFY( copycounter::copycount == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/moveable.cc
new file mode 100644
index 00000000000..15adafc2671
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/moveable.cc
@@ -0,0 +1,146 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+
+// Test vector::push_back makes no unneeded copies.
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<copycounter> a;
+ copycounter c(1);
+ copycounter::copycount = 0;
+ for(int i = 0; i < 10; ++i)
+ a.push_back(c);
+ VERIFY(copycounter::copycount == 10);
+
+ for(int i = 0; i < 100; ++i)
+ a.insert(a.begin() + i, c);
+ VERIFY(copycounter::copycount == 110);
+
+ for(int i = 0; i < 1000; ++i)
+ a.insert(a.end(), c);
+ VERIFY(copycounter::copycount == 1110);
+}
+
+// Test vector::insert(iterator, iterator, iterator) makes no unneeded copies
+// when it has to also reallocate the vector's internal buffer.
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::vector<copycounter> a(10, c), b(100, c);
+ copycounter::copycount = 0;
+ a.insert(a.begin(), b.begin(), b.begin() + 20);
+ VERIFY(copycounter::copycount == 20);
+ a.insert(a.end(), b.begin(), b.begin() + 50);
+ VERIFY(copycounter::copycount == 70);
+ a.insert(a.begin() + 50, b.begin(), b.end());
+ VERIFY(copycounter::copycount == 170);
+}
+
+// Test vector::insert(iterator, iterator, iterator) makes no unneeded copies
+// when it doesn't have to reallocate the vector's internal buffer.
+void
+test03()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::vector<copycounter> a(10, c), b(100, c);
+ copycounter::copycount = 0;
+ a.reserve(1000);
+ VERIFY(copycounter::copycount == 0);
+ a.insert(a.begin(), b.begin(), b.begin() + 20);
+ VERIFY(copycounter::copycount == 20);
+ a.insert(a.end(), b.begin(), b.begin() + 50);
+ VERIFY(copycounter::copycount == 70);
+ a.insert(a.begin() + 50, b.begin(), b.end());
+ VERIFY(copycounter::copycount == 170);
+}
+
+// Test vector::insert(iterator, count, value) makes no unneeded copies
+// when it has to also reallocate the vector's internal buffer.
+void
+test04()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::vector<copycounter> a(10, c);
+ copycounter::copycount = 0;
+ a.insert(a.begin(), 20, c);
+ VERIFY(copycounter::copycount == 20 + 1);
+ a.insert(a.end(), 50, c);
+ VERIFY(copycounter::copycount == 70 + 2);
+ a.insert(a.begin() + 50, 100, c);
+ VERIFY(copycounter::copycount == 170 + 3);
+}
+
+// Test vector::insert(iterator, count, value) makes no unneeded copies
+// when it doesn't have to reallocate the vector's internal buffer.
+void
+test05()
+{
+ bool test __attribute__((unused)) = true;
+
+ copycounter c(1);
+ std::vector<copycounter> a(10, c);
+ copycounter::copycount = 0;
+ a.reserve(1000);
+ a.insert(a.begin(), 20, c);
+ // NOTE : These values are each one higher than might be expected, as
+ // vector::insert(iterator, count, value) copies the value it is given
+ // when it doesn't reallocate the buffer.
+ VERIFY(copycounter::copycount == 20 + 1);
+ a.insert(a.end(), 50, c);
+ VERIFY(copycounter::copycount == 70 + 2);
+ a.insert(a.begin() + 50, 100, c);
+ VERIFY(copycounter::copycount == 170 + 3);
+}
+
+
+
+int main()
+{
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/moveable.cc
new file mode 100644
index 00000000000..df825f3d007
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/moveable.cc
@@ -0,0 +1,71 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on vector (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <vector>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<int> a,b;
+ a.push_back(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b[0] == 1 && a.size() == 0 );
+
+ std::vector<int> c(std::move(b));
+ VERIFY( c.size() == 1 && c[0] == 1 );
+ VERIFY( b.size() == 0 );
+}
+
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<bool> a,b;
+ a.push_back(1);
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b[0] == 1 && a.size() == 0 );
+
+ std::vector<bool> c(std::move(b));
+ VERIFY( c.size() == 1 && c[0] == 1 );
+ VERIFY( b.size() == 0 );
+}
+
+int main(void)
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/citerators.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/citerators.cc
new file mode 100644
index 00000000000..99753389c29
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<int> v(7);
+ VERIFY( v.cbegin() == v.begin() );
+ VERIFY( v.cend() == v.end() );
+ VERIFY( v.crbegin() == v.rbegin() );
+ VERIFY( v.crend() == v.rend() );
+ VERIFY( v.cbegin() != v.cend() );
+ VERIFY( v.crbegin() != v.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
index 609511f07ce..eb6aa1f0b6b 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 847 }
+// { dg-error "no matching" "" { target *-*-* } 992 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
index 12aa0aea695..6e65a5e8092 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 787 }
+// { dg-error "no matching" "" { target *-*-* } 932 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
index 1dd8d305e2e..dce05ed2cf9 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
@@ -1,6 +1,6 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 787 }
+// { dg-error "no matching" "" { target *-*-* } 932 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
index 707776debc9..3df2fc8b745 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
@@ -19,7 +19,7 @@
// USA.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 888 }
+// { dg-error "no matching" "" { target *-*-* } 1033 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc
index 0a48971380e..4bc1c79c066 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/explicit_instantiation/2.cc
@@ -29,6 +29,7 @@
#include <vector>
#include <testsuite_hooks.h>
+#include <testsuite_api.h>
// { dg-do compile }
diff --git a/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc b/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc
new file mode 100644
index 00000000000..f4dbc19da41
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/resize/moveable.cc
@@ -0,0 +1,84 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 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, 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.
+
+#include <vector>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+
+using namespace __gnu_test;
+
+// According to n1771, there should be two resizes, with and without
+// parameter. We only have one at present, whose second parameter defaults
+// to a default-constructed object.
+// Also, the values are one higher than might be expected because internally
+// resize calls fill, which copies its input value in case it is already in
+// the vector when the vector isn't moved.
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<copycounter> a;
+ copycounter::copycount = 0;
+ a.resize(10);
+ a.resize(98);
+ a.resize(99);
+ a.resize(100);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 100 + 4 );
+#else
+ VERIFY( copycounter::copycount == 100 + 4 + 4 );
+#endif
+ a.resize(99);
+ a.resize(0);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 100 + 4 );
+#else
+ VERIFY( copycounter::copycount == 100 + 4 + 6 );
+#endif
+ a.resize(100);
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 200 + 5 );
+#else
+ VERIFY( copycounter::copycount == 200 + 5 + 7 );
+#endif
+ a.clear();
+#ifndef _GLIBCXX_DEBUG
+ VERIFY( copycounter::copycount == 200 + 5 );
+#else
+ VERIFY( copycounter::copycount == 200 + 5 + 7 );
+#endif
+}
+
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/23_containers/vector/zero_sized_allocations.cc b/libstdc++-v3/testsuite/23_containers/vector/zero_sized_allocations.cc
new file mode 100644
index 00000000000..2b312673555
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/vector/zero_sized_allocations.cc
@@ -0,0 +1,77 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+//
+// 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.
+
+#include <vector>
+#include <cstdlib>
+#include <testsuite_hooks.h>
+
+unsigned int zero_sized_news = 0;
+
+void *operator new(size_t size) throw (std::bad_alloc)
+{
+ /* malloc(0) is unpredictable; avoid it. */
+ if (size == 0)
+ {
+ size = 1;
+ ++zero_sized_news;
+ }
+
+ void *p = std::malloc(size);
+
+ if (p == 0)
+ throw std::bad_alloc();
+
+ return p;
+}
+
+void operator delete(void *ptr) throw()
+{
+ if (ptr != 0)
+ std::free(ptr);
+}
+
+// http://gcc.gnu.org/ml/libstdc++/2007-09/msg00006.html
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<std::vector<int> > *v;
+ VERIFY( zero_sized_news == 0 );
+
+ v = new std::vector<std::vector<int> >;
+ VERIFY( zero_sized_news == 0 );
+
+ v->resize(10);
+ delete(v);
+ VERIFY( zero_sized_news == 0 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..e90c083d801
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type adjacent_find(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..5612b7e30a5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type adjacent_find(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search.cc
deleted file mode 100644
index 5854f195065..00000000000
--- a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 25.3.3 [lib.alg.binary.search] Binary search algorithms.
-
-#include <algorithm>
-#include <testsuite_hooks.h>
-
-bool test __attribute__((unused)) = true;
-
-const int A[] = {1, 2, 3, 3, 3, 5, 8};
-const int C[] = {8, 5, 3, 3, 3, 2, 1};
-const int N = sizeof(A) / sizeof(int);
-
-// A comparison, equalivalent to std::greater<int> without the
-// dependency on <functional>.
-
-struct gt
-{
- bool
- operator()(const int& x, const int& y) const
- { return x > y; }
-};
-
-// Each test performs general-case, bookend, not-found condition,
-// and predicate functional checks.
-
-// 25.3.3.1 lower_bound, with and without comparison predicate
-void
-test01()
-{
- using std::lower_bound;
-
- const int first = A[0];
- const int last = A[N - 1];
-
- const int* p = lower_bound(A, A + N, 3);
- VERIFY(p == A + 2);
-
- const int* q = lower_bound(A, A + N, first);
- VERIFY(q == A + 0);
-
- const int* r = lower_bound(A, A + N, last);
- VERIFY(r == A + N - 1);
-
- const int* s = lower_bound(A, A + N, 4);
- VERIFY(s == A + 5);
-
- const int* t = lower_bound(C, C + N, 3, gt());
- VERIFY(t == C + 2);
-
- const int* u = lower_bound(C, C + N, first, gt());
- VERIFY(u == C + N - 1);
-
- const int* v = lower_bound(C, C + N, last, gt());
- VERIFY(v == C + 0);
-
- const int* w = lower_bound(C, C + N, 4, gt());
- VERIFY(w == C + 2);
-}
-
-// 25.3.3.2 upper_bound, with and without comparison predicate
-void
-test02()
-{
- using std::upper_bound;
-
- const int first = A[0];
- const int last = A[N - 1];
-
- const int* p = upper_bound(A, A + N, 3);
- VERIFY(p == A + 5);
-
- const int* q = upper_bound(A, A + N, first);
- VERIFY(q == A + 1);
-
- const int* r = upper_bound(A, A + N, last);
- VERIFY(r == A + N);
-
- const int* s = upper_bound(A, A + N, 4);
- VERIFY(s == A + 5);
-
- const int* t = upper_bound(C, C + N, 3, gt());
- VERIFY(t == C + 5);
-
- const int* u = upper_bound(C, C + N, first, gt());
- VERIFY(u == C + N);
-
- const int* v = upper_bound(C, C + N, last, gt());
- VERIFY(v == C + 1);
-
- const int* w = upper_bound(C, C + N, 4, gt());
- VERIFY(w == C + 2);
-}
-
-// 25.3.3.3 equal_range, with and without comparison predicate
-void
-test03()
-{
- using std::equal_range;
- typedef std::pair<const int*, const int*> Ipair;
-
- const int first = A[0];
- const int last = A[N - 1];
-
- Ipair p = equal_range(A, A + N, 3);
- VERIFY(p.first == A + 2);
- VERIFY(p.second == A + 5);
-
- Ipair q = equal_range(A, A + N, first);
- VERIFY(q.first == A + 0);
- VERIFY(q.second == A + 1);
-
- Ipair r = equal_range(A, A + N, last);
- VERIFY(r.first == A + N - 1);
- VERIFY(r.second == A + N);
-
- Ipair s = equal_range(A, A + N, 4);
- VERIFY(s.first == A + 5);
- VERIFY(s.second == A + 5);
-
- Ipair t = equal_range(C, C + N, 3, gt());
- VERIFY(t.first == C + 2);
- VERIFY(t.second == C + 5);
-
- Ipair u = equal_range(C, C + N, first, gt());
- VERIFY(u.first == C + N - 1);
- VERIFY(u.second == C + N);
-
- Ipair v = equal_range(C, C + N, last, gt());
- VERIFY(v.first == C + 0);
- VERIFY(v.second == C + 1);
-
- Ipair w = equal_range(C, C + N, 4, gt());
- VERIFY(w.first == C + 2);
- VERIFY(w.second == C + 2);
-}
-
-// 25.3.3.4 binary_search, with and without comparison predicate
-void
-test04()
-{
- using std::binary_search;
-
- const int first = A[0];
- const int last = A[N - 1];
-
- VERIFY(binary_search(A, A + N, 5));
- VERIFY(binary_search(A, A + N, first));
- VERIFY(binary_search(A, A + N, last));
- VERIFY(!binary_search(A, A + N, 4));
-
- VERIFY(binary_search(C, C + N, 5, gt()));
- VERIFY(binary_search(C, C + N, first, gt()));
- VERIFY(binary_search(C, C + N, last, gt()));
- VERIFY(!binary_search(C, C + N, 4, gt()));
-}
-
-int
-main()
-{
- test01();
- test02();
- test03();
- test04();
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/2.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/2.cc
new file mode 100644
index 00000000000..24c1d876245
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/2.cc
@@ -0,0 +1,64 @@
+// Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// 25.3.3 [lib.alg.binary.search] Binary search algorithms.
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 3, 3, 5, 8};
+const int C[] = {8, 5, 3, 3, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+
+// A comparison, equalivalent to std::greater<int> without the
+// dependency on <functional>.
+struct gt
+{
+ bool
+ operator()(const int& x, const int& y) const
+ { return x > y; }
+};
+
+// 25.3.3.4 binary_search, with and without comparison predicate
+void
+test04()
+{
+ using std::binary_search;
+
+ const int first = A[0];
+ const int last = A[N - 1];
+
+ VERIFY(binary_search(A, A + N, 5));
+ VERIFY(binary_search(A, A + N, first));
+ VERIFY(binary_search(A, A + N, last));
+ VERIFY(!binary_search(A, A + N, 4));
+
+ VERIFY(binary_search(C, C + N, 5, gt()));
+ VERIFY(binary_search(C, C + N, first, gt()));
+ VERIFY(binary_search(C, C + N, last, gt()));
+ VERIFY(!binary_search(C, C + N, 4, gt()));
+}
+
+int
+main()
+{
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0c9b5db1987
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool binary_search(iterator_type, iterator_type, const value_type&);
+
+ template bool binary_search(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..d8a40b68f22
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool binary_search(iterator_type, iterator_type, const value_type&);
+
+ template bool binary_search(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc b/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc
new file mode 100644
index 00000000000..85bef554dd9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/34595.cc
@@ -0,0 +1,55 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.2.1 [lib.alg.copy] Copy.
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+class Counting_output_iterator
+: public std::iterator< std::output_iterator_tag, void, void, void, void >
+{
+ std::size_t c;
+public:
+ Counting_output_iterator() : c(0) {}
+ Counting_output_iterator& operator++() { return *this; }
+ Counting_output_iterator& operator*() { return *this; }
+
+ template <typename T>
+ void operator=(const T&) { ++c; }
+
+ std::size_t current_counter() const { return c; }
+};
+
+// libstdc++/34595
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int t[10] = {0,};
+ Counting_output_iterator cnt;
+ std::size_t res = std::copy(t+0, t+5, cnt).current_counter();
+
+ VERIFY( res == 5 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc
new file mode 100644
index 00000000000..c8f349435cb
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/move_iterators/1.cc
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#include <algorithm>
+#include <iterator>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::input_iterator_wrapper;
+using __gnu_test::output_iterator_wrapper;
+using __gnu_test::rvalstruct;
+using std::copy;
+
+typedef test_container<rvalstruct, input_iterator_wrapper> container_in;
+typedef test_container<rvalstruct, output_iterator_wrapper> container_out;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ const int size = sizeof(inarray) / sizeof(int);
+
+ rvalstruct in[size], out[size];
+ std::copy(inarray, inarray + size, in);
+
+ container_in incon(in, in + size);
+ container_out outcon(out, out + size);
+
+ copy(std::move_iterator<input_iterator_wrapper<rvalstruct> >(incon.begin()),
+ std::move_iterator<input_iterator_wrapper<rvalstruct> >(incon.end()),
+ outcon.begin());
+ VERIFY( std::equal(out, out + size, inarray) );
+ for (int z = 0; z < size; ++z)
+ VERIFY( out[z].valid );
+ for (int z = 0; z < size; ++z)
+ VERIFY( !in[z].valid );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..e4dc282e577
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type copy(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..f5dda9e3bfd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type copy(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
index 378583ac83c..5e838f324e1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
@@ -24,6 +24,8 @@
#include <cstring>
#include <testsuite_hooks.h>
+// { dg-require-fileio "" }
+
// In the occasion of libstdc++/25482
void test01()
{
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc
new file mode 100644
index 00000000000..e99b9e78f0e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/move_iterators/1.cc
@@ -0,0 +1,68 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#include <algorithm>
+#include <iterator>
+#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;
+using std::copy_backward;
+
+typedef test_container<rvalstruct,
+ bidirectional_iterator_wrapper> container_in;
+typedef test_container<rvalstruct,
+ bidirectional_iterator_wrapper> container_out;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ const int size = sizeof(inarray) / sizeof(int);
+
+ rvalstruct in[size], out[size];
+ std::copy(inarray, inarray + size, in);
+ std::fill(out, out + size, 0);
+
+ container_in incon(in, in + size);
+ container_out outcon(out, out + size);
+
+ copy_backward(std::move_iterator<bidirectional_iterator_wrapper<rvalstruct> >(incon.begin()),
+ std::move_iterator<bidirectional_iterator_wrapper<rvalstruct> >(incon.end()),
+ outcon.end());
+ VERIFY( std::equal(out, out + size, inarray) );
+ for (int z = 0; z < size; ++z)
+ VERIFY( out[z].valid );
+ for (int z = 0; z < size; ++z)
+ VERIFY( !in[z].valid );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..d569a07dc1c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ template iterator_type copy_backward(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..593bf46c147
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ template iterator_type copy_backward(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..604ab5341bf
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef iterator_traits<iterator_type>::difference_type difference_type;
+
+ template difference_type count(iterator_type, iterator_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..90a0133f3b7
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/count/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef iterator_traits<iterator_type>::difference_type difference_type;
+
+ template difference_type count(iterator_type, iterator_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..434a3e822f6
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::iterator_traits<iterator_type>::difference_type difference_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template difference_type count_if(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..9d9ae79745f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::iterator_traits<iterator_type>::difference_type difference_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template difference_type count_if(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/equal.cc b/libstdc++-v3/testsuite/25_algorithms/equal/no_operator_ne.cc
index 285baa6e211..285baa6e211 100644
--- a/libstdc++-v3/testsuite/25_algorithms/equal/equal.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/no_operator_ne.cc
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..ec35b44d69d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ // template void fill_n(iterator_type, size_type, const value_type&);
+ template iterator_type fill_n(iterator_type, size_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..bbadf7e9a32
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/equal/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ // template void fill_n(iterator_type, size_type, const value_type&);
+ template iterator_type fill_n(iterator_type, size_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/2.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/2.cc
new file mode 100644
index 00000000000..12f2b4e499b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/2.cc
@@ -0,0 +1,90 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.3 [lib.alg.binary.search] Binary search algorithms.
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 3, 3, 5, 8};
+const int C[] = {8, 5, 3, 3, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+
+// A comparison, equalivalent to std::greater<int> without the
+// dependency on <functional>.
+struct gt
+{
+ bool
+ operator()(const int& x, const int& y) const
+ { return x > y; }
+};
+
+// Each test performs general-case, bookend, not-found condition,
+// and predicate functional checks.
+
+// 25.3.3.3 equal_range, with and without comparison predicate
+void
+test03()
+{
+ using std::equal_range;
+ typedef std::pair<const int*, const int*> Ipair;
+
+ const int first = A[0];
+ const int last = A[N - 1];
+
+ Ipair p = equal_range(A, A + N, 3);
+ VERIFY(p.first == A + 2);
+ VERIFY(p.second == A + 5);
+
+ Ipair q = equal_range(A, A + N, first);
+ VERIFY(q.first == A + 0);
+ VERIFY(q.second == A + 1);
+
+ Ipair r = equal_range(A, A + N, last);
+ VERIFY(r.first == A + N - 1);
+ VERIFY(r.second == A + N);
+
+ Ipair s = equal_range(A, A + N, 4);
+ VERIFY(s.first == A + 5);
+ VERIFY(s.second == A + 5);
+
+ Ipair t = equal_range(C, C + N, 3, gt());
+ VERIFY(t.first == C + 2);
+ VERIFY(t.second == C + 5);
+
+ Ipair u = equal_range(C, C + N, first, gt());
+ VERIFY(u.first == C + N - 1);
+ VERIFY(u.second == C + N);
+
+ Ipair v = equal_range(C, C + N, last, gt());
+ VERIFY(v.first == C + 0);
+ VERIFY(v.second == C + 1);
+
+ Ipair w = equal_range(C, C + N, 4, gt());
+ VERIFY(w.first == C + 2);
+ VERIFY(w.second == C + 2);
+}
+
+int
+main()
+{
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..88cd1811a56
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,51 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pair<iterator_type, iterator_type> pair_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair_type equal_range(iterator_type, iterator_type,
+ const value_type&);
+
+ template pair_type equal_range(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..709b3125669
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,50 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pair<iterator_type, iterator_type> pair_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair_type equal_range(iterator_type, iterator_type,
+ const value_type&);
+
+ template pair_type equal_range(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..4b5b8725680
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template void fill(iterator_type, iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..c3650b94354
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/fill/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template void fill(iterator_type, iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..ec35b44d69d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ // template void fill_n(iterator_type, size_type, const value_type&);
+ template iterator_type fill_n(iterator_type, size_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..bbadf7e9a32
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+
+ // template void fill_n(iterator_type, size_type, const value_type&);
+ template iterator_type fill_n(iterator_type, size_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
index 682c515683e..4e815426c3c 100644
--- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc
@@ -23,6 +23,8 @@
#include <algorithm>
#include <testsuite_hooks.h>
+// { dg-require-fileio "" }
+
// In the occasion of libstdc++/25482
void test01()
{
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b7d7e65645f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type find(iterator_type, iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..07d8069efdc
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type find(iterator_type, iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8e4c3e6dc70
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type find_end(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type find_end(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..ed7ea1760af
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type find_end(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type find_end(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..c675764085e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type find_first_of(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type find_first_of(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..bdaaeff1470
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type find_first_of(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type find_first_of(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..5ad6189c573
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type find_if(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..ed4aa30707d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type find_if(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..803074ceda0
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, void> function_type;
+
+ template function_type for_each(iterator_type, iterator_type,
+ function_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..b38dc0bca83
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, void> function_type;
+
+ template function_type for_each(iterator_type, iterator_type,
+ function_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0fb3707f139
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+ using __gnu_test::void_function;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef void_function<value_type> generator_type;
+
+ template void generate(iterator_type, iterator_type, generator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..62d2a511c26
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/generate/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+ using __gnu_test::void_function;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef void_function<value_type> generator_type;
+
+ template void generate(iterator_type, iterator_type, generator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..2cc64b72fdd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+ using __gnu_test::void_function;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+ typedef void_function<value_type> generator_type;
+
+ template iterator_type generate_n(iterator_type, size_type, generator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..b8da1e9306a
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+ using __gnu_test::void_function;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef unsigned short size_type;
+ typedef void_function<value_type> generator_type;
+
+ template iterator_type generate_n(iterator_type, size_type, generator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/algorithm_parallel_mode.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/algorithm_parallel_mode.cc
new file mode 100644
index 00000000000..c2e56c2bd35
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/algorithm_parallel_mode.cc
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-D_GLIBCXX_PARALLEL -fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc
new file mode 100644
index 00000000000..90e02796263
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <parallel/algorithm>
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed1.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed1.cc
new file mode 100644
index 00000000000..c6c4ce2ff43
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed1.cc
@@ -0,0 +1,37 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <parallel/algorithm>
+#include <vector>
+#include <algorithm>
+
+void test()
+{
+ typedef unsigned short value_type;
+ typedef std::vector<value_type> vector_type;
+
+ const value_type c(0);
+
+ vector_type v(10);
+ std::find(v.begin(), v.end(), c);
+ __gnu_parallel::find(v.begin(), v.end(), c);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc
new file mode 100644
index 00000000000..94794d46c9f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/parallel_algorithm_mixed2.cc
@@ -0,0 +1,42 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Make sure to test without _GLIBCXX_PARALLEL
+#ifdef _GLIBCXX_PARALLEL
+# undef _GLIBCXX_PARALLEL
+#endif
+
+#include <parallel/algorithm>
+#include <vector>
+#include <algorithm>
+
+void test()
+{
+ typedef unsigned short value_type;
+ typedef std::vector<value_type> vector_type;
+
+ const value_type c(0);
+
+ vector_type v(10);
+ std::find(v.begin(), v.end(), c);
+ __gnu_parallel::find(v.begin(), v.end(), c);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
index 032fa31efec..4939ebf0bd1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
@@ -20,385 +20,494 @@
#include <algorithm>
-namespace std {
+namespace std
+ {
// 25.1, non-modifying sequence operations:
- template<class InputIterator, class Function>
- Function for_each(InputIterator first, InputIterator last, Function f);
- template<class InputIterator, class T>
- InputIterator find(InputIterator first, InputIterator last,
- const T& value);
- template<class InputIterator, class Predicate>
- InputIterator find_if(InputIterator first, InputIterator last,
- Predicate pred);
- template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1
- find_end(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
- template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1
- find_end(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
- template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
- template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1
- find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-
-template<class ForwardIterator>
- ForwardIterator adjacent_find(ForwardIterator first,
- ForwardIterator last);
-
-template<class ForwardIterator, class BinaryPredicate>
- ForwardIterator adjacent_find(ForwardIterator first,
- ForwardIterator last, BinaryPredicate pred);
-
-template<class InputIterator, class T>
- typename iterator_traits<InputIterator>::difference_type
- count(InputIterator first, InputIterator last, const T& value);
-
-template<class InputIterator, class Predicate>
- typename iterator_traits<InputIterator>::difference_type
- count_if(InputIterator first, InputIterator last, Predicate pred);
-template<class InputIterator1, class InputIterator2>
- pair<InputIterator1, InputIterator2>
- mismatch(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
-template
- <class InputIterator1, class InputIterator2, class BinaryPredicate>
- pair<InputIterator1, InputIterator2>
- mismatch(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
-template<class InputIterator1, class InputIterator2>
- bool equal(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2);
-template
- <class InputIterator1, class InputIterator2, class BinaryPredicate>
- bool equal(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, BinaryPredicate pred);
-
-template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator1 search
- (ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2);
-
-template<class ForwardIterator1, class ForwardIterator2,
- class BinaryPredicate>
- ForwardIterator1 search
- (ForwardIterator1 first1, ForwardIterator1 last1,
- ForwardIterator2 first2, ForwardIterator2 last2,
- BinaryPredicate pred);
-
-template<class ForwardIterator, class Size, class T>
- ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
- Size count, const T& value);
-
-template <class ForwardIterator, class Size, class T, class BinaryPredicate>
- ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
- Size count, const T& value,
- BinaryPredicate pred);
-
-// 25.2, modifying sequence operations:
-// 25.2.1, copy:
-template<class InputIterator, class OutputIterator>
- OutputIterator copy(InputIterator first, InputIterator last,
- OutputIterator result);
-template<class BidirectionalIterator1, class BidirectionalIterator2>
- BidirectionalIterator2
- copy_backward
- (BidirectionalIterator1 first, BidirectionalIterator1 last,
- BidirectionalIterator2 result);
-// 25.2.2, swap:
-template<class T> void swap(T& a, T& b);
-template<class ForwardIterator1, class ForwardIterator2>
- ForwardIterator2 swap_ranges(ForwardIterator1 first1,
- ForwardIterator1 last1, ForwardIterator2 first2);
-template<class ForwardIterator1, class ForwardIterator2>
- void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
-template<class InputIterator, class OutputIterator, class UnaryOperation>
- OutputIterator transform(InputIterator first, InputIterator last,
- OutputIterator result, UnaryOperation op);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class BinaryOperation>
- OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, OutputIterator result,
- BinaryOperation binary_op);
-template<class ForwardIterator, class T>
- void replace(ForwardIterator first, ForwardIterator last,
- const T& old_value, const T& new_value);
-template<class ForwardIterator, class Predicate, class T>
- void replace_if(ForwardIterator first, ForwardIterator last,
- Predicate pred, const T& new_value);
-template<class InputIterator, class OutputIterator, class T>
- OutputIterator replace_copy(InputIterator first, InputIterator last,
- OutputIterator result,
- const T& old_value, const T& new_value);
-template<class Iterator, class OutputIterator, class Predicate, class T>
- OutputIterator replace_copy_if(Iterator first, Iterator last,
- OutputIterator result,
- Predicate pred, const T& new_value);
-template<class ForwardIterator, class T>
- void fill(ForwardIterator first, ForwardIterator last, const T& value);
-template<class OutputIterator, class Size, class T>
- void fill_n(OutputIterator first, Size n, const T& value);
-template<class ForwardIterator, class Generator>
- void generate(ForwardIterator first, ForwardIterator last,
- Generator gen);
-template<class OutputIterator, class Size, class Generator>
- void generate_n(OutputIterator first, Size n, Generator gen);
-
-template<class ForwardIterator, class T>
- ForwardIterator remove(ForwardIterator first, ForwardIterator last,
- const T& value);
-template<class ForwardIterator, class Predicate>
- ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
- Predicate pred);
-template<class InputIterator, class OutputIterator, class T>
- OutputIterator remove_copy(InputIterator first, InputIterator last,
- OutputIterator result, const T& value);
-template<class InputIterator, class OutputIterator, class Predicate>
- OutputIterator remove_copy_if(InputIterator first, InputIterator last,
- OutputIterator result, Predicate pred);
-template<class ForwardIterator>
- ForwardIterator unique(ForwardIterator first, ForwardIterator last);
-template<class ForwardIterator, class BinaryPredicate>
- ForwardIterator unique(ForwardIterator first, ForwardIterator last,
- BinaryPredicate pred);
-template<class InputIterator, class OutputIterator>
- OutputIterator unique_copy(InputIterator first, InputIterator last,
- OutputIterator result);
-template<class InputIterator, class OutputIterator, class BinaryPredicate>
- OutputIterator unique_copy(InputIterator first, InputIterator last,
- OutputIterator result, BinaryPredicate pred);
-template<class BidirectionalIterator>
- void reverse(BidirectionalIterator first, BidirectionalIterator last);
-template<class BidirectionalIterator, class OutputIterator>
- OutputIterator reverse_copy(BidirectionalIterator first,
- BidirectionalIterator last,
- OutputIterator result);
-template<class ForwardIterator>
- void rotate(ForwardIterator first, ForwardIterator middle,
- ForwardIterator last);
-template<class ForwardIterator, class OutputIterator>
- OutputIterator rotate_copy
- (ForwardIterator first, ForwardIterator middle,
- ForwardIterator last, OutputIterator result);
-template<class RandomAccessIterator>
- void random_shuffle(RandomAccessIterator first,
- RandomAccessIterator last);
-template<class RandomAccessIterator, class RandomNumberGenerator>
- void random_shuffle(RandomAccessIterator first,
- RandomAccessIterator last,
- RandomNumberGenerator& rand);
-// 25.2.12, partitions:
-template<class BidirectionalIterator, class Predicate>
- BidirectionalIterator partition(BidirectionalIterator first,
- BidirectionalIterator last,
- Predicate pred);
-template<class BidirectionalIterator, class Predicate>
- BidirectionalIterator stable_partition(BidirectionalIterator first,
- BidirectionalIterator last,
- Predicate pred);
-// 25.3, sorting and related operations:
-// 25.3.1, sorting:
-template<class RandomAccessIterator>
- void sort(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void sort(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-template<class RandomAccessIterator>
- void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-template<class RandomAccessIterator>
- void partial_sort(RandomAccessIterator first,
- RandomAccessIterator middle,
- RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void partial_sort(RandomAccessIterator first,
- RandomAccessIterator middle,
- RandomAccessIterator last, Compare comp);
-template<class InputIterator, class RandomAccessIterator>
- RandomAccessIterator
- partial_sort_copy(InputIterator first, InputIterator last,
- RandomAccessIterator result_first,
- RandomAccessIterator result_last);
-template<class InputIterator, class RandomAccessIterator, class Compare>
- RandomAccessIterator
- partial_sort_copy(InputIterator first, InputIterator last,
- RandomAccessIterator result_first,
- RandomAccessIterator result_last,
- Compare comp);
-template<class RandomAccessIterator>
- void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
- RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
- RandomAccessIterator last, Compare comp);
-// 25.3.3, binary search:
-template<class ForwardIterator, class T>
- ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
- const T& value);
-template<class ForwardIterator, class T, class Compare>
- ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-template<class ForwardIterator, class T>
- ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
- const T& value);
-template<class ForwardIterator, class T, class Compare>
- ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-template<class ForwardIterator, class T>
- pair<ForwardIterator, ForwardIterator>
- equal_range(ForwardIterator first, ForwardIterator last,
- const T& value);
-template<class ForwardIterator, class T, class Compare>
- pair<ForwardIterator, ForwardIterator>
- equal_range(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-template<class ForwardIterator, class T>
- bool binary_search(ForwardIterator first, ForwardIterator last,
- const T& value);
-template<class ForwardIterator, class T, class Compare>
- bool binary_search(ForwardIterator first, ForwardIterator last,
- const T& value, Compare comp);
-// 25.3.4, merge:
-template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-template<class BidirectionalIterator>
- void inplace_merge(BidirectionalIterator first,
- BidirectionalIterator middle,
- BidirectionalIterator last);
-template<class BidirectionalIterator, class Compare>
- void inplace_merge(BidirectionalIterator first,
- BidirectionalIterator middle,
- BidirectionalIterator last, Compare comp);
-// 25.3.5, set operations:
-template<class InputIterator1, class InputIterator2>
- bool includes(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
-template<class InputIterator1, class InputIterator2, class Compare>
- bool includes
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2, Compare comp);
-template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_intersection
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_intersection
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator set_difference
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator set_difference
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-template<class InputIterator1, class InputIterator2, class OutputIterator>
- OutputIterator
- set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result);
-template<class InputIterator1, class InputIterator2, class OutputIterator,
- class Compare>
- OutputIterator
- set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- OutputIterator result, Compare comp);
-// 25.3.6, heap operations:
-template<class RandomAccessIterator>
- void push_heap(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void push_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-template<class RandomAccessIterator>
- void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-template<class RandomAccessIterator>
- void make_heap(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void make_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
-template<class RandomAccessIterator>
- void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
-template<class RandomAccessIterator, class Compare>
- void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
- Compare comp);
+ template<typename _IIter, typename _Funct>
+ _Funct
+ for_each(_IIter, _IIter, _Funct);
+
+ template<typename _IIter, typename _Tp>
+ _IIter
+ find(_IIter, _IIter, const _Tp&);
+
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if(_IIter, _IIter, _Predicate);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _FIter>
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ adjacent_find(_FIter, _FIter, _BinaryPredicate);
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&);
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ equal(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _FIter, typename _Size, typename _Tp>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&);
+
+ template<typename _FIter, typename _Size, typename _Tp,
+ typename _BinaryPredicate>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
+
+ // 25.2, modifying sequence operations:
+ // 25.2.1, copy:
+ template<typename _IIter, typename _OIter>
+ _OIter
+ copy(_IIter, _IIter, _OIter);
+
+ template<typename _BIter1, typename _BIter2>
+ _BIter2
+ copy_backward (_BIter1, _BIter1, _BIter2);
+
+ // 25.2.2, swap:
+ template<typename _Tp>
+ void
+ swap(_Tp&, _Tp& b);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter2
+ swap_ranges(_FIter1 first1, _FIter1, _FIter2);
+
+ template<typename _FIter1, typename _FIter2>
+ void
+ iter_swap(_FIter1, _FIter2 b);
+
+ template<typename _IIter, typename _OIter, typename _UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, _UnaryOperation op);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BinaryOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&);
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&);
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
+
+ template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
+ _OIter
+ replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
+
+ template<typename _FIter, typename _Tp>
+ void
+ fill(_FIter, _FIter, const _Tp&);
+
+ template<typename _OIter, typename _Size, typename _Tp>
+ void
+ fill_n(_OIter, _Size n, const _Tp&);
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator);
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ void
+ generate_n(_OIter, _Size, _Generator);
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ remove(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Predicate>
+ _FIter
+ remove_if(_FIter, _FIter, _Predicate);
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ remove_copy(_IIter, _IIter, _OIter, const _Tp&);
+
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+ template<typename _FIter>
+ _FIter
+ unique(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ unique(_FIter, _FIter, _BinaryPredicate);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter);
+
+ template<typename _IIter, typename _OIter, typename _BinaryPredicate>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
+
+ template<typename _BIter>
+ void
+ reverse(_BIter, _BIter);
+
+ template<typename _BIter, typename _OIter>
+ _OIter
+ reverse_copy(_BIter, _BIter, _OIter);
+
+ template<typename _FIter>
+ void
+ rotate(_FIter, _FIter, _FIter);
+
+ template<typename _FIter, typename _OIter>
+ _OIter
+ rotate_copy (_FIter, _FIter, _FIter, _OIter);
+
+ template<typename _RAIter>
+ void
+ random_shuffle(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Generator>
+ void
+ random_shuffle(_RAIter, _RAIter, _Generator&);
+
+ // 25.2.12, partitions:
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ partition(_BIter, _BIter, _Predicate);
+
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ stable_partition(_BIter, _BIter, _Predicate);
+
+ // 25.3, sorting and related operations:
+ // 25.3.1, sorting:
+ template<typename _RAIter>
+ void
+ sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ stable_sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ stable_sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _IIter, typename _RAIter>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
+
+ template<typename _IIter, typename _RAIter, typename _Compare>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, _Compare);
+
+ // 25.3.3, binary search:
+ template<typename _FIter, typename _Tp>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _FIter, typename _Tp>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _FIter, typename _Tp>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&, _Compare);
+
+ // 25.3.4, merge:
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _BIter>
+ void
+ inplace_merge(_BIter, _BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ void
+ inplace_merge(_BIter, _BIter, _BIter, _Compare);
+
+ // 25.3.5, set operations:
+ template<typename _IIter1, typename _IIter2>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
+ _OIter, _Compare);
+
+ // 25.3.6, heap operations:
+ template<typename _RAIter>
+ void
+ push_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ push_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ pop_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ pop_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ make_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ make_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ sort_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort_heap(_RAIter, _RAIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _RAIter>
+ bool
+ is_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ bool
+ is_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter, _Compare);
+
+ template<typename _FIter>
+ bool
+ is_sorted(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ bool
+ is_sorted(_FIter, _FIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ is_sorted_until(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ is_sorted_until(_FIter, _FIter, _Compare);
+#endif
// 25.3.7, minimum and maximum:
- template<class T> const T& min(const T& a, const T& b);
- template<class T, class Compare>
- const T& min(const T& a, const T& b, Compare comp);
- template<class T> const T& max(const T& a, const T& b);
- template<class T, class Compare>
- const T& max(const T& a, const T& b, Compare comp);
- template<class ForwardIterator>
- ForwardIterator min_element
- (ForwardIterator first, ForwardIterator last);
- template<class ForwardIterator, class Compare>
- ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
- Compare comp);
- template<class ForwardIterator>
- ForwardIterator max_element
- (ForwardIterator first, ForwardIterator last);
- template<class ForwardIterator, class Compare>
- ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
- Compare comp);
- template<class InputIterator1, class InputIterator2>
- bool lexicographical_compare
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2);
- template<class InputIterator1, class InputIterator2, class Compare>
- bool lexicographical_compare
- (InputIterator1 first1, InputIterator1 last1,
- InputIterator2 first2, InputIterator2 last2,
- Compare comp);
+ template<typename _Tp>
+ const _Tp&
+ min(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ min(const _Tp&, const _Tp&, _Compare);
+
+ template<typename _Tp>
+ const _Tp&
+ max(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ max(const _Tp&, const _Tp&, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&, _Compare);
+
+ template<typename _FIter>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter, _Compare);
+#endif
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
// 25.3.9, permutations
- template<class BidirectionalIterator>
- bool next_permutation(BidirectionalIterator first,
- BidirectionalIterator last);
- template<class BidirectionalIterator, class Compare>
- bool next_permutation(BidirectionalIterator first,
- BidirectionalIterator last, Compare comp);
- template<class BidirectionalIterator>
- bool prev_permutation(BidirectionalIterator first,
- BidirectionalIterator last);
- template<class BidirectionalIterator, class Compare>
- bool prev_permutation(BidirectionalIterator first,
- BidirectionalIterator last, Compare comp);
+ template<typename _BIter>
+ bool
+ next_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ next_permutation(_BIter, _BIter, _Compare);
+
+ template<typename _BIter>
+ bool
+ prev_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ prev_permutation(_BIter, _BIter, _Compare);
}
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/heap.cc b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc
index 571a2936ed2..571a2936ed2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/heap.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/1.cc
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
new file mode 100644
index 00000000000..ee04793e66e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
@@ -0,0 +1,141 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.3.6 Heap operations [lib.alg.heap.operations]
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#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;
+typedef test_container<int, random_access_iterator_wrapper> container_ref;
+
+bool test __attribute__((unused)) = true;
+
+void
+check_make(int* array, int length)
+{
+ rvalstruct makeheap[9];
+ int makeheap_ref[9];
+ std::copy(array, array + length, makeheap);
+ std::copy(array, array + length, makeheap_ref);
+ container makecon(makeheap, makeheap + length);
+ container_ref makecon_ref(makeheap_ref, makeheap_ref + length);
+ std::make_heap(makecon.begin(), makecon.end());
+ std::make_heap(makecon_ref.begin(), makecon_ref.end());
+ for (int z = 0; z < length; ++z)
+ VERIFY( makeheap[z] == makeheap_ref[z] );
+ VERIFY( std::__is_heap(makecon.begin(), makecon.end()) );
+ for (int z = 0; z < length; ++z)
+ VERIFY( makeheap[z].valid );
+}
+
+void
+check_pop(int* array, int length)
+{
+ rvalstruct popheap[9];
+ int popheap_ref[9];
+ std::copy(array, array + length, popheap);
+ std::copy(array, array + length, popheap_ref);
+ container popcon(popheap, popheap + length);
+ container_ref popcon_ref(popheap_ref, popheap_ref + length);
+ std::pop_heap(popcon.begin(), popcon.end());
+ std::pop_heap(popcon_ref.begin(), popcon_ref.end());
+ for (int z = 0; z < length; ++z)
+ VERIFY( popheap[z] == popheap_ref[z] );
+ VERIFY( (std::__is_heap(popheap, popheap + length - 1)) );
+ for (int z = 0; z < length; ++z)
+ VERIFY( popheap[z].val <= popheap[length-1].val && popheap[z].valid );
+}
+
+void
+check_sort(int* array, int length)
+{
+ rvalstruct sortheap[9];
+ int sortheap_ref[9];
+ std::copy(array, array + length, sortheap);
+ std::copy(array, array + length, sortheap_ref);
+ container sortcon(sortheap, sortheap + length);
+ container_ref sortcon_ref(sortheap_ref, sortheap_ref + length);
+ std::sort_heap(sortcon.begin(), sortcon.end());
+ std::sort_heap(sortcon_ref.begin(), sortcon_ref.end());
+ for (int z = 0; z < length; ++z)
+ VERIFY( sortheap[z] == sortheap_ref[z] );
+ for (int z = 0; z < length - 1; ++z)
+ VERIFY( sortheap[z].val <= sortheap[z + 1].val && sortheap[z].valid );
+ VERIFY( sortheap[length - 1].valid );
+}
+
+void
+check_push(int* array, int pushval, int length)
+{
+ rvalstruct pushheap[10];
+ int pushheap_ref[10];
+ std::copy(array, array + length, pushheap);
+ std::copy(array, array + length, pushheap_ref);
+ pushheap[length] = pushval;
+ pushheap_ref[length] = pushval;
+ container pushcon(pushheap, pushheap + length + 1);
+ container_ref pushcon_ref(pushheap_ref, pushheap_ref + length + 1);
+ std::push_heap(pushcon.begin(), pushcon.end());
+ std::push_heap(pushcon_ref.begin(), pushcon_ref.end());
+ for (int z = 0; z < length + 1; ++z)
+ VERIFY( pushheap[z] == pushheap_ref[z] );
+ VERIFY( std::__is_heap(pushheap, pushheap + length + 1) );
+ for (int z = 0; z < length + 1; ++z)
+ VERIFY( pushheap[z].valid );
+}
+
+void
+test01()
+{
+ int array[9];
+ for (int i = 1; i < 9; ++i)
+ {
+ for(int z = 0; z < i; ++z)
+ array[z] = z;
+ while (std::next_permutation(array, array + i))
+ {
+ check_make(array, i);
+ if (std::__is_heap(array, array + i))
+ {
+ check_pop(array, i);
+ check_sort(array, i);
+ for (int pushval = -1; pushval <= i; ++pushval)
+ check_push(array, pushval, i);
+ }
+ }
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..e4dbe43aa8c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool includes(iterator_type, iterator_type, iterator_type,
+ iterator_type);
+
+ template bool includes(iterator_type, iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..1319637850e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/includes/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool includes(iterator_type, iterator_type, iterator_type,
+ iterator_type);
+
+ template bool includes(iterator_type, iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..c71c3e221b5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void inplace_merge(iterator_type, iterator_type, iterator_type);
+
+ template void inplace_merge(iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..305f448ae22
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/inplace_merge/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void inplace_merge(iterator_type, iterator_type, iterator_type);
+
+ template void inplace_merge(iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc
new file mode 100644
index 00000000000..da4f529af96
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/1.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.6 Heap operations [lib.alg.heap.operations]
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+int A[] = {9, 8, 6, 7, 7, 5, 5, 3, 6, 4, 1, 2, 3, 4};
+int B[] = {1, 3, 2, 4, 4, 6, 3, 5, 5, 7, 7, 6, 8, 9};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ for (int i = 0; i <= N; ++i)
+ {
+ VERIFY( std::is_heap(A, A + i) );
+ VERIFY( std::is_heap(A, A + i, std::less<int>()) );
+ VERIFY( std::is_heap(B, B + i, std::greater<int>()) );
+ VERIFY( (i < 2) || !std::is_heap(B, B + i) );
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8e4b42f6152
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool is_heap(iterator_type, iterator_type);
+ template bool is_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..04f5c7dc62e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool is_heap(iterator_type, iterator_type);
+ template bool is_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc
new file mode 100644
index 00000000000..3b821cfb332
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/1.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.6 Heap operations [lib.alg.heap.operations]
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+int A[] = {9, 8, 6, 7, 7, 5, 5, 3, 6, 4, 1, 2, 3, 4};
+int B[] = {1, 3, 2, 4, 4, 6, 3, 5, 5, 7, 7, 6, 8, 9};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ for (int i = 0; i <= N; ++i)
+ {
+ VERIFY( A + i == std::is_heap_until(A, A + i) );
+ VERIFY( A + i == std::is_heap_until(A, A + i, std::less<int>()) );
+ VERIFY( B + i == std::is_heap_until(B, B + i, std::greater<int>()) );
+ VERIFY( B + (i < 2 ? i : 1) == std::is_heap_until(B, B + i) );
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..c96e766cd40
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type is_heap_until(iterator_type, iterator_type);
+ template iterator_type is_heap_until(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..326f89a1ee4
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-12 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type is_heap_until(iterator_type, iterator_type);
+ template iterator_type is_heap_until(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc
new file mode 100644
index 00000000000..840597ba318
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/1.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.6 Heap operations [lib.alg.heap.operations]
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+int A[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+int B[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ for (int i = 0; i <= N; ++i)
+ {
+ VERIFY( std::is_sorted(A, A + i) );
+ VERIFY( std::is_sorted(A, A + i, std::less<int>()) );
+ VERIFY( std::is_sorted(B, B + i, std::greater<int>()) );
+ VERIFY( (i < 2) || !std::is_sorted(B, B + i) );
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..40052015db5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool is_sorted(iterator_type, iterator_type);
+ template bool is_sorted(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..9a2e5560790
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool is_sorted(iterator_type, iterator_type);
+ template bool is_sorted(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc
new file mode 100644
index 00000000000..7be31eedecd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/1.cc
@@ -0,0 +1,52 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.6 Heap operations [lib.alg.heap.operations]
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+int A[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+int B[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ for (int i = 0; i <= N; ++i)
+ {
+ VERIFY( A + i == std::is_sorted_until(A, A + i) );
+ VERIFY( A + i == std::is_sorted_until(A, A + i, std::less<int>()) );
+ VERIFY( B + i == std::is_sorted_until(B, B + i, std::greater<int>()) );
+ VERIFY( B + (i < 2 ? i : 1) == std::is_sorted_until(B, B + i) );
+ }
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..f13f7b008b0
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type is_sorted_until(iterator_type, iterator_type);
+ template iterator_type is_sorted_until(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..d6a473f34fc
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-14 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type is_sorted_until(iterator_type, iterator_type);
+ template iterator_type is_sorted_until(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..9f8f9829e54
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template void iter_swap(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..070df5142ab
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template void iter_swap(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..c2c4deed40d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool lexicographical_compare(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template bool lexicographical_compare(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..69598b807fe
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool lexicographical_compare(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template bool lexicographical_compare(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/2.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/2.cc
new file mode 100644
index 00000000000..2d1c911d472
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/2.cc
@@ -0,0 +1,81 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.3 [lib.alg.binary.search] Binary search algorithms.
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 3, 3, 5, 8};
+const int C[] = {8, 5, 3, 3, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+
+// A comparison, equalivalent to std::greater<int> without the
+// dependency on <functional>.
+struct gt
+{
+ bool
+ operator()(const int& x, const int& y) const
+ { return x > y; }
+};
+
+// Each test performs general-case, bookend, not-found condition,
+// and predicate functional checks.
+
+// 25.3.3.1 lower_bound, with and without comparison predicate
+void
+test01()
+{
+ using std::lower_bound;
+
+ const int first = A[0];
+ const int last = A[N - 1];
+
+ const int* p = lower_bound(A, A + N, 3);
+ VERIFY(p == A + 2);
+
+ const int* q = lower_bound(A, A + N, first);
+ VERIFY(q == A + 0);
+
+ const int* r = lower_bound(A, A + N, last);
+ VERIFY(r == A + N - 1);
+
+ const int* s = lower_bound(A, A + N, 4);
+ VERIFY(s == A + 5);
+
+ const int* t = lower_bound(C, C + N, 3, gt());
+ VERIFY(t == C + 2);
+
+ const int* u = lower_bound(C, C + N, first, gt());
+ VERIFY(u == C + N - 1);
+
+ const int* v = lower_bound(C, C + N, last, gt());
+ VERIFY(v == C + 0);
+
+ const int* w = lower_bound(C, C + N, 4, gt());
+ VERIFY(w == C + 2);
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/33613.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/33613.cc
new file mode 100644
index 00000000000..189464cb8d4
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/33613.cc
@@ -0,0 +1,36 @@
+// 2007-10-02 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/33613
+
+#include <algorithm>
+
+struct A { };
+struct B { };
+
+bool ab(A, B);
+
+void test01(A* a, B b)
+{
+ std::lower_bound(a, a, b, ab);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/lower_bound.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc
index b132cddfe76..b132cddfe76 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/lower_bound.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b4ba007c58c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type lower_bound(iterator_type, iterator_type,
+ const value_type&);
+
+ template iterator_type lower_bound(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..a3b68072740
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type lower_bound(iterator_type, iterator_type,
+ const value_type&);
+
+ template iterator_type lower_bound(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..6cec88af906
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void make_heap(iterator_type, iterator_type);
+ template void make_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..db682dee28e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void make_heap(iterator_type, iterator_type);
+ template void make_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max/1.cc b/libstdc++-v3/testsuite/25_algorithms/max/1.cc
new file mode 100644
index 00000000000..78db439ae36
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max/1.cc
@@ -0,0 +1,44 @@
+// 2000-03-29 sss/bkoz
+
+// Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int& x = std::max(1, 2);
+ const int& y = std::max(4, 3);
+ VERIFY( x == 2 );
+ VERIFY( y == 4 );
+
+ const int& xc = std::max(1, 2, std::greater<int>());
+ const int& yc = std::max(4, 3, std::greater<int>());
+ VERIFY( xc == 1 );
+ VERIFY( yc == 3 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max/2.cc b/libstdc++-v3/testsuite/25_algorithms/max/2.cc
new file mode 100644
index 00000000000..2be6b8f6f86
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max/2.cc
@@ -0,0 +1,78 @@
+// 2000-03-29 sss/bkoz
+
+// Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ struct A { static const T a; };
+
+template<typename T>
+const T A<T>::a = T(3);
+
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ VERIFY( 3 == std::max(A<int>::a, 2) );
+ VERIFY( 4 == std::max(A<int>::a, 4) );
+
+ VERIFY( 3u == std::max(A<unsigned int>::a, 2u) );
+ VERIFY( 4u == std::max(A<unsigned int>::a, 4u) );
+
+ VERIFY( 3l == std::max(A<long>::a, 2l) );
+ VERIFY( 4l == std::max(A<long>::a, 4l) );
+
+ VERIFY( 3ul == std::max(A<unsigned long>::a, 2ul) );
+ VERIFY( 4ul == std::max(A<unsigned long>::a, 4ul) );
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ VERIFY( 3ll == std::max(A<long long>::a, 2ll) );
+ VERIFY( 4ll == std::max(A<long long>::a, 4ll) );
+
+ VERIFY( 3ull == std::max(A<unsigned long long>::a, 2ull) );
+ VERIFY( 4ull == std::max(A<unsigned long long>::a, 4ull) );
+#endif
+
+ VERIFY( short(3) == std::max(A<short>::a, short(2)) );
+ VERIFY( short(4) == std::max(A<short>::a, short(4)) );
+
+ VERIFY( (unsigned short)3 == std::max(A<unsigned short>::a, (unsigned short)2) );
+ VERIFY( (unsigned short)4 == std::max(A<unsigned short>::a, (unsigned short)4) );
+
+ VERIFY( (char)3 == std::max(A<char>::a, (char)2) );
+ VERIFY( (char)4 == std::max(A<char>::a, (char)4) );
+
+ VERIFY( (signed char)3 == std::max(A<signed char>::a, (signed char)2) );
+ VERIFY( (signed char)4 == std::max(A<signed char>::a, (signed char)4) );
+
+ VERIFY( (unsigned char)3 == std::max(A<unsigned char>::a, (unsigned char)2) );
+ VERIFY( (unsigned char)4 == std::max(A<unsigned char>::a, (unsigned char)4) );
+
+ VERIFY( (wchar_t)3 == std::max(A<wchar_t>::a, (wchar_t)2) );
+ VERIFY( (wchar_t)4 == std::max(A<wchar_t>::a, (wchar_t)4) );
+}
+
+int main()
+{
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..c25b091c6e0
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template const value_type& max(const value_type&, const value_type&);
+
+ template const value_type& max(const value_type&, const value_type&,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..60b39b97cd6
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template const value_type& max(const value_type&, const value_type&);
+
+ template const value_type& max(const value_type&, const value_type&,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8bc4458142b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type max_element(iterator_type, iterator_type);
+
+ template iterator_type max_element(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..75a7d481d65
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/max_element/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type max_element(iterator_type, iterator_type);
+
+ template iterator_type max_element(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0ef0ca1a81c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type merge(iterator_type, iterator_type,
+ iterator_type, iterator_type, iterator_type);
+
+ template iterator_type merge(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..4338cf1acd9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/merge/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type merge(iterator_type, iterator_type,
+ iterator_type, iterator_type, iterator_type);
+
+ template iterator_type merge(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min/1.cc b/libstdc++-v3/testsuite/25_algorithms/min/1.cc
new file mode 100644
index 00000000000..7ff539dc124
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min/1.cc
@@ -0,0 +1,44 @@
+// 2000-03-29 sss/bkoz
+
+// Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ const int& z = std::min(1, 2);
+ const int& w = std::min(4, 3);
+ VERIFY( z == 1 );
+ VERIFY( w == 3 );
+
+ const int& zc = std::min(1, 2, std::greater<int>());
+ const int& wc = std::min(4, 3, std::greater<int>());
+ VERIFY( zc == 2 );
+ VERIFY( wc == 4 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min/2.cc b/libstdc++-v3/testsuite/25_algorithms/min/2.cc
new file mode 100644
index 00000000000..864462d0825
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min/2.cc
@@ -0,0 +1,87 @@
+// 2000-03-29 sss/bkoz
+
+// Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ struct A { static const T a; };
+
+template<typename T>
+const T A<T>::a = T(3);
+
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ VERIFY( 2 == std::min(A<int>::a, 2) );
+ VERIFY( 3 == std::min(A<int>::a, 4) );
+
+ VERIFY( 2u == std::min(A<unsigned int>::a, 2u) );
+ VERIFY( 3u == std::min(A<unsigned int>::a, 4u) );
+
+ VERIFY( 2l == std::min(A<long>::a, 2l) );
+ VERIFY( 3l == std::min(A<long>::a, 4l) );
+
+ VERIFY( 2ul == std::min(A<unsigned long>::a, 2ul) );
+ VERIFY( 3ul == std::min(A<unsigned long>::a, 4ul) );
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ VERIFY( 2ll == std::min(A<long long>::a, 2ll) );
+ VERIFY( 3ll == std::min(A<long long>::a, 4ll) );
+
+ VERIFY( 2ull == std::min(A<unsigned long long>::a, 2ull) );
+ VERIFY( 3ull == std::min(A<unsigned long long>::a, 4ull) );
+#endif
+
+ VERIFY( short(2) == std::min(A<short>::a, short(2)) );
+ VERIFY( short(3) == std::min(A<short>::a, short(4)) );
+
+ VERIFY( (unsigned short)2 == std::min(A<unsigned short>::a, (unsigned short)2) );
+ VERIFY( (unsigned short)3 == std::min(A<unsigned short>::a, (unsigned short)4) );
+
+ VERIFY( (char)2 == std::min(A<char>::a, (char)2) );
+ VERIFY( (char)3 == std::min(A<char>::a, (char)4) );
+
+ VERIFY( (signed char)2 == std::min(A<signed char>::a, (signed char)2) );
+ VERIFY( (signed char)3 == std::min(A<signed char>::a, (signed char)4) );
+
+ VERIFY( (unsigned char)2 == std::min(A<unsigned char>::a, (unsigned char)2) );
+ VERIFY( (unsigned char)3 == std::min(A<unsigned char>::a, (unsigned char)4) );
+
+ VERIFY( (wchar_t)2 == std::min(A<wchar_t>::a, (wchar_t)2) );
+ VERIFY( (wchar_t)3 == std::min(A<wchar_t>::a, (wchar_t)4) );
+
+ VERIFY( 2.0 == std::min(A<double>::a, 2.0) );
+ VERIFY( 3.0 == std::min(A<double>::a, 4.0) );
+
+ VERIFY( float(2) == std::min(A<float>::a, float(2)) );
+ VERIFY( float(3) == std::min(A<float>::a, float(4)) );
+
+ VERIFY( (long double)2 == std::min(A<long double>::a, (long double)2) );
+ VERIFY( (long double)3 == std::min(A<long double>::a, (long double)4) );
+}
+
+int main()
+{
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..da30edb8827
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template const value_type& min(const value_type&, const value_type&);
+ template const value_type& min(const value_type&, const value_type&,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..1f5b1f07747
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template const value_type& min(const value_type&, const value_type&);
+ template const value_type& min(const value_type&, const value_type&,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..6c53c046b33
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type min_element(iterator_type, iterator_type);
+
+ template iterator_type min_element(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..cab39f13c29
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/min_element/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type min_element(iterator_type, iterator_type);
+
+ template iterator_type min_element(iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/min_max.cc b/libstdc++-v3/testsuite/25_algorithms/min_max.cc
deleted file mode 100644
index 8c9bbaa9dcc..00000000000
--- a/libstdc++-v3/testsuite/25_algorithms/min_max.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-// 2000-03-29 sss/bkoz
-
-// Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-#include <algorithm>
-#include <functional>
-#include <testsuite_hooks.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
-
- const int& x = std::max(1, 2);
- const int& y = std::max(4, 3);
- VERIFY( x == 2 );
- VERIFY( y == 4 );
-
- const int& xc = std::max(1, 2, std::greater<int>());
- const int& yc = std::max(4, 3, std::greater<int>());
- VERIFY( xc == 1 );
- VERIFY( yc == 3 );
-
- const int& z = std::min(1, 2);
- const int& w = std::min(4, 3);
- VERIFY( z == 1 );
- VERIFY( w == 3 );
-
- const int& zc = std::min(1, 2, std::greater<int>());
- const int& wc = std::min(4, 3, std::greater<int>());
- VERIFY( zc == 2 );
- VERIFY( wc == 4 );
-}
-
-template<typename T>
- struct A { static const T a; };
-
-template<typename T>
-const T A<T>::a = T(3);
-
-void test02()
-{
- bool test __attribute__((unused)) = true;
-
- VERIFY( 2 == std::min(A<int>::a, 2) );
- VERIFY( 3 == std::min(A<int>::a, 4) );
-
- VERIFY( 2u == std::min(A<unsigned int>::a, 2u) );
- VERIFY( 3u == std::min(A<unsigned int>::a, 4u) );
-
- VERIFY( 2l == std::min(A<long>::a, 2l) );
- VERIFY( 3l == std::min(A<long>::a, 4l) );
-
- VERIFY( 2ul == std::min(A<unsigned long>::a, 2ul) );
- VERIFY( 3ul == std::min(A<unsigned long>::a, 4ul) );
-
-#ifdef _GLIBCXX_USE_LONG_LONG
- VERIFY( 2ll == std::min(A<long long>::a, 2ll) );
- VERIFY( 3ll == std::min(A<long long>::a, 4ll) );
-
- VERIFY( 2ull == std::min(A<unsigned long long>::a, 2ull) );
- VERIFY( 3ull == std::min(A<unsigned long long>::a, 4ull) );
-#endif
-
- VERIFY( short(2) == std::min(A<short>::a, short(2)) );
- VERIFY( short(3) == std::min(A<short>::a, short(4)) );
-
- VERIFY( (unsigned short)2 == std::min(A<unsigned short>::a, (unsigned short)2) );
- VERIFY( (unsigned short)3 == std::min(A<unsigned short>::a, (unsigned short)4) );
-
- VERIFY( (char)2 == std::min(A<char>::a, (char)2) );
- VERIFY( (char)3 == std::min(A<char>::a, (char)4) );
-
- VERIFY( (signed char)2 == std::min(A<signed char>::a, (signed char)2) );
- VERIFY( (signed char)3 == std::min(A<signed char>::a, (signed char)4) );
-
- VERIFY( (unsigned char)2 == std::min(A<unsigned char>::a, (unsigned char)2) );
- VERIFY( (unsigned char)3 == std::min(A<unsigned char>::a, (unsigned char)4) );
-
- VERIFY( (wchar_t)2 == std::min(A<wchar_t>::a, (wchar_t)2) );
- VERIFY( (wchar_t)3 == std::min(A<wchar_t>::a, (wchar_t)4) );
-
- VERIFY( 2.0 == std::min(A<double>::a, 2.0) );
- VERIFY( 3.0 == std::min(A<double>::a, 4.0) );
-
- VERIFY( float(2) == std::min(A<float>::a, float(2)) );
- VERIFY( float(3) == std::min(A<float>::a, float(4)) );
-
- VERIFY( (long double)2 == std::min(A<long double>::a, (long double)2) );
- VERIFY( (long double)3 == std::min(A<long double>::a, (long double)4) );
-
-
- VERIFY( 3 == std::max(A<int>::a, 2) );
- VERIFY( 4 == std::max(A<int>::a, 4) );
-
- VERIFY( 3u == std::max(A<unsigned int>::a, 2u) );
- VERIFY( 4u == std::max(A<unsigned int>::a, 4u) );
-
- VERIFY( 3l == std::max(A<long>::a, 2l) );
- VERIFY( 4l == std::max(A<long>::a, 4l) );
-
- VERIFY( 3ul == std::max(A<unsigned long>::a, 2ul) );
- VERIFY( 4ul == std::max(A<unsigned long>::a, 4ul) );
-
-#ifdef _GLIBCXX_USE_LONG_LONG
- VERIFY( 3ll == std::max(A<long long>::a, 2ll) );
- VERIFY( 4ll == std::max(A<long long>::a, 4ll) );
-
- VERIFY( 3ull == std::max(A<unsigned long long>::a, 2ull) );
- VERIFY( 4ull == std::max(A<unsigned long long>::a, 4ull) );
-#endif
-
- VERIFY( short(3) == std::max(A<short>::a, short(2)) );
- VERIFY( short(4) == std::max(A<short>::a, short(4)) );
-
- VERIFY( (unsigned short)3 == std::max(A<unsigned short>::a, (unsigned short)2) );
- VERIFY( (unsigned short)4 == std::max(A<unsigned short>::a, (unsigned short)4) );
-
- VERIFY( (char)3 == std::max(A<char>::a, (char)2) );
- VERIFY( (char)4 == std::max(A<char>::a, (char)4) );
-
- VERIFY( (signed char)3 == std::max(A<signed char>::a, (signed char)2) );
- VERIFY( (signed char)4 == std::max(A<signed char>::a, (signed char)4) );
-
- VERIFY( (unsigned char)3 == std::max(A<unsigned char>::a, (unsigned char)2) );
- VERIFY( (unsigned char)4 == std::max(A<unsigned char>::a, (unsigned char)4) );
-
- VERIFY( (wchar_t)3 == std::max(A<wchar_t>::a, (wchar_t)2) );
- VERIFY( (wchar_t)4 == std::max(A<wchar_t>::a, (wchar_t)4) );
-}
-
-int main()
-{
- test01();
- test02();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax/1.cc b/libstdc++-v3/testsuite/25_algorithms/minmax/1.cc
new file mode 100644
index 00000000000..480d7f95831
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax/1.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-11-01 Paolo Carlini <pcarlini@suse.de
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::pair<const int&, const int&> z = std::minmax(1, 2);
+ std::pair<const int&, const int&> w = std::minmax(4, 3);
+ VERIFY( z.first == 1 );
+ VERIFY( z.second == 2 );
+ VERIFY( w.first == 3 );
+ VERIFY( w.second == 4 );
+
+ std::pair<const int&, const int&> zc = std::minmax(1, 2, std::greater<int>());
+ std::pair<const int&, const int&> wc = std::minmax(4, 3, std::greater<int>());
+ VERIFY( zc.first == 2 );
+ VERIFY( zc.second == 1 );
+ VERIFY( wc.first == 4 );
+ VERIFY( wc.second == 3 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..17d8e0b0088
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-11-01 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair<const value_type&, const value_type&>
+ minmax(const value_type&, const value_type&);
+ template pair<const value_type&, const value_type&>
+ minmax(const value_type&, const value_type&, compare_type);
+}
+
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..887ee47c7c1
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-11-01 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair<const value_type&, const value_type&>
+ minmax(const value_type&, const value_type&);
+ template pair<const value_type&, const value_type&>
+ minmax(const value_type&, const value_type&, compare_type);
+}
+
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax_element/1.cc b/libstdc++-v3/testsuite/25_algorithms/minmax_element/1.cc
new file mode 100644
index 00000000000..3ba5e6cf417
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax_element/1.cc
@@ -0,0 +1,139 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <algorithm>
+#include <testsuite_iterators.h>
+#include <testsuite_hooks.h>
+
+using __gnu_test::test_container;
+using __gnu_test::forward_iterator_wrapper;
+using std::minmax_element;
+
+typedef test_container<int, forward_iterator_wrapper> Container;
+typedef std::pair<forward_iterator_wrapper<int>, forward_iterator_wrapper<int> > pair_type;
+
+void
+test1()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {0};
+ Container con(array, array);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array );
+ VERIFY( p1.second.ptr == array );
+}
+
+void
+test2()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {0};
+ Container con(array, array + 1);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array );
+ VERIFY( p1.second.ptr == array );
+}
+
+void
+test3()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {0, 3};
+ Container con(array, array + 2);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array );
+ VERIFY( p1.second.ptr == array + 1 );
+}
+
+void
+test4()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {3, 0};
+ Container con(array, array + 2);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array + 1 );
+ VERIFY( p1.second.ptr == array );
+}
+
+void
+test5()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {3, 3};
+ Container con(array, array + 2);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array );
+ VERIFY( p1.second.ptr == array + 1 );
+}
+
+void
+test6()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {6, 3, 0, 2, 6, 4, 0};
+ Container con(array, array + 7);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array + 2 );
+ VERIFY( p1.second.ptr == array + 4 );
+}
+
+void
+test7()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {4, 4, 4, 6, 6, 6, 1, 1, 0, 0, 0, 2, 2};
+ Container con(array, array + 13);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array + 8 );
+ VERIFY( p1.second.ptr == array + 5 );
+}
+
+void
+test8()
+{
+ bool test __attribute__((unused)) = true;
+
+ int array[] = {1, 7, 5, 5, 10, 1, 0, 0, 8, 4, 4, 0, 10, 10, 10, 1};
+ Container con(array, array + 16);
+ pair_type p1 = minmax_element(con.begin(), con.end());
+ VERIFY( p1.first.ptr == array + 6 );
+ VERIFY( p1.second.ptr == array + 14 );
+}
+
+int main()
+{
+ test1();
+ test2();
+ test3();
+ test4();
+ test5();
+ test6();
+ test7();
+ test8();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax_element/check_type.cc b/libstdc++-v3/testsuite/25_algorithms/minmax_element/check_type.cc
new file mode 100644
index 00000000000..0067f39019f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax_element/check_type.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+
+#include <algorithm>
+#include <testsuite_iterators.h>
+
+using __gnu_test::forward_iterator_wrapper;
+
+struct S { };
+
+bool
+operator<(const S&, const S&) {return true;}
+
+struct X { };
+
+bool
+predicate(const X&, const X&) {return true;}
+
+std::pair<forward_iterator_wrapper<S>, forward_iterator_wrapper<S> >
+test1(forward_iterator_wrapper<S>& s)
+{ return std::minmax_element(s,s); }
+
+std::pair<forward_iterator_wrapper<X>, forward_iterator_wrapper<X> >
+test2(forward_iterator_wrapper<X>& x)
+{ return std::minmax_element(x,x,predicate); }
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..5f50b68cd46
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-11-01 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair<iterator_type, iterator_type>
+ minmax_element(iterator_type, iterator_type);
+ template pair<iterator_type, iterator_type>
+ minmax_element(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..5ef0cc7482b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/minmax_element/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-11-01 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template pair<iterator_type, iterator_type>
+ minmax_element(iterator_type, iterator_type);
+ template pair<iterator_type, iterator_type>
+ minmax_element(iterator_type, iterator_type, compare_type);
+}
+
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/1.cc b/libstdc++-v3/testsuite/25_algorithms/move/1.cc
new file mode 100644
index 00000000000..7fa0f784054
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move/1.cc
@@ -0,0 +1,64 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::input_iterator_wrapper;
+using __gnu_test::output_iterator_wrapper;
+using __gnu_test::rvalstruct;
+using std::move;
+
+typedef test_container<rvalstruct, input_iterator_wrapper> container_in;
+typedef test_container<rvalstruct, output_iterator_wrapper> container_out;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ const int size = sizeof(inarray) / sizeof(int);
+
+ rvalstruct in[size], out[size];
+ std::copy(inarray, inarray + size, in);
+ std::fill(out, out + size, 0);
+
+ container_in incon(in, in + size);
+ container_out outcon(out, out + size);
+
+ move(incon.begin(), incon.end(), outcon.begin());
+ VERIFY( std::equal(out, out + size, inarray) );
+ for (int z = 0; z < size; ++z)
+ VERIFY( out[z].valid );
+ for (int z = 0; z < size; ++z)
+ VERIFY( !in[z].valid );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..532c290f9dd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type move(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..37aa958670d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type move(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc
new file mode 100644
index 00000000000..ed742f30ffe
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/1.cc
@@ -0,0 +1,66 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#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;
+using std::move_backward;
+
+typedef test_container<rvalstruct,
+ bidirectional_iterator_wrapper> container_in;
+typedef test_container<rvalstruct,
+ bidirectional_iterator_wrapper> container_out;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ const int size = sizeof(inarray) / sizeof(int);
+
+ rvalstruct in[size], out[size];
+ std::copy(inarray, inarray + size, in);
+ std::fill(out, out + size, 0);
+
+ container_in incon(in, in + size);
+ container_out outcon(out, out + size);
+
+ move_backward(incon.begin(), incon.end(), outcon.end());
+ VERIFY( std::equal(out, out + size, inarray) );
+ for (int z = 0; z < size; ++z)
+ VERIFY( out[z].valid );
+ for (int z = 0; z < size; ++z)
+ VERIFY( !in[z].valid );
+}
+
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..430ac7af827
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type move_backward(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..a1c32417719
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/move_backward/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-19 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type move_backward(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..fd6b3a92dac
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool next_permutation(iterator_type, iterator_type);
+ template bool next_permutation(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..f46999a1bfc
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool next_permutation(iterator_type, iterator_type);
+ template bool next_permutation(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/1.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/1.cc
index 80b4776d23b..2304d3634b9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/nth_element/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/1.cc
@@ -25,6 +25,7 @@
using __gnu_test::test_container;
using __gnu_test::random_access_iterator_wrapper;
using std::nth_element;
+using std::partial_sort;
typedef test_container<int, random_access_iterator_wrapper> Container;
@@ -48,6 +49,7 @@ test2()
void
test3()
{
+ bool test __attribute__((unused)) = true;
int array[] = {6, 5, 4, 3, 2, 1, 0};
Container con(array, array + 7);
nth_element(con.begin(), con.it(3), con.end());
@@ -60,6 +62,7 @@ test3()
void
test4()
{
+ bool test __attribute__((unused)) = true;
int array[] = {0, 6, 1, 5, 2, 4, 3};
Container con(array,array + 7);
nth_element(con.begin(), con.it(3), con.end());
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
index ed8635033b8..84f959ae9a2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -23,27 +23,27 @@
#include <testsuite_hooks.h>
void
-test_set(std::vector<int>& v, int size)
+test_set(std::vector<unsigned>& v, unsigned size)
{
v.clear();
- for (int i = 0; i < size; i += 4)
+ for (unsigned i = 0; i < size; i += 4)
{
v.push_back(i / 2);
v.push_back((size - 2) - (i / 2));
}
- for (int i = 1; i < size; i += 2)
+ for (unsigned i = 1; i < size; i += 2)
v.push_back(i);
}
void
-do_test01(int size)
+do_test01(unsigned size)
{
bool test __attribute__((unused)) = true;
- std::vector<int> v, s;
+ std::vector<unsigned> v, s;
- for (int j = 0; j < size; ++j)
+ for (unsigned j = 0; j < size; ++j)
{
test_set(v, size);
s = v;
@@ -53,10 +53,10 @@ do_test01(int size)
VERIFY( v[j] == s[j] );
- for (int i = 0; i < j; ++i)
+ for (unsigned i = 0; i < j; ++i)
VERIFY( !(v[j] < v[i]) );
- for (int i = j; i < v.size(); ++i)
+ for (unsigned i = j; i < v.size(); ++i)
VERIFY( !(v[i] < v[j]) );
}
}
@@ -64,7 +64,7 @@ do_test01(int size)
void
test01()
{
- for (int size = 4; size <= 1 << 10; size <<= 1)
+ for (unsigned size = 4; size <= 1 << 10; size <<= 1)
do_test01(size);
}
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/3.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/3.cc
new file mode 100644
index 00000000000..f1f94bb3c5a
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/3.cc
@@ -0,0 +1,87 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
+const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
+const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+const int logN = 3; // ln(N) rounded up
+const int P = 7;
+
+// comparison predicate for stable_sort: order by rightmost digit
+struct CompLast
+{
+ bool
+ operator()(const int x, const int y)
+ { return x % 10 < y % 10; }
+};
+
+// This functor has the equivalent functionality of std::geater<>,
+// but there is no dependency on <functional> and it also tracks the
+// number of invocations since creation.
+class Gt
+{
+public:
+ static int count() { return itsCount; }
+ static void reset() { itsCount = 0; }
+
+ bool
+ operator()(const int& x, const int& y)
+ {
+ ++itsCount;
+ return x > y;
+ }
+
+private:
+ static int itsCount;
+};
+
+int Gt::itsCount = 0;
+
+// 25.3.2 nth_element()
+void
+test05()
+{
+ using std::nth_element;
+
+ int s1[N];
+ std::copy(B, B + N, s1);
+ VERIFY(std::equal(s1, s1 + N, B));
+
+ int* pn = s1 + (N / 2) - 1;
+ nth_element(s1, pn, s1 + N);
+ for (const int* i = pn; i < s1 + N; ++i) VERIFY(!(*i < *pn));
+
+ CompLast pred;
+ nth_element(s1, pn, s1 + N, pred);
+ for (const int* i = pn; i < s1 + N; ++i) VERIFY(!pred(*i, *pn));
+}
+
+int
+main()
+{
+ test05();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/moveable.cc
new file mode 100644
index 00000000000..c521d382b2f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/moveable.cc
@@ -0,0 +1,76 @@
+// { dg-require-rvalref "" }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.3.2 [lib.alg.nth.element]
+
+#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 std::nth_element;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+void
+test1()
+{
+ int intarray[] = {6, 5, 4, 3, 2, 1, 0};
+ rvalstruct array[7];
+ std::copy(intarray, intarray + 7, array);
+ Container con(array, array + 7);
+ nth_element(con.begin(), con.it(3), con.end());
+ for(int i = 0; i < 3; ++i)
+ VERIFY(array[i].val < 3);
+ for(int i = 4; i < 7; ++i)
+ VERIFY(array[i].val > 3);
+ for(int i = 0; i < 7; ++i)
+ VERIFY(array[i].valid);
+}
+
+void
+test2()
+{
+ int intarray[] = {0, 6, 1, 5, 2, 4, 3};
+ rvalstruct array[7];
+ std::copy(intarray, intarray + 7, array);
+ Container con(array,array + 7);
+ nth_element(con.begin(), con.it(3), con.end());
+ for(int i = 0; i < 3; ++i)
+ VERIFY(array[i].val < 3);
+ for(int i = 4; i < 7; ++i)
+ VERIFY(array[i].val > 3);
+ for(int i = 0; i < 7; ++i)
+ VERIFY(array[i].valid);
+}
+
+int
+main()
+{
+ test1();
+ test2();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b40f0036c1c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void nth_element(iterator_type, iterator_type, iterator_type);
+ template void nth_element(iterator_type, iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..5a98b8936fe
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void nth_element(iterator_type, iterator_type, iterator_type);
+ template void nth_element(iterator_type, iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/2.cc
new file mode 100644
index 00000000000..b60a03e7fdd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/2.cc
@@ -0,0 +1,85 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
+const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
+const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+const int logN = 3; // ln(N) rounded up
+const int P = 7;
+
+// comparison predicate for stable_sort: order by rightmost digit
+struct CompLast
+{
+ bool
+ operator()(const int x, const int y)
+ { return x % 10 < y % 10; }
+};
+
+// This functor has the equivalent functionality of std::geater<>,
+// but there is no dependency on <functional> and it also tracks the
+// number of invocations since creation.
+class Gt
+{
+public:
+ static int count() { return itsCount; }
+ static void reset() { itsCount = 0; }
+
+ bool
+ operator()(const int& x, const int& y)
+ {
+ ++itsCount;
+ return x > y;
+ }
+
+private:
+ static int itsCount;
+};
+
+int Gt::itsCount = 0;
+
+// 25.3.1.3 partial_sort()
+void
+test03()
+{
+ int s1[N];
+ std::copy(B, B + N, s1);
+ VERIFY(std::equal(s1, s1 + N, B));
+
+ std::partial_sort(s1, s1 + P, s1 + N);
+ VERIFY(std::equal(s1, s1 + P, A));
+
+ Gt gt;
+ gt.reset();
+ std::partial_sort(s1, s1 + P, s1 + N, gt);
+ VERIFY(std::equal(s1, s1 + P, C));
+}
+
+int
+main()
+{
+ test03();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/moveable.cc
new file mode 100644
index 00000000000..74a95d9e1a8
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/moveable.cc
@@ -0,0 +1,69 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.3.1.3 [lib.partial.sort]
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#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;
+using std::partial_sort;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+void
+test1()
+{
+ int intarray[] = {6, 5, 4, 3, 2, 1, 0};
+ rvalstruct array[7];
+ std::copy(intarray, intarray + 7, array);
+ Container con(array, array + 7);
+ partial_sort(con.begin(), con.it(3), con.end());
+ VERIFY(array[0].val == 0 && array[1].val == 1 && array[2].val == 2);
+ for(int i = 0; i < 7; ++i)
+ VERIFY(array[i].valid);
+}
+
+void
+test2()
+{
+ int intarray[] = {0, 6, 1, 5, 2, 4, 3};
+ rvalstruct array[7];
+ std::copy(intarray, intarray + 7, array);
+ Container con(array,array + 7);
+ partial_sort(con.begin(), con.it(3), con.end());
+ VERIFY(array[0].val == 0 && array[1].val == 1 && array[2].val == 2);
+ for(int i = 0; i < 7; ++i)
+ VERIFY(array[i].valid);
+}
+
+int
+main()
+{
+ test1();
+ test2();
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b53a9db081c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void partial_sort(iterator_type, iterator_type, iterator_type);
+ template void partial_sort(iterator_type, iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..fbc92766f2a
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void partial_sort(iterator_type, iterator_type, iterator_type);
+ template void partial_sort(iterator_type, iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/2.cc
new file mode 100644
index 00000000000..e21ace07ee2
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/2.cc
@@ -0,0 +1,92 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
+const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
+const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+const int logN = 3; // ln(N) rounded up
+const int P = 7;
+
+// comparison predicate for stable_sort: order by rightmost digit
+struct CompLast
+{
+ bool
+ operator()(const int x, const int y)
+ { return x % 10 < y % 10; }
+};
+
+// This functor has the equivalent functionality of std::geater<>,
+// but there is no dependency on <functional> and it also tracks the
+// number of invocations since creation.
+class Gt
+{
+public:
+ static int count() { return itsCount; }
+ static void reset() { itsCount = 0; }
+
+ bool
+ operator()(const int& x, const int& y)
+ {
+ ++itsCount;
+ return x > y;
+ }
+
+private:
+ static int itsCount;
+};
+
+int Gt::itsCount = 0;
+
+
+// 25.3.1.4 partial_sort_copy()
+void
+test04()
+{
+ using std::partial_sort_copy;
+
+ int s1[N];
+ std::copy(B, B + N, s1);
+ VERIFY(std::equal(s1, s1 + N, B));
+
+ int s2[2*N];
+
+ partial_sort_copy(s1, s1 + N, s2, s2 + P);
+ VERIFY(std::equal(s2, s2 + P, A));
+
+ Gt gt;
+ gt.reset();
+ partial_sort_copy(s1, s1 + N, s2, s2 + P, gt);
+ VERIFY(std::equal(s2, s2 + P, C));
+
+ VERIFY(std::equal(s2, partial_sort_copy(s1, s1 + N, s2, s2 + 2*N), A));
+}
+
+int
+main()
+{
+ test04();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..7f7628fa5b9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type partial_sort_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type partial_sort_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..d8d45093f05
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type partial_sort_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type partial_sort_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/1.cc b/libstdc++-v3/testsuite/25_algorithms/partition/1.cc
new file mode 100644
index 00000000000..b71ec23fbf0
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/1.cc
@@ -0,0 +1,58 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.2.12 [lib.alg.partitions] Partitions.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+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 int& x) const
+ { return (x % 2) == 0; }
+};
+
+// 25.2.12 partition()
+void
+test01()
+{
+ using std::partition;
+
+ int s1[N];
+ std::copy(A, A + N, s1);
+
+ Pred pred;
+ int* m = partition(s1, s1 + N, pred);
+ for (const int* i = s1; i < m; ++i) VERIFY(pred(*i));
+ for (const int* i = m; i < s1 + N; ++i) VERIFY(!pred(*i));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc
new file mode 100644
index 00000000000..a31e5277bfa
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/moveable.cc
@@ -0,0 +1,89 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.12 [lib.alg.partitions] Partitions.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+#include <testsuite_rvalref.h>
+#include <testsuite_iterators.h>
+
+using __gnu_test::test_container;
+using __gnu_test::forward_iterator_wrapper;
+using __gnu_test::bidirectional_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, forward_iterator_wrapper> Fcontainer;
+typedef test_container<rvalstruct, bidirectional_iterator_wrapper> Bcontainer;
+
+bool test __attribute__((unused)) = true;
+
+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 partition()
+void
+test01()
+{
+ using std::partition;
+
+ rvalstruct farray[N];
+ rvalstruct barray[N];
+
+ std::copy(A, A + N, farray);
+ std::copy(A, A + N, barray);
+
+ Fcontainer fcon(farray, farray + N);
+ Bcontainer bcon(barray, barray + N);
+
+ Pred pred;
+
+ VERIFY(partition(fcon.begin(), fcon.end(), pred).ptr - farray == N/2);
+ for (const rvalstruct* i = farray; i < farray+N/2; ++i)
+ VERIFY(pred(*i));
+
+ for (const rvalstruct* i = farray+N/2; i < farray + N; ++i)
+ VERIFY(!pred(*i));
+
+ VERIFY(partition(bcon.begin(), bcon.end(), pred).ptr - barray == N/2);
+
+ for (const rvalstruct* i = barray; i < barray+N/2; ++i)
+ VERIFY(pred(*i));
+ for (const rvalstruct* i = barray+N/2; i < barray + N; ++i)
+ VERIFY(!pred(*i));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/partition.cc b/libstdc++-v3/testsuite/25_algorithms/partition/partition.cc
deleted file mode 100644
index 66edb6f4748..00000000000
--- a/libstdc++-v3/testsuite/25_algorithms/partition/partition.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 25.2.12 [lib.alg.partitions] Partitions.
-
-#include <algorithm>
-#include <functional>
-#include <testsuite_hooks.h>
-
-bool test __attribute__((unused)) = true;
-
-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 int& x) const
- { return (x % 2) == 0; }
-};
-
-// 25.2.12 partition()
-void
-test01()
-{
- using std::partition;
-
- int s1[N];
- std::copy(A, A + N, s1);
-
- Pred pred;
- int* m = partition(s1, s1 + N, pred);
- for (const int* i = s1; i < m; ++i) VERIFY(pred(*i));
- for (const int* i = m; i < s1 + N; ++i) VERIFY(!pred(*i));
-}
-
-// 25.2.12 stable_partition()
-void
-test02()
-{
- using std::stable_partition;
-
- int s1[N];
- std::copy(A, A + N, s1);
-
- stable_partition(s1, s1 + N, Pred());
- VERIFY(std::equal(s1, s1 + N, B));
-}
-
-int
-main()
-{
- test01();
- test02();
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..84fe246122e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type partition(iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..e07c763e318
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type partition(iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..4517c55f28c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void pop_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..28ca9f3cfe8
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void pop_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..d4dd5864bca
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool prev_permutation(iterator_type, iterator_type);
+ template bool prev_permutation(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..6f0dcec2e10
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template bool prev_permutation(iterator_type, iterator_type);
+ template bool prev_permutation(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..aaa4e77618a
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void push_heap(iterator_type, iterator_type);
+ template void push_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..2dbec8c4216
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void push_heap(iterator_type, iterator_type);
+ template void push_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..55cc05d3514
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<int, int> generator_type;
+
+ template void random_shuffle(iterator_type, iterator_type);
+ template void random_shuffle(iterator_type, iterator_type,
+ generator_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..f49204456cd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<int, int> generator_type;
+
+ template void random_shuffle(iterator_type, iterator_type);
+ template void random_shuffle(iterator_type, iterator_type,
+ generator_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/remove/moveable.cc
new file mode 100644
index 00000000000..5a0e77e2e89
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove/moveable.cc
@@ -0,0 +1,67 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.4 remove
+
+#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::rvalstruct;
+
+typedef test_container<rvalstruct, forward_iterator_wrapper> Container;
+
+void
+test1()
+{
+ int intarray[] = {1};
+ rvalstruct array[1];
+ std::copy(intarray, intarray + 1, array);
+ Container con(array, array + 1);
+ rvalstruct remove_val0(0);
+ rvalstruct remove_val1(1);
+ VERIFY(std::remove(con.begin(), con.end(), remove_val0).ptr == array + 1);
+ VERIFY(std::remove(con.begin(), con.end(), remove_val1).ptr == array);
+}
+
+void
+test2()
+{
+ int intarray[] = {0, 1, 0, 1, 0, 0, 1, 1};
+ rvalstruct array[8];
+ std::copy(intarray, intarray + 8, array);
+ Container con(array, array + 8);
+ rvalstruct remove_val(1);
+ VERIFY(std::remove(con.begin(), con.end(), remove_val).ptr == array + 4);
+ VERIFY(array[0].val == 0 && array[1].val == 0 && array[2].val == 0 &&
+ array[3].val == 0);
+}
+
+int
+main()
+{
+ test1();
+ test2();
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b6e4a04ee67
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type remove(iterator_type, iterator_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..ca538192dec
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type remove<iterator_type, value_type>(iterator_type, iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..214c80dfa92
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type remove_copy(iterator_type, iterator_type,
+ iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..bd060dab0f5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type remove_copy(iterator_type, iterator_type,
+ iterator_type, const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..af0426f7604
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type remove_copy_if(iterator_type, iterator_type,
+ iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..5bf77c72e13
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type remove_copy_if(iterator_type, iterator_type,
+ iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/moveable.cc
new file mode 100644
index 00000000000..db49433452f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/moveable.cc
@@ -0,0 +1,67 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.4 remove
+
+#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::rvalstruct;
+
+typedef test_container<rvalstruct, forward_iterator_wrapper> Container;
+
+bool equal1(rvalstruct& in) { return in.val == 1; }
+bool equal0(rvalstruct& in) { return in.val == 0; }
+
+void
+test1()
+{
+ int intarray[] = {1};
+ rvalstruct array[1];
+ std::copy(intarray, intarray + 1, array);
+ Container con(array, array + 1);
+ VERIFY(std::remove_if(con.begin(), con.end(), equal0).ptr == array + 1);
+ VERIFY(std::remove_if(con.begin(), con.end(), equal1).ptr == array);
+}
+
+void
+test2()
+{
+ int intarray[] = {0, 1, 0, 1, 0, 0, 1, 1};
+ rvalstruct array[8];
+ std::copy(intarray, intarray + 8, array);
+ Container con(array, array + 8);
+ VERIFY(std::remove_if(con.begin(), con.end(), equal1).ptr == array + 4);
+ VERIFY(array[0] == 0 && array[1] == 0 && array[2] == 0 &&
+ array[3] == 0);
+}
+
+int
+main()
+{
+ test1();
+ test2();
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..654717fca32
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type remove_if(iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..61c08fe89b4
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type remove_if(iterator_type, iterator_type,
+ predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..834211ee7e9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template void replace(iterator_type, iterator_type, const value_type&,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..15c4f4ab1a4
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template void replace(iterator_type, iterator_type, const value_type&,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8a8ef3dc185
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type replace_copy(iterator_type, iterator_type,
+ iterator_type, const value_type&,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..869659c095d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type replace_copy(iterator_type, iterator_type,
+ iterator_type, const value_type&,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8647bcec6c5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type replace_copy_if(iterator_type, iterator_type,
+ iterator_type, predicate_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..6cb64619e3b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type replace_copy_if(iterator_type, iterator_type,
+ iterator_type, predicate_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..b13fda1a9ff
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template void replace_if(iterator_type, iterator_type, predicate_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..7e95210e222
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template void replace_if(iterator_type, iterator_type, predicate_type,
+ const value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
new file mode 100644
index 00000000000..c01bf71339e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.9 Reverse
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <testsuite_iterators.h>
+
+using __gnu_test::bidirectional_iterator_wrapper;
+
+class X
+{
+ X();
+ X(const X&);
+ void operator=(const X&);
+};
+
+void
+swap(X&, X&) { }
+
+void
+test1(bidirectional_iterator_wrapper<X>& begin,
+ bidirectional_iterator_wrapper<X>& end)
+{ std::reverse(begin, end); }
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8f774a81366
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template void reverse(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..94b6eadde24
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template void reverse(iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0b88c90bdbe
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type reverse_copy(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..5887ca93a21
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type reverse_copy(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/moveable.cc
new file mode 100644
index 00000000000..6d132cf02bc
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/moveable.cc
@@ -0,0 +1,78 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 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;
+
+
+
+void
+test1()
+{
+ bool test __attribute__((unused)) = true;
+ int data[] = {1, 2, 3, 4, 5};
+ rvalstruct array[5];
+ std::copy(data, data + 5, array);
+ Fcontainer fcon(array, array + 5);
+ Bcontainer bcon(array, array + 5);
+ Rcontainer rcon(array, array + 5);
+
+ std::rotate(fcon.begin(), fcon.it(2), fcon.end());
+ VERIFY(array[0].val == 3 && array[1].val == 4 && array[2].val == 5 &&
+ array[3].val == 1 && array[4].val == 2);
+ for(int i=0;i<5;i++)
+ VERIFY(array[i].valid == true);
+
+ std::rotate(bcon.begin(), bcon.it(2), bcon.end());
+ VERIFY(array[0].val == 5 && array[1].val == 1 && array[2].val == 2 &&
+ array[3].val == 3 && array[4].val == 4);
+ for(int i=0;i<5;i++)
+ VERIFY(array[i].valid);
+
+ std::rotate(rcon.begin(), rcon.it(2), rcon.end());
+ VERIFY(array[0].val == 2 && array[1].val == 3 && array[2].val == 4 &&
+ array[3].val == 5 && array[4].val == 1);
+ for(int i=0;i<5;i++)
+ VERIFY(array[i].valid);
+}
+
+int
+main()
+{
+ test1();
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..ef94a5a905b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template void rotate(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..2994f93b565
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template void rotate(iterator_type, iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..716b52b5db9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type rotate_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..2d73426fe63
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type rotate_copy(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/1.cc b/libstdc++-v3/testsuite/25_algorithms/search/1.cc
index ec0763d6f06..ef00b58d010 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search/1.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search/1.cc
@@ -24,9 +24,11 @@
using __gnu_test::test_container;
using __gnu_test::forward_iterator_wrapper;
+using __gnu_test::random_access_iterator_wrapper;
using std::search;
typedef test_container<int, forward_iterator_wrapper> Container;
+typedef test_container<int, random_access_iterator_wrapper> RAcontainer;
int array1[] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1};
int array2[] = {0, 0, 0};
@@ -101,6 +103,53 @@ test6()
== array3 + 6);
}
+bool
+lexstep(int* start, int length)
+{
+ int i = 0;
+ int carry = 1;
+ while(i < length && carry)
+ {
+ if(start[i] == 1)
+ start[i] = 0;
+ else
+ {
+ start[i] = 1;
+ carry = 0;
+ }
+ i++;
+ }
+ return !carry;
+}
+
+void test7()
+{
+ int array1[6];
+ int array2[6];
+ for(int length1 = 0; length1 < 6; length1++)
+ {
+ for(int length2 = 0; length2 < 6; length2++)
+ {
+ std::fill_n(array1, length1, 0);
+ while(lexstep(array1, length1))
+ {
+ std::fill_n(array2, length2, 0);
+ while(lexstep(array2, length2))
+ {
+ Container con1(array1, array1 + length1);
+ Container con2(array2, array2 + length2);
+ RAcontainer rcon1(array1, array1 + length1);
+ RAcontainer rcon2(array2, array2 + length2);
+ VERIFY(search(con1.begin(), con1.end(), con2.begin(),
+ con2.end()).ptr ==
+ search(rcon1.begin(), rcon1.end(), rcon2.begin(),
+ rcon2.end()).ptr);
+ }
+ }
+ }
+ }
+}
+
int
main()
{
@@ -110,4 +159,5 @@ main()
test4();
test5();
test6();
+ test7();
}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/check_type.cc b/libstdc++-v3/testsuite/25_algorithms/search/check_type.cc
index 4aaa87bea50..4762abdb0e3 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search/check_type.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search/check_type.cc
@@ -25,14 +25,33 @@
using __gnu_test::forward_iterator_wrapper;
-struct S1 { };
-struct S2 { };
+struct T1 { };
+struct T2 { };
+
+struct S1
+{
+ S1(T1) { }
+};
+
+struct S2 {
+ S2(T2) { }
+};
bool
operator==(const S1&, const S2&) {return true;}
-struct X1 { };
-struct X2 { };
+struct V1 { };
+struct V2 { };
+
+struct X1
+{
+ X1(V1) { };
+};
+
+struct X2
+{
+ X2(V2) { };
+};
bool
predicate(const X1&, const X2&) {return true;}
@@ -41,6 +60,14 @@ forward_iterator_wrapper<S1>
test1(forward_iterator_wrapper<S1>& s1, forward_iterator_wrapper<S2>& s2)
{ return std::search(s1, s1, s2, s2); }
+forward_iterator_wrapper<T1>
+test2(forward_iterator_wrapper<T1>& s1, forward_iterator_wrapper<T2>& s2)
+{ return std::search(s1, s1, s2, s2); }
+
forward_iterator_wrapper<X1>
-test2(forward_iterator_wrapper<X1>& x1, forward_iterator_wrapper<X2>& x2)
+test3(forward_iterator_wrapper<X1>& x1, forward_iterator_wrapper<X2>& x2)
+{ return std::search(x1, x1, x2, x2, predicate); }
+
+forward_iterator_wrapper<V1>
+test4(forward_iterator_wrapper<V1>& x1, forward_iterator_wrapper<V2>& x2)
{ return std::search(x1, x1, x2, x2, predicate); }
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..062f3e56233
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type search(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type search(iterator_type, iterator_type,
+ iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..431cfc1fec9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type search(iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type search(iterator_type, iterator_type,
+ iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
index 7aeaac34b0b..2a9b0f42a09 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
@@ -52,12 +52,15 @@ lexstep(int* start, int length)
return !carry;
}
-using __gnu_test::test_container;
-using __gnu_test::random_access_iterator_wrapper;
-using __gnu_test::bidirectional_iterator_wrapper;
-using __gnu_test::forward_iterator_wrapper;
+int main()
+{
+ using __gnu_test::test_container;
+ using __gnu_test::random_access_iterator_wrapper;
+ using __gnu_test::bidirectional_iterator_wrapper;
+ using __gnu_test::forward_iterator_wrapper;
+
+ using std::search_n;
-int main() {
test_container<int,forward_iterator_wrapper> con(array1,array1 + 10);
VERIFY(search_n(con.end(), con.end(), 0, 1) == con.end());
VERIFY(search_n(con.end(), con.end(), 1, 1) == con.end());
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8ff2badc157
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::size_t size_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type search_n(iterator_type, iterator_type,
+ size_type, const value_type&);
+
+ template iterator_type search_n(iterator_type, iterator_type,
+ size_type, const value_type&, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..93c31798a81
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::size_t size_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, bool> predicate_type;
+
+ template iterator_type search_n(iterator_type, iterator_type,
+ size_type, const value_type&);
+
+ template iterator_type search_n(iterator_type, iterator_type,
+ size_type, const value_type&, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0ed15900273
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,51 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_difference(iterator_type, iterator_type,
+ iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..96ee6805fcf
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_difference(iterator_type, iterator_type,
+ iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/34730.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/34730.cc
new file mode 100644
index 00000000000..66aef0f99df
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/34730.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2008 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.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/34730
+
+#include <string>
+#include <vector>
+#include <algorithm>
+
+using namespace std;
+
+typedef pair<int, string> intstring;
+
+struct intstrcmp
+{
+ bool
+ operator()(const string& x, const intstring& y) const
+ { return x < y.second; }
+
+ bool
+ operator()(const intstring& x, const string& y) const
+ { return x.second < y; }
+};
+
+void test01()
+{
+ vector<string> vec1;
+ vector<intstring> vec2;
+ vector<intstring> vec3;
+ set_intersection(vec2.begin(), vec2.end(),
+ vec1.begin(), vec1.end(),
+ back_inserter(vec3), intstrcmp());
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..812daaa02d1
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,51 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_intersection(iterator_type, iterator_type,
+ iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_intersection(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..f877b65d9ff
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_intersection(iterator_type, iterator_type,
+ iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_intersection(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..8f753edafc1
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,51 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_symmetric_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type);
+
+ template iterator_type set_symmetric_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..c2298592d44
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,50 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_symmetric_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type);
+
+ template iterator_type set_symmetric_difference(iterator_type, iterator_type,
+ iterator_type, iterator_type,
+ iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..56fdda16b9c
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_union(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_union(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..815943c3541
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/set_union/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type set_union(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type);
+
+ template iterator_type set_union(iterator_type, iterator_type, iterator_type,
+ iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort.cc b/libstdc++-v3/testsuite/25_algorithms/sort.cc
deleted file mode 100644
index 6ca01ef7415..00000000000
--- a/libstdc++-v3/testsuite/25_algorithms/sort.cc
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 25.3.1 algorithms, sort()
-
-#include <algorithm>
-#include <testsuite_hooks.h>
-
-bool test __attribute__((unused)) = true;
-
-const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
-const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
-const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
-const int N = sizeof(A) / sizeof(int);
-const int logN = 3; // ln(N) rounded up
-const int P = 7;
-
-// comparison predicate for stable_sort: order by rightmost digit
-struct CompLast
-{
- bool
- operator()(const int x, const int y)
- { return x % 10 < y % 10; }
-};
-
-// This functor has the equivalent functionality of std::geater<>,
-// but there is no dependency on <functional> and it also tracks the
-// number of invocations since creation.
-class Gt
-{
-public:
- static int count() { return itsCount; }
- static void reset() { itsCount = 0; }
-
- bool
- operator()(const int& x, const int& y)
- {
- ++itsCount;
- return x > y;
- }
-
-private:
- static int itsCount;
-};
-
-int Gt::itsCount = 0;
-
-
-// 25.3.1.1 sort()
-void
-test01()
-{
- int s1[N];
- std::copy(B, B + N, s1);
- VERIFY(std::equal(s1, s1 + N, B));
-
- std::sort(s1, s1 + N);
- VERIFY(std::equal(s1, s1 + N, A));
-
- Gt gt;
- gt.reset();
- std::sort(s1, s1 + N, gt);
- VERIFY(std::equal(s1, s1 + N, C));
-}
-
-// 25.3.1.2 stable_sort()
-void
-test02()
-{
- int s1[N];
- std::copy(A, A + N, s1);
- VERIFY(std::equal(s1, s1 + N, A));
-
- std::stable_sort(s1, s1 + N, CompLast());
- VERIFY(std::equal(s1, s1 + N, B));
-
- std::stable_sort(s1, s1 + N);
- VERIFY(std::equal(s1, s1 + N, A));
-
- Gt gt;
- gt.reset();
- std::stable_sort(s1, s1 + N, gt);
- VERIFY(std::equal(s1, s1 + N, C));
- VERIFY(gt.count() <= N * logN * logN);
-}
-
-// 25.3.1.3 partial_sort()
-void
-test03()
-{
- int s1[N];
- std::copy(B, B + N, s1);
- VERIFY(std::equal(s1, s1 + N, B));
-
- std::partial_sort(s1, s1 + P, s1 + N);
- VERIFY(std::equal(s1, s1 + P, A));
-
- Gt gt;
- gt.reset();
- std::partial_sort(s1, s1 + P, s1 + N, gt);
- VERIFY(std::equal(s1, s1 + P, C));
-}
-
-// 25.3.1.4 partial_sort_copy()
-void
-test04()
-{
- using std::partial_sort_copy;
-
- int s1[N];
- std::copy(B, B + N, s1);
- VERIFY(std::equal(s1, s1 + N, B));
-
- int s2[2*N];
-
- partial_sort_copy(s1, s1 + N, s2, s2 + P);
- VERIFY(std::equal(s2, s2 + P, A));
-
- Gt gt;
- gt.reset();
- partial_sort_copy(s1, s1 + N, s2, s2 + P, gt);
- VERIFY(std::equal(s2, s2 + P, C));
-
- VERIFY(std::equal(s2, partial_sort_copy(s1, s1 + N, s2, s2 + 2*N), A));
-}
-
-// 25.3.2 nth_element()
-void
-test05()
-{
- using std::nth_element;
-
- int s1[N];
- std::copy(B, B + N, s1);
- VERIFY(std::equal(s1, s1 + N, B));
-
- int* pn = s1 + (N / 2) - 1;
- nth_element(s1, pn, s1 + N);
- for (const int* i = pn; i < s1 + N; ++i) VERIFY(!(*i < *pn));
-
- CompLast pred;
- nth_element(s1, pn, s1 + N, pred);
- for (const int* i = pn; i < s1 + N; ++i) VERIFY(!pred(*i, *pn));
-}
-
-int
-main()
-{
- test01();
- test02();
- test03();
- test04();
- test05();
-
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/1.cc b/libstdc++-v3/testsuite/25_algorithms/sort/1.cc
new file mode 100644
index 00000000000..c28db2b87b4
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/1.cc
@@ -0,0 +1,86 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
+const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
+const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+const int logN = 3; // ln(N) rounded up
+const int P = 7;
+
+// comparison predicate for stable_sort: order by rightmost digit
+struct CompLast
+{
+ bool
+ operator()(const int x, const int y)
+ { return x % 10 < y % 10; }
+};
+
+// This functor has the equivalent functionality of std::geater<>,
+// but there is no dependency on <functional> and it also tracks the
+// number of invocations since creation.
+class Gt
+{
+public:
+ static int count() { return itsCount; }
+ static void reset() { itsCount = 0; }
+
+ bool
+ operator()(const int& x, const int& y)
+ {
+ ++itsCount;
+ return x > y;
+ }
+
+private:
+ static int itsCount;
+};
+
+int Gt::itsCount = 0;
+
+
+// 25.3.1.1 sort()
+void
+test01()
+{
+ int s1[N];
+ std::copy(B, B + N, s1);
+ VERIFY(std::equal(s1, s1 + N, B));
+
+ std::sort(s1, s1 + N);
+ VERIFY(std::equal(s1, s1 + N, A));
+
+ Gt gt;
+ gt.reset();
+ std::sort(s1, s1 + N, gt);
+ VERIFY(std::equal(s1, s1 + N, C));
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/34095.cc b/libstdc++-v3/testsuite/25_algorithms/sort/34095.cc
new file mode 100644
index 00000000000..46e906b5bc5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/34095.cc
@@ -0,0 +1,33 @@
+// Copyright (C) 2008 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.
+
+#include <vector>
+#include <algorithm>
+
+// libstdc++/34095
+void test01()
+{
+ std::vector<std::vector<int> > v(20000);
+ std::sort(v.begin(), v.end());
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/34636.cc b/libstdc++-v3/testsuite/25_algorithms/sort/34636.cc
new file mode 100644
index 00000000000..9523775300d
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/34636.cc
@@ -0,0 +1,33 @@
+// Copyright (C) 2008 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.
+
+#include <vector>
+#include <algorithm>
+
+// libstdc++/34636
+void test01()
+{
+ std::vector<std::vector<int> > v(2);
+ std::sort(v.begin(), v.end());
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/sort/moveable.cc
new file mode 100644
index 00000000000..168374fa658
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/moveable.cc
@@ -0,0 +1,64 @@
+// { dg-require-rvalref "" }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+#define _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+bool test __attribute__((unused)) = true;
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+using std::partial_sort;
+
+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.1 sort()
+void
+test01()
+{
+ rvalstruct s1[N];
+ std::copy(A, A + N, s1);
+ Container con(s1, s1 + N);
+ std::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/sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..7b417325187
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void sort(iterator_type, iterator_type);
+ template void sort(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..ab354d000e8
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void sort(iterator_type, iterator_type);
+ template void sort(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/vectorbool.cc b/libstdc++-v3/testsuite/25_algorithms/sort/vectorbool.cc
new file mode 100644
index 00000000000..04d69f02f3e
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort/vectorbool.cc
@@ -0,0 +1,44 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <vector>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::vector<bool> b;
+ b.push_back(false);
+ b.push_back(true);
+ b.push_back(false);
+ b.push_back(true);
+ std::sort(b.begin(), b.end());
+ VERIFY( b[0] == false && b[1] == false && b[2] == true && b[3] == true );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..2b68d9444a5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void sort_heap(iterator_type, iterator_type);
+ template void sort_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..62a1f285000
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void sort_heap(iterator_type, iterator_type);
+ template void sort_heap(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc
new file mode 100644
index 00000000000..29188f882ed
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/1.cc
@@ -0,0 +1,56 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.2.12 [lib.alg.partitions] Partitions.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+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 int& x) const
+ { return (x % 2) == 0; }
+};
+
+// 25.2.12 stable_partition()
+void
+test02()
+{
+ using std::stable_partition;
+
+ int s1[N];
+ std::copy(A, A + N, s1);
+
+ stable_partition(s1, s1 + N, Pred());
+ VERIFY(std::equal(s1, s1 + N, B));
+}
+
+int
+main()
+{
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..fafcf50cd68
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type stable_partition(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..c72b74ecfda
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, bool> predicate_type;
+
+ template iterator_type stable_partition(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/2.cc
new file mode 100644
index 00000000000..3d8299a75a1
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/2.cc
@@ -0,0 +1,89 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.1 algorithms, sort()
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
+const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
+const int C[] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+const int logN = 3; // ln(N) rounded up
+const int P = 7;
+
+// comparison predicate for stable_sort: order by rightmost digit
+struct CompLast
+{
+ bool
+ operator()(const int x, const int y)
+ { return x % 10 < y % 10; }
+};
+
+// This functor has the equivalent functionality of std::geater<>,
+// but there is no dependency on <functional> and it also tracks the
+// number of invocations since creation.
+class Gt
+{
+public:
+ static int count() { return itsCount; }
+ static void reset() { itsCount = 0; }
+
+ bool
+ operator()(const int& x, const int& y)
+ {
+ ++itsCount;
+ return x > y;
+ }
+
+private:
+ static int itsCount;
+};
+
+int Gt::itsCount = 0;
+
+// 25.3.1.2 stable_sort()
+void
+test02()
+{
+ int s1[N];
+ std::copy(A, A + N, s1);
+ VERIFY(std::equal(s1, s1 + N, A));
+
+ std::stable_sort(s1, s1 + N, CompLast());
+ VERIFY(std::equal(s1, s1 + N, B));
+
+ std::stable_sort(s1, s1 + N);
+ VERIFY(std::equal(s1, s1 + N, A));
+
+ Gt gt;
+ gt.reset();
+ std::stable_sort(s1, s1 + N, gt);
+ VERIFY(std::equal(s1, s1 + N, C));
+ VERIFY(gt.count() <= N * logN * logN);
+}
+
+int
+main()
+{
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..e5235f278e5
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void stable_sort(iterator_type, iterator_type);
+ template void stable_sort(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..0e79ea26c10
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/stable_sort/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template void stable_sort(iterator_type, iterator_type);
+ template void stable_sort(iterator_type, iterator_type, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..1a2ae902fe3
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+
+ template void swap(value_type&, value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..6bd282bdc6f
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/swap/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+
+ template void swap(value_type&, value_type&);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc
new file mode 100644
index 00000000000..f1d842441a9
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/moveable.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.4 Swap Ranges
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <algorithm>
+#include <testsuite_iterators.h>
+
+using __gnu_test::forward_iterator_wrapper;
+
+class X
+{
+ X();
+ X(const X&);
+ void operator=(const X&);
+};
+
+void
+swap(X&, X&) { }
+
+void
+test1(forward_iterator_wrapper<X>& begin, forward_iterator_wrapper<X>& end,
+ forward_iterator_wrapper<X>& begin2)
+{ std::swap_ranges(begin, end, begin2); }
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..4ead40aeb7a
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type swap_ranges(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..f4ca2fa8327
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template iterator_type swap_ranges(iterator_type, iterator_type,
+ iterator_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..730b8fa898b
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,49 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, value_type> operator1_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, value_type> operator2_type;
+
+ template iterator_type transform(iterator_type, iterator_type, iterator_type,
+ operator1_type);
+ template iterator_type transform(iterator_type, iterator_type, iterator_type,
+ iterator_type, operator2_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..d8ec04317bf
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::pointer_to_unary_function<value_type, value_type> operator1_type;
+ typedef std::pointer_to_binary_function<value_type, value_type, value_type> operator2_type;
+
+ template iterator_type transform(iterator_type, iterator_type, iterator_type,
+ operator1_type);
+ template iterator_type transform(iterator_type, iterator_type, iterator_type,
+ iterator_type, operator2_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/unique/moveable.cc
new file mode 100644
index 00000000000..13bcc1b22fd
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/unique/moveable.cc
@@ -0,0 +1,73 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// 25.2.8 [lib.alg.unique] Unique
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+#include <vector>
+#include <algorithm>
+#include <functional>
+#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::rvalstruct;
+
+typedef test_container<rvalstruct, forward_iterator_wrapper> Container;
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int intarray1[] = {1, 4, 4, 6, 1, 2, 2, 3, 1, 6, 6, 6, 5, 7, 5, 4, 4};
+ int intarray2[] = {1, 1, 1, 2, 2, 1, 1, 7, 6, 6, 7, 8, 8, 8, 8, 9, 9};
+
+ const int N = sizeof(intarray1) / sizeof(int);
+
+ rvalstruct T1[N];
+ rvalstruct T2[N];
+
+ std::copy(intarray1,intarray1 + N, T1);
+ std::copy(intarray2,intarray2 + N, T2);
+
+ const int A1[] = {1, 4, 6, 1, 2, 3, 1, 6, 5, 7, 5, 4};
+ const int B1[] = {1, 2, 1, 7, 6, 7, 8, 9};
+
+ Container con(T1, T1 + N);
+
+ VERIFY(std::unique(con.begin(), con.end()).ptr - T1 == 12);
+ for(int i = 0; i < 12; ++i)
+ VERIFY(T1[i].val == A1[i]);
+
+ Container con2(T2, T2 + N);
+ VERIFY(std::unique(con2.begin(), con2.end()).ptr - T2 == 8);
+ for(int i = 0; i < 8; ++i)
+ VERIFY(T2[i].val == B1[i]);
+}
+
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..7c1eeebbdba
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> predicate_type;
+
+ template iterator_type unique(iterator_type, iterator_type);
+ template iterator_type unique(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..2eb368a6a59
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/unique/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> predicate_type;
+
+ template iterator_type unique(iterator_type, iterator_type);
+ template iterator_type unique(iterator_type, iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..dbed82a0013
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* in_iterator_type;
+ typedef value_type* out_iterator_type;
+ typedef std::less<value_type> predicate_type;
+
+ template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type);
+ template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..ef1e41ff058
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,46 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* in_iterator_type;
+ typedef value_type* out_iterator_type;
+ typedef std::less<value_type> predicate_type;
+
+ template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type);
+ template out_iterator_type unique_copy(in_iterator_type, in_iterator_type, out_iterator_type, predicate_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/2.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/2.cc
new file mode 100644
index 00000000000..1fac53cd730
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/2.cc
@@ -0,0 +1,81 @@
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 25.3.3 [lib.alg.binary.search] Binary search algorithms.
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+bool test __attribute__((unused)) = true;
+
+const int A[] = {1, 2, 3, 3, 3, 5, 8};
+const int C[] = {8, 5, 3, 3, 3, 2, 1};
+const int N = sizeof(A) / sizeof(int);
+
+// A comparison, equalivalent to std::greater<int> without the
+// dependency on <functional>.
+struct gt
+{
+ bool
+ operator()(const int& x, const int& y) const
+ { return x > y; }
+};
+
+// Each test performs general-case, bookend, not-found condition,
+// and predicate functional checks.
+
+// 25.3.3.2 upper_bound, with and without comparison predicate
+void
+test02()
+{
+ using std::upper_bound;
+
+ const int first = A[0];
+ const int last = A[N - 1];
+
+ const int* p = upper_bound(A, A + N, 3);
+ VERIFY(p == A + 5);
+
+ const int* q = upper_bound(A, A + N, first);
+ VERIFY(q == A + 1);
+
+ const int* r = upper_bound(A, A + N, last);
+ VERIFY(r == A + N);
+
+ const int* s = upper_bound(A, A + N, 4);
+ VERIFY(s == A + 5);
+
+ const int* t = upper_bound(C, C + N, 3, gt());
+ VERIFY(t == C + 5);
+
+ const int* u = upper_bound(C, C + N, first, gt());
+ VERIFY(u == C + N);
+
+ const int* v = upper_bound(C, C + N, last, gt());
+ VERIFY(v == C + 1);
+
+ const int* w = upper_bound(C, C + N, 4, gt());
+ VERIFY(w == C + 2);
+}
+
+int
+main()
+{
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/33613.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/33613.cc
new file mode 100644
index 00000000000..a178428d363
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/33613.cc
@@ -0,0 +1,36 @@
+// 2007-10-02 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-do compile }
+
+// libstdc++/33613
+
+#include <algorithm>
+
+struct A { };
+struct B { };
+
+bool ba(B, A);
+
+void test01(A* a, B b)
+{
+ std::upper_bound(a, a, b, ba);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..66f80924471
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,48 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <functional>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type upper_bound(iterator_type, iterator_type,
+ const value_type&);
+ template iterator_type upper_bound(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..fa155862460
--- /dev/null
+++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,47 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <algorithm>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+ typedef std::less<value_type> compare_type;
+
+ template iterator_type upper_bound(iterator_type, iterator_type,
+ const value_type&);
+ template iterator_type upper_bound(iterator_type, iterator_type,
+ const value_type&, compare_type);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/accumulate/1.cc b/libstdc++-v3/testsuite/26_numerics/accumulate/1.cc
new file mode 100644
index 00000000000..046532debef
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/accumulate/1.cc
@@ -0,0 +1,54 @@
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 26.4.1 [lib.accumulate]
+
+#include <numeric>
+#include <testsuite_hooks.h>
+
+int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+const int NA = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int res = std::accumulate(A, A + NA, 11);
+ VERIFY( res == 66 );
+}
+
+bool B[] = {true, false, true, true, false, true, false, true, true, false};
+const int NB = sizeof(B) / sizeof(bool);
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ int res = std::accumulate(B, B + NB, 100);
+ VERIFY( res == 106 );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..58438b7d261
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,41 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_api.h>
+
+namespace std
+{
+ typedef __gnu_test::NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template value_type accumulate(iterator_type, iterator_type, value_type);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..da7e0d9046e
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/accumulate/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,41 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_character.h>
+
+namespace std
+{
+ typedef __gnu_test::pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template value_type accumulate(iterator_type, iterator_type, value_type);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc
new file mode 100644
index 00000000000..5501f3f9fa6
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/1.cc
@@ -0,0 +1,46 @@
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 26.4.3 [lib.partial.sum]
+// 26.4.4 [lib.adjacent.difference]
+
+#include <algorithm>
+#include <numeric>
+#include <testsuite_hooks.h>
+
+int A[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100};
+int B[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int D[N];
+
+ std::adjacent_difference(A, A + N, D);
+ VERIFY( std::equal(D, D + N, B) );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..d304e49e257
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* input_iterator;
+ typedef value_type* output_iterator;
+
+ template
+ output_iterator adjacent_difference(input_iterator, input_iterator, output_iterator);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..914afcda992
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/adjacent_difference/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* input_iterator;
+ typedef value_type* output_iterator;
+
+ template
+ output_iterator adjacent_difference(input_iterator, input_iterator, output_iterator);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
new file mode 100644
index 00000000000..c034f3a151f
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
@@ -0,0 +1,47 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// { dg-do compile }
+
+#include <cmath>
+#include <string>
+
+struct employee
+: private std::string { };
+
+struct manager
+: public employee { };
+
+bool isnormal(const employee&)
+{ return false; }
+
+// libstdc++/25913
+void test01()
+{
+ manager m;
+ isnormal(m);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
index f7b714fbcfa..dca23e73f6a 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
@@ -27,7 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-// { dg-do compile { xfail { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } } }
+// { dg-do compile }
+// { dg-xfail-if "" { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } { "*" } { "" } }
// { dg-excess-errors "" { target { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } } }
#include <math.h>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc
new file mode 100644
index 00000000000..3e3b3de15dd
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-D_GLIBCXX_PARALLEL -fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <numeric>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric.cc
new file mode 100644
index 00000000000..d2d531e9ab6
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric.cc
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <parallel/numeric>
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc
new file mode 100644
index 00000000000..425fd59c34b
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc
@@ -0,0 +1,38 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <parallel/numeric>
+#include <numeric>
+#include <vector>
+#include <numeric>
+
+void test()
+{
+ typedef unsigned short value_type;
+ typedef std::vector<value_type> vector_type;
+
+ const value_type c(0);
+
+ vector_type v(10);
+ std::accumulate(v.begin(), v.end(), value_type(1));
+ __gnu_parallel::accumulate(v.begin(), v.end(), value_type(1));
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc
new file mode 100644
index 00000000000..d7bdfc1a511
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+// { dg-require-parallel-mode "" }
+// { dg-options "-fopenmp" { target *-*-* } }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Make sure to test without _GLIBCXX_PARALLEL
+#ifdef _GLIBCXX_PARALLEL
+# undef _GLIBCXX_PARALLEL
+#endif
+
+#include <parallel/numeric>
+#include <numeric>
+#include <vector>
+#include <numeric>
+
+void test()
+{
+ typedef unsigned short value_type;
+ typedef std::vector<value_type> vector_type;
+
+ const value_type c(0);
+
+ vector_type v(10);
+ std::accumulate(v.begin(), v.end(), value_type(1));
+ __gnu_parallel::accumulate(v.begin(), v.end(), value_type(1));
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/inner_product/1.cc b/libstdc++-v3/testsuite/26_numerics/inner_product/1.cc
new file mode 100644
index 00000000000..d63c1d91099
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/inner_product/1.cc
@@ -0,0 +1,56 @@
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 26.4.2 [lib.inner_product]
+
+#include <numeric>
+#include <testsuite_hooks.h>
+
+int A1[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+int A2[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29};
+const int NA = sizeof(A1) / sizeof(int);
+
+bool B1[] = {false, true, true, false, true, false, true, true, false, true};
+bool B2[] = {true, false, true, true, false, true, false, true, true, false};
+const int NB = sizeof(B1) / sizeof(bool);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int res = std::inner_product(A1, A1 + NA, A2, 31);
+ VERIFY( res == 983 );
+}
+
+void
+test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ int res = std::inner_product(B1, B1 + NB, B2, 100);
+ VERIFY( res == 102 );
+}
+
+int
+main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..56e2edd55e5
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* iterator_type;
+
+ template value_type inner_product(iterator_type, iterator_type, iterator_type, value_type);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..da72492e4cd
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/inner_product/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,43 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* iterator_type;
+
+ template value_type inner_product(iterator_type, iterator_type, iterator_type, value_type);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc b/libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc
deleted file mode 100644
index e5af462da01..00000000000
--- a/libstdc++-v3/testsuite/26_numerics/numeric_operations/sum_diff.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.3 [lib.partial.sum]
-// 26.4.4 [lib.adjacent.difference]
-
-#include <algorithm>
-#include <numeric>
-#include <testsuite_hooks.h>
-
-int A[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100};
-int B[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
-const int N = sizeof(A) / sizeof(int);
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
-
- int D[N];
-
- std::adjacent_difference(A, A + N, D);
- VERIFY( std::equal(D, D + N, B) );
-
- std::partial_sum(D, D + N, D);
- VERIFY( std::equal(D, D + N, A) );
-}
-
-int
-main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc
new file mode 100644
index 00000000000..ac336916656
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/1.cc
@@ -0,0 +1,46 @@
+// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 26.4.3 [lib.partial.sum]
+// 26.4.4 [lib.adjacent.difference]
+
+#include <algorithm>
+#include <numeric>
+#include <testsuite_hooks.h>
+
+int A[] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100};
+int B[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
+const int N = sizeof(A) / sizeof(int);
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ int D[N];
+
+ std::partial_sum(B, B + N, D);
+ VERIFY( std::equal(D, D + N, A) );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0887e17b35b
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_api.h>
+
+namespace std
+{
+ using __gnu_test::NonDefaultConstructible;
+
+ typedef NonDefaultConstructible value_type;
+ typedef value_type* input_iterator;
+ typedef value_type* output_iterator;
+
+ template output_iterator partial_sum(input_iterator, input_iterator, output_iterator);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc
new file mode 100644
index 00000000000..381eb89307a
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/partial_sum/requirements/explicit_instantiation/pod.cc
@@ -0,0 +1,44 @@
+// { dg-do compile }
+
+// 2007-09-20 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <numeric>
+#include <testsuite_character.h>
+
+namespace std
+{
+ using __gnu_test::pod_int;
+
+ typedef pod_int value_type;
+ typedef value_type* input_iterator;
+ typedef value_type* output_iterator;
+
+ template output_iterator partial_sum(input_iterator, input_iterator, output_iterator);
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice.cc b/libstdc++-v3/testsuite/26_numerics/slice/1.cc
index d7ad877d9d7..d7ad877d9d7 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice/1.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/array_assignment.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/array_assignment.cc
index 34888be44e9..34888be44e9 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/array_assignment.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice_array/array_assignment.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/explicit_instantiation.cc
index 09dfed62745..09dfed62745 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/explicit_instantiation.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/typedefs.cc
index 15295511a1a..15295511a1a 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/slice_array/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice_array/requirements/typedefs.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/27867.cc b/libstdc++-v3/testsuite/26_numerics/valarray/27867.cc
index 7c208f4b100..7c208f4b100 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/27867.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/27867.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/28277.cc b/libstdc++-v3/testsuite/26_numerics/valarray/28277.cc
index 52f4c714085..52f4c714085 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/28277.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/28277.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/30416.cc b/libstdc++-v3/testsuite/26_numerics/valarray/30416.cc
index c51329221d5..c51329221d5 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/30416.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/30416.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/33084.cc b/libstdc++-v3/testsuite/26_numerics/valarray/33084.cc
new file mode 100644
index 00000000000..aaacfe7ee59
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/33084.cc
@@ -0,0 +1,48 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+// { dg-do compile }
+
+#include <valarray>
+
+// libstdc++/33084
+void test01()
+{
+ std::valarray<char> vc(char(0), 10);
+ std::valarray<bool> res(10);
+ char c(0);
+
+ res = vc == vc;
+ res = vc == c;
+ res = c == vc;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/algo.cc b/libstdc++-v3/testsuite/26_numerics/valarray/algo.cc
index a69ce65e079..a69ce65e079 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/algo.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/algo.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/binary_closure.cc b/libstdc++-v3/testsuite/26_numerics/valarray/binary_closure.cc
index 7dbcfbd5228..7dbcfbd5228 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/binary_closure.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/binary_closure.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/const_bracket.cc b/libstdc++-v3/testsuite/26_numerics/valarray/const_bracket.cc
index 512cbafd3ce..512cbafd3ce 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/const_bracket.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/const_bracket.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/dr543.cc b/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc
index 9afa93a4b83..9afa93a4b83 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/dr543.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/name_lookup.cc b/libstdc++-v3/testsuite/26_numerics/valarray/name_lookup.cc
index 735f65f5df7..735f65f5df7 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/name_lookup.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/name_lookup.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/operators.cc b/libstdc++-v3/testsuite/26_numerics/valarray/operators.cc
index 70ad0b0e788..70ad0b0e788 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/operators.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/operators.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/explicit_instantiation.cc
index d4d5e283048..d4d5e283048 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/explicit_instantiation.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/explicit_instantiation.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/typedefs.cc b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/typedefs.cc
index a6f28dc41a6..a6f28dc41a6 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/requirements/typedefs.cc
diff --git a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/subset_assignment.cc b/libstdc++-v3/testsuite/26_numerics/valarray/subset_assignment.cc
index 4ce22afb31a..4ce22afb31a 100644
--- a/libstdc++-v3/testsuite/26_numerics/numeric_arrays/valarray/subset_assignment.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray/subset_assignment.cc
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/4.cc
index dde8086999a..1c8d9ea21f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/4.cc
@@ -1,6 +1,6 @@
// 2006-10-01 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -18,11 +18,12 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-fileio "" }
+
#include <fstream>
#include <testsuite_hooks.h>
-// As an extension to Table 92, consistently with the C standards, we also
-// allow in|out|app and in|out|app|binary.
+// DR 596.
void test01()
{
bool test __attribute__((unused)) = true;
@@ -30,17 +31,38 @@ void test01()
std::fstream scratch_file;
+ scratch_file.open(name, std::ios_base::app);
+ VERIFY( scratch_file );
+ VERIFY( scratch_file.is_open() );
+ scratch_file.close();
+
scratch_file.open(name, std::ios_base::in | std::ios_base::out
| std::ios_base::app);
VERIFY( scratch_file );
VERIFY( scratch_file.is_open() );
scratch_file.close();
+ scratch_file.open(name, std::ios_base::in | std::ios_base::app);
+ VERIFY( scratch_file );
+ VERIFY( scratch_file.is_open() );
+ scratch_file.close();
+
+ scratch_file.open(name, std::ios_base::app | std::ios_base::binary);
+ VERIFY( scratch_file );
+ VERIFY( scratch_file.is_open() );
+ scratch_file.close();
+
scratch_file.open(name, std::ios_base::in | std::ios_base::out
| std::ios_base::app | std::ios_base::binary);
VERIFY( scratch_file );
VERIFY( scratch_file.is_open() );
scratch_file.close();
+
+ scratch_file.open(name, std::ios_base::in | std::ios_base::app
+ | std::ios_base::binary);
+ VERIFY( scratch_file );
+ VERIFY( scratch_file.is_open() );
+ scratch_file.close();
}
int
diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C
new file mode 100644
index 00000000000..0167d1db790
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/16251.C
@@ -0,0 +1,42 @@
+// Copyright (C) 2008 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.
+
+// 27.6.1.5 - Template class basic_iostream
+
+#include <iostream>
+
+class mystream
+: public std::iostream
+{
+public:
+ mystream () { };
+};
+
+// libstdc++/16251
+void test01()
+{
+ mystream x;
+ x.rdbuf(std::cout.rdbuf());
+ x << std::endl;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc
index e0af3ebd3e6..014ab7164a8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc
@@ -1,6 +1,7 @@
// 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -19,8 +20,7 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-// 27.8.1.1 - Template class basic_filebuf
-// NB: This file is for testing basic_filebuf with NO OTHER INCLUDES.
+// 27.6.1.5 - Template class basic_iostream
#include <iostream>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
index 7a979be7d38..a5164dc94c9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
@@ -1,6 +1,7 @@
// 2001-06-05 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+// 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
@@ -50,10 +51,11 @@ void test03()
bool test __attribute__((unused)) = true;
// input streams
- pod_ushort arr[6] = { value_type('a'), value_type('b'),
- value_type('c'), value_type('d'), value_type('e') };
+ pod_ushort arr[6] = { { value_type('a') }, { value_type('b') },
+ { value_type('c') }, { value_type('d') },
+ { value_type('e') } };
- try
+ try
{
iss >> arr;
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
index d4dd4f117d7..4f3c1b15758 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004 Free Software Foundation
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,7 +30,7 @@ void test01()
wistringstream stream;
VERIFY( stream.rdstate() == ios_base::goodbit );
wistringstream::int_type c = stream.peek();
- VERIFY( c == istringstream::traits_type::eof() );
+ VERIFY( c == wistringstream::traits_type::eof() );
VERIFY( stream.rdstate() == ios_base::eofbit );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
index f79fb064ccc..9c68320bf17 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2006 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -38,7 +38,7 @@ void test01()
oss_01 << 'a';
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
index cc02979cb5e..3ef1f8c4362 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
index 736c8a8ae94..6213ad1f4be 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
index ae13c5267e3..dc5ffe5dff2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -38,7 +38,7 @@ void test01()
oss_01 << L'a';
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
index 1a13e04fc40..e80242cf0a7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc
new file mode 100644
index 00000000000..71c93e8d1b9
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc
@@ -0,0 +1,74 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <ostream>
+#include <sstream>
+#include <system_error>
+#include <algorithm>
+#include <testsuite_hooks.h>
+
+// Effects: os << ec.category().name() << ':' << ec.value();
+void test()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ char buf[64];
+ error_code e1;
+ error_code e2(posix_error::bad_address);
+ string s, s1, s2;
+
+ {
+ ostringstream ostr;
+ ostr << e1 << endl;
+ s1 = ostr.str();
+
+ if (ostr.rdstate() & ios_base::eofbit)
+ test = false;
+ }
+ VERIFY( test );
+ VERIFY( find(s1.begin(), s1.end(), ':') != s1.end() );
+
+ sprintf(buf, "%i", e1.value());
+ s = buf;
+ VERIFY( s1.find(s) != string::npos);
+
+ {
+ ostringstream ostr;
+ ostr << e2 << endl;
+ s2 = ostr.str();
+
+ if (ostr.rdstate() & ios_base::eofbit)
+ test = false;
+ }
+ VERIFY( test );
+ VERIFY( find(s2.begin(), s2.end(), ':') != s2.end() );
+
+ sprintf(buf, "%i", e2.value());
+ s = buf;
+ VERIFY( s2.find(s) != string::npos);
+}
+
+int
+main()
+{
+ test();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc
new file mode 100644
index 00000000000..73c838b4399
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc
@@ -0,0 +1,75 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <ostream>
+#include <sstream>
+#include <system_error>
+#include <algorithm>
+#include <wchar.h>
+#include <testsuite_hooks.h>
+
+// Effects: os << ec.category().name() << ':' << ec.value();
+void test()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ wchar_t buf[64];
+ error_code e1;
+ error_code e2(posix_error::bad_address);
+ wstring s, s1, s2;
+
+ {
+ wostringstream ostr;
+ ostr << e1 << endl;
+ s1 = ostr.str();
+
+ if (ostr.rdstate() & ios_base::eofbit)
+ test = false;
+ }
+ VERIFY( test );
+ VERIFY( find(s1.begin(), s1.end(), L':') != s1.end() );
+
+ swprintf(buf, 64, L"%i", e1.value());
+ s = buf;
+ VERIFY( s1.find(s) != string::npos);
+
+ {
+ wostringstream ostr;
+ ostr << e2 << endl;
+ s2 = ostr.str();
+
+ if (ostr.rdstate() & ios_base::eofbit)
+ test = false;
+ }
+ VERIFY( test );
+ VERIFY( find(s2.begin(), s2.end(), L':') != s2.end() );
+
+ swprintf(buf, 64, L"%i", e2.value());
+ s = buf;
+ VERIFY( s2.find(s) != string::npos);
+}
+
+int
+main()
+{
+ test();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
index ca3f919a823..83989ff400f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
@@ -106,11 +106,11 @@ void test01()
buf01.pub_setg(lit01, lit01, (lit01 + i01));
VERIFY( i01 == buf01.in_avail() );
- VERIFY( buf01.pub_uflow() == lit01[0] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
- VERIFY( buf01.pub_uflow() == lit01[1] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
- VERIFY( buf01.pub_uflow() == lit01[2] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
VERIFY( buf01.sgetc() == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
index ecd9b4c5f04..009af5d24b8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
@@ -106,11 +106,11 @@ void test01()
buf01.pub_setg(lit01, lit01, (lit01 + i01));
VERIFY( i01 == buf01.in_avail() );
- VERIFY( buf01.pub_uflow() == lit01[0] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
- VERIFY( buf01.pub_uflow() == lit01[1] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
- VERIFY( buf01.pub_uflow() == lit01[2] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
VERIFY( buf01.sgetc() == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
index 9fc9a62cfd4..60ae6812fae 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -47,8 +48,8 @@ void test04()
int_type c1 = strb_01.sbumpc();
int_type c2 = strb_02.sbumpc();
VERIFY( c1 != c2 );
- VERIFY( c1 == str_01[0] );
- VERIFY( c2 == str_02[0] ); //should equal first letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
int_type c3 = strb_01.sbumpc();
int_type c4 = strb_02.sbumpc();
VERIFY( c1 != c2 );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
index fa9dda8a8d8..5d583089883 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
@@ -47,8 +47,8 @@ void test04()
int_type c1 = strb_01.sbumpc();
int_type c2 = strb_02.sbumpc();
VERIFY( c1 != c2 );
- VERIFY( c1 == str_01[0] );
- VERIFY( c2 == str_02[0] ); //should equal first letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
int_type c3 = strb_01.sbumpc();
int_type c4 = strb_02.sbumpc();
VERIFY( c1 != c2 );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
index 4a2b54821cc..6b6ad590440 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -83,8 +84,8 @@ void test04()
c2 = strb_02.sgetc();
VERIFY( c6 == c1 ); //just by co-incidence both o's
VERIFY( c7 != c2 ); // n != i
- VERIFY( c1 == str_01[13] );
- VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
strmsz_1 = strb_03.sgetn(carray1, 10);
VERIFY( !strmsz_1 ); //zero
strmsz_1 = strb_02.in_avail();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
index b7fda2f15c0..f77cb97c376 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -83,8 +84,8 @@ void test04()
c2 = strb_02.sgetc();
VERIFY( c6 == c1 ); //just by co-incidence both o's
VERIFY( c7 != c2 ); // n != i
- VERIFY( c1 == str_01[13] );
- VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
strmsz_1 = strb_03.sgetn(carray1, 10);
VERIFY( !strmsz_1 ); //zero
strmsz_1 = strb_02.in_avail();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
index ddaa51e5bde..1383f83fb0d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -62,8 +63,8 @@ void test04()
c7 = strb_02.snextc();
VERIFY( c6 != c8 );
VERIFY( c7 != c9 );
- VERIFY( c6 == str_01[3] );
- VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
+ VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
+ VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
c5 = strb_03.snextc();
VERIFY( c5 == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
index 3cfaab2362d..955390b8030 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 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
@@ -62,8 +63,8 @@ void test04()
c7 = strb_02.snextc();
VERIFY( c6 != c8 );
VERIFY( c7 != c9 );
- VERIFY( c6 == str_01[3] );
- VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
+ VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
+ VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
c5 = strb_03.snextc();
VERIFY( c5 == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc b/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
index 85e1d432eb3..1e492d06d03 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/14320-1.cc
@@ -20,7 +20,7 @@
// 27.4.3 fpos
-// { dg-do run { xfail *-*-* } }
+// { dg-do run }
#include <typeinfo>
#include <limits>
@@ -36,6 +36,11 @@ void test01()
typedef istreambuf_iterator<char>::difference_type Distance;
bool found = false;
+ // The C++ standard didn't originally have "long long", however that
+ // type will be in the C++0x standard and testing for it allows
+ // ilp32 targets to pass this test when `Distance' is 64 bits.
+ if (typeid(Distance) == typeid(long long int))
+ found = true;
if (typeid(Distance) == typeid(long int))
found = true;
if (typeid(Distance) == typeid(int))
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
index ec27d187e7b..5325523a0cc 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
@@ -1,6 +1,7 @@
// { dg-do compile }
-// Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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
@@ -40,7 +41,7 @@ void test01()
test_base io2;
io1 = io2;
}
-// { dg-error "synthesized" "" { target *-*-* } 41 }
-// { dg-error "within this context" "" { target *-*-* } 34 }
-// { dg-error "is private" "" { target *-*-* } 790 }
+// { dg-error "synthesized" "" { target *-*-* } 42 }
+// { dg-error "within this context" "" { target *-*-* } 35 }
+// { dg-error "is private" "" { target *-*-* } 786 }
// { dg-error "operator=" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
index 0c6bb296d38..536682eb6f3 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
@@ -1,6 +1,7 @@
// { dg-do compile }
-// Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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
@@ -40,7 +41,7 @@ void test02()
test_base io1;
test_base io2 = io1;
}
-// { dg-error "within this context" "" { target *-*-* } 35 }
-// { dg-error "synthesized" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 787 }
+// { dg-error "within this context" "" { target *-*-* } 36 }
+// { dg-error "synthesized" "" { target *-*-* } 42 }
+// { dg-error "is private" "" { target *-*-* } 783 }
// { dg-error "copy constructor" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9.cc b/libstdc++-v3/testsuite/27_io/objects/char/9.cc
index 6ad7c47278e..4da987b94f8 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/9.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/9.cc
@@ -17,6 +17,8 @@
// 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.
+
+// { dg-require-fileio "" }
#include <iostream>
#include <cstdio>
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index a881b9f1a2a..407d7c95f91 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -1,6 +1,6 @@
## Makefile for the testsuite subdirectory of the GNU C++ Standard library.
##
-## Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
@@ -25,9 +25,6 @@ AUTOMAKE_OPTIONS = dejagnu nostdinc
include $(top_srcdir)/fragment.am
-AM_MAKEFLAGS = -j1
-AM_RUNTESTFLAGS =
-
# Generated lists of files to run. All of these names are valid make
# targets, if you wish to generate a list manually.
lists_of_files = \
@@ -114,20 +111,42 @@ check-performance: testsuite_files_performance ${performance_script}
-@(chmod + ${check_performance_script}; \
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
-# Generates the plots and graphs for performance testing.
-doc_performance_script=${glibcxx_srcdir}/scripts/make_graphs.py
-doc-performance:
- -@(chmod + ${doc_performance_script}; \
- ${doc_performance_script} ${glibcxx_srcdir} \
- ${glibcxx_builddir}/testsuite \
- ${glibcxx_srcdir}/testsuite/data/make_graph_htmls.xml \
- ${glibcxx_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
+# Runs the testsuite in parallel mode.
+libgomp_dir=${glibcxx_builddir}/../libgomp
+libgomp_flags=-B${glibcxx_builddir}/../libgomp \
+ -I${glibcxx_builddir}/../libgomp \
+ -L${glibcxx_builddir}/../libgomp/.libs -lgomp
+
+atomic_flags=$(ATOMIC_FLAGS)
+parallel_flags="unix/-D_GLIBCXX_PARALLEL/-fopenmp"
+
+check-parallel: site.exp
+ -@(if test ! -d $${libgomp_dir}; then \
+ echo "Testing parallel mode failed as libgomp not present."; \
+ exit 1; \
+ fi; \
+ outputdir=parallel; 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) $(libgomp_flags)" RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(parallel_flags)" check-DEJAGNU; )
+
+check-performance-parallel: testsuite_files_performance ${performance_script}
+ -@(chmod + ${check_performance_script}; \
+ CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \
+ ${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
.PHONY: baseline_symbols new-abi-baseline \
- check-abi check-compile check-performance
+ check-abi check-compile check-performance check-parallel
# 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 \
- *.o *.cc *.a *.so *.xml
+ *.s *.o *.cc *.a *.so *.xml
+
+# To remove directories.
+clean-local:
+ rm -rf parallel
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index f700c5b524d..44749597aef 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -41,6 +41,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = testsuite
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+ $(top_srcdir)/../config/futex.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
@@ -75,6 +76,7 @@ AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@
+ATOMIC_FLAGS = @ATOMIC_FLAGS@
ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -112,6 +114,8 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_PARALLEL_FALSE = @ENABLE_PARALLEL_FALSE@
+ENABLE_PARALLEL_TRUE = @ENABLE_PARALLEL_TRUE@
ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
@@ -122,6 +126,7 @@ ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
ENABLE_VISIBILITY_FALSE = @ENABLE_VISIBILITY_FALSE@
ENABLE_VISIBILITY_TRUE = @ENABLE_VISIBILITY_TRUE@
+ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
@@ -273,8 +278,6 @@ WARN_CXXFLAGS = \
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
-AM_MAKEFLAGS = -j1
-AM_RUNTESTFLAGS =
# Generated lists of files to run. All of these names are valid make
# targets, if you wish to generate a list manually.
@@ -299,13 +302,19 @@ compile_script = ${glibcxx_srcdir}/scripts/check_compile
# XXX Need to add dependency on libtestc++.a
check_performance_script = ${glibcxx_srcdir}/scripts/check_performance
-# Generates the plots and graphs for performance testing.
-doc_performance_script = ${glibcxx_srcdir}/scripts/make_graphs.py
+# Runs the testsuite in parallel mode.
+libgomp_dir = ${glibcxx_builddir}/../libgomp
+libgomp_flags = -B${glibcxx_builddir}/../libgomp \
+ -I${glibcxx_builddir}/../libgomp \
+ -L${glibcxx_builddir}/../libgomp/.libs -lgomp
+
+atomic_flags = $(ATOMIC_FLAGS)
+parallel_flags = "unix/-D_GLIBCXX_PARALLEL/-fopenmp"
# 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 \
- *.o *.cc *.a *.so *.xml
+ *.s *.o *.cc *.a *.so *.xml
all: all-am
@@ -433,7 +442,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
@@ -479,14 +488,15 @@ ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
- clean-libtool distclean distclean-DEJAGNU distclean-generic \
- distclean-libtool distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-info-am
+ clean-libtool clean-local distclean distclean-DEJAGNU \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-info-am
# This rule generates all of the testsuite_files* lists at once.
@@ -549,15 +559,31 @@ check-compile: testsuite_files ${compile_script}
check-performance: testsuite_files_performance ${performance_script}
-@(chmod + ${check_performance_script}; \
${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
-doc-performance:
- -@(chmod + ${doc_performance_script}; \
- ${doc_performance_script} ${glibcxx_srcdir} \
- ${glibcxx_builddir}/testsuite \
- ${glibcxx_srcdir}/testsuite/data/make_graph_htmls.xml \
- ${glibcxx_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
+
+check-parallel: site.exp
+ -@(if test ! -d $${libgomp_dir}; then \
+ echo "Testing parallel mode failed as libgomp not present."; \
+ exit 1; \
+ fi; \
+ outputdir=parallel; 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) $(libgomp_flags)" RUNTESTFLAGS="$(RUNTESTFLAGS) conformance.exp --outdir $${outputdir} --objdir $${outputdir} --target_board=$(parallel_flags)" check-DEJAGNU; )
+
+check-performance-parallel: testsuite_files_performance ${performance_script}
+ -@(chmod + ${check_performance_script}; \
+ CXXFLAGS="-D_GLIBCXX_PARALLEL -fopenmp $(atomic_flags) $(libgomp_flags)"; export CXXFLAGS; \
+ ${check_performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
.PHONY: baseline_symbols new-abi-baseline \
- check-abi check-compile check-performance
+ check-abi check-compile check-performance check-parallel
+
+# To remove directories.
+clean-local:
+ rm -rf parallel
# 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.
.NOEXPORT:
diff --git a/libstdc++-v3/testsuite/abi/demangle/cxx0x/rref.cc b/libstdc++-v3/testsuite/abi/demangle/cxx0x/rref.cc
new file mode 100644
index 00000000000..cb085b48d51
--- /dev/null
+++ b/libstdc++-v3/testsuite/abi/demangle/cxx0x/rref.cc
@@ -0,0 +1,32 @@
+// 2007-06-28 Douglas Gregor <doug.gregor@gmail.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// IA 64 C++ ABI - 5.1 External Names (a.k.a. Mangling)
+
+#include <testsuite_hooks.h>
+
+int main()
+{
+ using namespace __gnu_test;
+
+ verify_demangle("_Z1fOi", "f(int&&)");
+
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/backward/hash_map/1.cc b/libstdc++-v3/testsuite/backward/hash_map/1.cc
new file mode 100644
index 00000000000..faa97d6f265
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_map/1.cc
@@ -0,0 +1,106 @@
+// { dg-options "-Wno-deprecated" }
+
+// Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// hash_map (SGI extension)
+
+#include <cstdlib>
+#include <string>
+#include <hash_map>
+#include <testsuite_hooks.h>
+
+namespace __gnu_cxx
+{
+ using std::string;
+
+ inline size_t hash_string(const char* s)
+ {
+ unsigned long h;
+ for (h=0; *s; ++s) {
+ h = 5*h + *s;
+ }
+ return size_t(h);
+ }
+
+ template<class T> struct hash<T *>
+ {
+ size_t operator()(const T *const & s) const
+ { return reinterpret_cast<size_t>(s); }
+ };
+
+ template<> struct hash<string>
+ {
+ size_t operator()(const string &s) const { return hash_string(s.c_str()); }
+ };
+
+ template<> struct hash<const string>
+ {
+ size_t operator()(const string &s) const { return hash_string(s.c_str()); }
+ };
+
+ template<class T1, class T2> struct hash<pair<T1,T2> >
+ {
+ hash<T1> __fh;
+ hash<T2> __sh;
+ size_t operator()(const pair<T1,T2> &p) const {
+ return __fh(p.first) ^ __sh(p.second);
+ }
+ };
+}
+
+void test01()
+{
+ const int Size = 5;
+ bool test __attribute__((unused)) = true;
+
+ using std::string;
+ using std::pair;
+ using std::vector;
+ using __gnu_cxx::hash_map;
+
+ for (int i = 0; i < 10; i++)
+ {
+ hash_map<string, int> a;
+ hash_map<string, int> b;
+
+ vector<pair<string, int> > contents (Size);
+ for (int j = 0; j < Size; j++)
+ {
+ string s;
+ for (int k = 0; k < 10; k++)
+ {
+ s += 'a' + (rand() % 26);
+ }
+ contents[j] = make_pair(s,j);
+ }
+ for (int j = 0; j < Size; j++)
+ {
+ a[contents[j].first] = contents[j].second;
+ int k = Size - 1 - j;
+ b[contents[k].first] = contents[k].second;
+ }
+ VERIFY( a == b );
+ }
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/backward/hash_map/14648.cc b/libstdc++-v3/testsuite/backward/hash_map/14648.cc
new file mode 100644
index 00000000000..8c73b2d790d
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_map/14648.cc
@@ -0,0 +1,41 @@
+// { dg-options "-Wno-deprecated" }
+
+// Copyright (C) 2004, 2005, 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <iostream>
+#include <hash_map>
+#include <ext/rope>
+
+// libstdc++/14648
+void test01()
+{
+ using namespace __gnu_cxx;
+
+ typedef hash_map<char, crope, hash<char>, std::equal_to<char> > maptype;
+ maptype m;
+ m['l'] = "50";
+ m['x'] = "10";
+ std::cout << "m['x'] = " << m['x'] << std::endl;
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/backward/hash_map/23528.cc b/libstdc++-v3/testsuite/backward/hash_map/23528.cc
new file mode 100644
index 00000000000..42908eb3134
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_map/23528.cc
@@ -0,0 +1,44 @@
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// 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.
+
+#include <hash_map>
+
+// libstdc++/23528
+void test01()
+{
+ __gnu_cxx::hash_map<int, int> m;
+ m[888] = 999;
+
+ __gnu_cxx::hash_map<int, int>::allocator_type a = m.get_allocator();
+
+ __gnu_cxx::hash_map<int, int>::value_type *y = a.allocate(1);
+
+ a.construct(y, *m.begin());
+
+ a.destroy(y);
+ a.deallocate(y, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..84df423ea61
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_map/requirements/explicit_instantiation.cc
@@ -0,0 +1,35 @@
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
+// Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// This file tests explicit instantiation of library containers
+
+#include <hash_map>
+
+template class __gnu_cxx::hash_map<int, char>;
diff --git a/libstdc++-v3/testsuite/backward/hash_set/1.cc b/libstdc++-v3/testsuite/backward/hash_set/1.cc
new file mode 100644
index 00000000000..b54f022b257
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_set/1.cc
@@ -0,0 +1,41 @@
+// { dg-options "-Wno-deprecated" }
+
+// 2002-04-28 Paolo Carlini <pcarlini@unitus.it>
+// Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+// Copyright (C) 2002, 2004, 2005, 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.
+
+// hash_set (SGI extension)
+
+#include <hash_set>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+ const int werte[] = { 1, 25, 9, 16, -36};
+ const int anzahl = sizeof(werte) / sizeof(int);
+ __gnu_cxx::hash_set<int> intTable(werte, werte + anzahl);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc b/libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc
new file mode 100644
index 00000000000..0e9a3756993
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_set/check_construct_destroy.cc
@@ -0,0 +1,93 @@
+// { dg-options "-Wno-deprecated" }
+
+// 2004-07-26 Matt Austern <austern@apple.com>
+//
+// Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <hash_set>
+#include <functional>
+#include <iterator>
+#include <testsuite_allocator.h>
+
+using namespace __gnu_test;
+
+int main()
+{
+ typedef __gnu_cxx::hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
+ tracker_allocator<int> >
+ Container;
+
+ const int arr10[10] = { 2, 4, 1, 7, 3, 8, 10, 5, 9, 6 };
+ const int arr10a[10] = { 31, 23, 82, 46, 13, 17, 30, 71, 22, 51 };
+ bool ok = true;
+
+ int buckets;
+
+ tracker_allocator_counter::reset();
+ {
+ Container c;
+ buckets = c.bucket_count();
+ ok = check_construct_destroy("empty container", buckets, 0) && ok;
+ }
+ ok = check_construct_destroy("empty container", buckets, buckets) && ok;
+
+
+ tracker_allocator_counter::reset();
+ {
+ Container c(arr10, arr10 + 10);
+ ok = check_construct_destroy("Construct from range", buckets+10, 0) && ok;
+ }
+ ok = check_construct_destroy("Construct from range", buckets+10, buckets+10) && ok;
+
+ tracker_allocator_counter::reset();
+ {
+ Container c(arr10, arr10 + 10);
+ c.insert(arr10a[0]);
+ ok = check_construct_destroy("Insert element", buckets+11, 0) && ok;
+ }
+ ok = check_construct_destroy("Insert element", buckets+11, buckets+11) && ok;
+
+ tracker_allocator_counter::reset();
+ {
+ Container c(arr10, arr10 + 10);
+ c.insert(arr10a, arr10a+3);
+ ok = check_construct_destroy("Insert short range", buckets+13, 0) && ok;
+ }
+ ok = check_construct_destroy("Insert short range", buckets+13, buckets+13) && ok;
+
+ tracker_allocator_counter::reset();
+ {
+ Container c(arr10, arr10 + 10);
+ c.insert(arr10a, arr10a+10);
+ ok = check_construct_destroy("Insert long range", buckets+20, 0) && ok;
+ }
+ ok = check_construct_destroy("Insert long range", buckets+20, buckets+20) && ok;
+
+ return ok ? 0 : 1;
+}
+
diff --git a/libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc
new file mode 100644
index 00000000000..8d01bae374f
--- /dev/null
+++ b/libstdc++-v3/testsuite/backward/hash_set/requirements/explicit_instantiation.cc
@@ -0,0 +1,35 @@
+// { dg-options "-Wno-deprecated" }
+// { dg-do compile }
+
+// Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// This file tests explicit instantiation of library containers
+
+#include <hash_set>
+
+template class __gnu_cxx::hash_set<int>;
diff --git a/libstdc++-v3/testsuite/backward/header_deque_h.cc b/libstdc++-v3/testsuite/backward/header_deque_h.cc
deleted file mode 100644
index d3a7f2b0b1c..00000000000
--- a/libstdc++-v3/testsuite/backward/header_deque_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2001-09-20 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header deque.h
-
-#include <deque.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_hash_map_h.cc b/libstdc++-v3/testsuite/backward/header_hash_map_h.cc
deleted file mode 100644
index cede092eeb4..00000000000
--- a/libstdc++-v3/testsuite/backward/header_hash_map_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header hash_map.h
-
-#include <hash_map.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_hash_set_h.cc b/libstdc++-v3/testsuite/backward/header_hash_set_h.cc
deleted file mode 100644
index 7d32b03ed89..00000000000
--- a/libstdc++-v3/testsuite/backward/header_hash_set_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header hash_set.h
-
-#include <hash_set.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_hashtable_h.cc b/libstdc++-v3/testsuite/backward/header_hashtable_h.cc
deleted file mode 100644
index 4184f11014f..00000000000
--- a/libstdc++-v3/testsuite/backward/header_hashtable_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header hashtable.h
-
-#include <hashtable.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_iterator_h.cc b/libstdc++-v3/testsuite/backward/header_iterator_h.cc
deleted file mode 100644
index 4f301bbb5ff..00000000000
--- a/libstdc++-v3/testsuite/backward/header_iterator_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2001-09-04 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header iterator.h
-
-#include <iterator.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_rope_h.cc b/libstdc++-v3/testsuite/backward/header_rope_h.cc
deleted file mode 100644
index 19edfbbffca..00000000000
--- a/libstdc++-v3/testsuite/backward/header_rope_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header rope.h
-
-#include <rope.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_slist_h.cc b/libstdc++-v3/testsuite/backward/header_slist_h.cc
deleted file mode 100644
index 3a59789061f..00000000000
--- a/libstdc++-v3/testsuite/backward/header_slist_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header slist.h
-
-#include <slist.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc b/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc
deleted file mode 100644
index 4b177b2ac5a..00000000000
--- a/libstdc++-v3/testsuite/backward/header_tempbuf_h.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// 2002-03-15 Philipp Thomas <pthomas@suse.de>
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// backward header tempbuf.h
-
-#include <tempbuf.h>
-#include <testsuite_hooks.h>
-
-// { dg-options "-Wno-deprecated" }
-
-int main(void)
-{
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/config/default.exp b/libstdc++-v3/testsuite/config/default.exp
index c08f6dd61ef..cb869311fca 100644
--- a/libstdc++-v3/testsuite/config/default.exp
+++ b/libstdc++-v3/testsuite/config/default.exp
@@ -31,3 +31,6 @@ proc ${tool}_target_compile { srcfile destfile compile_type options } {
v3_target_compile $srcfile $destfile $compile_type $options
}
+# Support for old dejagnu. Must be loaded here, not in libstdc++.exp, to
+# make sure all existing procs are loaded when their presence is tested.
+load_file $srcdir/../../gcc/testsuite/lib/dejapatches.exp
diff --git a/libstdc++-v3/testsuite/ext/array_allocator/1.cc b/libstdc++-v3/testsuite/ext/array_allocator/1.cc
index 84a6c197ec8..8b7bcbde2af 100644
--- a/libstdc++-v3/testsuite/ext/array_allocator/1.cc
+++ b/libstdc++-v3/testsuite/ext/array_allocator/1.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -25,7 +25,7 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <string>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -38,10 +38,10 @@ array_type extern_array;
void test01()
{
bool test __attribute__((unused)) = true;
-
- using std::basic_string;
+
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
allocator_type a(&extern_array);
string_type s(a);
diff --git a/libstdc++-v3/testsuite/ext/array_allocator/2.cc b/libstdc++-v3/testsuite/ext/array_allocator/2.cc
index f3b30947812..01702e792e8 100644
--- a/libstdc++-v3/testsuite/ext/array_allocator/2.cc
+++ b/libstdc++-v3/testsuite/ext/array_allocator/2.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -25,8 +25,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <string>
#include <iostream>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -40,9 +40,9 @@ void test01()
{
bool test __attribute__((unused)) = true;
- using std::basic_string;
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
allocator_type a(&extern_array);
string_type s(a);
diff --git a/libstdc++-v3/testsuite/ext/array_allocator/3.cc b/libstdc++-v3/testsuite/ext/array_allocator/3.cc
index c9fa348a537..81f8bbd1d15 100644
--- a/libstdc++-v3/testsuite/ext/array_allocator/3.cc
+++ b/libstdc++-v3/testsuite/ext/array_allocator/3.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -25,7 +25,7 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#include <string>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -39,9 +39,9 @@ void test01()
{
bool test __attribute__((unused)) = true;
- using std::basic_string;
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
// Construct array_allocator without underlying array.
allocator_type a;
diff --git a/libstdc++-v3/testsuite/ext/array_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/array_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..5c3f9a57bb0
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/array_allocator/variadic_construct.cc
@@ -0,0 +1,50 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-27 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 20.4.1.1 allocator members
+
+#include <ext/array_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ typedef std::tr1::array<pair_type, 3> array_type;
+ array_type store;
+
+ __gnu_cxx::array_allocator<pair_type, array_type> alloc1(&store);
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/bitmap_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/bitmap_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..4e911e1ca1f
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/bitmap_allocator/variadic_construct.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <ext/bitmap_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::bitmap_allocator<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc b/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
index 3aa7de8cd82..767ae32eb2c 100644
--- a/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
+++ b/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
@@ -1,6 +1,6 @@
// { dg-require-iconv "ISO-8859-1" }
-// Copyright (C) 2004, 2007 Free Software Foundation
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -20,6 +20,7 @@
#include <locale>
#include <cstring>
+#include <cstddef>
#include <testsuite_hooks.h>
#include <ext/enc_filebuf.h>
@@ -41,8 +42,8 @@ int main()
std::streamsize n = fb.sputn(str, std::strlen(str));
int s = fb.pubsync();
fb.close();
-
- VERIFY( n == std::strlen(str) );
+
+ VERIFY( std::size_t(n) == std::strlen(str) );
VERIFY( s == 0 );
return 0;
diff --git a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
index 4ce8c673700..ae6ef0bd623 100644
--- a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
@@ -19,6 +19,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <ext/throw_allocator.h>
#include <testsuite_api.h>
diff --git a/libstdc++-v3/testsuite/ext/hash_map/1.cc b/libstdc++-v3/testsuite/ext/hash_map/1.cc
deleted file mode 100644
index 2062cb01b57..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_map/1.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (C) 2002, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// hash_map (SGI extension)
-
-#include <cstdlib>
-#include <string>
-#include <ext/hash_map>
-#include <testsuite_hooks.h>
-
-namespace __gnu_cxx
-{
- using std::string;
-
- inline size_t hash_string(const char* s)
- {
- unsigned long h;
- for (h=0; *s; ++s) {
- h = 5*h + *s;
- }
- return size_t(h);
- }
-
- template<class T> struct hash<T *>
- {
- size_t operator()(const T *const & s) const
- { return reinterpret_cast<size_t>(s); }
- };
-
- template<> struct hash<string>
- {
- size_t operator()(const string &s) const { return hash_string(s.c_str()); }
- };
-
- template<> struct hash<const string>
- {
- size_t operator()(const string &s) const { return hash_string(s.c_str()); }
- };
-
- template<class T1, class T2> struct hash<pair<T1,T2> >
- {
- hash<T1> __fh;
- hash<T2> __sh;
- size_t operator()(const pair<T1,T2> &p) const {
- return __fh(p.first) ^ __sh(p.second);
- }
- };
-}
-
-void test01()
-{
- const int Size = 5;
- bool test __attribute__((unused)) = true;
-
- using std::string;
- using std::pair;
- using std::vector;
- using __gnu_cxx::hash_map;
-
- for (int i = 0; i < 10; i++)
- {
- hash_map<string, int> a;
- hash_map<string, int> b;
-
- vector<pair<string, int> > contents (Size);
- for (int j = 0; j < Size; j++)
- {
- string s;
- for (int k = 0; k < 10; k++)
- {
- s += 'a' + (rand() % 26);
- }
- contents[j] = make_pair(s,j);
- }
- for (int j = 0; j < Size; j++)
- {
- a[contents[j].first] = contents[j].second;
- int k = Size - 1 - j;
- b[contents[k].first] = contents[k].second;
- }
- VERIFY( a == b );
- }
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/hash_map/14648.cc b/libstdc++-v3/testsuite/ext/hash_map/14648.cc
deleted file mode 100644
index 91f8240e150..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_map/14648.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2004, 2005 Free Software Foundation
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// 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.
-
-#include <iostream>
-#include <ext/hash_map>
-#include <ext/rope>
-
-// libstdc++/14648
-void test01()
-{
- using namespace __gnu_cxx;
-
- typedef hash_map<char, crope, hash<char>, std::equal_to<char> > maptype;
- maptype m;
- m['l'] = "50";
- m['x'] = "10";
- std::cout << "m['x'] = " << m['x'] << std::endl;
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/hash_map/23528.cc b/libstdc++-v3/testsuite/ext/hash_map/23528.cc
deleted file mode 100644
index e651e5b2d3d..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_map/23528.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// { dg-do compile }
-
-#include <ext/hash_map>
-
-// libstdc++/23528
-void test01()
-{
- __gnu_cxx::hash_map<int, int> m;
- m[888] = 999;
-
- __gnu_cxx::hash_map<int, int>::allocator_type a = m.get_allocator();
-
- __gnu_cxx::hash_map<int, int>::value_type *y = a.allocate(1);
-
- a.construct(y, *m.begin());
-
- a.destroy(y);
- a.deallocate(y, 1);
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc
deleted file mode 100644
index 85f1ba258e4..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_map/requirements/explicit_instantiation.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 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.
-
-// This file tests explicit instantiation of library containers
-
-#include <ext/hash_map>
-
-// { dg-do compile }
-
-template class __gnu_cxx::hash_map<int, char>;
diff --git a/libstdc++-v3/testsuite/ext/hash_set/1.cc b/libstdc++-v3/testsuite/ext/hash_set/1.cc
deleted file mode 100644
index da1617cd9ff..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_set/1.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// 2002-04-28 Paolo Carlini <pcarlini@unitus.it>
-// Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
-
-// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-//
-// 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.
-
-// hash_set (SGI extension)
-
-#include <ext/hash_set>
-
-void
-test01()
-{
- bool test __attribute__((unused)) = true;
- const int werte[] = { 1, 25, 9, 16, -36};
- const int anzahl = sizeof(werte) / sizeof(int);
- __gnu_cxx::hash_set<int> intTable(werte, werte + anzahl);
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc b/libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc
deleted file mode 100644
index 4f03e49af5c..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_set/check_construct_destroy.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// 2004-07-26 Matt Austern <austern@apple.com>
-//
-// Copyright (C) 2003 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.
-
-#include <ext/hash_set>
-#include <functional>
-#include <iterator>
-#include <testsuite_allocator.h>
-
-using namespace __gnu_test;
-
-int main()
-{
- typedef __gnu_cxx::hash_set<int, __gnu_cxx::hash<int>, std::equal_to<int>,
- tracker_allocator<int> >
- Container;
-
- const int arr10[10] = { 2, 4, 1, 7, 3, 8, 10, 5, 9, 6 };
- const int arr10a[10] = { 31, 23, 82, 46, 13, 17, 30, 71, 22, 51 };
- bool ok = true;
-
- int buckets;
-
- tracker_allocator_counter::reset();
- {
- Container c;
- buckets = c.bucket_count();
- ok = check_construct_destroy("empty container", buckets, 0) && ok;
- }
- ok = check_construct_destroy("empty container", buckets, buckets) && ok;
-
-
- tracker_allocator_counter::reset();
- {
- Container c(arr10, arr10 + 10);
- ok = check_construct_destroy("Construct from range", buckets+10, 0) && ok;
- }
- ok = check_construct_destroy("Construct from range", buckets+10, buckets+10) && ok;
-
- tracker_allocator_counter::reset();
- {
- Container c(arr10, arr10 + 10);
- c.insert(arr10a[0]);
- ok = check_construct_destroy("Insert element", buckets+11, 0) && ok;
- }
- ok = check_construct_destroy("Insert element", buckets+11, buckets+11) && ok;
-
- tracker_allocator_counter::reset();
- {
- Container c(arr10, arr10 + 10);
- c.insert(arr10a, arr10a+3);
- ok = check_construct_destroy("Insert short range", buckets+13, 0) && ok;
- }
- ok = check_construct_destroy("Insert short range", buckets+13, buckets+13) && ok;
-
- tracker_allocator_counter::reset();
- {
- Container c(arr10, arr10 + 10);
- c.insert(arr10a, arr10a+10);
- ok = check_construct_destroy("Insert long range", buckets+20, 0) && ok;
- }
- ok = check_construct_destroy("Insert long range", buckets+20, buckets+20) && ok;
-
- return ok ? 0 : 1;
-}
-
diff --git a/libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc
deleted file mode 100644
index 9d6f398d4a9..00000000000
--- a/libstdc++-v3/testsuite/ext/hash_set/requirements/explicit_instantiation.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 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.
-
-// This file tests explicit instantiation of library containers
-
-#include <ext/hash_set>
-
-// { dg-do compile }
-
-template class __gnu_cxx::hash_set<int>;
diff --git a/libstdc++-v3/testsuite/ext/headers.cc b/libstdc++-v3/testsuite/ext/headers.cc
index af66604377e..a1bdbb350f5 100644
--- a/libstdc++-v3/testsuite/ext/headers.cc
+++ b/libstdc++-v3/testsuite/ext/headers.cc
@@ -1,7 +1,7 @@
// { dg-do compile }
// 1999-06-23 bkoz
-// Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001, 2003, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -33,8 +33,6 @@
#include <ext/debug_allocator.h>
#include <ext/enc_filebuf.h>
#include <ext/functional>
-#include <ext/hash_map>
-#include <ext/hash_set>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
#include <ext/memory>
diff --git a/libstdc++-v3/testsuite/ext/malloc_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/malloc_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..39163c8e888
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/malloc_allocator/variadic_construct.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <ext/malloc_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::malloc_allocator<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/mt_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..8416c688e52
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/mt_allocator/variadic_construct.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <ext/mt_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::__mt_alloc<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/new_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/new_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..575e23792a5
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/new_allocator/variadic_construct.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <ext/new_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::new_allocator<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc
index 4946155a66e..a9b4affe2a0 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/assoc_container_traits.cc
@@ -57,8 +57,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
template<class DS_Category>
void
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_map.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_map.cc
index cc3bbe3c352..3caacb78f52 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_map.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_map.cc
@@ -55,8 +55,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// The following function performs a sequence of operations on an
// associative container object mapping integers to characters.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multimap.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multimap.cc
index 77390809bb2..a48860597f6 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multimap.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multimap.cc
@@ -56,7 +56,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multiset.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multiset.cc
index 9b5d0aa069d..064e24d3610 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multiset.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_multiset.cc
@@ -61,7 +61,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple priority queue that also supports an "contains" query.
class contains_pq
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_priority_queue.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_priority_queue.cc
index cc7641c2405..beedd0e7a88 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_priority_queue.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_priority_queue.cc
@@ -55,8 +55,7 @@
#include <ext/pb_ds/priority_queue.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// The following function performs a sequence of operations on a
// priority queue object storing integers.
@@ -94,35 +93,35 @@ int main()
{
// Perform operations on a pairing-heap queue.
cout << "Pairing heap" << endl;
- pb_ds::priority_queue<int, less<int>, pairing_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, pairing_heap_tag> c;
some_op_sequence(c);
}
{
// Perform operations on a binomial-heap queue.
cout << "Binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binomial_heap_tag> c;
some_op_sequence(c);
}
{
// Perform operations on a binomial-heap queue.
cout << "Redundant-counter binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
some_op_sequence(c);
}
{
// Perform operations on a binomial-heap queue.
cout << "Binary heap" << endl;
- pb_ds::priority_queue<int, less<int>, binary_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binary_heap_tag> c;
some_op_sequence(c);
}
{
// Perform operations on a thin-heap queue.
cout << "Thin heap" << endl;
- pb_ds::priority_queue<int, less<int>, thin_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, thin_heap_tag> c;
some_op_sequence(c);
}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_set.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_set.cc
index 733dca311d0..12a9ad2af1a 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/basic_set.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/basic_set.cc
@@ -56,8 +56,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// The following function performs a sequence of operations on an
// associative container object storing integers.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/erase_if.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/erase_if.cc
index 9142bd48377..b13dd0736ff 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/erase_if.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/erase_if.cc
@@ -54,8 +54,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// The following functor takes a map's value-type object and returns
// whether its key is between two numbers.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc
index a38c7fb6b3f..c77e6e0a141 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_find_neg.cc
@@ -55,7 +55,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
int main()
{
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc
index 9b3e7747488..1518a0932ae 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc
@@ -57,7 +57,7 @@
#include <cassert>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
@@ -115,7 +115,7 @@ int main()
{
g.resize(200);
}
- catch(pb_ds::resize_error& )
+ catch(__gnu_pbds::resize_error& )
{
ex_thrown = true;
}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc
index 5107657dac6..6168ba457a5 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_initial_size.cc
@@ -54,7 +54,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc
index f8132e8e8db..0afc7efe6a4 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_load_set_change.cc
@@ -56,7 +56,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_mod.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_mod.cc
index 500ed44724d..32b8e0fc483 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_mod.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_mod.cc
@@ -54,7 +54,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
index b6421bdaf99..548e56cc88e 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize.cc
@@ -55,7 +55,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
index f120ae69b5f..3a6022ba696 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_resize_neg.cc
@@ -54,7 +54,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
int main()
{
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc
index 33d00120d44..5242d82c223 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_shift_mask.cc
@@ -57,7 +57,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A simple hash functor. hash could serve instead of this functor,
// but it is not yet standard everywhere.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_container_traits.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_container_traits.cc
index f2f0e3b4280..d59ed81020e 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_container_traits.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_container_traits.cc
@@ -56,8 +56,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
template<class DS_Category>
void
@@ -147,7 +146,7 @@ int main()
{
// Print the attributes of a binary heap.
typedef
- pb_ds::priority_queue<
+ __gnu_pbds::priority_queue<
int,
std::less<int>,
binary_heap_tag>
@@ -159,7 +158,7 @@ int main()
{
// Print the attributes of a binomial heap.
typedef
- pb_ds::priority_queue<
+ __gnu_pbds::priority_queue<
int,
std::less<int>,
binomial_heap_tag>
@@ -171,7 +170,7 @@ int main()
{
// Print the attributes of a redundant-counter binomial heap.
typedef
- pb_ds::priority_queue<
+ __gnu_pbds::priority_queue<
int,
std::less<int>,
rc_binomial_heap_tag>
@@ -183,7 +182,7 @@ int main()
{
// Print the attributes of a pairing heap.
typedef
- pb_ds::priority_queue<
+ __gnu_pbds::priority_queue<
int,
std::less<int>,
pairing_heap_tag>
@@ -198,7 +197,7 @@ int main()
*/
typedef
- pb_ds::priority_queue<
+ __gnu_pbds::priority_queue<
int,
std::less<int>,
thin_heap_tag>
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
index 53a788d5d55..af582b37b34 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
@@ -64,8 +64,7 @@
#include <ext/pb_ds/priority_queue.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// The value type of the priority queue.
// The first entry is the node's id, and the second is the distance.
@@ -108,7 +107,7 @@ int main()
};
// The priority queue type.
- typedef pb_ds::priority_queue< pq_value, pq_value_cmp> pq_t;
+ typedef __gnu_pbds::priority_queue< pq_value, pq_value_cmp> pq_t;
// The priority queue object.
pq_t p;
@@ -151,12 +150,16 @@ int main()
// node to the neighbor.
const size_t pot_dist = dist + a_a_edge_legnth[node_id][neighbor_i];
+ if (a_it[neighbor_i] == a_it[0])
+ continue;
+
// "Relax" the distance (if appropriate) through modify.
if (pot_dist < a_it[neighbor_i]->second)
p.modify(a_it[neighbor_i], pq_value(neighbor_i, pot_dist));
}
// Done with the node, so we pop it.
+ a_it[node_id] = a_it[0];
p.pop();
}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_erase_if.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_erase_if.cc
index b67c8aed5d9..834994c4636 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_erase_if.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_erase_if.cc
@@ -54,13 +54,12 @@
#include <ext/pb_ds/priority_queue.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
int
main()
{
- pb_ds::priority_queue<int> p;
+ __gnu_pbds::priority_queue<int> p;
// First we insert some values into the container.
for (int i = 0; i < 1000; ++i)
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_split_join.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_split_join.cc
index e59cb34918d..14604d73dce 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_split_join.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_split_join.cc
@@ -54,14 +54,13 @@
#include <ext/pb_ds/priority_queue.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
int
main()
{
// Two priority queue objects.
- pb_ds::priority_queue<int> even_p, odd_p;
+ __gnu_pbds::priority_queue<int> even_p, odd_p;
// First we insert some values: even ones into even_p, and odd ones
// into odd_p.
@@ -77,7 +76,7 @@ main()
// Print out the values.
cout << "Initial values in even priority queue:" << endl;
- pb_ds::priority_queue<int>::const_iterator it;
+ __gnu_pbds::priority_queue<int>::const_iterator it;
for (it = even_p.begin(); it != even_p.end(); ++it)
cout <<* it << endl;
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
index c718d1f86ff..7565e73e5c0 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -66,8 +66,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A priority queue of integers, which supports fast pushes,
// duplicated-int avoidance, and arbitrary-int erases.
@@ -81,7 +80,7 @@ public:
push(const int& r_str);
// Returns a const reference to the largest int in the container.
- const int
+ int
top() const
{
assert(!empty());
@@ -107,7 +106,7 @@ public:
private:
// A priority queue of strings.
- typedef pb_ds::priority_queue< int> pq_t;
+ typedef __gnu_pbds::priority_queue< int> pq_t;
// A hash-table mapping strings to point_iterators inside the
// priority queue.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/ranged_hash.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/ranged_hash.cc
index 4dc3721ad91..0be8d8535e7 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/ranged_hash.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/ranged_hash.cc
@@ -61,8 +61,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
/**
* A (somewhat simplistic) ranged-hash function for strings.
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/store_hash.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/store_hash.cc
index 11ef830cf7c..ba46c824b52 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/store_hash.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/store_hash.cc
@@ -60,7 +60,7 @@
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A string hash functor.
struct string_hash : public unary_function<string, size_t>
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_intervals.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_intervals.cc
index e82150de2b4..e4411aaab43 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_intervals.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_intervals.cc
@@ -68,8 +68,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// Following are definitions of line intervals and functors operating
// on them. As the purpose of this example is node invariants, and not
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_join.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_join.cc
index 795456ab6d5..baba67e7292 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_join.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_join.cc
@@ -59,8 +59,8 @@
#include <cassert>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
+using namespace __gnu_pbds;
int main()
{
@@ -68,14 +68,7 @@ int main()
*
*/
// A splay tree table mapping ints to chars.
- typedef
- tree<
- int,
- char,
- less<
- int>,
- splay_tree_tag>
- map_t;
+ typedef tree<int, char, less<int>, splay_tree_tag> map_t;
// Two map_t object.
map_t h0, h1;
@@ -114,7 +107,7 @@ int main()
{
h2.join(h3);
}
- catch (pb_ds::join_error& )
+ catch (__gnu_pbds::join_error& )
{
exception_thrown = true;
}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc
index 30ae3091224..7a3e26292f6 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics.cc
@@ -58,8 +58,7 @@
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A red-black tree table storing ints and their order
// statistics. Note that since the tree uses
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc
index 74fe8382cdc..24661070cd9 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/tree_order_statistics_join.cc
@@ -55,18 +55,14 @@
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A splay tree table mapping ints to chars and storing the ints order
// statistics.
typedef
-tree<
- int,
- char,
- less<int>,
- splay_tree_tag,
- tree_order_statistics_node_update>
+tree<int, char, less<int>,
+ splay_tree_tag,
+ tree_order_statistics_node_update>
tree_map_t;
int main()
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_dna.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_dna.cc
index 63afba382ba..76f2b7bdb81 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_dna.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_dna.cc
@@ -57,7 +57,7 @@
#include <ext/pb_ds/trie_policy.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// DNA is represented by a string.
typedef string dna_t;
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc
index 5cb140b5cb0..510da445836 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_prefix_search.cc
@@ -57,8 +57,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
// A PATRICIA trie with a prefix-search node-updator type. Note that
// since the node updator is trie_prefix_search_node_update, then the
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_split.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_split.cc
index 11cd1823516..868a8cf6216 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/trie_split.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/trie_split.cc
@@ -54,7 +54,7 @@
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
int main()
{
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/associative_containers.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/associative_containers.cc
index 686f8b9c70f..b7a0b8253ff 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/associative_containers.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/associative_containers.cc
@@ -50,7 +50,7 @@
#include <cassert>
using namespace std;
-using namespace pb_ds;
+using namespace __gnu_pbds;
/**
* The following function performs a sequence of operations on an
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc
index d82813e729a..606679b19a4 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef hash_map_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc
index 652774a39aa..202fe1443ce 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef hash_set_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc
index 98bbf59cf55..7c8bb40eb1b 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc
@@ -45,13 +45,15 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef lu_map_tl_t map_tl_t;
return rand_regression_test(50, 10,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc
index 90e0de038c2..0d31f5ad846 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc
@@ -45,13 +45,15 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef lu_set_tl_t map_tl_t;
return rand_regression_test(50, 10,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc
index 67e5b6f455a..8f4fdaaf689 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for priority queues.
*/
+// { dg-require-time "" }
+
#include <regression/rand/priority_queue/rand_regression_test.hpp>
#include <regression/priority_queue/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
return rand_regression_test(ITERATIONS, KEYS,
"tree_no_data_map_rand_regression_test",
pq_tl_t());
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
index 0f53cf22d03..52099b64e52 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues.cc
@@ -50,8 +50,8 @@
#include <cassert>
using namespace std;
-using namespace pb_ds;
-using namespace pb_ds;
+using namespace __gnu_pbds;
+using namespace __gnu_pbds;
template<typename Cntnr>
void
@@ -94,7 +94,7 @@ priority_queue_link_regression_test_0()
* Perform operations on a pairing-heap queue.
*/
cout << "Pairing heap" << endl;
- pb_ds::priority_queue<int, less<int>, pairing_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, pairing_heap_tag> c;
some_op_sequence(c);
}
@@ -103,7 +103,7 @@ priority_queue_link_regression_test_0()
* Perform operations on a binomial-heap queue.
*/
cout << "Binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binomial_heap_tag> c;
some_op_sequence(c);
}
@@ -112,7 +112,7 @@ priority_queue_link_regression_test_0()
* Perform operations on a binomial-heap queue.
*/
cout << "Redundant-counter binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
some_op_sequence(c);
}
@@ -121,7 +121,7 @@ priority_queue_link_regression_test_0()
* Perform operations on a binomial-heap queue.
*/
cout << "Binary heap" << endl;
- pb_ds::priority_queue<int, less<int>, binary_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binary_heap_tag> c;
some_op_sequence(c);
}
@@ -130,7 +130,7 @@ priority_queue_link_regression_test_0()
* Perform operations on a thin-heap queue.
*/
cout << "Thin heap" << endl;
- pb_ds::priority_queue<int, less<int>, thin_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, thin_heap_tag> c;
some_op_sequence(c);
}
}
@@ -144,7 +144,7 @@ priority_queue_link_regression_test_1()
* Perform operations on a pairing-heap queue.
*/
cout << "Pairing heap" << endl;
- pb_ds::priority_queue<int, less<int>, pairing_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, pairing_heap_tag> c;
some_op_sequence(c);
}
@@ -153,7 +153,7 @@ priority_queue_link_regression_test_1()
* Perform operations on a binomial-heap queue.
*/
cout << "Binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binomial_heap_tag> c;
some_op_sequence(c);
}
@@ -162,7 +162,7 @@ priority_queue_link_regression_test_1()
* Perform operations on a binomial-heap queue.
*/
cout << "Redundant-counter binomial heap" << endl;
- pb_ds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, rc_binomial_heap_tag> c;
some_op_sequence(c);
}
@@ -171,7 +171,7 @@ priority_queue_link_regression_test_1()
* Perform operations on a binomial-heap queue.
*/
cout << "Binary heap" << endl;
- pb_ds::priority_queue<int, less<int>, binary_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, binary_heap_tag> c;
some_op_sequence(c);
}
@@ -180,7 +180,7 @@ priority_queue_link_regression_test_1()
* Perform operations on a thin-heap queue.
*/
cout << "Thin heap" << endl;
- pb_ds::priority_queue<int, less<int>, thin_heap_tag> c;
+ __gnu_pbds::priority_queue<int, less<int>, thin_heap_tag> c;
some_op_sequence(c);
}
}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc
index 645d2eecd05..b08fb855940 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef tree_map_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc
index 1e3a3dbe05e..6f1024f7d4a 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef tree_set_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc
index 90e4fc6129f..bd55a83a094 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef trie_map_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc
index cd1991e73c5..3407825bd78 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc
@@ -45,6 +45,8 @@
* Contains a random-operation test for maps and sets.
*/
+// { dg-require-time "" }
+
#include <regression/rand/assoc/rand_regression_test.hpp>
#include <regression/assoc/common_type.hpp>
@@ -59,7 +61,7 @@
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
typedef trie_set_tl_t map_tl_t;
return rand_regression_test(ITERATIONS, KEYS,
diff --git a/libstdc++-v3/testsuite/ext/pool_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/pool_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..7d453b66844
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/pool_allocator/variadic_construct.cc
@@ -0,0 +1,46 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <ext/pool_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::__pool_alloc<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/char/35209.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/char/35209.cc
new file mode 100644
index 00000000000..b7755aed274
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/char/35209.cc
@@ -0,0 +1,40 @@
+// Copyright (C) 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// { dg-do link }
+
+#include <ext/stdio_sync_filebuf.h>
+
+struct my_ssf
+: __gnu_cxx::stdio_sync_filebuf<char>
+{
+ my_ssf(std::__c_file* __f)
+ : __gnu_cxx::stdio_sync_filebuf<char>(__f) { }
+};
+
+// libstdc++/35209
+void test01()
+{
+ my_ssf ss1(0);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/35209.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/35209.cc
new file mode 100644
index 00000000000..636fdb2735d
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/35209.cc
@@ -0,0 +1,40 @@
+// Copyright (C) 2008 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// { dg-do link }
+
+#include <ext/stdio_sync_filebuf.h>
+
+struct my_ssf
+: __gnu_cxx::stdio_sync_filebuf<wchar_t>
+{
+ my_ssf(std::__c_file* __f)
+ : __gnu_cxx::stdio_sync_filebuf<wchar_t>(__f) { }
+};
+
+// libstdc++/35209
+void test01()
+{
+ my_ssf ss1(0);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/check_allocate_max_size.cc b/libstdc++-v3/testsuite/ext/throw_allocator/check_allocate_max_size.cc
index 902361eff0d..9e5c041f6f5 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/check_allocate_max_size.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/check_allocate_max_size.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <ext/throw_allocator.h>
#include <testsuite_allocator.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/check_deallocate_null.cc b/libstdc++-v3/testsuite/ext/throw_allocator/check_deallocate_null.cc
index 8e6e1a025aa..c49ed2de1e3 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/check_deallocate_null.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/check_deallocate_null.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <ext/throw_allocator.h>
#include <testsuite_allocator.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/check_delete.cc b/libstdc++-v3/testsuite/ext/throw_allocator/check_delete.cc
index a8e716798fe..7dd7b1a2c9c 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/check_delete.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/check_delete.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <cstdlib>
#include <ext/throw_allocator.h>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/check_new.cc b/libstdc++-v3/testsuite/ext/throw_allocator/check_new.cc
index 1b00412918f..55c1d2b9483 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/check_new.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/check_new.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <cstdlib>
#include <ext/throw_allocator.h>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_global.cc b/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_global.cc
index c8bbe510c9b..1eb90ab28e2 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_global.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_global.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <string>
#include <stdexcept>
#include <ext/throw_allocator.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_local.cc b/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_local.cc
index 794232e914e..d6d57e7e955 100644
--- a/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_local.cc
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/deallocate_local.cc
@@ -17,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-require-time "" }
+
#include <string>
#include <ext/throw_allocator.h>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/ext/throw_allocator/variadic_construct.cc b/libstdc++-v3/testsuite/ext/throw_allocator/variadic_construct.cc
new file mode 100644
index 00000000000..51c5de650f9
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/throw_allocator/variadic_construct.cc
@@ -0,0 +1,48 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-26 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-require-time "" }
+
+#include <ext/throw_allocator.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ typedef std::pair<int, char> pair_type;
+ __gnu_cxx::throw_allocator<pair_type> alloc1;
+
+ pair_type* ptp1 = alloc1.allocate(1);
+ alloc1.construct(ptp1, 3, 'a');
+
+ VERIFY( ptp1->first == 3 );
+ VERIFY( ptp1->second == 'a' );
+
+ alloc1.deallocate(ptp1, 1);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/element_access/char/front_back.cc b/libstdc++-v3/testsuite/ext/vstring/element_access/char/front_back.cc
new file mode 100644
index 00000000000..22959a91240
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/element_access/char/front_back.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::__vstring str("ramifications");
+ const __gnu_cxx::__vstring cstr("melodien");
+
+ VERIFY( str.front() == 'r' );
+ VERIFY( str.back() == 's' );
+ VERIFY( cstr.front() == 'm' );
+ VERIFY( cstr.back() == 'n' );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/element_access/wchar_t/front_back.cc b/libstdc++-v3/testsuite/ext/vstring/element_access/wchar_t/front_back.cc
new file mode 100644
index 00000000000..dc18c5a3e11
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/element_access/wchar_t/front_back.cc
@@ -0,0 +1,44 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::__wvstring str(L"ramifications");
+ const __gnu_cxx::__wvstring cstr(L"melodien");
+
+ VERIFY( str.front() == L'r' );
+ VERIFY( str.back() == L's' );
+ VERIFY( cstr.front() == L'm' );
+ VERIFY( cstr.back() == L'n' );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
index f76a2c4f62b..eb506b0c81d 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
@@ -38,7 +38,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == __gnu_cxx::__vstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
index 405163d0bb9..205a99525f6 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
@@ -38,7 +38,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == __gnu_cxx::__wvstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/ext/vstring/moveable.cc b/libstdc++-v3/testsuite/ext/vstring/moveable.cc
new file mode 100644
index 00000000000..7a33145fa22
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/moveable.cc
@@ -0,0 +1,71 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+// NOTE: This makes use of the fact that we know how moveable
+// is implemented on deque (via swap). If the implementation changed
+// this test may begin to fail.
+
+#include <ext/vstring.h>
+#include <utility>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::__sso_string a,b;
+ a.push_back('1');
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b[0] == '1' && a.size() == 0 );
+
+ __gnu_cxx::__sso_string c(std::move(b));
+ VERIFY( c.size() == 1 && c[0] == '1' );
+ VERIFY( b.size() == 0 );
+}
+
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::__rc_string a,b;
+ a.push_back('1');
+ b = std::move(a);
+ VERIFY( b.size() == 1 && b[0] == '1' && a.size() == 0 );
+
+ __gnu_cxx::__rc_string c(std::move(b));
+ VERIFY( c.size() == 1 && c[0] == '1' );
+ VERIFY( b.size() == 0 );
+}
+
+int main()
+{
+ test01();
+ test02();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/vstring/requirements/citerators.cc b/libstdc++-v3/testsuite/ext/vstring/requirements/citerators.cc
new file mode 100644
index 00000000000..3e579e80fca
--- /dev/null
+++ b/libstdc++-v3/testsuite/ext/vstring/requirements/citerators.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2007-10-15 Paolo Carlini <pcarlini@suse.de>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#include <ext/vstring.h>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ __gnu_cxx::__vstring v(7, 'a');
+ VERIFY( v.cbegin() == v.begin() );
+ VERIFY( v.cend() == v.end() );
+ VERIFY( v.crbegin() == v.rbegin() );
+ VERIFY( v.crend() == v.rend() );
+ VERIFY( v.cbegin() != v.cend() );
+ VERIFY( v.crbegin() != v.crend() );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp
index 29943ce2a6b..327b691fc0f 100644
--- a/libstdc++-v3/testsuite/lib/dg-options.exp
+++ b/libstdc++-v3/testsuite/lib/dg-options.exp
@@ -35,6 +35,15 @@ proc dg-require-debug-mode { args } {
return
}
+proc dg-require-parallel-mode { args } {
+ if { ![ check_v3_target_parallel_mode ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ return
+ }
+ return
+}
+
proc dg-require-fileio { args } {
if { ![ check_v3_target_fileio ] } {
upvar dg-do-what dg-do-what
@@ -70,3 +79,12 @@ 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
+}
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index a0bca54d485..b482bf58d20 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -83,7 +83,7 @@ proc libstdc++_init { testfile } {
global env
global v3-sharedlib
global srcdir blddir objdir tool_root_dir
- global cc cxx cxxflags cxxldflags
+ global cc cxx cxxflags cxxpchflags cxxldflags
global includes
global gluefile wrap_flags
global ld_library_path
@@ -123,15 +123,26 @@ proc libstdc++_init { testfile } {
v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"]
v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"]
+ set ld_library_path_tmp ""
+
# Locate libgcc.a so we don't need to account for different values of
# SHLIB_EXT on different platforms
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
+ append ld_library_path_tmp ":${gccdir}"
}
v3track gccdir 3
- # Look for shared library. (ie libstdc++.so.)
+ # Locate libgomp. This is only required for parallel mode.
+ set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.so]
+ if {$libgompdir != ""} {
+ set libgompdir [file dirname $libgompdir]
+ append ld_library_path_tmp ":${libgompdir}"
+ }
+ v3track libgompdir 3
+
+ # Locate libstdc++ shared library. (ie libstdc++.so.)
set v3-sharedlib 0
set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.so]
if {$sharedlibdir != ""} {
@@ -144,9 +155,8 @@ proc libstdc++_init { testfile } {
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
if {$gccdir != ""} {
- set ld_library_path ""
- append ld_library_path ":${gccdir}"
set compiler ${gccdir}/g++
+ set ld_library_path ${ld_library_path_tmp}
append ld_library_path ":${blddir}/src/.libs"
if { [is_remote host] == 0 && [which $compiler] != 0 } {
@@ -173,7 +183,8 @@ proc libstdc++_init { testfile } {
# Default settings.
set cxx [transform "g++"]
- set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+ set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+ set cxxpchflags ""
set cxxldflags ""
set cc [transform "gcc"]
# Locate testsuite_hooks.h and other testsuite headers.
@@ -211,10 +222,14 @@ proc libstdc++_init { testfile } {
# If we find a testsuite_flags file, we're testing in the build dir.
set cxx [exec sh $flags_file --build-cxx]
set cxxflags [exec sh $flags_file --cxxflags]
+ set cxxpchflags [exec sh $flags_file --cxxpchflags]
set cxxldflags [exec sh $flags_file --cxxldflags]
set cc [exec sh $flags_file --build-cc]
set includes [exec sh $flags_file --build-includes]
}
+ append cxxflags " "
+ append cxxflags [getenv CXXFLAGS]
+ v3track cxxflags 2
# Always use MO files built by this test harness.
set cxxflags "$cxxflags -DLOCALEDIR=\".\""
@@ -224,23 +239,29 @@ proc libstdc++_init { testfile } {
# this check until $cxx and such have been initialized because we
# perform a test compilation. (Ideally, gcc --print-file-name would
# list PCH files, but it does not.)
- global PCH_CXXFLAGS
- if ![info exists PCH_CXXFLAGS] then {
+ if { $cxxpchflags != "" } {
set src "config[pid].cc"
set f [open $src "w"]
puts $f "int main () {}"
close $f
+ # Fixme: "additional_flags=$cxxpchflags" fails, but would be
+ # useful as then the requested variant of the pre-build PCH
+ # files could be tested to see if it works.
set lines [v3_target_compile $src "config[pid].o" object \
- "additional_flags=-include additional_flags=bits/stdtr1c++.h"]
- if {$lines == "" } {
-# set PCH_CXXFLAGS "-include bits/extc++.h"
-# set PCH_CXXFLAGS "-include bits/stdtr1c++.h"
- set PCH_CXXFLAGS "-include bits/stdc++.h"
- } else {
- set PCH_CXXFLAGS ""
- }
+ "additional_flags=-include additional_flags=bits/stdc++.h"]
+ if { $lines != "" } {
+ verbose -log "Requested PCH file: $cxxpchflags"
+ verbose -log "is not working, and will not be used."
+ set cxxpchflags ""
+ }
file delete $src
+ }
+ v3track cxxpchflags 2
+
+ global PCH_CXXFLAGS
+ if ![info exists PCH_CXXFLAGS] then {
+ set PCH_CXXFLAGS $cxxpchflags
v3track PCH_CXXFLAGS 2
}
@@ -380,6 +401,7 @@ proc v3_target_compile_as_c { source dest type options } {
global flags_file
global blddir
global cc
+ global cxxflags
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
@@ -390,6 +412,7 @@ proc v3_target_compile_as_c { source dest type options } {
set cc_final $cc
set cxxlibglossflags [libgloss_link_flags]
set cc_final [concat $cc_final $cxxlibglossflags]
+ set cc_final [concat $cc_final $cxxflags]
set cc_final [concat $cc_final $includes]
regsub -all {\s[-]nostdinc[+][+]} $cc_final "" cc_final
@@ -450,12 +473,15 @@ proc v3-build_support { } {
set libtest_objs ""
set config_src "config.cc"
+ set config_out "config.ii"
set f [open $config_src "w"]
puts $f "#include <bits/c++config.h>"
puts $f "#include <bits/gthr.h>"
close $f
- set preprocessed [v3_target_compile $config_src "" \
- preprocess "additional_flags=-dN"]
+ v3_target_compile $config_src $config_out preprocess "additional_flags=-dN"
+ set file [open $config_out r]
+ set preprocessed [read $file]
+ close $file
if { [string first "_GLIBCXX_USE_WCHAR_T" $preprocessed] != -1 } {
verbose -log "wchar_t support detected"
set v3-wchar_t 1
@@ -507,9 +533,9 @@ proc v3-build_support { } {
} else {
set ar [transform "ar"]
}
- set arcommand "$ar -rc ./libtestc++.a ${libtest_objs}"
- verbose -log "$arcommand"
- set result [lindex [local_exec "$arcommand" "" "" 300] 0]
+ set arargs "-rc ./libtestc++.a ${libtest_objs}"
+ verbose -log "$ar $arargs"
+ set result [lindex [remote_exec host "$ar" "$arargs"] 0]
verbose "link result is $result"
if { $result == 0 } {
if [info exists env(RANLIB)] {
@@ -517,9 +543,9 @@ proc v3-build_support { } {
} else {
set ranlib [transform "ranlib"]
}
- set ranlibcommand "$ranlib ./libtestc++.a"
- verbose -log "$ranlibcommand"
- set result [lindex [local_exec "$ranlibcommand" "" "" 300] 0]
+ set ranlibargs "./libtestc++.a"
+ verbose -log "$ranlib $ranlibargs"
+ set result [lindex [remote_exec host "$ranlib" "$ranlibargs"] 0]
if { $result != 0 } {
error "could not link libtestc++.a"
}
@@ -581,15 +607,20 @@ proc check_v3_target_fileio { } {
puts $f "int main ()"
puts $f "{"
puts $f " int fd = open (\".\", O_RDONLY);"
+ puts $f " int ret = 0;"
puts $f " if (fd == -1)"
puts $f " {"
puts $f " int err = errno;"
puts $f " if (err == EIO || err == ENOSYS)"
- puts $f " return 1;"
+ puts $f " ret = 1;"
puts $f " }"
puts $f " else"
+ puts $f " {"
+ puts $f " if (lseek (fd, 0, SEEK_CUR) == -1)"
+ puts $f " ret = 1;"
puts $f " close (fd);"
- puts $f " return 0;"
+ puts $f " }"
+ puts $f " return ret;"
puts $f "}"
close $f
@@ -739,6 +770,61 @@ 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
@@ -830,7 +916,6 @@ proc check_v3_target_namedlocale { } {
proc check_v3_target_debug_mode { } {
global cxxflags
global et_debug_mode
-
global tool
if { ![info exists et_debug_mode_target_name] } {
@@ -879,3 +964,59 @@ proc check_v3_target_debug_mode { } {
verbose "check_v3_target_debug_mode: $et_debug_mode" 2
return $et_debug_mode
}
+
+proc check_v3_target_parallel_mode { } {
+ global cxxflags
+ global DEFAULT_CXXFLAGS
+ global et_parallel_mode
+
+ global tool
+
+ if { ![info exists et_parallel_mode_target_name] } {
+ set et_parallel_mode_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_parallel_mode_target_name } {
+ verbose "check_v3_target_parallel_mode: `$et_parallel_mode_target_name'" 2
+ set et_parallel_mode_target_name $current_target
+ if [info exists et_parallel_mode] {
+ verbose "check_v3_target_parallel_mode: removing cached result" 2
+ unset et_parallel_mode
+ }
+ }
+
+ if [info exists et_parallel_mode] {
+ verbose "check_v3_target_parallel_mode: using cached result" 2
+ } else {
+ set et_parallel_mode 0
+
+ # Set up, compile, and execute a C++ test program that depends
+ # on parallel mode working.
+ set src parallel_mode[pid].cc
+ set exe parallel_mode[pid].exe
+
+ set f [open $src "w"]
+ puts $f "#include <omp.h>"
+ puts $f "int main()"
+ puts $f "{ return 0; }"
+ close $f
+
+ set cxxflags_saved $cxxflags
+ set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror"
+
+ set lines [v3_target_compile $src $exe executable ""]
+ set cxxflags $cxxflags_saved
+ file delete $src
+
+ if [string match "" $lines] {
+ # No error message, compilation succeeded.
+ set et_parallel_mode 1
+ } else {
+ verbose "check_v3_target_parallel_mode: compilation failed" 2
+ }
+ }
+ verbose "check_v3_target_parallel_mode: $et_parallel_mode" 2
+ return $et_parallel_mode
+}
diff --git a/libstdc++-v3/testsuite/performance/25_algorithms/lexicographical_compare.cc b/libstdc++-v3/testsuite/performance/25_algorithms/lexicographical_compare.cc
new file mode 100644
index 00000000000..b983881c4b4
--- /dev/null
+++ b/libstdc++-v3/testsuite/performance/25_algorithms/lexicographical_compare.cc
@@ -0,0 +1,55 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 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.
+
+#include <vector>
+#include <testsuite_performance.h>
+
+// libstdc++/32908
+int main()
+{
+ using namespace __gnu_test;
+
+ time_counter time;
+ resource_counter resource;
+
+ int cnt = 0;
+ std::vector<int> a(10000), b(10000);
+
+ start_counters(time, resource);
+ for (int i = 0; i < 100000; ++i)
+ {
+ if (a < b)
+ ++cnt;
+ if (a > b)
+ ++cnt;
+ }
+ stop_counters(time, resource);
+ report_performance(__FILE__, "", time, resource);
+ clear_counters(time, resource);
+
+ return cnt;
+}
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc
index 27a7ff87903..cb7720cc609 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc
@@ -68,7 +68,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
@@ -87,7 +87,7 @@ main(int argc, char* a_p_argv[])
erase_test<vec_t::const_iterator> tst(b, vn, vs, vm);
typedef __gnu_test::tracker_allocator<char> alloc_t;
{
- typedef hash_common_types<int, pb_ds::null_mapped_type, int_hash, std::equal_to<int>, alloc_t>::performance_tl tl_t;
+ typedef hash_common_types<int, __gnu_pbds::null_mapped_type, int_hash, std::equal_to<int>, alloc_t>::performance_tl tl_t;
tl_t tl;
__gnu_cxx::typelist::apply(tst, tl);
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc
index 602ff530e24..d3cebc87571 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp
index 61a91f4dda4..2b8a2a9b77b 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_find_timing.hpp
@@ -67,7 +67,7 @@ set_test_parameters(size_t& n, size_t&s, size_t& m, size_t& prm);
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t prm;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.hpp b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.hpp
index 5bfa42b3b6d..a485a8b915d 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.hpp
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_mem_usage.hpp
@@ -68,7 +68,7 @@ set_test_parameters(size_t& n, size_t&s, size_t& m, size_t& prm);
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t prm;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_timing.hpp b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_timing.hpp
index cdf7e94f910..f7f33f051e0 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_timing.hpp
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/multimap_text_insert_timing.hpp
@@ -67,7 +67,7 @@ set_test_parameters(size_t& n, size_t&s, size_t& m, size_t& prm);
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t prm;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc
index 4487c27cf70..ad6fdd176c1 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_timing.cc
index b867f9b79e7..5ab8db1edd5 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_random_int_push_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_join_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_join_timing.cc
index 4add14795cb..c5ba556f239 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_join_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_join_timing.cc
@@ -80,7 +80,7 @@ usage()
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_modify_timing.hpp b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_modify_timing.hpp
index 4eadff4f6d1..e8dffa6978b 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_modify_timing.hpp
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_modify_timing.hpp
@@ -63,7 +63,7 @@ set_test_parameters(bool& b);
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 100;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc
index 3185e9b1ff0..adbbc0384fd 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc
@@ -61,7 +61,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc
index a02f50b6d5a..65a009c08ce 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_timing.cc
index cd60912051a..6fcaa0d23f6 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_push_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc
index 409685dd64e..87d14d7f9e5 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_find_timing.cc
@@ -61,7 +61,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc
index d500bd39f0d..e336114b489 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_find_timing.cc
@@ -61,7 +61,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc
index 09a13fec66b..e9554c1600d 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc
@@ -61,7 +61,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
size_t vm = 2100;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc
index cc88399463f..8409a4aebb2 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/text_find_timing.cc
@@ -62,7 +62,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
size_t vs = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc
index 5909b56b5a3..2ca61ca1495 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc
@@ -59,7 +59,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
size_t vm = 2100;
@@ -71,7 +71,7 @@ main(int argc, char* a_p_argv[])
{
typedef tree_order_statistics_test< true> test_t;
test_t tst(vn, vs, vm);
- typedef tree_common_types<int, pb_ds::null_mapped_type, std::less<int>, pb_ds::tree_order_statistics_node_update>::performance_tl tl_t;
+ typedef tree_common_types<int, __gnu_pbds::null_mapped_type, std::less<int>, __gnu_pbds::tree_order_statistics_node_update>::performance_tl tl_t;
tl_t tl;
__gnu_cxx::typelist::apply(tst, tl);
}
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_split_join_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_split_join_timing.cc
index 3a27eb2a0b7..9c4970f2826 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_split_join_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_split_join_timing.cc
@@ -59,7 +59,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
size_t vn = 200;
size_t vs = 200;
size_t vm = 2100;
@@ -72,7 +72,7 @@ main(int argc, char* a_p_argv[])
typedef tree_split_join_test<true> test_t;
test_t tst(vn, vs, vm);
- typedef tree_common_types<int, pb_ds::null_mapped_type>::performance_tl tl_t;
+ typedef tree_common_types<int, __gnu_pbds::null_mapped_type>::performance_tl tl_t;
tl_t tl;
__gnu_cxx::typelist::apply(tst, tl);
}
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc
index 5ee6f90be3c..23a63023314 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_insert_timing.cc
@@ -62,7 +62,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
diff --git a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc
index da7bdedca74..44329b3f769 100644
--- a/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc
+++ b/libstdc++-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc
@@ -60,7 +60,7 @@ usage();
int
main(int argc, char* a_p_argv[])
{
- using namespace pb_ds::test;
+ using namespace __gnu_pbds::test;
std::string f_name = "thirty_years_among_the_dead_preproc.txt";
size_t vn = 200;
diff --git a/libstdc++-v3/testsuite/thread/guard.cc b/libstdc++-v3/testsuite/thread/guard.cc
new file mode 100644
index 00000000000..a509321f83f
--- /dev/null
+++ b/libstdc++-v3/testsuite/thread/guard.cc
@@ -0,0 +1,66 @@
+//
+// Copyright (C) 2007, 2008 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.
+
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* } }
+// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-darwin* alpha*-*-osf* } }
+
+#include <cstdlib>
+#include <pthread.h>
+
+// This used to deadlock with the old libstdc++ because there is only one
+// global mutex guarding initialization of statics and it is held during by
+// the initializer thread of a static until the variable is completely
+// initialized. If the initializer thread creates and waits for another thread
+// which also initializes a static variable, there will be a deadlock because
+// the first thread is holding the mutex and waiting for the second thread,
+// which is blocked when it is acquiring the mutex.
+
+int
+get_bar (void)
+{
+ return 1;
+}
+
+void*
+do_something (void *arg)
+{
+ static int bar __attribute__((unused)) = get_bar ();
+ return NULL;
+}
+
+int
+get_foo (void)
+{
+ pthread_t new_thread;
+
+ if (pthread_create (&new_thread, NULL, do_something, NULL) != 0)
+ std::abort ();
+
+ if (pthread_join (new_thread, NULL) != 0)
+ std::abort ();
+
+ return 1;
+}
+
+int
+main (int argc, char **argv)
+{
+ static int foo __attribute__((unused)) = get_foo ();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..0d4839c9871
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,34 @@
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
+
+#include <tr1/memory>
+#include <testsuite_tr1.h>
+
+// { dg-do compile }
+
+// Check the _S_single lock policy can be instantiated. For a thread-enabled
+// library this checks the templates can be instantiated for non-default
+// lock policy, for a single-threaded lib this is redundant but harmless.
+using namespace __gnu_test;
+using std::tr1::__shared_ptr;
+using std::tr1::_S_single;
+template class __shared_ptr<int, _S_single>;
+template class __shared_ptr<ClassType, _S_single>;
+template class __shared_ptr<IncompleteClass, _S_single>;
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
index ecf5fa2c159..3c681fd87b4 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
@@ -82,7 +82,7 @@ struct shared_and_weak_pools
void* thread_hammer_and_kill(void* opaque_pools)
{
- shared_and_weak_pools& pools = *reinterpret_cast<shared_and_weak_pools*>(opaque_pools);
+ shared_and_weak_pools& pools = *static_cast<shared_and_weak_pools*>(opaque_pools);
// Using the same parameters as in the RNG test cases.
std::tr1::mersenne_twister<
unsigned long, 32, 624, 397, 31,
@@ -117,7 +117,7 @@ void* thread_hammer_and_kill(void* opaque_pools)
void* thread_hammer(void* opaque_weak)
{
- wp_vector_t& weak_pool = *reinterpret_cast<wp_vector_t*>(opaque_weak);
+ wp_vector_t& weak_pool = *static_cast<wp_vector_t*>(opaque_weak);
// Using the same parameters as in the RNG test cases.
std::tr1::mersenne_twister<
unsigned long, 32, 624, 397, 31,
@@ -162,14 +162,14 @@ test01()
#endif
pthread_attr_t tattr;
- int ret = pthread_attr_init(&tattr);
+ pthread_attr_init(&tattr);
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
- pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
+ pthread_create(threads, &tattr, thread_hammer_and_kill, static_cast<void*>(&pools));
for (unsigned int worker = 1; worker < HAMMER_MAX_THREADS; worker++)
{
if (pthread_create(&threads[worker], &tattr,
- thread_hammer, reinterpret_cast<void*>(&weak_pool[worker])))
+ thread_hammer, static_cast<void*>(&weak_pool[worker])))
std::abort();
}
// Wait for threads to complete, then check integrity of reference.
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
index f11474fb1c1..433189e0614 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
@@ -84,7 +84,7 @@ struct shared_and_weak_pools
void* thread_hammer_and_kill(void* opaque_pools)
{
- shared_and_weak_pools& pools = *reinterpret_cast<shared_and_weak_pools*>(opaque_pools);
+ shared_and_weak_pools& pools = *static_cast<shared_and_weak_pools*>(opaque_pools);
// Using the same parameters as in the RNG test cases.
std::tr1::mersenne_twister<
unsigned long, 32, 624, 397, 31,
@@ -119,7 +119,7 @@ void* thread_hammer_and_kill(void* opaque_pools)
void* thread_hammer(void* opaque_weak)
{
- wp_vector_t& weak_pool = *reinterpret_cast<wp_vector_t*>(opaque_weak);
+ wp_vector_t& weak_pool = *static_cast<wp_vector_t*>(opaque_weak);
// Using the same parameters as in the RNG test cases.
std::tr1::mersenne_twister<
unsigned long, 32, 624, 397, 31,
@@ -164,14 +164,14 @@ test01()
#endif
pthread_attr_t tattr;
- int ret = pthread_attr_init(&tattr);
+ pthread_attr_init(&tattr);
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
- pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
+ pthread_create(threads, &tattr, thread_hammer_and_kill, static_cast<void*>(&pools));
for (unsigned int worker = 1; worker < HAMMER_MAX_THREADS; worker++)
{
if (pthread_create(&threads[worker], &tattr,
- thread_hammer, reinterpret_cast<void*>(&weak_pool[worker])))
+ thread_hammer, static_cast<void*>(&weak_pool[worker])))
std::abort();
}
// Wait for threads to complete, then check integrity of reference.
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/weak_ptr/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/weak_ptr/requirements/explicit_instantiation/2.cc
new file mode 100644
index 00000000000..567f3489c23
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/weak_ptr/requirements/explicit_instantiation/2.cc
@@ -0,0 +1,35 @@
+// Copyright (C) 2007 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// TR1 2.2.4 Template class weak_ptr [tr.util.smartptr.weak]
+
+#include <tr1/memory>
+#include <testsuite_tr1.h>
+
+// { dg-do compile }
+
+// Check the _S_single lock policy can be instantiated. For a thread-enabled
+// library this checks the templates can be instantiated for non-default
+// lock policy, for a single-threaded lib this is redundant but harmless.
+using namespace __gnu_test;
+using std::tr1::__weak_ptr;
+using std::tr1::_S_single;
+template class __weak_ptr<int, _S_single>;
+template class __weak_ptr<void, _S_single>;
+template class __weak_ptr<ClassType, _S_single>;
+template class __weak_ptr<IncompleteClass, _S_single>;
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/gen1.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/gen1.cc
index 3d47cd62ee8..823e66ea0d0 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/gen1.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/cons/gen1.cc
@@ -21,6 +21,8 @@
// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
// 5.1.1 Table 16 line 3 template ctor(gen)
+// { dg-require-time "" }
+
#include <ctime>
#include <tr1/random>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc
index 94d81edc213..e41fbba48cd 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc
@@ -1,6 +1,6 @@
// 2006-06-04 Stephen M. Webb <stephen.webb@bregmasoft.com>
//
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -20,25 +20,13 @@
// { dg-do compile }
// { dg-options "-D_GLIBCXX_CONCEPT_CHECKS" }
-// { dg-error "not a valid type" "" { target *-*-* } 37 }
-// { dg-error "invalid type" "" { target *-*-* } 37 }
+// { dg-error "not a valid type" "" { target *-*-* } 31 }
+// { dg-error "invalid type" "" { target *-*-* } 31 }
// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
// 5.1.4.1 [4]
#include <tr1/random>
-#include <testsuite_hooks.h>
+
+std::tr1::linear_congruential<double, 48271, 0, 2147483647> x;
-void
-test01()
-{
- using namespace std::tr1;
-
- linear_congruential<double, 48271, 0, 2147483647> x;
-}
-
-int main()
-{
- test01();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/gen1.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/gen1.cc
index 7861954a13f..5e4075d24fb 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/gen1.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/mersenne_twister/cons/gen1.cc
@@ -21,6 +21,8 @@
// 5.1.4.2 class template mersenne_twister [tr.rand.eng.mers]
// 5.1.1 Table 16 line 3 Gen ctor
+// { dg-require-time "" }
+
#include <ctime>
#include <tr1/random>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/gen1.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/gen1.cc
index 509144563c3..ef583dda341 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/gen1.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/cons/gen1.cc
@@ -21,6 +21,8 @@
// 5.1.4.3 class template subtract_with_carry [tr.rand.eng.sub]
// 5.1.1 Table 16 line 3 Gen ctor
+// { dg-require-time "" }
+
#include <ctime>
#include <tr1/random>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/cons/gen1.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/cons/gen1.cc
index 0a95397c518..d7a894b0870 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/cons/gen1.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/subtract_with_carry_01/cons/gen1.cc
@@ -21,6 +21,8 @@
// 5.1.4.4 class template subtract_with_carry_01 [tr.rand.eng.sub1]
// 5.1.1 Table 16 line 3 Gen ctor
+// { dg-require-time "" }
+
#include <ctime>
#include <tr1/random>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
new file mode 100644
index 00000000000..f699ba32448
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
@@ -0,0 +1,43 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 5.1.7.1 Class template uniform_int
+// 5.1.1 [7] Table 17
+
+#include <tr1/random>
+#include <testsuite_hooks.h>
+
+// libstdc++/33128
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::tr1::mt19937 rng;
+ std::tr1::uniform_int<> six(1,6);
+ std::tr1::variate_generator<std::tr1::mt19937, std::tr1::uniform_int<> >
+ die(rng, six);
+
+ int val = die();
+ VERIFY( val >= 1 && val <= 6 );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_nan.cc
index 98f174fa7b1..f03c7a2eaee 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2006-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/compile.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/compile.cc
index 3beffc10ee3..995c5376d1f 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/compile.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/compile.cc
@@ -2,7 +2,7 @@
// 2006-02-04 Edward Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2006-2007 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -27,18 +27,16 @@
void
test01()
{
-
float xf = 0.5F;
double xd = 0.5;
long double xl = 0.5L;
unsigned int n = 2, m = 1;
- float a = std::tr1::assoc_laguerre(n, m, xf);
- float b = std::tr1::assoc_laguerref(n, m, xf);
- double c = std::tr1::assoc_laguerre(n, m, xd);
- long double d = std::tr1::assoc_laguerre(n, m, xl);
- long double e = std::tr1::assoc_laguerrel(n, m, xl);
+ std::tr1::assoc_laguerre(n, m, xf);
+ std::tr1::assoc_laguerref(n, m, xf);
+ std::tr1::assoc_laguerre(n, m, xd);
+ std::tr1::assoc_laguerre(n, m, xl);
+ std::tr1::assoc_laguerrel(n, m, xl);
return;
}
-
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_nan.cc
index 174a43c791c..1e4138ab374 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_nan.cc
index ca8246c4e72..40fdd67eba7 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_nan.cc
index f5a0e9b74ca..b026dd958cd 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_nan.cc
index b30c77a7555..c9c8001e262 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_nan.cc
index b928eab7642..6da4ec55c31 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_nan.cc
index 1f2bb40bd0c..71abf3e8acb 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc
index 4220f0236d5..0a8c3055e61 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc
index 606697a00b4..85548e048cd 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc
index 72754a7dacd..ee9f7b3452b 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc
index 6d631086928..18381c3e005 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_nan.cc
index d86c5b40f54..d48b211c227 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_nan.cc
index 9e1775e5749..f6dfc3a9ee5 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_nan.cc
index fcf2f680d94..3f345a8b9ad 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_nan.cc
index f01caa05144..b6c8f603350 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc
index 8d06a964d79..a45ae593a55 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_nan.cc
index 121a4528d06..d8c04d41a3d 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_nan.cc
index e051b3cadff..adb3aa2fd9a 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_nan.cc
index bdfa2e9af18..fb2c0935313 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc
index 2a86846ea4a..ac80c334d31 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc
@@ -20,6 +20,12 @@
// riemann_zeta
+// This can take long on simulators, timing out the test.
+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } }
+
+#ifndef MAX_ITERATIONS
+#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>))
+#endif
// Compare against values generated by the GNU Scientific Library.
// The GSL can be found on the web: http://www.gnu.org/software/gsl/
@@ -106,8 +112,7 @@ void test001()
const Tp eps = std::numeric_limits<Tp>::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data001)
- / sizeof(testcase_riemann_zeta<double>);
+ unsigned int num_datum = MAX_ITERATIONS;
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::riemann_zeta(Tp(data001[i].x));
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc
index 3188c334f5b..e5d8758ec4d 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_pos.cc
@@ -20,6 +20,12 @@
// riemann_zeta
+// This can take long on simulators, timing out the test.
+// { dg-options "-DMAX_ITERATIONS=5" { target simulator } }
+
+#ifndef MAX_ITERATIONS
+#define MAX_ITERATIONS (sizeof(data001) / sizeof(testcase_riemann_zeta<double>))
+#endif
// Compare against values generated by the GNU Scientific Library.
// The GSL can be found on the web: http://www.gnu.org/software/gsl/
@@ -196,8 +202,7 @@ void test001()
const Tp eps = std::numeric_limits<Tp>::epsilon();
Tp max_abs_diff = -Tp(1);
Tp max_abs_frac = -Tp(1);
- unsigned int num_datum = sizeof(data001)
- / sizeof(testcase_riemann_zeta<double>);
+ unsigned int num_datum = MAX_ITERATIONS;
for (unsigned int i = 0; i < num_datum; ++i)
{
const Tp f = std::tr1::riemann_zeta(Tp(data001[i].x));
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc
index 2b856742d0e..29a98a46586 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_nan.cc
index e8bbfff188f..179ed2d627f 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc
index 17f8ca6b0ac..556c9db1a99 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_nan.cc
@@ -1,4 +1,5 @@
// { dg-require-c-std "" }
+// { dg-options "-mieee" { target sh*-*-* } }
// 2007-01-10 Edward Smith-Rowland <3dw4rd@verizon.net>
//
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc
index 7eda9223701..50e7ead1895 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+
VERIFY( a.empty() == false );
}
@@ -40,7 +40,7 @@ test01()
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.empty() == true );
}
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc
index 22e0c7b503a..05849b88356 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+
VERIFY( a.max_size() == len );
}
@@ -40,7 +40,7 @@ test01()
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.max_size() == len );
}
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc
index bb04ab151a0..748fb8d2cfb 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+
VERIFY( a.size() == len );
}
@@ -40,7 +40,7 @@ test01()
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.size() == len );
}
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc
index 0df99ef0294..971fcde1d30 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3 } };
+
VERIFY( a == b );
VERIFY( !(a == c) );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc
index 11a8e770741..8d38e9a8a3c 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3, 7 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3, 7 } };
+
VERIFY( !(a > b) );
VERIFY( c > a );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc
index ad4e6d607f9..914cd2e326a 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3, 7 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3, 7 } };
+
VERIFY( a >= b );
VERIFY( c >= a );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc
index b42dc645f3e..e6f394cc935 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3, 7 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3, 7 } };
+
VERIFY( !(a < b) );
VERIFY( a < c );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc
index 6b8f6caf7c4..d74b529edd1 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3, 7 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3, 7 } };
+
VERIFY( a <= b );
VERIFY( a <= c );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc
index 717fc8a8307..dc0ac6381f9 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,10 +29,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3, 4 };
- array_type c = { 0, 1, 2, 3 };
-
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3, 4 } };
+ array_type c = { { 0, 1, 2, 3 } };
+
VERIFY( !(a != b) );
VERIFY( a != c );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
index 1c6c8edd670..ca3ea5d3b66 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
@@ -2,7 +2,7 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,8 +29,8 @@ test01()
{
typedef std::tr1::array<int, 5> array_type;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
+ array_type b = { { 0, 1, 2, 3 } };
a = b;
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc
index 10796dccfb8..cee0e732a71 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,7 +30,7 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
try
{
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc
index cc08381341e..9ba2f6343ac 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc
@@ -1,6 +1,6 @@
// 2005-08-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -32,13 +32,13 @@ test01()
typedef std::tr1::array<int, len> array_type;
{
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
int& ri = a.back();
VERIFY( ri == 4 );
}
{
- const array_type ca = { 4, 3, 2, 1, 0 };
+ const array_type ca = { { 4, 3, 2, 1, 0 } };
const int& cri = ca.back();
VERIFY( cri == 0 );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc
index f6866dcc670..3a4efcf1ffb 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc
@@ -1,6 +1,6 @@
// 2005-08-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -32,13 +32,13 @@ test01()
typedef std::tr1::array<int, len> array_type;
{
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
int* pi = a.data();
VERIFY( *pi == 0 );
}
{
- const array_type ca = { 4, 3, 2, 1, 0 };
+ const array_type ca = { { 4, 3, 2, 1, 0 } };
const int* pci = ca.data();
VERIFY( *pci == 4 );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc
index 33c93bef52f..493c6ed4c1b 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc
@@ -1,6 +1,6 @@
// 2005-08-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -32,13 +32,13 @@ test01()
typedef std::tr1::array<int, len> array_type;
{
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
int& ri = a.front();
VERIFY( ri == 0 );
}
{
- const array_type ca = { 4, 3, 2, 1, 0 };
+ const array_type ca = { { 4, 3, 2, 1, 0 } };
const int& cri = ca.front();
VERIFY( cri == 4 );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc
index 497fb61e32d..58ba7be4ea0 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -30,7 +30,7 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
array_type::iterator b = a.begin();
array_type::iterator e = a.end();
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc
index e65c54e9aee..5ffe849d91f 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc
@@ -1,6 +1,6 @@
// 2006-02-24 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 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
@@ -31,7 +31,7 @@ test01()
const size_t len = 3;
typedef std::tr1::array<int, len> array_type;
- array_type a = { 0, 1, 2 };
+ array_type a = { { 0, 1, 2 } };
const int value = 5;
a.assign(value);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc
index 7632674cf50..30c78583a44 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc
@@ -1,6 +1,6 @@
// 2004-10-20 Benjamin Kosnik <bkoz@redhat.com>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 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
@@ -29,7 +29,7 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
// &a[n] == &a[0] + n for all 0 <= n < N.
for (size_t i = 0; i < len; ++i)
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc
index 3baa3cb2b3a..3f09b89237a 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc
@@ -1,6 +1,6 @@
// 2006-02-24 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 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
@@ -31,10 +31,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
const array_type a_ref = a;
- array_type b = { 4, 3, 2, 1, 0 };
+ array_type b = { { 4, 3, 2, 1, 0 } };
const array_type b_ref = b;
a.swap(b);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc
index 6ec9968f4c7..f369838daa5 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc
@@ -1,6 +1,6 @@
// 2006-02-24 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 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
@@ -31,10 +31,10 @@ test01()
const size_t len = 5;
typedef std::tr1::array<int, len> array_type;
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
const array_type a_ref = a;
- array_type b = { 4, 3, 2, 1, 0 };
+ array_type b = { { 4, 3, 2, 1, 0 } };
const array_type b_ref = b;
std::tr1::swap(a, b);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc b/libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc
index b7463b38957..59c0c7ffc9a 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc
@@ -1,6 +1,6 @@
// 2005-08-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -33,13 +33,13 @@ test01()
typedef array<int, len> array_type;
{
- array_type a = { 0, 1, 2, 3, 4 };
+ array_type a = { { 0, 1, 2, 3, 4 } };
int& ri = get<0>(a);
VERIFY( ri == 0 );
}
{
- const array_type a = { 4, 3, 2, 1, 0 };
+ const array_type a = { { 4, 3, 2, 1, 0 } };
const int& cri = get<1>(a);
VERIFY( cri == 3 );
}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/hash/operators/size_t.cc b/libstdc++-v3/testsuite/tr1/6_containers/hash/operators/size_t.cc
new file mode 100644
index 00000000000..7b45816da50
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/hash/operators/size_t.cc
@@ -0,0 +1,76 @@
+// 2007-08-20 <benjamin@redhat.com>
+//
+// Copyright (C) 2007, 2008 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.
+
+// 6.3.3 Class template hash
+
+#include <tr1/functional>
+#include <string>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ void
+ do_test()
+ {
+ bool test __attribute__((unused)) = true;
+
+ typedef T value_type;
+ typedef std::tr1::hash<value_type> hash_type;
+ using std::size_t;
+
+ value_type v = T(); // default initialized is fine, same value all
+ // that matters.
+ hash_type h1;
+ size_t r1 = size_t(h1(v));
+
+ hash_type h2;
+ size_t r2 = size_t(h2(v));
+
+ VERIFY( r1 == r2 );
+ }
+
+void test01()
+{
+ do_test<bool>();
+ do_test<char>();
+ do_test<signed char>();
+ do_test<unsigned char>();
+ do_test<short>();
+ do_test<int>();
+ do_test<long>();
+ do_test<unsigned short>();
+ do_test<unsigned int>();
+ do_test<unsigned long>();
+ do_test<int*>();
+ do_test<std::string>();
+ do_test<float>();
+ do_test<double>();
+ do_test<long double>();
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ do_test<wchar_t>();
+ do_test<std::wstring>();
+#endif
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc b/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc
index c4e2e9c3160..fd0b595eb3f 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/headers/functional/synopsis.cc
@@ -29,24 +29,5 @@ namespace tr1 {
// [6.3.3] Hash function base template
template <class T> struct hash;
- // Hash function specializations
- template <> struct hash<bool>;
- template <> struct hash<char>;
- template <> struct hash<signed char>;
- template <> struct hash<unsigned char>;
- template <> struct hash<wchar_t>;
- template <> struct hash<short>;
- template <> struct hash<unsigned short>;
- template <> struct hash<int>;
- template <> struct hash<unsigned int>;
- template <> struct hash<long>;
- template <> struct hash<unsigned long>;
- template <> struct hash<float>;
- template <> struct hash<double>;
- template <> struct hash<long double>;
- template<class T> struct hash<T*>;
- template <> struct hash<std::string>;
- template <> struct hash<std::wstring>;
-
} // namespace tr1
} // namespace std
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc
index f22d975c86b..7eee7a8d12d 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -25,6 +25,8 @@
using namespace std::tr1;
+bool test __attribute__((unused)) = true;
+
#define TEST1(x) VERIFY( x == x && !(x != x) && x <= x && !(x < x) )
int
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc
index 6207b41f9df..973b5f0ce31 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/assignment.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -28,6 +28,8 @@ using namespace std::tr1;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
tuple<> ta;
tuple<> tb;
ta = tb;
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc
index a23ad8dbc74..3525bf2cb7c 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc
@@ -1,6 +1,7 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008
+// 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
@@ -33,11 +34,13 @@ struct foo
void
test_constructors()
{
+ bool test __attribute__((unused)) = true;
+
int x1=0,x2=0;
const int &z1=x1;
// Test empty constructor
- tuple<> ta;
+ tuple<> ta __attribute__((unused));
tuple<int,int> tb;
// Test construction from values
tuple<int,int> tc(x1,x2);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc
index 89e9a113ffa..73f9ed6879a 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc
@@ -1,6 +1,7 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008
+// 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
@@ -29,11 +30,13 @@ using std::pair;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
int x1=0,x2=0;
const int &z1=x1;
// Test empty constructor
- tuple<> ta;
+ tuple<> ta __attribute__((unused));
tuple<int,int> tb;
// Test construction from values
tuple<int,int> tc(x1,x2);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc
index ca69be21f0e..9a0fc6f6dae 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc
@@ -29,6 +29,8 @@ using namespace std::tr1;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
int i=0;
make_tuple(1,2,4.0);
make_tuple(ref(i)) = tuple<int>(1);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc
index ea63a5d5c6a..d8389be410d 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -28,6 +28,8 @@ using namespace std::tr1;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
int x1 = 0;
int x2 = 0;
int y1 = 0;
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie2.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie2.cc
new file mode 100644
index 00000000000..4682424cafa
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/creation_functions/tie2.cc
@@ -0,0 +1,37 @@
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// Tuple
+
+#include <tr1/tuple>
+#include <string>
+#include <testsuite_hooks.h>
+
+int
+main()
+{
+ bool test __attribute__((unused)) = true;
+ using namespace std::tr1;
+
+ int i;
+ std::string s;
+
+ tie(i, ignore, s) = make_tuple(42, 3.14, "C++");
+ VERIFY( i == 42 );
+ VERIFY( s == "C++" );
+}
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc
index 85ec6cb10dc..5cfda148634 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/element_access/get.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -28,6 +28,8 @@ using namespace std::tr1;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
int j=1;
const int k=2;
tuple<int,int &,const int&> a(0,j,k);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc
index 44a93171e85..6178e567699 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_element.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -31,7 +31,7 @@ struct foo
int
main()
{
- // As foo isn't constructable from anything else, this
+ // As foo isn't constructible from anything else, this
// lets us check if type is returning foo when it should
foo q1;
tuple_element<0,tuple<foo,void,int> >::type q2(q1);
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc
index 967cb43d95c..73389373b26 100644
--- a/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc
+++ b/libstdc++-v3/testsuite/tr1/6_containers/tuple/tuple_size.cc
@@ -1,6 +1,6 @@
// 2004-09-23 Chris Jefferson <chris@bubblescope.net>
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -28,6 +28,8 @@ using namespace std::tr1;
int
main()
{
+ bool test __attribute__((unused)) = true;
+
VERIFY(tuple_size<tuple<> >::value == 0);
VERIFY(tuple_size<tuple<int> >::value == 1);
VERIFY(tuple_size<tuple<void> >::value == 1);
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
index e96e169463c..d5bfb417a1d 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
@@ -32,7 +32,7 @@ void test01()
char s[] = "a+b|c";
test_type re;
- re.assign(s, s + sizeof(s));
+ re.assign(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
index ca48cadf880..1e97c6a5ce6 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
@@ -32,7 +32,7 @@ void test01()
wchar_t s[] = L"a+b|c";
test_type re;
- re.assign(s, s + sizeof(s));
+ re.assign(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
index 53f1f4fc1c8..42c2bf39879 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
@@ -31,7 +31,7 @@ void test01()
typedef std::tr1::basic_regex<char> test_type;
char s[] = "a+b|c";
- test_type re(s, s + sizeof(s));
+ test_type re(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
index eb9139a9038..9ebebf2f601 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
@@ -31,7 +31,7 @@ void test01()
typedef std::tr1::basic_regex<wchar_t> test_type;
wchar_t s[] = L"a+b|c";
- test_type re(s, s + sizeof(s));
+ test_type re(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/common_type.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/common_type.hpp
index 209208747f4..e5af5c22cca 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/common_type.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/common_type.hpp
@@ -51,13 +51,13 @@
#include <common_type/assoc/template_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
template<typename Key,
typename Data,
- class Hash_Fn = typename pb_ds::detail::default_hash_fn<Key>::type,
+ class Hash_Fn = typename __gnu_pbds::detail::default_hash_fn<Key>::type,
class Eq_Fn = std::equal_to<Key>,
class Allocator = std::allocator<std::pair<const Key, Data> > >
struct hash_common_types
@@ -66,7 +66,7 @@ namespace pb_ds
typedef typename Allocator::size_type size_type;
typedef
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
1, 8,
1, 2,
@@ -74,7 +74,7 @@ namespace pb_ds
no_access_half_load_check_resize_trigger_policy;
typedef
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
1, 8,
1, 2,
@@ -82,7 +82,7 @@ namespace pb_ds
access_half_load_check_resize_trigger_policy;
typedef
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
1, 8,
1, 1,
@@ -90,149 +90,149 @@ namespace pb_ds
no_access_one_load_check_resize_trigger_policy;
typedef
- pb_ds::test::cc_hash_max_collision_check_resize_trigger_t_<
+ __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<
Allocator,
1, 2,
false>
no_access_half_max_col_check_check_resize_trigger_policy;
typedef
- pb_ds::test::cc_hash_max_collision_check_resize_trigger_t_<
+ __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<
Allocator,
1, 2,
true>
access_half_max_col_check_check_resize_trigger_policy;
- typedef pb_ds::test::linear_probe_fn_t_<Key, Allocator> lin_p_t;
+ typedef __gnu_pbds::test::linear_probe_fn_t_<Key, Allocator> lin_p_t;
- typedef pb_ds::test::quadratic_probe_fn_t_<Key, Allocator> quad_p_t;
+ typedef __gnu_pbds::test::quadratic_probe_fn_t_<Key, Allocator> quad_p_t;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
performance_cc_policy0;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_prime_size_policy_t_>::type
+ __gnu_pbds::test::hash_prime_size_policy_t_>::type
performance_cc_policy1;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
no_access_one_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
performance_cc_policy2;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator>,
no_access_one_load_check_resize_trigger_policy,
- pb_ds::test::hash_prime_size_policy_t_ >::type
+ __gnu_pbds::test::hash_prime_size_policy_t_ >::type
performance_cc_policy3;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::true_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::true_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
performance_cc_policy4;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
no_access_half_max_col_check_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
performance_cc_policy5;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
access_half_max_col_check_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
regression_cc_policy0;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::false_type,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::detail::false_type,
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
regression_cc_policy1;
typedef
typename __gnu_cxx::typelist::create4<
- pb_ds::detail::true_type,
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::detail::true_type,
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_prime_size_policy_t_ >::type
+ __gnu_pbds::test::hash_prime_size_policy_t_ >::type
regression_cc_policy2;
typedef
typename __gnu_cxx::typelist::create5<
- pb_ds::detail::false_type,
+ __gnu_pbds::detail::false_type,
lin_p_t,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
performance_gp_policy0;
typedef
typename __gnu_cxx::typelist::create5<
- pb_ds::detail::false_type,
+ __gnu_pbds::detail::false_type,
quad_p_t,
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_prime_size_policy_t_ >::type
+ __gnu_pbds::test::hash_prime_size_policy_t_ >::type
performance_gp_policy1;
typedef
typename __gnu_cxx::typelist::create5<
- pb_ds::detail::false_type,
+ __gnu_pbds::detail::false_type,
quad_p_t,
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator>,
access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_prime_size_policy_t_>::type
+ __gnu_pbds::test::hash_prime_size_policy_t_>::type
regression_gp_policy0;
typedef
typename __gnu_cxx::typelist::create5<
- pb_ds::detail::true_type,
+ __gnu_pbds::detail::true_type,
lin_p_t,
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator>,
access_half_load_check_resize_trigger_policy,
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >::type
regression_gp_policy1;
@@ -296,13 +296,13 @@ namespace pb_ds
public:
typedef
- pb_ds::cc_hash_table<
+ __gnu_pbds::cc_hash_table<
Key,
Data,
Hash_Fn,
Eq_Fn,
comb_hash_fn,
- pb_ds::hash_standard_resize_policy<
+ __gnu_pbds::hash_standard_resize_policy<
size_policy,
trigger_policy,
false>,
@@ -342,13 +342,13 @@ namespace pb_ds
public:
typedef
- pb_ds::cc_hash_table<
+ __gnu_pbds::cc_hash_table<
Key,
Data,
Hash_Fn,
Eq_Fn,
comb_hash_fn,
- pb_ds::hash_standard_resize_policy<
+ __gnu_pbds::hash_standard_resize_policy<
size_policy,
trigger_policy,
true>,
@@ -393,14 +393,14 @@ namespace pb_ds
public:
typedef
- pb_ds::gp_hash_table<
+ __gnu_pbds::gp_hash_table<
Key,
Data,
Hash_Fn,
Eq_Fn,
comb_probe_fn,
probe_fn,
- pb_ds::hash_standard_resize_policy<
+ __gnu_pbds::hash_standard_resize_policy<
size_policy,
trigger_policy,
false>,
@@ -445,14 +445,14 @@ namespace pb_ds
public:
typedef
- pb_ds::gp_hash_table<
+ __gnu_pbds::gp_hash_table<
Key,
Data,
Hash_Fn,
Eq_Fn,
comb_probe_fn,
probe_fn,
- pb_ds::hash_standard_resize_policy<
+ __gnu_pbds::hash_standard_resize_policy<
size_policy,
trigger_policy,
true>,
@@ -533,7 +533,7 @@ namespace pb_ds
typedef typename Allocator::size_type size_type;
typedef
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
1, 8,
1, 2,
@@ -541,7 +541,7 @@ namespace pb_ds
no_access_half_load_check_resize_trigger_policy;
typedef
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
1, 8,
1, 1,
@@ -549,28 +549,28 @@ namespace pb_ds
no_access_one_load_check_resize_trigger_policy;
typedef
- pb_ds::hash_standard_resize_policy<
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::hash_standard_resize_policy<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator>,
no_access_half_load_check_resize_trigger_policy>
mask_half_resize_policy_t;
typedef
- pb_ds::hash_standard_resize_policy<
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::hash_standard_resize_policy<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator>,
no_access_one_load_check_resize_trigger_policy>
mask_one_resize_policy_t;
typedef
- pb_ds::hash_standard_resize_policy<
- pb_ds::test::hash_prime_size_policy_t_,
+ __gnu_pbds::hash_standard_resize_policy<
+ __gnu_pbds::test::hash_prime_size_policy_t_,
no_access_half_load_check_resize_trigger_policy>
mod_half_resize_policy_t;
typedef
- pb_ds::hash_standard_resize_policy<
- pb_ds::test::hash_prime_size_policy_t_,
+ __gnu_pbds::hash_standard_resize_policy<
+ __gnu_pbds::test::hash_prime_size_policy_t_,
no_access_one_load_check_resize_trigger_policy>
mod_one_resize_policy_t;
@@ -579,7 +579,7 @@ namespace pb_ds
template<typename Allocator_>
struct half_resize_policy_selector<
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator_> >
{
typedef mask_half_resize_policy_t type;
@@ -587,7 +587,7 @@ namespace pb_ds
template<typename Allocator_>
struct half_resize_policy_selector<
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator_> >
{
typedef mod_half_resize_policy_t type;
@@ -598,7 +598,7 @@ namespace pb_ds
template<typename Allocator_>
struct one_resize_policy_selector<
- pb_ds::test::direct_mask_range_hashing_t_<
+ __gnu_pbds::test::direct_mask_range_hashing_t_<
Allocator_> >
{
typedef mask_one_resize_policy_t type;
@@ -606,7 +606,7 @@ namespace pb_ds
template<typename Allocator_>
struct one_resize_policy_selector<
- pb_ds::test::direct_mod_range_hashing_t_<
+ __gnu_pbds::test::direct_mod_range_hashing_t_<
Allocator_> >
{
typedef mod_one_resize_policy_t type;
@@ -616,10 +616,10 @@ namespace pb_ds
struct generic_cc_hash_table_t
{
typedef
- pb_ds::cc_hash_table<
+ __gnu_pbds::cc_hash_table<
Key,
Data,
- pb_ds::null_hash_fn,
+ __gnu_pbds::null_hash_fn,
Eq_Fn,
Comb_Hash_Fn,
typename one_resize_policy_selector<
@@ -639,13 +639,13 @@ namespace pb_ds
struct no_access_generic_gp_hash_table_t
{
typedef
- pb_ds::gp_hash_table<
+ __gnu_pbds::gp_hash_table<
Key,
Data,
- pb_ds::null_hash_fn,
+ __gnu_pbds::null_hash_fn,
Eq_Fn,
Comb_Probe_Fn,
- pb_ds::null_probe_fn,
+ __gnu_pbds::null_probe_fn,
typename half_resize_policy_selector<
typename Comb_Probe_Fn::comb_fn>::type,
false,
@@ -675,9 +675,9 @@ namespace pb_ds
private:
typedef typename Allocator::size_type size_type;
- typedef pb_ds::test::move_to_front_lu_policy_t_ mtf_u;
+ typedef __gnu_pbds::test::move_to_front_lu_policy_t_ mtf_u;
- typedef pb_ds::test::counter_lu_policy_t_<Allocator, 5> cnt_5_u;
+ typedef __gnu_pbds::test::counter_lu_policy_t_<Allocator, 5> cnt_5_u;
typedef typename __gnu_cxx::typelist::create1<mtf_u>::type lu_policy0;
@@ -700,7 +700,7 @@ namespace pb_ds
public:
typedef
- pb_ds::list_update<
+ __gnu_pbds::list_update<
Key,
Data,
Eq_Fn,
@@ -733,37 +733,37 @@ namespace pb_ds
class Node_Iterator,
class Cmp_Fn_,
class Allocator_>
- class Node_Update = pb_ds::null_tree_node_update,
+ class Node_Update = __gnu_pbds::null_tree_node_update,
class Allocator = std::allocator<std::pair<const Key, Data> > >
struct tree_common_types
{
private:
typedef
- pb_ds::tree<
+ __gnu_pbds::tree<
Key,
Data,
Cmp_Fn,
- pb_ds::ov_tree_tag,
+ __gnu_pbds::ov_tree_tag,
Node_Update,
Allocator>
ov_tree_assoc_container_t;
typedef
- pb_ds::tree<
+ __gnu_pbds::tree<
Key,
Data,
Cmp_Fn,
- pb_ds::rb_tree_tag,
+ __gnu_pbds::rb_tree_tag,
Node_Update,
Allocator>
rb_tree_assoc_container_t;
typedef
- pb_ds::tree<
+ __gnu_pbds::tree<
Key,
Data,
Cmp_Fn,
- pb_ds::splay_tree_tag,
+ __gnu_pbds::splay_tree_tag,
Node_Update,
Allocator>
splay_tree_assoc_container_t;
@@ -792,18 +792,18 @@ namespace pb_ds
template<typename Key,
typename Data,
class E_Access_Traits =
- typename pb_ds::detail::default_trie_e_access_traits<Key>::type,
- class Tag = pb_ds::pat_trie_tag,
+ typename __gnu_pbds::detail::default_trie_e_access_traits<Key>::type,
+ class Tag = __gnu_pbds::pat_trie_tag,
template<typename Const_Node_Iterator,
typename Node_Iterator,
class E_Access_Traits_,
typename Allocator_>
- class Node_Update = pb_ds::null_trie_node_update,
+ class Node_Update = __gnu_pbds::null_trie_node_update,
class Allocator = std::allocator<char> >
class trie_common_types
{
private:
- typedef pb_ds::trie<Key, Data, E_Access_Traits, Tag, Node_Update, Allocator> type;
+ typedef __gnu_pbds::trie<Key, Data, E_Access_Traits, Tag, Node_Update, Allocator> type;
public:
typedef typename __gnu_cxx::typelist::create1<type>::type performance_tl;
@@ -813,6 +813,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_COMMON_TYPES_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp
index 024caab4b2b..41d908e58f5 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/comb_hash_fn_string_form.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -116,7 +116,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_COMB_HASH_FN_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp
index 84edbd90273..28625aff6aa 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/ds_string_form.hpp
@@ -59,7 +59,7 @@
#include <common_type/assoc/detail/store_hash_string_form.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -74,7 +74,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::cc_hash_tag>
+ __gnu_pbds::cc_hash_tag>
{
static std::string
name()
@@ -104,7 +104,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::gp_hash_tag>
+ __gnu_pbds::gp_hash_tag>
{
static std::string
name()
@@ -166,7 +166,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::rb_tree_tag> : private tree_ds_string_form<
+ __gnu_pbds::rb_tree_tag> : private tree_ds_string_form<
Cntnr>
{
private:
@@ -189,7 +189,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::splay_tree_tag> : private tree_ds_string_form<
+ __gnu_pbds::splay_tree_tag> : private tree_ds_string_form<
Cntnr>
{
private:
@@ -212,7 +212,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::ov_tree_tag> : private tree_ds_string_form<
+ __gnu_pbds::ov_tree_tag> : private tree_ds_string_form<
Cntnr>
{
private:
@@ -235,7 +235,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::list_update_tag>
+ __gnu_pbds::list_update_tag>
{
static std::string
name()
@@ -258,7 +258,7 @@ namespace pb_ds
template<typename Cntnr>
struct ds_string_form<
Cntnr,
- pb_ds::pat_trie_tag>
+ __gnu_pbds::pat_trie_tag>
{
static std::string
name()
@@ -298,7 +298,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_DS_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp
index d8f9e977aec..08b65056065 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/list_update_policy_string_form.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -107,7 +107,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_LU_POLICY_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp
index 364e7efcc73..84c5d040051 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/probe_fn_string_form.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -103,7 +103,7 @@ namespace pb_ds
template<>
struct probe_fn_string_form<
- pb_ds::null_probe_fn>
+ __gnu_pbds::null_probe_fn>
{
static std::string
name()
@@ -122,7 +122,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_PROBE_FN_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp
index 96da7a3c721..8507163ff77 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/resize_policy_string_form.hpp
@@ -53,7 +53,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -70,7 +70,7 @@ namespace pb_ds
bool External_Size_Access,
typename Size_Type>
struct resize_policy_string_form<
- pb_ds::hash_standard_resize_policy<
+ __gnu_pbds::hash_standard_resize_policy<
Size_Policy,
Trigger_Policy,
External_Size_Access,
@@ -100,7 +100,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_RESIZE_POLICY_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp
index 1ae61c4c14a..876505be3ee 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/size_policy_string_form.hpp
@@ -53,7 +53,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -67,7 +67,7 @@ namespace pb_ds
template<typename Allocator>
struct size_policy_string_form<
- pb_ds::test::hash_exponential_size_policy_t_<
+ __gnu_pbds::test::hash_exponential_size_policy_t_<
Allocator> >
{
static std::string
@@ -85,7 +85,7 @@ namespace pb_ds
template<>
struct size_policy_string_form<
- pb_ds::test::hash_prime_size_policy_t_>
+ __gnu_pbds::test::hash_prime_size_policy_t_>
{
static std::string
name()
@@ -104,7 +104,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_SIZE_POLICY_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp
index 4dabbd6ca8f..89ef675ced5 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/store_hash_string_form.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -97,7 +97,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_STORE_HASH_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp
index 14bdc7bab32..f4b23110491 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/tree_supports_order_statistics.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/tree_policy.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -63,9 +63,9 @@ namespace pb_ds
{
enum
{
- value = pb_ds::detail::is_same<
+ value = __gnu_pbds::detail::is_same<
typename Tree_Cntnr::node_update,
- pb_ds::tree_order_statistics_node_update<
+ __gnu_pbds::tree_order_statistics_node_update<
typename Tree_Cntnr::const_node_iterator,
typename Tree_Cntnr::node_iterator,
typename Tree_Cntnr::cmp_fn,
@@ -77,7 +77,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TREE_SUPPORTS_ORDER_STATISTICS_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp
index 43f2c711107..c23708f23cc 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_order_statistics.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/trie_policy.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -63,9 +63,9 @@ namespace pb_ds
{
enum
{
- value = pb_ds::detail::is_same<
+ value = __gnu_pbds::detail::is_same<
typename Tree_Cntnr::node_update,
- pb_ds::trie_order_statistics_node_update<
+ __gnu_pbds::trie_order_statistics_node_update<
typename Tree_Cntnr::const_node_iterator,
typename Tree_Cntnr::node_iterator,
typename Tree_Cntnr::e_access_traits,
@@ -77,7 +77,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TRIE_SUPPORTS_ORDER_STATISTICS_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp
index 7fb3479715f..0adf029507e 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trie_supports_prefix_search.hpp
@@ -49,7 +49,7 @@
#include <ext/pb_ds/trie_policy.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -63,9 +63,9 @@ namespace pb_ds
{
enum
{
- value = pb_ds::detail::is_same<
+ value = __gnu_pbds::detail::is_same<
typename Tree_Cntnr::node_update,
- pb_ds::trie_prefix_search_node_update<
+ __gnu_pbds::trie_prefix_search_node_update<
typename Tree_Cntnr::const_node_iterator,
typename Tree_Cntnr::node_iterator,
typename Tree_Cntnr::e_access_traits,
@@ -77,7 +77,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TRIE_SUPPORTS_PREFIX_SEARCH_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp
index 0d7081f4966..8169d938155 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/detail/trigger_policy_string_form.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/template_policy.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -70,7 +70,7 @@ namespace pb_ds
typename Allocator::size_type Max_Load_Denom,
bool External_Access>
struct trigger_policy_string_form<
- pb_ds::test::hash_load_check_resize_trigger_t_<
+ __gnu_pbds::test::hash_load_check_resize_trigger_t_<
Allocator,
Min_Load_Nom,
Min_Load_Denom,
@@ -111,7 +111,7 @@ namespace pb_ds
typename Allocator::size_type Load_Denom,
bool External_Access>
struct trigger_policy_string_form<
- pb_ds::test::cc_hash_max_collision_check_resize_trigger_t_<
+ __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<
Allocator,
Load_Nom,
Load_Denom,
@@ -147,7 +147,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TRIGGER_POLICY_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/native_set.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/native_set.hpp
index b34364b132d..4667c9d4e2d 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/native_set.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/native_set.hpp
@@ -52,7 +52,7 @@
#include <io/xml.hpp>
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -88,7 +88,7 @@ namespace pb_ds
{ return (make_xml_tag("type", "value", "std_set")); }
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/string_form.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/string_form.hpp
index f29f29d24e0..73015b8967d 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/string_form.hpp
@@ -61,7 +61,7 @@
#include <regression/basic_type.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -119,11 +119,11 @@ namespace pb_ds
{ return (""); }
static std::string
- name(pb_ds::null_mapped_type)
+ name(__gnu_pbds::null_mapped_type)
{ return ("set"); }
static std::string
- desc(pb_ds::null_mapped_type)
+ desc(__gnu_pbds::null_mapped_type)
{ return (""); }
public:
@@ -183,7 +183,7 @@ namespace pb_ds
typename Cntnr::container_category>
{ };
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/common_type/assoc/template_policy.hpp b/libstdc++-v3/testsuite/util/common_type/assoc/template_policy.hpp
index 10f03dadd06..12cf9fbcac6 100644
--- a/libstdc++-v3/testsuite/util/common_type/assoc/template_policy.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/assoc/template_policy.hpp
@@ -52,24 +52,24 @@
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/list_update_policy.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
template<typename Allocator>
struct direct_mask_range_hashing_t_
- : public pb_ds::direct_mask_range_hashing<typename Allocator::size_type>
+ : public __gnu_pbds::direct_mask_range_hashing<typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
- typedef pb_ds::direct_mask_range_hashing<size_type> base_type;
+ typedef __gnu_pbds::direct_mask_range_hashing<size_type> base_type;
};
template<typename Allocator>
struct direct_mod_range_hashing_t_
- : public pb_ds::direct_mod_range_hashing<typename Allocator::size_type>
+ : public __gnu_pbds::direct_mod_range_hashing<typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
- typedef pb_ds::direct_mod_range_hashing<size_type> base_type;
+ typedef __gnu_pbds::direct_mod_range_hashing<size_type> base_type;
};
template<typename Allocator,
@@ -79,11 +79,11 @@ namespace pb_ds
typename Allocator::size_type Max_Load_Denom,
bool External_Access>
struct hash_load_check_resize_trigger_t_
- : public pb_ds::hash_load_check_resize_trigger<External_Access,
+ : public __gnu_pbds::hash_load_check_resize_trigger<External_Access,
typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
- typedef pb_ds::hash_load_check_resize_trigger<External_Access, size_type> base_type;
+ typedef __gnu_pbds::hash_load_check_resize_trigger<External_Access, size_type> base_type;
inline
hash_load_check_resize_trigger_t_()
@@ -102,11 +102,11 @@ namespace pb_ds
typename Allocator::size_type Load_Denom,
bool External_Access>
struct cc_hash_max_collision_check_resize_trigger_t_
- : public pb_ds::cc_hash_max_collision_check_resize_trigger<External_Access,
+ : public __gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Access,
typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
- typedef pb_ds::cc_hash_max_collision_check_resize_trigger<External_Access, size_type> base_type;
+ typedef __gnu_pbds::cc_hash_max_collision_check_resize_trigger<External_Access, size_type> base_type;
inline
cc_hash_max_collision_check_resize_trigger_t_()
@@ -120,36 +120,36 @@ namespace pb_ds
};
};
- struct hash_prime_size_policy_t_ : public pb_ds::hash_prime_size_policy
+ struct hash_prime_size_policy_t_ : public __gnu_pbds::hash_prime_size_policy
{ };
template<typename Allocator>
struct hash_exponential_size_policy_t_
- : public pb_ds::hash_exponential_size_policy<typename Allocator::size_type>
+ : public __gnu_pbds::hash_exponential_size_policy<typename Allocator::size_type>
{ };
template<typename Key, class Allocator>
struct linear_probe_fn_t_
- : public pb_ds::linear_probe_fn<typename Allocator::size_type>
+ : public __gnu_pbds::linear_probe_fn<typename Allocator::size_type>
{ };
template<typename Key, class Allocator>
struct quadratic_probe_fn_t_
- : public pb_ds::quadratic_probe_fn<typename Allocator::size_type>
+ : public __gnu_pbds::quadratic_probe_fn<typename Allocator::size_type>
{ };
template<typename Allocator, typename Allocator::size_type Max_Count>
struct counter_lu_policy_t_
- : public pb_ds::counter_lu_policy<Max_Count, Allocator>
+ : public __gnu_pbds::counter_lu_policy<Max_Count, Allocator>
{
- typedef pb_ds::counter_lu_policy<Max_Count, Allocator> base_type;
+ typedef __gnu_pbds::counter_lu_policy<Max_Count, Allocator> base_type;
};
struct move_to_front_lu_policy_t_
- : public pb_ds::move_to_front_lu_policy<>
+ : public __gnu_pbds::move_to_front_lu_policy<>
{ };
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/common_type/priority_queue/common_type.hpp b/libstdc++-v3/testsuite/util/common_type/priority_queue/common_type.hpp
index a9975578463..80176db44dd 100644
--- a/libstdc++-v3/testsuite/util/common_type/priority_queue/common_type.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/priority_queue/common_type.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/typelist.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -62,15 +62,15 @@ namespace pb_ds
private:
// typedef typename Allocator::size_type size_type;
- typedef pb_ds::priority_queue<Value_Type, Cmp_Fn, pb_ds::pairing_heap_tag, Allocator> pairing_heap_t;
+ typedef __gnu_pbds::priority_queue<Value_Type, Cmp_Fn, __gnu_pbds::pairing_heap_tag, Allocator> pairing_heap_t;
- typedef pb_ds::priority_queue<Value_Type, Cmp_Fn, pb_ds::binomial_heap_tag, Allocator> binomial_heap_t;
+ typedef __gnu_pbds::priority_queue<Value_Type, Cmp_Fn, __gnu_pbds::binomial_heap_tag, Allocator> binomial_heap_t;
- typedef pb_ds::priority_queue<Value_Type, Cmp_Fn, pb_ds::rc_binomial_heap_tag, Allocator> rc_binomial_heap_t;
+ typedef __gnu_pbds::priority_queue<Value_Type, Cmp_Fn, __gnu_pbds::rc_binomial_heap_tag, Allocator> rc_binomial_heap_t;
- typedef pb_ds::priority_queue<Value_Type, Cmp_Fn, pb_ds::binary_heap_tag, Allocator> binary_heap_t;
+ typedef __gnu_pbds::priority_queue<Value_Type, Cmp_Fn, __gnu_pbds::binary_heap_tag, Allocator> binary_heap_t;
- typedef pb_ds::priority_queue<Value_Type, Cmp_Fn, pb_ds::thin_heap_tag, Allocator> thin_heap_t;
+ typedef __gnu_pbds::priority_queue<Value_Type, Cmp_Fn, __gnu_pbds::thin_heap_tag, Allocator> thin_heap_t;
typedef typename __gnu_cxx::typelist::create5<thin_heap_t, pairing_heap_t, binomial_heap_t, rc_binomial_heap_t, binary_heap_t>::type all_tl;
@@ -82,6 +82,6 @@ namespace pb_ds
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_COMMON_TYPES_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/priority_queue/detail/ds_string_form.hpp b/libstdc++-v3/testsuite/util/common_type/priority_queue/detail/ds_string_form.hpp
index 4c33e6c1fdb..bf3b6885024 100644
--- a/libstdc++-v3/testsuite/util/common_type/priority_queue/detail/ds_string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/priority_queue/detail/ds_string_form.hpp
@@ -51,7 +51,7 @@
#include <ext/pb_ds/tag_and_trait.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -61,7 +61,7 @@ namespace pb_ds
struct ds_string_form;
template<typename Cntnr>
- struct ds_string_form<Cntnr, pb_ds::pairing_heap_tag>
+ struct ds_string_form<Cntnr, __gnu_pbds::pairing_heap_tag>
{
static std::string
name()
@@ -73,7 +73,7 @@ namespace pb_ds
};
template<typename Cntnr>
- struct ds_string_form<Cntnr, pb_ds::thin_heap_tag>
+ struct ds_string_form<Cntnr, __gnu_pbds::thin_heap_tag>
{
static std::string
name()
@@ -85,7 +85,7 @@ namespace pb_ds
};
template<typename Cntnr>
- struct ds_string_form<Cntnr, pb_ds::binomial_heap_tag>
+ struct ds_string_form<Cntnr, __gnu_pbds::binomial_heap_tag>
{
static std::string
name()
@@ -97,7 +97,7 @@ namespace pb_ds
};
template<typename Cntnr>
- struct ds_string_form<Cntnr, pb_ds::rc_binomial_heap_tag>
+ struct ds_string_form<Cntnr, __gnu_pbds::rc_binomial_heap_tag>
{
static std::string
name()
@@ -109,7 +109,7 @@ namespace pb_ds
};
template<typename Cntnr>
- struct ds_string_form<Cntnr, pb_ds::binary_heap_tag>
+ struct ds_string_form<Cntnr, __gnu_pbds::binary_heap_tag>
{
static std::string
name()
@@ -122,7 +122,7 @@ namespace pb_ds
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_DS_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/common_type/priority_queue/string_form.hpp b/libstdc++-v3/testsuite/util/common_type/priority_queue/string_form.hpp
index 6d85b86a11d..0e5b0ce87c9 100644
--- a/libstdc++-v3/testsuite/util/common_type/priority_queue/string_form.hpp
+++ b/libstdc++-v3/testsuite/util/common_type/priority_queue/string_form.hpp
@@ -54,7 +54,7 @@
#include <common_type/priority_queue/detail/ds_string_form.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -103,7 +103,7 @@ namespace pb_ds
: public detail::tag_select_string_form<Cntnr, typename Cntnr::container_category>
{ };
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_STRING_FORM_HPP
diff --git a/libstdc++-v3/testsuite/util/hash_fn/dna_str_limit.hpp b/libstdc++-v3/testsuite/util/hash_fn/dna_str_limit.hpp
index 144cf03b2b9..0f97906764f 100644
--- a/libstdc++-v3/testsuite/util/hash_fn/dna_str_limit.hpp
+++ b/libstdc++-v3/testsuite/util/hash_fn/dna_str_limit.hpp
@@ -50,7 +50,7 @@
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -67,6 +67,6 @@ namespace pb_ds
return ret;
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_DNA_STR_LIMIT_HPP
diff --git a/libstdc++-v3/testsuite/util/hash_fn/limit_string_hash_fn.hpp b/libstdc++-v3/testsuite/util/hash_fn/limit_string_hash_fn.hpp
index 78cc6f22735..59c09672256 100644
--- a/libstdc++-v3/testsuite/util/hash_fn/limit_string_hash_fn.hpp
+++ b/libstdc++-v3/testsuite/util/hash_fn/limit_string_hash_fn.hpp
@@ -49,7 +49,7 @@
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -77,6 +77,6 @@ namespace pb_ds
size_t limit_string_hash_fn::_S_max;
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/hash_fn/string_hash_fn.hpp b/libstdc++-v3/testsuite/util/hash_fn/string_hash_fn.hpp
index b1990b4b390..00da3a95bce 100644
--- a/libstdc++-v3/testsuite/util/hash_fn/string_hash_fn.hpp
+++ b/libstdc++-v3/testsuite/util/hash_fn/string_hash_fn.hpp
@@ -49,7 +49,7 @@
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -73,6 +73,6 @@ namespace pb_ds
}
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/hash_fn/string_ranged_hash_fn.hpp b/libstdc++-v3/testsuite/util/hash_fn/string_ranged_hash_fn.hpp
index e9a5465e485..ebfe6e2c605 100644
--- a/libstdc++-v3/testsuite/util/hash_fn/string_ranged_hash_fn.hpp
+++ b/libstdc++-v3/testsuite/util/hash_fn/string_ranged_hash_fn.hpp
@@ -50,7 +50,7 @@
#include <string>
#include <hash_fn/dna_str_limit.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -104,6 +104,6 @@ namespace pb_ds
{ return ("string ranged-hash using" + string_form<comb_fn>::desc()); }
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/hash_fn/string_ranged_probe_fn.hpp b/libstdc++-v3/testsuite/util/hash_fn/string_ranged_probe_fn.hpp
index 63bb0533c55..b677fed58b7 100644
--- a/libstdc++-v3/testsuite/util/hash_fn/string_ranged_probe_fn.hpp
+++ b/libstdc++-v3/testsuite/util/hash_fn/string_ranged_probe_fn.hpp
@@ -49,7 +49,7 @@
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -108,6 +108,6 @@ namespace pb_ds
{ return ("string ranged-probe using" + string_form<comb_fn>::desc());}
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp b/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp
index 63675f9850c..033a90b3b1c 100644
--- a/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp
+++ b/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp
@@ -49,7 +49,7 @@
#include <exception>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -67,6 +67,6 @@ namespace pb_ds
#endif
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_ILLEGAL_INPUT_EX_HPP
diff --git a/libstdc++-v3/testsuite/util/io/prog_bar.cc b/libstdc++-v3/testsuite/util/io/prog_bar.cc
index 365c5186532..b306762a9bd 100644
--- a/libstdc++-v3/testsuite/util/io/prog_bar.cc
+++ b/libstdc++-v3/testsuite/util/io/prog_bar.cc
@@ -46,7 +46,7 @@
#include <util/io/prog_bar.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -89,4 +89,4 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/testsuite/util/io/prog_bar.hpp b/libstdc++-v3/testsuite/util/io/prog_bar.hpp
index 0bbbda27854..b58f770933f 100644
--- a/libstdc++-v3/testsuite/util/io/prog_bar.hpp
+++ b/libstdc++-v3/testsuite/util/io/prog_bar.hpp
@@ -51,7 +51,7 @@
#include <iostream>
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -91,6 +91,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_PROG_BAR_HPP
diff --git a/libstdc++-v3/testsuite/util/io/text_populate.hpp b/libstdc++-v3/testsuite/util/io/text_populate.hpp
index a91097c5c93..c8bd15ebd24 100644
--- a/libstdc++-v3/testsuite/util/io/text_populate.hpp
+++ b/libstdc++-v3/testsuite/util/io/text_populate.hpp
@@ -54,7 +54,7 @@
#include <string>
#include <iostream>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -75,7 +75,7 @@ namespace pb_ds
std::cerr << "Cannot open file " << r_f_name.c_str() <<
std::endl;
- throw pb_ds::test::illegal_input_error();
+ throw __gnu_pbds::test::illegal_input_error();
}
size_t i = 0;
@@ -93,7 +93,7 @@ namespace pb_ds
std::cerr << "Read only " << static_cast<unsigned long>(i) <<
" words" << std::endl;
- throw pb_ds::test::illegal_input_error();
+ throw __gnu_pbds::test::illegal_input_error();
}
}
catch(...)
@@ -119,7 +119,7 @@ namespace pb_ds
std::cerr << "Cannot open file " << r_f_name.c_str() <<
std::endl;
- throw pb_ds::test::illegal_input_error();
+ throw __gnu_pbds::test::illegal_input_error();
}
typedef std::set< typename Vec::value_type::first_type> set_t;
@@ -145,7 +145,7 @@ namespace pb_ds
std::cerr << "Read only " << static_cast<unsigned long>(s.size()) <<
" words" << std::endl;
- throw pb_ds::test::illegal_input_error();
+ throw __gnu_pbds::test::illegal_input_error();
}
}
catch(...)
@@ -158,6 +158,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TEXT_POPULATE_HPP
diff --git a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc
index c24cd6fc10e..824f0d733f3 100644
--- a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc
+++ b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc
@@ -50,7 +50,7 @@
#include <stdlib.h>
#include <bits/functexcept.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -113,4 +113,4 @@ namespace pb_ds
return false;
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.hpp b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.hpp
index 725c75e6291..4e0b99216ce 100644
--- a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.hpp
+++ b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.hpp
@@ -50,7 +50,7 @@
#include <io/illegal_input_error.hpp>
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -72,6 +72,6 @@ namespace pb_ds
bool
get_cmd_line_bool(int argc, char* a_p_argv[], int argn);
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_VERIFIED_CMD_LINE_INPUT_HPP
diff --git a/libstdc++-v3/testsuite/util/io/xml.hpp b/libstdc++-v3/testsuite/util/io/xml.hpp
index 506c1a10a0d..eb544da4442 100644
--- a/libstdc++-v3/testsuite/util/io/xml.hpp
+++ b/libstdc++-v3/testsuite/util/io/xml.hpp
@@ -50,7 +50,7 @@
#include <string>
#include <sstream>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -126,6 +126,6 @@ namespace pb_ds
return sstrm.str();
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_XML_HPP
diff --git a/libstdc++-v3/testsuite/util/io/xml_test_formatter.hpp b/libstdc++-v3/testsuite/util/io/xml_test_formatter.hpp
index ceedf817378..9eab6888ffb 100644
--- a/libstdc++-v3/testsuite/util/io/xml_test_formatter.hpp
+++ b/libstdc++-v3/testsuite/util/io/xml_test_formatter.hpp
@@ -51,7 +51,7 @@
#include <iostream>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -83,6 +83,6 @@ namespace pb_ds
{ std::cout << "</cntnr>" << std::endl; }
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_XML_TEST_FORMATTER_HPP
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_map.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_map.hpp
index be0e8f4227c..5db36110601 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_map.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_map.hpp
@@ -41,7 +41,7 @@
/**
* @file native_hash_map.hpp
- * Contains an adapter to Dinkumware/SGI hash tables
+ * Contains an adapter to TR1 unordered containers.
*/
#ifndef PB_DS_NATIVE_HASH_MAP_HPP
@@ -52,40 +52,23 @@
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <native_type/assoc/native_hash_tag.hpp>
#include <io/xml.hpp>
-
-// Default to using tr1.
-#define PB_DS_USE_TR1 1
-
-#ifdef PB_DS_USE_TR1
#include <tr1/unordered_map>
-#else
-#include <ext/hash_map>
-#endif
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
-#ifdef PB_DS_USE_TR1
#define PB_DS_BASE_C_DEC \
std::tr1::__unordered_map<Key, Data, Hash_Fn, Eq_Fn, \
typename Allocator::template rebind<std::pair<const Key, Data> >::other, Cache_Hash>
-#else
-#define PB_DS_BASE_C_DEC \
- __gnu_cxx::hash_map<Key, Data, Hash_Fn, Eq_Fn, \
- typename Allocator::template rebind<std::pair<const Key, Data> >::other>
-#endif
template<typename Key,
typename Data,
size_t Init_Size = 8,
- typename Hash_Fn = typename pb_ds::detail::default_hash_fn<Key>::type,
+ typename Hash_Fn = typename __gnu_pbds::detail::default_hash_fn<Key>::type,
typename Eq_Fn = std::equal_to<Key>,
typename Less_Fn = std::less<Key>,
- typename Allocator = std::allocator<char>
-#ifdef PB_DS_USE_TR1
- , bool Cache_Hash = false
-#endif
+ typename Allocator = std::allocator<char>, bool Cache_Hash = false
>
class native_hash_map : public PB_DS_BASE_C_DEC
{
@@ -104,18 +87,13 @@ namespace pb_ds
static std::string
name()
{
-#ifdef PB_DS_USE_TR1
return std::string("n_hash_map_")
+ (Cache_Hash ? std::string("cah") : std::string("ncah"));
-#else
- return std::string("n_hash_map_ncah");
-#endif
}
static std::string
desc()
{
-#ifdef PB_DS_USE_TR1
const std::string cache_hash_desc =
make_xml_tag("cache_hash_code",
"value",
@@ -123,16 +101,13 @@ namespace pb_ds
return make_xml_tag("type", "value", "std_tr1_unordered_map",
cache_hash_desc);
-#else
- return make_xml_tag("type", "value", "__gnucxx_hash_map");
-#endif
}
};
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
index a525ef20759..a3f82ba8a75 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_multimap.hpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -41,50 +41,47 @@
/**
* @file native_hash_multimap.hpp
- * Contains an adapter to Dinkumware/SGI hash tables
+ * Contains an adapter to TR1 unordered containers.
*/
#ifndef PB_DS_NATIVE_HASH_MULTIMAP_HPP
#define PB_DS_NATIVE_HASH_MULTIMAP_HPP
#include <string>
-#include <ext/hash_map>
+#include <tr1/unordered_map>
#include <ext/pb_ds/detail/type_utils.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <native_type/assoc/native_hash_tag.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
#define PB_DS_BASE_C_DEC \
- __gnu_cxx::hash_multimap<Key, Data, Hash_Fn, Eq_Fn, Allocator>
+ std::tr1::unordered_multimap<Key, Data, Hash_Fn, Eq_Fn, Allocator>
template<typename Key,
typename Data,
size_t Init_Size = 8,
- class Hash_Fn = typename pb_ds::detail::default_hash_fn<Key>::type,
+ class Hash_Fn = typename __gnu_pbds::detail::default_hash_fn<Key>::type,
class Eq_Fn = std::equal_to<Key>,
class Less_Fn = std::less<Key>,
class Allocator = std::allocator<char> >
class native_hash_multimap : public PB_DS_BASE_C_DEC
{
private:
- typedef PB_DS_BASE_C_DEC base_type;
+ typedef PB_DS_BASE_C_DEC base_type;
+ typedef std::pair<Key, Data> pair_type;
public:
- typedef native_hash_tag container_category;
-
- typedef Allocator allocator;
-
- typedef typename base_type::iterator iterator;
-
+ typedef native_hash_tag container_category;
+ typedef Allocator allocator;
+ typedef typename base_type::iterator iterator;
typedef typename base_type::const_iterator const_iterator;
typedef
- typename Allocator::template rebind<
- std::pair<Key, Data> >::other::const_reference
+ typename allocator::template rebind<pair_type>::other::const_reference
const_reference;
native_hash_multimap() : base_type(Init_Size)
@@ -95,7 +92,7 @@ namespace pb_ds
{ }
inline void
- insert(typename base_type::const_reference r_val)
+ insert(const_reference r_val)
{
typedef std::pair<iterator, iterator> eq_range_t;
eq_range_t f = base_type::equal_range(r_val.first);
@@ -148,14 +145,12 @@ namespace pb_ds
static std::string
desc()
- {
- return make_xml_tag("type", "value", "__gnucxx_hash_multimap");
- }
+ { return make_xml_tag("type", "value", "__gnucxx_hash_multimap"); }
};
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_set.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_set.hpp
index c78553b73fe..86ad2482132 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_set.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_set.hpp
@@ -41,7 +41,7 @@
/**
* @file native_hash_set.hpp
- * Contains an adapter to Dinkumware/SGI hash tables
+ * Contains an adapter to TR1 unordered containers.
*/
#ifndef PB_DS_NATIVE_HASH_SET_HPP
@@ -52,39 +52,22 @@
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <native_type/assoc/native_hash_tag.hpp>
#include <io/xml.hpp>
-
-// Default to using tr1.
-#define PB_DS_USE_TR1 1
-
-#ifdef PB_DS_USE_TR1
#include <tr1/unordered_set>
-#else
-#include <ext/hash_set>
-#endif
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
-#ifdef PB_DS_USE_TR1
#define PB_DS_BASE_C_DEC \
std::tr1::__unordered_set<Key, Hash_Fn, Eq_Fn, \
typename Allocator::template rebind<Key>::other, Cache_Hash>
-#else
-#define PB_DS_BASE_C_DEC \
- __gnu_cxx::hash_set<Key, Hash_Fn, Eq_Fn, \
- typename Allocator::template rebind<Key>::other>
-#endif
template<typename Key,
size_t Init_Size = 8,
- typename Hash_Fn = typename pb_ds::detail::default_hash_fn<Key>::type,
+ typename Hash_Fn = typename __gnu_pbds::detail::default_hash_fn<Key>::type,
typename Eq_Fn = std::equal_to<Key>,
typename Less_Fn = std::less<Key>,
- typename Allocator = std::allocator<char>
-#ifdef PB_DS_USE_TR1
- , bool Cache_Hash = false
-#endif
+ typename Allocator = std::allocator<char>, bool Cache_Hash = false
>
class native_hash_set : public PB_DS_BASE_C_DEC
{
@@ -129,32 +112,24 @@ namespace pb_ds
static std::string
name()
{
-#ifdef PB_DS_USE_TR1
return std::string("n_hash_set_")
+ (Cache_Hash ? std::string("cah") : std::string("ncah"));
-#else
- return std::string("n_hash_set_ncah");
-#endif
}
static std::string
desc()
{
-#ifdef PB_DS_USE_TR1
const std::string cache_hash_desc =
make_xml_tag("cache_hash_code", "value",
Cache_Hash ? std::string("true") : std::string("false"));
return make_xml_tag("type", "value", "std_tr1_unordered_set",
cache_hash_desc);
-#else
- return make_xml_tag("type", "value", "__gnucxx_hash_set");
-#endif
}
};
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_tag.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_tag.hpp
index d4a19c2bda1..ad8fec10f2c 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_tag.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_hash_tag.hpp
@@ -47,12 +47,12 @@
#ifndef PB_DS_NATIVE_HASH_DS_TAG_HPP
#define PB_DS_NATIVE_HASH_DS_TAG_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
struct native_hash_tag { };
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_map.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_map.hpp
index d32730c230b..1be7ee5984f 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_map.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_map.hpp
@@ -41,7 +41,7 @@
/**
* @file native_map.hpp
- * Contains an adapter to Dinkumware/SGI tree tables
+ * Contains an adapter to std::map
*/
#ifndef PB_DS_NATIVE_MAP_HPP
@@ -54,7 +54,7 @@
#include <native_type/assoc/native_tree_tag.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -92,6 +92,6 @@ typename Allocator::template rebind<std::pair<const Key, Data > >::other >
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_NATIVE_MAP_HPP
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp
index e2e1bafb3fb..906fca3244e 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_multimap.hpp
@@ -41,7 +41,7 @@
/**
* @file native_multimap.hpp
- * Contains an adapter to Dinkumware/SGI tables
+ * Contains an adapter to std::multimap
*/
#ifndef PB_DS_NATIVE_MULTIMAP_HPP
@@ -52,7 +52,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <native_type/assoc/native_tree_tag.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -147,6 +147,6 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_NATIVE_MULTIMAP_HPP
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_set.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_set.hpp
index 9d03adce3fc..b25f2bac29e 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_set.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_set.hpp
@@ -41,7 +41,7 @@
/**
* @file native_set.hpp
- * Contains an adapter to Dinkumware/SGI tree tables
+ * Contains an adapter to std::set
*/
#ifndef PB_DS_NATIVE_SET_HPP
@@ -53,7 +53,7 @@
#include <native_type/assoc/native_tree_tag.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -92,6 +92,6 @@ namespace pb_ds
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_NATIVE_SET_HPP
diff --git a/libstdc++-v3/testsuite/util/native_type/assoc/native_tree_tag.hpp b/libstdc++-v3/testsuite/util/native_type/assoc/native_tree_tag.hpp
index e8f8e705fb6..de2a019b273 100644
--- a/libstdc++-v3/testsuite/util/native_type/assoc/native_tree_tag.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/assoc/native_tree_tag.hpp
@@ -47,13 +47,13 @@
#ifndef PB_DS_NATIVE_TREE_DS_TAG_HPP
#define PB_DS_NATIVE_TREE_DS_TAG_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
struct native_tree_tag
{ };
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/native_type/priority_queue/native_priority_queue.hpp b/libstdc++-v3/testsuite/util/native_type/priority_queue/native_priority_queue.hpp
index 88b2697c4bd..81525c0bfc9 100644
--- a/libstdc++-v3/testsuite/util/native_type/priority_queue/native_priority_queue.hpp
+++ b/libstdc++-v3/testsuite/util/native_type/priority_queue/native_priority_queue.hpp
@@ -55,7 +55,7 @@
#include <ext/pb_ds/detail/type_utils.hpp>
#include <io/xml.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -229,6 +229,6 @@ namespace pb_ds
#undef PB_DS_CLASS_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
index 3d2804e81f5..722811aac51 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/erase_test.hpp
@@ -53,7 +53,7 @@
#include <performance/io/xml_formatter.hpp>
#include <common_type/assoc/string_form.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -113,7 +113,7 @@ namespace pb_ds
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
index 1fb4eef9003..22300bb5b86 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/mem_usage/multimap_insert_test.hpp
@@ -53,7 +53,7 @@
#include <performance/io/xml_formatter.hpp>
#include <common_type/assoc/string_form.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -74,11 +74,11 @@ namespace pb_ds
template<typename Cntnr>
size_t
- insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::true_type);
+ insert(Cntnr, It ins_it_b, It ins_it_e, __gnu_pbds::detail::true_type);
template<typename Cntnr>
size_t
- insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::false_type);
+ insert(Cntnr, It ins_it_b, It ins_it_e, __gnu_pbds::detail::false_type);
const It m_ins_b;
const size_t m_ins_vn;
@@ -104,7 +104,7 @@ namespace pb_ds
std::advance(ins_it_e, ins_size);
const size_t delta_mem = insert(Cntnr(), ins_it_b, ins_it_e,
- pb_ds::detail::integral_constant<int,Native>());
+ __gnu_pbds::detail::integral_constant<int,Native>());
res_set_fmt.add_res(ins_size, static_cast<double>(delta_mem));
}
@@ -114,7 +114,7 @@ namespace pb_ds
template<typename Cntnr>
size_t
multimap_insert_test<It, Native>::
- insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::true_type)
+ insert(Cntnr, It ins_it_b, It ins_it_e, __gnu_pbds::detail::true_type)
{
typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
@@ -133,7 +133,7 @@ namespace pb_ds
template<typename Cntnr>
size_t
multimap_insert_test<It, Native>::
- insert(Cntnr, It ins_it_b, It ins_it_e, pb_ds::detail::false_type)
+ insert(Cntnr, It ins_it_b, It ins_it_e, __gnu_pbds::detail::false_type)
{
typedef __gnu_test::tracker_allocator_counter counter_type;
__gnu_test::tracker_allocator<char> alloc;
@@ -148,7 +148,7 @@ namespace pb_ds
return (final_mem - init_mem);
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/multimap_common_type.hpp b/libstdc++-v3/testsuite/util/performance/assoc/multimap_common_type.hpp
index e0bb1e95d73..2d386ff2645 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/multimap_common_type.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/multimap_common_type.hpp
@@ -50,7 +50,7 @@
#include <hash_fn/string_hash_fn.hpp>
#include <common_type/assoc/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -67,9 +67,9 @@ namespace pb_ds
struct hash_set_tl_t
{
typedef
- typename pb_ds::test::hash_common_types<
+ typename __gnu_pbds::test::hash_common_types<
Key,
- pb_ds::null_mapped_type,
+ __gnu_pbds::null_mapped_type,
int_hash,
std::equal_to<Key>,
Allocator>::performance_min_tl
@@ -80,9 +80,9 @@ namespace pb_ds
struct lu_set_tl_t
{
typedef
- typename pb_ds::test::lu_common_types<
+ typename __gnu_pbds::test::lu_common_types<
Key,
- pb_ds::null_mapped_type,
+ __gnu_pbds::null_mapped_type,
std::equal_to<
Key>,
Allocator>::performance_min_tl
@@ -96,8 +96,8 @@ namespace pb_ds
{
private:
typedef
- typename pb_ds::detail::__conditional_type<
- pb_ds::detail::is_same<
+ typename __gnu_pbds::detail::__conditional_type<
+ __gnu_pbds::detail::is_same<
int,
Key>::value,
int_hash,
@@ -108,7 +108,7 @@ namespace pb_ds
struct hash_mmap_transform
{
typedef
- typename pb_ds::test::hash_common_types<
+ typename __gnu_pbds::test::hash_common_types<
Key,
Cntnr_T,
hash_fn_t,
@@ -137,12 +137,12 @@ namespace pb_ds
struct tree_mmap_transform
{
typedef
- typename pb_ds::test::tree_common_types<
+ typename __gnu_pbds::test::tree_common_types<
Key,
Cntnr_T,
std::less<
Key>,
- pb_ds::null_tree_node_update,
+ __gnu_pbds::null_tree_node_update,
Allocator>::performance_min_tl
type;
};
@@ -227,7 +227,7 @@ namespace pb_ds
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/common_type.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/common_type.hpp
index be4a31b3bdc..72cdf115cbc 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/common_type.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/common_type.hpp
@@ -49,25 +49,25 @@
#include <common_type/assoc/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
typedef
- pb_ds::test::hash_common_types<
+ __gnu_pbds::test::hash_common_types<
int,
- pb_ds::null_mapped_type>::tl
+ __gnu_pbds::null_mapped_type>::tl
hash_set_tl_t;
template<typename Cntnr_T>
struct hash_mmap_transform
{
typedef
- typename pb_ds::test::hash_common_types<
+ typename __gnu_pbds::test::hash_common_types<
int,
- pb_ds::compound_data_type<
+ __gnu_pbds::compound_data_type<
Cntnr_T> >::tl
type;
};
@@ -80,18 +80,18 @@ namespace pb_ds
hash_mmap_tl_t;
typedef
- pb_ds::test::tree_common_types<
+ __gnu_pbds::test::tree_common_types<
int,
- pb_ds::null_mapped_type>::tl
+ __gnu_pbds::null_mapped_type>::tl
tree_set_tl_t;
template<typename Cntnr_T>
struct tree_mmap_transform
{
typedef
- typename pb_ds::test::tree_common_types<
+ typename __gnu_pbds::test::tree_common_types<
int,
- pb_ds::compound_data_type<
+ __gnu_pbds::compound_data_type<
Cntnr_T> >::tl
type;
};
@@ -107,7 +107,7 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_MULTIMAP_RANDOM_INT_INSERT_TEST_COMMON_TYPE_HPP
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/find_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/find_test.hpp
index bffac262247..d9ec7fb1572 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/find_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/find_test.hpp
@@ -52,7 +52,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -111,7 +111,7 @@ namespace pb_ds
} // namespace detail
template<typename It, bool LOR = false>
- class find_test : private pb_ds::test::detail::timing_test_base
+ class find_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
find_test(It ins_b, It fnd_it_b, size_t ins_vn, size_t ins_vs,
@@ -161,16 +161,16 @@ namespace pb_ds
It fnd_it_e = m_fnd_it_b;
std::advance(fnd_it_e, fnd_size);
- pb_ds::test::detail::find_find_functor<It, Cntnr, LOR>
+ __gnu_pbds::test::detail::find_find_functor<It, Cntnr, LOR>
fn(test_container, fnd_it_b, fnd_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / fnd_size);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/insert_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/insert_test.hpp
index c1ff8eb064a..b4dfa29b8cf 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/insert_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/insert_test.hpp
@@ -53,7 +53,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -85,7 +85,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class insert_test : private pb_ds::test::detail::timing_test_base
+ class insert_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
insert_test(It ins_b, size_t ins_vn, size_t ins_vs, size_t ins_vm)
@@ -126,11 +126,11 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, v);
- pb_ds::test::detail::insert_insert_functor<It, Cntnr>
+ __gnu_pbds::test::detail::insert_insert_functor<It, Cntnr>
fn(ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
@@ -147,7 +147,7 @@ namespace pb_ds
cntnr.insert((typename Cntnr::const_reference)(*ins_it));
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_find_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_find_test.hpp
index 019a32d2a23..4d639d38c4e 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_find_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_find_test.hpp
@@ -52,7 +52,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -128,7 +128,8 @@ namespace pb_ds
template<typename It, bool Native>
- class multimap_find_test : private pb_ds::test::detail::timing_test_base
+ class multimap_find_test
+ : private __gnu_pbds::test::detail::timing_test_base
{
public:
multimap_find_test(It ins_b, size_t ins_vn, size_t vs, size_t ins_vm)
@@ -144,12 +145,12 @@ namespace pb_ds
template<typename Cntnr>
Cntnr
- init(It ins_b, It ins_e, Cntnr, pb_ds::detail::true_type)
+ init(It ins_b, It ins_e, Cntnr, __gnu_pbds::detail::true_type)
{ return Cntnr(ins_b, ins_e); }
template<typename Cntnr>
Cntnr
- init(It ins_b, It ins_e, Cntnr, pb_ds::detail::false_type)
+ init(It ins_b, It ins_e, Cntnr, __gnu_pbds::detail::false_type)
{
Cntnr ret;
for (It it = ins_b; it != ins_e; ++it)
@@ -182,19 +183,19 @@ namespace pb_ds
std::advance(ins_it_e, v);
Cntnr c = init(ins_it_b, ins_it_e, Cntnr(),
- pb_ds::detail::integral_constant<int,Native>());
+ __gnu_pbds::detail::integral_constant<int,Native>());
- pb_ds::test::detail::multimap_find_functor<It, Cntnr, Native>
+ __gnu_pbds::test::detail::multimap_find_functor<It, Cntnr, Native>
fn(c, ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_insert_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_insert_test.hpp
index e911f859483..f35d95217b5 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_insert_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/multimap_insert_test.hpp
@@ -52,7 +52,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -97,7 +97,7 @@ namespace pb_ds
{
Cntnr cntnr;
for (It ins_it = m_ins_it_b; ins_it != m_ins_it_e; ++ins_it)
- cntnr.insert((typename Cntnr::const_reference)(*ins_it));
+ cntnr.insert((typename Cntnr::const_reference)(*ins_it));
}
}
@@ -108,7 +108,8 @@ namespace pb_ds
} // namespace detail
template<typename It, bool Native>
- class multimap_insert_test : private pb_ds::test::detail::timing_test_base
+ class multimap_insert_test
+ : private __gnu_pbds::test::detail::timing_test_base
{
public:
multimap_insert_test(It b, size_t ins_vn, size_t ins_vs, size_t ins_vm)
@@ -122,7 +123,6 @@ namespace pb_ds
private:
multimap_insert_test(const multimap_insert_test&);
- private:
const It m_ins_b;
const size_t m_ins_vn;
const size_t m_ins_vs;
@@ -146,16 +146,16 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, v);
- pb_ds::test::detail::multimap_insert_functor<It, Cntnr, Native>
+ __gnu_pbds::test::detail::multimap_insert_functor<It, Cntnr, Native>
fn(ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_find_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_find_test.hpp
index 6415cd8ece0..af84e9c9436 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_find_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_find_test.hpp
@@ -51,7 +51,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -86,7 +86,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class subscript_find_test : private pb_ds::test::detail::timing_test_base
+ class subscript_find_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
subscript_find_test(It ins_b, It b, size_t ins_vn, size_t ins_vs,
@@ -138,17 +138,17 @@ namespace pb_ds
It fnd_it_e = m_fnd_b;
std::advance(fnd_it_e, fnd_size);
- pb_ds::test::detail::subscript_find_functor<It, Cntnr>
+ __gnu_pbds::test::detail::subscript_find_functor<It, Cntnr>
fn(test_container, fnd_it_b, fnd_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / fnd_size);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_insert_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_insert_test.hpp
index 3b9efb02978..c9a9b9fdecc 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_insert_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/subscript_insert_test.hpp
@@ -52,7 +52,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -85,7 +85,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class subscript_insert_test : private pb_ds::test::detail::timing_test_base
+ class subscript_insert_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
subscript_insert_test(It ins_b, It b, size_t ins_vn, size_t ins_vs,
@@ -128,17 +128,17 @@ namespace pb_ds
It ins_it_b = m_ins_b;
It ins_it_e = m_ins_b;
std::advance(ins_it_e, v);
- pb_ds::test::detail::subscript_insert_functor<It, Cntnr>
+ __gnu_pbds::test::detail::subscript_insert_functor<It, Cntnr>
fn(ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_order_statistics_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_order_statistics_test.hpp
index fb9b2c043db..8ccbfb95207 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_order_statistics_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_order_statistics_test.hpp
@@ -54,7 +54,7 @@
#include <iterator>
#include <cstdlib>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -73,7 +73,7 @@ namespace pb_ds
enum
{
support_detected =
- pb_ds::test::detail::tree_supports_order_statistics<Cntnr>::value
+ __gnu_pbds::test::detail::tree_supports_order_statistics<Cntnr>::value
};
PB_DS_STATIC_ASSERT(correct_type, support_detected);
@@ -126,7 +126,7 @@ namespace pb_ds
template<bool Support_Order_Statistics>
class tree_order_statistics_test
- : private pb_ds::test::detail::timing_test_base
+ : private __gnu_pbds::test::detail::timing_test_base
{
public:
tree_order_statistics_test(size_t vn, size_t vs, size_t vm)
@@ -142,11 +142,11 @@ namespace pb_ds
template<typename Cntnr>
void
- order_statistics(Cntnr& r_container, pb_ds::detail::true_type);
+ order_statistics(Cntnr& r_container, __gnu_pbds::detail::true_type);
template<typename Cntnr>
void
- order_statistics(Cntnr& r_container, pb_ds::detail::false_type);
+ order_statistics(Cntnr& r_container, __gnu_pbds::detail::false_type);
private:
const size_t m_vn;
@@ -170,17 +170,17 @@ namespace pb_ds
for (size_t ins = 0; ins < v; ++ ins)
cntnr.insert((typename Cntnr::value_type)ins);
- pb_ds::test::detail::order_statistics_functor<Cntnr, Support_Order_Statistics>
+ __gnu_pbds::test::detail::order_statistics_functor<Cntnr, Support_Order_Statistics>
fn(cntnr);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_split_join_test.hpp b/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_split_join_test.hpp
index 6c906522e37..7595dc2cb0d 100644
--- a/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_split_join_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/assoc/timing/tree_split_join_test.hpp
@@ -52,7 +52,7 @@
#include <common_type/assoc/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -111,7 +111,7 @@ namespace pb_ds
} // namespace detail
template<bool Support_Split_Join>
- class tree_split_join_test : private pb_ds::test::detail::timing_test_base
+ class tree_split_join_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
tree_split_join_test(size_t vn, size_t vs, size_t vm);
@@ -153,16 +153,16 @@ namespace pb_ds
for (size_t ins = 0; ins < v; ++ ins)
cntnr.insert((typename Cntnr::value_type)ins);
- pb_ds::test::detail::split_join_functor<Cntnr, Support_Split_Join>
+ __gnu_pbds::test::detail::split_join_functor<Cntnr, Support_Split_Join>
fn(cntnr);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/io/xml_formatter.hpp b/libstdc++-v3/testsuite/util/performance/io/xml_formatter.hpp
index e7d48d7dc48..fdaa65e73c0 100644
--- a/libstdc++-v3/testsuite/util/performance/io/xml_formatter.hpp
+++ b/libstdc++-v3/testsuite/util/performance/io/xml_formatter.hpp
@@ -51,7 +51,7 @@
#include <iostream>
#include <io/xml_test_formatter.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -83,6 +83,6 @@ namespace pb_ds
}
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_XML_TEST_PERFORMANCE_FORMATTER_HPP
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
index a3b8486f191..4f84fa64b9c 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp
@@ -53,7 +53,7 @@
#include <performance/io/xml_formatter.hpp>
#include <common_type/priority_queue/string_form.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -115,7 +115,7 @@ namespace pb_ds
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/join_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/join_test.hpp
index d04f9041b3c..e419e4f173a 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/join_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/join_test.hpp
@@ -53,7 +53,7 @@
#include <common_type/priority_queue/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -114,7 +114,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class join_test : private pb_ds::test::detail::timing_test_base
+ class join_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
join_test(It ins_b, size_t ins_vn, size_t ins_vs, size_t ins_vm)
@@ -125,9 +125,9 @@ namespace pb_ds
void
operator()(Cntnr)
{
- using pb_ds::test::detail::double_push_functor;
- using pb_ds::test::detail::double_push_join_functor;
- typedef pb_ds::test::detail::timing_test_base base_type;
+ using __gnu_pbds::test::detail::double_push_functor;
+ using __gnu_pbds::test::detail::double_push_join_functor;
+ typedef __gnu_pbds::test::detail::timing_test_base base_type;
typedef double_push_functor<It, Cntnr> psh_fnct;
typedef double_push_join_functor<It, Cntnr> psh_jn_fnct;
@@ -171,7 +171,7 @@ namespace pb_ds
const size_t m_ins_vm;
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/modify_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/modify_test.hpp
index 33c7e58bdd1..1ce1804f297 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/modify_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/modify_test.hpp
@@ -53,7 +53,7 @@
#include <common_type/priority_queue/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -126,7 +126,7 @@ namespace pb_ds
// Specializations.
template<typename It, class Cntnr>
- class push_functor<It, Cntnr, pb_ds::binary_heap_tag>
+ class push_functor<It, Cntnr, __gnu_pbds::binary_heap_tag>
{
public:
push_functor(It ins_it_b, It ins_it_e)
@@ -151,7 +151,7 @@ namespace pb_ds
};
template<typename It, class Cntnr>
- class push_functor<It, Cntnr, pb_ds::test::native_pq_tag>
+ class push_functor<It, Cntnr, __gnu_pbds::test::native_pq_tag>
{
public:
push_functor(It ins_it_b, It ins_it_e)
@@ -178,7 +178,7 @@ namespace pb_ds
template<typename It, class Cntnr>
- class push_modify_functor<It, Cntnr, pb_ds::binary_heap_tag>
+ class push_modify_functor<It, Cntnr, __gnu_pbds::binary_heap_tag>
{
private:
typedef typename Cntnr::iterator iterator;
@@ -220,7 +220,7 @@ namespace pb_ds
};
template<typename It, class Cntnr>
- class push_modify_functor<It, Cntnr, pb_ds::test::native_pq_tag>
+ class push_modify_functor<It, Cntnr, __gnu_pbds::test::native_pq_tag>
{
private:
typedef typename Cntnr::value_type value_type;
@@ -253,7 +253,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class modify_test : private pb_ds::test::detail::timing_test_base
+ class modify_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
modify_test(It b, size_t vn, size_t vs, size_t vm, bool modify_up)
@@ -333,7 +333,7 @@ namespace pb_ds
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_pop_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_pop_test.hpp
index ef04c3258cc..a2303f9b1b3 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_pop_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_pop_test.hpp
@@ -53,7 +53,7 @@
#include <common_type/priority_queue/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -88,7 +88,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class push_pop_test : private pb_ds::test::detail::timing_test_base
+ class push_pop_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
push_pop_test(It ins_b, size_t ins_vn, size_t ins_vs, size_t ins_vm)
@@ -135,17 +135,17 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, v);
- pb_ds::test::detail::push_pop_push_pop_functor<It, Cntnr>
+ __gnu_pbds::test::detail::push_pop_push_pop_functor<It, Cntnr>
fn(ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_test.hpp b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_test.hpp
index d6f280501dd..961c00ec638 100644
--- a/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_test.hpp
+++ b/libstdc++-v3/testsuite/util/performance/priority_queue/timing/push_test.hpp
@@ -53,7 +53,7 @@
#include <common_type/priority_queue/string_form.hpp>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -85,7 +85,7 @@ namespace pb_ds
} // namespace detail
template<typename It>
- class push_test : private pb_ds::test::detail::timing_test_base
+ class push_test : private __gnu_pbds::test::detail::timing_test_base
{
public:
push_test(It ins_b, size_t ins_vn, size_t ins_vs, size_t ins_vm)
@@ -127,11 +127,11 @@ namespace pb_ds
It ins_it_e = m_ins_b;
std::advance(ins_it_e, v);
- pb_ds::test::detail::push_push_functor<It, Cntnr>
+ __gnu_pbds::test::detail::push_push_functor<It, Cntnr>
fn(ins_it_b, ins_it_e);
const double res =
- pb_ds::test::detail::timing_test_base::operator()(fn);
+ __gnu_pbds::test::detail::timing_test_base::operator()(fn);
res_set_fmt.add_res(v, res / v);
}
@@ -148,7 +148,7 @@ namespace pb_ds
cntnr.push((typename Cntnr::const_reference)(*ins_it));
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc
index 39748bf2d8d..e21d14dc61e 100644
--- a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc
+++ b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc
@@ -46,7 +46,7 @@
#include <util/performance/time/elapsed_timer.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -75,4 +75,4 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.hpp b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.hpp
index 06d9b307984..2ab7ac0e310 100644
--- a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.hpp
+++ b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.hpp
@@ -50,7 +50,7 @@
#include <time.h>
#include <iosfwd>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -72,6 +72,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TEST_TIME_HPP
diff --git a/libstdc++-v3/testsuite/util/performance/time/timing_test_base.hpp b/libstdc++-v3/testsuite/util/performance/time/timing_test_base.hpp
index a56d2c21313..8e4cd99dc0e 100644
--- a/libstdc++-v3/testsuite/util/performance/time/timing_test_base.hpp
+++ b/libstdc++-v3/testsuite/util/performance/time/timing_test_base.hpp
@@ -50,7 +50,7 @@
#include <performance/time/elapsed_timer.hpp>
#include <statistic/result_recorder.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -81,7 +81,7 @@ namespace pb_ds
timing_test_base::operator()(Functor& fn)
{
const std::size_t resolution = get_min_resolution(fn);
- pb_ds::test::detail::result_recorder<double> rec;
+ __gnu_pbds::test::detail::result_recorder<double> rec;
double res;
do
res = run_at_resolution(fn, resolution);
@@ -121,7 +121,7 @@ namespace pb_ds
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/assoc/common_type.hpp b/libstdc++-v3/testsuite/util/regression/assoc/common_type.hpp
index 0f86f38da3d..61f04a8336d 100644
--- a/libstdc++-v3/testsuite/util/regression/assoc/common_type.hpp
+++ b/libstdc++-v3/testsuite/util/regression/assoc/common_type.hpp
@@ -50,7 +50,7 @@
#include <regression/basic_type.hpp>
#include <common_type/assoc/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -72,15 +72,15 @@ namespace test
}
};
- typedef pb_ds::string_trie_e_access_traits<basic_type, 'a', 'a' + basic_type::distinct_chars - 1, false, alloc_type> e_access_traits_t;
+ typedef __gnu_pbds::string_trie_e_access_traits<basic_type, 'a', 'a' + basic_type::distinct_chars - 1, false, alloc_type> e_access_traits_t;
template<typename Data_Type>
struct tree_types
{
private:
- typedef typename tree_common_types<basic_type, Data_Type, std::less<basic_type>, pb_ds::null_tree_node_update, alloc_type>::regression_tl no_order_statistics_tl_t;
+ typedef typename tree_common_types<basic_type, Data_Type, std::less<basic_type>, __gnu_pbds::null_tree_node_update, alloc_type>::regression_tl no_order_statistics_tl_t;
- typedef typename tree_common_types<basic_type, Data_Type, std::less<basic_type>, pb_ds::tree_order_statistics_node_update, alloc_type>::regression_tl order_statistics_tl_t;
+ typedef typename tree_common_types<basic_type, Data_Type, std::less<basic_type>, __gnu_pbds::tree_order_statistics_node_update, alloc_type>::regression_tl order_statistics_tl_t;
public:
typedef typename __gnu_cxx::typelist::append<no_order_statistics_tl_t, order_statistics_tl_t>::type tl_t;
@@ -92,11 +92,11 @@ namespace test
struct trie_types
{
private:
- typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, pb_ds::pat_trie_tag, pb_ds::null_trie_node_update, alloc_type>::regression_tl no_updates_tl_t;
+ typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, __gnu_pbds::pat_trie_tag, __gnu_pbds::null_trie_node_update, alloc_type>::regression_tl no_updates_tl_t;
- typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, pb_ds::pat_trie_tag, pb_ds::trie_order_statistics_node_update, alloc_type>::regression_tl order_statistics_tl_t;
+ typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, __gnu_pbds::pat_trie_tag, __gnu_pbds::trie_order_statistics_node_update, alloc_type>::regression_tl order_statistics_tl_t;
- typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, pb_ds::pat_trie_tag, pb_ds::trie_prefix_search_node_update, alloc_type>::regression_tl prefix_search_tl_t;
+ typedef typename trie_common_types<basic_type, Data_Type, e_access_traits_t, __gnu_pbds::pat_trie_tag, __gnu_pbds::trie_prefix_search_node_update, alloc_type>::regression_tl prefix_search_tl_t;
public:
typedef typename __gnu_cxx::typelist::append<no_updates_tl_t, typename __gnu_cxx::typelist::append<prefix_search_tl_t, order_statistics_tl_t>::type>::type tl_t;
@@ -140,6 +140,6 @@ namespace test
typedef trie_types<basic_type>::tl_t trie_map_tl_t;
typedef trie_types<basic_type>::min_tl_t min_trie_map_tl_t;
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/basic_type.hpp b/libstdc++-v3/testsuite/util/regression/basic_type.hpp
index ad93bf47142..93a12922ffa 100644
--- a/libstdc++-v3/testsuite/util/regression/basic_type.hpp
+++ b/libstdc++-v3/testsuite/util/regression/basic_type.hpp
@@ -50,7 +50,7 @@
#include <string>
#include <ext/throw_allocator.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -99,6 +99,6 @@ namespace test
#undef PB_DS_BASE_C_DEC
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/priority_queue/common_type.hpp b/libstdc++-v3/testsuite/util/regression/priority_queue/common_type.hpp
index ce5a9e81a01..7740a913852 100644
--- a/libstdc++-v3/testsuite/util/regression/priority_queue/common_type.hpp
+++ b/libstdc++-v3/testsuite/util/regression/priority_queue/common_type.hpp
@@ -50,7 +50,7 @@
#include <regression/basic_type.hpp>
#include <common_type/priority_queue/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -60,6 +60,6 @@ namespace test
typedef pq_tl_t min_pq_tl_t;
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp
index 3f77c219e00..7eaa3968f9a 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.hpp
@@ -58,7 +58,7 @@
#include <common_type/assoc/string_form.hpp>
#include <regression/rand/io/assoc/xml_formatter.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -137,7 +137,7 @@ namespace detail
typedef typename test_traits::value_type value_type;
typedef typename test_traits::native_type native_type;
typedef twister_rand_gen gen;
- typedef pb_ds::container_traits<Cntnr> container_traits;
+ typedef __gnu_pbds::container_traits<Cntnr> container_traits;
typedef __gnu_cxx::throw_allocator<char> alloc_t;
enum op
@@ -173,52 +173,52 @@ namespace detail
iterator_defs();
static void
- node_iterator_defs(pb_ds::detail::false_type);
+ node_iterator_defs(__gnu_pbds::detail::false_type);
static void
- node_iterator_defs(pb_ds::detail::true_type);
+ node_iterator_defs(__gnu_pbds::detail::true_type);
static void
policy_defs();
static void
- policy_defs(pb_ds::basic_hash_tag);
+ policy_defs(__gnu_pbds::basic_hash_tag);
static void
- policy_defs(pb_ds::cc_hash_tag);
+ policy_defs(__gnu_pbds::cc_hash_tag);
static void
- policy_defs(pb_ds::gp_hash_tag);
+ policy_defs(__gnu_pbds::gp_hash_tag);
static void
- policy_defs(pb_ds::tree_tag);
+ policy_defs(__gnu_pbds::tree_tag);
static void
- policy_defs(pb_ds::list_update_tag);
+ policy_defs(__gnu_pbds::list_update_tag);
static void
- policy_defs(pb_ds::pat_trie_tag);
+ policy_defs(__gnu_pbds::pat_trie_tag);
void
policy_access();
void
- policy_access(pb_ds::basic_hash_tag);
+ policy_access(__gnu_pbds::basic_hash_tag);
void
- policy_access(pb_ds::cc_hash_tag);
+ policy_access(__gnu_pbds::cc_hash_tag);
void
- policy_access(pb_ds::gp_hash_tag);
+ policy_access(__gnu_pbds::gp_hash_tag);
void
- policy_access(pb_ds::tree_tag);
+ policy_access(__gnu_pbds::tree_tag);
void
- policy_access(pb_ds::list_update_tag);
+ policy_access(__gnu_pbds::list_update_tag);
void
- policy_access(pb_ds::pat_trie_tag);
+ policy_access(__gnu_pbds::pat_trie_tag);
void
it_copy();
@@ -233,16 +233,16 @@ namespace detail
rev_it_assign();
void
- rev_it_copy_imp(pb_ds::detail::false_type);
+ rev_it_copy_imp(__gnu_pbds::detail::false_type);
void
- rev_it_copy_imp(pb_ds::detail::true_type);
+ rev_it_copy_imp(__gnu_pbds::detail::true_type);
void
- rev_it_assign_imp(pb_ds::detail::false_type);
+ rev_it_assign_imp(__gnu_pbds::detail::false_type);
void
- rev_it_assign_imp(pb_ds::detail::true_type);
+ rev_it_assign_imp(__gnu_pbds::detail::true_type);
bool
default_constructor();
@@ -260,19 +260,19 @@ namespace detail
it_constructor();
bool
- it_constructor_imp(pb_ds::cc_hash_tag);
+ it_constructor_imp(__gnu_pbds::cc_hash_tag);
bool
- it_constructor_imp(pb_ds::gp_hash_tag);
+ it_constructor_imp(__gnu_pbds::gp_hash_tag);
bool
- it_constructor_imp(pb_ds::tree_tag);
+ it_constructor_imp(__gnu_pbds::tree_tag);
bool
- it_constructor_imp(pb_ds::list_update_tag);
+ it_constructor_imp(__gnu_pbds::list_update_tag);
bool
- it_constructor_imp(pb_ds::pat_trie_tag);
+ it_constructor_imp(__gnu_pbds::pat_trie_tag);
bool
insert();
@@ -284,19 +284,19 @@ namespace detail
erase_it();
bool
- erase_it_imp(pb_ds::detail::false_type);
+ erase_it_imp(__gnu_pbds::detail::false_type);
bool
- erase_it_imp(pb_ds::detail::true_type);
+ erase_it_imp(__gnu_pbds::detail::true_type);
bool
erase_rev_it();
bool
- erase_rev_it_imp(pb_ds::detail::false_type);
+ erase_rev_it_imp(__gnu_pbds::detail::false_type);
bool
- erase_rev_it_imp(pb_ds::detail::true_type);
+ erase_rev_it_imp(__gnu_pbds::detail::true_type);
bool
erase_if();
@@ -308,46 +308,46 @@ namespace detail
resize();
bool
- resize_imp(pb_ds::detail::true_type);
+ resize_imp(__gnu_pbds::detail::true_type);
bool
- resize_imp(pb_ds::detail::false_type);
+ resize_imp(__gnu_pbds::detail::false_type);
bool
get_set_loads();
bool
- get_set_loads_imp(pb_ds::detail::true_type);
+ get_set_loads_imp(__gnu_pbds::detail::true_type);
bool
- get_set_loads_imp(pb_ds::detail::false_type);
+ get_set_loads_imp(__gnu_pbds::detail::false_type);
void
get_set_load();
void
- get_set_load_imp(pb_ds::detail::true_type);
+ get_set_load_imp(__gnu_pbds::detail::true_type);
void
- get_set_load_imp(pb_ds::detail::false_type);
+ get_set_load_imp(__gnu_pbds::detail::false_type);
bool
subscript();
bool
- subscript_imp(pb_ds::detail::false_type);
+ subscript_imp(__gnu_pbds::detail::false_type);
bool
- subscript_imp(pb_ds::detail::true_type);
+ subscript_imp(__gnu_pbds::detail::true_type);
bool
split_join();
bool
- split_join_imp(pb_ds::detail::false_type);
+ split_join_imp(__gnu_pbds::detail::false_type);
bool
- split_join_imp(pb_ds::detail::true_type);
+ split_join_imp(__gnu_pbds::detail::true_type);
void
cmp(const Cntnr&, const native_type&, const std::string&);
@@ -360,43 +360,43 @@ namespace detail
void
order_preserving_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
order_preserving_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
back_order_preserving_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
back_order_preserving_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
reverse_iteration_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
reverse_iteration_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
order_statistics_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
order_statistics_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
prefix_search_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
prefix_search_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
template<typename Const_It, class Const_Native_It>
void
@@ -408,19 +408,19 @@ namespace detail
void
lower_bound_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
lower_bound_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
upper_bound_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::false_type);
+ __gnu_pbds::detail::false_type);
void
upper_bound_cmp_imp(const Cntnr&, const native_type&,
- pb_ds::detail::true_type);
+ __gnu_pbds::detail::true_type);
void
print_container(const native_type&, std::ostream& r_os = std::cerr) const;
@@ -495,6 +495,6 @@ namespace detail
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/cmp_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/cmp_fn_imps.hpp
index 2b1325f8e51..3b19a752696 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/cmp_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/cmp_fn_imps.hpp
@@ -140,50 +140,50 @@ cmp_(const Cntnr& r_c, const native_type& r_native_c)
container_traits::order_preserving,
back_order_preserving =
container_traits::order_preserving&&
- !pb_ds::detail::is_same<
+ !__gnu_pbds::detail::is_same<
typename std::iterator_traits<
typename cntnr::const_iterator>::iterator_category,
std::forward_iterator_tag>::value,
reverse_iteration = container_traits::reverse_iteration,
order_statistics = test_traits::order_statistics,
prefix_search = test_traits::prefix_search,
- has_mapped = !pb_ds::detail::is_same<
+ has_mapped = !__gnu_pbds::detail::is_same<
typename Cntnr::mapped_type,
- pb_ds::null_mapped_type>::value
+ __gnu_pbds::null_mapped_type>::value
};
order_preserving_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,order_preserving>());
+ __gnu_pbds::detail::integral_constant<int,order_preserving>());
back_order_preserving_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,back_order_preserving>());
+ __gnu_pbds::detail::integral_constant<int,back_order_preserving>());
order_statistics_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,order_statistics>());
+ __gnu_pbds::detail::integral_constant<int,order_statistics>());
prefix_search_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,prefix_search>());
+ __gnu_pbds::detail::integral_constant<int,prefix_search>());
reverse_iteration_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,reverse_iteration>());
+ __gnu_pbds::detail::integral_constant<int,reverse_iteration>());
lower_bound_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,order_preserving>());
+ __gnu_pbds::detail::integral_constant<int,order_preserving>());
upper_bound_cmp_imp(r_c, r_native_c,
- pb_ds::detail::integral_constant<int,order_preserving>());
+ __gnu_pbds::detail::integral_constant<int,order_preserving>());
}
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-order_preserving_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+order_preserving_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
@@ -217,13 +217,13 @@ order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds:
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-back_order_preserving_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+back_order_preserving_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-back_order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+back_order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
@@ -241,13 +241,13 @@ back_order_preserving_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, p
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-reverse_iteration_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+reverse_iteration_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-reverse_iteration_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+reverse_iteration_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
@@ -281,13 +281,13 @@ reverse_iteration_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-order_statistics_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+order_statistics_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-order_statistics_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+order_statistics_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
{
m_alloc.set_throw_prob(0);
@@ -350,13 +350,13 @@ order_statistics_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds:
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-prefix_search_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+prefix_search_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-prefix_search_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+prefix_search_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
@@ -495,13 +495,13 @@ back_it_cmp_imp(Const_It b, Const_It e, Const_Native_It native_b, Const_Native_I
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-lower_bound_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+lower_bound_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-lower_bound_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+lower_bound_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
@@ -548,13 +548,13 @@ lower_bound_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::deta
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-upper_bound_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, pb_ds::detail::false_type)
+upper_bound_cmp_imp(const Cntnr& /*r_c*/, const native_type& /*r_native_c*/, __gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-upper_bound_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, pb_ds::detail::true_type)
+upper_bound_cmp_imp(const Cntnr& r_c, const native_type& r_native_c, __gnu_pbds::detail::true_type)
{
PB_DS_SET_DESTRUCT_PRINT
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/constructor_destructor_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/constructor_destructor_fn_imps.hpp
index 66a7077470f..c6b02b61a17 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/constructor_destructor_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/constructor_destructor_fn_imps.hpp
@@ -162,7 +162,7 @@ it_constructor()
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-it_constructor_imp(pb_ds::cc_hash_tag)
+it_constructor_imp(__gnu_pbds::cc_hash_tag)
{
bool done = true;
Cntnr* p_c = NULL;
@@ -229,7 +229,7 @@ it_constructor_imp(pb_ds::cc_hash_tag)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-it_constructor_imp(pb_ds::gp_hash_tag)
+it_constructor_imp(__gnu_pbds::gp_hash_tag)
{
bool done = true;
Cntnr* p_c = NULL;
@@ -312,7 +312,7 @@ it_constructor_imp(pb_ds::gp_hash_tag)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-it_constructor_imp(pb_ds::tree_tag)
+it_constructor_imp(__gnu_pbds::tree_tag)
{
bool done = true;
Cntnr* p_c = NULL;
@@ -348,7 +348,7 @@ it_constructor_imp(pb_ds::tree_tag)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-it_constructor_imp(pb_ds::list_update_tag)
+it_constructor_imp(__gnu_pbds::list_update_tag)
{
bool done = true;
Cntnr* p_c = NULL;
@@ -373,7 +373,7 @@ it_constructor_imp(pb_ds::list_update_tag)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-it_constructor_imp(pb_ds::pat_trie_tag)
+it_constructor_imp(__gnu_pbds::pat_trie_tag)
{
bool done = true;
Cntnr* p_c = NULL;
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp
index 68829d3e187..0acb20cd62e 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/defs_fn_imps.hpp
@@ -63,7 +63,7 @@ defs()
iterator_defs();
- node_iterator_defs(pb_ds::detail::integral_constant<int,
+ node_iterator_defs(__gnu_pbds::detail::integral_constant<int,
container_traits::order_preserving>());
policy_defs();
@@ -124,7 +124,7 @@ void
PB_DS_CLASS_C_DEC::
ds_defs()
{
- typedef pb_ds::container_traits< Cntnr> test_container_traits;
+ typedef __gnu_pbds::container_traits< Cntnr> test_container_traits;
typedef typename test_container_traits::container_category test_container_category;
@@ -162,13 +162,13 @@ iterator_defs()
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-node_iterator_defs(pb_ds::detail::false_type)
+node_iterator_defs(__gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-node_iterator_defs(pb_ds::detail::true_type)
+node_iterator_defs(__gnu_pbds::detail::true_type)
{
typedef typename Cntnr::node_iterator test_node_iterator;
@@ -188,7 +188,7 @@ policy_defs()
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::basic_hash_tag)
+policy_defs(__gnu_pbds::basic_hash_tag)
{
typedef typename Cntnr::hash_fn test_hash_fn;
@@ -200,9 +200,9 @@ policy_defs(pb_ds::basic_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::cc_hash_tag)
+policy_defs(__gnu_pbds::cc_hash_tag)
{
- policy_defs(pb_ds::basic_hash_tag());
+ policy_defs(__gnu_pbds::basic_hash_tag());
typedef typename Cntnr::comb_hash_fn test_comb_hash_fn;
}
@@ -210,9 +210,9 @@ policy_defs(pb_ds::cc_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::gp_hash_tag)
+policy_defs(__gnu_pbds::gp_hash_tag)
{
- policy_defs(pb_ds::basic_hash_tag());
+ policy_defs(__gnu_pbds::basic_hash_tag());
typedef typename Cntnr::comb_probe_fn test_comb_probe_fn;
@@ -222,7 +222,7 @@ policy_defs(pb_ds::gp_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::tree_tag)
+policy_defs(__gnu_pbds::tree_tag)
{
typedef typename Cntnr::cmp_fn test_cmp_fn;
@@ -232,7 +232,7 @@ policy_defs(pb_ds::tree_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::list_update_tag)
+policy_defs(__gnu_pbds::list_update_tag)
{
typedef typename Cntnr::eq_fn test_eq_fn;
@@ -242,7 +242,7 @@ policy_defs(pb_ds::list_update_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_defs(pb_ds::pat_trie_tag)
+policy_defs(__gnu_pbds::pat_trie_tag)
{
typedef typename Cntnr::e_access_traits e_access_traits;
}
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp
index 0622d9eeef9..0bd39f33bb3 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/erase_fn_imps.hpp
@@ -166,13 +166,13 @@ erase_it()
container_traits::order_preserving
};
- return (erase_it_imp(pb_ds::detail::integral_constant<int,erase_iterators>()));
+ return (erase_it_imp(__gnu_pbds::detail::integral_constant<int,erase_iterators>()));
}
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-erase_it_imp(pb_ds::detail::false_type)
+erase_it_imp(__gnu_pbds::detail::false_type)
{
return (true);
}
@@ -180,7 +180,7 @@ erase_it_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-erase_it_imp(pb_ds::detail::true_type)
+erase_it_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("erase_it");
@@ -222,9 +222,9 @@ erase_it_imp(pb_ds::detail::true_type)
m_native_c.erase(native_it);
bool range_guarantee =
- pb_ds::detail::is_same<
+ __gnu_pbds::detail::is_same<
typename container_traits::invalidation_guarantee,
- pb_ds::range_invalidation_guarantee>::value ;
+ __gnu_pbds::range_invalidation_guarantee>::value ;
if (range_guarantee)
PB_DS_THROW_IF_FAILED( next_ers_it == next_it, "", m_p_c, & m_native_c);
@@ -255,13 +255,13 @@ erase_rev_it()
container_traits::reverse_iteration
};
- return (erase_rev_it_imp(pb_ds::detail::integral_constant<int,erase_iterators>()));
+ return (erase_rev_it_imp(__gnu_pbds::detail::integral_constant<int,erase_iterators>()));
}
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-erase_rev_it_imp(pb_ds::detail::false_type)
+erase_rev_it_imp(__gnu_pbds::detail::false_type)
{
return (true);
}
@@ -269,7 +269,7 @@ erase_rev_it_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-erase_rev_it_imp(pb_ds::detail::true_type)
+erase_rev_it_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("erase_rev_it");
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_load_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_load_fn_imps.hpp
index 8f58f3e2c46..adc87271c25 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_load_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_load_fn_imps.hpp
@@ -50,7 +50,7 @@ PB_DS_CLASS_C_DEC::
get_set_load()
{
typedef
- pb_ds::detail::integral_constant<int,
+ __gnu_pbds::detail::integral_constant<int,
test_traits::get_set_load>
get_set_load_ind;
@@ -60,13 +60,13 @@ get_set_load()
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-get_set_load_imp(pb_ds::detail::false_type)
+get_set_load_imp(__gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-get_set_load_imp(pb_ds::detail::true_type)
+get_set_load_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("get_set_load");
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_loads_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_loads_fn_imps.hpp
index cbcac81c631..10ea2aed941 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_loads_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/get_set_loads_fn_imps.hpp
@@ -50,7 +50,7 @@ PB_DS_CLASS_C_DEC::
get_set_loads()
{
typedef
- pb_ds::detail::integral_constant<int,
+ __gnu_pbds::detail::integral_constant<int,
test_traits::get_set_loads>
get_set_loads_ind;
@@ -60,7 +60,7 @@ get_set_loads()
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-get_set_loads_imp(pb_ds::detail::false_type)
+get_set_loads_imp(__gnu_pbds::detail::false_type)
{
return (true);
}
@@ -68,7 +68,7 @@ get_set_loads_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-get_set_loads_imp(pb_ds::detail::true_type)
+get_set_loads_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("get_set_loads");
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp
index 78fc38907b6..e5bf3be35b0 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/insert_fn_imps.hpp
@@ -77,7 +77,7 @@ insert()
{
done = false;
}
- catch(pb_ds::insert_error&)
+ catch(__gnu_pbds::insert_error&)
{
PB_DS_THROW_IF_FAILED(false, "", m_p_c, &m_native_c);
}
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/it_conversion_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/it_conversion_fn_imps.hpp
index 14d89e1ebf9..2a3c6396e8a 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/it_conversion_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/it_conversion_fn_imps.hpp
@@ -195,7 +195,7 @@ rev_it_copy()
reverse_iteration = container_traits::reverse_iteration
};
- rev_it_copy_imp(pb_ds::detail::integral_constant<int,reverse_iteration>());
+ rev_it_copy_imp(__gnu_pbds::detail::integral_constant<int,reverse_iteration>());
}
PB_DS_CLASS_T_DEC
@@ -208,19 +208,19 @@ rev_it_assign()
reverse_iteration = container_traits::reverse_iteration
};
- rev_it_assign_imp(pb_ds::detail::integral_constant<int,reverse_iteration>());
+ rev_it_assign_imp(__gnu_pbds::detail::integral_constant<int,reverse_iteration>());
}
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-rev_it_copy_imp(pb_ds::detail::false_type)
+rev_it_copy_imp(__gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-rev_it_copy_imp(pb_ds::detail::true_type)
+rev_it_copy_imp(__gnu_pbds::detail::true_type)
{
{
typename cntnr::iterator it = m_p_c->end();
@@ -260,13 +260,13 @@ rev_it_copy_imp(pb_ds::detail::true_type)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-rev_it_assign_imp(pb_ds::detail::false_type)
+rev_it_assign_imp(__gnu_pbds::detail::false_type)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-rev_it_assign_imp(pb_ds::detail::true_type)
+rev_it_assign_imp(__gnu_pbds::detail::true_type)
{
{
typename cntnr::iterator it = m_p_c->end();
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/policy_access_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/policy_access_fn_imps.hpp
index 7ffd18a77dc..9b4f0927f6f 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/policy_access_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/policy_access_fn_imps.hpp
@@ -55,7 +55,7 @@ policy_access()
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::basic_hash_tag)
+policy_access(__gnu_pbds::basic_hash_tag)
{
{
typename Cntnr::hash_fn& r_t =
@@ -97,9 +97,9 @@ policy_access(pb_ds::basic_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::cc_hash_tag)
+policy_access(__gnu_pbds::cc_hash_tag)
{
- policy_access(pb_ds::basic_hash_tag());
+ policy_access(__gnu_pbds::basic_hash_tag());
{
typename Cntnr::comb_hash_fn& r_t =
@@ -117,9 +117,9 @@ policy_access(pb_ds::cc_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::gp_hash_tag)
+policy_access(__gnu_pbds::gp_hash_tag)
{
- policy_access(pb_ds::basic_hash_tag());
+ policy_access(__gnu_pbds::basic_hash_tag());
{
typename Cntnr::comb_probe_fn& r_t =
@@ -149,7 +149,7 @@ policy_access(pb_ds::gp_hash_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::tree_tag)
+policy_access(__gnu_pbds::tree_tag)
{
{
typename Cntnr::cmp_fn& r_t =
@@ -168,13 +168,13 @@ policy_access(pb_ds::tree_tag)
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::list_update_tag)
+policy_access(__gnu_pbds::list_update_tag)
{ }
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
-policy_access(pb_ds::pat_trie_tag)
+policy_access(__gnu_pbds::pat_trie_tag)
{
typename Cntnr::e_access_traits& r_t =
m_p_c->get_e_access_traits();
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/resize_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/resize_fn_imps.hpp
index 6f5ee79fdd4..77bfcb84c39 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/resize_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/resize_fn_imps.hpp
@@ -49,7 +49,7 @@ bool
PB_DS_CLASS_C_DEC::
resize()
{
- typedef pb_ds::detail::integral_constant<int, test_traits::resize> resize_ind;
+ typedef __gnu_pbds::detail::integral_constant<int, test_traits::resize> resize_ind;
return (resize_imp(resize_ind()));
}
@@ -57,7 +57,7 @@ resize()
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-resize_imp(pb_ds::detail::false_type)
+resize_imp(__gnu_pbds::detail::false_type)
{
return (true);
}
@@ -65,7 +65,7 @@ resize_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-resize_imp(pb_ds::detail::true_type)
+resize_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("resize");
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/split_join_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/split_join_fn_imps.hpp
index 073fda5666b..8026d7cc200 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/split_join_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/split_join_fn_imps.hpp
@@ -54,13 +54,13 @@ split_join()
split_join = container_traits::order_preserving
};
- return (split_join_imp(pb_ds::detail::integral_constant<int,split_join>()));
+ return (split_join_imp(__gnu_pbds::detail::integral_constant<int,split_join>()));
}
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-split_join_imp(pb_ds::detail::false_type)
+split_join_imp(__gnu_pbds::detail::false_type)
{
return (true);
}
@@ -68,7 +68,7 @@ split_join_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-split_join_imp(pb_ds::detail::true_type)
+split_join_imp(__gnu_pbds::detail::true_type)
{
PB_DS_TRACE("split_join");
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/subscript_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/subscript_fn_imps.hpp
index a2c59e12592..e627595d728 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/subscript_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/detail/subscript_fn_imps.hpp
@@ -53,18 +53,18 @@ subscript()
enum
{
- no_data = pb_ds::detail::is_same<
+ no_data = __gnu_pbds::detail::is_same<
typename Cntnr::const_key_reference,
typename Cntnr::const_reference>::value
};
- return (subscript_imp(pb_ds::detail::integral_constant<int,no_data>()));
+ return (subscript_imp(__gnu_pbds::detail::integral_constant<int,no_data>()));
}
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-subscript_imp(pb_ds::detail::false_type)
+subscript_imp(__gnu_pbds::detail::false_type)
{
bool done = true;
@@ -97,7 +97,7 @@ subscript_imp(pb_ds::detail::false_type)
PB_DS_CLASS_T_DEC
bool
PB_DS_CLASS_C_DEC::
-subscript_imp(pb_ds::detail::true_type)
+subscript_imp(__gnu_pbds::detail::true_type)
{
bool done = true;
@@ -110,7 +110,7 @@ subscript_imp(pb_ds::detail::true_type)
value_type v = test_traits::generate_value(m_g, m_m);
m_alloc.set_throw_prob(m_tp);
- (*m_p_c)[v] = pb_ds::null_mapped_type();
+ (*m_p_c)[v] = __gnu_pbds::null_mapped_type();
m_native_c.insert(test_traits::native_value(v));
}
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp
index 2081c7c8b2d..2f79df56dce 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp
@@ -55,7 +55,7 @@
#include <regression/basic_type.hpp>
#include <regression/assoc/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -123,7 +123,7 @@ namespace detail
{
detail::verify_params(sd, n, m, tp, ip, ep, cp, mp, disp);
}
- catch (pb_ds::test::illegal_input_error&)
+ catch (__gnu_pbds::test::illegal_input_error&)
{
detail::usage(name);
return -1;
@@ -205,6 +205,6 @@ namespace detail
}
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/rand/io/assoc/xml_formatter.hpp b/libstdc++-v3/testsuite/util/regression/rand/io/assoc/xml_formatter.hpp
index d5e1f5ba3a4..db9ed28efb8 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/io/assoc/xml_formatter.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/io/assoc/xml_formatter.hpp
@@ -49,7 +49,7 @@
#include <regression/rand/io/xml_formatter.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -76,6 +76,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_XML_TEST_REGRESSION_FORMATTER_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/rand/io/priority_queue/xml_formatter.hpp b/libstdc++-v3/testsuite/util/regression/rand/io/priority_queue/xml_formatter.hpp
index a8ceab4d2ee..af6f5d242b9 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/io/priority_queue/xml_formatter.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/io/priority_queue/xml_formatter.hpp
@@ -49,7 +49,7 @@
#include <regression/rand/io/xml_formatter.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -77,6 +77,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_XML_TEST_REGRESSION_FORMATTER_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/rand/io/xml_formatter.hpp b/libstdc++-v3/testsuite/util/regression/rand/io/xml_formatter.hpp
index 6bc89976c58..7006618bd47 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/io/xml_formatter.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/io/xml_formatter.hpp
@@ -51,7 +51,7 @@
#include <iostream>
#include <io/xml_test_formatter.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -82,6 +82,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_COMMON_XML_TEST_REGRESSION_FORMATTER_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp
index 15ff02bba11..eeedc27bdca 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.hpp
@@ -60,7 +60,7 @@
#include <regression/rand/io/priority_queue/xml_formatter.hpp>
#include <regression/trait/priority_queue/trait.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -329,6 +329,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_CONTAINER_RAND_REGRESSION_TEST_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/split_join_fn_imps.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/split_join_fn_imps.hpp
index 41c302718fe..b25394fa34d 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/split_join_fn_imps.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/detail/split_join_fn_imps.hpp
@@ -109,7 +109,7 @@ split_join()
{
done = false;
- PB_DS_THROW_IF_FAILED( pb_ds::container_traits<cntnr>::split_join_can_throw, pb_ds::container_traits<cntnr>::split_join_can_throw, m_p_c, & m_native_c);
+ PB_DS_THROW_IF_FAILED( __gnu_pbds::container_traits<cntnr>::split_join_can_throw, __gnu_pbds::container_traits<cntnr>::split_join_can_throw, m_p_c, & m_native_c);
}
PB_DS_COND_COMPARE(*m_p_c, m_native_c);
diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp
index 0d4c960fb85..80f941a6db9 100644
--- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp
+++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp
@@ -55,7 +55,7 @@
#include <regression/basic_type.hpp>
#include <regression/priority_queue/common_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -125,7 +125,7 @@ namespace detail
{
detail::verify_params(sd, n, m, tp, ip, dp, ep, cp, mp, disp);
}
- catch(pb_ds::test::illegal_input_error&)
+ catch(__gnu_pbds::test::illegal_input_error&)
{
detail::usage(name);
return -1;
@@ -209,6 +209,6 @@ namespace detail
}
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_load_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_load_trait.hpp
index dac0c7f4719..a796b81b732 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_load_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_load_trait.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/assoc_container.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -80,14 +80,14 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_get_set_load_traits<
Cntnr,
- pb_ds::cc_hash_tag> : public regression_test_hash_get_set_load_traits<
+ __gnu_pbds::cc_hash_tag> : public regression_test_hash_get_set_load_traits<
Cntnr>
{ };
template<typename Cntnr>
struct regression_test_get_set_load_traits<
Cntnr,
- pb_ds::gp_hash_tag> : public regression_test_hash_get_set_load_traits<
+ __gnu_pbds::gp_hash_tag> : public regression_test_hash_get_set_load_traits<
Cntnr>
{ };
@@ -95,6 +95,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_SET_LOAD_TRAIT_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_loads_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_loads_trait.hpp
index 17c872ee83e..389ad6467fe 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_loads_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/get_set_loads_trait.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/assoc_container.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -80,14 +80,14 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_get_set_loacontainer_traits<
Cntnr,
- pb_ds::cc_hash_tag> : public regression_test_hash_get_set_loacontainer_traits<
+ __gnu_pbds::cc_hash_tag> : public regression_test_hash_get_set_loacontainer_traits<
Cntnr>
{ };
template<typename Cntnr>
struct regression_test_get_set_loacontainer_traits<
Cntnr,
- pb_ds::gp_hash_tag> : public regression_test_hash_get_set_loacontainer_traits<
+ __gnu_pbds::gp_hash_tag> : public regression_test_hash_get_set_loacontainer_traits<
Cntnr>
{ };
@@ -95,6 +95,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_SET_LOADS_TRAIT_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/native_type_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/native_type_trait.hpp
index 1c65c6c81f8..d70c88339dd 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/native_type_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/native_type_trait.hpp
@@ -48,7 +48,7 @@
#ifndef PB_DS_REGRESSION_TEST_NATIVE_TYPE_TRAIT_HPP
#define PB_DS_REGRESSION_TEST_NATIVE_TYPE_TRAIT_HPP
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -133,7 +133,7 @@ namespace pb_ds
struct native_type_traits_base<
Native_Key_Type,
Key_Type,
- pb_ds::null_mapped_type,
+ __gnu_pbds::null_mapped_type,
Allocator>
{
public:
@@ -190,6 +190,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_NATIVE_TYPE_TRAIT_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/node_update_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/node_update_trait.hpp
index 9f235116ecb..ff3004279f4 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/node_update_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/node_update_trait.hpp
@@ -53,7 +53,7 @@
#include <common_type/assoc/detail/trie_supports_order_statistics.hpp>
#include <common_type/assoc/detail/trie_supports_prefix_search.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -75,7 +75,7 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_node_update_traits<
Cntnr,
- pb_ds::pat_trie_tag>
+ __gnu_pbds::pat_trie_tag>
{
enum
{
@@ -89,7 +89,7 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_node_update_traits<
Cntnr,
- pb_ds::rb_tree_tag>
+ __gnu_pbds::rb_tree_tag>
{
enum
{
@@ -102,7 +102,7 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_node_update_traits<
Cntnr,
- pb_ds::splay_tree_tag>
+ __gnu_pbds::splay_tree_tag>
{
enum
{
@@ -115,7 +115,7 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_node_update_traits<
Cntnr,
- pb_ds::ov_tree_tag>
+ __gnu_pbds::ov_tree_tag>
{
enum
{
@@ -129,6 +129,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_NODE_UPDATOR_TRAIT_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/resize_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/resize_trait.hpp
index 24ee05b15c5..932a0ccbc1a 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/resize_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/resize_trait.hpp
@@ -50,7 +50,7 @@
#include <ext/pb_ds/assoc_container.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -80,14 +80,14 @@ namespace pb_ds
template<typename Cntnr>
struct regression_test_resize_traits<
Cntnr,
- pb_ds::cc_hash_tag> : public regression_test_hash_resize_traits<
+ __gnu_pbds::cc_hash_tag> : public regression_test_hash_resize_traits<
Cntnr>
{ };
template<typename Cntnr>
struct regression_test_resize_traits<
Cntnr,
- pb_ds::gp_hash_tag> : public regression_test_hash_resize_traits<
+ __gnu_pbds::gp_hash_tag> : public regression_test_hash_resize_traits<
Cntnr>
{ };
@@ -95,6 +95,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_RESIZE_TRAIT_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/to_string.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/to_string.hpp
index d07b330cadb..a0ba69388a2 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/to_string.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/to_string.hpp
@@ -50,7 +50,7 @@
#include <regression/basic_type.hpp>
#include <string>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
@@ -86,6 +86,6 @@ namespace pb_ds
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_REGRESSION_TEST_TO_STRING_HPP
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp
index 9f571107df0..e8791a4472a 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/trait.hpp
@@ -57,7 +57,7 @@
#include <regression/trait/assoc/node_update_trait.hpp>
#include <regression/trait/erase_if_fn.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -214,6 +214,6 @@ namespace detail
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp
index df8b66fcbc8..5c0682de38f 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/assoc/type_trait.hpp
@@ -50,7 +50,7 @@
#include <regression/basic_type.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -92,7 +92,7 @@ namespace pb_ds
template<typename Gen>
static value_type
- generate_value(Gen& r_gen, size_t max, pb_ds::null_mapped_type)
+ generate_value(Gen& r_gen, size_t max, __gnu_pbds::null_mapped_type)
{ return basic_type(r_gen, max); }
template<typename Gen>
@@ -116,6 +116,6 @@ namespace pb_ds
};
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/trait/erase_if_fn.hpp b/libstdc++-v3/testsuite/util/regression/trait/erase_if_fn.hpp
index c583848c630..41618a6843e 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/erase_if_fn.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/erase_if_fn.hpp
@@ -50,7 +50,7 @@
#include <functional>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -90,6 +90,6 @@ namespace pb_ds
};
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/regression/trait/priority_queue/trait.hpp b/libstdc++-v3/testsuite/util/regression/trait/priority_queue/trait.hpp
index 641d9295cfb..f2875105649 100644
--- a/libstdc++-v3/testsuite/util/regression/trait/priority_queue/trait.hpp
+++ b/libstdc++-v3/testsuite/util/regression/trait/priority_queue/trait.hpp
@@ -50,7 +50,7 @@
#include <regression/trait/erase_if_fn.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -61,7 +61,7 @@ namespace pb_ds
{
typedef typename Cntnr::value_type value_type;
typedef typename Cntnr::const_reference const_reference;
- typedef pb_ds::test::native_priority_queue<std::string, true> native_type;
+ typedef __gnu_pbds::test::native_priority_queue<std::string, true> native_type;
typedef typename native_type::value_type native_value_type;
template<typename T>
@@ -87,6 +87,6 @@ namespace pb_ds
};
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/rng/twister_rand_gen.cc b/libstdc++-v3/testsuite/util/rng/twister_rand_gen.cc
index fbe7e8add95..a0c74586a41 100644
--- a/libstdc++-v3/testsuite/util/rng/twister_rand_gen.cc
+++ b/libstdc++-v3/testsuite/util/rng/twister_rand_gen.cc
@@ -47,7 +47,7 @@
#include <debug/debug.h>
#include <util/rng/twister_rand_gen.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -92,4 +92,4 @@ namespace pb_ds
return ret;
}
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
diff --git a/libstdc++-v3/testsuite/util/rng/twister_rand_gen.hpp b/libstdc++-v3/testsuite/util/rng/twister_rand_gen.hpp
index cbc8d1473b7..0088dac76f7 100644
--- a/libstdc++-v3/testsuite/util/rng/twister_rand_gen.hpp
+++ b/libstdc++-v3/testsuite/util/rng/twister_rand_gen.hpp
@@ -50,7 +50,7 @@
#include <limits.h>
#include <tr1/random>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -81,6 +81,6 @@ namespace pb_ds
base_generator_t m_base_generator;
};
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif // #ifndef PB_DS_TWISTER_RAND_GEN_HPP
diff --git a/libstdc++-v3/testsuite/util/statistic/result_recorder.hpp b/libstdc++-v3/testsuite/util/statistic/result_recorder.hpp
index 2f8eaa5ccd2..438fd845311 100644
--- a/libstdc++-v3/testsuite/util/statistic/result_recorder.hpp
+++ b/libstdc++-v3/testsuite/util/statistic/result_recorder.hpp
@@ -51,7 +51,7 @@
#include <statistic/sample_variance.hpp>
#include <statistic/sample_mean_confidence_checker.hpp>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -102,7 +102,7 @@ namespace pb_ds
}
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/statistic/sample_mean.hpp b/libstdc++-v3/testsuite/util/statistic/sample_mean.hpp
index 4c6c5613540..98a7784ceff 100644
--- a/libstdc++-v3/testsuite/util/statistic/sample_mean.hpp
+++ b/libstdc++-v3/testsuite/util/statistic/sample_mean.hpp
@@ -52,7 +52,7 @@
#include <math.h>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -73,7 +73,7 @@ namespace pb_ds
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/statistic/sample_mean_confidence_checker.hpp b/libstdc++-v3/testsuite/util/statistic/sample_mean_confidence_checker.hpp
index 074adc961e5..837fd665f0d 100644
--- a/libstdc++-v3/testsuite/util/statistic/sample_mean_confidence_checker.hpp
+++ b/libstdc++-v3/testsuite/util/statistic/sample_mean_confidence_checker.hpp
@@ -51,7 +51,7 @@
#include <numeric>
#include <math.h>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -88,7 +88,7 @@ namespace pb_ds
}
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/statistic/sample_variance.hpp b/libstdc++-v3/testsuite/util/statistic/sample_variance.hpp
index c2f87407c38..3d7d422c835 100644
--- a/libstdc++-v3/testsuite/util/statistic/sample_variance.hpp
+++ b/libstdc++-v3/testsuite/util/statistic/sample_variance.hpp
@@ -52,7 +52,7 @@
#include <math.h>
#include <iterator>
-namespace pb_ds
+namespace __gnu_pbds
{
namespace test
{
@@ -85,7 +85,7 @@ namespace pb_ds
} // namespace detail
} // namespace test
-} // namespace pb_ds
+} // namespace __gnu_pbds
#endif
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc
index 44e10ac4ba0..cec3ae2f3f9 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc
@@ -30,10 +30,12 @@
// Benjamin Kosnik <bkoz@redhat.com>
#include "testsuite_abi.h"
+#include <cstdlib>
#include <sstream>
#include <fstream>
#include <iostream>
-#include <cstdlib>
+#include <vector>
+#include <algorithm>
using namespace std;
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h
index 89825a875ab..a659ef4a742 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.h
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.h
@@ -33,7 +33,7 @@
#include <stdexcept>
#include <deque>
#include <locale>
-#include <ext/hash_map>
+#include <tr1/unordered_map>
#include <cxxabi.h>
// Encapsulates symbol characteristics.
@@ -75,7 +75,7 @@ struct symbol
init(std::string& data);
};
-typedef __gnu_cxx::hash_map<std::string, symbol> symbol_objects;
+typedef std::tr1::unordered_map<std::string, symbol> symbol_objects;
typedef std::deque<std::string> symbol_names;
@@ -110,20 +110,3 @@ create_symbols(const char* file);
const char*
demangle(const std::string& mangled);
-
-
-// Specialization.
-namespace __gnu_cxx
-{
- using namespace std;
-
- template<>
- struct hash<string>
- {
- size_t operator()(const string& s) const
- {
- const collate<char>& c = use_facet<collate<char> >(locale::classic());
- return c.hash(s.c_str(), s.c_str() + s.size());
- }
- };
-}
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.cc b/libstdc++-v3/testsuite/util/testsuite_allocator.cc
index fdaa647e6fd..8cb95ae8191 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.cc
@@ -61,5 +61,5 @@ namespace __gnu_test
}
return ret;
}
-}; // namespace __cxx_test
+} // namespace __cxx_test
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h
index d6108cc6064..6411568c26d 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.h
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h
@@ -39,12 +39,13 @@
#include <cstddef>
#include <tr1/unordered_map>
#include <cassert>
+#include <bits/stl_move.h>
namespace
{
bool new_called = false;
bool delete_called = false;
-};
+}
namespace __gnu_test
{
@@ -153,10 +154,20 @@ namespace __gnu_test
void
construct(pointer p, const T& value)
{
- new (p) T(value);
+ ::new ((void *)p) T(value);
counter_type::construct();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... Args>
+ void
+ construct(pointer p, Args&&... args)
+ {
+ ::new((void *)p) T(std::forward<Args>(args)...);
+ counter_type::construct();
+ }
+#endif
+
void
destroy(pointer p)
{
@@ -338,8 +349,15 @@ namespace __gnu_test
void
construct(pointer p, const Tp& val)
- { ::new(p) Tp(val); }
-
+ { ::new((void *)p) Tp(val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... Args>
+ void
+ construct(pointer p, Args&&... args)
+ { ::new((void *)p) Tp(std::forward<Args>(args)...); }
+#endif
+
void
destroy(pointer p) { p->~Tp(); }
@@ -365,6 +383,6 @@ namespace __gnu_test
int personality;
};
-}; // namespace __gnu_test
+} // namespace __gnu_test
#endif // _GLIBCXX_TESTSUITE_ALLOCATOR_H
diff --git a/libstdc++-v3/testsuite/util/testsuite_api.h b/libstdc++-v3/testsuite/util/testsuite_api.h
index 143ac67eff6..658e2ad168c 100644
--- a/libstdc++-v3/testsuite/util/testsuite_api.h
+++ b/libstdc++-v3/testsuite/util/testsuite_api.h
@@ -28,10 +28,11 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
+#include <exception>
#include <testsuite_hooks.h>
-#ifndef _TESTSUITE_EH
-#define _TESTSUITE_EH 1
+#ifndef _TESTSUITE_API
+#define _TESTSUITE_API 1
namespace __gnu_test
{
@@ -77,5 +78,61 @@ namespace __gnu_test
{ VERIFY( false ); }
}
};
+
+ // Testing type requirements for template arguments.
+ struct NonDefaultConstructible
+ {
+ NonDefaultConstructible(int) { }
+ NonDefaultConstructible(const NonDefaultConstructible&) { }
+ };
+
+ // See: 20.1.1 Template argument requirements.
+ inline bool
+ operator==(const NonDefaultConstructible&, const NonDefaultConstructible&)
+ { return false; }
+
+ inline bool
+ operator<(const NonDefaultConstructible&, const NonDefaultConstructible&)
+ { return false; }
+
+ // For 26 numeric algorithms requirements, need addable,
+ // subtractable, multiplicable.
+ inline NonDefaultConstructible
+ operator+(const NonDefaultConstructible& lhs,
+ const NonDefaultConstructible& rhs)
+ { return NonDefaultConstructible(1); }
+
+ inline NonDefaultConstructible
+ operator-(const NonDefaultConstructible& lhs,
+ const NonDefaultConstructible& rhs)
+ { return NonDefaultConstructible(1); }
+
+ inline NonDefaultConstructible
+ operator*(const NonDefaultConstructible& lhs,
+ const NonDefaultConstructible& rhs)
+ { return NonDefaultConstructible(1); }
+
+ // Like unary_function, but takes no argument. (ie, void).
+ // Used for generator template parameter.
+ template<typename _Result>
+ struct void_function
+ {
+ typedef _Result result_type;
+
+ result_type
+ operator()() const
+ { return result_type(); }
+ };
+
+ template<>
+ struct void_function<NonDefaultConstructible>
+ {
+ typedef NonDefaultConstructible result_type;
+
+ result_type
+ operator()() const
+ { return result_type(2); }
+ };
+
}
#endif
diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/libstdc++-v3/testsuite/util/testsuite_character.h
index 547775bd886..e9dde65c2f3 100644
--- a/libstdc++-v3/testsuite/util/testsuite_character.h
+++ b/libstdc++-v3/testsuite/util/testsuite_character.h
@@ -46,6 +46,8 @@ namespace __gnu_test
int value;
};
+ // For 20.1 requirements for instantiable type: equality comparable
+ // and less than comparable.
inline bool
operator==(const pod_int& lhs, const pod_int& rhs)
{ return lhs.value == rhs.value; }
@@ -54,6 +56,29 @@ namespace __gnu_test
operator<(const pod_int& lhs, const pod_int& rhs)
{ return lhs.value < rhs.value; }
+ // For 26 numeric algorithms requirements, need addable,
+ // subtractable, multiplicable.
+ inline pod_int
+ operator+(const pod_int& lhs, const pod_int& rhs)
+ {
+ pod_int ret = { lhs.value + rhs.value };
+ return ret;
+ }
+
+ inline pod_int
+ operator-(const pod_int& lhs, const pod_int& rhs)
+ {
+ pod_int ret = { lhs.value - rhs.value };
+ return ret;
+ }
+
+ inline pod_int
+ operator*(const pod_int& lhs, const pod_int& rhs)
+ {
+ pod_int ret = { lhs.value * rhs.value };
+ return ret;
+ }
+
struct pod_state
{
unsigned long value;
@@ -112,7 +137,7 @@ namespace __gnu_cxx
inline V2
__gnu_test::pod_uchar::char_type::to(const char_type& c)
{ return static_cast<V2>(c.value << 5); }
-}; // namespace __gnu_test
+} // namespace __gnu_test
namespace std
{
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index bcb36e71f0f..78fe1fe7fca 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -1,7 +1,7 @@
// -*- C++ -*-
// typelist for the C++ library testsuite.
//
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 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
@@ -40,6 +40,8 @@
#include <ext/bitmap_allocator.h>
#include <ext/pool_allocator.h>
+#include <algorithm>
+
#include <vector>
#include <list>
#include <deque>
@@ -47,8 +49,7 @@
#include <map>
#include <set>
-#include <ext/hash_map>
-#include <ext/hash_set>
+#include <tr1/functional>
#include <tr1/unordered_map>
#include <tr1/unordered_set>
@@ -160,7 +161,7 @@ namespace __gnu_test
typedef typename append<a1, a2>::type type;
};
- // Typelists for map, set, hash_map, hash_set, unordered_set, unordered_map.
+ // Typelists for map, set, unordered_set, unordered_map.
template<typename Tp, bool Thread>
struct maps
{
@@ -182,26 +183,6 @@ namespace __gnu_test
};
template<typename Tp, bool Thread>
- struct hash_maps
- {
- typedef Tp value_type;
- typedef Tp key_type;
- typedef __gnu_cxx::hash<key_type> hash_function;
- typedef std::equal_to<key_type> equality_function;
-
- template<typename Tl>
- struct container
- {
- typedef Tl allocator_type;
- typedef __gnu_cxx::hash_map<key_type, value_type, hash_function, equality_function, allocator_type> type;
- };
-
- typedef allocator_policies<value_type, Thread> allocator_types;
- typedef typename allocator_types::type allocator_typelist;
- typedef typename transform<allocator_typelist, container>::type type;
- };
-
- template<typename Tp, bool Thread>
struct unordered_maps
{
typedef Tp value_type;
@@ -242,26 +223,6 @@ namespace __gnu_test
};
template<typename Tp, bool Thread>
- struct hash_sets
- {
- typedef Tp value_type;
- typedef Tp key_type;
- typedef __gnu_cxx::hash<key_type> hash_function;
- typedef std::equal_to<key_type> equality_function;
-
- template<typename Tl>
- struct container
- {
- typedef Tl allocator_type;
- typedef __gnu_cxx::hash_set<key_type, hash_function, equality_function, allocator_type> type;
- };
-
- typedef allocator_policies<key_type, Thread> allocator_types;
- typedef typename allocator_types::type allocator_typelist;
- typedef typename transform<allocator_typelist, container>::type type;
- };
-
- template<typename Tp, bool Thread>
struct unordered_sets
{
typedef Tp value_type;
@@ -291,16 +252,12 @@ namespace __gnu_test
typedef typename maps<value_type, Thread>::type map_typelist;
typedef typename sets<value_type, Thread>::type set_typelist;
- typedef typename hash_maps<value_type, Thread>::type hash_map_typelist;
- typedef typename hash_sets<value_type, Thread>::type hash_set_typelist;
typedef typename unordered_maps<value_type, Thread>::type unordered_map_typelist;
typedef typename unordered_sets<value_type, Thread>::type unordered_set_typelist;
- typedef typename append<map_typelist, hash_map_typelist>::type a1;
- typedef typename append<a1, unordered_map_typelist>::type a2;
- typedef typename append<set_typelist, hash_set_typelist>::type a3;
- typedef typename append<a3, unordered_set_typelist>::type a4;
- typedef typename append<a2, a4>::type type;
+ typedef typename append<map_typelist, unordered_map_typelist>::type a1;
+ typedef typename append<set_typelist, unordered_set_typelist>::type a2;
+ typedef typename append<a1, a2>::type type;
};
} // namespace __gnu_test
diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.cc b/libstdc++-v3/testsuite/util/testsuite_hooks.cc
index 6ea82f3d908..35ac5b2836f 100644
--- a/libstdc++-v3/testsuite/util/testsuite_hooks.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_hooks.cc
@@ -92,17 +92,17 @@ namespace __gnu_test
setrlimit(RLIMIT_VMEM, &r);
#endif
- // Virtual memory.
- // On x86_64-linux, the default is -z max-page-size=0x200000
- // which means up to 2MB of address space are accounted for
- // PROT_NONE mappings between text and data segments of
- // each shared library. There are 4 shared libs involved
- // in addition to the dynamic linker. Use at least 16MB address space
- // limit.
+ // Virtual memory. On x86_64-linux, the default is -z
+ // max-page-size=0x200000 which means up to 2MB of address space
+ // are accounted for PROT_NONE mappings between text and data
+ // segments of each shared library. There are 4 shared libs
+ // involved in addition to the dynamic linker, maybe 5 if libgomp
+ // is being used as well. Use at least 20MB address space limit.
#if defined(__x86_64__) && defined(__linux__)
- if (limit < 16777216)
- limit = 16777216;
+ if (limit < 20971520)
+ limit = 20971520;
#endif
+
// On HP-UX 11.23, a trivial C++ program that sets RLIMIT_AS to
// anything less than 128MB cannot "malloc" even 1K of memory.
// Therefore, we skip RLIMIT_AS on HP-UX.
@@ -173,7 +173,6 @@ namespace __gnu_test
run_tests_wrapped_locale(const char* name, const func_callback& l)
{
using namespace std;
- bool test = true;
// Set the global locale.
locale loc_name = locale(name);
@@ -202,7 +201,6 @@ namespace __gnu_test
const func_callback& l)
{
using namespace std;
- bool test = true;
#ifdef _GLIBCXX_HAVE_SETENV
// Set the global locale.
@@ -334,4 +332,4 @@ namespace __gnu_test
tmp.tm_isdst = isdst;
return tmp;
}
-}; // namespace __gnu_test
+} // namespace __gnu_test
diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h
index d92eef1500c..cbd876d61fe 100644
--- a/libstdc++-v3/testsuite/util/testsuite_hooks.h
+++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h
@@ -159,24 +159,6 @@ namespace __gnu_test
void
run_tests_wrapped_env(const char*, const char*, const func_callback&);
-
- // For containers (23.1/3).
- struct NonDefaultConstructible
- {
- NonDefaultConstructible(int) { }
- };
-
- inline bool
- operator==(const NonDefaultConstructible&,
- const NonDefaultConstructible&)
- { return false; }
-
- inline bool
- operator<(const NonDefaultConstructible&,
- const NonDefaultConstructible&)
- { return false; }
-
-
// Counting.
struct counter
{
diff --git a/libstdc++-v3/testsuite/util/testsuite_io.h b/libstdc++-v3/testsuite/util/testsuite_io.h
index 2dc3caded63..d370bb0f921 100644
--- a/libstdc++-v3/testsuite/util/testsuite_io.h
+++ b/libstdc++-v3/testsuite/util/testsuite_io.h
@@ -321,7 +321,7 @@ namespace __gnu_test
#ifdef _GLIBCXX_USE_WCHAR_T
typedef fail_num_put<wchar_t> fail_num_put_wchar_t;
#endif
-}; // namespace __gnu_test
+} // namespace __gnu_test
#endif // _GLIBCXX_TESTSUITE_IO_H
diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h
index 073be0beb94..7a124196137 100644
--- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
+++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
@@ -38,6 +38,7 @@
#include <testsuite_hooks.h>
#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_move.h>
#ifndef _TESTSUITE_ITERATORS
#define _TESTSUITE_ITERATORS
@@ -61,8 +62,7 @@ namespace __gnu_test
{
T* first;
T* last;
- BoundsContainer(T* _first, T* _last)
- : first(_first), last(_last)
+ BoundsContainer(T* _first, T* _last) : first(_first), last(_last)
{ }
};
@@ -73,7 +73,7 @@ namespace __gnu_test
T* incrementedto;
bool* writtento;
OutputContainer(T* _first, T* _last)
- : BoundsContainer<T>(_first, _last), incrementedto(_first)
+ : BoundsContainer<T>(_first, _last), incrementedto(_first)
{
writtento = new bool[this->last - this->first];
for(int i = 0; i < this->last - this->first; i++)
@@ -104,6 +104,17 @@ namespace __gnu_test
SharedInfo->writtento[ptr - SharedInfo->first] = 1;
*ptr = new_val;
}
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<class U>
+ void
+ operator=(U&& new_val)
+ {
+ ITERATOR_VERIFY(SharedInfo->writtento[ptr - SharedInfo->first] == 0);
+ SharedInfo->writtento[ptr - SharedInfo->first] = 1;
+ *ptr = std::move(new_val);
+ }
+#endif
};
/**
@@ -114,21 +125,21 @@ namespace __gnu_test
* instansiated directly, but generated from a test_container
*/
template<class T>
- struct output_iterator_wrapper: public std::iterator
- <std::output_iterator_tag, T, ptrdiff_t, T*, T&>
+ struct output_iterator_wrapper
+ : public std::iterator<std::output_iterator_tag, T, ptrdiff_t, T*, T&>
{
typedef OutputContainer<T> ContainerType;
T* ptr;
ContainerType* SharedInfo;
output_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)
- :ptr(_ptr), SharedInfo(SharedInfo_in)
+ : ptr(_ptr), SharedInfo(SharedInfo_in)
{
ITERATOR_VERIFY(ptr >= SharedInfo->first && ptr <= SharedInfo->last);
}
output_iterator_wrapper(const output_iterator_wrapper& in)
- :ptr(in.ptr), SharedInfo(in.SharedInfo)
+ : ptr(in.ptr), SharedInfo(in.SharedInfo)
{ }
WritableObject<T>
@@ -175,8 +186,8 @@ namespace __gnu_test
* instansiated directly, but generated from a test_container
*/
template<class T>
- class input_iterator_wrapper:public std::iterator
- <std::input_iterator_tag, T, ptrdiff_t, T*, T&>
+ class input_iterator_wrapper
+ : public std::iterator<std::input_iterator_tag, T, ptrdiff_t, T*, T&>
{
protected:
input_iterator_wrapper()
@@ -188,11 +199,11 @@ namespace __gnu_test
ContainerType* SharedInfo;
input_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)
- : ptr(_ptr), SharedInfo(SharedInfo_in)
+ : ptr(_ptr), SharedInfo(SharedInfo_in)
{ ITERATOR_VERIFY(ptr >= SharedInfo->first && ptr <= SharedInfo->last); }
input_iterator_wrapper(const input_iterator_wrapper& in)
- : ptr(in.ptr), SharedInfo(in.SharedInfo)
+ : ptr(in.ptr), SharedInfo(in.SharedInfo)
{ }
bool
@@ -257,16 +268,16 @@ namespace __gnu_test
* instansiated directly, but generated from a test_container
*/
template<class T>
- struct forward_iterator_wrapper:public input_iterator_wrapper<T>
+ struct forward_iterator_wrapper : public input_iterator_wrapper<T>
{
typedef BoundsContainer<T> ContainerType;
typedef std::forward_iterator_tag iterator_category;
forward_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)
- :input_iterator_wrapper<T>(_ptr, SharedInfo_in)
+ : input_iterator_wrapper<T>(_ptr, SharedInfo_in)
{ }
forward_iterator_wrapper(const forward_iterator_wrapper& in)
- :input_iterator_wrapper<T>(in)
+ : input_iterator_wrapper<T>(in)
{ }
forward_iterator_wrapper()
@@ -311,16 +322,16 @@ namespace __gnu_test
* instansiated directly, but generated from a test_container
*/
template<class T>
- struct bidirectional_iterator_wrapper:public forward_iterator_wrapper<T>
+ struct bidirectional_iterator_wrapper : public forward_iterator_wrapper<T>
{
typedef BoundsContainer<T> ContainerType;
typedef std::bidirectional_iterator_tag iterator_category;
bidirectional_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)
- :forward_iterator_wrapper<T>(_ptr, SharedInfo_in)
+ : forward_iterator_wrapper<T>(_ptr, SharedInfo_in)
{ }
bidirectional_iterator_wrapper(const bidirectional_iterator_wrapper& in)
- :forward_iterator_wrapper<T>(in)
+ : forward_iterator_wrapper<T>(in)
{ }
bidirectional_iterator_wrapper(): forward_iterator_wrapper<T>()
@@ -375,16 +386,17 @@ namespace __gnu_test
* instansiated directly, but generated from a test_container
*/
template<class T>
- struct random_access_iterator_wrapper:public bidirectional_iterator_wrapper<T>
+ struct random_access_iterator_wrapper
+ : public bidirectional_iterator_wrapper<T>
{
typedef BoundsContainer<T> ContainerType;
typedef std::random_access_iterator_tag iterator_category;
random_access_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)
- : bidirectional_iterator_wrapper<T>(_ptr, SharedInfo_in)
+ : bidirectional_iterator_wrapper<T>(_ptr, SharedInfo_in)
{ }
random_access_iterator_wrapper(const random_access_iterator_wrapper<T>& in)
- : bidirectional_iterator_wrapper<T>(in)
+ : bidirectional_iterator_wrapper<T>(in)
{ }
random_access_iterator_wrapper():bidirectional_iterator_wrapper<T>()
diff --git a/libstdc++-v3/testsuite/util/testsuite_performance.h b/libstdc++-v3/testsuite/util/testsuite_performance.h
index 7557dfe3b09..ad873ed6d23 100644
--- a/libstdc++-v3/testsuite/util/testsuite_performance.h
+++ b/libstdc++-v3/testsuite/util/testsuite_performance.h
@@ -258,7 +258,7 @@ namespace __gnu_test
out << std::endl;
out.close();
}
-}; // namespace __gnu_test
+} // namespace __gnu_test
#endif // _GLIBCXX_PERFORMANCE_H
diff --git a/libstdc++-v3/testsuite/util/testsuite_rvalref.h b/libstdc++-v3/testsuite/util/testsuite_rvalref.h
new file mode 100644
index 00000000000..55d0e41654f
--- /dev/null
+++ b/libstdc++-v3/testsuite/util/testsuite_rvalref.h
@@ -0,0 +1,197 @@
+// -*- C++ -*-
+// Testing utilities for the rvalue reference.
+//
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 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.
+
+#ifndef _GLIBCXX_TESTSUITE_RVALREF_H
+#define _GLIBCXX_TESTSUITE_RVALREF_H 1
+
+#include <testsuite_hooks.h>
+
+namespace __gnu_test
+{
+
+ // This class is designed to test libstdc++'s template-based rvalue
+ // reference support. It should fail at compile-time if there is an attempt
+ // to copy it (although see note just below).
+ class rvalstruct
+ {
+ bool
+ operator=(const rvalstruct&);
+
+// Normally we don't define a copy constructor, as any use of it would
+// show an inefficency. In some cases we know it will be aliased away
+// by the compiler, but it still insists it is defined, so we provide
+// a way of making it public but not giving a body, so any usage would
+// instead fail at link-time.
+#ifdef _GLIBCXX_TESTSUITE_ALLOW_RVALREF_ALIASING
+ public:
+ rvalstruct(const rvalstruct&);
+#else
+ rvalstruct(const rvalstruct&);
+
+ public:
+#endif
+ int val;
+ bool valid;
+
+ rvalstruct() : valid(false)
+ { }
+
+ rvalstruct(int inval) : val(inval), valid(true)
+ { }
+
+ rvalstruct&
+ operator=(int newval)
+ {
+ VERIFY(valid == false);
+ val = newval;
+ valid = true;
+ return *this;
+ }
+
+ rvalstruct(rvalstruct&& in)
+ {
+ VERIFY(in.valid == true);
+ val = in.val;
+ in.valid = false;
+ valid = true;
+ }
+
+ rvalstruct&
+ operator=(rvalstruct&& in)
+ {
+ VERIFY(in.valid == true);
+ val = in.val;
+ in.valid = false;
+ valid = true;
+ return *this;
+ }
+ };
+
+ bool
+ operator==(const rvalstruct& lhs, const rvalstruct& rhs)
+ { return lhs.val == rhs.val; }
+
+ bool
+ operator<(const rvalstruct& lhs, const rvalstruct& rhs)
+ { return lhs.val < rhs.val; }
+
+ void
+ swap(rvalstruct& lhs, rvalstruct& rhs)
+ {
+ VERIFY(lhs.valid && rhs.valid);
+ int temp = lhs.val;
+ lhs.val = rhs.val;
+ rhs.val = temp;
+ }
+
+ // This is a moveable class which copies how many times it is copied.
+ // This is mainly of use in the containers, where the an element inserted
+ // into a container has to be copied once to get there, but we want to check
+ // nothing else is copied.
+ struct copycounter
+ {
+ static int copycount;
+ int val;
+ bool valid;
+
+ copycounter() : val(0), valid(true)
+ { }
+
+ copycounter(int inval) : val(inval), valid(true)
+ { }
+
+ copycounter(const copycounter& in) : val(in.val), valid(true)
+ {
+ VERIFY(in.valid == true);
+ ++copycount;
+ }
+
+ copycounter(copycounter&& in)
+ {
+ VERIFY(in.valid == true);
+ val = in.val;
+ in.valid = false;
+ valid = true;
+ }
+
+ copycounter&
+ operator=(int newval)
+ {
+ val = newval;
+ valid = true;
+ return *this;
+ }
+
+ bool
+ operator=(const copycounter& in)
+ {
+ VERIFY(in.valid == true);
+ ++copycount;
+ val = in.val;
+ valid = true;
+ return true;
+ }
+
+ copycounter&
+ operator=(copycounter&& in)
+ {
+ VERIFY(in.valid == true);
+ val = in.val;
+ in.valid = false;
+ valid = true;
+ return *this;
+ }
+
+ ~copycounter()
+ { valid = false; }
+ };
+
+ int copycounter::copycount = 0;
+
+ bool
+ operator==(const copycounter& lhs, const copycounter& rhs)
+ { return lhs.val == rhs.val; }
+
+ bool
+ operator<(const copycounter& lhs, const copycounter& rhs)
+ { return lhs.val < rhs.val; }
+
+ void
+ swap(copycounter& lhs, copycounter& rhs)
+ {
+ VERIFY(lhs.valid && rhs.valid);
+ int temp = lhs.val;
+ lhs.val = rhs.val;
+ rhs.val = temp;
+ }
+
+} // namespace __gnu_test
+
+#endif // _GLIBCXX_TESTSUITE_TR1_H